@react-typed-forms/schemas-html 4.2.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/adornments/optionalAdornment.d.ts +4 -25
- package/lib/components/ArrayElementRenderer.d.ts +1 -4
- package/lib/components/AutocompleteRenderer.d.ts +1 -7
- package/lib/components/CheckRenderer.d.ts +3 -29
- package/lib/components/ControlInput.d.ts +2 -1
- package/lib/components/DefaultAccordion.d.ts +13 -6
- package/lib/components/DefaultArrayRenderer.d.ts +2 -9
- package/lib/components/DefaultDialogRenderer.d.ts +2 -8
- package/lib/components/DefaultDisplay.d.ts +3 -6
- package/lib/components/DefaultDisplayOnly.d.ts +3 -3
- package/lib/components/DefaultGroupRenderer.d.ts +2 -16
- package/lib/components/DefaultLayout.d.ts +4 -8
- package/lib/components/DefaultVisibility.d.ts +1 -1
- package/lib/components/DefaultWizardRenderer.d.ts +1 -27
- package/lib/components/GridRenderer.d.ts +1 -5
- package/lib/components/HtmlCheckButtons.d.ts +3 -0
- package/lib/components/JsonataRenderer.d.ts +2 -1
- package/lib/components/MultilineTextfield.d.ts +2 -1
- package/lib/components/ScrollListRenderer.d.ts +2 -0
- package/lib/components/SelectDataRenderer.d.ts +3 -6
- package/lib/components/TabsRenderer.d.ts +1 -9
- package/lib/components/ValueForFieldRenderer.d.ts +2 -10
- package/lib/createButtonActionRenderer.d.ts +2 -20
- package/lib/createDefaultRenderers.d.ts +8 -83
- package/lib/index.cjs +721 -552
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +656 -476
- package/lib/index.js.map +1 -1
- package/lib/rendererOptions.d.ts +218 -0
- package/lib/tailwind.d.ts +14 -2
- package/package.json +6 -6
- package/lib/components/VisibleChildrenRenderer.d.ts +0 -14
package/lib/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { useMemo, useEffect, Fragment as Fragment$1, useId, createElement, useRef, isValidElement } from 'react';
|
|
2
|
+
import clsx, { clsx as clsx$1 } from 'clsx';
|
|
3
|
+
import { DisplayDataType, rendererClass, coerceToString, getOverrideClass, FieldType, createDataRenderer, fieldOptionAdornment, DataRenderType, setIncluded, useElementSelectedRenderer, createLayoutRenderer, renderLayoutParts, createGroupRenderer, GroupRenderType, DefaultFormNodeUi, fontAwesomeIcon, deepMerge, createAction, IconPlacement, ActionStyle, schemaDataForFieldRef, isTabsRenderer, isGridRenderer, isWizardRenderer, isDialogRenderer, isAccordionRenderer, isSelectChildRenderer, isFlexRenderer, isInlineRenderer, useExpression, createVisibilityRenderer, getJsonPath, ExpressionType, getLastDefinedValue, getNullToggler, mergeObjects, isArrayRenderer, createArrayActions, getLengthRestrictions, applyArrayLengthRestrictions, buildSchema, stringField, boolField, schemaForFieldRef, defaultControlForField, createSchemaTree, createFormTree, RenderForm, createSchemaDataNode, createAdornmentRenderer, getIsEditing, appendMarkupAt, AdornmentPlacement, wrapMarkup, getAllValues, ControlAdornmentType, getExternalEditData, makeSchemaDataNode, createActionRenderer, getLoadingControl, getHasMoreControl, NoOpControlActionContext, isDataGroupRenderer, isDisplayOnlyRenderer, hasOptions, isTextfieldRenderer, isOptionalAdornment, isSetFieldAdornment, wrapLayout, isIconAdornment, isAccordionAdornment, LabelType, IconLibrary } from '@react-typed-forms/schemas';
|
|
3
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import { useComponentTracking, formControlProps, useControl, useControlEffect,
|
|
5
|
-
import { useState, useMemo, useEffect, Fragment as Fragment$1, createElement, useRef } from 'react';
|
|
5
|
+
import { useComponentTracking, formControlProps, useControl, useControlEffect, useComputed, trackedValue, RenderControl, controlValues, removeElement, setFields, newControl, Fcheckbox as Fcheckbox$1, RenderElements, RenderArrayElements } from '@react-typed-forms/core';
|
|
6
6
|
import { createOverlayState, Dialog, Modal } from '@astroapps/aria-base';
|
|
7
7
|
import { useAutocomplete } from '@mui/base';
|
|
8
8
|
import { useOverlayTriggerState } from '@react-stately/overlays';
|
|
@@ -96,13 +96,13 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
96
96
|
if (null == r) return {};
|
|
97
97
|
var t = {};
|
|
98
98
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
99
|
-
if (e.
|
|
99
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
100
100
|
t[n] = r[n];
|
|
101
101
|
}
|
|
102
102
|
return t;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
const _excluded$4 = ["control", "convert", "renderer"],
|
|
105
|
+
const _excluded$4 = ["control", "convert", "renderer", "errorId"],
|
|
106
106
|
_excluded2$2 = ["errorText", "value", "onChange", "ref"];
|
|
107
107
|
function ControlInput(_ref) {
|
|
108
108
|
var _effect = useComponentTracking();
|
|
@@ -110,11 +110,13 @@ function ControlInput(_ref) {
|
|
|
110
110
|
let {
|
|
111
111
|
control,
|
|
112
112
|
convert,
|
|
113
|
-
renderer
|
|
113
|
+
renderer,
|
|
114
|
+
errorId
|
|
114
115
|
} = _ref,
|
|
115
116
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
116
117
|
const _formControlProps = formControlProps(control),
|
|
117
118
|
{
|
|
119
|
+
errorText,
|
|
118
120
|
value,
|
|
119
121
|
ref
|
|
120
122
|
} = _formControlProps,
|
|
@@ -128,6 +130,8 @@ function ControlInput(_ref) {
|
|
|
128
130
|
inputRef: ref,
|
|
129
131
|
type: convert[0],
|
|
130
132
|
value: textValue.value,
|
|
133
|
+
"aria-describedby": !!errorText ? errorId : undefined,
|
|
134
|
+
"aria-invalid": !!errorText || undefined,
|
|
131
135
|
onChangeValue: e => {
|
|
132
136
|
textValue.value = e;
|
|
133
137
|
const converted = convert[1](e);
|
|
@@ -173,7 +177,8 @@ function createInputConversion(ft) {
|
|
|
173
177
|
const _excluded$3 = ["state", "options", "className", "convert", "required", "emptyText", "requiredText", "readonly"];
|
|
174
178
|
function createSelectRenderer(options = {}) {
|
|
175
179
|
return createDataRenderer((props, asArray) => {
|
|
176
|
-
var _props$options;
|
|
180
|
+
var _props$options, _renderOptions$requir;
|
|
181
|
+
const renderOptions = props.definition.renderOptions;
|
|
177
182
|
return /*#__PURE__*/jsx(SelectDataRenderer, {
|
|
178
183
|
className: rendererClass(props.className, options.className),
|
|
179
184
|
state: props.control,
|
|
@@ -182,7 +187,7 @@ function createSelectRenderer(options = {}) {
|
|
|
182
187
|
options: (_props$options = props.options) != null ? _props$options : [],
|
|
183
188
|
required: props.required,
|
|
184
189
|
emptyText: options.emptyText,
|
|
185
|
-
requiredText: options.requiredText,
|
|
190
|
+
requiredText: (_renderOptions$requir = renderOptions == null ? void 0 : renderOptions.requiredText) != null ? _renderOptions$requir : options.requiredText,
|
|
186
191
|
convert: createSelectConversion(props.field.type)
|
|
187
192
|
});
|
|
188
193
|
}, {
|
|
@@ -207,7 +212,7 @@ function SelectDataRenderer(_ref) {
|
|
|
207
212
|
value,
|
|
208
213
|
disabled
|
|
209
214
|
} = state;
|
|
210
|
-
const
|
|
215
|
+
const showEmpty = useMemo(() => !required || value == null, [required, value]);
|
|
211
216
|
const optionStringMap = useMemo(() => Object.fromEntries(options.map(x => [convert(x.value), x.value])), [options]);
|
|
212
217
|
const optionGroups = useMemo(() => new Set(options.filter(x => x.group).map(x => x.group)), [options]);
|
|
213
218
|
return /*#__PURE__*/jsxs("select", _extends({}, props, {
|
|
@@ -251,7 +256,7 @@ function createSelectConversion(ft) {
|
|
|
251
256
|
const _excluded$2 = ["control", "type", "notValue", "renderer"],
|
|
252
257
|
_excluded2$1 = ["value", "onChange", "errorText", "ref"];
|
|
253
258
|
function createRadioRenderer(options = {}) {
|
|
254
|
-
return createDataRenderer((p, renderer) => /*#__PURE__*/jsx(CheckButtons, _extends({
|
|
259
|
+
return createDataRenderer((p, renderer) => /*#__PURE__*/jsx(renderer.html.CheckButtons, _extends({
|
|
255
260
|
classes: options,
|
|
256
261
|
controlClasses: p.renderOptions
|
|
257
262
|
}, p, {
|
|
@@ -270,7 +275,7 @@ function createRadioRenderer(options = {}) {
|
|
|
270
275
|
});
|
|
271
276
|
}
|
|
272
277
|
function createCheckListRenderer(options = {}) {
|
|
273
|
-
return createDataRenderer((p, renderer) => /*#__PURE__*/jsx(CheckButtons, _extends({
|
|
278
|
+
return createDataRenderer((p, renderer) => /*#__PURE__*/jsx(renderer.html.CheckButtons, _extends({
|
|
274
279
|
classes: options,
|
|
275
280
|
controlClasses: p.renderOptions
|
|
276
281
|
}, p, {
|
|
@@ -292,80 +297,6 @@ function createCheckListRenderer(options = {}) {
|
|
|
292
297
|
renderType: DataRenderType.CheckList
|
|
293
298
|
});
|
|
294
299
|
}
|
|
295
|
-
function CheckButtons({
|
|
296
|
-
control,
|
|
297
|
-
options,
|
|
298
|
-
readonly,
|
|
299
|
-
className,
|
|
300
|
-
id,
|
|
301
|
-
type,
|
|
302
|
-
isChecked,
|
|
303
|
-
setChecked,
|
|
304
|
-
entryAdornment,
|
|
305
|
-
classes,
|
|
306
|
-
controlClasses = {},
|
|
307
|
-
renderer
|
|
308
|
-
}) {
|
|
309
|
-
var _effect = useComponentTracking();
|
|
310
|
-
try {
|
|
311
|
-
const {
|
|
312
|
-
Button,
|
|
313
|
-
Input,
|
|
314
|
-
Label,
|
|
315
|
-
Div
|
|
316
|
-
} = renderer.html;
|
|
317
|
-
const {
|
|
318
|
-
disabled
|
|
319
|
-
} = control;
|
|
320
|
-
const name = "r" + control.uniqueId;
|
|
321
|
-
return /*#__PURE__*/jsx(Div, {
|
|
322
|
-
className: className,
|
|
323
|
-
id: id,
|
|
324
|
-
children: /*#__PURE__*/jsx(RenderArrayElements, {
|
|
325
|
-
array: options == null ? void 0 : options.filter(x => x.value != null),
|
|
326
|
-
children: (o, i) => {
|
|
327
|
-
const checked = useComputed(() => isChecked(control, o)).value;
|
|
328
|
-
const selOrUnsel = checked ? rendererClass(controlClasses == null ? void 0 : controlClasses.selectedClass, classes.selectedClass) : rendererClass(controlClasses == null ? void 0 : controlClasses.notSelectedClass, classes.notSelectedClass);
|
|
329
|
-
return /*#__PURE__*/jsxs(Button, {
|
|
330
|
-
className: clsx(rendererClass(controlClasses == null ? void 0 : controlClasses.entryWrapperClass, classes.entryWrapperClass), selOrUnsel),
|
|
331
|
-
onClick: () => !readonly && setChecked(control, o, !checked),
|
|
332
|
-
children: [/*#__PURE__*/jsxs(Div, {
|
|
333
|
-
className: classes.entryClass,
|
|
334
|
-
children: [/*#__PURE__*/jsx(Input, {
|
|
335
|
-
id: name + "_" + i,
|
|
336
|
-
className: classes.checkClass,
|
|
337
|
-
type: type,
|
|
338
|
-
name: name,
|
|
339
|
-
readOnly: readonly,
|
|
340
|
-
disabled: disabled,
|
|
341
|
-
checked: checked,
|
|
342
|
-
onChangeChecked: x => {
|
|
343
|
-
!readonly && setChecked(control, o, x);
|
|
344
|
-
}
|
|
345
|
-
}), /*#__PURE__*/jsx(Label, {
|
|
346
|
-
className: classes.labelClass,
|
|
347
|
-
htmlFor: name + "_" + i,
|
|
348
|
-
children: o.name
|
|
349
|
-
})]
|
|
350
|
-
}), entryAdornment == null ? void 0 : entryAdornment(o, i, checked)]
|
|
351
|
-
});
|
|
352
|
-
}
|
|
353
|
-
})
|
|
354
|
-
});
|
|
355
|
-
} finally {
|
|
356
|
-
_effect();
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
function setIncluded(array, elem, included) {
|
|
360
|
-
const already = array.includes(elem);
|
|
361
|
-
if (included === already) {
|
|
362
|
-
return array;
|
|
363
|
-
}
|
|
364
|
-
if (included) {
|
|
365
|
-
return [...array, elem];
|
|
366
|
-
}
|
|
367
|
-
return array.filter(e => e !== elem);
|
|
368
|
-
}
|
|
369
300
|
function createCheckboxRenderer(options = {}) {
|
|
370
301
|
return createDataRenderer((props, renderer) => p => _extends({}, p, {
|
|
371
302
|
label: undefined,
|
|
@@ -398,24 +329,13 @@ function CheckBoxSelected({
|
|
|
398
329
|
renderer,
|
|
399
330
|
options
|
|
400
331
|
}) {
|
|
401
|
-
var
|
|
332
|
+
var _effect = useComponentTracking();
|
|
402
333
|
try {
|
|
334
|
+
var _p$label;
|
|
403
335
|
const {
|
|
404
336
|
Div
|
|
405
337
|
} = renderer.html;
|
|
406
|
-
const
|
|
407
|
-
useEffect(() => {
|
|
408
|
-
props.runExpression(elementValue, props.renderOptions.elementExpression, v => elementValue.value = v);
|
|
409
|
-
});
|
|
410
|
-
const isSelected = useComputed(() => {
|
|
411
|
-
var _props$control$as$val, _props$control$as$val2;
|
|
412
|
-
return (_props$control$as$val = (_props$control$as$val2 = props.control.as().value) == null ? void 0 : _props$control$as$val2.includes(elementValue.current.value)) != null ? _props$control$as$val : false;
|
|
413
|
-
});
|
|
414
|
-
const selControl = useControl(() => isSelected.current.value);
|
|
415
|
-
selControl.value = isSelected.value;
|
|
416
|
-
useControlEffect(() => selControl.value, v => {
|
|
417
|
-
props.control.as().setValue(x => setIncluded(x != null ? x : [], elementValue.value, v));
|
|
418
|
-
});
|
|
338
|
+
const selControl = useElementSelectedRenderer(props);
|
|
419
339
|
return /*#__PURE__*/jsxs(Div, {
|
|
420
340
|
className: rendererClass(props.className, options.entryClass),
|
|
421
341
|
children: [/*#__PURE__*/jsx(Fcheckbox, {
|
|
@@ -424,10 +344,10 @@ function CheckBoxSelected({
|
|
|
424
344
|
style: props.style,
|
|
425
345
|
className: options.checkClass,
|
|
426
346
|
renderer: renderer
|
|
427
|
-
}), p.label && renderer.renderLabel(p.label, undefined, undefined)]
|
|
347
|
+
}), ((_p$label = p.label) == null ? void 0 : _p$label.label) && renderer.renderLabel(p.label, undefined, undefined)]
|
|
428
348
|
});
|
|
429
349
|
} finally {
|
|
430
|
-
|
|
350
|
+
_effect();
|
|
431
351
|
}
|
|
432
352
|
}
|
|
433
353
|
function CheckBox({
|
|
@@ -436,7 +356,7 @@ function CheckBox({
|
|
|
436
356
|
renderer,
|
|
437
357
|
options
|
|
438
358
|
}) {
|
|
439
|
-
var
|
|
359
|
+
var _effect2 = useComponentTracking();
|
|
440
360
|
try {
|
|
441
361
|
const {
|
|
442
362
|
Div
|
|
@@ -452,11 +372,11 @@ function CheckBox({
|
|
|
452
372
|
}), p.label && renderer.renderLabel(p.label, undefined, undefined)]
|
|
453
373
|
});
|
|
454
374
|
} finally {
|
|
455
|
-
|
|
375
|
+
_effect2();
|
|
456
376
|
}
|
|
457
377
|
}
|
|
458
378
|
function Fcheckbox(_ref) {
|
|
459
|
-
var
|
|
379
|
+
var _effect3 = useComponentTracking();
|
|
460
380
|
try {
|
|
461
381
|
let {
|
|
462
382
|
control,
|
|
@@ -483,7 +403,7 @@ function Fcheckbox(_ref) {
|
|
|
483
403
|
type: type
|
|
484
404
|
}, others));
|
|
485
405
|
} finally {
|
|
486
|
-
|
|
406
|
+
_effect3();
|
|
487
407
|
}
|
|
488
408
|
}
|
|
489
409
|
|
|
@@ -511,8 +431,9 @@ function DefaultLayout({
|
|
|
511
431
|
Span
|
|
512
432
|
}
|
|
513
433
|
},
|
|
514
|
-
renderError = e => e && /*#__PURE__*/jsx(Div, {
|
|
434
|
+
renderError = (e, errorId) => e && /*#__PURE__*/jsx(Div, {
|
|
515
435
|
children: /*#__PURE__*/jsx(Span, {
|
|
436
|
+
id: errorId,
|
|
516
437
|
className: errorClass,
|
|
517
438
|
children: e
|
|
518
439
|
})
|
|
@@ -522,7 +443,8 @@ function DefaultLayout({
|
|
|
522
443
|
controlStart,
|
|
523
444
|
label,
|
|
524
445
|
children,
|
|
525
|
-
errorControl
|
|
446
|
+
errorControl,
|
|
447
|
+
errorId
|
|
526
448
|
}
|
|
527
449
|
}) {
|
|
528
450
|
var _effect = useComponentTracking();
|
|
@@ -530,7 +452,7 @@ function DefaultLayout({
|
|
|
530
452
|
const ec = errorControl;
|
|
531
453
|
const errorText = ec && ec.touched ? ec.error : undefined;
|
|
532
454
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
533
|
-
children: [label, controlStart, children, renderError(errorText), controlEnd]
|
|
455
|
+
children: [label, controlStart, children, renderError(errorText, errorId), controlEnd]
|
|
534
456
|
});
|
|
535
457
|
} finally {
|
|
536
458
|
_effect();
|
|
@@ -551,7 +473,10 @@ function DefaultDisplayOnly({
|
|
|
551
473
|
var _effect = useComponentTracking();
|
|
552
474
|
try {
|
|
553
475
|
var _ref;
|
|
554
|
-
const
|
|
476
|
+
const {
|
|
477
|
+
display
|
|
478
|
+
} = state.resolved;
|
|
479
|
+
const text = display != null ? display : (_ref = schemaInterface.isEmptyValue(dataNode.schema.field, dataNode.control.value) ? emptyText : schemaInterface.textValueForData(dataNode)) != null ? _ref : "";
|
|
555
480
|
const {
|
|
556
481
|
Div
|
|
557
482
|
} = renderer.html;
|
|
@@ -567,110 +492,33 @@ function DefaultDisplayOnly({
|
|
|
567
492
|
}
|
|
568
493
|
}
|
|
569
494
|
|
|
570
|
-
function DefaultAccordion({
|
|
571
|
-
children,
|
|
572
|
-
accordion,
|
|
573
|
-
contentStyle,
|
|
574
|
-
contentClassName,
|
|
575
|
-
designMode,
|
|
576
|
-
iconOpen,
|
|
577
|
-
iconClosed,
|
|
578
|
-
className,
|
|
579
|
-
renderTitle = t => t,
|
|
580
|
-
renderToggler,
|
|
581
|
-
renderers,
|
|
582
|
-
titleClass,
|
|
583
|
-
useCss,
|
|
584
|
-
dataContext
|
|
585
|
-
}) {
|
|
586
|
-
var _effect = useComponentTracking();
|
|
587
|
-
try {
|
|
588
|
-
var _dataContext$dataNode;
|
|
589
|
-
const {
|
|
590
|
-
Button,
|
|
591
|
-
I,
|
|
592
|
-
Div,
|
|
593
|
-
Label
|
|
594
|
-
} = renderers.html;
|
|
595
|
-
const dataControl = ((_dataContext$dataNode = dataContext.dataNode) != null ? _dataContext$dataNode : dataContext.parentNode).control;
|
|
596
|
-
const open = useControl(!!accordion.defaultExpanded);
|
|
597
|
-
if (dataControl && !dataControl.meta.accordionState) {
|
|
598
|
-
dataControl.meta.accordionState = open;
|
|
599
|
-
}
|
|
600
|
-
const isOpen = open.value;
|
|
601
|
-
const fullContentStyle = isOpen || designMode ? contentStyle : _extends({}, contentStyle, {
|
|
602
|
-
display: "none"
|
|
603
|
-
});
|
|
604
|
-
const title = renderers.renderLabelText(renderTitle(accordion.title, open));
|
|
605
|
-
const currentIcon = isOpen ? iconOpen : iconClosed;
|
|
606
|
-
const toggler = renderToggler ? renderToggler(open, title) : /*#__PURE__*/jsxs(Button, {
|
|
607
|
-
className: className,
|
|
608
|
-
onClick: () => open.setValue(x => !x),
|
|
609
|
-
children: [/*#__PURE__*/jsx(Label, {
|
|
610
|
-
className: titleClass,
|
|
611
|
-
children: title
|
|
612
|
-
}), currentIcon && /*#__PURE__*/jsx(I, {
|
|
613
|
-
iconLibrary: currentIcon.library,
|
|
614
|
-
iconName: currentIcon.name
|
|
615
|
-
})]
|
|
616
|
-
});
|
|
617
|
-
return /*#__PURE__*/jsxs(Fragment, {
|
|
618
|
-
children: [toggler, (useCss || isOpen || designMode) && /*#__PURE__*/jsx(Div, {
|
|
619
|
-
style: fullContentStyle,
|
|
620
|
-
className: contentClassName,
|
|
621
|
-
children: children
|
|
622
|
-
})]
|
|
623
|
-
});
|
|
624
|
-
} finally {
|
|
625
|
-
_effect();
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
function getAccordionState(c) {
|
|
629
|
-
return c.meta.accordionState;
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/**
|
|
633
|
-
* @trackControls
|
|
634
|
-
*/
|
|
635
|
-
function VisibleChildrenRenderer(props) {
|
|
636
|
-
var _effect = useComponentTracking();
|
|
637
|
-
try {
|
|
638
|
-
const childStates = props.parentFormNode.getChildNodes().map(x => props.parent.getChildState(x));
|
|
639
|
-
return props.render(props.props, i => !childStates[i].hidden);
|
|
640
|
-
} finally {
|
|
641
|
-
_effect();
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
|
|
645
495
|
function createTabsRenderer(options = {}) {
|
|
646
496
|
return createGroupRenderer((p, renderer) => {
|
|
647
|
-
return /*#__PURE__*/jsx(
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
parent: p,
|
|
652
|
-
props: {
|
|
653
|
-
groupProps: p,
|
|
654
|
-
tabOptions: p.renderOptions,
|
|
655
|
-
options: options
|
|
656
|
-
}
|
|
497
|
+
return /*#__PURE__*/jsx(TabsRenderer, {
|
|
498
|
+
groupProps: p,
|
|
499
|
+
tabOptions: p.renderOptions,
|
|
500
|
+
options: options
|
|
657
501
|
});
|
|
658
502
|
}, {
|
|
659
503
|
renderType: GroupRenderType.Tabs
|
|
660
504
|
});
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
505
|
+
}
|
|
506
|
+
function TabsRenderer({
|
|
507
|
+
options,
|
|
508
|
+
groupProps: {
|
|
509
|
+
designMode,
|
|
510
|
+
formNode,
|
|
511
|
+
className,
|
|
512
|
+
renderChild
|
|
513
|
+
},
|
|
514
|
+
tabOptions
|
|
515
|
+
}) {
|
|
516
|
+
var _effect = useComponentTracking();
|
|
517
|
+
try {
|
|
518
|
+
const tabIndex = useControl(0);
|
|
519
|
+
useEffect(() => {
|
|
520
|
+
formNode.attachUi(new TabUi(tabIndex, formNode));
|
|
521
|
+
}, [formNode, tabIndex]);
|
|
674
522
|
const {
|
|
675
523
|
tabClass,
|
|
676
524
|
labelClass,
|
|
@@ -679,10 +527,10 @@ function createTabsRenderer(options = {}) {
|
|
|
679
527
|
activeClass,
|
|
680
528
|
contentClass
|
|
681
529
|
} = options;
|
|
682
|
-
const currentTab =
|
|
530
|
+
const currentTab = tabIndex.value;
|
|
683
531
|
return designMode ? /*#__PURE__*/jsx(Fragment, {
|
|
684
|
-
children: formNode.
|
|
685
|
-
}) : renderTabs(formNode.
|
|
532
|
+
children: formNode.children.map((x, i) => renderTabs([x], i))
|
|
533
|
+
}) : renderTabs(formNode.children.filter((x, i) => x.visible), 0);
|
|
686
534
|
function renderTabs(tabs, key) {
|
|
687
535
|
return /*#__PURE__*/jsxs("div", {
|
|
688
536
|
className: rendererClass(className, options.className),
|
|
@@ -698,52 +546,81 @@ function createTabsRenderer(options = {}) {
|
|
|
698
546
|
}, i))
|
|
699
547
|
}), /*#__PURE__*/jsx("div", {
|
|
700
548
|
className: rendererClass(tabOptions.contentClass, contentClass),
|
|
701
|
-
children: renderChild(
|
|
549
|
+
children: renderChild(tabs[currentTab])
|
|
702
550
|
})]
|
|
703
551
|
}, key);
|
|
704
552
|
}
|
|
553
|
+
} finally {
|
|
554
|
+
_effect();
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
class TabUi extends DefaultFormNodeUi {
|
|
558
|
+
constructor(tabIndex, node) {
|
|
559
|
+
super(node);
|
|
560
|
+
this.tabIndex = void 0;
|
|
561
|
+
this.tabIndex = tabIndex;
|
|
562
|
+
}
|
|
563
|
+
ensureChildVisible(childIndex) {
|
|
564
|
+
this.tabIndex.value = childIndex;
|
|
565
|
+
super.ensureChildVisible(childIndex);
|
|
705
566
|
}
|
|
706
567
|
}
|
|
707
568
|
|
|
708
569
|
function createGridRenderer(options) {
|
|
709
|
-
return createGroupRenderer((props, formRenderer) => /*#__PURE__*/jsx(
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
}),
|
|
714
|
-
render: renderGrid,
|
|
715
|
-
parent: props,
|
|
716
|
-
dataContext: props.dataContext,
|
|
717
|
-
parentFormNode: props.formNode
|
|
570
|
+
return createGroupRenderer((props, formRenderer) => /*#__PURE__*/jsx(GridRenderer, {
|
|
571
|
+
groupProps: props,
|
|
572
|
+
formRenderer: formRenderer,
|
|
573
|
+
options: options
|
|
718
574
|
}), {
|
|
719
575
|
renderType: GroupRenderType.Grid
|
|
720
576
|
});
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
577
|
+
}
|
|
578
|
+
function GridRenderer(props) {
|
|
579
|
+
var _effect = useComponentTracking();
|
|
580
|
+
try {
|
|
581
|
+
var _props$options, _ref, _gridOptions$columns;
|
|
582
|
+
const {
|
|
583
|
+
formNode,
|
|
584
|
+
renderOptions,
|
|
585
|
+
renderChild,
|
|
586
|
+
className
|
|
587
|
+
} = props.groupProps;
|
|
588
|
+
const filteredChildren = formNode.children.filter((x, i) => x.visible);
|
|
724
589
|
const {
|
|
725
590
|
Div
|
|
726
591
|
} = props.formRenderer.html;
|
|
727
|
-
const defaults = (_props$
|
|
728
|
-
const gridOptions =
|
|
592
|
+
const defaults = (_props$options = props.options) != null ? _props$options : {};
|
|
593
|
+
const gridOptions = renderOptions;
|
|
729
594
|
const numColumns = (_ref = (_gridOptions$columns = gridOptions.columns) != null ? _gridOptions$columns : defaults.defaultColumns) != null ? _ref : 2;
|
|
730
|
-
const allChildren = filteredChildren.map(
|
|
595
|
+
const allChildren = filteredChildren.map(x => renderChild(x));
|
|
596
|
+
const cellClass = gridOptions.cellClass ? getCellClassNames(gridOptions.cellClass) : getCellClassNames(defaults.cellClass);
|
|
731
597
|
// split into numColumns items wrapped a div each
|
|
732
598
|
const rows = [];
|
|
733
599
|
for (let i = 0; i < allChildren.length; i += numColumns) {
|
|
734
600
|
rows.push(allChildren.slice(i, i + numColumns));
|
|
735
601
|
}
|
|
736
602
|
return /*#__PURE__*/jsx(Div, {
|
|
737
|
-
className: rendererClass(
|
|
603
|
+
className: rendererClass(className, defaults.className),
|
|
738
604
|
children: rows.map((row, rowIndex) => /*#__PURE__*/jsx(Div, {
|
|
739
605
|
className: rendererClass(gridOptions.rowClass, defaults.rowClass),
|
|
740
|
-
children: row
|
|
606
|
+
children: row.map((cell, cellIndex) => {
|
|
607
|
+
var _cellClass$at;
|
|
608
|
+
return /*#__PURE__*/jsx(Div, {
|
|
609
|
+
className: (_cellClass$at = cellClass == null ? void 0 : cellClass.at(cellIndex)) != null ? _cellClass$at : "flex-1",
|
|
610
|
+
children: cell
|
|
611
|
+
}, cellIndex);
|
|
612
|
+
})
|
|
741
613
|
}, rowIndex))
|
|
742
614
|
});
|
|
615
|
+
} finally {
|
|
616
|
+
_effect();
|
|
743
617
|
}
|
|
744
618
|
}
|
|
619
|
+
function getCellClassNames(cellClass) {
|
|
620
|
+
return cellClass == null ? void 0 : cellClass.split(",");
|
|
621
|
+
}
|
|
745
622
|
|
|
746
|
-
const defaultOptions = {
|
|
623
|
+
const defaultOptions$1 = {
|
|
747
624
|
classes: {
|
|
748
625
|
className: undefined,
|
|
749
626
|
contentClass: "min-h-96 overflow-auto",
|
|
@@ -779,120 +656,123 @@ function defaultNavigationRender({
|
|
|
779
656
|
}
|
|
780
657
|
}
|
|
781
658
|
function createWizardRenderer(options) {
|
|
782
|
-
return createGroupRenderer((props, formRenderer) => /*#__PURE__*/jsx(
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}),
|
|
787
|
-
render: renderWizard,
|
|
788
|
-
parent: props,
|
|
789
|
-
dataContext: props.dataContext,
|
|
790
|
-
parentFormNode: props.formNode
|
|
659
|
+
return createGroupRenderer((props, formRenderer) => /*#__PURE__*/jsx(WizardRenderer, {
|
|
660
|
+
groupProps: props,
|
|
661
|
+
formRenderer: formRenderer,
|
|
662
|
+
options: options
|
|
791
663
|
}), {
|
|
792
664
|
renderType: GroupRenderType.Wizard
|
|
793
665
|
});
|
|
794
666
|
}
|
|
795
|
-
function
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
icon: nextIcon,
|
|
828
|
-
iconPlacement: IconPlacement.AfterText
|
|
829
|
-
});
|
|
830
|
-
const prev = createAction("nav", () => nav(-1, prevValidate), prevText, {
|
|
831
|
-
disabled: !props.designMode && nextVisibleInDirection(-1) == null,
|
|
832
|
-
icon: prevIcon
|
|
833
|
-
});
|
|
834
|
-
const navElement = renderNavigation({
|
|
835
|
-
formRenderer: props.formRenderer,
|
|
836
|
-
page: countVisibleUntil(currentPage),
|
|
837
|
-
totalPages: countVisibleUntil(children.length),
|
|
838
|
-
prev,
|
|
839
|
-
next: next,
|
|
840
|
-
className: navContainerClass,
|
|
841
|
-
validatePage: async () => validatePage()
|
|
842
|
-
});
|
|
843
|
-
const content = props.designMode ? /*#__PURE__*/jsx(Div, {
|
|
844
|
-
children: children.map((child, i) => props.renderChild(i, child))
|
|
845
|
-
}) : currentPage < children.length ? /*#__PURE__*/jsx(Div, {
|
|
846
|
-
className: contentClass,
|
|
847
|
-
children: props.renderChild(currentPage, children[currentPage])
|
|
848
|
-
}) : /*#__PURE__*/jsx(Fragment$1, {});
|
|
849
|
-
return /*#__PURE__*/jsxs(Div, {
|
|
850
|
-
className: rendererClass(props.className, className),
|
|
851
|
-
children: [content, navElement]
|
|
852
|
-
});
|
|
853
|
-
function countVisibleUntil(untilPage) {
|
|
854
|
-
let count = 0;
|
|
855
|
-
for (let i = 0; i < untilPage && i < allVisible.length; i++) {
|
|
856
|
-
if (allVisible[i]) {
|
|
857
|
-
count++;
|
|
667
|
+
function WizardRenderer({
|
|
668
|
+
groupProps: props,
|
|
669
|
+
formRenderer,
|
|
670
|
+
options
|
|
671
|
+
}) {
|
|
672
|
+
var _effect = useComponentTracking();
|
|
673
|
+
try {
|
|
674
|
+
const mergedOptions = deepMerge(options != null ? options : {}, defaultOptions$1);
|
|
675
|
+
const {
|
|
676
|
+
classes: {
|
|
677
|
+
className,
|
|
678
|
+
contentClass,
|
|
679
|
+
navContainerClass
|
|
680
|
+
},
|
|
681
|
+
actions: {
|
|
682
|
+
nextText,
|
|
683
|
+
nextIcon,
|
|
684
|
+
prevText,
|
|
685
|
+
prevIcon,
|
|
686
|
+
nextValidate,
|
|
687
|
+
prevValidate
|
|
688
|
+
},
|
|
689
|
+
renderNavigation
|
|
690
|
+
} = mergedOptions;
|
|
691
|
+
const {
|
|
692
|
+
formNode,
|
|
693
|
+
designMode,
|
|
694
|
+
renderChild
|
|
695
|
+
} = props;
|
|
696
|
+
const {
|
|
697
|
+
html: {
|
|
698
|
+
Div
|
|
858
699
|
}
|
|
700
|
+
} = formRenderer;
|
|
701
|
+
const childrenLength = formNode.getChildCount();
|
|
702
|
+
const page = useControl(0);
|
|
703
|
+
const currentPage = page.value;
|
|
704
|
+
const isValid = useComputed(() => isPageValid());
|
|
705
|
+
const next = createAction("nav", () => nav(1, nextValidate), nextText, {
|
|
706
|
+
hidden: !designMode && nextVisibleInDirection(1) == null,
|
|
707
|
+
disabled: !isValid.value,
|
|
708
|
+
icon: nextIcon,
|
|
709
|
+
iconPlacement: IconPlacement.AfterText
|
|
710
|
+
});
|
|
711
|
+
const prev = createAction("nav", () => nav(-1, prevValidate), prevText, {
|
|
712
|
+
disabled: !designMode && nextVisibleInDirection(-1) == null,
|
|
713
|
+
icon: prevIcon
|
|
714
|
+
});
|
|
715
|
+
const navElement = renderNavigation({
|
|
716
|
+
formRenderer,
|
|
717
|
+
page: countVisibleUntil(currentPage),
|
|
718
|
+
totalPages: countVisibleUntil(childrenLength),
|
|
719
|
+
prev,
|
|
720
|
+
next: next,
|
|
721
|
+
className: navContainerClass,
|
|
722
|
+
validatePage: async () => validatePage()
|
|
723
|
+
});
|
|
724
|
+
const content = designMode ? /*#__PURE__*/jsx(Div, {
|
|
725
|
+
children: formNode.children.map(child => renderChild(child))
|
|
726
|
+
}) : currentPage < childrenLength ? /*#__PURE__*/jsx(Div, {
|
|
727
|
+
className: contentClass,
|
|
728
|
+
children: renderChild(formNode.getChild(currentPage))
|
|
729
|
+
}) : /*#__PURE__*/jsx(Fragment$1, {});
|
|
730
|
+
return /*#__PURE__*/jsxs(Div, {
|
|
731
|
+
className: rendererClass(props.className, className),
|
|
732
|
+
children: [content, navElement]
|
|
733
|
+
});
|
|
734
|
+
function countVisibleUntil(untilPage) {
|
|
735
|
+
let count = 0;
|
|
736
|
+
for (let i = 0; i < untilPage && i < childrenLength; i++) {
|
|
737
|
+
if (formNode.getChild(i).visible) {
|
|
738
|
+
count++;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return count;
|
|
859
742
|
}
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
743
|
+
function nav(dir, validate) {
|
|
744
|
+
if (validate && !validatePage()) {
|
|
745
|
+
return;
|
|
746
|
+
}
|
|
747
|
+
const next = nextVisibleInDirection(dir);
|
|
748
|
+
if (next != null) {
|
|
749
|
+
page.value = next;
|
|
750
|
+
}
|
|
865
751
|
}
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
752
|
+
function nextVisibleInDirection(dir) {
|
|
753
|
+
let next = currentPage + dir;
|
|
754
|
+
while (next >= 0 && next < childrenLength) {
|
|
755
|
+
if (formNode.getChild(next).visible) {
|
|
756
|
+
return next;
|
|
757
|
+
}
|
|
758
|
+
next += dir;
|
|
759
|
+
}
|
|
760
|
+
return null;
|
|
869
761
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
return
|
|
762
|
+
function validatePage() {
|
|
763
|
+
const pageNode = formNode.getChild(currentPage);
|
|
764
|
+
if (pageNode) {
|
|
765
|
+
const valid = pageNode.validate();
|
|
766
|
+
pageNode.setTouched(true);
|
|
767
|
+
return valid;
|
|
876
768
|
}
|
|
877
|
-
|
|
769
|
+
return false;
|
|
878
770
|
}
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
visitFormDataInContext(props.dataContext.parentNode, pageNode, validationVisitor(() => {
|
|
885
|
-
hasErrors = true;
|
|
886
|
-
}));
|
|
887
|
-
return !hasErrors;
|
|
888
|
-
}
|
|
889
|
-
function isPageValid() {
|
|
890
|
-
const pageNode = children[currentPage];
|
|
891
|
-
let hasErrors = false;
|
|
892
|
-
visitFormDataInContext(props.dataContext.parentNode, pageNode, c => {
|
|
893
|
-
if (!c.control.valid) hasErrors = true;
|
|
894
|
-
});
|
|
895
|
-
return !hasErrors;
|
|
771
|
+
function isPageValid() {
|
|
772
|
+
return formNode.getChild(currentPage).valid;
|
|
773
|
+
}
|
|
774
|
+
} finally {
|
|
775
|
+
_effect();
|
|
896
776
|
}
|
|
897
777
|
}
|
|
898
778
|
|
|
@@ -938,17 +818,18 @@ function DefaultDialogRenderer({
|
|
|
938
818
|
return () => overlayState.open();
|
|
939
819
|
}
|
|
940
820
|
};
|
|
941
|
-
const
|
|
821
|
+
const allChildren = props.formNode.children;
|
|
822
|
+
const triggerChildren = allChildren.filter(x => x.definition.placement === "trigger");
|
|
942
823
|
const dialogContent = /*#__PURE__*/jsx(Dialog, {
|
|
943
824
|
title: renderOptions.title,
|
|
944
825
|
titleClass: titleClass,
|
|
945
826
|
className: rendererClass(props.className, className),
|
|
946
|
-
children:
|
|
827
|
+
children: allChildren.filter(x => !x.definition.placement || x.definition.placement === "dialog").map((x, i) => props.renderChild(x, {
|
|
947
828
|
actionOnClick
|
|
948
829
|
}))
|
|
949
830
|
});
|
|
950
831
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
951
|
-
children: [triggerChildren.map((x, i) => props.renderChild(
|
|
832
|
+
children: [triggerChildren.map((x, i) => props.renderChild(x, {
|
|
952
833
|
actionOnClick
|
|
953
834
|
})), props.designMode ? designContent() : open.value && /*#__PURE__*/jsx(Modal, {
|
|
954
835
|
state: overlayState,
|
|
@@ -972,11 +853,140 @@ function DefaultDialogRenderer({
|
|
|
972
853
|
}
|
|
973
854
|
}
|
|
974
855
|
|
|
975
|
-
function
|
|
856
|
+
function DefaultAccordion({
|
|
857
|
+
openCtrl,
|
|
858
|
+
children,
|
|
859
|
+
contentStyle,
|
|
860
|
+
className,
|
|
861
|
+
contentClassName,
|
|
862
|
+
designMode,
|
|
863
|
+
renderers,
|
|
864
|
+
dataContext,
|
|
865
|
+
title,
|
|
866
|
+
options,
|
|
867
|
+
defaultExpanded,
|
|
868
|
+
isGroup,
|
|
869
|
+
titleTextClass
|
|
870
|
+
}) {
|
|
871
|
+
var _effect = useComponentTracking();
|
|
872
|
+
try {
|
|
873
|
+
var _dataContext$dataNode;
|
|
874
|
+
const {
|
|
875
|
+
iconOpen,
|
|
876
|
+
iconClosed,
|
|
877
|
+
togglerClass,
|
|
878
|
+
renderTitle = t => t,
|
|
879
|
+
renderToggler,
|
|
880
|
+
useCss
|
|
881
|
+
} = options != null ? options : {};
|
|
882
|
+
const panelId = useId();
|
|
883
|
+
const {
|
|
884
|
+
Button,
|
|
885
|
+
I,
|
|
886
|
+
Div,
|
|
887
|
+
Label
|
|
888
|
+
} = renderers.html;
|
|
889
|
+
const dataControl = ((_dataContext$dataNode = dataContext.dataNode) != null ? _dataContext$dataNode : dataContext.parentNode).control;
|
|
890
|
+
const open = useControl(!!defaultExpanded, {
|
|
891
|
+
use: openCtrl
|
|
892
|
+
});
|
|
893
|
+
if (dataControl && !dataControl.meta.accordionState) {
|
|
894
|
+
dataControl.meta.accordionState = open;
|
|
895
|
+
}
|
|
896
|
+
const isOpen = open.value;
|
|
897
|
+
const fullContentStyle = isOpen || designMode ? contentStyle : _extends({}, contentStyle, {
|
|
898
|
+
display: "none"
|
|
899
|
+
});
|
|
900
|
+
const currentIcon = isOpen ? iconOpen : iconClosed;
|
|
901
|
+
const accordionClassName = rendererClass(className, options == null ? void 0 : options.className);
|
|
902
|
+
const accordionTitleTextClass = rendererClass(titleTextClass, options == null ? void 0 : options.titleTextClass);
|
|
903
|
+
const accordionTitle = isGroup ? title : /*#__PURE__*/jsx(Label, {
|
|
904
|
+
textClass: accordionTitleTextClass,
|
|
905
|
+
children: title
|
|
906
|
+
});
|
|
907
|
+
const toggler = renderToggler ? renderToggler(open, renderTitle(title, open)) : /*#__PURE__*/jsxs(Button, {
|
|
908
|
+
className: accordionClassName,
|
|
909
|
+
notWrapInText: true,
|
|
910
|
+
onClick: () => open.setValue(x => !x),
|
|
911
|
+
"aria-expanded": isOpen,
|
|
912
|
+
"aria-controls": panelId,
|
|
913
|
+
children: [accordionTitle, currentIcon && /*#__PURE__*/jsx(I, {
|
|
914
|
+
className: togglerClass,
|
|
915
|
+
iconLibrary: currentIcon.library,
|
|
916
|
+
iconName: currentIcon.name
|
|
917
|
+
})]
|
|
918
|
+
});
|
|
919
|
+
// The content class name not currently used since if the content is wrapped in a group, the group will handle the styling
|
|
920
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
921
|
+
children: [toggler, (useCss || isOpen || designMode) && /*#__PURE__*/jsx(Div, {
|
|
922
|
+
id: panelId,
|
|
923
|
+
role: "region",
|
|
924
|
+
style: fullContentStyle,
|
|
925
|
+
className: contentClassName,
|
|
926
|
+
children: children
|
|
927
|
+
})]
|
|
928
|
+
});
|
|
929
|
+
} finally {
|
|
930
|
+
_effect();
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
function getAccordionState(c) {
|
|
934
|
+
return c.meta.accordionState;
|
|
935
|
+
}
|
|
936
|
+
function createAccordionGroupRenderer(options) {
|
|
937
|
+
return createGroupRenderer((p, renderer) => /*#__PURE__*/jsx(AccordionGroupRenderer, {
|
|
938
|
+
groupProps: p,
|
|
939
|
+
renderer: renderer,
|
|
940
|
+
options: options
|
|
941
|
+
}), {
|
|
942
|
+
renderType: GroupRenderType.Accordion
|
|
943
|
+
});
|
|
944
|
+
}
|
|
945
|
+
function AccordionGroupRenderer({
|
|
946
|
+
groupProps,
|
|
947
|
+
renderer,
|
|
948
|
+
options
|
|
949
|
+
}) {
|
|
950
|
+
var _effect2 = useComponentTracking();
|
|
951
|
+
try {
|
|
952
|
+
const allChildren = groupProps.formNode.children;
|
|
953
|
+
const titleChildren = allChildren.filter(x => x.definition.placement === "title");
|
|
954
|
+
const contentChildren = allChildren.filter(x => x.definition.placement !== "title");
|
|
955
|
+
const {
|
|
956
|
+
expandStateField,
|
|
957
|
+
defaultExpanded
|
|
958
|
+
} = groupProps.renderOptions;
|
|
959
|
+
const expandStateFieldNode = expandStateField ? schemaDataForFieldRef(expandStateField, groupProps.dataContext.parentNode) : null;
|
|
960
|
+
const open = expandStateFieldNode == null ? void 0 : expandStateFieldNode.control.as();
|
|
961
|
+
return /*#__PURE__*/jsx(DefaultAccordion, {
|
|
962
|
+
openCtrl: open,
|
|
963
|
+
isGroup: true,
|
|
964
|
+
options: options,
|
|
965
|
+
children: /*#__PURE__*/jsx(Fragment, {
|
|
966
|
+
children: contentChildren.map(x => groupProps.renderChild(x))
|
|
967
|
+
}),
|
|
968
|
+
title: /*#__PURE__*/jsx(Fragment, {
|
|
969
|
+
children: titleChildren.map(x => groupProps.renderChild(x))
|
|
970
|
+
}),
|
|
971
|
+
renderers: renderer,
|
|
972
|
+
className: groupProps.className,
|
|
973
|
+
dataContext: groupProps.dataContext,
|
|
974
|
+
designMode: groupProps.designMode,
|
|
975
|
+
defaultExpanded: defaultExpanded,
|
|
976
|
+
contentStyle: groupProps.style
|
|
977
|
+
});
|
|
978
|
+
} finally {
|
|
979
|
+
_effect2();
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
function createDefaultGroupRenderer(options, adornmentOptions) {
|
|
984
|
+
var _options$accordion;
|
|
976
985
|
const gridRenderer = createGridRenderer(options == null ? void 0 : options.grid);
|
|
977
986
|
const tabsRenderer = createTabsRenderer(options == null ? void 0 : options.tabs);
|
|
978
987
|
const wizardRenderer = createWizardRenderer(options == null ? void 0 : options.wizard);
|
|
979
988
|
const dialogRenderer = createDialogRenderer(options == null ? void 0 : options.dialog);
|
|
989
|
+
const accordionRenderer = createAccordionGroupRenderer((_options$accordion = options == null ? void 0 : options.accordion) != null ? _options$accordion : adornmentOptions == null ? void 0 : adornmentOptions.accordion);
|
|
980
990
|
const {
|
|
981
991
|
className,
|
|
982
992
|
standardClassName,
|
|
@@ -1004,10 +1014,14 @@ function createDefaultGroupRenderer(options) {
|
|
|
1004
1014
|
if (isGridRenderer(renderOptions)) return gridRenderer.render(props, renderer);
|
|
1005
1015
|
if (isWizardRenderer(renderOptions)) return wizardRenderer.render(props, renderer);
|
|
1006
1016
|
if (isDialogRenderer(renderOptions)) return dialogRenderer.render(props, renderer);
|
|
1017
|
+
if (isAccordionRenderer(renderOptions)) return accordionRenderer.render(props, renderer);
|
|
1007
1018
|
if (isSelectChildRenderer(renderOptions) && !props.designMode) {
|
|
1008
|
-
return /*#__PURE__*/jsx(SelectChildGroupRenderer,
|
|
1009
|
-
|
|
1010
|
-
|
|
1019
|
+
return /*#__PURE__*/jsx(SelectChildGroupRenderer, {
|
|
1020
|
+
props: _extends({}, props, {
|
|
1021
|
+
renderOptions
|
|
1022
|
+
}),
|
|
1023
|
+
renderer: renderer
|
|
1024
|
+
});
|
|
1011
1025
|
}
|
|
1012
1026
|
const {
|
|
1013
1027
|
style,
|
|
@@ -1021,7 +1035,7 @@ function createDefaultGroupRenderer(options) {
|
|
|
1021
1035
|
Div
|
|
1022
1036
|
} = renderer.html;
|
|
1023
1037
|
const inline = renderOptions.type == GroupRenderType.Inline;
|
|
1024
|
-
const children = formNode.
|
|
1038
|
+
const children = formNode.children.map((c, i) => renderChild(c, {
|
|
1025
1039
|
inline
|
|
1026
1040
|
}));
|
|
1027
1041
|
return /*#__PURE__*/jsx(Div, {
|
|
@@ -1038,7 +1052,7 @@ function createDefaultGroupRenderer(options) {
|
|
|
1038
1052
|
formNode,
|
|
1039
1053
|
renderChild
|
|
1040
1054
|
} = props;
|
|
1041
|
-
const children = formNode.
|
|
1055
|
+
const children = formNode.children.map(c => renderChild(c));
|
|
1042
1056
|
return layout => {
|
|
1043
1057
|
return _extends({}, layout, {
|
|
1044
1058
|
inline: true,
|
|
@@ -1053,18 +1067,24 @@ function createDefaultGroupRenderer(options) {
|
|
|
1053
1067
|
render: renderLayout
|
|
1054
1068
|
};
|
|
1055
1069
|
}
|
|
1056
|
-
function SelectChildGroupRenderer(
|
|
1070
|
+
function SelectChildGroupRenderer({
|
|
1071
|
+
props,
|
|
1072
|
+
renderer
|
|
1073
|
+
}) {
|
|
1057
1074
|
var _effect = useComponentTracking();
|
|
1058
1075
|
try {
|
|
1076
|
+
const {
|
|
1077
|
+
Div
|
|
1078
|
+
} = renderer.html;
|
|
1059
1079
|
const {
|
|
1060
1080
|
runExpression,
|
|
1061
1081
|
renderOptions
|
|
1062
1082
|
} = props;
|
|
1063
1083
|
const ctrl = useExpression(undefined, runExpression, renderOptions == null ? void 0 : renderOptions.childIndexExpression, x => typeof x == "string" ? parseInt(x) : x);
|
|
1064
1084
|
const childIndex = ctrl == null ? void 0 : ctrl.value;
|
|
1065
|
-
const
|
|
1066
|
-
return /*#__PURE__*/jsx(
|
|
1067
|
-
children: typeof childIndex === "number" && childIndex <
|
|
1085
|
+
const childCount = props.formNode.getChildCount();
|
|
1086
|
+
return /*#__PURE__*/jsx(Div, {
|
|
1087
|
+
children: typeof childIndex === "number" && childIndex < childCount && childIndex >= 0 && props.renderChild(props.formNode.getChild(childIndex))
|
|
1068
1088
|
});
|
|
1069
1089
|
} finally {
|
|
1070
1090
|
_effect();
|
|
@@ -1135,13 +1155,12 @@ function JsonataRenderer({
|
|
|
1135
1155
|
}) {
|
|
1136
1156
|
var _effect = useComponentTracking();
|
|
1137
1157
|
try {
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1140
|
-
value: control.value,
|
|
1158
|
+
const bindings = changes => ({
|
|
1159
|
+
value: trackedValue(control, changes),
|
|
1141
1160
|
readonly,
|
|
1142
1161
|
disabled: control.disabled,
|
|
1143
1162
|
dataPath: getJsonPath(dataNode)
|
|
1144
|
-
})
|
|
1163
|
+
});
|
|
1145
1164
|
const rendered = useExpression("", runExpression, {
|
|
1146
1165
|
type: ExpressionType.Jsonata,
|
|
1147
1166
|
expression: renderOptions.expression
|
|
@@ -1217,8 +1236,7 @@ function DataArrayRenderer({
|
|
|
1217
1236
|
className,
|
|
1218
1237
|
style,
|
|
1219
1238
|
dataContext,
|
|
1220
|
-
formNode
|
|
1221
|
-
getChildState
|
|
1239
|
+
formNode
|
|
1222
1240
|
} = dataProps;
|
|
1223
1241
|
const {
|
|
1224
1242
|
addText,
|
|
@@ -1226,29 +1244,10 @@ function DataArrayRenderer({
|
|
|
1226
1244
|
noRemove,
|
|
1227
1245
|
noReorder,
|
|
1228
1246
|
removeText,
|
|
1229
|
-
editExternal
|
|
1247
|
+
editExternal,
|
|
1248
|
+
childOverrideClass
|
|
1230
1249
|
} = mergeObjects(isArrayRenderer(renderOptions) ? renderOptions : {}, defaultActions);
|
|
1231
|
-
const
|
|
1232
|
-
const renderAsElement = !isCompoundField(field);
|
|
1233
|
-
const defaultChildDef = {
|
|
1234
|
-
type: ControlDefinitionType.Data,
|
|
1235
|
-
field: ".",
|
|
1236
|
-
renderOptions: {
|
|
1237
|
-
type: DataRenderType.Standard
|
|
1238
|
-
},
|
|
1239
|
-
hideTitle: true
|
|
1240
|
-
};
|
|
1241
|
-
const childDef = {
|
|
1242
|
-
type: ControlDefinitionType.Group,
|
|
1243
|
-
groupOptions: {
|
|
1244
|
-
type: GroupRenderType.Standard,
|
|
1245
|
-
hideTitle: true
|
|
1246
|
-
},
|
|
1247
|
-
children: renderAsElement && childDefs.length == 0 ? [defaultChildDef] : childDefs
|
|
1248
|
-
};
|
|
1249
|
-
const childNode = formNode.createChildNode("child", childDef);
|
|
1250
|
-
const childNodes = childNode.getChildNodes();
|
|
1251
|
-
const arrayProps = _extends({}, createArrayActions(control.as(), field, {
|
|
1250
|
+
const arrayProps = _extends({}, createArrayActions(control.as(), () => formNode.getChildCount(), field, {
|
|
1252
1251
|
addText,
|
|
1253
1252
|
removeText,
|
|
1254
1253
|
noAdd,
|
|
@@ -1258,46 +1257,20 @@ function DataArrayRenderer({
|
|
|
1258
1257
|
designMode,
|
|
1259
1258
|
editExternal
|
|
1260
1259
|
}), {
|
|
1260
|
+
childOverrideClass,
|
|
1261
1261
|
required,
|
|
1262
|
-
renderElement: (i, wrap) =>
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
wrap: wrap,
|
|
1267
|
-
isChildHidden: dataNode => childNodes.every(x => getChildState(x, dataNode).hidden)
|
|
1268
|
-
}),
|
|
1262
|
+
renderElement: (i, wrap) => {
|
|
1263
|
+
const n = formNode.getChild(i);
|
|
1264
|
+
return !n || !n.visible ? undefined : wrap(n.childKey, renderChild(n));
|
|
1265
|
+
},
|
|
1269
1266
|
className: className ? className : undefined,
|
|
1270
1267
|
style
|
|
1271
1268
|
}, getLengthRestrictions(definition));
|
|
1272
1269
|
return renderers.renderArray(arrayProps);
|
|
1273
|
-
function renderChildElement(i, elementNode) {
|
|
1274
|
-
return renderChild(elementNode.control.uniqueId, childNode, {
|
|
1275
|
-
parentDataNode: elementNode
|
|
1276
|
-
});
|
|
1277
|
-
}
|
|
1278
1270
|
} finally {
|
|
1279
1271
|
_effect();
|
|
1280
1272
|
}
|
|
1281
1273
|
}
|
|
1282
|
-
/**
|
|
1283
|
-
* @trackControls
|
|
1284
|
-
*/
|
|
1285
|
-
function RenderEntry({
|
|
1286
|
-
index: i,
|
|
1287
|
-
renderChildElement,
|
|
1288
|
-
wrap,
|
|
1289
|
-
isChildHidden,
|
|
1290
|
-
dataContext
|
|
1291
|
-
}) {
|
|
1292
|
-
var _effect2 = useComponentTracking();
|
|
1293
|
-
try {
|
|
1294
|
-
const elementNode = dataContext.dataNode.getChildElement(i);
|
|
1295
|
-
if (isChildHidden(elementNode)) return undefined;
|
|
1296
|
-
return wrap(renderChildElement(i, elementNode));
|
|
1297
|
-
} finally {
|
|
1298
|
-
_effect2();
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
1274
|
function createDefaultArrayRenderer(options) {
|
|
1302
1275
|
return {
|
|
1303
1276
|
render: (props, {
|
|
@@ -1311,7 +1284,7 @@ function createDefaultArrayRenderer(options) {
|
|
|
1311
1284
|
};
|
|
1312
1285
|
}
|
|
1313
1286
|
function DefaultArrayRenderer(props) {
|
|
1314
|
-
var
|
|
1287
|
+
var _effect2 = useComponentTracking();
|
|
1315
1288
|
try {
|
|
1316
1289
|
const {
|
|
1317
1290
|
renderElement,
|
|
@@ -1319,9 +1292,10 @@ function DefaultArrayRenderer(props) {
|
|
|
1319
1292
|
removableClass,
|
|
1320
1293
|
childClass,
|
|
1321
1294
|
removableChildClass,
|
|
1295
|
+
childOverrideClass,
|
|
1322
1296
|
removeActionClass,
|
|
1323
1297
|
addActionClass,
|
|
1324
|
-
|
|
1298
|
+
getElementCount,
|
|
1325
1299
|
renderAction,
|
|
1326
1300
|
style,
|
|
1327
1301
|
editAction,
|
|
@@ -1337,28 +1311,29 @@ function DefaultArrayRenderer(props) {
|
|
|
1337
1311
|
style: style,
|
|
1338
1312
|
children: [/*#__PURE__*/jsx(Div, {
|
|
1339
1313
|
className: clsx(className, removeAction && removableClass),
|
|
1340
|
-
children:
|
|
1341
|
-
|
|
1342
|
-
|
|
1314
|
+
children: Array.from({
|
|
1315
|
+
length: getElementCount()
|
|
1316
|
+
}, (_, x) => /*#__PURE__*/jsx(RenderControl, {
|
|
1317
|
+
render: () => renderElement(x, (key, children) => removeAction || editAction ? /*#__PURE__*/jsxs(Fragment$1, {
|
|
1343
1318
|
children: [/*#__PURE__*/jsx(Div, {
|
|
1344
|
-
className: clsx(childClass, removableChildClass),
|
|
1319
|
+
className: clsx(rendererClass(childOverrideClass, childClass), removableChildClass),
|
|
1345
1320
|
children: children
|
|
1346
1321
|
}), /*#__PURE__*/jsxs(Div, {
|
|
1347
1322
|
className: removeActionClass,
|
|
1348
1323
|
children: [editAction && renderAction(editAction(x)), removeAction && renderAction(removeAction(x))]
|
|
1349
1324
|
})]
|
|
1350
|
-
}) : /*#__PURE__*/jsx(Div, {
|
|
1351
|
-
className: childClass,
|
|
1325
|
+
}, key) : /*#__PURE__*/jsx(Div, {
|
|
1326
|
+
className: rendererClass(childOverrideClass, childClass),
|
|
1352
1327
|
children: children
|
|
1353
|
-
}))
|
|
1354
|
-
})
|
|
1328
|
+
}, key))
|
|
1329
|
+
}, x))
|
|
1355
1330
|
}), addAction && /*#__PURE__*/jsx(Div, {
|
|
1356
1331
|
className: addActionClass,
|
|
1357
1332
|
children: renderAction(addAction)
|
|
1358
1333
|
})]
|
|
1359
1334
|
});
|
|
1360
1335
|
} finally {
|
|
1361
|
-
|
|
1336
|
+
_effect2();
|
|
1362
1337
|
}
|
|
1363
1338
|
}
|
|
1364
1339
|
|
|
@@ -1672,12 +1647,16 @@ function ValueForField({
|
|
|
1672
1647
|
hideTitle: true
|
|
1673
1648
|
});
|
|
1674
1649
|
const rootSchema = createSchemaTree([adjustedField]).rootNode;
|
|
1675
|
-
return [control, rootSchema];
|
|
1650
|
+
return [createFormTree([control]), rootSchema];
|
|
1676
1651
|
}, [schemaField]);
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1652
|
+
return /*#__PURE__*/jsx(RenderForm, {
|
|
1653
|
+
form: controls.rootNode,
|
|
1654
|
+
renderer: renderer,
|
|
1655
|
+
data: createSchemaDataNode(rootSchema, value),
|
|
1656
|
+
options: {
|
|
1657
|
+
disabled: control.disabled
|
|
1658
|
+
}
|
|
1659
|
+
});
|
|
1681
1660
|
} finally {
|
|
1682
1661
|
_effect();
|
|
1683
1662
|
}
|
|
@@ -1699,7 +1678,7 @@ function createOptionalAdornment(options = {}) {
|
|
|
1699
1678
|
return {
|
|
1700
1679
|
apply: rl => {
|
|
1701
1680
|
var _ref, _adornment$placement;
|
|
1702
|
-
if (props.
|
|
1681
|
+
if (props.formNode.readonly) return rl;
|
|
1703
1682
|
if (!options.hideEdit && adornment.editSelectable) appendMarkupAt((_ref = (_adornment$placement = adornment.placement) != null ? _adornment$placement : options.defaultPlacement) != null ? _ref : AdornmentPlacement.LabelStart, /*#__PURE__*/jsx(Fcheckbox$1, {
|
|
1704
1683
|
control: editing,
|
|
1705
1684
|
className: options.checkClass
|
|
@@ -1796,6 +1775,17 @@ function MultilineTextfield({
|
|
|
1796
1775
|
}
|
|
1797
1776
|
}
|
|
1798
1777
|
|
|
1778
|
+
// ============================================================================
|
|
1779
|
+
// ADDITIONAL CONSTANTS
|
|
1780
|
+
// ============================================================================
|
|
1781
|
+
const DefaultBoolOptions = [{
|
|
1782
|
+
name: "Yes",
|
|
1783
|
+
value: true
|
|
1784
|
+
}, {
|
|
1785
|
+
name: "No",
|
|
1786
|
+
value: false
|
|
1787
|
+
}];
|
|
1788
|
+
|
|
1799
1789
|
function createArrayElementRenderer(options = {}) {
|
|
1800
1790
|
return createDataRenderer((props, formRenderer) => /*#__PURE__*/jsx(ArrayElementRenderer, {
|
|
1801
1791
|
dataProps: props,
|
|
@@ -1829,25 +1819,21 @@ function ArrayElementRenderer({
|
|
|
1829
1819
|
});
|
|
1830
1820
|
if (designMode || extData.value !== undefined) {
|
|
1831
1821
|
const parentDataNode = makeSchemaDataNode(dataProps.dataNode.schema, extData.fields.data);
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
});
|
|
1840
|
-
const editContent = /*#__PURE__*/jsxs("div", {
|
|
1822
|
+
// TODO
|
|
1823
|
+
// const elementGroup: FormNode = formNode.createChildNode("group", {
|
|
1824
|
+
// type: ControlDefinitionType.Group,
|
|
1825
|
+
// groupOptions: { type: GroupRenderType.Standard, hideTitle: true },
|
|
1826
|
+
// children: formNode.getResolvedChildren(),
|
|
1827
|
+
// } as GroupedControlsDefinition);
|
|
1828
|
+
const editContent = /*#__PURE__*/jsx("div", {
|
|
1841
1829
|
className: rendererClass(dataProps.className, options.className),
|
|
1842
|
-
children:
|
|
1843
|
-
parentDataNode
|
|
1844
|
-
}), /*#__PURE__*/jsx("div", {
|
|
1830
|
+
children: /*#__PURE__*/jsx("div", {
|
|
1845
1831
|
className: options.actionsClass,
|
|
1846
1832
|
children: /*#__PURE__*/jsx(RenderElements, {
|
|
1847
1833
|
control: extData.fields.actions,
|
|
1848
1834
|
children: c => formRenderer.renderAction(applyValidation(c.value))
|
|
1849
1835
|
})
|
|
1850
|
-
})
|
|
1836
|
+
})
|
|
1851
1837
|
});
|
|
1852
1838
|
if (renderOptions.showInline || designMode) return editContent;
|
|
1853
1839
|
return /*#__PURE__*/jsx(Modal, {
|
|
@@ -1857,11 +1843,16 @@ function ArrayElementRenderer({
|
|
|
1857
1843
|
})
|
|
1858
1844
|
});
|
|
1859
1845
|
function runValidation(onClick) {
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1846
|
+
// TODO
|
|
1847
|
+
// let hasErrors = false;
|
|
1848
|
+
// visitFormDataInContext(
|
|
1849
|
+
// parentDataNode,
|
|
1850
|
+
// elementGroup,
|
|
1851
|
+
// validationVisitor(() => {
|
|
1852
|
+
// hasErrors = true;
|
|
1853
|
+
// }),
|
|
1854
|
+
// );
|
|
1855
|
+
// if (!hasErrors) onClick();
|
|
1865
1856
|
}
|
|
1866
1857
|
function applyValidation({
|
|
1867
1858
|
action,
|
|
@@ -1879,7 +1870,7 @@ function ArrayElementRenderer({
|
|
|
1879
1870
|
|
|
1880
1871
|
function createButtonActionRenderer(actionId, options = {}) {
|
|
1881
1872
|
return createActionRenderer(actionId, (props, renderer) => {
|
|
1882
|
-
var _props$icon, _ref, _props$iconPlacement, _options$renderConten;
|
|
1873
|
+
var _props$icon, _ref, _props$iconPlacement, _ref2, _props$iconPlacement2, _options$renderConten;
|
|
1883
1874
|
const {
|
|
1884
1875
|
key,
|
|
1885
1876
|
onClick,
|
|
@@ -1892,10 +1883,15 @@ function createButtonActionRenderer(actionId, options = {}) {
|
|
|
1892
1883
|
textClass,
|
|
1893
1884
|
actionStyle,
|
|
1894
1885
|
inline,
|
|
1895
|
-
actionContent
|
|
1886
|
+
actionContent,
|
|
1887
|
+
busy
|
|
1896
1888
|
} = props;
|
|
1897
|
-
const
|
|
1898
|
-
const
|
|
1889
|
+
const busyIcon = props.busy ? options.busyIcon : undefined;
|
|
1890
|
+
const stdIcon = (_props$icon = props.icon) != null && _props$icon.name ? props.icon : options.icon;
|
|
1891
|
+
const icon = busyIcon != null ? busyIcon : stdIcon;
|
|
1892
|
+
const stdIconPlacement = (_ref = (_props$iconPlacement = props.iconPlacement) != null ? _props$iconPlacement : options.iconPlacement) != null ? _ref : IconPlacement.BeforeText;
|
|
1893
|
+
const busyPlacement = (_ref2 = (_props$iconPlacement2 = props.iconPlacement) != null ? _props$iconPlacement2 : options.busyIconPlacement) != null ? _ref2 : IconPlacement.ReplaceText;
|
|
1894
|
+
const iconPlacement = busyIcon ? busyPlacement : stdIconPlacement;
|
|
1899
1895
|
const {
|
|
1900
1896
|
Button,
|
|
1901
1897
|
I,
|
|
@@ -1904,12 +1900,12 @@ function createButtonActionRenderer(actionId, options = {}) {
|
|
|
1904
1900
|
const isLink = actionStyle == ActionStyle.Link;
|
|
1905
1901
|
const isGroup = actionStyle == ActionStyle.Group;
|
|
1906
1902
|
const classNames = rendererClass(className, isLink ? options.linkClass : isGroup ? options.groupClass : rendererClass(options.buttonClass, actionStyle == ActionStyle.Secondary ? options.secondaryClass : options.primaryClass));
|
|
1903
|
+
const textClassNames = rendererClass(textClass, isLink ? options.linkTextClass : rendererClass(options.textClass, actionStyle == ActionStyle.Secondary ? options.secondaryTextClass : options.primaryTextClass));
|
|
1907
1904
|
const iconElement = icon && /*#__PURE__*/jsx(I, {
|
|
1908
1905
|
iconName: icon.name,
|
|
1909
1906
|
iconLibrary: icon.library,
|
|
1910
|
-
className: rendererClass(
|
|
1907
|
+
className: rendererClass(textClassNames, iconPlacement == IconPlacement.BeforeText ? options.iconBeforeClass : options.iconAfterClass)
|
|
1911
1908
|
});
|
|
1912
|
-
const textClassNames = rendererClass(textClass, isLink ? options.linkTextClass : rendererClass(options.textClass, actionStyle == ActionStyle.Secondary ? options.secondaryTextClass : options.primaryTextClass));
|
|
1913
1909
|
const textElement = actionContent != null ? actionContent : actionText && /*#__PURE__*/jsx(Span, {
|
|
1914
1910
|
className: textClassNames,
|
|
1915
1911
|
children: actionText
|
|
@@ -1925,24 +1921,188 @@ function createButtonActionRenderer(actionId, options = {}) {
|
|
|
1925
1921
|
title: iconPlacement == IconPlacement.ReplaceText ? actionText : undefined,
|
|
1926
1922
|
notWrapInText: options.notWrapInText,
|
|
1927
1923
|
androidRippleColor: options.androidRippleColor,
|
|
1928
|
-
children: (_options$renderConten = options.renderContent == null ? void 0 : options.renderContent(actionText, actionId, actionData)) != null ? _options$renderConten : /*#__PURE__*/jsxs(Fragment, {
|
|
1924
|
+
children: (_options$renderConten = options.renderContent == null ? void 0 : options.renderContent(actionText, actionId, actionData, busy)) != null ? _options$renderConten : /*#__PURE__*/jsxs(Fragment, {
|
|
1929
1925
|
children: [iconPlacement == IconPlacement.BeforeText && iconElement, iconPlacement != IconPlacement.ReplaceText && textElement, iconPlacement != IconPlacement.BeforeText && iconElement]
|
|
1930
1926
|
})
|
|
1931
1927
|
}, key);
|
|
1932
1928
|
});
|
|
1933
1929
|
}
|
|
1934
1930
|
|
|
1931
|
+
const defaultOptions = {
|
|
1932
|
+
spinnerClass: "flex justify-center my-6",
|
|
1933
|
+
className: "flex flex-row",
|
|
1934
|
+
loadingIcon: undefined,
|
|
1935
|
+
iconClass: "text-[36px]"
|
|
1936
|
+
};
|
|
1937
|
+
function createScrollListRenderer(options) {
|
|
1938
|
+
return createDataRenderer((p, renderer) => /*#__PURE__*/jsx(ScrollListRenderer, {
|
|
1939
|
+
dataProps: p,
|
|
1940
|
+
renderer: renderer,
|
|
1941
|
+
options: options
|
|
1942
|
+
}), {
|
|
1943
|
+
collection: true,
|
|
1944
|
+
renderType: DataRenderType.ScrollList
|
|
1945
|
+
});
|
|
1946
|
+
}
|
|
1947
|
+
function ScrollListRenderer({
|
|
1948
|
+
dataProps: {
|
|
1949
|
+
formNode,
|
|
1950
|
+
renderChild,
|
|
1951
|
+
dataNode,
|
|
1952
|
+
actionOnClick,
|
|
1953
|
+
renderOptions,
|
|
1954
|
+
dataContext,
|
|
1955
|
+
className
|
|
1956
|
+
},
|
|
1957
|
+
renderer,
|
|
1958
|
+
options
|
|
1959
|
+
}) {
|
|
1960
|
+
var _effect = useComponentTracking();
|
|
1961
|
+
try {
|
|
1962
|
+
const {
|
|
1963
|
+
bottomActionId
|
|
1964
|
+
} = renderOptions;
|
|
1965
|
+
const loadingControl = getLoadingControl(dataNode.control);
|
|
1966
|
+
const hasMoreControl = getHasMoreControl(dataNode.control);
|
|
1967
|
+
const handler = bottomActionId ? actionOnClick == null ? void 0 : actionOnClick(bottomActionId, undefined, dataContext) : undefined;
|
|
1968
|
+
const {
|
|
1969
|
+
I
|
|
1970
|
+
} = renderer.html;
|
|
1971
|
+
const {
|
|
1972
|
+
loadingIcon,
|
|
1973
|
+
spinnerClass,
|
|
1974
|
+
iconClass
|
|
1975
|
+
} = deepMerge(options, defaultOptions);
|
|
1976
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
1977
|
+
children: [/*#__PURE__*/jsx("div", {
|
|
1978
|
+
className: rendererClass(className, options == null ? void 0 : options.className),
|
|
1979
|
+
children: formNode.children.map(x => renderChild(x))
|
|
1980
|
+
}), (loadingIcon == null ? void 0 : loadingIcon.name) && /*#__PURE__*/jsx(RenderControl, {
|
|
1981
|
+
render: spinner
|
|
1982
|
+
}), /*#__PURE__*/jsx(ScrollTrigger, {
|
|
1983
|
+
hasMoreControl: hasMoreControl,
|
|
1984
|
+
loadingControl: loadingControl,
|
|
1985
|
+
fetchMore: () => handler == null ? void 0 : handler(NoOpControlActionContext)
|
|
1986
|
+
})]
|
|
1987
|
+
});
|
|
1988
|
+
function spinner() {
|
|
1989
|
+
return loadingControl.value && /*#__PURE__*/jsx("div", {
|
|
1990
|
+
className: spinnerClass,
|
|
1991
|
+
ref: e => e == null ? void 0 : e.scrollIntoView({
|
|
1992
|
+
behavior: "smooth"
|
|
1993
|
+
}),
|
|
1994
|
+
children: /*#__PURE__*/jsx(I, {
|
|
1995
|
+
iconName: loadingIcon.name,
|
|
1996
|
+
iconLibrary: loadingIcon.library,
|
|
1997
|
+
className: iconClass
|
|
1998
|
+
})
|
|
1999
|
+
});
|
|
2000
|
+
}
|
|
2001
|
+
} finally {
|
|
2002
|
+
_effect();
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
function ScrollTrigger({
|
|
2006
|
+
hasMoreControl,
|
|
2007
|
+
loadingControl,
|
|
2008
|
+
fetchMore
|
|
2009
|
+
}) {
|
|
2010
|
+
var _effect2 = useComponentTracking();
|
|
2011
|
+
try {
|
|
2012
|
+
const observerTarget = useRef(null);
|
|
2013
|
+
const hasMore = hasMoreControl.value;
|
|
2014
|
+
const loading = loadingControl.value;
|
|
2015
|
+
useEffect(() => {
|
|
2016
|
+
const observer = new IntersectionObserver(entries => {
|
|
2017
|
+
if (entries[0].isIntersecting && hasMore && !loading) {
|
|
2018
|
+
fetchMore();
|
|
2019
|
+
}
|
|
2020
|
+
}, {
|
|
2021
|
+
threshold: 0.5
|
|
2022
|
+
}); // Trigger when 50% of the target is visible
|
|
2023
|
+
if (observerTarget.current) {
|
|
2024
|
+
observer.observe(observerTarget.current);
|
|
2025
|
+
}
|
|
2026
|
+
return () => {
|
|
2027
|
+
if (observerTarget.current) {
|
|
2028
|
+
observer.unobserve(observerTarget.current);
|
|
2029
|
+
}
|
|
2030
|
+
};
|
|
2031
|
+
}, [hasMore, loading]); // Re-run effect if hasMore or loading state changes
|
|
2032
|
+
return /*#__PURE__*/jsx("div", {
|
|
2033
|
+
ref: observerTarget,
|
|
2034
|
+
style: {
|
|
2035
|
+
height: "1px"
|
|
2036
|
+
}
|
|
2037
|
+
});
|
|
2038
|
+
} finally {
|
|
2039
|
+
_effect2();
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
function HtmlCheckButtons(props) {
|
|
2044
|
+
var _effect = useComponentTracking();
|
|
2045
|
+
try {
|
|
2046
|
+
const {
|
|
2047
|
+
control,
|
|
2048
|
+
options,
|
|
2049
|
+
readonly,
|
|
2050
|
+
className,
|
|
2051
|
+
id,
|
|
2052
|
+
type,
|
|
2053
|
+
isChecked,
|
|
2054
|
+
setChecked,
|
|
2055
|
+
entryAdornment,
|
|
2056
|
+
classes,
|
|
2057
|
+
controlClasses = {}
|
|
2058
|
+
} = props;
|
|
2059
|
+
const {
|
|
2060
|
+
disabled
|
|
2061
|
+
} = control;
|
|
2062
|
+
const name = "r" + control.uniqueId;
|
|
2063
|
+
return /*#__PURE__*/jsx("div", {
|
|
2064
|
+
role: "group",
|
|
2065
|
+
className: className,
|
|
2066
|
+
id: id,
|
|
2067
|
+
children: /*#__PURE__*/jsx(RenderArrayElements, {
|
|
2068
|
+
array: options == null ? void 0 : options.filter(x => x.value != null),
|
|
2069
|
+
children: (o, i) => {
|
|
2070
|
+
const checked = useComputed(() => isChecked(control, o)).value;
|
|
2071
|
+
const selOrUnsel = checked ? rendererClass(controlClasses == null ? void 0 : controlClasses.selectedClass, classes.selectedClass) : rendererClass(controlClasses == null ? void 0 : controlClasses.notSelectedClass, classes.notSelectedClass);
|
|
2072
|
+
return /*#__PURE__*/jsxs("div", {
|
|
2073
|
+
className: clsx$1(rendererClass(controlClasses == null ? void 0 : controlClasses.entryWrapperClass, classes.entryWrapperClass), selOrUnsel),
|
|
2074
|
+
children: [/*#__PURE__*/jsxs("div", {
|
|
2075
|
+
className: classes.entryClass,
|
|
2076
|
+
children: [/*#__PURE__*/jsx("input", {
|
|
2077
|
+
id: name + "_" + i,
|
|
2078
|
+
className: classes.checkClass,
|
|
2079
|
+
type: type,
|
|
2080
|
+
name: name,
|
|
2081
|
+
readOnly: readonly,
|
|
2082
|
+
disabled: disabled,
|
|
2083
|
+
checked: checked,
|
|
2084
|
+
onChange: x => {
|
|
2085
|
+
!(readonly || disabled) && setChecked(control, o, x.target.checked);
|
|
2086
|
+
}
|
|
2087
|
+
}), /*#__PURE__*/jsx("label", {
|
|
2088
|
+
className: classes.labelClass,
|
|
2089
|
+
htmlFor: name + "_" + i,
|
|
2090
|
+
children: o.name
|
|
2091
|
+
})]
|
|
2092
|
+
}), entryAdornment == null ? void 0 : entryAdornment(o, i, checked)]
|
|
2093
|
+
});
|
|
2094
|
+
}
|
|
2095
|
+
})
|
|
2096
|
+
});
|
|
2097
|
+
} finally {
|
|
2098
|
+
_effect();
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
|
|
1935
2102
|
const _excluded = ["inline", "textClass", "className", "notWrapInText", "androidRippleColor", "onClick", "nonTextContent"],
|
|
1936
2103
|
_excluded2 = ["textClass", "className", "onChangeValue", "onChangeChecked", "inputRef"],
|
|
1937
2104
|
_excluded3 = ["text", "html", "children", "className", "textClass", "nativeRef", "inline"],
|
|
1938
2105
|
_excluded4 = ["textClass", "className"];
|
|
1939
|
-
const DefaultBoolOptions = [{
|
|
1940
|
-
name: "Yes",
|
|
1941
|
-
value: true
|
|
1942
|
-
}, {
|
|
1943
|
-
name: "No",
|
|
1944
|
-
value: false
|
|
1945
|
-
}];
|
|
1946
2106
|
function createDefaultDataRenderer(options = {}) {
|
|
1947
2107
|
var _options$checkboxOpti, _options$checkboxOpti2, _options$radioOptions, _options$checkListOpt;
|
|
1948
2108
|
const elementSelectedRenderer = createElementSelectedRenderer((_options$checkboxOpti = options.checkboxOptions) != null ? _options$checkboxOpti : options.checkOptions);
|
|
@@ -1967,18 +2127,19 @@ function createDefaultDataRenderer(options = {}) {
|
|
|
1967
2127
|
}, options);
|
|
1968
2128
|
const arrayRenderer = createDefaultArrayDataRenderer(options.arrayOptions);
|
|
1969
2129
|
const autocompleteRenderer = createAutocompleteRenderer(options.autocompleteOptions);
|
|
2130
|
+
const scrollListRenderer = createScrollListRenderer(options.scrollListOptions);
|
|
1970
2131
|
return createDataRenderer((props, renderers) => {
|
|
1971
2132
|
const {
|
|
1972
2133
|
field
|
|
1973
2134
|
} = props;
|
|
1974
2135
|
const fieldType = field.type;
|
|
1975
2136
|
const renderOptions = props.renderOptions;
|
|
1976
|
-
let renderType = renderOptions.type;
|
|
2137
|
+
let renderType = renderOptions.type ? renderOptions.type : DataRenderType.Standard;
|
|
1977
2138
|
if (field.collection && props.dataNode.elementIndex == null && (renderType == DataRenderType.Standard || renderType == DataRenderType.Array || renderType == DataRenderType.ArrayElement)) {
|
|
1978
2139
|
if (renderType == DataRenderType.ArrayElement) return arrayElementRenderer.render(props, renderers);
|
|
1979
2140
|
return arrayRenderer.render(props, renderers);
|
|
1980
2141
|
}
|
|
1981
|
-
if (fieldType === FieldType.Compound) {
|
|
2142
|
+
if (fieldType === FieldType.Compound && (isDataGroupRenderer(renderOptions) || renderType === DataRenderType.Standard)) {
|
|
1982
2143
|
var _ref;
|
|
1983
2144
|
const groupOptions = (_ref = isDataGroupRenderer(renderOptions) ? renderOptions.groupOptions : undefined) != null ? _ref : {
|
|
1984
2145
|
type: "Standard",
|
|
@@ -1993,7 +2154,7 @@ function createDefaultDataRenderer(options = {}) {
|
|
|
1993
2154
|
className: "@ " + rendererClass(p.className, displayOnlyClass),
|
|
1994
2155
|
children: /*#__PURE__*/jsx(DefaultDisplayOnly, {
|
|
1995
2156
|
dataNode: props.dataNode,
|
|
1996
|
-
state: props.
|
|
2157
|
+
state: props.formNode,
|
|
1997
2158
|
schemaInterface: props.dataContext.schemaInterface,
|
|
1998
2159
|
className: props.className,
|
|
1999
2160
|
textClass: props.textClass,
|
|
@@ -2018,6 +2179,8 @@ function createDefaultDataRenderer(options = {}) {
|
|
|
2018
2179
|
return nullToggler.render(props, renderers);
|
|
2019
2180
|
case DataRenderType.CheckList:
|
|
2020
2181
|
return checkListRenderer.render(props, renderers);
|
|
2182
|
+
case DataRenderType.ScrollList:
|
|
2183
|
+
return scrollListRenderer.render(props, renderers);
|
|
2021
2184
|
case DataRenderType.Dropdown:
|
|
2022
2185
|
return selectRenderer.render(props, renderers);
|
|
2023
2186
|
case DataRenderType.Radio:
|
|
@@ -2044,6 +2207,7 @@ function createDefaultDataRenderer(options = {}) {
|
|
|
2044
2207
|
textClass: rendererClass(props.textClass, inputTextClass),
|
|
2045
2208
|
style: props.style,
|
|
2046
2209
|
id: props.id,
|
|
2210
|
+
errorId: props.errorId,
|
|
2047
2211
|
readOnly: props.readonly,
|
|
2048
2212
|
control: props.control,
|
|
2049
2213
|
placeholder: placeholder != null ? placeholder : undefined,
|
|
@@ -2092,15 +2256,24 @@ function createDefaultAdornmentRenderer(options = {}) {
|
|
|
2092
2256
|
}))(rl);
|
|
2093
2257
|
}
|
|
2094
2258
|
if (isAccordionAdornment(adornment)) {
|
|
2095
|
-
return wrapLayout(x =>
|
|
2096
|
-
|
|
2097
|
-
children:
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2259
|
+
return wrapLayout(x => {
|
|
2260
|
+
var _rl$children$props;
|
|
2261
|
+
const displayProps = /*#__PURE__*/isValidElement(rl.children) ? (_rl$children$props = rl.children.props) == null ? void 0 : _rl$children$props.displayProps : undefined;
|
|
2262
|
+
return /*#__PURE__*/jsx(DefaultAccordion, {
|
|
2263
|
+
isGroup: false,
|
|
2264
|
+
renderers: renderers,
|
|
2265
|
+
children: x,
|
|
2266
|
+
className: displayProps == null ? void 0 : displayProps.className,
|
|
2267
|
+
titleTextClass: displayProps == null ? void 0 : displayProps.textClass,
|
|
2268
|
+
title: renderers.renderLabelText(adornment.title),
|
|
2269
|
+
defaultExpanded: adornment.defaultExpanded,
|
|
2270
|
+
contentStyle: rl.style,
|
|
2271
|
+
contentClassName: rl.className,
|
|
2272
|
+
designMode: designMode,
|
|
2273
|
+
dataContext: dataContext,
|
|
2274
|
+
options: options.accordion
|
|
2275
|
+
});
|
|
2276
|
+
})(rl);
|
|
2104
2277
|
}
|
|
2105
2278
|
},
|
|
2106
2279
|
priority: 0,
|
|
@@ -2171,21 +2344,23 @@ const StandardHtmlComponents = {
|
|
|
2171
2344
|
Div: DefaultHtmlDivRenderer,
|
|
2172
2345
|
H1: "h1",
|
|
2173
2346
|
B: "b",
|
|
2174
|
-
Input: DefaultHtmlInputRenderer
|
|
2347
|
+
Input: DefaultHtmlInputRenderer,
|
|
2348
|
+
CheckButtons: HtmlCheckButtons
|
|
2175
2349
|
};
|
|
2176
2350
|
function DefaultHtmlButtonRenderer(_ref2) {
|
|
2177
2351
|
var _effect = useComponentTracking();
|
|
2178
2352
|
try {
|
|
2179
2353
|
let {
|
|
2354
|
+
inline,
|
|
2180
2355
|
textClass,
|
|
2181
2356
|
className,
|
|
2182
2357
|
onClick,
|
|
2183
2358
|
nonTextContent
|
|
2184
2359
|
} = _ref2,
|
|
2185
2360
|
props = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
2186
|
-
const Comp = nonTextContent ? "div" : "button";
|
|
2361
|
+
const Comp = inline ? "span" : nonTextContent ? "div" : "button";
|
|
2187
2362
|
return /*#__PURE__*/jsx(Comp, _extends({
|
|
2188
|
-
role: nonTextContent ? "button" : undefined,
|
|
2363
|
+
role: nonTextContent || inline ? "button" : undefined,
|
|
2189
2364
|
onClick: onClick ? e => {
|
|
2190
2365
|
e.stopPropagation();
|
|
2191
2366
|
onClick();
|
|
@@ -2293,7 +2468,7 @@ function createDefaultRenderers(options = {}) {
|
|
|
2293
2468
|
display: createDefaultDisplayRenderer(options.display),
|
|
2294
2469
|
action: createButtonActionRenderer(undefined, options.action),
|
|
2295
2470
|
array: createDefaultArrayRenderer(options.array),
|
|
2296
|
-
group: createDefaultGroupRenderer(options.group),
|
|
2471
|
+
group: createDefaultGroupRenderer(options.group, options.adornment),
|
|
2297
2472
|
label: createDefaultLabelRenderer(options.label),
|
|
2298
2473
|
adornment: createDefaultAdornmentRenderer(options.adornment),
|
|
2299
2474
|
renderLayout: createDefaultLayoutRenderer(options.layout),
|
|
@@ -2346,7 +2521,8 @@ const defaultTailwindTheme = {
|
|
|
2346
2521
|
standardClassName: "flex flex-col gap-4",
|
|
2347
2522
|
grid: {
|
|
2348
2523
|
className: "flex flex-col gap-4",
|
|
2349
|
-
rowClass: "flex flex-row gap-4 justify-between
|
|
2524
|
+
rowClass: "flex flex-row gap-4 justify-between",
|
|
2525
|
+
cellClass: "flex-1"
|
|
2350
2526
|
},
|
|
2351
2527
|
flexClassName: "gap-2",
|
|
2352
2528
|
inlineClass: "",
|
|
@@ -2365,7 +2541,8 @@ const defaultTailwindTheme = {
|
|
|
2365
2541
|
primaryClass: "bg-primary-500",
|
|
2366
2542
|
secondaryClass: "bg-secondary-500",
|
|
2367
2543
|
iconBeforeClass: "px-2",
|
|
2368
|
-
iconAfterClass: "px-2"
|
|
2544
|
+
iconAfterClass: "px-2",
|
|
2545
|
+
busyIcon: fontAwesomeIcon("spinner fa-spin")
|
|
2369
2546
|
},
|
|
2370
2547
|
layout: {
|
|
2371
2548
|
className: "flex flex-col",
|
|
@@ -2391,12 +2568,15 @@ const defaultTailwindTheme = {
|
|
|
2391
2568
|
listEntryClass: "list-none p-2 rounded-lg cursor-default last-of-type:border-b-0 hover:cursor-pointer hover:bg-primary-100 aria-selected:bg-primary-200 aria-selected:text-primary-900 focused:bg-surface-100 focus-visible:bg-surface-100 focused:text-surface-900 focus-visible:text-surface-900 focus-visible:shadow-[0_0_0_3px_transparent] focus-visible:shadow-primary-200 focused:aria-selected:bg-primary-200 focus-visible:aria-selected:bg-primary-200 focused:aria-selected:text-primary-900 focus-visible:aria-selected:text-primary-900",
|
|
2392
2569
|
chipContainerClass: "flex flex-row items-center px-3 py-1 rounded-full bg-surface-100 m-1 gap-2 truncate",
|
|
2393
2570
|
chipCloseButtonClass: "fa-solid fa-xmark p-1 bg-surface-300 rounded-full min-w-[24px] flex justify-center text-surface-50 hover:bg-surface-400 hover:text-surface-100 hover:cursor-pointer"
|
|
2571
|
+
},
|
|
2572
|
+
scrollListOptions: {
|
|
2573
|
+
loadingIcon: fontAwesomeIcon("spinner fa-spin")
|
|
2394
2574
|
}
|
|
2395
2575
|
},
|
|
2396
2576
|
adornment: {
|
|
2397
2577
|
accordion: {
|
|
2398
|
-
className: "flex items-center gap-2 my-2",
|
|
2399
|
-
|
|
2578
|
+
className: "flex items-center gap-2 my-2 w-fit",
|
|
2579
|
+
titleTextClass: "cursor-pointer",
|
|
2400
2580
|
iconOpen: fontAwesomeIcon("chevron-up"),
|
|
2401
2581
|
iconClosed: fontAwesomeIcon("chevron-down")
|
|
2402
2582
|
},
|
|
@@ -2409,5 +2589,5 @@ const defaultTailwindTheme = {
|
|
|
2409
2589
|
}
|
|
2410
2590
|
};
|
|
2411
2591
|
|
|
2412
|
-
export {
|
|
2592
|
+
export { ControlInput, DataArrayRenderer, DefaultAccordion, DefaultArrayRenderer, DefaultBoolOptions, DefaultDisplay, DefaultDisplayOnly, DefaultHtmlButtonRenderer, DefaultHtmlDivRenderer, DefaultHtmlIconRenderer, DefaultHtmlInputRenderer, DefaultHtmlLabelRenderer, DefaultLayout, DefaultVisibility, Fcheckbox, JsonataRenderer, OptionalEditRenderer, SelectDataRenderer, StandardHtmlComponents, ValueForFieldExtension, createAccordionGroupRenderer, createAutocompleteRenderer, createButtonActionRenderer, createCheckListRenderer, createCheckboxRenderer, createClassStyledRenderers, createDefaultAdornmentRenderer, createDefaultArrayDataRenderer, createDefaultArrayRenderer, createDefaultDataRenderer, createDefaultDisplayRenderer, createDefaultGroupRenderer, createDefaultLabelRenderer, createDefaultLayoutRenderer, createDefaultRenderers, createDefaultVisibilityRenderer, createElementSelectedRenderer, createInputConversion, createJsonataRenderer, createNullToggleRenderer, createOptionalAdornment, createRadioRenderer, createScrollListRenderer, createSelectConversion, createSelectRenderer, createValueForFieldRenderer, createWizardRenderer, defaultTailwindTheme, getAccordionState };
|
|
2413
2593
|
//# sourceMappingURL=index.js.map
|