superdesk-ui-framework 4.0.90 → 4.0.92
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.
- package/app/styles/_time.scss +2 -2
- package/app-typescript/components/Modal.tsx +1 -0
- package/app-typescript/components/TimePicker.tsx +4 -1
- package/dist/examples.bundle.js +6 -5
- package/dist/superdesk-ui.bundle.css +6 -6
- package/dist/superdesk-ui.bundle.js +5 -4
- package/package.json +1 -1
- package/react/components/Modal.js +1 -1
- package/react/components/TimePicker.d.ts +1 -0
- package/react/components/TimePicker.js +4 -3
- package/.github/CODEOWNERS +0 -1
package/app/styles/_time.scss
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
justify-content: center;
|
|
26
26
|
z-index: 1;
|
|
27
27
|
pointer-events: none;
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
.clear-time-picker {
|
|
30
30
|
position: absolute;
|
|
31
31
|
inset-block-start: 0;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
opacity: 0;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
&:has(.sd-input__input--
|
|
38
|
+
&:has(.sd-input__input--can-clear) {
|
|
39
39
|
.icon-time {
|
|
40
40
|
opacity: 1;
|
|
41
41
|
transition: opacity 0.2s ease;
|
|
@@ -63,6 +63,7 @@ export class Modal extends React.Component<IProps, {}> {
|
|
|
63
63
|
position={this.props.position}
|
|
64
64
|
closable={this.props.onHide != null ? true : false}
|
|
65
65
|
data-test-id={this.props['data-test-id']}
|
|
66
|
+
appendTo={document.body}
|
|
66
67
|
>
|
|
67
68
|
{this.props.children}
|
|
68
69
|
</PrimeDialog>
|
|
@@ -14,6 +14,7 @@ interface IProps extends IInputWrapper {
|
|
|
14
14
|
allowSeconds?: boolean;
|
|
15
15
|
headerTemplate?: React.ReactNode;
|
|
16
16
|
footerTemplate?: React.ReactNode;
|
|
17
|
+
canClear?: boolean; // defaults to true
|
|
17
18
|
'data-test-id'?: string;
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -43,6 +44,8 @@ export class TimePicker extends React.PureComponent<IProps, IState> {
|
|
|
43
44
|
);
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
const canClear = this.props.canClear ?? true;
|
|
48
|
+
|
|
46
49
|
return (
|
|
47
50
|
<InputWrapper
|
|
48
51
|
label={this.props.label}
|
|
@@ -113,7 +116,7 @@ export class TimePicker extends React.PureComponent<IProps, IState> {
|
|
|
113
116
|
}
|
|
114
117
|
}}
|
|
115
118
|
className={classNames('sd-input__input', {
|
|
116
|
-
'sd-input__input--
|
|
119
|
+
'sd-input__input--can-clear': this.props.value != null && canClear,
|
|
117
120
|
})}
|
|
118
121
|
id={this.htmlId}
|
|
119
122
|
aria-labelledby={this.htmlId + 'label'}
|
package/dist/examples.bundle.js
CHANGED
|
@@ -62194,11 +62194,12 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
62194
62194
|
}
|
|
62195
62195
|
TimePicker.prototype.render = function () {
|
|
62196
62196
|
var _this = this;
|
|
62197
|
-
var _a;
|
|
62197
|
+
var _a, _b;
|
|
62198
62198
|
if (this.props.preview) {
|
|
62199
62199
|
return (React.createElement("div", null,
|
|
62200
62200
|
React.createElement("span", null, this.props.value)));
|
|
62201
62201
|
}
|
|
62202
|
+
var canClear = (_a = this.props.canClear) !== null && _a !== void 0 ? _a : true;
|
|
62202
62203
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, invalid: this.props.error != null, required: this.props.required, disabled: this.props.disabled, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, htmlId: this.htmlId, tabindex: this.props.tabindex, inputWrapper: this.props.inputWrapper },
|
|
62203
62204
|
this.state.popupOpen && (React.createElement(ShowPopup_1.PopupPositioner, { getReferenceElement: function () { return _this.timeInputRef.current; }, placement: "bottom-start", onClose: function () {
|
|
62204
62205
|
_this.setState({
|
|
@@ -62213,7 +62214,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
62213
62214
|
React.createElement("div", { className: "time-picker__input" },
|
|
62214
62215
|
React.createElement("input", { style: {
|
|
62215
62216
|
cursor: 'pointer',
|
|
62216
|
-
}, ref: this.timeInputRef, value: (
|
|
62217
|
+
}, ref: this.timeInputRef, value: (_b = this.props.value) !== null && _b !== void 0 ? _b : '', type: "time", onClick: function (e) {
|
|
62217
62218
|
// don't show default popup
|
|
62218
62219
|
e.preventDefault();
|
|
62219
62220
|
_this.setState({
|
|
@@ -62233,7 +62234,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
62233
62234
|
});
|
|
62234
62235
|
}
|
|
62235
62236
|
}, className: (0, classnames_1.default)('sd-input__input', {
|
|
62236
|
-
'sd-input__input--
|
|
62237
|
+
'sd-input__input--can-clear': this.props.value != null && canClear,
|
|
62237
62238
|
}), id: this.htmlId, "aria-labelledby": this.htmlId + 'label', step: this.props.allowSeconds ? 1 : undefined, required: this.props.required, disabled: this.props.disabled, onChange: function (event) {
|
|
62238
62239
|
_this.props.onChange(event.target.value);
|
|
62239
62240
|
}, "data-test-id": this.props['data-test-id'] }),
|
|
@@ -152716,7 +152717,7 @@ var Modal = /** @class */ (function (_super) {
|
|
|
152716
152717
|
_a["p-dialog-content--padding-".concat(this.props.contentPadding)] = this.props.contentPadding,
|
|
152717
152718
|
_a), this.props.className);
|
|
152718
152719
|
return (React.createElement("div", { style: { display: 'content' }, "data-theme": this.props.theme !== 'dark' ? null : 'dark-ui' },
|
|
152719
|
-
React.createElement(dialog_1.Dialog, { id: this.props.id, visible: this.props.visible, header: this.props.headerTemplate, footer: this.props.footerTemplate, closeOnEscape: this.props.closeOnEscape, maximized: this.props.maximized, maximizable: this.props.maximizable, contentClassName: classes, onShow: this.props.onShow, onHide: (_b = this.props.onHide) !== null && _b !== void 0 ? _b : lodash_1.noop, zIndex: this.zIndex, position: this.props.position, closable: this.props.onHide != null ? true : false, "data-test-id": this.props['data-test-id'] }, this.props.children)));
|
|
152720
|
+
React.createElement(dialog_1.Dialog, { id: this.props.id, visible: this.props.visible, header: this.props.headerTemplate, footer: this.props.footerTemplate, closeOnEscape: this.props.closeOnEscape, maximized: this.props.maximized, maximizable: this.props.maximizable, contentClassName: classes, onShow: this.props.onShow, onHide: (_b = this.props.onHide) !== null && _b !== void 0 ? _b : lodash_1.noop, zIndex: this.zIndex, position: this.props.position, closable: this.props.onHide != null ? true : false, "data-test-id": this.props['data-test-id'], appendTo: document.body }, this.props.children)));
|
|
152720
152721
|
};
|
|
152721
152722
|
return Modal;
|
|
152722
152723
|
}(React.Component));
|
|
@@ -195583,7 +195584,7 @@ exports.ThreePaneLayoutPattern = ThreePaneLayoutPattern;
|
|
|
195583
195584
|
/* 1051 */
|
|
195584
195585
|
/***/ (function(module, exports) {
|
|
195585
195586
|
|
|
195586
|
-
module.exports = {"name":"superdesk-ui-framework","version":"4.0.
|
|
195587
|
+
module.exports = {"name":"superdesk-ui-framework","version":"4.0.92","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":"tsc -p tsconfig.json --noEmit && webpack --config tasks/webpack.prod.js && tsc","build-ui":"webpack && tsc && npm run lint","playground-lint":"tsc -p examples/pages/playgrounds/react-playgrounds --noEmit","format-code":"npx prettier . --write","lint":"tsc -p tsconfig.json --noEmit && npx prettier . --check && eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}' && npm run playground-lint && npm run unit-test","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","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","prettier":"3.5.3","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":"^5.8.3","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","@sourcefabric/common":"0.0.66","@superdesk/primereact":"^5.0.2-13","@superdesk/react-resizable-panels":"0.0.39","chart.js":"^2.9.3","date-fns":"^4.1.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","weekstart":"^2.0.0"},"peerDependencies":{"moment":"*"},"volta":{"node":"14.21.3"}}
|
|
195587
195588
|
|
|
195588
195589
|
/***/ }),
|
|
195589
195590
|
/* 1052 */
|
|
@@ -55757,18 +55757,18 @@ i.sd-sidetab-menu__helper-icon {
|
|
|
55757
55757
|
transition: opacity 0.2s ease;
|
|
55758
55758
|
z-index: 2;
|
|
55759
55759
|
opacity: 0; }
|
|
55760
|
-
.time-picker__input:has(.sd-input__input--
|
|
55760
|
+
.time-picker__input:has(.sd-input__input--can-clear) .icon-time {
|
|
55761
55761
|
opacity: 1;
|
|
55762
55762
|
transition: opacity 0.2s ease; }
|
|
55763
|
-
.time-picker__input:has(.sd-input__input--
|
|
55763
|
+
.time-picker__input:has(.sd-input__input--can-clear) .time-picker__icon-wrapper {
|
|
55764
55764
|
pointer-events: all; }
|
|
55765
|
-
.time-picker__input:has(.sd-input__input--
|
|
55765
|
+
.time-picker__input:has(.sd-input__input--can-clear):hover .icon-time {
|
|
55766
55766
|
opacity: 0; }
|
|
55767
|
-
.time-picker__input:has(.sd-input__input--
|
|
55767
|
+
.time-picker__input:has(.sd-input__input--can-clear):hover .clear-time-picker {
|
|
55768
55768
|
opacity: 1; }
|
|
55769
|
-
.time-picker__input:has(.sd-input__input--
|
|
55769
|
+
.time-picker__input:has(.sd-input__input--can-clear):focus-within .icon-time {
|
|
55770
55770
|
opacity: 0; }
|
|
55771
|
-
.time-picker__input:has(.sd-input__input--
|
|
55771
|
+
.time-picker__input:has(.sd-input__input--can-clear):focus-within .clear-time-picker {
|
|
55772
55772
|
opacity: 1; }
|
|
55773
55773
|
|
|
55774
55774
|
.time-picker--date-time .time-picker__input .time-picker__icon-wrapper,
|
|
@@ -61924,11 +61924,12 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
61924
61924
|
}
|
|
61925
61925
|
TimePicker.prototype.render = function () {
|
|
61926
61926
|
var _this = this;
|
|
61927
|
-
var _a;
|
|
61927
|
+
var _a, _b;
|
|
61928
61928
|
if (this.props.preview) {
|
|
61929
61929
|
return (React.createElement("div", null,
|
|
61930
61930
|
React.createElement("span", null, this.props.value)));
|
|
61931
61931
|
}
|
|
61932
|
+
var canClear = (_a = this.props.canClear) !== null && _a !== void 0 ? _a : true;
|
|
61932
61933
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, invalid: this.props.error != null, required: this.props.required, disabled: this.props.disabled, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, htmlId: this.htmlId, tabindex: this.props.tabindex, inputWrapper: this.props.inputWrapper },
|
|
61933
61934
|
this.state.popupOpen && (React.createElement(ShowPopup_1.PopupPositioner, { getReferenceElement: function () { return _this.timeInputRef.current; }, placement: "bottom-start", onClose: function () {
|
|
61934
61935
|
_this.setState({
|
|
@@ -61943,7 +61944,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
61943
61944
|
React.createElement("div", { className: "time-picker__input" },
|
|
61944
61945
|
React.createElement("input", { style: {
|
|
61945
61946
|
cursor: 'pointer',
|
|
61946
|
-
}, ref: this.timeInputRef, value: (
|
|
61947
|
+
}, ref: this.timeInputRef, value: (_b = this.props.value) !== null && _b !== void 0 ? _b : '', type: "time", onClick: function (e) {
|
|
61947
61948
|
// don't show default popup
|
|
61948
61949
|
e.preventDefault();
|
|
61949
61950
|
_this.setState({
|
|
@@ -61963,7 +61964,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
61963
61964
|
});
|
|
61964
61965
|
}
|
|
61965
61966
|
}, className: (0, classnames_1.default)('sd-input__input', {
|
|
61966
|
-
'sd-input__input--
|
|
61967
|
+
'sd-input__input--can-clear': this.props.value != null && canClear,
|
|
61967
61968
|
}), id: this.htmlId, "aria-labelledby": this.htmlId + 'label', step: this.props.allowSeconds ? 1 : undefined, required: this.props.required, disabled: this.props.disabled, onChange: function (event) {
|
|
61968
61969
|
_this.props.onChange(event.target.value);
|
|
61969
61970
|
}, "data-test-id": this.props['data-test-id'] }),
|
|
@@ -152063,7 +152064,7 @@ var Modal = /** @class */ (function (_super) {
|
|
|
152063
152064
|
_a["p-dialog-content--padding-".concat(this.props.contentPadding)] = this.props.contentPadding,
|
|
152064
152065
|
_a), this.props.className);
|
|
152065
152066
|
return (React.createElement("div", { style: { display: 'content' }, "data-theme": this.props.theme !== 'dark' ? null : 'dark-ui' },
|
|
152066
|
-
React.createElement(dialog_1.Dialog, { id: this.props.id, visible: this.props.visible, header: this.props.headerTemplate, footer: this.props.footerTemplate, closeOnEscape: this.props.closeOnEscape, maximized: this.props.maximized, maximizable: this.props.maximizable, contentClassName: classes, onShow: this.props.onShow, onHide: (_b = this.props.onHide) !== null && _b !== void 0 ? _b : lodash_1.noop, zIndex: this.zIndex, position: this.props.position, closable: this.props.onHide != null ? true : false, "data-test-id": this.props['data-test-id'] }, this.props.children)));
|
|
152067
|
+
React.createElement(dialog_1.Dialog, { id: this.props.id, visible: this.props.visible, header: this.props.headerTemplate, footer: this.props.footerTemplate, closeOnEscape: this.props.closeOnEscape, maximized: this.props.maximized, maximizable: this.props.maximizable, contentClassName: classes, onShow: this.props.onShow, onHide: (_b = this.props.onHide) !== null && _b !== void 0 ? _b : lodash_1.noop, zIndex: this.zIndex, position: this.props.position, closable: this.props.onHide != null ? true : false, "data-test-id": this.props['data-test-id'], appendTo: document.body }, this.props.children)));
|
|
152067
152068
|
};
|
|
152068
152069
|
return Modal;
|
|
152069
152070
|
}(React.Component));
|
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@ var Modal = /** @class */ (function (_super) {
|
|
|
75
75
|
_a["p-dialog-content--padding-".concat(this.props.contentPadding)] = this.props.contentPadding,
|
|
76
76
|
_a), this.props.className);
|
|
77
77
|
return (React.createElement("div", { style: { display: 'content' }, "data-theme": this.props.theme !== 'dark' ? null : 'dark-ui' },
|
|
78
|
-
React.createElement(dialog_1.Dialog, { id: this.props.id, visible: this.props.visible, header: this.props.headerTemplate, footer: this.props.footerTemplate, closeOnEscape: this.props.closeOnEscape, maximized: this.props.maximized, maximizable: this.props.maximizable, contentClassName: classes, onShow: this.props.onShow, onHide: (_b = this.props.onHide) !== null && _b !== void 0 ? _b : lodash_1.noop, zIndex: this.zIndex, position: this.props.position, closable: this.props.onHide != null ? true : false, "data-test-id": this.props['data-test-id'] }, this.props.children)));
|
|
78
|
+
React.createElement(dialog_1.Dialog, { id: this.props.id, visible: this.props.visible, header: this.props.headerTemplate, footer: this.props.footerTemplate, closeOnEscape: this.props.closeOnEscape, maximized: this.props.maximized, maximizable: this.props.maximizable, contentClassName: classes, onShow: this.props.onShow, onHide: (_b = this.props.onHide) !== null && _b !== void 0 ? _b : lodash_1.noop, zIndex: this.zIndex, position: this.props.position, closable: this.props.onHide != null ? true : false, "data-test-id": this.props['data-test-id'], appendTo: document.body }, this.props.children)));
|
|
79
79
|
};
|
|
80
80
|
return Modal;
|
|
81
81
|
}(React.Component));
|
|
@@ -73,11 +73,12 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
73
73
|
}
|
|
74
74
|
TimePicker.prototype.render = function () {
|
|
75
75
|
var _this = this;
|
|
76
|
-
var _a;
|
|
76
|
+
var _a, _b;
|
|
77
77
|
if (this.props.preview) {
|
|
78
78
|
return (React.createElement("div", null,
|
|
79
79
|
React.createElement("span", null, this.props.value)));
|
|
80
80
|
}
|
|
81
|
+
var canClear = (_a = this.props.canClear) !== null && _a !== void 0 ? _a : true;
|
|
81
82
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, invalid: this.props.error != null, required: this.props.required, disabled: this.props.disabled, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, htmlId: this.htmlId, tabindex: this.props.tabindex, inputWrapper: this.props.inputWrapper },
|
|
82
83
|
this.state.popupOpen && (React.createElement(ShowPopup_1.PopupPositioner, { getReferenceElement: function () { return _this.timeInputRef.current; }, placement: "bottom-start", onClose: function () {
|
|
83
84
|
_this.setState({
|
|
@@ -92,7 +93,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
92
93
|
React.createElement("div", { className: "time-picker__input" },
|
|
93
94
|
React.createElement("input", { style: {
|
|
94
95
|
cursor: 'pointer',
|
|
95
|
-
}, ref: this.timeInputRef, value: (
|
|
96
|
+
}, ref: this.timeInputRef, value: (_b = this.props.value) !== null && _b !== void 0 ? _b : '', type: "time", onClick: function (e) {
|
|
96
97
|
// don't show default popup
|
|
97
98
|
e.preventDefault();
|
|
98
99
|
_this.setState({
|
|
@@ -112,7 +113,7 @@ var TimePicker = /** @class */ (function (_super) {
|
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
115
|
}, className: (0, classnames_1.default)('sd-input__input', {
|
|
115
|
-
'sd-input__input--
|
|
116
|
+
'sd-input__input--can-clear': this.props.value != null && canClear,
|
|
116
117
|
}), id: this.htmlId, "aria-labelledby": this.htmlId + 'label', step: this.props.allowSeconds ? 1 : undefined, required: this.props.required, disabled: this.props.disabled, onChange: function (event) {
|
|
117
118
|
_this.props.onChange(event.target.value);
|
|
118
119
|
}, "data-test-id": this.props['data-test-id'] }),
|
package/.github/CODEOWNERS
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/app-typescript/ @tomaskikutis
|