@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
|
@@ -5,7 +5,6 @@ import '../../types/utils.mjs';
|
|
|
5
5
|
import '../../types/schema.mjs';
|
|
6
6
|
import '../../types/webcomponent.mjs';
|
|
7
7
|
import '../../schema/optional/optional.mjs';
|
|
8
|
-
import '../../schema/dynamic/dynamic.mjs';
|
|
9
8
|
|
|
10
9
|
type BaseOptions = {};
|
|
11
10
|
declare function webcomponent<T extends ObjectEntries>(schema?: DialogSchema<T>, options?: BaseOptions): <P extends {} = {}>(component: React.ComponentType<P>) => void;
|
|
@@ -5,7 +5,6 @@ import '../../types/utils.js';
|
|
|
5
5
|
import '../../types/schema.js';
|
|
6
6
|
import '../../types/webcomponent.js';
|
|
7
7
|
import '../../schema/optional/optional.js';
|
|
8
|
-
import '../../schema/dynamic/dynamic.js';
|
|
9
8
|
|
|
10
9
|
type BaseOptions = {};
|
|
11
10
|
declare function webcomponent<T extends ObjectEntries>(schema?: DialogSchema<T>, options?: BaseOptions): <P extends {} = {}>(component: React.ComponentType<P>) => void;
|
|
@@ -5,7 +5,6 @@ import { DialogSchema } from '../../schema/dialog/dialog.mjs';
|
|
|
5
5
|
import '../../types/webcomponent.mjs';
|
|
6
6
|
import '../../schema/optional/optional.mjs';
|
|
7
7
|
import '../../types/utils.mjs';
|
|
8
|
-
import '../../schema/dynamic/dynamic.mjs';
|
|
9
8
|
|
|
10
9
|
interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {
|
|
11
10
|
type: 'component';
|
|
@@ -5,7 +5,6 @@ import { DialogSchema } from '../../schema/dialog/dialog.js';
|
|
|
5
5
|
import '../../types/webcomponent.js';
|
|
6
6
|
import '../../schema/optional/optional.js';
|
|
7
7
|
import '../../types/utils.js';
|
|
8
|
-
import '../../schema/dynamic/dynamic.js';
|
|
9
8
|
|
|
10
9
|
interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {
|
|
11
10
|
type: 'component';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n _parse() {\n return {\n ...config,\n ...dialog._parse(),\n dynamiczones: slotsParse,\n };\n },\n _primitive() {\n return {\n ...dialog._primitive() as object,\n ...slotsPrimitives as object,\n };\n },\n ...config,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAWO,SAAS,UACd,QACA,QACA,OACmC;AAEnC,QAAM,aAAa,QAAQ,OAAO,QAAQ,KAAK,EAAE;AAAA,IAAI,CAAC,CAAC,KAAK,IAAI,OAC9D;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,GAAG,KAAK,OAAO;AAAA,IACjB;AAAA,EACF,IAAI,CAAC;AACL,QAAM,kBAAkB,QAAQ,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM;AACjF,QAAI,GAAG,IAAI,KAAK,WAAW;AAC3B,WAAO;AAAA,EACT,GAAG,CAAC,CAAkF,IAAI,CAAC;AAE3F,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,OAAO,OAAO;AAAA,QACjB,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,QACL,GAAG,OAAO,WAAW;AAAA,QACrB,GAAG;AAAA,MACL;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n _parse() {\n return {\n ...config,\n ...dialog._parse(),\n dynamiczones: slotsParse,\n };\n },\n _primitive() {\n return {\n ...dialog._primitive() as object,\n ...slotsPrimitives as object,\n };\n },\n ...config,\n };\n}"],"mappings":";AAWO,SAAS,UACd,QACA,QACA,OACmC;AAEnC,QAAM,aAAa,QAAQ,OAAO,QAAQ,KAAK,EAAE;AAAA,IAAI,CAAC,CAAC,KAAK,IAAI,OAC9D;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,GAAG,KAAK,OAAO;AAAA,IACjB;AAAA,EACF,IAAI,CAAC;AACL,QAAM,kBAAkB,QAAQ,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM;AACjF,QAAI,GAAG,IAAI,KAAK,WAAW;AAC3B,WAAO;AAAA,EACT,GAAG,CAAC,CAAkF,IAAI,CAAC;AAE3F,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,OAAO,OAAO;AAAA,QACjB,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,QACL,GAAG,OAAO,WAAW;AAAA,QACrB,GAAG;AAAA,MACL;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/functions/component/index.ts","../../../src/functions/component/component.ts"],"sourcesContent":["export * from './component';\n","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/component/index.ts","../../../src/functions/component/component.ts"],"sourcesContent":["export * from './component';\n","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n _parse() {\n return {\n ...config,\n ...dialog._parse(),\n dynamiczones: slotsParse,\n };\n },\n _primitive() {\n return {\n ...dialog._primitive() as object,\n ...slotsPrimitives as object,\n };\n },\n ...config,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,SAAS,UACd,QACA,QACA,OACmC;AAEnC,QAAM,aAAa,QAAQ,OAAO,QAAQ,KAAK,EAAE;AAAA,IAAI,CAAC,CAAC,KAAK,IAAI,OAC9D;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,GAAG,KAAK,OAAO;AAAA,IACjB;AAAA,EACF,IAAI,CAAC;AACL,QAAM,kBAAkB,QAAQ,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM;AACjF,QAAI,GAAG,IAAI,KAAK,WAAW;AAC3B,WAAO;AAAA,EACT,GAAG,CAAC,CAAkF,IAAI,CAAC;AAE3F,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,OAAO,OAAO;AAAA,QACjB,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,QACL,GAAG,OAAO,WAAW;AAAA,QACrB,GAAG;AAAA,MACL;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n
|
|
1
|
+
{"version":3,"sources":["../../../src/functions/component/component.ts"],"sourcesContent":["import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n _parse() {\n return {\n ...config,\n ...dialog._parse(),\n dynamiczones: slotsParse,\n };\n },\n _primitive() {\n return {\n ...dialog._primitive() as object,\n ...slotsPrimitives as object,\n };\n },\n ...config,\n };\n}"],"mappings":";AAWO,SAAS,UACd,QACA,QACA,OACmC;AAEnC,QAAM,aAAa,QAAQ,OAAO,QAAQ,KAAK,EAAE;AAAA,IAAI,CAAC,CAAC,KAAK,IAAI,OAC9D;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,GAAG,KAAK,OAAO;AAAA,IACjB;AAAA,EACF,IAAI,CAAC;AACL,QAAM,kBAAkB,QAAQ,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM;AACjF,QAAI,GAAG,IAAI,KAAK,WAAW;AAC3B,WAAO;AAAA,EACT,GAAG,CAAC,CAAkF,IAAI,CAAC;AAE3F,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,OAAO,OAAO;AAAA,QACjB,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,QACL,GAAG,OAAO,WAAW;AAAA,QACrB,GAAG;AAAA,MACL;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
package/dist/functions/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/functions/index.ts","../../src/functions/parse/parse.ts","../../src/functions/parse/parsePrimitives.ts","../../src/functions/component/component.ts"],"sourcesContent":["export * from './parse'\nexport * from './component'\n","import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}","import { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._primitive() as Record<string, WebcomponentPropTypes>\n}","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n
|
|
1
|
+
{"version":3,"sources":["../../src/functions/index.ts","../../src/functions/parse/parse.ts","../../src/functions/parse/parsePrimitives.ts","../../src/functions/component/component.ts"],"sourcesContent":["export * from './parse'\nexport * from './component'\n","import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}","import { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._primitive() as Record<string, WebcomponentPropTypes>\n}","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n _parse() {\n return {\n ...config,\n ...dialog._parse(),\n dynamiczones: slotsParse,\n };\n },\n _primitive() {\n return {\n ...dialog._primitive() as object,\n ...slotsPrimitives as object,\n };\n },\n ...config,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGO,SAAS,MAA+B,QAAyB;AACtE,SAAO,OAAO,OAAO;AACvB;;;ACDO,SAAS,gBAAyC,QAAyB;AAChF,SAAO,OAAO,WAAW;AAC3B;;;ACKO,SAAS,UACd,QACA,QACA,OACmC;AAEnC,QAAM,aAAa,QAAQ,OAAO,QAAQ,KAAK,EAAE;AAAA,IAAI,CAAC,CAAC,KAAK,IAAI,OAC9D;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,GAAG,KAAK,OAAO;AAAA,IACjB;AAAA,EACF,IAAI,CAAC;AACL,QAAM,kBAAkB,QAAQ,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM;AACjF,QAAI,GAAG,IAAI,KAAK,WAAW;AAC3B,WAAO;AAAA,EACT,GAAG,CAAC,CAAkF,IAAI,CAAC;AAE3F,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,OAAO,OAAO;AAAA,QACjB,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,QACL,GAAG,OAAO,WAAW;AAAA,QACrB,GAAG;AAAA,MACL;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
package/dist/functions/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/functions/parse/parse.ts","../../src/functions/parse/parsePrimitives.ts","../../src/functions/component/component.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}","import { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._primitive() as Record<string, WebcomponentPropTypes>\n}","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n
|
|
1
|
+
{"version":3,"sources":["../../src/functions/parse/parse.ts","../../src/functions/parse/parsePrimitives.ts","../../src/functions/component/component.ts"],"sourcesContent":["import { DialogSchema } from '../../schema/dialog';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parse<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._parse()\n}","import { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\nimport { ObjectEntries } from '../../types/object';\n\nexport function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>) {\n return schema._primitive() as Record<string, WebcomponentPropTypes>\n}","import { BaseSchema, ComponentModel } from '../../types';\nimport { ObjectEntries, ObjectOutput, SlotEntries } from '../../types/object';\nimport { DialogSchema } from '../../schema/dialog';\nimport { WebcomponentPropTypes } from '../../types/webcomponent';\n\nexport interface ComponentSchema<TEntries extends ObjectEntries, TSlots extends SlotEntries, TOutput = ObjectOutput<TEntries & TSlots>> extends BaseSchema<TOutput>, Partial<ComponentModel> {\n type: 'component';\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>;\n slots?: TSlots,\n}\n\nexport function component<TEntries extends ObjectEntries, TSlots extends SlotEntries>(\n config: Partial<ComponentModel>,\n dialog: Omit<DialogSchema<TEntries>, 'tabs'>,\n slots?: TSlots,\n): ComponentSchema<TEntries, TSlots> {\n\n const slotsParse = slots ? Object.entries(slots).map(([key, slot]) => (\n {\n id: key,\n name: key,\n ...slot._parse(),\n }),\n ) : [];\n const slotsPrimitives = slots ? Object.entries(slots).reduce((acc, [key, slot]) => {\n acc[key] = slot._primitive();\n return acc\n }, {} as Record<string, WebcomponentPropTypes | Record<string, WebcomponentPropTypes>>) : [];\n\n return {\n type: 'component',\n dialog,\n _parse() {\n return {\n ...config,\n ...dialog._parse(),\n dynamiczones: slotsParse,\n };\n },\n _primitive() {\n return {\n ...dialog._primitive() as object,\n ...slotsPrimitives as object,\n };\n },\n ...config,\n };\n}"],"mappings":";AAGO,SAAS,MAA+B,QAAyB;AACtE,SAAO,OAAO,OAAO;AACvB;;;ACDO,SAAS,gBAAyC,QAAyB;AAChF,SAAO,OAAO,WAAW;AAC3B;;;ACKO,SAAS,UACd,QACA,QACA,OACmC;AAEnC,QAAM,aAAa,QAAQ,OAAO,QAAQ,KAAK,EAAE;AAAA,IAAI,CAAC,CAAC,KAAK,IAAI,OAC9D;AAAA,MACE,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,GAAG,KAAK,OAAO;AAAA,IACjB;AAAA,EACF,IAAI,CAAC;AACL,QAAM,kBAAkB,QAAQ,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,MAAM;AACjF,QAAI,GAAG,IAAI,KAAK,WAAW;AAC3B,WAAO;AAAA,EACT,GAAG,CAAC,CAAkF,IAAI,CAAC;AAE3F,SAAO;AAAA,IACL,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AACP,aAAO;AAAA,QACL,GAAG;AAAA,QACH,GAAG,OAAO,OAAO;AAAA,QACjB,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,QACL,GAAG,OAAO,WAAW;AAAA,QACrB,GAAG;AAAA,MACL;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -4,7 +4,6 @@ import '../../types/utils.mjs';
|
|
|
4
4
|
import '../../types/schema.mjs';
|
|
5
5
|
import '../../types/webcomponent.mjs';
|
|
6
6
|
import '../../schema/optional/optional.mjs';
|
|
7
|
-
import '../../schema/dynamic/dynamic.mjs';
|
|
8
7
|
|
|
9
8
|
declare function parse<T extends ObjectEntries>(schema: DialogSchema<T>): object;
|
|
10
9
|
|
|
@@ -4,7 +4,6 @@ import '../../types/utils.js';
|
|
|
4
4
|
import '../../types/schema.js';
|
|
5
5
|
import '../../types/webcomponent.js';
|
|
6
6
|
import '../../schema/optional/optional.js';
|
|
7
|
-
import '../../schema/dynamic/dynamic.js';
|
|
8
7
|
|
|
9
8
|
declare function parse<T extends ObjectEntries>(schema: DialogSchema<T>): object;
|
|
10
9
|
|
|
@@ -4,7 +4,6 @@ import { ObjectEntries } from '../../types/object.mjs';
|
|
|
4
4
|
import '../../types/utils.mjs';
|
|
5
5
|
import '../../types/schema.mjs';
|
|
6
6
|
import '../../schema/optional/optional.mjs';
|
|
7
|
-
import '../../schema/dynamic/dynamic.mjs';
|
|
8
7
|
|
|
9
8
|
declare function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>): Record<string, WebcomponentPropTypes>;
|
|
10
9
|
|
|
@@ -4,7 +4,6 @@ import { ObjectEntries } from '../../types/object.js';
|
|
|
4
4
|
import '../../types/utils.js';
|
|
5
5
|
import '../../types/schema.js';
|
|
6
6
|
import '../../schema/optional/optional.js';
|
|
7
|
-
import '../../schema/dynamic/dynamic.js';
|
|
8
7
|
|
|
9
8
|
declare function parsePrimitives<T extends ObjectEntries>(schema: DialogSchema<T>): Record<string, WebcomponentPropTypes>;
|
|
10
9
|
|
package/dist/index.d.mts
CHANGED
|
@@ -7,6 +7,10 @@ export { ImageSchema, image } from './schema/image/image.mjs';
|
|
|
7
7
|
export { SelectSchema, select } from './schema/select/select.mjs';
|
|
8
8
|
export { RichTextEditorSchema, rte } from './schema/rte/rte.mjs';
|
|
9
9
|
export { DynamicZoneSchema, dynamic } from './schema/dynamic/dynamic.mjs';
|
|
10
|
+
export { CalendarSchema, calendar } from './schema/calendar/calendar.mjs';
|
|
11
|
+
export { DataSourceSchema, datasource } from './schema/datasource/datasource.mjs';
|
|
12
|
+
export { GroupSchema, group } from './schema/group/group.mjs';
|
|
13
|
+
export { DataModelSchema, datamodel } from './schema/datamodel/datamodel.mjs';
|
|
10
14
|
export { HiddenSchema, hidden } from './schema/hidden/hidden.mjs';
|
|
11
15
|
export { OptionalSchema, optional } from './schema/optional/optional.mjs';
|
|
12
16
|
export { ObjectSchema, object } from './schema/object/object.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export { ImageSchema, image } from './schema/image/image.js';
|
|
|
7
7
|
export { SelectSchema, select } from './schema/select/select.js';
|
|
8
8
|
export { RichTextEditorSchema, rte } from './schema/rte/rte.js';
|
|
9
9
|
export { DynamicZoneSchema, dynamic } from './schema/dynamic/dynamic.js';
|
|
10
|
+
export { CalendarSchema, calendar } from './schema/calendar/calendar.js';
|
|
11
|
+
export { DataSourceSchema, datasource } from './schema/datasource/datasource.js';
|
|
12
|
+
export { GroupSchema, group } from './schema/group/group.js';
|
|
13
|
+
export { DataModelSchema, datamodel } from './schema/datamodel/datamodel.js';
|
|
10
14
|
export { HiddenSchema, hidden } from './schema/hidden/hidden.js';
|
|
11
15
|
export { OptionalSchema, optional } from './schema/optional/optional.js';
|
|
12
16
|
export { ObjectSchema, object } from './schema/object/object.js';
|
package/dist/index.js
CHANGED
|
@@ -30,10 +30,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
+
calendar: () => calendar,
|
|
33
34
|
checkbox: () => checkbox,
|
|
34
35
|
component: () => component,
|
|
36
|
+
datamodel: () => datamodel,
|
|
37
|
+
datasource: () => datasource,
|
|
35
38
|
dialog: () => dialog,
|
|
36
39
|
dynamic: () => dynamic,
|
|
40
|
+
group: () => group,
|
|
37
41
|
hidden: () => hidden,
|
|
38
42
|
image: () => image,
|
|
39
43
|
multifield: () => multifield,
|
|
@@ -121,7 +125,7 @@ function dialog(entries) {
|
|
|
121
125
|
|
|
122
126
|
// src/schema/multifield/multifield.ts
|
|
123
127
|
function multifield(input) {
|
|
124
|
-
const { label, children } = input;
|
|
128
|
+
const { label, children, required } = input;
|
|
125
129
|
const childrenParse = children._parse();
|
|
126
130
|
return {
|
|
127
131
|
type: "multifield",
|
|
@@ -129,6 +133,7 @@ function multifield(input) {
|
|
|
129
133
|
return {
|
|
130
134
|
type: "multifield",
|
|
131
135
|
label,
|
|
136
|
+
required,
|
|
132
137
|
children: Array.isArray(childrenParse) ? childrenParse : [childrenParse]
|
|
133
138
|
};
|
|
134
139
|
},
|
|
@@ -141,7 +146,7 @@ function multifield(input) {
|
|
|
141
146
|
|
|
142
147
|
// src/schema/text/text.ts
|
|
143
148
|
function text(input) {
|
|
144
|
-
const { placeholder, label, tooltip } = input;
|
|
149
|
+
const { placeholder, label, tooltip, required } = input;
|
|
145
150
|
return {
|
|
146
151
|
type: "textfield",
|
|
147
152
|
_parse() {
|
|
@@ -149,7 +154,8 @@ function text(input) {
|
|
|
149
154
|
type: "textfield",
|
|
150
155
|
label,
|
|
151
156
|
placeholder,
|
|
152
|
-
tooltip
|
|
157
|
+
tooltip,
|
|
158
|
+
required
|
|
153
159
|
};
|
|
154
160
|
},
|
|
155
161
|
_primitive() {
|
|
@@ -161,14 +167,15 @@ function text(input) {
|
|
|
161
167
|
|
|
162
168
|
// src/schema/checkbox/checkbox.ts
|
|
163
169
|
function checkbox(input) {
|
|
164
|
-
const { label, tooltip } = input;
|
|
170
|
+
const { label, tooltip, showastoggle = false } = input;
|
|
165
171
|
return {
|
|
166
172
|
type: "checkbox",
|
|
167
173
|
_parse() {
|
|
168
174
|
return {
|
|
169
175
|
type: "checkbox",
|
|
170
176
|
label,
|
|
171
|
-
tooltip
|
|
177
|
+
tooltip,
|
|
178
|
+
showastoggle
|
|
172
179
|
};
|
|
173
180
|
},
|
|
174
181
|
_primitive() {
|
|
@@ -180,7 +187,7 @@ function checkbox(input) {
|
|
|
180
187
|
|
|
181
188
|
// src/schema/pathbrowser/pathbrowser.ts
|
|
182
189
|
function pathbrowser(input) {
|
|
183
|
-
const { placeholder, label, tooltip } = input;
|
|
190
|
+
const { placeholder, label, tooltip, required } = input;
|
|
184
191
|
return {
|
|
185
192
|
type: "pathbrowser",
|
|
186
193
|
_parse() {
|
|
@@ -188,7 +195,8 @@ function pathbrowser(input) {
|
|
|
188
195
|
type: "pathbrowser",
|
|
189
196
|
label,
|
|
190
197
|
placeholder,
|
|
191
|
-
tooltip
|
|
198
|
+
tooltip,
|
|
199
|
+
required
|
|
192
200
|
};
|
|
193
201
|
},
|
|
194
202
|
_primitive() {
|
|
@@ -200,15 +208,15 @@ function pathbrowser(input) {
|
|
|
200
208
|
|
|
201
209
|
// src/schema/image/image.ts
|
|
202
210
|
function image(input) {
|
|
203
|
-
const {
|
|
211
|
+
const { label, tooltip, required } = input;
|
|
204
212
|
return {
|
|
205
213
|
type: "image",
|
|
206
214
|
_parse() {
|
|
207
215
|
return {
|
|
208
216
|
type: "image",
|
|
209
217
|
label,
|
|
210
|
-
|
|
211
|
-
|
|
218
|
+
tooltip,
|
|
219
|
+
required
|
|
212
220
|
};
|
|
213
221
|
},
|
|
214
222
|
_primitive() {
|
|
@@ -220,19 +228,22 @@ function image(input) {
|
|
|
220
228
|
|
|
221
229
|
// src/schema/select/select.ts
|
|
222
230
|
function select(input) {
|
|
223
|
-
const { label, values, tooltip } = input;
|
|
231
|
+
const { label, values, tooltip, placeholder, multiple = false, required } = input;
|
|
224
232
|
return {
|
|
225
233
|
type: "select",
|
|
226
234
|
_parse() {
|
|
227
235
|
return {
|
|
228
236
|
type: "select",
|
|
229
237
|
label,
|
|
238
|
+
multiple,
|
|
230
239
|
values,
|
|
231
|
-
tooltip
|
|
240
|
+
tooltip,
|
|
241
|
+
placeholder,
|
|
242
|
+
required
|
|
232
243
|
};
|
|
233
244
|
},
|
|
234
245
|
_primitive() {
|
|
235
|
-
return "string";
|
|
246
|
+
return multiple ? "json" : "string";
|
|
236
247
|
},
|
|
237
248
|
...input
|
|
238
249
|
};
|
|
@@ -240,7 +251,7 @@ function select(input) {
|
|
|
240
251
|
|
|
241
252
|
// src/schema/rte/rte.ts
|
|
242
253
|
function rte(input) {
|
|
243
|
-
const { placeholder, label, tooltip } = input;
|
|
254
|
+
const { placeholder, label, tooltip, required } = input;
|
|
244
255
|
return {
|
|
245
256
|
type: "richtexteditor",
|
|
246
257
|
_parse() {
|
|
@@ -248,7 +259,8 @@ function rte(input) {
|
|
|
248
259
|
type: "richtexteditor",
|
|
249
260
|
label,
|
|
250
261
|
placeholder,
|
|
251
|
-
tooltip
|
|
262
|
+
tooltip,
|
|
263
|
+
required
|
|
252
264
|
};
|
|
253
265
|
},
|
|
254
266
|
_primitive() {
|
|
@@ -267,6 +279,98 @@ function dynamic(input) {
|
|
|
267
279
|
type: "dynamic"
|
|
268
280
|
};
|
|
269
281
|
},
|
|
282
|
+
_primitive() {
|
|
283
|
+
return "string";
|
|
284
|
+
},
|
|
285
|
+
...input
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// src/schema/calendar/calendar.ts
|
|
290
|
+
function calendar(input) {
|
|
291
|
+
const { valueformat, startday = 0, min, max, placeholder, label, tooltip, required } = input;
|
|
292
|
+
return {
|
|
293
|
+
type: "calendar",
|
|
294
|
+
_parse() {
|
|
295
|
+
return {
|
|
296
|
+
type: "calendar",
|
|
297
|
+
label,
|
|
298
|
+
valueformat,
|
|
299
|
+
placeholder,
|
|
300
|
+
startday,
|
|
301
|
+
tooltip,
|
|
302
|
+
min,
|
|
303
|
+
max,
|
|
304
|
+
required
|
|
305
|
+
};
|
|
306
|
+
},
|
|
307
|
+
_primitive() {
|
|
308
|
+
return "string";
|
|
309
|
+
},
|
|
310
|
+
...input
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// src/schema/datasource/datasource.ts
|
|
315
|
+
function datasource(input) {
|
|
316
|
+
const { label, body, url, tooltip, placeholder, multiple = false, required } = input;
|
|
317
|
+
return {
|
|
318
|
+
type: "datasource",
|
|
319
|
+
_parse() {
|
|
320
|
+
return {
|
|
321
|
+
type: "datasource",
|
|
322
|
+
label,
|
|
323
|
+
url,
|
|
324
|
+
multiple,
|
|
325
|
+
body,
|
|
326
|
+
tooltip,
|
|
327
|
+
placeholder,
|
|
328
|
+
required
|
|
329
|
+
};
|
|
330
|
+
},
|
|
331
|
+
_primitive() {
|
|
332
|
+
return multiple ? "json" : "string";
|
|
333
|
+
},
|
|
334
|
+
...input
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// src/schema/group/group.ts
|
|
339
|
+
function group(input) {
|
|
340
|
+
const { label, children, tooltip, toggle } = input;
|
|
341
|
+
const childrenParse = children._parse();
|
|
342
|
+
return {
|
|
343
|
+
type: "group",
|
|
344
|
+
_parse() {
|
|
345
|
+
return {
|
|
346
|
+
type: "group",
|
|
347
|
+
label,
|
|
348
|
+
tooltip,
|
|
349
|
+
toggle,
|
|
350
|
+
children: Array.isArray(childrenParse) ? childrenParse : [childrenParse]
|
|
351
|
+
};
|
|
352
|
+
},
|
|
353
|
+
_primitive() {
|
|
354
|
+
return "json";
|
|
355
|
+
},
|
|
356
|
+
...input
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// src/schema/datamodel/datamodel.ts
|
|
361
|
+
function datamodel(input) {
|
|
362
|
+
const { placeholder, label, tooltip, required } = input;
|
|
363
|
+
return {
|
|
364
|
+
type: "datamodel",
|
|
365
|
+
_parse() {
|
|
366
|
+
return {
|
|
367
|
+
type: "datamodel",
|
|
368
|
+
label,
|
|
369
|
+
placeholder,
|
|
370
|
+
tooltip,
|
|
371
|
+
required
|
|
372
|
+
};
|
|
373
|
+
},
|
|
270
374
|
_primitive() {
|
|
271
375
|
return "json";
|
|
272
376
|
},
|
|
@@ -357,7 +461,6 @@ function component(config, dialog2, slots) {
|
|
|
357
461
|
return {
|
|
358
462
|
type: "component",
|
|
359
463
|
dialog: dialog2,
|
|
360
|
-
slots,
|
|
361
464
|
_parse() {
|
|
362
465
|
return {
|
|
363
466
|
...config,
|
|
@@ -394,10 +497,14 @@ function webcomponent(schema, options) {
|
|
|
394
497
|
}
|
|
395
498
|
// Annotate the CommonJS export names for ESM import in node:
|
|
396
499
|
0 && (module.exports = {
|
|
500
|
+
calendar,
|
|
397
501
|
checkbox,
|
|
398
502
|
component,
|
|
503
|
+
datamodel,
|
|
504
|
+
datasource,
|
|
399
505
|
dialog,
|
|
400
506
|
dynamic,
|
|
507
|
+
group,
|
|
401
508
|
hidden,
|
|
402
509
|
image,
|
|
403
510
|
multifield,
|