@ethereal-nexus/core 0.2.3 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/decorators/index.d.mts +2 -5
- package/dist/decorators/index.d.ts +2 -5
- package/dist/decorators/webcomponent/index.d.mts +2 -5
- package/dist/decorators/webcomponent/index.d.ts +2 -5
- package/dist/decorators/webcomponent/webcomponent.d.mts +1 -4
- package/dist/decorators/webcomponent/webcomponent.d.ts +1 -4
- package/dist/functions/component/component.d.mts +4 -7
- package/dist/functions/component/component.d.ts +4 -7
- package/dist/functions/component/component.js +0 -1
- package/dist/functions/component/component.js.map +1 -1
- package/dist/functions/component/component.mjs +0 -1
- package/dist/functions/component/component.mjs.map +1 -1
- package/dist/functions/component/index.d.mts +2 -5
- package/dist/functions/component/index.d.ts +2 -5
- package/dist/functions/component/index.js +0 -1
- package/dist/functions/component/index.js.map +1 -1
- package/dist/functions/component/index.mjs +0 -1
- package/dist/functions/component/index.mjs.map +1 -1
- package/dist/functions/index.d.mts +2 -5
- package/dist/functions/index.d.ts +2 -5
- package/dist/functions/index.js +0 -1
- package/dist/functions/index.js.map +1 -1
- package/dist/functions/index.mjs +0 -1
- package/dist/functions/index.mjs.map +1 -1
- package/dist/functions/parse/index.d.mts +2 -5
- package/dist/functions/parse/index.d.ts +2 -5
- package/dist/functions/parse/parse.d.mts +1 -4
- package/dist/functions/parse/parse.d.ts +1 -4
- package/dist/functions/parse/parsePrimitives.d.mts +1 -4
- package/dist/functions/parse/parsePrimitives.d.ts +1 -4
- package/dist/index.d.mts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +280 -81
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +276 -81
- package/dist/index.mjs.map +1 -1
- package/dist/schema/calendar/calendar.d.mts +22 -0
- package/dist/schema/calendar/calendar.d.ts +22 -0
- package/dist/schema/calendar/calendar.js +53 -0
- package/dist/schema/calendar/calendar.js.map +1 -0
- package/dist/schema/calendar/calendar.mjs +28 -0
- package/dist/schema/calendar/calendar.mjs.map +1 -0
- package/dist/schema/calendar/index.d.mts +4 -0
- package/dist/schema/calendar/index.d.ts +4 -0
- package/dist/schema/calendar/index.js +55 -0
- package/dist/schema/calendar/index.js.map +1 -0
- package/dist/schema/calendar/index.mjs +28 -0
- package/dist/schema/calendar/index.mjs.map +1 -0
- package/dist/schema/checkbox/checkbox.d.mts +3 -1
- package/dist/schema/checkbox/checkbox.d.ts +3 -1
- package/dist/schema/checkbox/checkbox.js +3 -2
- package/dist/schema/checkbox/checkbox.js.map +1 -1
- package/dist/schema/checkbox/checkbox.mjs +3 -2
- package/dist/schema/checkbox/checkbox.mjs.map +1 -1
- package/dist/schema/checkbox/index.d.mts +2 -1
- package/dist/schema/checkbox/index.d.ts +2 -1
- package/dist/schema/checkbox/index.js +3 -2
- package/dist/schema/checkbox/index.js.map +1 -1
- package/dist/schema/checkbox/index.mjs +3 -2
- package/dist/schema/checkbox/index.mjs.map +1 -1
- package/dist/schema/datamodel/datamodel.d.mts +13 -0
- package/dist/schema/datamodel/datamodel.d.ts +13 -0
- package/dist/schema/datamodel/datamodel.js +49 -0
- package/dist/schema/datamodel/datamodel.js.map +1 -0
- package/dist/schema/datamodel/datamodel.mjs +24 -0
- package/dist/schema/datamodel/datamodel.mjs.map +1 -0
- package/dist/schema/datamodel/index.d.mts +4 -0
- package/dist/schema/datamodel/index.d.ts +4 -0
- package/dist/schema/datamodel/index.js +51 -0
- package/dist/schema/datamodel/index.js.map +1 -0
- package/dist/schema/datamodel/index.mjs +24 -0
- package/dist/schema/datamodel/index.mjs.map +1 -0
- package/dist/schema/datasource/datasource.d.mts +25 -0
- package/dist/schema/datasource/datasource.d.ts +25 -0
- package/dist/schema/datasource/datasource.js +52 -0
- package/dist/schema/datasource/datasource.js.map +1 -0
- package/dist/schema/datasource/datasource.mjs +27 -0
- package/dist/schema/datasource/datasource.mjs.map +1 -0
- package/dist/schema/datasource/index.d.mts +4 -0
- package/dist/schema/datasource/index.d.ts +4 -0
- package/dist/schema/datasource/index.js +54 -0
- package/dist/schema/datasource/index.js.map +1 -0
- package/dist/schema/datasource/index.mjs +27 -0
- package/dist/schema/datasource/index.mjs.map +1 -0
- package/dist/schema/dialog/condition.d.mts +11 -0
- package/dist/schema/dialog/condition.d.ts +11 -0
- package/dist/schema/dialog/condition.js +72 -0
- package/dist/schema/dialog/condition.js.map +1 -0
- package/dist/schema/dialog/condition.mjs +49 -0
- package/dist/schema/dialog/condition.mjs.map +1 -0
- package/dist/schema/dialog/dialog.d.mts +28 -8
- package/dist/schema/dialog/dialog.d.ts +28 -8
- package/dist/schema/dialog/dialog.js +152 -63
- package/dist/schema/dialog/dialog.js.map +1 -1
- package/dist/schema/dialog/dialog.mjs +153 -64
- package/dist/schema/dialog/dialog.mjs.map +1 -1
- package/dist/schema/dialog/index.d.mts +3 -4
- package/dist/schema/dialog/index.d.ts +3 -4
- package/dist/schema/dialog/index.js +155 -64
- package/dist/schema/dialog/index.js.map +1 -1
- package/dist/schema/dialog/index.mjs +155 -64
- package/dist/schema/dialog/index.mjs.map +1 -1
- package/dist/schema/dialog/tabs.d.mts +20 -0
- package/dist/schema/dialog/tabs.d.ts +20 -0
- package/dist/schema/dialog/tabs.js +74 -0
- package/dist/schema/dialog/tabs.js.map +1 -0
- package/dist/schema/dialog/tabs.mjs +51 -0
- package/dist/schema/dialog/tabs.mjs.map +1 -0
- package/dist/schema/dialog/types.d.mts +3 -0
- package/dist/schema/dialog/types.d.ts +3 -0
- package/dist/schema/dialog/types.js +19 -0
- package/dist/schema/dialog/types.js.map +1 -0
- package/dist/schema/dialog/types.mjs +1 -0
- package/dist/schema/dialog/types.mjs.map +1 -0
- package/dist/schema/dynamic/dynamic.d.mts +4 -17
- package/dist/schema/dynamic/dynamic.d.ts +4 -17
- package/dist/schema/dynamic/dynamic.js +1 -1
- package/dist/schema/dynamic/dynamic.js.map +1 -1
- package/dist/schema/dynamic/dynamic.mjs +1 -1
- package/dist/schema/dynamic/dynamic.mjs.map +1 -1
- package/dist/schema/dynamic/index.d.mts +2 -1
- package/dist/schema/dynamic/index.d.ts +2 -1
- package/dist/schema/dynamic/index.js +1 -1
- package/dist/schema/dynamic/index.js.map +1 -1
- package/dist/schema/dynamic/index.mjs +1 -1
- package/dist/schema/dynamic/index.mjs.map +1 -1
- package/dist/schema/group/group.d.mts +21 -0
- package/dist/schema/group/group.d.ts +21 -0
- package/dist/schema/group/group.js +50 -0
- package/dist/schema/group/group.js.map +1 -0
- package/dist/schema/group/group.mjs +25 -0
- package/dist/schema/group/group.mjs.map +1 -0
- package/dist/schema/group/index.d.mts +5 -0
- package/dist/schema/group/index.d.ts +5 -0
- package/dist/schema/group/index.js +52 -0
- package/dist/schema/group/index.js.map +1 -0
- package/dist/schema/group/index.mjs +25 -0
- package/dist/schema/group/index.mjs.map +1 -0
- package/dist/schema/hidden/hidden.d.mts +2 -1
- package/dist/schema/hidden/hidden.d.ts +2 -1
- package/dist/schema/hidden/index.d.mts +2 -1
- package/dist/schema/hidden/index.d.ts +2 -1
- package/dist/schema/image/image.d.mts +2 -2
- package/dist/schema/image/image.d.ts +2 -2
- package/dist/schema/image/image.js +3 -3
- package/dist/schema/image/image.js.map +1 -1
- package/dist/schema/image/image.mjs +3 -3
- package/dist/schema/image/image.mjs.map +1 -1
- package/dist/schema/image/index.d.mts +2 -1
- package/dist/schema/image/index.d.ts +2 -1
- package/dist/schema/image/index.js +3 -3
- package/dist/schema/image/index.js.map +1 -1
- package/dist/schema/image/index.mjs +3 -3
- package/dist/schema/image/index.mjs.map +1 -1
- package/dist/schema/multifield/index.d.mts +2 -1
- package/dist/schema/multifield/index.d.ts +2 -1
- package/dist/schema/multifield/index.js +2 -1
- package/dist/schema/multifield/index.js.map +1 -1
- package/dist/schema/multifield/index.mjs +2 -1
- package/dist/schema/multifield/index.mjs.map +1 -1
- package/dist/schema/multifield/multifield.d.mts +2 -1
- package/dist/schema/multifield/multifield.d.ts +2 -1
- package/dist/schema/multifield/multifield.js +2 -1
- package/dist/schema/multifield/multifield.js.map +1 -1
- package/dist/schema/multifield/multifield.mjs +2 -1
- package/dist/schema/multifield/multifield.mjs.map +1 -1
- package/dist/schema/object/index.d.mts +1 -4
- package/dist/schema/object/index.d.ts +1 -4
- package/dist/schema/object/object.d.mts +1 -4
- package/dist/schema/object/object.d.ts +1 -4
- package/dist/schema/optional/index.d.mts +2 -2
- package/dist/schema/optional/index.d.ts +2 -2
- package/dist/schema/optional/optional.d.mts +2 -25
- package/dist/schema/optional/optional.d.ts +2 -25
- package/dist/schema/pathbrowser/index.d.mts +2 -1
- package/dist/schema/pathbrowser/index.d.ts +2 -1
- package/dist/schema/pathbrowser/index.js +3 -2
- package/dist/schema/pathbrowser/index.js.map +1 -1
- package/dist/schema/pathbrowser/index.mjs +3 -2
- package/dist/schema/pathbrowser/index.mjs.map +1 -1
- package/dist/schema/pathbrowser/pathbrowser.d.mts +2 -1
- package/dist/schema/pathbrowser/pathbrowser.d.ts +2 -1
- package/dist/schema/pathbrowser/pathbrowser.js +3 -2
- package/dist/schema/pathbrowser/pathbrowser.js.map +1 -1
- package/dist/schema/pathbrowser/pathbrowser.mjs +3 -2
- package/dist/schema/pathbrowser/pathbrowser.mjs.map +1 -1
- package/dist/schema/rte/index.d.mts +2 -1
- package/dist/schema/rte/index.d.ts +2 -1
- package/dist/schema/rte/index.js +3 -2
- package/dist/schema/rte/index.js.map +1 -1
- package/dist/schema/rte/index.mjs +3 -2
- package/dist/schema/rte/index.mjs.map +1 -1
- package/dist/schema/rte/rte.d.mts +3 -2
- package/dist/schema/rte/rte.d.ts +3 -2
- package/dist/schema/rte/rte.js +3 -2
- package/dist/schema/rte/rte.js.map +1 -1
- package/dist/schema/rte/rte.mjs +3 -2
- package/dist/schema/rte/rte.mjs.map +1 -1
- package/dist/schema/select/index.d.mts +2 -1
- package/dist/schema/select/index.d.ts +2 -1
- package/dist/schema/select/index.js +8 -4
- package/dist/schema/select/index.js.map +1 -1
- package/dist/schema/select/index.mjs +8 -4
- package/dist/schema/select/index.mjs.map +1 -1
- package/dist/schema/select/select.d.mts +15 -3
- package/dist/schema/select/select.d.ts +15 -3
- package/dist/schema/select/select.js +8 -4
- package/dist/schema/select/select.js.map +1 -1
- package/dist/schema/select/select.mjs +8 -4
- package/dist/schema/select/select.mjs.map +1 -1
- package/dist/schema/text/index.d.mts +2 -1
- package/dist/schema/text/index.d.ts +2 -1
- package/dist/schema/text/index.js +3 -2
- package/dist/schema/text/index.js.map +1 -1
- package/dist/schema/text/index.mjs +3 -2
- package/dist/schema/text/index.mjs.map +1 -1
- package/dist/schema/text/text.d.mts +3 -2
- package/dist/schema/text/text.d.ts +3 -2
- package/dist/schema/text/text.js +3 -2
- package/dist/schema/text/text.js.map +1 -1
- package/dist/schema/text/text.mjs +3 -2
- package/dist/schema/text/text.mjs.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/infer.d.mts +2 -1
- package/dist/types/infer.d.ts +2 -1
- package/dist/types/object.d.mts +2 -45
- package/dist/types/object.d.ts +2 -45
- package/dist/types/object.js.map +1 -1
- package/dist/types/schema.d.mts +3 -43
- package/dist/types/schema.d.ts +3 -43
- package/dist/types/schema.js.map +1 -1
- package/dist/types/utils.d.mts +52 -2
- package/dist/types/utils.d.ts +52 -2
- package/dist/types/utils.js.map +1 -1
- package/dist/types-B8taWezd.d.mts +131 -0
- package/dist/types-rfg_xywc.d.ts +131 -0
- package/dist/utils/pathToArray.d.mts +7 -0
- package/dist/utils/pathToArray.d.ts +7 -0
- package/dist/utils/pathToArray.js +42 -0
- package/dist/utils/pathToArray.js.map +1 -0
- package/dist/utils/pathToArray.mjs +17 -0
- package/dist/utils/pathToArray.mjs.map +1 -0
- package/package.json +8 -8
- package/LICENSE.md +0 -201
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseSchema, BaseFieldInput } from '../../types
|
|
1
|
+
import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
|
|
2
2
|
import '../../types/webcomponent.mjs';
|
|
3
|
+
import '../../types/utils.mjs';
|
|
3
4
|
|
|
4
5
|
interface RichTextEditorSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
5
6
|
/**
|
|
@@ -8,7 +9,7 @@ interface RichTextEditorSchema<TOutput extends string = string> extends BaseSche
|
|
|
8
9
|
type: 'richtexteditor';
|
|
9
10
|
}
|
|
10
11
|
interface RichTextEditorInput extends BaseFieldInput {
|
|
11
|
-
placeholder
|
|
12
|
+
placeholder?: string;
|
|
12
13
|
}
|
|
13
14
|
declare function rte(input: RichTextEditorInput): RichTextEditorSchema;
|
|
14
15
|
|
package/dist/schema/rte/rte.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseSchema, BaseFieldInput } from '../../types
|
|
1
|
+
import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
|
|
2
2
|
import '../../types/webcomponent.js';
|
|
3
|
+
import '../../types/utils.js';
|
|
3
4
|
|
|
4
5
|
interface RichTextEditorSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
5
6
|
/**
|
|
@@ -8,7 +9,7 @@ interface RichTextEditorSchema<TOutput extends string = string> extends BaseSche
|
|
|
8
9
|
type: 'richtexteditor';
|
|
9
10
|
}
|
|
10
11
|
interface RichTextEditorInput extends BaseFieldInput {
|
|
11
|
-
placeholder
|
|
12
|
+
placeholder?: string;
|
|
12
13
|
}
|
|
13
14
|
declare function rte(input: RichTextEditorInput): RichTextEditorSchema;
|
|
14
15
|
|
package/dist/schema/rte/rte.js
CHANGED
|
@@ -24,7 +24,7 @@ __export(rte_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(rte_exports);
|
|
26
26
|
function rte(input) {
|
|
27
|
-
const { placeholder, label, tooltip } = input;
|
|
27
|
+
const { placeholder, label, tooltip, required } = input;
|
|
28
28
|
return {
|
|
29
29
|
type: "richtexteditor",
|
|
30
30
|
_parse() {
|
|
@@ -32,7 +32,8 @@ function rte(input) {
|
|
|
32
32
|
type: "richtexteditor",
|
|
33
33
|
label,
|
|
34
34
|
placeholder,
|
|
35
|
-
tooltip
|
|
35
|
+
tooltip,
|
|
36
|
+
required
|
|
36
37
|
};
|
|
37
38
|
},
|
|
38
39
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/rte/rte.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface RichTextEditorSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'richtexteditor';\n}\n\ninterface RichTextEditorInput extends BaseFieldInput {\n placeholder
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/rte/rte.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface RichTextEditorSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'richtexteditor';\n}\n\ninterface RichTextEditorInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function rte(input: RichTextEditorInput): RichTextEditorSchema {\n const {placeholder, label, tooltip, required} = input;\n\n return {\n type: 'richtexteditor',\n _parse() {\n return {\n type: 'richtexteditor',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,IAAI,OAAkD;AACpE,QAAM,EAAC,aAAa,OAAO,SAAS,SAAQ,IAAI;AAEhD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
package/dist/schema/rte/rte.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/schema/rte/rte.ts
|
|
2
2
|
function rte(input) {
|
|
3
|
-
const { placeholder, label, tooltip } = input;
|
|
3
|
+
const { placeholder, label, tooltip, required } = input;
|
|
4
4
|
return {
|
|
5
5
|
type: "richtexteditor",
|
|
6
6
|
_parse() {
|
|
@@ -8,7 +8,8 @@ function rte(input) {
|
|
|
8
8
|
type: "richtexteditor",
|
|
9
9
|
label,
|
|
10
10
|
placeholder,
|
|
11
|
-
tooltip
|
|
11
|
+
tooltip,
|
|
12
|
+
required
|
|
12
13
|
};
|
|
13
14
|
},
|
|
14
15
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/rte/rte.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface RichTextEditorSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'richtexteditor';\n}\n\ninterface RichTextEditorInput extends BaseFieldInput {\n placeholder
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/rte/rte.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface RichTextEditorSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'richtexteditor';\n}\n\ninterface RichTextEditorInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function rte(input: RichTextEditorInput): RichTextEditorSchema {\n const {placeholder, label, tooltip, required} = input;\n\n return {\n type: 'richtexteditor',\n _parse() {\n return {\n type: 'richtexteditor',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";AAaO,SAAS,IAAI,OAAkD;AACpE,QAAM,EAAC,aAAa,OAAO,SAAS,SAAQ,IAAI;AAEhD,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -26,21 +26,25 @@ module.exports = __toCommonJS(select_exports);
|
|
|
26
26
|
|
|
27
27
|
// src/schema/select/select.ts
|
|
28
28
|
function select(input) {
|
|
29
|
-
const { label, values, tooltip } = input;
|
|
29
|
+
const { label, values, tooltip, placeholder, multiple = false, required } = input;
|
|
30
30
|
return {
|
|
31
31
|
type: "select",
|
|
32
32
|
_parse() {
|
|
33
33
|
return {
|
|
34
34
|
type: "select",
|
|
35
35
|
label,
|
|
36
|
+
multiple,
|
|
36
37
|
values,
|
|
37
|
-
tooltip
|
|
38
|
+
tooltip,
|
|
39
|
+
placeholder,
|
|
40
|
+
required
|
|
38
41
|
};
|
|
39
42
|
},
|
|
40
43
|
_primitive() {
|
|
41
|
-
return "string";
|
|
44
|
+
return multiple ? "json" : "string";
|
|
42
45
|
},
|
|
43
|
-
...input
|
|
46
|
+
...input,
|
|
47
|
+
multiple
|
|
44
48
|
};
|
|
45
49
|
}
|
|
46
50
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/select/index.ts","../../../src/schema/select/select.ts"],"sourcesContent":["export * from './select'","import { BaseFieldInput,
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/select/index.ts","../../../src/schema/select/select.ts"],"sourcesContent":["export * from './select'","import { BaseFieldInput, BaseSchema } from '../../types';\n\ntype ReadonlyObject<T> = {\n readonly [K in keyof T]: T[K];\n};\n\nexport interface SelectSchema<T, TMultiple extends boolean = false> extends BaseSchema<TMultiple extends true ? T[] : T> {\n /**\n * The schema type.\n */\n type: 'select';\n multiple: TMultiple\n}\n\ninterface SelectInput extends BaseFieldInput {\n placeholder?: string;\n multiple?: boolean;\n values: {\n value: string;\n label: string;\n }[];\n}\n\n\ntype ValuesType<T extends { values: readonly { value: string }[] }> = T['values'][number]['value'];\n\nexport function select<const T extends SelectInput, TMultiple extends boolean= T['multiple'] extends true ? true : false>(input: T): SelectSchema<ValuesType<ReadonlyObject<T>>, TMultiple>{\n const { label, values, tooltip, placeholder, multiple = false, required } = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n multiple,\n values,\n tooltip,\n placeholder,\n required\n };\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n multiple: multiple as TMultiple,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC0BO,SAAS,OAA0G,OAAiE;AACzL,QAAM,EAAE,OAAO,QAAQ,SAAS,aAAa,WAAW,OAAO,SAAS,IAAI;AAE5E,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
// src/schema/select/select.ts
|
|
2
2
|
function select(input) {
|
|
3
|
-
const { label, values, tooltip } = input;
|
|
3
|
+
const { label, values, tooltip, placeholder, multiple = false, required } = input;
|
|
4
4
|
return {
|
|
5
5
|
type: "select",
|
|
6
6
|
_parse() {
|
|
7
7
|
return {
|
|
8
8
|
type: "select",
|
|
9
9
|
label,
|
|
10
|
+
multiple,
|
|
10
11
|
values,
|
|
11
|
-
tooltip
|
|
12
|
+
tooltip,
|
|
13
|
+
placeholder,
|
|
14
|
+
required
|
|
12
15
|
};
|
|
13
16
|
},
|
|
14
17
|
_primitive() {
|
|
15
|
-
return "string";
|
|
18
|
+
return multiple ? "json" : "string";
|
|
16
19
|
},
|
|
17
|
-
...input
|
|
20
|
+
...input,
|
|
21
|
+
multiple
|
|
18
22
|
};
|
|
19
23
|
}
|
|
20
24
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/select/select.ts"],"sourcesContent":["import { BaseFieldInput,
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/select/select.ts"],"sourcesContent":["import { BaseFieldInput, BaseSchema } from '../../types';\n\ntype ReadonlyObject<T> = {\n readonly [K in keyof T]: T[K];\n};\n\nexport interface SelectSchema<T, TMultiple extends boolean = false> extends BaseSchema<TMultiple extends true ? T[] : T> {\n /**\n * The schema type.\n */\n type: 'select';\n multiple: TMultiple\n}\n\ninterface SelectInput extends BaseFieldInput {\n placeholder?: string;\n multiple?: boolean;\n values: {\n value: string;\n label: string;\n }[];\n}\n\n\ntype ValuesType<T extends { values: readonly { value: string }[] }> = T['values'][number]['value'];\n\nexport function select<const T extends SelectInput, TMultiple extends boolean= T['multiple'] extends true ? true : false>(input: T): SelectSchema<ValuesType<ReadonlyObject<T>>, TMultiple>{\n const { label, values, tooltip, placeholder, multiple = false, required } = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n multiple,\n values,\n tooltip,\n placeholder,\n required\n };\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n multiple: multiple as TMultiple,\n };\n}\n"],"mappings":";AA0BO,SAAS,OAA0G,OAAiE;AACzL,QAAM,EAAE,OAAO,QAAQ,SAAS,aAAa,WAAW,OAAO,SAAS,IAAI;AAE5E,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import { BaseSchema, BaseFieldInput } from '../../types
|
|
1
|
+
import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
|
|
2
2
|
import '../../types/webcomponent.mjs';
|
|
3
|
+
import '../../types/utils.mjs';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
type ReadonlyObject<T> = {
|
|
6
|
+
readonly [K in keyof T]: T[K];
|
|
7
|
+
};
|
|
8
|
+
interface SelectSchema<T, TMultiple extends boolean = false> extends BaseSchema<TMultiple extends true ? T[] : T> {
|
|
5
9
|
/**
|
|
6
10
|
* The schema type.
|
|
7
11
|
*/
|
|
8
12
|
type: 'select';
|
|
13
|
+
multiple: TMultiple;
|
|
9
14
|
}
|
|
10
15
|
interface SelectInput extends BaseFieldInput {
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
multiple?: boolean;
|
|
11
18
|
values: {
|
|
12
19
|
value: string;
|
|
13
20
|
label: string;
|
|
14
21
|
}[];
|
|
15
22
|
}
|
|
16
|
-
|
|
23
|
+
type ValuesType<T extends {
|
|
24
|
+
values: readonly {
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
}> = T['values'][number]['value'];
|
|
28
|
+
declare function select<const T extends SelectInput, TMultiple extends boolean = T['multiple'] extends true ? true : false>(input: T): SelectSchema<ValuesType<ReadonlyObject<T>>, TMultiple>;
|
|
17
29
|
|
|
18
30
|
export { type SelectSchema, select };
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import { BaseSchema, BaseFieldInput } from '../../types
|
|
1
|
+
import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
|
|
2
2
|
import '../../types/webcomponent.js';
|
|
3
|
+
import '../../types/utils.js';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
type ReadonlyObject<T> = {
|
|
6
|
+
readonly [K in keyof T]: T[K];
|
|
7
|
+
};
|
|
8
|
+
interface SelectSchema<T, TMultiple extends boolean = false> extends BaseSchema<TMultiple extends true ? T[] : T> {
|
|
5
9
|
/**
|
|
6
10
|
* The schema type.
|
|
7
11
|
*/
|
|
8
12
|
type: 'select';
|
|
13
|
+
multiple: TMultiple;
|
|
9
14
|
}
|
|
10
15
|
interface SelectInput extends BaseFieldInput {
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
multiple?: boolean;
|
|
11
18
|
values: {
|
|
12
19
|
value: string;
|
|
13
20
|
label: string;
|
|
14
21
|
}[];
|
|
15
22
|
}
|
|
16
|
-
|
|
23
|
+
type ValuesType<T extends {
|
|
24
|
+
values: readonly {
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
}> = T['values'][number]['value'];
|
|
28
|
+
declare function select<const T extends SelectInput, TMultiple extends boolean = T['multiple'] extends true ? true : false>(input: T): SelectSchema<ValuesType<ReadonlyObject<T>>, TMultiple>;
|
|
17
29
|
|
|
18
30
|
export { type SelectSchema, select };
|
|
@@ -24,21 +24,25 @@ __export(select_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(select_exports);
|
|
26
26
|
function select(input) {
|
|
27
|
-
const { label, values, tooltip } = input;
|
|
27
|
+
const { label, values, tooltip, placeholder, multiple = false, required } = input;
|
|
28
28
|
return {
|
|
29
29
|
type: "select",
|
|
30
30
|
_parse() {
|
|
31
31
|
return {
|
|
32
32
|
type: "select",
|
|
33
33
|
label,
|
|
34
|
+
multiple,
|
|
34
35
|
values,
|
|
35
|
-
tooltip
|
|
36
|
+
tooltip,
|
|
37
|
+
placeholder,
|
|
38
|
+
required
|
|
36
39
|
};
|
|
37
40
|
},
|
|
38
41
|
_primitive() {
|
|
39
|
-
return "string";
|
|
42
|
+
return multiple ? "json" : "string";
|
|
40
43
|
},
|
|
41
|
-
...input
|
|
44
|
+
...input,
|
|
45
|
+
multiple
|
|
42
46
|
};
|
|
43
47
|
}
|
|
44
48
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/select/select.ts"],"sourcesContent":["import { BaseFieldInput,
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/select/select.ts"],"sourcesContent":["import { BaseFieldInput, BaseSchema } from '../../types';\n\ntype ReadonlyObject<T> = {\n readonly [K in keyof T]: T[K];\n};\n\nexport interface SelectSchema<T, TMultiple extends boolean = false> extends BaseSchema<TMultiple extends true ? T[] : T> {\n /**\n * The schema type.\n */\n type: 'select';\n multiple: TMultiple\n}\n\ninterface SelectInput extends BaseFieldInput {\n placeholder?: string;\n multiple?: boolean;\n values: {\n value: string;\n label: string;\n }[];\n}\n\n\ntype ValuesType<T extends { values: readonly { value: string }[] }> = T['values'][number]['value'];\n\nexport function select<const T extends SelectInput, TMultiple extends boolean= T['multiple'] extends true ? true : false>(input: T): SelectSchema<ValuesType<ReadonlyObject<T>>, TMultiple>{\n const { label, values, tooltip, placeholder, multiple = false, required } = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n multiple,\n values,\n tooltip,\n placeholder,\n required\n };\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n multiple: multiple as TMultiple,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BO,SAAS,OAA0G,OAAiE;AACzL,QAAM,EAAE,OAAO,QAAQ,SAAS,aAAa,WAAW,OAAO,SAAS,IAAI;AAE5E,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
// src/schema/select/select.ts
|
|
2
2
|
function select(input) {
|
|
3
|
-
const { label, values, tooltip } = input;
|
|
3
|
+
const { label, values, tooltip, placeholder, multiple = false, required } = input;
|
|
4
4
|
return {
|
|
5
5
|
type: "select",
|
|
6
6
|
_parse() {
|
|
7
7
|
return {
|
|
8
8
|
type: "select",
|
|
9
9
|
label,
|
|
10
|
+
multiple,
|
|
10
11
|
values,
|
|
11
|
-
tooltip
|
|
12
|
+
tooltip,
|
|
13
|
+
placeholder,
|
|
14
|
+
required
|
|
12
15
|
};
|
|
13
16
|
},
|
|
14
17
|
_primitive() {
|
|
15
|
-
return "string";
|
|
18
|
+
return multiple ? "json" : "string";
|
|
16
19
|
},
|
|
17
|
-
...input
|
|
20
|
+
...input,
|
|
21
|
+
multiple
|
|
18
22
|
};
|
|
19
23
|
}
|
|
20
24
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/select/select.ts"],"sourcesContent":["import { BaseFieldInput,
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/select/select.ts"],"sourcesContent":["import { BaseFieldInput, BaseSchema } from '../../types';\n\ntype ReadonlyObject<T> = {\n readonly [K in keyof T]: T[K];\n};\n\nexport interface SelectSchema<T, TMultiple extends boolean = false> extends BaseSchema<TMultiple extends true ? T[] : T> {\n /**\n * The schema type.\n */\n type: 'select';\n multiple: TMultiple\n}\n\ninterface SelectInput extends BaseFieldInput {\n placeholder?: string;\n multiple?: boolean;\n values: {\n value: string;\n label: string;\n }[];\n}\n\n\ntype ValuesType<T extends { values: readonly { value: string }[] }> = T['values'][number]['value'];\n\nexport function select<const T extends SelectInput, TMultiple extends boolean= T['multiple'] extends true ? true : false>(input: T): SelectSchema<ValuesType<ReadonlyObject<T>>, TMultiple>{\n const { label, values, tooltip, placeholder, multiple = false, required } = input;\n\n return {\n type: 'select',\n _parse() {\n return {\n type: 'select',\n label,\n multiple,\n values,\n tooltip,\n placeholder,\n required\n };\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n multiple: multiple as TMultiple,\n };\n}\n"],"mappings":";AA0BO,SAAS,OAA0G,OAAiE;AACzL,QAAM,EAAE,OAAO,QAAQ,SAAS,aAAa,WAAW,OAAO,SAAS,IAAI;AAE5E,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
|
|
@@ -26,7 +26,7 @@ module.exports = __toCommonJS(text_exports);
|
|
|
26
26
|
|
|
27
27
|
// src/schema/text/text.ts
|
|
28
28
|
function text(input) {
|
|
29
|
-
const { placeholder, label, tooltip } = input;
|
|
29
|
+
const { placeholder, label, tooltip, required } = input;
|
|
30
30
|
return {
|
|
31
31
|
type: "textfield",
|
|
32
32
|
_parse() {
|
|
@@ -34,7 +34,8 @@ function text(input) {
|
|
|
34
34
|
type: "textfield",
|
|
35
35
|
label,
|
|
36
36
|
placeholder,
|
|
37
|
-
tooltip
|
|
37
|
+
tooltip,
|
|
38
|
+
required
|
|
38
39
|
};
|
|
39
40
|
},
|
|
40
41
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/text/index.ts","../../../src/schema/text/text.ts"],"sourcesContent":["export * from './text'","import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'textfield';\n}\n\ninterface TextInput extends BaseFieldInput {\n placeholder
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/text/index.ts","../../../src/schema/text/text.ts"],"sourcesContent":["export * from './text'","import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'textfield';\n}\n\ninterface TextInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function text(input: TextInput): TextSchema {\n const {placeholder, label,tooltip, required} = input;\n\n return {\n type: 'textfield',\n _parse() {\n return {\n type: 'textfield',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaO,SAAS,KAAK,OAA8B;AACjD,QAAM,EAAC,aAAa,OAAM,SAAS,SAAQ,IAAI;AAE/C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/schema/text/text.ts
|
|
2
2
|
function text(input) {
|
|
3
|
-
const { placeholder, label, tooltip } = input;
|
|
3
|
+
const { placeholder, label, tooltip, required } = input;
|
|
4
4
|
return {
|
|
5
5
|
type: "textfield",
|
|
6
6
|
_parse() {
|
|
@@ -8,7 +8,8 @@ function text(input) {
|
|
|
8
8
|
type: "textfield",
|
|
9
9
|
label,
|
|
10
10
|
placeholder,
|
|
11
|
-
tooltip
|
|
11
|
+
tooltip,
|
|
12
|
+
required
|
|
12
13
|
};
|
|
13
14
|
},
|
|
14
15
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/text/text.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'textfield';\n}\n\ninterface TextInput extends BaseFieldInput {\n placeholder
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/text/text.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'textfield';\n}\n\ninterface TextInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function text(input: TextInput): TextSchema {\n const {placeholder, label,tooltip, required} = input;\n\n return {\n type: 'textfield',\n _parse() {\n return {\n type: 'textfield',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";AAaO,SAAS,KAAK,OAA8B;AACjD,QAAM,EAAC,aAAa,OAAM,SAAS,SAAQ,IAAI;AAE/C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseSchema, BaseFieldInput } from '../../types
|
|
1
|
+
import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
|
|
2
2
|
import '../../types/webcomponent.mjs';
|
|
3
|
+
import '../../types/utils.mjs';
|
|
3
4
|
|
|
4
5
|
interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
5
6
|
/**
|
|
@@ -8,7 +9,7 @@ interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput
|
|
|
8
9
|
type: 'textfield';
|
|
9
10
|
}
|
|
10
11
|
interface TextInput extends BaseFieldInput {
|
|
11
|
-
placeholder
|
|
12
|
+
placeholder?: string;
|
|
12
13
|
}
|
|
13
14
|
declare function text(input: TextInput): TextSchema;
|
|
14
15
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseSchema, BaseFieldInput } from '../../types
|
|
1
|
+
import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
|
|
2
2
|
import '../../types/webcomponent.js';
|
|
3
|
+
import '../../types/utils.js';
|
|
3
4
|
|
|
4
5
|
interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
5
6
|
/**
|
|
@@ -8,7 +9,7 @@ interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput
|
|
|
8
9
|
type: 'textfield';
|
|
9
10
|
}
|
|
10
11
|
interface TextInput extends BaseFieldInput {
|
|
11
|
-
placeholder
|
|
12
|
+
placeholder?: string;
|
|
12
13
|
}
|
|
13
14
|
declare function text(input: TextInput): TextSchema;
|
|
14
15
|
|
package/dist/schema/text/text.js
CHANGED
|
@@ -24,7 +24,7 @@ __export(text_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(text_exports);
|
|
26
26
|
function text(input) {
|
|
27
|
-
const { placeholder, label, tooltip } = input;
|
|
27
|
+
const { placeholder, label, tooltip, required } = input;
|
|
28
28
|
return {
|
|
29
29
|
type: "textfield",
|
|
30
30
|
_parse() {
|
|
@@ -32,7 +32,8 @@ function text(input) {
|
|
|
32
32
|
type: "textfield",
|
|
33
33
|
label,
|
|
34
34
|
placeholder,
|
|
35
|
-
tooltip
|
|
35
|
+
tooltip,
|
|
36
|
+
required
|
|
36
37
|
};
|
|
37
38
|
},
|
|
38
39
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/text/text.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'textfield';\n}\n\ninterface TextInput extends BaseFieldInput {\n placeholder
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/text/text.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'textfield';\n}\n\ninterface TextInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function text(input: TextInput): TextSchema {\n const {placeholder, label,tooltip, required} = input;\n\n return {\n type: 'textfield',\n _parse() {\n return {\n type: 'textfield',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,KAAK,OAA8B;AACjD,QAAM,EAAC,aAAa,OAAM,SAAS,SAAQ,IAAI;AAE/C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/schema/text/text.ts
|
|
2
2
|
function text(input) {
|
|
3
|
-
const { placeholder, label, tooltip } = input;
|
|
3
|
+
const { placeholder, label, tooltip, required } = input;
|
|
4
4
|
return {
|
|
5
5
|
type: "textfield",
|
|
6
6
|
_parse() {
|
|
@@ -8,7 +8,8 @@ function text(input) {
|
|
|
8
8
|
type: "textfield",
|
|
9
9
|
label,
|
|
10
10
|
placeholder,
|
|
11
|
-
tooltip
|
|
11
|
+
tooltip,
|
|
12
|
+
required
|
|
12
13
|
};
|
|
13
14
|
},
|
|
14
15
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/text/text.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'textfield';\n}\n\ninterface TextInput extends BaseFieldInput {\n placeholder
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/text/text.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface TextSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'textfield';\n}\n\ninterface TextInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function text(input: TextInput): TextSchema {\n const {placeholder, label,tooltip, required} = input;\n\n return {\n type: 'textfield',\n _parse() {\n return {\n type: 'textfield',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";AAaO,SAAS,KAAK,OAA8B;AACjD,QAAM,EAAC,aAAa,OAAM,SAAS,SAAQ,IAAI;AAE/C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { GetServerSideProps } from './props.mjs';
|
|
2
|
-
export { EntryMask, RequireAtLeastOne, ResolveObject } from './utils.mjs';
|
|
3
|
-
export { BaseFieldInput, BaseSchema, Output } from '
|
|
2
|
+
export { AddType, DeepPartial, EntryMask, LeavesPath, NestedPaths, NodesPath, PathValue, RequireAtLeastOne, ResolveObject, UnArray } from './utils.mjs';
|
|
3
|
+
export { d as BaseFieldInput, B as BaseSchema, e as Output } from '../types-B8taWezd.mjs';
|
|
4
4
|
export { InferOutput } from './infer.mjs';
|
|
5
5
|
export { ComponentModel } from './component.mjs';
|
|
6
6
|
import './webcomponent.mjs';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { GetServerSideProps } from './props.js';
|
|
2
|
-
export { EntryMask, RequireAtLeastOne, ResolveObject } from './utils.js';
|
|
3
|
-
export { BaseFieldInput, BaseSchema, Output } from '
|
|
2
|
+
export { AddType, DeepPartial, EntryMask, LeavesPath, NestedPaths, NodesPath, PathValue, RequireAtLeastOne, ResolveObject, UnArray } from './utils.js';
|
|
3
|
+
export { d as BaseFieldInput, B as BaseSchema, e as Output } from '../types-rfg_xywc.js';
|
|
4
4
|
export { InferOutput } from './infer.js';
|
|
5
5
|
export { ComponentModel } from './component.js';
|
|
6
6
|
import './webcomponent.js';
|
package/dist/types/infer.d.mts
CHANGED
package/dist/types/infer.d.ts
CHANGED
package/dist/types/object.d.mts
CHANGED
|
@@ -1,46 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { ResolveObject } from './utils.mjs';
|
|
4
|
-
import { DynamicZoneSchema } from '../schema/dynamic/dynamic.mjs';
|
|
1
|
+
export { f as ObjectEntries, g as ObjectOutput, S as SlotEntries } from '../types-B8taWezd.mjs';
|
|
2
|
+
import './utils.mjs';
|
|
5
3
|
import './webcomponent.mjs';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Required object keys type.
|
|
9
|
-
*/
|
|
10
|
-
type RequiredKeys<TEntries extends ObjectEntries, TObject extends EntriesOutput<TEntries>> = {
|
|
11
|
-
[TKey in keyof TEntries]: TEntries[TKey] extends OptionalSchema<any, any> ? undefined extends TObject[TKey] ? never : TKey : TKey;
|
|
12
|
-
}[keyof TEntries];
|
|
13
|
-
/**
|
|
14
|
-
* Optional object keys type.
|
|
15
|
-
*/
|
|
16
|
-
type OptionalKeys<TEntries extends ObjectEntries, TObject extends EntriesOutput<TEntries>> = {
|
|
17
|
-
[TKey in keyof TEntries]: TEntries[TKey] extends OptionalSchema<any, any> ? undefined extends TObject[TKey] ? TKey : never : never;
|
|
18
|
-
}[keyof TEntries];
|
|
19
|
-
/**
|
|
20
|
-
* Object with question marks type.
|
|
21
|
-
*/
|
|
22
|
-
type WithQuestionMarks<TEntries extends ObjectEntries, TObject extends EntriesOutput<TEntries>> = Pick<TObject, RequiredKeys<TEntries, TObject>> & Partial<Pick<TObject, OptionalKeys<TEntries, TObject>>>;
|
|
23
|
-
/**
|
|
24
|
-
* Object entries type.
|
|
25
|
-
*/
|
|
26
|
-
interface ObjectEntries {
|
|
27
|
-
[key: string]: BaseSchema;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Object entries type.
|
|
31
|
-
*/
|
|
32
|
-
interface SlotEntries {
|
|
33
|
-
[key: string]: DynamicZoneSchema;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Entries output inference type.
|
|
37
|
-
*/
|
|
38
|
-
type EntriesOutput<TEntries extends ObjectEntries> = {
|
|
39
|
-
[TKey in keyof TEntries]: Output<TEntries[TKey]>;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Object output inference type.
|
|
43
|
-
*/
|
|
44
|
-
type ObjectOutput<TEntries extends ObjectEntries> = ResolveObject<WithQuestionMarks<TEntries, EntriesOutput<TEntries>>>;
|
|
45
|
-
|
|
46
|
-
export type { ObjectEntries, ObjectOutput, SlotEntries };
|