@fieldia/core 0.5.0 → 0.7.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.
Files changed (96) hide show
  1. package/package.json +1 -1
  2. package/schema/page.schema.json +430 -17
  3. package/src/index.d.mts +5 -14
  4. package/src/index.d.ts +5 -14
  5. package/src/index.js +4 -28
  6. package/src/index.js.map +1 -1
  7. package/src/index.mjs +4 -11
  8. package/src/index.mjs.map +1 -1
  9. package/src/lib/format/check-page.d.mts +9 -0
  10. package/src/lib/format/check-page.d.ts +9 -0
  11. package/src/lib/format/check-page.js +54 -0
  12. package/src/lib/format/check-page.js.map +1 -0
  13. package/src/lib/format/check-page.mjs +51 -0
  14. package/src/lib/format/check-page.mjs.map +1 -0
  15. package/src/lib/format/columns.d.mts +3 -0
  16. package/src/lib/format/columns.d.ts +3 -0
  17. package/src/lib/format/columns.js +8 -0
  18. package/src/lib/format/columns.js.map +1 -0
  19. package/src/lib/format/columns.mjs +5 -0
  20. package/src/lib/format/columns.mjs.map +1 -0
  21. package/src/lib/format/field.d.mts +163 -35
  22. package/src/lib/format/field.d.ts +163 -35
  23. package/src/lib/format/field.js +36 -38
  24. package/src/lib/format/field.js.map +1 -1
  25. package/src/lib/format/field.mjs +25 -29
  26. package/src/lib/format/field.mjs.map +1 -1
  27. package/src/lib/format/layout.d.mts +216 -3
  28. package/src/lib/format/layout.d.ts +216 -3
  29. package/src/lib/format/layout.js +19 -3
  30. package/src/lib/format/layout.js.map +1 -1
  31. package/src/lib/format/layout.mjs +17 -2
  32. package/src/lib/format/layout.mjs.map +1 -1
  33. package/src/lib/format/names.d.mts +5 -0
  34. package/src/lib/format/names.d.ts +5 -0
  35. package/src/lib/format/names.js +27 -0
  36. package/src/lib/format/names.js.map +1 -0
  37. package/src/lib/format/names.mjs +24 -0
  38. package/src/lib/format/names.mjs.map +1 -0
  39. package/src/lib/format/page.d.mts +132 -10
  40. package/src/lib/format/page.d.ts +132 -10
  41. package/src/lib/format/page.js +6 -3
  42. package/src/lib/format/page.js.map +1 -1
  43. package/src/lib/format/page.mjs +4 -2
  44. package/src/lib/format/page.mjs.map +1 -1
  45. package/src/lib/format/references.d.mts +35 -0
  46. package/src/lib/format/references.d.ts +35 -0
  47. package/src/lib/format/references.js +278 -0
  48. package/src/lib/format/references.js.map +1 -0
  49. package/src/lib/format/references.mjs +274 -0
  50. package/src/lib/format/references.mjs.map +1 -0
  51. package/src/lib/format/translate.d.mts +8 -0
  52. package/src/lib/format/translate.d.ts +8 -0
  53. package/src/lib/format/translate.js +36 -0
  54. package/src/lib/format/translate.js.map +1 -0
  55. package/src/lib/format/translate.mjs +33 -0
  56. package/src/lib/format/translate.mjs.map +1 -0
  57. package/src/lib/format/validate.d.mts +2 -13
  58. package/src/lib/format/validate.d.ts +2 -13
  59. package/src/lib/format/validate.js +2 -258
  60. package/src/lib/format/validate.js.map +1 -1
  61. package/src/lib/format/validate.mjs +1 -257
  62. package/src/lib/format/validate.mjs.map +1 -1
  63. package/src/lib/format/version.d.mts +2 -0
  64. package/src/lib/format/version.d.ts +2 -0
  65. package/src/lib/format/version.js +6 -0
  66. package/src/lib/format/version.js.map +1 -0
  67. package/src/lib/format/version.mjs +3 -0
  68. package/src/lib/format/version.mjs.map +1 -0
  69. package/src/lib/record/data-source.d.mts +27 -1
  70. package/src/lib/record/data-source.d.ts +27 -1
  71. package/src/lib/record/data-source.js +16 -0
  72. package/src/lib/record/data-source.js.map +1 -1
  73. package/src/lib/record/data-source.mjs +14 -1
  74. package/src/lib/record/data-source.mjs.map +1 -1
  75. package/src/lib/record/filter.d.mts +8 -0
  76. package/src/lib/record/filter.d.ts +8 -0
  77. package/src/lib/record/filter.js +66 -0
  78. package/src/lib/record/filter.js.map +1 -0
  79. package/src/lib/record/filter.mjs +63 -0
  80. package/src/lib/record/filter.mjs.map +1 -0
  81. package/src/lib/record/form.d.mts +15 -1
  82. package/src/lib/record/form.d.ts +15 -1
  83. package/src/lib/record/form.js +103 -14
  84. package/src/lib/record/form.js.map +1 -1
  85. package/src/lib/record/form.mjs +103 -14
  86. package/src/lib/record/form.mjs.map +1 -1
  87. package/src/lib/record/memory-data-source.js +2 -28
  88. package/src/lib/record/memory-data-source.js.map +1 -1
  89. package/src/lib/record/memory-data-source.mjs +2 -28
  90. package/src/lib/record/memory-data-source.mjs.map +1 -1
  91. package/src/runtime.d.mts +26 -0
  92. package/src/runtime.d.ts +26 -0
  93. package/src/runtime.js +44 -0
  94. package/src/runtime.js.map +1 -0
  95. package/src/runtime.mjs +16 -0
  96. package/src/runtime.mjs.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fieldia/core",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Headless form model for Fieldia: the page format, modifiers, validation and record state. No DOM.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://fieldia.dev",
