@genesislcap/expression-builder 14.258.3 → 14.259.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.
@@ -68,6 +68,14 @@
68
68
  "text": "Combinator[]"
69
69
  },
70
70
  "default": "[\n ...BASE_LOGICAL_COMBINATORS,\n {\n type: 'NOT',\n maxRules: 2,\n },\n {\n type: 'NAND',\n maxRules: 'many',\n },\n {\n type: 'NOR',\n maxRules: 'many',\n },\n {\n type: 'XOR',\n maxRules: 2,\n },\n]"
71
+ },
72
+ {
73
+ "kind": "variable",
74
+ "name": "NULL_COMBINATOR",
75
+ "type": {
76
+ "text": "Combinator"
77
+ },
78
+ "default": "{\n type: 'NULL',\n maxRules: 1,\n invisible: true,\n}"
71
79
  }
72
80
  ],
73
81
  "exports": [
@@ -86,6 +94,14 @@
86
94
  "name": "LOGICAL_COMBINATORS",
87
95
  "module": "src/config/combinators.ts"
88
96
  }
97
+ },
98
+ {
99
+ "kind": "js",
100
+ "name": "NULL_COMBINATOR",
101
+ "declaration": {
102
+ "name": "NULL_COMBINATOR",
103
+ "module": "src/config/combinators.ts"
104
+ }
89
105
  }
90
106
  ]
91
107
  },
@@ -659,41 +675,6 @@
659
675
  }
660
676
  ]
661
677
  },
662
- {
663
- "kind": "javascript-module",
664
- "path": "src/types/index.ts",
665
- "declarations": [],
666
- "exports": [
667
- {
668
- "kind": "js",
669
- "name": "*",
670
- "declaration": {
671
- "name": "*",
672
- "package": "./public.types"
673
- }
674
- },
675
- {
676
- "kind": "js",
677
- "name": "*",
678
- "declaration": {
679
- "name": "*",
680
- "package": "./private.types"
681
- }
682
- }
683
- ]
684
- },
685
- {
686
- "kind": "javascript-module",
687
- "path": "src/types/private.types.ts",
688
- "declarations": [],
689
- "exports": []
690
- },
691
- {
692
- "kind": "javascript-module",
693
- "path": "src/types/public.types.ts",
694
- "declarations": [],
695
- "exports": []
696
- },
697
678
  {
698
679
  "kind": "javascript-module",
699
680
  "path": "src/utils/data-model.ts",
@@ -943,6 +924,41 @@
943
924
  }
944
925
  ]
945
926
  },
