@gnwebsoft/ui 2.18.48 → 2.18.49

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.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
4
 
@@ -20,1687 +20,10 @@ var _chunkPTW4AAPVjs = require('./chunk-PTW4AAPV.js');
20
20
  var _chunk6NOXJGU2js = require('./chunk-6NOXJGU2.js');
21
21
 
22
22
 
23
- var _chunk6JZ35VQJjs = require('./chunk-6JZ35VQJ.js');
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
- var _chunkI7EIUZKKjs = require('./chunk-I7EIUZKK.js');
35
-
36
- // src/wrappers3/DatePickerElement/DatePickerElement.tsx
37
- var _react = require('react'); var React = _interopRequireWildcard(_react);
38
- var _reacthookform = require('react-hook-form');
39
- var _xdatepickers = require('@mui/x-date-pickers');
40
- var _material = require('@mui/material');
41
- var _internals = require('@mui/x-date-pickers/internals');
42
- var _jsxruntime = require('react/jsx-runtime');
43
- function readValueAsDate2(adapter, value) {
44
- if (typeof value === "string") {
45
- if (value === "") {
46
- return null;
47
- }
48
- return adapter.utils.date(value);
49
- }
50
- return value;
51
- }
52
- function useTransform2(options) {
53
- const value = typeof _optionalChain([options, 'access', _3 => _3.transform, 'optionalAccess', _4 => _4.input]) === "function" ? options.transform.input(options.value) : options.value;
54
- const onChange = _react.useCallback.call(void 0,
55
- (...event) => {
56
- if (typeof _optionalChain([options, 'access', _5 => _5.transform, 'optionalAccess', _6 => _6.output]) === "function") {
57
- options.onChange(options.transform.output(...event));
58
- } else {
59
- options.onChange(...event);
60
- }
61
- },
62
- [options]
63
- );
64
- return {
65
- value,
66
- onChange
67
- };
68
- }
69
- var Component = function DatePickerElement(props) {
70
- const {
71
- name,
72
- required,
73
- inputProps,
74
- control,
75
- textReadOnly,
76
- label,
77
- placeholder,
78
- slotProps,
79
- datePickerProps = {},
80
- transform,
81
- sx,
82
- ...rest
83
- } = props;
84
- const adapter = _internals.useLocalizationContext.call(void 0, );
85
- const theme = _material.useTheme.call(void 0, );
86
- const { disabled, inputRef, onClose, ...restDatePickerProps } = datePickerProps;
87
- const {
88
- field,
89
- fieldState: { error }
90
- } = _reacthookform.useController.call(void 0, {
91
- name,
92
- control,
93
- defaultValue: null
94
- });
95
- const { value, onChange } = useTransform2({
96
- value: field.value,
97
- onChange: field.onChange,
98
- transform: {
99
- input: typeof _optionalChain([transform, 'optionalAccess', _7 => _7.input]) === "function" ? transform.input : (newValue) => readValueAsDate2(adapter, newValue),
100
- output: (outputValue, context) => {
101
- if (outputValue === null) return null;
102
- return outputValue;
103
- }
104
- }
105
- });
106
- const handleInputRef = _material.useForkRef.call(void 0, field.ref, inputRef);
107
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
108
- _xdatepickers.DatePicker,
109
- {
110
- ...rest,
111
- ...restDatePickerProps,
112
- ...field,
113
- value,
114
- label,
115
- disabled,
116
- ...datePickerProps,
117
- inputRef: handleInputRef,
118
- onClose: (...args) => {
119
- field.onBlur();
120
- if (onClose) {
121
- onClose(...args);
122
- }
123
- },
124
- onChange: (newValue, context) => {
125
- onChange(newValue, context);
126
- if (typeof datePickerProps.onChange === "function") {
127
- datePickerProps.onChange(newValue, context);
128
- }
129
- },
130
- sx: {
131
- "& .MuiOutlinedInput-root": {
132
- bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
133
- },
134
- "& .MuiInputLabel-asterisk": { color: "red" },
135
- "& .MuiInputBase-input": {
136
- cursor: disabled ? "not-allowed" : "default"
137
- },
138
- ...sx
139
- },
140
- slotProps: {
141
- ...slotProps,
142
- actionBar: {
143
- actions: ["clear", "today", "cancel", "accept"]
144
- },
145
- textField: {
146
- ...inputProps,
147
- required,
148
- placeholder,
149
- fullWidth: true,
150
- onBlur: (event) => {
151
- field.onBlur();
152
- if (typeof _optionalChain([inputProps, 'optionalAccess', _8 => _8.onBlur]) === "function") {
153
- inputProps.onBlur(event);
154
- }
155
- },
156
- error: !!error,
157
- helperText: error ? error.message : _optionalChain([inputProps, 'optionalAccess', _9 => _9.helperText]) || rest.helperText,
158
- inputProps: {
159
- readOnly: !!textReadOnly,
160
- ..._optionalChain([inputProps, 'optionalAccess', _10 => _10.inputProps])
161
- }
162
- }
163
- }
164
- }
165
- );
166
- };
167
- var DatePickerElement2 = ({
168
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
169
- ...props
170
- }) => {
171
- if (gridProps) {
172
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
173
- _material.Grid2,
174
- {
175
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
176
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component, { ...props })
177
- }
178
- );
179
- }
180
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component, { ...props });
181
- };
182
- DatePickerElement2.displayName = "DatePickerElement";
183
- var DatePickerElement_default = DatePickerElement2;
184
-
185
- // src/wrappers3/PasswordElement/PasswordElement.tsx
186
-
187
-
188
-
189
-
190
-
191
-
192
-
193
-
194
- var _Visibility = require('@mui/icons-material/Visibility'); var _Visibility2 = _interopRequireDefault(_Visibility);
195
- var _VisibilityOff = require('@mui/icons-material/VisibilityOff'); var _VisibilityOff2 = _interopRequireDefault(_VisibilityOff);
196
-
197
-
198
-
199
-
200
- var Component2 = function PasswordEl(props) {
201
- const {
202
- type,
203
- required,
204
- iconColor,
205
- renderIcon = (password2) => password2 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Visibility2.default, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _VisibilityOff2.default, {}),
206
- slotProps,
207
- name,
208
- control,
209
- component: TextFieldComponent = _material.TextField,
210
- inputRef,
211
- onBlur,
212
- ...rest
213
- } = props;
214
- const [password, setPassword] = _react.useState.call(void 0, true);
215
- const endAdornment = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.InputAdornment, { position: "end", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
216
- _material.IconButton,
217
- {
218
- onMouseDown: (e) => e.preventDefault(),
219
- onClick: () => setPassword(!password),
220
- tabIndex: -1,
221
- color: _nullishCoalesce(iconColor, () => ( "default")),
222
- children: renderIcon(password)
223
- }
224
- ) });
225
- const {
226
- field,
227
- fieldState: { error }
228
- } = _reacthookform.useController.call(void 0, {
229
- name,
230
- control
231
- });
232
- const handleInputRef = _material.useForkRef.call(void 0, field.ref, inputRef);
233
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
234
- _material.TextField,
235
- {
236
- ...rest,
237
- inputRef: handleInputRef,
238
- type: password ? "password" : "text",
239
- value: field.value,
240
- fullWidth: true,
241
- onChange: (event) => {
242
- field.onChange(event);
243
- if (typeof rest.onChange === "function") {
244
- rest.onChange(event);
245
- }
246
- },
247
- onBlur: (event) => {
248
- field.onBlur();
249
- if (typeof onBlur === "function") {
250
- onBlur(event);
251
- }
252
- },
253
- ...typeof slotProps === "undefined" ? {
254
- InputProps: {
255
- endAdornment
256
- }
257
- } : {
258
- slotProps: {
259
- ...slotProps,
260
- input: {
261
- endAdornment,
262
- ..._optionalChain([slotProps, 'optionalAccess', _11 => _11.input])
263
- }
264
- }
265
- },
266
- error: !!error,
267
- helperText: error ? error.message : ""
268
- }
269
- );
270
- };
271
- var PasswordElement = ({
272
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
273
- ...props
274
- }) => {
275
- if (gridProps) {
276
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
277
- _material.Grid2,
278
- {
279
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
280
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component2, { ...props })
281
- }
282
- );
283
- }
284
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component2, { ...props });
285
- };
286
- PasswordElement.displayName = "PasswordElement";
287
- var PasswordElement_default = PasswordElement;
288
-
289
- // src/wrappers3/RadioButtonGroup/RadioButtonGroup.tsx
290
-
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
- var Component3 = function RadioButtonGroup(props) {
306
- const {
307
- helperText,
308
- options,
309
- label,
310
- name,
311
- parseError,
312
- labelKey = "label",
313
- valueKey = "id",
314
- disabledKey = "disabled",
315
- required,
316
- emptyOptionLabel,
317
- returnObject,
318
- row,
319
- control,
320
- type,
321
- labelProps,
322
- disabled,
323
- formLabelProps,
324
- radioProps,
325
- transform,
326
- rules = {},
327
- ...rest
328
- } = props;
329
- const theme = _material.useTheme.call(void 0, );
330
- const {
331
- field,
332
- fieldState: { error }
333
- } = _reacthookform.useController.call(void 0, {
334
- name,
335
- disabled,
336
- control
337
- });
338
- const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
339
- value: field.value,
340
- onChange: field.onChange,
341
- transform: {
342
- input: typeof _optionalChain([transform, 'optionalAccess', _12 => _12.input]) === "function" ? transform.input : (value2) => {
343
- return value2 || "";
344
- },
345
- output: typeof _optionalChain([transform, 'optionalAccess', _13 => _13.output]) === "function" ? _optionalChain([transform, 'optionalAccess', _14 => _14.output]) : (_event, value2) => {
346
- if (value2 && type === "number") {
347
- return Number(value2);
348
- }
349
- return value2;
350
- }
351
- }
352
- });
353
- const onRadioChange = (event, radioValue) => {
354
- const returnValue = returnObject ? options.find((items) => items[valueKey] === radioValue) : radioValue;
355
- onChange(event, returnValue);
356
- if (typeof rest.onChange === "function") {
357
- rest.onChange(returnValue);
358
- }
359
- };
360
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.FormControl, { error: !!error, children: [
361
- label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.FormLabel, { ...formLabelProps, required, error: !!error, children: label }),
362
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.RadioGroup, { onChange: onRadioChange, name, row, value, children: [
363
- emptyOptionLabel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
364
- _material.FormControlLabel,
365
- {
366
- ...labelProps,
367
- control: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
368
- _material.Radio,
369
- {
370
- ...radioProps,
371
- sx: {
372
- color: error ? theme.palette.error.main : void 0
373
- },
374
- checked: !value
375
- }
376
- ),
377
- label: emptyOptionLabel,
378
- value: ""
379
- }
380
- ),
381
- options.map((option) => {
382
- const optionKey = option[valueKey];
383
- const optionDisabled = option[disabledKey] || false;
384
- if (optionKey === void 0) {
385
- console.error(
386
- `RadioButtonGroup: valueKey ${valueKey} does not exist on option`,
387
- option
388
- );
389
- }
390
- let val = returnObject ? _optionalChain([value, 'optionalAccess', _15 => _15[valueKey]]) : value;
391
- if (type === "number") {
392
- val = Number(val);
393
- }
394
- const isChecked = val === optionKey;
395
- return /* @__PURE__ */ _react.createElement.call(void 0,
396
- _material.FormControlLabel,
397
- {
398
- ...labelProps,
399
- control: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
400
- _material.Radio,
401
- {
402
- ...radioProps,
403
- sx: {
404
- color: error ? theme.palette.error.main : void 0
405
- },
406
- disabled: disabled || optionDisabled,
407
- checked: isChecked
408
- }
409
- ),
410
- value: optionKey,
411
- label: option[labelKey],
412
- key: optionKey
413
- }
414
- );
415
- })
416
- ] }),
417
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.FormHelperText, { children: error.message })
418
- ] });
419
- };
420
- var RadioButtonGroup2 = ({
421
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
422
- ...props
423
- }) => {
424
- if (gridProps) {
425
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
426
- _material.Grid2,
427
- {
428
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
429
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component3, { ...props })
430
- }
431
- );
432
- }
433
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component3, { ...props });
434
- };
435
- RadioButtonGroup2.displayName = "RadioButtonGroup";
436
- var RadioButtonGroup_default = RadioButtonGroup2;
437
-
438
- // src/wrappers3/TextFieldElement/TextFieldElement.tsx
439
-
440
-
441
-
442
-
443
-
444
-
445
-
446
-
447
-
448
-
449
- var Component4 = function TextFieldElement(props) {
450
- const {
451
- rules = {},
452
- parseError,
453
- name,
454
- control,
455
- component: TextFieldComponent = _material.TextField,
456
- gridProps,
457
- transform,
458
- label,
459
- placeholder,
460
- textFieldProps = {},
461
- variant,
462
- sx,
463
- ...rest
464
- } = props;
465
- const {
466
- type,
467
- required,
468
- helperText,
469
- inputRef,
470
- onBlur,
471
- disabled,
472
- ...restTextProps
473
- } = textFieldProps;
474
- const {
475
- field,
476
- fieldState: { error }
477
- } = _reacthookform.useController.call(void 0, {
478
- name,
479
- control
480
- });
481
- const theme = _material.useTheme.call(void 0, );
482
- const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
483
- value: field.value,
484
- onChange: field.onChange,
485
- transform: {
486
- input: typeof _optionalChain([transform, 'optionalAccess', _16 => _16.input]) === "function" ? transform.input : (value2) => {
487
- return _nullishCoalesce(value2, () => ( ""));
488
- },
489
- output: typeof _optionalChain([transform, 'optionalAccess', _17 => _17.output]) === "function" ? transform.output : (event) => {
490
- const value2 = event.target.value;
491
- if (type !== "number") {
492
- return value2;
493
- }
494
- if (value2 === "") {
495
- return null;
496
- }
497
- if (value2 == null) {
498
- return value2;
499
- }
500
- return Number(value2);
501
- }
502
- }
503
- });
504
- const handleInputRef = _material.useForkRef.call(void 0, field.ref, inputRef);
505
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
506
- TextFieldComponent,
507
- {
508
- ...rest,
509
- ...restTextProps,
510
- name: field.name,
511
- value,
512
- onChange: (event) => {
513
- field.onChange(event);
514
- if (typeof onChange === "function") {
515
- onChange(event);
516
- }
517
- },
518
- onBlur: (event) => {
519
- field.onBlur();
520
- if (typeof onBlur === "function") {
521
- onBlur(event);
522
- }
523
- },
524
- disabled,
525
- label,
526
- placeholder,
527
- fullWidth: true,
528
- required,
529
- type,
530
- error: !!error,
531
- helperText: error ? error.message : helperText,
532
- inputRef: handleInputRef,
533
- variant: variant ? variant : "outlined",
534
- size: "small",
535
- sx: {
536
- "& .MuiInputLabel-asterisk": { color: "red" },
537
- "& .MuiInputBase-input": {
538
- cursor: disabled ? "not-allowed" : "default"
539
- },
540
- bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
541
- ...sx
542
- }
543
- }
544
- );
545
- };
546
- var TextFieldElement2 = ({
547
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
548
- ...props
549
- }) => {
550
- if (gridProps) {
551
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
552
- _material.Grid2,
553
- {
554
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
555
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component4, { ...props })
556
- }
557
- );
558
- }
559
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component4, { ...props });
560
- };
561
- TextFieldElement2.displayName = "TextFieldElement";
562
- var TextFieldElement_default = TextFieldElement2;
563
-
564
- // src/wrappers3/TimePickerElement/TimePickerElement.tsx
565
-
566
-
567
-
568
-
569
-
570
-
571
-
572
-
573
-
574
- var Component5 = function TimePickerElement(props) {
575
- const {
576
- parseError,
577
- name,
578
- required,
579
- rules = {},
580
- inputProps,
581
- control,
582
- textReadOnly,
583
- slotProps,
584
- inputRef,
585
- transform,
586
- ...rest
587
- } = props;
588
- const adapter = _internals.useLocalizationContext.call(void 0, );
589
- const {
590
- field,
591
- fieldState: { error }
592
- } = _reacthookform.useController.call(void 0, {
593
- name,
594
- control,
595
- disabled: rest.disabled,
596
- defaultValue: null
597
- });
598
- const { value, onChange } = _chunk6JZ35VQJjs.useTransform.call(void 0, {
599
- value: field.value,
600
- onChange: field.onChange,
601
- transform: {
602
- input: typeof _optionalChain([transform, 'optionalAccess', _18 => _18.input]) === "function" ? transform.input : (newValue) => _chunkI7EIUZKKjs.readValueAsDate.call(void 0, adapter, newValue),
603
- output: typeof _optionalChain([transform, 'optionalAccess', _19 => _19.output]) === "function" ? transform.output : (newValue) => newValue
604
- }
605
- });
606
- const handleInputRef = _material.useForkRef.call(void 0, field.ref, inputRef);
607
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
608
- _xdatepickers.TimePicker,
609
- {
610
- ...rest,
611
- ...field,
612
- value,
613
- inputRef: handleInputRef,
614
- onClose: (...args) => {
615
- field.onBlur();
616
- if (rest.onClose) {
617
- rest.onClose(...args);
618
- }
619
- },
620
- onChange: (value2, context) => {
621
- onChange(value2, context);
622
- if (typeof rest.onChange === "function") {
623
- rest.onChange(value2, context);
624
- }
625
- },
626
- slotProps: {
627
- ...slotProps,
628
- textField: {
629
- ...inputProps,
630
- required,
631
- fullWidth: true,
632
- error: !!error,
633
- helperText: error ? error.message : _optionalChain([inputProps, 'optionalAccess', _20 => _20.helperText]) || rest.helperText,
634
- inputProps: {
635
- readOnly: textReadOnly,
636
- ..._optionalChain([inputProps, 'optionalAccess', _21 => _21.inputProps])
637
- }
638
- }
639
- }
640
- }
641
- );
642
- };
643
- var TimePickerElement2 = ({
644
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
645
- ...props
646
- }) => {
647
- if (gridProps) {
648
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
649
- _material.Grid2,
650
- {
651
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
652
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component5, { ...props })
653
- }
654
- );
655
- }
656
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component5, { ...props });
657
- };
658
- TimePickerElement2.displayName = "TimePickerElement";
659
- var TimePickerElement_default = TimePickerElement2;
660
-
661
- // src/wrappers3/AsyncSelect/AsyncSelectElement.tsx
662
-
663
-
664
-
665
-
666
-
667
-
668
-
669
-
670
-
671
-
672
- var _utils = require('@mui/material/utils');
673
- var _TextField = require('@mui/material/TextField'); var _TextField2 = _interopRequireDefault(_TextField);
674
- var _Autocomplete = require('@mui/material/Autocomplete'); var _Autocomplete2 = _interopRequireDefault(_Autocomplete);
675
-
676
-
677
- var Component6 = function AsyncSelectElement(props) {
678
- const {
679
- name,
680
- onBlur,
681
- disabled,
682
- control,
683
- gridProps,
684
- placeholder,
685
- initialValue,
686
- label,
687
- queryFn,
688
- variant,
689
- labelKey = "Label",
690
- valueKey = "Value",
691
- sx,
692
- ...rest
693
- } = props;
694
- const {
695
- field,
696
- fieldState: { error }
697
- } = _reacthookform.useController.call(void 0, {
698
- name,
699
- control
700
- });
701
- const theme = _material.useTheme.call(void 0, );
702
- const [loading, setLoading] = _react.useState.call(void 0, false);
703
- const [selectedOption, setSelectedOption] = _react.useState.call(void 0, null);
704
- const [inputValue, setInputValue] = _react.useState.call(void 0, "");
705
- const inputValue2 = _react.useMemo.call(void 0, () => inputValue, [inputValue]);
706
- const setInputValue2 = _react.useCallback.call(void 0,
707
- (newValue) => setInputValue(newValue),
708
- []
709
- );
710
- const [options, setOptions] = _react.useState.call(void 0, []);
711
- const initialValueLoaded = _react.useRef.call(void 0,
712
- !initialValue ? true : !(initialValue != null)
713
- );
714
- const fieldValue = _react.useRef.call(void 0, field.value);
715
- const fetchData = _react.useMemo.call(void 0,
716
- () => _utils.debounce.call(void 0,
717
- (payload, callback) => {
718
- queryFn(payload).then((c) => callback(c));
719
- },
720
- 400
721
- ),
722
- []
723
- );
724
- const fillOptions = (results) => {
725
- let newOptions = [];
726
- if (selectedOption) {
727
- newOptions = [selectedOption];
728
- }
729
- if (results) {
730
- newOptions = [...newOptions, ...results];
731
- }
732
- setOptions(newOptions);
733
- setLoading(false);
734
- };
735
- _react.useEffect.call(void 0, () => {
736
- if (initialValueLoaded.current) return void 0;
737
- let active = true;
738
- const payload = {
739
- query: null,
740
- initialValue
741
- };
742
- setLoading(true);
743
- fetchData(payload, (results) => {
744
- if (active) {
745
- if (!!results && results.length > 0) {
746
- fillOptions(_optionalChain([results, 'optionalAccess', _22 => _22.filter, 'call', _23 => _23((c) => c.Value == initialValue)]));
747
- setSelectedOption(results[0]);
748
- field.onChange(results[0].Value);
749
- fieldValue.current = results[0].Value;
750
- }
751
- initialValueLoaded.current = true;
752
- setLoading(false);
753
- }
754
- });
755
- return () => {
756
- active = false;
757
- };
758
- }, [initialValue]);
759
- React.useEffect(() => {
760
- let active = true;
761
- if (inputValue2 === "" || initialValueLoaded.current === false) {
762
- setOptions(selectedOption ? [selectedOption] : []);
763
- setLoading(false);
764
- return void 0;
765
- }
766
- if (fieldValue.current) {
767
- if (field.value === fieldValue.current) {
768
- return void 0;
769
- }
770
- }
771
- setLoading(true);
772
- const payload = {
773
- query: inputValue2,
774
- initialValue: null
775
- };
776
- fetchData(payload, (results) => {
777
- if (active) {
778
- fillOptions(results);
779
- }
780
- });
781
- return () => {
782
- active = false;
783
- };
784
- }, [initialValue, inputValue2, fetchData]);
785
- const selectRef = _react.useRef.call(void 0, null);
786
- const handleChange = (_2, newSelectedOption, reason) => {
787
- if (reason === "clear") {
788
- setSelectedOption(null);
789
- field.onChange(null);
790
- setLoading(false);
791
- } else if (reason === "selectOption" || reason === "removeOption") {
792
- if (newSelectedOption) {
793
- setSelectedOption(newSelectedOption);
794
- field.onChange(newSelectedOption.Value);
795
- fieldValue.current = newSelectedOption.Value;
796
- setLoading(false);
797
- }
798
- }
799
- setOptions([]);
800
- setLoading(false);
801
- };
802
- _react.useEffect.call(void 0, () => {
803
- if (!field.value) {
804
- setInputValue("");
805
- setSelectedOption(null);
806
- setLoading(false);
807
- }
808
- }, [field.value]);
809
- const getOptionValue = (option) => {
810
- if (typeof option === "string") return option;
811
- return option ? option[valueKey] : null;
812
- };
813
- const getOptionLabel = (option) => {
814
- if (typeof option === "string") return option;
815
- return option ? option[labelKey] : "";
816
- };
817
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
818
- _Autocomplete2.default,
819
- {
820
- ...rest,
821
- ref: selectRef,
822
- fullWidth: true,
823
- loading,
824
- getOptionLabel,
825
- getOptionKey: getOptionValue,
826
- isOptionEqualToValue: (option, value) => getOptionValue(option) === getOptionValue(value),
827
- autoComplete: true,
828
- disabled,
829
- includeInputInList: true,
830
- options,
831
- filterOptions: (x) => x,
832
- value: selectedOption,
833
- filterSelectedOptions: true,
834
- onChange: handleChange,
835
- onInputChange: (_2, newInputValue) => {
836
- setInputValue2(newInputValue);
837
- },
838
- noOptionsText: "Type Something...",
839
- renderInput: (params) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
840
- _TextField2.default,
841
- {
842
- ...params,
843
- label,
844
- error: !!error,
845
- helperText: error ? error.message : "",
846
- placeholder,
847
- slotProps: {
848
- input: {
849
- ...params.InputProps,
850
- endAdornment: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
851
- loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.CircularProgress, { color: "inherit", size: 20 }) : null,
852
- params.InputProps.endAdornment
853
- ] })
854
- }
855
- },
856
- variant: variant ? variant : "outlined",
857
- sx: {
858
- "& .MuiInputBase-input": {
859
- cursor: disabled ? "not-allowed" : "default"
860
- },
861
- bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
862
- ...sx
863
- }
864
- }
865
- ),
866
- renderOption: (renderProps, option) => {
867
- const { key, ...optionProps } = renderProps;
868
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...optionProps, children: option.Label }, key);
869
- }
870
- }
871
- );
872
- };
873
- var AsyncSelectElement2 = ({
874
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
875
- ...props
876
- }) => {
877
- if (gridProps) {
878
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
879
- _material.Grid2,
880
- {
881
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
882
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component6, { ...props })
883
- }
884
- );
885
- }
886
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component6, { ...props });
887
- };
888
- AsyncSelectElement2.displayName = "AsyncSelectElement";
889
- var AsyncSelectElement_default = AsyncSelectElement2;
890
-
891
- // src/wrappers3/AsyncMultiSelect/AsyncMultiSelect.tsx
892
- var _lodash = require('lodash'); var _lodash2 = _interopRequireDefault(_lodash);
893
-
894
-
895
-
896
-
897
-
898
-
899
-
900
-
901
-
902
-
903
-
904
-
905
-
906
-
907
-
908
-
909
-
910
- var _match = require('autosuggest-highlight/match'); var _match2 = _interopRequireDefault(_match);
911
- var _parse = require('autosuggest-highlight/parse'); var _parse2 = _interopRequireDefault(_parse);
912
-
913
- var Component7 = function AsyncSelectMultiElement(props) {
914
- const {
915
- name,
916
- onBlur,
917
- disabled,
918
- control,
919
- gridProps,
920
- placeholder,
921
- initialValues,
922
- label,
923
- queryFn,
924
- variant,
925
- sx,
926
- ...rest
927
- } = props;
928
- const {
929
- field,
930
- fieldState: { error }
931
- } = _reacthookform.useController.call(void 0, {
932
- name,
933
- control
934
- });
935
- const theme = _material.useTheme.call(void 0, );
936
- const multiSelectRef = _react.useRef.call(void 0, null);
937
- const [selectedOptions, setSelectedOptions] = _react.useState.call(void 0, []);
938
- const [inputValue, setInputValue] = _react.useState.call(void 0, "");
939
- const [options, setOptions] = _react.useState.call(void 0, []);
940
- const [loading, setLoading] = _react.useState.call(void 0, false);
941
- const initialValuesLoaded = _react.useRef.call(void 0,
942
- !(initialValues && initialValues.length > 0)
943
- );
944
- const inputValue2 = _react.useMemo.call(void 0, () => inputValue, [inputValue]);
945
- const setInputValue2 = _react.useCallback.call(void 0,
946
- (inputValue3) => setInputValue(inputValue3),
947
- []
948
- );
949
- const fetchData = _react.useMemo.call(void 0,
950
- () => _lodash.debounce.call(void 0,
951
- (payload, callback) => {
952
- queryFn(payload).then((c) => callback(c));
953
- },
954
- 400
955
- ),
956
- []
957
- );
958
- const fillOptions = (results) => {
959
- let newOptions = [];
960
- if (selectedOptions) {
961
- newOptions = [...selectedOptions];
962
- }
963
- if (results) {
964
- const newlyAdded = _lodash2.default.differenceBy(
965
- results,
966
- selectedOptions,
967
- (c) => c.Value
968
- );
969
- newOptions = [...newOptions, ...newlyAdded];
970
- }
971
- setOptions(newOptions);
972
- setLoading(false);
973
- };
974
- _react.useEffect.call(void 0, () => {
975
- if (initialValuesLoaded.current) return void 0;
976
- let active = true;
977
- const payload = {
978
- query: null,
979
- initialValues
980
- };
981
- setLoading(true);
982
- fetchData(payload, (results) => {
983
- if (active) {
984
- setSelectedOptions([...results]);
985
- field.onChange([...results.map((c) => c.Value)]);
986
- initialValuesLoaded.current = true;
987
- setLoading(false);
988
- }
989
- });
990
- return () => {
991
- active = false;
992
- };
993
- }, [initialValues]);
994
- _react.useEffect.call(void 0, () => {
995
- let active = true;
996
- if (inputValue2 === "" || initialValuesLoaded.current === false) {
997
- setOptions(selectedOptions ? [...selectedOptions] : []);
998
- return void 0;
999
- }
1000
- setLoading(true);
1001
- const payload = {
1002
- query: inputValue2,
1003
- initialValues: null
1004
- };
1005
- fetchData(payload, (results) => {
1006
- if (active) {
1007
- fillOptions(results);
1008
- }
1009
- });
1010
- return () => {
1011
- active = false;
1012
- };
1013
- }, [initialValues, inputValue2, fetchData]);
1014
- const handleChange = (_2, selectedOptions2, reason) => {
1015
- if (reason === "clear") {
1016
- setSelectedOptions([]);
1017
- field.onChange([]);
1018
- } else if (reason === "selectOption" || reason === "removeOption") {
1019
- setSelectedOptions(selectedOptions2);
1020
- field.onChange(selectedOptions2.map((c) => c.Value));
1021
- }
1022
- setOptions([]);
1023
- };
1024
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1025
- _material.Autocomplete,
1026
- {
1027
- ref: multiSelectRef,
1028
- multiple: true,
1029
- loading,
1030
- getOptionLabel: (option) => option.Label,
1031
- getOptionKey: (option) => option.Value,
1032
- isOptionEqualToValue: (option, val) => option.Value === val.Value,
1033
- options,
1034
- value: selectedOptions,
1035
- disabled,
1036
- filterSelectedOptions: true,
1037
- onChange: handleChange,
1038
- onInputChange: (_2, newInputValue) => {
1039
- setInputValue2(newInputValue);
1040
- },
1041
- renderInput: (params) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1042
- _material.TextField,
1043
- {
1044
- ...params,
1045
- label,
1046
- error: !!error,
1047
- helperText: error ? error.message : "",
1048
- placeholder,
1049
- slotProps: {
1050
- input: {
1051
- ...params.InputProps,
1052
- endAdornment: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
1053
- loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.CircularProgress, { color: "inherit", size: 20 }) : null,
1054
- params.InputProps.endAdornment
1055
- ] })
1056
- }
1057
- },
1058
- variant: variant ? variant : "outlined",
1059
- sx: {
1060
- "& .MuiInputBase-input": {
1061
- cursor: disabled ? "not-allowed" : "default"
1062
- },
1063
- bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent",
1064
- ...sx
1065
- }
1066
- }
1067
- ),
1068
- renderOption: (props2, option, { inputValue: inputValue3 }) => {
1069
- const { key, ...optionProps } = props2;
1070
- const matches = _match2.default.call(void 0, option.Label, inputValue3, { insideWords: true });
1071
- const parts = _parse2.default.call(void 0, option.Label, matches);
1072
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...optionProps, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: parts.map((part, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1073
- "span",
1074
- {
1075
- style: {
1076
- fontWeight: part.highlight ? 700 : 400
1077
- },
1078
- children: part.text
1079
- },
1080
- index
1081
- )) }) }, key);
1082
- },
1083
- ...rest
1084
- }
1085
- );
1086
- };
1087
- var AsyncSelectMultiElement2 = ({
1088
- gridProps,
1089
- ...props
1090
- }) => {
1091
- if (gridProps) {
1092
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1093
- _material.Grid2,
1094
- {
1095
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
1096
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component7, { ...props })
1097
- }
1098
- );
1099
- }
1100
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component7, { ...props });
1101
- };
1102
- AsyncSelectMultiElement2.displayName = "AsyncSelectMulti";
1103
- var AsyncMultiSelect_default = AsyncSelectMultiElement2;
1104
-
1105
- // src/wrappers3/SelectElement/SelectElement.tsx
1106
-
1107
-
1108
-
1109
-
1110
-
1111
-
1112
-
1113
-
1114
-
1115
-
1116
- var Component8 = function SelectElement(props) {
1117
- const {
1118
- name,
1119
- control,
1120
- onChange,
1121
- isEdit,
1122
- options,
1123
- label,
1124
- sx,
1125
- variant,
1126
- disabled,
1127
- initialValue,
1128
- labelKey = "Label",
1129
- valueKey = "Value",
1130
- placeholder,
1131
- textFieldProps = {},
1132
- ...rest
1133
- } = props;
1134
- const { required } = textFieldProps;
1135
- const {
1136
- field,
1137
- fieldState: { error }
1138
- } = _reacthookform.useController.call(void 0, {
1139
- name,
1140
- control,
1141
- defaultValue: initialValue
1142
- });
1143
- const theme = _material.useTheme.call(void 0, );
1144
- const getOptionValue = _react.useCallback.call(void 0,
1145
- (option) => {
1146
- if (typeof option === "string") return option;
1147
- return option ? option[valueKey] : null;
1148
- },
1149
- [valueKey]
1150
- );
1151
- const getOptionLabel = _react.useCallback.call(void 0,
1152
- (option) => {
1153
- if (typeof option === "string") return option;
1154
- return option ? String(option[labelKey]) : "";
1155
- },
1156
- [labelKey]
1157
- );
1158
- const handleChange = (event, newValue, reason) => {
1159
- const option = newValue;
1160
- field.onChange(option ? getOptionValue(option) : null);
1161
- _optionalChain([onChange, 'optionalCall', _24 => _24(event, newValue, reason)]);
1162
- };
1163
- _react.useEffect.call(void 0, () => {
1164
- if (!isEdit && options.length === 1 && (field.value == null || field.value === "")) {
1165
- const defaultOption = options[0];
1166
- field.onChange(getOptionValue(defaultOption));
1167
- }
1168
- if (isEdit) {
1169
- if (field.value == null || field.value === "") {
1170
- return;
1171
- }
1172
- }
1173
- }, [isEdit, options, field.value, getOptionValue, field.onChange]);
1174
- const autocompleteValue = _react.useMemo.call(void 0, () => {
1175
- if (!field.value) return null;
1176
- return _nullishCoalesce(options.find((option) => getOptionValue(option) === field.value), () => ( null));
1177
- }, [field.value, options, getOptionValue]);
1178
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1179
- _material.Autocomplete,
1180
- {
1181
- ...rest,
1182
- filterSelectedOptions: false,
1183
- options,
1184
- value: autocompleteValue,
1185
- onChange: handleChange,
1186
- disabled,
1187
- getOptionLabel: (option) => getOptionLabel(option),
1188
- ref: field.ref,
1189
- isOptionEqualToValue: (option, value) => getOptionValue(option) === getOptionValue(value),
1190
- renderInput: (params) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1191
- _material.TextField,
1192
- {
1193
- ...params,
1194
- fullWidth: true,
1195
- required,
1196
- error: !!error,
1197
- helperText: error ? error.message : "",
1198
- label,
1199
- placeholder,
1200
- variant: variant ? variant : "outlined",
1201
- sx: {
1202
- "& .MuiOutlinedInput-root": {
1203
- bgcolor: disabled ? theme.palette.action.disabledBackground : "transparent"
1204
- },
1205
- "& .MuiInputLabel-asterisk": { color: "red" },
1206
- "& .MuiInputBase-input": {
1207
- cursor: disabled ? "not-allowed" : "default"
1208
- },
1209
- ...sx
1210
- }
1211
- }
1212
- )
1213
- }
1214
- );
1215
- };
1216
- var SelectElement2 = ({
1217
- gridProps,
1218
- ...props
1219
- }) => {
1220
- if (gridProps) {
1221
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1222
- _material.Grid2,
1223
- {
1224
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
1225
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component8, { ...props })
1226
- }
1227
- );
1228
- }
1229
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component8, { ...props });
1230
- };
1231
- SelectElement2.displayName = "SelectElement";
1232
- var SelectElement_default = SelectElement2;
1233
-
1234
- // src/wrappers3/SelectMultiElement/SelectMultiElement.tsx
1235
-
1236
-
1237
- var _Chip = require('@mui/material/Chip'); var _Chip2 = _interopRequireDefault(_Chip);
1238
- var _CheckBox = require('@mui/icons-material/CheckBox'); var _CheckBox2 = _interopRequireDefault(_CheckBox);
1239
- var _CheckBoxOutlineBlank = require('@mui/icons-material/CheckBoxOutlineBlank'); var _CheckBoxOutlineBlank2 = _interopRequireDefault(_CheckBoxOutlineBlank);
1240
-
1241
-
1242
-
1243
-
1244
-
1245
-
1246
-
1247
-
1248
- var Component9 = function SelectMultiElement(props) {
1249
- const {
1250
- name,
1251
- control,
1252
- onBlur,
1253
- disabled,
1254
- options,
1255
- loading = false,
1256
- placeholder,
1257
- label,
1258
- variant,
1259
- sx,
1260
- labelKey = "Label",
1261
- valueKey = "Value",
1262
- multiple = true,
1263
- ...rest
1264
- } = props;
1265
- const {
1266
- field,
1267
- fieldState: { error }
1268
- } = _reacthookform.useController.call(void 0, {
1269
- name,
1270
- control
1271
- });
1272
- const getOptionValue = (option) => {
1273
- if (typeof option === "string") return option;
1274
- return option ? option[valueKey] : null;
1275
- };
1276
- const getOptionLabel = (option) => {
1277
- if (typeof option === "string") return option;
1278
- return option ? option[labelKey] : "";
1279
- };
1280
- const selectedValue = multiple ? Array.isArray(field.value) ? options.filter((option) => field.value.includes(getOptionValue(option))) : [] : _nullishCoalesce(options.find((option) => getOptionValue(option) === field.value), () => ( null));
1281
- const handleChange = (_2, selected, reason) => {
1282
- if (multiple) {
1283
- if (reason === "clear") {
1284
- field.onChange([]);
1285
- } else {
1286
- const newValues = selected.map(
1287
- (option) => getOptionValue(option)
1288
- );
1289
- field.onChange(newValues);
1290
- }
1291
- } else {
1292
- field.onChange(selected ? getOptionValue(selected) : null);
1293
- }
1294
- };
1295
- const icon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckBoxOutlineBlank2.default, { fontSize: "small" });
1296
- const checkedIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckBox2.default, { fontSize: "small" });
1297
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1298
- _material.Autocomplete,
1299
- {
1300
- multiple,
1301
- value: selectedValue,
1302
- loading,
1303
- options,
1304
- getOptionLabel: (option) => getOptionLabel(option),
1305
- isOptionEqualToValue: (option, value) => getOptionValue(option) === getOptionValue(value),
1306
- filterSelectedOptions: multiple,
1307
- disableCloseOnSelect: multiple,
1308
- ref: field.ref,
1309
- disabled: _nullishCoalesce(disabled, () => ( field.disabled)),
1310
- onChange: handleChange,
1311
- onBlur: (event) => {
1312
- field.onBlur();
1313
- if (typeof onBlur === "function") {
1314
- onBlur(event);
1315
- }
1316
- },
1317
- fullWidth: true,
1318
- renderOption: (props1, option, { selected }) => multiple ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { ...props1, children: [
1319
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1320
- _material.Checkbox,
1321
- {
1322
- icon,
1323
- checkedIcon,
1324
- checked: selected
1325
- }
1326
- ),
1327
- getOptionLabel(option)
1328
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...props1, children: getOptionLabel(option) }),
1329
- renderTags: (tagValue, getTagProps) => tagValue.map((option, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1330
- _Chip2.default,
1331
- {
1332
- ...getTagProps({ index }),
1333
- label: getOptionLabel(option),
1334
- size: "small",
1335
- variant: "filled"
1336
- }
1337
- )),
1338
- renderInput: (params) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1339
- _material.TextField,
1340
- {
1341
- ...params,
1342
- label,
1343
- error: !!error,
1344
- helperText: error ? error.message : "",
1345
- placeholder,
1346
- slotProps: {
1347
- input: {
1348
- ...params.InputProps,
1349
- endAdornment: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
1350
- loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.CircularProgress, { color: "inherit", size: 20 }) : null,
1351
- params.InputProps.endAdornment
1352
- ] })
1353
- }
1354
- },
1355
- variant: variant ? variant : "outlined",
1356
- sx: {
1357
- ...sx
1358
- }
1359
- }
1360
- ),
1361
- ...rest
1362
- }
1363
- );
1364
- };
1365
- var SelectMultiElement2 = ({
1366
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
1367
- ...props
1368
- }) => {
1369
- if (gridProps) {
1370
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1371
- _material.Grid2,
1372
- {
1373
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
1374
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component9, { ...props })
1375
- }
1376
- );
1377
- }
1378
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component9, { ...props });
1379
- };
1380
- SelectMultiElement2.displayName = "SelectMultiElement";
1381
- var SelectMultiElement_default = SelectMultiElement2;
1382
-
1383
- // src/wrappers3/SelectCascadeElement/SelectCascadeElement.tsx
1384
-
1385
-
1386
-
1387
-
1388
-
1389
-
1390
-
1391
-
1392
-
1393
-
1394
-
1395
- var Component10 = function SelectCascadeElement(props) {
1396
- const {
1397
- labelKey = "Label",
1398
- valueKey = "Value",
1399
- name,
1400
- onBlur,
1401
- onChange,
1402
- disabled,
1403
- options,
1404
- control,
1405
- loading = false,
1406
- placeholder,
1407
- label,
1408
- dependsOn,
1409
- initialValue,
1410
- textFieldProps = {},
1411
- variant,
1412
- sx,
1413
- isEdit = false,
1414
- ...rest
1415
- } = props;
1416
- const { required } = textFieldProps;
1417
- const getOptionKey = _react.useCallback.call(void 0,
1418
- (option) => {
1419
- if (typeof option === "string" || typeof option === "number")
1420
- return option;
1421
- const key = option ? option[valueKey] : void 0;
1422
- if (key === void 0 || key === null) {
1423
- return "";
1424
- }
1425
- if (typeof key === "string" || typeof key === "number") {
1426
- return key;
1427
- }
1428
- return String(key);
1429
- },
1430
- [valueKey]
1431
- );
1432
- const getOptionLabel = _react.useCallback.call(void 0,
1433
- (option) => {
1434
- if (typeof option === "string") return option;
1435
- return option ? String(option[labelKey]) : "";
1436
- },
1437
- [labelKey]
1438
- );
1439
- const isOptionEqualToValue = (option, value) => getOptionKey(option) === getOptionKey(value);
1440
- const {
1441
- field,
1442
- fieldState: { error }
1443
- } = _reacthookform.useController.call(void 0, {
1444
- name,
1445
- control,
1446
- defaultValue: initialValue
1447
- });
1448
- const theme = _material.useTheme.call(void 0, );
1449
- const { field: dependentField } = _reacthookform.useController.call(void 0, {
1450
- name: dependsOn,
1451
- control
1452
- });
1453
- const parentValueRef = _react.useRef.call(void 0, _nullishCoalesce(dependentField.value, () => ( null)));
1454
- const [hasAutoSelected, setHasAutoSelected] = _react.useState.call(void 0, false);
1455
- _react.useEffect.call(void 0, () => {
1456
- if (parentValueRef.current !== dependentField.value) {
1457
- parentValueRef.current = dependentField.value;
1458
- field.onChange(null);
1459
- setHasAutoSelected(false);
1460
- }
1461
- }, [dependentField.value, field]);
1462
- _react.useEffect.call(void 0, () => {
1463
- if (!dependentField.value) return;
1464
- if (isEdit) {
1465
- if (field.value) return;
1466
- if (options.length === 1 && !hasAutoSelected) {
1467
- field.onChange(getOptionKey(options[0]));
1468
- setHasAutoSelected(true);
1469
- }
1470
- } else {
1471
- if (options.length === 1 && !field.value && !hasAutoSelected) {
1472
- field.onChange(getOptionKey(options[0]));
1473
- setHasAutoSelected(true);
1474
- }
1475
- }
1476
- }, [
1477
- isEdit,
1478
- options,
1479
- field.value,
1480
- dependentField.value,
1481
- getOptionKey,
1482
- hasAutoSelected,
1483
- field
1484
- ]);
1485
- const autocompleteValue = _nullishCoalesce(options.find((opt) => getOptionKey(opt) === field.value), () => ( null));
1486
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1487
- _material.Autocomplete,
1488
- {
1489
- ...rest,
1490
- value: autocompleteValue,
1491
- size: "small",
1492
- loading,
1493
- options,
1494
- getOptionLabel,
1495
- isOptionEqualToValue,
1496
- ref: field.ref,
1497
- disabled: !dependentField.value || disabled,
1498
- onChange: (event, newValue, reason) => {
1499
- field.onChange(newValue ? getOptionKey(newValue) : null);
1500
- if (onChange && typeof onChange === "function") {
1501
- onChange(event, newValue, reason);
1502
- }
1503
- },
1504
- onBlur: (event) => {
1505
- field.onBlur();
1506
- if (typeof onBlur === "function") {
1507
- onBlur(event);
1508
- }
1509
- },
1510
- renderInput: (params) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1511
- _material.TextField,
1512
- {
1513
- ...params,
1514
- fullWidth: true,
1515
- error: !!error,
1516
- required,
1517
- helperText: error ? error.message : "",
1518
- placeholder,
1519
- label,
1520
- variant: _nullishCoalesce(variant, () => ( "outlined")),
1521
- sx: {
1522
- "& .MuiOutlinedInput-root": {
1523
- bgcolor: disabled || !dependentField.value ? theme.palette.action.disabledBackground : "transparent"
1524
- },
1525
- "& .MuiInputLabel-asterisk": { color: "red" },
1526
- "& .MuiInputBase-input": {
1527
- cursor: disabled || !dependentField.value ? "not-allowed" : "default"
1528
- },
1529
- ...sx
1530
- }
1531
- }
1532
- )
1533
- }
1534
- );
1535
- };
1536
- var SelectCascadeElement2 = ({
1537
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
1538
- ...props
1539
- }) => {
1540
- if (gridProps) {
1541
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1542
- _material.Grid2,
1543
- {
1544
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
1545
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component10, { ...props })
1546
- }
1547
- );
1548
- }
1549
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component10, { ...props });
1550
- };
1551
- SelectCascadeElement2.displayName = "SelectCascadeElement";
1552
- var SelectCascadeElement_default = SelectCascadeElement2;
1553
-
1554
- // src/wrappers3/CheckboxElement/CheckboxElement.tsx
1555
-
1556
-
1557
-
1558
-
1559
-
1560
-
1561
-
1562
-
1563
-
1564
-
1565
-
1566
-
1567
- var Component11 = function CheckboxElement(props) {
1568
- const { name, control, label, labelProps, inputRef, ...rest } = props;
1569
- const {
1570
- field,
1571
- fieldState: { error }
1572
- } = _reacthookform.useController.call(void 0, {
1573
- name,
1574
- control,
1575
- disabled: rest.disabled
1576
- });
1577
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.FormControl, { error: !!error, children: [
1578
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.FormGroup, { row: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1579
- _material.FormControlLabel,
1580
- {
1581
- label: label || "",
1582
- ...labelProps,
1583
- control: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1584
- _material.Checkbox,
1585
- {
1586
- ...rest,
1587
- color: rest.color || "primary",
1588
- sx: [
1589
- ...Array.isArray(rest.sx) ? rest.sx : [rest.sx],
1590
- {
1591
- color: error ? "error.main" : void 0
1592
- }
1593
- ],
1594
- value: field.value,
1595
- checked: !!field.value,
1596
- onChange: (event, newValue) => {
1597
- field.onChange(event, newValue);
1598
- if (typeof rest.onChange === "function") {
1599
- rest.onChange(event, newValue);
1600
- }
1601
- }
1602
- }
1603
- )
1604
- }
1605
- ) }),
1606
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.FormHelperText, { error: !!error, children: error.message })
1607
- ] });
1608
- };
1609
- var CheckboxElement2 = ({
1610
- gridProps,
1611
- ...props
1612
- }) => {
1613
- if (gridProps) {
1614
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Grid2, { ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component11, { ...props }) });
1615
- }
1616
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component11, { ...props });
1617
- };
1618
- CheckboxElement2.displayName = "CheckboxElement";
1619
- var CheckboxElement_default = CheckboxElement2;
1620
-
1621
- // src/wrappers3/CheckboxGroup/CheckboxGroup.tsx
1622
-
1623
-
1624
-
1625
-
1626
-
1627
-
1628
-
1629
-
1630
-
1631
-
1632
-
1633
-
1634
-
1635
- var Component12 = function CheckboxGroup(props) {
1636
- const { name, control, label, labelProps, inputRef, options, ...rest } = props;
1637
- const {
1638
- field,
1639
- fieldState: { error }
1640
- } = _reacthookform.useController.call(void 0, {
1641
- name,
1642
- control,
1643
- disabled: rest.disabled
1644
- });
1645
- const [selectedValues, setSelectedValues] = _react.useState.call(void 0,
1646
- options.filter((c) => _optionalChain([field, 'access', _25 => _25.value, 'optionalAccess', _26 => _26.includes, 'call', _27 => _27(c.Value)])).map((c) => c.Value) || []
1647
- );
1648
- _react.useEffect.call(void 0, () => {
1649
- field.onChange(selectedValues ? [...selectedValues] : []);
1650
- }, [selectedValues]);
1651
- const handleChange = (event) => {
1652
- const value = parseInt(event.target.value, 10);
1653
- if (event.target.checked) {
1654
- setSelectedValues([...selectedValues, value]);
1655
- } else {
1656
- setSelectedValues(selectedValues.filter((item) => item !== value));
1657
- }
1658
- };
1659
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.FormControl, { error: !!error, children: [
1660
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.FormGroup, { row: true, children: options.map((option) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1661
- _material.FormControlLabel,
1662
- {
1663
- label: option.Label,
1664
- ...labelProps,
1665
- control: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1666
- _material.Checkbox,
1667
- {
1668
- ...rest,
1669
- color: rest.color || "primary",
1670
- sx: [
1671
- ...Array.isArray(rest.sx) ? rest.sx : [rest.sx],
1672
- {
1673
- color: error ? "error.main" : void 0
1674
- }
1675
- ],
1676
- value: option.Value,
1677
- checked: selectedValues.includes(option.Value),
1678
- onChange: handleChange
1679
- }
1680
- )
1681
- },
1682
- `${option.Value}`
1683
- )) }),
1684
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.FormHelperText, { error: !!error, children: error.message })
1685
- ] });
1686
- };
1687
- var CheckboxGroup2 = ({
1688
- gridProps,
1689
- ...props
1690
- }) => {
1691
- if (gridProps) {
1692
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Grid2, { ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component12, { ...props }) });
1693
- }
1694
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component12, { ...props });
1695
- };
1696
- CheckboxGroup2.displayName = "CheckboxGroup";
1697
- var CheckboxGroup_default = CheckboxGroup2;
1698
-
1699
- // src/wrappers3/SelectMultiCascadeElement/SelectMultiCascadeElement.tsx
1700
-
1701
-
23
+ var _chunkTFNX5LROjs = require('./chunk-TFNX5LRO.js');
1702
24
 
