akeyless-client-commons 1.1.3 → 1.1.4
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.d.mts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +6 -0
- package/dist/components/index.mjs +6 -0
- package/dist/helpers/index.d.mts +10 -1
- package/dist/helpers/index.d.ts +10 -1
- package/dist/helpers/index.js +36 -0
- package/dist/helpers/index.mjs +29 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -319,12 +319,13 @@ interface DurationValues {
|
|
|
319
319
|
}
|
|
320
320
|
type DurationInputOption = keyof DurationValues;
|
|
321
321
|
interface DurationInputProps extends BaseElementProps {
|
|
322
|
+
type?: "duration";
|
|
322
323
|
value?: DurationValues;
|
|
323
324
|
onChange?: (v: DurationValues) => void;
|
|
324
325
|
hideLabels?: boolean;
|
|
325
326
|
options?: DurationInputOption[];
|
|
326
327
|
}
|
|
327
|
-
type FormElement = InputElement | SelectElement | MultiSelectProps | InternationalInputProps | CustomElementProps | TextAreaElement | SelectWithSearchProps | FormSeparatorProps | CheckboxContainerProps;
|
|
328
|
+
type FormElement = InputElement | SelectElement | MultiSelectProps | InternationalInputProps | CustomElementProps | TextAreaElement | SelectWithSearchProps | FormSeparatorProps | CheckboxContainerProps | DurationInputProps;
|
|
328
329
|
interface ModularFormProps {
|
|
329
330
|
submitFunction: (form: React.FormEvent<HTMLFormElement>, clickEvent?: MouseEvent) => Promise<void>;
|
|
330
331
|
elements: FormElement[];
|
|
@@ -319,12 +319,13 @@ interface DurationValues {
|
|
|
319
319
|
}
|
|
320
320
|
type DurationInputOption = keyof DurationValues;
|
|
321
321
|
interface DurationInputProps extends BaseElementProps {
|
|
322
|
+
type?: "duration";
|
|
322
323
|
value?: DurationValues;
|
|
323
324
|
onChange?: (v: DurationValues) => void;
|
|
324
325
|
hideLabels?: boolean;
|
|
325
326
|
options?: DurationInputOption[];
|
|
326
327
|
}
|
|
327
|
-
type FormElement = InputElement | SelectElement | MultiSelectProps | InternationalInputProps | CustomElementProps | TextAreaElement | SelectWithSearchProps | FormSeparatorProps | CheckboxContainerProps;
|
|
328
|
+
type FormElement = InputElement | SelectElement | MultiSelectProps | InternationalInputProps | CustomElementProps | TextAreaElement | SelectWithSearchProps | FormSeparatorProps | CheckboxContainerProps | DurationInputProps;
|
|
328
329
|
interface ModularFormProps {
|
|
329
330
|
submitFunction: (form: React.FormEvent<HTMLFormElement>, clickEvent?: MouseEvent) => Promise<void>;
|
|
330
331
|
elements: FormElement[];
|
package/dist/components/index.js
CHANGED
|
@@ -6459,6 +6459,12 @@ var ModularForm = function(param) {
|
|
|
6459
6459
|
}, element), {
|
|
6460
6460
|
labelsCommonClassName: labelsCommonClassName
|
|
6461
6461
|
}), index2);
|
|
6462
|
+
case "duration":
|
|
6463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DurationPicker, _object_spread_props(_object_spread({
|
|
6464
|
+
direction: direction
|
|
6465
|
+
}, element), {
|
|
6466
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6467
|
+
}), index2);
|
|
6462
6468
|
case "separator":
|
|
6463
6469
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FormSeparator, _object_spread_props(_object_spread({
|
|
6464
6470
|
direction: direction
|
|
@@ -6240,6 +6240,12 @@ var ModularForm = function(param) {
|
|
|
6240
6240
|
}, element), {
|
|
6241
6241
|
labelsCommonClassName: labelsCommonClassName
|
|
6242
6242
|
}), index2);
|
|
6243
|
+
case "duration":
|
|
6244
|
+
return /* @__PURE__ */ jsx20(DurationPicker, _object_spread_props(_object_spread({
|
|
6245
|
+
direction: direction
|
|
6246
|
+
}, element), {
|
|
6247
|
+
labelsCommonClassName: labelsCommonClassName
|
|
6248
|
+
}), index2);
|
|
6243
6249
|
case "separator":
|
|
6244
6250
|
return /* @__PURE__ */ jsx20(FormSeparator, _object_spread_props(_object_spread({
|
|
6245
6251
|
direction: direction
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -47,6 +47,13 @@ type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[], setting
|
|
|
47
47
|
}) => SnapshotResult;
|
|
48
48
|
type SnapshotDocument = (config: OnSnapshotConfigDocument, snapshotsFirstTime: string[]) => SnapshotResult;
|
|
49
49
|
|
|
50
|
+
interface DurationValues {
|
|
51
|
+
days: number;
|
|
52
|
+
hours: number;
|
|
53
|
+
minutes: number;
|
|
54
|
+
seconds: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
50
57
|
declare const db: Firestore;
|
|
51
58
|
declare const auth: Auth;
|
|
52
59
|
declare const storage: FirebaseStorage;
|
|
@@ -194,6 +201,8 @@ declare const getFormElementValue: (form: EventTarget & HTMLFormElement, name: s
|
|
|
194
201
|
declare const setFormElementValue: (form: EventTarget & HTMLFormElement, name: string, newValue?: string) => void;
|
|
195
202
|
declare const parseMultiSelectInput: (input: string) => any;
|
|
196
203
|
declare const getFormCheckboxValue: (form: EventTarget & HTMLFormElement, name: string) => boolean;
|
|
204
|
+
declare const durationToSeconds: (d: DurationValues) => number;
|
|
205
|
+
declare const secondsToDuration: (total: number) => DurationValues;
|
|
197
206
|
|
|
198
207
|
declare const setState: <T>(updater: T | ((state: T) => T), set: (fn: (state: any) => any) => void, stateName: string) => void;
|
|
199
208
|
declare const createSelectors: <T extends object>(store: any) => { [K in keyof T]: () => T[K]; };
|
|
@@ -249,4 +258,4 @@ declare const initializeUserPermissions: ({ phoneNumber, email, firstTimeArray,
|
|
|
249
258
|
permissions: TObject<TObject<boolean>>;
|
|
250
259
|
}>;
|
|
251
260
|
|
|
252
|
-
export { type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createSelectors, db, delete_document, devicesDomain, displayFormatPhoneNumber, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFixedNumber, getFormCheckboxValue, getFormElementValue, getLocationUrl, getUserByEmail, getUserByIdentifier, getUserByPhone, getUserCountryByIp, get_all_documents, get_document_by_id, get_international_phone_number, googleLoginProvider, handleChange, handleInvalid, handlePaste, initializeUserPermissions, international_israel_phone_format, isInternational, isInternationalIsraelPhone, isLocal, isNodeEnv, is_iccid, local_israel_phone_format, mode, multiStringFormat, notificationsDomain, numbersOnlyRegex, numbersRegex, nxApiCall, parseMultiSelectInput, parsePermissions, parseSnapshotAsArray, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
|
261
|
+
export { type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createSelectors, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFixedNumber, getFormCheckboxValue, getFormElementValue, getLocationUrl, getUserByEmail, getUserByIdentifier, getUserByPhone, getUserCountryByIp, get_all_documents, get_document_by_id, get_international_phone_number, googleLoginProvider, handleChange, handleInvalid, handlePaste, initializeUserPermissions, international_israel_phone_format, isInternational, isInternationalIsraelPhone, isLocal, isNodeEnv, is_iccid, local_israel_phone_format, mode, multiStringFormat, notificationsDomain, numbersOnlyRegex, numbersRegex, nxApiCall, parseMultiSelectInput, parsePermissions, parseSnapshotAsArray, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, secondsToDuration, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -47,6 +47,13 @@ type Snapshot = (config: OnSnapshotConfig, snapshotsFirstTime: string[], setting
|
|
|
47
47
|
}) => SnapshotResult;
|
|
48
48
|
type SnapshotDocument = (config: OnSnapshotConfigDocument, snapshotsFirstTime: string[]) => SnapshotResult;
|
|
49
49
|
|
|
50
|
+
interface DurationValues {
|
|
51
|
+
days: number;
|
|
52
|
+
hours: number;
|
|
53
|
+
minutes: number;
|
|
54
|
+
seconds: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
50
57
|
declare const db: Firestore;
|
|
51
58
|
declare const auth: Auth;
|
|
52
59
|
declare const storage: FirebaseStorage;
|
|
@@ -194,6 +201,8 @@ declare const getFormElementValue: (form: EventTarget & HTMLFormElement, name: s
|
|
|
194
201
|
declare const setFormElementValue: (form: EventTarget & HTMLFormElement, name: string, newValue?: string) => void;
|
|
195
202
|
declare const parseMultiSelectInput: (input: string) => any;
|
|
196
203
|
declare const getFormCheckboxValue: (form: EventTarget & HTMLFormElement, name: string) => boolean;
|
|
204
|
+
declare const durationToSeconds: (d: DurationValues) => number;
|
|
205
|
+
declare const secondsToDuration: (total: number) => DurationValues;
|
|
197
206
|
|
|
198
207
|
declare const setState: <T>(updater: T | ((state: T) => T), set: (fn: (state: any) => any) => void, stateName: string) => void;
|
|
199
208
|
declare const createSelectors: <T extends object>(store: any) => { [K in keyof T]: () => T[K]; };
|
|
@@ -249,4 +258,4 @@ declare const initializeUserPermissions: ({ phoneNumber, email, firstTimeArray,
|
|
|
249
258
|
permissions: TObject<TObject<boolean>>;
|
|
250
259
|
}>;
|
|
251
260
|
|
|
252
|
-
export { type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createSelectors, db, delete_document, devicesDomain, displayFormatPhoneNumber, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFixedNumber, getFormCheckboxValue, getFormElementValue, getLocationUrl, getUserByEmail, getUserByIdentifier, getUserByPhone, getUserCountryByIp, get_all_documents, get_document_by_id, get_international_phone_number, googleLoginProvider, handleChange, handleInvalid, handlePaste, initializeUserPermissions, international_israel_phone_format, isInternational, isInternationalIsraelPhone, isLocal, isNodeEnv, is_iccid, local_israel_phone_format, mode, multiStringFormat, notificationsDomain, numbersOnlyRegex, numbersRegex, nxApiCall, parseMultiSelectInput, parsePermissions, parseSnapshotAsArray, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
|
261
|
+
export { type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createSelectors, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFixedNumber, getFormCheckboxValue, getFormElementValue, getLocationUrl, getUserByEmail, getUserByIdentifier, getUserByPhone, getUserCountryByIp, get_all_documents, get_document_by_id, get_international_phone_number, googleLoginProvider, handleChange, handleInvalid, handlePaste, initializeUserPermissions, international_israel_phone_format, isInternational, isInternationalIsraelPhone, isLocal, isNodeEnv, is_iccid, local_israel_phone_format, mode, multiStringFormat, notificationsDomain, numbersOnlyRegex, numbersRegex, nxApiCall, parseMultiSelectInput, parsePermissions, parseSnapshotAsArray, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, secondsToDuration, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
package/dist/helpers/index.js
CHANGED
|
@@ -380,6 +380,9 @@ __export(index_exports, {
|
|
|
380
380
|
displayFormatPhoneNumber: function() {
|
|
381
381
|
return displayFormatPhoneNumber;
|
|
382
382
|
},
|
|
383
|
+
durationToSeconds: function() {
|
|
384
|
+
return durationToSeconds;
|
|
385
|
+
},
|
|
383
386
|
emailRegex: function() {
|
|
384
387
|
return emailRegex;
|
|
385
388
|
},
|
|
@@ -530,6 +533,9 @@ __export(index_exports, {
|
|
|
530
533
|
renderOnce: function() {
|
|
531
534
|
return renderOnce;
|
|
532
535
|
},
|
|
536
|
+
secondsToDuration: function() {
|
|
537
|
+
return secondsToDuration;
|
|
538
|
+
},
|
|
533
539
|
setFormElementValue: function() {
|
|
534
540
|
return setFormElementValue;
|
|
535
541
|
},
|
|
@@ -2049,6 +2055,34 @@ var getFormCheckboxValue = function(form, name) {
|
|
|
2049
2055
|
var _form_elements_namedItem;
|
|
2050
2056
|
return ((_form_elements_namedItem = form.elements.namedItem(name)) === null || _form_elements_namedItem === void 0 ? void 0 : _form_elements_namedItem.checked) || false;
|
|
2051
2057
|
};
|
|
2058
|
+
var durationToSeconds = function(d) {
|
|
2059
|
+
var safe = clampNegative(d);
|
|
2060
|
+
return ((safe.days * 24 + safe.hours) * 60 + safe.minutes) * 60 + safe.seconds;
|
|
2061
|
+
};
|
|
2062
|
+
var secondsToDuration = function(total) {
|
|
2063
|
+
var secs = Math.max(0, Math.floor(total));
|
|
2064
|
+
var days = Math.floor(secs / 86400);
|
|
2065
|
+
secs -= days * 86400;
|
|
2066
|
+
var hours = Math.floor(secs / 3600);
|
|
2067
|
+
secs -= hours * 3600;
|
|
2068
|
+
var minutes = Math.floor(secs / 60);
|
|
2069
|
+
secs -= minutes * 60;
|
|
2070
|
+
return {
|
|
2071
|
+
days: days,
|
|
2072
|
+
hours: hours,
|
|
2073
|
+
minutes: minutes,
|
|
2074
|
+
seconds: secs
|
|
2075
|
+
};
|
|
2076
|
+
};
|
|
2077
|
+
function clampNegative(param) {
|
|
2078
|
+
var days = param.days, hours = param.hours, minutes = param.minutes, seconds = param.seconds;
|
|
2079
|
+
return {
|
|
2080
|
+
days: Math.max(0, days),
|
|
2081
|
+
hours: Math.max(0, hours),
|
|
2082
|
+
minutes: Math.max(0, minutes),
|
|
2083
|
+
seconds: Math.max(0, seconds)
|
|
2084
|
+
};
|
|
2085
|
+
}
|
|
2052
2086
|
// src/helpers/store.ts
|
|
2053
2087
|
var setState = function(updater, set, stateName) {
|
|
2054
2088
|
return set(function(state) {
|
|
@@ -2254,6 +2288,7 @@ var nxApiCall = /*#__PURE__*/ function() {
|
|
|
2254
2288
|
delete_document: delete_document,
|
|
2255
2289
|
devicesDomain: devicesDomain,
|
|
2256
2290
|
displayFormatPhoneNumber: displayFormatPhoneNumber,
|
|
2291
|
+
durationToSeconds: durationToSeconds,
|
|
2257
2292
|
emailRegex: emailRegex,
|
|
2258
2293
|
extractAlertsData: extractAlertsData,
|
|
2259
2294
|
extractBoardsData: extractBoardsData,
|
|
@@ -2304,6 +2339,7 @@ var nxApiCall = /*#__PURE__*/ function() {
|
|
|
2304
2339
|
query_documents: query_documents,
|
|
2305
2340
|
query_documents_by_conditions: query_documents_by_conditions,
|
|
2306
2341
|
renderOnce: renderOnce,
|
|
2342
|
+
secondsToDuration: secondsToDuration,
|
|
2307
2343
|
setFormElementValue: setFormElementValue,
|
|
2308
2344
|
setState: setState,
|
|
2309
2345
|
set_document: set_document,
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1700,6 +1700,34 @@ var getFormCheckboxValue = function(form, name) {
|
|
|
1700
1700
|
var _form_elements_namedItem;
|
|
1701
1701
|
return ((_form_elements_namedItem = form.elements.namedItem(name)) === null || _form_elements_namedItem === void 0 ? void 0 : _form_elements_namedItem.checked) || false;
|
|
1702
1702
|
};
|
|
1703
|
+
var durationToSeconds = function(d) {
|
|
1704
|
+
var safe = clampNegative(d);
|
|
1705
|
+
return ((safe.days * 24 + safe.hours) * 60 + safe.minutes) * 60 + safe.seconds;
|
|
1706
|
+
};
|
|
1707
|
+
var secondsToDuration = function(total) {
|
|
1708
|
+
var secs = Math.max(0, Math.floor(total));
|
|
1709
|
+
var days = Math.floor(secs / 86400);
|
|
1710
|
+
secs -= days * 86400;
|
|
1711
|
+
var hours = Math.floor(secs / 3600);
|
|
1712
|
+
secs -= hours * 3600;
|
|
1713
|
+
var minutes = Math.floor(secs / 60);
|
|
1714
|
+
secs -= minutes * 60;
|
|
1715
|
+
return {
|
|
1716
|
+
days: days,
|
|
1717
|
+
hours: hours,
|
|
1718
|
+
minutes: minutes,
|
|
1719
|
+
seconds: secs
|
|
1720
|
+
};
|
|
1721
|
+
};
|
|
1722
|
+
function clampNegative(param) {
|
|
1723
|
+
var days = param.days, hours = param.hours, minutes = param.minutes, seconds = param.seconds;
|
|
1724
|
+
return {
|
|
1725
|
+
days: Math.max(0, days),
|
|
1726
|
+
hours: Math.max(0, hours),
|
|
1727
|
+
minutes: Math.max(0, minutes),
|
|
1728
|
+
seconds: Math.max(0, seconds)
|
|
1729
|
+
};
|
|
1730
|
+
}
|
|
1703
1731
|
// src/helpers/store.ts
|
|
1704
1732
|
var setState = function(updater, set, stateName) {
|
|
1705
1733
|
return set(function(state) {
|
|
@@ -1878,5 +1906,5 @@ var nxApiCall = /*#__PURE__*/ function() {
|
|
|
1878
1906
|
return _ref.apply(this, arguments);
|
|
1879
1907
|
};
|
|
1880
1908
|
}();
|
|
1881
|
-
export { addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createSelectors, db, delete_document, devicesDomain, displayFormatPhoneNumber, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFixedNumber, getFormCheckboxValue, getFormElementValue, getLocationUrl, getUserByEmail, getUserByIdentifier, getUserByPhone, getUserCountryByIp, get_all_documents, get_document_by_id, get_international_phone_number, googleLoginProvider, handleChange, handleInvalid, handlePaste, initializeUserPermissions, international_israel_phone_format, isInternational, isInternationalIsraelPhone, isLocal, isNodeEnv, is_iccid, local_israel_phone_format, mode, multiStringFormat, notificationsDomain, numbersOnlyRegex, numbersRegex, nxApiCall, parseMultiSelectInput, parsePermissions, parseSnapshotAsArray, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
|
1909
|
+
export { addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createSelectors, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFixedNumber, getFormCheckboxValue, getFormElementValue, getLocationUrl, getUserByEmail, getUserByIdentifier, getUserByPhone, getUserCountryByIp, get_all_documents, get_document_by_id, get_international_phone_number, googleLoginProvider, handleChange, handleInvalid, handlePaste, initializeUserPermissions, international_israel_phone_format, isInternational, isInternationalIsraelPhone, isLocal, isNodeEnv, is_iccid, local_israel_phone_format, mode, multiStringFormat, notificationsDomain, numbersOnlyRegex, numbersRegex, nxApiCall, parseMultiSelectInput, parsePermissions, parseSnapshotAsArray, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, secondsToDuration, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
|
1882
1910
|
//# sourceMappingURL=index.mjs.map
|
package/dist/types/index.d.mts
CHANGED
|
@@ -286,12 +286,13 @@ interface DurationValues {
|
|
|
286
286
|
}
|
|
287
287
|
type DurationInputOption = keyof DurationValues;
|
|
288
288
|
interface DurationInputProps extends BaseElementProps {
|
|
289
|
+
type?: "duration";
|
|
289
290
|
value?: DurationValues;
|
|
290
291
|
onChange?: (v: DurationValues) => void;
|
|
291
292
|
hideLabels?: boolean;
|
|
292
293
|
options?: DurationInputOption[];
|
|
293
294
|
}
|
|
294
|
-
type FormElement = InputElement | SelectElement | MultiSelectProps | InternationalInputProps | CustomElementProps | TextAreaElement | SelectWithSearchProps | FormSeparatorProps | CheckboxContainerProps;
|
|
295
|
+
type FormElement = InputElement | SelectElement | MultiSelectProps | InternationalInputProps | CustomElementProps | TextAreaElement | SelectWithSearchProps | FormSeparatorProps | CheckboxContainerProps | DurationInputProps;
|
|
295
296
|
interface ModularFormProps {
|
|
296
297
|
submitFunction: (form: React.FormEvent<HTMLFormElement>, clickEvent?: MouseEvent) => Promise<void>;
|
|
297
298
|
elements: FormElement[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -286,12 +286,13 @@ interface DurationValues {
|
|
|
286
286
|
}
|
|
287
287
|
type DurationInputOption = keyof DurationValues;
|
|
288
288
|
interface DurationInputProps extends BaseElementProps {
|
|
289
|
+
type?: "duration";
|
|
289
290
|
value?: DurationValues;
|
|
290
291
|
onChange?: (v: DurationValues) => void;
|
|
291
292
|
hideLabels?: boolean;
|
|
292
293
|
options?: DurationInputOption[];
|
|
293
294
|
}
|
|
294
|
-
type FormElement = InputElement | SelectElement | MultiSelectProps | InternationalInputProps | CustomElementProps | TextAreaElement | SelectWithSearchProps | FormSeparatorProps | CheckboxContainerProps;
|
|
295
|
+
type FormElement = InputElement | SelectElement | MultiSelectProps | InternationalInputProps | CustomElementProps | TextAreaElement | SelectWithSearchProps | FormSeparatorProps | CheckboxContainerProps | DurationInputProps;
|
|
295
296
|
interface ModularFormProps {
|
|
296
297
|
submitFunction: (form: React.FormEvent<HTMLFormElement>, clickEvent?: MouseEvent) => Promise<void>;
|
|
297
298
|
elements: FormElement[];
|