@@ -63,6 +63,22 @@
63
63
  },
64
64
  "layout": {
65
65
  "$ref": "#/$defs/RootLayout"
66
+ },
67
+ "maxWidth": {
68
+ "type": "string",
69
+ "enum": [
70
+ "narrow",
71
+ "medium",
72
+ "wide",
73
+ "full"
74
+ ]
75
+ },
76
+ "actionsPosition": {
77
+ "type": "string",
78
+ "enum": [
79
+ "top",
80
+ "bottom"
81
+ ]
66
82
  }
67
83
  },
68
84
  "required": [
@@ -557,7 +573,7 @@
557
573
  "filter": {
558
574
  "type": "array",
559
575
  "items": {
560
- "$ref": "#/$defs/FilterCondition"
576
+ "$ref": "#/$defs/FilterItem"
561
577
  }
562
578
  }
563
579
  },
@@ -597,7 +613,7 @@
597
613
  "filter": {
598
614
  "type": "array",
599
615
  "items": {
600
- "$ref": "#/$defs/FilterCondition"
616
+ "$ref": "#/$defs/FilterItem"
601
617
  }
602
618
  }
603
619
  },
@@ -816,6 +832,19 @@
816
832
  ],
817
833
  "additionalProperties": false
818
834
  },
835
+ "FilterItem": {
836
+ "anyOf": [
837
+ {
838
+ "$ref": "#/$defs/FilterCondition"
839
+ },
840
+ {
841
+ "$ref": "#/$defs/FilterAny"
842
+ },
843
+ {
844
+ "$ref": "#/$defs/FilterAll"
845
+ }
846
+ ]
847
+ },
819
848
  "FilterCondition": {
820
849
  "type": "object",
821
850
  "properties": {
@@ -835,7 +864,12 @@
835
864
  "in",
836
865
  "not in",
837
866
  "like",
838
- "ilike"
867
+ "ilike",
868
+ "startswith",
869
+ "endswith",
870
+ "set",
871
+ "notset",
872
+ "between"
839
873
  ]
840
874
  },
841
875
  "value": {
@@ -852,6 +886,38 @@
852
886
  ],
853
887
  "additionalProperties": false
854
888
  },
