@bluemarble/bm-components 1.19.0 → 2.0.0
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 -17
- package/dist/index.d.ts +17 -17
- package/dist/index.js +617 -366
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +758 -507
- package/dist/index.mjs.map +1 -1
- package/package.json +36 -36
package/dist/index.mjs
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,8 +1019,217 @@ 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
|
-
import
|
|
1232
|
+
import React7, {
|
|
1024
1233
|
useEffect,
|
|
1025
1234
|
useMemo,
|
|
1026
1235
|
useRef,
|
|
@@ -1098,18 +1307,16 @@ var GridHeader = ({
|
|
|
1098
1307
|
};
|
|
1099
1308
|
|
|
1100
1309
|
// src/components/Grid/Filters.tsx
|
|
1101
|
-
import
|
|
1310
|
+
import React5 from "react";
|
|
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
|
import emStyled from "@emotion/styled";
|
|
1114
1321
|
import { ThemeContext, keyframes, css } from "@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
|
-
|
|
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
|
-
}
|
|
1162
|
-
|
|
1163
|
-
// node_modules/@mui/utils/deepmerge/deepmerge.js
|
|
1338
|
+
// node_modules/@mui/utils/esm/deepmerge/deepmerge.js
|
|
1339
|
+
var import_react_is = __toESM(require_react_is2(), 1);
|
|
1340
|
+
import * as React2 from "react";
|
|
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
|
|
2285
|
-
import * as
|
|
2578
|
+
// node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js
|
|
2579
|
+
import * as React3 from "react";
|
|
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(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
|
|
2370
|
-
import * as
|
|
2664
|
+
// node_modules/@mui/system/esm/createBox/createBox.js
|
|
2665
|
+
import * as React4 from "react";
|
|
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
|
import { jsx as _jsx } from "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__ */ _jsx(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) => {
|
|
@@ -2492,7 +2783,7 @@ var FiltersBar = ({
|
|
|
2492
2783
|
setAnchorEl,
|
|
2493
2784
|
noFilters
|
|
2494
2785
|
}) => {
|
|
2495
|
-
return /* @__PURE__ */
|
|
2786
|
+
return /* @__PURE__ */ React5.createElement(
|
|
2496
2787
|
Box_default,
|
|
2497
2788
|
{
|
|
2498
2789
|
sx: {
|
|
@@ -2502,8 +2793,8 @@ var FiltersBar = ({
|
|
|
2502
2793
|
width: "100%"
|
|
2503
2794
|
}
|
|
2504
2795
|
},
|
|
2505
|
-
!noFilters && /* @__PURE__ */
|
|
2506
|
-
return /* @__PURE__ */
|
|
2796
|
+
!noFilters && /* @__PURE__ */ React5.createElement(Box_default, { sx: { pl: 1 } }, selectedFilters.map((item, index) => {
|
|
2797
|
+
return /* @__PURE__ */ React5.createElement(
|
|
2507
2798
|
Chip,
|
|
2508
2799
|
{
|
|
2509
2800
|
key: index,
|
|
@@ -2512,13 +2803,13 @@ var FiltersBar = ({
|
|
|
2512
2803
|
}
|
|
2513
2804
|
);
|
|
2514
2805
|
})),
|
|
2515
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ React5.createElement(Box_default, { ref: searchAnchorEl, sx: { minHeight: 30, width: "100%" } }, customButtons, !noFilterButtons && /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(Tooltip, { title: "Buscar" }, /* @__PURE__ */ React5.createElement(IconButton, { onClick: () => setOpenSearch(true) }, /* @__PURE__ */ React5.createElement(MdSearch, { size: 8 * 3 }))), /* @__PURE__ */ React5.createElement(Tooltip, { title: "Filtrar" }, /* @__PURE__ */ React5.createElement(
|
|
2516
2807
|
IconButton,
|
|
2517
2808
|
{
|
|
2518
2809
|
sx: { position: "relative" },
|
|
2519
2810
|
onClick: ({ currentTarget }) => setAnchorEl(currentTarget)
|
|
2520
2811
|
},
|
|
2521
|
-
/* @__PURE__ */
|
|
2812
|
+
/* @__PURE__ */ React5.createElement(MdFilterList, { size: 8 * 3 })
|
|
2522
2813
|
))))
|
|
2523
2814
|
);
|
|
2524
2815
|
};
|
|
@@ -2528,19 +2819,15 @@ import { MdClose } from "react-icons/md";
|
|
|
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;
|
|
@@ -2550,7 +2837,7 @@ function getPropertyValue(obj, property) {
|
|
|
2550
2837
|
}
|
|
2551
2838
|
|
|
2552
2839
|
// src/components/Grid/AutoCreatedRows.tsx
|
|
2553
|
-
import
|
|
2840
|
+
import React6 from "react";
|
|
2554
2841
|
|
|
2555
2842
|
// src/components/Grid/Td.tsx
|
|
2556
2843
|
import { TableCell as TableCell2 } from "@mui/material";
|
|
@@ -2566,9 +2853,9 @@ var AutoCreatedRows = ({
|
|
|
2566
2853
|
columns,
|
|
2567
2854
|
primaryKey
|
|
2568
2855
|
}) => {
|
|
2569
|
-
return /* @__PURE__ */
|
|
2856
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, tableData.map((row) => /* @__PURE__ */ React6.createElement(Tr, { key: row[primaryKey] }, columns.map((column) => {
|
|
2570
2857
|
const cellValue = column.transformer ? column.transformer(row[column.name]) : row[column.name];
|
|
2571
|
-
return /* @__PURE__ */
|
|
2858
|
+
return /* @__PURE__ */ React6.createElement(Td, { key: column.name }, cellValue);
|
|
2572
2859
|
}))));
|
|
2573
2860
|
};
|
|
2574
2861
|
|
|
@@ -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
|
useEffect(() => {
|
|
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
|
useEffect(() => {
|
|
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
|
}
|
|
@@ -2752,7 +3033,7 @@ var Grid = (props) => {
|
|
|
2752
3033
|
useEffect(() => {
|
|
2753
3034
|
updateFilters(selectedFilters);
|
|
2754
3035
|
}, [selectedFilters]);
|
|
2755
|
-
return /* @__PURE__ */
|
|
3036
|
+
return /* @__PURE__ */ React7.createElement(Paper, null, isLoading && /* @__PURE__ */ React7.createElement(LinearProgress, null), /* @__PURE__ */ React7.createElement(
|
|
2756
3037
|
FiltersBar,
|
|
2757
3038
|
{
|
|
2758
3039
|
setAnchorEl,
|
|
@@ -2764,7 +3045,7 @@ var Grid = (props) => {
|
|
|
2764
3045
|
customButtons,
|
|
2765
3046
|
handleCloseFilter
|
|
2766
3047
|
}
|
|
2767
|
-
), /* @__PURE__ */
|
|
3048
|
+
), /* @__PURE__ */ React7.createElement(TableContainer, null, /* @__PURE__ */ React7.createElement(Table, { size: "small" }, /* @__PURE__ */ React7.createElement(
|
|
2768
3049
|
GridHeader,
|
|
2769
3050
|
{
|
|
2770
3051
|
titles: columnTitles,
|
|
@@ -2773,14 +3054,14 @@ var Grid = (props) => {
|
|
|
2773
3054
|
setOrder,
|
|
2774
3055
|
setOrderBy
|
|
2775
3056
|
}
|
|
2776
|
-
), /* @__PURE__ */
|
|
3057
|
+
), /* @__PURE__ */ React7.createElement(TableBody, null, props.children ? props.children : primaryKey ? /* @__PURE__ */ React7.createElement(
|
|
2777
3058
|
AutoCreatedRows,
|
|
2778
3059
|
{
|
|
2779
3060
|
tableData,
|
|
2780
3061
|
columns: columnTitles,
|
|
2781
3062
|
primaryKey
|
|
2782
3063
|
}
|
|
2783
|
-
) : null, footer))), !noPagination && /* @__PURE__ */
|
|
3064
|
+
) : null, footer))), !noPagination && /* @__PURE__ */ React7.createElement(
|
|
2784
3065
|
TablePagination,
|
|
2785
3066
|
{
|
|
2786
3067
|
page,
|
|
@@ -2795,7 +3076,7 @@ var Grid = (props) => {
|
|
|
2795
3076
|
},
|
|
2796
3077
|
onRowsPerPageChange: handleChangeRowsPerPage
|
|
2797
3078
|
}
|
|
2798
|
-
), /* @__PURE__ */
|
|
3079
|
+
), /* @__PURE__ */ React7.createElement(
|
|
2799
3080
|
Popover,
|
|
2800
3081
|
{
|
|
2801
3082
|
anchorEl,
|
|
@@ -2810,7 +3091,7 @@ var Grid = (props) => {
|
|
|
2810
3091
|
horizontal: "right"
|
|
2811
3092
|
}
|
|
2812
3093
|
},
|
|
2813
|
-
/* @__PURE__ */
|
|
3094
|
+
/* @__PURE__ */ React7.createElement(Box2, { sx: { minWidth: 300, padding: 2 } }, /* @__PURE__ */ React7.createElement(Typography, { fontWeight: "bold", variant: "body2" }, "Filtrar por:"), /* @__PURE__ */ React7.createElement(
|
|
2814
3095
|
Autocomplete,
|
|
2815
3096
|
{
|
|
2816
3097
|
value: selectedTitle || "",
|
|
@@ -2818,7 +3099,7 @@ var Grid = (props) => {
|
|
|
2818
3099
|
!target.innerHTML.includes("path") ? setSelectedTitle(target.innerHTML) : setSelectedTitle(void 0);
|
|
2819
3100
|
},
|
|
2820
3101
|
options: columnTitles.map((title) => title.label),
|
|
2821
|
-
renderInput: (params) => /* @__PURE__ */
|
|
3102
|
+
renderInput: (params) => /* @__PURE__ */ React7.createElement(
|
|
2822
3103
|
TextField,
|
|
2823
3104
|
__spreadProps(__spreadValues({
|
|
2824
3105
|
variant: "standard",
|
|
@@ -2828,7 +3109,7 @@ var Grid = (props) => {
|
|
|
2828
3109
|
})
|
|
2829
3110
|
)
|
|
2830
3111
|
}
|
|
2831
|
-
), /* @__PURE__ */
|
|
3112
|
+
), /* @__PURE__ */ React7.createElement(
|
|
2832
3113
|
Autocomplete,
|
|
2833
3114
|
{
|
|
2834
3115
|
value: selectedFilterValue || "",
|
|
@@ -2837,7 +3118,7 @@ var Grid = (props) => {
|
|
|
2837
3118
|
},
|
|
2838
3119
|
disabled: valuesToFilter.length < 1,
|
|
2839
3120
|
options: valuesToFilter.map((title) => title),
|
|
2840
|
-
renderInput: (params) => /* @__PURE__ */
|
|
3121
|
+
renderInput: (params) => /* @__PURE__ */ React7.createElement(
|
|
2841
3122
|
TextField,
|
|
2842
3123
|
__spreadProps(__spreadValues({
|
|
2843
3124
|
variant: "standard",
|
|
@@ -2847,7 +3128,7 @@ var Grid = (props) => {
|
|
|
2847
3128
|
})
|
|
2848
3129
|
)
|
|
2849
3130
|
}
|
|
2850
|
-
), /* @__PURE__ */
|
|
3131
|
+
), /* @__PURE__ */ React7.createElement(Box2, { sx: { py: 1 } }), /* @__PURE__ */ React7.createElement(
|
|
2851
3132
|
Button,
|
|
2852
3133
|
{
|
|
2853
3134
|
disabled: !selectedFilterValue,
|
|
@@ -2856,7 +3137,7 @@ var Grid = (props) => {
|
|
|
2856
3137
|
},
|
|
2857
3138
|
"Adicionar filtro"
|
|
2858
3139
|
))
|
|
2859
|
-
), /* @__PURE__ */
|
|
3140
|
+
), /* @__PURE__ */ React7.createElement(
|
|
2860
3141
|
Popover,
|
|
2861
3142
|
{
|
|
2862
3143
|
anchorEl: searchAnchorEl.current,
|
|
@@ -2871,7 +3152,7 @@ var Grid = (props) => {
|
|
|
2871
3152
|
horizontal: "left"
|
|
2872
3153
|
}
|
|
2873
3154
|
},
|
|
2874
|
-
/* @__PURE__ */
|
|
3155
|
+
/* @__PURE__ */ React7.createElement(
|
|
2875
3156
|
Box2,
|
|
2876
3157
|
{
|
|
2877
3158
|
sx: {
|
|
@@ -2883,7 +3164,7 @@ var Grid = (props) => {
|
|
|
2883
3164
|
alignItems: "flex-end"
|
|
2884
3165
|
}
|
|
2885
3166
|
},
|
|
2886
|
-
/* @__PURE__ */
|
|
3167
|
+
/* @__PURE__ */ React7.createElement(
|
|
2887
3168
|
TextField,
|
|
2888
3169
|
{
|
|
2889
3170
|
variant: "standard",
|
|
@@ -2893,7 +3174,7 @@ var Grid = (props) => {
|
|
|
2893
3174
|
onChange: ({ currentTarget }) => setSearchText(currentTarget.value)
|
|
2894
3175
|
}
|
|
2895
3176
|
),
|
|
2896
|
-
/* @__PURE__ */
|
|
3177
|
+
/* @__PURE__ */ React7.createElement(Box2, null, /* @__PURE__ */ React7.createElement(
|
|
2897
3178
|
IconButton2,
|
|
2898
3179
|
{
|
|
2899
3180
|
onClick: () => {
|
|
@@ -2901,7 +3182,7 @@ var Grid = (props) => {
|
|
|
2901
3182
|
setOpenSearch(false);
|
|
2902
3183
|
}
|
|
2903
3184
|
},
|
|
2904
|
-
/* @__PURE__ */
|
|
3185
|
+
/* @__PURE__ */ React7.createElement(MdClose, { size: 8 * 3 })
|
|
2905
3186
|
))
|
|
2906
3187
|
)
|
|
2907
3188
|
));
|
|
@@ -2910,10 +3191,10 @@ var Grid_default = Grid;
|
|
|
2910
3191
|
|
|
2911
3192
|
// src/components/Grid/EditableTableCell/index.tsx
|
|
2912
3193
|
import { TableCell as TableCell3 } from "@mui/material";
|
|
2913
|
-
import
|
|
3194
|
+
import React10, { useState as useState2 } from "react";
|
|
2914
3195
|
|
|
2915
3196
|
// src/components/Grid/EditableTableCell/DefaultInput.tsx
|
|
2916
|
-
import
|
|
3197
|
+
import React8 from "react";
|
|
2917
3198
|
import { TextField as TextField2 } from "@mui/material";
|
|
2918
3199
|
import moment from "moment";
|
|
2919
3200
|
var DefaultInput = (allProps) => {
|
|
@@ -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 moment(value).format("YYYY-MM-DD");
|
|
@@ -2956,12 +3236,10 @@ 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
|
-
return /* @__PURE__ */
|
|
3242
|
+
return /* @__PURE__ */ React8.createElement(
|
|
2965
3243
|
TextField2,
|
|
2966
3244
|
__spreadValues({
|
|
2967
3245
|
name,
|
|
@@ -2993,7 +3271,7 @@ var DefaultInput = (allProps) => {
|
|
|
2993
3271
|
|
|
2994
3272
|
// src/components/Grid/EditableTableCell/InputMask.tsx
|
|
2995
3273
|
import { useIMask } from "react-imask";
|
|
2996
|
-
import
|
|
3274
|
+
import React9, { useEffect as useEffect2 } from "react";
|
|
2997
3275
|
import { TextField as TextField3 } from "@mui/material";
|
|
2998
3276
|
var InputMask = (allProps) => {
|
|
2999
3277
|
var _a;
|
|
@@ -3025,16 +3303,13 @@ 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
|
useEffect2(() => {
|
|
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
|
-
return /* @__PURE__ */
|
|
3312
|
+
return /* @__PURE__ */ React9.createElement(
|
|
3038
3313
|
TextField3,
|
|
3039
3314
|
__spreadValues({
|
|
3040
3315
|
inputRef: ref,
|
|
@@ -3097,10 +3372,9 @@ var EditableTableCell = (allProps) => {
|
|
|
3097
3372
|
const [value, setValue] = useState2(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
|
-
return /* @__PURE__ */
|
|
3377
|
+
return /* @__PURE__ */ React10.createElement(
|
|
3104
3378
|
TableCell3,
|
|
3105
3379
|
__spreadProps(__spreadValues({}, props), {
|
|
3106
3380
|
sx: __spreadProps(__spreadValues({}, (props || {}).sx), {
|
|
@@ -3110,7 +3384,7 @@ var EditableTableCell = (allProps) => {
|
|
|
3110
3384
|
}),
|
|
3111
3385
|
onDoubleClick: () => setIsEditing(true)
|
|
3112
3386
|
}),
|
|
3113
|
-
isEditing ? /* @__PURE__ */
|
|
3387
|
+
isEditing ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, mask ? /* @__PURE__ */ React10.createElement(
|
|
3114
3388
|
InputMask,
|
|
3115
3389
|
{
|
|
3116
3390
|
mask,
|
|
@@ -3126,7 +3400,7 @@ var EditableTableCell = (allProps) => {
|
|
|
3126
3400
|
handleCancelEditing,
|
|
3127
3401
|
formatInputDefautvalue
|
|
3128
3402
|
}
|
|
3129
|
-
) : /* @__PURE__ */
|
|
3403
|
+
) : /* @__PURE__ */ React10.createElement(
|
|
3130
3404
|
DefaultInput,
|
|
3131
3405
|
{
|
|
3132
3406
|
onUpdateValue: (newValue) => {
|
|
@@ -3141,29 +3415,27 @@ var EditableTableCell = (allProps) => {
|
|
|
3141
3415
|
formatInputDefautvalue,
|
|
3142
3416
|
type
|
|
3143
3417
|
}
|
|
3144
|
-
)) : /* @__PURE__ */
|
|
3418
|
+
)) : /* @__PURE__ */ React10.createElement(React10.Fragment, null, formatCellValue(value))
|
|
3145
3419
|
);
|
|
3146
3420
|
};
|
|
3147
3421
|
|
|
3148
3422
|
// src/components/Input/index.tsx
|
|
3149
|
-
import
|
|
3423
|
+
import React11 from "react";
|
|
3150
3424
|
import { TextField as TextField4 } from "@mui/material";
|
|
3151
3425
|
import { Field } from "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__ */ React10.createElement(BaseInput, __spreadValues({}, rest));
|
|
3428
|
+
if (withFormik) return /* @__PURE__ */ React11.createElement(FormikInput, __spreadValues({}, rest));
|
|
3429
|
+
else return /* @__PURE__ */ React11.createElement(BaseInput, __spreadValues({}, rest));
|
|
3158
3430
|
};
|
|
3159
3431
|
var BaseInput = (props) => {
|
|
3160
|
-
return /* @__PURE__ */
|
|
3432
|
+
return /* @__PURE__ */ React11.createElement(TextField4, __spreadValues({ fullWidth: true }, props));
|
|
3161
3433
|
};
|
|
3162
3434
|
var FormikInput = (_a) => {
|
|
3163
3435
|
var _b = _a, { name, shrink } = _b, rest = __objRest(_b, ["name", "shrink"]);
|
|
3164
|
-
return /* @__PURE__ */
|
|
3436
|
+
return /* @__PURE__ */ React11.createElement(Field, { name }, (_a2) => {
|
|
3165
3437
|
var _b2 = _a2, { field: _c } = _b2, _d = _c, { value } = _d, field = __objRest(_d, ["value"]), { meta: { error } } = _b2;
|
|
3166
|
-
return /* @__PURE__ */
|
|
3438
|
+
return /* @__PURE__ */ React11.createElement(
|
|
3167
3439
|
BaseInput,
|
|
3168
3440
|
__spreadProps(__spreadValues(__spreadValues({
|
|
3169
3441
|
defaultValue: value,
|
|
@@ -3177,15 +3449,13 @@ var FormikInput = (_a) => {
|
|
|
3177
3449
|
};
|
|
3178
3450
|
|
|
3179
3451
|
// src/components/InputMask/index.tsx
|
|
3180
|
-
import
|
|
3452
|
+
import React12, { useEffect as useEffect3, useRef as useRef2 } from "react";
|
|
3181
3453
|
import { useIMask as useIMask2 } from "react-imask";
|
|
3182
3454
|
import { Field as Field2 } from "formik";
|
|
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__ */ React11.createElement(BaseInputMask, __spreadValues({}, rest));
|
|
3457
|
+
if (withFormik) return /* @__PURE__ */ React12.createElement(FormikInputMask, __spreadValues({}, rest));
|
|
3458
|
+
else return /* @__PURE__ */ React12.createElement(BaseInputMask, __spreadValues({}, rest));
|
|
3189
3459
|
}
|
|
3190
3460
|
var BaseInputMask = (_a) => {
|
|
3191
3461
|
var _b = _a, {
|
|
@@ -3203,21 +3473,19 @@ 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
|
useEffect3(() => {
|
|
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
|
useEffect3(() => {
|
|
3217
3485
|
setValue(controlledValue);
|
|
3218
3486
|
maskRef.current.value = controlledValue;
|
|
3219
3487
|
}, [controlledValue]);
|
|
3220
|
-
return /* @__PURE__ */
|
|
3488
|
+
return /* @__PURE__ */ React12.createElement(BaseInput, __spreadValues({ inputRef: ref }, rest));
|
|
3221
3489
|
};
|
|
3222
3490
|
function FormikInputMask(_a) {
|
|
3223
3491
|
var _b = _a, {
|
|
@@ -3232,8 +3500,9 @@ function FormikInputMask(_a) {
|
|
|
3232
3500
|
const { ref, value, unmaskedValue, maskRef, setValue } = useIMask2(
|
|
3233
3501
|
mask
|
|
3234
3502
|
);
|
|
3235
|
-
const initialValue = useRef2();
|
|
3236
|
-
const formikSaveFunction = useRef2()
|
|
3503
|
+
const initialValue = useRef2("");
|
|
3504
|
+
const formikSaveFunction = useRef2(() => {
|
|
3505
|
+
});
|
|
3237
3506
|
useEffect3(() => {
|
|
3238
3507
|
if (!value && defaultValue) {
|
|
3239
3508
|
setValue(String(defaultValue));
|
|
@@ -3247,7 +3516,7 @@ function FormikInputMask(_a) {
|
|
|
3247
3516
|
if (formikSaveFunction.current)
|
|
3248
3517
|
formikSaveFunction.current(name, unmaskedValue);
|
|
3249
3518
|
}, [value]);
|
|
3250
|
-
return /* @__PURE__ */
|
|
3519
|
+
return /* @__PURE__ */ React12.createElement(Field2, { name }, (_a2) => {
|
|
3251
3520
|
var _b2 = _a2, {
|
|
3252
3521
|
field: _c
|
|
3253
3522
|
} = _b2, _d = _c, { value: value2 } = _d, field = __objRest(_d, ["value"]), {
|
|
@@ -3256,7 +3525,7 @@ function FormikInputMask(_a) {
|
|
|
3256
3525
|
} = _b2;
|
|
3257
3526
|
initialValue.current = value2;
|
|
3258
3527
|
formikSaveFunction.current = setFieldValue;
|
|
3259
|
-
return /* @__PURE__ */
|
|
3528
|
+
return /* @__PURE__ */ React12.createElement(
|
|
3260
3529
|
BaseInput,
|
|
3261
3530
|
__spreadProps(__spreadValues({}, rest), {
|
|
3262
3531
|
name: field.name,
|
|
@@ -3269,7 +3538,7 @@ function FormikInputMask(_a) {
|
|
|
3269
3538
|
}
|
|
3270
3539
|
|
|
3271
3540
|
// src/components/Select/index.tsx
|
|
3272
|
-
import
|
|
3541
|
+
import React13 from "react";
|
|
3273
3542
|
import {
|
|
3274
3543
|
FormControl,
|
|
3275
3544
|
FormHelperText,
|
|
@@ -3280,10 +3549,8 @@ import { useField } from "formik";
|
|
|
3280
3549
|
var CustomInputLabel = 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__ */ React12.createElement(BaseSelect, __spreadValues({}, rest));
|
|
3552
|
+
if (withFormik) return /* @__PURE__ */ React13.createElement(FormikSelect, __spreadValues({}, rest));
|
|
3553
|
+
else return /* @__PURE__ */ React13.createElement(BaseSelect, __spreadValues({}, rest));
|
|
3287
3554
|
}
|
|
3288
3555
|
function BaseSelect(_a) {
|
|
3289
3556
|
var _b = _a, {
|
|
@@ -3299,7 +3566,7 @@ function BaseSelect(_a) {
|
|
|
3299
3566
|
"FormControlProps",
|
|
3300
3567
|
"InputLabelProps"
|
|
3301
3568
|
]);
|
|
3302
|
-
return /* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ React13.createElement(FormControl, __spreadValues({ fullWidth: true }, FormControlProps2), /* @__PURE__ */ React13.createElement(CustomInputLabel, __spreadValues({}, InputLabelProps2), label), /* @__PURE__ */ React13.createElement(
|
|
3303
3570
|
MuiSelect,
|
|
3304
3571
|
__spreadValues({
|
|
3305
3572
|
name,
|
|
@@ -3331,7 +3598,7 @@ function FormikSelect(_a) {
|
|
|
3331
3598
|
const onChange = (_, { props: { value: value2 } }) => {
|
|
3332
3599
|
setValue(value2);
|
|
3333
3600
|
};
|
|
3334
|
-
return /* @__PURE__ */
|
|
3601
|
+
return /* @__PURE__ */ React13.createElement(FormControl, __spreadProps(__spreadValues({ fullWidth: true }, FormControlProps2), { error: Boolean(meta == null ? void 0 : meta.error) }), /* @__PURE__ */ React13.createElement(CustomInputLabel, __spreadValues({}, InputLabelProps2), label), /* @__PURE__ */ React13.createElement(
|
|
3335
3602
|
MuiSelect,
|
|
3336
3603
|
__spreadProps(__spreadValues(__spreadValues({
|
|
3337
3604
|
inputProps: {
|
|
@@ -3343,11 +3610,11 @@ function FormikSelect(_a) {
|
|
|
3343
3610
|
onChange
|
|
3344
3611
|
}),
|
|
3345
3612
|
children
|
|
3346
|
-
), /* @__PURE__ */
|
|
3613
|
+
), /* @__PURE__ */ React13.createElement(FormHelperText, null, helperText || (meta == null ? void 0 : meta.error)));
|
|
3347
3614
|
}
|
|
3348
3615
|
|
|
3349
3616
|
// src/components/Autocomplete/index.tsx
|
|
3350
|
-
import
|
|
3617
|
+
import React14, {
|
|
3351
3618
|
Fragment,
|
|
3352
3619
|
useMemo as useMemo2,
|
|
3353
3620
|
useState as useState3
|
|
@@ -3377,14 +3644,14 @@ function Autocomplete2(_a) {
|
|
|
3377
3644
|
}, [theme]);
|
|
3378
3645
|
const isLegacyBehaviorDisabled = typeof (rest == null ? void 0 : rest["data-legacy-behavior"]) !== "undefined" ? rest["data-legacy-behavior"] === "disabled" : isLegacyBehaviorDisabledTheme;
|
|
3379
3646
|
if (isLegacyBehaviorDisabled)
|
|
3380
|
-
return /* @__PURE__ */
|
|
3647
|
+
return /* @__PURE__ */ React14.createElement(
|
|
3381
3648
|
FormikAutocomplete,
|
|
3382
3649
|
__spreadValues({
|
|
3383
3650
|
name,
|
|
3384
3651
|
getOptionValue
|
|
3385
3652
|
}, rest)
|
|
3386
3653
|
);
|
|
3387
|
-
return /* @__PURE__ */
|
|
3654
|
+
return /* @__PURE__ */ React14.createElement(
|
|
3388
3655
|
FormikAutocompleteLegacy,
|
|
3389
3656
|
__spreadValues({
|
|
3390
3657
|
name,
|
|
@@ -3392,14 +3659,14 @@ function Autocomplete2(_a) {
|
|
|
3392
3659
|
}, rest)
|
|
3393
3660
|
);
|
|
3394
3661
|
}
|
|
3395
|
-
return /* @__PURE__ */
|
|
3662
|
+
return /* @__PURE__ */ React14.createElement(BaseInput2, __spreadValues({}, rest));
|
|
3396
3663
|
}
|
|
3397
3664
|
function BaseInput2(props) {
|
|
3398
|
-
return /* @__PURE__ */
|
|
3665
|
+
return /* @__PURE__ */ React14.createElement(
|
|
3399
3666
|
MuiAutocomplete,
|
|
3400
3667
|
__spreadValues({
|
|
3401
3668
|
fullWidth: true,
|
|
3402
|
-
renderInput: (params) => /* @__PURE__ */
|
|
3669
|
+
renderInput: (params) => /* @__PURE__ */ React14.createElement(TextField5, __spreadValues({ label: props.label }, params))
|
|
3403
3670
|
}, props)
|
|
3404
3671
|
);
|
|
3405
3672
|
}
|
|
@@ -3416,8 +3683,7 @@ function FormikAutocompleteLegacy(_a) {
|
|
|
3416
3683
|
}), _c = _a2, { value } = _c, field = __objRest(_c, ["value"]), [meta, { setValue }] = _b2;
|
|
3417
3684
|
const [defaultOption] = useState3(() => {
|
|
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,36 +3694,31 @@ 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
|
-
return /* @__PURE__ */
|
|
3710
|
+
return /* @__PURE__ */ React14.createElement(
|
|
3450
3711
|
MuiAutocomplete,
|
|
3451
3712
|
__spreadValues({
|
|
3452
3713
|
getOptionLabel,
|
|
3453
|
-
renderInput: (params) => /* @__PURE__ */
|
|
3714
|
+
renderInput: (params) => /* @__PURE__ */ React14.createElement(
|
|
3454
3715
|
TextField5,
|
|
3455
3716
|
__spreadValues(__spreadProps(__spreadValues(__spreadValues({
|
|
3456
3717
|
error: Boolean(meta == null ? void 0 : meta.error),
|
|
3457
3718
|
helperText: meta == null ? void 0 : meta.error
|
|
3458
3719
|
}, params), field), {
|
|
3459
3720
|
InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
|
|
3460
|
-
endAdornment: /* @__PURE__ */
|
|
3721
|
+
endAdornment: /* @__PURE__ */ React14.createElement(Fragment, null, props.loading ? /* @__PURE__ */ React14.createElement(CircularProgress, { color: "inherit", size: 20 }) : null, params.InputProps.endAdornment)
|
|
3461
3722
|
}),
|
|
3462
3723
|
label: props.label,
|
|
3463
3724
|
required: props.required,
|
|
@@ -3488,20 +3749,19 @@ 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
|
-
return /* @__PURE__ */
|
|
3754
|
+
return /* @__PURE__ */ React14.createElement(
|
|
3495
3755
|
MuiAutocomplete,
|
|
3496
3756
|
__spreadValues({
|
|
3497
|
-
renderInput: (params) => /* @__PURE__ */
|
|
3757
|
+
renderInput: (params) => /* @__PURE__ */ React14.createElement(
|
|
3498
3758
|
TextField5,
|
|
3499
3759
|
__spreadValues(__spreadProps(__spreadValues(__spreadValues({
|
|
3500
3760
|
error: Boolean(meta == null ? void 0 : meta.error),
|
|
3501
3761
|
helperText: meta == null ? void 0 : meta.error
|
|
3502
3762
|
}, params), field), {
|
|
3503
3763
|
InputProps: __spreadProps(__spreadValues({}, params.InputProps), {
|
|
3504
|
-
endAdornment: /* @__PURE__ */
|
|
3764
|
+
endAdornment: /* @__PURE__ */ React14.createElement(Fragment, null, props.loading ? /* @__PURE__ */ React14.createElement(CircularProgress, { color: "inherit", size: 20 }) : null, params.InputProps.endAdornment)
|
|
3505
3765
|
}),
|
|
3506
3766
|
label: props.label,
|
|
3507
3767
|
required: props.required,
|
|
@@ -3515,7 +3775,7 @@ function FormikAutocomplete(_a) {
|
|
|
3515
3775
|
}
|
|
3516
3776
|
|
|
3517
3777
|
// src/components/Checkbox/index.tsx
|
|
3518
|
-
import
|
|
3778
|
+
import React15 from "react";
|
|
3519
3779
|
import {
|
|
3520
3780
|
Checkbox as MuiCheckbox,
|
|
3521
3781
|
FormControlLabel
|
|
@@ -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__ */ React14.createElement(BaseCheckbox, __spreadValues({}, props));
|
|
3792
|
+
if (withFormik && name) return /* @__PURE__ */ React15.createElement(FormikCheckbox, __spreadValues({ name }, props));
|
|
3793
|
+
else return /* @__PURE__ */ React15.createElement(BaseCheckbox, __spreadValues({}, props));
|
|
3536
3794
|
};
|
|
3537
3795
|
var BaseCheckbox = (_a) => {
|
|
3538
3796
|
var _b = _a, {
|
|
@@ -3542,11 +3800,11 @@ var BaseCheckbox = (_a) => {
|
|
|
3542
3800
|
"label",
|
|
3543
3801
|
"FormControlLabelProps"
|
|
3544
3802
|
]);
|
|
3545
|
-
return /* @__PURE__ */
|
|
3803
|
+
return /* @__PURE__ */ React15.createElement(
|
|
3546
3804
|
FormControlLabel,
|
|
3547
3805
|
__spreadValues({
|
|
3548
3806
|
label,
|
|
3549
|
-
control: /* @__PURE__ */
|
|
3807
|
+
control: /* @__PURE__ */ React15.createElement(MuiCheckbox, __spreadValues({}, props))
|
|
3550
3808
|
}, FormControlLabelProps3)
|
|
3551
3809
|
);
|
|
3552
3810
|
};
|
|
@@ -3566,11 +3824,11 @@ var FormikCheckbox = (_a) => {
|
|
|
3566
3824
|
const onChange = (_, value2) => {
|
|
3567
3825
|
setValue(value2);
|
|
3568
3826
|
};
|
|
3569
|
-
return /* @__PURE__ */
|
|
3827
|
+
return /* @__PURE__ */ React15.createElement(
|
|
3570
3828
|
FormControlLabel,
|
|
3571
3829
|
__spreadValues(__spreadProps(__spreadValues({
|
|
3572
3830
|
label,
|
|
3573
|
-
control: /* @__PURE__ */
|
|
3831
|
+
control: /* @__PURE__ */ React15.createElement(MuiCheckbox, __spreadProps(__spreadValues({}, props), { defaultChecked: Boolean(value) }))
|
|
3574
3832
|
}, field), {
|
|
3575
3833
|
onChange
|
|
3576
3834
|
}), FormControlLabelProps3)
|
|
@@ -3578,7 +3836,7 @@ var FormikCheckbox = (_a) => {
|
|
|
3578
3836
|
};
|
|
3579
3837
|
|
|
3580
3838
|
// src/components/Switch/index.tsx
|
|
3581
|
-
import
|
|
3839
|
+
import React16 from "react";
|
|
3582
3840
|
import {
|
|
3583
3841
|
Switch as MuiSwitch,
|
|
3584
3842
|
FormControlLabel as FormControlLabel2
|
|
@@ -3586,10 +3844,8 @@ import {
|
|
|
3586
3844
|
import { useField as useField4 } from "formik";
|
|
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__ */ React15.createElement(BaseSwitch, __spreadValues({}, props));
|
|
3847
|
+
if (withFormik && name) return /* @__PURE__ */ React16.createElement(FormikSwitch, __spreadValues({ name }, props));
|
|
3848
|
+
else return /* @__PURE__ */ React16.createElement(BaseSwitch, __spreadValues({}, props));
|
|
3593
3849
|
};
|
|
3594
3850
|
var BaseSwitch = (_a) => {
|
|
3595
3851
|
var _b = _a, {
|
|
@@ -3599,11 +3855,11 @@ var BaseSwitch = (_a) => {
|
|
|
3599
3855
|
"label",
|
|
3600
3856
|
"FormControlLabelProps"
|
|
3601
3857
|
]);
|
|
3602
|
-
return /* @__PURE__ */
|
|
3858
|
+
return /* @__PURE__ */ React16.createElement(
|
|
3603
3859
|
FormControlLabel2,
|
|
3604
3860
|
__spreadValues({
|
|
3605
3861
|
label,
|
|
3606
|
-
control: /* @__PURE__ */
|
|
3862
|
+
control: /* @__PURE__ */ React16.createElement(MuiSwitch, __spreadValues({}, props))
|
|
3607
3863
|
}, FormControlLabelProps3)
|
|
3608
3864
|
);
|
|
3609
3865
|
};
|
|
@@ -3623,18 +3879,18 @@ var FormikSwitch = (_a) => {
|
|
|
3623
3879
|
const onChange = (_, value2) => {
|
|
3624
3880
|
setValue(value2);
|
|
3625
3881
|
};
|
|
3626
|
-
return /* @__PURE__ */
|
|
3882
|
+
return /* @__PURE__ */ React16.createElement(
|
|
3627
3883
|
FormControlLabel2,
|
|
3628
3884
|
__spreadValues(__spreadValues({
|
|
3629
3885
|
label,
|
|
3630
3886
|
onChange,
|
|
3631
|
-
control: /* @__PURE__ */
|
|
3887
|
+
control: /* @__PURE__ */ React16.createElement(MuiSwitch, __spreadValues({ defaultChecked: value }, props))
|
|
3632
3888
|
}, field), FormControlLabelProps3)
|
|
3633
3889
|
);
|
|
3634
3890
|
};
|
|
3635
3891
|
|
|
3636
3892
|
// src/components/Radio/index.tsx
|
|
3637
|
-
import
|
|
3893
|
+
import React17 from "react";
|
|
3638
3894
|
import {
|
|
3639
3895
|
FormControl as FormControl2,
|
|
3640
3896
|
FormControlLabel as FormControlLabel3,
|
|
@@ -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__ */ React16.createElement(BaseRadio, __spreadValues({}, rest));
|
|
3910
|
+
if (withFormik && name) return /* @__PURE__ */ React17.createElement(FormikRadio, __spreadValues({ name }, rest));
|
|
3911
|
+
else return /* @__PURE__ */ React17.createElement(BaseRadio, __spreadValues({}, rest));
|
|
3658
3912
|
};
|
|
3659
3913
|
var BaseRadio = (_a) => {
|
|
3660
3914
|
var _b = _a, {
|
|
@@ -3664,13 +3918,13 @@ var BaseRadio = (_a) => {
|
|
|
3664
3918
|
"label",
|
|
3665
3919
|
"options"
|
|
3666
3920
|
]);
|
|
3667
|
-
return /* @__PURE__ */
|
|
3921
|
+
return /* @__PURE__ */ React17.createElement(FormControl2, null, label && /* @__PURE__ */ React17.createElement(FormLabel, null, label), /* @__PURE__ */ React17.createElement(RadioGroup, __spreadValues({}, rest), options.map((option) => /* @__PURE__ */ React17.createElement(
|
|
3668
3922
|
FormControlLabel3,
|
|
3669
3923
|
{
|
|
3670
3924
|
key: String(option.value),
|
|
3671
3925
|
value: option.value,
|
|
3672
3926
|
label: option.label,
|
|
3673
|
-
control: /* @__PURE__ */
|
|
3927
|
+
control: /* @__PURE__ */ React17.createElement(MuiRadio, null)
|
|
3674
3928
|
}
|
|
3675
3929
|
))));
|
|
3676
3930
|
};
|
|
@@ -3687,26 +3941,26 @@ var FormikRadio = (_a) => {
|
|
|
3687
3941
|
const onChange = (setFieldValue, value) => {
|
|
3688
3942
|
setFieldValue(name, value);
|
|
3689
3943
|
};
|
|
3690
|
-
return /* @__PURE__ */
|
|
3944
|
+
return /* @__PURE__ */ React17.createElement(Field3, null, ({ field: { value }, form: { setFieldValue } }) => /* @__PURE__ */ React17.createElement(FormControl2, null, label && /* @__PURE__ */ React17.createElement(FormLabel, null, label), /* @__PURE__ */ React17.createElement(
|
|
3691
3945
|
RadioGroup,
|
|
3692
3946
|
__spreadValues({
|
|
3693
3947
|
defaultValue: value,
|
|
3694
3948
|
onChange: (_, value2) => onChange(setFieldValue, value2)
|
|
3695
3949
|
}, rest),
|
|
3696
|
-
options.map((option) => /* @__PURE__ */
|
|
3950
|
+
options.map((option) => /* @__PURE__ */ React17.createElement(
|
|
3697
3951
|
FormControlLabel3,
|
|
3698
3952
|
{
|
|
3699
3953
|
key: String(option.value),
|
|
3700
3954
|
value: option.value,
|
|
3701
3955
|
label: option.label,
|
|
3702
|
-
control: /* @__PURE__ */
|
|
3956
|
+
control: /* @__PURE__ */ React17.createElement(MuiRadio, null)
|
|
3703
3957
|
}
|
|
3704
3958
|
))
|
|
3705
3959
|
)));
|
|
3706
3960
|
};
|
|
3707
3961
|
|
|
3708
3962
|
// src/components/LargeButton/index.tsx
|
|
3709
|
-
import
|
|
3963
|
+
import React18 from "react";
|
|
3710
3964
|
import {
|
|
3711
3965
|
Button as Button2,
|
|
3712
3966
|
CircularProgress as CircularProgress2
|
|
@@ -3723,7 +3977,7 @@ var LargeButton = (_a) => {
|
|
|
3723
3977
|
"CircularProgressProps",
|
|
3724
3978
|
"sx"
|
|
3725
3979
|
]);
|
|
3726
|
-
return /* @__PURE__ */
|
|
3980
|
+
return /* @__PURE__ */ React18.createElement(
|
|
3727
3981
|
Button2,
|
|
3728
3982
|
__spreadValues({
|
|
3729
3983
|
variant: "contained",
|
|
@@ -3731,7 +3985,7 @@ var LargeButton = (_a) => {
|
|
|
3731
3985
|
sx: __spreadValues({ fontWeight: "bold" }, sx),
|
|
3732
3986
|
disabled: rest.disabled || loading
|
|
3733
3987
|
}, rest),
|
|
3734
|
-
loading ? /* @__PURE__ */
|
|
3988
|
+
loading ? /* @__PURE__ */ React18.createElement(
|
|
3735
3989
|
CircularProgress2,
|
|
3736
3990
|
__spreadValues({
|
|
3737
3991
|
size: 25,
|
|
@@ -3742,7 +3996,7 @@ var LargeButton = (_a) => {
|
|
|
3742
3996
|
};
|
|
3743
3997
|
|
|
3744
3998
|
// src/components/TabPanel/index.tsx
|
|
3745
|
-
import
|
|
3999
|
+
import React19 from "react";
|
|
3746
4000
|
function getTabProps(index) {
|
|
3747
4001
|
return {
|
|
3748
4002
|
id: `tab-${index}`,
|
|
@@ -3751,7 +4005,7 @@ function getTabProps(index) {
|
|
|
3751
4005
|
}
|
|
3752
4006
|
var TabPanel = (props) => {
|
|
3753
4007
|
const _a = props, { children, value, index } = _a, other = __objRest(_a, ["children", "value", "index"]);
|
|
3754
|
-
return /* @__PURE__ */
|
|
4008
|
+
return /* @__PURE__ */ React19.createElement(
|
|
3755
4009
|
"div",
|
|
3756
4010
|
__spreadValues({
|
|
3757
4011
|
role: "tabpanel",
|
|
@@ -3759,12 +4013,12 @@ var TabPanel = (props) => {
|
|
|
3759
4013
|
id: `tabpanel-${index}`,
|
|
3760
4014
|
"aria-labelledby": `tab-${index}`
|
|
3761
4015
|
}, other),
|
|
3762
|
-
value === index && /* @__PURE__ */
|
|
4016
|
+
value === index && /* @__PURE__ */ React19.createElement(React19.Fragment, null, children)
|
|
3763
4017
|
);
|
|
3764
4018
|
};
|
|
3765
4019
|
|
|
3766
4020
|
// src/components/BaseGrid/index.tsx
|
|
3767
|
-
import
|
|
4021
|
+
import React21 from "react";
|
|
3768
4022
|
import {
|
|
3769
4023
|
Box as Box4,
|
|
3770
4024
|
LinearProgress as LinearProgress2,
|
|
@@ -3778,7 +4032,7 @@ import {
|
|
|
3778
4032
|
} from "@mui/material";
|
|
3779
4033
|
|
|
3780
4034
|
// src/components/BaseGrid/Pagination/index.tsx
|
|
3781
|
-
import
|
|
4035
|
+
import React20 from "react";
|
|
3782
4036
|
import {
|
|
3783
4037
|
Box as Box3,
|
|
3784
4038
|
IconButton as IconButton3,
|
|
@@ -3797,7 +4051,7 @@ var GridPagination = ({
|
|
|
3797
4051
|
rowsPerPage,
|
|
3798
4052
|
dense
|
|
3799
4053
|
}) => {
|
|
3800
|
-
return /* @__PURE__ */
|
|
4054
|
+
return /* @__PURE__ */ React20.createElement(
|
|
3801
4055
|
Stack,
|
|
3802
4056
|
{
|
|
3803
4057
|
direction: "row",
|
|
@@ -3806,8 +4060,8 @@ var GridPagination = ({
|
|
|
3806
4060
|
width: "100%",
|
|
3807
4061
|
py: dense ? 0.5 : 1
|
|
3808
4062
|
},
|
|
3809
|
-
/* @__PURE__ */
|
|
3810
|
-
/* @__PURE__ */
|
|
4063
|
+
/* @__PURE__ */ React20.createElement(Box3, null),
|
|
4064
|
+
/* @__PURE__ */ React20.createElement(Stack, { direction: "row", alignItems: "center" }, /* @__PURE__ */ React20.createElement(
|
|
3811
4065
|
Select2,
|
|
3812
4066
|
{
|
|
3813
4067
|
variant: "standard",
|
|
@@ -3817,23 +4071,23 @@ var GridPagination = ({
|
|
|
3817
4071
|
value: rowsPerPage,
|
|
3818
4072
|
onChange: ({ target }) => setRowsPerPage(parseInt(target.value))
|
|
3819
4073
|
},
|
|
3820
|
-
rowsPerPageOptions.map((option) => /* @__PURE__ */
|
|
3821
|
-
), /* @__PURE__ */
|
|
4074
|
+
rowsPerPageOptions.map((option) => /* @__PURE__ */ React20.createElement(MenuItem, { key: option, value: option }, option))
|
|
4075
|
+
), /* @__PURE__ */ React20.createElement(Typography2, { variant: "body2" }, currentPage + 1, " de ", totalNumberOfPages + 1), /* @__PURE__ */ React20.createElement(
|
|
3822
4076
|
IconButton3,
|
|
3823
4077
|
{
|
|
3824
4078
|
size: "small",
|
|
3825
4079
|
disabled: currentPage === 0,
|
|
3826
4080
|
onClick: () => onPageChange(currentPage - 1)
|
|
3827
4081
|
},
|
|
3828
|
-
/* @__PURE__ */
|
|
3829
|
-
), /* @__PURE__ */
|
|
4082
|
+
/* @__PURE__ */ React20.createElement(MdArrowBackIosNew, { size: 8 * 2 })
|
|
4083
|
+
), /* @__PURE__ */ React20.createElement(
|
|
3830
4084
|
IconButton3,
|
|
3831
4085
|
{
|
|
3832
4086
|
size: "small",
|
|
3833
4087
|
disabled: currentPage === totalNumberOfPages,
|
|
3834
4088
|
onClick: () => onPageChange(currentPage + 1)
|
|
3835
4089
|
},
|
|
3836
|
-
/* @__PURE__ */
|
|
4090
|
+
/* @__PURE__ */ React20.createElement(MdArrowForwardIos, { size: 8 * 2 })
|
|
3837
4091
|
))
|
|
3838
4092
|
);
|
|
3839
4093
|
};
|
|
@@ -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",
|
|
@@ -3904,17 +4156,17 @@ function BaseGrid({
|
|
|
3904
4156
|
loadingColSpan,
|
|
3905
4157
|
isLoading
|
|
3906
4158
|
}) {
|
|
3907
|
-
return /* @__PURE__ */
|
|
4159
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3908
4160
|
Paper2,
|
|
3909
4161
|
__spreadProps(__spreadValues({}, paperProps), {
|
|
3910
4162
|
sx: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, styles.rowGap(dense)), styles.bordered(bordered)), styles.striped(striped)), styles.lastRowBorder(hideFooter)), paperProps == null ? void 0 : paperProps.sx)
|
|
3911
4163
|
}),
|
|
3912
|
-
/* @__PURE__ */
|
|
4164
|
+
/* @__PURE__ */ React21.createElement(
|
|
3913
4165
|
Box4,
|
|
3914
4166
|
__spreadProps(__spreadValues({}, boxContainerProps), {
|
|
3915
4167
|
sx: __spreadValues({ overflowX: "auto" }, boxContainerProps == null ? void 0 : boxContainerProps.sx)
|
|
3916
4168
|
}),
|
|
3917
|
-
/* @__PURE__ */
|
|
4169
|
+
/* @__PURE__ */ React21.createElement(
|
|
3918
4170
|
Table2,
|
|
3919
4171
|
__spreadProps(__spreadValues({
|
|
3920
4172
|
size: "small",
|
|
@@ -3922,9 +4174,9 @@ function BaseGrid({
|
|
|
3922
4174
|
}, tableProps), {
|
|
3923
4175
|
sx: __spreadValues({}, tableProps == null ? void 0 : tableProps.sx)
|
|
3924
4176
|
}),
|
|
3925
|
-
/* @__PURE__ */
|
|
4177
|
+
/* @__PURE__ */ React21.createElement(TableHead2, __spreadValues({}, tableHeadProps), /* @__PURE__ */ React21.createElement(TableRow3, null, prependColumn, columns.map((column) => {
|
|
3926
4178
|
var _a;
|
|
3927
|
-
return /* @__PURE__ */
|
|
4179
|
+
return /* @__PURE__ */ React21.createElement(
|
|
3928
4180
|
TableCell4,
|
|
3929
4181
|
__spreadProps(__spreadValues({
|
|
3930
4182
|
key: column.name,
|
|
@@ -3934,7 +4186,7 @@ function BaseGrid({
|
|
|
3934
4186
|
pl: 2
|
|
3935
4187
|
}, column == null ? void 0 : column.sx)
|
|
3936
4188
|
}),
|
|
3937
|
-
column.children ? column.children : /* @__PURE__ */
|
|
4189
|
+
column.children ? column.children : /* @__PURE__ */ React21.createElement(
|
|
3938
4190
|
TableSortLabel2,
|
|
3939
4191
|
__spreadProps(__spreadValues({
|
|
3940
4192
|
active: sortedBy.some((p) => p.prop === column.name),
|
|
@@ -3947,18 +4199,18 @@ function BaseGrid({
|
|
|
3947
4199
|
column.label
|
|
3948
4200
|
)
|
|
3949
4201
|
);
|
|
3950
|
-
}), appendColumn), isLoading && /* @__PURE__ */
|
|
4202
|
+
}), appendColumn), isLoading && /* @__PURE__ */ React21.createElement(TableRow3, null, /* @__PURE__ */ React21.createElement(
|
|
3951
4203
|
TableCell4,
|
|
3952
4204
|
{
|
|
3953
4205
|
colSpan: loadingColSpan || columns.length,
|
|
3954
4206
|
sx: { p: 0, border: "none" }
|
|
3955
4207
|
},
|
|
3956
|
-
/* @__PURE__ */
|
|
4208
|
+
/* @__PURE__ */ React21.createElement(LinearProgress2, null)
|
|
3957
4209
|
))),
|
|
3958
|
-
/* @__PURE__ */
|
|
4210
|
+
/* @__PURE__ */ React21.createElement(TableBody2, __spreadValues({}, tableBodyProps), children)
|
|
3959
4211
|
)
|
|
3960
4212
|
),
|
|
3961
|
-
!hideFooter && /* @__PURE__ */
|
|
4213
|
+
!hideFooter && /* @__PURE__ */ React21.createElement(
|
|
3962
4214
|
GridPagination,
|
|
3963
4215
|
{
|
|
3964
4216
|
rowsPerPageOptions,
|
|
@@ -3974,7 +4226,7 @@ function BaseGrid({
|
|
|
3974
4226
|
}
|
|
3975
4227
|
|
|
3976
4228
|
// src/components/BaseGrid/BaseGridAutoRows.tsx
|
|
3977
|
-
import
|
|
4229
|
+
import React22 from "react";
|
|
3978
4230
|
import { Fragment as Fragment2 } from "react";
|
|
3979
4231
|
import { TableCell as TableCell5, TableRow as TableRow4 } from "@mui/material";
|
|
3980
4232
|
function BaseGridAutoRows({
|
|
@@ -3982,18 +4234,18 @@ function BaseGridAutoRows({
|
|
|
3982
4234
|
columns,
|
|
3983
4235
|
rowKey
|
|
3984
4236
|
}) {
|
|
3985
|
-
return /* @__PURE__ */
|
|
4237
|
+
return /* @__PURE__ */ React22.createElement(Fragment2, null, data.map((row) => /* @__PURE__ */ React22.createElement(TableRow4, { key: row[rowKey] }, columns.map((column) => /* @__PURE__ */ React22.createElement(TableCell5, { key: column.name }, row[column.name])))));
|
|
3986
4238
|
}
|
|
3987
4239
|
|
|
3988
4240
|
// src/components/Modal/index.tsx
|
|
3989
|
-
import
|
|
4241
|
+
import React23 from "react";
|
|
3990
4242
|
import {
|
|
3991
4243
|
Box as Box5,
|
|
3992
4244
|
Modal as MuiModal
|
|
3993
4245
|
} from "@mui/material";
|
|
3994
4246
|
var Modal = (_a) => {
|
|
3995
4247
|
var _b = _a, { open, onClose, BoxProps: BoxProps3 } = _b, rest = __objRest(_b, ["open", "onClose", "BoxProps"]);
|
|
3996
|
-
return /* @__PURE__ */
|
|
4248
|
+
return /* @__PURE__ */ React23.createElement(MuiModal, __spreadValues({ open, onClose }, rest), /* @__PURE__ */ React23.createElement(
|
|
3997
4249
|
Box5,
|
|
3998
4250
|
__spreadProps(__spreadValues({}, BoxProps3), {
|
|
3999
4251
|
sx: __spreadValues({
|
|
@@ -4019,7 +4271,7 @@ function GetInputLabel(columns) {
|
|
|
4019
4271
|
}
|
|
4020
4272
|
|
|
4021
4273
|
// src/components/Dialog/index.tsx
|
|
4022
|
-
import
|
|
4274
|
+
import React24 from "react";
|
|
4023
4275
|
import {
|
|
4024
4276
|
Box as Box6,
|
|
4025
4277
|
Dialog as DefaultDialog,
|
|
@@ -4043,8 +4295,8 @@ var Dialog = (_a) => {
|
|
|
4043
4295
|
"body",
|
|
4044
4296
|
"options"
|
|
4045
4297
|
]);
|
|
4046
|
-
return /* @__PURE__ */
|
|
4047
|
-
return /* @__PURE__ */
|
|
4298
|
+
return /* @__PURE__ */ React24.createElement(DefaultDialog, __spreadValues({ open }, rest), /* @__PURE__ */ React24.createElement(Box6, { sx: { p: 2 } }, /* @__PURE__ */ React24.createElement(DialogTitle, { sx: { fontWeight: "bold" } }, title), /* @__PURE__ */ React24.createElement(DialogContentText, { sx: { px: "10px", textAlign: "center", mb: 2 } }, body), /* @__PURE__ */ React24.createElement(DialogActions, null, options.map((option, index) => {
|
|
4299
|
+
return /* @__PURE__ */ React24.createElement(
|
|
4048
4300
|
Button3,
|
|
4049
4301
|
{
|
|
4050
4302
|
key: index,
|
|
@@ -4057,13 +4309,13 @@ var Dialog = (_a) => {
|
|
|
4057
4309
|
disableElevation: true,
|
|
4058
4310
|
disabled: loading
|
|
4059
4311
|
},
|
|
4060
|
-
loading && option.focus ? /* @__PURE__ */
|
|
4312
|
+
loading && option.focus ? /* @__PURE__ */ React24.createElement(CircularProgress3, { size: 25, color: "inherit" }) : /* @__PURE__ */ React24.createElement(React24.Fragment, null, option.label)
|
|
4061
4313
|
);
|
|
4062
4314
|
}))));
|
|
4063
4315
|
};
|
|
4064
4316
|
|
|
4065
4317
|
// src/components/DialogConfirm/DialogConfirm.view.tsx
|
|
4066
|
-
import
|
|
4318
|
+
import React25 from "react";
|
|
4067
4319
|
import { Box as Box7, Portal, Stack as Stack2, Typography as Typography3 } from "@mui/material";
|
|
4068
4320
|
import { grey, orange } from "@mui/material/colors";
|
|
4069
4321
|
import { MdOutlineWarningAmber } from "react-icons/md";
|
|
@@ -4073,22 +4325,22 @@ import { useRef as useRef3, useState as useState4 } from "react";
|
|
|
4073
4325
|
function UseDialogConfirm() {
|
|
4074
4326
|
const [opened, setOpened] = useState4(false);
|
|
4075
4327
|
const [isLoading, setLoading] = useState4(false);
|
|
4076
|
-
const onConfirmFn = useRef3()
|
|
4328
|
+
const onConfirmFn = useRef3(() => __async(null, null, function* () {
|
|
4329
|
+
}));
|
|
4077
4330
|
const paramsFn = useRef3([]);
|
|
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 {
|
|
@@ -4120,10 +4371,10 @@ var DEFAULT_ICON = MdOutlineWarningAmber;
|
|
|
4120
4371
|
var DialogConfirm = (props) => {
|
|
4121
4372
|
const model = UseDialogConfirm();
|
|
4122
4373
|
const Icon = props.icon || DEFAULT_ICON;
|
|
4123
|
-
return /* @__PURE__ */
|
|
4374
|
+
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, props.children({
|
|
4124
4375
|
onConfirm: model.onConfirm,
|
|
4125
4376
|
onCancel: model.onCancel
|
|
4126
|
-
}), /* @__PURE__ */
|
|
4377
|
+
}), /* @__PURE__ */ React25.createElement(Portal, null, /* @__PURE__ */ React25.createElement(Modal, { open: model.opened, onClose: model.onCloseModal }, /* @__PURE__ */ React25.createElement(Box7, { sx: { p: 2, maxWidth: 400, textAlign: "center" } }, /* @__PURE__ */ React25.createElement(
|
|
4127
4378
|
Stack2,
|
|
4128
4379
|
{
|
|
4129
4380
|
mx: "auto",
|
|
@@ -4136,8 +4387,8 @@ var DialogConfirm = (props) => {
|
|
|
4136
4387
|
justifyContent: "center",
|
|
4137
4388
|
alignItems: "center"
|
|
4138
4389
|
},
|
|
4139
|
-
/* @__PURE__ */
|
|
4140
|
-
), /* @__PURE__ */
|
|
4390
|
+
/* @__PURE__ */ React25.createElement(Icon, { size: 8 * 3 })
|
|
4391
|
+
), /* @__PURE__ */ React25.createElement(Typography3, { fontWeight: "bold", variant: "h6", mt: 1 }, props.title || "Aten\xE7\xE3o"), /* @__PURE__ */ React25.createElement(Typography3, { my: 1 }, props.body || "Tem certeza que deseja realizar essa a\xE7\xE3o?"), /* @__PURE__ */ React25.createElement(Stack2, { gap: 1, mt: 3, color: grey[600] }, /* @__PURE__ */ React25.createElement(
|
|
4141
4392
|
LargeButton,
|
|
4142
4393
|
{
|
|
4143
4394
|
color: "warning",
|
|
@@ -4145,7 +4396,7 @@ var DialogConfirm = (props) => {
|
|
|
4145
4396
|
onClick: model.onProceed
|
|
4146
4397
|
},
|
|
4147
4398
|
props.confirmButtonText || "Confirmar"
|
|
4148
|
-
), /* @__PURE__ */
|
|
4399
|
+
), /* @__PURE__ */ React25.createElement(
|
|
4149
4400
|
LargeButton,
|
|
4150
4401
|
{
|
|
4151
4402
|
variant: "outlined",
|
|
@@ -4158,13 +4409,13 @@ var DialogConfirm = (props) => {
|
|
|
4158
4409
|
};
|
|
4159
4410
|
|
|
4160
4411
|
// src/components/BaseDialog/BaseDialog.tsx
|
|
4161
|
-
import
|
|
4412
|
+
import React29 from "react";
|
|
4162
4413
|
|
|
4163
4414
|
// src/components/BaseDialog/BaseDialogHook.ts
|
|
4164
4415
|
import { useContext as useContext2 } from "react";
|
|
4165
4416
|
|
|
4166
4417
|
// src/components/BaseDialog/BaseDialogContext.tsx
|
|
4167
|
-
import
|
|
4418
|
+
import React26 from "react";
|
|
4168
4419
|
import { createContext, useCallback, useState as useState5 } from "react";
|
|
4169
4420
|
var BaseDialogContext = createContext({});
|
|
4170
4421
|
var BaseDialogProvider = (props) => {
|
|
@@ -4193,7 +4444,7 @@ var BaseDialogProvider = (props) => {
|
|
|
4193
4444
|
const closeAllDialogs = useCallback(() => {
|
|
4194
4445
|
return setOpenedDialogs([]);
|
|
4195
4446
|
}, [openedDialogs]);
|
|
4196
|
-
return /* @__PURE__ */
|
|
4447
|
+
return /* @__PURE__ */ React26.createElement(
|
|
4197
4448
|
BaseDialogContext.Provider,
|
|
4198
4449
|
{
|
|
4199
4450
|
value: {
|
|
@@ -4210,14 +4461,14 @@ var BaseDialogProvider = (props) => {
|
|
|
4210
4461
|
};
|
|
4211
4462
|
|
|
4212
4463
|
// src/components/BaseDialog/BaseDialogInstanceContext.tsx
|
|
4213
|
-
import
|
|
4464
|
+
import React27 from "react";
|
|
4214
4465
|
import { createContext as createContext2 } from "react";
|
|
4215
4466
|
var BaseDialogInstanceContext = createContext2(
|
|
4216
4467
|
{}
|
|
4217
4468
|
);
|
|
4218
4469
|
var BaseDialogInstanceProvider = (props) => {
|
|
4219
4470
|
const actions = useBaseDialog();
|
|
4220
|
-
return /* @__PURE__ */
|
|
4471
|
+
return /* @__PURE__ */ React27.createElement(BaseDialogInstanceContext.Provider, { value: { name: props.name, actions } }, props.children);
|
|
4221
4472
|
};
|
|
4222
4473
|
|
|
4223
4474
|
// src/components/BaseDialog/BaseDialogHook.ts
|
|
@@ -4232,7 +4483,7 @@ function useBaseDialogInstance() {
|
|
|
4232
4483
|
import { Box as Box8, Button as Button4 } from "@mui/material";
|
|
4233
4484
|
|
|
4234
4485
|
// src/components/BaseDialog/BaseDialogHeader.tsx
|
|
4235
|
-
import
|
|
4486
|
+
import React28 from "react";
|
|
4236
4487
|
import {
|
|
4237
4488
|
IconButton as IconButton4,
|
|
4238
4489
|
Stack as Stack3,
|
|
@@ -4254,11 +4505,10 @@ 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
|
-
return /* @__PURE__ */
|
|
4511
|
+
return /* @__PURE__ */ React28.createElement(
|
|
4262
4512
|
Stack3,
|
|
4263
4513
|
__spreadValues({
|
|
4264
4514
|
direction: "row",
|
|
@@ -4267,8 +4517,8 @@ var BaseDialogHeader = (_a) => {
|
|
|
4267
4517
|
px: 2,
|
|
4268
4518
|
my: 1
|
|
4269
4519
|
}, props),
|
|
4270
|
-
/* @__PURE__ */
|
|
4271
|
-
/* @__PURE__ */
|
|
4520
|
+
/* @__PURE__ */ React28.createElement(Typography4, __spreadValues({ variant: "h6", fontWeight: "bold" }, TypographyProps2), title),
|
|
4521
|
+
/* @__PURE__ */ React28.createElement(IconButton4, __spreadProps(__spreadValues({}, IconButtonProps), { onClick: handleClose }), /* @__PURE__ */ React28.createElement(MdClose2, null))
|
|
4272
4522
|
);
|
|
4273
4523
|
};
|
|
4274
4524
|
|
|
@@ -4281,10 +4531,10 @@ var BaseDialogContainer = (_a) => {
|
|
|
4281
4531
|
]);
|
|
4282
4532
|
const { name } = useBaseDialogInstance();
|
|
4283
4533
|
const { isOpened, close: closeDialog } = useBaseDialog();
|
|
4284
|
-
return /* @__PURE__ */
|
|
4534
|
+
return /* @__PURE__ */ React29.createElement(Modal, __spreadValues({ open: isOpened(name), onClose: () => closeDialog(name) }, rest), children instanceof Function ? children({ close: () => closeDialog(name) }) : children);
|
|
4285
4535
|
};
|
|
4286
4536
|
var BaseDialogBody = (props) => {
|
|
4287
|
-
return /* @__PURE__ */
|
|
4537
|
+
return /* @__PURE__ */ React29.createElement(Box8, __spreadValues({ px: 2, pb: 2, width: "100vw", maxWidth: 650 }, props), props.children);
|
|
4288
4538
|
};
|
|
4289
4539
|
var BaseDialogTrigger = (_a) => {
|
|
4290
4540
|
var _b = _a, {
|
|
@@ -4295,23 +4545,22 @@ var BaseDialogTrigger = (_a) => {
|
|
|
4295
4545
|
"onClick"
|
|
4296
4546
|
]);
|
|
4297
4547
|
const { open } = useBaseDialog();
|
|
4298
|
-
return /* @__PURE__ */
|
|
4548
|
+
return /* @__PURE__ */ React29.createElement(
|
|
4299
4549
|
Button4,
|
|
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
|
-
Trigger: (props) => /* @__PURE__ */
|
|
4314
|
-
Root: (props) => /* @__PURE__ */
|
|
4562
|
+
Trigger: (props) => /* @__PURE__ */ React29.createElement(BaseDialogTrigger, __spreadValues({ name }, props)),
|
|
4563
|
+
Root: (props) => /* @__PURE__ */ React29.createElement(BaseDialogInstanceProvider, __spreadValues({ name }, props)),
|
|
4315
4564
|
Container: BaseDialogContainer,
|
|
4316
4565
|
Header: BaseDialogHeader,
|
|
4317
4566
|
Body: BaseDialogBody
|
|
@@ -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
|
|
@@ -4427,8 +4674,7 @@ var ApiHelper = class _ApiHelper {
|
|
|
4427
4674
|
}
|
|
4428
4675
|
static parseQueyFilters(filters) {
|
|
4429
4676
|
return Object.entries(filters).reduce((acc, [key, value]) => {
|
|
4430
|
-
if (value)
|
|
4431
|
-
acc[key] = value;
|
|
4677
|
+
if (value) acc[key] = value;
|
|
4432
4678
|
return acc;
|
|
4433
4679
|
}, {});
|
|
4434
4680
|
}
|
|
@@ -4446,15 +4692,15 @@ import { useCallback as useCallback4, useContext as useContext4, useEffect as us
|
|
|
4446
4692
|
import { useContext as useContext3 } from "react";
|
|
4447
4693
|
|
|
4448
4694
|
// src/contexts/AlertContext.tsx
|
|
4449
|
-
import
|
|
4695
|
+
import React31, { useCallback as useCallback2 } from "react";
|
|
4450
4696
|
import { createContext as createContext3, useState as useState6 } from "react";
|
|
4451
4697
|
|
|
4452
4698
|
// src/components/Toast/index.tsx
|
|
4453
|
-
import
|
|
4699
|
+
import React30 from "react";
|
|
4454
4700
|
import { Alert, IconButton as IconButton5, Snackbar } from "@mui/material";
|
|
4455
4701
|
import { MdClose as MdClose3 } from "react-icons/md";
|
|
4456
4702
|
var Toast = ({ open, onClose, severity, message }) => {
|
|
4457
|
-
return /* @__PURE__ */
|
|
4703
|
+
return /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(
|
|
4458
4704
|
Snackbar,
|
|
4459
4705
|
{
|
|
4460
4706
|
open,
|
|
@@ -4463,12 +4709,12 @@ var Toast = ({ open, onClose, severity, message }) => {
|
|
|
4463
4709
|
anchorOrigin: { vertical: "top", horizontal: "right" },
|
|
4464
4710
|
sx: { zIndex: 99999999 }
|
|
4465
4711
|
},
|
|
4466
|
-
/* @__PURE__ */
|
|
4712
|
+
/* @__PURE__ */ React30.createElement(
|
|
4467
4713
|
Alert,
|
|
4468
4714
|
{
|
|
4469
4715
|
severity,
|
|
4470
4716
|
elevation: 2,
|
|
4471
|
-
action: /* @__PURE__ */
|
|
4717
|
+
action: /* @__PURE__ */ React30.createElement(
|
|
4472
4718
|
IconButton5,
|
|
4473
4719
|
{
|
|
4474
4720
|
"aria-label": "close",
|
|
@@ -4476,7 +4722,7 @@ var Toast = ({ open, onClose, severity, message }) => {
|
|
|
4476
4722
|
size: "small",
|
|
4477
4723
|
onClick: onClose
|
|
4478
4724
|
},
|
|
4479
|
-
/* @__PURE__ */
|
|
4725
|
+
/* @__PURE__ */ React30.createElement(MdClose3, { fontSize: "inherit" })
|
|
4480
4726
|
)
|
|
4481
4727
|
},
|
|
4482
4728
|
message
|
|
@@ -4501,7 +4747,7 @@ var AlertProvider = ({ children }) => {
|
|
|
4501
4747
|
const onCloseToast = useCallback2(() => {
|
|
4502
4748
|
setIsVisible(false);
|
|
4503
4749
|
}, []);
|
|
4504
|
-
return /* @__PURE__ */
|
|
4750
|
+
return /* @__PURE__ */ React31.createElement(AlertContext.Provider, { value: { createAlert } }, children, /* @__PURE__ */ React31.createElement(
|
|
4505
4751
|
Toast,
|
|
4506
4752
|
{
|
|
4507
4753
|
open: isVisible,
|
|
@@ -4525,18 +4771,17 @@ function useLoading() {
|
|
|
4525
4771
|
const setLoading = useCallback3((prop, remove) => {
|
|
4526
4772
|
if (remove)
|
|
4527
4773
|
setState((prevState) => prevState.filter((state2) => state2 !== prop));
|
|
4528
|
-
else
|
|
4529
|
-
setState((prevState) => [...prevState, prop]);
|
|
4774
|
+
else setState((prevState) => [...prevState, prop]);
|
|
4530
4775
|
}, []);
|
|
4531
4776
|
return { isLoading, setLoading };
|
|
4532
4777
|
}
|
|
4533
4778
|
|
|
4534
4779
|
// src/contexts/FormHelperProvider.tsx
|
|
4535
|
-
import
|
|
4780
|
+
import React32 from "react";
|
|
4536
4781
|
import { createContext as createContext4 } from "react";
|
|
4537
4782
|
var FormHelperContext = createContext4({});
|
|
4538
4783
|
var FormHelperProvider = ({ formatErrorMessage, api, children }) => {
|
|
4539
|
-
return /* @__PURE__ */
|
|
4784
|
+
return /* @__PURE__ */ React32.createElement(FormHelperContext.Provider, { value: { formatErrorMessage, api } }, children);
|
|
4540
4785
|
};
|
|
4541
4786
|
|
|
4542
4787
|
// src/hooks/useFormHelper.ts
|
|
@@ -4549,7 +4794,7 @@ function useFormHelper() {
|
|
|
4549
4794
|
const sourceRef = useRef4(new AbortController());
|
|
4550
4795
|
const onSubmitWrapper = useCallback4(
|
|
4551
4796
|
(fn, { name }) => {
|
|
4552
|
-
return (fields, methods) => __async(
|
|
4797
|
+
return (fields, methods) => __async(null, null, function* () {
|
|
4553
4798
|
const LOADING_NAME = name;
|
|
4554
4799
|
setLoading(LOADING_NAME);
|
|
4555
4800
|
try {
|
|
@@ -4565,7 +4810,7 @@ function useFormHelper() {
|
|
|
4565
4810
|
);
|
|
4566
4811
|
const onRequestWrapper = useCallback4(
|
|
4567
4812
|
(fn, { name }) => {
|
|
4568
|
-
return (...params) => __async(
|
|
4813
|
+
return (...params) => __async(null, null, function* () {
|
|
4569
4814
|
const LOADING_NAME = name;
|
|
4570
4815
|
setLoading(LOADING_NAME);
|
|
4571
4816
|
api.interceptors.request.use(
|
|
@@ -4593,8 +4838,7 @@ function useFormHelper() {
|
|
|
4593
4838
|
);
|
|
4594
4839
|
const errorHandler = useCallback4(
|
|
4595
4840
|
(error, callback) => {
|
|
4596
|
-
if ((error == null ? void 0 : error.message) === "cancel.navigation")
|
|
4597
|
-
return;
|
|
4841
|
+
if ((error == null ? void 0 : error.message) === "cancel.navigation") return;
|
|
4598
4842
|
if (callback) {
|
|
4599
4843
|
if (error.response.data.code === "invalid.body") {
|
|
4600
4844
|
const errors = error.response.data.details.issues;
|
|
@@ -4699,8 +4943,7 @@ var AuthHelper = class {
|
|
|
4699
4943
|
}
|
|
4700
4944
|
handler(req, res) {
|
|
4701
4945
|
return __async(this, null, function* () {
|
|
4702
|
-
if (!req.url)
|
|
4703
|
-
return res.status(400).json({ error: "url not sent" });
|
|
4946
|
+
if (!req.url) return res.status(400).json({ error: "url not sent" });
|
|
4704
4947
|
if (req.url.endsWith("/login")) {
|
|
4705
4948
|
const loginResult = yield this.onLogin(req.body);
|
|
4706
4949
|
if (loginResult.status === "sucess") {
|
|
@@ -4737,8 +4980,7 @@ var AuthHelper = class {
|
|
|
4737
4980
|
sessionTokenName: this.cookies.sessionToken,
|
|
4738
4981
|
validate: false
|
|
4739
4982
|
});
|
|
4740
|
-
if (error)
|
|
4741
|
-
return;
|
|
4983
|
+
if (error) return;
|
|
4742
4984
|
const userId = String(req.user);
|
|
4743
4985
|
const refreshToken = parseCookies({ req })[this.cookies.refreshToken];
|
|
4744
4986
|
if (!refreshToken) {
|
|
@@ -4786,8 +5028,7 @@ var AuthHelper = class {
|
|
|
4786
5028
|
sessionTokenName: this.cookies.sessionToken,
|
|
4787
5029
|
validate: true
|
|
4788
5030
|
});
|
|
4789
|
-
if (error)
|
|
4790
|
-
return;
|
|
5031
|
+
if (error) return;
|
|
4791
5032
|
if (!req.user)
|
|
4792
5033
|
return res.status(400).json({ error: "Usu\xE1rio n\xE3o encontrado" });
|
|
4793
5034
|
const userData = yield this.onGetUserData(req.user);
|
|
@@ -4813,8 +5054,7 @@ var AuthHelper = class {
|
|
|
4813
5054
|
}
|
|
4814
5055
|
oauthSignInCallback(code) {
|
|
4815
5056
|
return __async(this, null, function* () {
|
|
4816
|
-
if (!this.oauth)
|
|
4817
|
-
throw new Error("OAUTH variables is not defined");
|
|
5057
|
+
if (!this.oauth) throw new Error("OAUTH variables is not defined");
|
|
4818
5058
|
const body = {
|
|
4819
5059
|
client_id: this.oauth.client_id,
|
|
4820
5060
|
scope: this.oauth.scope,
|
|
@@ -4844,8 +5084,7 @@ var AuthHelper = class {
|
|
|
4844
5084
|
onFailedDestination
|
|
4845
5085
|
}) {
|
|
4846
5086
|
return (ctx) => __async(this, null, function* () {
|
|
4847
|
-
if (!this.oauth)
|
|
4848
|
-
throw new Error("Oauth env variables are not defined");
|
|
5087
|
+
if (!this.oauth) throw new Error("Oauth env variables are not defined");
|
|
4849
5088
|
const code = ctx.query.code;
|
|
4850
5089
|
if (!code)
|
|
4851
5090
|
return {
|
|
@@ -4951,10 +5190,8 @@ function useFilter(props = { defaultFilters: [] }) {
|
|
|
4951
5190
|
};
|
|
4952
5191
|
}
|
|
4953
5192
|
function isDate(date) {
|
|
4954
|
-
if (date instanceof Date)
|
|
4955
|
-
|
|
4956
|
-
else if (String(date).endsWith("Z"))
|
|
4957
|
-
return true;
|
|
5193
|
+
if (date instanceof Date) return true;
|
|
5194
|
+
else if (String(date).endsWith("Z")) return true;
|
|
4958
5195
|
return false;
|
|
4959
5196
|
}
|
|
4960
5197
|
function compareFilter(item, filter) {
|
|
@@ -4985,8 +5222,7 @@ function compareFilter(item, filter) {
|
|
|
4985
5222
|
function createFilter(filters) {
|
|
4986
5223
|
function apply(item) {
|
|
4987
5224
|
const satisfiedFilters = filters.reduce((acc, filter) => {
|
|
4988
|
-
if (compareFilter(item, filter))
|
|
4989
|
-
acc += 1;
|
|
5225
|
+
if (compareFilter(item, filter)) acc += 1;
|
|
4990
5226
|
return acc;
|
|
4991
5227
|
}, 0);
|
|
4992
5228
|
return satisfiedFilters === filters.length;
|
|
@@ -5015,8 +5251,7 @@ function useGrid({
|
|
|
5015
5251
|
const [rowsPerPage, setRowsPerPage] = useState9(rowsPerPageOptions[0]);
|
|
5016
5252
|
const toggleSortedDirection = useCallback6(
|
|
5017
5253
|
(direction) => {
|
|
5018
|
-
if (direction === "asc")
|
|
5019
|
-
return "desc";
|
|
5254
|
+
if (direction === "asc") return "desc";
|
|
5020
5255
|
return "asc";
|
|
5021
5256
|
},
|
|
5022
5257
|
[]
|
|
@@ -5032,8 +5267,7 @@ function useGrid({
|
|
|
5032
5267
|
}, []);
|
|
5033
5268
|
const onSortBy = useCallback6(
|
|
5034
5269
|
(prop) => {
|
|
5035
|
-
if (!prop)
|
|
5036
|
-
return;
|
|
5270
|
+
if (!prop) return;
|
|
5037
5271
|
const currentSorted = sortedBy.find((p) => p.prop === prop);
|
|
5038
5272
|
if (currentSorted) {
|
|
5039
5273
|
if (currentSorted.direction === "asc") {
|
|
@@ -5041,8 +5275,7 @@ function useGrid({
|
|
|
5041
5275
|
} else {
|
|
5042
5276
|
setSortedBy((prev) => {
|
|
5043
5277
|
const newArr = prev.map((p) => {
|
|
5044
|
-
if (p.prop !== prop)
|
|
5045
|
-
return p;
|
|
5278
|
+
if (p.prop !== prop) return p;
|
|
5046
5279
|
return {
|
|
5047
5280
|
prop: p.prop,
|
|
5048
5281
|
direction: toggleSortedDirection(p.direction)
|
|
@@ -5071,31 +5304,26 @@ function useGrid({
|
|
|
5071
5304
|
({ prop, direction }) => `${symbolDir[direction]}${prop}`
|
|
5072
5305
|
);
|
|
5073
5306
|
return data.sort(sortBy(...formattedKeys));
|
|
5074
|
-
} else
|
|
5075
|
-
return data;
|
|
5307
|
+
} else return data;
|
|
5076
5308
|
},
|
|
5077
5309
|
[sortedBy]
|
|
5078
5310
|
);
|
|
5079
5311
|
const onPageChange = (pageNumber) => {
|
|
5080
|
-
if (pageNumber < 0)
|
|
5081
|
-
|
|
5082
|
-
if (pageNumber > totalNumberOfPages)
|
|
5083
|
-
return;
|
|
5312
|
+
if (pageNumber < 0) return;
|
|
5313
|
+
if (pageNumber > totalNumberOfPages) return;
|
|
5084
5314
|
setCurrentPage(pageNumber);
|
|
5085
5315
|
};
|
|
5086
5316
|
const onChangeRowsPerPage = useCallback6(
|
|
5087
5317
|
(rows) => {
|
|
5088
5318
|
let totalNumberOfPages2 = Math.round(filteredData.length / rows) - 1;
|
|
5089
5319
|
totalNumberOfPages2 = totalNumberOfPages2 <= 0 ? 0 : 1;
|
|
5090
|
-
if (currentPage > totalNumberOfPages2)
|
|
5091
|
-
setCurrentPage(totalNumberOfPages2);
|
|
5320
|
+
if (currentPage > totalNumberOfPages2) setCurrentPage(totalNumberOfPages2);
|
|
5092
5321
|
setRowsPerPage(rows);
|
|
5093
5322
|
},
|
|
5094
5323
|
[currentPage]
|
|
5095
5324
|
);
|
|
5096
5325
|
const orderedData = useMemo3(() => {
|
|
5097
|
-
if (sortedBy.length === 0)
|
|
5098
|
-
return defaultData;
|
|
5326
|
+
if (sortedBy.length === 0) return defaultData;
|
|
5099
5327
|
const newData = defaultData.slice(0);
|
|
5100
5328
|
const sortedData = sortData(newData);
|
|
5101
5329
|
return sortedData;
|
|
@@ -5106,8 +5334,7 @@ function useGrid({
|
|
|
5106
5334
|
const searchBy = createSearch(search);
|
|
5107
5335
|
newData = newData.filter(searchBy);
|
|
5108
5336
|
}
|
|
5109
|
-
if (!filters)
|
|
5110
|
-
return newData;
|
|
5337
|
+
if (!filters) return newData;
|
|
5111
5338
|
const newFilter = createFilter(filters);
|
|
5112
5339
|
return newData.filter(newFilter.apply);
|
|
5113
5340
|
}, [orderedData, search, filters]);
|
|
@@ -5118,8 +5345,7 @@ function useGrid({
|
|
|
5118
5345
|
}, [currentPage, rowsPerPage, filteredData]);
|
|
5119
5346
|
const totalNumberOfPages = Math.ceil(filteredData.length / rowsPerPage) - 1;
|
|
5120
5347
|
useEffect5(() => {
|
|
5121
|
-
if (externalDefaultData)
|
|
5122
|
-
setDefaultData(externalDefaultData);
|
|
5348
|
+
if (externalDefaultData) setDefaultData(externalDefaultData);
|
|
5123
5349
|
}, [externalDefaultData]);
|
|
5124
5350
|
return {
|
|
5125
5351
|
data: paginatedData,
|
|
@@ -5143,21 +5369,17 @@ function useGrid({
|
|
|
5143
5369
|
}
|
|
5144
5370
|
var isNumberOrString = (value) => ["number", "string"].includes(typeof value);
|
|
5145
5371
|
var concatenateKey = (key, prev) => {
|
|
5146
|
-
if (!prev)
|
|
5147
|
-
return key;
|
|
5372
|
+
if (!prev) return key;
|
|
5148
5373
|
return `${prev}.${key}`;
|
|
5149
5374
|
};
|
|
5150
5375
|
function searchKeysForValue(row, accKey, compare) {
|
|
5151
|
-
if (typeof row === "undefined")
|
|
5152
|
-
return false;
|
|
5376
|
+
if (typeof row === "undefined") return false;
|
|
5153
5377
|
const rowKeys = Object.keys(row);
|
|
5154
5378
|
let match = false;
|
|
5155
5379
|
for (const key of rowKeys) {
|
|
5156
|
-
if (match)
|
|
5157
|
-
break;
|
|
5380
|
+
if (match) break;
|
|
5158
5381
|
const objValue = row[key];
|
|
5159
|
-
if (!objValue)
|
|
5160
|
-
continue;
|
|
5382
|
+
if (!objValue) continue;
|
|
5161
5383
|
const concatenatedKey = concatenateKey(key, accKey);
|
|
5162
5384
|
if (Array.isArray(objValue)) {
|
|
5163
5385
|
match = objValue.some(
|
|
@@ -5173,17 +5395,21 @@ function searchKeysForValue(row, accKey, compare) {
|
|
|
5173
5395
|
}
|
|
5174
5396
|
return match;
|
|
5175
5397
|
}
|
|
5398
|
+
var normalize = (str) => str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
5176
5399
|
function createSearch(options) {
|
|
5177
5400
|
const searchValue = options.caseSensitive ? options.value : String(options.value).toLowerCase();
|
|
5401
|
+
function getValue2(value) {
|
|
5402
|
+
if (options.caseSensitive) return String(value);
|
|
5403
|
+
return String(value).toLowerCase();
|
|
5404
|
+
}
|
|
5178
5405
|
function compare(key, objValue) {
|
|
5179
5406
|
if (options.ignoredKeys) {
|
|
5180
5407
|
const isIgnoredKey = options.ignoredKeys.includes(key);
|
|
5181
|
-
if (isIgnoredKey)
|
|
5182
|
-
return false;
|
|
5408
|
+
if (isIgnoredKey) return false;
|
|
5183
5409
|
}
|
|
5184
|
-
const value =
|
|
5185
|
-
if (options.exact)
|
|
5186
|
-
|
|
5410
|
+
const value = getValue2(objValue);
|
|
5411
|
+
if (options.exact) return value === searchValue;
|
|
5412
|
+
if (options.ignoreAccentMark) return normalize(value).includes(normalize(searchValue));
|
|
5187
5413
|
return value.includes(searchValue);
|
|
5188
5414
|
}
|
|
5189
5415
|
return (row) => {
|
|
@@ -5217,8 +5443,7 @@ function useAsyncGrid({
|
|
|
5217
5443
|
const totalNumberOfPages = Math.ceil(totalNumberOfItems / rowsPerPage) - 1;
|
|
5218
5444
|
const toggleSortedDirection = useCallback7(
|
|
5219
5445
|
(direction) => {
|
|
5220
|
-
if (direction === "asc")
|
|
5221
|
-
return "desc";
|
|
5446
|
+
if (direction === "asc") return "desc";
|
|
5222
5447
|
return "asc";
|
|
5223
5448
|
},
|
|
5224
5449
|
[]
|
|
@@ -5227,9 +5452,8 @@ function useAsyncGrid({
|
|
|
5227
5452
|
setSortedBy((prev) => [...prev, { prop, direction }]);
|
|
5228
5453
|
}, []);
|
|
5229
5454
|
const onSortBy = useCallback7(
|
|
5230
|
-
(prop) => __async(
|
|
5231
|
-
if (!prop)
|
|
5232
|
-
return;
|
|
5455
|
+
(prop) => __async(null, null, function* () {
|
|
5456
|
+
if (!prop) return;
|
|
5233
5457
|
let finalArr = [];
|
|
5234
5458
|
const currentSorted = sortedBy.find((p) => p.prop === prop);
|
|
5235
5459
|
if (currentSorted) {
|
|
@@ -5237,8 +5461,7 @@ function useAsyncGrid({
|
|
|
5237
5461
|
finalArr = sortedBy.filter((p) => p.prop !== prop);
|
|
5238
5462
|
} else {
|
|
5239
5463
|
finalArr = sortedBy.map((p) => {
|
|
5240
|
-
if (p.prop !== prop)
|
|
5241
|
-
return p;
|
|
5464
|
+
if (p.prop !== prop) return p;
|
|
5242
5465
|
return {
|
|
5243
5466
|
prop: p.prop,
|
|
5244
5467
|
direction: toggleSortedDirection(p.direction)
|
|
@@ -5260,15 +5483,14 @@ function useAsyncGrid({
|
|
|
5260
5483
|
setDefaultData(data);
|
|
5261
5484
|
}, []);
|
|
5262
5485
|
const baseRequest = useCallback7(
|
|
5263
|
-
(_0) => __async(
|
|
5486
|
+
(_0) => __async(null, [_0], function* ({
|
|
5264
5487
|
page,
|
|
5265
5488
|
search: search2,
|
|
5266
5489
|
filters: filters2,
|
|
5267
5490
|
sortedBy: sortedBy2,
|
|
5268
5491
|
rowsPerPage: rowsPerPage2
|
|
5269
5492
|
}) {
|
|
5270
|
-
if (!axiosInstance)
|
|
5271
|
-
throw new Error("Axios instance not provided");
|
|
5493
|
+
if (!axiosInstance) throw new Error("Axios instance not provided");
|
|
5272
5494
|
try {
|
|
5273
5495
|
const params = new URLSearchParams({
|
|
5274
5496
|
page: String(page),
|
|
@@ -5290,7 +5512,7 @@ function useAsyncGrid({
|
|
|
5290
5512
|
[axiosInstance, url]
|
|
5291
5513
|
);
|
|
5292
5514
|
const updateGridContent = useCallback7(
|
|
5293
|
-
(_0) => __async(
|
|
5515
|
+
(_0) => __async(null, [_0], function* ({
|
|
5294
5516
|
page,
|
|
5295
5517
|
sortedBy: sortedBy2,
|
|
5296
5518
|
rowsPerPage: rowsPerPage2
|
|
@@ -5317,10 +5539,8 @@ function useAsyncGrid({
|
|
|
5317
5539
|
);
|
|
5318
5540
|
const onPageChange = useCallback7(
|
|
5319
5541
|
(pageNumber) => {
|
|
5320
|
-
if (pageNumber < 0)
|
|
5321
|
-
|
|
5322
|
-
if (pageNumber > totalNumberOfPages)
|
|
5323
|
-
return;
|
|
5542
|
+
if (pageNumber < 0) return;
|
|
5543
|
+
if (pageNumber > totalNumberOfPages) return;
|
|
5324
5544
|
updateGridContent({ page: pageNumber, sortedBy, rowsPerPage });
|
|
5325
5545
|
},
|
|
5326
5546
|
[updateGridContent, totalNumberOfPages, sortedBy, rowsPerPage]
|
|
@@ -5378,7 +5598,7 @@ function useEvent(event, handler, passive = false) {
|
|
|
5378
5598
|
}
|
|
5379
5599
|
|
|
5380
5600
|
// src/contexts/AuthContext.tsx
|
|
5381
|
-
import
|
|
5601
|
+
import React33, { useCallback as useCallback8 } from "react";
|
|
5382
5602
|
import {
|
|
5383
5603
|
createContext as createContext5,
|
|
5384
5604
|
useEffect as useEffect8,
|
|
@@ -5398,7 +5618,7 @@ function CreateAuthProvider({
|
|
|
5398
5618
|
const [status, setStatus] = useState11("unauthenticated");
|
|
5399
5619
|
const { createAlert } = useAlert();
|
|
5400
5620
|
const signIn = useCallback8(
|
|
5401
|
-
(_0) => __async(
|
|
5621
|
+
(_0) => __async(null, [_0], function* ({ email, password }) {
|
|
5402
5622
|
var _a, _b;
|
|
5403
5623
|
setStatus("loading");
|
|
5404
5624
|
try {
|
|
@@ -5420,7 +5640,7 @@ function CreateAuthProvider({
|
|
|
5420
5640
|
}),
|
|
5421
5641
|
[createAlert, api]
|
|
5422
5642
|
);
|
|
5423
|
-
const ClientSignOut = useCallback8(() => __async(
|
|
5643
|
+
const ClientSignOut = useCallback8(() => __async(null, null, function* () {
|
|
5424
5644
|
yield api.get("/auth/logout");
|
|
5425
5645
|
setUser(void 0);
|
|
5426
5646
|
}), [api]);
|
|
@@ -5436,7 +5656,7 @@ function CreateAuthProvider({
|
|
|
5436
5656
|
});
|
|
5437
5657
|
}
|
|
5438
5658
|
}, [api, sessionTokenName]);
|
|
5439
|
-
return /* @__PURE__ */
|
|
5659
|
+
return /* @__PURE__ */ React33.createElement(
|
|
5440
5660
|
Provider,
|
|
5441
5661
|
{
|
|
5442
5662
|
value: {
|
|
@@ -5527,9 +5747,40 @@ object-assign/index.js:
|
|
|
5527
5747
|
@license MIT
|
|
5528
5748
|
*)
|
|
5529
5749
|
|
|
5530
|
-
|
|
5750
|
+
react-is/cjs/react-is.production.js:
|
|
5751
|
+
(**
|
|
5752
|
+
* @license React
|
|
5753
|
+
* react-is.production.js
|
|
5754
|
+
*
|
|
5755
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5756
|
+
*
|
|
5757
|
+
* This source code is licensed under the MIT license found in the
|
|
5758
|
+
* LICENSE file in the root directory of this source tree.
|
|
5759
|
+
*)
|
|
5760
|
+
|
|
5761
|
+
react-is/cjs/react-is.development.js:
|
|
5762
|
+
(**
|
|
5763
|
+
* @license React
|
|
5764
|
+
* react-is.development.js
|
|
5765
|
+
*
|
|
5766
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5767
|
+
*
|
|
5768
|
+
* This source code is licensed under the MIT license found in the
|
|
5769
|
+
* LICENSE file in the root directory of this source tree.
|
|
5770
|
+
*)
|
|
5771
|
+
|
|
5772
|
+
@mui/styled-engine/esm/index.js:
|
|
5773
|
+
(**
|
|
5774
|
+
* @mui/styled-engine v7.3.7
|
|
5775
|
+
*
|
|
5776
|
+
* @license MIT
|
|
5777
|
+
* This source code is licensed under the MIT license found in the
|
|
5778
|
+
* LICENSE file in the root directory of this source tree.
|
|
5779
|
+
*)
|
|
5780
|
+
|
|
5781
|
+
@mui/system/esm/index.js:
|
|
5531
5782
|
(**
|
|
5532
|
-
* @mui/
|
|
5783
|
+
* @mui/system v7.3.7
|
|
5533
5784
|
*
|
|
5534
5785
|
* @license MIT
|
|
5535
5786
|
* This source code is licensed under the MIT license found in the
|