@genesislcap/expression-builder 14.420.0 → 14.421.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.
@@ -155,6 +155,41 @@
155
155
  }
156
156
  ]
157
157
  },
158
+ {
159
+ "kind": "javascript-module",
160
+ "path": "src/types/index.ts",
161
+ "declarations": [],
162
+ "exports": [
163
+ {
164
+ "kind": "js",
165
+ "name": "*",
166
+ "declaration": {
167
+ "name": "*",
168
+ "package": "./public.types"
169
+ }
170
+ },
171
+ {
172
+ "kind": "js",
173
+ "name": "*",
174
+ "declaration": {
175
+ "name": "*",
176
+ "package": "./private.types"
177
+ }
178
+ }
179
+ ]
180
+ },
181
+ {
182
+ "kind": "javascript-module",
183
+ "path": "src/types/private.types.ts",
184
+ "declarations": [],
185
+ "exports": []
186
+ },
187
+ {
188
+ "kind": "javascript-module",
189
+ "path": "src/types/public.types.ts",
190
+ "declarations": [],
191
+ "exports": []
192
+ },
158
193
  {
159
194
  "kind": "javascript-module",
160
195
  "path": "src/main/events.ts",
@@ -1018,41 +1053,6 @@
1018
1053
  }
1019
1054
  ]
1020
1055
  },
1021
- {
1022
- "kind": "javascript-module",
1023
- "path": "src/types/index.ts",
1024
- "declarations": [],
1025
- "exports": [
1026
- {
1027
- "kind": "js",
1028
- "name": "*",
1029
- "declaration": {
1030
- "name": "*",
1031
- "package": "./public.types"
1032
- }
1033
- },
1034
- {
1035
- "kind": "js",
1036
- "name": "*",
1037
- "declaration": {
1038
- "name": "*",
1039
- "package": "./private.types"
1040
- }
1041
- }
1042
- ]
1043
- },
1044
- {
1045
- "kind": "javascript-module",
1046
- "path": "src/types/private.types.ts",
1047
- "declarations": [],
1048
- "exports": []
1049
- },
1050
- {
1051
- "kind": "javascript-module",
1052
- "path": "src/types/public.types.ts",
1053
- "declarations": [],
1054
- "exports": []
1055
- },
1056
1056
  {
1057
1057
  "kind": "javascript-module",
1058
1058
  "path": "src/main/expression-group/expression-group.styles.ts",
@@ -1730,12 +1730,12 @@
1730
1730
  },
1731
1731
  {
1732
1732
  "kind": "javascript-module",
1733
- "path": "src/main/rule-field/rule-field.template.ts",
1733
+ "path": "src/main/rule-operator/rule-operator.template.ts",
1734
1734
  "declarations": [
1735
1735
  {
1736
1736
  "kind": "variable",
1737
1737
  "name": "template",
1738
- "default": "html<RuleField>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = context.styles?.customElements?.optgroup || 'optgroup';\n\n return html<RuleField>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.dispatchFieldsChanged(c.event)}\n value=${(x) => x.field?.fieldId}\n >\n <${optionTag} value=\"\">Select a field</${optionTag}>\n ${repeat(\n (x) => x.groupedFieldss,\n html<{ optgroup: string | null; xs: Field[] } | Field, RuleField>`\n ${(groupOrFields) => {\n if ('xs' in groupOrFields) {\n return html<{\n optgroup: string | null;\n xs: Field[];\n }>`\n <${optgroupTag} label=\"${(x) => x.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parentContext.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
1738
+ "default": "html<RuleOperator>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = context.styles?.customElements?.optgroup || 'optgroup';\n\n return html<RuleOperator>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.handleOperatorChange(c.event)}\n value=${(x) => x.operator?.type}\n >\n <${optionTag} value=\"\">Select an operator</${optionTag}>\n ${repeat(\n (x) => x.groupedOperators,\n html<{ optgroup: string | null; xs: Operator[] } | Operator, RuleOperator>`\n ${(groupOrOperator) => {\n if ('xs' in groupOrOperator) {\n return html<{ optgroup: string | null; xs: Operator[] }, RuleOperator>`\n <${optgroupTag} label=\"${groupOrOperator.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Operator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => x.type === c.parentContext.parent.operator?.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.label ?? x.type}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Operator, RuleOperator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => c.parent.operator?.type === x.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.label ?? x.type}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
1739
1739
  }
1740
1740
  ],
1741
1741
  "exports": [
@@ -1744,35 +1744,43 @@
1744
1744
  "name": "template",
1745
1745
  "declaration": {
1746
1746
  "name": "template",
1747
- "module": "src/main/rule-field/rule-field.template.ts"
1747
+ "module": "src/main/rule-operator/rule-operator.template.ts"
1748
1748
  }
1749
1749
  }
1750
1750
  ]