889
+ "FilterAny": {
890
+ "type": "object",
891
+ "properties": {
892
+ "any": {
893
+ "minItems": 1,
894
+ "type": "array",
895
+ "items": {
896
+ "$ref": "#/$defs/FilterItem"
897
+ }
898
+ }
899
+ },
900
+ "required": [
901
+ "any"
902
+ ],
903
+ "additionalProperties": false
904
+ },
905
+ "FilterAll": {
906
+ "type": "object",
907
+ "properties": {
908
+ "all": {
909
+ "minItems": 1,
910
+ "type": "array",
911
+ "items": {
912
+ "$ref": "#/$defs/FilterItem"
913
+ }
914
+ }
915
+ },
916
+ "required": [
917
+ "all"
918
+ ],
919
+ "additionalProperties": false
920
+ },
855
921
  "LineField": {
856
922
  "oneOf": [
857
923
  {
@@ -1333,7 +1399,7 @@
1333
1399
  "filter": {
1334
1400
  "type": "array",
1335
1401
  "items": {
1336
- "$ref": "#/$defs/FilterCondition"
1402
+ "$ref": "#/$defs/FilterItem"
1337
1403
  }
1338
1404
  }
1339
1405
  },
@@ -1373,7 +1439,7 @@
1373
1439
  "filter": {
1374
1440
  "type": "array",
1375
1441
  "items": {
1376
- "$ref": "#/$defs/FilterCondition"
1442
+ "$ref": "#/$defs/FilterItem"
1377
1443
  }
1378
1444
  }
1379
1445
  },
@@ -1594,6 +1660,204 @@
1594
1660
  },
1595
1661
  "placeholder": {
1596
1662
  "type": "string"
1663
+ },
1664
+ "above": {
1665
+ "type": "array",
1666
+ "items": {
1667
+ "type": "object",
1668
+ "properties": {
1669
+ "type": {
1670
+ "type": "string",
1671
+ "const": "field"
1672
+ },
1673
+ "id": {
1674
+ "type": "string",
1675
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
1676
+ },
1677
+ "field": {
1678
+ "type": "string",
1679
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
1680
+ },
1681
+ "label": {
1682
+ "type": "string"
1683
+ },
1684
+ "widget": {
1685
+ "type": "string",
1686
+ "minLength": 1
1687
+ },
1688
+ "options": {
1689
+ "type": "object",
1690
+ "propertyNames": {
1691
+ "type": "string"
1692
+ },
1693
+ "additionalProperties": {
1694
+ "$ref": "#/$defs/JsonValue"
1695
+ }
1696
+ },
1697
+ "placeholder": {
1698
+ "type": "string"
1699
+ },
1700
+ "help": {
1701
+ "type": "string"
1702
+ },
1703
+ "colspan": {
1704
+ "type": "integer",
1705
+ "minimum": 1,
1706
+ "maximum": 4
1707
+ },
1708
+ "columns": {
1709
+ "minItems": 1,
1710
+ "type": "array",
1711
+ "items": {
1712
+ "type": "string",
1713
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
1714
+ }
1715
+ },
1716
+ "totals": {
1717
+ "minItems": 1,
1718
+ "type": "array",
1719
+ "items": {
1720
+ "type": "string",
1721
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
1722
+ }
1723
+ },
1724
+ "optionalColumns": {
1725
+ "type": "object",
1726
+ "propertyNames": {
1727
+ "type": "string",
1728
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
1729
+ },
1730
+ "additionalProperties": {
1731
+ "type": "string",
1732
+ "enum": [
1733
+ "show",
1734
+ "hide"
1735
+ ]
1736
+ }
1737
+ },
1738
+ "editMode": {
1739
+ "type": "string",
1740
+ "enum": [
1741
+ "cell",
1742
+ "row"
1743
+ ]
1744
+ },
1745
+ "invisible": {
1746
+ "$ref": "#/$defs/Modifier"
1747
+ },
1748
+ "readonly": {
1749
+ "$ref": "#/$defs/Modifier"
1750
+ },
1751
+ "required": {
1752
+ "$ref": "#/$defs/Modifier"
1753
+ }
1754
+ },
1755
+ "required": [
1756
+ "type",
1757
+ "id",
1758
+ "field"
1759
+ ],
1760
+ "additionalProperties": false
1761
+ }
1762
+ },
1763
+ "below": {
1764
+ "type": "array",
1765
+ "items": {
1766
+ "type": "object",
1767
+ "properties": {
1768
+ "type": {
1769
+ "type": "string",
1770
+ "const": "field"
1771
+ },
1772
+ "id": {
1773
+ "type": "string",
1774
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
1775
+ },
1776
+ "field": {
1777
+ "type": "string",
1778
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
1779
+ },
1780
+ "label": {
1781
+ "type": "string"
1782
+ },
1783
+ "widget": {
1784
+ "type": "string",
1785
+ "minLength": 1
1786
+ },
1787
+ "options": {
1788
+ "type": "object",
1789
+ "propertyNames": {
1790
+ "type": "string"
1791
+ },
1792
+ "additionalProperties": {
1793
+ "$ref": "#/$defs/JsonValue"
1794
+ }
1795
+ },
1796
+ "placeholder": {
1797
+ "type": "string"
1798
+ },
1799
+ "help": {
1800
+ "type": "string"
1801
+ },
1802
+ "colspan": {
1803
+ "type": "integer",
1804
+ "minimum": 1,
1805
+ "maximum": 4
1806
+ },
1807
+ "columns": {
1808
+ "minItems": 1,
1809
+ "type": "array",
1810
+ "items": {
1811
+ "type": "string",
1812
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
1813
+ }
1814
+ },
1815
+ "totals": {
1816
+ "minItems": 1,
1817
+ "type": "array",
1818
+ "items": {
1819
+ "type": "string",
1820
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
1821
+ }
1822
+ },
1823
+ "optionalColumns": {
1824
+ "type": "object",
1825
+ "propertyNames": {
1826
+ "type": "string",
1827
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
1828
+ },
1829
+ "additionalProperties": {
1830
+ "type": "string",
1831
+ "enum": [
1832
+ "show",
1833
+ "hide"
1834
+ ]
1835
+ }
1836
+ },
1837
+ "editMode": {
1838
+ "type": "string",
1839
+ "enum": [
1840
+ "cell",
1841
+ "row"
1842
+ ]
1843
+ },
1844
+ "invisible": {
1845
+ "$ref": "#/$defs/Modifier"
1846
+ },
1847
+ "readonly": {
1848
+ "$ref": "#/$defs/Modifier"
1849
+ },
1850
+ "required": {
1851
+ "$ref": "#/$defs/Modifier"
1852
+ }
1853
+ },
1854
+ "required": [
1855
+ "type",
1856
+ "id",
1857
+ "field"
1858
+ ],
1859
+ "additionalProperties": false
1860
+ }
1597
1861
  }
