jsonforms-nuxt-ui-renderers 0.2.2 → 0.2.4
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/README.md +2 -2
- package/dist/index.cjs +113 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +83 -24
- package/dist/index.js.map +1 -1
- package/dist/styles.css +30 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,8 +40,8 @@ This package is intentionally small and opinionated: it ships a **single** rende
|
|
|
40
40
|
- **String**: JSON Schema `type: "string"` → `UInput`
|
|
41
41
|
- **Multiline string**: JSONForms “multiline” control (e.g. `uischema.options.multi: true`) → `UTextarea`
|
|
42
42
|
- **Password**: JSON Schema `type: "string"` + `format: "password"` → `UInput type="password"` with show/hide toggle button
|
|
43
|
-
- **Number**: JSON Schema `type: "number"` →
|
|
44
|
-
- **Integer**: JSON Schema `type: "integer"` →
|
|
43
|
+
- **Number**: JSON Schema `type: "number"` → **native** `<input type="number">` inside `UFormField` (parses to `number`, empty becomes `undefined`). Native inputs are used so each `input` event updates JsonForms core immediately; `UInput` alone could leave parent `:data` stale in some form-field setups.
|
|
44
|
+
- **Integer**: JSON Schema `type: "integer"` → **native** `<input type="number" inputmode="numeric" step="1">` (parses to `integer`, empty becomes `undefined`). Same rationale as number.
|
|
45
45
|
- **Boolean**: JSON Schema `type: "boolean"` → `USwitch`
|
|
46
46
|
- **Enum (single-select)**: JSON Schema `enum: [...]` (or `oneOf: [{ const, title? }, ...]`) → `USelectMenu`
|
|
47
47
|
- **Enum (multi-select)**: JSON Schema `type: "array"` with `items` being an enum schema (supports `$ref`’d `items`) → `USelectMenu multiple`
|
package/dist/index.cjs
CHANGED
|
@@ -30,15 +30,16 @@ __export(index_exports, {
|
|
|
30
30
|
module.exports = __toCommonJS(index_exports);
|
|
31
31
|
|
|
32
32
|
// src/nuxtUiRenderers.ts
|
|
33
|
-
var
|
|
33
|
+
var import_core4 = require("@jsonforms/core");
|
|
34
34
|
var import_vue35 = require("vue");
|
|
35
35
|
|
|
36
36
|
// src/renderers/complex/NuxtUiArrayListRenderer.ts
|
|
37
|
-
var
|
|
37
|
+
var import_core2 = require("@jsonforms/core");
|
|
38
38
|
var import_vue3 = require("@jsonforms/vue");
|
|
39
39
|
var import_vue4 = require("vue");
|
|
40
40
|
|
|
41
41
|
// src/renderers/util.ts
|
|
42
|
+
var import_core = require("@jsonforms/core");
|
|
42
43
|
var import_vue = require("vue");
|
|
43
44
|
var import_vue2 = require("vue");
|
|
44
45
|
function getDocsPathFromSchema(schema) {
|
|
@@ -79,6 +80,37 @@ function controlDescription(control) {
|
|
|
79
80
|
const sd = control.schema?.description;
|
|
80
81
|
return typeof sd === "string" && sd.trim() ? sd.trim() : void 0;
|
|
81
82
|
}
|
|
83
|
+
function isSchemaReadOnly(schema) {
|
|
84
|
+
if (!schema || typeof schema !== "object" || Array.isArray(schema)) return false;
|
|
85
|
+
return schema.readOnly === true;
|
|
86
|
+
}
|
|
87
|
+
function controlTextInputAttrs(control, jsonforms) {
|
|
88
|
+
const schemaRO = isSchemaReadOnly(control.schema);
|
|
89
|
+
if (!schemaRO) {
|
|
90
|
+
return { readonly: false, disabled: !control.enabled };
|
|
91
|
+
}
|
|
92
|
+
if (jsonforms?.readonly === true) {
|
|
93
|
+
return { readonly: false, disabled: !control.enabled };
|
|
94
|
+
}
|
|
95
|
+
const ui = control.uischema;
|
|
96
|
+
if (typeof ui?.options?.readonly === "boolean" && ui.options.readonly) {
|
|
97
|
+
return { readonly: false, disabled: !control.enabled };
|
|
98
|
+
}
|
|
99
|
+
if (typeof ui?.options?.readOnly === "boolean" && ui.options.readOnly) {
|
|
100
|
+
return { readonly: false, disabled: !control.enabled };
|
|
101
|
+
}
|
|
102
|
+
const cfg = control.config;
|
|
103
|
+
if (typeof cfg?.readonly === "boolean" && cfg.readonly) {
|
|
104
|
+
return { readonly: false, disabled: !control.enabled };
|
|
105
|
+
}
|
|
106
|
+
if (typeof cfg?.readOnly === "boolean" && cfg.readOnly) {
|
|
107
|
+
return { readonly: false, disabled: !control.enabled };
|
|
108
|
+
}
|
|
109
|
+
if (ui && (0, import_core.hasEnableRule)(ui) && !control.enabled) {
|
|
110
|
+
return { readonly: false, disabled: true };
|
|
111
|
+
}
|
|
112
|
+
return { readonly: true, disabled: false };
|
|
113
|
+
}
|
|
82
114
|
|
|
83
115
|
// src/renderers/complex/NuxtUiArrayListRenderer.ts
|
|
84
116
|
function createNuxtUiArrayListRenderer(theme) {
|
|
@@ -96,7 +128,7 @@ function createNuxtUiArrayListRenderer(theme) {
|
|
|
96
128
|
);
|
|
97
129
|
const arraySchema = (0, import_vue4.computed)(() => {
|
|
98
130
|
try {
|
|
99
|
-
return
|
|
131
|
+
return import_core2.Resolve.schema(
|
|
100
132
|
props.schema,
|
|
101
133
|
control.value.uischema.scope,
|
|
102
134
|
control.value.rootSchema
|
|
@@ -114,7 +146,7 @@ function createNuxtUiArrayListRenderer(theme) {
|
|
|
114
146
|
return typeof min === "number" ? items.value.length <= min : false;
|
|
115
147
|
});
|
|
116
148
|
const childUiSchema = (0, import_vue4.computed)(
|
|
117
|
-
() => (0,
|
|
149
|
+
() => (0, import_core2.findUISchema)(
|
|
118
150
|
control.value.uischemas,
|
|
119
151
|
control.value.schema,
|
|
120
152
|
control.value.uischema.scope,
|
|
@@ -125,11 +157,11 @@ function createNuxtUiArrayListRenderer(theme) {
|
|
|
125
157
|
)
|
|
126
158
|
);
|
|
127
159
|
function childLabelForIndex(index) {
|
|
128
|
-
const childLabelProp = getChildLabelPropFromUiSchemaOptions(control.value.uischema.options) ?? (0,
|
|
160
|
+
const childLabelProp = getChildLabelPropFromUiSchemaOptions(control.value.uischema.options) ?? (0, import_core2.getFirstPrimitiveProp)(control.value.schema);
|
|
129
161
|
if (!childLabelProp) return `${index}`;
|
|
130
|
-
const labelValue =
|
|
162
|
+
const labelValue = import_core2.Resolve.data(
|
|
131
163
|
control.value.data,
|
|
132
|
-
(0,
|
|
164
|
+
(0, import_core2.composePaths)(`${index}`, childLabelProp)
|
|
133
165
|
);
|
|
134
166
|
if (labelValue === void 0 || labelValue === null || Number.isNaN(labelValue)) {
|
|
135
167
|
return "";
|
|
@@ -144,7 +176,7 @@ function createNuxtUiArrayListRenderer(theme) {
|
|
|
144
176
|
function addButtonClick() {
|
|
145
177
|
addItem(
|
|
146
178
|
control.value.path,
|
|
147
|
-
(0,
|
|
179
|
+
(0, import_core2.createDefaultValue)(control.value.schema, control.value.rootSchema)
|
|
148
180
|
)();
|
|
149
181
|
}
|
|
150
182
|
return () => {
|
|
@@ -255,7 +287,7 @@ function createNuxtUiArrayListRenderer(theme) {
|
|
|
255
287
|
(0, import_vue4.h)(import_vue3.DispatchRenderer, {
|
|
256
288
|
schema: control.value.schema,
|
|
257
289
|
uischema: childUiSchema.value,
|
|
258
|
-
path: (0,
|
|
290
|
+
path: (0, import_core2.composePaths)(control.value.path, `${index}`),
|
|
259
291
|
enabled: control.value.enabled,
|
|
260
292
|
renderers: control.value.renderers,
|
|
261
293
|
cells: control.value.cells
|
|
@@ -273,7 +305,7 @@ function createNuxtUiArrayListRenderer(theme) {
|
|
|
273
305
|
}
|
|
274
306
|
|
|
275
307
|
// src/renderers/complex/NuxtUiObjectRenderer.ts
|
|
276
|
-
var
|
|
308
|
+
var import_core3 = require("@jsonforms/core");
|
|
277
309
|
var import_vue5 = require("@jsonforms/vue");
|
|
278
310
|
var import_vue6 = require("vue");
|
|
279
311
|
var NuxtUiObjectRenderer = (0, import_vue6.defineComponent)({
|
|
@@ -286,7 +318,7 @@ var NuxtUiObjectRenderer = (0, import_vue6.defineComponent)({
|
|
|
286
318
|
);
|
|
287
319
|
const detailUiSchema = (0, import_vue6.computed)(() => {
|
|
288
320
|
const uiSchemaGenerator = () => {
|
|
289
|
-
const uiSchema =
|
|
321
|
+
const uiSchema = import_core3.Generate.uiSchema(
|
|
290
322
|
control.value.schema,
|
|
291
323
|
"Group",
|
|
292
324
|
void 0,
|
|
@@ -300,7 +332,7 @@ var NuxtUiObjectRenderer = (0, import_vue6.defineComponent)({
|
|
|
300
332
|
}
|
|
301
333
|
return uiSchema;
|
|
302
334
|
};
|
|
303
|
-
return (0,
|
|
335
|
+
return (0, import_core3.findUISchema)(
|
|
304
336
|
control.value.uischemas,
|
|
305
337
|
control.value.schema,
|
|
306
338
|
control.value.uischema.scope,
|
|
@@ -458,13 +490,14 @@ var NuxtUiIntegerControl = (0, import_vue12.defineComponent)({
|
|
|
458
490
|
const { control, handleChange } = (0, import_vue11.useJsonFormsControl)(
|
|
459
491
|
props
|
|
460
492
|
);
|
|
493
|
+
const jsonforms = (0, import_vue12.inject)("jsonforms");
|
|
461
494
|
const errorMessage = (0, import_vue12.computed)(() => trimmedOrUndefined(control.value.errors));
|
|
462
495
|
const modelValue = (0, import_vue12.computed)(() => {
|
|
463
496
|
const v = control.value.data;
|
|
464
497
|
return v === null || v === void 0 ? "" : String(v);
|
|
465
498
|
});
|
|
466
|
-
function
|
|
467
|
-
const trimmed =
|
|
499
|
+
function applyRawString(raw) {
|
|
500
|
+
const trimmed = raw.trim();
|
|
468
501
|
if (trimmed === "") {
|
|
469
502
|
handleChange(control.value.path, void 0);
|
|
470
503
|
return;
|
|
@@ -475,7 +508,7 @@ var NuxtUiIntegerControl = (0, import_vue12.defineComponent)({
|
|
|
475
508
|
return () => {
|
|
476
509
|
if (!control.value.visible) return null;
|
|
477
510
|
const UFormField = (0, import_vue12.resolveComponent)("UFormField");
|
|
478
|
-
const
|
|
511
|
+
const { readonly, disabled } = controlTextInputAttrs(control.value, jsonforms);
|
|
479
512
|
return (0, import_vue12.h)(
|
|
480
513
|
"div",
|
|
481
514
|
{},
|
|
@@ -488,15 +521,21 @@ var NuxtUiIntegerControl = (0, import_vue12.defineComponent)({
|
|
|
488
521
|
error: errorMessage.value
|
|
489
522
|
},
|
|
490
523
|
{
|
|
491
|
-
default: () => (0, import_vue12.h)(
|
|
524
|
+
default: () => (0, import_vue12.h)("input", {
|
|
492
525
|
type: "number",
|
|
493
526
|
inputmode: "numeric",
|
|
494
527
|
step: "1",
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
528
|
+
class: [
|
|
529
|
+
"jf-input-native",
|
|
530
|
+
errorMessage.value ? "jf-input-native--error" : ""
|
|
531
|
+
].filter(Boolean).join(" "),
|
|
532
|
+
value: modelValue.value,
|
|
533
|
+
readonly,
|
|
534
|
+
disabled,
|
|
498
535
|
"aria-invalid": Boolean(errorMessage.value),
|
|
499
|
-
|
|
536
|
+
onInput: (e) => {
|
|
537
|
+
applyRawString(e.target.value);
|
|
538
|
+
}
|
|
500
539
|
})
|
|
501
540
|
}
|
|
502
541
|
)
|
|
@@ -595,13 +634,14 @@ var NuxtUiNumberControl = (0, import_vue16.defineComponent)({
|
|
|
595
634
|
const { control, handleChange } = (0, import_vue15.useJsonFormsControl)(
|
|
596
635
|
props
|
|
597
636
|
);
|
|
637
|
+
const jsonforms = (0, import_vue16.inject)("jsonforms");
|
|
598
638
|
const errorMessage = (0, import_vue16.computed)(() => trimmedOrUndefined(control.value.errors));
|
|
599
639
|
const modelValue = (0, import_vue16.computed)(() => {
|
|
600
640
|
const v = control.value.data;
|
|
601
641
|
return v === null || v === void 0 ? "" : String(v);
|
|
602
642
|
});
|
|
603
|
-
function
|
|
604
|
-
const trimmed =
|
|
643
|
+
function applyRawString(raw) {
|
|
644
|
+
const trimmed = raw.trim();
|
|
605
645
|
if (trimmed === "") {
|
|
606
646
|
handleChange(control.value.path, void 0);
|
|
607
647
|
return;
|
|
@@ -612,7 +652,7 @@ var NuxtUiNumberControl = (0, import_vue16.defineComponent)({
|
|
|
612
652
|
return () => {
|
|
613
653
|
if (!control.value.visible) return null;
|
|
614
654
|
const UFormField = (0, import_vue16.resolveComponent)("UFormField");
|
|
615
|
-
const
|
|
655
|
+
const { readonly, disabled } = controlTextInputAttrs(control.value, jsonforms);
|
|
616
656
|
return (0, import_vue16.h)(
|
|
617
657
|
"div",
|
|
618
658
|
{},
|
|
@@ -625,14 +665,20 @@ var NuxtUiNumberControl = (0, import_vue16.defineComponent)({
|
|
|
625
665
|
error: errorMessage.value
|
|
626
666
|
},
|
|
627
667
|
{
|
|
628
|
-
default: () => (0, import_vue16.h)(
|
|
668
|
+
default: () => (0, import_vue16.h)("input", {
|
|
629
669
|
type: "number",
|
|
630
670
|
inputmode: "decimal",
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
671
|
+
class: [
|
|
672
|
+
"jf-input-native",
|
|
673
|
+
errorMessage.value ? "jf-input-native--error" : ""
|
|
674
|
+
].filter(Boolean).join(" "),
|
|
675
|
+
value: modelValue.value,
|
|
676
|
+
readonly,
|
|
677
|
+
disabled,
|
|
634
678
|
"aria-invalid": Boolean(errorMessage.value),
|
|
635
|
-
|
|
679
|
+
onInput: (e) => {
|
|
680
|
+
applyRawString(e.target.value);
|
|
681
|
+
}
|
|
636
682
|
})
|
|
637
683
|
}
|
|
638
684
|
)
|
|
@@ -651,6 +697,7 @@ var NuxtUiPasswordControl = (0, import_vue18.defineComponent)({
|
|
|
651
697
|
const { control, handleChange } = (0, import_vue17.useJsonFormsControl)(
|
|
652
698
|
props
|
|
653
699
|
);
|
|
700
|
+
const jsonforms = (0, import_vue18.inject)("jsonforms");
|
|
654
701
|
const errorMessage = (0, import_vue18.computed)(() => trimmedOrUndefined(control.value.errors));
|
|
655
702
|
const showPassword = (0, import_vue18.ref)(false);
|
|
656
703
|
const inputType = (0, import_vue18.computed)(() => showPassword.value ? "text" : "password");
|
|
@@ -659,6 +706,7 @@ var NuxtUiPasswordControl = (0, import_vue18.defineComponent)({
|
|
|
659
706
|
const UFormField = (0, import_vue18.resolveComponent)("UFormField");
|
|
660
707
|
const UInput = (0, import_vue18.resolveComponent)("UInput");
|
|
661
708
|
const UButton = (0, import_vue18.resolveComponent)("UButton");
|
|
709
|
+
const { readonly, disabled } = controlTextInputAttrs(control.value, jsonforms);
|
|
662
710
|
return (0, import_vue18.h)(
|
|
663
711
|
"div",
|
|
664
712
|
{},
|
|
@@ -678,7 +726,8 @@ var NuxtUiPasswordControl = (0, import_vue18.defineComponent)({
|
|
|
678
726
|
class: "w-full",
|
|
679
727
|
type: inputType.value,
|
|
680
728
|
autocomplete: "current-password",
|
|
681
|
-
|
|
729
|
+
readonly,
|
|
730
|
+
disabled,
|
|
682
731
|
color: errorMessage.value ? "error" : void 0,
|
|
683
732
|
"aria-invalid": Boolean(errorMessage.value),
|
|
684
733
|
"onUpdate:modelValue": (v) => handleChange(control.value.path, v)
|
|
@@ -692,7 +741,7 @@ var NuxtUiPasswordControl = (0, import_vue18.defineComponent)({
|
|
|
692
741
|
icon: showPassword.value ? "i-heroicons-eye-slash" : "i-heroicons-eye",
|
|
693
742
|
"aria-pressed": showPassword.value,
|
|
694
743
|
"aria-label": showPassword.value ? "Hide password" : "Show password",
|
|
695
|
-
disabled
|
|
744
|
+
disabled,
|
|
696
745
|
onClick: () => {
|
|
697
746
|
showPassword.value = !showPassword.value;
|
|
698
747
|
}
|
|
@@ -717,6 +766,7 @@ function createNuxtUiStringControl(docsUrl) {
|
|
|
717
766
|
const { control, handleChange } = (0, import_vue19.useJsonFormsControl)(
|
|
718
767
|
props
|
|
719
768
|
);
|
|
769
|
+
const jsonforms = (0, import_vue20.inject)("jsonforms");
|
|
720
770
|
const errorMessage = (0, import_vue20.computed)(
|
|
721
771
|
() => trimmedOrUndefined(control.value.errors)
|
|
722
772
|
);
|
|
@@ -724,11 +774,16 @@ function createNuxtUiStringControl(docsUrl) {
|
|
|
724
774
|
if (!control.value.visible) return null;
|
|
725
775
|
const UFormField = (0, import_vue20.resolveComponent)("UFormField");
|
|
726
776
|
const UInput = (0, import_vue20.resolveComponent)("UInput");
|
|
777
|
+
const { readonly, disabled } = controlTextInputAttrs(
|
|
778
|
+
control.value,
|
|
779
|
+
jsonforms
|
|
780
|
+
);
|
|
727
781
|
const slots = {
|
|
728
782
|
default: () => (0, import_vue20.h)(UInput, {
|
|
729
783
|
modelValue: control.value.data ?? "",
|
|
730
784
|
class: "w-full",
|
|
731
|
-
|
|
785
|
+
readonly,
|
|
786
|
+
disabled,
|
|
732
787
|
color: errorMessage.value ? "error" : void 0,
|
|
733
788
|
"aria-invalid": Boolean(errorMessage.value),
|
|
734
789
|
"onUpdate:modelValue": (v) => handleChange(control.value.path, v)
|
|
@@ -766,11 +821,13 @@ var NuxtUiTextareaControl = (0, import_vue22.defineComponent)({
|
|
|
766
821
|
const { control, handleChange } = (0, import_vue21.useJsonFormsControl)(
|
|
767
822
|
props
|
|
768
823
|
);
|
|
824
|
+
const jsonforms = (0, import_vue22.inject)("jsonforms");
|
|
769
825
|
const errorMessage = (0, import_vue22.computed)(() => trimmedOrUndefined(control.value.errors));
|
|
770
826
|
return () => {
|
|
771
827
|
if (!control.value.visible) return null;
|
|
772
828
|
const UFormField = (0, import_vue22.resolveComponent)("UFormField");
|
|
773
829
|
const UTextarea = (0, import_vue22.resolveComponent)("UTextarea");
|
|
830
|
+
const { readonly, disabled } = controlTextInputAttrs(control.value, jsonforms);
|
|
774
831
|
return (0, import_vue22.h)(
|
|
775
832
|
"div",
|
|
776
833
|
{},
|
|
@@ -786,7 +843,8 @@ var NuxtUiTextareaControl = (0, import_vue22.defineComponent)({
|
|
|
786
843
|
default: () => (0, import_vue22.h)(UTextarea, {
|
|
787
844
|
modelValue: control.value.data ?? "",
|
|
788
845
|
class: "w-full",
|
|
789
|
-
|
|
846
|
+
readonly,
|
|
847
|
+
disabled,
|
|
790
848
|
color: errorMessage.value ? "error" : void 0,
|
|
791
849
|
"aria-invalid": Boolean(errorMessage.value),
|
|
792
850
|
rows: 5,
|
|
@@ -1069,7 +1127,7 @@ var RANK = 10;
|
|
|
1069
1127
|
var ENUM_RANK = RANK + 1;
|
|
1070
1128
|
var PASSWORD_RANK = ENUM_RANK + 1;
|
|
1071
1129
|
var isMultiEnumControl = (uischema, schema, context) => {
|
|
1072
|
-
if (!(0,
|
|
1130
|
+
if (!(0, import_core4.uiTypeIs)("Control")(uischema, schema, context)) {
|
|
1073
1131
|
return false;
|
|
1074
1132
|
}
|
|
1075
1133
|
const scope = uischema?.scope;
|
|
@@ -1077,7 +1135,7 @@ var isMultiEnumControl = (uischema, schema, context) => {
|
|
|
1077
1135
|
const rootSchema = context?.rootSchema ?? schema;
|
|
1078
1136
|
let resolved;
|
|
1079
1137
|
try {
|
|
1080
|
-
resolved =
|
|
1138
|
+
resolved = import_core4.Resolve.schema(schema, scope, rootSchema);
|
|
1081
1139
|
} catch {
|
|
1082
1140
|
return false;
|
|
1083
1141
|
}
|
|
@@ -1086,11 +1144,11 @@ var isMultiEnumControl = (uischema, schema, context) => {
|
|
|
1086
1144
|
if (!items) return false;
|
|
1087
1145
|
if (Array.isArray(items)) return false;
|
|
1088
1146
|
if (typeof items !== "object" || items === null) return false;
|
|
1089
|
-
const resolvedItems = "$ref" in items && typeof items.$ref === "string" ?
|
|
1090
|
-
return (0,
|
|
1147
|
+
const resolvedItems = "$ref" in items && typeof items.$ref === "string" ? import_core4.Resolve.schema(rootSchema, items.$ref, rootSchema) : items;
|
|
1148
|
+
return (0, import_core4.isEnumSchema)(resolvedItems);
|
|
1091
1149
|
};
|
|
1092
1150
|
var isOneOfEnumControl = (uischema, schema, context) => {
|
|
1093
|
-
if (!(0,
|
|
1151
|
+
if (!(0, import_core4.uiTypeIs)("Control")(uischema, schema, context)) {
|
|
1094
1152
|
return false;
|
|
1095
1153
|
}
|
|
1096
1154
|
const scope = uischema?.scope;
|
|
@@ -1098,7 +1156,7 @@ var isOneOfEnumControl = (uischema, schema, context) => {
|
|
|
1098
1156
|
const rootSchema = context?.rootSchema ?? schema;
|
|
1099
1157
|
let resolved;
|
|
1100
1158
|
try {
|
|
1101
|
-
resolved =
|
|
1159
|
+
resolved = import_core4.Resolve.schema(schema, scope, rootSchema);
|
|
1102
1160
|
} catch {
|
|
1103
1161
|
return false;
|
|
1104
1162
|
}
|
|
@@ -1116,77 +1174,77 @@ function createNuxtUiRenderers(options) {
|
|
|
1116
1174
|
return [
|
|
1117
1175
|
// Layouts
|
|
1118
1176
|
{
|
|
1119
|
-
tester: (0,
|
|
1177
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("VerticalLayout")),
|
|
1120
1178
|
renderer: (0, import_vue35.markRaw)(createNuxtUiVerticalLayoutRenderer(theme))
|
|
1121
1179
|
},
|
|
1122
1180
|
{
|
|
1123
|
-
tester: (0,
|
|
1181
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("HorizontalLayout")),
|
|
1124
1182
|
renderer: (0, import_vue35.markRaw)(createNuxtUiHorizontalLayoutRenderer(theme))
|
|
1125
1183
|
},
|
|
1126
1184
|
{
|
|
1127
|
-
tester: (0,
|
|
1185
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("Group")),
|
|
1128
1186
|
renderer: (0, import_vue35.markRaw)(createNuxtUiGroupRenderer(theme))
|
|
1129
1187
|
},
|
|
1130
1188
|
{
|
|
1131
|
-
tester: (0,
|
|
1189
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("Categorization")),
|
|
1132
1190
|
renderer: (0, import_vue35.markRaw)(createNuxtUiCategorizationRenderer(theme))
|
|
1133
1191
|
},
|
|
1134
1192
|
{
|
|
1135
|
-
tester: (0,
|
|
1193
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("Category")),
|
|
1136
1194
|
renderer: (0, import_vue35.markRaw)(createNuxtUiCategoryRenderer(theme))
|
|
1137
1195
|
},
|
|
1138
1196
|
{
|
|
1139
|
-
tester: (0,
|
|
1197
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("Label")),
|
|
1140
1198
|
renderer: (0, import_vue35.markRaw)(createNuxtUiLabelRenderer(theme))
|
|
1141
1199
|
},
|
|
1142
1200
|
// Complex schemas
|
|
1143
1201
|
{
|
|
1144
|
-
tester: (0,
|
|
1202
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.schemaTypeIs)("array")),
|
|
1145
1203
|
renderer: (0, import_vue35.markRaw)(createNuxtUiArrayListRenderer(theme))
|
|
1146
1204
|
},
|
|
1147
1205
|
{
|
|
1148
|
-
tester: (0,
|
|
1206
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isObjectControl),
|
|
1149
1207
|
renderer: (0, import_vue35.markRaw)(NuxtUiObjectRenderer)
|
|
1150
1208
|
},
|
|
1151
1209
|
// Primitive controls
|
|
1152
1210
|
{
|
|
1153
|
-
tester: (0,
|
|
1211
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isMultiLineControl),
|
|
1154
1212
|
renderer: (0, import_vue35.markRaw)(NuxtUiTextareaControl)
|
|
1155
1213
|
},
|
|
1156
1214
|
{
|
|
1157
|
-
tester: (0,
|
|
1215
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isNumberControl),
|
|
1158
1216
|
renderer: (0, import_vue35.markRaw)(NuxtUiNumberControl)
|
|
1159
1217
|
},
|
|
1160
1218
|
{
|
|
1161
|
-
tester: (0,
|
|
1219
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isIntegerControl),
|
|
1162
1220
|
renderer: (0, import_vue35.markRaw)(NuxtUiIntegerControl)
|
|
1163
1221
|
},
|
|
1164
1222
|
{
|
|
1165
|
-
tester: (0,
|
|
1223
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isBooleanControl),
|
|
1166
1224
|
renderer: (0, import_vue35.markRaw)(createNuxtUiBooleanControl(theme))
|
|
1167
1225
|
},
|
|
1168
1226
|
{
|
|
1169
1227
|
// Multi-enum must outrank generic array renderer and string renderer.
|
|
1170
|
-
tester: (0,
|
|
1228
|
+
tester: (0, import_core4.rankWith)(ENUM_RANK, isMultiEnumControl),
|
|
1171
1229
|
renderer: (0, import_vue35.markRaw)(NuxtUiMultiEnumControl)
|
|
1172
1230
|
},
|
|
1173
1231
|
{
|
|
1174
1232
|
// oneOf with const+title (display labels) - same as enum for rendering.
|
|
1175
|
-
tester: (0,
|
|
1233
|
+
tester: (0, import_core4.rankWith)(ENUM_RANK, isOneOfEnumControl),
|
|
1176
1234
|
renderer: (0, import_vue35.markRaw)(NuxtUiEnumControl)
|
|
1177
1235
|
},
|
|
1178
1236
|
{
|
|
1179
1237
|
// Enum must outrank the generic string control, otherwise enums render
|
|
1180
1238
|
// as freeform text inputs.
|
|
1181
|
-
tester: (0,
|
|
1239
|
+
tester: (0, import_core4.rankWith)(ENUM_RANK, import_core4.isEnumControl),
|
|
1182
1240
|
renderer: (0, import_vue35.markRaw)(NuxtUiEnumControl)
|
|
1183
1241
|
},
|
|
1184
1242
|
{
|
|
1185
|
-
tester: (0,
|
|
1243
|
+
tester: (0, import_core4.rankWith)(PASSWORD_RANK, (0, import_core4.and)(import_core4.isStringControl, (0, import_core4.formatIs)("password"))),
|
|
1186
1244
|
renderer: (0, import_vue35.markRaw)(NuxtUiPasswordControl)
|
|
1187
1245
|
},
|
|
1188
1246
|
{
|
|
1189
|
-
tester: (0,
|
|
1247
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isStringControl),
|
|
1190
1248
|
renderer: (0, import_vue35.markRaw)(createNuxtUiStringControl(docsUrl))
|
|
1191
1249
|
}
|
|
1192
1250
|
];
|