@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
|
@@ -0,0 +1,74 @@
|
|
|
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 __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21
|
+
|
|
22
|
+
// src/schema/dialog/tabs.ts
|
|
23
|
+
var tabs_exports = {};
|
|
24
|
+
__export(tabs_exports, {
|
|
25
|
+
Tabs: () => Tabs
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(tabs_exports);
|
|
28
|
+
var Tabs = class {
|
|
29
|
+
constructor() {
|
|
30
|
+
__publicField(this, "tabs", /* @__PURE__ */ new Map());
|
|
31
|
+
}
|
|
32
|
+
addTab(name, entries) {
|
|
33
|
+
this.tabs.set(name, entries);
|
|
34
|
+
}
|
|
35
|
+
parse(entries) {
|
|
36
|
+
const result = [];
|
|
37
|
+
const usedEntries = /* @__PURE__ */ new Set();
|
|
38
|
+
if (this.tabs.size === 0) {
|
|
39
|
+
return entries;
|
|
40
|
+
}
|
|
41
|
+
for (const [name, mask] of this.tabs) {
|
|
42
|
+
const children = [];
|
|
43
|
+
if (!mask) {
|
|
44
|
+
throw new Error(`Entry "${String(name)}" does not have an appropriate tab configuration.`);
|
|
45
|
+
}
|
|
46
|
+
for (const [key] of Object.entries(mask)) {
|
|
47
|
+
const field = entries.find((f) => f.id === key);
|
|
48
|
+
if (usedEntries.has(key)) {
|
|
49
|
+
throw new Error(`Entry "${String(name)}.${String(key)}" is already used in another tab.`);
|
|
50
|
+
}
|
|
51
|
+
if (!field) {
|
|
52
|
+
throw new Error(`Field with id "${key}" not found`);
|
|
53
|
+
}
|
|
54
|
+
children.push(entries.find((f) => f.id === key));
|
|
55
|
+
}
|
|
56
|
+
result.push({
|
|
57
|
+
type: "tab",
|
|
58
|
+
label: name,
|
|
59
|
+
id: `tab_${name.toLowerCase().replaceAll(" ", "")}`,
|
|
60
|
+
children
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
return [{
|
|
64
|
+
type: "tabs",
|
|
65
|
+
id: "tabs",
|
|
66
|
+
children: result
|
|
67
|
+
}];
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
71
|
+
0 && (module.exports = {
|
|
72
|
+
Tabs
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/dialog/tabs.ts"],"sourcesContent":["import { EntryMask } from '../../types';\nimport { Field } from './types';\n\nexport class Tabs<TEntries> {\n private tabs = new Map<string, EntryMask<TEntries>>();\n\n addTab(name: string, entries: EntryMask<TEntries>) {\n this.tabs.set(name, entries);\n }\n\n parse(entries: Field[]) {\n const result = []\n const usedEntries = new Set();\n\n if(this.tabs.size === 0) {\n return entries\n }\n\n for(const [name, mask] of this.tabs) {\n const children = []\n\n if(!mask) {\n throw new Error(`Entry \"${String(name)}\" does not have an appropriate tab configuration.`);\n }\n\n for(const [key,] of Object.entries(mask)) {\n const field = entries.find(f => f.id === key)\n\n if (usedEntries.has(key)) {\n throw new Error(`Entry \"${String(name)}.${String(key)}\" is already used in another tab.`);\n }\n\n if(!field) {\n throw new Error(`Field with id \"${key}\" not found`);\n }\n\n children.push(entries.find(f => f.id === key))\n }\n\n result.push({\n type: 'tab',\n label: name,\n id: `tab_${name.toLowerCase().replaceAll(' ', '')}`,\n children\n })\n }\n\n return [{\n type: 'tabs',\n id: 'tabs',\n children: result\n }]\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGO,IAAM,OAAN,MAAqB;AAAA,EAArB;AACL,wBAAQ,QAAO,oBAAI,IAAiC;AAAA;AAAA,EAEpD,OAAO,MAAc,SAA8B;AACjD,SAAK,KAAK,IAAI,MAAM,OAAO;AAAA,EAC7B;AAAA,EAEA,MAAM,SAAkB;AACtB,UAAM,SAAS,CAAC;AAChB,UAAM,cAAc,oBAAI,IAAI;AAE5B,QAAG,KAAK,KAAK,SAAS,GAAG;AACvB,aAAO;AAAA,IACT;AAEA,eAAU,CAAC,MAAM,IAAI,KAAK,KAAK,MAAM;AACnC,YAAM,WAAW,CAAC;AAElB,UAAG,CAAC,MAAM;AACR,cAAM,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,mDAAmD;AAAA,MAC3F;AAEA,iBAAU,CAAC,GAAI,KAAK,OAAO,QAAQ,IAAI,GAAG;AACxC,cAAM,QAAQ,QAAQ,KAAK,OAAK,EAAE,OAAO,GAAG;AAE5C,YAAI,YAAY,IAAI,GAAG,GAAG;AACxB,gBAAM,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,IAAI,OAAO,GAAG,CAAC,mCAAmC;AAAA,QAC1F;AAEA,YAAG,CAAC,OAAO;AACT,gBAAM,IAAI,MAAM,kBAAkB,GAAG,aAAa;AAAA,QACpD;AAEA,iBAAS,KAAK,QAAQ,KAAK,OAAK,EAAE,OAAO,GAAG,CAAC;AAAA,MAC/C;AAEA,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,OAAO;AAAA,QACP,IAAI,OAAO,KAAK,YAAY,EAAE,WAAW,KAAK,EAAE,CAAC;AAAA,QACjD;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
|
|
5
|
+
// src/schema/dialog/tabs.ts
|
|
6
|
+
var Tabs = class {
|
|
7
|
+
constructor() {
|
|
8
|
+
__publicField(this, "tabs", /* @__PURE__ */ new Map());
|
|
9
|
+
}
|
|
10
|
+
addTab(name, entries) {
|
|
11
|
+
this.tabs.set(name, entries);
|
|
12
|
+
}
|
|
13
|
+
parse(entries) {
|
|
14
|
+
const result = [];
|
|
15
|
+
const usedEntries = /* @__PURE__ */ new Set();
|
|
16
|
+
if (this.tabs.size === 0) {
|
|
17
|
+
return entries;
|
|
18
|
+
}
|
|
19
|
+
for (const [name, mask] of this.tabs) {
|
|
20
|
+
const children = [];
|
|
21
|
+
if (!mask) {
|
|
22
|
+
throw new Error(`Entry "${String(name)}" does not have an appropriate tab configuration.`);
|
|
23
|
+
}
|
|
24
|
+
for (const [key] of Object.entries(mask)) {
|
|
25
|
+
const field = entries.find((f) => f.id === key);
|
|
26
|
+
if (usedEntries.has(key)) {
|
|
27
|
+
throw new Error(`Entry "${String(name)}.${String(key)}" is already used in another tab.`);
|
|
28
|
+
}
|
|
29
|
+
if (!field) {
|
|
30
|
+
throw new Error(`Field with id "${key}" not found`);
|
|
31
|
+
}
|
|
32
|
+
children.push(entries.find((f) => f.id === key));
|
|
33
|
+
}
|
|
34
|
+
result.push({
|
|
35
|
+
type: "tab",
|
|
36
|
+
label: name,
|
|
37
|
+
id: `tab_${name.toLowerCase().replaceAll(" ", "")}`,
|
|
38
|
+
children
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return [{
|
|
42
|
+
type: "tabs",
|
|
43
|
+
id: "tabs",
|
|
44
|
+
children: result
|
|
45
|
+
}];
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export {
|
|
49
|
+
Tabs
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=tabs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/dialog/tabs.ts"],"sourcesContent":["import { EntryMask } from '../../types';\nimport { Field } from './types';\n\nexport class Tabs<TEntries> {\n private tabs = new Map<string, EntryMask<TEntries>>();\n\n addTab(name: string, entries: EntryMask<TEntries>) {\n this.tabs.set(name, entries);\n }\n\n parse(entries: Field[]) {\n const result = []\n const usedEntries = new Set();\n\n if(this.tabs.size === 0) {\n return entries\n }\n\n for(const [name, mask] of this.tabs) {\n const children = []\n\n if(!mask) {\n throw new Error(`Entry \"${String(name)}\" does not have an appropriate tab configuration.`);\n }\n\n for(const [key,] of Object.entries(mask)) {\n const field = entries.find(f => f.id === key)\n\n if (usedEntries.has(key)) {\n throw new Error(`Entry \"${String(name)}.${String(key)}\" is already used in another tab.`);\n }\n\n if(!field) {\n throw new Error(`Field with id \"${key}\" not found`);\n }\n\n children.push(entries.find(f => f.id === key))\n }\n\n result.push({\n type: 'tab',\n label: name,\n id: `tab_${name.toLowerCase().replaceAll(' ', '')}`,\n children\n })\n }\n\n return [{\n type: 'tabs',\n id: 'tabs',\n children: result\n }]\n }\n}"],"mappings":";;;;;AAGO,IAAM,OAAN,MAAqB;AAAA,EAArB;AACL,wBAAQ,QAAO,oBAAI,IAAiC;AAAA;AAAA,EAEpD,OAAO,MAAc,SAA8B;AACjD,SAAK,KAAK,IAAI,MAAM,OAAO;AAAA,EAC7B;AAAA,EAEA,MAAM,SAAkB;AACtB,UAAM,SAAS,CAAC;AAChB,UAAM,cAAc,oBAAI,IAAI;AAE5B,QAAG,KAAK,KAAK,SAAS,GAAG;AACvB,aAAO;AAAA,IACT;AAEA,eAAU,CAAC,MAAM,IAAI,KAAK,KAAK,MAAM;AACnC,YAAM,WAAW,CAAC;AAElB,UAAG,CAAC,MAAM;AACR,cAAM,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,mDAAmD;AAAA,MAC3F;AAEA,iBAAU,CAAC,GAAI,KAAK,OAAO,QAAQ,IAAI,GAAG;AACxC,cAAM,QAAQ,QAAQ,KAAK,OAAK,EAAE,OAAO,GAAG;AAE5C,YAAI,YAAY,IAAI,GAAG,GAAG;AACxB,gBAAM,IAAI,MAAM,UAAU,OAAO,IAAI,CAAC,IAAI,OAAO,GAAG,CAAC,mCAAmC;AAAA,QAC1F;AAEA,YAAG,CAAC,OAAO;AACT,gBAAM,IAAI,MAAM,kBAAkB,GAAG,aAAa;AAAA,QACpD;AAEA,iBAAS,KAAK,QAAQ,KAAK,OAAK,EAAE,OAAO,GAAG,CAAC;AAAA,MAC/C;AAEA,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,OAAO;AAAA,QACP,IAAI,OAAO,KAAK,YAAY,EAAE,WAAW,KAAK,EAAE,CAAC;AAAA,QACjD;AAAA,MACF,CAAC;AAAA,IACH;AAEA,WAAO,CAAC;AAAA,MACN,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/schema/dialog/types.ts
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/dialog/types.ts"],"sourcesContent":["import { ObjectEntries, ObjectOutput } from '../../types/object';\nimport { AddType, DeepPartial, LeavesPath, NodesPath, PathValue, UnArray } from '../../types';\n\ntype Operators = 'eq' | 'neq' | 'and' | 'or' | 'exists'\n\nexport interface Conditions<T extends Operators = Operators> {\n operator: T;\n field?: string;\n value?: any;\n}\n\nexport interface ConditionOperators<TEntries extends ObjectEntries = any> {\n eq: <P extends NodesPath<UnArray<ObjectOutput<TEntries>>>>(\n field: P,\n value: PathValue<UnArray<ObjectOutput<TEntries>>, P>\n ) => Conditions<'eq'>;\n neq: <P extends NodesPath<UnArray<ObjectOutput<TEntries>>>>(\n field: P,\n value: PathValue<UnArray<ObjectOutput<TEntries>>, P>\n ) => Conditions<'neq'>;\n exists: <P extends NodesPath<UnArray<ObjectOutput<TEntries>>>>(\n field: P,\n ) => Conditions<'exists'>;\n and: (...args: Conditions[]) => Conditions<'and'>;\n or: (...args: Conditions[]) => Conditions<'or'>;\n}\n\nexport type ConditionFn<TEntries extends ObjectEntries> = (ops: ConditionOperators<TEntries>) => Conditions;\n\nexport type ConditionsArgument<TEntries extends ObjectEntries> = AddType<UnArray<DeepPartial<ObjectOutput<TEntries>>>, ConditionFn<TEntries>>\n\nexport type Field = { id: string, condition?: Conditions, children?: Field[] }"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
import { BaseSchema } from '../../types
|
|
1
|
+
import { B as BaseSchema } from '../../types-B8taWezd.mjs';
|
|
2
2
|
import '../../types/webcomponent.mjs';
|
|
3
|
+
import '../../types/utils.mjs';
|
|
3
4
|
|
|
4
|
-
interface DynamicZoneSchema extends BaseSchema<{
|
|
5
|
-
dataPath: string;
|
|
6
|
-
childrenHtml: string;
|
|
7
|
-
dataConfig: {
|
|
8
|
-
path: string;
|
|
9
|
-
slingPath: string;
|
|
10
|
-
type: string;
|
|
11
|
-
isResponsiveGrid: boolean;
|
|
12
|
-
csp: string;
|
|
13
|
-
editConfig: {
|
|
14
|
-
actions: string[];
|
|
15
|
-
disableTargeting: boolean;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
}> {
|
|
5
|
+
interface DynamicZoneSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
19
6
|
/**
|
|
20
7
|
* The schema type.
|
|
21
8
|
*/
|
|
22
|
-
|
|
9
|
+
type: 'dynamic';
|
|
23
10
|
}
|
|
24
11
|
interface DynamicInput {
|
|
25
12
|
}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
import { BaseSchema } from '../../types
|
|
1
|
+
import { B as BaseSchema } from '../../types-rfg_xywc.js';
|
|
2
2
|
import '../../types/webcomponent.js';
|
|
3
|
+
import '../../types/utils.js';
|
|
3
4
|
|
|
4
|
-
interface DynamicZoneSchema extends BaseSchema<{
|
|
5
|
-
dataPath: string;
|
|
6
|
-
childrenHtml: string;
|
|
7
|
-
dataConfig: {
|
|
8
|
-
path: string;
|
|
9
|
-
slingPath: string;
|
|
10
|
-
type: string;
|
|
11
|
-
isResponsiveGrid: boolean;
|
|
12
|
-
csp: string;
|
|
13
|
-
editConfig: {
|
|
14
|
-
actions: string[];
|
|
15
|
-
disableTargeting: boolean;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
}> {
|
|
5
|
+
interface DynamicZoneSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
19
6
|
/**
|
|
20
7
|
* The schema type.
|
|
21
8
|
*/
|
|
22
|
-
|
|
9
|
+
type: 'dynamic';
|
|
23
10
|
}
|
|
24
11
|
interface DynamicInput {
|
|
25
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/dynamic/dynamic.ts"],"sourcesContent":["import {\n BaseSchema,\n} from '../../types';\n\nexport interface DynamicZoneSchema extends
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/dynamic/dynamic.ts"],"sourcesContent":["import {\n BaseSchema,\n} from '../../types';\n\nexport interface DynamicZoneSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'dynamic';\n}\n\ninterface DynamicInput {\n}\n\nexport function dynamic(input: DynamicInput): DynamicZoneSchema {\n return {\n type: 'dynamic',\n _parse() {\n return {\n type: 'dynamic',\n };\n },\n _primitive() {\n return 'string';\n },\n ...input,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcO,SAAS,QAAQ,OAAwC;AAC9D,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/dynamic/dynamic.ts"],"sourcesContent":["import {\n BaseSchema,\n} from '../../types';\n\nexport interface DynamicZoneSchema extends
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/dynamic/dynamic.ts"],"sourcesContent":["import {\n BaseSchema,\n} from '../../types';\n\nexport interface DynamicZoneSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'dynamic';\n}\n\ninterface DynamicInput {\n}\n\nexport function dynamic(input: DynamicInput): DynamicZoneSchema {\n return {\n type: 'dynamic',\n _parse() {\n return {\n type: 'dynamic',\n };\n },\n _primitive() {\n return 'string';\n },\n ...input,\n };\n}"],"mappings":";AAcO,SAAS,QAAQ,OAAwC;AAC9D,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/dynamic/index.ts","../../../src/schema/dynamic/dynamic.ts"],"sourcesContent":["export * from './dynamic'","import {\n BaseSchema,\n} from '../../types';\n\nexport interface DynamicZoneSchema extends
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/dynamic/index.ts","../../../src/schema/dynamic/dynamic.ts"],"sourcesContent":["export * from './dynamic'","import {\n BaseSchema,\n} from '../../types';\n\nexport interface DynamicZoneSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'dynamic';\n}\n\ninterface DynamicInput {\n}\n\nexport function dynamic(input: DynamicInput): DynamicZoneSchema {\n return {\n type: 'dynamic',\n _parse() {\n return {\n type: 'dynamic',\n };\n },\n _primitive() {\n return 'string';\n },\n ...input,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,SAAS,QAAQ,OAAwC;AAC9D,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schema/dynamic/dynamic.ts"],"sourcesContent":["import {\n BaseSchema,\n} from '../../types';\n\nexport interface DynamicZoneSchema extends
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/dynamic/dynamic.ts"],"sourcesContent":["import {\n BaseSchema,\n} from '../../types';\n\nexport interface DynamicZoneSchema<TOutput extends string = string> extends BaseSchema<TOutput> {\n /**\n * The schema type.\n */\n type: 'dynamic';\n}\n\ninterface DynamicInput {\n}\n\nexport function dynamic(input: DynamicInput): DynamicZoneSchema {\n return {\n type: 'dynamic',\n _parse() {\n return {\n type: 'dynamic',\n };\n },\n _primitive() {\n return 'string';\n },\n ...input,\n };\n}"],"mappings":";AAcO,SAAS,QAAQ,OAAwC;AAC9D,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { B as BaseSchema, d as BaseFieldInput } from '../../types-B8taWezd.mjs';
|
|
2
|
+
import { InferOutput } from '../../types/infer.mjs';
|
|
3
|
+
import '../../types/webcomponent.mjs';
|
|
4
|
+
import '../../types/utils.mjs';
|
|
5
|
+
|
|
6
|
+
interface GroupSchema<TChildren extends BaseSchema<unknown>> extends BaseSchema<{
|
|
7
|
+
active: boolean;
|
|
8
|
+
} & InferOutput<TChildren>> {
|
|
9
|
+
readonly type: 'group';
|
|
10
|
+
/**
|
|
11
|
+
* The children item schema.
|
|
12
|
+
*/
|
|
13
|
+
readonly children: TChildren;
|
|
14
|
+
}
|
|
15
|
+
interface MultifieldInput<TChildren extends BaseSchema<unknown>> extends BaseFieldInput {
|
|
16
|
+
children: TChildren;
|
|
17
|
+
toggle?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare function group<const TChildren extends BaseSchema<unknown>>(input: MultifieldInput<TChildren>): GroupSchema<TChildren>;
|
|
20
|
+
|
|
21
|
+
export { type GroupSchema, group };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { B as BaseSchema, d as BaseFieldInput } from '../../types-rfg_xywc.js';
|
|
2
|
+
import { InferOutput } from '../../types/infer.js';
|
|
3
|
+
import '../../types/webcomponent.js';
|
|
4
|
+
import '../../types/utils.js';
|
|
5
|
+
|
|
6
|
+
interface GroupSchema<TChildren extends BaseSchema<unknown>> extends BaseSchema<{
|
|
7
|
+
active: boolean;
|
|
8
|
+
} & InferOutput<TChildren>> {
|
|
9
|
+
readonly type: 'group';
|
|
10
|
+
/**
|
|
11
|
+
* The children item schema.
|
|
12
|
+
*/
|
|
13
|
+
readonly children: TChildren;
|
|
14
|
+
}
|
|
15
|
+
interface MultifieldInput<TChildren extends BaseSchema<unknown>> extends BaseFieldInput {
|
|
16
|
+
children: TChildren;
|
|
17
|
+
toggle?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare function group<const TChildren extends BaseSchema<unknown>>(input: MultifieldInput<TChildren>): GroupSchema<TChildren>;
|
|
20
|
+
|
|
21
|
+
export { type GroupSchema, group };
|
|
@@ -0,0 +1,50 @@
|
|
|
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/group/group.ts
|
|
21
|
+
var group_exports = {};
|
|
22
|
+
__export(group_exports, {
|
|
23
|
+
group: () => group
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(group_exports);
|
|
26
|
+
function group(input) {
|
|
27
|
+
const { label, children, tooltip, toggle } = input;
|
|
28
|
+
const childrenParse = children._parse();
|
|
29
|
+
return {
|
|
30
|
+
type: "group",
|
|
31
|
+
_parse() {
|
|
32
|
+
return {
|
|
33
|
+
type: "group",
|
|
34
|
+
label,
|
|
35
|
+
tooltip,
|
|
36
|
+
toggle,
|
|
37
|
+
children: Array.isArray(childrenParse) ? childrenParse : [childrenParse]
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
_primitive() {
|
|
41
|
+
return "json";
|
|
42
|
+
},
|
|
43
|
+
...input
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
group
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/group/group.ts"],"sourcesContent":["import {\n BaseFieldInput,\n BaseSchema,\n InferOutput,\n} from '../../types';\n\nexport interface GroupSchema<\n TChildren extends BaseSchema<unknown>,\n> extends BaseSchema<{\n active: boolean;\n} & InferOutput<TChildren>> {\n readonly type: 'group';\n /**\n * The children item schema.\n */\n readonly children: TChildren;\n}\n\ninterface MultifieldInput<TChildren extends BaseSchema<unknown>> extends BaseFieldInput {\n children: TChildren;\n toggle?: boolean;\n}\n\nexport function group<const TChildren extends BaseSchema<unknown>>(input: MultifieldInput<TChildren>): GroupSchema<TChildren> {\n const { label, children, tooltip, toggle } = input;\n const childrenParse = children._parse();\n\n return {\n type: 'group',\n _parse() {\n return {\n type: 'group',\n label,\n tooltip,\n toggle,\n children: Array.isArray(childrenParse) ? childrenParse : [childrenParse],\n };\n },\n _primitive() {\n return 'json';\n },\n ...input,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBO,SAAS,MAAmD,OAA2D;AAC5H,QAAM,EAAE,OAAO,UAAU,SAAS,OAAO,IAAI;AAC7C,QAAM,gBAAgB,SAAS,OAAO;AAEtC,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,MAAM,QAAQ,aAAa,IAAI,gBAAgB,CAAC,aAAa;AAAA,MACzE;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/schema/group/group.ts
|
|
2
|
+
function group(input) {
|
|
3
|
+
const { label, children, tooltip, toggle } = input;
|
|
4
|
+
const childrenParse = children._parse();
|
|
5
|
+
return {
|
|
6
|
+
type: "group",
|
|
7
|
+
_parse() {
|
|
8
|
+
return {
|
|
9
|
+
type: "group",
|
|
10
|
+
label,
|
|
11
|
+
tooltip,
|
|
12
|
+
toggle,
|
|
13
|
+
children: Array.isArray(childrenParse) ? childrenParse : [childrenParse]
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
_primitive() {
|
|
17
|
+
return "json";
|
|
18
|
+
},
|
|
19
|
+
...input
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
group
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/group/group.ts"],"sourcesContent":["import {\n BaseFieldInput,\n BaseSchema,\n InferOutput,\n} from '../../types';\n\nexport interface GroupSchema<\n TChildren extends BaseSchema<unknown>,\n> extends BaseSchema<{\n active: boolean;\n} & InferOutput<TChildren>> {\n readonly type: 'group';\n /**\n * The children item schema.\n */\n readonly children: TChildren;\n}\n\ninterface MultifieldInput<TChildren extends BaseSchema<unknown>> extends BaseFieldInput {\n children: TChildren;\n toggle?: boolean;\n}\n\nexport function group<const TChildren extends BaseSchema<unknown>>(input: MultifieldInput<TChildren>): GroupSchema<TChildren> {\n const { label, children, tooltip, toggle } = input;\n const childrenParse = children._parse();\n\n return {\n type: 'group',\n _parse() {\n return {\n type: 'group',\n label,\n tooltip,\n toggle,\n children: Array.isArray(childrenParse) ? childrenParse : [childrenParse],\n };\n },\n _primitive() {\n return 'json';\n },\n ...input,\n };\n}"],"mappings":";AAuBO,SAAS,MAAmD,OAA2D;AAC5H,QAAM,EAAE,OAAO,UAAU,SAAS,OAAO,IAAI;AAC7C,QAAM,gBAAgB,SAAS,OAAO;AAEtC,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,MAAM,QAAQ,aAAa,IAAI,gBAAgB,CAAC,aAAa;AAAA,MACzE;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -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/group/index.ts
|
|
21
|
+
var group_exports = {};
|
|
22
|
+
__export(group_exports, {
|
|
23
|
+
group: () => group
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(group_exports);
|
|
26
|
+
|
|
27
|
+
// src/schema/group/group.ts
|
|
28
|
+
function group(input) {
|
|
29
|
+
const { label, children, tooltip, toggle } = input;
|
|
30
|
+
const childrenParse = children._parse();
|
|
31
|
+
return {
|
|
32
|
+
type: "group",
|
|
33
|
+
_parse() {
|
|
34
|
+
return {
|
|
35
|
+
type: "group",
|
|
36
|
+
label,
|
|
37
|
+
tooltip,
|
|
38
|
+
toggle,
|
|
39
|
+
children: Array.isArray(childrenParse) ? childrenParse : [childrenParse]
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
_primitive() {
|
|
43
|
+
return "json";
|
|
44
|
+
},
|
|
45
|
+
...input
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
group
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/group/index.ts","../../../src/schema/group/group.ts"],"sourcesContent":["export * from './group';\n","import {\n BaseFieldInput,\n BaseSchema,\n InferOutput,\n} from '../../types';\n\nexport interface GroupSchema<\n TChildren extends BaseSchema<unknown>,\n> extends BaseSchema<{\n active: boolean;\n} & InferOutput<TChildren>> {\n readonly type: 'group';\n /**\n * The children item schema.\n */\n readonly children: TChildren;\n}\n\ninterface MultifieldInput<TChildren extends BaseSchema<unknown>> extends BaseFieldInput {\n children: TChildren;\n toggle?: boolean;\n}\n\nexport function group<const TChildren extends BaseSchema<unknown>>(input: MultifieldInput<TChildren>): GroupSchema<TChildren> {\n const { label, children, tooltip, toggle } = input;\n const childrenParse = children._parse();\n\n return {\n type: 'group',\n _parse() {\n return {\n type: 'group',\n label,\n tooltip,\n toggle,\n children: Array.isArray(childrenParse) ? childrenParse : [childrenParse],\n };\n },\n _primitive() {\n return 'json';\n },\n ...input,\n };\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACuBO,SAAS,MAAmD,OAA2D;AAC5H,QAAM,EAAE,OAAO,UAAU,SAAS,OAAO,IAAI;AAC7C,QAAM,gBAAgB,SAAS,OAAO;AAEtC,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,MAAM,QAAQ,aAAa,IAAI,gBAAgB,CAAC,aAAa;AAAA,MACzE;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/schema/group/group.ts
|
|
2
|
+
function group(input) {
|
|
3
|
+
const { label, children, tooltip, toggle } = input;
|
|
4
|
+
const childrenParse = children._parse();
|
|
5
|
+
return {
|
|
6
|
+
type: "group",
|
|
7
|
+
_parse() {
|
|
8
|
+
return {
|
|
9
|
+
type: "group",
|
|
10
|
+
label,
|
|
11
|
+
tooltip,
|
|
12
|
+
toggle,
|
|
13
|
+
children: Array.isArray(childrenParse) ? childrenParse : [childrenParse]
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
_primitive() {
|
|
17
|
+
return "json";
|
|
18
|
+
},
|
|
19
|
+
...input
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
group
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/schema/group/group.ts"],"sourcesContent":["import {\n BaseFieldInput,\n BaseSchema,\n InferOutput,\n} from '../../types';\n\nexport interface GroupSchema<\n TChildren extends BaseSchema<unknown>,\n> extends BaseSchema<{\n active: boolean;\n} & InferOutput<TChildren>> {\n readonly type: 'group';\n /**\n * The children item schema.\n */\n readonly children: TChildren;\n}\n\ninterface MultifieldInput<TChildren extends BaseSchema<unknown>> extends BaseFieldInput {\n children: TChildren;\n toggle?: boolean;\n}\n\nexport function group<const TChildren extends BaseSchema<unknown>>(input: MultifieldInput<TChildren>): GroupSchema<TChildren> {\n const { label, children, tooltip, toggle } = input;\n const childrenParse = children._parse();\n\n return {\n type: 'group',\n _parse() {\n return {\n type: 'group',\n label,\n tooltip,\n toggle,\n children: Array.isArray(childrenParse) ? childrenParse : [childrenParse],\n };\n },\n _primitive() {\n return 'json';\n },\n ...input,\n };\n}"],"mappings":";AAuBO,SAAS,MAAmD,OAA2D;AAC5H,QAAM,EAAE,OAAO,UAAU,SAAS,OAAO,IAAI;AAC7C,QAAM,gBAAgB,SAAS,OAAO;AAEtC,SAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AACP,aAAO;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,MAAM,QAAQ,aAAa,IAAI,gBAAgB,CAAC,aAAa;AAAA,MACzE;AAAA,IACF;AAAA,IACA,aAAa;AACX,aAAO;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL;AACF;","names":[]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseSchema } from '../../types
|
|
1
|
+
import { B as BaseSchema } from '../../types-B8taWezd.mjs';
|
|
2
2
|
import { WebcomponentPropTypes } from '../../types/webcomponent.mjs';
|
|
3
|
+
import '../../types/utils.mjs';
|
|
3
4
|
|
|
4
5
|
interface HiddenSchema extends BaseSchema<string> {
|
|
5
6
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { BaseSchema } from '../../types
|
|
1
|
+
import { B as BaseSchema } from '../../types-rfg_xywc.js';
|
|
2
2
|
import { WebcomponentPropTypes } from '../../types/webcomponent.js';
|
|
3
|
+
import '../../types/utils.js';
|
|
3
4
|
|
|
4
5
|
interface HiddenSchema extends BaseSchema<string> {
|
|
5
6
|
/**
|
|
@@ -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 ImageSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
5
6
|
/**
|
|
@@ -8,7 +9,6 @@ interface ImageSchema<TOutput extends string = string> extends BaseSchema<TOutpu
|
|
|
8
9
|
type: 'image';
|
|
9
10
|
}
|
|
10
11
|
interface ImageInput extends BaseFieldInput {
|
|
11
|
-
placeholder: string;
|
|
12
12
|
}
|
|
13
13
|
declare function image(input: ImageInput): ImageSchema;
|
|
14
14
|
|
|
@@ -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 ImageSchema<TOutput extends string = string> extends BaseSchema<TOutput> {
|
|
5
6
|
/**
|
|
@@ -8,7 +9,6 @@ interface ImageSchema<TOutput extends string = string> extends BaseSchema<TOutpu
|
|
|
8
9
|
type: 'image';
|
|
9
10
|
}
|
|
10
11
|
interface ImageInput extends BaseFieldInput {
|
|
11
|
-
placeholder: string;
|
|
12
12
|
}
|
|
13
13
|
declare function image(input: ImageInput): ImageSchema;
|
|
14
14
|
|