akeyless-client-commons 1.1.19 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +42 -41
- package/dist/components/index.mjs +42 -41
- package/dist/helpers/index.d.mts +3 -1
- package/dist/helpers/index.d.ts +3 -1
- package/dist/helpers/index.js +94 -3
- package/dist/helpers/index.mjs +87 -4
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/index.mjs +1 -0
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -631,6 +631,7 @@ var parsePermissions = function(object) {
|
|
|
631
631
|
return result;
|
|
632
632
|
};
|
|
633
633
|
// src/helpers/firebase.ts
|
|
634
|
+
var import_storage2 = require("firebase/storage");
|
|
634
635
|
var import_meta = {};
|
|
635
636
|
var initApp = function() {
|
|
636
637
|
var isNodeEnv2 = typeof process !== "undefined" && process.env;
|
|
@@ -946,7 +947,7 @@ var addLoginAudit = /*#__PURE__*/ function() {
|
|
|
946
947
|
}();
|
|
947
948
|
var addAuditRecord = /*#__PURE__*/ function() {
|
|
948
949
|
var _ref = _async_to_generator(function(action, entity, details, user) {
|
|
949
|
-
var
|
|
950
|
+
var ref2, data, error;
|
|
950
951
|
return _ts_generator(this, function(_state) {
|
|
951
952
|
switch(_state.label){
|
|
952
953
|
case 0:
|
|
@@ -956,7 +957,7 @@ var addAuditRecord = /*#__PURE__*/ function() {
|
|
|
956
957
|
,
|
|
957
958
|
3
|
|
958
959
|
]);
|
|
959
|
-
|
|
960
|
+
ref2 = (0, import_firestore.doc)(collections.audit);
|
|
960
961
|
data = {
|
|
961
962
|
action: action,
|
|
962
963
|
entity: entity,
|
|
@@ -971,7 +972,7 @@ var addAuditRecord = /*#__PURE__*/ function() {
|
|
|
971
972
|
};
|
|
972
973
|
return [
|
|
973
974
|
4,
|
|
974
|
-
(0, import_firestore.setDoc)(
|
|
975
|
+
(0, import_firestore.setDoc)(ref2, _object_spread_props(_object_spread({}, data), {
|
|
975
976
|
datetime: fire_base_TIME_TEMP()
|
|
976
977
|
}))
|
|
977
978
|
];
|
|
@@ -2068,7 +2069,7 @@ var buttonVariants = (0, import_class_variance_authority2.cva)("inline-flex item
|
|
|
2068
2069
|
size: "default"
|
|
2069
2070
|
}
|
|
2070
2071
|
});
|
|
2071
|
-
var Button = React4.forwardRef(function(_param,
|
|
2072
|
+
var Button = React4.forwardRef(function(_param, ref2) {
|
|
2072
2073
|
var className = _param.className, variant = _param.variant, size3 = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties(_param, [
|
|
2073
2074
|
"className",
|
|
2074
2075
|
"variant",
|
|
@@ -2077,7 +2078,7 @@ var Button = React4.forwardRef(function(_param, ref) {
|
|
|
2077
2078
|
]);
|
|
2078
2079
|
var Comp = asChild ? import_react_slot.Slot : "button";
|
|
2079
2080
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Comp, _object_spread({
|
|
2080
|
-
ref:
|
|
2081
|
+
ref: ref2,
|
|
2081
2082
|
"data-slot": "button",
|
|
2082
2083
|
className: cn(buttonVariants({
|
|
2083
2084
|
variant: variant,
|
|
@@ -2090,7 +2091,7 @@ Button.displayName = "Button";
|
|
|
2090
2091
|
// src/components/ui/input.tsx
|
|
2091
2092
|
var React5 = __toESM(require("react"));
|
|
2092
2093
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2093
|
-
var Input = React5.forwardRef(function(_param,
|
|
2094
|
+
var Input = React5.forwardRef(function(_param, ref2) {
|
|
2094
2095
|
var className = _param.className, type = _param.type, props = _object_without_properties(_param, [
|
|
2095
2096
|
"className",
|
|
2096
2097
|
"type"
|
|
@@ -2098,7 +2099,7 @@ var Input = React5.forwardRef(function(_param, ref) {
|
|
|
2098
2099
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("input", _object_spread({
|
|
2099
2100
|
type: type,
|
|
2100
2101
|
className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
2101
|
-
ref:
|
|
2102
|
+
ref: ref2
|
|
2102
2103
|
}, props));
|
|
2103
2104
|
});
|
|
2104
2105
|
Input.displayName = "Input";
|
|
@@ -2106,7 +2107,7 @@ Input.displayName = "Input";
|
|
|
2106
2107
|
var React6 = __toESM(require("react"));
|
|
2107
2108
|
var ProgressPrimitive = __toESM(require("@radix-ui/react-progress"));
|
|
2108
2109
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
2109
|
-
var ProgressComponent = React6.forwardRef(function(_param,
|
|
2110
|
+
var ProgressComponent = React6.forwardRef(function(_param, ref2) {
|
|
2110
2111
|
var className = _param.className, value = _param.value, containerClassName = _param.containerClassName, indicatorClassName = _param.indicatorClassName, showValueClassName = _param.showValueClassName, _param_showValue = _param.showValue, showValue = _param_showValue === void 0 ? false : _param_showValue, props = _object_without_properties(_param, [
|
|
2111
2112
|
"className",
|
|
2112
2113
|
"value",
|
|
@@ -2118,7 +2119,7 @@ var ProgressComponent = React6.forwardRef(function(_param, ref) {
|
|
|
2118
2119
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", {
|
|
2119
2120
|
className: cn("relative w-full", containerClassName),
|
|
2120
2121
|
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
2121
|
-
ref:
|
|
2122
|
+
ref: ref2,
|
|
2122
2123
|
className: cn("w-full h-5 bg-[#e5e7eb] relative overflow-hidden rounded-full", className)
|
|
2123
2124
|
}, props), {
|
|
2124
2125
|
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ProgressPrimitive.Indicator, {
|
|
@@ -2151,17 +2152,17 @@ var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
|
2151
2152
|
var import_lucide_react = require("lucide-react");
|
|
2152
2153
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2153
2154
|
var DialogPortal = DialogPrimitive.Portal;
|
|
2154
|
-
var DialogOverlay = React7.forwardRef(function(_param,
|
|
2155
|
+
var DialogOverlay = React7.forwardRef(function(_param, ref2) {
|
|
2155
2156
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2156
2157
|
"className"
|
|
2157
2158
|
]);
|
|
2158
2159
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogPrimitive.Overlay, _object_spread({
|
|
2159
|
-
ref:
|
|
2160
|
+
ref: ref2,
|
|
2160
2161
|
className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)
|
|
2161
2162
|
}, props));
|
|
2162
2163
|
});
|
|
2163
2164
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
2164
|
-
var DialogContent = React7.forwardRef(function(_param,
|
|
2165
|
+
var DialogContent = React7.forwardRef(function(_param, ref2) {
|
|
2165
2166
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
2166
2167
|
"className",
|
|
2167
2168
|
"children"
|
|
@@ -2170,7 +2171,7 @@ var DialogContent = React7.forwardRef(function(_param, ref) {
|
|
|
2170
2171
|
children: [
|
|
2171
2172
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogOverlay, {}),
|
|
2172
2173
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(DialogPrimitive.Content, _object_spread_props(_object_spread({
|
|
2173
|
-
ref:
|
|
2174
|
+
ref: ref2,
|
|
2174
2175
|
className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)
|
|
2175
2176
|
}, props), {
|
|
2176
2177
|
children: [
|
|
@@ -2211,39 +2212,39 @@ var DialogFooter = function(_param) {
|
|
|
2211
2212
|
}, props));
|
|
2212
2213
|
};
|
|
2213
2214
|
DialogFooter.displayName = "DialogFooter";
|
|
2214
|
-
var DialogTitle = React7.forwardRef(function(_param,
|
|
2215
|
+
var DialogTitle = React7.forwardRef(function(_param, ref2) {
|
|
2215
2216
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2216
2217
|
"className"
|
|
2217
2218
|
]);
|
|
2218
2219
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogPrimitive.Title, _object_spread({
|
|
2219
|
-
ref:
|
|
2220
|
+
ref: ref2,
|
|
2220
2221
|
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
2221
2222
|
}, props));
|
|
2222
2223
|
});
|
|
2223
2224
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
2224
|
-
var DialogDescription = React7.forwardRef(function(_param,
|
|
2225
|
+
var DialogDescription = React7.forwardRef(function(_param, ref2) {
|
|
2225
2226
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2226
2227
|
"className"
|
|
2227
2228
|
]);
|
|
2228
2229
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DialogPrimitive.Description, _object_spread({
|
|
2229
|
-
ref:
|
|
2230
|
+
ref: ref2,
|
|
2230
2231
|
className: cn("text-sm text-muted-foreground", className)
|
|
2231
2232
|
}, props));
|
|
2232
2233
|
});
|
|
2233
2234
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
2234
2235
|
// src/components/ui/command.tsx
|
|
2235
2236
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2236
|
-
var Command = React8.forwardRef(function(_param,
|
|
2237
|
+
var Command = React8.forwardRef(function(_param, ref2) {
|
|
2237
2238
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2238
2239
|
"className"
|
|
2239
2240
|
]);
|
|
2240
2241
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_cmdk.Command, _object_spread({
|
|
2241
|
-
ref:
|
|
2242
|
+
ref: ref2,
|
|
2242
2243
|
className: cn("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground", className)
|
|
2243
2244
|
}, props));
|
|
2244
2245
|
});
|
|
2245
2246
|
Command.displayName = import_cmdk.Command.displayName;
|
|
2246
|
-
var CommandInput = React8.forwardRef(function(_param,
|
|
2247
|
+
var CommandInput = React8.forwardRef(function(_param, ref2) {
|
|
2247
2248
|
var className = _param.className, withSearchIcon = _param.withSearchIcon, props = _object_without_properties(_param, [
|
|
2248
2249
|
"className",
|
|
2249
2250
|
"withSearchIcon"
|
|
@@ -2258,56 +2259,56 @@ var CommandInput = React8.forwardRef(function(_param, ref) {
|
|
|
2258
2259
|
className: "me-3 text-muted-foreground/80"
|
|
2259
2260
|
}),
|
|
2260
2261
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_cmdk.Command.Input, _object_spread({
|
|
2261
|
-
ref:
|
|
2262
|
+
ref: ref2,
|
|
2262
2263
|
className: cn("flex h-10 w-full rounded-lg bg-transparent py-2 text-sm outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
2263
2264
|
}, props))
|
|
2264
2265
|
]
|
|
2265
2266
|
});
|
|
2266
2267
|
});
|
|
2267
2268
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
2268
|
-
var CommandList = React8.forwardRef(function(_param,
|
|
2269
|
+
var CommandList = React8.forwardRef(function(_param, ref2) {
|
|
2269
2270
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2270
2271
|
"className"
|
|
2271
2272
|
]);
|
|
2272
2273
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_cmdk.Command.List, _object_spread({
|
|
2273
|
-
ref:
|
|
2274
|
+
ref: ref2,
|
|
2274
2275
|
className: cn("max-h-80 overflow-y-auto overflow-x-hidden", className)
|
|
2275
2276
|
}, props));
|
|
2276
2277
|
});
|
|
2277
2278
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
2278
|
-
var CommandEmpty = React8.forwardRef(function(props,
|
|
2279
|
+
var CommandEmpty = React8.forwardRef(function(props, ref2) {
|
|
2279
2280
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_cmdk.Command.Empty, _object_spread({
|
|
2280
|
-
ref:
|
|
2281
|
+
ref: ref2,
|
|
2281
2282
|
className: "py-6 text-center text-sm"
|
|
2282
2283
|
}, props));
|
|
2283
2284
|
});
|
|
2284
2285
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
2285
|
-
var CommandGroup = React8.forwardRef(function(_param,
|
|
2286
|
+
var CommandGroup = React8.forwardRef(function(_param, ref2) {
|
|
2286
2287
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2287
2288
|
"className"
|
|
2288
2289
|
]);
|
|
2289
2290
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_cmdk.Command.Group, _object_spread({
|
|
2290
|
-
ref:
|
|
2291
|
+
ref: ref2,
|
|
2291
2292
|
className: cn("overflow-hidden p-2 text-foreground [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className)
|
|
2292
2293
|
}, props));
|
|
2293
2294
|
});
|
|
2294
2295
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
2295
|
-
var CommandSeparator = React8.forwardRef(function(_param,
|
|
2296
|
+
var CommandSeparator = React8.forwardRef(function(_param, ref2) {
|
|
2296
2297
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2297
2298
|
"className"
|
|
2298
2299
|
]);
|
|
2299
2300
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_cmdk.Command.Separator, _object_spread({
|
|
2300
|
-
ref:
|
|
2301
|
+
ref: ref2,
|
|
2301
2302
|
className: cn("-mx-1 h-px bg-border", className)
|
|
2302
2303
|
}, props));
|
|
2303
2304
|
});
|
|
2304
2305
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
2305
|
-
var CommandItem = React8.forwardRef(function(_param,
|
|
2306
|
+
var CommandItem = React8.forwardRef(function(_param, ref2) {
|
|
2306
2307
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2307
2308
|
"className"
|
|
2308
2309
|
]);
|
|
2309
2310
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_cmdk.Command.Item, _object_spread({
|
|
2310
|
-
ref:
|
|
2311
|
+
ref: ref2,
|
|
2311
2312
|
className: cn("relative flex cursor-default select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className)
|
|
2312
2313
|
}, props));
|
|
2313
2314
|
});
|
|
@@ -3949,11 +3950,11 @@ function roundByDPR(element, value) {
|
|
|
3949
3950
|
return Math.round(value * dpr) / dpr;
|
|
3950
3951
|
}
|
|
3951
3952
|
function useLatestRef(value) {
|
|
3952
|
-
var
|
|
3953
|
+
var ref2 = React9.useRef(value);
|
|
3953
3954
|
index(function() {
|
|
3954
|
-
|
|
3955
|
+
ref2.current = value;
|
|
3955
3956
|
});
|
|
3956
|
-
return
|
|
3957
|
+
return ref2;
|
|
3957
3958
|
}
|
|
3958
3959
|
function useFloating(options) {
|
|
3959
3960
|
if (options === void 0) {
|
|
@@ -4262,7 +4263,7 @@ function useDebounce(value, delay) {
|
|
|
4262
4263
|
]);
|
|
4263
4264
|
return debouncedValue;
|
|
4264
4265
|
}
|
|
4265
|
-
var MultipleSelector = (0, import_react9.forwardRef)(function(param,
|
|
4266
|
+
var MultipleSelector = (0, import_react9.forwardRef)(function(param, ref2) {
|
|
4266
4267
|
var value = param.value, onChange = param.onChange, placeholder = param.placeholder, tmp = param.defaultOptions, arrayDefaultOptions = tmp === void 0 ? [] : tmp, arrayOptions = param.options, delay = param.delay, onSearch = param.onSearch, onSearchSync = param.onSearchSync, loadingIndicator = param.loadingIndicator, emptyIndicator = param.emptyIndicator, _param_maxSelected = param.maxSelected, maxSelected = _param_maxSelected === void 0 ? Number.MAX_SAFE_INTEGER : _param_maxSelected, onMaxSelected = param.onMaxSelected, _param_hidePlaceholderWhenSelected = param.hidePlaceholderWhenSelected, hidePlaceholderWhenSelected = _param_hidePlaceholderWhenSelected === void 0 ? true : _param_hidePlaceholderWhenSelected, disabled = param.disabled, groupBy = param.groupBy, className = param.className, badgeClassName = param.badgeClassName, _param_selectFirstItem = param.selectFirstItem, selectFirstItem = _param_selectFirstItem === void 0 ? true : _param_selectFirstItem, createNewOptionLabel = param.createNewOptionLabel, _param_triggerSearchOnFocus = param.triggerSearchOnFocus, triggerSearchOnFocus = _param_triggerSearchOnFocus === void 0 ? true : _param_triggerSearchOnFocus, commandProps = param.commandProps, inputProps = param.inputProps, _param_hideClearAllButton = param.hideClearAllButton, hideClearAllButton = _param_hideClearAllButton === void 0 ? false : _param_hideClearAllButton, _param_closeDropdownOnSelect = param.closeDropdownOnSelect, closeDropdownOnSelect = _param_closeDropdownOnSelect === void 0 ? false : _param_closeDropdownOnSelect, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, emptyIndicatorClassName = param.emptyIndicatorClassName, _param_unremovableOptions = param.unremovableOptions, unremovableOptions = _param_unremovableOptions === void 0 ? [] : _param_unremovableOptions, name = param.name, _param_dropdownContainerClassName = param.dropdownContainerClassName, dropdownContainerClassName = _param_dropdownContainerClassName === void 0 ? "" : _param_dropdownContainerClassName;
|
|
4267
4268
|
var _containerRef_current;
|
|
4268
4269
|
var _import_react8_default_useState = _sliced_to_array(import_react8.default.useState(false), 2), isLoading = _import_react8_default_useState[0], setIsLoading = _import_react8_default_useState[1];
|
|
@@ -4288,7 +4289,7 @@ var MultipleSelector = (0, import_react9.forwardRef)(function(param, ref) {
|
|
|
4288
4289
|
var _import_react8_default_useState4 = _sliced_to_array(import_react8.default.useState(transToGroupOption(arrayDefaultOptions, groupBy)), 2), options = _import_react8_default_useState4[0], setOptions = _import_react8_default_useState4[1];
|
|
4289
4290
|
var _import_react8_default_useState5 = _sliced_to_array(import_react8.default.useState(""), 2), inputValue = _import_react8_default_useState5[0], setInputValue = _import_react8_default_useState5[1];
|
|
4290
4291
|
var debouncedSearchTerm = useDebounce(inputValue, delay || 500);
|
|
4291
|
-
import_react8.default.useImperativeHandle(
|
|
4292
|
+
import_react8.default.useImperativeHandle(ref2, function() {
|
|
4292
4293
|
return {
|
|
4293
4294
|
selectedValue: _to_consumable_array(selected),
|
|
4294
4295
|
input: inputRef.current,
|
|
@@ -5684,7 +5685,7 @@ function InternationalPhonePicker(param) {
|
|
|
5684
5685
|
]
|
|
5685
5686
|
});
|
|
5686
5687
|
}
|
|
5687
|
-
var PhoneInput = (0, import_react13.forwardRef)(function(_param,
|
|
5688
|
+
var PhoneInput = (0, import_react13.forwardRef)(function(_param, ref2) {
|
|
5688
5689
|
var className = _param.className, onKeyDown = _param.onKeyDown, defaultValue = _param.defaultValue, style = _param.style, defaultFocus = _param.defaultFocus, disabled = _param.disabled, props = _object_without_properties(_param, [
|
|
5689
5690
|
"className",
|
|
5690
5691
|
"onKeyDown",
|
|
@@ -5708,10 +5709,10 @@ var PhoneInput = (0, import_react13.forwardRef)(function(_param, ref) {
|
|
|
5708
5709
|
disabled: disabled,
|
|
5709
5710
|
ref: function(el) {
|
|
5710
5711
|
inputRef.current = el;
|
|
5711
|
-
if (typeof
|
|
5712
|
-
|
|
5713
|
-
} else if (
|
|
5714
|
-
|
|
5712
|
+
if (typeof ref2 === "function") {
|
|
5713
|
+
ref2(el);
|
|
5714
|
+
} else if (ref2) {
|
|
5715
|
+
ref2.current = el;
|
|
5715
5716
|
}
|
|
5716
5717
|
}
|
|
5717
5718
|
}, props));
|
|
@@ -411,6 +411,7 @@ var parsePermissions = function(object) {
|
|
|
411
411
|
return result;
|
|
412
412
|
};
|
|
413
413
|
// src/helpers/firebase.ts
|
|
414
|
+
import { ref, getDownloadURL, uploadBytes } from "firebase/storage";
|
|
414
415
|
var initApp = function() {
|
|
415
416
|
var isNodeEnv2 = typeof process !== "undefined" && process.env;
|
|
416
417
|
var firebaseConfig = {
|
|
@@ -725,7 +726,7 @@ var addLoginAudit = /*#__PURE__*/ function() {
|
|
|
725
726
|
}();
|
|
726
727
|
var addAuditRecord = /*#__PURE__*/ function() {
|
|
727
728
|
var _ref = _async_to_generator(function(action, entity, details, user) {
|
|
728
|
-
var
|
|
729
|
+
var ref2, data, error;
|
|
729
730
|
return _ts_generator(this, function(_state) {
|
|
730
731
|
switch(_state.label){
|
|
731
732
|
case 0:
|
|
@@ -735,7 +736,7 @@ var addAuditRecord = /*#__PURE__*/ function() {
|
|
|
735
736
|
,
|
|
736
737
|
3
|
|
737
738
|
]);
|
|
738
|
-
|
|
739
|
+
ref2 = doc(collections.audit);
|
|
739
740
|
data = {
|
|
740
741
|
action: action,
|
|
741
742
|
entity: entity,
|
|
@@ -750,7 +751,7 @@ var addAuditRecord = /*#__PURE__*/ function() {
|
|
|
750
751
|
};
|
|
751
752
|
return [
|
|
752
753
|
4,
|
|
753
|
-
setDoc(
|
|
754
|
+
setDoc(ref2, _object_spread_props(_object_spread({}, data), {
|
|
754
755
|
datetime: fire_base_TIME_TEMP()
|
|
755
756
|
}))
|
|
756
757
|
];
|
|
@@ -1846,7 +1847,7 @@ var buttonVariants = cva2("inline-flex items-center justify-center gap-2 whitesp
|
|
|
1846
1847
|
size: "default"
|
|
1847
1848
|
}
|
|
1848
1849
|
});
|
|
1849
|
-
var Button = React4.forwardRef(function(_param,
|
|
1850
|
+
var Button = React4.forwardRef(function(_param, ref2) {
|
|
1850
1851
|
var className = _param.className, variant = _param.variant, size3 = _param.size, _param_asChild = _param.asChild, asChild = _param_asChild === void 0 ? false : _param_asChild, props = _object_without_properties(_param, [
|
|
1851
1852
|
"className",
|
|
1852
1853
|
"variant",
|
|
@@ -1855,7 +1856,7 @@ var Button = React4.forwardRef(function(_param, ref) {
|
|
|
1855
1856
|
]);
|
|
1856
1857
|
var Comp = asChild ? Slot : "button";
|
|
1857
1858
|
return /* @__PURE__ */ jsx10(Comp, _object_spread({
|
|
1858
|
-
ref:
|
|
1859
|
+
ref: ref2,
|
|
1859
1860
|
"data-slot": "button",
|
|
1860
1861
|
className: cn(buttonVariants({
|
|
1861
1862
|
variant: variant,
|
|
@@ -1868,7 +1869,7 @@ Button.displayName = "Button";
|
|
|
1868
1869
|
// src/components/ui/input.tsx
|
|
1869
1870
|
import * as React5 from "react";
|
|
1870
1871
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1871
|
-
var Input = React5.forwardRef(function(_param,
|
|
1872
|
+
var Input = React5.forwardRef(function(_param, ref2) {
|
|
1872
1873
|
var className = _param.className, type = _param.type, props = _object_without_properties(_param, [
|
|
1873
1874
|
"className",
|
|
1874
1875
|
"type"
|
|
@@ -1876,7 +1877,7 @@ var Input = React5.forwardRef(function(_param, ref) {
|
|
|
1876
1877
|
return /* @__PURE__ */ jsx11("input", _object_spread({
|
|
1877
1878
|
type: type,
|
|
1878
1879
|
className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
1879
|
-
ref:
|
|
1880
|
+
ref: ref2
|
|
1880
1881
|
}, props));
|
|
1881
1882
|
});
|
|
1882
1883
|
Input.displayName = "Input";
|
|
@@ -1884,7 +1885,7 @@ Input.displayName = "Input";
|
|
|
1884
1885
|
import * as React6 from "react";
|
|
1885
1886
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
1886
1887
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1887
|
-
var ProgressComponent = React6.forwardRef(function(_param,
|
|
1888
|
+
var ProgressComponent = React6.forwardRef(function(_param, ref2) {
|
|
1888
1889
|
var className = _param.className, value = _param.value, containerClassName = _param.containerClassName, indicatorClassName = _param.indicatorClassName, showValueClassName = _param.showValueClassName, _param_showValue = _param.showValue, showValue = _param_showValue === void 0 ? false : _param_showValue, props = _object_without_properties(_param, [
|
|
1889
1890
|
"className",
|
|
1890
1891
|
"value",
|
|
@@ -1896,7 +1897,7 @@ var ProgressComponent = React6.forwardRef(function(_param, ref) {
|
|
|
1896
1897
|
return /* @__PURE__ */ jsx12("div", {
|
|
1897
1898
|
className: cn("relative w-full", containerClassName),
|
|
1898
1899
|
children: /* @__PURE__ */ jsx12(ProgressPrimitive.Root, _object_spread_props(_object_spread({
|
|
1899
|
-
ref:
|
|
1900
|
+
ref: ref2,
|
|
1900
1901
|
className: cn("w-full h-5 bg-[#e5e7eb] relative overflow-hidden rounded-full", className)
|
|
1901
1902
|
}, props), {
|
|
1902
1903
|
children: /* @__PURE__ */ jsx12(ProgressPrimitive.Indicator, {
|
|
@@ -1929,17 +1930,17 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
|
1929
1930
|
import { X } from "lucide-react";
|
|
1930
1931
|
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1931
1932
|
var DialogPortal = DialogPrimitive.Portal;
|
|
1932
|
-
var DialogOverlay = React7.forwardRef(function(_param,
|
|
1933
|
+
var DialogOverlay = React7.forwardRef(function(_param, ref2) {
|
|
1933
1934
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1934
1935
|
"className"
|
|
1935
1936
|
]);
|
|
1936
1937
|
return /* @__PURE__ */ jsx13(DialogPrimitive.Overlay, _object_spread({
|
|
1937
|
-
ref:
|
|
1938
|
+
ref: ref2,
|
|
1938
1939
|
className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)
|
|
1939
1940
|
}, props));
|
|
1940
1941
|
});
|
|
1941
1942
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1942
|
-
var DialogContent = React7.forwardRef(function(_param,
|
|
1943
|
+
var DialogContent = React7.forwardRef(function(_param, ref2) {
|
|
1943
1944
|
var className = _param.className, children = _param.children, props = _object_without_properties(_param, [
|
|
1944
1945
|
"className",
|
|
1945
1946
|
"children"
|
|
@@ -1948,7 +1949,7 @@ var DialogContent = React7.forwardRef(function(_param, ref) {
|
|
|
1948
1949
|
children: [
|
|
1949
1950
|
/* @__PURE__ */ jsx13(DialogOverlay, {}),
|
|
1950
1951
|
/* @__PURE__ */ jsxs7(DialogPrimitive.Content, _object_spread_props(_object_spread({
|
|
1951
|
-
ref:
|
|
1952
|
+
ref: ref2,
|
|
1952
1953
|
className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)
|
|
1953
1954
|
}, props), {
|
|
1954
1955
|
children: [
|
|
@@ -1989,39 +1990,39 @@ var DialogFooter = function(_param) {
|
|
|
1989
1990
|
}, props));
|
|
1990
1991
|
};
|
|
1991
1992
|
DialogFooter.displayName = "DialogFooter";
|
|
1992
|
-
var DialogTitle = React7.forwardRef(function(_param,
|
|
1993
|
+
var DialogTitle = React7.forwardRef(function(_param, ref2) {
|
|
1993
1994
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
1994
1995
|
"className"
|
|
1995
1996
|
]);
|
|
1996
1997
|
return /* @__PURE__ */ jsx13(DialogPrimitive.Title, _object_spread({
|
|
1997
|
-
ref:
|
|
1998
|
+
ref: ref2,
|
|
1998
1999
|
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
1999
2000
|
}, props));
|
|
2000
2001
|
});
|
|
2001
2002
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
2002
|
-
var DialogDescription = React7.forwardRef(function(_param,
|
|
2003
|
+
var DialogDescription = React7.forwardRef(function(_param, ref2) {
|
|
2003
2004
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2004
2005
|
"className"
|
|
2005
2006
|
]);
|
|
2006
2007
|
return /* @__PURE__ */ jsx13(DialogPrimitive.Description, _object_spread({
|
|
2007
|
-
ref:
|
|
2008
|
+
ref: ref2,
|
|
2008
2009
|
className: cn("text-sm text-muted-foreground", className)
|
|
2009
2010
|
}, props));
|
|
2010
2011
|
});
|
|
2011
2012
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
2012
2013
|
// src/components/ui/command.tsx
|
|
2013
2014
|
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2014
|
-
var Command = React8.forwardRef(function(_param,
|
|
2015
|
+
var Command = React8.forwardRef(function(_param, ref2) {
|
|
2015
2016
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2016
2017
|
"className"
|
|
2017
2018
|
]);
|
|
2018
2019
|
return /* @__PURE__ */ jsx14(CommandPrimitive, _object_spread({
|
|
2019
|
-
ref:
|
|
2020
|
+
ref: ref2,
|
|
2020
2021
|
className: cn("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground", className)
|
|
2021
2022
|
}, props));
|
|
2022
2023
|
});
|
|
2023
2024
|
Command.displayName = CommandPrimitive.displayName;
|
|
2024
|
-
var CommandInput = React8.forwardRef(function(_param,
|
|
2025
|
+
var CommandInput = React8.forwardRef(function(_param, ref2) {
|
|
2025
2026
|
var className = _param.className, withSearchIcon = _param.withSearchIcon, props = _object_without_properties(_param, [
|
|
2026
2027
|
"className",
|
|
2027
2028
|
"withSearchIcon"
|
|
@@ -2036,56 +2037,56 @@ var CommandInput = React8.forwardRef(function(_param, ref) {
|
|
|
2036
2037
|
className: "me-3 text-muted-foreground/80"
|
|
2037
2038
|
}),
|
|
2038
2039
|
/* @__PURE__ */ jsx14(CommandPrimitive.Input, _object_spread({
|
|
2039
|
-
ref:
|
|
2040
|
+
ref: ref2,
|
|
2040
2041
|
className: cn("flex h-10 w-full rounded-lg bg-transparent py-2 text-sm outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50", className)
|
|
2041
2042
|
}, props))
|
|
2042
2043
|
]
|
|
2043
2044
|
});
|
|
2044
2045
|
});
|
|
2045
2046
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
2046
|
-
var CommandList = React8.forwardRef(function(_param,
|
|
2047
|
+
var CommandList = React8.forwardRef(function(_param, ref2) {
|
|
2047
2048
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2048
2049
|
"className"
|
|
2049
2050
|
]);
|
|
2050
2051
|
return /* @__PURE__ */ jsx14(CommandPrimitive.List, _object_spread({
|
|
2051
|
-
ref:
|
|
2052
|
+
ref: ref2,
|
|
2052
2053
|
className: cn("max-h-80 overflow-y-auto overflow-x-hidden", className)
|
|
2053
2054
|
}, props));
|
|
2054
2055
|
});
|
|
2055
2056
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
2056
|
-
var CommandEmpty = React8.forwardRef(function(props,
|
|
2057
|
+
var CommandEmpty = React8.forwardRef(function(props, ref2) {
|
|
2057
2058
|
return /* @__PURE__ */ jsx14(CommandPrimitive.Empty, _object_spread({
|
|
2058
|
-
ref:
|
|
2059
|
+
ref: ref2,
|
|
2059
2060
|
className: "py-6 text-center text-sm"
|
|
2060
2061
|
}, props));
|
|
2061
2062
|
});
|
|
2062
2063
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
2063
|
-
var CommandGroup = React8.forwardRef(function(_param,
|
|
2064
|
+
var CommandGroup = React8.forwardRef(function(_param, ref2) {
|
|
2064
2065
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2065
2066
|
"className"
|
|
2066
2067
|
]);
|
|
2067
2068
|
return /* @__PURE__ */ jsx14(CommandPrimitive.Group, _object_spread({
|
|
2068
|
-
ref:
|
|
2069
|
+
ref: ref2,
|
|
2069
2070
|
className: cn("overflow-hidden p-2 text-foreground [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className)
|
|
2070
2071
|
}, props));
|
|
2071
2072
|
});
|
|
2072
2073
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
2073
|
-
var CommandSeparator = React8.forwardRef(function(_param,
|
|
2074
|
+
var CommandSeparator = React8.forwardRef(function(_param, ref2) {
|
|
2074
2075
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2075
2076
|
"className"
|
|
2076
2077
|
]);
|
|
2077
2078
|
return /* @__PURE__ */ jsx14(CommandPrimitive.Separator, _object_spread({
|
|
2078
|
-
ref:
|
|
2079
|
+
ref: ref2,
|
|
2079
2080
|
className: cn("-mx-1 h-px bg-border", className)
|
|
2080
2081
|
}, props));
|
|
2081
2082
|
});
|
|
2082
2083
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
2083
|
-
var CommandItem = React8.forwardRef(function(_param,
|
|
2084
|
+
var CommandItem = React8.forwardRef(function(_param, ref2) {
|
|
2084
2085
|
var className = _param.className, props = _object_without_properties(_param, [
|
|
2085
2086
|
"className"
|
|
2086
2087
|
]);
|
|
2087
2088
|
return /* @__PURE__ */ jsx14(CommandPrimitive.Item, _object_spread({
|
|
2088
|
-
ref:
|
|
2089
|
+
ref: ref2,
|
|
2089
2090
|
className: cn("relative flex cursor-default select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className)
|
|
2090
2091
|
}, props));
|
|
2091
2092
|
});
|
|
@@ -3727,11 +3728,11 @@ function roundByDPR(element, value) {
|
|
|
3727
3728
|
return Math.round(value * dpr) / dpr;
|
|
3728
3729
|
}
|
|
3729
3730
|
function useLatestRef(value) {
|
|
3730
|
-
var
|
|
3731
|
+
var ref2 = React9.useRef(value);
|
|
3731
3732
|
index(function() {
|
|
3732
|
-
|
|
3733
|
+
ref2.current = value;
|
|
3733
3734
|
});
|
|
3734
|
-
return
|
|
3735
|
+
return ref2;
|
|
3735
3736
|
}
|
|
3736
3737
|
function useFloating(options) {
|
|
3737
3738
|
if (options === void 0) {
|
|
@@ -4040,7 +4041,7 @@ function useDebounce(value, delay) {
|
|
|
4040
4041
|
]);
|
|
4041
4042
|
return debouncedValue;
|
|
4042
4043
|
}
|
|
4043
|
-
var MultipleSelector = forwardRef6(function(param,
|
|
4044
|
+
var MultipleSelector = forwardRef6(function(param, ref2) {
|
|
4044
4045
|
var value = param.value, onChange = param.onChange, placeholder = param.placeholder, tmp = param.defaultOptions, arrayDefaultOptions = tmp === void 0 ? [] : tmp, arrayOptions = param.options, delay = param.delay, onSearch = param.onSearch, onSearchSync = param.onSearchSync, loadingIndicator = param.loadingIndicator, emptyIndicator = param.emptyIndicator, _param_maxSelected = param.maxSelected, maxSelected = _param_maxSelected === void 0 ? Number.MAX_SAFE_INTEGER : _param_maxSelected, onMaxSelected = param.onMaxSelected, _param_hidePlaceholderWhenSelected = param.hidePlaceholderWhenSelected, hidePlaceholderWhenSelected = _param_hidePlaceholderWhenSelected === void 0 ? true : _param_hidePlaceholderWhenSelected, disabled = param.disabled, groupBy = param.groupBy, className = param.className, badgeClassName = param.badgeClassName, _param_selectFirstItem = param.selectFirstItem, selectFirstItem = _param_selectFirstItem === void 0 ? true : _param_selectFirstItem, createNewOptionLabel = param.createNewOptionLabel, _param_triggerSearchOnFocus = param.triggerSearchOnFocus, triggerSearchOnFocus = _param_triggerSearchOnFocus === void 0 ? true : _param_triggerSearchOnFocus, commandProps = param.commandProps, inputProps = param.inputProps, _param_hideClearAllButton = param.hideClearAllButton, hideClearAllButton = _param_hideClearAllButton === void 0 ? false : _param_hideClearAllButton, _param_closeDropdownOnSelect = param.closeDropdownOnSelect, closeDropdownOnSelect = _param_closeDropdownOnSelect === void 0 ? false : _param_closeDropdownOnSelect, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, emptyIndicatorClassName = param.emptyIndicatorClassName, _param_unremovableOptions = param.unremovableOptions, unremovableOptions = _param_unremovableOptions === void 0 ? [] : _param_unremovableOptions, name = param.name, _param_dropdownContainerClassName = param.dropdownContainerClassName, dropdownContainerClassName = _param_dropdownContainerClassName === void 0 ? "" : _param_dropdownContainerClassName;
|
|
4045
4046
|
var _containerRef_current;
|
|
4046
4047
|
var _React10_useState = _sliced_to_array(React10.useState(false), 2), isLoading = _React10_useState[0], setIsLoading = _React10_useState[1];
|
|
@@ -4066,7 +4067,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
|
|
|
4066
4067
|
var _React10_useState4 = _sliced_to_array(React10.useState(transToGroupOption(arrayDefaultOptions, groupBy)), 2), options = _React10_useState4[0], setOptions = _React10_useState4[1];
|
|
4067
4068
|
var _React10_useState5 = _sliced_to_array(React10.useState(""), 2), inputValue = _React10_useState5[0], setInputValue = _React10_useState5[1];
|
|
4068
4069
|
var debouncedSearchTerm = useDebounce(inputValue, delay || 500);
|
|
4069
|
-
React10.useImperativeHandle(
|
|
4070
|
+
React10.useImperativeHandle(ref2, function() {
|
|
4070
4071
|
return {
|
|
4071
4072
|
selectedValue: _to_consumable_array(selected),
|
|
4072
4073
|
input: inputRef.current,
|
|
@@ -5462,7 +5463,7 @@ function InternationalPhonePicker(param) {
|
|
|
5462
5463
|
]
|
|
5463
5464
|
});
|
|
5464
5465
|
}
|
|
5465
|
-
var PhoneInput = forwardRef7(function(_param,
|
|
5466
|
+
var PhoneInput = forwardRef7(function(_param, ref2) {
|
|
5466
5467
|
var className = _param.className, onKeyDown = _param.onKeyDown, defaultValue = _param.defaultValue, style = _param.style, defaultFocus = _param.defaultFocus, disabled = _param.disabled, props = _object_without_properties(_param, [
|
|
5467
5468
|
"className",
|
|
5468
5469
|
"onKeyDown",
|
|
@@ -5486,10 +5487,10 @@ var PhoneInput = forwardRef7(function(_param, ref) {
|
|
|
5486
5487
|
disabled: disabled,
|
|
5487
5488
|
ref: function(el) {
|
|
5488
5489
|
inputRef.current = el;
|
|
5489
|
-
if (typeof
|
|
5490
|
-
|
|
5491
|
-
} else if (
|
|
5492
|
-
|
|
5490
|
+
if (typeof ref2 === "function") {
|
|
5491
|
+
ref2(el);
|
|
5492
|
+
} else if (ref2) {
|
|
5493
|
+
ref2.current = el;
|
|
5493
5494
|
}
|
|
5494
5495
|
}
|
|
5495
5496
|
}, props));
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -159,6 +159,8 @@ declare const addAuditRecord: (action: string, entity: string, details: TObject<
|
|
|
159
159
|
};
|
|
160
160
|
}>;
|
|
161
161
|
declare const validateUserStatusAndPermissions: (user: NxUser, app: AppName) => TObject<TObject<boolean>>;
|
|
162
|
+
declare const getFileFromStorage: (filePath: string) => Promise<string>;
|
|
163
|
+
declare const uploadFileToStorage: (file: File, filePath: string) => Promise<string>;
|
|
162
164
|
|
|
163
165
|
declare const calculateBearing: (startLat: any, startLng: any, endLat: any, endLng: any) => number;
|
|
164
166
|
declare const renderOnce: () => boolean;
|
|
@@ -258,4 +260,4 @@ declare const initializeUserPermissions: ({ phoneNumber, email, firstTimeArray,
|
|
|
258
260
|
permissions: TObject<TObject<boolean>>;
|
|
259
261
|
}>;
|
|
260
262
|
|
|
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 };
|
|
263
|
+
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, getFileFromStorage, 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, uploadFileToStorage, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -159,6 +159,8 @@ declare const addAuditRecord: (action: string, entity: string, details: TObject<
|
|
|
159
159
|
};
|
|
160
160
|
}>;
|
|
161
161
|
declare const validateUserStatusAndPermissions: (user: NxUser, app: AppName) => TObject<TObject<boolean>>;
|
|
162
|
+
declare const getFileFromStorage: (filePath: string) => Promise<string>;
|
|
163
|
+
declare const uploadFileToStorage: (file: File, filePath: string) => Promise<string>;
|
|
162
164
|
|
|
163
165
|
declare const calculateBearing: (startLat: any, startLng: any, endLat: any, endLng: any) => number;
|
|
164
166
|
declare const renderOnce: () => boolean;
|
|
@@ -258,4 +260,4 @@ declare const initializeUserPermissions: ({ phoneNumber, email, firstTimeArray,
|
|
|
258
260
|
permissions: TObject<TObject<boolean>>;
|
|
259
261
|
}>;
|
|
260
262
|
|
|
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 };
|
|
263
|
+
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, getFileFromStorage, 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, uploadFileToStorage, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
package/dist/helpers/index.js
CHANGED
|
@@ -416,6 +416,9 @@ __export(index_exports, {
|
|
|
416
416
|
getAddressByGeo: function() {
|
|
417
417
|
return getAddressByGeo;
|
|
418
418
|
},
|
|
419
|
+
getFileFromStorage: function() {
|
|
420
|
+
return getFileFromStorage;
|
|
421
|
+
},
|
|
419
422
|
getFixedNumber: function() {
|
|
420
423
|
return getFixedNumber;
|
|
421
424
|
},
|
|
@@ -572,6 +575,9 @@ __export(index_exports, {
|
|
|
572
575
|
timestamp_to_string: function() {
|
|
573
576
|
return timestamp_to_string;
|
|
574
577
|
},
|
|
578
|
+
uploadFileToStorage: function() {
|
|
579
|
+
return uploadFileToStorage;
|
|
580
|
+
},
|
|
575
581
|
useLoginWithGoogle: function() {
|
|
576
582
|
return useLoginWithGoogle;
|
|
577
583
|
},
|
|
@@ -763,6 +769,7 @@ var initializeUserPermissions = /*#__PURE__*/ function() {
|
|
|
763
769
|
};
|
|
764
770
|
}();
|
|
765
771
|
// src/helpers/firebase.ts
|
|
772
|
+
var import_storage2 = require("firebase/storage");
|
|
766
773
|
var import_meta = {};
|
|
767
774
|
var initApp = function() {
|
|
768
775
|
var isNodeEnv2 = typeof process !== "undefined" && process.env;
|
|
@@ -1748,7 +1755,7 @@ var addLoginAudit = /*#__PURE__*/ function() {
|
|
|
1748
1755
|
}();
|
|
1749
1756
|
var addAuditRecord = /*#__PURE__*/ function() {
|
|
1750
1757
|
var _ref = _async_to_generator(function(action, entity, details, user) {
|
|
1751
|
-
var
|
|
1758
|
+
var ref2, data, error;
|
|
1752
1759
|
return _ts_generator(this, function(_state) {
|
|
1753
1760
|
switch(_state.label){
|
|
1754
1761
|
case 0:
|
|
@@ -1758,7 +1765,7 @@ var addAuditRecord = /*#__PURE__*/ function() {
|
|
|
1758
1765
|
,
|
|
1759
1766
|
3
|
|
1760
1767
|
]);
|
|
1761
|
-
|
|
1768
|
+
ref2 = (0, import_firestore.doc)(collections.audit);
|
|
1762
1769
|
data = {
|
|
1763
1770
|
action: action,
|
|
1764
1771
|
entity: entity,
|
|
@@ -1773,7 +1780,7 @@ var addAuditRecord = /*#__PURE__*/ function() {
|
|
|
1773
1780
|
};
|
|
1774
1781
|
return [
|
|
1775
1782
|
4,
|
|
1776
|
-
(0, import_firestore.setDoc)(
|
|
1783
|
+
(0, import_firestore.setDoc)(ref2, _object_spread_props(_object_spread({}, data), {
|
|
1777
1784
|
datetime: fire_base_TIME_TEMP()
|
|
1778
1785
|
}))
|
|
1779
1786
|
];
|
|
@@ -1811,6 +1818,88 @@ var validateUserStatusAndPermissions = function(user, app2) {
|
|
|
1811
1818
|
}
|
|
1812
1819
|
return userPermissions;
|
|
1813
1820
|
};
|
|
1821
|
+
var getFileFromStorage = /*#__PURE__*/ function() {
|
|
1822
|
+
var _ref = _async_to_generator(function(filePath) {
|
|
1823
|
+
var fileRef, downloadURL, error;
|
|
1824
|
+
return _ts_generator(this, function(_state) {
|
|
1825
|
+
switch(_state.label){
|
|
1826
|
+
case 0:
|
|
1827
|
+
_state.trys.push([
|
|
1828
|
+
0,
|
|
1829
|
+
2,
|
|
1830
|
+
,
|
|
1831
|
+
3
|
|
1832
|
+
]);
|
|
1833
|
+
fileRef = (0, import_storage2.ref)(storage, filePath);
|
|
1834
|
+
return [
|
|
1835
|
+
4,
|
|
1836
|
+
(0, import_storage2.getDownloadURL)(fileRef)
|
|
1837
|
+
];
|
|
1838
|
+
case 1:
|
|
1839
|
+
downloadURL = _state.sent();
|
|
1840
|
+
return [
|
|
1841
|
+
2,
|
|
1842
|
+
downloadURL
|
|
1843
|
+
];
|
|
1844
|
+
case 2:
|
|
1845
|
+
error = _state.sent();
|
|
1846
|
+
console.error("Error getting file from storage: ".concat(filePath), error);
|
|
1847
|
+
throw new Error("Failed to get file from storage: ".concat(filePath));
|
|
1848
|
+
case 3:
|
|
1849
|
+
return [
|
|
1850
|
+
2
|
|
1851
|
+
];
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
});
|
|
1855
|
+
return function getFileFromStorage(filePath) {
|
|
1856
|
+
return _ref.apply(this, arguments);
|
|
1857
|
+
};
|
|
1858
|
+
}();
|
|
1859
|
+
var uploadFileToStorage = /*#__PURE__*/ function() {
|
|
1860
|
+
var _ref = _async_to_generator(function(file, filePath) {
|
|
1861
|
+
var fileRef, uploadResult, downloadURL, error;
|
|
1862
|
+
return _ts_generator(this, function(_state) {
|
|
1863
|
+
switch(_state.label){
|
|
1864
|
+
case 0:
|
|
1865
|
+
_state.trys.push([
|
|
1866
|
+
0,
|
|
1867
|
+
3,
|
|
1868
|
+
,
|
|
1869
|
+
4
|
|
1870
|
+
]);
|
|
1871
|
+
fileRef = (0, import_storage2.ref)(storage, filePath);
|
|
1872
|
+
return [
|
|
1873
|
+
4,
|
|
1874
|
+
(0, import_storage2.uploadBytes)(fileRef, file)
|
|
1875
|
+
];
|
|
1876
|
+
case 1:
|
|
1877
|
+
uploadResult = _state.sent();
|
|
1878
|
+
return [
|
|
1879
|
+
4,
|
|
1880
|
+
(0, import_storage2.getDownloadURL)(uploadResult.ref)
|
|
1881
|
+
];
|
|
1882
|
+
case 2:
|
|
1883
|
+
downloadURL = _state.sent();
|
|
1884
|
+
return [
|
|
1885
|
+
2,
|
|
1886
|
+
downloadURL
|
|
1887
|
+
];
|
|
1888
|
+
case 3:
|
|
1889
|
+
error = _state.sent();
|
|
1890
|
+
console.error("Error uploading file to storage: ".concat(filePath), error);
|
|
1891
|
+
throw new Error("Failed to upload file to storage: ".concat(filePath));
|
|
1892
|
+
case 4:
|
|
1893
|
+
return [
|
|
1894
|
+
2
|
|
1895
|
+
];
|
|
1896
|
+
}
|
|
1897
|
+
});
|
|
1898
|
+
});
|
|
1899
|
+
return function uploadFileToStorage(file, filePath) {
|
|
1900
|
+
return _ref.apply(this, arguments);
|
|
1901
|
+
};
|
|
1902
|
+
}();
|
|
1814
1903
|
// src/helpers/global.ts
|
|
1815
1904
|
var import_akeyless_types_commons = require("akeyless-types-commons");
|
|
1816
1905
|
var import_axios = __toESM(require("axios"));
|
|
@@ -2300,6 +2389,7 @@ var nxApiCall = /*#__PURE__*/ function() {
|
|
|
2300
2389
|
fire_base_TIME_TEMP: fire_base_TIME_TEMP,
|
|
2301
2390
|
formatCarNumber: formatCarNumber,
|
|
2302
2391
|
getAddressByGeo: getAddressByGeo,
|
|
2392
|
+
getFileFromStorage: getFileFromStorage,
|
|
2303
2393
|
getFixedNumber: getFixedNumber,
|
|
2304
2394
|
getFormCheckboxValue: getFormCheckboxValue,
|
|
2305
2395
|
getFormElementValue: getFormElementValue,
|
|
@@ -2352,6 +2442,7 @@ var nxApiCall = /*#__PURE__*/ function() {
|
|
|
2352
2442
|
textRegex: textRegex,
|
|
2353
2443
|
timestamp_to_millis: timestamp_to_millis,
|
|
2354
2444
|
timestamp_to_string: timestamp_to_string,
|
|
2445
|
+
uploadFileToStorage: uploadFileToStorage,
|
|
2355
2446
|
useLoginWithGoogle: useLoginWithGoogle,
|
|
2356
2447
|
useStoreValues: useStoreValues,
|
|
2357
2448
|
useValidation: useValidation,
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -410,6 +410,7 @@ var initializeUserPermissions = /*#__PURE__*/ function() {
|
|
|
410
410
|
};
|
|
411
411
|
}();
|
|
412
412
|
// src/helpers/firebase.ts
|
|
413
|
+
import { ref, getDownloadURL, uploadBytes } from "firebase/storage";
|
|
413
414
|
var initApp = function() {
|
|
414
415
|
var isNodeEnv2 = typeof process !== "undefined" && process.env;
|
|
415
416
|
var firebaseConfig = {
|
|
@@ -1394,7 +1395,7 @@ var addLoginAudit = /*#__PURE__*/ function() {
|
|
|
1394
1395
|
}();
|
|
1395
1396
|
var addAuditRecord = /*#__PURE__*/ function() {
|
|
1396
1397
|
var _ref = _async_to_generator(function(action, entity, details, user) {
|
|
1397
|
-
var
|
|
1398
|
+
var ref2, data, error;
|
|
1398
1399
|
return _ts_generator(this, function(_state) {
|
|
1399
1400
|
switch(_state.label){
|
|
1400
1401
|
case 0:
|
|
@@ -1404,7 +1405,7 @@ var addAuditRecord = /*#__PURE__*/ function() {
|
|
|
1404
1405
|
,
|
|
1405
1406
|
3
|
|
1406
1407
|
]);
|
|
1407
|
-
|
|
1408
|
+
ref2 = doc(collections.audit);
|
|
1408
1409
|
data = {
|
|
1409
1410
|
action: action,
|
|
1410
1411
|
entity: entity,
|
|
@@ -1419,7 +1420,7 @@ var addAuditRecord = /*#__PURE__*/ function() {
|
|
|
1419
1420
|
};
|
|
1420
1421
|
return [
|
|
1421
1422
|
4,
|
|
1422
|
-
setDoc(
|
|
1423
|
+
setDoc(ref2, _object_spread_props(_object_spread({}, data), {
|
|
1423
1424
|
datetime: fire_base_TIME_TEMP()
|
|
1424
1425
|
}))
|
|
1425
1426
|
];
|
|
@@ -1457,6 +1458,88 @@ var validateUserStatusAndPermissions = function(user, app2) {
|
|
|
1457
1458
|
}
|
|
1458
1459
|
return userPermissions;
|
|
1459
1460
|
};
|
|
1461
|
+
var getFileFromStorage = /*#__PURE__*/ function() {
|
|
1462
|
+
var _ref = _async_to_generator(function(filePath) {
|
|
1463
|
+
var fileRef, downloadURL, error;
|
|
1464
|
+
return _ts_generator(this, function(_state) {
|
|
1465
|
+
switch(_state.label){
|
|
1466
|
+
case 0:
|
|
1467
|
+
_state.trys.push([
|
|
1468
|
+
0,
|
|
1469
|
+
2,
|
|
1470
|
+
,
|
|
1471
|
+
3
|
|
1472
|
+
]);
|
|
1473
|
+
fileRef = ref(storage, filePath);
|
|
1474
|
+
return [
|
|
1475
|
+
4,
|
|
1476
|
+
getDownloadURL(fileRef)
|
|
1477
|
+
];
|
|
1478
|
+
case 1:
|
|
1479
|
+
downloadURL = _state.sent();
|
|
1480
|
+
return [
|
|
1481
|
+
2,
|
|
1482
|
+
downloadURL
|
|
1483
|
+
];
|
|
1484
|
+
case 2:
|
|
1485
|
+
error = _state.sent();
|
|
1486
|
+
console.error("Error getting file from storage: ".concat(filePath), error);
|
|
1487
|
+
throw new Error("Failed to get file from storage: ".concat(filePath));
|
|
1488
|
+
case 3:
|
|
1489
|
+
return [
|
|
1490
|
+
2
|
|
1491
|
+
];
|
|
1492
|
+
}
|
|
1493
|
+
});
|
|
1494
|
+
});
|
|
1495
|
+
return function getFileFromStorage(filePath) {
|
|
1496
|
+
return _ref.apply(this, arguments);
|
|
1497
|
+
};
|
|
1498
|
+
}();
|
|
1499
|
+
var uploadFileToStorage = /*#__PURE__*/ function() {
|
|
1500
|
+
var _ref = _async_to_generator(function(file, filePath) {
|
|
1501
|
+
var fileRef, uploadResult, downloadURL, error;
|
|
1502
|
+
return _ts_generator(this, function(_state) {
|
|
1503
|
+
switch(_state.label){
|
|
1504
|
+
case 0:
|
|
1505
|
+
_state.trys.push([
|
|
1506
|
+
0,
|
|
1507
|
+
3,
|
|
1508
|
+
,
|
|
1509
|
+
4
|
|
1510
|
+
]);
|
|
1511
|
+
fileRef = ref(storage, filePath);
|
|
1512
|
+
return [
|
|
1513
|
+
4,
|
|
1514
|
+
uploadBytes(fileRef, file)
|
|
1515
|
+
];
|
|
1516
|
+
case 1:
|
|
1517
|
+
uploadResult = _state.sent();
|
|
1518
|
+
return [
|
|
1519
|
+
4,
|
|
1520
|
+
getDownloadURL(uploadResult.ref)
|
|
1521
|
+
];
|
|
1522
|
+
case 2:
|
|
1523
|
+
downloadURL = _state.sent();
|
|
1524
|
+
return [
|
|
1525
|
+
2,
|
|
1526
|
+
downloadURL
|
|
1527
|
+
];
|
|
1528
|
+
case 3:
|
|
1529
|
+
error = _state.sent();
|
|
1530
|
+
console.error("Error uploading file to storage: ".concat(filePath), error);
|
|
1531
|
+
throw new Error("Failed to upload file to storage: ".concat(filePath));
|
|
1532
|
+
case 4:
|
|
1533
|
+
return [
|
|
1534
|
+
2
|
|
1535
|
+
];
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
});
|
|
1539
|
+
return function uploadFileToStorage(file, filePath) {
|
|
1540
|
+
return _ref.apply(this, arguments);
|
|
1541
|
+
};
|
|
1542
|
+
}();
|
|
1460
1543
|
// src/helpers/global.ts
|
|
1461
1544
|
import { CountryOptions, LanguageOptions } from "akeyless-types-commons";
|
|
1462
1545
|
import axios from "axios";
|
|
@@ -1906,5 +1989,5 @@ var nxApiCall = /*#__PURE__*/ function() {
|
|
|
1906
1989
|
return _ref.apply(this, arguments);
|
|
1907
1990
|
};
|
|
1908
1991
|
}();
|
|
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 };
|
|
1992
|
+
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, getFileFromStorage, 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, uploadFileToStorage, useLoginWithGoogle, useStoreValues, useValidation, userNameFormat, validateAndCast, validateUserStatusAndPermissions };
|
|
1910
1993
|
//# sourceMappingURL=index.mjs.map
|
package/dist/hooks/index.js
CHANGED
|
@@ -293,6 +293,7 @@ var checkUserPermissions = function(userPermissions, entity, permissions, mode2)
|
|
|
293
293
|
};
|
|
294
294
|
checkUserPermissions({}, "dashboard", []);
|
|
295
295
|
// src/helpers/firebase.ts
|
|
296
|
+
var import_storage2 = require("firebase/storage");
|
|
296
297
|
var import_meta = {};
|
|
297
298
|
var initApp = function() {
|
|
298
299
|
var isNodeEnv2 = typeof process !== "undefined" && process.env;
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -207,6 +207,7 @@ var checkUserPermissions = function(userPermissions, entity, permissions, mode2)
|
|
|
207
207
|
};
|
|
208
208
|
checkUserPermissions({}, "dashboard", []);
|
|
209
209
|
// src/helpers/firebase.ts
|
|
210
|
+
import { ref, getDownloadURL, uploadBytes } from "firebase/storage";
|
|
210
211
|
var initApp = function() {
|
|
211
212
|
var isNodeEnv2 = typeof process !== "undefined" && process.env;
|
|
212
213
|
var firebaseConfig = {
|