1598
1862
  },
1599
1863
  "required": [
@@ -1619,6 +1883,13 @@
1619
1883
  },
1620
1884
  "clickable": {
1621
1885
  "type": "boolean"
1886
+ },
1887
+ "position": {
1888
+ "type": "string",
1889
+ "enum": [
1890
+ "header",
1891
+ "title"
1892
+ ]
1622
1893
  }
1623
1894
  },
1624
1895
  "required": [
@@ -1770,6 +2041,9 @@
1770
2041
  "muted"
1771
2042
  ]
1772
2043
  },
2044
+ "dismissible": {
2045
+ "type": "boolean"
2046
+ },
1773
2047
  "invisible": {
1774
2048
  "$ref": "#/$defs/Modifier"
1775
2049
  }
@@ -1781,6 +2055,43 @@
1781
2055
  "additionalProperties": false
1782
2056
  }
1783
2057
  },
2058
+ "badges": {
2059
+ "type": "array",
2060
+ "items": {
2061
+ "type": "object",
2062
+ "properties": {
2063
+ "id": {
2064
+ "type": "string",
2065
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
2066
+ },
2067
+ "label": {
2068
+ "type": "string"
2069
+ },
2070
+ "tone": {
2071
+ "type": "string",
2072
+ "enum": [
2073
+ "info",
2074
+ "success",
2075
+ "warning",
2076
+ "danger",
2077
+ "muted"
2078
+ ]
2079
+ },
2080
+ "icon": {
2081
+ "type": "string",
2082
+ "minLength": 1
2083
+ },
2084
+ "invisible": {
2085
+ "$ref": "#/$defs/Modifier"
2086
+ }
2087
+ },
2088
+ "required": [
2089
+ "id",
2090
+ "label"
2091
+ ],
2092
+ "additionalProperties": false
2093
+ }
2094
+ },
1784
2095
  "children": {
1785
2096
  "type": "array",
1786
2097
  "items": {
@@ -2065,26 +2376,103 @@
2065
2376
  "title": {
2066
2377
  "type": "string"
2067
2378
  },
2379
+ "icon": {
2380
+ "type": "string",
2381
+ "minLength": 1
2382
+ },
2068
2383
  "description": {
2069
2384
  "type": "string"
2070
2385
  },
2071
2386
  "columns": {
2072
2387
  "anyOf": [
2073
2388
  {
2074
- "type": "number",
2075
- "const": 1
2076
- },
2077
- {
2078
- "type": "number",
2079
- "const": 2
2080
- },
2081
- {
2082
- "type": "number",
2083
- "const": 3
2389
+ "anyOf": [
2390
+ {
2391
+ "type": "number",
2392
+ "const": 1
2393
+ },
2394
+ {
2395
+ "type": "number",
2396
+ "const": 2
2397
+ },
2398
+ {
2399
+ "type": "number",
2400
+ "const": 3
2401
+ },
2402
+ {
2403
+ "type": "number",
2404
+ "const": 4
2405
+ }
2406
+ ]
2084
2407
  },
2085
2408
  {
2086
- "type": "number",
2087
- "const": 4
2409
+ "type": "object",
2410
+ "properties": {
2411
+ "wide": {
2412
+ "anyOf": [
2413
+ {
2414
+ "type": "number",
2415
+ "const": 1
2416
+ },
2417
+ {
2418
+ "type": "number",
2419
+ "const": 2
2420
+ },
2421
+ {
2422
+ "type": "number",
2423
+ "const": 3
2424
+ },
2425
+ {
2426
+ "type": "number",
2427
+ "const": 4
2428
+ }
2429
+ ]
2430
+ },
2431
+ "medium": {
2432
+ "anyOf": [
2433
+ {
2434
+ "type": "number",
2435
+ "const": 1
2436
+ },
2437
+ {
2438
+ "type": "number",
2439
+ "const": 2
2440
+ },
2441
+ {
2442
+ "type": "number",
2443
+ "const": 3
2444
+ },
2445
+ {
2446
+ "type": "number",
2447
+ "const": 4
2448
+ }
2449
+ ]
2450
+ },
2451
+ "narrow": {
2452
+ "anyOf": [
2453
+ {
2454
+ "type": "number",
2455
+ "const": 1
2456
+ },
2457
+ {
2458
+ "type": "number",
2459
+ "const": 2
2460
+ },
2461
+ {
2462
+ "type": "number",
2463
+ "const": 3
2464
+ },
2465
+ {
2466
+ "type": "number",
2467
+ "const": 4
2468
+ }
2469
+ ]
2470
+ }
2471
+ },
2472
+ "required": [
2473
+ "wide"
2474
+ ],
2475
+ "additionalProperties": false
2088
2476
  }
2089
2477
  ]
2090
2478
  },
@@ -2097,6 +2485,9 @@
2097
2485
  "invisible": {
2098
2486
  "$ref": "#/$defs/Modifier"
2099
2487
  },
2488
+ "readonly": {
2489
+ "$ref": "#/$defs/Modifier"
2490
+ },
2100
2491
  "children": {
2101
2492
  "type": "array",
2102
2493
  "items": {
@@ -2211,6 +2602,21 @@
2211
2602
  "type": "string",
2212
2603
  "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
2213
2604
  },
2605
+ "clickable": {
2606
+ "type": "boolean"
2607
+ },
2608
+ "nextLabel": {
2609
+ "type": "string",
2610
+ "minLength": 1
2611
+ },
2612
+ "backLabel": {
2613
+ "type": "string",
2614
+ "minLength": 1
2615
+ },
2616
+ "finishLabel": {
2617
+ "type": "string",
2618
+ "minLength": 1
2619
+ },
2214
2620
  "children": {
2215
2621
  "minItems": 1,
2216
2622
  "type": "array",
@@ -2243,6 +2649,13 @@
2243
2649
  "description": {
2244
2650
  "type": "string"
2245
2651
  },
2652
+ "icon": {
2653
+ "type": "string",
2654
+ "minLength": 1
2655
+ },
2656
+ "optional": {
2657
+ "type": "boolean"
2658
+ },
2246
2659
  "invisible": {
2247
2660
  "$ref": "#/$defs/Modifier"
2248
2661
  },
package/src/index.d.mts CHANGED
@@ -1,15 +1,6 @@
1
- export type { JsonValue } from './lib/format/json.mjs';
2
- export { FIELD_NAME, FIELD_TYPES, FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, type Field, type Fields, type FieldType, type LineField, type LineKinds, type Option, type PropertyDefinition, type FilterCondition, } from './lib/format/field.mjs';
3
- export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema, type Modifier, type Tone, type FieldNode, type ButtonNode, type TextNode, type SlotNode, type SectionNode, type TabNode, type TabsNode, type StepNode, type WizardNode, type SectionsNode, type SheetNode, type SheetTitle, type Statusbar, type StatButton, type Ribbon, type Alert, type LayoutNode, type RootLayout, } from './lib/format/layout.mjs';
4
- export { FORMAT_VERSION, PageSchema, type Page, type PageData } from './lib/format/page.mjs';
5
- export { validatePage, type PageIssue, type PageValidation } from './lib/format/validate.mjs';
1
+ export * from './runtime.mjs';
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';
4
+ export { PageSchema } from './lib/format/page.mjs';
5
+ export { validatePage } from './lib/format/validate.mjs';
6
6
  export { pageJsonSchema } from './lib/format/json-schema.mjs';
7
- export { compileModifier, type CompiledModifier } from './lib/expression/modifier.mjs';
8
- export { evaluateModifier, isModifierValid } from './lib/expression/evaluateModifier.mjs';
9
- export { emptyValue, initialValues, isEmpty, expressionContext, lineKind, type RecordId, type RelatedRecord, type ReferenceValue, type FileValue, type Line, type Value, type Values, } from './lib/record/values.mjs';
10
- export { checkValue, formatBytes } from './lib/record/check.mjs';
11
- export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, ResolvedFilterCondition, RecordChanges, LineOp, LinkOp, } from './lib/record/data-source.mjs';
12
- export { createMemoryDataSource, type MemoryDataSource, type MemoryDataSourceOptions } from './lib/record/memory-data-source.mjs';
13
- export { hostScheduler, wait, type Scheduler } from './lib/record/scheduler.mjs';
14
- export { createForm, type Form, type FormOptions, type FormState, type FormStatus, type NodeState, type DraftStore, type ActionRequest, } from './lib/record/form.mjs';
15
- export { MESSAGES, fill, type Messages, type Locale } from './lib/record/messages.mjs';
package/src/index.d.ts CHANGED
@@ -1,15 +1,6 @@
1
- export type { JsonValue } from './lib/format/json';
2
- export { FIELD_NAME, FIELD_TYPES, FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, type Field, type Fields, type FieldType, type LineField, type LineKinds, type Option, type PropertyDefinition, type FilterCondition, } from './lib/format/field';
3
- export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema, type Modifier, type Tone, type FieldNode, type ButtonNode, type TextNode, type SlotNode, type SectionNode, type TabNode, type TabsNode, type StepNode, type WizardNode, type SectionsNode, type SheetNode, type SheetTitle, type Statusbar, type StatButton, type Ribbon, type Alert, type LayoutNode, type RootLayout, } from './lib/format/layout';
4
- export { FORMAT_VERSION, PageSchema, type Page, type PageData } from './lib/format/page';
5
- export { validatePage, type PageIssue, type PageValidation } from './lib/format/validate';
1
+ export * from './runtime';
2
+ export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, } from './lib/format/field';
3
+ export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema } from './lib/format/layout';
4
+ export { PageSchema } from './lib/format/page';
5
+ export { validatePage } from './lib/format/validate';
6
6
  export { pageJsonSchema } from './lib/format/json-schema';
