akeyless-client-commons 1.0.127 → 1.0.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.d.mts +9 -6
- package/dist/components/index.d.ts +9 -6
- package/dist/components/index.js +109 -110
- package/dist/components/index.mjs +108 -109
- package/dist/components/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -10,12 +10,15 @@ import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
|
10
10
|
|
|
11
11
|
interface CheckBoxProps {
|
|
12
12
|
id: string;
|
|
13
|
-
checked: boolean;
|
|
14
|
-
setChecked: (v: boolean) => void;
|
|
15
|
-
style?: React__default.CSSProperties;
|
|
16
13
|
rotate: boolean;
|
|
14
|
+
circleClassName?: string;
|
|
15
|
+
containerClassName?: string;
|
|
16
|
+
elementClassName?: string;
|
|
17
|
+
setChecked: (v: boolean) => void;
|
|
18
|
+
checked: boolean;
|
|
19
|
+
className?: string;
|
|
17
20
|
}
|
|
18
|
-
declare const Checkbox: ({ id, checked, setChecked, rotate,
|
|
21
|
+
declare const Checkbox: ({ id, checked, setChecked, rotate, className, circleClassName, containerClassName, elementClassName, }: CheckBoxProps) => react_jsx_runtime.JSX.Element;
|
|
19
22
|
|
|
20
23
|
interface ErrorBoundaryProps {
|
|
21
24
|
fallback?: React__default.ReactNode;
|
|
@@ -30,7 +33,7 @@ declare class ErrorBoundary extends React__default.Component<ErrorBoundaryProps,
|
|
|
30
33
|
constructor(props: ErrorBoundaryProps);
|
|
31
34
|
static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
|
|
32
35
|
componentDidCatch(error: Error, errorInfo: React__default.ErrorInfo): void;
|
|
33
|
-
render(): string | number | boolean | react_jsx_runtime.JSX.Element
|
|
36
|
+
render(): string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
interface LoaderProps {
|
|
@@ -511,7 +514,7 @@ interface BooleanUIProps {
|
|
|
511
514
|
trueUi?: ReactNode;
|
|
512
515
|
falseUi?: ReactNode;
|
|
513
516
|
}
|
|
514
|
-
declare const BooleanUi: ({ value, size, className, falseUi, trueUi }: BooleanUIProps) => string | number | boolean | react_jsx_runtime.JSX.Element
|
|
517
|
+
declare const BooleanUi: ({ value, size, className, falseUi, trueUi }: BooleanUIProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element;
|
|
515
518
|
interface GeoUiProps {
|
|
516
519
|
value: Partial<Geo> & {
|
|
517
520
|
latitude?: number;
|
|
@@ -10,12 +10,15 @@ import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
|
10
10
|
|
|
11
11
|
interface CheckBoxProps {
|
|
12
12
|
id: string;
|
|
13
|
-
checked: boolean;
|
|
14
|
-
setChecked: (v: boolean) => void;
|
|
15
|
-
style?: React__default.CSSProperties;
|
|
16
13
|
rotate: boolean;
|
|
14
|
+
circleClassName?: string;
|
|
15
|
+
containerClassName?: string;
|
|
16
|
+
elementClassName?: string;
|
|
17
|
+
setChecked: (v: boolean) => void;
|
|
18
|
+
checked: boolean;
|
|
19
|
+
className?: string;
|
|
17
20
|
}
|
|
18
|
-
declare const Checkbox: ({ id, checked, setChecked, rotate,
|
|
21
|
+
declare const Checkbox: ({ id, checked, setChecked, rotate, className, circleClassName, containerClassName, elementClassName, }: CheckBoxProps) => react_jsx_runtime.JSX.Element;
|
|
19
22
|
|
|
20
23
|
interface ErrorBoundaryProps {
|
|
21
24
|
fallback?: React__default.ReactNode;
|
|
@@ -30,7 +33,7 @@ declare class ErrorBoundary extends React__default.Component<ErrorBoundaryProps,
|
|
|
30
33
|
constructor(props: ErrorBoundaryProps);
|
|
31
34
|
static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
|
|
32
35
|
componentDidCatch(error: Error, errorInfo: React__default.ErrorInfo): void;
|
|
33
|
-
render(): string | number | boolean | react_jsx_runtime.JSX.Element
|
|
36
|
+
render(): string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
interface LoaderProps {
|
|
@@ -511,7 +514,7 @@ interface BooleanUIProps {
|
|
|
511
514
|
trueUi?: ReactNode;
|
|
512
515
|
falseUi?: ReactNode;
|
|
513
516
|
}
|
|
514
|
-
declare const BooleanUi: ({ value, size, className, falseUi, trueUi }: BooleanUIProps) => string | number | boolean | react_jsx_runtime.JSX.Element
|
|
517
|
+
declare const BooleanUi: ({ value, size, className, falseUi, trueUi }: BooleanUIProps) => string | number | boolean | Iterable<React__default.ReactNode> | react_jsx_runtime.JSX.Element;
|
|
515
518
|
interface GeoUiProps {
|
|
516
519
|
value: Partial<Geo> & {
|
|
517
520
|
latitude?: number;
|
package/dist/components/index.js
CHANGED
|
@@ -562,114 +562,6 @@ __export(index_exports, {
|
|
|
562
562
|
}
|
|
563
563
|
});
|
|
564
564
|
module.exports = __toCommonJS(index_exports);
|
|
565
|
-
// src/components/utils/Checkboxes.tsx
|
|
566
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
567
|
-
var Checkbox = function(param) {
|
|
568
|
-
var id = param.id, checked = param.checked, setChecked = param.setChecked, _param_rotate = param.rotate, rotate = _param_rotate === void 0 ? true : _param_rotate, style = param.style;
|
|
569
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
570
|
-
className: "checkbox-wrapper-51",
|
|
571
|
-
children: [
|
|
572
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
573
|
-
type: "checkbox",
|
|
574
|
-
id: id,
|
|
575
|
-
className: "hidden",
|
|
576
|
-
checked: checked,
|
|
577
|
-
onChange: function() {
|
|
578
|
-
return setChecked(!checked);
|
|
579
|
-
}
|
|
580
|
-
}),
|
|
581
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
|
|
582
|
-
htmlFor: id,
|
|
583
|
-
className: "relative block w-[42px] h-[24px] cursor-pointer transform-gpu",
|
|
584
|
-
children: [
|
|
585
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
586
|
-
className: "relative top-[1px] left-[1px] w-[40px] h-[22px] rounded-[12px] transition-colors duration-200 ease-in-out ".concat(checked ? "bg-[#52d66b]" : "bg-[#c8ccd4]")
|
|
587
|
-
}),
|
|
588
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
589
|
-
className: "absolute ".concat(rotate ? "left-0" : "right-0", " top-0 w-[24px] h-[24px] bg-white rounded-full shadow-md transition-transform duration-200 ease-in-out ").concat(checked ? rotate ? "translate-x-[18px]" : "-translate-x-[18px]" : ""),
|
|
590
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
591
|
-
width: "10px",
|
|
592
|
-
height: "10px",
|
|
593
|
-
viewBox: "0 0 10 10",
|
|
594
|
-
className: "m-[7px] fill-none",
|
|
595
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
596
|
-
d: "M5,1 L5,1 C2.790861,1 1,2.790861 1,5 L1,5 C1,7.209139 2.790861,9 5,9 L5,9 C7.209139,9 9,7.209139 9,5 L9,5 C9,2.790861 7.209139,1 5,1 L5,9 L5,1 Z",
|
|
597
|
-
strokeWidth: "2",
|
|
598
|
-
strokeLinecap: "round",
|
|
599
|
-
strokeLinejoin: "round",
|
|
600
|
-
className: "transition-all duration-500 linear",
|
|
601
|
-
stroke: checked ? "#52d66b" : "#c8ccd4",
|
|
602
|
-
style: {
|
|
603
|
-
strokeDasharray: checked ? "25" : "24",
|
|
604
|
-
strokeDashoffset: checked ? "25" : "0"
|
|
605
|
-
}
|
|
606
|
-
})
|
|
607
|
-
})
|
|
608
|
-
})
|
|
609
|
-
]
|
|
610
|
-
})
|
|
611
|
-
]
|
|
612
|
-
});
|
|
613
|
-
};
|
|
614
|
-
// src/components/utils/ErrorBoundary.tsx
|
|
615
|
-
var import_react = __toESM(require("react"));
|
|
616
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
617
|
-
var ErrorBoundary = /*#__PURE__*/ function(_import_react_default_Component) {
|
|
618
|
-
"use strict";
|
|
619
|
-
_inherits(ErrorBoundary, _import_react_default_Component);
|
|
620
|
-
function ErrorBoundary(props) {
|
|
621
|
-
_class_call_check(this, ErrorBoundary);
|
|
622
|
-
var _this;
|
|
623
|
-
_this = _call_super(this, ErrorBoundary, [
|
|
624
|
-
props
|
|
625
|
-
]);
|
|
626
|
-
_this.state = {
|
|
627
|
-
hasError: false,
|
|
628
|
-
error: null,
|
|
629
|
-
errorInfo: null
|
|
630
|
-
};
|
|
631
|
-
return _this;
|
|
632
|
-
}
|
|
633
|
-
_create_class(ErrorBoundary, [
|
|
634
|
-
{
|
|
635
|
-
key: "componentDidCatch",
|
|
636
|
-
value: function componentDidCatch(error, errorInfo) {
|
|
637
|
-
console.error("Error:", error);
|
|
638
|
-
console.log("Error Info:", errorInfo);
|
|
639
|
-
this.setState({
|
|
640
|
-
errorInfo: errorInfo
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
key: "render",
|
|
646
|
-
value: function render() {
|
|
647
|
-
if (this.state.hasError) {
|
|
648
|
-
return this.props.fallback || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
649
|
-
className: "full center",
|
|
650
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h1", {
|
|
651
|
-
children: "\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9...."
|
|
652
|
-
})
|
|
653
|
-
});
|
|
654
|
-
}
|
|
655
|
-
return this.props.children;
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
], [
|
|
659
|
-
{
|
|
660
|
-
key: "getDerivedStateFromError",
|
|
661
|
-
value: function getDerivedStateFromError(error) {
|
|
662
|
-
return {
|
|
663
|
-
hasError: true,
|
|
664
|
-
error: error
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
]);
|
|
669
|
-
return ErrorBoundary;
|
|
670
|
-
}(import_react.default.Component);
|
|
671
|
-
// src/components/utils/loaders.tsx
|
|
672
|
-
var import_react_spinners = require("react-spinners");
|
|
673
565
|
// src/helpers/firebase.ts
|
|
674
566
|
var import_moment = __toESM(require("moment"));
|
|
675
567
|
var import_app = require("firebase/app");
|
|
@@ -677,7 +569,7 @@ var import_storage = require("firebase/storage");
|
|
|
677
569
|
var import_auth = require("firebase/auth");
|
|
678
570
|
var import_app_check = require("firebase/app-check");
|
|
679
571
|
var import_firestore = require("firebase/firestore");
|
|
680
|
-
var
|
|
572
|
+
var import_react = require("react");
|
|
681
573
|
// src/helpers/phoneNumber.ts
|
|
682
574
|
var import_libphonenumber_js = require("libphonenumber-js");
|
|
683
575
|
var local_israel_phone_format = function(international_number) {
|
|
@@ -766,7 +658,7 @@ var initApp = function() {
|
|
|
766
658
|
};
|
|
767
659
|
var _initApp = initApp(), db = _initApp.db, auth = _initApp.auth, storage = _initApp.storage, app = _initApp.app, appCheck = _initApp.appCheck, googleLoginProvider = _initApp.googleLoginProvider;
|
|
768
660
|
var useLoginWithGoogle = function() {
|
|
769
|
-
var signInWithGoogle = (0,
|
|
661
|
+
var signInWithGoogle = (0, import_react.useCallback)(/*#__PURE__*/ _async_to_generator(function() {
|
|
770
662
|
var result, user;
|
|
771
663
|
return _ts_generator(this, function(_state) {
|
|
772
664
|
switch(_state.label){
|
|
@@ -1224,7 +1116,114 @@ var baseDomain = mode === "qa" ? "https://nx-api.xyz/api" : "https://nx-api.info
|
|
|
1224
1116
|
var devicesDomain = isLocal ? "http://localhost:9001/api/devices" : baseDomain + "/devices";
|
|
1225
1117
|
var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
|
|
1226
1118
|
var callCenterDomain = isLocal ? "http://localhost:9003/api/call-center" : baseDomain + "/call-center";
|
|
1119
|
+
// src/components/utils/Checkboxes.tsx
|
|
1120
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
1121
|
+
var Checkbox = function(param) {
|
|
1122
|
+
var id = param.id, checked = param.checked, setChecked = param.setChecked, _param_rotate = param.rotate, rotate = _param_rotate === void 0 ? true : _param_rotate, className = param.className, circleClassName = param.circleClassName, containerClassName = param.containerClassName, elementClassName = param.elementClassName;
|
|
1123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
1124
|
+
className: containerClassName,
|
|
1125
|
+
children: [
|
|
1126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", {
|
|
1127
|
+
type: "checkbox",
|
|
1128
|
+
id: id,
|
|
1129
|
+
className: "hidden",
|
|
1130
|
+
checked: checked,
|
|
1131
|
+
onChange: function() {
|
|
1132
|
+
return setChecked(!checked);
|
|
1133
|
+
}
|
|
1134
|
+
}),
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", {
|
|
1136
|
+
htmlFor: id,
|
|
1137
|
+
className: cn("relative block w-[42px] h-[24px] cursor-pointer transform-gpu", className),
|
|
1138
|
+
children: [
|
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
1140
|
+
className: cn("relative top-[1px] left-[1px] w-[40px] h-[22px] rounded-[12px] transition-colors duration-200 ease-in-out ".concat(checked ? "bg-[#52d66b]" : "bg-[#c8ccd4]"), elementClassName)
|
|
1141
|
+
}),
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
1143
|
+
className: cn("absolute ".concat(rotate ? "left-0" : "right-0", " top-0 w-[24px] h-[24px] bg-white rounded-full shadow-md transition-transform duration-200 ease-in-out ").concat(checked ? rotate ? "translate-x-[18px]" : "-translate-x-[18px]" : ""), circleClassName),
|
|
1144
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
|
1145
|
+
width: "10px",
|
|
1146
|
+
height: "10px",
|
|
1147
|
+
viewBox: "0 0 10 10",
|
|
1148
|
+
className: "m-[7px] fill-none",
|
|
1149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
|
1150
|
+
d: "M5,1 L5,1 C2.790861,1 1,2.790861 1,5 L1,5 C1,7.209139 2.790861,9 5,9 L5,9 C7.209139,9 9,7.209139 9,5 L9,5 C9,2.790861 7.209139,1 5,1 L5,9 L5,1 Z",
|
|
1151
|
+
strokeWidth: "2",
|
|
1152
|
+
strokeLinecap: "round",
|
|
1153
|
+
strokeLinejoin: "round",
|
|
1154
|
+
className: "transition-all duration-500 linear",
|
|
1155
|
+
stroke: checked ? "#52d66b" : "#c8ccd4",
|
|
1156
|
+
style: {
|
|
1157
|
+
strokeDasharray: checked ? "25" : "24",
|
|
1158
|
+
strokeDashoffset: checked ? "25" : "0"
|
|
1159
|
+
}
|
|
1160
|
+
})
|
|
1161
|
+
})
|
|
1162
|
+
})
|
|
1163
|
+
]
|
|
1164
|
+
})
|
|
1165
|
+
]
|
|
1166
|
+
});
|
|
1167
|
+
};
|
|
1168
|
+
// src/components/utils/ErrorBoundary.tsx
|
|
1169
|
+
var import_react2 = __toESM(require("react"));
|
|
1170
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1171
|
+
var ErrorBoundary = /*#__PURE__*/ function(_import_react2_default_Component) {
|
|
1172
|
+
"use strict";
|
|
1173
|
+
_inherits(ErrorBoundary, _import_react2_default_Component);
|
|
1174
|
+
function ErrorBoundary(props) {
|
|
1175
|
+
_class_call_check(this, ErrorBoundary);
|
|
1176
|
+
var _this;
|
|
1177
|
+
_this = _call_super(this, ErrorBoundary, [
|
|
1178
|
+
props
|
|
1179
|
+
]);
|
|
1180
|
+
_this.state = {
|
|
1181
|
+
hasError: false,
|
|
1182
|
+
error: null,
|
|
1183
|
+
errorInfo: null
|
|
1184
|
+
};
|
|
1185
|
+
return _this;
|
|
1186
|
+
}
|
|
1187
|
+
_create_class(ErrorBoundary, [
|
|
1188
|
+
{
|
|
1189
|
+
key: "componentDidCatch",
|
|
1190
|
+
value: function componentDidCatch(error, errorInfo) {
|
|
1191
|
+
console.error("Error:", error);
|
|
1192
|
+
console.log("Error Info:", errorInfo);
|
|
1193
|
+
this.setState({
|
|
1194
|
+
errorInfo: errorInfo
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
key: "render",
|
|
1200
|
+
value: function render() {
|
|
1201
|
+
if (this.state.hasError) {
|
|
1202
|
+
return this.props.fallback || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", {
|
|
1203
|
+
className: "full center",
|
|
1204
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h1", {
|
|
1205
|
+
children: "\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9...."
|
|
1206
|
+
})
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
return this.props.children;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
], [
|
|
1213
|
+
{
|
|
1214
|
+
key: "getDerivedStateFromError",
|
|
1215
|
+
value: function getDerivedStateFromError(error) {
|
|
1216
|
+
return {
|
|
1217
|
+
hasError: true,
|
|
1218
|
+
error: error
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
]);
|
|
1223
|
+
return ErrorBoundary;
|
|
1224
|
+
}(import_react2.default.Component);
|
|
1227
1225
|
// src/components/utils/loaders.tsx
|
|
1226
|
+
var import_react_spinners = require("react-spinners");
|
|
1228
1227
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
1229
1228
|
var Loader = function(param) {
|
|
1230
1229
|
var color = param.color, size3 = param.size, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/helpers/firebase.ts
|
|
2
2
|
function _array_like_to_array(arr, len) {
|
|
3
3
|
if (len == null || len > arr.length) len = arr.length;
|
|
4
4
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -358,114 +358,6 @@ function _ts_generator(thisArg, body) {
|
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
362
|
-
var Checkbox = function(param) {
|
|
363
|
-
var id = param.id, checked = param.checked, setChecked = param.setChecked, _param_rotate = param.rotate, rotate = _param_rotate === void 0 ? true : _param_rotate, style = param.style;
|
|
364
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
365
|
-
className: "checkbox-wrapper-51",
|
|
366
|
-
children: [
|
|
367
|
-
/* @__PURE__ */ jsx("input", {
|
|
368
|
-
type: "checkbox",
|
|
369
|
-
id: id,
|
|
370
|
-
className: "hidden",
|
|
371
|
-
checked: checked,
|
|
372
|
-
onChange: function() {
|
|
373
|
-
return setChecked(!checked);
|
|
374
|
-
}
|
|
375
|
-
}),
|
|
376
|
-
/* @__PURE__ */ jsxs("label", {
|
|
377
|
-
htmlFor: id,
|
|
378
|
-
className: "relative block w-[42px] h-[24px] cursor-pointer transform-gpu",
|
|
379
|
-
children: [
|
|
380
|
-
/* @__PURE__ */ jsx("div", {
|
|
381
|
-
className: "relative top-[1px] left-[1px] w-[40px] h-[22px] rounded-[12px] transition-colors duration-200 ease-in-out ".concat(checked ? "bg-[#52d66b]" : "bg-[#c8ccd4]")
|
|
382
|
-
}),
|
|
383
|
-
/* @__PURE__ */ jsx("span", {
|
|
384
|
-
className: "absolute ".concat(rotate ? "left-0" : "right-0", " top-0 w-[24px] h-[24px] bg-white rounded-full shadow-md transition-transform duration-200 ease-in-out ").concat(checked ? rotate ? "translate-x-[18px]" : "-translate-x-[18px]" : ""),
|
|
385
|
-
children: /* @__PURE__ */ jsx("svg", {
|
|
386
|
-
width: "10px",
|
|
387
|
-
height: "10px",
|
|
388
|
-
viewBox: "0 0 10 10",
|
|
389
|
-
className: "m-[7px] fill-none",
|
|
390
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
391
|
-
d: "M5,1 L5,1 C2.790861,1 1,2.790861 1,5 L1,5 C1,7.209139 2.790861,9 5,9 L5,9 C7.209139,9 9,7.209139 9,5 L9,5 C9,2.790861 7.209139,1 5,1 L5,9 L5,1 Z",
|
|
392
|
-
strokeWidth: "2",
|
|
393
|
-
strokeLinecap: "round",
|
|
394
|
-
strokeLinejoin: "round",
|
|
395
|
-
className: "transition-all duration-500 linear",
|
|
396
|
-
stroke: checked ? "#52d66b" : "#c8ccd4",
|
|
397
|
-
style: {
|
|
398
|
-
strokeDasharray: checked ? "25" : "24",
|
|
399
|
-
strokeDashoffset: checked ? "25" : "0"
|
|
400
|
-
}
|
|
401
|
-
})
|
|
402
|
-
})
|
|
403
|
-
})
|
|
404
|
-
]
|
|
405
|
-
})
|
|
406
|
-
]
|
|
407
|
-
});
|
|
408
|
-
};
|
|
409
|
-
// src/components/utils/ErrorBoundary.tsx
|
|
410
|
-
import React from "react";
|
|
411
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
412
|
-
var ErrorBoundary = /*#__PURE__*/ function(_React_Component) {
|
|
413
|
-
"use strict";
|
|
414
|
-
_inherits(ErrorBoundary, _React_Component);
|
|
415
|
-
function ErrorBoundary(props) {
|
|
416
|
-
_class_call_check(this, ErrorBoundary);
|
|
417
|
-
var _this;
|
|
418
|
-
_this = _call_super(this, ErrorBoundary, [
|
|
419
|
-
props
|
|
420
|
-
]);
|
|
421
|
-
_this.state = {
|
|
422
|
-
hasError: false,
|
|
423
|
-
error: null,
|
|
424
|
-
errorInfo: null
|
|
425
|
-
};
|
|
426
|
-
return _this;
|
|
427
|
-
}
|
|
428
|
-
_create_class(ErrorBoundary, [
|
|
429
|
-
{
|
|
430
|
-
key: "componentDidCatch",
|
|
431
|
-
value: function componentDidCatch(error, errorInfo) {
|
|
432
|
-
console.error("Error:", error);
|
|
433
|
-
console.log("Error Info:", errorInfo);
|
|
434
|
-
this.setState({
|
|
435
|
-
errorInfo: errorInfo
|
|
436
|
-
});
|
|
437
|
-
}
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
key: "render",
|
|
441
|
-
value: function render() {
|
|
442
|
-
if (this.state.hasError) {
|
|
443
|
-
return this.props.fallback || /* @__PURE__ */ jsx2("div", {
|
|
444
|
-
className: "full center",
|
|
445
|
-
children: /* @__PURE__ */ jsx2("h1", {
|
|
446
|
-
children: "\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9...."
|
|
447
|
-
})
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
return this.props.children;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
], [
|
|
454
|
-
{
|
|
455
|
-
key: "getDerivedStateFromError",
|
|
456
|
-
value: function getDerivedStateFromError(error) {
|
|
457
|
-
return {
|
|
458
|
-
hasError: true,
|
|
459
|
-
error: error
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
]);
|
|
464
|
-
return ErrorBoundary;
|
|
465
|
-
}(React.Component);
|
|
466
|
-
// src/components/utils/loaders.tsx
|
|
467
|
-
import { ClipLoader } from "react-spinners";
|
|
468
|
-
// src/helpers/firebase.ts
|
|
469
361
|
import moment from "moment";
|
|
470
362
|
import { initializeApp } from "firebase/app";
|
|
471
363
|
import { getStorage } from "firebase/storage";
|
|
@@ -1017,7 +909,114 @@ var baseDomain = mode === "qa" ? "https://nx-api.xyz/api" : "https://nx-api.info
|
|
|
1017
909
|
var devicesDomain = isLocal ? "http://localhost:9001/api/devices" : baseDomain + "/devices";
|
|
1018
910
|
var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
|
|
1019
911
|
var callCenterDomain = isLocal ? "http://localhost:9003/api/call-center" : baseDomain + "/call-center";
|
|
912
|
+
// src/components/utils/Checkboxes.tsx
|
|
913
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
914
|
+
var Checkbox = function(param) {
|
|
915
|
+
var id = param.id, checked = param.checked, setChecked = param.setChecked, _param_rotate = param.rotate, rotate = _param_rotate === void 0 ? true : _param_rotate, className = param.className, circleClassName = param.circleClassName, containerClassName = param.containerClassName, elementClassName = param.elementClassName;
|
|
916
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
917
|
+
className: containerClassName,
|
|
918
|
+
children: [
|
|
919
|
+
/* @__PURE__ */ jsx("input", {
|
|
920
|
+
type: "checkbox",
|
|
921
|
+
id: id,
|
|
922
|
+
className: "hidden",
|
|
923
|
+
checked: checked,
|
|
924
|
+
onChange: function() {
|
|
925
|
+
return setChecked(!checked);
|
|
926
|
+
}
|
|
927
|
+
}),
|
|
928
|
+
/* @__PURE__ */ jsxs("label", {
|
|
929
|
+
htmlFor: id,
|
|
930
|
+
className: cn("relative block w-[42px] h-[24px] cursor-pointer transform-gpu", className),
|
|
931
|
+
children: [
|
|
932
|
+
/* @__PURE__ */ jsx("div", {
|
|
933
|
+
className: cn("relative top-[1px] left-[1px] w-[40px] h-[22px] rounded-[12px] transition-colors duration-200 ease-in-out ".concat(checked ? "bg-[#52d66b]" : "bg-[#c8ccd4]"), elementClassName)
|
|
934
|
+
}),
|
|
935
|
+
/* @__PURE__ */ jsx("span", {
|
|
936
|
+
className: cn("absolute ".concat(rotate ? "left-0" : "right-0", " top-0 w-[24px] h-[24px] bg-white rounded-full shadow-md transition-transform duration-200 ease-in-out ").concat(checked ? rotate ? "translate-x-[18px]" : "-translate-x-[18px]" : ""), circleClassName),
|
|
937
|
+
children: /* @__PURE__ */ jsx("svg", {
|
|
938
|
+
width: "10px",
|
|
939
|
+
height: "10px",
|
|
940
|
+
viewBox: "0 0 10 10",
|
|
941
|
+
className: "m-[7px] fill-none",
|
|
942
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
943
|
+
d: "M5,1 L5,1 C2.790861,1 1,2.790861 1,5 L1,5 C1,7.209139 2.790861,9 5,9 L5,9 C7.209139,9 9,7.209139 9,5 L9,5 C9,2.790861 7.209139,1 5,1 L5,9 L5,1 Z",
|
|
944
|
+
strokeWidth: "2",
|
|
945
|
+
strokeLinecap: "round",
|
|
946
|
+
strokeLinejoin: "round",
|
|
947
|
+
className: "transition-all duration-500 linear",
|
|
948
|
+
stroke: checked ? "#52d66b" : "#c8ccd4",
|
|
949
|
+
style: {
|
|
950
|
+
strokeDasharray: checked ? "25" : "24",
|
|
951
|
+
strokeDashoffset: checked ? "25" : "0"
|
|
952
|
+
}
|
|
953
|
+
})
|
|
954
|
+
})
|
|
955
|
+
})
|
|
956
|
+
]
|
|
957
|
+
})
|
|
958
|
+
]
|
|
959
|
+
});
|
|
960
|
+
};
|
|
961
|
+
// src/components/utils/ErrorBoundary.tsx
|
|
962
|
+
import React from "react";
|
|
963
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
964
|
+
var ErrorBoundary = /*#__PURE__*/ function(_React_Component) {
|
|
965
|
+
"use strict";
|
|
966
|
+
_inherits(ErrorBoundary, _React_Component);
|
|
967
|
+
function ErrorBoundary(props) {
|
|
968
|
+
_class_call_check(this, ErrorBoundary);
|
|
969
|
+
var _this;
|
|
970
|
+
_this = _call_super(this, ErrorBoundary, [
|
|
971
|
+
props
|
|
972
|
+
]);
|
|
973
|
+
_this.state = {
|
|
974
|
+
hasError: false,
|
|
975
|
+
error: null,
|
|
976
|
+
errorInfo: null
|
|
977
|
+
};
|
|
978
|
+
return _this;
|
|
979
|
+
}
|
|
980
|
+
_create_class(ErrorBoundary, [
|
|
981
|
+
{
|
|
982
|
+
key: "componentDidCatch",
|
|
983
|
+
value: function componentDidCatch(error, errorInfo) {
|
|
984
|
+
console.error("Error:", error);
|
|
985
|
+
console.log("Error Info:", errorInfo);
|
|
986
|
+
this.setState({
|
|
987
|
+
errorInfo: errorInfo
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
key: "render",
|
|
993
|
+
value: function render() {
|
|
994
|
+
if (this.state.hasError) {
|
|
995
|
+
return this.props.fallback || /* @__PURE__ */ jsx2("div", {
|
|
996
|
+
className: "full center",
|
|
997
|
+
children: /* @__PURE__ */ jsx2("h1", {
|
|
998
|
+
children: "\u05DE\u05E9\u05D4\u05D5 \u05D4\u05E9\u05EA\u05D1\u05E9...."
|
|
999
|
+
})
|
|
1000
|
+
});
|
|
1001
|
+
}
|
|
1002
|
+
return this.props.children;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
], [
|
|
1006
|
+
{
|
|
1007
|
+
key: "getDerivedStateFromError",
|
|
1008
|
+
value: function getDerivedStateFromError(error) {
|
|
1009
|
+
return {
|
|
1010
|
+
hasError: true,
|
|
1011
|
+
error: error
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
]);
|
|
1016
|
+
return ErrorBoundary;
|
|
1017
|
+
}(React.Component);
|
|
1020
1018
|
// src/components/utils/loaders.tsx
|
|
1019
|
+
import { ClipLoader } from "react-spinners";
|
|
1021
1020
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1022
1021
|
var Loader = function(param) {
|
|
1023
1022
|
var color = param.color, size3 = param.size, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
|