superdesk-ui-framework 3.0.1 → 3.0.2
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.
@@ -20,7 +20,7 @@ interface IProps<T> {
|
|
20
20
|
showSelectAll?: boolean;
|
21
21
|
itemTemplate?(item: any): JSX.Element | undefined;
|
22
22
|
selectedItemTemplate?(value: any): JSX.Element | undefined;
|
23
|
-
onChange(newValue: T): void;
|
23
|
+
onChange(newValue: Array<T>): void;
|
24
24
|
invalid?: boolean;
|
25
25
|
inlineLabel?: boolean;
|
26
26
|
labelHidden?: boolean;
|
@@ -75,7 +75,7 @@ export class MultiSelect<T> extends React.Component<IProps<T>, IState<T>> {
|
|
75
75
|
panelClassName={classes}
|
76
76
|
value={this.props.value}
|
77
77
|
options={this.props.options}
|
78
|
-
onChange={(
|
78
|
+
onChange={({value}) => this.props.onChange(value)}
|
79
79
|
display="chip"
|
80
80
|
filter={this.props.filter}
|
81
81
|
filterBy={this.props.optionLabel}
|
package/dist/examples.bundle.js
CHANGED
@@ -114803,7 +114803,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
114803
114803
|
'showFilter': this.props.filter,
|
114804
114804
|
});
|
114805
114805
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.state.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
|
114806
|
-
React.createElement(multiselect_1.MultiSelect, { panelClassName: classes, value: this.props.value, options: this.props.options, onChange: function (
|
114806
|
+
React.createElement(multiselect_1.MultiSelect, { panelClassName: classes, value: this.props.value, options: this.props.options, onChange: function (_a) {
|
114807
|
+
var value = _a.value;
|
114808
|
+
return _this.props.onChange(value);
|
114809
|
+
}, display: "chip", filter: this.props.filter, filterBy: this.props.optionLabel, appendTo: document.body, placeholder: this.props.placeholder, optionLabel: this.props.optionLabel, emptyFilterMessage: this.props.emptyFilterMessage, filterPlaceholder: this.props.filterPlaceholder, itemTemplate: this.props.itemTemplate, selectedItemTemplate: this.props.selectedItemTemplate, maxSelectedLabels: (_a = this.props.maxSelectedLabels) !== null && _a !== void 0 ? _a : 4, selectedItemsLabel: this.props.selectedItemsLabel, ariaLabelledBy: this.htmlId + 'label', tabIndex: this.props.tabIndex ? this.props.tabIndex : '0', showClear: this.props.showClear, disabled: this.props.disabled, inputId: this.htmlId })));
|
114807
114810
|
};
|
114808
114811
|
return MultiSelect;
|
114809
114812
|
}(React.Component));
|
@@ -138743,7 +138746,7 @@ exports.WithSizeObserverDocs = WithSizeObserverDocs;
|
|
138743
138746
|
/* 651 */
|
138744
138747
|
/***/ (function(module, exports) {
|
138745
138748
|
|
138746
|
-
module.exports = {"name":"superdesk-ui-framework","version":"3.0.
|
138749
|
+
module.exports = {"name":"superdesk-ui-framework","version":"3.0.2","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","lint":"eslint --parser=@typescript-eslint/parser app && tslint -c tslint.json 'app-typescript/**/*.{ts,tsx}'","lint-fix":"tsc -p tsconfig.json --noEmit && tslint --fix -c tslint.json 'app-typescript/**/*.{ts,tsx}'","prepublishOnly":"npm run build"},"devDependencies":{"@types/chart.js":"^2.9.24","@types/classnames":"^2.2.9","@types/lodash":"^4.14.161","@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.14.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","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":"6.0","prismjs":"^1.28.0","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":"4.5.2","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-6","@types/node":"^14.10.2","chart.js":"^2.9.3","date-fns":"2.7.0","moment":"^2.29.3","popper.js":"1.14.4","primeicons":"2.0.0","react-beautiful-dnd":"^13.0.0","react-id-generator":"^3.0.0","react-popper":"^2.2.3","react-scrollspy":"^3.4.3"}}
|
138747
138750
|
|
138748
138751
|
/***/ }),
|
138749
138752
|
/* 652 */
|
@@ -114064,7 +114064,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
114064
114064
|
'showFilter': this.props.filter,
|
114065
114065
|
});
|
114066
114066
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.state.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
|
114067
|
-
React.createElement(multiselect_1.MultiSelect, { panelClassName: classes, value: this.props.value, options: this.props.options, onChange: function (
|
114067
|
+
React.createElement(multiselect_1.MultiSelect, { panelClassName: classes, value: this.props.value, options: this.props.options, onChange: function (_a) {
|
114068
|
+
var value = _a.value;
|
114069
|
+
return _this.props.onChange(value);
|
114070
|
+
}, display: "chip", filter: this.props.filter, filterBy: this.props.optionLabel, appendTo: document.body, placeholder: this.props.placeholder, optionLabel: this.props.optionLabel, emptyFilterMessage: this.props.emptyFilterMessage, filterPlaceholder: this.props.filterPlaceholder, itemTemplate: this.props.itemTemplate, selectedItemTemplate: this.props.selectedItemTemplate, maxSelectedLabels: (_a = this.props.maxSelectedLabels) !== null && _a !== void 0 ? _a : 4, selectedItemsLabel: this.props.selectedItemsLabel, ariaLabelledBy: this.htmlId + 'label', tabIndex: this.props.tabIndex ? this.props.tabIndex : '0', showClear: this.props.showClear, disabled: this.props.disabled, inputId: this.htmlId })));
|
114068
114071
|
};
|
114069
114072
|
return MultiSelect;
|
114070
114073
|
}(React.Component));
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@ interface IProps<T> {
|
|
15
15
|
showSelectAll?: boolean;
|
16
16
|
itemTemplate?(item: any): JSX.Element | undefined;
|
17
17
|
selectedItemTemplate?(value: any): JSX.Element | undefined;
|
18
|
-
onChange(newValue: T): void;
|
18
|
+
onChange(newValue: Array<T>): void;
|
19
19
|
invalid?: boolean;
|
20
20
|
inlineLabel?: boolean;
|
21
21
|
labelHidden?: boolean;
|
@@ -63,7 +63,10 @@ var MultiSelect = /** @class */ (function (_super) {
|
|
63
63
|
'showFilter': this.props.filter,
|
64
64
|
});
|
65
65
|
return (React.createElement(Form_1.InputWrapper, { label: this.props.label, error: this.props.error, required: this.props.required, disabled: this.props.disabled, invalid: this.state.invalid, info: this.props.info, inlineLabel: this.props.inlineLabel, labelHidden: this.props.labelHidden, fullWidth: this.props.fullWidth, htmlId: this.htmlId, tabindex: this.props.tabindex },
|
66
|
-
React.createElement(multiselect_1.MultiSelect, { panelClassName: classes, value: this.props.value, options: this.props.options, onChange: function (
|
66
|
+
React.createElement(multiselect_1.MultiSelect, { panelClassName: classes, value: this.props.value, options: this.props.options, onChange: function (_a) {
|
67
|
+
var value = _a.value;
|
68
|
+
return _this.props.onChange(value);
|
69
|
+
}, display: "chip", filter: this.props.filter, filterBy: this.props.optionLabel, appendTo: document.body, placeholder: this.props.placeholder, optionLabel: this.props.optionLabel, emptyFilterMessage: this.props.emptyFilterMessage, filterPlaceholder: this.props.filterPlaceholder, itemTemplate: this.props.itemTemplate, selectedItemTemplate: this.props.selectedItemTemplate, maxSelectedLabels: (_a = this.props.maxSelectedLabels) !== null && _a !== void 0 ? _a : 4, selectedItemsLabel: this.props.selectedItemsLabel, ariaLabelledBy: this.htmlId + 'label', tabIndex: this.props.tabIndex ? this.props.tabIndex : '0', showClear: this.props.showClear, disabled: this.props.disabled, inputId: this.htmlId })));
|
67
70
|
};
|
68
71
|
return MultiSelect;
|
69
72
|
}(React.Component));
|