akeyless-client-commons 1.1.27 → 1.1.29
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.mjs.map +1 -1
- package/dist/helpers/index.d.mts +4 -5
- package/dist/helpers/index.d.ts +4 -5
- package/dist/helpers/index.js +24 -65
- package/dist/helpers/index.mjs +21 -58
- package/package.json +1 -1
package/dist/helpers/index.d.mts
CHANGED
|
@@ -4,7 +4,7 @@ import { Auth, GoogleAuthProvider, User } from 'firebase/auth';
|
|
|
4
4
|
import { AppCheck } from 'firebase/app-check';
|
|
5
5
|
import { WhereFilterOp, Unsubscribe, Firestore, CollectionReference, DocumentData, Timestamp, DocumentSnapshot } from 'firebase/firestore';
|
|
6
6
|
import { TObject, NxUser, CountryOptions, LanguageOptions, firebase_timestamp, UserPermissionsObject, userPermissionsObjectValue, Client, RedisUpdateType, RedisUpdatePayload, SocketCallbackResponse } from 'akeyless-types-commons';
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
9
|
|
|
10
10
|
type SetState<T> = (updater: ((prev: T) => T) | T) => void;
|
|
@@ -142,7 +142,6 @@ declare const query_documents_by_conditions: (collection_path: string, where_con
|
|
|
142
142
|
declare const query_document_by_conditions: (collection_path: string, where_conditions: WhereCondition[]) => Promise<TObject<any>>;
|
|
143
143
|
declare const snapshot: Snapshot;
|
|
144
144
|
declare const snapshotDocument: SnapshotDocument;
|
|
145
|
-
declare const parseSnapshotAsArray: (setState: SetState<any[]> | Dispatch<SetStateAction<any[]>>) => OnSnapshotParsers;
|
|
146
145
|
declare const cleanNxSites: () => Promise<void>;
|
|
147
146
|
declare const getUserByPhone: (phone: string) => Promise<TObject<any>>;
|
|
148
147
|
declare const getUserByEmail: (email: string) => Promise<TObject<any>>;
|
|
@@ -163,8 +162,8 @@ declare const addAuditRecord: (action: string, entity: string, details: TObject<
|
|
|
163
162
|
declare const validateUserStatusAndPermissions: (user: NxUser, app: AppName) => TObject<TObject<boolean>>;
|
|
164
163
|
declare const getFileUrlFromStorage: (filePath: string) => Promise<string>;
|
|
165
164
|
declare const uploadFileToStorage: (file: File, filePath: string) => Promise<string>;
|
|
166
|
-
declare const
|
|
167
|
-
declare const
|
|
165
|
+
declare const parseSnapshotAsObject: (setState: SetState<any>, filterCondition?: (v: any) => boolean) => OnSnapshotParsers;
|
|
166
|
+
declare const parseSnapshotAsArray: (setState: SetState<any>, filterCondition?: (v: any) => boolean) => OnSnapshotParsers;
|
|
168
167
|
|
|
169
168
|
declare const calculateBearing: (startLat: any, startLng: any, endLat: any, endLng: any) => number;
|
|
170
169
|
declare const renderOnce: () => boolean;
|
|
@@ -311,4 +310,4 @@ declare class SocketService {
|
|
|
311
310
|
}
|
|
312
311
|
declare const socketServiceInstance: SocketService;
|
|
313
312
|
|
|
314
|
-
export { type EmailAttachment, type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createAttachmentFromBlob, createAttachmentFromUrl, createSelectors, dataSocketDomain, dataSyncDomain, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFileUrlFromStorage, 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,
|
|
313
|
+
export { type EmailAttachment, type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createAttachmentFromBlob, createAttachmentFromUrl, createSelectors, dataSocketDomain, dataSyncDomain, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFileUrlFromStorage, 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, parseSnapshotAsObject, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, secondsToDuration, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, socketServiceInstance, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, uploadFileToStorage, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Auth, GoogleAuthProvider, User } from 'firebase/auth';
|
|
|
4
4
|
import { AppCheck } from 'firebase/app-check';
|
|
5
5
|
import { WhereFilterOp, Unsubscribe, Firestore, CollectionReference, DocumentData, Timestamp, DocumentSnapshot } from 'firebase/firestore';
|
|
6
6
|
import { TObject, NxUser, CountryOptions, LanguageOptions, firebase_timestamp, UserPermissionsObject, userPermissionsObjectValue, Client, RedisUpdateType, RedisUpdatePayload, SocketCallbackResponse } from 'akeyless-types-commons';
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
9
|
|
|
10
10
|
type SetState<T> = (updater: ((prev: T) => T) | T) => void;
|
|
@@ -142,7 +142,6 @@ declare const query_documents_by_conditions: (collection_path: string, where_con
|
|
|
142
142
|
declare const query_document_by_conditions: (collection_path: string, where_conditions: WhereCondition[]) => Promise<TObject<any>>;
|
|
143
143
|
declare const snapshot: Snapshot;
|
|
144
144
|
declare const snapshotDocument: SnapshotDocument;
|
|
145
|
-
declare const parseSnapshotAsArray: (setState: SetState<any[]> | Dispatch<SetStateAction<any[]>>) => OnSnapshotParsers;
|
|
146
145
|
declare const cleanNxSites: () => Promise<void>;
|
|
147
146
|
declare const getUserByPhone: (phone: string) => Promise<TObject<any>>;
|
|
148
147
|
declare const getUserByEmail: (email: string) => Promise<TObject<any>>;
|
|
@@ -163,8 +162,8 @@ declare const addAuditRecord: (action: string, entity: string, details: TObject<
|
|
|
163
162
|
declare const validateUserStatusAndPermissions: (user: NxUser, app: AppName) => TObject<TObject<boolean>>;
|
|
164
163
|
declare const getFileUrlFromStorage: (filePath: string) => Promise<string>;
|
|
165
164
|
declare const uploadFileToStorage: (file: File, filePath: string) => Promise<string>;
|
|
166
|
-
declare const
|
|
167
|
-
declare const
|
|
165
|
+
declare const parseSnapshotAsObject: (setState: SetState<any>, filterCondition?: (v: any) => boolean) => OnSnapshotParsers;
|
|
166
|
+
declare const parseSnapshotAsArray: (setState: SetState<any>, filterCondition?: (v: any) => boolean) => OnSnapshotParsers;
|
|
168
167
|
|
|
169
168
|
declare const calculateBearing: (startLat: any, startLng: any, endLat: any, endLng: any) => number;
|
|
170
169
|
declare const renderOnce: () => boolean;
|
|
@@ -311,4 +310,4 @@ declare class SocketService {
|
|
|
311
310
|
}
|
|
312
311
|
declare const socketServiceInstance: SocketService;
|
|
313
312
|
|
|
314
|
-
export { type EmailAttachment, type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createAttachmentFromBlob, createAttachmentFromUrl, createSelectors, dataSocketDomain, dataSyncDomain, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFileUrlFromStorage, 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,
|
|
313
|
+
export { type EmailAttachment, type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createAttachmentFromBlob, createAttachmentFromUrl, createSelectors, dataSocketDomain, dataSyncDomain, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFileUrlFromStorage, 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, parseSnapshotAsObject, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, secondsToDuration, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, socketServiceInstance, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, uploadFileToStorage, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
package/dist/helpers/index.js
CHANGED
|
@@ -537,12 +537,6 @@ __export(index_exports, {
|
|
|
537
537
|
nxApiCall: function() {
|
|
538
538
|
return nxApiCall;
|
|
539
539
|
},
|
|
540
|
-
parsSnapshotAsArray: function() {
|
|
541
|
-
return parsSnapshotAsArray;
|
|
542
|
-
},
|
|
543
|
-
parsSnapshotAsObject: function() {
|
|
544
|
-
return parsSnapshotAsObject;
|
|
545
|
-
},
|
|
546
540
|
parseMultiSelectInput: function() {
|
|
547
541
|
return parseMultiSelectInput;
|
|
548
542
|
},
|
|
@@ -552,6 +546,9 @@ __export(index_exports, {
|
|
|
552
546
|
parseSnapshotAsArray: function() {
|
|
553
547
|
return parseSnapshotAsArray;
|
|
554
548
|
},
|
|
549
|
+
parseSnapshotAsObject: function() {
|
|
550
|
+
return parseSnapshotAsObject;
|
|
551
|
+
},
|
|
555
552
|
priceRegex: function() {
|
|
556
553
|
return priceRegex;
|
|
557
554
|
},
|
|
@@ -1563,40 +1560,6 @@ var snapshotDocument = function(config, snapshotsFirstTime) {
|
|
|
1563
1560
|
unsubscribe: unsubscribe
|
|
1564
1561
|
};
|
|
1565
1562
|
};
|
|
1566
|
-
var parseSnapshotAsArray = function(setState2) {
|
|
1567
|
-
return {
|
|
1568
|
-
onAdd: function(data) {
|
|
1569
|
-
setState2(function(prev) {
|
|
1570
|
-
return _to_consumable_array(prev).concat(_to_consumable_array(data));
|
|
1571
|
-
});
|
|
1572
|
-
},
|
|
1573
|
-
onFirstTime: function(data) {
|
|
1574
|
-
setState2(function(prev) {
|
|
1575
|
-
return _to_consumable_array(prev).concat(_to_consumable_array(data));
|
|
1576
|
-
});
|
|
1577
|
-
},
|
|
1578
|
-
onModify: function(data) {
|
|
1579
|
-
setState2(function(prev) {
|
|
1580
|
-
var update = prev.map(function(item) {
|
|
1581
|
-
var updatedItem = data.find(function(v) {
|
|
1582
|
-
return v.id === item.id;
|
|
1583
|
-
});
|
|
1584
|
-
return updatedItem ? updatedItem : item;
|
|
1585
|
-
});
|
|
1586
|
-
return update;
|
|
1587
|
-
});
|
|
1588
|
-
},
|
|
1589
|
-
onRemove: function(data) {
|
|
1590
|
-
setState2(function(prev) {
|
|
1591
|
-
return prev.filter(function(item) {
|
|
1592
|
-
return !data.some(function(v) {
|
|
1593
|
-
return v.id === item.id;
|
|
1594
|
-
});
|
|
1595
|
-
});
|
|
1596
|
-
});
|
|
1597
|
-
}
|
|
1598
|
-
};
|
|
1599
|
-
};
|
|
1600
1563
|
var checkConditions = function(document2, conditions) {
|
|
1601
1564
|
if (!conditions || conditions.length === 0) return true;
|
|
1602
1565
|
return conditions.every(function(condition) {
|
|
@@ -1946,57 +1909,54 @@ var uploadFileToStorage = /*#__PURE__*/ function() {
|
|
|
1946
1909
|
return _ref.apply(this, arguments);
|
|
1947
1910
|
};
|
|
1948
1911
|
}();
|
|
1949
|
-
var
|
|
1912
|
+
var parseSnapshotAsObject = function(setState2, filterCondition) {
|
|
1950
1913
|
return {
|
|
1951
1914
|
onFirstTime: function(docs) {
|
|
1952
1915
|
if (filterCondition) {
|
|
1953
1916
|
docs = docs.filter(filterCondition);
|
|
1954
1917
|
}
|
|
1955
|
-
var object =
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
}
|
|
1918
|
+
var object = {};
|
|
1919
|
+
docs.forEach(function(v) {
|
|
1920
|
+
object[v.id] = v;
|
|
1921
|
+
});
|
|
1959
1922
|
setState2(object);
|
|
1960
1923
|
},
|
|
1961
1924
|
onAdd: function(docs) {
|
|
1962
1925
|
if (filterCondition) {
|
|
1963
1926
|
docs = docs.filter(filterCondition);
|
|
1964
1927
|
}
|
|
1965
|
-
var object = docs.reduce(function(acc, doc2) {
|
|
1966
|
-
acc[doc2.id] = doc2.data;
|
|
1967
|
-
return acc;
|
|
1968
|
-
}, {});
|
|
1969
1928
|
setState2(function(prev) {
|
|
1970
|
-
|
|
1929
|
+
var update = _object_spread({}, prev);
|
|
1930
|
+
docs.forEach(function(v) {
|
|
1931
|
+
update[v.id] = v;
|
|
1932
|
+
});
|
|
1933
|
+
return update;
|
|
1971
1934
|
});
|
|
1972
1935
|
},
|
|
1973
1936
|
onModify: function(docs) {
|
|
1974
1937
|
if (filterCondition) {
|
|
1975
1938
|
docs = docs.filter(filterCondition);
|
|
1976
1939
|
}
|
|
1977
|
-
var object = docs.reduce(function(acc, doc2) {
|
|
1978
|
-
acc[doc2.id] = doc2.data;
|
|
1979
|
-
return acc;
|
|
1980
|
-
}, {});
|
|
1981
1940
|
setState2(function(prev) {
|
|
1982
|
-
|
|
1941
|
+
var update = _object_spread({}, prev);
|
|
1942
|
+
docs.forEach(function(v) {
|
|
1943
|
+
update[v.id] = v;
|
|
1944
|
+
});
|
|
1945
|
+
return update;
|
|
1983
1946
|
});
|
|
1984
1947
|
},
|
|
1985
1948
|
onRemove: function(docs) {
|
|
1986
|
-
if (filterCondition) {
|
|
1987
|
-
docs = docs.filter(filterCondition);
|
|
1988
|
-
}
|
|
1989
1949
|
setState2(function(prev) {
|
|
1990
|
-
var
|
|
1991
|
-
docs.forEach(function(
|
|
1992
|
-
delete
|
|
1950
|
+
var update = _object_spread({}, prev);
|
|
1951
|
+
docs.forEach(function(v) {
|
|
1952
|
+
delete update[v.id];
|
|
1993
1953
|
});
|
|
1994
|
-
return
|
|
1954
|
+
return update;
|
|
1995
1955
|
});
|
|
1996
1956
|
}
|
|
1997
1957
|
};
|
|
1998
1958
|
};
|
|
1999
|
-
var
|
|
1959
|
+
var parseSnapshotAsArray = function(setState2, filterCondition) {
|
|
2000
1960
|
return {
|
|
2001
1961
|
onFirstTime: function(docs) {
|
|
2002
1962
|
if (filterCondition) {
|
|
@@ -2985,11 +2945,10 @@ var socketServiceInstance = SocketService.getInstance();
|
|
|
2985
2945
|
numbersOnlyRegex: numbersOnlyRegex,
|
|
2986
2946
|
numbersRegex: numbersRegex,
|
|
2987
2947
|
nxApiCall: nxApiCall,
|
|
2988
|
-
parsSnapshotAsArray: parsSnapshotAsArray,
|
|
2989
|
-
parsSnapshotAsObject: parsSnapshotAsObject,
|
|
2990
2948
|
parseMultiSelectInput: parseMultiSelectInput,
|
|
2991
2949
|
parsePermissions: parsePermissions,
|
|
2992
2950
|
parseSnapshotAsArray: parseSnapshotAsArray,
|
|
2951
|
+
parseSnapshotAsObject: parseSnapshotAsObject,
|
|
2993
2952
|
priceRegex: priceRegex,
|
|
2994
2953
|
propsAreEqual: propsAreEqual,
|
|
2995
2954
|
query_document: query_document,
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -1182,40 +1182,6 @@ var snapshotDocument = function(config, snapshotsFirstTime) {
|
|
|
1182
1182
|
unsubscribe: unsubscribe
|
|
1183
1183
|
};
|
|
1184
1184
|
};
|
|
1185
|
-
var parseSnapshotAsArray = function(setState2) {
|
|
1186
|
-
return {
|
|
1187
|
-
onAdd: function(data) {
|
|
1188
|
-
setState2(function(prev) {
|
|
1189
|
-
return _to_consumable_array(prev).concat(_to_consumable_array(data));
|
|
1190
|
-
});
|
|
1191
|
-
},
|
|
1192
|
-
onFirstTime: function(data) {
|
|
1193
|
-
setState2(function(prev) {
|
|
1194
|
-
return _to_consumable_array(prev).concat(_to_consumable_array(data));
|
|
1195
|
-
});
|
|
1196
|
-
},
|
|
1197
|
-
onModify: function(data) {
|
|
1198
|
-
setState2(function(prev) {
|
|
1199
|
-
var update = prev.map(function(item) {
|
|
1200
|
-
var updatedItem = data.find(function(v) {
|
|
1201
|
-
return v.id === item.id;
|
|
1202
|
-
});
|
|
1203
|
-
return updatedItem ? updatedItem : item;
|
|
1204
|
-
});
|
|
1205
|
-
return update;
|
|
1206
|
-
});
|
|
1207
|
-
},
|
|
1208
|
-
onRemove: function(data) {
|
|
1209
|
-
setState2(function(prev) {
|
|
1210
|
-
return prev.filter(function(item) {
|
|
1211
|
-
return !data.some(function(v) {
|
|
1212
|
-
return v.id === item.id;
|
|
1213
|
-
});
|
|
1214
|
-
});
|
|
1215
|
-
});
|
|
1216
|
-
}
|
|
1217
|
-
};
|
|
1218
|
-
};
|
|
1219
1185
|
var checkConditions = function(document2, conditions) {
|
|
1220
1186
|
if (!conditions || conditions.length === 0) return true;
|
|
1221
1187
|
return conditions.every(function(condition) {
|
|
@@ -1565,57 +1531,54 @@ var uploadFileToStorage = /*#__PURE__*/ function() {
|
|
|
1565
1531
|
return _ref.apply(this, arguments);
|
|
1566
1532
|
};
|
|
1567
1533
|
}();
|
|
1568
|
-
var
|
|
1534
|
+
var parseSnapshotAsObject = function(setState2, filterCondition) {
|
|
1569
1535
|
return {
|
|
1570
1536
|
onFirstTime: function(docs) {
|
|
1571
1537
|
if (filterCondition) {
|
|
1572
1538
|
docs = docs.filter(filterCondition);
|
|
1573
1539
|
}
|
|
1574
|
-
var object =
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
}
|
|
1540
|
+
var object = {};
|
|
1541
|
+
docs.forEach(function(v) {
|
|
1542
|
+
object[v.id] = v;
|
|
1543
|
+
});
|
|
1578
1544
|
setState2(object);
|
|
1579
1545
|
},
|
|
1580
1546
|
onAdd: function(docs) {
|
|
1581
1547
|
if (filterCondition) {
|
|
1582
1548
|
docs = docs.filter(filterCondition);
|
|
1583
1549
|
}
|
|
1584
|
-
var object = docs.reduce(function(acc, doc2) {
|
|
1585
|
-
acc[doc2.id] = doc2.data;
|
|
1586
|
-
return acc;
|
|
1587
|
-
}, {});
|
|
1588
1550
|
setState2(function(prev) {
|
|
1589
|
-
|
|
1551
|
+
var update = _object_spread({}, prev);
|
|
1552
|
+
docs.forEach(function(v) {
|
|
1553
|
+
update[v.id] = v;
|
|
1554
|
+
});
|
|
1555
|
+
return update;
|
|
1590
1556
|
});
|
|
1591
1557
|
},
|
|
1592
1558
|
onModify: function(docs) {
|
|
1593
1559
|
if (filterCondition) {
|
|
1594
1560
|
docs = docs.filter(filterCondition);
|
|
1595
1561
|
}
|
|
1596
|
-
var object = docs.reduce(function(acc, doc2) {
|
|
1597
|
-
acc[doc2.id] = doc2.data;
|
|
1598
|
-
return acc;
|
|
1599
|
-
}, {});
|
|
1600
1562
|
setState2(function(prev) {
|
|
1601
|
-
|
|
1563
|
+
var update = _object_spread({}, prev);
|
|
1564
|
+
docs.forEach(function(v) {
|
|
1565
|
+
update[v.id] = v;
|
|
1566
|
+
});
|
|
1567
|
+
return update;
|
|
1602
1568
|
});
|
|
1603
1569
|
},
|
|
1604
1570
|
onRemove: function(docs) {
|
|
1605
|
-
if (filterCondition) {
|
|
1606
|
-
docs = docs.filter(filterCondition);
|
|
1607
|
-
}
|
|
1608
1571
|
setState2(function(prev) {
|
|
1609
|
-
var
|
|
1610
|
-
docs.forEach(function(
|
|
1611
|
-
delete
|
|
1572
|
+
var update = _object_spread({}, prev);
|
|
1573
|
+
docs.forEach(function(v) {
|
|
1574
|
+
delete update[v.id];
|
|
1612
1575
|
});
|
|
1613
|
-
return
|
|
1576
|
+
return update;
|
|
1614
1577
|
});
|
|
1615
1578
|
}
|
|
1616
1579
|
};
|
|
1617
1580
|
};
|
|
1618
|
-
var
|
|
1581
|
+
var parseSnapshotAsArray = function(setState2, filterCondition) {
|
|
1619
1582
|
return {
|
|
1620
1583
|
onFirstTime: function(docs) {
|
|
1621
1584
|
if (filterCondition) {
|
|
@@ -2530,5 +2493,5 @@ var SocketService = /*#__PURE__*/ function() {
|
|
|
2530
2493
|
return _SocketService;
|
|
2531
2494
|
}();
|
|
2532
2495
|
var socketServiceInstance = SocketService.getInstance();
|
|
2533
|
-
export { addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createAttachmentFromBlob, createAttachmentFromUrl, createSelectors, dataSocketDomain, dataSyncDomain, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFileUrlFromStorage, 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,
|
|
2496
|
+
export { addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterEventsDomain, callCenterGeoDomain, carsRegex, chartsRegex, checkUserPermissions, cleanNxSites, cn, collections, colorRegex, createAttachmentFromBlob, createAttachmentFromUrl, createSelectors, dataSocketDomain, dataSyncDomain, db, delete_document, devicesDomain, displayFormatPhoneNumber, durationToSeconds, emailRegex, extractAlertsData, extractBoardsData, extractCanbusData, extractCarsData, extractClientData, extractLocationData, extractSiteData, fire_base_TIME_TEMP, formatCarNumber, getAddressByGeo, getFileUrlFromStorage, 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, parseSnapshotAsObject, priceRegex, propsAreEqual, query_document, query_document_by_conditions, query_documents, query_documents_by_conditions, renderOnce, secondsToDuration, setFormElementValue, setState, set_document, simpleExtractData, snapshot, snapshotDocument, socketServiceInstance, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, uploadFileToStorage, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
|
2534
2497
|
//# sourceMappingURL=index.mjs.map
|