927
+ {
928
+ "kind": "javascript-module",
929
+ "path": "src/types/index.ts",
930
+ "declarations": [],
931
+ "exports": [
932
+ {
933
+ "kind": "js",
934
+ "name": "*",
935
+ "declaration": {
936
+ "name": "*",
937
+ "package": "./public.types"
938
+ }
939
+ },
940
+ {
941
+ "kind": "js",
942
+ "name": "*",
943
+ "declaration": {
944
+ "name": "*",
945
+ "package": "./private.types"
946
+ }
947
+ }
948
+ ]
949
+ },
950
+ {
951
+ "kind": "javascript-module",
952
+ "path": "src/types/private.types.ts",
953
+ "declarations": [],
954
+ "exports": []
955
+ },
956
+ {
957
+ "kind": "javascript-module",
958
+ "path": "src/types/public.types.ts",
959
+ "declarations": [],
960
+ "exports": []
961
+ },
946
962
  {
947
963
  "kind": "javascript-module",
948
964
  "path": "src/main/expression-group/expression-group.styles.ts",
@@ -971,7 +987,7 @@
971
987
  {
972
988
  "kind": "variable",
973
989
  "name": "template",
974
- "default": "html<ExpressionGroup>`\n ${(context) => {\n const buttonTag = context.styles?.customElements?.button || 'button';\n const maybeRadioBlock = context.styles?.customElements?.radio;\n const { radioTag, radioGroupTag } = maybeRadioBlock\n ? { radioTag: maybeRadioBlock.input, radioGroupTag: maybeRadioBlock.group }\n : { radioTag: 'input', radioGroupTag: 'div' };\n\n const ruleTooltip = `Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${context.config.combinators[0].type})`;\n\n const groupTooltip = `Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${context.config.combinators[0].type})`;\n\n return html<ExpressionGroup>`\n <div class=\"rules-group-container\">\n <div class=\"rules-group-header\">\n <div class=\"btn-group float-end group-actions\">\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-success\"\n data-add=\"rule\"\n @click=\"${(x, c) => x.dispatchAddRule(c.event)}\"\n title=${(_) => ruleTooltip}\n >\n Add Rule\n </${buttonTag}>\n ${when(\n (x) => x.allowNestedGroup,\n html<ExpressionGroup>`\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-success\"\n data-add=\"group\"\n @click=\"${(x, c) => x.dispatchAddGroup(c.event)}\"\n title=\"${(_) => groupTooltip}\"\n >\n Add Group\n </${buttonTag}>\n `,\n )}\n ${when(\n (x) => typeof x.index === 'number',\n html<ExpressionGroup>`\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-danger\"\n data-delete=\"group\"\n @click=\"${(x, c) => x.dispatchDeleteGroup(c.event)}\"\n >\n Delete Group\n </${buttonTag}>\n `,\n )}\n <div class=\"btn-group group-conditions\">\n ${whenElse(\n (_) => radioTag !== 'input',\n html<ExpressionGroup>`\n <${radioGroupTag}\n class=\"radio-group-container\"\n name=\"combinator\"\n @change=\"${(x, c) => x.handleCombinatorChange(c.event)}\"\n value=\"${(x) => x.model?.combinator?.type}\"\n >\n ${repeat(\n (x) => x.config.combinators,\n html<Combinator, ExpressionGroup>`\n <${radioTag}\n value=\"${(x) => x.type}\"\n ?checked=${(x, c) => c.parent.model?.combinator?.type === x.type}\n >\n ${(x) => x.label ?? x.type}\n </${radioTag}>\n `,\n )}\n </${radioGroupTag}>\n `,\n html<ExpressionGroup>`\n <div class=\"radio-group-container\">\n ${repeat(\n (x) => x.config.combinators,\n html<Combinator, ExpressionGroup>`\n <label class=\"btn btn-sm btn-primary\">\n <input\n type=\"radio\"\n name=\"combinator\"\n value=\"${(x) => x.type}\"\n @change=\"${(_, c) => c.parent.handleCombinatorChange(c.event)}\"\n ?checked=${(x, c) => c.parent.model?.combinator?.type === x.type}\n />\n ${(x) => x.label ?? x.type}\n </label>\n `,\n )}\n </div>\n `,\n )}\n </div>\n </div>\n <div class=\"rules-group-body\">\n <div class=\"rules-list\">\n ${repeat(\n (x) => x.model?.children ?? [],\n html<ModelRule | ModelGroup, ExpressionBuilder>`\n ${whenElse(\n (x) => 'children' in x,\n html<ModelGroup>`\n <expression-group\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-group>\n `,\n html<ModelRule>`\n <expression-rule\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-rule>\n `,\n )}\n ${when(\n (_, loopCtx) => !loopCtx.isLast,\n html<ModelRule | ModelGroup, ExpressionBuilder>`\n <p class=\"group-combinator-link\">\n ${(_, innerCtx) => innerCtx.parent.model.combinator.type}\n </p>\n `,\n )}\n `,\n { recycle: false, positioning: true },\n )}\n </div>\n </div>\n </div>\n </div>\n `;\n }}\n`"
990
+ "default": "html<ExpressionGroup>`\n <div class=\"rules-group-container\">\n <div class=\"rules-group-header\">${controlButtonsTemplate} ${combinatorsTemplate}</div>\n <div class=\"rules-group-body\">\n <div class=\"rules-list\">\n ${repeat(\n (x) => x.model?.children ?? [],\n html<ModelRule | ModelGroup, ExpressionBuilder>`\n ${whenElse(\n (x) => 'children' in x,\n html<ModelGroup>`\n <expression-group\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-group>\n `,\n html<ModelRule>`\n <expression-rule\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-rule>\n `,\n )}\n ${when(\n (_, loopCtx) => !loopCtx.isLast,\n html<ModelRule | ModelGroup, ExpressionBuilder>`\n <p class=\"group-combinator-link\">\n ${(_, innerCtx) => innerCtx.parent.model.combinator.type}\n </p>\n `,\n )}\n `,\n { recycle: false, positioning: true },\n )}\n </div>\n </div>\n </div>\n`"
975
991
  }
976
992
  ],
