schummar-table 0.46.8 → 0.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-CTAAG5j7.js +13 -0
- package/dist/chunk-pbleEpgJ.cjs +44 -0
- package/dist/csvExporter-BGoiph1b.cjs +41 -0
- package/dist/csvExporter-BGoiph1b.cjs.map +1 -0
- package/dist/csvExporter-DRm4V8We.js +35 -0
- package/dist/csvExporter-DRm4V8We.js.map +1 -0
- package/dist/csvExporter.cjs +2 -78
- package/dist/csvExporter.d.cts +15 -13
- package/dist/csvExporter.d.ts +15 -13
- package/dist/csvExporter.js +3 -8
- package/dist/excelExporter.cjs +18 -38
- package/dist/excelExporter.cjs.map +1 -1
- package/dist/excelExporter.d.cts +7 -6
- package/dist/excelExporter.d.ts +7 -5
- package/dist/excelExporter.js +16 -19
- package/dist/excelExporter.js.map +1 -1
- package/dist/exporter-BxgFAyWA.d.ts +24 -0
- package/dist/exporter-ztSF5GbY.d.cts +24 -0
- package/dist/index.cjs +3422 -5340
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +207 -168
- package/dist/index.d.ts +205 -168
- package/dist/index.js +3378 -4425
- package/dist/index.js.map +1 -1
- package/dist/mui4Theme.cjs +62 -905
- package/dist/mui4Theme.cjs.map +1 -1
- package/dist/mui4Theme.d.cts +14 -10
- package/dist/mui4Theme.d.ts +14 -10
- package/dist/mui4Theme.js +54 -77
- package/dist/mui4Theme.js.map +1 -1
- package/dist/mui5Theme.cjs +62 -901
- package/dist/mui5Theme.cjs.map +1 -1
- package/dist/mui5Theme.d.cts +14 -10
- package/dist/mui5Theme.d.ts +14 -10
- package/dist/mui5Theme.js +57 -76
- package/dist/mui5Theme.js.map +1 -1
- package/dist/tableSettings-C_spVpBs.js +674 -0
- package/dist/tableSettings-C_spVpBs.js.map +1 -0
- package/dist/tableSettings-CmqSZu-Q.cjs +739 -0
- package/dist/tableSettings-CmqSZu-Q.cjs.map +1 -0
- package/dist/types-CemO-cBr.d.ts +433 -0
- package/dist/types-lBtXAU-l.d.cts +433 -0
- package/package.json +30 -70
- package/dist/chunk-EEBUKP6F.js +0 -64
- package/dist/chunk-EEBUKP6F.js.map +0 -1
- package/dist/chunk-NTYYITKA.js +0 -803
- package/dist/chunk-NTYYITKA.js.map +0 -1
- package/dist/chunk-WFCJ3D3G.js +0 -47
- package/dist/chunk-WFCJ3D3G.js.map +0 -1
- package/dist/csvExporter.cjs.map +0 -1
- package/dist/csvExporter.js.map +0 -1
- package/dist/exporter-u6SatTo6.d.cts +0 -22
- package/dist/exporter-u6SatTo6.d.ts +0 -22
- package/dist/types-BM1Cjg67.d.ts +0 -435
- package/dist/types-CNiUxMEp.d.cts +0 -435
package/dist/mui4Theme.cjs
CHANGED
|
@@ -1,906 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
mui4Theme: () => mui4Theme
|
|
64
|
-
});
|
|
65
|
-
module.exports = __toCommonJS(mui4Theme_exports);
|
|
66
|
-
var import_core = require("@material-ui/core");
|
|
67
|
-
var import_react6 = require("react");
|
|
68
|
-
|
|
69
|
-
// src/misc/tableSettings.tsx
|
|
70
|
-
var import_react = require("react");
|
|
71
|
-
|
|
72
|
-
// src/exporters/csvExporter.ts
|
|
73
|
-
var CsvExporter = class {
|
|
74
|
-
constructor(options = {}) {
|
|
75
|
-
this.options = options;
|
|
76
|
-
this.type = "csv";
|
|
77
|
-
this.fileEnding = "csv";
|
|
78
|
-
}
|
|
79
|
-
exportToString(columns, rows, options = this.options) {
|
|
80
|
-
const { sepPrefix, separator = " ", quote = '"', eol = "\n" } = options;
|
|
81
|
-
const cells = [columns, ...rows].map(
|
|
82
|
-
(line) => line.map((value) => {
|
|
83
|
-
let stringValue;
|
|
84
|
-
if (typeof value === "number") {
|
|
85
|
-
stringValue = String(value);
|
|
86
|
-
} else if (value instanceof Date) {
|
|
87
|
-
stringValue = value.toISOString();
|
|
88
|
-
} else {
|
|
89
|
-
stringValue = value;
|
|
90
|
-
}
|
|
91
|
-
if (![separator, quote, eol].some((c) => stringValue.includes(c))) {
|
|
92
|
-
return value;
|
|
93
|
-
}
|
|
94
|
-
const clean = stringValue.replace(new RegExp(quote, "g"), `${quote}${quote}`);
|
|
95
|
-
return `${quote}${clean}${quote}`;
|
|
96
|
-
})
|
|
97
|
-
);
|
|
98
|
-
return (sepPrefix ? `SEP=${separator}
|
|
99
|
-
` : "") + cells.map((line) => line.join(separator)).join(eol);
|
|
100
|
-
}
|
|
101
|
-
exportToBlob(columns, rows) {
|
|
102
|
-
var _a;
|
|
103
|
-
const data = this.exportToString(columns, rows, __spreadProps(__spreadValues({}, this.options), {
|
|
104
|
-
sepPrefix: (_a = this.options.sepPrefix) != null ? _a : true
|
|
105
|
-
}));
|
|
106
|
-
return new Blob([data], { type: "text/csv" });
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// src/misc/tableSettings.tsx
|
|
111
|
-
var import_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
112
|
-
var TableSettingsContext = (0, import_react.createContext)({
|
|
113
|
-
theme: {},
|
|
114
|
-
exporters: [
|
|
115
|
-
{ action: "copy", exporter: new CsvExporter() },
|
|
116
|
-
{ action: "download", exporter: new CsvExporter() }
|
|
117
|
-
]
|
|
118
|
-
});
|
|
119
|
-
function TableSettingsProvider({
|
|
120
|
-
theme,
|
|
121
|
-
exporters,
|
|
122
|
-
additionalExporters,
|
|
123
|
-
children
|
|
124
|
-
}) {
|
|
125
|
-
const inherited = (0, import_react.useContext)(TableSettingsContext);
|
|
126
|
-
theme != null ? theme : theme = inherited.theme;
|
|
127
|
-
exporters != null ? exporters : exporters = inherited.exporters;
|
|
128
|
-
if (additionalExporters) {
|
|
129
|
-
exporters = [...exporters, ...additionalExporters];
|
|
130
|
-
}
|
|
131
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
132
|
-
TableSettingsContext.Provider,
|
|
133
|
-
{
|
|
134
|
-
value: {
|
|
135
|
-
theme,
|
|
136
|
-
exporters
|
|
137
|
-
},
|
|
138
|
-
children
|
|
139
|
-
}
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// src/theme/defaultTheme/popover.tsx
|
|
144
|
-
var import_react3 = require("react");
|
|
145
|
-
var import_react_dom = require("react-dom");
|
|
146
|
-
|
|
147
|
-
// src/theme/defaultTheme/defaultClasses.ts
|
|
148
|
-
var import_react2 = require("@emotion/react");
|
|
149
|
-
var cell = (0, import_react2.css)({
|
|
150
|
-
padding: `calc(var(--spacing) * 0.1) calc(2 * var(--spacing))`,
|
|
151
|
-
display: "flex",
|
|
152
|
-
alignItems: "center",
|
|
153
|
-
borderBottom: "1px solid var(--table-border-light-color)",
|
|
154
|
-
whiteSpace: "nowrap",
|
|
155
|
-
overflow: "hidden",
|
|
156
|
-
"&:empty": {
|
|
157
|
-
padding: 0
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
var defaultClasses = {
|
|
161
|
-
table: (0, import_react2.css)({
|
|
162
|
-
position: "relative",
|
|
163
|
-
display: "grid",
|
|
164
|
-
color: "var(--table-text-color)"
|
|
165
|
-
}),
|
|
166
|
-
cell,
|
|
167
|
-
cellFill: (0, import_react2.css)({
|
|
168
|
-
borderBottom: "1px solid var(--table-border-light-color)"
|
|
169
|
-
}),
|
|
170
|
-
headerCell: (0, import_react2.css)(cell, {
|
|
171
|
-
borderBottom: "1px solid var(--table-border-color)",
|
|
172
|
-
background: "var(--table-background-color)",
|
|
173
|
-
"&:not(:empty)": {
|
|
174
|
-
padding: `var(--spacing) 0 var(--spacing) calc(2 * var(--spacing))`
|
|
175
|
-
}
|
|
176
|
-
}),
|
|
177
|
-
footerCell: (0, import_react2.css)(cell, {
|
|
178
|
-
padding: `var(--spacing) calc(2 * var(--spacing))`,
|
|
179
|
-
borderTop: "1px solid var(--table-border-color)",
|
|
180
|
-
borderBottom: "none",
|
|
181
|
-
background: "var(--table-background-color)"
|
|
182
|
-
}),
|
|
183
|
-
firstCell: (0, import_react2.css)({
|
|
184
|
-
justifyContent: "start"
|
|
185
|
-
}),
|
|
186
|
-
sticky: (0, import_react2.css)({
|
|
187
|
-
position: "sticky",
|
|
188
|
-
top: 0,
|
|
189
|
-
zIndex: 2
|
|
190
|
-
}),
|
|
191
|
-
stickyBottom: (0, import_react2.css)({
|
|
192
|
-
position: "sticky",
|
|
193
|
-
bottom: 0,
|
|
194
|
-
zIndex: 2
|
|
195
|
-
}),
|
|
196
|
-
headerFill: (0, import_react2.css)({
|
|
197
|
-
borderBottom: "1px solid var(--table-border-color)",
|
|
198
|
-
background: "var(--table-background-color)"
|
|
199
|
-
}),
|
|
200
|
-
footerFill: (0, import_react2.css)({
|
|
201
|
-
borderTop: "1px solid var(--table-border-color)",
|
|
202
|
-
background: "var(--table-background-color)"
|
|
203
|
-
}),
|
|
204
|
-
text: (0, import_react2.css)({
|
|
205
|
-
minWidth: 0,
|
|
206
|
-
overflow: "hidden",
|
|
207
|
-
textOverflow: "ellipsis"
|
|
208
|
-
}),
|
|
209
|
-
card: (0, import_react2.css)({
|
|
210
|
-
borderRadius: 4,
|
|
211
|
-
boxShadow: "0px 3px 14px 2px rgb(0 0 0 / 12%)",
|
|
212
|
-
background: "var(--table-background-color)"
|
|
213
|
-
}),
|
|
214
|
-
clearFiltersButton: (0, import_react2.css)({
|
|
215
|
-
padding: `0 calc(2 * var(--spacing))`,
|
|
216
|
-
fontWeight: "bold",
|
|
217
|
-
position: "sticky",
|
|
218
|
-
left: 0,
|
|
219
|
-
maxWidth: "fit-content",
|
|
220
|
-
gridColumn: "2/-1",
|
|
221
|
-
button: {
|
|
222
|
-
color: "var(--primaryMain) !important",
|
|
223
|
-
border: "solid 1px",
|
|
224
|
-
borderColor: "var(--primaryMain) !important",
|
|
225
|
-
margin: "var(--spacing)"
|
|
226
|
-
}
|
|
227
|
-
}),
|
|
228
|
-
details: (0, import_react2.css)(cell, {
|
|
229
|
-
gridColumn: "1 / -1",
|
|
230
|
-
whiteSpace: "normal"
|
|
231
|
-
})
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
// src/theme/defaultTheme/popover.tsx
|
|
235
|
-
var import_jsx_runtime2 = require("@emotion/react/jsx-runtime");
|
|
236
|
-
var MARGIN = 10;
|
|
237
|
-
var MAX_OFFSET = 20;
|
|
238
|
-
var Popover = ({
|
|
239
|
-
anchorEl,
|
|
240
|
-
open,
|
|
241
|
-
hidden,
|
|
242
|
-
onClose,
|
|
243
|
-
children,
|
|
244
|
-
className,
|
|
245
|
-
backdropClassName,
|
|
246
|
-
align
|
|
247
|
-
}) => {
|
|
248
|
-
const popper = (0, import_react3.useRef)(null);
|
|
249
|
-
const [position, setPosition] = (0, import_react3.useState)();
|
|
250
|
-
const [maxHeight, setMaxHeight] = (0, import_react3.useState)(document.documentElement.clientHeight - 2 * MARGIN);
|
|
251
|
-
const [zIndex, setZIndex] = (0, import_react3.useState)(1);
|
|
252
|
-
(0, import_react3.useLayoutEffect)(() => {
|
|
253
|
-
if (!anchorEl || !open) {
|
|
254
|
-
setPosition(void 0);
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
let last;
|
|
258
|
-
function check() {
|
|
259
|
-
var _a, _b;
|
|
260
|
-
if (!anchorEl) return;
|
|
261
|
-
const {
|
|
262
|
-
left: anchorLeft,
|
|
263
|
-
bottom: anchorBottom,
|
|
264
|
-
width: anchorWidth
|
|
265
|
-
} = anchorEl.getBoundingClientRect();
|
|
266
|
-
const { width: popperWidth = 0 } = (_b = (_a = popper.current) == null ? void 0 : _a.getBoundingClientRect()) != null ? _b : {};
|
|
267
|
-
const viewportWidth = document.documentElement.clientWidth;
|
|
268
|
-
const viewportHeight = document.documentElement.clientHeight;
|
|
269
|
-
const next = {
|
|
270
|
-
left: align === "center" ? anchorLeft + anchorWidth / 2 - popperWidth / 2 : anchorLeft - Math.min(popperWidth ? popperWidth / 2 : Number.POSITIVE_INFINITY, MAX_OFFSET),
|
|
271
|
-
top: anchorBottom
|
|
272
|
-
};
|
|
273
|
-
if (next.left < MARGIN) {
|
|
274
|
-
next.left = MARGIN;
|
|
275
|
-
}
|
|
276
|
-
if (next.left + popperWidth > viewportWidth - MARGIN) {
|
|
277
|
-
next.left = viewportWidth - MARGIN - popperWidth;
|
|
278
|
-
}
|
|
279
|
-
if (next.top < MARGIN) {
|
|
280
|
-
next.top = MARGIN;
|
|
281
|
-
}
|
|
282
|
-
if (next.left !== (last == null ? void 0 : last.left) || next.top !== (last == null ? void 0 : last.top)) {
|
|
283
|
-
setPosition(next);
|
|
284
|
-
}
|
|
285
|
-
setMaxHeight(viewportHeight - MARGIN - next.top);
|
|
286
|
-
last = next;
|
|
287
|
-
}
|
|
288
|
-
check();
|
|
289
|
-
const handle = setInterval(check, 16);
|
|
290
|
-
return () => {
|
|
291
|
-
clearInterval(handle);
|
|
292
|
-
};
|
|
293
|
-
}, [anchorEl, open, align]);
|
|
294
|
-
function updateZIndex(div) {
|
|
295
|
-
var _a;
|
|
296
|
-
const ancestors = [];
|
|
297
|
-
for (let node = div == null ? void 0 : div.parentElement; node; node = node.parentElement) {
|
|
298
|
-
ancestors.push(node);
|
|
299
|
-
}
|
|
300
|
-
for (const node of ancestors.reverse()) {
|
|
301
|
-
const value = (_a = document.defaultView) == null ? void 0 : _a.getComputedStyle(node).getPropertyValue("z-index");
|
|
302
|
-
if (value && !Number.isNaN(Number(value))) {
|
|
303
|
-
setZIndex(Number(value) + 1);
|
|
304
|
-
return;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
if (!open) return null;
|
|
309
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
310
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
311
|
-
"div",
|
|
312
|
-
{
|
|
313
|
-
ref: updateZIndex,
|
|
314
|
-
css: {
|
|
315
|
-
display: "none"
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
),
|
|
319
|
-
(0, import_react_dom.createPortal)(
|
|
320
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
321
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
322
|
-
"div",
|
|
323
|
-
{
|
|
324
|
-
className: backdropClassName,
|
|
325
|
-
css: [
|
|
326
|
-
{
|
|
327
|
-
position: "fixed",
|
|
328
|
-
left: 0,
|
|
329
|
-
right: 0,
|
|
330
|
-
top: 0,
|
|
331
|
-
bottom: 0,
|
|
332
|
-
zIndex
|
|
333
|
-
},
|
|
334
|
-
hidden && { display: "none" }
|
|
335
|
-
],
|
|
336
|
-
onClick: () => onClose()
|
|
337
|
-
}
|
|
338
|
-
),
|
|
339
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
340
|
-
"div",
|
|
341
|
-
{
|
|
342
|
-
ref: popper,
|
|
343
|
-
className,
|
|
344
|
-
css: [
|
|
345
|
-
defaultClasses.card,
|
|
346
|
-
__spreadProps(__spreadValues({
|
|
347
|
-
position: "fixed",
|
|
348
|
-
maxWidth: document.documentElement.clientWidth - 2 * MARGIN,
|
|
349
|
-
maxHeight
|
|
350
|
-
}, position), {
|
|
351
|
-
zIndex: zIndex + 1,
|
|
352
|
-
overflowY: "auto",
|
|
353
|
-
color: "var(--table-text-color)"
|
|
354
|
-
}),
|
|
355
|
-
hidden && { display: "none" },
|
|
356
|
-
!position && { visibility: "hidden" }
|
|
357
|
-
],
|
|
358
|
-
children
|
|
359
|
-
}
|
|
360
|
-
)
|
|
361
|
-
] }),
|
|
362
|
-
document.body
|
|
363
|
-
)
|
|
364
|
-
] });
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
// node_modules/schummar-state/dist/es/store.js
|
|
368
|
-
var import_immer = require("immer");
|
|
369
|
-
var react = function equal(a, b) {
|
|
370
|
-
if (a === b)
|
|
371
|
-
return true;
|
|
372
|
-
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
373
|
-
if (a.constructor !== b.constructor)
|
|
374
|
-
return false;
|
|
375
|
-
var length, i, keys;
|
|
376
|
-
if (Array.isArray(a)) {
|
|
377
|
-
length = a.length;
|
|
378
|
-
if (length != b.length)
|
|
379
|
-
return false;
|
|
380
|
-
for (i = length; i-- !== 0; )
|
|
381
|
-
if (!equal(a[i], b[i]))
|
|
382
|
-
return false;
|
|
383
|
-
return true;
|
|
384
|
-
}
|
|
385
|
-
if (a instanceof Map && b instanceof Map) {
|
|
386
|
-
if (a.size !== b.size)
|
|
387
|
-
return false;
|
|
388
|
-
for (i of a.entries())
|
|
389
|
-
if (!b.has(i[0]))
|
|
390
|
-
return false;
|
|
391
|
-
for (i of a.entries())
|
|
392
|
-
if (!equal(i[1], b.get(i[0])))
|
|
393
|
-
return false;
|
|
394
|
-
return true;
|
|
395
|
-
}
|
|
396
|
-
if (a instanceof Set && b instanceof Set) {
|
|
397
|
-
if (a.size !== b.size)
|
|
398
|
-
return false;
|
|
399
|
-
for (i of a.entries())
|
|
400
|
-
if (!b.has(i[0]))
|
|
401
|
-
return false;
|
|
402
|
-
return true;
|
|
403
|
-
}
|
|
404
|
-
if (ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
405
|
-
length = a.length;
|
|
406
|
-
if (length != b.length)
|
|
407
|
-
return false;
|
|
408
|
-
for (i = length; i-- !== 0; )
|
|
409
|
-
if (a[i] !== b[i])
|
|
410
|
-
return false;
|
|
411
|
-
return true;
|
|
412
|
-
}
|
|
413
|
-
if (a.constructor === RegExp)
|
|
414
|
-
return a.source === b.source && a.flags === b.flags;
|
|
415
|
-
if (a.valueOf !== Object.prototype.valueOf)
|
|
416
|
-
return a.valueOf() === b.valueOf();
|
|
417
|
-
if (a.toString !== Object.prototype.toString)
|
|
418
|
-
return a.toString() === b.toString();
|
|
419
|
-
keys = Object.keys(a);
|
|
420
|
-
length = keys.length;
|
|
421
|
-
if (length !== Object.keys(b).length)
|
|
422
|
-
return false;
|
|
423
|
-
for (i = length; i-- !== 0; )
|
|
424
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
425
|
-
return false;
|
|
426
|
-
for (i = length; i-- !== 0; ) {
|
|
427
|
-
var key = keys[i];
|
|
428
|
-
if (key === "_owner" && a.$$typeof) {
|
|
429
|
-
continue;
|
|
430
|
-
}
|
|
431
|
-
if (!equal(a[key], b[key]))
|
|
432
|
-
return false;
|
|
433
|
-
}
|
|
434
|
-
return true;
|
|
435
|
-
}
|
|
436
|
-
return a !== a && b !== b;
|
|
437
|
-
};
|
|
438
|
-
function createSelector(stringSelector) {
|
|
439
|
-
const parts = stringSelector.split(".");
|
|
440
|
-
return (state) => parts.reduce((v2, p2) => v2 instanceof Object && p2 in v2 ? v2[p2] : void 0, state);
|
|
441
|
-
}
|
|
442
|
-
function setWithSelector(state, stringSelector, value) {
|
|
443
|
-
const parts = stringSelector.split(".");
|
|
444
|
-
const prefix = parts.slice(0, -1);
|
|
445
|
-
const last = parts[parts.length - 1];
|
|
446
|
-
for (const part of prefix) {
|
|
447
|
-
if (state instanceof Object && part in state) {
|
|
448
|
-
state = state[part];
|
|
449
|
-
} else {
|
|
450
|
-
throw Error(`Could not set ${stringSelector} because path ${stringSelector} doesn't exist`);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
if (state instanceof Object) {
|
|
454
|
-
state[last] = value;
|
|
455
|
-
} else {
|
|
456
|
-
throw Error(`Could not set ${stringSelector} because path ${stringSelector} doesn't exist`);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
function throttle(fn, ms) {
|
|
460
|
-
let last = 0;
|
|
461
|
-
let lastArgs;
|
|
462
|
-
let timeout;
|
|
463
|
-
function run() {
|
|
464
|
-
const args = lastArgs;
|
|
465
|
-
last = Date.now();
|
|
466
|
-
lastArgs = void 0;
|
|
467
|
-
timeout = void 0;
|
|
468
|
-
fn(...args);
|
|
469
|
-
}
|
|
470
|
-
return function(...args) {
|
|
471
|
-
const now = Date.now();
|
|
472
|
-
lastArgs = args;
|
|
473
|
-
if (timeout)
|
|
474
|
-
;
|
|
475
|
-
else if (now < last + ms) {
|
|
476
|
-
timeout = setTimeout(run, last + ms - now);
|
|
477
|
-
} else {
|
|
478
|
-
run();
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
var RESTART_UPDATE = Symbol("RESTART_UPDATE");
|
|
483
|
-
var Store = class {
|
|
484
|
-
constructor(state, { log = (...data) => console.error(...data) } = {}) {
|
|
485
|
-
this.state = state;
|
|
486
|
-
this.subscriptions = /* @__PURE__ */ new Set();
|
|
487
|
-
this.batchCounter = 0;
|
|
488
|
-
this.reactions = /* @__PURE__ */ new Set();
|
|
489
|
-
this.patches = new Array();
|
|
490
|
-
(0, import_immer.freeze)(state, true);
|
|
491
|
-
(0, import_immer.enableMapSet)();
|
|
492
|
-
(0, import_immer.enablePatches)();
|
|
493
|
-
this.options = {
|
|
494
|
-
log
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
getState() {
|
|
498
|
-
return this.state;
|
|
499
|
-
}
|
|
500
|
-
update(update) {
|
|
501
|
-
this.checkLock();
|
|
502
|
-
this.state = (0, import_immer.produce)(this.state, (draft) => update(draft, this.state), (patches) => this.patches.push(...patches));
|
|
503
|
-
this.notify();
|
|
504
|
-
}
|
|
505
|
-
set(state) {
|
|
506
|
-
this.checkLock();
|
|
507
|
-
this.state = (0, import_immer.produce)(this.state, () => state, (patches) => this.patches.push(...patches));
|
|
508
|
-
this.notify();
|
|
509
|
-
}
|
|
510
|
-
applyPatches(patches) {
|
|
511
|
-
this.checkLock();
|
|
512
|
-
this.state = (0, import_immer.applyPatches)(this.state, patches);
|
|
513
|
-
this.patches.push(...patches);
|
|
514
|
-
this.notify();
|
|
515
|
-
}
|
|
516
|
-
batchUpdates(fn) {
|
|
517
|
-
try {
|
|
518
|
-
this.batchCounter++;
|
|
519
|
-
fn();
|
|
520
|
-
} finally {
|
|
521
|
-
this.batchCounter--;
|
|
522
|
-
if (this.batchCounter === 0) {
|
|
523
|
-
this.notify();
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
subscribe(...args) {
|
|
528
|
-
let selector, listener, options;
|
|
529
|
-
if (args[1] instanceof Function) {
|
|
530
|
-
[selector, listener, options] = args;
|
|
531
|
-
if (typeof selector === "string") {
|
|
532
|
-
selector = createSelector(selector);
|
|
533
|
-
}
|
|
534
|
-
} else {
|
|
535
|
-
[selector, listener, options] = [(x) => x, ...args];
|
|
536
|
-
}
|
|
537
|
-
const { runNow = true, throttle: throttle$1 = 0, compare = react } = options != null ? options : {};
|
|
538
|
-
const throttledListener = throttle$1 ? throttle(listener, throttle$1) : listener;
|
|
539
|
-
let value = selector(this.state);
|
|
540
|
-
const internalListener = (state, _patches, init) => {
|
|
541
|
-
try {
|
|
542
|
-
const oldValue = value;
|
|
543
|
-
value = selector(state);
|
|
544
|
-
if (!init && compare(value, oldValue))
|
|
545
|
-
return;
|
|
546
|
-
(init ? listener : throttledListener)(value, oldValue, this.state);
|
|
547
|
-
} catch (e2) {
|
|
548
|
-
this.options.log("Failed to execute listener:", e2);
|
|
549
|
-
}
|
|
550
|
-
};
|
|
551
|
-
this.subscriptions.add(internalListener);
|
|
552
|
-
if (runNow)
|
|
553
|
-
internalListener(this.state, [], true);
|
|
554
|
-
return () => {
|
|
555
|
-
this.subscriptions.delete(internalListener);
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
addReaction(...args) {
|
|
559
|
-
let selector, reaction, options;
|
|
560
|
-
if (args[1] instanceof Function) {
|
|
561
|
-
[selector, reaction, options] = args;
|
|
562
|
-
if (typeof selector === "string") {
|
|
563
|
-
selector = createSelector(selector);
|
|
564
|
-
}
|
|
565
|
-
} else {
|
|
566
|
-
[selector, reaction, options] = [(x) => x, ...args];
|
|
567
|
-
}
|
|
568
|
-
const { runNow = true, compare = react } = options != null ? options : {};
|
|
569
|
-
let value = selector(this.state);
|
|
570
|
-
const internalListener = (init) => {
|
|
571
|
-
let hasChanged = false;
|
|
572
|
-
try {
|
|
573
|
-
this.lock = "reaction";
|
|
574
|
-
const oldValue = value;
|
|
575
|
-
value = selector(this.state);
|
|
576
|
-
if (!init && compare(value, oldValue))
|
|
577
|
-
return;
|
|
578
|
-
this.state = (0, import_immer.produce)(this.state, (draft) => reaction(value, draft, this.state, oldValue), (patches) => {
|
|
579
|
-
hasChanged = true;
|
|
580
|
-
this.patches.push(...patches);
|
|
581
|
-
});
|
|
582
|
-
} catch (e2) {
|
|
583
|
-
this.options.log("Failed to execute reaction:", e2);
|
|
584
|
-
} finally {
|
|
585
|
-
delete this.lock;
|
|
586
|
-
}
|
|
587
|
-
if (hasChanged && !init)
|
|
588
|
-
throw RESTART_UPDATE;
|
|
589
|
-
if (hasChanged && init)
|
|
590
|
-
this.notify();
|
|
591
|
-
};
|
|
592
|
-
this.reactions.add(internalListener);
|
|
593
|
-
if (runNow)
|
|
594
|
-
internalListener(true);
|
|
595
|
-
return () => {
|
|
596
|
-
this.reactions.delete(internalListener);
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
subscribePatches(listener) {
|
|
600
|
-
const internalListener = (_state, patches) => {
|
|
601
|
-
try {
|
|
602
|
-
listener(patches);
|
|
603
|
-
} catch (e2) {
|
|
604
|
-
this.options.log("Failed to execute patch listener:", e2);
|
|
605
|
-
}
|
|
606
|
-
};
|
|
607
|
-
this.subscriptions.add(internalListener);
|
|
608
|
-
return () => {
|
|
609
|
-
this.subscriptions.delete(internalListener);
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
checkLock() {
|
|
613
|
-
if (this.lock === "reaction") {
|
|
614
|
-
throw Error("You cannot call update from within a reaction. Use the passed draft instead.");
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
notify() {
|
|
618
|
-
if (this.batchCounter > 0 || this.patches.length === 0)
|
|
619
|
-
return;
|
|
620
|
-
try {
|
|
621
|
-
for (const reaction of this.reactions) {
|
|
622
|
-
reaction();
|
|
623
|
-
}
|
|
624
|
-
} catch (e2) {
|
|
625
|
-
return this.notify();
|
|
626
|
-
}
|
|
627
|
-
const patches = this.patches;
|
|
628
|
-
this.patches = [];
|
|
629
|
-
this.batchUpdates(() => {
|
|
630
|
-
for (const subscription of this.subscriptions) {
|
|
631
|
-
subscription(this.state, patches);
|
|
632
|
-
}
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
// node_modules/schummar-state/dist/es/react.js
|
|
638
|
-
var import_react4 = __toESM(require("react"), 1);
|
|
639
|
-
var import_immer2 = require("immer");
|
|
640
|
-
var withSelector = { exports: {} };
|
|
641
|
-
var withSelector_production_min = {};
|
|
642
|
-
var shim = { exports: {} };
|
|
643
|
-
var useSyncExternalStoreShim_production_min = {};
|
|
644
|
-
var e = import_react4.default;
|
|
645
|
-
function h$1(a2, b) {
|
|
646
|
-
return a2 === b && (a2 !== 0 || 1 / a2 === 1 / b) || a2 !== a2 && b !== b;
|
|
647
|
-
}
|
|
648
|
-
var k = typeof Object.is === "function" ? Object.is : h$1;
|
|
649
|
-
var l = e.useState;
|
|
650
|
-
var m = e.useEffect;
|
|
651
|
-
var n$1 = e.useLayoutEffect;
|
|
652
|
-
var p$1 = e.useDebugValue;
|
|
653
|
-
function q$1(a2, b) {
|
|
654
|
-
var d = b(), f = l({ inst: { value: d, getSnapshot: b } }), c = f[0].inst, g = f[1];
|
|
655
|
-
n$1(function() {
|
|
656
|
-
c.value = d;
|
|
657
|
-
c.getSnapshot = b;
|
|
658
|
-
r$1(c) && g({ inst: c });
|
|
659
|
-
}, [a2, d, b]);
|
|
660
|
-
m(function() {
|
|
661
|
-
r$1(c) && g({ inst: c });
|
|
662
|
-
return a2(function() {
|
|
663
|
-
r$1(c) && g({ inst: c });
|
|
664
|
-
});
|
|
665
|
-
}, [a2]);
|
|
666
|
-
p$1(d);
|
|
667
|
-
return d;
|
|
668
|
-
}
|
|
669
|
-
function r$1(a2) {
|
|
670
|
-
var b = a2.getSnapshot;
|
|
671
|
-
a2 = a2.value;
|
|
672
|
-
try {
|
|
673
|
-
var d = b();
|
|
674
|
-
return !k(a2, d);
|
|
675
|
-
} catch (f) {
|
|
676
|
-
return true;
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
function t$1(a2, b) {
|
|
680
|
-
return b();
|
|
681
|
-
}
|
|
682
|
-
var u$1 = typeof window === "undefined" || typeof window.document === "undefined" || typeof window.document.createElement === "undefined" ? t$1 : q$1;
|
|
683
|
-
useSyncExternalStoreShim_production_min.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : u$1;
|
|
684
|
-
{
|
|
685
|
-
shim.exports = useSyncExternalStoreShim_production_min;
|
|
686
|
-
}
|
|
687
|
-
var h = import_react4.default;
|
|
688
|
-
var n = shim.exports;
|
|
689
|
-
function p(a2, b) {
|
|
690
|
-
return a2 === b && (a2 !== 0 || 1 / a2 === 1 / b) || a2 !== a2 && b !== b;
|
|
691
|
-
}
|
|
692
|
-
var q = typeof Object.is === "function" ? Object.is : p;
|
|
693
|
-
var r = n.useSyncExternalStore;
|
|
694
|
-
var t = h.useRef;
|
|
695
|
-
var u = h.useEffect;
|
|
696
|
-
var v = h.useMemo;
|
|
697
|
-
var w = h.useDebugValue;
|
|
698
|
-
withSelector_production_min.useSyncExternalStoreWithSelector = function(a2, b, e2, l2, g) {
|
|
699
|
-
var c = t(null);
|
|
700
|
-
if (c.current === null) {
|
|
701
|
-
var f = { hasValue: false, value: null };
|
|
702
|
-
c.current = f;
|
|
703
|
-
} else
|
|
704
|
-
f = c.current;
|
|
705
|
-
c = v(function() {
|
|
706
|
-
function a3(a4) {
|
|
707
|
-
if (!c2) {
|
|
708
|
-
c2 = true;
|
|
709
|
-
d2 = a4;
|
|
710
|
-
a4 = l2(a4);
|
|
711
|
-
if (g !== void 0 && f.hasValue) {
|
|
712
|
-
var b2 = f.value;
|
|
713
|
-
if (g(b2, a4))
|
|
714
|
-
return k2 = b2;
|
|
715
|
-
}
|
|
716
|
-
return k2 = a4;
|
|
717
|
-
}
|
|
718
|
-
b2 = k2;
|
|
719
|
-
if (q(d2, a4))
|
|
720
|
-
return b2;
|
|
721
|
-
var e3 = l2(a4);
|
|
722
|
-
if (g !== void 0 && g(b2, e3))
|
|
723
|
-
return b2;
|
|
724
|
-
d2 = a4;
|
|
725
|
-
return k2 = e3;
|
|
726
|
-
}
|
|
727
|
-
var c2 = false, d2, k2, m2 = e2 === void 0 ? null : e2;
|
|
728
|
-
return [function() {
|
|
729
|
-
return a3(b());
|
|
730
|
-
}, m2 === null ? void 0 : function() {
|
|
731
|
-
return a3(m2());
|
|
732
|
-
}];
|
|
733
|
-
}, [b, e2, l2, g]);
|
|
734
|
-
var d = r(a2, c[0], c[1]);
|
|
735
|
-
u(function() {
|
|
736
|
-
f.hasValue = true;
|
|
737
|
-
f.value = d;
|
|
738
|
-
}, [d]);
|
|
739
|
-
w(d);
|
|
740
|
-
return d;
|
|
741
|
-
};
|
|
742
|
-
{
|
|
743
|
-
withSelector.exports = withSelector_production_min;
|
|
744
|
-
}
|
|
745
|
-
function useStoreState(store, ...args) {
|
|
746
|
-
var _a, _b, _c, _d;
|
|
747
|
-
let selector, options;
|
|
748
|
-
if (args[0] instanceof Function) {
|
|
749
|
-
selector = args[0];
|
|
750
|
-
options = (_a = args[1]) != null ? _a : {};
|
|
751
|
-
} else if (typeof args[0] === "string") {
|
|
752
|
-
selector = createSelector(args[0]);
|
|
753
|
-
options = (_b = args[1]) != null ? _b : {};
|
|
754
|
-
} else {
|
|
755
|
-
selector = (x) => x;
|
|
756
|
-
options = (_c = args[0]) != null ? _c : {};
|
|
757
|
-
}
|
|
758
|
-
const subscribe = (0, import_react4.useCallback)((listener) => {
|
|
759
|
-
return store.subscribe((x) => x, listener, {
|
|
760
|
-
throttle: options.throttle,
|
|
761
|
-
runNow: false,
|
|
762
|
-
compare: (a2, b) => a2 === b
|
|
763
|
-
});
|
|
764
|
-
}, [store, options.throttle]);
|
|
765
|
-
const getSnapshot = (0, import_react4.useCallback)(() => store.getState(), [store]);
|
|
766
|
-
const value = withSelector.exports.useSyncExternalStoreWithSelector(subscribe, getSnapshot, getSnapshot, selector, (_d = options.compare) != null ? _d : react);
|
|
767
|
-
(0, import_react4.useDebugValue)(value);
|
|
768
|
-
return value;
|
|
769
|
-
}
|
|
770
|
-
function useStoreProp(store, selector) {
|
|
771
|
-
const value = useStoreState(store, selector);
|
|
772
|
-
const update = (value2) => store.update((state) => setWithSelector(state, selector, value2));
|
|
773
|
-
return [value, update];
|
|
774
|
-
}
|
|
775
|
-
var Store2 = class extends Store {
|
|
776
|
-
useState(...args) {
|
|
777
|
-
return useStoreState(this, ...args);
|
|
778
|
-
}
|
|
779
|
-
useProp(selector) {
|
|
780
|
-
return useStoreProp(this, selector);
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
// src/theme/tableTheme.tsx
|
|
785
|
-
var globalTableTheme = new Store2({});
|
|
786
|
-
function mergeThemes(...themes) {
|
|
787
|
-
return {
|
|
788
|
-
text: Object.assign({}, ...themes.map((theme) => theme.text)),
|
|
789
|
-
classes: Object.assign({}, ...themes.map((theme) => theme.classes)),
|
|
790
|
-
styles: Object.assign({}, ...themes.map((theme) => theme.styles)),
|
|
791
|
-
components: Object.assign({}, ...themes.map((theme) => theme.components)),
|
|
792
|
-
icons: Object.assign({}, ...themes.map((theme) => theme.icons)),
|
|
793
|
-
colors: {
|
|
794
|
-
primary: Object.assign({}, ...themes.map((theme) => {
|
|
795
|
-
var _a;
|
|
796
|
-
return (_a = theme.colors) == null ? void 0 : _a.primary;
|
|
797
|
-
})),
|
|
798
|
-
secondary: Object.assign({}, ...themes.map((theme) => {
|
|
799
|
-
var _a;
|
|
800
|
-
return (_a = theme.colors) == null ? void 0 : _a.secondary;
|
|
801
|
-
})),
|
|
802
|
-
blocked: Object.assign({}, ...themes.map((theme) => {
|
|
803
|
-
var _a;
|
|
804
|
-
return (_a = theme.colors) == null ? void 0 : _a.blocked;
|
|
805
|
-
})),
|
|
806
|
-
background: themes.map((theme) => {
|
|
807
|
-
var _a;
|
|
808
|
-
return (_a = theme.colors) == null ? void 0 : _a.background;
|
|
809
|
-
}).reverse().find((x) => x !== void 0),
|
|
810
|
-
text: themes.map((theme) => {
|
|
811
|
-
var _a;
|
|
812
|
-
return (_a = theme.colors) == null ? void 0 : _a.text;
|
|
813
|
-
}).reverse().find((x) => x !== void 0),
|
|
814
|
-
border: themes.map((theme) => {
|
|
815
|
-
var _a;
|
|
816
|
-
return (_a = theme.colors) == null ? void 0 : _a.border;
|
|
817
|
-
}).reverse().find((x) => x !== void 0),
|
|
818
|
-
borderLight: themes.map((theme) => {
|
|
819
|
-
var _a;
|
|
820
|
-
return (_a = theme.colors) == null ? void 0 : _a.borderLight;
|
|
821
|
-
}).reverse().find((x) => x !== void 0)
|
|
822
|
-
},
|
|
823
|
-
spacing: themes.map((theme) => theme.spacing).reverse().find((x) => x !== void 0)
|
|
824
|
-
};
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
// src/theme/mui4Theme/index.tsx
|
|
828
|
-
var import_jsx_runtime3 = require("@emotion/react/jsx-runtime");
|
|
829
|
-
var mui4Theme = {
|
|
830
|
-
components: {
|
|
831
|
-
Button: (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
832
|
-
import_core.Button,
|
|
833
|
-
__spreadProps(__spreadValues({}, props), {
|
|
834
|
-
size: "small",
|
|
835
|
-
fullWidth: true,
|
|
836
|
-
css: { justifyContent: "start !important" },
|
|
837
|
-
color: props.variant === "contained" ? "primary" : "inherit"
|
|
838
|
-
})
|
|
839
|
-
),
|
|
840
|
-
IconButton: (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core.IconButton, __spreadProps(__spreadValues({}, props), { size: "small", color: "inherit" })),
|
|
841
|
-
Checkbox: (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_core.Checkbox, __spreadProps(__spreadValues({}, props), { color: "primary", size: "medium" })),
|
|
842
|
-
Popover,
|
|
843
|
-
Badge: import_core.Badge,
|
|
844
|
-
TextField: (_a) => {
|
|
845
|
-
var _b = _a, { startIcon, endIcon } = _b, props = __objRest(_b, ["startIcon", "endIcon"]);
|
|
846
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
847
|
-
import_core.TextField,
|
|
848
|
-
__spreadProps(__spreadValues({}, props), {
|
|
849
|
-
InputProps: { startAdornment: startIcon, endAdornment: endIcon },
|
|
850
|
-
size: "small",
|
|
851
|
-
variant: "outlined"
|
|
852
|
-
})
|
|
853
|
-
);
|
|
854
|
-
},
|
|
855
|
-
Spinner: import_core.CircularProgress
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
function Mui4TableThemeProvider({
|
|
859
|
-
theme,
|
|
860
|
-
children
|
|
861
|
-
}) {
|
|
862
|
-
const muiTheme = (0, import_core.useTheme)();
|
|
863
|
-
const _theme = (0, import_react6.useMemo)(() => {
|
|
864
|
-
return mergeThemes(
|
|
865
|
-
{
|
|
866
|
-
colors: {
|
|
867
|
-
primary: muiTheme.palette.primary,
|
|
868
|
-
secondary: muiTheme.palette.secondary,
|
|
869
|
-
background: muiTheme.palette.background.default,
|
|
870
|
-
text: muiTheme.palette.text.primary,
|
|
871
|
-
border: muiTheme.palette.divider,
|
|
872
|
-
borderLight: muiTheme.palette.divider
|
|
873
|
-
}
|
|
874
|
-
},
|
|
875
|
-
mui4Theme,
|
|
876
|
-
theme != null ? theme : {}
|
|
877
|
-
);
|
|
878
|
-
}, [muiTheme, theme]);
|
|
879
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TableSettingsProvider, { theme: _theme, children });
|
|
880
|
-
}
|
|
881
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
882
|
-
0 && (module.exports = {
|
|
883
|
-
Mui4TableThemeProvider,
|
|
884
|
-
mui4Theme
|
|
885
|
-
});
|
|
886
|
-
/*! Bundled license information:
|
|
887
|
-
|
|
888
|
-
schummar-state/dist/es/react.js:
|
|
889
|
-
(** @license React vundefined
|
|
890
|
-
* use-sync-external-store-shim.production.min.js
|
|
891
|
-
*
|
|
892
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
893
|
-
*
|
|
894
|
-
* This source code is licensed under the MIT license found in the
|
|
895
|
-
* LICENSE file in the root directory of this source tree.
|
|
896
|
-
*)
|
|
897
|
-
(** @license React vundefined
|
|
898
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
899
|
-
*
|
|
900
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
901
|
-
*
|
|
902
|
-
* This source code is licensed under the MIT license found in the
|
|
903
|
-
* LICENSE file in the root directory of this source tree.
|
|
904
|
-
*)
|
|
905
|
-
*/
|
|
1
|
+
const require_chunk = require('./chunk-pbleEpgJ.cjs');
|
|
2
|
+
const require_tableSettings = require('./tableSettings-CmqSZu-Q.cjs');
|
|
3
|
+
require('./csvExporter-BGoiph1b.cjs');
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_chunk.__toESM(react);
|
|
6
|
+
let __emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
|
|
7
|
+
__emotion_react_jsx_runtime = require_chunk.__toESM(__emotion_react_jsx_runtime);
|
|
8
|
+
let __material_ui_core = require("@material-ui/core");
|
|
9
|
+
__material_ui_core = require_chunk.__toESM(__material_ui_core);
|
|
10
|
+
|
|
11
|
+
//#region src/theme/mui4Theme/index.tsx
|
|
12
|
+
const mui4Theme = { components: {
|
|
13
|
+
Button: (props) => /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsx)(__material_ui_core.Button, {
|
|
14
|
+
...props,
|
|
15
|
+
size: "small",
|
|
16
|
+
fullWidth: true,
|
|
17
|
+
css: { justifyContent: "start !important" },
|
|
18
|
+
color: props.variant === "contained" ? "primary" : "inherit"
|
|
19
|
+
}),
|
|
20
|
+
IconButton: (props) => /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsx)(__material_ui_core.IconButton, {
|
|
21
|
+
...props,
|
|
22
|
+
size: "small",
|
|
23
|
+
color: "inherit"
|
|
24
|
+
}),
|
|
25
|
+
Checkbox: (props) => /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsx)(__material_ui_core.Checkbox, {
|
|
26
|
+
...props,
|
|
27
|
+
color: "primary",
|
|
28
|
+
size: "medium"
|
|
29
|
+
}),
|
|
30
|
+
Popover: require_tableSettings.Popover,
|
|
31
|
+
Badge: __material_ui_core.Badge,
|
|
32
|
+
TextField: ({ startIcon, endIcon,...props }) => /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsx)(__material_ui_core.TextField, {
|
|
33
|
+
...props,
|
|
34
|
+
InputProps: {
|
|
35
|
+
startAdornment: startIcon,
|
|
36
|
+
endAdornment: endIcon
|
|
37
|
+
},
|
|
38
|
+
size: "small",
|
|
39
|
+
variant: "outlined"
|
|
40
|
+
}),
|
|
41
|
+
Spinner: __material_ui_core.CircularProgress
|
|
42
|
+
} };
|
|
43
|
+
function Mui4TableThemeProvider({ theme, children }) {
|
|
44
|
+
const muiTheme = (0, __material_ui_core.useTheme)();
|
|
45
|
+
return /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsx)(require_tableSettings.TableSettingsProvider, {
|
|
46
|
+
theme: (0, react.useMemo)(() => {
|
|
47
|
+
return require_tableSettings.mergeThemes({ colors: {
|
|
48
|
+
primary: muiTheme.palette.primary,
|
|
49
|
+
secondary: muiTheme.palette.secondary,
|
|
50
|
+
background: muiTheme.palette.background.default,
|
|
51
|
+
text: muiTheme.palette.text.primary,
|
|
52
|
+
border: muiTheme.palette.divider,
|
|
53
|
+
borderLight: muiTheme.palette.divider
|
|
54
|
+
} }, mui4Theme, theme ?? {});
|
|
55
|
+
}, [muiTheme, theme]),
|
|
56
|
+
children
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
exports.Mui4TableThemeProvider = Mui4TableThemeProvider;
|
|
62
|
+
exports.mui4Theme = mui4Theme;
|
|
906
63
|
//# sourceMappingURL=mui4Theme.cjs.map
|