akeyless-client-commons 1.0.156 → 1.0.158
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 +7 -0
- package/dist/components/index.mjs +29 -22
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -1138,6 +1138,13 @@ var Checkbox = function(param) {
|
|
|
1138
1138
|
setIsChecked(!isChecked);
|
|
1139
1139
|
setChecked === null || setChecked === void 0 ? void 0 : setChecked(!isChecked);
|
|
1140
1140
|
};
|
|
1141
|
+
(0, import_react2.useEffect)(function() {
|
|
1142
|
+
if (checked !== isChecked) {
|
|
1143
|
+
setIsChecked(checked);
|
|
1144
|
+
}
|
|
1145
|
+
}, [
|
|
1146
|
+
checked
|
|
1147
|
+
]);
|
|
1141
1148
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1142
1149
|
className: containerClassName,
|
|
1143
1150
|
children: [
|
|
@@ -916,7 +916,7 @@ var devicesDomain = isLocal ? "http://localhost:9001/api/devices" : baseDomain +
|
|
|
916
916
|
var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
|
|
917
917
|
var callCenterDomain = isLocal ? "http://localhost:9003/api/call-center" : baseDomain + "/call-center";
|
|
918
918
|
// src/components/utils/Checkboxes.tsx
|
|
919
|
-
import { useState } from "react";
|
|
919
|
+
import { useEffect, useState } from "react";
|
|
920
920
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
921
921
|
var Checkbox = function(param) {
|
|
922
922
|
var _param_id = param.id, id = _param_id === void 0 ? Math.random().toString() : _param_id, _param_checked = param.checked, checked = _param_checked === void 0 ? false : _param_checked, setChecked = param.setChecked, _param_rotate = param.rotate, rotate = _param_rotate === void 0 ? true : _param_rotate, className = param.className, circleClassName = param.circleClassName, containerClassName = param.containerClassName, elementClassName = param.elementClassName, name = param.name, props = param.props, title = param.title, _param_defaultChecked = param.defaultChecked, defaultChecked = _param_defaultChecked === void 0 ? false : _param_defaultChecked, inputProps = param.inputProps;
|
|
@@ -925,6 +925,13 @@ var Checkbox = function(param) {
|
|
|
925
925
|
setIsChecked(!isChecked);
|
|
926
926
|
setChecked === null || setChecked === void 0 ? void 0 : setChecked(!isChecked);
|
|
927
927
|
};
|
|
928
|
+
useEffect(function() {
|
|
929
|
+
if (checked !== isChecked) {
|
|
930
|
+
setIsChecked(checked);
|
|
931
|
+
}
|
|
932
|
+
}, [
|
|
933
|
+
checked
|
|
934
|
+
]);
|
|
928
935
|
return /* @__PURE__ */ jsxs("div", {
|
|
929
936
|
className: containerClassName,
|
|
930
937
|
children: [
|
|
@@ -1840,7 +1847,7 @@ import ReactDOM2 from "react-dom";
|
|
|
1840
1847
|
import { Command as CommandPrimitive2, useCommandState } from "cmdk";
|
|
1841
1848
|
import { X as X2 } from "lucide-react";
|
|
1842
1849
|
import React10 from "react";
|
|
1843
|
-
import { forwardRef as forwardRef6, useEffect as
|
|
1850
|
+
import { forwardRef as forwardRef6, useEffect as useEffect5, useCallback as useCallback4, useMemo as useMemo4, useRef as useRef3 } from "react";
|
|
1844
1851
|
// src/components/ui/command.tsx
|
|
1845
1852
|
import { Command as CommandPrimitive } from "cmdk";
|
|
1846
1853
|
import { Search as Search2 } from "lucide-react";
|
|
@@ -3587,9 +3594,9 @@ var computePosition2 = function(reference, floating, options) {
|
|
|
3587
3594
|
};
|
|
3588
3595
|
// node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
|
|
3589
3596
|
import * as React9 from "react";
|
|
3590
|
-
import { useLayoutEffect, useEffect as
|
|
3597
|
+
import { useLayoutEffect, useEffect as useEffect4 } from "react";
|
|
3591
3598
|
import * as ReactDOM from "react-dom";
|
|
3592
|
-
var index = typeof document !== "undefined" ? useLayoutEffect :
|
|
3599
|
+
var index = typeof document !== "undefined" ? useLayoutEffect : useEffect4;
|
|
3593
3600
|
function deepEqual(a, b) {
|
|
3594
3601
|
if (a === b) {
|
|
3595
3602
|
return true;
|
|
@@ -3949,7 +3956,7 @@ var CommandEmpty2 = forwardRef6(function(_param, forwardedRef) {
|
|
|
3949
3956
|
CommandEmpty2.displayName = "CommandEmpty";
|
|
3950
3957
|
function useDebounce(value, delay) {
|
|
3951
3958
|
var _React10_useState = _sliced_to_array(React10.useState(value), 2), debouncedValue = _React10_useState[0], setDebouncedValue = _React10_useState[1];
|
|
3952
|
-
|
|
3959
|
+
useEffect5(function() {
|
|
3953
3960
|
var timer = setTimeout(function() {
|
|
3954
3961
|
return setDebouncedValue(value);
|
|
3955
3962
|
}, delay || 500);
|
|
@@ -4003,7 +4010,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4003
4010
|
}, [
|
|
4004
4011
|
selected
|
|
4005
4012
|
]);
|
|
4006
|
-
|
|
4013
|
+
useEffect5(function() {
|
|
4007
4014
|
if (open) {
|
|
4008
4015
|
update();
|
|
4009
4016
|
}
|
|
@@ -4018,7 +4025,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4018
4025
|
(_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.blur();
|
|
4019
4026
|
}
|
|
4020
4027
|
}, []);
|
|
4021
|
-
|
|
4028
|
+
useEffect5(function() {
|
|
4022
4029
|
if (open) {
|
|
4023
4030
|
document.addEventListener("mousedown", handleClickOutside);
|
|
4024
4031
|
document.addEventListener("touchend", handleClickOutside);
|
|
@@ -4034,14 +4041,14 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4034
4041
|
open,
|
|
4035
4042
|
handleClickOutside
|
|
4036
4043
|
]);
|
|
4037
|
-
|
|
4044
|
+
useEffect5(function() {
|
|
4038
4045
|
if (value) {
|
|
4039
4046
|
setSelected(value);
|
|
4040
4047
|
}
|
|
4041
4048
|
}, [
|
|
4042
4049
|
value
|
|
4043
4050
|
]);
|
|
4044
|
-
|
|
4051
|
+
useEffect5(function() {
|
|
4045
4052
|
if (!arrayOptions || onSearch) return;
|
|
4046
4053
|
var newOption = transToGroupOption(arrayOptions || [], groupBy);
|
|
4047
4054
|
if (JSON.stringify(newOption) !== JSON.stringify(options)) {
|
|
@@ -4054,7 +4061,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4054
4061
|
onSearch,
|
|
4055
4062
|
options
|
|
4056
4063
|
]);
|
|
4057
|
-
|
|
4064
|
+
useEffect5(function() {
|
|
4058
4065
|
var doSearchSync = function() {
|
|
4059
4066
|
var res = onSearchSync === null || onSearchSync === void 0 ? void 0 : onSearchSync(debouncedSearchTerm);
|
|
4060
4067
|
setOptions(transToGroupOption(res || [], groupBy));
|
|
@@ -4088,7 +4095,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4088
4095
|
triggerSearchOnFocus,
|
|
4089
4096
|
onSearchSync
|
|
4090
4097
|
]);
|
|
4091
|
-
|
|
4098
|
+
useEffect5(function() {
|
|
4092
4099
|
var doSearch = /*#__PURE__*/ function() {
|
|
4093
4100
|
var _ref = _async_to_generator(function() {
|
|
4094
4101
|
var res;
|
|
@@ -4522,7 +4529,7 @@ function PopoverContent(_param) {
|
|
|
4522
4529
|
}
|
|
4523
4530
|
// src/components/ui/SearchSelect.tsx
|
|
4524
4531
|
import { CheckIcon, ChevronDownIcon } from "lucide-react";
|
|
4525
|
-
import { useCallback as useCallback5, useEffect as
|
|
4532
|
+
import { useCallback as useCallback5, useEffect as useEffect6, useId, useMemo as useMemo5, useState as useState6 } from "react";
|
|
4526
4533
|
import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4527
4534
|
function SearchSelect(param) {
|
|
4528
4535
|
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, buttonClassName = param.buttonClassName, buttonFocusClassName = param.buttonFocusClassName, value = param.value, disabled = param.disabled, onChange = param.onChange, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel, createNewOptionContainerClassName = param.createNewOptionContainerClassName;
|
|
@@ -4531,7 +4538,7 @@ function SearchSelect(param) {
|
|
|
4531
4538
|
var _useState61 = _sliced_to_array(useState6(value || defaultValue || ""), 2), selectedValue = _useState61[0], setSelectedValue = _useState61[1];
|
|
4532
4539
|
var _useState62 = _sliced_to_array(useState6(""), 2), searchQuery = _useState62[0], setSearchQuery = _useState62[1];
|
|
4533
4540
|
var _useState63 = _sliced_to_array(useState6([]), 2), newOptions = _useState63[0], setNewOptions = _useState63[1];
|
|
4534
|
-
|
|
4541
|
+
useEffect6(function() {
|
|
4535
4542
|
if (!defaultValue && onChange) {
|
|
4536
4543
|
setSelectedValue(value);
|
|
4537
4544
|
}
|
|
@@ -5275,12 +5282,12 @@ var NumberUI = function(param) {
|
|
|
5275
5282
|
});
|
|
5276
5283
|
};
|
|
5277
5284
|
// src/components/forms/ModularForm/ModularForm.tsx
|
|
5278
|
-
import { cloneElement, useEffect as
|
|
5285
|
+
import { cloneElement, useEffect as useEffect9, useRef as useRef6, useState as useState9 } from "react";
|
|
5279
5286
|
// src/components/forms/ModularForm/formElements.tsx
|
|
5280
5287
|
import { useCallback as useCallback6, useMemo as useMemo8, useState as useState8 } from "react";
|
|
5281
5288
|
// src/components/forms/ModularForm/InternationalPhonePicker.tsx
|
|
5282
5289
|
import { ChevronDown, Phone } from "lucide-react";
|
|
5283
|
-
import { forwardRef as forwardRef7, useEffect as
|
|
5290
|
+
import { forwardRef as forwardRef7, useEffect as useEffect7, useMemo as useMemo7, useRef as useRef4, useState as useState7 } from "react";
|
|
5284
5291
|
import * as RPNInput from "react-phone-number-input";
|
|
5285
5292
|
import flags from "react-phone-number-input/flags";
|
|
5286
5293
|
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
@@ -5294,7 +5301,7 @@ function InternationalPhonePicker(param) {
|
|
|
5294
5301
|
}
|
|
5295
5302
|
};
|
|
5296
5303
|
var _useState7 = _sliced_to_array(useState7(""), 2), tempPhoneValue = _useState7[0], setTempPhoneValue = _useState7[1];
|
|
5297
|
-
|
|
5304
|
+
useEffect7(function() {
|
|
5298
5305
|
if (defaultValue) {
|
|
5299
5306
|
if (setPhoneValue) {
|
|
5300
5307
|
setPhoneValue(defaultValue);
|
|
@@ -5370,7 +5377,7 @@ var PhoneInput = forwardRef7(function(_param, ref) {
|
|
|
5370
5377
|
"defaultFocus"
|
|
5371
5378
|
]);
|
|
5372
5379
|
var inputRef = useRef4(null);
|
|
5373
|
-
|
|
5380
|
+
useEffect7(function() {
|
|
5374
5381
|
if (inputRef.current && defaultFocus) {
|
|
5375
5382
|
inputRef.current.focus();
|
|
5376
5383
|
}
|
|
@@ -5839,13 +5846,13 @@ var ElementLabel = function(param) {
|
|
|
5839
5846
|
};
|
|
5840
5847
|
// src/hooks/react.ts
|
|
5841
5848
|
import { isEqual as isEqual5 } from "lodash";
|
|
5842
|
-
import { useEffect as
|
|
5849
|
+
import { useEffect as useEffect8, useMemo as useMemo9, useRef as useRef5 } from "react";
|
|
5843
5850
|
function useDeepCompareEffect(effect, dependencies) {
|
|
5844
5851
|
var previousDepsRef = useRef5();
|
|
5845
5852
|
if (!isEqual5(previousDepsRef.current, dependencies)) {
|
|
5846
5853
|
previousDepsRef.current = dependencies;
|
|
5847
5854
|
}
|
|
5848
|
-
|
|
5855
|
+
useEffect8(effect, [
|
|
5849
5856
|
previousDepsRef.current
|
|
5850
5857
|
]);
|
|
5851
5858
|
}
|
|
@@ -5882,7 +5889,7 @@ var ModularForm = function(param) {
|
|
|
5882
5889
|
});
|
|
5883
5890
|
}
|
|
5884
5891
|
}, autoFixLabelsWidthDeps);
|
|
5885
|
-
|
|
5892
|
+
useEffect9(function() {
|
|
5886
5893
|
if (formRef.current) {
|
|
5887
5894
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(formRef.current);
|
|
5888
5895
|
}
|
|
@@ -6165,12 +6172,12 @@ var DatePicker = function(param) {
|
|
|
6165
6172
|
};
|
|
6166
6173
|
// src/components/CodeInput.tsx
|
|
6167
6174
|
import { OTPInput } from "input-otp";
|
|
6168
|
-
import { useEffect as
|
|
6175
|
+
import { useEffect as useEffect10, useRef as useRef7 } from "react";
|
|
6169
6176
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
6170
6177
|
function CodeInput(param) {
|
|
6171
6178
|
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, _param_direction = param.direction, direction = _param_direction === void 0 ? "ltr" : _param_direction;
|
|
6172
6179
|
var firstInputRef = useRef7(null);
|
|
6173
|
-
|
|
6180
|
+
useEffect10(function() {
|
|
6174
6181
|
if (firstInputRef.current) {
|
|
6175
6182
|
firstInputRef.current.focus();
|
|
6176
6183
|
}
|
package/dist/hooks/index.js
CHANGED
|
@@ -554,8 +554,8 @@ var useSnapshotBulk = function(configs, label) {
|
|
|
554
554
|
if (unsubscribe) {
|
|
555
555
|
unsubscribe();
|
|
556
556
|
}
|
|
557
|
-
console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
|
|
558
557
|
});
|
|
558
|
+
console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
|
|
559
559
|
};
|
|
560
560
|
}, []);
|
|
561
561
|
};
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -466,8 +466,8 @@ var useSnapshotBulk = function(configs, label) {
|
|
|
466
466
|
if (unsubscribe) {
|
|
467
467
|
unsubscribe();
|
|
468
468
|
}
|
|
469
|
-
console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
|
|
470
469
|
});
|
|
470
|
+
console.log("==> ".concat(label || "Custom snapshots", " unsubscribed"));
|
|
471
471
|
};
|
|
472
472
|
}, []);
|
|
473
473
|
};
|