1751
1751
  },
1752
1752
  {
1753
1753
  "kind": "javascript-module",
1754
- "path": "src/main/rule-field/rule-field.ts",
1754
+ "path": "src/main/rule-operator/rule-operator.ts",
1755
1755
  "declarations": [
1756
1756
  {
1757
1757
  "kind": "class",
1758
- "description": "Field selector for expression rules.",
1759
- "name": "RuleField",
1758
+ "description": "Operator selector for expression rules.",
1759
+ "name": "RuleOperator",
1760
1760
  "members": [
1761
1761
  {
1762
1762
  "kind": "field",
1763
- "name": "fields",
1763
+ "name": "operators",
1764
1764
  "type": {
1765
- "text": "Field[]"
1765
+ "text": "Operator[]"
1766
1766
  },
1767
1767
  "default": "[]"
1768
1768
  },
1769
1769
  {
1770
1770
  "kind": "field",
1771
- "name": "field",
1771
+ "name": "operator",
1772
1772
  "type": {
1773
- "text": "Field"
1773
+ "text": "Operator"
1774
1774
  }
1775
1775
  },
1776
+ {
1777
+ "kind": "field",
1778
+ "name": "field",
1779
+ "type": {
1780
+ "text": "Field | null"
1781
+ },
1782
+ "default": "null"
1783
+ },
1776
1784
  {
1777
1785
  "kind": "field",
1778
1786
  "name": "config",
@@ -1789,15 +1797,23 @@
1789
1797
  },
1790
1798
  {
1791
1799
  "kind": "field",
1792
- "name": "groupedFieldss",
1800
+ "name": "allowedOperators",
1793
1801
  "type": {
1794
- "text": "(Field | { optgroup: string | null; xs: Field[] })[]"
1802
+ "text": "Operator[]"
1803
+ },
1804
+ "readonly": true
1805
+ },
1806
+ {
1807
+ "kind": "field",
1808
+ "name": "groupedOperators",
1809
+ "type": {
1810
+ "text": "(Operator | { optgroup: string | null; xs: Operator[] })[]"
1795
1811
  },
1796
1812
  "readonly": true
1797
1813
  },
1798
1814
  {
1799
1815
  "kind": "method",
1800
- "name": "dispatchFieldsChanged",
1816
+ "name": "handleOperatorChange",
1801
1817
  "parameters": [
1802
1818
  {
1803
1819
  "name": "event",
@@ -1815,45 +1831,45 @@
1815
1831
  }
1816
1832
  },
1817
1833
  {
1818
- "description": "Bubbled when the selected field changes",
1819
- "name": "field-selected"
1834
+ "description": "Bubbled when the selected operator changes",
1835
+ "name": "operator-selected"
1820
1836
  }
1821
1837
  ],
1822
1838
  "superclass": {
1823
1839
  "name": "GenesisElement",
1824
1840
  "package": "@genesislcap/web-core"
1825
1841
  },
1826
- "tagName": "expression-rule-field",
1842
+ "tagName": "expression-rule-operator",
1827
1843
  "customElement": true
1828
1844
  }
1829
1845
  ],
1830
1846
  "exports": [
1831
1847
  {
1832
1848
  "kind": "js",
1833
- "name": "RuleField",
1849
+ "name": "RuleOperator",
1834
1850
  "declaration": {
1835
- "name": "RuleField",
1836
- "module": "src/main/rule-field/rule-field.ts"
1851
+ "name": "RuleOperator",
1852
+ "module": "src/main/rule-operator/rule-operator.ts"
1837
1853
  }
1838
1854
  },
1839
1855
  {
1840
1856
  "kind": "custom-element-definition",
1841
- "name": "expression-rule-field",
1857
+ "name": "expression-rule-operator",
1842
1858
  "declaration": {
1843
- "name": "RuleField",
1844
- "module": "src/main/rule-field/rule-field.ts"
1859
+ "name": "RuleOperator",
1860
+ "module": "src/main/rule-operator/rule-operator.ts"
1845
1861
  }
1846
1862
  }
1847
1863
  ]
1848
1864
  },
1849
1865
  {
1850
1866
  "kind": "javascript-module",
1851
- "path": "src/main/rule-operator/rule-operator.template.ts",
1867
+ "path": "src/main/rule-field/rule-field.template.ts",
1852
1868
  "declarations": [
1853
1869
  {
1854
1870
  "kind": "variable",
1855
1871
  "name": "template",
1856
- "default": "html<RuleOperator>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = context.styles?.customElements?.optgroup || 'optgroup';\n\n return html<RuleOperator>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.handleOperatorChange(c.event)}\n value=${(x) => x.operator?.type}\n >\n <${optionTag} value=\"\">Select an operator</${optionTag}>\n ${repeat(\n (x) => x.groupedOperators,\n html<{ optgroup: string | null; xs: Operator[] } | Operator, RuleOperator>`\n ${(groupOrOperator) => {\n if ('xs' in groupOrOperator) {\n return html<{ optgroup: string | null; xs: Operator[] }, RuleOperator>`\n <${optgroupTag} label=\"${groupOrOperator.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Operator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => x.type === c.parentContext.parent.operator?.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.label ?? x.type}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Operator, RuleOperator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => c.parent.operator?.type === x.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.label ?? x.type}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
1872
+ "default": "html<RuleField>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = context.styles?.customElements?.optgroup || 'optgroup';\n\n return html<RuleField>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.dispatchFieldsChanged(c.event)}\n value=${(x) => x.field?.fieldId}\n >\n <${optionTag} value=\"\">Select a field</${optionTag}>\n ${repeat(\n (x) => x.groupedFieldss,\n html<{ optgroup: string | null; xs: Field[] } | Field, RuleField>`\n ${(groupOrFields) => {\n if ('xs' in groupOrFields) {\n return html<{\n optgroup: string | null;\n xs: Field[];\n }>`\n <${optgroupTag} label=\"${(x) => x.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parentContext.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
1857
1873
  }
1858
1874
  ],
1859
1875
  "exports": [
@@ -1862,42 +1878,34 @@
1862
1878
  "name": "template",
1863
1879
  "declaration": {
1864
1880
  "name": "template",
1865
- "module": "src/main/rule-operator/rule-operator.template.ts"
1881
+ "module": "src/main/rule-field/rule-field.template.ts"
1866
1882
  }
1867
1883
  }
1868
1884
  ]
1869
1885
  },
