@pingux/astro 1.32.0-alpha.3 → 1.32.1-alpha.3
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/CHANGELOG.md
CHANGED
@@ -3,6 +3,23 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [1.32.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.31.1...@pingux/astro@1.32.0) (2022-10-19)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* [UIP-5695] Fix height of editable input recipe for Firefox ([7b6a588](https://gitlab.corp.pingidentity.com/ux/pingux/commit/7b6a588838661877c72804aa16c721c3b333281b))
|
12
|
+
* [UIP-5704] Add proper label text to neutral checkbox story ([3915140](https://gitlab.corp.pingidentity.com/ux/pingux/commit/391514030912e393830a9e9733ea102c902677d4))
|
13
|
+
|
14
|
+
|
15
|
+
### Features
|
16
|
+
|
17
|
+
* [UIP-5710] TimeZonePicker EA Improvements ([8185e2d](https://gitlab.corp.pingidentity.com/ux/pingux/commit/8185e2d656fe6d55933e50cb96586fe989cd1112))
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
6
23
|
## [1.31.1](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.31.0...@pingux/astro@1.31.1) (2022-10-13)
|
7
24
|
|
8
25
|
|
@@ -34,6 +34,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/e
|
|
34
34
|
|
35
35
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
36
36
|
|
37
|
+
var _from = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/from"));
|
38
|
+
|
37
39
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
38
40
|
|
39
41
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
@@ -142,18 +144,6 @@ var ComboBoxField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
142
144
|
(0, _react.useImperativeHandle)(ref, function () {
|
143
145
|
return inputRef.current;
|
144
146
|
});
|
145
|
-
/* istanbul ignore next */
|
146
|
-
|
147
|
-
var onSelectionChangeHandler = function onSelectionChangeHandler(key) {
|
148
|
-
var newVal = key || selectedKey || '';
|
149
|
-
|
150
|
-
if (hasAddOption && selectedKey !== inputValue) {
|
151
|
-
newVal = inputValue;
|
152
|
-
}
|
153
|
-
|
154
|
-
if (onSelectionChange) onSelectionChange(newVal);
|
155
|
-
};
|
156
|
-
|
157
147
|
var shouldShowAddOption = hasAddOption && inputValue && selectedKey !== inputValue;
|
158
148
|
var addOption = "ADD: ".concat(inputValue);
|
159
149
|
|
@@ -172,6 +162,18 @@ var ComboBoxField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
172
162
|
|
173
163
|
var defaultItems = getItemsArr(initialDefaultItems);
|
174
164
|
var items = getItemsArr(initialItems);
|
165
|
+
/* istanbul ignore next */
|
166
|
+
|
167
|
+
var onSelectionChangeHandler = function onSelectionChangeHandler(key) {
|
168
|
+
var newVal = key || selectedKey || '';
|
169
|
+
var arrayOfValues = (0, _from["default"])(items || defaultItems);
|
170
|
+
|
171
|
+
if (hasAddOption && selectedKey !== inputValue && arrayOfValues[arrayOfValues.length - 1].key === key) {
|
172
|
+
newVal = inputValue;
|
173
|
+
}
|
174
|
+
|
175
|
+
if (onSelectionChange) onSelectionChange(newVal);
|
176
|
+
};
|
175
177
|
|
176
178
|
var _useFilter = (0, _i18n.useFilter)({
|
177
179
|
sensitivity: 'base'
|
@@ -186,7 +188,7 @@ var ComboBoxField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
186
188
|
}));
|
187
189
|
(0, _react.useEffect)(function () {
|
188
190
|
if (shouldShowAddOption) state.selectionManager.setFocusedKey(addOption);
|
189
|
-
}, [shouldShowAddOption,
|
191
|
+
}, [shouldShowAddOption, inputValue, addOption, state.isOpen]);
|
190
192
|
|
191
193
|
var _useComboBox = (0, _combobox.useComboBox)(_objectSpread(_objectSpread({}, comboBoxOptions), {}, {
|
192
194
|
buttonRef: buttonRef,
|
@@ -9,6 +9,7 @@ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
9
9
|
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
10
10
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
11
11
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
12
|
+
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
12
13
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
13
14
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
14
15
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
@@ -94,18 +95,6 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
94
95
|
useImperativeHandle(ref, function () {
|
95
96
|
return inputRef.current;
|
96
97
|
});
|
97
|
-
/* istanbul ignore next */
|
98
|
-
|
99
|
-
var onSelectionChangeHandler = function onSelectionChangeHandler(key) {
|
100
|
-
var newVal = key || selectedKey || '';
|
101
|
-
|
102
|
-
if (hasAddOption && selectedKey !== inputValue) {
|
103
|
-
newVal = inputValue;
|
104
|
-
}
|
105
|
-
|
106
|
-
if (onSelectionChange) onSelectionChange(newVal);
|
107
|
-
};
|
108
|
-
|
109
98
|
var shouldShowAddOption = hasAddOption && inputValue && selectedKey !== inputValue;
|
110
99
|
var addOption = "ADD: ".concat(inputValue);
|
111
100
|
|
@@ -124,6 +113,19 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
124
113
|
|
125
114
|
var defaultItems = getItemsArr(initialDefaultItems);
|
126
115
|
var items = getItemsArr(initialItems);
|
116
|
+
/* istanbul ignore next */
|
117
|
+
|
118
|
+
var onSelectionChangeHandler = function onSelectionChangeHandler(key) {
|
119
|
+
var newVal = key || selectedKey || '';
|
120
|
+
|
121
|
+
var arrayOfValues = _Array$from(items || defaultItems);
|
122
|
+
|
123
|
+
if (hasAddOption && selectedKey !== inputValue && arrayOfValues[arrayOfValues.length - 1].key === key) {
|
124
|
+
newVal = inputValue;
|
125
|
+
}
|
126
|
+
|
127
|
+
if (onSelectionChange) onSelectionChange(newVal);
|
128
|
+
};
|
127
129
|
|
128
130
|
var _useFilter = useFilter({
|
129
131
|
sensitivity: 'base'
|
@@ -138,7 +140,7 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
138
140
|
}));
|
139
141
|
useEffect(function () {
|
140
142
|
if (shouldShowAddOption) state.selectionManager.setFocusedKey(addOption);
|
141
|
-
}, [shouldShowAddOption,
|
143
|
+
}, [shouldShowAddOption, inputValue, addOption, state.isOpen]);
|
142
144
|
|
143
145
|
var _useComboBox = useComboBox(_objectSpread(_objectSpread({}, comboBoxOptions), {}, {
|
144
146
|
buttonRef: buttonRef,
|