1703
25
 
26
+ var _chunk6JZ35VQJjs = require('./chunk-6JZ35VQJ.js');
1704
27
 
1705
28
 
1706
29
 
@@ -1710,208 +33,8 @@ var CheckboxGroup_default = CheckboxGroup2;
1710
33
 
1711
34
 
1712
35
 
1713
- var Component13 = function SelectMultiCascadeElement(props) {
1714
- const {
1715
- name,
1716
- control,
1717
- dependsOn,
1718
- onBlur,
1719
- disabled,
1720
- options,
1721
- loading = false,
1722
- placeholder,
1723
- label,
1724
- variant,
1725
- sx,
1726
- labelKey = "Label",
1727
- valueKey = "Value",
1728
- multiple = true,
1729
- isEdit = false,
1730
- initialValue,
1731
- ...rest
1732
- } = props;
1733
- const {
1734
- field,
1735
- fieldState: { error }
1736
- } = _reacthookform.useController.call(void 0, {
1737
- name,
1738
- control,
1739
- defaultValue: initialValue
1740
- });
1741
- const { field: dependentField } = _reacthookform.useController.call(void 0, {
1742
- name: dependsOn,
1743
- control
1744
- });
1745
- const parentValueRef = _react.useRef.call(void 0, _nullishCoalesce(dependentField.value, () => ( null)));
1746
- const [hasAutoSelected, setHasAutoSelected] = _react.useState.call(void 0, false);
1747
- const getOptionValue = _react.useCallback.call(void 0,
1748
- (option) => {
1749
- if (typeof option === "string") return option;
1750
- return option ? option[valueKey] : null;
1751
- },
1752
- [valueKey]
1753
- );
1754
- const getOptionLabel = _react.useCallback.call(void 0,
1755
- (option) => {
1756
- if (typeof option === "string") return option;
1757
- return option ? option[labelKey] : "";
1758
- },
1759
- [labelKey]
1760
- );
1761
- _react.useEffect.call(void 0, () => {
1762
- if (parentValueRef.current !== dependentField.value) {
1763
- parentValueRef.current = dependentField.value;
1764
- field.onChange(multiple ? [] : null);
1765
- setHasAutoSelected(false);
1766
- }
1767
- }, [dependentField.value, field, multiple]);
1768
- _react.useEffect.call(void 0, () => {
1769
- if (!dependentField.value) return;
1770
- if (isEdit) {
1771
- if (field.value && (multiple ? field.value.length > 0 : field.value))
1772
- return;
1773
- if (options.length === 1 && !hasAutoSelected) {
1774
- field.onChange(
1775
- multiple ? [getOptionValue(options[0])] : getOptionValue(options[0])
1776
- );
1777
- setHasAutoSelected(true);
1778
- }
1779
- } else {
1780
- if (options.length === 1 && (!field.value || field.value.length === 0) && !hasAutoSelected) {
1781
- field.onChange(
1782
- multiple ? [getOptionValue(options[0])] : getOptionValue(options[0])
1783
- );
1784
- setHasAutoSelected(true);
1785
- }
1786
- }
1787
- }, [
1788
- isEdit,
1789
- options,
1790
- field.value,
1791
- dependentField.value,
1792
- multiple,
1793
- getOptionValue,
1794
- hasAutoSelected,
1795
- field
1796
- ]);
1797
- const selectedValue = multiple ? Array.isArray(field.value) ? options.filter((opt) => field.value.includes(getOptionValue(opt))) : [] : _nullishCoalesce(options.find((opt) => getOptionValue(opt) === field.value), () => ( null));
1798
- const handleChange = (_2, selected, reason) => {
1799
- if (multiple) {
1800
- if (reason === "clear") {
1801
- field.onChange([]);
1802
- } else {
1803
- const newValues = selected.map((opt) => getOptionValue(opt));
1804
- field.onChange(newValues);
1805
- }
1806
- } else {
1807
- field.onChange(selected ? getOptionValue(selected) : null);
1808
- }
1809
- };
1810
- const icon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckBoxOutlineBlank2.default, { fontSize: "small" });
1811
- const checkedIcon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckBox2.default, { fontSize: "small" });
1812
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1813
- _material.Autocomplete,
1814
- {
1815
- multiple,
1816
- value: selectedValue,
1817
- loading,
1818
- options,
1819
- getOptionLabel,
1820
- isOptionEqualToValue: (option, value) => getOptionValue(option) === getOptionValue(value),
1821
- filterSelectedOptions: multiple,
1822
- disableCloseOnSelect: multiple,
1823
- ref: field.ref,
1824
- disabled: !dependentField.value || disabled,
1825
- onChange: handleChange,
1826
- onBlur: (event) => {
1827
- field.onBlur();
1828
- if (typeof onBlur === "function") {
1829
- onBlur(event);
1830
- }
1831
- },
1832
- fullWidth: true,
1833
- renderOption: (props1, option, { selected }) => multiple ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "li", { ...props1, children: [
1834
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1835
- _material.Checkbox,
1836
- {
1837
- icon,
1838
- checkedIcon,
1839
- checked: selected
1840
- }
1841
- ),
1842
- getOptionLabel(option)
1843
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { ...props1, children: getOptionLabel(option) }),
1844
- renderTags: (tagValue, getTagProps) => tagValue.map((option, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1845
- _material.Chip,
1846
- {
1847
- ...getTagProps({ index }),
1848
- label: getOptionLabel(option),
1849
- size: "small",
1850
- variant: "filled"
1851
- }
1852
- )),
1853
- renderInput: (params) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1854
- _material.TextField,
1855
- {
1856
- ...params,
1857
- label,
1858
- error: !!error,
1859
- helperText: error ? error.message : "",
1860
- placeholder,
1861
- slotProps: {
1862
- input: {
1863
- ...params.InputProps,
1864
- endAdornment: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
1865
- loading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.CircularProgress, { color: "inherit", size: 20 }) : null,
1866
- params.InputProps.endAdornment
1867
- ] })
1868
- }
1869
- },
1870
- variant: variant ? variant : "outlined",
1871
- sx: {
1872
- ...sx
1873
- }
1874
- }
1875
- ),
1876
- ...rest
1877
- }
1878
- );
1879
- };
1880
- var SelectMultiCascadeElement2 = ({
1881
- gridProps = { size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 } },
1882
- ...props
1883
- }) => {
1884
- if (gridProps) {
1885
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1886
- _material.Grid2,
1887
- {
1888
- ...{ size: { xs: 12, sm: 12, md: 12, lg: 12, xl: 12 }, ...gridProps },
1889
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component13, { ...props })
1890
- }
1891
- );
1892
- }
1893
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Component13, { ...props });
1894
- };
1895
- SelectMultiCascadeElement2.displayName = "SelectMultiCascadeElement";
1896
- var SelectMultiCascadeElement_default = SelectMultiCascadeElement2;
1897
36
 
