akeyless-client-commons 1.1.1 → 1.1.3
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.css +22 -0
- package/dist/components/index.css.map +1 -1
- package/dist/components/index.d.mts +15 -1
- package/dist/components/index.d.ts +15 -1
- package/dist/components/index.js +94 -278
- package/dist/components/index.mjs +91 -279
- package/dist/helpers/index.d.mts +2 -34
- package/dist/helpers/index.d.ts +2 -34
- package/dist/helpers/index.js +0 -295
- package/dist/helpers/index.mjs +1 -292
- package/dist/hooks/index.d.mts +1 -5
- package/dist/hooks/index.d.ts +1 -5
- package/dist/hooks/index.js +1 -374
- package/dist/hooks/index.mjs +1 -370
- package/dist/types/index.d.mts +14 -1
- package/dist/types/index.d.ts +14 -1
- package/package.json +2 -4
|
@@ -939,278 +939,6 @@ var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
|
|
|
939
939
|
var notificationsDomain = isLocal ? "http://localhost:9006/api/notifications" : baseDomain + "/notifications";
|
|
940
940
|
var callCenterGeoDomain = isLocal ? "http://localhost:9007/api/call-center/geo" : baseDomain + "/call-center/geo";
|
|
941
941
|
var callCenterEventsDomain = isLocal ? "http://localhost:9008/api/call-center/events" : baseDomain + "/call-center/events";
|
|
942
|
-
// src/helpers/socket.ts
|
|
943
|
-
import { io } from "socket.io-client";
|
|
944
|
-
var SocketService = /*#__PURE__*/ function() {
|
|
945
|
-
"use strict";
|
|
946
|
-
function _SocketService() {
|
|
947
|
-
_class_call_check(this, _SocketService);
|
|
948
|
-
this.socket = null;
|
|
949
|
-
this.connectCallbacks = [];
|
|
950
|
-
this.disconnectCallbacks = [];
|
|
951
|
-
this.initSocket();
|
|
952
|
-
}
|
|
953
|
-
_create_class(_SocketService, [
|
|
954
|
-
{
|
|
955
|
-
/// Initialize the socket connection
|
|
956
|
-
key: "initSocket",
|
|
957
|
-
value: function initSocket() {
|
|
958
|
-
var _this = this;
|
|
959
|
-
if (!this.socket) {
|
|
960
|
-
var SOCKET_SERVER_URL = "http://localhost:9009";
|
|
961
|
-
var SOCKET_PATH = "/api/data-socket/connect";
|
|
962
|
-
this.socket = io(SOCKET_SERVER_URL, {
|
|
963
|
-
path: SOCKET_PATH,
|
|
964
|
-
transports: [
|
|
965
|
-
"websocket"
|
|
966
|
-
]
|
|
967
|
-
});
|
|
968
|
-
this.socket.on("connect", function() {
|
|
969
|
-
var _this_socket;
|
|
970
|
-
console.log("Socket connected:", (_this_socket = _this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.id);
|
|
971
|
-
_this.connectCallbacks.forEach(function(cb) {
|
|
972
|
-
return cb();
|
|
973
|
-
});
|
|
974
|
-
});
|
|
975
|
-
this.socket.on("disconnect", function(reason) {
|
|
976
|
-
console.log("Socket disconnected:", reason);
|
|
977
|
-
_this.disconnectCallbacks.forEach(function(cb) {
|
|
978
|
-
return cb();
|
|
979
|
-
});
|
|
980
|
-
});
|
|
981
|
-
this.socket.on("connect_error", function(error) {
|
|
982
|
-
console.error("Socket connection error:", error);
|
|
983
|
-
});
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
/// get socket instance
|
|
989
|
-
key: "getSocketInstance",
|
|
990
|
-
value: function getSocketInstance() {
|
|
991
|
-
if (!this.socket) {
|
|
992
|
-
this.initSocket();
|
|
993
|
-
}
|
|
994
|
-
if (!this.socket) {
|
|
995
|
-
throw new Error("Socket not initialized");
|
|
996
|
-
}
|
|
997
|
-
if (!this.socket.connected) {
|
|
998
|
-
this.socket.connect();
|
|
999
|
-
}
|
|
1000
|
-
return this.socket;
|
|
1001
|
-
}
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
/// subscribe to collections
|
|
1005
|
-
key: "subscribeToCollections",
|
|
1006
|
-
value: function subscribeToCollections(config) {
|
|
1007
|
-
var s = this.getSocketInstance();
|
|
1008
|
-
var collectionsNames = config.map(function(c) {
|
|
1009
|
-
return c.collectionName;
|
|
1010
|
-
});
|
|
1011
|
-
var eventHandlers = [];
|
|
1012
|
-
config.forEach(function(configuration) {
|
|
1013
|
-
var collectionName = configuration.collectionName, onAdd = configuration.onAdd, onFirstTime = configuration.onFirstTime, onModify = configuration.onModify, onRemove = configuration.onRemove, extraParsers = configuration.extraParsers, conditions = configuration.conditions, orderBy2 = configuration.orderBy;
|
|
1014
|
-
s.on("initial:".concat(collectionName), onFirstTime);
|
|
1015
|
-
eventHandlers.push({
|
|
1016
|
-
eventName: "initial:".concat(collectionName),
|
|
1017
|
-
handler: onFirstTime
|
|
1018
|
-
});
|
|
1019
|
-
s.on("add:".concat(collectionName), onAdd);
|
|
1020
|
-
eventHandlers.push({
|
|
1021
|
-
eventName: "add:".concat(collectionName),
|
|
1022
|
-
handler: onAdd
|
|
1023
|
-
});
|
|
1024
|
-
s.on("update:".concat(collectionName), onModify);
|
|
1025
|
-
eventHandlers.push({
|
|
1026
|
-
eventName: "update:".concat(collectionName),
|
|
1027
|
-
handler: onModify
|
|
1028
|
-
});
|
|
1029
|
-
s.on("delete:".concat(collectionName), onRemove);
|
|
1030
|
-
eventHandlers.push({
|
|
1031
|
-
eventName: "delete:".concat(collectionName),
|
|
1032
|
-
handler: onRemove
|
|
1033
|
-
});
|
|
1034
|
-
extraParsers === null || extraParsers === void 0 ? void 0 : extraParsers.forEach(function(parsers) {
|
|
1035
|
-
var extraOnAdd = parsers.onAdd, extraOnFirstTime = parsers.onFirstTime, extraOnModify = parsers.onModify, extraOnRemove = parsers.onRemove;
|
|
1036
|
-
s.on("initial:".concat(collectionName), extraOnFirstTime);
|
|
1037
|
-
eventHandlers.push({
|
|
1038
|
-
eventName: "initial:".concat(collectionName),
|
|
1039
|
-
handler: extraOnFirstTime
|
|
1040
|
-
});
|
|
1041
|
-
s.on("add:".concat(collectionName), extraOnAdd);
|
|
1042
|
-
eventHandlers.push({
|
|
1043
|
-
eventName: "add:".concat(collectionName),
|
|
1044
|
-
handler: extraOnAdd
|
|
1045
|
-
});
|
|
1046
|
-
s.on("update:".concat(collectionName), extraOnModify);
|
|
1047
|
-
eventHandlers.push({
|
|
1048
|
-
eventName: "update:".concat(collectionName),
|
|
1049
|
-
handler: extraOnModify
|
|
1050
|
-
});
|
|
1051
|
-
s.on("delete:".concat(collectionName), extraOnRemove);
|
|
1052
|
-
eventHandlers.push({
|
|
1053
|
-
eventName: "delete:".concat(collectionName),
|
|
1054
|
-
handler: extraOnRemove
|
|
1055
|
-
});
|
|
1056
|
-
});
|
|
1057
|
-
});
|
|
1058
|
-
s.emit("subscribe_collections", collectionsNames, function(callback) {
|
|
1059
|
-
if (callback.success) {
|
|
1060
|
-
console.log("Successfully subscribed to: ".concat(collectionsNames.join(", ")));
|
|
1061
|
-
} else {
|
|
1062
|
-
console.error("Failed to subscribe to ".concat(config.join(", "), ": ").concat(callback.message));
|
|
1063
|
-
}
|
|
1064
|
-
});
|
|
1065
|
-
return function() {
|
|
1066
|
-
console.log("Cleaning up subscriptions for: ".concat(collectionsNames.join(", ")));
|
|
1067
|
-
s.emit("unsubscribe_collections", collectionsNames);
|
|
1068
|
-
eventHandlers.forEach(function(eh) {
|
|
1069
|
-
s.off(eh.eventName, eh.handler);
|
|
1070
|
-
});
|
|
1071
|
-
};
|
|
1072
|
-
}
|
|
1073
|
-
},
|
|
1074
|
-
{
|
|
1075
|
-
/// set data
|
|
1076
|
-
key: "setData",
|
|
1077
|
-
value: function setData(payload) {
|
|
1078
|
-
var s = this.getSocketInstance();
|
|
1079
|
-
return new Promise(function(resolve, reject) {
|
|
1080
|
-
s.emit("set_data", payload, function(callback) {
|
|
1081
|
-
if (callback.success) {
|
|
1082
|
-
console.log("Data saved successfully:", payload);
|
|
1083
|
-
console.log("ack", callback);
|
|
1084
|
-
resolve(callback);
|
|
1085
|
-
} else {
|
|
1086
|
-
reject(new Error(callback.message || "Save operation failed"));
|
|
1087
|
-
}
|
|
1088
|
-
});
|
|
1089
|
-
});
|
|
1090
|
-
}
|
|
1091
|
-
},
|
|
1092
|
-
{
|
|
1093
|
-
/// get data
|
|
1094
|
-
key: "getCollectionData",
|
|
1095
|
-
value: function getCollectionData(payload) {
|
|
1096
|
-
var s = this.getSocketInstance();
|
|
1097
|
-
s.emit("get_data", {
|
|
1098
|
-
collection_name: payload.collection_name
|
|
1099
|
-
}, function(socketCallback) {
|
|
1100
|
-
if (socketCallback.success && socketCallback.data) {
|
|
1101
|
-
payload.callback(socketCallback.data);
|
|
1102
|
-
} else {
|
|
1103
|
-
payload.callback(payload.defaultValue);
|
|
1104
|
-
}
|
|
1105
|
-
});
|
|
1106
|
-
}
|
|
1107
|
-
},
|
|
1108
|
-
{
|
|
1109
|
-
key: "getDocumentData",
|
|
1110
|
-
value: function getDocumentData(payload) {
|
|
1111
|
-
var s = this.getSocketInstance();
|
|
1112
|
-
s.emit("get_data", {
|
|
1113
|
-
collection_name: payload.collection_name,
|
|
1114
|
-
key: payload.key
|
|
1115
|
-
}, function(socketCallback) {
|
|
1116
|
-
if (socketCallback.success && socketCallback.data) {
|
|
1117
|
-
payload.callback(socketCallback.data);
|
|
1118
|
-
} else {
|
|
1119
|
-
payload.callback(payload.defaultValue);
|
|
1120
|
-
}
|
|
1121
|
-
});
|
|
1122
|
-
}
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
/// delete data
|
|
1126
|
-
key: "deleteData",
|
|
1127
|
-
value: function deleteData(payload) {
|
|
1128
|
-
var s = this.getSocketInstance();
|
|
1129
|
-
return new Promise(function(resolve, reject) {
|
|
1130
|
-
s.emit("delete_data", payload, function(callback) {
|
|
1131
|
-
if (callback.success) {
|
|
1132
|
-
console.log("Data deleted successfully:", payload);
|
|
1133
|
-
console.log("delete ack", callback);
|
|
1134
|
-
resolve(callback);
|
|
1135
|
-
} else {
|
|
1136
|
-
reject(new Error(callback.message || "Delete operation failed"));
|
|
1137
|
-
}
|
|
1138
|
-
});
|
|
1139
|
-
});
|
|
1140
|
-
}
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
key: "clearAllRedisData",
|
|
1144
|
-
value: function clearAllRedisData() {
|
|
1145
|
-
var s = this.getSocketInstance();
|
|
1146
|
-
return new Promise(function(resolve, reject) {
|
|
1147
|
-
s.emit("clear_all_redis_data", function(ack) {
|
|
1148
|
-
if (ack.success) {
|
|
1149
|
-
resolve(ack);
|
|
1150
|
-
} else {
|
|
1151
|
-
reject(new Error(ack.message || "Clear all Redis data operation failed"));
|
|
1152
|
-
}
|
|
1153
|
-
});
|
|
1154
|
-
});
|
|
1155
|
-
}
|
|
1156
|
-
},
|
|
1157
|
-
{
|
|
1158
|
-
/// connection management methods
|
|
1159
|
-
key: "onConnect",
|
|
1160
|
-
value: function onConnect(callback) {
|
|
1161
|
-
var _this_socket;
|
|
1162
|
-
this.connectCallbacks.push(callback);
|
|
1163
|
-
if ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) {
|
|
1164
|
-
callback();
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
},
|
|
1168
|
-
{
|
|
1169
|
-
key: "offConnect",
|
|
1170
|
-
value: function offConnect(callback) {
|
|
1171
|
-
this.connectCallbacks = this.connectCallbacks.filter(function(cb) {
|
|
1172
|
-
return cb !== callback;
|
|
1173
|
-
});
|
|
1174
|
-
}
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
key: "onDisconnect",
|
|
1178
|
-
value: function onDisconnect(callback) {
|
|
1179
|
-
this.disconnectCallbacks.push(callback);
|
|
1180
|
-
if (this.socket && !this.socket.connected) {
|
|
1181
|
-
callback();
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
},
|
|
1185
|
-
{
|
|
1186
|
-
key: "offDisconnect",
|
|
1187
|
-
value: function offDisconnect(callback) {
|
|
1188
|
-
this.disconnectCallbacks = this.disconnectCallbacks.filter(function(cb) {
|
|
1189
|
-
return cb !== callback;
|
|
1190
|
-
});
|
|
1191
|
-
}
|
|
1192
|
-
},
|
|
1193
|
-
{
|
|
1194
|
-
key: "isConnected",
|
|
1195
|
-
value: function isConnected() {
|
|
1196
|
-
var _this_socket;
|
|
1197
|
-
return ((_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.connected) || false;
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
], [
|
|
1201
|
-
{
|
|
1202
|
-
key: "getInstance",
|
|
1203
|
-
value: function getInstance() {
|
|
1204
|
-
if (!_SocketService.instance) {
|
|
1205
|
-
_SocketService.instance = new _SocketService();
|
|
1206
|
-
}
|
|
1207
|
-
return _SocketService.instance;
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
]);
|
|
1211
|
-
return _SocketService;
|
|
1212
|
-
}();
|
|
1213
|
-
var socketServiceInstance = SocketService.getInstance();
|
|
1214
942
|
// src/components/utils/Checkboxes.tsx
|
|
1215
943
|
import { useEffect, useState } from "react";
|
|
1216
944
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -3753,14 +3481,14 @@ function rectsAreEqual(a, b) {
|
|
|
3753
3481
|
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
3754
3482
|
}
|
|
3755
3483
|
function observeMove(element, onMove) {
|
|
3756
|
-
var
|
|
3484
|
+
var io = null;
|
|
3757
3485
|
var timeoutId;
|
|
3758
3486
|
var root = getDocumentElement(element);
|
|
3759
3487
|
function cleanup() {
|
|
3760
3488
|
var _io;
|
|
3761
3489
|
clearTimeout(timeoutId);
|
|
3762
|
-
(_io =
|
|
3763
|
-
|
|
3490
|
+
(_io = io) == null || _io.disconnect();
|
|
3491
|
+
io = null;
|
|
3764
3492
|
}
|
|
3765
3493
|
function refresh(skip, threshold) {
|
|
3766
3494
|
if (skip === void 0) {
|
|
@@ -3808,14 +3536,14 @@ function observeMove(element, onMove) {
|
|
|
3808
3536
|
isFirstUpdate = false;
|
|
3809
3537
|
}
|
|
3810
3538
|
try {
|
|
3811
|
-
|
|
3539
|
+
io = new IntersectionObserver(handleObserve, _object_spread_props(_object_spread({}, options), {
|
|
3812
3540
|
// Handle <iframe>s
|
|
3813
3541
|
root: root.ownerDocument
|
|
3814
3542
|
}));
|
|
3815
3543
|
} catch (e) {
|
|
3816
|
-
|
|
3544
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
3817
3545
|
}
|
|
3818
|
-
|
|
3546
|
+
io.observe(element);
|
|
3819
3547
|
}
|
|
3820
3548
|
refresh(true);
|
|
3821
3549
|
return cleanup;
|
|
@@ -6150,6 +5878,90 @@ var CheckboxContainer = function(param) {
|
|
|
6150
5878
|
})
|
|
6151
5879
|
}));
|
|
6152
5880
|
};
|
|
5881
|
+
var DurationPicker = function(param) {
|
|
5882
|
+
var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "h-12" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, direction = param.direction, onChange = param.onChange, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName, title = param.title, labelStyle = param.labelStyle, value = param.value, _param_options = param.options, options = _param_options === void 0 ? [
|
|
5883
|
+
"days",
|
|
5884
|
+
"hours",
|
|
5885
|
+
"minutes",
|
|
5886
|
+
"seconds"
|
|
5887
|
+
] : _param_options, _param_hideLabels = param.hideLabels, hideLabels = _param_hideLabels === void 0 ? false : _param_hideLabels;
|
|
5888
|
+
var containerProps = useMemo9(function() {
|
|
5889
|
+
return {
|
|
5890
|
+
containerClassName: containerClassName,
|
|
5891
|
+
direction: direction,
|
|
5892
|
+
labelClassName: labelClassName,
|
|
5893
|
+
labelContent: labelContent,
|
|
5894
|
+
labelWithDots: labelWithDots,
|
|
5895
|
+
labelsCommonClassName: labelsCommonClassName,
|
|
5896
|
+
name: name,
|
|
5897
|
+
required: required,
|
|
5898
|
+
labelStyle: labelStyle
|
|
5899
|
+
};
|
|
5900
|
+
}, [
|
|
5901
|
+
containerClassName,
|
|
5902
|
+
direction,
|
|
5903
|
+
labelClassName,
|
|
5904
|
+
labelContent,
|
|
5905
|
+
labelWithDots,
|
|
5906
|
+
labelsCommonClassName,
|
|
5907
|
+
name,
|
|
5908
|
+
required,
|
|
5909
|
+
labelStyle
|
|
5910
|
+
]);
|
|
5911
|
+
var _useState9 = _sliced_to_array(useState9(value || {
|
|
5912
|
+
days: 0,
|
|
5913
|
+
hours: 0,
|
|
5914
|
+
minutes: 0,
|
|
5915
|
+
seconds: 0
|
|
5916
|
+
}), 2), duration = _useState9[0], setDuration = _useState9[1];
|
|
5917
|
+
var handleField = function(field, range) {
|
|
5918
|
+
return function(e) {
|
|
5919
|
+
var raw = parseInt(e.target.value, 10);
|
|
5920
|
+
var clamped = isNaN(raw) ? 0 : Math.min(range[1], Math.max(range[0], raw));
|
|
5921
|
+
setDuration(_object_spread_props(_object_spread({}, duration), _define_property({}, field, clamped)));
|
|
5922
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_object_spread_props(_object_spread({}, duration), _define_property({}, field, clamped)));
|
|
5923
|
+
};
|
|
5924
|
+
};
|
|
5925
|
+
return /* @__PURE__ */ jsx19(FormElementContainer, _object_spread_props(_object_spread({}, containerProps), {
|
|
5926
|
+
children: /* @__PURE__ */ jsxs14("div", {
|
|
5927
|
+
className: cn("flex gap-1.5 text-sm", elementClassName),
|
|
5928
|
+
dir: "ltr",
|
|
5929
|
+
children: [
|
|
5930
|
+
Array.from(new Set(options)).map(function(field) {
|
|
5931
|
+
return /* @__PURE__ */ jsxs14("div", {
|
|
5932
|
+
className: "flex flex-col border p-0.5 rounded-md",
|
|
5933
|
+
children: [
|
|
5934
|
+
!hideLabels && /* @__PURE__ */ jsx19("label", {
|
|
5935
|
+
className: "mb-1 ps-1 capitalize text-start border-b-[1px] border-b-gray-300",
|
|
5936
|
+
children: field.slice(0, 1)
|
|
5937
|
+
}),
|
|
5938
|
+
/* @__PURE__ */ jsx19("input", {
|
|
5939
|
+
type: "number",
|
|
5940
|
+
inputMode: "numeric",
|
|
5941
|
+
min: 0,
|
|
5942
|
+
max: field === "days" ? 30 : 59,
|
|
5943
|
+
value: duration[field],
|
|
5944
|
+
onChange: handleField(field, field === "days" ? [
|
|
5945
|
+
0,
|
|
5946
|
+
30
|
|
5947
|
+
] : [
|
|
5948
|
+
0,
|
|
5949
|
+
field === "hours" ? 23 : 59
|
|
5950
|
+
]),
|
|
5951
|
+
className: cn("text-center w-8 ")
|
|
5952
|
+
})
|
|
5953
|
+
]
|
|
5954
|
+
}, field);
|
|
5955
|
+
}),
|
|
5956
|
+
/* @__PURE__ */ jsx19("input", {
|
|
5957
|
+
name: name,
|
|
5958
|
+
type: "hidden",
|
|
5959
|
+
value: JSON.stringify(duration)
|
|
5960
|
+
})
|
|
5961
|
+
]
|
|
5962
|
+
})
|
|
5963
|
+
}));
|
|
5964
|
+
};
|
|
6153
5965
|
var FormElementContainer = function(param) {
|
|
6154
5966
|
var containerClassName = param.containerClassName, direction = param.direction, labelClassName = param.labelClassName, labelContent = param.labelContent, labelWithDots = param.labelWithDots, labelsCommonClassName = param.labelsCommonClassName, name = param.name, required = param.required, children = param.children, _param_defaultContainerClassName = param.defaultContainerClassName, defaultContainerClassName = _param_defaultContainerClassName === void 0 ? true : _param_defaultContainerClassName, labelStyle = param.labelStyle;
|
|
6155
5967
|
return /* @__PURE__ */ jsxs14("div", {
|
|
@@ -6639,5 +6451,5 @@ function Slot2(props) {
|
|
|
6639
6451
|
})
|
|
6640
6452
|
});
|
|
6641
6453
|
}
|
|
6642
|
-
export { Badge, BooleanUi, Button, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DisplayAllRowsButton, DurationUI, ElementLabel, ElementsContainer, ErrorBoundary, ExportToExcel, Filter, FormElementContainer, FormSeparator, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, LoginWithGoogleButton, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
|
|
6454
|
+
export { Badge, BooleanUi, Button, Checkbox, CheckboxContainer, CodeInput, ConfirmForm, DatePicker, DisplayAllRowsButton, DurationPicker, DurationUI, ElementLabel, ElementsContainer, ErrorBoundary, ExportToExcel, Filter, FormElementContainer, FormSeparator, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, LoginWithGoogleButton, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, defaultFormElementBorderClassName, defaultFormElementContainerClassName, useDebounce, useSortValues };
|
|
6643
6455
|
//# sourceMappingURL=index.mjs.map
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { FirebaseStorage } from 'firebase/storage';
|
|
|
3
3
|
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
|
-
import { TObject, NxUser, CountryOptions, LanguageOptions, UserPermissionsObject, userPermissionsObjectValue, Client
|
|
6
|
+
import { TObject, NxUser, CountryOptions, LanguageOptions, UserPermissionsObject, userPermissionsObjectValue, Client } from 'akeyless-types-commons';
|
|
7
7
|
import React, { Dispatch, SetStateAction } from 'react';
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
9
|
|
|
@@ -249,36 +249,4 @@ declare const initializeUserPermissions: ({ phoneNumber, email, firstTimeArray,
|
|
|
249
249
|
permissions: TObject<TObject<boolean>>;
|
|
250
250
|
}>;
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
key: string;
|
|
254
|
-
collection_name: string;
|
|
255
|
-
callback: (value: T) => void;
|
|
256
|
-
defaultValue: T;
|
|
257
|
-
}
|
|
258
|
-
declare class SocketService {
|
|
259
|
-
private static instance;
|
|
260
|
-
private socket;
|
|
261
|
-
private connectCallbacks;
|
|
262
|
-
private disconnectCallbacks;
|
|
263
|
-
private initSocket;
|
|
264
|
-
private constructor();
|
|
265
|
-
static getInstance(): SocketService;
|
|
266
|
-
private getSocketInstance;
|
|
267
|
-
subscribeToCollections(config: OnSnapshotConfig[]): () => void;
|
|
268
|
-
setData<UpdateType extends RedisUpdateType, DataType = any>(payload: RedisUpdatePayload<UpdateType, DataType>): Promise<SocketCallbackResponse>;
|
|
269
|
-
getCollectionData<T>(payload: Omit<GetDataPayload<T>, "key">): void;
|
|
270
|
-
getDocumentData<T>(payload: GetDataPayload<T>): void;
|
|
271
|
-
deleteData(payload: {
|
|
272
|
-
key: string;
|
|
273
|
-
collection_name: string;
|
|
274
|
-
}): Promise<SocketCallbackResponse>;
|
|
275
|
-
clearAllRedisData(): Promise<SocketCallbackResponse>;
|
|
276
|
-
onConnect(callback: () => void): void;
|
|
277
|
-
offConnect(callback: () => void): void;
|
|
278
|
-
onDisconnect(callback: () => void): void;
|
|
279
|
-
offDisconnect(callback: () => void): void;
|
|
280
|
-
isConnected(): boolean;
|
|
281
|
-
}
|
|
282
|
-
declare const socketServiceInstance: SocketService;
|
|
283
|
-
|
|
284
|
-
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, socketServiceInstance, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
|
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 };
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { FirebaseStorage } from 'firebase/storage';
|
|
|
3
3
|
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
|
-
import { TObject, NxUser, CountryOptions, LanguageOptions, UserPermissionsObject, userPermissionsObjectValue, Client
|
|
6
|
+
import { TObject, NxUser, CountryOptions, LanguageOptions, UserPermissionsObject, userPermissionsObjectValue, Client } from 'akeyless-types-commons';
|
|
7
7
|
import React, { Dispatch, SetStateAction } from 'react';
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
9
|
|
|
@@ -249,36 +249,4 @@ declare const initializeUserPermissions: ({ phoneNumber, email, firstTimeArray,
|
|
|
249
249
|
permissions: TObject<TObject<boolean>>;
|
|
250
250
|
}>;
|
|
251
251
|
|
|
252
|
-
|
|
253
|
-
key: string;
|
|
254
|
-
collection_name: string;
|
|
255
|
-
callback: (value: T) => void;
|
|
256
|
-
defaultValue: T;
|
|
257
|
-
}
|
|
258
|
-
declare class SocketService {
|
|
259
|
-
private static instance;
|
|
260
|
-
private socket;
|
|
261
|
-
private connectCallbacks;
|
|
262
|
-
private disconnectCallbacks;
|
|
263
|
-
private initSocket;
|
|
264
|
-
private constructor();
|
|
265
|
-
static getInstance(): SocketService;
|
|
266
|
-
private getSocketInstance;
|
|
267
|
-
subscribeToCollections(config: OnSnapshotConfig[]): () => void;
|
|
268
|
-
setData<UpdateType extends RedisUpdateType, DataType = any>(payload: RedisUpdatePayload<UpdateType, DataType>): Promise<SocketCallbackResponse>;
|
|
269
|
-
getCollectionData<T>(payload: Omit<GetDataPayload<T>, "key">): void;
|
|
270
|
-
getDocumentData<T>(payload: GetDataPayload<T>): void;
|
|
271
|
-
deleteData(payload: {
|
|
272
|
-
key: string;
|
|
273
|
-
collection_name: string;
|
|
274
|
-
}): Promise<SocketCallbackResponse>;
|
|
275
|
-
clearAllRedisData(): Promise<SocketCallbackResponse>;
|
|
276
|
-
onConnect(callback: () => void): void;
|
|
277
|
-
offConnect(callback: () => void): void;
|
|
278
|
-
onDisconnect(callback: () => void): void;
|
|
279
|
-
offDisconnect(callback: () => void): void;
|
|
280
|
-
isConnected(): boolean;
|
|
281
|
-
}
|
|
282
|
-
declare const socketServiceInstance: SocketService;
|
|
283
|
-
|
|
284
|
-
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, socketServiceInstance, sort_by_timestamp, storage, textNumbersRegex, textRegex, timestamp_to_millis, timestamp_to_string, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
|
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 };
|