977
993
  "exports": [
@@ -1024,7 +1040,15 @@
1024
1040
  },
1025
1041
  {
1026
1042
  "kind": "field",
1027
- "name": "allowNestedGroup",
1043
+ "name": "allowAddRule",
1044
+ "type": {
1045
+ "text": "boolean"
1046
+ },
1047
+ "readonly": true
1048
+ },
1049
+ {
1050
+ "kind": "field",
1051
+ "name": "allowAddGroup",
1028
1052
  "type": {
1029
1053
  "text": "boolean"
1030
1054
  },
@@ -3,4 +3,6 @@ import { Combinator } from '../types';
3
3
  export declare const BASE_LOGICAL_COMBINATORS: Combinator[];
4
4
  /** @alpha */
5
5
  export declare const LOGICAL_COMBINATORS: Combinator[];
6
+ /** @alpha */
7
+ export declare const NULL_COMBINATOR: Combinator;
6
8
  //# sourceMappingURL=combinators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"combinators.d.ts","sourceRoot":"","sources":["../../../src/config/combinators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,aAAa;AACb,eAAO,MAAM,wBAAwB,EAAE,UAAU,EAShD,CAAC;AAEF,aAAa;AACb,eAAO,MAAM,mBAAmB,EAAE,UAAU,EAkB3C,CAAC"}
1
+ {"version":3,"file":"combinators.d.ts","sourceRoot":"","sources":["../../../src/config/combinators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,aAAa;AACb,eAAO,MAAM,wBAAwB,EAAE,UAAU,EAShD,CAAC;AAEF,aAAa;AACb,eAAO,MAAM,mBAAmB,EAAE,UAAU,EAkB3C,CAAC;AAEF,aAAa;AACb,eAAO,MAAM,eAAe,EAAE,UAI7B,CAAC"}
@@ -6,7 +6,8 @@ export declare class ExpressionGroup extends GenesisElement {
6
6
  model: ModelGroup;
7
7
  index: number;
8
8
  connectedCallback(): void;
9
- get allowNestedGroup(): boolean;
9
+ get allowAddRule(): boolean;
10
+ get allowAddGroup(): boolean;
10
11
  dispatchAddRule(event: Event): void;
11
12
  dispatchAddGroup(event: Event): void;
12
13
  dispatchDeleteGroup(event: Event): void;
@@ -1 +1 @@
1
- {"version":3,"file":"expression-group.d.ts","sourceRoot":"","sources":["../../../../src/main/expression-group/expression-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAMrE,qBAQa,eAAgB,SAAQ,cAAc;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IAE1B,iBAAiB,IAAI,IAAI;IAKzB,IACI,gBAAgB,IAAI,OAAO,CAI9B;IAED,eAAe,CAAC,KAAK,EAAE,KAAK;IAQ5B,gBAAgB,CAAC,KAAK,EAAE,KAAK;IAY7B,mBAAmB,CAAC,KAAK,EAAE,KAAK;IAQhC,sBAAsB,CAAC,KAAK,EAAE,KAAK;IAQnC,4BAA4B,CAAC,KAAK,EAAE,KAAK;IAazC,OAAO,CAAC,gBAAgB;IAcxB,wBAAwB,CAAC,UAAU,EAAE,UAAU;CAWhD"}
1
+ {"version":3,"file":"expression-group.d.ts","sourceRoot":"","sources":["../../../../src/main/expression-group/expression-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAMrE,qBAQa,eAAgB,SAAQ,cAAc;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IAE1B,iBAAiB,IAAI,IAAI;IAKzB,IACI,YAAY,IAAI,OAAO,CAI1B;IAED,IACI,aAAa,IAAI,OAAO,CAM3B;IAED,eAAe,CAAC,KAAK,EAAE,KAAK;IAS5B,gBAAgB,CAAC,KAAK,EAAE,KAAK;IAY7B,mBAAmB,CAAC,KAAK,EAAE,KAAK;IAQhC,sBAAsB,CAAC,KAAK,EAAE,KAAK;IAQnC,4BAA4B,CAAC,KAAK,EAAE,KAAK;IAazC,OAAO,CAAC,gBAAgB;IAcxB,wBAAwB,CAAC,UAAU,EAAE,UAAU;CAWhD"}
@@ -1 +1 @@
1
- {"version":3,"file":"expression-group.template.d.ts","sourceRoot":"","sources":["../../../../src/main/expression-group/expression-group.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,QAAQ,sEA0IpB,CAAC"}
1
+ {"version":3,"file":"expression-group.template.d.ts","sourceRoot":"","sources":["../../../../src/main/expression-group/expression-group.template.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA0H1D,eAAO,MAAM,QAAQ,sEAyCpB,CAAC"}
@@ -131,6 +131,7 @@ export type Field = {
131
131
  export type Combinator = {
132
132
  type: string;
133
133
  maxRules: 1 | 2 | 'many';
134
+ invisible?: boolean;
134
135
  label?: string;
135
136
  description?: string;
136
137
  allowedFields?: Field['fieldId'][];
@@ -1 +1 @@
1
- {"version":3,"file":"public.types.d.ts","sourceRoot":"","sources":["../../../src/types/public.types.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,MAAM,MAAM,cAAc,GAAG;IAC3B,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,MAAM,CAAC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AAe,CAAC;CAC3B,GACD;IACE,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,GAAG,CAAC;CACZ,GACD;IACE,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;CACnB,GACD;IACE,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,GAAG,EAAE,CAAC;CACd,CACJ,CAAC;AAEF,cAAc;AACd,MAAM,MAAM,KAAK,GAAG;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;CAC5B,CAAC"}
@@ -29,3 +29,9 @@ export const LOGICAL_COMBINATORS = [
29
29
  maxRules: 2,
30
30
  },
31
31
  ];
32
+ /** @alpha */
33
+ export const NULL_COMBINATOR = {
34
+ type: 'NULL',
35
+ maxRules: 1,
36
+ invisible: true,
37
+ };
@@ -9,16 +9,29 @@ let ExpressionGroup = class ExpressionGroup extends GenesisElement {
9
9
  super.connectedCallback();
10
10
  applyCustomStyles(this, this.styles, 'group');
11
11
  }
12
- get allowNestedGroup() {
12
+ get allowAddRule() {
13
+ if (!this.model)
14
+ return false;
15
+ if (this.model.combinator.maxRules === 'many')
16
+ return true;
17
+ return this.model.children.length < this.model.combinator.maxRules;
18
+ }
19
+ get allowAddGroup() {
13
20
  var _a, _b;
14
21
  if (!this.model)
15
22
  return false;
23
+ if (this.model.combinator.maxRules === 1)
24
+ return false;
25
+ if (this.model.combinator.maxRules === 2 && this.model.children.length >= 2)
26
+ return false;
16
27
  if (!((_a = this.config) === null || _a === void 0 ? void 0 : _a.maxNesting) || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.maxNesting) < 1)
17
28
  return true;
18
29
  return this.config.maxNesting > this.model.level;
19
30
  }
20
31
  dispatchAddRule(event) {
21
32
  event.stopPropagation();
33
+ if (!this.allowAddRule)
34
+ throw new Error('Cannot add extra rules to group');
22
35
  const detail = {
23
36
  parentGroupId: this.model.groupId,
24
37
  };
@@ -26,7 +39,7 @@ let ExpressionGroup = class ExpressionGroup extends GenesisElement {
26
39
  }
27
40
  dispatchAddGroup(event) {
28
41
  event.stopPropagation();
29
- if (!this.allowNestedGroup)
42
+ if (!this.allowAddGroup)
30
43
  throw new Error('Cannot add further nested groups');
31
44
  const detail = {
32
45
  parentGroupId: this.model.groupId,
@@ -97,7 +110,10 @@ __decorate([
97
110
  ], ExpressionGroup.prototype, "index", void 0);
98
111
  __decorate([
99
112
  volatile
100
- ], ExpressionGroup.prototype, "allowNestedGroup", null);
113
+ ], ExpressionGroup.prototype, "allowAddRule", null);
114
+ __decorate([
115
+ volatile
116
+ ], ExpressionGroup.prototype, "allowAddGroup", null);
101
117
  ExpressionGroup = __decorate([
102
118
  customElement({
103
119
  name: 'expression-group',
@@ -1,18 +1,62 @@
1
1
  import { html, repeat, when, whenElse } from '@genesislcap/web-core';
2
- export const template = html `
2
+ const combinatorsTemplate = html `
3
3
  ${(context) => {
4
- var _a, _b, _c, _d;
5
- const buttonTag = ((_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.button) || 'button';
6
- const maybeRadioBlock = (_d = (_c = context.styles) === null || _c === void 0 ? void 0 : _c.customElements) === null || _d === void 0 ? void 0 : _d.radio;
4
+ var _a, _b;
5
+ const maybeRadioBlock = (_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.radio;
7
6
  const { radioTag, radioGroupTag } = maybeRadioBlock
8
7
  ? { radioTag: maybeRadioBlock.input, radioGroupTag: maybeRadioBlock.group }
9
8
  : { radioTag: 'input', radioGroupTag: 'div' };
10
- const ruleTooltip = `Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${context.config.combinators[0].type})`;
11
- const groupTooltip = `Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${context.config.combinators[0].type})`;
12
9
  return html `
13
- <div class="rules-group-container">
14
- <div class="rules-group-header">
15
- <div class="btn-group float-end group-actions">
10
+ <div class="btn-group group-conditions">
11
+ ${whenElse((_) => radioTag !== 'input', html `
12
+ <${radioGroupTag}
13
+ class="radio-group-container"
14
+ name="combinator"
15
+ @change="${(x, c) => x.handleCombinatorChange(c.event)}"
16
+ value="${(x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type; }}"
17
+ >
18
+ ${repeat((x) => { var _a, _b; return (_b = (_a = x.config) === null || _a === void 0 ? void 0 : _a.combinators) !== null && _b !== void 0 ? _b : []; }, html `
19
+ ${when((x) => !x.invisible, html `
20
+ <${radioTag}
21
+ value="${(x) => x.type}"
22
+ ?checked=${(x, c) => { var _a, _b; return ((_b = (_a = c.parent.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type) === x.type; }}
23
+ >
24
+ ${(x) => { var _a; return (_a = x.label) !== null && _a !== void 0 ? _a : x.type; }}
25
+ </${radioTag}>
26
+ `)}
27
+ `)}
28
+ </${radioGroupTag}>
29
+ `, html `
30
+ <div class="radio-group-container">
31
+ ${repeat((x) => x.config.combinators, html `
32
+ ${when((x) => !x.invisible, html `
33
+ <label class="btn btn-sm btn-primary">
34
+ <input
35
+ type="radio"
36
+ name="combinator"
37
+ value="${(x) => x.type}"
38
+ @change="${(_, c) => c.parent.handleCombinatorChange(c.event)}"
39
+ ?checked=${(x, c) => { var _a, _b; return ((_b = (_a = c.parent.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type) === x.type; }}
40
+ />
41
+ ${(x) => { var _a; return (_a = x.label) !== null && _a !== void 0 ? _a : x.type; }}
42
+ </label>
43
+ `)}
44
+ `)}
45
+ </div>
46
+ `)}
47
+ </div>
48
+ `;
49
+ }}
50
+ `;
51
+ const controlButtonsTemplate = html `
52
+ ${(context) => {
53
+ var _a, _b, _c, _d, _e, _f, _g, _h;
54
+ const buttonTag = ((_b = (_a = context.styles) === null || _a === void 0 ? void 0 : _a.customElements) === null || _b === void 0 ? void 0 : _b.button) || 'button';
55
+ const ruleTooltip = `Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${(_e = (_d = (_c = context.config) === null || _c === void 0 ? void 0 : _c.combinators) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.type})`;
56
+ const groupTooltip = `Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${(_h = (_g = (_f = context.config) === null || _f === void 0 ? void 0 : _f.combinators) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.type})`;
57
+ return html `
58
+ <div class="btn-group float-end group-actions">
59
+ ${when((x) => x.allowAddRule, html `
16
60
  <${buttonTag}
17
61
  type="button"
18
62
  class="btn btn-sm btn-success"
@@ -22,90 +66,60 @@ export const template = html `
22
66
  >
23
67
  Add Rule
24
68
  </${buttonTag}>
25
- ${when((x) => x.allowNestedGroup, html `
26
- <${buttonTag}
27
- type="button"
28
- class="btn btn-sm btn-success"
29
- data-add="group"
30
- @click="${(x, c) => x.dispatchAddGroup(c.event)}"
31
- title="${(_) => groupTooltip}"
32
- >
33
- Add Group
34
- </${buttonTag}>
35
- `)}
36
- ${when((x) => typeof x.index === 'number', html `
37
- <${buttonTag}
38
- type="button"
39
- class="btn btn-sm btn-danger"
40
- data-delete="group"
41
- @click="${(x, c) => x.dispatchDeleteGroup(c.event)}"
42
- >
43
- Delete Group
44
- </${buttonTag}>
45
- `)}
46
- <div class="btn-group group-conditions">
47
- ${whenElse((_) => radioTag !== 'input', html `
48
- <${radioGroupTag}
49
- class="radio-group-container"
50
- name="combinator"
51
- @change="${(x, c) => x.handleCombinatorChange(c.event)}"
52
- value="${(x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type; }}"
53
- >
54
- ${repeat((x) => x.config.combinators, html `
55
- <${radioTag}
56
- value="${(x) => x.type}"
57
- ?checked=${(x, c) => { var _a, _b; return ((_b = (_a = c.parent.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type) === x.type; }}
58
- >
59
- ${(x) => { var _a; return (_a = x.label) !== null && _a !== void 0 ? _a : x.type; }}
60
- </${radioTag}>
61
- `)}
62
- </${radioGroupTag}>
63
- `, html `
64
- <div class="radio-group-container">
65
- ${repeat((x) => x.config.combinators, html `
66
- <label class="btn btn-sm btn-primary">
67
- <input
68
- type="radio"
69
- name="combinator"
70
- value="${(x) => x.type}"
71
- @change="${(_, c) => c.parent.handleCombinatorChange(c.event)}"
72
- ?checked=${(x, c) => { var _a, _b; return ((_b = (_a = c.parent.model) === null || _a === void 0 ? void 0 : _a.combinator) === null || _b === void 0 ? void 0 : _b.type) === x.type; }}
73
- />
74
- ${(x) => { var _a; return (_a = x.label) !== null && _a !== void 0 ? _a : x.type; }}
75
- </label>
76
- `)}
77
- </div>
78
- `)}
79
- </div>
80
- </div>
81
- <div class="rules-group-body">
82
- <div class="rules-list">
83
- ${repeat((x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []; }, html `
84
- ${whenElse((x) => 'children' in x, html `
85
- <expression-group
86
- :config=${(_, c) => c.parent.config}
87
- :styles=${(_, c) => c.parent.styles}
88
- :model=${(x) => x}
89
- :index=${(_, c) => c.index}
90
- ></expression-group>
91
- `, html `
92
- <expression-rule
93
- :config=${(_, c) => c.parent.config}
94
- :styles=${(_, c) => c.parent.styles}
95
- :model=${(x) => x}
96
- :index=${(_, c) => c.index}
97
- ></expression-rule>
98
- `)}
99
- ${when((_, loopCtx) => !loopCtx.isLast, html `
100
- <p class="group-combinator-link">
101
- ${(_, innerCtx) => innerCtx.parent.model.combinator.type}
102
- </p>
103
- `)}
104
- `, { recycle: false, positioning: true })}
105
- </div>
106
- </div>
107
- </div>
69
+ `)}
70
+ ${when((x) => x.allowAddGroup, html `
71
+ <${buttonTag}
72
+ type="button"
73
+ class="btn btn-sm btn-success"
74
+ data-add="group"
75
+ @click="${(x, c) => x.dispatchAddGroup(c.event)}"
76
+ title="${(_) => groupTooltip}"
77
+ >
78
+ Add Group
79
+ </${buttonTag}>
80
+ `)}
81
+ ${when((x) => typeof x.index === 'number', html `
82
+ <${buttonTag}
83
+ type="button"
84
+ class="btn btn-sm btn-danger"
85
+ data-delete="group"
86
+ @click="${(x, c) => x.dispatchDeleteGroup(c.event)}"
87
+ >
88
+ Delete Group
89
+ </${buttonTag}>
90
+ `)}
108
91
  </div>
109
92
  `;
110
93
  }}
111
94
  `;
95
+ export const template = html `
96
+ <div class="rules-group-container">
97
+ <div class="rules-group-header">${controlButtonsTemplate} ${combinatorsTemplate}</div>
98
+ <div class="rules-group-body">
99
+ <div class="rules-list">
100
+ ${repeat((x) => { var _a, _b; return (_b = (_a = x.model) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : []; }, html `
101
+ ${whenElse((x) => 'children' in x, html `
102
+ <expression-group
103
+ :config=${(_, c) => c.parent.config}
104
+ :styles=${(_, c) => c.parent.styles}
105
+ :model=${(x) => x}
106
+ :index=${(_, c) => c.index}
107
+ ></expression-group>
108
+ `, html `
109
+ <expression-rule
110
+ :config=${(_, c) => c.parent.config}
111
+ :styles=${(_, c) => c.parent.styles}
112
+ :model=${(x) => x}
113
+ :index=${(_, c) => c.index}
114
+ ></expression-rule>
115
+ `)}
116
+ ${when((_, loopCtx) => !loopCtx.isLast, html `
117
+ <p class="group-combinator-link">
118
+ ${(_, innerCtx) => innerCtx.parent.model.combinator.type}
119
+ </p>
120
+ `)}
121
+ `, { recycle: false, positioning: true })}
122
+ </div>
123
+ </div>
124
+ </div>
125
+ `;
@@ -23,6 +23,7 @@ declare type CheckboxInput = {
23
23
  declare type Combinator = {
24
24
  type: string;
25
25
  maxRules: 1 | 2 | 'many';
26
+ invisible?: boolean;
26
27
  label?: string;
27
28
  description?: string;
28
29
  allowedFields?: Field['fieldId'][];
@@ -36,6 +37,7 @@ declare namespace Config {
36
37
  export {
37
38
  BASE_LOGICAL_COMBINATORS,
38
39
  LOGICAL_COMBINATORS,
40
+ NULL_COMBINATOR,
39
41
  BASE_OPERATORS
40
42
  }
41
43
  }
@@ -220,6 +222,9 @@ declare type ModelGroup = GroupMetadata & GroupStructure;
220
222
  /** @internal **/
221
223
  declare type ModelRule = Rule & RuleMetadata;
222
224
 
225
+ /** @alpha */
226
+ declare const NULL_COMBINATOR: Combinator;
227
+
223
228
  /** @alpha **/
224
229
  declare type NumberInput = {
225
230
  input: 'number';
@@ -29,6 +29,7 @@ type CheckboxInput = {
29
29
  type Combinator = {
30
30
  type: string;
31
31
  maxRules: 1 | 2 | 'many';
32
+ invisible?: boolean;
32
33
  label?: string;
33
34
  description?: string;
34
35
  allowedFields?: Field['fieldId'][];
@@ -42,6 +43,7 @@ declare namespace Config {
42
43
  export {
43
44
  BASE_LOGICAL_COMBINATORS,
44
45
  LOGICAL_COMBINATORS,
46
+ NULL_COMBINATOR,
45
47
  BASE_OPERATORS
46
48
  }
47
49
  }
@@ -153,6 +155,9 @@ type Group = {
153
155
  // @alpha (undocumented)
154
156
  const LOGICAL_COMBINATORS: Combinator[];
155
157
 
158
+ // @alpha (undocumented)
159
+ const NULL_COMBINATOR: Combinator;
160
+
156
161
  // @alpha (undocumented)
157
162
  type NumberInput = {
158
163
  input: 'number';
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.258.3",
4
+ "version": "14.259.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/expression-builder.d.ts",
@@ -46,9 +46,6 @@
46
46
  "rimraf": "^5.0.0"
47
47
  },
48
48
  "dependencies": {
49
- "@genesislcap/foundation-comms": "14.243.0",
50
- "@genesislcap/foundation-logger": "14.243.0",
51
- "@genesislcap/foundation-utils": "14.243.0",
52
49
  "@genesislcap/web-core": "14.243.0",
53
50
  "rfdc": "1.4.1",
54
51
  "tslib": "^2.3.1"
@@ -62,5 +59,5 @@
62
59
  "access": "public"
63
60
  },
64
61
  "customElements": "dist/custom-elements.json",
65
- "gitHead": "0acd5f3f2eb9903b9b0d70b5d35210fd0b26d0c5"
62
+ "gitHead": "6656bbcddf94db7587bab3339ca021718ce54709"
66
63
  }