1870
1886
  {
1871
1887
  "kind": "javascript-module",
1872
- "path": "src/main/rule-operator/rule-operator.ts",
1888
+ "path": "src/main/rule-field/rule-field.ts",
1873
1889
  "declarations": [
1874
1890
  {
1875
1891
  "kind": "class",
1876
- "description": "Operator selector for expression rules.",
1877
- "name": "RuleOperator",
1892
+ "description": "Field selector for expression rules.",
1893
+ "name": "RuleField",
1878
1894
  "members": [
1879
1895
  {
1880
1896
  "kind": "field",
1881
- "name": "operators",
1897
+ "name": "fields",
1882
1898
  "type": {
1883
- "text": "Operator[]"
1899
+ "text": "Field[]"
1884
1900
  },
1885
1901
  "default": "[]"
1886
1902
  },
1887
- {
1888
- "kind": "field",
1889
- "name": "operator",
1890
- "type": {
1891
- "text": "Operator"
1892
- }
1893
- },
1894
1903
  {
1895
1904
  "kind": "field",
1896
1905
  "name": "field",
1897
1906
  "type": {
1898
- "text": "Field | null"
1899
- },
1900
- "default": "null"
1907
+ "text": "Field"
1908
+ }
1901
1909
  },
1902
1910
  {
1903
1911
  "kind": "field",
@@ -1915,23 +1923,15 @@
1915
1923
  },
1916
1924
  {
1917
1925
  "kind": "field",
1918
- "name": "allowedOperators",
1919
- "type": {
1920
- "text": "Operator[]"
1921
- },
1922
- "readonly": true
1923
- },
1924
- {
1925
- "kind": "field",
1926
- "name": "groupedOperators",
1926
+ "name": "groupedFieldss",
1927
1927
  "type": {
1928
- "text": "(Operator | { optgroup: string | null; xs: Operator[] })[]"
1928
+ "text": "(Field | { optgroup: string | null; xs: Field[] })[]"
1929
1929
  },
1930
1930
  "readonly": true
1931
1931
  },
1932
1932
  {
1933
1933
  "kind": "method",
1934
- "name": "handleOperatorChange",
1934
+ "name": "dispatchFieldsChanged",
1935
1935
  "parameters": [
1936
1936
  {
1937
1937
  "name": "event",
@@ -1949,33 +1949,33 @@
1949
1949
  }
1950
1950
  },
1951
1951
  {
1952
- "description": "Bubbled when the selected operator changes",
1953
- "name": "operator-selected"
1952
+ "description": "Bubbled when the selected field changes",
1953
+ "name": "field-selected"
1954
1954
  }
1955
1955
  ],
1956
1956
  "superclass": {
1957
1957
  "name": "GenesisElement",
1958
1958
  "package": "@genesislcap/web-core"
1959
1959
  },
1960
- "tagName": "expression-rule-operator",
1960
+ "tagName": "expression-rule-field",
1961
1961
  "customElement": true
1962
1962
  }
1963
1963
  ],
1964
1964
  "exports": [
1965
1965
  {
1966
1966
  "kind": "js",
1967
- "name": "RuleOperator",
1967
+ "name": "RuleField",
1968
1968
  "declaration": {
1969
- "name": "RuleOperator",
1970
- "module": "src/main/rule-operator/rule-operator.ts"
1969
+ "name": "RuleField",
1970
+ "module": "src/main/rule-field/rule-field.ts"
1971
1971
  }
1972
1972
  },
1973
1973
  {
1974
1974
  "kind": "custom-element-definition",
1975
- "name": "expression-rule-operator",
1975
+ "name": "expression-rule-field",
1976
1976
  "declaration": {
1977
- "name": "RuleOperator",
1978
- "module": "src/main/rule-operator/rule-operator.ts"
1977
+ "name": "RuleField",
1978
+ "module": "src/main/rule-field/rule-field.ts"
1979
1979
  }
1980
1980
  }
1981
1981
  ]
@@ -76,22 +76,22 @@ export declare const ExpressionRule: React.ForwardRefExoticComponent<
76
76
  > & React.RefAttributes<ExpressionRuleWC>
77
77
  >;
78
78
 
79
- export declare const RuleField: React.ForwardRefExoticComponent<
79
+ export declare const RuleOperator: React.ForwardRefExoticComponent<
80
80
  React.PropsWithChildren<
81
- Omit<PublicOf<RuleFieldWC>, 'children' | 'style'> &
81
+ Omit<PublicOf<RuleOperatorWC>, 'children' | 'style'> &
82
82
  HTMLWCProps & {
83
- onFieldSelected?: (event: CustomEvent<unknown>) => void;
83
+ onOperatorSelected?: (event: CustomEvent<unknown>) => void;
84
84
  }
85
- > & React.RefAttributes<RuleFieldWC>
85
+ > & React.RefAttributes<RuleOperatorWC>
86
86
  >;
87
87
 
88
- export declare const RuleOperator: React.ForwardRefExoticComponent<
88
+ export declare const RuleField: React.ForwardRefExoticComponent<
89
89
  React.PropsWithChildren<
90
- Omit<PublicOf<RuleOperatorWC>, 'children' | 'style'> &
90
+ Omit<PublicOf<RuleFieldWC>, 'children' | 'style'> &
91
91
  HTMLWCProps & {
92
- onOperatorSelected?: (event: CustomEvent<unknown>) => void;
92
+ onFieldSelected?: (event: CustomEvent<unknown>) => void;
93
93
  }
94
- > & React.RefAttributes<RuleOperatorWC>
94
+ > & React.RefAttributes<RuleFieldWC>
95
95
  >;
96
96
 
97
97
  export declare const RuleValue: React.ForwardRefExoticComponent<
package/dist/react.cjs CHANGED
@@ -43,15 +43,15 @@ const ExpressionRule = wrap(ExpressionRuleWC, {
43
43
  },
44
44
  });
