@bluemarble/bm-components 1.20.0 → 2.0.1
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/index.d.mts +17 -18
- package/dist/index.d.ts +17 -18
- package/dist/index.js +614 -375
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +755 -516
- package/dist/index.mjs.map +1 -1
- package/package.json +36 -36
package/dist/index.js
CHANGED
|
@@ -78,24 +78,24 @@ var require_react_is_production_min = __commonJS({
|
|
|
78
78
|
"node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js"(exports) {
|
|
79
79
|
"use strict";
|
|
80
80
|
var b = "function" === typeof Symbol && Symbol.for;
|
|
81
|
-
var c = b ? Symbol.for("react.element") : 60103;
|
|
82
|
-
var d = b ? Symbol.for("react.portal") : 60106;
|
|
83
|
-
var e = b ? Symbol.for("react.fragment") : 60107;
|
|
84
|
-
var f = b ? Symbol.for("react.strict_mode") : 60108;
|
|
85
|
-
var g = b ? Symbol.for("react.profiler") : 60114;
|
|
86
|
-
var h = b ? Symbol.for("react.provider") : 60109;
|
|
87
|
-
var k = b ? Symbol.for("react.context") : 60110;
|
|
88
|
-
var l = b ? Symbol.for("react.async_mode") : 60111;
|
|
89
|
-
var m = b ? Symbol.for("react.concurrent_mode") : 60111;
|
|
90
|
-
var n = b ? Symbol.for("react.forward_ref") : 60112;
|
|
91
|
-
var p = b ? Symbol.for("react.suspense") : 60113;
|
|
92
|
-
var q = b ? Symbol.for("react.suspense_list") : 60120;
|
|
93
|
-
var r2 = b ? Symbol.for("react.memo") : 60115;
|
|
94
|
-
var t = b ? Symbol.for("react.lazy") : 60116;
|
|
95
|
-
var v = b ? Symbol.for("react.block") : 60121;
|
|
96
|
-
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
97
|
-
var x = b ? Symbol.for("react.responder") : 60118;
|
|
98
|
-
var y = b ? Symbol.for("react.scope") : 60119;
|
|
81
|
+
var c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
82
|
+
var d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
|
|
83
|
+
var e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
|
|
84
|
+
var f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
|
|
85
|
+
var g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
|
|
86
|
+
var h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
|
|
87
|
+
var k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
|
|
88
|
+
var l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
|
|
89
|
+
var m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
|
|
90
|
+
var n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
|
|
91
|
+
var p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
|
|
92
|
+
var q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
|
|
93
|
+
var r2 = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
|
|
94
|
+
var t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
|
|
95
|
+
var v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
|
|
96
|
+
var w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
|
|
97
|
+
var x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
|
|
98
|
+
var y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
99
99
|
function z(a) {
|
|
100
100
|
if ("object" === typeof a && null !== a) {
|
|
101
101
|
var u = a.$$typeof;
|
|
@@ -194,25 +194,25 @@ var require_react_is_development = __commonJS({
|
|
|
194
194
|
(function() {
|
|
195
195
|
"use strict";
|
|
196
196
|
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
197
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
198
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
199
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
200
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
201
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
202
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
203
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
204
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
205
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
206
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
207
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
208
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
209
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
210
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
211
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
212
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
213
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
214
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
215
|
-
function
|
|
197
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
|
|
198
|
+
var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
|
|
199
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
|
|
200
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
|
|
201
|
+
var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
|
|
202
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
|
|
203
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
|
|
204
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
|
|
205
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
|
|
206
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
|
|
207
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
|
|
208
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
|
|
209
|
+
var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
|
|
210
|
+
var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
|
|
211
|
+
var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
|
|
212
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
|
|
213
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
|
|
214
|
+
var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
215
|
+
function isValidElementType2(type) {
|
|
216
216
|
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
217
217
|
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
218
218
|
}
|
|
@@ -334,7 +334,7 @@ var require_react_is_development = __commonJS({
|
|
|
334
334
|
exports.isProfiler = isProfiler;
|
|
335
335
|
exports.isStrictMode = isStrictMode;
|
|
336
336
|
exports.isSuspense = isSuspense;
|
|
337
|
-
exports.isValidElementType =
|
|
337
|
+
exports.isValidElementType = isValidElementType2;
|
|
338
338
|
exports.typeOf = typeOf;
|
|
339
339
|
})();
|
|
340
340
|
}
|
|
@@ -531,7 +531,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
531
531
|
function emptyFunctionThatReturnsNull() {
|
|
532
532
|
return null;
|
|
533
533
|
}
|
|
534
|
-
module.exports = function(
|
|
534
|
+
module.exports = function(isValidElement2, throwOnDirectAccess) {
|
|
535
535
|
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
536
536
|
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
537
537
|
function getIteratorFn(maybeIterable) {
|
|
@@ -659,7 +659,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
659
659
|
function createElementTypeChecker() {
|
|
660
660
|
function validate(props, propName, componentName, location, propFullName) {
|
|
661
661
|
var propValue = props[propName];
|
|
662
|
-
if (!
|
|
662
|
+
if (!isValidElement2(propValue)) {
|
|
663
663
|
var propType = getPropType(propValue);
|
|
664
664
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
665
665
|
}
|
|
@@ -847,7 +847,7 @@ var require_factoryWithTypeCheckers = __commonJS({
|
|
|
847
847
|
if (Array.isArray(propValue)) {
|
|
848
848
|
return propValue.every(isNode);
|
|
849
849
|
}
|
|
850
|
-
if (propValue === null ||
|
|
850
|
+
if (propValue === null || isValidElement2(propValue)) {
|
|
851
851
|
return true;
|
|
852
852
|
}
|
|
853
853
|
var iteratorFn = getIteratorFn(propValue);
|
|
@@ -1019,13 +1019,222 @@ var require_prop_types = __commonJS({
|
|
|
1019
1019
|
}
|
|
1020
1020
|
});
|
|
1021
1021
|
|
|
1022
|
+
// node_modules/react-is/cjs/react-is.production.js
|
|
1023
|
+
var require_react_is_production = __commonJS({
|
|
1024
|
+
"node_modules/react-is/cjs/react-is.production.js"(exports) {
|
|
1025
|
+
"use strict";
|
|
1026
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element");
|
|
1027
|
+
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
1028
|
+
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
1029
|
+
var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
|
|
1030
|
+
var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
|
|
1031
|
+
var REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer");
|
|
1032
|
+
var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
|
|
1033
|
+
var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
1034
|
+
var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
|
|
1035
|
+
var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
|
|
1036
|
+
var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
|
|
1037
|
+
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
1038
|
+
var REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition");
|
|
1039
|
+
var REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference");
|
|
1040
|
+
function typeOf(object) {
|
|
1041
|
+
if ("object" === typeof object && null !== object) {
|
|
1042
|
+
var $$typeof = object.$$typeof;
|
|
1043
|
+
switch ($$typeof) {
|
|
1044
|
+
case REACT_ELEMENT_TYPE:
|
|
1045
|
+
switch (object = object.type, object) {
|
|
1046
|
+
case REACT_FRAGMENT_TYPE:
|
|
1047
|
+
case REACT_PROFILER_TYPE:
|
|
1048
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1049
|
+
case REACT_SUSPENSE_TYPE:
|
|
1050
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1051
|
+
case REACT_VIEW_TRANSITION_TYPE:
|
|
1052
|
+
return object;
|
|
1053
|
+
default:
|
|
1054
|
+
switch (object = object && object.$$typeof, object) {
|
|
1055
|
+
case REACT_CONTEXT_TYPE:
|
|
1056
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1057
|
+
case REACT_LAZY_TYPE:
|
|
1058
|
+
case REACT_MEMO_TYPE:
|
|
1059
|
+
return object;
|
|
1060
|
+
case REACT_CONSUMER_TYPE:
|
|
1061
|
+
return object;
|
|
1062
|
+
default:
|
|
1063
|
+
return $$typeof;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
case REACT_PORTAL_TYPE:
|
|
1067
|
+
return $$typeof;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
exports.ContextConsumer = REACT_CONSUMER_TYPE;
|
|
1072
|
+
exports.ContextProvider = REACT_CONTEXT_TYPE;
|
|
1073
|
+
exports.Element = REACT_ELEMENT_TYPE;
|
|
1074
|
+
exports.ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1075
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1076
|
+
exports.Lazy = REACT_LAZY_TYPE;
|
|
1077
|
+
exports.Memo = REACT_MEMO_TYPE;
|
|
1078
|
+
exports.Portal = REACT_PORTAL_TYPE;
|
|
1079
|
+
exports.Profiler = REACT_PROFILER_TYPE;
|
|
1080
|
+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1081
|
+
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
1082
|
+
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
1083
|
+
exports.isContextConsumer = function(object) {
|
|
1084
|
+
return typeOf(object) === REACT_CONSUMER_TYPE;
|
|
1085
|
+
};
|
|
1086
|
+
exports.isContextProvider = function(object) {
|
|
1087
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1088
|
+
};
|
|
1089
|
+
exports.isElement = function(object) {
|
|
1090
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1091
|
+
};
|
|
1092
|
+
exports.isForwardRef = function(object) {
|
|
1093
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1094
|
+
};
|
|
1095
|
+
exports.isFragment = function(object) {
|
|
1096
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1097
|
+
};
|
|
1098
|
+
exports.isLazy = function(object) {
|
|
1099
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1100
|
+
};
|
|
1101
|
+
exports.isMemo = function(object) {
|
|
1102
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1103
|
+
};
|
|
1104
|
+
exports.isPortal = function(object) {
|
|
1105
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1106
|
+
};
|
|
1107
|
+
exports.isProfiler = function(object) {
|
|
1108
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1109
|
+
};
|
|
1110
|
+
exports.isStrictMode = function(object) {
|
|
1111
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1112
|
+
};
|
|
1113
|
+
exports.isSuspense = function(object) {
|
|
1114
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1115
|
+
};
|
|
1116
|
+
exports.isSuspenseList = function(object) {
|
|
1117
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
1118
|
+
};
|
|
1119
|
+
exports.isValidElementType = function(type) {
|
|
1120
|
+
return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
|
|
1121
|
+
};
|
|
1122
|
+
exports.typeOf = typeOf;
|
|
1123
|
+
}
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1126
|
+
// node_modules/react-is/cjs/react-is.development.js
|
|
1127
|
+
var require_react_is_development2 = __commonJS({
|
|
1128
|
+
"node_modules/react-is/cjs/react-is.development.js"(exports) {
|
|
1129
|
+
"use strict";
|
|
1130
|
+
"production" !== process.env.NODE_ENV && (function() {
|
|
1131
|
+
function typeOf(object) {
|
|
1132
|
+
if ("object" === typeof object && null !== object) {
|
|
1133
|
+
var $$typeof = object.$$typeof;
|
|
1134
|
+
switch ($$typeof) {
|
|
1135
|
+
case REACT_ELEMENT_TYPE:
|
|
1136
|
+
switch (object = object.type, object) {
|
|
1137
|
+
case REACT_FRAGMENT_TYPE:
|
|
1138
|
+
case REACT_PROFILER_TYPE:
|
|
1139
|
+
case REACT_STRICT_MODE_TYPE:
|
|
1140
|
+
case REACT_SUSPENSE_TYPE:
|
|
1141
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
1142
|
+
case REACT_VIEW_TRANSITION_TYPE:
|
|
1143
|
+
return object;
|
|
1144
|
+
default:
|
|
1145
|
+
switch (object = object && object.$$typeof, object) {
|
|
1146
|
+
case REACT_CONTEXT_TYPE:
|
|
1147
|
+
case REACT_FORWARD_REF_TYPE:
|
|
1148
|
+
case REACT_LAZY_TYPE:
|
|
1149
|
+
case REACT_MEMO_TYPE:
|
|
1150
|
+
return object;
|
|
1151
|
+
case REACT_CONSUMER_TYPE:
|
|
1152
|
+
return object;
|
|
1153
|
+
default:
|
|
1154
|
+
return $$typeof;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
case REACT_PORTAL_TYPE:
|
|
1158
|
+
return $$typeof;
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference");
|
|
1163
|
+
exports.ContextConsumer = REACT_CONSUMER_TYPE;
|
|
1164
|
+
exports.ContextProvider = REACT_CONTEXT_TYPE;
|
|
1165
|
+
exports.Element = REACT_ELEMENT_TYPE;
|
|
1166
|
+
exports.ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1167
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
1168
|
+
exports.Lazy = REACT_LAZY_TYPE;
|
|
1169
|
+
exports.Memo = REACT_MEMO_TYPE;
|
|
1170
|
+
exports.Portal = REACT_PORTAL_TYPE;
|
|
1171
|
+
exports.Profiler = REACT_PROFILER_TYPE;
|
|
1172
|
+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1173
|
+
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
1174
|
+
exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
1175
|
+
exports.isContextConsumer = function(object) {
|
|
1176
|
+
return typeOf(object) === REACT_CONSUMER_TYPE;
|
|
1177
|
+
};
|
|
1178
|
+
exports.isContextProvider = function(object) {
|
|
1179
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1180
|
+
};
|
|
1181
|
+
exports.isElement = function(object) {
|
|
1182
|
+
return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1183
|
+
};
|
|
1184
|
+
exports.isForwardRef = function(object) {
|
|
1185
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1186
|
+
};
|
|
1187
|
+
exports.isFragment = function(object) {
|
|
1188
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1189
|
+
};
|
|
1190
|
+
exports.isLazy = function(object) {
|
|
1191
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1192
|
+
};
|
|
1193
|
+
exports.isMemo = function(object) {
|
|
1194
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1195
|
+
};
|
|
1196
|
+
exports.isPortal = function(object) {
|
|
1197
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1198
|
+
};
|
|
1199
|
+
exports.isProfiler = function(object) {
|
|
1200
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1201
|
+
};
|
|
1202
|
+
exports.isStrictMode = function(object) {
|
|
1203
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1204
|
+
};
|
|
1205
|
+
exports.isSuspense = function(object) {
|
|
1206
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1207
|
+
};
|
|
1208
|
+
exports.isSuspenseList = function(object) {
|
|
1209
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
1210
|
+
};
|
|
1211
|
+
exports.isValidElementType = function(type) {
|
|
1212
|
+
return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
|
|
1213
|
+
};
|
|
1214
|
+
exports.typeOf = typeOf;
|
|
1215
|
+
})();
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
|
|
1219
|
+
// node_modules/react-is/index.js
|
|
1220
|
+
var require_react_is2 = __commonJS({
|
|
1221
|
+
"node_modules/react-is/index.js"(exports, module) {
|
|
1222
|
+
"use strict";
|
|
1223
|
+
if (process.env.NODE_ENV === "production") {
|
|
1224
|
+
module.exports = require_react_is_production();
|
|
1225
|
+
} else {
|
|
1226
|
+
module.exports = require_react_is_development2();
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
|
|
1022
1231
|
// src/components/Grid/Grid.tsx
|
|
1023
1232
|
|
|
1024
1233
|
|
|
1025
1234
|
|
|
1026
1235
|
|
|
1027
1236
|
|
|
1028
|
-
var _react = require('react'); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
1237
|
+
var _react = require('react'); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react);
|
|
1029
1238
|
|
|
1030
1239
|
|
|
1031
1240
|
|
|
@@ -1100,16 +1309,14 @@ var GridHeader = ({
|
|
|
1100
1309
|
// src/components/Grid/Filters.tsx
|
|
1101
1310
|
|
|
1102
1311
|
|
|
1103
|
-
// node_modules/@mui/utils/formatMuiErrorMessage/formatMuiErrorMessage.js
|
|
1104
|
-
function formatMuiErrorMessage(code) {
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
}
|
|
1109
|
-
return "Minified MUI error #" + code + "; visit " + url + " for the full message.";
|
|
1312
|
+
// node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js
|
|
1313
|
+
function formatMuiErrorMessage(code, ...args) {
|
|
1314
|
+
const url = new URL(`https://mui.com/production-error/?code=${code}`);
|
|
1315
|
+
args.forEach((arg) => url.searchParams.append("args[]", arg));
|
|
1316
|
+
return `Minified MUI error #${code}; visit ${url} for the full message.`;
|
|
1110
1317
|
}
|
|
1111
1318
|
|
|
1112
|
-
// node_modules/@mui/styled-engine/index.js
|
|
1319
|
+
// node_modules/@mui/styled-engine/esm/index.js
|
|
1113
1320
|
var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);
|
|
1114
1321
|
var _react2 = require('@emotion/react');
|
|
1115
1322
|
function styled(tag, options) {
|
|
@@ -1128,39 +1335,9 @@ function styled(tag, options) {
|
|
|
1128
1335
|
return stylesFactory;
|
|
1129
1336
|
}
|
|
1130
1337
|
|
|
1131
|
-
// node_modules/@
|
|
1132
|
-
|
|
1133
|
-
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
1134
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
1135
|
-
var source = arguments[i];
|
|
1136
|
-
for (var key in source) {
|
|
1137
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1138
|
-
target[key] = source[key];
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
return target;
|
|
1143
|
-
};
|
|
1144
|
-
return _extends.apply(this, arguments);
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
// node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
1148
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1149
|
-
if (source == null)
|
|
1150
|
-
return {};
|
|
1151
|
-
var target = {};
|
|
1152
|
-
var sourceKeys = Object.keys(source);
|
|
1153
|
-
var key, i;
|
|
1154
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1155
|
-
key = sourceKeys[i];
|
|
1156
|
-
if (excluded.indexOf(key) >= 0)
|
|
1157
|
-
continue;
|
|
1158
|
-
target[key] = source[key];
|
|
1159
|
-
}
|
|
1160
|
-
return target;
|
|
1161
|
-
}
|
|
1338
|
+
// node_modules/@mui/utils/esm/deepmerge/deepmerge.js
|
|
1339
|
+
var import_react_is = __toESM(require_react_is2(), 1);
|
|
1162
1340
|
|
|
1163
|
-
// node_modules/@mui/utils/deepmerge/deepmerge.js
|
|
1164
1341
|
function isPlainObject(item) {
|
|
1165
1342
|
if (typeof item !== "object" || item === null) {
|
|
1166
1343
|
return false;
|
|
@@ -1169,7 +1346,7 @@ function isPlainObject(item) {
|
|
|
1169
1346
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
|
|
1170
1347
|
}
|
|
1171
1348
|
function deepClone(source) {
|
|
1172
|
-
if (!isPlainObject(source)) {
|
|
1349
|
+
if (/* @__PURE__ */ React2.isValidElement(source) || (0, import_react_is.isValidElementType)(source) || !isPlainObject(source)) {
|
|
1173
1350
|
return source;
|
|
1174
1351
|
}
|
|
1175
1352
|
const output = {};
|
|
@@ -1181,13 +1358,13 @@ function deepClone(source) {
|
|
|
1181
1358
|
function deepmerge(target, source, options = {
|
|
1182
1359
|
clone: true
|
|
1183
1360
|
}) {
|
|
1184
|
-
const output = options.clone ?
|
|
1361
|
+
const output = options.clone ? __spreadValues({}, target) : target;
|
|
1185
1362
|
if (isPlainObject(target) && isPlainObject(source)) {
|
|
1186
1363
|
Object.keys(source).forEach((key) => {
|
|
1187
|
-
if (key
|
|
1188
|
-
|
|
1189
|
-
}
|
|
1190
|
-
|
|
1364
|
+
if (/* @__PURE__ */ React2.isValidElement(source[key]) || (0, import_react_is.isValidElementType)(source[key])) {
|
|
1365
|
+
output[key] = source[key];
|
|
1366
|
+
} else if (isPlainObject(source[key]) && // Avoid prototype pollution
|
|
1367
|
+
Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
|
|
1191
1368
|
output[key] = deepmerge(target[key], source[key], options);
|
|
1192
1369
|
} else if (options.clone) {
|
|
1193
1370
|
output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
|
|
@@ -1199,8 +1376,7 @@ function deepmerge(target, source, options = {
|
|
|
1199
1376
|
return output;
|
|
1200
1377
|
}
|
|
1201
1378
|
|
|
1202
|
-
// node_modules/@mui/system/esm/
|
|
1203
|
-
var _excluded = ["values", "unit", "step"];
|
|
1379
|
+
// node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js
|
|
1204
1380
|
var sortBreakpointsValues = (values2) => {
|
|
1205
1381
|
const breakpointsAsArray = Object.keys(values2).map((key) => ({
|
|
1206
1382
|
key,
|
|
@@ -1208,15 +1384,13 @@ var sortBreakpointsValues = (values2) => {
|
|
|
1208
1384
|
})) || [];
|
|
1209
1385
|
breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
|
|
1210
1386
|
return breakpointsAsArray.reduce((acc, obj) => {
|
|
1211
|
-
return
|
|
1387
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
1212
1388
|
[obj.key]: obj.val
|
|
1213
1389
|
});
|
|
1214
1390
|
}, {});
|
|
1215
1391
|
};
|
|
1216
1392
|
function createBreakpoints(breakpoints) {
|
|
1217
|
-
const {
|
|
1218
|
-
// The breakpoint **start** at this value.
|
|
1219
|
-
// For instance with the first breakpoint xs: [xs, sm).
|
|
1393
|
+
const _a = breakpoints, {
|
|
1220
1394
|
values: values2 = {
|
|
1221
1395
|
xs: 0,
|
|
1222
1396
|
// phone
|
|
@@ -1231,7 +1405,13 @@ function createBreakpoints(breakpoints) {
|
|
|
1231
1405
|
},
|
|
1232
1406
|
unit = "px",
|
|
1233
1407
|
step = 5
|
|
1234
|
-
} =
|
|
1408
|
+
} = _a, other = __objRest(_a, [
|
|
1409
|
+
// The breakpoint **start** at this value.
|
|
1410
|
+
// For instance with the first breakpoint xs: [xs, sm).
|
|
1411
|
+
"values",
|
|
1412
|
+
"unit",
|
|
1413
|
+
"step"
|
|
1414
|
+
]);
|
|
1235
1415
|
const sortedValues = sortBreakpointsValues(values2);
|
|
1236
1416
|
const keys = Object.keys(sortedValues);
|
|
1237
1417
|
function up(key) {
|
|
@@ -1262,7 +1442,7 @@ function createBreakpoints(breakpoints) {
|
|
|
1262
1442
|
}
|
|
1263
1443
|
return between(key, keys[keys.indexOf(key) + 1]).replace("@media", "@media not all and");
|
|
1264
1444
|
}
|
|
1265
|
-
return
|
|
1445
|
+
return __spreadValues({
|
|
1266
1446
|
keys,
|
|
1267
1447
|
values: sortedValues,
|
|
1268
1448
|
up,
|
|
@@ -1274,18 +1454,80 @@ function createBreakpoints(breakpoints) {
|
|
|
1274
1454
|
}, other);
|
|
1275
1455
|
}
|
|
1276
1456
|
|
|
1457
|
+
// node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js
|
|
1458
|
+
function sortContainerQueries(theme, css2) {
|
|
1459
|
+
if (!theme.containerQueries) {
|
|
1460
|
+
return css2;
|
|
1461
|
+
}
|
|
1462
|
+
const sorted = Object.keys(css2).filter((key) => key.startsWith("@container")).sort((a, b) => {
|
|
1463
|
+
var _a, _b;
|
|
1464
|
+
const regex = /min-width:\s*([0-9.]+)/;
|
|
1465
|
+
return +(((_a = a.match(regex)) == null ? void 0 : _a[1]) || 0) - +(((_b = b.match(regex)) == null ? void 0 : _b[1]) || 0);
|
|
1466
|
+
});
|
|
1467
|
+
if (!sorted.length) {
|
|
1468
|
+
return css2;
|
|
1469
|
+
}
|
|
1470
|
+
return sorted.reduce((acc, key) => {
|
|
1471
|
+
const value = css2[key];
|
|
1472
|
+
delete acc[key];
|
|
1473
|
+
acc[key] = value;
|
|
1474
|
+
return acc;
|
|
1475
|
+
}, __spreadValues({}, css2));
|
|
1476
|
+
}
|
|
1477
|
+
function isCqShorthand(breakpointKeys, value) {
|
|
1478
|
+
return value === "@" || value.startsWith("@") && (breakpointKeys.some((key) => value.startsWith(`@${key}`)) || !!value.match(/^@\d/));
|
|
1479
|
+
}
|
|
1480
|
+
function getContainerQuery(theme, shorthand) {
|
|
1481
|
+
const matches = shorthand.match(/^@([^/]+)?\/?(.+)?$/);
|
|
1482
|
+
if (!matches) {
|
|
1483
|
+
if (process.env.NODE_ENV !== "production") {
|
|
1484
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
1485
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.` : formatMuiErrorMessage(18, `(${shorthand})`));
|
|
1486
|
+
}
|
|
1487
|
+
return null;
|
|
1488
|
+
}
|
|
1489
|
+
const [, containerQuery, containerName] = matches;
|
|
1490
|
+
const value = Number.isNaN(+containerQuery) ? containerQuery || 0 : +containerQuery;
|
|
1491
|
+
return theme.containerQueries(containerName).up(value);
|
|
1492
|
+
}
|
|
1493
|
+
function cssContainerQueries(themeInput) {
|
|
1494
|
+
const toContainerQuery = (mediaQuery, name) => mediaQuery.replace("@media", name ? `@container ${name}` : "@container");
|
|
1495
|
+
function attachCq(node2, name) {
|
|
1496
|
+
node2.up = (...args) => toContainerQuery(themeInput.breakpoints.up(...args), name);
|
|
1497
|
+
node2.down = (...args) => toContainerQuery(themeInput.breakpoints.down(...args), name);
|
|
1498
|
+
node2.between = (...args) => toContainerQuery(themeInput.breakpoints.between(...args), name);
|
|
1499
|
+
node2.only = (...args) => toContainerQuery(themeInput.breakpoints.only(...args), name);
|
|
1500
|
+
node2.not = (...args) => {
|
|
1501
|
+
const result = toContainerQuery(themeInput.breakpoints.not(...args), name);
|
|
1502
|
+
if (result.includes("not all and")) {
|
|
1503
|
+
return result.replace("not all and ", "").replace("min-width:", "width<").replace("max-width:", "width>").replace("and", "or");
|
|
1504
|
+
}
|
|
1505
|
+
return result;
|
|
1506
|
+
};
|
|
1507
|
+
}
|
|
1508
|
+
const node = {};
|
|
1509
|
+
const containerQueries = (name) => {
|
|
1510
|
+
attachCq(node, name);
|
|
1511
|
+
return node;
|
|
1512
|
+
};
|
|
1513
|
+
attachCq(containerQueries);
|
|
1514
|
+
return __spreadProps(__spreadValues({}, themeInput), {
|
|
1515
|
+
containerQueries
|
|
1516
|
+
});
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1277
1519
|
// node_modules/@mui/system/esm/createTheme/shape.js
|
|
1278
1520
|
var shape = {
|
|
1279
1521
|
borderRadius: 4
|
|
1280
1522
|
};
|
|
1281
1523
|
var shape_default = shape;
|
|
1282
1524
|
|
|
1283
|
-
// node_modules/@mui/system/esm/responsivePropType.js
|
|
1284
|
-
var import_prop_types = __toESM(require_prop_types());
|
|
1525
|
+
// node_modules/@mui/system/esm/responsivePropType/responsivePropType.js
|
|
1526
|
+
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
1285
1527
|
var responsivePropType = process.env.NODE_ENV !== "production" ? import_prop_types.default.oneOfType([import_prop_types.default.number, import_prop_types.default.string, import_prop_types.default.object, import_prop_types.default.array]) : {};
|
|
1286
1528
|
var responsivePropType_default = responsivePropType;
|
|
1287
1529
|
|
|
1288
|
-
// node_modules/@mui/system/esm/merge.js
|
|
1530
|
+
// node_modules/@mui/system/esm/merge/merge.js
|
|
1289
1531
|
function merge(acc, item) {
|
|
1290
1532
|
if (!item) {
|
|
1291
1533
|
return acc;
|
|
@@ -1297,7 +1539,7 @@ function merge(acc, item) {
|
|
|
1297
1539
|
}
|
|
1298
1540
|
var merge_default = merge;
|
|
1299
1541
|
|
|
1300
|
-
// node_modules/@mui/system/esm/breakpoints.js
|
|
1542
|
+
// node_modules/@mui/system/esm/breakpoints/breakpoints.js
|
|
1301
1543
|
var values = {
|
|
1302
1544
|
xs: 0,
|
|
1303
1545
|
// phone
|
|
@@ -1316,6 +1558,17 @@ var defaultBreakpoints = {
|
|
|
1316
1558
|
keys: ["xs", "sm", "md", "lg", "xl"],
|
|
1317
1559
|
up: (key) => `@media (min-width:${values[key]}px)`
|
|
1318
1560
|
};
|
|
1561
|
+
var defaultContainerQueries = {
|
|
1562
|
+
containerQueries: (containerName) => ({
|
|
1563
|
+
up: (key) => {
|
|
1564
|
+
let result = typeof key === "number" ? key : values[key] || key;
|
|
1565
|
+
if (typeof result === "number") {
|
|
1566
|
+
result = `${result}px`;
|
|
1567
|
+
}
|
|
1568
|
+
return containerName ? `@container ${containerName} (min-width:${result})` : `@container (min-width:${result})`;
|
|
1569
|
+
}
|
|
1570
|
+
})
|
|
1571
|
+
};
|
|
1319
1572
|
function handleBreakpoints(props, propValue, styleFromPropValue) {
|
|
1320
1573
|
const theme = props.theme || {};
|
|
1321
1574
|
if (Array.isArray(propValue)) {
|
|
@@ -1328,7 +1581,12 @@ function handleBreakpoints(props, propValue, styleFromPropValue) {
|
|
|
1328
1581
|
if (typeof propValue === "object") {
|
|
1329
1582
|
const themeBreakpoints = theme.breakpoints || defaultBreakpoints;
|
|
1330
1583
|
return Object.keys(propValue).reduce((acc, breakpoint) => {
|
|
1331
|
-
if (
|
|
1584
|
+
if (isCqShorthand(themeBreakpoints.keys, breakpoint)) {
|
|
1585
|
+
const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, breakpoint);
|
|
1586
|
+
if (containerKey) {
|
|
1587
|
+
acc[containerKey] = styleFromPropValue(propValue[breakpoint], breakpoint);
|
|
1588
|
+
}
|
|
1589
|
+
} else if (Object.keys(themeBreakpoints.values || values).includes(breakpoint)) {
|
|
1332
1590
|
const mediaKey = themeBreakpoints.up(breakpoint);
|
|
1333
1591
|
acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);
|
|
1334
1592
|
} else {
|
|
@@ -1342,8 +1600,8 @@ function handleBreakpoints(props, propValue, styleFromPropValue) {
|
|
|
1342
1600
|
return output;
|
|
1343
1601
|
}
|
|
1344
1602
|
function createEmptyBreakpointObject(breakpointsInput = {}) {
|
|
1345
|
-
var
|
|
1346
|
-
const breakpointsInOrder = (
|
|
1603
|
+
var _a;
|
|
1604
|
+
const breakpointsInOrder = (_a = breakpointsInput.keys) == null ? void 0 : _a.reduce((acc, key) => {
|
|
1347
1605
|
const breakpointStyleKey = breakpointsInput.up(key);
|
|
1348
1606
|
acc[breakpointStyleKey] = {};
|
|
1349
1607
|
return acc;
|
|
@@ -1361,15 +1619,15 @@ function removeUnusedBreakpoints(breakpointKeys, style3) {
|
|
|
1361
1619
|
}, style3);
|
|
1362
1620
|
}
|
|
1363
1621
|
|
|
1364
|
-
// node_modules/@mui/utils/capitalize/capitalize.js
|
|
1622
|
+
// node_modules/@mui/utils/esm/capitalize/capitalize.js
|
|
1365
1623
|
function capitalize(string) {
|
|
1366
1624
|
if (typeof string !== "string") {
|
|
1367
|
-
throw new Error(process.env.NODE_ENV !== "production" ?
|
|
1625
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : formatMuiErrorMessage(7));
|
|
1368
1626
|
}
|
|
1369
1627
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
1370
1628
|
}
|
|
1371
1629
|
|
|
1372
|
-
// node_modules/@mui/system/esm/style.js
|
|
1630
|
+
// node_modules/@mui/system/esm/style/style.js
|
|
1373
1631
|
function getPath(obj, path, checkVars = true) {
|
|
1374
1632
|
if (!path || typeof path !== "string") {
|
|
1375
1633
|
return null;
|
|
@@ -1437,8 +1695,8 @@ function style(options) {
|
|
|
1437
1695
|
}
|
|
1438
1696
|
var style_default = style;
|
|
1439
1697
|
|
|
1440
|
-
// node_modules/@mui/system/esm/memoize.js
|
|
1441
|
-
function
|
|
1698
|
+
// node_modules/@mui/system/esm/memoize/memoize.js
|
|
1699
|
+
function memoize2(fn) {
|
|
1442
1700
|
const cache = {};
|
|
1443
1701
|
return (arg) => {
|
|
1444
1702
|
if (cache[arg] === void 0) {
|
|
@@ -1448,7 +1706,7 @@ function memoize(fn) {
|
|
|
1448
1706
|
};
|
|
1449
1707
|
}
|
|
1450
1708
|
|
|
1451
|
-
// node_modules/@mui/system/esm/spacing.js
|
|
1709
|
+
// node_modules/@mui/system/esm/spacing/spacing.js
|
|
1452
1710
|
var properties = {
|
|
1453
1711
|
m: "margin",
|
|
1454
1712
|
p: "padding"
|
|
@@ -1467,7 +1725,7 @@ var aliases = {
|
|
|
1467
1725
|
paddingX: "px",
|
|
1468
1726
|
paddingY: "py"
|
|
1469
1727
|
};
|
|
1470
|
-
var getCssProperties =
|
|
1728
|
+
var getCssProperties = memoize2((prop) => {
|
|
1471
1729
|
if (prop.length > 2) {
|
|
1472
1730
|
if (aliases[prop]) {
|
|
1473
1731
|
prop = aliases[prop];
|
|
@@ -1484,26 +1742,36 @@ var marginKeys = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop"
|
|
|
1484
1742
|
var paddingKeys = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"];
|
|
1485
1743
|
var spacingKeys = [...marginKeys, ...paddingKeys];
|
|
1486
1744
|
function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
1487
|
-
var
|
|
1488
|
-
const themeSpacing = (
|
|
1489
|
-
if (typeof themeSpacing === "number") {
|
|
1490
|
-
return (
|
|
1491
|
-
if (typeof
|
|
1492
|
-
return
|
|
1745
|
+
var _a;
|
|
1746
|
+
const themeSpacing = (_a = getPath(theme, themeKey, true)) != null ? _a : defaultValue;
|
|
1747
|
+
if (typeof themeSpacing === "number" || typeof themeSpacing === "string") {
|
|
1748
|
+
return (val) => {
|
|
1749
|
+
if (typeof val === "string") {
|
|
1750
|
+
return val;
|
|
1493
1751
|
}
|
|
1494
1752
|
if (process.env.NODE_ENV !== "production") {
|
|
1495
|
-
if (typeof
|
|
1496
|
-
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${
|
|
1753
|
+
if (typeof val !== "number") {
|
|
1754
|
+
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${val}.`);
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
if (typeof themeSpacing === "string") {
|
|
1758
|
+
if (themeSpacing.startsWith("var(") && val === 0) {
|
|
1759
|
+
return 0;
|
|
1760
|
+
}
|
|
1761
|
+
if (themeSpacing.startsWith("var(") && val === 1) {
|
|
1762
|
+
return themeSpacing;
|
|
1497
1763
|
}
|
|
1764
|
+
return `calc(${val} * ${themeSpacing})`;
|
|
1498
1765
|
}
|
|
1499
|
-
return themeSpacing *
|
|
1766
|
+
return themeSpacing * val;
|
|
1500
1767
|
};
|
|
1501
1768
|
}
|
|
1502
1769
|
if (Array.isArray(themeSpacing)) {
|
|
1503
|
-
return (
|
|
1504
|
-
if (typeof
|
|
1505
|
-
return
|
|
1770
|
+
return (val) => {
|
|
1771
|
+
if (typeof val === "string") {
|
|
1772
|
+
return val;
|
|
1506
1773
|
}
|
|
1774
|
+
const abs = Math.abs(val);
|
|
1507
1775
|
if (process.env.NODE_ENV !== "production") {
|
|
1508
1776
|
if (!Number.isInteger(abs)) {
|
|
1509
1777
|
console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join("\n"));
|
|
@@ -1511,7 +1779,17 @@ function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
|
1511
1779
|
console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join("\n"));
|
|
1512
1780
|
}
|
|
1513
1781
|
}
|
|
1514
|
-
|
|
1782
|
+
const transformed = themeSpacing[abs];
|
|
1783
|
+
if (val >= 0) {
|
|
1784
|
+
return transformed;
|
|
1785
|
+
}
|
|
1786
|
+
if (typeof transformed === "number") {
|
|
1787
|
+
return -transformed;
|
|
1788
|
+
}
|
|
1789
|
+
if (typeof transformed === "string" && transformed.startsWith("var(")) {
|
|
1790
|
+
return `calc(-1 * ${transformed})`;
|
|
1791
|
+
}
|
|
1792
|
+
return `-${transformed}`;
|
|
1515
1793
|
};
|
|
1516
1794
|
}
|
|
1517
1795
|
if (typeof themeSpacing === "function") {
|
|
@@ -1529,15 +1807,7 @@ function getValue(transformer, propValue) {
|
|
|
1529
1807
|
if (typeof propValue === "string" || propValue == null) {
|
|
1530
1808
|
return propValue;
|
|
1531
1809
|
}
|
|
1532
|
-
|
|
1533
|
-
const transformed = transformer(abs);
|
|
1534
|
-
if (propValue >= 0) {
|
|
1535
|
-
return transformed;
|
|
1536
|
-
}
|
|
1537
|
-
if (typeof transformed === "number") {
|
|
1538
|
-
return -transformed;
|
|
1539
|
-
}
|
|
1540
|
-
return `-${transformed}`;
|
|
1810
|
+
return transformer(propValue);
|
|
1541
1811
|
}
|
|
1542
1812
|
function getStyleFromPropValue(cssProperties, transformer) {
|
|
1543
1813
|
return (propValue) => cssProperties.reduce((acc, cssProperty) => {
|
|
@@ -1546,7 +1816,7 @@ function getStyleFromPropValue(cssProperties, transformer) {
|
|
|
1546
1816
|
}, {});
|
|
1547
1817
|
}
|
|
1548
1818
|
function resolveCssProperty(props, keys, prop, transformer) {
|
|
1549
|
-
if (keys.
|
|
1819
|
+
if (!keys.includes(prop)) {
|
|
1550
1820
|
return null;
|
|
1551
1821
|
}
|
|
1552
1822
|
const cssProperties = getCssProperties(prop);
|
|
@@ -1584,13 +1854,12 @@ spacing.propTypes = process.env.NODE_ENV !== "production" ? spacingKeys.reduce((
|
|
|
1584
1854
|
spacing.filterProps = spacingKeys;
|
|
1585
1855
|
|
|
1586
1856
|
// node_modules/@mui/system/esm/createTheme/createSpacing.js
|
|
1587
|
-
function createSpacing(spacingInput = 8
|
|
1857
|
+
function createSpacing(spacingInput = 8, transform = createUnarySpacing({
|
|
1858
|
+
spacing: spacingInput
|
|
1859
|
+
})) {
|
|
1588
1860
|
if (spacingInput.mui) {
|
|
1589
1861
|
return spacingInput;
|
|
1590
1862
|
}
|
|
1591
|
-
const transform = createUnarySpacing({
|
|
1592
|
-
spacing: spacingInput
|
|
1593
|
-
});
|
|
1594
1863
|
const spacing2 = (...argsInput) => {
|
|
1595
1864
|
if (process.env.NODE_ENV !== "production") {
|
|
1596
1865
|
if (!(argsInput.length <= 4)) {
|
|
@@ -1607,7 +1876,7 @@ function createSpacing(spacingInput = 8) {
|
|
|
1607
1876
|
return spacing2;
|
|
1608
1877
|
}
|
|
1609
1878
|
|
|
1610
|
-
// node_modules/@mui/system/esm/compose.js
|
|
1879
|
+
// node_modules/@mui/system/esm/compose/compose.js
|
|
1611
1880
|
function compose(...styles2) {
|
|
1612
1881
|
const handlers = styles2.reduce((acc, style3) => {
|
|
1613
1882
|
style3.filterProps.forEach((prop) => {
|
|
@@ -1629,7 +1898,7 @@ function compose(...styles2) {
|
|
|
1629
1898
|
}
|
|
1630
1899
|
var compose_default = compose;
|
|
1631
1900
|
|
|
1632
|
-
// node_modules/@mui/system/esm/borders.js
|
|
1901
|
+
// node_modules/@mui/system/esm/borders/borders.js
|
|
1633
1902
|
function borderTransform(value) {
|
|
1634
1903
|
if (typeof value !== "number") {
|
|
1635
1904
|
return value;
|
|
@@ -1671,7 +1940,7 @@ borderRadius.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
1671
1940
|
borderRadius.filterProps = ["borderRadius"];
|
|
1672
1941
|
var borders = compose_default(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);
|
|
1673
1942
|
|
|
1674
|
-
// node_modules/@mui/system/esm/cssGrid.js
|
|
1943
|
+
// node_modules/@mui/system/esm/cssGrid/cssGrid.js
|
|
1675
1944
|
var gap = (props) => {
|
|
1676
1945
|
if (props.gap !== void 0 && props.gap !== null) {
|
|
1677
1946
|
const transformer = createUnaryUnit(props.theme, "spacing", 8, "gap");
|
|
@@ -1743,7 +2012,7 @@ var gridArea = style_default({
|
|
|
1743
2012
|
});
|
|
1744
2013
|
var grid = compose_default(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);
|
|
1745
2014
|
|
|
1746
|
-
// node_modules/@mui/system/esm/palette.js
|
|
2015
|
+
// node_modules/@mui/system/esm/palette/palette.js
|
|
1747
2016
|
function paletteTransform(value, userValue) {
|
|
1748
2017
|
if (userValue === "grey") {
|
|
1749
2018
|
return userValue;
|
|
@@ -1768,7 +2037,7 @@ var backgroundColor = style_default({
|
|
|
1768
2037
|
});
|
|
1769
2038
|
var palette = compose_default(color, bgcolor, backgroundColor);
|
|
1770
2039
|
|
|
1771
|
-
// node_modules/@mui/system/esm/sizing.js
|
|
2040
|
+
// node_modules/@mui/system/esm/sizing/sizing.js
|
|
1772
2041
|
function sizingTransform(value) {
|
|
1773
2042
|
return value <= 1 && value !== 0 ? `${value * 100}%` : value;
|
|
1774
2043
|
}
|
|
@@ -1779,14 +2048,14 @@ var width = style_default({
|
|
|
1779
2048
|
var maxWidth = (props) => {
|
|
1780
2049
|
if (props.maxWidth !== void 0 && props.maxWidth !== null) {
|
|
1781
2050
|
const styleFromPropValue = (propValue) => {
|
|
1782
|
-
var
|
|
1783
|
-
const breakpoint = ((
|
|
2051
|
+
var _a, _b, _c, _d, _e;
|
|
2052
|
+
const breakpoint = ((_c = (_b = (_a = props.theme) == null ? void 0 : _a.breakpoints) == null ? void 0 : _b.values) == null ? void 0 : _c[propValue]) || values[propValue];
|
|
1784
2053
|
if (!breakpoint) {
|
|
1785
2054
|
return {
|
|
1786
2055
|
maxWidth: sizingTransform(propValue)
|
|
1787
2056
|
};
|
|
1788
2057
|
}
|
|
1789
|
-
if (((
|
|
2058
|
+
if (((_e = (_d = props.theme) == null ? void 0 : _d.breakpoints) == null ? void 0 : _e.unit) !== "px") {
|
|
1790
2059
|
return {
|
|
1791
2060
|
maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
|
|
1792
2061
|
};
|
|
@@ -2096,6 +2365,9 @@ var defaultSxConfig = {
|
|
|
2096
2365
|
},
|
|
2097
2366
|
boxSizing: {},
|
|
2098
2367
|
// typography
|
|
2368
|
+
font: {
|
|
2369
|
+
themeKey: "font"
|
|
2370
|
+
},
|
|
2099
2371
|
fontFamily: {
|
|
2100
2372
|
themeKey: "typography"
|
|
2101
2373
|
},
|
|
@@ -2173,15 +2445,16 @@ function unstable_createStyleFunctionSx() {
|
|
|
2173
2445
|
return handleBreakpoints(props, val, styleFromPropValue);
|
|
2174
2446
|
}
|
|
2175
2447
|
function styleFunctionSx2(props) {
|
|
2176
|
-
var
|
|
2448
|
+
var _a;
|
|
2177
2449
|
const {
|
|
2178
2450
|
sx,
|
|
2179
|
-
theme = {}
|
|
2451
|
+
theme = {},
|
|
2452
|
+
nested
|
|
2180
2453
|
} = props || {};
|
|
2181
2454
|
if (!sx) {
|
|
2182
2455
|
return null;
|
|
2183
2456
|
}
|
|
2184
|
-
const config = (
|
|
2457
|
+
const config = (_a = theme.unstable_sxConfig) != null ? _a : defaultSxConfig_default;
|
|
2185
2458
|
function traverse(sxInput) {
|
|
2186
2459
|
let sxObject = sxInput;
|
|
2187
2460
|
if (typeof sxInput === "function") {
|
|
@@ -2210,7 +2483,8 @@ function unstable_createStyleFunctionSx() {
|
|
|
2210
2483
|
if (objectsHaveSameKeys(breakpointsValues, value)) {
|
|
2211
2484
|
css2[styleKey] = styleFunctionSx2({
|
|
2212
2485
|
sx: value,
|
|
2213
|
-
theme
|
|
2486
|
+
theme,
|
|
2487
|
+
nested: true
|
|
2214
2488
|
});
|
|
2215
2489
|
} else {
|
|
2216
2490
|
css2 = merge_default(css2, breakpointsValues);
|
|
@@ -2221,7 +2495,12 @@ function unstable_createStyleFunctionSx() {
|
|
|
2221
2495
|
}
|
|
2222
2496
|
}
|
|
2223
2497
|
});
|
|
2224
|
-
|
|
2498
|
+
if (!nested && theme.modularCssLayers) {
|
|
2499
|
+
return {
|
|
2500
|
+
"@layer sx": sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css2))
|
|
2501
|
+
};
|
|
2502
|
+
}
|
|
2503
|
+
return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css2));
|
|
2225
2504
|
}
|
|
2226
2505
|
return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
|
|
2227
2506
|
}
|
|
@@ -2233,9 +2512,19 @@ var styleFunctionSx_default = styleFunctionSx;
|
|
|
2233
2512
|
|
|
2234
2513
|
// node_modules/@mui/system/esm/createTheme/applyStyles.js
|
|
2235
2514
|
function applyStyles(key, styles2) {
|
|
2515
|
+
var _a;
|
|
2236
2516
|
const theme = this;
|
|
2237
|
-
if (theme.vars
|
|
2238
|
-
|
|
2517
|
+
if (theme.vars) {
|
|
2518
|
+
if (!((_a = theme.colorSchemes) == null ? void 0 : _a[key]) || typeof theme.getColorSchemeSelector !== "function") {
|
|
2519
|
+
return {};
|
|
2520
|
+
}
|
|
2521
|
+
let selector = theme.getColorSchemeSelector(key);
|
|
2522
|
+
if (selector === "&") {
|
|
2523
|
+
return styles2;
|
|
2524
|
+
}
|
|
2525
|
+
if (selector.includes("data-") || selector.includes(".")) {
|
|
2526
|
+
selector = `*:where(${selector.replace(/\s*&$/, "")}) &`;
|
|
2527
|
+
}
|
|
2239
2528
|
return {
|
|
2240
2529
|
[selector]: styles2
|
|
2241
2530
|
};
|
|
@@ -2247,14 +2536,18 @@ function applyStyles(key, styles2) {
|
|
|
2247
2536
|
}
|
|
2248
2537
|
|
|
2249
2538
|
// node_modules/@mui/system/esm/createTheme/createTheme.js
|
|
2250
|
-
var _excluded2 = ["breakpoints", "palette", "spacing", "shape"];
|
|
2251
2539
|
function createTheme(options = {}, ...args) {
|
|
2252
|
-
const {
|
|
2540
|
+
const _a = options, {
|
|
2253
2541
|
breakpoints: breakpointsInput = {},
|
|
2254
2542
|
palette: paletteInput = {},
|
|
2255
2543
|
spacing: spacingInput,
|
|
2256
2544
|
shape: shapeInput = {}
|
|
2257
|
-
} =
|
|
2545
|
+
} = _a, other = __objRest(_a, [
|
|
2546
|
+
"breakpoints",
|
|
2547
|
+
"palette",
|
|
2548
|
+
"spacing",
|
|
2549
|
+
"shape"
|
|
2550
|
+
]);
|
|
2258
2551
|
const breakpoints = createBreakpoints(breakpointsInput);
|
|
2259
2552
|
const spacing2 = createSpacing(spacingInput);
|
|
2260
2553
|
let muiTheme = deepmerge({
|
|
@@ -2262,15 +2555,16 @@ function createTheme(options = {}, ...args) {
|
|
|
2262
2555
|
direction: "ltr",
|
|
2263
2556
|
components: {},
|
|
2264
2557
|
// Inject component definitions.
|
|
2265
|
-
palette:
|
|
2558
|
+
palette: __spreadValues({
|
|
2266
2559
|
mode: "light"
|
|
2267
2560
|
}, paletteInput),
|
|
2268
2561
|
spacing: spacing2,
|
|
2269
|
-
shape:
|
|
2562
|
+
shape: __spreadValues(__spreadValues({}, shape_default), shapeInput)
|
|
2270
2563
|
}, other);
|
|
2564
|
+
muiTheme = cssContainerQueries(muiTheme);
|
|
2271
2565
|
muiTheme.applyStyles = applyStyles;
|
|
2272
2566
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
|
2273
|
-
muiTheme.unstable_sxConfig =
|
|
2567
|
+
muiTheme.unstable_sxConfig = __spreadValues(__spreadValues({}, defaultSxConfig_default), other == null ? void 0 : other.unstable_sxConfig);
|
|
2274
2568
|
muiTheme.unstable_sx = function sx(props) {
|
|
2275
2569
|
return styleFunctionSx_default({
|
|
2276
2570
|
sx: props,
|
|
@@ -2281,18 +2575,18 @@ function createTheme(options = {}, ...args) {
|
|
|
2281
2575
|
}
|
|
2282
2576
|
var createTheme_default = createTheme;
|
|
2283
2577
|
|
|
2284
|
-
// node_modules/@mui/system/esm/useThemeWithoutDefault.js
|
|
2578
|
+
// node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js
|
|
2285
2579
|
|
|
2286
2580
|
function isObjectEmpty(obj) {
|
|
2287
2581
|
return Object.keys(obj).length === 0;
|
|
2288
2582
|
}
|
|
2289
2583
|
function useTheme(defaultTheme = null) {
|
|
2290
|
-
const contextTheme =
|
|
2584
|
+
const contextTheme = React3.useContext(_react2.ThemeContext);
|
|
2291
2585
|
return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
|
|
2292
2586
|
}
|
|
2293
2587
|
var useThemeWithoutDefault_default = useTheme;
|
|
2294
2588
|
|
|
2295
|
-
// node_modules/@mui/system/esm/useTheme.js
|
|
2589
|
+
// node_modules/@mui/system/esm/useTheme/useTheme.js
|
|
2296
2590
|
var systemDefaultTheme = createTheme_default();
|
|
2297
2591
|
function useTheme2(defaultTheme = systemDefaultTheme) {
|
|
2298
2592
|
return useThemeWithoutDefault_default(defaultTheme);
|
|
@@ -2300,14 +2594,13 @@ function useTheme2(defaultTheme = systemDefaultTheme) {
|
|
|
2300
2594
|
var useTheme_default = useTheme2;
|
|
2301
2595
|
|
|
2302
2596
|
// node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js
|
|
2303
|
-
var _excluded3 = ["sx"];
|
|
2304
2597
|
var splitProps = (props) => {
|
|
2305
|
-
var
|
|
2598
|
+
var _a, _b;
|
|
2306
2599
|
const result = {
|
|
2307
2600
|
systemProps: {},
|
|
2308
2601
|
otherProps: {}
|
|
2309
2602
|
};
|
|
2310
|
-
const config = (
|
|
2603
|
+
const config = (_b = (_a = props == null ? void 0 : props.theme) == null ? void 0 : _a.unstable_sxConfig) != null ? _b : defaultSxConfig_default;
|
|
2311
2604
|
Object.keys(props).forEach((prop) => {
|
|
2312
2605
|
if (config[prop]) {
|
|
2313
2606
|
result.systemProps[prop] = props[prop];
|
|
@@ -2318,9 +2611,11 @@ var splitProps = (props) => {
|
|
|
2318
2611
|
return result;
|
|
2319
2612
|
};
|
|
2320
2613
|
function extendSxProp(props) {
|
|
2321
|
-
const {
|
|
2614
|
+
const _a = props, {
|
|
2322
2615
|
sx: inSx
|
|
2323
|
-
} =
|
|
2616
|
+
} = _a, other = __objRest(_a, [
|
|
2617
|
+
"sx"
|
|
2618
|
+
]);
|
|
2324
2619
|
const {
|
|
2325
2620
|
systemProps,
|
|
2326
2621
|
otherProps
|
|
@@ -2334,20 +2629,20 @@ function extendSxProp(props) {
|
|
|
2334
2629
|
if (!isPlainObject(result)) {
|
|
2335
2630
|
return systemProps;
|
|
2336
2631
|
}
|
|
2337
|
-
return
|
|
2632
|
+
return __spreadValues(__spreadValues({}, systemProps), result);
|
|
2338
2633
|
};
|
|
2339
2634
|
} else {
|
|
2340
|
-
finalSx =
|
|
2635
|
+
finalSx = __spreadValues(__spreadValues({}, systemProps), inSx);
|
|
2341
2636
|
}
|
|
2342
|
-
return
|
|
2637
|
+
return __spreadProps(__spreadValues({}, otherProps), {
|
|
2343
2638
|
sx: finalSx
|
|
2344
2639
|
});
|
|
2345
2640
|
}
|
|
2346
2641
|
|
|
2347
2642
|
// node_modules/@mui/system/esm/Box/Box.js
|
|
2348
|
-
var import_prop_types2 = __toESM(require_prop_types());
|
|
2643
|
+
var import_prop_types2 = __toESM(require_prop_types(), 1);
|
|
2349
2644
|
|
|
2350
|
-
// node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js
|
|
2645
|
+
// node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js
|
|
2351
2646
|
var defaultGenerator = (componentName) => componentName;
|
|
2352
2647
|
var createClassNameGenerator = () => {
|
|
2353
2648
|
let generate = defaultGenerator;
|
|
@@ -2366,34 +2661,27 @@ var createClassNameGenerator = () => {
|
|
|
2366
2661
|
var ClassNameGenerator = createClassNameGenerator();
|
|
2367
2662
|
var ClassNameGenerator_default = ClassNameGenerator;
|
|
2368
2663
|
|
|
2369
|
-
// node_modules/@mui/system/esm/createBox.js
|
|
2664
|
+
// node_modules/@mui/system/esm/createBox/createBox.js
|
|
2370
2665
|
|
|
2371
2666
|
|
|
2372
2667
|
// node_modules/clsx/dist/clsx.mjs
|
|
2373
2668
|
function r(e) {
|
|
2374
2669
|
var t, f, n = "";
|
|
2375
|
-
if ("string" == typeof e || "number" == typeof e)
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
for (t = 0; t < o; t++)
|
|
2381
|
-
e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
2382
|
-
} else
|
|
2383
|
-
for (f in e)
|
|
2384
|
-
e[f] && (n && (n += " "), n += f);
|
|
2670
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
2671
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
2672
|
+
var o = e.length;
|
|
2673
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
2674
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
2385
2675
|
return n;
|
|
2386
2676
|
}
|
|
2387
2677
|
function clsx() {
|
|
2388
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++)
|
|
2389
|
-
(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
2678
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
2390
2679
|
return n;
|
|
2391
2680
|
}
|
|
2392
2681
|
var clsx_default = clsx;
|
|
2393
2682
|
|
|
2394
|
-
// node_modules/@mui/system/esm/createBox.js
|
|
2683
|
+
// node_modules/@mui/system/esm/createBox/createBox.js
|
|
2395
2684
|
var _jsxruntime = require('react/jsx-runtime');
|
|
2396
|
-
var _excluded4 = ["className", "component"];
|
|
2397
2685
|
function createBox(options = {}) {
|
|
2398
2686
|
const {
|
|
2399
2687
|
themeId,
|
|
@@ -2404,13 +2692,16 @@ function createBox(options = {}) {
|
|
|
2404
2692
|
const BoxRoot = styled("div", {
|
|
2405
2693
|
shouldForwardProp: (prop) => prop !== "theme" && prop !== "sx" && prop !== "as"
|
|
2406
2694
|
})(styleFunctionSx_default);
|
|
2407
|
-
const Box9 = /* @__PURE__ */
|
|
2695
|
+
const Box9 = /* @__PURE__ */ React4.forwardRef(function Box10(inProps, ref) {
|
|
2408
2696
|
const theme = useTheme_default(defaultTheme);
|
|
2409
|
-
const
|
|
2697
|
+
const _a = extendSxProp(inProps), {
|
|
2410
2698
|
className,
|
|
2411
2699
|
component = "div"
|
|
2412
|
-
} =
|
|
2413
|
-
|
|
2700
|
+
} = _a, other = __objRest(_a, [
|
|
2701
|
+
"className",
|
|
2702
|
+
"component"
|
|
2703
|
+
]);
|
|
2704
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BoxRoot, __spreadValues({
|
|
2414
2705
|
as: component,
|
|
2415
2706
|
ref,
|
|
2416
2707
|
className: clsx_default(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
|
|
@@ -2420,7 +2711,7 @@ function createBox(options = {}) {
|
|
|
2420
2711
|
return Box9;
|
|
2421
2712
|
}
|
|
2422
2713
|
|
|
2423
|
-
// node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js
|
|
2714
|
+
// node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js
|
|
2424
2715
|
var globalStateClasses = {
|
|
2425
2716
|
active: "active",
|
|
2426
2717
|
checked: "checked",
|
|
@@ -2440,7 +2731,7 @@ function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") {
|
|
|
2440
2731
|
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator_default.generate(componentName)}-${slot}`;
|
|
2441
2732
|
}
|
|
2442
2733
|
|
|
2443
|
-
// node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js
|
|
2734
|
+
// node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js
|
|
2444
2735
|
function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
|
|
2445
2736
|
const result = {};
|
|
2446
2737
|
slots.forEach((slot) => {
|
|
@@ -2528,19 +2819,15 @@ var FiltersBar = ({
|
|
|
2528
2819
|
|
|
2529
2820
|
// src/components/Grid/utils.ts
|
|
2530
2821
|
function filterData(filters, defaultData) {
|
|
2531
|
-
if (filters.length === 0)
|
|
2532
|
-
return defaultData.current;
|
|
2822
|
+
if (filters.length === 0) return defaultData.current;
|
|
2533
2823
|
const filteredArray = defaultData.current.slice(0).filter((item) => {
|
|
2534
2824
|
let satisfiedFilter = 0;
|
|
2535
2825
|
filters.forEach((sub) => {
|
|
2536
2826
|
let currentValue = getPropertyValue(item, sub.column);
|
|
2537
|
-
if (sub.transformer)
|
|
2538
|
-
|
|
2539
|
-
if (String(currentValue) === String(sub.value))
|
|
2540
|
-
satisfiedFilter += 1;
|
|
2827
|
+
if (sub.transformer) currentValue = sub.transformer(currentValue);
|
|
2828
|
+
if (String(currentValue) === String(sub.value)) satisfiedFilter += 1;
|
|
2541
2829
|
});
|
|
2542
|
-
if (satisfiedFilter === filters.length)
|
|
2543
|
-
return true;
|
|
2830
|
+
if (satisfiedFilter === filters.length) return true;
|
|
2544
2831
|
return false;
|
|
2545
2832
|
});
|
|
2546
2833
|
return filteredArray;
|
|
@@ -2617,13 +2904,11 @@ var Grid = (props) => {
|
|
|
2617
2904
|
}) => {
|
|
2618
2905
|
setRowsPerPage(parseInt(target.value));
|
|
2619
2906
|
const maxPage = Math.floor(countRows / rowsPerPage);
|
|
2620
|
-
if (page > maxPage)
|
|
2621
|
-
setPage(maxPage);
|
|
2907
|
+
if (page > maxPage) setPage(maxPage);
|
|
2622
2908
|
};
|
|
2623
2909
|
function handleSort(data) {
|
|
2624
2910
|
const sortable = data.slice(0);
|
|
2625
|
-
if (order === void 0)
|
|
2626
|
-
return sortable;
|
|
2911
|
+
if (order === void 0) return sortable;
|
|
2627
2912
|
sortable.sort((a, b) => {
|
|
2628
2913
|
const x = a[orderBy];
|
|
2629
2914
|
const y = b[orderBy];
|
|
@@ -2641,16 +2926,14 @@ var Grid = (props) => {
|
|
|
2641
2926
|
const filterAlreadyExists = selectedFilters.some(
|
|
2642
2927
|
(filter) => filter.column === column.name && filter.value === selectedFilterValue
|
|
2643
2928
|
);
|
|
2644
|
-
if (filterAlreadyExists)
|
|
2645
|
-
return;
|
|
2929
|
+
if (filterAlreadyExists) return;
|
|
2646
2930
|
setSelectedFilters([...selectedFilters, newFilter]);
|
|
2647
2931
|
}
|
|
2648
2932
|
function handleCloseFilter(item) {
|
|
2649
2933
|
const filterToDelete = selectedFilters.find(
|
|
2650
2934
|
(filter) => filter.column === item.column && filter.value === item.value
|
|
2651
2935
|
);
|
|
2652
|
-
if (!filterToDelete)
|
|
2653
|
-
return;
|
|
2936
|
+
if (!filterToDelete) return;
|
|
2654
2937
|
const filteredSelectedFilters = selectedFilters.filter(
|
|
2655
2938
|
(_, index) => selectedFilters.indexOf(filterToDelete) !== index
|
|
2656
2939
|
);
|
|
@@ -2668,8 +2951,7 @@ var Grid = (props) => {
|
|
|
2668
2951
|
}
|
|
2669
2952
|
_react.useEffect.call(void 0, () => {
|
|
2670
2953
|
const maxPage = Math.floor(countRows / rowsPerPage);
|
|
2671
|
-
if (page > maxPage)
|
|
2672
|
-
setPage(maxPage - 1);
|
|
2954
|
+
if (page > maxPage) setPage(maxPage - 1);
|
|
2673
2955
|
}, [countRows]);
|
|
2674
2956
|
_react.useEffect.call(void 0, () => {
|
|
2675
2957
|
if (order) {
|
|
@@ -2725,8 +3007,7 @@ var Grid = (props) => {
|
|
|
2725
3007
|
const newArray = searchText.length > 0 ? handleFilterBySearch(searchText) : defaultData;
|
|
2726
3008
|
newArray.forEach((item) => {
|
|
2727
3009
|
const value = prop.transformer ? prop.transformer(getPropertyValue(item, prop.name)) : String(getPropertyValue(item, prop.name));
|
|
2728
|
-
if (!values2.includes(value))
|
|
2729
|
-
values2.push(value);
|
|
3010
|
+
if (!values2.includes(value)) values2.push(value);
|
|
2730
3011
|
});
|
|
2731
3012
|
setValuesToFilter(values2);
|
|
2732
3013
|
}
|
|
@@ -2932,8 +3213,7 @@ var DefaultInput = (allProps) => {
|
|
|
2932
3213
|
handleCancelEditing
|
|
2933
3214
|
} = allProps;
|
|
2934
3215
|
const formatDefaultValue = (value) => {
|
|
2935
|
-
if (formatInputDefautvalue)
|
|
2936
|
-
return formatInputDefautvalue(value);
|
|
3216
|
+
if (formatInputDefautvalue) return formatInputDefautvalue(value);
|
|
2937
3217
|
switch (type) {
|
|
2938
3218
|
case "date":
|
|
2939
3219
|
return _moment2.default.call(void 0, value).format("YYYY-MM-DD");
|
|
@@ -2956,10 +3236,8 @@ var DefaultInput = (allProps) => {
|
|
|
2956
3236
|
onSave(response);
|
|
2957
3237
|
};
|
|
2958
3238
|
const onKeyDown = (ev) => {
|
|
2959
|
-
if (ev.code === "Enter")
|
|
2960
|
-
|
|
2961
|
-
if (ev.code === "Escape")
|
|
2962
|
-
handleCancelEditing();
|
|
3239
|
+
if (ev.code === "Enter") handleSave(ev);
|
|
3240
|
+
if (ev.code === "Escape") handleCancelEditing();
|
|
2963
3241
|
};
|
|
2964
3242
|
return /* @__PURE__ */ React2.default.createElement(
|
|
2965
3243
|
_material.TextField,
|
|
@@ -3025,14 +3303,11 @@ var InputMask = (allProps) => {
|
|
|
3025
3303
|
onSave(response);
|
|
3026
3304
|
};
|
|
3027
3305
|
const onKeyDown = (ev) => {
|
|
3028
|
-
if (ev.code === "Enter")
|
|
3029
|
-
|
|
3030
|
-
if (ev.code === "Escape")
|
|
3031
|
-
handleCancelEditing();
|
|
3306
|
+
if (ev.code === "Enter") handleSave(ev);
|
|
3307
|
+
if (ev.code === "Escape") handleCancelEditing();
|
|
3032
3308
|
};
|
|
3033
3309
|
_react.useEffect.call(void 0, () => {
|
|
3034
|
-
if (rowData == null ? void 0 : rowData[name])
|
|
3035
|
-
setValue(String(rowData == null ? void 0 : rowData[name]));
|
|
3310
|
+
if (rowData == null ? void 0 : rowData[name]) setValue(String(rowData == null ? void 0 : rowData[name]));
|
|
3036
3311
|
}, [rowData == null ? void 0 : rowData[name]]);
|
|
3037
3312
|
return /* @__PURE__ */ React2.default.createElement(
|
|
3038
3313
|
_material.TextField,
|
|
@@ -3097,8 +3372,7 @@ var EditableTableCell = (allProps) => {
|
|
|
3097
3372
|
const [value, setValue] = _react.useState.call(void 0, rowData == null ? void 0 : rowData[name]);
|
|
3098
3373
|
const handleCancelEditing = () => {
|
|
3099
3374
|
setIsEditing(false);
|
|
3100
|
-
if (onCancel)
|
|
3101
|
-
onCancel();
|
|
3375
|
+
if (onCancel) onCancel();
|
|
3102
3376
|
};
|
|
3103
3377
|
return /* @__PURE__ */ React2.default.createElement(
|
|
3104
3378
|
_material.TableCell,
|
|
@@ -3151,10 +3425,8 @@ var EditableTableCell = (allProps) => {
|
|
|
3151
3425
|
var _formik = require('formik');
|
|
3152
3426
|
var Input = (_a) => {
|
|
3153
3427
|
var _b = _a, { withFormik = true } = _b, rest = __objRest(_b, ["withFormik"]);
|
|
3154
|
-
if (withFormik)
|
|
3155
|
-
|
|
3156
|
-
else
|
|
3157
|
-
return /* @__PURE__ */ React2.default.createElement(BaseInput, __spreadValues({}, rest));
|
|
3428
|
+
if (withFormik) return /* @__PURE__ */ React2.default.createElement(FormikInput, __spreadValues({}, rest));
|
|
3429
|
+
else return /* @__PURE__ */ React2.default.createElement(BaseInput, __spreadValues({}, rest));
|
|
3158
3430
|
};
|
|
3159
3431
|
var BaseInput = (props) => {
|
|
3160
3432
|
return /* @__PURE__ */ React2.default.createElement(_material.TextField, __spreadValues({ fullWidth: true }, props));
|
|
@@ -3182,10 +3454,8 @@ var FormikInput = (_a) => {
|
|
|
3182
3454
|
|
|
3183
3455
|
function InputMask2(_a) {
|
|
3184
3456
|
var _b = _a, { withFormik = true } = _b, rest = __objRest(_b, ["withFormik"]);
|
|
3185
|
-
if (withFormik)
|
|
3186
|
-
|
|
3187
|
-
else
|
|
3188
|
-
return /* @__PURE__ */ React2.default.createElement(BaseInputMask, __spreadValues({}, rest));
|
|
3457
|
+
if (withFormik) return /* @__PURE__ */ React2.default.createElement(FormikInputMask, __spreadValues({}, rest));
|
|
3458
|
+
else return /* @__PURE__ */ React2.default.createElement(BaseInputMask, __spreadValues({}, rest));
|
|
3189
3459
|
}
|
|
3190
3460
|
var BaseInputMask = (_a) => {
|
|
3191
3461
|
var _b = _a, {
|
|
@@ -3203,14 +3473,12 @@ var BaseInputMask = (_a) => {
|
|
|
3203
3473
|
mask,
|
|
3204
3474
|
{
|
|
3205
3475
|
onAccept: (...params) => {
|
|
3206
|
-
if (onChangeValue)
|
|
3207
|
-
onChangeValue(params[0], unmaskedValue);
|
|
3476
|
+
if (onChangeValue) onChangeValue(params[0], unmaskedValue);
|
|
3208
3477
|
}
|
|
3209
3478
|
}
|
|
3210
3479
|
);
|
|
3211
3480
|
_react.useEffect.call(void 0, () => {
|
|
3212
|
-
if (!value)
|
|
3213
|
-
setValue(String(defaultValue));
|
|
3481
|
+
if (!value) setValue(String(defaultValue));
|
|
3214
3482
|
maskRef.current.value = String(defaultValue);
|
|
3215
3483
|
}, [defaultValue]);
|
|
3216
3484
|
_react.useEffect.call(void 0, () => {
|
|
@@ -3232,8 +3500,9 @@ function FormikInputMask(_a) {
|
|
|
3232
3500
|
const { ref, value, unmaskedValue, maskRef, setValue } = _reactimask.useIMask.call(void 0,
|
|
3233
3501
|
mask
|
|
3234
3502
|
);
|
|
3235
|
-
const initialValue = _react.useRef.call(void 0, );
|
|
3236
|
-
const formikSaveFunction = _react.useRef.call(void 0, )
|
|
3503
|
+
const initialValue = _react.useRef.call(void 0, "");
|
|
3504
|
+
const formikSaveFunction = _react.useRef.call(void 0, () => {
|
|
3505
|
+
});
|
|
3237
3506
|
_react.useEffect.call(void 0, () => {
|
|
3238
3507
|
if (!value && defaultValue) {
|
|
3239
3508
|
setValue(String(defaultValue));
|
|
@@ -3280,10 +3549,8 @@ function FormikInputMask(_a) {
|
|
|
3280
3549
|
var CustomInputLabel = _material.InputLabel;
|
|
3281
3550
|
function Select(_a) {
|
|
3282
3551
|
var _b = _a, { withFormik = true } = _b, rest = __objRest(_b, ["withFormik"]);
|
|
3283
|
-
if (withFormik)
|
|
3284
|
-
|
|
3285
|
-
else
|
|
3286
|
-
return /* @__PURE__ */ React2.default.createElement(BaseSelect, __spreadValues({}, rest));
|
|
3552
|
+
if (withFormik) return /* @__PURE__ */ React2.default.createElement(FormikSelect, __spreadValues({}, rest));
|
|
3553
|
+
else return /* @__PURE__ */ React2.default.createElement(BaseSelect, __spreadValues({}, rest));
|
|
3287
3554
|
}
|
|
3288
3555
|
function BaseSelect(_a) {
|
|
3289
3556
|
var _b = _a, {
|
|
@@ -3416,8 +3683,7 @@ function FormikAutocompleteLegacy(_a) {
|
|
|
3416
3683
|
}), _c = _a2, { value } = _c, field = __objRest(_c, ["value"]), [meta, { setValue }] = _b2;
|
|
3417
3684
|
const [defaultOption] = _react.useState.call(void 0, () => {
|
|
3418
3685
|
const key = option == null ? void 0 : option.key;
|
|
3419
|
-
if (key)
|
|
3420
|
-
return props.options.find((option2) => option2[key] === value);
|
|
3686
|
+
if (key) return props.options.find((option2) => option2[key] === value);
|
|
3421
3687
|
return props.options.find(
|
|
3422
3688
|
(option2) => Object.values(option2)[0] === value
|
|
3423
3689
|
);
|
|
@@ -3428,22 +3694,17 @@ function FormikAutocompleteLegacy(_a) {
|
|
|
3428
3694
|
setValue(getOptionValue(newValue));
|
|
3429
3695
|
} else if (value2) {
|
|
3430
3696
|
setValue(newValue[value2]);
|
|
3431
|
-
} else
|
|
3432
|
-
setValue(newValue);
|
|
3697
|
+
} else setValue(newValue);
|
|
3433
3698
|
};
|
|
3434
3699
|
const getOptionLabel = (item) => {
|
|
3435
|
-
if (props == null ? void 0 : props.getOptionLabel)
|
|
3436
|
-
|
|
3437
|
-
if (option == null ? void 0 : option.label)
|
|
3438
|
-
return String(item[option.label]);
|
|
3700
|
+
if (props == null ? void 0 : props.getOptionLabel) return props.getOptionLabel(item);
|
|
3701
|
+
if (option == null ? void 0 : option.label) return String(item[option.label]);
|
|
3439
3702
|
return "[getOptionLabel] error";
|
|
3440
3703
|
};
|
|
3441
3704
|
const isOptionEqualToValue = (a, b) => {
|
|
3442
3705
|
const key = option == null ? void 0 : option.key;
|
|
3443
|
-
if (props == null ? void 0 : props.isOptionEqualToValue)
|
|
3444
|
-
|
|
3445
|
-
if (key)
|
|
3446
|
-
return a[key] === b[key];
|
|
3706
|
+
if (props == null ? void 0 : props.isOptionEqualToValue) return props.isOptionEqualToValue(a, b);
|
|
3707
|
+
if (key) return a[key] === b[key];
|
|
3447
3708
|
return Object.values(a)[0] === Object.values(b)[0];
|
|
3448
3709
|
};
|
|
3449
3710
|
return /* @__PURE__ */ React2.default.createElement(
|
|
@@ -3488,8 +3749,7 @@ function FormikAutocomplete(_a) {
|
|
|
3488
3749
|
setValue(getOptionValue(newValue));
|
|
3489
3750
|
} else if (value2) {
|
|
3490
3751
|
setValue(newValue[value2]);
|
|
3491
|
-
} else
|
|
3492
|
-
setValue(newValue);
|
|
3752
|
+
} else setValue(newValue);
|
|
3493
3753
|
};
|
|
3494
3754
|
return /* @__PURE__ */ React2.default.createElement(
|
|
3495
3755
|
_material.Autocomplete,
|
|
@@ -3529,10 +3789,8 @@ var Checkbox = (_a) => {
|
|
|
3529
3789
|
"withFormik",
|
|
3530
3790
|
"name"
|
|
3531
3791
|
]);
|
|
3532
|
-
if (withFormik && name)
|
|
3533
|
-
|
|
3534
|
-
else
|
|
3535
|
-
return /* @__PURE__ */ React2.default.createElement(BaseCheckbox, __spreadValues({}, props));
|
|
3792
|
+
if (withFormik && name) return /* @__PURE__ */ React2.default.createElement(FormikCheckbox, __spreadValues({ name }, props));
|
|
3793
|
+
else return /* @__PURE__ */ React2.default.createElement(BaseCheckbox, __spreadValues({}, props));
|
|
3536
3794
|
};
|
|
3537
3795
|
var BaseCheckbox = (_a) => {
|
|
3538
3796
|
var _b = _a, {
|
|
@@ -3586,10 +3844,8 @@ var FormikCheckbox = (_a) => {
|
|
|
3586
3844
|
|
|
3587
3845
|
var Switch = (_a) => {
|
|
3588
3846
|
var _b = _a, { withFormik = true, name } = _b, props = __objRest(_b, ["withFormik", "name"]);
|
|
3589
|
-
if (withFormik && name)
|
|
3590
|
-
|
|
3591
|
-
else
|
|
3592
|
-
return /* @__PURE__ */ React2.default.createElement(BaseSwitch, __spreadValues({}, props));
|
|
3847
|
+
if (withFormik && name) return /* @__PURE__ */ React2.default.createElement(FormikSwitch, __spreadValues({ name }, props));
|
|
3848
|
+
else return /* @__PURE__ */ React2.default.createElement(BaseSwitch, __spreadValues({}, props));
|
|
3593
3849
|
};
|
|
3594
3850
|
var BaseSwitch = (_a) => {
|
|
3595
3851
|
var _b = _a, {
|
|
@@ -3651,10 +3907,8 @@ var Radio = (_a) => {
|
|
|
3651
3907
|
"name",
|
|
3652
3908
|
"withFormik"
|
|
3653
3909
|
]);
|
|
3654
|
-
if (withFormik && name)
|
|
3655
|
-
|
|
3656
|
-
else
|
|
3657
|
-
return /* @__PURE__ */ React2.default.createElement(BaseRadio, __spreadValues({}, rest));
|
|
3910
|
+
if (withFormik && name) return /* @__PURE__ */ React2.default.createElement(FormikRadio, __spreadValues({ name }, rest));
|
|
3911
|
+
else return /* @__PURE__ */ React2.default.createElement(BaseRadio, __spreadValues({}, rest));
|
|
3658
3912
|
};
|
|
3659
3913
|
var BaseRadio = (_a) => {
|
|
3660
3914
|
var _b = _a, {
|
|
@@ -3846,8 +4100,7 @@ var styles = {
|
|
|
3846
4100
|
};
|
|
3847
4101
|
},
|
|
3848
4102
|
bordered: function(active) {
|
|
3849
|
-
if (!active)
|
|
3850
|
-
return {};
|
|
4103
|
+
if (!active) return {};
|
|
3851
4104
|
return {
|
|
3852
4105
|
"tr td, tr th": {
|
|
3853
4106
|
borderColor: "divider"
|
|
@@ -3859,8 +4112,7 @@ var styles = {
|
|
|
3859
4112
|
};
|
|
3860
4113
|
},
|
|
3861
4114
|
striped: function(active) {
|
|
3862
|
-
if (!active)
|
|
3863
|
-
return {};
|
|
4115
|
+
if (!active) return {};
|
|
3864
4116
|
return {
|
|
3865
4117
|
"tr:nth-of-type(even)": {
|
|
3866
4118
|
transition: "background-color ease 200ms",
|
|
@@ -4073,22 +4325,22 @@ var _colors = require('@mui/material/colors');
|
|
|
4073
4325
|
function UseDialogConfirm() {
|
|
4074
4326
|
const [opened, setOpened] = _react.useState.call(void 0, false);
|
|
4075
4327
|
const [isLoading, setLoading] = _react.useState.call(void 0, false);
|
|
4076
|
-
const onConfirmFn = _react.useRef.call(void 0, )
|
|
4328
|
+
const onConfirmFn = _react.useRef.call(void 0, () => __async(null, null, function* () {
|
|
4329
|
+
}));
|
|
4077
4330
|
const paramsFn = _react.useRef.call(void 0, []);
|
|
4078
4331
|
const onConfirm = (fn) => {
|
|
4079
4332
|
onConfirmFn.current = fn;
|
|
4080
|
-
return (...params) => __async(
|
|
4333
|
+
return (...params) => __async(null, null, function* () {
|
|
4081
4334
|
paramsFn.current = params;
|
|
4082
4335
|
setOpened(true);
|
|
4083
4336
|
});
|
|
4084
4337
|
};
|
|
4085
|
-
const onProceed = (event) => __async(
|
|
4338
|
+
const onProceed = (event) => __async(null, null, function* () {
|
|
4086
4339
|
event == null ? void 0 : event.preventDefault();
|
|
4087
4340
|
event == null ? void 0 : event.stopPropagation();
|
|
4088
4341
|
setLoading(true);
|
|
4089
4342
|
try {
|
|
4090
|
-
if (!onConfirmFn.current)
|
|
4091
|
-
return;
|
|
4343
|
+
if (!onConfirmFn.current) return;
|
|
4092
4344
|
yield onConfirmFn.current(...paramsFn.current);
|
|
4093
4345
|
} finally {
|
|
4094
4346
|
setOpened(false);
|
|
@@ -4101,8 +4353,7 @@ function UseDialogConfirm() {
|
|
|
4101
4353
|
setOpened(false);
|
|
4102
4354
|
};
|
|
4103
4355
|
const onCloseModal = () => {
|
|
4104
|
-
if (isLoading)
|
|
4105
|
-
return;
|
|
4356
|
+
if (isLoading) return;
|
|
4106
4357
|
setOpened(false);
|
|
4107
4358
|
};
|
|
4108
4359
|
return {
|
|
@@ -4254,8 +4505,7 @@ var BaseDialogHeader = (_a) => {
|
|
|
4254
4505
|
const { name } = useBaseDialogInstance();
|
|
4255
4506
|
const { close: closeDialog } = useBaseDialog();
|
|
4256
4507
|
function handleClose() {
|
|
4257
|
-
if (onClose)
|
|
4258
|
-
return onClose();
|
|
4508
|
+
if (onClose) return onClose();
|
|
4259
4509
|
closeDialog(name);
|
|
4260
4510
|
}
|
|
4261
4511
|
return /* @__PURE__ */ React2.default.createElement(
|
|
@@ -4299,15 +4549,14 @@ var BaseDialogTrigger = (_a) => {
|
|
|
4299
4549
|
_material.Button,
|
|
4300
4550
|
__spreadProps(__spreadValues({}, props), {
|
|
4301
4551
|
onClick: (...params) => {
|
|
4302
|
-
if (onClick)
|
|
4303
|
-
onClick(...params);
|
|
4552
|
+
if (onClick) onClick(...params);
|
|
4304
4553
|
open(name);
|
|
4305
4554
|
}
|
|
4306
4555
|
}),
|
|
4307
4556
|
props.children
|
|
4308
4557
|
);
|
|
4309
4558
|
};
|
|
4310
|
-
var BaseDialogCreate = (name = Symbol()) => {
|
|
4559
|
+
var BaseDialogCreate = (name = /* @__PURE__ */ Symbol()) => {
|
|
4311
4560
|
return {
|
|
4312
4561
|
name,
|
|
4313
4562
|
Trigger: (props) => /* @__PURE__ */ React2.default.createElement(BaseDialogTrigger, __spreadValues({ name }, props)),
|
|
@@ -4358,7 +4607,7 @@ var VALID_METHODS = [
|
|
|
4358
4607
|
"TRACE",
|
|
4359
4608
|
"PATCH"
|
|
4360
4609
|
];
|
|
4361
|
-
var
|
|
4610
|
+
var _ApiHelper = class _ApiHelper {
|
|
4362
4611
|
onFinally(req, res) {
|
|
4363
4612
|
return __async(this, null, function* () {
|
|
4364
4613
|
});
|
|
@@ -4381,13 +4630,11 @@ var ApiHelper = class _ApiHelper {
|
|
|
4381
4630
|
createMethods(methods) {
|
|
4382
4631
|
return (req, res) => __async(this, null, function* () {
|
|
4383
4632
|
const currentMethod = methods[req.method] || methods.ALL;
|
|
4384
|
-
if (req.method === "OPTIONS")
|
|
4385
|
-
return res.status(200).end();
|
|
4633
|
+
if (req.method === "OPTIONS") return res.status(200).end();
|
|
4386
4634
|
try {
|
|
4387
4635
|
if (!VALID_METHODS.includes(req.method))
|
|
4388
4636
|
throw new HttpError(405, "M\xE9todo inv\xE1lido");
|
|
4389
|
-
if (!currentMethod)
|
|
4390
|
-
throw new HttpError(500, "M\xE9todo n\xE3o encontrado");
|
|
4637
|
+
if (!currentMethod) throw new HttpError(500, "M\xE9todo n\xE3o encontrado");
|
|
4391
4638
|
const methodWithMiddlewares = this.middlewares.reduce(
|
|
4392
4639
|
(acc, fn) => fn(acc),
|
|
4393
4640
|
currentMethod
|
|
@@ -4425,19 +4672,14 @@ var ApiHelper = class _ApiHelper {
|
|
|
4425
4672
|
});
|
|
4426
4673
|
}
|
|
4427
4674
|
}
|
|
4428
|
-
static parseQueyFilters(filters) {
|
|
4429
|
-
return Object.entries(filters).reduce((acc, [key, value]) => {
|
|
4430
|
-
if (value)
|
|
4431
|
-
acc[key] = value;
|
|
4432
|
-
return acc;
|
|
4433
|
-
}, {});
|
|
4434
|
-
}
|
|
4435
4675
|
static create({ onFinally }) {
|
|
4436
4676
|
return new _ApiHelper({
|
|
4437
4677
|
onFinally
|
|
4438
4678
|
});
|
|
4439
4679
|
}
|
|
4440
4680
|
};
|
|
4681
|
+
_ApiHelper.parse = _ApiHelper.parserErrorWrapper;
|
|
4682
|
+
var ApiHelper = _ApiHelper;
|
|
4441
4683
|
|
|
4442
4684
|
// src/hooks/useFormHelper.ts
|
|
4443
4685
|
|
|
@@ -4525,8 +4767,7 @@ function useLoading() {
|
|
|
4525
4767
|
const setLoading = _react.useCallback.call(void 0, (prop, remove) => {
|
|
4526
4768
|
if (remove)
|
|
4527
4769
|
setState((prevState) => prevState.filter((state2) => state2 !== prop));
|
|
4528
|
-
else
|
|
4529
|
-
setState((prevState) => [...prevState, prop]);
|
|
4770
|
+
else setState((prevState) => [...prevState, prop]);
|
|
4530
4771
|
}, []);
|
|
4531
4772
|
return { isLoading, setLoading };
|
|
4532
4773
|
}
|
|
@@ -4549,7 +4790,7 @@ function useFormHelper() {
|
|
|
4549
4790
|
const sourceRef = _react.useRef.call(void 0, new AbortController());
|
|
4550
4791
|
const onSubmitWrapper = _react.useCallback.call(void 0,
|
|
4551
4792
|
(fn, { name }) => {
|
|
4552
|
-
return (fields, methods) => __async(
|
|
4793
|
+
return (fields, methods) => __async(null, null, function* () {
|
|
4553
4794
|
const LOADING_NAME = name;
|
|
4554
4795
|
setLoading(LOADING_NAME);
|
|
4555
4796
|
try {
|
|
@@ -4565,7 +4806,7 @@ function useFormHelper() {
|
|
|
4565
4806
|
);
|
|
4566
4807
|
const onRequestWrapper = _react.useCallback.call(void 0,
|
|
4567
4808
|
(fn, { name }) => {
|
|
4568
|
-
return (...params) => __async(
|
|
4809
|
+
return (...params) => __async(null, null, function* () {
|
|
4569
4810
|
const LOADING_NAME = name;
|
|
4570
4811
|
setLoading(LOADING_NAME);
|
|
4571
4812
|
api.interceptors.request.use(
|
|
@@ -4593,8 +4834,7 @@ function useFormHelper() {
|
|
|
4593
4834
|
);
|
|
4594
4835
|
const errorHandler = _react.useCallback.call(void 0,
|
|
4595
4836
|
(error, callback) => {
|
|
4596
|
-
if ((error == null ? void 0 : error.message) === "cancel.navigation")
|
|
4597
|
-
return;
|
|
4837
|
+
if ((error == null ? void 0 : error.message) === "cancel.navigation") return;
|
|
4598
4838
|
if (callback) {
|
|
4599
4839
|
if (error.response.data.code === "invalid.body") {
|
|
4600
4840
|
const errors = error.response.data.details.issues;
|
|
@@ -4699,8 +4939,7 @@ var AuthHelper = class {
|
|
|
4699
4939
|
}
|
|
4700
4940
|
handler(req, res) {
|
|
4701
4941
|
return __async(this, null, function* () {
|
|
4702
|
-
if (!req.url)
|
|
4703
|
-
return res.status(400).json({ error: "url not sent" });
|
|
4942
|
+
if (!req.url) return res.status(400).json({ error: "url not sent" });
|
|
4704
4943
|
if (req.url.endsWith("/login")) {
|
|
4705
4944
|
const loginResult = yield this.onLogin(req.body);
|
|
4706
4945
|
if (loginResult.status === "sucess") {
|
|
@@ -4737,8 +4976,7 @@ var AuthHelper = class {
|
|
|
4737
4976
|
sessionTokenName: this.cookies.sessionToken,
|
|
4738
4977
|
validate: false
|
|
4739
4978
|
});
|
|
4740
|
-
if (error)
|
|
4741
|
-
return;
|
|
4979
|
+
if (error) return;
|
|
4742
4980
|
const userId = String(req.user);
|
|
4743
4981
|
const refreshToken = _nookies.parseCookies.call(void 0, { req })[this.cookies.refreshToken];
|
|
4744
4982
|
if (!refreshToken) {
|
|
@@ -4786,8 +5024,7 @@ var AuthHelper = class {
|
|
|
4786
5024
|
sessionTokenName: this.cookies.sessionToken,
|
|
4787
5025
|
validate: true
|
|
4788
5026
|
});
|
|
4789
|
-
if (error)
|
|
4790
|
-
return;
|
|
5027
|
+
if (error) return;
|
|
4791
5028
|
if (!req.user)
|
|
4792
5029
|
return res.status(400).json({ error: "Usu\xE1rio n\xE3o encontrado" });
|
|
4793
5030
|
const userData = yield this.onGetUserData(req.user);
|
|
@@ -4813,8 +5050,7 @@ var AuthHelper = class {
|
|
|
4813
5050
|
}
|
|
4814
5051
|
oauthSignInCallback(code) {
|
|
4815
5052
|
return __async(this, null, function* () {
|
|
4816
|
-
if (!this.oauth)
|
|
4817
|
-
throw new Error("OAUTH variables is not defined");
|
|
5053
|
+
if (!this.oauth) throw new Error("OAUTH variables is not defined");
|
|
4818
5054
|
const body = {
|
|
4819
5055
|
client_id: this.oauth.client_id,
|
|
4820
5056
|
scope: this.oauth.scope,
|
|
@@ -4844,8 +5080,7 @@ var AuthHelper = class {
|
|
|
4844
5080
|
onFailedDestination
|
|
4845
5081
|
}) {
|
|
4846
5082
|
return (ctx) => __async(this, null, function* () {
|
|
4847
|
-
if (!this.oauth)
|
|
4848
|
-
throw new Error("Oauth env variables are not defined");
|
|
5083
|
+
if (!this.oauth) throw new Error("Oauth env variables are not defined");
|
|
4849
5084
|
const code = ctx.query.code;
|
|
4850
5085
|
if (!code)
|
|
4851
5086
|
return {
|
|
@@ -4951,10 +5186,8 @@ function useFilter(props = { defaultFilters: [] }) {
|
|
|
4951
5186
|
};
|
|
4952
5187
|
}
|
|
4953
5188
|
function isDate(date) {
|
|
4954
|
-
if (date instanceof Date)
|
|
4955
|
-
|
|
4956
|
-
else if (String(date).endsWith("Z"))
|
|
4957
|
-
return true;
|
|
5189
|
+
if (date instanceof Date) return true;
|
|
5190
|
+
else if (String(date).endsWith("Z")) return true;
|
|
4958
5191
|
return false;
|
|
4959
5192
|
}
|
|
4960
5193
|
function compareFilter(item, filter) {
|
|
@@ -4985,8 +5218,7 @@ function compareFilter(item, filter) {
|
|
|
4985
5218
|
function createFilter(filters) {
|
|
4986
5219
|
function apply(item) {
|
|
4987
5220
|
const satisfiedFilters = filters.reduce((acc, filter) => {
|
|
4988
|
-
if (compareFilter(item, filter))
|
|
4989
|
-
acc += 1;
|
|
5221
|
+
if (compareFilter(item, filter)) acc += 1;
|
|
4990
5222
|
return acc;
|
|
4991
5223
|
}, 0);
|
|
4992
5224
|
return satisfiedFilters === filters.length;
|
|
@@ -5015,8 +5247,7 @@ function useGrid({
|
|
|
5015
5247
|
const [rowsPerPage, setRowsPerPage] = _react.useState.call(void 0, rowsPerPageOptions[0]);
|
|
5016
5248
|
const toggleSortedDirection = _react.useCallback.call(void 0,
|
|
5017
5249
|
(direction) => {
|
|
5018
|
-
if (direction === "asc")
|
|
5019
|
-
return "desc";
|
|
5250
|
+
if (direction === "asc") return "desc";
|
|
5020
5251
|
return "asc";
|
|
5021
5252
|
},
|
|
5022
5253
|
[]
|
|
@@ -5032,8 +5263,7 @@ function useGrid({
|
|
|
5032
5263
|
}, []);
|
|
5033
5264
|
const onSortBy = _react.useCallback.call(void 0,
|
|
5034
5265
|
(prop) => {
|
|
5035
|
-
if (!prop)
|
|
5036
|
-
return;
|
|
5266
|
+
if (!prop) return;
|
|
5037
5267
|
const currentSorted = sortedBy.find((p) => p.prop === prop);
|
|
5038
5268
|
if (currentSorted) {
|
|
5039
5269
|
if (currentSorted.direction === "asc") {
|
|
@@ -5041,8 +5271,7 @@ function useGrid({
|
|
|
5041
5271
|
} else {
|
|
5042
5272
|
setSortedBy((prev) => {
|
|
5043
5273
|
const newArr = prev.map((p) => {
|
|
5044
|
-
if (p.prop !== prop)
|
|
5045
|
-
return p;
|
|
5274
|
+
if (p.prop !== prop) return p;
|
|
5046
5275
|
return {
|
|
5047
5276
|
prop: p.prop,
|
|
5048
5277
|
direction: toggleSortedDirection(p.direction)
|
|
@@ -5071,31 +5300,26 @@ function useGrid({
|
|
|
5071
5300
|
({ prop, direction }) => `${symbolDir[direction]}${prop}`
|
|
5072
5301
|
);
|
|
5073
5302
|
return data.sort(_sortby2.default.call(void 0, ...formattedKeys));
|
|
5074
|
-
} else
|
|
5075
|
-
return data;
|
|
5303
|
+
} else return data;
|
|
5076
5304
|
},
|
|
5077
5305
|
[sortedBy]
|
|
5078
5306
|
);
|
|
5079
5307
|
const onPageChange = (pageNumber) => {
|
|
5080
|
-
if (pageNumber < 0)
|
|
5081
|
-
|
|
5082
|
-
if (pageNumber > totalNumberOfPages)
|
|
5083
|
-
return;
|
|
5308
|
+
if (pageNumber < 0) return;
|
|
5309
|
+
if (pageNumber > totalNumberOfPages) return;
|
|
5084
5310
|
setCurrentPage(pageNumber);
|
|
5085
5311
|
};
|
|
5086
5312
|
const onChangeRowsPerPage = _react.useCallback.call(void 0,
|
|
5087
5313
|
(rows) => {
|
|
5088
5314
|
let totalNumberOfPages2 = Math.round(filteredData.length / rows) - 1;
|
|
5089
5315
|
totalNumberOfPages2 = totalNumberOfPages2 <= 0 ? 0 : 1;
|
|
5090
|
-
if (currentPage > totalNumberOfPages2)
|
|
5091
|
-
setCurrentPage(totalNumberOfPages2);
|
|
5316
|
+
if (currentPage > totalNumberOfPages2) setCurrentPage(totalNumberOfPages2);
|
|
5092
5317
|
setRowsPerPage(rows);
|
|
5093
5318
|
},
|
|
5094
5319
|
[currentPage]
|
|
5095
5320
|
);
|
|
5096
5321
|
const orderedData = _react.useMemo.call(void 0, () => {
|
|
5097
|
-
if (sortedBy.length === 0)
|
|
5098
|
-
return defaultData;
|
|
5322
|
+
if (sortedBy.length === 0) return defaultData;
|
|
5099
5323
|
const newData = defaultData.slice(0);
|
|
5100
5324
|
const sortedData = sortData(newData);
|
|
5101
5325
|
return sortedData;
|
|
@@ -5106,8 +5330,7 @@ function useGrid({
|
|
|
5106
5330
|
const searchBy = createSearch(search);
|
|
5107
5331
|
newData = newData.filter(searchBy);
|
|
5108
5332
|
}
|
|
5109
|
-
if (!filters)
|
|
5110
|
-
return newData;
|
|
5333
|
+
if (!filters) return newData;
|
|
5111
5334
|
const newFilter = createFilter(filters);
|
|
5112
5335
|
return newData.filter(newFilter.apply);
|
|
5113
5336
|
}, [orderedData, search, filters]);
|
|
@@ -5118,8 +5341,7 @@ function useGrid({
|
|
|
5118
5341
|
}, [currentPage, rowsPerPage, filteredData]);
|
|
5119
5342
|
const totalNumberOfPages = Math.ceil(filteredData.length / rowsPerPage) - 1;
|
|
5120
5343
|
_react.useEffect.call(void 0, () => {
|
|
5121
|
-
if (externalDefaultData)
|
|
5122
|
-
setDefaultData(externalDefaultData);
|
|
5344
|
+
if (externalDefaultData) setDefaultData(externalDefaultData);
|
|
5123
5345
|
}, [externalDefaultData]);
|
|
5124
5346
|
return {
|
|
5125
5347
|
data: paginatedData,
|
|
@@ -5143,21 +5365,17 @@ function useGrid({
|
|
|
5143
5365
|
}
|
|
5144
5366
|
var isNumberOrString = (value) => ["number", "string"].includes(typeof value);
|
|
5145
5367
|
var concatenateKey = (key, prev) => {
|
|
5146
|
-
if (!prev)
|
|
5147
|
-
return key;
|
|
5368
|
+
if (!prev) return key;
|
|
5148
5369
|
return `${prev}.${key}`;
|
|
5149
5370
|
};
|
|
5150
5371
|
function searchKeysForValue(row, accKey, compare) {
|
|
5151
|
-
if (typeof row === "undefined")
|
|
5152
|
-
return false;
|
|
5372
|
+
if (typeof row === "undefined") return false;
|
|
5153
5373
|
const rowKeys = Object.keys(row);
|
|
5154
5374
|
let match = false;
|
|
5155
5375
|
for (const key of rowKeys) {
|
|
5156
|
-
if (match)
|
|
5157
|
-
break;
|
|
5376
|
+
if (match) break;
|
|
5158
5377
|
const objValue = row[key];
|
|
5159
|
-
if (!objValue)
|
|
5160
|
-
continue;
|
|
5378
|
+
if (!objValue) continue;
|
|
5161
5379
|
const concatenatedKey = concatenateKey(key, accKey);
|
|
5162
5380
|
if (Array.isArray(objValue)) {
|
|
5163
5381
|
match = objValue.some(
|
|
@@ -5177,21 +5395,17 @@ var normalize = (str) => str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
|
5177
5395
|
function createSearch(options) {
|
|
5178
5396
|
const searchValue = options.caseSensitive ? options.value : String(options.value).toLowerCase();
|
|
5179
5397
|
function getValue2(value) {
|
|
5180
|
-
if (options.caseSensitive)
|
|
5181
|
-
return String(value);
|
|
5398
|
+
if (options.caseSensitive) return String(value);
|
|
5182
5399
|
return String(value).toLowerCase();
|
|
5183
5400
|
}
|
|
5184
5401
|
function compare(key, objValue) {
|
|
5185
5402
|
if (options.ignoredKeys) {
|
|
5186
5403
|
const isIgnoredKey = options.ignoredKeys.includes(key);
|
|
5187
|
-
if (isIgnoredKey)
|
|
5188
|
-
return false;
|
|
5404
|
+
if (isIgnoredKey) return false;
|
|
5189
5405
|
}
|
|
5190
5406
|
const value = getValue2(objValue);
|
|
5191
|
-
if (options.exact)
|
|
5192
|
-
|
|
5193
|
-
if (options.ignoreAccentMark)
|
|
5194
|
-
return normalize(value).includes(normalize(searchValue));
|
|
5407
|
+
if (options.exact) return value === searchValue;
|
|
5408
|
+
if (options.ignoreAccentMark) return normalize(value).includes(normalize(searchValue));
|
|
5195
5409
|
return value.includes(searchValue);
|
|
5196
5410
|
}
|
|
5197
5411
|
return (row) => {
|
|
@@ -5225,8 +5439,7 @@ function useAsyncGrid({
|
|
|
5225
5439
|
const totalNumberOfPages = Math.ceil(totalNumberOfItems / rowsPerPage) - 1;
|
|
5226
5440
|
const toggleSortedDirection = _react.useCallback.call(void 0,
|
|
5227
5441
|
(direction) => {
|
|
5228
|
-
if (direction === "asc")
|
|
5229
|
-
return "desc";
|
|
5442
|
+
if (direction === "asc") return "desc";
|
|
5230
5443
|
return "asc";
|
|
5231
5444
|
},
|
|
5232
5445
|
[]
|
|
@@ -5235,9 +5448,8 @@ function useAsyncGrid({
|
|
|
5235
5448
|
setSortedBy((prev) => [...prev, { prop, direction }]);
|
|
5236
5449
|
}, []);
|
|
5237
5450
|
const onSortBy = _react.useCallback.call(void 0,
|
|
5238
|
-
(prop) => __async(
|
|
5239
|
-
if (!prop)
|
|
5240
|
-
return;
|
|
5451
|
+
(prop) => __async(null, null, function* () {
|
|
5452
|
+
if (!prop) return;
|
|
5241
5453
|
let finalArr = [];
|
|
5242
5454
|
const currentSorted = sortedBy.find((p) => p.prop === prop);
|
|
5243
5455
|
if (currentSorted) {
|
|
@@ -5245,8 +5457,7 @@ function useAsyncGrid({
|
|
|
5245
5457
|
finalArr = sortedBy.filter((p) => p.prop !== prop);
|
|
5246
5458
|
} else {
|
|
5247
5459
|
finalArr = sortedBy.map((p) => {
|
|
5248
|
-
if (p.prop !== prop)
|
|
5249
|
-
return p;
|
|
5460
|
+
if (p.prop !== prop) return p;
|
|
5250
5461
|
return {
|
|
5251
5462
|
prop: p.prop,
|
|
5252
5463
|
direction: toggleSortedDirection(p.direction)
|
|
@@ -5268,15 +5479,14 @@ function useAsyncGrid({
|
|
|
5268
5479
|
setDefaultData(data);
|
|
5269
5480
|
}, []);
|
|
5270
5481
|
const baseRequest = _react.useCallback.call(void 0,
|
|
5271
|
-
(_0) => __async(
|
|
5482
|
+
(_0) => __async(null, [_0], function* ({
|
|
5272
5483
|
page,
|
|
5273
5484
|
search: search2,
|
|
5274
5485
|
filters: filters2,
|
|
5275
5486
|
sortedBy: sortedBy2,
|
|
5276
5487
|
rowsPerPage: rowsPerPage2
|
|
5277
5488
|
}) {
|
|
5278
|
-
if (!axiosInstance)
|
|
5279
|
-
throw new Error("Axios instance not provided");
|
|
5489
|
+
if (!axiosInstance) throw new Error("Axios instance not provided");
|
|
5280
5490
|
try {
|
|
5281
5491
|
const params = new URLSearchParams({
|
|
5282
5492
|
page: String(page),
|
|
@@ -5298,7 +5508,7 @@ function useAsyncGrid({
|
|
|
5298
5508
|
[axiosInstance, url]
|
|
5299
5509
|
);
|
|
5300
5510
|
const updateGridContent = _react.useCallback.call(void 0,
|
|
5301
|
-
(_0) => __async(
|
|
5511
|
+
(_0) => __async(null, [_0], function* ({
|
|
5302
5512
|
page,
|
|
5303
5513
|
sortedBy: sortedBy2,
|
|
5304
5514
|
rowsPerPage: rowsPerPage2
|
|
@@ -5325,10 +5535,8 @@ function useAsyncGrid({
|
|
|
5325
5535
|
);
|
|
5326
5536
|
const onPageChange = _react.useCallback.call(void 0,
|
|
5327
5537
|
(pageNumber) => {
|
|
5328
|
-
if (pageNumber < 0)
|
|
5329
|
-
|
|
5330
|
-
if (pageNumber > totalNumberOfPages)
|
|
5331
|
-
return;
|
|
5538
|
+
if (pageNumber < 0) return;
|
|
5539
|
+
if (pageNumber > totalNumberOfPages) return;
|
|
5332
5540
|
updateGridContent({ page: pageNumber, sortedBy, rowsPerPage });
|
|
5333
5541
|
},
|
|
5334
5542
|
[updateGridContent, totalNumberOfPages, sortedBy, rowsPerPage]
|
|
@@ -5406,7 +5614,7 @@ function CreateAuthProvider({
|
|
|
5406
5614
|
const [status, setStatus] = _react.useState.call(void 0, "unauthenticated");
|
|
5407
5615
|
const { createAlert } = useAlert();
|
|
5408
5616
|
const signIn = _react.useCallback.call(void 0,
|
|
5409
|
-
(_0) => __async(
|
|
5617
|
+
(_0) => __async(null, [_0], function* ({ email, password }) {
|
|
5410
5618
|
var _a, _b;
|
|
5411
5619
|
setStatus("loading");
|
|
5412
5620
|
try {
|
|
@@ -5428,7 +5636,7 @@ function CreateAuthProvider({
|
|
|
5428
5636
|
}),
|
|
5429
5637
|
[createAlert, api]
|
|
5430
5638
|
);
|
|
5431
|
-
const ClientSignOut = _react.useCallback.call(void 0, () => __async(
|
|
5639
|
+
const ClientSignOut = _react.useCallback.call(void 0, () => __async(null, null, function* () {
|
|
5432
5640
|
yield api.get("/auth/logout");
|
|
5433
5641
|
setUser(void 0);
|
|
5434
5642
|
}), [api]);
|
|
@@ -5535,9 +5743,40 @@ object-assign/index.js:
|
|
|
5535
5743
|
@license MIT
|
|
5536
5744
|
*)
|
|
5537
5745
|
|
|
5538
|
-
|
|
5746
|
+
react-is/cjs/react-is.production.js:
|
|
5747
|
+
(**
|
|
5748
|
+
* @license React
|
|
5749
|
+
* react-is.production.js
|
|
5750
|
+
*
|
|
5751
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5752
|
+
*
|
|
5753
|
+
* This source code is licensed under the MIT license found in the
|
|
5754
|
+
* LICENSE file in the root directory of this source tree.
|
|
5755
|
+
*)
|
|
5756
|
+
|
|
5757
|
+
react-is/cjs/react-is.development.js:
|
|
5758
|
+
(**
|
|
5759
|
+
* @license React
|
|
5760
|
+
* react-is.development.js
|
|
5761
|
+
*
|
|
5762
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5763
|
+
*
|
|
5764
|
+
* This source code is licensed under the MIT license found in the
|
|
5765
|
+
* LICENSE file in the root directory of this source tree.
|
|
5766
|
+
*)
|
|
5767
|
+
|
|
5768
|
+
@mui/styled-engine/esm/index.js:
|
|
5769
|
+
(**
|
|
5770
|
+
* @mui/styled-engine v7.3.7
|
|
5771
|
+
*
|
|
5772
|
+
* @license MIT
|
|
5773
|
+
* This source code is licensed under the MIT license found in the
|
|
5774
|
+
* LICENSE file in the root directory of this source tree.
|
|
5775
|
+
*)
|
|
5776
|
+
|
|
5777
|
+
@mui/system/esm/index.js:
|
|
5539
5778
|
(**
|
|
5540
|
-
* @mui/
|
|
5779
|
+
* @mui/system v7.3.7
|
|
5541
5780
|
*
|
|
5542
5781
|
* @license MIT
|
|
5543
5782
|
* This source code is licensed under the MIT license found in the
|