akeyless-client-commons 1.0.160 → 1.0.161
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 +3 -0
- package/dist/components/index.mjs +13 -10
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/index.mjs +1 -1
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -5453,6 +5453,9 @@ var DurationUI = function(param) {
|
|
|
5453
5453
|
};
|
|
5454
5454
|
var PhoneUI = function(param) {
|
|
5455
5455
|
var phone = param.phone, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
5456
|
+
(0, import_react11.useEffect)(function() {
|
|
5457
|
+
var dir = document.body.style.direction;
|
|
5458
|
+
}, []);
|
|
5456
5459
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", {
|
|
5457
5460
|
style: {
|
|
5458
5461
|
direction: "ltr"
|
|
@@ -1190,7 +1190,7 @@ var LoginWithGoogleButton = function(param) {
|
|
|
1190
1190
|
});
|
|
1191
1191
|
};
|
|
1192
1192
|
// src/components/table/components.tsx
|
|
1193
|
-
import { memo, useMemo as useMemo6 } from "react";
|
|
1193
|
+
import { memo, useEffect as useEffect7, useMemo as useMemo6 } from "react";
|
|
1194
1194
|
// src/assets/svg.tsx
|
|
1195
1195
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1196
1196
|
var RedXSvg = function(param) {
|
|
@@ -5240,6 +5240,9 @@ var DurationUI = function(param) {
|
|
|
5240
5240
|
};
|
|
5241
5241
|
var PhoneUI = function(param) {
|
|
5242
5242
|
var phone = param.phone, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
5243
|
+
useEffect7(function() {
|
|
5244
|
+
var dir = document.body.style.direction;
|
|
5245
|
+
}, []);
|
|
5243
5246
|
return /* @__PURE__ */ jsx17("div", {
|
|
5244
5247
|
style: {
|
|
5245
5248
|
direction: "ltr"
|
|
@@ -5283,12 +5286,12 @@ var NumberUI = function(param) {
|
|
|
5283
5286
|
});
|
|
5284
5287
|
};
|
|
5285
5288
|
// src/components/forms/ModularForm/ModularForm.tsx
|
|
5286
|
-
import { cloneElement, useEffect as
|
|
5289
|
+
import { cloneElement, useEffect as useEffect10, useRef as useRef6, useState as useState9 } from "react";
|
|
5287
5290
|
// src/components/forms/ModularForm/formElements.tsx
|
|
5288
5291
|
import { useCallback as useCallback6, useMemo as useMemo8, useState as useState8 } from "react";
|
|
5289
5292
|
// src/components/forms/ModularForm/InternationalPhonePicker.tsx
|
|
5290
5293
|
import { ChevronDown, Phone } from "lucide-react";
|
|
5291
|
-
import { forwardRef as forwardRef7, useEffect as
|
|
5294
|
+
import { forwardRef as forwardRef7, useEffect as useEffect8, useMemo as useMemo7, useRef as useRef4, useState as useState7 } from "react";
|
|
5292
5295
|
import * as RPNInput from "react-phone-number-input";
|
|
5293
5296
|
import flags from "react-phone-number-input/flags";
|
|
5294
5297
|
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
@@ -5302,7 +5305,7 @@ function InternationalPhonePicker(param) {
|
|
|
5302
5305
|
}
|
|
5303
5306
|
};
|
|
5304
5307
|
var _useState7 = _sliced_to_array(useState7(""), 2), tempPhoneValue = _useState7[0], setTempPhoneValue = _useState7[1];
|
|
5305
|
-
|
|
5308
|
+
useEffect8(function() {
|
|
5306
5309
|
if (defaultValue) {
|
|
5307
5310
|
if (setPhoneValue) {
|
|
5308
5311
|
setPhoneValue(defaultValue);
|
|
@@ -5378,7 +5381,7 @@ var PhoneInput = forwardRef7(function(_param, ref) {
|
|
|
5378
5381
|
"defaultFocus"
|
|
5379
5382
|
]);
|
|
5380
5383
|
var inputRef = useRef4(null);
|
|
5381
|
-
|
|
5384
|
+
useEffect8(function() {
|
|
5382
5385
|
if (inputRef.current && defaultFocus) {
|
|
5383
5386
|
inputRef.current.focus();
|
|
5384
5387
|
}
|
|
@@ -5847,13 +5850,13 @@ var ElementLabel = function(param) {
|
|
|
5847
5850
|
};
|
|
5848
5851
|
// src/hooks/react.ts
|
|
5849
5852
|
import { isEqual as isEqual5 } from "lodash";
|
|
5850
|
-
import { useEffect as
|
|
5853
|
+
import { useEffect as useEffect9, useMemo as useMemo9, useRef as useRef5 } from "react";
|
|
5851
5854
|
function useDeepCompareEffect(effect, dependencies) {
|
|
5852
5855
|
var previousDepsRef = useRef5();
|
|
5853
5856
|
if (!isEqual5(previousDepsRef.current, dependencies)) {
|
|
5854
5857
|
previousDepsRef.current = dependencies;
|
|
5855
5858
|
}
|
|
5856
|
-
|
|
5859
|
+
useEffect9(effect, [
|
|
5857
5860
|
previousDepsRef.current
|
|
5858
5861
|
]);
|
|
5859
5862
|
}
|
|
@@ -5890,7 +5893,7 @@ var ModularForm = function(param) {
|
|
|
5890
5893
|
});
|
|
5891
5894
|
}
|
|
5892
5895
|
}, autoFixLabelsWidthDeps);
|
|
5893
|
-
|
|
5896
|
+
useEffect10(function() {
|
|
5894
5897
|
if (formRef.current) {
|
|
5895
5898
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(formRef.current);
|
|
5896
5899
|
}
|
|
@@ -6173,12 +6176,12 @@ var DatePicker = function(param) {
|
|
|
6173
6176
|
};
|
|
6174
6177
|
// src/components/CodeInput.tsx
|
|
6175
6178
|
import { OTPInput } from "input-otp";
|
|
6176
|
-
import { useEffect as
|
|
6179
|
+
import { useEffect as useEffect11, useRef as useRef7 } from "react";
|
|
6177
6180
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
6178
6181
|
function CodeInput(param) {
|
|
6179
6182
|
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;
|
|
6180
6183
|
var firstInputRef = useRef7(null);
|
|
6181
|
-
|
|
6184
|
+
useEffect11(function() {
|
|
6182
6185
|
if (firstInputRef.current) {
|
|
6183
6186
|
firstInputRef.current.focus();
|
|
6184
6187
|
}
|
package/dist/helpers/index.js
CHANGED
|
@@ -805,7 +805,7 @@ var getAddressByGeo = /*#__PURE__*/ function() {
|
|
|
805
805
|
case 0:
|
|
806
806
|
lat = param.lat, lng = param.lng;
|
|
807
807
|
language = currentLanguage === import_akeyless_types_commons.LanguageOptions.He ? "iw" : "en";
|
|
808
|
-
apiKey = import_meta.env.VITE_api_google_key;
|
|
808
|
+
apiKey = isNodeEnv ? process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY : import_meta.env.VITE_api_google_key;
|
|
809
809
|
url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=".concat(lat, ",").concat(lng, "&key=").concat(apiKey, "&language=").concat(language);
|
|
810
810
|
_state.label = 1;
|
|
811
811
|
case 1:
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -472,7 +472,7 @@ var getAddressByGeo = /*#__PURE__*/ function() {
|
|
|
472
472
|
case 0:
|
|
473
473
|
lat = param.lat, lng = param.lng;
|
|
474
474
|
language = currentLanguage === LanguageOptions.He ? "iw" : "en";
|
|
475
|
-
apiKey = import.meta.env.VITE_api_google_key;
|
|
475
|
+
apiKey = isNodeEnv ? process.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY : import.meta.env.VITE_api_google_key;
|
|
476
476
|
url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=".concat(lat, ",").concat(lng, "&key=").concat(apiKey, "&language=").concat(language);
|
|
477
477
|
_state.label = 1;
|
|
478
478
|
case 1:
|