7
- export { compileModifier, type CompiledModifier } from './lib/expression/modifier';
8
- export { evaluateModifier, isModifierValid } from './lib/expression/evaluateModifier';
9
- export { emptyValue, initialValues, isEmpty, expressionContext, lineKind, type RecordId, type RelatedRecord, type ReferenceValue, type FileValue, type Line, type Value, type Values, } from './lib/record/values';
10
- export { checkValue, formatBytes } from './lib/record/check';
11
- export type { DataSource, LoadRequest, SaveRequest, SaveResult, OnchangeRequest, OnchangeResult, SearchRequest, CreateRequest, SubmitRequest, SubmitResult, ResolvedFilterCondition, RecordChanges, LineOp, LinkOp, } from './lib/record/data-source';
12
- export { createMemoryDataSource, type MemoryDataSource, type MemoryDataSourceOptions } from './lib/record/memory-data-source';
13
- export { hostScheduler, wait, type Scheduler } from './lib/record/scheduler';
14
- export { createForm, type Form, type FormOptions, type FormState, type FormStatus, type NodeState, type DraftStore, type ActionRequest, } from './lib/record/form';
15
- export { MESSAGES, fill, type Messages, type Locale } from './lib/record/messages';
package/src/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fill = exports.MESSAGES = exports.createForm = exports.wait = exports.hostScheduler = exports.createMemoryDataSource = exports.formatBytes = exports.checkValue = exports.lineKind = exports.expressionContext = exports.isEmpty = exports.initialValues = exports.emptyValue = exports.isModifierValid = exports.evaluateModifier = exports.compileModifier = exports.pageJsonSchema = exports.validatePage = exports.PageSchema = exports.FORMAT_VERSION = exports.RootLayoutSchema = exports.LayoutNodeSchema = exports.ModifierSchema = exports.FilterConditionSchema = exports.PropertyDefinitionSchema = exports.OptionSchema = exports.LineKindsSchema = exports.LineFieldSchema = exports.FieldsSchema = exports.FieldSchema = exports.FIELD_TYPES = exports.FIELD_NAME = void 0;
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;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./runtime"), exports);
4
6
  var field_1 = require("./lib/format/field");
