@ethereal-nexus/core 0.2.3 → 0.3.0
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 +0 -1
- package/dist/decorators/index.d.ts +0 -1
- package/dist/decorators/webcomponent/index.d.mts +0 -1
- package/dist/decorators/webcomponent/index.d.ts +0 -1
- package/dist/decorators/webcomponent/webcomponent.d.mts +0 -1
- package/dist/decorators/webcomponent/webcomponent.d.ts +0 -1
- package/dist/functions/component/component.d.mts +0 -1
- package/dist/functions/component/component.d.ts +0 -1
- 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 +0 -1
- package/dist/functions/component/index.d.ts +0 -1
- 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 +0 -1
- package/dist/functions/index.d.ts +0 -1
- 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 +0 -1
- package/dist/functions/parse/index.d.ts +0 -1
- package/dist/functions/parse/parse.d.mts +0 -1
- package/dist/functions/parse/parse.d.ts +0 -1
- package/dist/functions/parse/parsePrimitives.d.mts +0 -1
- package/dist/functions/parse/parsePrimitives.d.ts +0 -1
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +123 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -16
- package/dist/index.mjs.map +1 -1
- package/dist/schema/calendar/calendar.d.mts +21 -0
- package/dist/schema/calendar/calendar.d.ts +21 -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 +3 -0
- package/dist/schema/calendar/index.d.ts +3 -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 +1 -0
- package/dist/schema/checkbox/checkbox.d.ts +1 -0
- 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.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 +12 -0
- package/dist/schema/datamodel/datamodel.d.ts +12 -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 +3 -0
- package/dist/schema/datamodel/index.d.ts +3 -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 +24 -0
- package/dist/schema/datasource/datasource.d.ts +24 -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 +3 -0
- package/dist/schema/datasource/index.d.ts +3 -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/dialog.d.mts +0 -1
- package/dist/schema/dialog/dialog.d.ts +0 -1
- package/dist/schema/dialog/index.d.mts +0 -1
- package/dist/schema/dialog/index.d.ts +0 -1
- package/dist/schema/dynamic/dynamic.d.mts +2 -16
- package/dist/schema/dynamic/dynamic.d.ts +2 -16
- 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.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 +20 -0
- package/dist/schema/group/group.d.ts +20 -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 +4 -0
- package/dist/schema/group/index.d.ts +4 -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/image/image.d.mts +0 -1
- package/dist/schema/image/image.d.ts +0 -1
- 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.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.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.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 +0 -1
- package/dist/schema/object/index.d.ts +0 -1
- package/dist/schema/object/object.d.mts +0 -1
- package/dist/schema/object/object.d.ts +0 -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.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.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 +1 -1
- package/dist/schema/rte/rte.d.ts +1 -1
- 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.js +6 -3
- package/dist/schema/select/index.js.map +1 -1
- package/dist/schema/select/index.mjs +6 -3
- package/dist/schema/select/index.mjs.map +1 -1
- package/dist/schema/select/select.d.mts +7 -2
- package/dist/schema/select/select.d.ts +7 -2
- package/dist/schema/select/select.js +6 -3
- package/dist/schema/select/select.js.map +1 -1
- package/dist/schema/select/select.mjs +6 -3
- package/dist/schema/select/select.mjs.map +1 -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 +1 -1
- package/dist/schema/text/text.d.ts +1 -1
- 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/object.d.mts +1 -2
- package/dist/types/object.d.ts +1 -2
- package/dist/types/object.js.map +1 -1
- package/dist/types/schema.d.mts +1 -0
- package/dist/types/schema.d.ts +1 -0
- package/dist/types/schema.js.map +1 -1
- package/package.json +7 -7
- package/LICENSE.md +0 -201
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/schema/calendar/index.ts
|
|
21
|
+
var calendar_exports = {};
|
|
22
|
+
__export(calendar_exports, {
|
|
23
|
+
calendar: () => calendar
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(calendar_exports);
|
|
26
|
+
|
|
27
|
+
// src/schema/calendar/calendar.ts
|
|
28
|
+
function calendar(input) {
|
|
29
|
+
const { valueformat, startday = 0, min, max, placeholder, label, tooltip, required } = input;
|
|
30
|
+
return {
|
|
31
|
+
type: "calendar",
|
|
32
|
+
_parse() {
|
|
33
|
+
return {
|
|
34
|
+
type: "calendar",
|
|
35
|
+
label,
|
|
36
|
+
valueformat,
|
|
37
|
+
placeholder,
|
|
38
|
+
startday,
|
|
39
|
+
tooltip,
|
|
40
|
+
min,
|
|
41
|
+
max,
|
|
42
|
+
required
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
_primitive() {
|
|
46
|
+
return "string";
|
|
47
|
+
},
|
|
48
|
+
...input
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
calendar
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/calendar/index.ts","../../../src/schema/calendar/calendar.ts"],"sourcesContent":["export * from './calendar'","import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CalendarSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'calendar';\n}\n\ninterface CalendarInput extends BaseFieldInput {\n placeholder?: string;\n valueformat: string;\n displayformat: string;\n headerformat: string;\n startday?: string;\n min?: string;\n max?: string;\n}\n\nexport function calendar(input: CalendarInput): CalendarSchema {\n const {valueformat,startday=0,min,max, placeholder, label,tooltip,required} = input;\n\n return {\n type: 'calendar',\n _parse() {\n return {\n type: 'calendar',\n label,\n valueformat,\n placeholder,\n startday,\n tooltip,\n min,\n max,\n required\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACmBO,SAAS,SAAS,OAAsC;AAC7D,QAAM,EAAC,aAAY,WAAS,GAAE,KAAI,KAAK,aAAa,OAAM,SAAQ,SAAQ,IAAI;AAE9E,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,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/schema/calendar/calendar.ts
|
|
2
|
+
function calendar(input) {
|
|
3
|
+
const { valueformat, startday = 0, min, max, placeholder, label, tooltip, required } = input;
|
|
4
|
+
return {
|
|
5
|
+
type: "calendar",
|
|
6
|
+
_parse() {
|
|
7
|
+
return {
|
|
8
|
+
type: "calendar",
|
|
9
|
+
label,
|
|
10
|
+
valueformat,
|
|
11
|
+
placeholder,
|
|
12
|
+
startday,
|
|
13
|
+
tooltip,
|
|
14
|
+
min,
|
|
15
|
+
max,
|
|
16
|
+
required
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
_primitive() {
|
|
20
|
+
return "string";
|
|
21
|
+
},
|
|
22
|
+
...input
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
calendar
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/calendar/calendar.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CalendarSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'calendar';\n}\n\ninterface CalendarInput extends BaseFieldInput {\n placeholder?: string;\n valueformat: string;\n displayformat: string;\n headerformat: string;\n startday?: string;\n min?: string;\n max?: string;\n}\n\nexport function calendar(input: CalendarInput): CalendarSchema {\n const {valueformat,startday=0,min,max, placeholder, label,tooltip,required} = input;\n\n return {\n type: 'calendar',\n _parse() {\n return {\n type: 'calendar',\n label,\n valueformat,\n placeholder,\n startday,\n tooltip,\n min,\n max,\n required\n }\n },\n _primitive() {\n return 'string'\n },\n ...input,\n }\n}"],"mappings":";AAmBO,SAAS,SAAS,OAAsC;AAC7D,QAAM,EAAC,aAAY,WAAS,GAAE,KAAI,KAAK,aAAa,OAAM,SAAQ,SAAQ,IAAI;AAE9E,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,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -24,14 +24,15 @@ __export(checkbox_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(checkbox_exports);
|
|
26
26
|
function checkbox(input) {
|
|
27
|
-
const { label, tooltip } = input;
|
|
27
|
+
const { label, tooltip, showastoggle = false } = input;
|
|
28
28
|
return {
|
|
29
29
|
type: "checkbox",
|
|
30
30
|
_parse() {
|
|
31
31
|
return {
|
|
32
32
|
type: "checkbox",
|
|
33
33
|
label,
|
|
34
|
-
tooltip
|
|
34
|
+
tooltip,
|
|
35
|
+
showastoggle
|
|
35
36
|
};
|
|
36
37
|
},
|
|
37
38
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/checkbox/checkbox.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CheckBoxSchema<TOutput extends boolean = boolean> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'checkbox';\n}\n\ninterface CheckBoxInput extends BaseFieldInput {}\n\nexport function checkbox(input: CheckBoxInput): CheckBoxSchema {\n const {label, tooltip} = input;\n\n return {\n type: 'checkbox',\n _parse() {\n return {\n type: 'checkbox',\n label,\n tooltip,\n }\n },\n _primitive() {\n return 'boolean'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/checkbox/checkbox.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CheckBoxSchema<TOutput extends boolean = boolean> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'checkbox';\n}\n\ninterface CheckBoxInput extends BaseFieldInput {\n showastoggle?: boolean\n}\n\nexport function checkbox(input: CheckBoxInput): CheckBoxSchema {\n const {label, tooltip, showastoggle = false} = input;\n\n return {\n type: 'checkbox',\n _parse() {\n return {\n type: 'checkbox',\n label,\n tooltip,\n showastoggle\n }\n },\n _primitive() {\n return 'boolean'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaO,SAAS,SAAS,OAAsC;AAC7D,QAAM,EAAC,OAAO,SAAS,eAAe,MAAK,IAAI;AAE/C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// src/schema/checkbox/checkbox.ts
|
|
2
2
|
function checkbox(input) {
|
|
3
|
-
const { label, tooltip } = input;
|
|
3
|
+
const { label, tooltip, showastoggle = false } = input;
|
|
4
4
|
return {
|
|
5
5
|
type: "checkbox",
|
|
6
6
|
_parse() {
|
|
7
7
|
return {
|
|
8
8
|
type: "checkbox",
|
|
9
9
|
label,
|
|
10
|
-
tooltip
|
|
10
|
+
tooltip,
|
|
11
|
+
showastoggle
|
|
11
12
|
};
|
|
12
13
|
},
|
|
13
14
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/checkbox/checkbox.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CheckBoxSchema<TOutput extends boolean = boolean> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'checkbox';\n}\n\ninterface CheckBoxInput extends BaseFieldInput {}\n\nexport function checkbox(input: CheckBoxInput): CheckBoxSchema {\n const {label, tooltip} = input;\n\n return {\n type: 'checkbox',\n _parse() {\n return {\n type: 'checkbox',\n label,\n tooltip,\n }\n },\n _primitive() {\n return 'boolean'\n },\n ...input,\n }\n}"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/checkbox/checkbox.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CheckBoxSchema<TOutput extends boolean = boolean> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'checkbox';\n}\n\ninterface CheckBoxInput extends BaseFieldInput {\n showastoggle?: boolean\n}\n\nexport function checkbox(input: CheckBoxInput): CheckBoxSchema {\n const {label, tooltip, showastoggle = false} = input;\n\n return {\n type: 'checkbox',\n _parse() {\n return {\n type: 'checkbox',\n label,\n tooltip,\n showastoggle\n }\n },\n _primitive() {\n return 'boolean'\n },\n ...input,\n }\n}"],"mappings":";AAaO,SAAS,SAAS,OAAsC;AAC7D,QAAM,EAAC,OAAO,SAAS,eAAe,MAAK,IAAI;AAE/C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -26,14 +26,15 @@ module.exports = __toCommonJS(checkbox_exports);
|
|
|
26
26
|
|
|
27
27
|
// src/schema/checkbox/checkbox.ts
|
|
28
28
|
function checkbox(input) {
|
|
29
|
-
const { label, tooltip } = input;
|
|
29
|
+
const { label, tooltip, showastoggle = false } = input;
|
|
30
30
|
return {
|
|
31
31
|
type: "checkbox",
|
|
32
32
|
_parse() {
|
|
33
33
|
return {
|
|
34
34
|
type: "checkbox",
|
|
35
35
|
label,
|
|
36
|
-
tooltip
|
|
36
|
+
tooltip,
|
|
37
|
+
showastoggle
|
|
37
38
|
};
|
|
38
39
|
},
|
|
39
40
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/checkbox/index.ts","../../../src/schema/checkbox/checkbox.ts"],"sourcesContent":["export * from './checkbox'","import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CheckBoxSchema<TOutput extends boolean = boolean> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'checkbox';\n}\n\ninterface CheckBoxInput extends BaseFieldInput {}\n\nexport function checkbox(input: CheckBoxInput): CheckBoxSchema {\n const {label, tooltip} = input;\n\n return {\n type: 'checkbox',\n _parse() {\n return {\n type: 'checkbox',\n label,\n tooltip,\n }\n },\n _primitive() {\n return 'boolean'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/checkbox/index.ts","../../../src/schema/checkbox/checkbox.ts"],"sourcesContent":["export * from './checkbox'","import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CheckBoxSchema<TOutput extends boolean = boolean> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'checkbox';\n}\n\ninterface CheckBoxInput extends BaseFieldInput {\n showastoggle?: boolean\n}\n\nexport function checkbox(input: CheckBoxInput): CheckBoxSchema {\n const {label, tooltip, showastoggle = false} = input;\n\n return {\n type: 'checkbox',\n _parse() {\n return {\n type: 'checkbox',\n label,\n tooltip,\n showastoggle\n }\n },\n _primitive() {\n return 'boolean'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaO,SAAS,SAAS,OAAsC;AAC7D,QAAM,EAAC,OAAO,SAAS,eAAe,MAAK,IAAI;AAE/C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
// src/schema/checkbox/checkbox.ts
|
|
2
2
|
function checkbox(input) {
|
|
3
|
-
const { label, tooltip } = input;
|
|
3
|
+
const { label, tooltip, showastoggle = false } = input;
|
|
4
4
|
return {
|
|
5
5
|
type: "checkbox",
|
|
6
6
|
_parse() {
|
|
7
7
|
return {
|
|
8
8
|
type: "checkbox",
|
|
9
9
|
label,
|
|
10
|
-
tooltip
|
|
10
|
+
tooltip,
|
|
11
|
+
showastoggle
|
|
11
12
|
};
|
|
12
13
|
},
|
|
13
14
|
_primitive() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/checkbox/checkbox.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CheckBoxSchema<TOutput extends boolean = boolean> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'checkbox';\n}\n\ninterface CheckBoxInput extends BaseFieldInput {}\n\nexport function checkbox(input: CheckBoxInput): CheckBoxSchema {\n const {label, tooltip} = input;\n\n return {\n type: 'checkbox',\n _parse() {\n return {\n type: 'checkbox',\n label,\n tooltip,\n }\n },\n _primitive() {\n return 'boolean'\n },\n ...input,\n }\n}"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/checkbox/checkbox.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface CheckBoxSchema<TOutput extends boolean = boolean> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'checkbox';\n}\n\ninterface CheckBoxInput extends BaseFieldInput {\n showastoggle?: boolean\n}\n\nexport function checkbox(input: CheckBoxInput): CheckBoxSchema {\n const {label, tooltip, showastoggle = false} = input;\n\n return {\n type: 'checkbox',\n _parse() {\n return {\n type: 'checkbox',\n label,\n tooltip,\n showastoggle\n }\n },\n _primitive() {\n return 'boolean'\n },\n ...input,\n }\n}"],"mappings":";AAaO,SAAS,SAAS,OAAsC;AAC7D,QAAM,EAAC,OAAO,SAAS,eAAe,MAAK,IAAI;AAE/C,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseSchema, BaseFieldInput } from '../../types/schema.mjs';
|
|
2
|
+
import '../../types/webcomponent.mjs';
|
|
3
|
+
|
|
4
|
+
interface DataModelSchema<TOutput extends Record<string, any> = Record<string, any>> extends BaseSchema<TOutput> {
|
|
5
|
+
type: 'datamodel';
|
|
6
|
+
}
|
|
7
|
+
interface DataModelInput extends BaseFieldInput {
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function datamodel(input: DataModelInput): DataModelSchema;
|
|
11
|
+
|
|
12
|
+
export { type DataModelSchema, datamodel };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseSchema, BaseFieldInput } from '../../types/schema.js';
|
|
2
|
+
import '../../types/webcomponent.js';
|
|
3
|
+
|
|
4
|
+
interface DataModelSchema<TOutput extends Record<string, any> = Record<string, any>> extends BaseSchema<TOutput> {
|
|
5
|
+
type: 'datamodel';
|
|
6
|
+
}
|
|
7
|
+
interface DataModelInput extends BaseFieldInput {
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
}
|
|
10
|
+
declare function datamodel(input: DataModelInput): DataModelSchema;
|
|
11
|
+
|
|
12
|
+
export { type DataModelSchema, datamodel };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/schema/datamodel/datamodel.ts
|
|
21
|
+
var datamodel_exports = {};
|
|
22
|
+
__export(datamodel_exports, {
|
|
23
|
+
datamodel: () => datamodel
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(datamodel_exports);
|
|
26
|
+
function datamodel(input) {
|
|
27
|
+
const { placeholder, label, tooltip, required } = input;
|
|
28
|
+
return {
|
|
29
|
+
type: "datamodel",
|
|
30
|
+
_parse() {
|
|
31
|
+
return {
|
|
32
|
+
type: "datamodel",
|
|
33
|
+
label,
|
|
34
|
+
placeholder,
|
|
35
|
+
tooltip,
|
|
36
|
+
required
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
_primitive() {
|
|
40
|
+
return "json";
|
|
41
|
+
},
|
|
42
|
+
...input
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
datamodel
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=datamodel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/datamodel/datamodel.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface DataModelSchema<TOutput extends Record<string, any> = Record<string, any>> extends BaseSchema<TOutput> { /**\n * The schema type.\n */\n type: 'datamodel';\n}\n\ninterface DataModelInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function datamodel(input: DataModelInput): DataModelSchema {\n const {placeholder, label,tooltip, required} = input;\n\n return {\n type: 'datamodel',\n _parse() {\n return {\n type: 'datamodel',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'json'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYO,SAAS,UAAU,OAAwC;AAChE,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":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/schema/datamodel/datamodel.ts
|
|
2
|
+
function datamodel(input) {
|
|
3
|
+
const { placeholder, label, tooltip, required } = input;
|
|
4
|
+
return {
|
|
5
|
+
type: "datamodel",
|
|
6
|
+
_parse() {
|
|
7
|
+
return {
|
|
8
|
+
type: "datamodel",
|
|
9
|
+
label,
|
|
10
|
+
placeholder,
|
|
11
|
+
tooltip,
|
|
12
|
+
required
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
_primitive() {
|
|
16
|
+
return "json";
|
|
17
|
+
},
|
|
18
|
+
...input
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
datamodel
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=datamodel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/datamodel/datamodel.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface DataModelSchema<TOutput extends Record<string, any> = Record<string, any>> extends BaseSchema<TOutput> { /**\n * The schema type.\n */\n type: 'datamodel';\n}\n\ninterface DataModelInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function datamodel(input: DataModelInput): DataModelSchema {\n const {placeholder, label,tooltip, required} = input;\n\n return {\n type: 'datamodel',\n _parse() {\n return {\n type: 'datamodel',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'json'\n },\n ...input,\n }\n}"],"mappings":";AAYO,SAAS,UAAU,OAAwC;AAChE,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":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/schema/datamodel/index.ts
|
|
21
|
+
var datamodel_exports = {};
|
|
22
|
+
__export(datamodel_exports, {
|
|
23
|
+
datamodel: () => datamodel
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(datamodel_exports);
|
|
26
|
+
|
|
27
|
+
// src/schema/datamodel/datamodel.ts
|
|
28
|
+
function datamodel(input) {
|
|
29
|
+
const { placeholder, label, tooltip, required } = input;
|
|
30
|
+
return {
|
|
31
|
+
type: "datamodel",
|
|
32
|
+
_parse() {
|
|
33
|
+
return {
|
|
34
|
+
type: "datamodel",
|
|
35
|
+
label,
|
|
36
|
+
placeholder,
|
|
37
|
+
tooltip,
|
|
38
|
+
required
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
_primitive() {
|
|
42
|
+
return "json";
|
|
43
|
+
},
|
|
44
|
+
...input
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
datamodel
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/datamodel/index.ts","../../../src/schema/datamodel/datamodel.ts"],"sourcesContent":["export * from './datamodel'","import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface DataModelSchema<TOutput extends Record<string, any> = Record<string, any>> extends BaseSchema<TOutput> { /**\n * The schema type.\n */\n type: 'datamodel';\n}\n\ninterface DataModelInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function datamodel(input: DataModelInput): DataModelSchema {\n const {placeholder, label,tooltip, required} = input;\n\n return {\n type: 'datamodel',\n _parse() {\n return {\n type: 'datamodel',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'json'\n },\n ...input,\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACYO,SAAS,UAAU,OAAwC;AAChE,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":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/schema/datamodel/datamodel.ts
|
|
2
|
+
function datamodel(input) {
|
|
3
|
+
const { placeholder, label, tooltip, required } = input;
|
|
4
|
+
return {
|
|
5
|
+
type: "datamodel",
|
|
6
|
+
_parse() {
|
|
7
|
+
return {
|
|
8
|
+
type: "datamodel",
|
|
9
|
+
label,
|
|
10
|
+
placeholder,
|
|
11
|
+
tooltip,
|
|
12
|
+
required
|
|
13
|
+
};
|
|
14
|
+
},
|
|
15
|
+
_primitive() {
|
|
16
|
+
return "json";
|
|
17
|
+
},
|
|
18
|
+
...input
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
datamodel
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/datamodel/datamodel.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\n\nexport interface DataModelSchema<TOutput extends Record<string, any> = Record<string, any>> extends BaseSchema<TOutput> { /**\n * The schema type.\n */\n type: 'datamodel';\n}\n\ninterface DataModelInput extends BaseFieldInput {\n placeholder?: string;\n}\n\nexport function datamodel(input: DataModelInput): DataModelSchema {\n const {placeholder, label,tooltip, required} = input;\n\n return {\n type: 'datamodel',\n _parse() {\n return {\n type: 'datamodel',\n label,\n placeholder,\n tooltip,\n required\n }\n },\n _primitive() {\n return 'json'\n },\n ...input,\n }\n}"],"mappings":";AAYO,SAAS,UAAU,OAAwC;AAChE,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":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseSchema, BaseFieldInput } from '../../types/schema.mjs';
|
|
2
|
+
import '../../types/webcomponent.mjs';
|
|
3
|
+
|
|
4
|
+
type DataSourceOutputType<Multiple extends boolean> = Multiple extends true ? string[] : string;
|
|
5
|
+
interface DataSourceSchema<Multiple extends boolean = false> extends BaseSchema<DataSourceOutputType<Multiple>> {
|
|
6
|
+
/**
|
|
7
|
+
* The schema type.
|
|
8
|
+
*/
|
|
9
|
+
type: 'datasource';
|
|
10
|
+
}
|
|
11
|
+
interface DataSourceBody {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
interface DataSourceInput extends BaseFieldInput {
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
url: string;
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
body: DataSourceBody;
|
|
19
|
+
}
|
|
20
|
+
declare function datasource<Multiple extends boolean = false>(input: DataSourceInput & {
|
|
21
|
+
multiple?: Multiple;
|
|
22
|
+
}): DataSourceSchema<Multiple>;
|
|
23
|
+
|
|
24
|
+
export { type DataSourceSchema, datasource };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseSchema, BaseFieldInput } from '../../types/schema.js';
|
|
2
|
+
import '../../types/webcomponent.js';
|
|
3
|
+
|
|
4
|
+
type DataSourceOutputType<Multiple extends boolean> = Multiple extends true ? string[] : string;
|
|
5
|
+
interface DataSourceSchema<Multiple extends boolean = false> extends BaseSchema<DataSourceOutputType<Multiple>> {
|
|
6
|
+
/**
|
|
7
|
+
* The schema type.
|
|
8
|
+
*/
|
|
9
|
+
type: 'datasource';
|
|
10
|
+
}
|
|
11
|
+
interface DataSourceBody {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
interface DataSourceInput extends BaseFieldInput {
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
url: string;
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
body: DataSourceBody;
|
|
19
|
+
}
|
|
20
|
+
declare function datasource<Multiple extends boolean = false>(input: DataSourceInput & {
|
|
21
|
+
multiple?: Multiple;
|
|
22
|
+
}): DataSourceSchema<Multiple>;
|
|
23
|
+
|
|
24
|
+
export { type DataSourceSchema, datasource };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/schema/datasource/datasource.ts
|
|
21
|
+
var datasource_exports = {};
|
|
22
|
+
__export(datasource_exports, {
|
|
23
|
+
datasource: () => datasource
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(datasource_exports);
|
|
26
|
+
function datasource(input) {
|
|
27
|
+
const { label, body, url, tooltip, placeholder, multiple = false, required } = input;
|
|
28
|
+
return {
|
|
29
|
+
type: "datasource",
|
|
30
|
+
_parse() {
|
|
31
|
+
return {
|
|
32
|
+
type: "datasource",
|
|
33
|
+
label,
|
|
34
|
+
url,
|
|
35
|
+
multiple,
|
|
36
|
+
body,
|
|
37
|
+
tooltip,
|
|
38
|
+
placeholder,
|
|
39
|
+
required
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
_primitive() {
|
|
43
|
+
return multiple ? "json" : "string";
|
|
44
|
+
},
|
|
45
|
+
...input
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
datasource
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=datasource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/datasource/datasource.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\nimport { SelectSchema } from '../select';\ntype DataSourceOutputType<Multiple extends boolean> = Multiple extends true ? string[] : string;\n\nexport interface DataSourceSchema<Multiple extends boolean = false> extends BaseSchema<DataSourceOutputType<Multiple>> {\n /**\n * The schema type.\n */\n type: 'datasource';\n}\n\ninterface DataSourceBody {\n [key: string]: any;\n}\ninterface DataSourceInput extends BaseFieldInput {\n placeholder?: string;\n url: string;\n multiple?: boolean;\n body: DataSourceBody;\n}\n\nexport function datasource<Multiple extends boolean = false>(input: DataSourceInput & { multiple?: Multiple }): DataSourceSchema<Multiple> {\n const {label, body, url, tooltip,placeholder, multiple = false as Multiple, required } = input;\n\n return {\n type: 'datasource',\n _parse() {\n return {\n type: 'datasource',\n label,\n url,\n multiple,\n body,\n tooltip,\n placeholder,\n required,\n }\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBO,SAAS,WAA6C,OAA8E;AACzI,QAAM,EAAC,OAAO,MAAM,KAAK,SAAQ,aAAa,WAAW,OAAmB,SAAS,IAAI;AAEzF,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,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// src/schema/datasource/datasource.ts
|
|
2
|
+
function datasource(input) {
|
|
3
|
+
const { label, body, url, tooltip, placeholder, multiple = false, required } = input;
|
|
4
|
+
return {
|
|
5
|
+
type: "datasource",
|
|
6
|
+
_parse() {
|
|
7
|
+
return {
|
|
8
|
+
type: "datasource",
|
|
9
|
+
label,
|
|
10
|
+
url,
|
|
11
|
+
multiple,
|
|
12
|
+
body,
|
|
13
|
+
tooltip,
|
|
14
|
+
placeholder,
|
|
15
|
+
required
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
_primitive() {
|
|
19
|
+
return multiple ? "json" : "string";
|
|
20
|
+
},
|
|
21
|
+
...input
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
datasource
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=datasource.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/datasource/datasource.ts"],"sourcesContent":["import { BaseFieldInput, type BaseSchema } from '../../types';\nimport { SelectSchema } from '../select';\ntype DataSourceOutputType<Multiple extends boolean> = Multiple extends true ? string[] : string;\n\nexport interface DataSourceSchema<Multiple extends boolean = false> extends BaseSchema<DataSourceOutputType<Multiple>> {\n /**\n * The schema type.\n */\n type: 'datasource';\n}\n\ninterface DataSourceBody {\n [key: string]: any;\n}\ninterface DataSourceInput extends BaseFieldInput {\n placeholder?: string;\n url: string;\n multiple?: boolean;\n body: DataSourceBody;\n}\n\nexport function datasource<Multiple extends boolean = false>(input: DataSourceInput & { multiple?: Multiple }): DataSourceSchema<Multiple> {\n const {label, body, url, tooltip,placeholder, multiple = false as Multiple, required } = input;\n\n return {\n type: 'datasource',\n _parse() {\n return {\n type: 'datasource',\n label,\n url,\n multiple,\n body,\n tooltip,\n placeholder,\n required,\n }\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n }\n}\n"],"mappings":";AAqBO,SAAS,WAA6C,OAA8E;AACzI,QAAM,EAAC,OAAO,MAAM,KAAK,SAAQ,aAAa,WAAW,OAAmB,SAAS,IAAI;AAEzF,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,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/schema/datasource/index.ts
|
|
21
|
+
var datasource_exports = {};
|
|
22
|
+
__export(datasource_exports, {
|
|
23
|
+
datasource: () => datasource
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(datasource_exports);
|
|
26
|
+
|
|
27
|
+
// src/schema/datasource/datasource.ts
|
|
28
|
+
function datasource(input) {
|
|
29
|
+
const { label, body, url, tooltip, placeholder, multiple = false, required } = input;
|
|
30
|
+
return {
|
|
31
|
+
type: "datasource",
|
|
32
|
+
_parse() {
|
|
33
|
+
return {
|
|
34
|
+
type: "datasource",
|
|
35
|
+
label,
|
|
36
|
+
url,
|
|
37
|
+
multiple,
|
|
38
|
+
body,
|
|
39
|
+
tooltip,
|
|
40
|
+
placeholder,
|
|
41
|
+
required
|
|
42
|
+
};
|
|
43
|
+
},
|
|
44
|
+
_primitive() {
|
|
45
|
+
return multiple ? "json" : "string";
|
|
46
|
+
},
|
|
47
|
+
...input
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
datasource
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/datasource/index.ts","../../../src/schema/datasource/datasource.ts"],"sourcesContent":["export * from './datasource'","import { BaseFieldInput, type BaseSchema } from '../../types';\nimport { SelectSchema } from '../select';\ntype DataSourceOutputType<Multiple extends boolean> = Multiple extends true ? string[] : string;\n\nexport interface DataSourceSchema<Multiple extends boolean = false> extends BaseSchema<DataSourceOutputType<Multiple>> {\n /**\n * The schema type.\n */\n type: 'datasource';\n}\n\ninterface DataSourceBody {\n [key: string]: any;\n}\ninterface DataSourceInput extends BaseFieldInput {\n placeholder?: string;\n url: string;\n multiple?: boolean;\n body: DataSourceBody;\n}\n\nexport function datasource<Multiple extends boolean = false>(input: DataSourceInput & { multiple?: Multiple }): DataSourceSchema<Multiple> {\n const {label, body, url, tooltip,placeholder, multiple = false as Multiple, required } = input;\n\n return {\n type: 'datasource',\n _parse() {\n return {\n type: 'datasource',\n label,\n url,\n multiple,\n body,\n tooltip,\n placeholder,\n required,\n }\n },\n _primitive() {\n return multiple ? 'json' : 'string';\n },\n ...input,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACqBO,SAAS,WAA6C,OAA8E;AACzI,QAAM,EAAC,OAAO,MAAM,KAAK,SAAQ,aAAa,WAAW,OAAmB,SAAS,IAAI;AAEzF,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,QACA;AAAA,MACF;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO,WAAW,SAAS;AAAA,IAC7B;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|