45
45
 
46
- const RuleField = wrap(RuleFieldWC, {
46
+ const RuleOperator = wrap(RuleOperatorWC, {
47
47
  events: {
48
- onFieldSelected: 'field-selected',
48
+ onOperatorSelected: 'operator-selected',
49
49
  },
50
50
  });
51
51
 
52
- const RuleOperator = wrap(RuleOperatorWC, {
52
+ const RuleField = wrap(RuleFieldWC, {
53
53
  events: {
54
- onOperatorSelected: 'operator-selected',
54
+ onFieldSelected: 'field-selected',
55
55
  },
56
56
  });
57
57
 
@@ -66,7 +66,7 @@ module.exports = {
66
66
  ExpressionBuilder,
67
67
  ExpressionGroup,
68
68
  ExpressionRule,
69
- RuleField,
70
69
  RuleOperator,
70
+ RuleField,
71
71
  RuleValue,
72
72
  };
package/dist/react.mjs CHANGED
@@ -41,15 +41,15 @@ export const ExpressionRule = wrap(ExpressionRuleWC, {
41
41
  },
42
42
  });
43
43
 
44
- export const RuleField = wrap(RuleFieldWC, {
44
+ export const RuleOperator = wrap(RuleOperatorWC, {
45
45
  events: {
46
- onFieldSelected: 'field-selected',
46
+ onOperatorSelected: 'operator-selected',
47
47
  },
48
48
  });
49
49
 
50
- export const RuleOperator = wrap(RuleOperatorWC, {
50
+ export const RuleField = wrap(RuleFieldWC, {
51
51
  events: {
52
- onOperatorSelected: 'operator-selected',
52
+ onFieldSelected: 'field-selected',
53
53
  },
54
54
  });
55
55
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/expression-builder",
3
3
  "description": "Genesis Foundation Expression Builder",
4
- "version": "14.420.0",
4
+ "version": "14.421.1",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/expression-builder.d.ts",
@@ -38,16 +38,16 @@
38
38
  }
39
39
  },
40
40
  "devDependencies": {
41
- "@genesislcap/foundation-testing": "14.420.0",
42
- "@genesislcap/genx": "14.420.0",
43
- "@genesislcap/rollup-builder": "14.420.0",
44
- "@genesislcap/ts-builder": "14.420.0",
45
- "@genesislcap/uvu-playwright-builder": "14.420.0",
46
- "@genesislcap/vite-builder": "14.420.0",
47
- "@genesislcap/webpack-builder": "14.420.0"
41
+ "@genesislcap/foundation-testing": "14.421.1",
42
+ "@genesislcap/genx": "14.421.1",
43
+ "@genesislcap/rollup-builder": "14.421.1",
44
+ "@genesislcap/ts-builder": "14.421.1",
45
+ "@genesislcap/uvu-playwright-builder": "14.421.1",
46
+ "@genesislcap/vite-builder": "14.421.1",
47
+ "@genesislcap/webpack-builder": "14.421.1"
48
48
  },
49
49
  "dependencies": {
50
- "@genesislcap/web-core": "14.420.0",
50
+ "@genesislcap/web-core": "14.421.1",
51
51
  "rfdc": "1.4.1"
52
52
  },
53
53
  "repository": {
@@ -73,5 +73,5 @@
73
73
  "peerDependencies": {
74
74
  "@microsoft/fast-react-wrapper": ">=0.3.0"
75
75
  },
76
- "gitHead": "52c9259f8fb7a203979c832b08388579ae728a38"
76
+ "gitHead": "ef3efc54221d1c0af5c842f0b98225ca813b4042"
77
77
  }