5
- Object.defineProperty(exports, "FIELD_NAME", { enumerable: true, get: function () { return field_1.FIELD_NAME; } });
6
- Object.defineProperty(exports, "FIELD_TYPES", { enumerable: true, get: function () { return field_1.FIELD_TYPES; } });
7
7
  Object.defineProperty(exports, "FieldSchema", { enumerable: true, get: function () { return field_1.FieldSchema; } });
8
8
  Object.defineProperty(exports, "FieldsSchema", { enumerable: true, get: function () { return field_1.FieldsSchema; } });
9
9
  Object.defineProperty(exports, "LineFieldSchema", { enumerable: true, get: function () { return field_1.LineFieldSchema; } });
@@ -11,39 +11,15 @@ Object.defineProperty(exports, "LineKindsSchema", { enumerable: true, get: funct
11
11
  Object.defineProperty(exports, "OptionSchema", { enumerable: true, get: function () { return field_1.OptionSchema; } });
12
12
  Object.defineProperty(exports, "PropertyDefinitionSchema", { enumerable: true, get: function () { return field_1.PropertyDefinitionSchema; } });
13
13
  Object.defineProperty(exports, "FilterConditionSchema", { enumerable: true, get: function () { return field_1.FilterConditionSchema; } });
14
+ Object.defineProperty(exports, "FilterItemSchema", { enumerable: true, get: function () { return field_1.FilterItemSchema; } });
14
15
  var layout_1 = require("./lib/format/layout");
15
16
  Object.defineProperty(exports, "ModifierSchema", { enumerable: true, get: function () { return layout_1.ModifierSchema; } });
16
17
  Object.defineProperty(exports, "LayoutNodeSchema", { enumerable: true, get: function () { return layout_1.LayoutNodeSchema; } });
17
18
  Object.defineProperty(exports, "RootLayoutSchema", { enumerable: true, get: function () { return layout_1.RootLayoutSchema; } });
18
19
  var page_1 = require("./lib/format/page");
19
- Object.defineProperty(exports, "FORMAT_VERSION", { enumerable: true, get: function () { return page_1.FORMAT_VERSION; } });
20
20
  Object.defineProperty(exports, "PageSchema", { enumerable: true, get: function () { return page_1.PageSchema; } });
21
21
  var validate_1 = require("./lib/format/validate");
22
22
  Object.defineProperty(exports, "validatePage", { enumerable: true, get: function () { return validate_1.validatePage; } });
23
23
  var json_schema_1 = require("./lib/format/json-schema");
24
24
  Object.defineProperty(exports, "pageJsonSchema", { enumerable: true, get: function () { return json_schema_1.pageJsonSchema; } });
25
- var modifier_1 = require("./lib/expression/modifier");
26
- Object.defineProperty(exports, "compileModifier", { enumerable: true, get: function () { return modifier_1.compileModifier; } });
27
- var evaluateModifier_1 = require("./lib/expression/evaluateModifier");
28
- Object.defineProperty(exports, "evaluateModifier", { enumerable: true, get: function () { return evaluateModifier_1.evaluateModifier; } });
29
- Object.defineProperty(exports, "isModifierValid", { enumerable: true, get: function () { return evaluateModifier_1.isModifierValid; } });
30
- var values_1 = require("./lib/record/values");
31
- Object.defineProperty(exports, "emptyValue", { enumerable: true, get: function () { return values_1.emptyValue; } });
32
- Object.defineProperty(exports, "initialValues", { enumerable: true, get: function () { return values_1.initialValues; } });
33
- Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return values_1.isEmpty; } });
34
- Object.defineProperty(exports, "expressionContext", { enumerable: true, get: function () { return values_1.expressionContext; } });
35
- Object.defineProperty(exports, "lineKind", { enumerable: true, get: function () { return values_1.lineKind; } });
36
- var check_1 = require("./lib/record/check");
37
- Object.defineProperty(exports, "checkValue", { enumerable: true, get: function () { return check_1.checkValue; } });
38
- Object.defineProperty(exports, "formatBytes", { enumerable: true, get: function () { return check_1.formatBytes; } });
39
- var memory_data_source_1 = require("./lib/record/memory-data-source");
40
- Object.defineProperty(exports, "createMemoryDataSource", { enumerable: true, get: function () { return memory_data_source_1.createMemoryDataSource; } });
41
- var scheduler_1 = require("./lib/record/scheduler");
42
- Object.defineProperty(exports, "hostScheduler", { enumerable: true, get: function () { return scheduler_1.hostScheduler; } });
43
- Object.defineProperty(exports, "wait", { enumerable: true, get: function () { return scheduler_1.wait; } });
44
- var form_1 = require("./lib/record/form");
45
- Object.defineProperty(exports, "createForm", { enumerable: true, get: function () { return form_1.createForm; } });
46
- var messages_1 = require("./lib/record/messages");
47
- Object.defineProperty(exports, "MESSAGES", { enumerable: true, get: function () { return messages_1.MESSAGES; } });
48
- Object.defineProperty(exports, "fill", { enumerable: true, get: function () { return messages_1.fill; } });
49
25
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":";;;AACA,4CAkB4B;AAjB1B,mGAAA,UAAU,OAAA;AACV,oGAAA,WAAW,OAAA;AACX,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;AAUvB,8CAwB6B;AAvB3B,wGAAA,cAAc,OAAA;AACd,0GAAA,gBAAgB,OAAA;AAChB,0GAAA,gBAAgB,OAAA;AAsBlB,0CAAyF;AAAhF,sGAAA,cAAc,OAAA;AAAE,kGAAA,UAAU,OAAA;AACnC,kDAA0F;AAAjF,wGAAA,YAAY,OAAA;AACrB,wDAA0D;AAAjD,6GAAA,cAAc,OAAA;AACvB,sDAAmF;AAA1E,2GAAA,eAAe,OAAA;AACxB,sEAAsF;AAA7E,oHAAA,gBAAgB,OAAA;AAAE,mHAAA,eAAe,OAAA;AAC1C,8CAa6B;AAZ3B,oGAAA,UAAU,OAAA;AACV,uGAAA,aAAa,OAAA;AACb,iGAAA,OAAO,OAAA;AACP,2GAAA,iBAAiB,OAAA;AACjB,kGAAA,QAAQ,OAAA;AASV,4CAA6D;AAApD,mGAAA,UAAU,OAAA;AAAE,oGAAA,WAAW,OAAA;AAiBhC,sEAA8H;AAArH,4HAAA,sBAAsB,OAAA;AAC/B,oDAA6E;AAApE,0GAAA,aAAa,OAAA;AAAE,iGAAA,IAAI,OAAA;AAC5B,0CAS2B;AARzB,kGAAA,UAAU,OAAA;AASZ,kDAAmF;AAA1E,oGAAA,QAAQ,OAAA;AAAE,gGAAA,IAAI,OAAA"}
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,8CAAyF;AAAhF,wGAAA,cAAc,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AAC3D,0CAA+C;AAAtC,kGAAA,UAAU,OAAA;AACnB,kDAAqD;AAA5C,wGAAA,YAAY,OAAA;AACrB,wDAA0D;AAAjD,6GAAA,cAAc,OAAA"}