akeyless-client-commons 1.0.33 → 1.0.35
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/dist/components/index.js +9 -6
- package/dist/components/index.mjs +13 -10
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -4216,10 +4216,9 @@ function SearchSelect(param) {
|
|
|
4216
4216
|
var options = param.options, name = param.name, _param_selectPlaceholder = param.selectPlaceholder, selectPlaceholder = _param_selectPlaceholder === void 0 ? "Select" : _param_selectPlaceholder, defaultValue = param.defaultValue, _param_searchPlaceholder = param.searchPlaceholder, searchPlaceholder = _param_searchPlaceholder === void 0 ? "Search" : _param_searchPlaceholder, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, notFoundLabel = param.notFoundLabel, notFoundLabelClassName = param.notFoundLabelClassName, elementClassName = param.elementClassName, searchClassName = param.searchClassName, selectButtonClassName = param.selectButtonClassName, value = param.value, disabled = param.disabled, onChange = param.onChange, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel;
|
|
4217
4217
|
var id = (0, import_react6.useId)();
|
|
4218
4218
|
var _ref = _sliced_to_array((0, import_react6.useState)(false), 2), open = _ref[0], setOpen = _ref[1];
|
|
4219
|
-
var _ref1;
|
|
4220
|
-
var _ref2 = _sliced_to_array((0, import_react6.useState)(
|
|
4221
|
-
var _ref3 = _sliced_to_array((0, import_react6.useState)(
|
|
4222
|
-
var _ref4 = _sliced_to_array((0, import_react6.useState)([]), 2), newOptions = _ref4[0], setNewOptions = _ref4[1];
|
|
4219
|
+
var _ref1 = _sliced_to_array((0, import_react6.useState)(value || defaultValue || ""), 2), selectedValue = _ref1[0], setSelectedValue = _ref1[1];
|
|
4220
|
+
var _ref2 = _sliced_to_array((0, import_react6.useState)(""), 2), searchQuery = _ref2[0], setSearchQuery = _ref2[1];
|
|
4221
|
+
var _ref3 = _sliced_to_array((0, import_react6.useState)([]), 2), newOptions = _ref3[0], setNewOptions = _ref3[1];
|
|
4223
4222
|
var allOptions = (0, import_react6.useMemo)(function() {
|
|
4224
4223
|
return _to_consumable_array(options).concat(_to_consumable_array(newOptions));
|
|
4225
4224
|
}, [
|
|
@@ -4245,6 +4244,11 @@ function SearchSelect(param) {
|
|
|
4245
4244
|
allOptions,
|
|
4246
4245
|
selectPlaceholder
|
|
4247
4246
|
]);
|
|
4247
|
+
(0, import_react6.useEffect)(function() {
|
|
4248
|
+
console.log("selectLabel", selectLabel);
|
|
4249
|
+
}, [
|
|
4250
|
+
selectLabel
|
|
4251
|
+
]);
|
|
4248
4252
|
var addNewOption = (0, import_react6.useCallback)(function() {
|
|
4249
4253
|
var newOption = {
|
|
4250
4254
|
value: searchQuery,
|
|
@@ -4313,8 +4317,7 @@ function SearchSelect(param) {
|
|
|
4313
4317
|
return setSearchQuery(val);
|
|
4314
4318
|
},
|
|
4315
4319
|
onKeyDown: function(e) {
|
|
4316
|
-
|
|
4317
|
-
if (e.key === "Enter" && searchQuery) {
|
|
4320
|
+
if (e.key === "Enter" && searchQuery && filteredOptions.length === 0 && createNewOptionLabel) {
|
|
4318
4321
|
addNewOption();
|
|
4319
4322
|
}
|
|
4320
4323
|
}
|
|
@@ -4015,14 +4015,13 @@ function PopoverContent(_param) {
|
|
|
4015
4015
|
}
|
|
4016
4016
|
// src/components/ui/SearchSelect.tsx
|
|
4017
4017
|
import { CheckIcon, ChevronDownIcon } from "lucide-react";
|
|
4018
|
-
import { useCallback as useCallback3, useId, useMemo as useMemo5, useState as useState5 } from "react";
|
|
4018
|
+
import { useCallback as useCallback3, useEffect as useEffect5, useId, useMemo as useMemo5, useState as useState5 } from "react";
|
|
4019
4019
|
import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
4020
4020
|
function SearchSelect(param) {
|
|
4021
4021
|
var options = param.options, name = param.name, _param_selectPlaceholder = param.selectPlaceholder, selectPlaceholder = _param_selectPlaceholder === void 0 ? "Select" : _param_selectPlaceholder, defaultValue = param.defaultValue, _param_searchPlaceholder = param.searchPlaceholder, searchPlaceholder = _param_searchPlaceholder === void 0 ? "Search" : _param_searchPlaceholder, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, notFoundLabel = param.notFoundLabel, notFoundLabelClassName = param.notFoundLabelClassName, elementClassName = param.elementClassName, searchClassName = param.searchClassName, selectButtonClassName = param.selectButtonClassName, value = param.value, disabled = param.disabled, onChange = param.onChange, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel;
|
|
4022
4022
|
var id = useId();
|
|
4023
4023
|
var _useState5 = _sliced_to_array(useState5(false), 2), open = _useState5[0], setOpen = _useState5[1];
|
|
4024
|
-
var
|
|
4025
|
-
var _useState51 = _sliced_to_array(useState5((_ref = value !== null && value !== void 0 ? value : defaultValue) !== null && _ref !== void 0 ? _ref : ""), 2), selectedValue = _useState51[0], setSelectedValue = _useState51[1];
|
|
4024
|
+
var _useState51 = _sliced_to_array(useState5(value || defaultValue || ""), 2), selectedValue = _useState51[0], setSelectedValue = _useState51[1];
|
|
4026
4025
|
var _useState52 = _sliced_to_array(useState5(""), 2), searchQuery = _useState52[0], setSearchQuery = _useState52[1];
|
|
4027
4026
|
var _useState53 = _sliced_to_array(useState5([]), 2), newOptions = _useState53[0], setNewOptions = _useState53[1];
|
|
4028
4027
|
var allOptions = useMemo5(function() {
|
|
@@ -4050,6 +4049,11 @@ function SearchSelect(param) {
|
|
|
4050
4049
|
allOptions,
|
|
4051
4050
|
selectPlaceholder
|
|
4052
4051
|
]);
|
|
4052
|
+
useEffect5(function() {
|
|
4053
|
+
console.log("selectLabel", selectLabel);
|
|
4054
|
+
}, [
|
|
4055
|
+
selectLabel
|
|
4056
|
+
]);
|
|
4053
4057
|
var addNewOption = useCallback3(function() {
|
|
4054
4058
|
var newOption = {
|
|
4055
4059
|
value: searchQuery,
|
|
@@ -4118,8 +4122,7 @@ function SearchSelect(param) {
|
|
|
4118
4122
|
return setSearchQuery(val);
|
|
4119
4123
|
},
|
|
4120
4124
|
onKeyDown: function(e) {
|
|
4121
|
-
|
|
4122
|
-
if (e.key === "Enter" && searchQuery) {
|
|
4125
|
+
if (e.key === "Enter" && searchQuery && filteredOptions.length === 0 && createNewOptionLabel) {
|
|
4123
4126
|
addNewOption();
|
|
4124
4127
|
}
|
|
4125
4128
|
}
|
|
@@ -4662,7 +4665,7 @@ import { cloneElement, useState as useState8 } from "react";
|
|
|
4662
4665
|
import { useCallback as useCallback4, useMemo as useMemo8, useState as useState7 } from "react";
|
|
4663
4666
|
// src/components/forms/ModularForm/InternationalPhonePicker.tsx
|
|
4664
4667
|
import { ChevronDown, Phone } from "lucide-react";
|
|
4665
|
-
import { forwardRef as forwardRef7, useEffect as
|
|
4668
|
+
import { forwardRef as forwardRef7, useEffect as useEffect6, useMemo as useMemo7, useRef as useRef4, useState as useState6 } from "react";
|
|
4666
4669
|
import * as RPNInput from "react-phone-number-input";
|
|
4667
4670
|
import flags from "react-phone-number-input/flags";
|
|
4668
4671
|
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
@@ -4676,7 +4679,7 @@ function InternationalPhonePicker(param) {
|
|
|
4676
4679
|
}
|
|
4677
4680
|
};
|
|
4678
4681
|
var _useState6 = _sliced_to_array(useState6(""), 2), tempPhoneValue = _useState6[0], setTempPhoneValue = _useState6[1];
|
|
4679
|
-
|
|
4682
|
+
useEffect6(function() {
|
|
4680
4683
|
if (defaultValue) {
|
|
4681
4684
|
if (setPhoneValue) {
|
|
4682
4685
|
setPhoneValue(defaultValue);
|
|
@@ -4749,7 +4752,7 @@ var PhoneInput = forwardRef7(function(_param, ref) {
|
|
|
4749
4752
|
"style"
|
|
4750
4753
|
]);
|
|
4751
4754
|
var inputRef = useRef4(null);
|
|
4752
|
-
|
|
4755
|
+
useEffect6(function() {
|
|
4753
4756
|
if (inputRef.current) {
|
|
4754
4757
|
inputRef.current.focus();
|
|
4755
4758
|
}
|
|
@@ -5434,12 +5437,12 @@ var DatePicker = function(param) {
|
|
|
5434
5437
|
};
|
|
5435
5438
|
// src/components/CodeInput.tsx
|
|
5436
5439
|
import { OTPInput } from "input-otp";
|
|
5437
|
-
import { useEffect as
|
|
5440
|
+
import { useEffect as useEffect7, useRef as useRef5 } from "react";
|
|
5438
5441
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
5439
5442
|
function CodeInput(param) {
|
|
5440
5443
|
var codeValue = param.codeValue, setCodeValue = param.setCodeValue, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_slotContainerClassName = param.slotContainerClassName, slotContainerClassName = _param_slotContainerClassName === void 0 ? "" : _param_slotContainerClassName;
|
|
5441
5444
|
var firstInputRef = useRef5(null);
|
|
5442
|
-
|
|
5445
|
+
useEffect7(function() {
|
|
5443
5446
|
if (firstInputRef.current) {
|
|
5444
5447
|
firstInputRef.current.focus();
|
|
5445
5448
|
}
|