akeyless-client-commons 1.0.192 → 1.0.193

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.
@@ -7,6 +7,7 @@ import { TObject, NxUser, CountryOptions, LanguageOptions, UserPermissionsObject
7
7
  import React from 'react';
8
8
  import { ClassValue } from 'clsx';
9
9
 
10
+ type SetState<T> = (updater: ((prev: T) => T) | T) => void;
10
11
  type AppName = "installer" | "toolbox" | "dashboard";
11
12
  type LoginOption = "google" | "phone";
12
13
 
@@ -130,6 +131,7 @@ declare const query_documents_by_conditions: (collection_path: string, where_con
130
131
  declare const query_document_by_conditions: (collection_path: string, where_conditions: WhereCondition[]) => Promise<TObject<any>>;
131
132
  declare const snapshot: Snapshot;
132
133
  declare const snapshotDocument: SnapshotDocument;
134
+ declare const parseAddSnapshotAsArray: (setState: SetState<any[]>) => OnSnapshotParsers;
133
135
  declare const cleanNxSites: () => Promise<void>;
134
136
  declare const getUserByPhone: (phone: string) => Promise<TObject<any>>;
135
137
  declare const getUserByEmail: (email: string) => Promise<TObject<any>>;
@@ -242,4 +244,4 @@ declare const initializeUserPermissions: ({ phoneNumber, email, firstTimeArray,
242
244
  permissions: TObject<TObject<boolean>>;
243
245
  }>;
244
246
 
245
- export { type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterDomain, 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, numbersOnlyRegex, numbersRegex, nx_api_call, parseMultiSelectInput, parsePermissions, 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, validateUserStatusAndPermissions };
247
+ export { type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterDomain, 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, numbersOnlyRegex, numbersRegex, nx_api_call, parseAddSnapshotAsArray, parseMultiSelectInput, parsePermissions, 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, validateUserStatusAndPermissions };
@@ -7,6 +7,7 @@ import { TObject, NxUser, CountryOptions, LanguageOptions, UserPermissionsObject
7
7
  import React from 'react';
8
8
  import { ClassValue } from 'clsx';
9
9
 
10
+ type SetState<T> = (updater: ((prev: T) => T) | T) => void;
10
11
  type AppName = "installer" | "toolbox" | "dashboard";
11
12
  type LoginOption = "google" | "phone";
12
13
 
@@ -130,6 +131,7 @@ declare const query_documents_by_conditions: (collection_path: string, where_con
130
131
  declare const query_document_by_conditions: (collection_path: string, where_conditions: WhereCondition[]) => Promise<TObject<any>>;
131
132
  declare const snapshot: Snapshot;
132
133
  declare const snapshotDocument: SnapshotDocument;
134
+ declare const parseAddSnapshotAsArray: (setState: SetState<any[]>) => OnSnapshotParsers;
133
135
  declare const cleanNxSites: () => Promise<void>;
134
136
  declare const getUserByPhone: (phone: string) => Promise<TObject<any>>;
135
137
  declare const getUserByEmail: (email: string) => Promise<TObject<any>>;
@@ -242,4 +244,4 @@ declare const initializeUserPermissions: ({ phoneNumber, email, firstTimeArray,
242
244
  permissions: TObject<TObject<boolean>>;
243
245
  }>;
244
246
 
245
- export { type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterDomain, 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, numbersOnlyRegex, numbersRegex, nx_api_call, parseMultiSelectInput, parsePermissions, 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, validateUserStatusAndPermissions };
247
+ export { type ValidationType, addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterDomain, 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, numbersOnlyRegex, numbersRegex, nx_api_call, parseAddSnapshotAsArray, parseMultiSelectInput, parsePermissions, 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, validateUserStatusAndPermissions };
@@ -7,6 +7,9 @@ function _array_like_to_array(arr, len) {
7
7
  function _array_with_holes(arr) {
8
8
  if (Array.isArray(arr)) return arr;
9
9
  }
10
+ function _array_without_holes(arr) {
11
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
12
+ }
10
13
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
11
14
  try {
12
15
  var info = gen[key](arg);
@@ -56,6 +59,9 @@ function _instanceof(left, right) {
56
59
  return left instanceof right;
57
60
  }
58
61
  }
62
+ function _iterable_to_array(iter) {
63
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
64
+ }
59
65
  function _iterable_to_array_limit(arr, i) {
60
66
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
61
67
  if (_i == null) return;
@@ -83,6 +89,9 @@ function _iterable_to_array_limit(arr, i) {
83
89
  function _non_iterable_rest() {
84
90
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
85
91
  }
92
+ function _non_iterable_spread() {
93
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
94
+ }
86
95
  function _object_spread(target) {
87
96
  for(var i = 1; i < arguments.length; i++){
88
97
  var source = arguments[i] != null ? arguments[i] : {};
@@ -125,6 +134,9 @@ function _object_spread_props(target, source) {
125
134
  function _sliced_to_array(arr, i) {
126
135
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
127
136
  }
137
+ function _to_consumable_array(arr) {
138
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
139
+ }
128
140
  function _type_of(obj) {
129
141
  "@swc/helpers - typeof";
130
142
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
@@ -482,6 +494,9 @@ __export(index_exports, {
482
494
  nx_api_call: function() {
483
495
  return nx_api_call;
484
496
  },
497
+ parseAddSnapshotAsArray: function() {
498
+ return parseAddSnapshotAsArray;
499
+ },
485
500
  parseMultiSelectInput: function() {
486
501
  return parseMultiSelectInput;
487
502
  },
@@ -1484,6 +1499,40 @@ var snapshotDocument = function(config, snapshotsFirstTime) {
1484
1499
  unsubscribe: unsubscribe
1485
1500
  };
1486
1501
  };
1502
+ var parseAddSnapshotAsArray = function(setState2) {
1503
+ return {
1504
+ onAdd: function(data) {
1505
+ setState2(function(prev) {
1506
+ return _to_consumable_array(prev).concat(_to_consumable_array(data));
1507
+ });
1508
+ },
1509
+ onFirstTime: function(data) {
1510
+ setState2(function(prev) {
1511
+ return _to_consumable_array(prev).concat(_to_consumable_array(data));
1512
+ });
1513
+ },
1514
+ onModify: function(data) {
1515
+ setState2(function(prev) {
1516
+ var update = prev.map(function(item) {
1517
+ var updatedItem = data.find(function(v) {
1518
+ return v.id === item.id;
1519
+ });
1520
+ return updatedItem ? updatedItem : item;
1521
+ });
1522
+ return update;
1523
+ });
1524
+ },
1525
+ onRemove: function(data) {
1526
+ setState2(function(prev) {
1527
+ return prev.filter(function(item) {
1528
+ return !data.some(function(v) {
1529
+ return v.id === item.id;
1530
+ });
1531
+ });
1532
+ });
1533
+ }
1534
+ };
1535
+ };
1487
1536
  var checkConditions = function(document2, conditions) {
1488
1537
  if (!conditions || conditions.length === 0) return true;
1489
1538
  return conditions.every(function(condition) {
@@ -2221,6 +2270,7 @@ var nx_api_call = /*#__PURE__*/ function() {
2221
2270
  numbersOnlyRegex: numbersOnlyRegex,
2222
2271
  numbersRegex: numbersRegex,
2223
2272
  nx_api_call: nx_api_call,
2273
+ parseAddSnapshotAsArray: parseAddSnapshotAsArray,
2224
2274
  parseMultiSelectInput: parseMultiSelectInput,
2225
2275
  parsePermissions: parsePermissions,
2226
2276
  priceRegex: priceRegex,
@@ -7,6 +7,9 @@ function _array_like_to_array(arr, len) {
7
7
  function _array_with_holes(arr) {
8
8
  if (Array.isArray(arr)) return arr;
9
9
  }
10
+ function _array_without_holes(arr) {
11
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
12
+ }
10
13
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
11
14
  try {
12
15
  var info = gen[key](arg);
@@ -56,6 +59,9 @@ function _instanceof(left, right) {
56
59
  return left instanceof right;
57
60
  }
58
61
  }
62
+ function _iterable_to_array(iter) {
63
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
64
+ }
59
65
  function _iterable_to_array_limit(arr, i) {
60
66
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
61
67
  if (_i == null) return;
@@ -83,6 +89,9 @@ function _iterable_to_array_limit(arr, i) {
83
89
  function _non_iterable_rest() {
84
90
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
85
91
  }
92
+ function _non_iterable_spread() {
93
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
94
+ }
86
95
  function _object_spread(target) {
87
96
  for(var i = 1; i < arguments.length; i++){
88
97
  var source = arguments[i] != null ? arguments[i] : {};
@@ -125,6 +134,9 @@ function _object_spread_props(target, source) {
125
134
  function _sliced_to_array(arr, i) {
126
135
  return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
127
136
  }
137
+ function _to_consumable_array(arr) {
138
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
139
+ }
128
140
  function _unsupported_iterable_to_array(o, minLen) {
129
141
  if (!o) return;
130
142
  if (typeof o === "string") return _array_like_to_array(o, minLen);
@@ -1148,6 +1160,40 @@ var snapshotDocument = function(config, snapshotsFirstTime) {
1148
1160
  unsubscribe: unsubscribe
1149
1161
  };
1150
1162
  };
1163
+ var parseAddSnapshotAsArray = function(setState2) {
1164
+ return {
1165
+ onAdd: function(data) {
1166
+ setState2(function(prev) {
1167
+ return _to_consumable_array(prev).concat(_to_consumable_array(data));
1168
+ });
1169
+ },
1170
+ onFirstTime: function(data) {
1171
+ setState2(function(prev) {
1172
+ return _to_consumable_array(prev).concat(_to_consumable_array(data));
1173
+ });
1174
+ },
1175
+ onModify: function(data) {
1176
+ setState2(function(prev) {
1177
+ var update = prev.map(function(item) {
1178
+ var updatedItem = data.find(function(v) {
1179
+ return v.id === item.id;
1180
+ });
1181
+ return updatedItem ? updatedItem : item;
1182
+ });
1183
+ return update;
1184
+ });
1185
+ },
1186
+ onRemove: function(data) {
1187
+ setState2(function(prev) {
1188
+ return prev.filter(function(item) {
1189
+ return !data.some(function(v) {
1190
+ return v.id === item.id;
1191
+ });
1192
+ });
1193
+ });
1194
+ }
1195
+ };
1196
+ };
1151
1197
  var checkConditions = function(document2, conditions) {
1152
1198
  if (!conditions || conditions.length === 0) return true;
1153
1199
  return conditions.every(function(condition) {
@@ -1819,5 +1865,5 @@ var nx_api_call = /*#__PURE__*/ function() {
1819
1865
  return _ref.apply(this, arguments);
1820
1866
  };
1821
1867
  }();
1822
- export { addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterDomain, 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, numbersOnlyRegex, numbersRegex, nx_api_call, parseMultiSelectInput, parsePermissions, 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, validateUserStatusAndPermissions };
1868
+ export { addAuditRecord, addLoginAudit, add_document, addressRegex, akeylessOnlineDomain, app, appCheck, auth, baseDomain, biDomain, calculateBearing, callCenterDomain, 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, numbersOnlyRegex, numbersRegex, nx_api_call, parseAddSnapshotAsArray, parseMultiSelectInput, parsePermissions, 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, validateUserStatusAndPermissions };
1823
1869
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akeyless-client-commons",
3
- "version": "1.0.192",
3
+ "version": "1.0.193",
4
4
  "scripts": {
5
5
  "build": "tsup",
6
6
  "deploy": "npm run build && npm version patch --no-git-tag-version && npm publish",