superdesk-ui-framework 6.1.4 → 6.1.6
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/.github/workflows/publish-to-npm.yml +10 -6
- package/app/styles/_avatar.scss +2 -0
- package/app/styles/_buttons.scss +6 -4
- package/app/styles/_sd-tag-input.scss +0 -1
- package/app/styles/components/_list-item.scss +17 -5
- package/app/styles/form-elements/_inputs.scss +2 -1
- package/app-typescript/components/TreeSelect/TreeSelect.tsx +13 -0
- package/dist/examples.bundle.js +1 -1
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/main.dda7bbd4.iframe.bundle.js +1 -0
- package/dist/storybook/manifests/components.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/superdesk-ui.bundle.css +1 -1
- package/dist/superdesk-ui.bundle.js +1 -1
- package/package.json +1 -1
- package/react/components/TreeSelect/TreeSelect.js +14 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.dda7bbd4.iframe.bundle.js +1 -0
- package/storybook-static/manifests/components.json +1 -1
- package/storybook-static/project.json +1 -1
- package/dist/storybook/main.2713e2b2.iframe.bundle.js +0 -1
- package/storybook-static/main.2713e2b2.iframe.bundle.js +0 -1
package/package.json
CHANGED
|
@@ -120,6 +120,7 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
_this.onKeyDown = function (e) {
|
|
123
|
+
var _a;
|
|
123
124
|
if (_this.state.openDropdown && _this.ref.current) {
|
|
124
125
|
(0, KeyboardNavigation_1.keyboardNavigation)(e, _this.ref.current, _this.categoryButtonRef.current ? _this.buttonFocus : _this.inputFocus);
|
|
125
126
|
if (e.key === 'Backspace' && _this.state.activeTree.length > 0) {
|
|
@@ -132,6 +133,19 @@ var TreeSelect = /** @class */ (function (_super) {
|
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
}
|
|
136
|
+
else if (e.key === 'Delete' &&
|
|
137
|
+
!_this.state.openDropdown &&
|
|
138
|
+
!_this.props.readOnly &&
|
|
139
|
+
!_this.props.disabled &&
|
|
140
|
+
_this.props.clearable !== false &&
|
|
141
|
+
((_a = _this.treeSelectRef.current) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement)) === true) {
|
|
142
|
+
if (e.ctrlKey) {
|
|
143
|
+
_this.setState({ value: [] });
|
|
144
|
+
}
|
|
145
|
+
else if (_this.state.value.length > 0) {
|
|
146
|
+
_this.setState({ value: _this.state.value.slice(0, -1) });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
135
149
|
};
|
|
136
150
|
_this.onPressEsc = function (event) {
|
|
137
151
|
if (event.key === 'Escape' && _this.state.openDropdown) {
|