1898
- // src/wrappers3/Field/index.ts
1899
- var Field3 = {
1900
- Text: TextFieldElement_default,
1901
- Checkbox: CheckboxElement_default,
1902
- Date: DatePickerElement_default,
1903
- RadioGroup: RadioButtonGroup_default,
1904
- Password: PasswordElement_default,
1905
- Time: TimePickerElement_default,
1906
- Select: SelectElement_default,
1907
- SelectMulti: SelectMultiElement_default,
1908
- SelectCascade: SelectCascadeElement_default,
1909
- AsyncSelect: AsyncSelectElement_default,
1910
- AsyncMultiSelect: AsyncMultiSelect_default,
1911
- CheckboxGroup: CheckboxGroup_default,
1912
- SelectMultiCascadeElement: SelectMultiCascadeElement_default
1913
- };
1914
- var Field_default3 = Field3;
37
+ var _chunkI7EIUZKKjs = require('./chunk-I7EIUZKK.js');
1915
38
 
1916
39
 
1917
40
 
@@ -1936,4 +59,4 @@ var Field_default3 = Field3;
1936
59
 
1937
60
 
1938
61
 
1939
- exports.AuthorizedView = _chunkJKUOV3MNjs.AuthorizedView_default; exports.CancelButton = _chunkJKUOV3MNjs.CancelButton_default; exports.ClearButton = _chunkJKUOV3MNjs.ClearButton_default; exports.Field = _chunkPTW4AAPVjs.Field_default; exports.Field2 = _chunk6NOXJGU2js.Field_default; exports.Field3 = Field_default3; exports.FilterButton = _chunkJKUOV3MNjs.FilterButton_default; exports.FilterWrapper = _chunkJKUOV3MNjs.FilterWrapper_default; exports.FormWrapper = _chunkJKUOV3MNjs.FormWrapper_default; exports.LabelText = _chunkJKUOV3MNjs.LabelText_default; exports.ListWrapper = _chunkJKUOV3MNjs.ListWrapper_default; exports.SimpleButton = _chunkJKUOV3MNjs.SimpleButton_default; exports.SimpleToolbar = _chunkJKUOV3MNjs.SimpleToolbar_default; exports.api = _chunkI7EIUZKKjs.api; exports.api2 = _chunkI7EIUZKKjs.api2; exports.flattenObjectKeys = _chunkI7EIUZKKjs.flattenObjectKeys; exports.getTimezone = _chunkI7EIUZKKjs.getTimezone; exports.handleServerErrors = _chunkI7EIUZKKjs.handleServerErrors; exports.propertyExists = _chunkI7EIUZKKjs.propertyExists; exports.readValueAsDate = _chunkI7EIUZKKjs.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunkI7EIUZKKjs.removeLeadingTrailingSlashes; exports.schemaTools = _chunkI7EIUZKKjs.schemaTools; exports.useTransform = _chunk6JZ35VQJjs.useTransform;
62
+ exports.AuthorizedView = _chunkJKUOV3MNjs.AuthorizedView_default; exports.CancelButton = _chunkJKUOV3MNjs.CancelButton_default; exports.ClearButton = _chunkJKUOV3MNjs.ClearButton_default; exports.Field = _chunkPTW4AAPVjs.Field_default; exports.Field2 = _chunk6NOXJGU2js.Field_default; exports.Field3 = _chunkTFNX5LROjs.Field_default; exports.FilterButton = _chunkJKUOV3MNjs.FilterButton_default; exports.FilterWrapper = _chunkJKUOV3MNjs.FilterWrapper_default; exports.FormWrapper = _chunkJKUOV3MNjs.FormWrapper_default; exports.LabelText = _chunkJKUOV3MNjs.LabelText_default; exports.ListWrapper = _chunkJKUOV3MNjs.ListWrapper_default; exports.SimpleButton = _chunkJKUOV3MNjs.SimpleButton_default; exports.SimpleToolbar = _chunkJKUOV3MNjs.SimpleToolbar_default; exports.api = _chunkI7EIUZKKjs.api; exports.api2 = _chunkI7EIUZKKjs.api2; exports.flattenObjectKeys = _chunkI7EIUZKKjs.flattenObjectKeys; exports.getTimezone = _chunkI7EIUZKKjs.getTimezone; exports.handleServerErrors = _chunkI7EIUZKKjs.handleServerErrors; exports.propertyExists = _chunkI7EIUZKKjs.propertyExists; exports.readValueAsDate = _chunkI7EIUZKKjs.readValueAsDate; exports.removeLeadingTrailingSlashes = _chunkI7EIUZKKjs.removeLeadingTrailingSlashes; exports.schemaTools = _chunkI7EIUZKKjs.schemaTools; exports.useTransform = _chunk6JZ35VQJjs.useTransform;