@annotation-studio/components
Advanced tools
Comparing version 1.0.0-next.2022bf79 to 1.0.0-next.42ca5e47
@@ -82,3 +82,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
{ disabled: true }, | ||
'Save' | ||
React.createElement(FormattedMessage, { id: 'editor.save' }) | ||
); | ||
@@ -91,3 +91,3 @@ } | ||
} }, | ||
'Save work as in progress' | ||
React.createElement(FormattedMessage, { id: 'editor.save_in_progress' }) | ||
); | ||
@@ -94,0 +94,0 @@ } |
@@ -50,6 +50,8 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
_this.setState({ creatingNew: false, previousValue: null }); | ||
}, _this.postSave = function (prom, annotation) { | ||
}, _this.postSave = function (prom) { | ||
_this.setState({ loading: true }); | ||
prom.then(function (val) { | ||
var url = val.payload.annotation.canonicalUrl ? val.payload.annotation.canonicalUrl : val.payload.id; | ||
prom.then(function (annotation) { | ||
var url = annotation.canonicalUrl ? annotation.canonicalUrl : annotation.id; | ||
_this.setState({ | ||
@@ -61,3 +63,3 @@ creatingNew: false, | ||
}); | ||
_this.props.update({ url: val.payload.id, label: annotation.label }); | ||
_this.props.update({ url: annotation.id, label: annotation.label }); | ||
}); | ||
@@ -64,0 +66,0 @@ }, _this.setPortal = function (ref) { |
@@ -31,6 +31,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { isChecked: false, isSaved: false, annotation: null }, _this.onReceiveEmbeddedItem = function (item) { | ||
return item.then(function (item) { | ||
var id = item.payload.annotation.id; | ||
return item.then(function (annotation) { | ||
var id = annotation.id; | ||
_this.props.update(id); | ||
_this.setState({ isSaved: true, annotation: item.payload.annotation }); | ||
_this.setState({ isSaved: true, annotation: annotation }); | ||
}); | ||
@@ -37,0 +37,0 @@ }, _this.handleChange = function () { |
@@ -10,2 +10,2 @@ import React from 'react'; | ||
export { default as ActionTimeAgo } from './components/ui/ActionTimeAgo'; | ||
export { default as ComboButotn } from './components/inputs/ComboButton'; | ||
export { default as ComboButton } from './components/inputs/ComboButton'; |
@@ -103,3 +103,3 @@ 'use strict'; | ||
{ disabled: true }, | ||
'Save' | ||
_react2.default.createElement(_reactIntl.FormattedMessage, { id: 'editor.save' }) | ||
); | ||
@@ -112,3 +112,3 @@ } | ||
} }, | ||
'Save work as in progress' | ||
_react2.default.createElement(_reactIntl.FormattedMessage, { id: 'editor.save_in_progress' }) | ||
); | ||
@@ -115,0 +115,0 @@ } |
@@ -74,6 +74,8 @@ 'use strict'; | ||
_this.setState({ creatingNew: false, previousValue: null }); | ||
}, _this.postSave = function (prom, annotation) { | ||
}, _this.postSave = function (prom) { | ||
_this.setState({ loading: true }); | ||
prom.then(function (val) { | ||
var url = val.payload.annotation.canonicalUrl ? val.payload.annotation.canonicalUrl : val.payload.id; | ||
prom.then(function (annotation) { | ||
var url = annotation.canonicalUrl ? annotation.canonicalUrl : annotation.id; | ||
_this.setState({ | ||
@@ -85,3 +87,3 @@ creatingNew: false, | ||
}); | ||
_this.props.update({ url: val.payload.id, label: annotation.label }); | ||
_this.props.update({ url: annotation.id, label: annotation.label }); | ||
}); | ||
@@ -88,0 +90,0 @@ }, _this.setPortal = function (ref) { |
@@ -49,6 +49,6 @@ 'use strict'; | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { isChecked: false, isSaved: false, annotation: null }, _this.onReceiveEmbeddedItem = function (item) { | ||
return item.then(function (item) { | ||
var id = item.payload.annotation.id; | ||
return item.then(function (annotation) { | ||
var id = annotation.id; | ||
_this.props.update(id); | ||
_this.setState({ isSaved: true, annotation: item.payload.annotation }); | ||
_this.setState({ isSaved: true, annotation: annotation }); | ||
}); | ||
@@ -55,0 +55,0 @@ }, _this.handleChange = function () { |
'use strict'; | ||
exports.__esModule = true; | ||
exports.ComboButotn = exports.ActionTimeAgo = exports.Router = exports.ConfirmationForm = exports.Canvas = exports.Form = exports.Selector = exports.Viewer = undefined; | ||
exports.ComboButton = exports.ActionTimeAgo = exports.Router = exports.ConfirmationForm = exports.Canvas = exports.Form = exports.Selector = exports.Viewer = undefined; | ||
@@ -71,3 +71,3 @@ var _Viewer = require('./components/viewers/Viewer'); | ||
Object.defineProperty(exports, 'ComboButotn', { | ||
Object.defineProperty(exports, 'ComboButton', { | ||
enumerable: true, | ||
@@ -74,0 +74,0 @@ get: function get() { |
{ | ||
"name": "@annotation-studio/components", | ||
"version": "1.0.0-next.2022bf79", | ||
"version": "1.0.0-next.42ca5e47", | ||
"description": "annotation-components React component", | ||
@@ -14,3 +14,3 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"watch": "./bin/watch", | ||
"watch": "nwb-watch-module", | ||
"build": "nwb build-react-component --copy-files --no-demo", | ||
@@ -22,5 +22,6 @@ "clean": "nwb clean-module && npm clean-demo", | ||
"test:watch": "npm run test -- --watch", | ||
"prepublish": "npm run build" | ||
"prepublish": "NODE_ENV=production npm run build" | ||
}, | ||
"dependencies": { | ||
"babel-preset-stage-0": "^6.24.1", | ||
"classnames": "^2.2.5", | ||
@@ -30,2 +31,3 @@ "lodash.isequal": "^4.5.0", | ||
"openseadragon": "^2.2.1", | ||
"react-draggable-custom": "1.4.7", | ||
"react-google-static-map": "^0.1.0", | ||
@@ -35,8 +37,5 @@ "react-portal": "^3.1.0", | ||
}, | ||
"peerDependencies": { | ||
"@fesk/bem-js": "^1.0.1", | ||
"moment": "^2.17.1", | ||
"react": "*", | ||
"optionalDependencies": { | ||
"moment": "^2.20.1", | ||
"react-datepicker": "^0.41.1", | ||
"react-dom": "*", | ||
"react-geosuggest": "^2.3.4", | ||
@@ -46,5 +45,10 @@ "react-google-maps": "^6.3.0", | ||
}, | ||
"peerDependencies": { | ||
"@fesk/bem-js": "^1.0.1", | ||
"react": "^15.6.2", | ||
"react-dom": "^15.6.2" | ||
}, | ||
"devDependencies": { | ||
"@fesk/bem-js": "^1.0.1", | ||
"@fesk/test-environment": "^1.0.0-next.2022bf79", | ||
"@fesk/test-environment": "^1.0.0-next.42ca5e47", | ||
"@insin/extract-text-webpack-plugin": "2.0.0-beta.5.1b711fa5", | ||
@@ -54,8 +58,9 @@ "babel-jest": "^20.0.3", | ||
"jest": "^20.0.0", | ||
"moment": "^2.17.1", | ||
"moment": "^2.20.1", | ||
"nwb": "^0.21.5", | ||
"nwb-sass": "^0.8.2", | ||
"react": "^15.4.2", | ||
"nwb-watch": "^1.0.0-next.42ca5e47", | ||
"react": "^15.6.2", | ||
"react-datepicker": "^0.41.1", | ||
"react-dom": "^15.4.2", | ||
"react-dom": "^15.6.2", | ||
"react-geosuggest": "^2.3.4", | ||
@@ -62,0 +67,0 @@ "react-google-maps": "^6.3.0", |
544095
17
18
+ Addedbabel-preset-stage-0@^6.24.1
+ Addedreact-draggable-custom@1.4.7
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedbabel-code-frame@6.26.0(transitive)
+ Addedbabel-helper-bindify-decorators@6.24.1(transitive)
+ Addedbabel-helper-builder-binary-assignment-operator-visitor@6.24.1(transitive)
+ Addedbabel-helper-explode-assignable-expression@6.24.1(transitive)
+ Addedbabel-helper-explode-class@6.24.1(transitive)
+ Addedbabel-helper-function-name@6.24.1(transitive)
+ Addedbabel-helper-get-function-arity@6.24.1(transitive)
+ Addedbabel-helper-remap-async-to-generator@6.24.1(transitive)
+ Addedbabel-messages@6.23.0(transitive)
+ Addedbabel-plugin-syntax-async-functions@6.13.0(transitive)
+ Addedbabel-plugin-syntax-async-generators@6.13.0(transitive)
+ Addedbabel-plugin-syntax-class-constructor-call@6.18.0(transitive)
+ Addedbabel-plugin-syntax-class-properties@6.13.0(transitive)
+ Addedbabel-plugin-syntax-decorators@6.13.0(transitive)
+ Addedbabel-plugin-syntax-do-expressions@6.13.0(transitive)
+ Addedbabel-plugin-syntax-dynamic-import@6.18.0(transitive)
+ Addedbabel-plugin-syntax-exponentiation-operator@6.13.0(transitive)
+ Addedbabel-plugin-syntax-export-extensions@6.13.0(transitive)
+ Addedbabel-plugin-syntax-function-bind@6.13.0(transitive)
+ Addedbabel-plugin-syntax-object-rest-spread@6.13.0(transitive)
+ Addedbabel-plugin-syntax-trailing-function-commas@6.22.0(transitive)
+ Addedbabel-plugin-transform-async-generator-functions@6.24.1(transitive)
+ Addedbabel-plugin-transform-async-to-generator@6.24.1(transitive)
+ Addedbabel-plugin-transform-class-constructor-call@6.24.1(transitive)
+ Addedbabel-plugin-transform-class-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-decorators@6.24.1(transitive)
+ Addedbabel-plugin-transform-do-expressions@6.22.0(transitive)
+ Addedbabel-plugin-transform-exponentiation-operator@6.24.1(transitive)
+ Addedbabel-plugin-transform-export-extensions@6.22.0(transitive)
+ Addedbabel-plugin-transform-function-bind@6.22.0(transitive)
+ Addedbabel-plugin-transform-object-rest-spread@6.26.0(transitive)
+ Addedbabel-preset-stage-0@6.24.1(transitive)
+ Addedbabel-preset-stage-1@6.24.1(transitive)
+ Addedbabel-preset-stage-2@6.24.1(transitive)
+ Addedbabel-preset-stage-3@6.24.1(transitive)
+ Addedbabel-template@6.26.0(transitive)
+ Addedbabel-traverse@6.26.0(transitive)
+ Addedbabel-types@6.26.0(transitive)
+ Addedbabylon@6.18.0(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedglobals@9.18.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedjs-tokens@3.0.2(transitive)
+ Addedms@2.0.0(transitive)
+ Addedreact-draggable-custom@1.4.7(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedto-fast-properties@1.0.3(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedreact@17.0.219.0.0(transitive)
- Removedreact-dom@17.0.219.0.0(transitive)
- Removedscheduler@0.20.20.25.0(transitive)