superdesk-ui-framework 2.4.18 → 2.4.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,6 +39,13 @@ class Select extends React.Component<ISelect, IState> {
39
39
  this.props.onChange(event.target.value);
40
40
  }
41
41
 
42
+ componentDidUpdate(prevProps: any) {
43
+ if (this.props.value !== prevProps.value) {
44
+ this.setState({ value: this.props.value ?? '' });
45
+ this.props.onChange(this.props.value ?? '');
46
+ }
47
+ }
48
+
42
49
  render() {
43
50
  const classes = classNames('sd-input sd-input--is-select', {
44
51
  'sd-input--inline-label': this.props.inlineLabel,
@@ -61128,6 +61128,13 @@ var Select = /** @class */ (function (_super) {
61128
61128
  this.setState({ value: event.target.value });
61129
61129
  this.props.onChange(event.target.value);
61130
61130
  };
61131
+ Select.prototype.componentDidUpdate = function (prevProps) {
61132
+ var _a, _b;
61133
+ if (this.props.value !== prevProps.value) {
61134
+ this.setState({ value: (_a = this.props.value) !== null && _a !== void 0 ? _a : '' });
61135
+ this.props.onChange((_b = this.props.value) !== null && _b !== void 0 ? _b : '');
61136
+ }
61137
+ };
61131
61138
  Select.prototype.render = function () {
61132
61139
  var classes = classnames_1.default('sd-input sd-input--is-select', {
61133
61140
  'sd-input--inline-label': this.props.inlineLabel,
@@ -101341,6 +101348,9 @@ var Prism = (function (_self) {
101341
101348
  language: language
101342
101349
  };
101343
101350
  _.hooks.run('before-tokenize', env);
101351
+ if (!env.grammar) {
101352
+ throw new Error('The language "' + env.language + '" has no grammar.');
101353
+ }
101344
101354
  env.tokens = _.tokenize(env.code, env.grammar);
101345
101355
  _.hooks.run('after-tokenize', env);
101346
101356
  return Token.stringify(_.util.encode(env.tokens), env.language);
@@ -111543,7 +111553,7 @@ exports.MenuDocs = MenuDocs;
111543
111553
  /* 480 */
111544
111554
  /***/ (function(module, exports) {
111545
111555
 
111546
- module.exports = {"name":"superdesk-ui-framework","version":"2.4.18","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","server":"webpack --watch --config tasks/webpack.prod.js && tsc-watch","build":"webpack --config tasks/webpack.prod.js && tsc && npm run lint","build-ui":"webpack && tsc && npm run lint","lint":"eslint app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","prepublish":"patch-package"},"devDependencies":{"@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/lodash":"^4.14.161","@types/react":"16.8.23","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","lodash":"4.17.21","node-sass":"^4.5.3","patch-package":"6.2.0","prismjs":"^1.17.1","prop-types":"^15.6.0","react":"16.8.6","react-bootstrap":"^0.31.2","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","tslint":"^5.18.0","typescript":"^3.5.1","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@material-ui/lab":"^4.0.0-alpha.56","@popperjs/core":"^2.4.0","@superdesk/primereact":"^5.0.2-4","@types/node":"^14.10.2","chart.js":"^2.9.3","date-fns":"2.7.0","popper.js":"1.14.4","primeicons":"2.0.0","react-id-generator":"^3.0.0","react-popper":"^2.2.3"}}
111556
+ module.exports = {"name":"superdesk-ui-framework","version":"2.4.19","license":"AGPL-3.0","repository":{"type":"git","url":"https://github.com/superdesk/superdesk-ui-framework.git"},"main":"dist/superdesk-ui.bundle.js","types":"react/index.d.ts","contributors":["Nemanja Pavlovic","Vladimir Stefanovic","Darko Tomic","Aleksandar Jelicic","Tomas Kikutis","Dragana Zivkovic"],"scripts":{"start":"webpack-dev-server --config tasks/webpack.dev.js","server":"webpack --watch --config tasks/webpack.prod.js && tsc-watch","build":"webpack --config tasks/webpack.prod.js && tsc && npm run lint","build-ui":"webpack && tsc && npm run lint","lint":"eslint app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","prepublish":"patch-package"},"devDependencies":{"@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/lodash":"^4.14.161","@types/react":"16.8.23","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","angular":"^1.7.9","angular-animate":"^1.7.9","angular-route":"^1.7.9","babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-transform-object-rest-spread":"^6.26.0","babel-preset-es2015":"^6.24.1","babel-preset-react":"^6.24.1","classnames":"^2.2.5","clean-webpack-plugin":"^1.0.0","code-prettify":"^0.1.0","copy-webpack-plugin":"^4.6.0","css-loader":"^2.1.1","eslint":"^4.6.1","eslint-loader":"^1.9.0","eslint-plugin-angular":"^3.1.1","eslint-plugin-react":"^7.3.0","extract-text-webpack-plugin":"^3.0.2","file-loader":"^0.11.2","html-loader":"^0.5.1","html-webpack-plugin":"^2.30.1","jquery":"^3.1.1","jquery-ui":"^1.12.1","lodash":"4.17.21","node-sass":"^4.5.3","patch-package":"6.2.0","prismjs":"^1.17.1","prop-types":"^15.6.0","react":"16.8.6","react-bootstrap":"^0.31.2","react-dom":"16.8.6","react-redux":"^5.0.6","react-router-dom":"^5.1.2","redux":"^3.7.2","redux-form":"^7.0.4","sass-loader":"^6.0.6","style-loader":"^0.18.2","superdesk-code-style":"^1.1.2","ts-loader":"^6.0.2","tslint":"^5.18.0","typescript":"^3.5.1","url-loader":"^1.1.2","webpack":"^3.5.5","webpack-cli":"3.3.10","webpack-dev-server":"2.11.1","webpack-merge":"^4.2.1"},"dependencies":{"@material-ui/lab":"^4.0.0-alpha.56","@popperjs/core":"^2.4.0","@superdesk/primereact":"^5.0.2-4","@types/node":"^14.10.2","chart.js":"^2.9.3","date-fns":"2.7.0","popper.js":"1.14.4","primeicons":"2.0.0","react-id-generator":"^3.0.0","react-popper":"^2.2.3"}}
111547
111557
 
111548
111558
  /***/ }),
111549
111559
  /* 481 */
@@ -60371,6 +60371,13 @@ var Select = /** @class */ (function (_super) {
60371
60371
  this.setState({ value: event.target.value });
60372
60372
  this.props.onChange(event.target.value);
60373
60373
  };
60374
+ Select.prototype.componentDidUpdate = function (prevProps) {
60375
+ var _a, _b;
60376
+ if (this.props.value !== prevProps.value) {
60377
+ this.setState({ value: (_a = this.props.value) !== null && _a !== void 0 ? _a : '' });
60378
+ this.props.onChange((_b = this.props.value) !== null && _b !== void 0 ? _b : '');
60379
+ }
60380
+ };
60374
60381
  Select.prototype.render = function () {
60375
60382
  var classes = classnames_1.default('sd-input sd-input--is-select', {
60376
60383
  'sd-input--inline-label': this.props.inlineLabel,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "2.4.18",
3
+ "version": "2.4.19",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,6 +19,7 @@ declare class Select extends React.Component<ISelect, IState> {
19
19
  constructor(props: ISelect);
20
20
  htmlId: string;
21
21
  handleChange(event: React.ChangeEvent<HTMLSelectElement>): void;
22
+ componentDidUpdate(prevProps: any): void;
22
23
  render(): JSX.Element;
23
24
  }
24
25
  interface IOption {
@@ -56,6 +56,13 @@ var Select = /** @class */ (function (_super) {
56
56
  this.setState({ value: event.target.value });
57
57
  this.props.onChange(event.target.value);
58
58
  };
59
+ Select.prototype.componentDidUpdate = function (prevProps) {
60
+ var _a, _b;
61
+ if (this.props.value !== prevProps.value) {
62
+ this.setState({ value: (_a = this.props.value) !== null && _a !== void 0 ? _a : '' });
63
+ this.props.onChange((_b = this.props.value) !== null && _b !== void 0 ? _b : '');
64
+ }
65
+ };
59
66
  Select.prototype.render = function () {
60
67
  var classes = classnames_1.default('sd-input sd-input--is-select', {
61
68
  'sd-input--inline-label': this.props.inlineLabel,