@fieldia/core 0.7.0 → 0.9.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/README.md +2 -1
- package/package.json +1 -1
- package/schema/page.schema.json +160 -0
- package/src/index.d.mts +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +2 -1
- package/src/index.js.map +1 -1
- package/src/index.mjs +1 -1
- package/src/index.mjs.map +1 -1
- package/src/lib/format/check-page.js +3 -2
- package/src/lib/format/check-page.js.map +1 -1
- package/src/lib/format/check-page.mjs +3 -2
- package/src/lib/format/check-page.mjs.map +1 -1
- package/src/lib/format/layout.d.mts +152 -1
- package/src/lib/format/layout.d.ts +152 -1
- package/src/lib/format/layout.js +14 -2
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +14 -2
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/page.d.mts +58 -0
- package/src/lib/format/page.d.ts +58 -0
- package/src/lib/format/references.d.mts +1 -0
- package/src/lib/format/references.d.ts +1 -0
- package/src/lib/format/references.js +31 -0
- package/src/lib/format/references.js.map +1 -1
- package/src/lib/format/references.mjs +31 -0
- package/src/lib/format/references.mjs.map +1 -1
- package/src/lib/record/data-source.d.mts +38 -0
- package/src/lib/record/data-source.d.ts +38 -0
- package/src/lib/record/data-source.js.map +1 -1
- package/src/lib/record/data-source.mjs.map +1 -1
- package/src/lib/record/filter.js +2 -1
- package/src/lib/record/filter.js.map +1 -1
- package/src/lib/record/filter.mjs +2 -1
- package/src/lib/record/filter.mjs.map +1 -1
- package/src/lib/record/form.d.mts +6 -1
- package/src/lib/record/form.d.ts +6 -1
- package/src/lib/record/form.js +7 -1
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +7 -1
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/memory-data-source.js +53 -0
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +53 -0
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/lib/record/search.d.mts +52 -0
- package/src/lib/record/search.d.ts +52 -0
- package/src/lib/record/search.js +72 -0
- package/src/lib/record/search.js.map +1 -0
- package/src/lib/record/search.mjs +67 -0
- package/src/lib/record/search.mjs.map +1 -0
- package/src/runtime.d.mts +3 -2
- package/src/runtime.d.ts +3 -2
- package/src/runtime.js +5 -1
- package/src/runtime.js.map +1 -1
- package/src/runtime.mjs +1 -0
- package/src/runtime.mjs.map +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@ form.subscribe((state) => console.log(state.values, state.errors));
|
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Fieldia knows no backend. Records load and save through a `DataSource` — `load`,
|
|
24
|
-
`save`, `onchange`, `search`, `submit`
|
|
24
|
+
`save`, `onchange`, `search`, `create`, `submit`, and `list` and `groups` for a
|
|
25
|
+
list of records — that your app implements;
|
|
25
26
|
`createMemoryDataSource` implements all of it in memory, for tests and demos.
|
|
26
27
|
|
|
27
28
|
The page format is also a JSON Schema, for editors and other languages:
|
package/package.json
CHANGED
package/schema/page.schema.json
CHANGED
|
@@ -1629,6 +1629,9 @@
|
|
|
1629
1629
|
},
|
|
1630
1630
|
{
|
|
1631
1631
|
"$ref": "#/$defs/WizardNode"
|
|
1632
|
+
},
|
|
1633
|
+
{
|
|
1634
|
+
"$ref": "#/$defs/ListNode"
|
|
1632
1635
|
}
|
|
1633
1636
|
]
|
|
1634
1637
|
},
|
|
@@ -2673,6 +2676,163 @@
|
|
|
2673
2676
|
"children"
|
|
2674
2677
|
],
|
|
2675
2678
|
"additionalProperties": false
|
|
2679
|
+
},
|
|
2680
|
+
"ListNode": {
|
|
2681
|
+
"type": "object",
|
|
2682
|
+
"properties": {
|
|
2683
|
+
"type": {
|
|
2684
|
+
"type": "string",
|
|
2685
|
+
"const": "list"
|
|
2686
|
+
},
|
|
2687
|
+
"id": {
|
|
2688
|
+
"type": "string",
|
|
2689
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
|
|
2690
|
+
},
|
|
2691
|
+
"columns": {
|
|
2692
|
+
"minItems": 1,
|
|
2693
|
+
"type": "array",
|
|
2694
|
+
"items": {
|
|
2695
|
+
"type": "string",
|
|
2696
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
2697
|
+
}
|
|
2698
|
+
},
|
|
2699
|
+
"sort": {
|
|
2700
|
+
"type": "array",
|
|
2701
|
+
"items": {
|
|
2702
|
+
"type": "object",
|
|
2703
|
+
"properties": {
|
|
2704
|
+
"field": {
|
|
2705
|
+
"type": "string",
|
|
2706
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
2707
|
+
},
|
|
2708
|
+
"desc": {
|
|
2709
|
+
"type": "boolean"
|
|
2710
|
+
}
|
|
2711
|
+
},
|
|
2712
|
+
"required": [
|
|
2713
|
+
"field"
|
|
2714
|
+
],
|
|
2715
|
+
"additionalProperties": false
|
|
2716
|
+
}
|
|
2717
|
+
},
|
|
2718
|
+
"pageSize": {
|
|
2719
|
+
"type": "integer",
|
|
2720
|
+
"minimum": 1,
|
|
2721
|
+
"maximum": 500
|
|
2722
|
+
},
|
|
2723
|
+
"searchFields": {
|
|
2724
|
+
"type": "array",
|
|
2725
|
+
"items": {
|
|
2726
|
+
"type": "string",
|
|
2727
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
2728
|
+
}
|
|
2729
|
+
},
|
|
2730
|
+
"filters": {
|
|
2731
|
+
"type": "array",
|
|
2732
|
+
"items": {
|
|
2733
|
+
"type": "object",
|
|
2734
|
+
"properties": {
|
|
2735
|
+
"id": {
|
|
2736
|
+
"type": "string",
|
|
2737
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
|
|
2738
|
+
},
|
|
2739
|
+
"label": {
|
|
2740
|
+
"type": "string"
|
|
2741
|
+
},
|
|
2742
|
+
"filter": {
|
|
2743
|
+
"minItems": 1,
|
|
2744
|
+
"type": "array",
|
|
2745
|
+
"items": {
|
|
2746
|
+
"$ref": "#/$defs/FilterItem"
|
|
2747
|
+
}
|
|
2748
|
+
}
|
|
2749
|
+
},
|
|
2750
|
+
"required": [
|
|
2751
|
+
"id",
|
|
2752
|
+
"label",
|
|
2753
|
+
"filter"
|
|
2754
|
+
],
|
|
2755
|
+
"additionalProperties": false
|
|
2756
|
+
}
|
|
2757
|
+
},
|
|
2758
|
+
"defaultFilters": {
|
|
2759
|
+
"type": "array",
|
|
2760
|
+
"items": {
|
|
2761
|
+
"type": "string",
|
|
2762
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
|
|
2763
|
+
}
|
|
2764
|
+
},
|
|
2765
|
+
"groupBy": {
|
|
2766
|
+
"type": "array",
|
|
2767
|
+
"items": {
|
|
2768
|
+
"type": "string",
|
|
2769
|
+
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
2770
|
+
}
|
|
2771
|
+
},
|
|
2772
|
+
"actions": {
|
|
2773
|
+
"type": "array",
|
|
2774
|
+
"items": {
|
|
2775
|
+
"type": "object",
|
|
2776
|
+
"properties": {
|
|
2777
|
+
"type": {
|
|
2778
|
+
"type": "string",
|
|
2779
|
+
"const": "button"
|
|
2780
|
+
},
|
|
2781
|
+
"id": {
|
|
2782
|
+
"type": "string",
|
|
2783
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
|
|
2784
|
+
},
|
|
2785
|
+
"label": {
|
|
2786
|
+
"type": "string"
|
|
2787
|
+
},
|
|
2788
|
+
"action": {
|
|
2789
|
+
"type": "string",
|
|
2790
|
+
"minLength": 1
|
|
2791
|
+
},
|
|
2792
|
+
"params": {
|
|
2793
|
+
"type": "object",
|
|
2794
|
+
"propertyNames": {
|
|
2795
|
+
"type": "string"
|
|
2796
|
+
},
|
|
2797
|
+
"additionalProperties": {
|
|
2798
|
+
"$ref": "#/$defs/JsonValue"
|
|
2799
|
+
}
|
|
2800
|
+
},
|
|
2801
|
+
"style": {
|
|
2802
|
+
"type": "string",
|
|
2803
|
+
"enum": [
|
|
2804
|
+
"primary",
|
|
2805
|
+
"secondary",
|
|
2806
|
+
"danger",
|
|
2807
|
+
"link"
|
|
2808
|
+
]
|
|
2809
|
+
},
|
|
2810
|
+
"confirm": {
|
|
2811
|
+
"type": "string"
|
|
2812
|
+
},
|
|
2813
|
+
"icon": {
|
|
2814
|
+
"type": "string"
|
|
2815
|
+
},
|
|
2816
|
+
"invisible": {
|
|
2817
|
+
"$ref": "#/$defs/Modifier"
|
|
2818
|
+
}
|
|
2819
|
+
},
|
|
2820
|
+
"required": [
|
|
2821
|
+
"type",
|
|
2822
|
+
"id",
|
|
2823
|
+
"label",
|
|
2824
|
+
"action"
|
|
2825
|
+
],
|
|
2826
|
+
"additionalProperties": false
|
|
2827
|
+
}
|
|
2828
|
+
}
|
|
2829
|
+
},
|
|
2830
|
+
"required": [
|
|
2831
|
+
"type",
|
|
2832
|
+
"id",
|
|
2833
|
+
"columns"
|
|
2834
|
+
],
|
|
2835
|
+
"additionalProperties": false
|
|
2676
2836
|
}
|
|
2677
2837
|
}
|
|
2678
2838
|
}
|
package/src/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './runtime.mjs';
|
|
2
2
|
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, } from './lib/format/field.mjs';
|
|
3
|
-
export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema } from './lib/format/layout.mjs';
|
|
3
|
+
export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema } from './lib/format/layout.mjs';
|
|
4
4
|
export { PageSchema } from './lib/format/page.mjs';
|
|
5
5
|
export { validatePage } from './lib/format/validate.mjs';
|
|
6
6
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
package/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './runtime';
|
|
2
2
|
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, } from './lib/format/field';
|
|
3
|
-
export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema } from './lib/format/layout';
|
|
3
|
+
export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema } from './lib/format/layout';
|
|
4
4
|
export { PageSchema } from './lib/format/page';
|
|
5
5
|
export { validatePage } from './lib/format/validate';
|
|
6
6
|
export { pageJsonSchema } from './lib/format/json-schema';
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pageJsonSchema = exports.validatePage = exports.PageSchema = exports.RootLayoutSchema = exports.LayoutNodeSchema = exports.ModifierSchema = exports.FilterItemSchema = exports.FilterConditionSchema = exports.PropertyDefinitionSchema = exports.OptionSchema = exports.LineKindsSchema = exports.LineFieldSchema = exports.FieldsSchema = exports.FieldSchema = void 0;
|
|
3
|
+
exports.pageJsonSchema = exports.validatePage = exports.PageSchema = exports.ListNodeSchema = exports.RootLayoutSchema = exports.LayoutNodeSchema = exports.ModifierSchema = exports.FilterItemSchema = exports.FilterConditionSchema = exports.PropertyDefinitionSchema = exports.OptionSchema = exports.LineKindsSchema = exports.LineFieldSchema = exports.FieldsSchema = exports.FieldSchema = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
tslib_1.__exportStar(require("./runtime"), exports);
|
|
6
6
|
var field_1 = require("./lib/format/field");
|
|
@@ -16,6 +16,7 @@ var layout_1 = require("./lib/format/layout");
|
|
|
16
16
|
Object.defineProperty(exports, "ModifierSchema", { enumerable: true, get: function () { return layout_1.ModifierSchema; } });
|
|
17
17
|
Object.defineProperty(exports, "LayoutNodeSchema", { enumerable: true, get: function () { return layout_1.LayoutNodeSchema; } });
|
|
18
18
|
Object.defineProperty(exports, "RootLayoutSchema", { enumerable: true, get: function () { return layout_1.RootLayoutSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "ListNodeSchema", { enumerable: true, get: function () { return layout_1.ListNodeSchema; } });
|
|
19
20
|
var page_1 = require("./lib/format/page");
|
|
20
21
|
Object.defineProperty(exports, "PageSchema", { enumerable: true, get: function () { return page_1.PageSchema; } });
|
|
21
22
|
var validate_1 = require("./lib/format/validate");
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA0B;AAC1B,4CAS4B;AAR1B,oGAAA,WAAW,OAAA;AACX,qGAAA,YAAY,OAAA;AACZ,wGAAA,eAAe,OAAA;AACf,wGAAA,eAAe,OAAA;AACf,qGAAA,YAAY,OAAA;AACZ,iHAAA,wBAAwB,OAAA;AACxB,8GAAA,qBAAqB,OAAA;AACrB,yGAAA,gBAAgB,OAAA;AAElB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA0B;AAC1B,4CAS4B;AAR1B,oGAAA,WAAW,OAAA;AACX,qGAAA,YAAY,OAAA;AACZ,wGAAA,eAAe,OAAA;AACf,wGAAA,eAAe,OAAA;AACf,qGAAA,YAAY,OAAA;AACZ,iHAAA,wBAAwB,OAAA;AACxB,8GAAA,qBAAqB,OAAA;AACrB,yGAAA,gBAAgB,OAAA;AAElB,8CAAyG;AAAhG,wGAAA,cAAc,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAAE,wGAAA,cAAc,OAAA;AAC3E,0CAA+C;AAAtC,kGAAA,UAAU,OAAA;AACnB,kDAAqD;AAA5C,wGAAA,YAAY,OAAA;AACrB,wDAA0D;AAAjD,6GAAA,cAAc,OAAA"}
|
package/src/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './runtime.mjs';
|
|
2
2
|
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, } from './lib/format/field.mjs';
|
|
3
|
-
export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema } from './lib/format/layout.mjs';
|
|
3
|
+
export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema, ListNodeSchema } from './lib/format/layout.mjs';
|
|
4
4
|
export { PageSchema } from './lib/format/page.mjs';
|
|
5
5
|
export { validatePage } from './lib/format/validate.mjs';
|
|
6
6
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
package/src/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -37,8 +37,9 @@ function checkPage(input) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
const layout = input['layout'];
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
const isList = isObject(layout) && layout['type'] === 'list';
|
|
41
|
+
if (!isObject(layout) || (isList ? !Array.isArray(layout['columns']) : !LAYOUTS.includes(layout['type']) || !Array.isArray(layout['children']))) {
|
|
42
|
+
say('layout', 'the layout is a sheet, sections, tabs or wizard, with children, or a list with columns');
|
|
42
43
|
}
|
|
43
44
|
if (issues.length)
|
|
44
45
|
return { ok: false, issues };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-page.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/check-page.ts"],"names":[],"mappings":";;AAeA,
|
|
1
|
+
{"version":3,"file":"check-page.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/check-page.ts"],"names":[],"mappings":";;AAeA,8BAgCC;AA/CD,mCAAsC;AAEtC,6CAAmF;AACnF,uCAA2C;AAE3C,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC5I,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAExD;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,EAAE,CAAC;IAC7G,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/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Page(input) {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
const layout = input['layout'];
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
const isList = isObject(layout) && layout['type'] === 'list';
|
|
38
|
+
if (!isObject(layout) || (isList ? !Array.isArray(layout['columns']) : !LAYOUTS.includes(layout['type']) || !Array.isArray(layout['children']))) {
|
|
39
|
+
say('layout', 'the layout is a sheet, sections, tabs or wizard, with children, or a list with columns');
|
|
39
40
|
}
|
|
40
41
|
if (issues.length)
|
|
41
42
|
return { ok: false, issues };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-page.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/check-page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAuC,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC5I,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,EAAE,CAAC;IAC7G,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE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M,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAW,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1J,GAAG,CAAC,QAAQ,EAAE,wFAAwF,CAAC,CAAC;IAC1G,CAAC;IACD,IAAI,MAAM,CAAC,MAAM;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChD,MAAM,IAAI,GAAG,KAAwB,CAAC;IACtC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;QAC7C,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC1E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,uCAAwC,KAAe,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;IACjI,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
+
import { FilterItemSchema, type FilterItem } from './field.mjs';
|
|
2
3
|
import { type JsonValue } from './json.mjs';
|
|
3
4
|
/**
|
|
4
5
|
* The layout: where each field goes and what surrounds it.
|
|
@@ -206,10 +207,43 @@ export interface SheetNode {
|
|
|
206
207
|
children: LayoutNode[];
|
|
207
208
|
sidePanel?: SlotNode;
|
|
208
209
|
}
|
|
210
|
+
/** A named filter in a list's search bar, such as "Active" or "Big accounts". */
|
|
211
|
+
export interface ListFilter {
|
|
212
|
+
id: string;
|
|
213
|
+
label: string;
|
|
214
|
+
filter: FilterItem[];
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* A list of the model's records, with the search bar people know from Odoo:
|
|
218
|
+
* text searched in the fields it names, named filters, Group By, favourites.
|
|
219
|
+
* A row opens its record; the selected ones take the list's buttons.
|
|
220
|
+
*/
|
|
221
|
+
export interface ListNode {
|
|
222
|
+
type: 'list';
|
|
223
|
+
id: string;
|
|
224
|
+
/** The fields shown, in order. */
|
|
225
|
+
columns: string[];
|
|
226
|
+
/** The order when the list opens: by the first, then the next. */
|
|
227
|
+
sort?: {
|
|
228
|
+
field: string;
|
|
229
|
+
desc?: boolean;
|
|
230
|
+
}[];
|
|
231
|
+
/** How many records a page holds; 40 unless said. */
|
|
232
|
+
pageSize?: number;
|
|
233
|
+
/** The fields what is typed in the search bar is looked for in; the columns unless said. */
|
|
234
|
+
searchFields?: string[];
|
|
235
|
+
filters?: ListFilter[];
|
|
236
|
+
/** The filters on when the list opens, by id. */
|
|
237
|
+
defaultFilters?: string[];
|
|
238
|
+
/** The fields the list can be grouped by. */
|
|
239
|
+
groupBy?: string[];
|
|
240
|
+
/** Buttons for the records selected. */
|
|
241
|
+
actions?: ButtonNode[];
|
|
242
|
+
}
|
|
209
243
|
/** Anything that can sit inside a section, tab, step or sheet. */
|
|
210
244
|
export type LayoutNode = FieldNode | ButtonNode | TextNode | SlotNode | SectionNode | TabsNode;
|
|
211
245
|
/** What a page's `layout` can be: the four page layouts. */
|
|
212
|
-
export type RootLayout = SheetNode | SectionsNode | TabsNode | WizardNode;
|
|
246
|
+
export type RootLayout = SheetNode | SectionsNode | TabsNode | WizardNode | ListNode;
|
|
213
247
|
export declare const ModifierSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>;
|
|
214
248
|
export declare const FieldNodeSchema: z.ZodObject<{
|
|
215
249
|
type: z.ZodLiteral<"field">;
|
|
@@ -603,6 +637,65 @@ export declare const SheetNodeSchema: z.ZodObject<{
|
|
|
603
637
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
604
638
|
}, z.core.$strict>>;
|
|
605
639
|
}, z.core.$strict>;
|
|
640
|
+
export declare const ListNodeSchema: z.ZodObject<{
|
|
641
|
+
type: z.ZodLiteral<"list">;
|
|
642
|
+
id: z.ZodString;
|
|
643
|
+
columns: z.ZodArray<z.ZodString>;
|
|
644
|
+
sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
645
|
+
field: z.ZodString;
|
|
646
|
+
desc: z.ZodOptional<z.ZodBoolean>;
|
|
647
|
+
}, z.core.$strict>>>;
|
|
648
|
+
pageSize: z.ZodOptional<z.ZodInt>;
|
|
649
|
+
searchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
650
|
+
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
651
|
+
id: z.ZodString;
|
|
652
|
+
label: z.ZodString;
|
|
653
|
+
filter: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
654
|
+
field: z.ZodString;
|
|
655
|
+
op: z.ZodEnum<{
|
|
656
|
+
set: "set";
|
|
657
|
+
"=": "=";
|
|
658
|
+
"!=": "!=";
|
|
659
|
+
"<": "<";
|
|
660
|
+
">": ">";
|
|
661
|
+
"<=": "<=";
|
|
662
|
+
">=": ">=";
|
|
663
|
+
in: "in";
|
|
664
|
+
"not in": "not in";
|
|
665
|
+
like: "like";
|
|
666
|
+
ilike: "ilike";
|
|
667
|
+
startswith: "startswith";
|
|
668
|
+
endswith: "endswith";
|
|
669
|
+
notset: "notset";
|
|
670
|
+
between: "between";
|
|
671
|
+
}>;
|
|
672
|
+
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
673
|
+
valueFrom: z.ZodOptional<z.ZodString>;
|
|
674
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
675
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
676
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
677
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
678
|
+
}, z.core.$strict>]>>;
|
|
679
|
+
}, z.core.$strict>>>;
|
|
680
|
+
defaultFilters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
681
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
682
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
683
|
+
type: z.ZodLiteral<"button">;
|
|
684
|
+
id: z.ZodString;
|
|
685
|
+
label: z.ZodString;
|
|
686
|
+
action: z.ZodString;
|
|
687
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
688
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
689
|
+
danger: "danger";
|
|
690
|
+
primary: "primary";
|
|
691
|
+
secondary: "secondary";
|
|
692
|
+
link: "link";
|
|
693
|
+
}>>;
|
|
694
|
+
confirm: z.ZodOptional<z.ZodString>;
|
|
695
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
696
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
697
|
+
}, z.core.$strict>>>;
|
|
698
|
+
}, z.core.$strict>;
|
|
606
699
|
export declare const RootLayoutSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
607
700
|
type: z.ZodLiteral<"sheet">;
|
|
608
701
|
id: z.ZodString;
|
|
@@ -771,4 +864,62 @@ export declare const RootLayoutSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
771
864
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
772
865
|
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
773
866
|
}, z.core.$strict>>;
|
|
867
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
868
|
+
type: z.ZodLiteral<"list">;
|
|
869
|
+
id: z.ZodString;
|
|
870
|
+
columns: z.ZodArray<z.ZodString>;
|
|
871
|
+
sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
872
|
+
field: z.ZodString;
|
|
873
|
+
desc: z.ZodOptional<z.ZodBoolean>;
|
|
874
|
+
}, z.core.$strict>>>;
|
|
875
|
+
pageSize: z.ZodOptional<z.ZodInt>;
|
|
876
|
+
searchFields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
877
|
+
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
878
|
+
id: z.ZodString;
|
|
879
|
+
label: z.ZodString;
|
|
880
|
+
filter: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
881
|
+
field: z.ZodString;
|
|
882
|
+
op: z.ZodEnum<{
|
|
883
|
+
set: "set";
|
|
884
|
+
"=": "=";
|
|
885
|
+
"!=": "!=";
|
|
886
|
+
"<": "<";
|
|
887
|
+
">": ">";
|
|
888
|
+
"<=": "<=";
|
|
889
|
+
">=": ">=";
|
|
890
|
+
in: "in";
|
|
891
|
+
"not in": "not in";
|
|
892
|
+
like: "like";
|
|
893
|
+
ilike: "ilike";
|
|
894
|
+
startswith: "startswith";
|
|
895
|
+
endswith: "endswith";
|
|
896
|
+
notset: "notset";
|
|
897
|
+
between: "between";
|
|
898
|
+
}>;
|
|
899
|
+
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
900
|
+
valueFrom: z.ZodOptional<z.ZodString>;
|
|
901
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
902
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
903
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
904
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
905
|
+
}, z.core.$strict>]>>;
|
|
906
|
+
}, z.core.$strict>>>;
|
|
907
|
+
defaultFilters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
908
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
909
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
910
|
+
type: z.ZodLiteral<"button">;
|
|
911
|
+
id: z.ZodString;
|
|
912
|
+
label: z.ZodString;
|
|
913
|
+
action: z.ZodString;
|
|
914
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
915
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
916
|
+
danger: "danger";
|
|
917
|
+
primary: "primary";
|
|
918
|
+
secondary: "secondary";
|
|
919
|
+
link: "link";
|
|
920
|
+
}>>;
|
|
921
|
+
confirm: z.ZodOptional<z.ZodString>;
|
|
922
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
923
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
924
|
+
}, z.core.$strict>>>;
|
|
774
925
|
}, z.core.$strict>], "type">;
|