superdesk-ui-framework 4.0.12 → 4.0.13

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.
@@ -58,8 +58,8 @@ export class DateTimePicker extends React.PureComponent<IProps> {
58
58
  : '';
59
59
 
60
60
  return (
61
- <div style={{width: Number(this.props.width) > MIN_WIDTH ? this.props.width : MIN_WIDTH}}>
62
- <Spacer h gap="0" noGrow alignItems='end'>
61
+ <div style={{width: this.props.width ? this.props.width : MIN_WIDTH}}>
62
+ <Spacer h gap="8" alignItems='end'>
63
63
  <DatePicker
64
64
  disabled={this.props.disabled}
65
65
  preview={this.props.preview}
@@ -91,7 +91,7 @@ export class DateTimePicker extends React.PureComponent<IProps> {
91
91
  {this.props.preview !== true && (
92
92
  <IconButton
93
93
  disabled={this.props.disabled}
94
- icon='close-small'
94
+ icon='remove-sign'
95
95
  onClick={() => {
96
96
  this.props.onChange(null);
97
97
  }}
@@ -17,6 +17,7 @@ class DateTimePickerExample extends React.PureComponent<{}, {dateTime: Date | nu
17
17
  label={{text: "Planning date"}}
18
18
  value={this.state.dateTime}
19
19
  dateFormat="YYYY-MM-DD"
20
+ width="100%"
20
21
  onChange={(val) => {
21
22
  const parsedVal = val != null ? new Date(val) : null;
22
23
 
@@ -124128,15 +124128,15 @@ var DateTimePicker = /** @class */ (function (_super) {
124128
124128
  var convertedTimeValue = this.props.value != null
124129
124129
  ? "".concat(this.prepareFormat(this.props.value.getHours()), ":").concat(this.prepareFormat(this.props.value.getMinutes()))
124130
124130
  : '';
124131
- return (React.createElement("div", { style: { width: Number(this.props.width) > MIN_WIDTH ? this.props.width : MIN_WIDTH } },
124132
- React.createElement(common_1.Spacer, { h: true, gap: "0", noGrow: true, alignItems: 'end' },
124131
+ return (React.createElement("div", { style: { width: this.props.width ? this.props.width : MIN_WIDTH } },
124132
+ React.createElement(common_1.Spacer, { h: true, gap: "8", alignItems: 'end' },
124133
124133
  React.createElement(DatePicker_1.DatePicker, { disabled: this.props.disabled, preview: this.props.preview, required: this.props.required, hideClearButton: true, value: this.props.value, onChange: function (val) {
124134
124134
  _this.handleDateChange(val);
124135
124135
  }, dateFormat: this.props.dateFormat, label: this.props.label.text, inlineLabel: (_a = this.props.label.hidden) !== null && _a !== void 0 ? _a : false, labelHidden: (_b = this.props.label.hidden) !== null && _b !== void 0 ? _b : false, fullWidth: this.props.fullWidth }),
124136
124136
  React.createElement(TimePicker_1.TimePicker, { disabled: this.props.disabled, preview: this.props.preview, value: convertedTimeValue, onChange: function (val) {
124137
124137
  _this.handleTimeChange(val);
124138
124138
  }, inlineLabel: true, labelHidden: true, allowSeconds: this.props.allowSeconds, fullWidth: this.props.fullWidth, required: this.props.required }),
124139
- this.props.preview !== true && (React.createElement(IconButton_1.IconButton, { disabled: this.props.disabled, icon: 'close-small', onClick: function () {
124139
+ this.props.preview !== true && (React.createElement(IconButton_1.IconButton, { disabled: this.props.disabled, icon: 'remove-sign', onClick: function () {
124140
124140
  _this.props.onChange(null);
124141
124141
  }, ariaValue: 'Clear' })))));
124142
124142
  };
@@ -171965,7 +171965,7 @@ var DateTimePickerExample = /** @class */ (function (_super) {
171965
171965
  }
171966
171966
  DateTimePickerExample.prototype.render = function () {
171967
171967
  var _this = this;
171968
- return (React.createElement(app_typescript_1.DateTimePicker, { label: { text: "Planning date" }, value: this.state.dateTime, dateFormat: "YYYY-MM-DD", onChange: function (val) {
171968
+ return (React.createElement(app_typescript_1.DateTimePicker, { label: { text: "Planning date" }, value: this.state.dateTime, dateFormat: "YYYY-MM-DD", width: "100%", onChange: function (val) {
171969
171969
  var parsedVal = val != null ? new Date(val) : null;
171970
171970
  _this.setState({ dateTime: parsedVal });
171971
171971
  } }));
@@ -185401,7 +185401,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
185401
185401
  /* 938 */
185402
185402
  /***/ (function(module, exports) {
185403
185403
 
185404
- module.exports = {"name":"superdesk-ui-framework","version":"4.0.12","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","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","lint":"eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","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","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","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","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","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","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"4.9.5","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":{"@popperjs/core":"^2.4.0","@superdesk/common":"0.0.28","@superdesk/primereact":"^5.0.2-12","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"2.7.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
185404
+ module.exports = {"name":"superdesk-ui-framework","version":"4.0.13","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","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","lint":"eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build","unit-test":"mocha","debug-unit-tests":"mocha --inspect-brk"},"devDependencies":{"@types/assert":"^1.5.6","@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/enzyme":"^3.10.12","@types/enzyme-adapter-react-16":"^1.0.6","@types/lodash":"^4.14.161","@types/mocha":"^9.1.1","@types/react":"16.8.23","@types/react-beautiful-dnd":"^13.1.2","@types/react-dom":"16.8.0","@types/react-router-dom":"^5.1.2","@types/react-scrollspy":"^3.3.5","@typescript-eslint/parser":"^5.58.0","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","enzyme":"^3.11.0","enzyme-adapter-react-16":"^1.15.7","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","jsdom":"20.0.3","jsdom-global":"3.0.2","lodash":"4.17.21","mocha":"^8.4.0","moment":"^2.29.3","node-sass":"6.0","prismjs":"^1.28.0","prop-types":"^15.6.0","react":"16.8.6","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","ts-node":"^10.9.1","tslint":"^5.18.0","typescript":"4.9.5","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":{"@popperjs/core":"^2.4.0","@superdesk/common":"0.0.28","@superdesk/primereact":"^5.0.2-12","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"2.7.0","popper-max-size-modifier":"^0.2.0","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-scrollspy":"^3.4.3"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
185405
185405
 
185406
185406
  /***/ }),
185407
185407
  /* 939 */
@@ -123249,15 +123249,15 @@ var DateTimePicker = /** @class */ (function (_super) {
123249
123249
  var convertedTimeValue = this.props.value != null
123250
123250
  ? "".concat(this.prepareFormat(this.props.value.getHours()), ":").concat(this.prepareFormat(this.props.value.getMinutes()))
123251
123251
  : '';
123252
- return (React.createElement("div", { style: { width: Number(this.props.width) > MIN_WIDTH ? this.props.width : MIN_WIDTH } },
123253
- React.createElement(common_1.Spacer, { h: true, gap: "0", noGrow: true, alignItems: 'end' },
123252
+ return (React.createElement("div", { style: { width: this.props.width ? this.props.width : MIN_WIDTH } },
123253
+ React.createElement(common_1.Spacer, { h: true, gap: "8", alignItems: 'end' },
123254
123254
  React.createElement(DatePicker_1.DatePicker, { disabled: this.props.disabled, preview: this.props.preview, required: this.props.required, hideClearButton: true, value: this.props.value, onChange: function (val) {
123255
123255
  _this.handleDateChange(val);
123256
123256
  }, dateFormat: this.props.dateFormat, label: this.props.label.text, inlineLabel: (_a = this.props.label.hidden) !== null && _a !== void 0 ? _a : false, labelHidden: (_b = this.props.label.hidden) !== null && _b !== void 0 ? _b : false, fullWidth: this.props.fullWidth }),
123257
123257
  React.createElement(TimePicker_1.TimePicker, { disabled: this.props.disabled, preview: this.props.preview, value: convertedTimeValue, onChange: function (val) {
123258
123258
  _this.handleTimeChange(val);
123259
123259
  }, inlineLabel: true, labelHidden: true, allowSeconds: this.props.allowSeconds, fullWidth: this.props.fullWidth, required: this.props.required }),
123260
- this.props.preview !== true && (React.createElement(IconButton_1.IconButton, { disabled: this.props.disabled, icon: 'close-small', onClick: function () {
123260
+ this.props.preview !== true && (React.createElement(IconButton_1.IconButton, { disabled: this.props.disabled, icon: 'remove-sign', onClick: function () {
123261
123261
  _this.props.onChange(null);
123262
123262
  }, ariaValue: 'Clear' })))));
123263
123263
  };
@@ -17,6 +17,7 @@ class DateTimePickerExample extends React.PureComponent<{}, {dateTime: Date | nu
17
17
  label={{text: "Planning date"}}
18
18
  value={this.state.dateTime}
19
19
  dateFormat="YYYY-MM-DD"
20
+ width="100%"
20
21
  onChange={(val) => {
21
22
  const parsedVal = val != null ? new Date(val) : null;
22
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "4.0.12",
3
+ "version": "4.0.13",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -78,15 +78,15 @@ var DateTimePicker = /** @class */ (function (_super) {
78
78
  var convertedTimeValue = this.props.value != null
79
79
  ? "".concat(this.prepareFormat(this.props.value.getHours()), ":").concat(this.prepareFormat(this.props.value.getMinutes()))
80
80
  : '';
81
- return (React.createElement("div", { style: { width: Number(this.props.width) > MIN_WIDTH ? this.props.width : MIN_WIDTH } },
82
- React.createElement(common_1.Spacer, { h: true, gap: "0", noGrow: true, alignItems: 'end' },
81
+ return (React.createElement("div", { style: { width: this.props.width ? this.props.width : MIN_WIDTH } },
82
+ React.createElement(common_1.Spacer, { h: true, gap: "8", alignItems: 'end' },
83
83
  React.createElement(DatePicker_1.DatePicker, { disabled: this.props.disabled, preview: this.props.preview, required: this.props.required, hideClearButton: true, value: this.props.value, onChange: function (val) {
84
84
  _this.handleDateChange(val);
85
85
  }, dateFormat: this.props.dateFormat, label: this.props.label.text, inlineLabel: (_a = this.props.label.hidden) !== null && _a !== void 0 ? _a : false, labelHidden: (_b = this.props.label.hidden) !== null && _b !== void 0 ? _b : false, fullWidth: this.props.fullWidth }),
86
86
  React.createElement(TimePicker_1.TimePicker, { disabled: this.props.disabled, preview: this.props.preview, value: convertedTimeValue, onChange: function (val) {
87
87
  _this.handleTimeChange(val);
88
88
  }, inlineLabel: true, labelHidden: true, allowSeconds: this.props.allowSeconds, fullWidth: this.props.fullWidth, required: this.props.required }),
89
- this.props.preview !== true && (React.createElement(IconButton_1.IconButton, { disabled: this.props.disabled, icon: 'close-small', onClick: function () {
89
+ this.props.preview !== true && (React.createElement(IconButton_1.IconButton, { disabled: this.props.disabled, icon: 'remove-sign', onClick: function () {
90
90
  _this.props.onChange(null);
91
91
  }, ariaValue: 'Clear' })))));
92
92
  };