akeyless-client-commons 1.0.29 → 1.0.30
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 +23 -15
- package/dist/components/index.mjs +26 -18
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -4245,6 +4245,23 @@ function SearchSelect(param) {
|
|
|
4245
4245
|
allOptions,
|
|
4246
4246
|
selectPlaceholder
|
|
4247
4247
|
]);
|
|
4248
|
+
var addNewOption = (0, import_react6.useCallback)(function() {
|
|
4249
|
+
var newOption = {
|
|
4250
|
+
value: searchQuery,
|
|
4251
|
+
label: searchQuery
|
|
4252
|
+
};
|
|
4253
|
+
setNewOptions(function(prev) {
|
|
4254
|
+
return _to_consumable_array(prev).concat([
|
|
4255
|
+
newOption
|
|
4256
|
+
]);
|
|
4257
|
+
});
|
|
4258
|
+
setSelectedValue(newOption.value);
|
|
4259
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newOption.value.trim());
|
|
4260
|
+
setOpen(false);
|
|
4261
|
+
setSearchQuery("");
|
|
4262
|
+
}, [
|
|
4263
|
+
searchQuery
|
|
4264
|
+
]);
|
|
4248
4265
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", {
|
|
4249
4266
|
style: {
|
|
4250
4267
|
direction: direction
|
|
@@ -4298,24 +4315,15 @@ function SearchSelect(param) {
|
|
|
4298
4315
|
}),
|
|
4299
4316
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandList, {
|
|
4300
4317
|
children: filteredOptions.length === 0 && searchQuery !== "" ? createNewOptionLabel ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandEmpty, {
|
|
4301
|
-
onClick:
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
}
|
|
4306
|
-
setNewOptions(function(prev) {
|
|
4307
|
-
return _to_consumable_array(prev).concat([
|
|
4308
|
-
newOption
|
|
4309
|
-
]);
|
|
4310
|
-
});
|
|
4311
|
-
setSelectedValue(newOption.value);
|
|
4312
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newOption.value.trim());
|
|
4313
|
-
setOpen(false);
|
|
4314
|
-
setSearchQuery("");
|
|
4318
|
+
onClick: addNewOption,
|
|
4319
|
+
onKeyDown: function(e) {
|
|
4320
|
+
if (e.key === "Enter") {
|
|
4321
|
+
addNewOption();
|
|
4322
|
+
}
|
|
4315
4323
|
},
|
|
4316
4324
|
className: "hover:bg-[#cccbcb] cursor-pointer w-full",
|
|
4317
4325
|
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", {
|
|
4318
|
-
className: "w-full",
|
|
4326
|
+
className: "w-full h-10 flex items-center px-2",
|
|
4319
4327
|
style: {
|
|
4320
4328
|
direction: direction
|
|
4321
4329
|
},
|
|
@@ -4015,7 +4015,7 @@ function PopoverContent(_param) {
|
|
|
4015
4015
|
}
|
|
4016
4016
|
// src/components/ui/SearchSelect.tsx
|
|
4017
4017
|
import { CheckIcon, ChevronDownIcon } from "lucide-react";
|
|
4018
|
-
import { useId, useMemo as useMemo5, useState as useState5 } from "react";
|
|
4018
|
+
import { useCallback as useCallback3, 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;
|
|
@@ -4050,6 +4050,23 @@ function SearchSelect(param) {
|
|
|
4050
4050
|
allOptions,
|
|
4051
4051
|
selectPlaceholder
|
|
4052
4052
|
]);
|
|
4053
|
+
var addNewOption = useCallback3(function() {
|
|
4054
|
+
var newOption = {
|
|
4055
|
+
value: searchQuery,
|
|
4056
|
+
label: searchQuery
|
|
4057
|
+
};
|
|
4058
|
+
setNewOptions(function(prev) {
|
|
4059
|
+
return _to_consumable_array(prev).concat([
|
|
4060
|
+
newOption
|
|
4061
|
+
]);
|
|
4062
|
+
});
|
|
4063
|
+
setSelectedValue(newOption.value);
|
|
4064
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newOption.value.trim());
|
|
4065
|
+
setOpen(false);
|
|
4066
|
+
setSearchQuery("");
|
|
4067
|
+
}, [
|
|
4068
|
+
searchQuery
|
|
4069
|
+
]);
|
|
4053
4070
|
return /* @__PURE__ */ jsxs10("div", {
|
|
4054
4071
|
style: {
|
|
4055
4072
|
direction: direction
|
|
@@ -4103,24 +4120,15 @@ function SearchSelect(param) {
|
|
|
4103
4120
|
}),
|
|
4104
4121
|
/* @__PURE__ */ jsx15(CommandList, {
|
|
4105
4122
|
children: filteredOptions.length === 0 && searchQuery !== "" ? createNewOptionLabel ? /* @__PURE__ */ jsx15(CommandEmpty, {
|
|
4106
|
-
onClick:
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
}
|
|
4111
|
-
setNewOptions(function(prev) {
|
|
4112
|
-
return _to_consumable_array(prev).concat([
|
|
4113
|
-
newOption
|
|
4114
|
-
]);
|
|
4115
|
-
});
|
|
4116
|
-
setSelectedValue(newOption.value);
|
|
4117
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newOption.value.trim());
|
|
4118
|
-
setOpen(false);
|
|
4119
|
-
setSearchQuery("");
|
|
4123
|
+
onClick: addNewOption,
|
|
4124
|
+
onKeyDown: function(e) {
|
|
4125
|
+
if (e.key === "Enter") {
|
|
4126
|
+
addNewOption();
|
|
4127
|
+
}
|
|
4120
4128
|
},
|
|
4121
4129
|
className: "hover:bg-[#cccbcb] cursor-pointer w-full",
|
|
4122
4130
|
children: /* @__PURE__ */ jsx15("div", {
|
|
4123
|
-
className: "w-full",
|
|
4131
|
+
className: "w-full h-10 flex items-center px-2",
|
|
4124
4132
|
style: {
|
|
4125
4133
|
direction: direction
|
|
4126
4134
|
},
|
|
@@ -4650,7 +4658,7 @@ var NumberUI = function(param) {
|
|
|
4650
4658
|
// src/components/forms/ModularForm/ModularForm.tsx
|
|
4651
4659
|
import { cloneElement, useState as useState8 } from "react";
|
|
4652
4660
|
// src/components/forms/ModularForm/formElements.tsx
|
|
4653
|
-
import { useCallback as
|
|
4661
|
+
import { useCallback as useCallback4, useMemo as useMemo8, useState as useState7 } from "react";
|
|
4654
4662
|
// src/components/forms/ModularForm/InternationalPhonePicker.tsx
|
|
4655
4663
|
import { ChevronDown, Phone } from "lucide-react";
|
|
4656
4664
|
import { forwardRef as forwardRef7, useEffect as useEffect5, useMemo as useMemo7, useRef as useRef4, useState as useState6 } from "react";
|
|
@@ -4847,7 +4855,7 @@ var useSortValues = function(options, sortDirection, sortAsNumber) {
|
|
|
4847
4855
|
};
|
|
4848
4856
|
var InputContainer = function(param) {
|
|
4849
4857
|
var validationError = param.validationError, _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_inputType = param.inputType, inputType = _param_inputType === void 0 ? "text" : _param_inputType, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_validationName = param.validationName, validationName = _param_validationName === void 0 ? "textNumbers" : _param_validationName, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, placeholder = param.placeholder, props = param.props, minLength = param.minLength, onKeyDown = param.onKeyDown, onChange = param.onChange, direction = param.direction, value = param.value;
|
|
4850
|
-
var handleChangeFunction =
|
|
4858
|
+
var handleChangeFunction = useCallback4(function(e) {
|
|
4851
4859
|
handleChange(e);
|
|
4852
4860
|
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
4853
4861
|
}, [
|