superdesk-ui-framework 4.0.3 → 4.0.4
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.
@@ -7,7 +7,10 @@ import {IconButton} from './IconButton';
|
|
7
7
|
|
8
8
|
interface IProps {
|
9
9
|
value: Date | null;
|
10
|
-
label:
|
10
|
+
label: {
|
11
|
+
text: string;
|
12
|
+
hidden?: boolean;
|
13
|
+
};
|
11
14
|
dateFormat: string;
|
12
15
|
onChange: (value: string | null) => void;
|
13
16
|
preview?: boolean;
|
@@ -70,7 +73,9 @@ export class DateTimePicker extends React.PureComponent<IProps> {
|
|
70
73
|
this.handleDateChange(val?.toString());
|
71
74
|
}}
|
72
75
|
dateFormat={this.props.dateFormat}
|
73
|
-
label={this.props.label}
|
76
|
+
label={this.props.label.text}
|
77
|
+
inlineLabel={this.props.label.hidden ?? false}
|
78
|
+
labelHidden={this.props.label.hidden ?? false}
|
74
79
|
fullWidth={this.props.fullWidth}
|
75
80
|
/>
|
76
81
|
<TimePicker
|
package/dist/examples.bundle.js
CHANGED
@@ -124127,6 +124127,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
124127
124127
|
};
|
124128
124128
|
DateTimePicker.prototype.render = function () {
|
124129
124129
|
var _this = this;
|
124130
|
+
var _a, _b;
|
124130
124131
|
var convertedValue = this.props.value ? new Date(this.props.value) : null;
|
124131
124132
|
var convertedTimeValue = convertedValue
|
124132
124133
|
? "".concat(this.prepareFormat(convertedValue.getHours()), ":").concat(this.prepareFormat(convertedValue.getMinutes()))
|
@@ -124135,7 +124136,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
124135
124136
|
React.createElement(common_1.Spacer, { h: true, gap: "0", noGrow: true, alignItems: 'end' },
|
124136
124137
|
React.createElement(DatePicker_1.DatePicker, { disabled: this.props.disabled, preview: this.props.preview, required: this.props.required, hideClearButton: true, value: convertedValue, onChange: function (val) {
|
124137
124138
|
_this.handleDateChange(val === null || val === void 0 ? void 0 : val.toString());
|
124138
|
-
}, dateFormat: this.props.dateFormat, label: this.props.label, fullWidth: this.props.fullWidth }),
|
124139
|
+
}, 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 }),
|
124139
124140
|
React.createElement(TimePicker_1.TimePicker, { disabled: this.props.disabled, preview: this.props.preview, value: convertedTimeValue, onChange: function (val) {
|
124140
124141
|
_this.handleTimeChange(val);
|
124141
124142
|
}, allowSeconds: this.props.allowSeconds, fullWidth: this.props.fullWidth, required: this.props.required }),
|
@@ -185391,7 +185392,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
|
|
185391
185392
|
/* 938 */
|
185392
185393
|
/***/ (function(module, exports) {
|
185393
185394
|
|
185394
|
-
module.exports = {"name":"superdesk-ui-framework","version":"4.0.
|
185395
|
+
module.exports = {"name":"superdesk-ui-framework","version":"4.0.4","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":"*"}}
|
185395
185396
|
|
185396
185397
|
/***/ }),
|
185397
185398
|
/* 939 */
|
@@ -123248,6 +123248,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
123248
123248
|
};
|
123249
123249
|
DateTimePicker.prototype.render = function () {
|
123250
123250
|
var _this = this;
|
123251
|
+
var _a, _b;
|
123251
123252
|
var convertedValue = this.props.value ? new Date(this.props.value) : null;
|
123252
123253
|
var convertedTimeValue = convertedValue
|
123253
123254
|
? "".concat(this.prepareFormat(convertedValue.getHours()), ":").concat(this.prepareFormat(convertedValue.getMinutes()))
|
@@ -123256,7 +123257,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
123256
123257
|
React.createElement(common_1.Spacer, { h: true, gap: "0", noGrow: true, alignItems: 'end' },
|
123257
123258
|
React.createElement(DatePicker_1.DatePicker, { disabled: this.props.disabled, preview: this.props.preview, required: this.props.required, hideClearButton: true, value: convertedValue, onChange: function (val) {
|
123258
123259
|
_this.handleDateChange(val === null || val === void 0 ? void 0 : val.toString());
|
123259
|
-
}, dateFormat: this.props.dateFormat, label: this.props.label, fullWidth: this.props.fullWidth }),
|
123260
|
+
}, 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 }),
|
123260
123261
|
React.createElement(TimePicker_1.TimePicker, { disabled: this.props.disabled, preview: this.props.preview, value: convertedTimeValue, onChange: function (val) {
|
123261
123262
|
_this.handleTimeChange(val);
|
123262
123263
|
}, allowSeconds: this.props.allowSeconds, fullWidth: this.props.fullWidth, required: this.props.required }),
|
package/package.json
CHANGED
@@ -77,6 +77,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
77
77
|
};
|
78
78
|
DateTimePicker.prototype.render = function () {
|
79
79
|
var _this = this;
|
80
|
+
var _a, _b;
|
80
81
|
var convertedValue = this.props.value ? new Date(this.props.value) : null;
|
81
82
|
var convertedTimeValue = convertedValue
|
82
83
|
? "".concat(this.prepareFormat(convertedValue.getHours()), ":").concat(this.prepareFormat(convertedValue.getMinutes()))
|
@@ -85,7 +86,7 @@ var DateTimePicker = /** @class */ (function (_super) {
|
|
85
86
|
React.createElement(common_1.Spacer, { h: true, gap: "0", noGrow: true, alignItems: 'end' },
|
86
87
|
React.createElement(DatePicker_1.DatePicker, { disabled: this.props.disabled, preview: this.props.preview, required: this.props.required, hideClearButton: true, value: convertedValue, onChange: function (val) {
|
87
88
|
_this.handleDateChange(val === null || val === void 0 ? void 0 : val.toString());
|
88
|
-
}, dateFormat: this.props.dateFormat, label: this.props.label, fullWidth: this.props.fullWidth }),
|
89
|
+
}, 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 }),
|
89
90
|
React.createElement(TimePicker_1.TimePicker, { disabled: this.props.disabled, preview: this.props.preview, value: convertedTimeValue, onChange: function (val) {
|
90
91
|
_this.handleTimeChange(val);
|
91
92
|
}, allowSeconds: this.props.allowSeconds, fullWidth: this.props.fullWidth, required: this.props.required }),
|