jsonforms-nuxt-ui-renderers 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +91 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +61 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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,6 +490,7 @@ 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;
|
|
@@ -476,6 +509,7 @@ var NuxtUiIntegerControl = (0, import_vue12.defineComponent)({
|
|
|
476
509
|
if (!control.value.visible) return null;
|
|
477
510
|
const UFormField = (0, import_vue12.resolveComponent)("UFormField");
|
|
478
511
|
const UInput = (0, import_vue12.resolveComponent)("UInput");
|
|
512
|
+
const { readonly, disabled } = controlTextInputAttrs(control.value, jsonforms);
|
|
479
513
|
return (0, import_vue12.h)(
|
|
480
514
|
"div",
|
|
481
515
|
{},
|
|
@@ -493,7 +527,8 @@ var NuxtUiIntegerControl = (0, import_vue12.defineComponent)({
|
|
|
493
527
|
inputmode: "numeric",
|
|
494
528
|
step: "1",
|
|
495
529
|
modelValue: modelValue.value,
|
|
496
|
-
|
|
530
|
+
readonly,
|
|
531
|
+
disabled,
|
|
497
532
|
color: errorMessage.value ? "error" : void 0,
|
|
498
533
|
"aria-invalid": Boolean(errorMessage.value),
|
|
499
534
|
"onUpdate:modelValue": onUpdate
|
|
@@ -595,6 +630,7 @@ var NuxtUiNumberControl = (0, import_vue16.defineComponent)({
|
|
|
595
630
|
const { control, handleChange } = (0, import_vue15.useJsonFormsControl)(
|
|
596
631
|
props
|
|
597
632
|
);
|
|
633
|
+
const jsonforms = (0, import_vue16.inject)("jsonforms");
|
|
598
634
|
const errorMessage = (0, import_vue16.computed)(() => trimmedOrUndefined(control.value.errors));
|
|
599
635
|
const modelValue = (0, import_vue16.computed)(() => {
|
|
600
636
|
const v = control.value.data;
|
|
@@ -613,6 +649,7 @@ var NuxtUiNumberControl = (0, import_vue16.defineComponent)({
|
|
|
613
649
|
if (!control.value.visible) return null;
|
|
614
650
|
const UFormField = (0, import_vue16.resolveComponent)("UFormField");
|
|
615
651
|
const UInput = (0, import_vue16.resolveComponent)("UInput");
|
|
652
|
+
const { readonly, disabled } = controlTextInputAttrs(control.value, jsonforms);
|
|
616
653
|
return (0, import_vue16.h)(
|
|
617
654
|
"div",
|
|
618
655
|
{},
|
|
@@ -629,7 +666,8 @@ var NuxtUiNumberControl = (0, import_vue16.defineComponent)({
|
|
|
629
666
|
type: "number",
|
|
630
667
|
inputmode: "decimal",
|
|
631
668
|
modelValue: modelValue.value,
|
|
632
|
-
|
|
669
|
+
readonly,
|
|
670
|
+
disabled,
|
|
633
671
|
color: errorMessage.value ? "error" : void 0,
|
|
634
672
|
"aria-invalid": Boolean(errorMessage.value),
|
|
635
673
|
"onUpdate:modelValue": onUpdate
|
|
@@ -651,6 +689,7 @@ var NuxtUiPasswordControl = (0, import_vue18.defineComponent)({
|
|
|
651
689
|
const { control, handleChange } = (0, import_vue17.useJsonFormsControl)(
|
|
652
690
|
props
|
|
653
691
|
);
|
|
692
|
+
const jsonforms = (0, import_vue18.inject)("jsonforms");
|
|
654
693
|
const errorMessage = (0, import_vue18.computed)(() => trimmedOrUndefined(control.value.errors));
|
|
655
694
|
const showPassword = (0, import_vue18.ref)(false);
|
|
656
695
|
const inputType = (0, import_vue18.computed)(() => showPassword.value ? "text" : "password");
|
|
@@ -659,6 +698,7 @@ var NuxtUiPasswordControl = (0, import_vue18.defineComponent)({
|
|
|
659
698
|
const UFormField = (0, import_vue18.resolveComponent)("UFormField");
|
|
660
699
|
const UInput = (0, import_vue18.resolveComponent)("UInput");
|
|
661
700
|
const UButton = (0, import_vue18.resolveComponent)("UButton");
|
|
701
|
+
const { readonly, disabled } = controlTextInputAttrs(control.value, jsonforms);
|
|
662
702
|
return (0, import_vue18.h)(
|
|
663
703
|
"div",
|
|
664
704
|
{},
|
|
@@ -678,7 +718,8 @@ var NuxtUiPasswordControl = (0, import_vue18.defineComponent)({
|
|
|
678
718
|
class: "w-full",
|
|
679
719
|
type: inputType.value,
|
|
680
720
|
autocomplete: "current-password",
|
|
681
|
-
|
|
721
|
+
readonly,
|
|
722
|
+
disabled,
|
|
682
723
|
color: errorMessage.value ? "error" : void 0,
|
|
683
724
|
"aria-invalid": Boolean(errorMessage.value),
|
|
684
725
|
"onUpdate:modelValue": (v) => handleChange(control.value.path, v)
|
|
@@ -692,7 +733,7 @@ var NuxtUiPasswordControl = (0, import_vue18.defineComponent)({
|
|
|
692
733
|
icon: showPassword.value ? "i-heroicons-eye-slash" : "i-heroicons-eye",
|
|
693
734
|
"aria-pressed": showPassword.value,
|
|
694
735
|
"aria-label": showPassword.value ? "Hide password" : "Show password",
|
|
695
|
-
disabled
|
|
736
|
+
disabled,
|
|
696
737
|
onClick: () => {
|
|
697
738
|
showPassword.value = !showPassword.value;
|
|
698
739
|
}
|
|
@@ -717,6 +758,7 @@ function createNuxtUiStringControl(docsUrl) {
|
|
|
717
758
|
const { control, handleChange } = (0, import_vue19.useJsonFormsControl)(
|
|
718
759
|
props
|
|
719
760
|
);
|
|
761
|
+
const jsonforms = (0, import_vue20.inject)("jsonforms");
|
|
720
762
|
const errorMessage = (0, import_vue20.computed)(
|
|
721
763
|
() => trimmedOrUndefined(control.value.errors)
|
|
722
764
|
);
|
|
@@ -724,11 +766,16 @@ function createNuxtUiStringControl(docsUrl) {
|
|
|
724
766
|
if (!control.value.visible) return null;
|
|
725
767
|
const UFormField = (0, import_vue20.resolveComponent)("UFormField");
|
|
726
768
|
const UInput = (0, import_vue20.resolveComponent)("UInput");
|
|
769
|
+
const { readonly, disabled } = controlTextInputAttrs(
|
|
770
|
+
control.value,
|
|
771
|
+
jsonforms
|
|
772
|
+
);
|
|
727
773
|
const slots = {
|
|
728
774
|
default: () => (0, import_vue20.h)(UInput, {
|
|
729
775
|
modelValue: control.value.data ?? "",
|
|
730
776
|
class: "w-full",
|
|
731
|
-
|
|
777
|
+
readonly,
|
|
778
|
+
disabled,
|
|
732
779
|
color: errorMessage.value ? "error" : void 0,
|
|
733
780
|
"aria-invalid": Boolean(errorMessage.value),
|
|
734
781
|
"onUpdate:modelValue": (v) => handleChange(control.value.path, v)
|
|
@@ -766,11 +813,13 @@ var NuxtUiTextareaControl = (0, import_vue22.defineComponent)({
|
|
|
766
813
|
const { control, handleChange } = (0, import_vue21.useJsonFormsControl)(
|
|
767
814
|
props
|
|
768
815
|
);
|
|
816
|
+
const jsonforms = (0, import_vue22.inject)("jsonforms");
|
|
769
817
|
const errorMessage = (0, import_vue22.computed)(() => trimmedOrUndefined(control.value.errors));
|
|
770
818
|
return () => {
|
|
771
819
|
if (!control.value.visible) return null;
|
|
772
820
|
const UFormField = (0, import_vue22.resolveComponent)("UFormField");
|
|
773
821
|
const UTextarea = (0, import_vue22.resolveComponent)("UTextarea");
|
|
822
|
+
const { readonly, disabled } = controlTextInputAttrs(control.value, jsonforms);
|
|
774
823
|
return (0, import_vue22.h)(
|
|
775
824
|
"div",
|
|
776
825
|
{},
|
|
@@ -786,7 +835,8 @@ var NuxtUiTextareaControl = (0, import_vue22.defineComponent)({
|
|
|
786
835
|
default: () => (0, import_vue22.h)(UTextarea, {
|
|
787
836
|
modelValue: control.value.data ?? "",
|
|
788
837
|
class: "w-full",
|
|
789
|
-
|
|
838
|
+
readonly,
|
|
839
|
+
disabled,
|
|
790
840
|
color: errorMessage.value ? "error" : void 0,
|
|
791
841
|
"aria-invalid": Boolean(errorMessage.value),
|
|
792
842
|
rows: 5,
|
|
@@ -1069,7 +1119,7 @@ var RANK = 10;
|
|
|
1069
1119
|
var ENUM_RANK = RANK + 1;
|
|
1070
1120
|
var PASSWORD_RANK = ENUM_RANK + 1;
|
|
1071
1121
|
var isMultiEnumControl = (uischema, schema, context) => {
|
|
1072
|
-
if (!(0,
|
|
1122
|
+
if (!(0, import_core4.uiTypeIs)("Control")(uischema, schema, context)) {
|
|
1073
1123
|
return false;
|
|
1074
1124
|
}
|
|
1075
1125
|
const scope = uischema?.scope;
|
|
@@ -1077,7 +1127,7 @@ var isMultiEnumControl = (uischema, schema, context) => {
|
|
|
1077
1127
|
const rootSchema = context?.rootSchema ?? schema;
|
|
1078
1128
|
let resolved;
|
|
1079
1129
|
try {
|
|
1080
|
-
resolved =
|
|
1130
|
+
resolved = import_core4.Resolve.schema(schema, scope, rootSchema);
|
|
1081
1131
|
} catch {
|
|
1082
1132
|
return false;
|
|
1083
1133
|
}
|
|
@@ -1086,11 +1136,11 @@ var isMultiEnumControl = (uischema, schema, context) => {
|
|
|
1086
1136
|
if (!items) return false;
|
|
1087
1137
|
if (Array.isArray(items)) return false;
|
|
1088
1138
|
if (typeof items !== "object" || items === null) return false;
|
|
1089
|
-
const resolvedItems = "$ref" in items && typeof items.$ref === "string" ?
|
|
1090
|
-
return (0,
|
|
1139
|
+
const resolvedItems = "$ref" in items && typeof items.$ref === "string" ? import_core4.Resolve.schema(rootSchema, items.$ref, rootSchema) : items;
|
|
1140
|
+
return (0, import_core4.isEnumSchema)(resolvedItems);
|
|
1091
1141
|
};
|
|
1092
1142
|
var isOneOfEnumControl = (uischema, schema, context) => {
|
|
1093
|
-
if (!(0,
|
|
1143
|
+
if (!(0, import_core4.uiTypeIs)("Control")(uischema, schema, context)) {
|
|
1094
1144
|
return false;
|
|
1095
1145
|
}
|
|
1096
1146
|
const scope = uischema?.scope;
|
|
@@ -1098,7 +1148,7 @@ var isOneOfEnumControl = (uischema, schema, context) => {
|
|
|
1098
1148
|
const rootSchema = context?.rootSchema ?? schema;
|
|
1099
1149
|
let resolved;
|
|
1100
1150
|
try {
|
|
1101
|
-
resolved =
|
|
1151
|
+
resolved = import_core4.Resolve.schema(schema, scope, rootSchema);
|
|
1102
1152
|
} catch {
|
|
1103
1153
|
return false;
|
|
1104
1154
|
}
|
|
@@ -1116,77 +1166,77 @@ function createNuxtUiRenderers(options) {
|
|
|
1116
1166
|
return [
|
|
1117
1167
|
// Layouts
|
|
1118
1168
|
{
|
|
1119
|
-
tester: (0,
|
|
1169
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("VerticalLayout")),
|
|
1120
1170
|
renderer: (0, import_vue35.markRaw)(createNuxtUiVerticalLayoutRenderer(theme))
|
|
1121
1171
|
},
|
|
1122
1172
|
{
|
|
1123
|
-
tester: (0,
|
|
1173
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("HorizontalLayout")),
|
|
1124
1174
|
renderer: (0, import_vue35.markRaw)(createNuxtUiHorizontalLayoutRenderer(theme))
|
|
1125
1175
|
},
|
|
1126
1176
|
{
|
|
1127
|
-
tester: (0,
|
|
1177
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("Group")),
|
|
1128
1178
|
renderer: (0, import_vue35.markRaw)(createNuxtUiGroupRenderer(theme))
|
|
1129
1179
|
},
|
|
1130
1180
|
{
|
|
1131
|
-
tester: (0,
|
|
1181
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("Categorization")),
|
|
1132
1182
|
renderer: (0, import_vue35.markRaw)(createNuxtUiCategorizationRenderer(theme))
|
|
1133
1183
|
},
|
|
1134
1184
|
{
|
|
1135
|
-
tester: (0,
|
|
1185
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("Category")),
|
|
1136
1186
|
renderer: (0, import_vue35.markRaw)(createNuxtUiCategoryRenderer(theme))
|
|
1137
1187
|
},
|
|
1138
1188
|
{
|
|
1139
|
-
tester: (0,
|
|
1189
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.uiTypeIs)("Label")),
|
|
1140
1190
|
renderer: (0, import_vue35.markRaw)(createNuxtUiLabelRenderer(theme))
|
|
1141
1191
|
},
|
|
1142
1192
|
// Complex schemas
|
|
1143
1193
|
{
|
|
1144
|
-
tester: (0,
|
|
1194
|
+
tester: (0, import_core4.rankWith)(RANK, (0, import_core4.schemaTypeIs)("array")),
|
|
1145
1195
|
renderer: (0, import_vue35.markRaw)(createNuxtUiArrayListRenderer(theme))
|
|
1146
1196
|
},
|
|
1147
1197
|
{
|
|
1148
|
-
tester: (0,
|
|
1198
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isObjectControl),
|
|
1149
1199
|
renderer: (0, import_vue35.markRaw)(NuxtUiObjectRenderer)
|
|
1150
1200
|
},
|
|
1151
1201
|
// Primitive controls
|
|
1152
1202
|
{
|
|
1153
|
-
tester: (0,
|
|
1203
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isMultiLineControl),
|
|
1154
1204
|
renderer: (0, import_vue35.markRaw)(NuxtUiTextareaControl)
|
|
1155
1205
|
},
|
|
1156
1206
|
{
|
|
1157
|
-
tester: (0,
|
|
1207
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isNumberControl),
|
|
1158
1208
|
renderer: (0, import_vue35.markRaw)(NuxtUiNumberControl)
|
|
1159
1209
|
},
|
|
1160
1210
|
{
|
|
1161
|
-
tester: (0,
|
|
1211
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isIntegerControl),
|
|
1162
1212
|
renderer: (0, import_vue35.markRaw)(NuxtUiIntegerControl)
|
|
1163
1213
|
},
|
|
1164
1214
|
{
|
|
1165
|
-
tester: (0,
|
|
1215
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isBooleanControl),
|
|
1166
1216
|
renderer: (0, import_vue35.markRaw)(createNuxtUiBooleanControl(theme))
|
|
1167
1217
|
},
|
|
1168
1218
|
{
|
|
1169
1219
|
// Multi-enum must outrank generic array renderer and string renderer.
|
|
1170
|
-
tester: (0,
|
|
1220
|
+
tester: (0, import_core4.rankWith)(ENUM_RANK, isMultiEnumControl),
|
|
1171
1221
|
renderer: (0, import_vue35.markRaw)(NuxtUiMultiEnumControl)
|
|
1172
1222
|
},
|
|
1173
1223
|
{
|
|
1174
1224
|
// oneOf with const+title (display labels) - same as enum for rendering.
|
|
1175
|
-
tester: (0,
|
|
1225
|
+
tester: (0, import_core4.rankWith)(ENUM_RANK, isOneOfEnumControl),
|
|
1176
1226
|
renderer: (0, import_vue35.markRaw)(NuxtUiEnumControl)
|
|
1177
1227
|
},
|
|
1178
1228
|
{
|
|
1179
1229
|
// Enum must outrank the generic string control, otherwise enums render
|
|
1180
1230
|
// as freeform text inputs.
|
|
1181
|
-
tester: (0,
|
|
1231
|
+
tester: (0, import_core4.rankWith)(ENUM_RANK, import_core4.isEnumControl),
|
|
1182
1232
|
renderer: (0, import_vue35.markRaw)(NuxtUiEnumControl)
|
|
1183
1233
|
},
|
|
1184
1234
|
{
|
|
1185
|
-
tester: (0,
|
|
1235
|
+
tester: (0, import_core4.rankWith)(PASSWORD_RANK, (0, import_core4.and)(import_core4.isStringControl, (0, import_core4.formatIs)("password"))),
|
|
1186
1236
|
renderer: (0, import_vue35.markRaw)(NuxtUiPasswordControl)
|
|
1187
1237
|
},
|
|
1188
1238
|
{
|
|
1189
|
-
tester: (0,
|
|
1239
|
+
tester: (0, import_core4.rankWith)(RANK, import_core4.isStringControl),
|
|
1190
1240
|
renderer: (0, import_vue35.markRaw)(createNuxtUiStringControl(docsUrl))
|
|
1191
1241
|
}
|
|
1192
1242
|
];
|