@gravitee/ui-particles-angular 13.5.3 → 13.6.0-renovate-angular-90aa950

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 (135) hide show
  1. package/esm2022/gio-asciidoctor/gio-asciidoctor.component.mjs +4 -4
  2. package/esm2022/gio-asciidoctor/gio-asciidoctor.module.mjs +5 -5
  3. package/esm2022/gio-asciidoctor/gio-asciidoctor.service.mjs +4 -4
  4. package/esm2022/gio-el/gio-el-editor/gio-el-editor-condition-group/gio-el-editor-condition-group.component.mjs +16 -17
  5. package/esm2022/gio-el/gio-el-editor/gio-el-editor-condition-group/gio-el-editor-condition-group.harness.mjs +7 -7
  6. package/esm2022/gio-el/gio-el-editor/gio-el-editor.component.mjs +20 -17
  7. package/esm2022/gio-el/gio-el-editor/gio-el-editor.harness.mjs +5 -2
  8. package/esm2022/gio-el/gio-el-editor/gio-el-field/gio-el-field.component.mjs +271 -0
  9. package/esm2022/gio-el/gio-el-editor/gio-el-field/gio-el-field.harness.mjs +53 -0
  10. package/esm2022/gio-el/gio-el-editor/gio-el-type/gio-el-editor-type-boolean/gio-el-editor-type-boolean.component.mjs +5 -5
  11. package/esm2022/gio-el/gio-el-editor/gio-el-type/gio-el-editor-type-date/gio-el-editor-type-date.component.mjs +5 -5
  12. package/esm2022/gio-el/gio-el-editor/gio-el-type/gio-el-editor-type-number/gio-el-editor-type-number.component.mjs +5 -5
  13. package/esm2022/gio-el/gio-el-editor/gio-el-type/gio-el-editor-type-string/gio-el-editor-type-string.component.mjs +7 -7
  14. package/esm2022/gio-el/models/Condition.mjs +1 -1
  15. package/esm2022/gio-el/models/ConditionGroup.mjs +1 -1
  16. package/esm2022/gio-el/models/ConditionModel.mjs +16 -1
  17. package/esm2022/gio-el/models/ExpressionLanguageBuilder.mjs +25 -12
  18. package/esm2022/lib/gio-avatar/gio-avatar.component.mjs +4 -4
  19. package/esm2022/lib/gio-avatar/gio-avatar.module.mjs +5 -5
  20. package/esm2022/lib/gio-banner/gio-banner.component.mjs +22 -22
  21. package/esm2022/lib/gio-banner/gio-banner.module.mjs +5 -5
  22. package/esm2022/lib/gio-breadcrumb/gio-breadcrumb-item.directive.mjs +4 -4
  23. package/esm2022/lib/gio-breadcrumb/gio-breadcrumb.component.mjs +4 -4
  24. package/esm2022/lib/gio-breadcrumb/gio-breadcrumb.module.mjs +5 -5
  25. package/esm2022/lib/gio-card-empty-state/gio-card-empty-state.component.mjs +4 -4
  26. package/esm2022/lib/gio-card-empty-state/gio-card-empty-state.module.mjs +5 -5
  27. package/esm2022/lib/gio-clipboard/gio-clipboard-copy-icon.component.mjs +4 -4
  28. package/esm2022/lib/gio-clipboard/gio-clipboard-copy-wrapper.component.mjs +4 -4
  29. package/esm2022/lib/gio-clipboard/gio-clipboard.base.component.mjs +4 -4
  30. package/esm2022/lib/gio-clipboard/gio-clipboard.module.mjs +5 -5
  31. package/esm2022/lib/gio-confirm-and-validate-dialog/gio-confirm-and-validate-dialog.component.mjs +4 -4
  32. package/esm2022/lib/gio-confirm-and-validate-dialog/gio-confirm-and-validate-dialog.module.mjs +5 -5
  33. package/esm2022/lib/gio-confirm-dialog/gio-confirm-dialog.component.mjs +4 -4
  34. package/esm2022/lib/gio-confirm-dialog/gio-confirm-dialog.module.mjs +5 -5
  35. package/esm2022/lib/gio-form-cron/gio-form-cron-hint.component.mjs +4 -4
  36. package/esm2022/lib/gio-form-cron/gio-form-cron-label.component.mjs +4 -4
  37. package/esm2022/lib/gio-form-cron/gio-form-cron.component.mjs +4 -4
  38. package/esm2022/lib/gio-form-cron/gio-form-cron.module.mjs +5 -5
  39. package/esm2022/lib/gio-form-file-picker/gio-form-file-picker-add-button/gio-form-file-picker-add-button.component.mjs +4 -4
  40. package/esm2022/lib/gio-form-file-picker/gio-form-file-picker-empty/gio-form-file-picker-empty.component.mjs +4 -4
  41. package/esm2022/lib/gio-form-file-picker/gio-form-file-picker-label/gio-form-file-picker-label.component.mjs +4 -4
  42. package/esm2022/lib/gio-form-file-picker/gio-form-file-picker.component.mjs +4 -4
  43. package/esm2022/lib/gio-form-file-picker/gio-form-file-picker.module.mjs +5 -5
  44. package/esm2022/lib/gio-form-focus-first-invalid/gio-form-focus-first-invalid-ignore.directive.mjs +4 -4
  45. package/esm2022/lib/gio-form-focus-first-invalid/gio-form-focus-first-invalid.directive.mjs +10 -10
  46. package/esm2022/lib/gio-form-focus-first-invalid/gio-form-focus-first-invalid.module.mjs +5 -5
  47. package/esm2022/lib/gio-form-headers/gio-form-headers-label.component.mjs +4 -4
  48. package/esm2022/lib/gio-form-headers/gio-form-headers.component.mjs +4 -4
  49. package/esm2022/lib/gio-form-headers/gio-form-headers.module.mjs +5 -5
  50. package/esm2022/lib/gio-form-json-schema/gio-form-json-schema.component.mjs +4 -4
  51. package/esm2022/lib/gio-form-json-schema/gio-form-json-schema.module.mjs +5 -5
  52. package/esm2022/lib/gio-form-json-schema/gio-formly-json-schema.service.mjs +4 -4
  53. package/esm2022/lib/gio-form-json-schema/type-component/array-type.component.mjs +4 -4
  54. package/esm2022/lib/gio-form-json-schema/type-component/code-editor-type.component.mjs +4 -4
  55. package/esm2022/lib/gio-form-json-schema/type-component/cron-type.component.mjs +4 -4
  56. package/esm2022/lib/gio-form-json-schema/type-component/headers-type.component.mjs +4 -4
  57. package/esm2022/lib/gio-form-json-schema/type-component/multischema-type.component.mjs +4 -4
  58. package/esm2022/lib/gio-form-json-schema/type-component/null-type.component.mjs +4 -4
  59. package/esm2022/lib/gio-form-json-schema/type-component/object-type.component.mjs +4 -4
  60. package/esm2022/lib/gio-form-json-schema/type-component/toggle-type.component.mjs +4 -4
  61. package/esm2022/lib/gio-form-json-schema/wrappers/gio-banner-wrapper.component.mjs +4 -4
  62. package/esm2022/lib/gio-form-json-schema/wrappers/gio-password-eye.component.mjs +4 -4
  63. package/esm2022/lib/gio-form-selection-inline/gio-form-selection-inline-card-content/gio-form-selection-inline-card-content.component.mjs +10 -10
  64. package/esm2022/lib/gio-form-selection-inline/gio-form-selection-inline-card.component.mjs +4 -4
  65. package/esm2022/lib/gio-form-selection-inline/gio-form-selection-inline.component.mjs +4 -4
  66. package/esm2022/lib/gio-form-selection-inline/gio-form-selection-inline.module.mjs +5 -5
  67. package/esm2022/lib/gio-form-slide-toggle/gio-form-label.directive.mjs +10 -10
  68. package/esm2022/lib/gio-form-slide-toggle/gio-form-slide-toggle.component.mjs +4 -4
  69. package/esm2022/lib/gio-form-slide-toggle/gio-form-slide-toggle.module.mjs +5 -5
  70. package/esm2022/lib/gio-form-tags-input/gio-form-tags-input.component.mjs +4 -4
  71. package/esm2022/lib/gio-form-tags-input/gio-form-tags-input.module.mjs +5 -5
  72. package/esm2022/lib/gio-icons/gio-icons.module.mjs +5 -5
  73. package/esm2022/lib/gio-license/gio-license-dialog/gio-license-dialog.component.mjs +4 -4
  74. package/esm2022/lib/gio-license/gio-license-dialog/gio-license-dialog.module.mjs +5 -5
  75. package/esm2022/lib/gio-license/gio-license.directive.mjs +4 -4
  76. package/esm2022/lib/gio-license/gio-license.module.mjs +5 -5
  77. package/esm2022/lib/gio-license/gio-license.service.mjs +4 -4
  78. package/esm2022/lib/gio-license/gio-license.testing.module.mjs +5 -5
  79. package/esm2022/lib/gio-license-expiration-notification/gio-license-expiration-notification.component.mjs +4 -4
  80. package/esm2022/lib/gio-license-expiration-notification/gio-license-expiration-notification.module.mjs +5 -5
  81. package/esm2022/lib/gio-loader/gio-loader.component.mjs +4 -4
  82. package/esm2022/lib/gio-loader/gio-loader.module.mjs +5 -5
  83. package/esm2022/lib/gio-mat-config/gio-mat-config.module.mjs +5 -5
  84. package/esm2022/lib/gio-monaco-editor/gio-monaco-editor-form-field.directive.mjs +4 -4
  85. package/esm2022/lib/gio-monaco-editor/gio-monaco-editor.component.mjs +4 -4
  86. package/esm2022/lib/gio-monaco-editor/gio-monaco-editor.module.mjs +5 -5
  87. package/esm2022/lib/gio-monaco-editor/gio-monaco-editor.testing.component.mjs +4 -4
  88. package/esm2022/lib/gio-monaco-editor/services/gio-language-el.service.mjs +4 -4
  89. package/esm2022/lib/gio-monaco-editor/services/gio-language-json.service.mjs +4 -4
  90. package/esm2022/lib/gio-monaco-editor/services/gio-monaco-editor.service.mjs +4 -4
  91. package/esm2022/lib/gio-pipe/gio.pipe.module.mjs +5 -5
  92. package/esm2022/lib/gio-pipe/safe.pipe.mjs +4 -4
  93. package/esm2022/lib/gio-prismjs/gio-prismjs.service.mjs +4 -4
  94. package/esm2022/lib/gio-save-bar/gio-save-bar.component.mjs +4 -4
  95. package/esm2022/lib/gio-save-bar/gio-save-bar.module.mjs +5 -5
  96. package/esm2022/lib/oem-theme/gio-menu/gio-menu-footer/gio-menu-footer.component.mjs +4 -4
  97. package/esm2022/lib/oem-theme/gio-menu/gio-menu-header/gio-menu-header.component.mjs +4 -4
  98. package/esm2022/lib/oem-theme/gio-menu/gio-menu-item/gio-menu-item.component.mjs +4 -4
  99. package/esm2022/lib/oem-theme/gio-menu/gio-menu-license-expiration-notification/gio-menu-license-expiration-notification.component.mjs +4 -4
  100. package/esm2022/lib/oem-theme/gio-menu/gio-menu-list/gio-menu-list.component.mjs +4 -4
  101. package/esm2022/lib/oem-theme/gio-menu/gio-menu-search/gio-menu-search.component.mjs +4 -4
  102. package/esm2022/lib/oem-theme/gio-menu/gio-menu-search/gio-menu-search.service.mjs +4 -4
  103. package/esm2022/lib/oem-theme/gio-menu/gio-menu-selector/gio-menu-selector.component.mjs +4 -4
  104. package/esm2022/lib/oem-theme/gio-menu/gio-menu.component.mjs +4 -4
  105. package/esm2022/lib/oem-theme/gio-menu/gio-menu.module.mjs +5 -5
  106. package/esm2022/lib/oem-theme/gio-menu/gio-menu.service.mjs +4 -4
  107. package/esm2022/lib/oem-theme/gio-submenu/gio-submenu-group/gio-submenu-group.component.mjs +4 -4
  108. package/esm2022/lib/oem-theme/gio-submenu/gio-submenu-item/gio-submenu-item.component.mjs +4 -4
  109. package/esm2022/lib/oem-theme/gio-submenu/gio-submenu.component.mjs +7 -7
  110. package/esm2022/lib/oem-theme/gio-submenu/gio-submenu.module.mjs +5 -5
  111. package/esm2022/lib/oem-theme/gio-top-bar/gio-top-bar-content/gio-top-bar-content.component.mjs +4 -4
  112. package/esm2022/lib/oem-theme/gio-top-bar/gio-top-bar-link/gio-top-bar-link.component.mjs +4 -4
  113. package/esm2022/lib/oem-theme/gio-top-bar/gio-top-bar-link/gio-top-bar-link.module.mjs +5 -5
  114. package/esm2022/lib/oem-theme/gio-top-bar/gio-top-bar-menu/gio-top-bar-menu.component.mjs +4 -4
  115. package/esm2022/lib/oem-theme/gio-top-bar/gio-top-bar-menu/gio-top-bar-menu.module.mjs +5 -5
  116. package/esm2022/lib/oem-theme/gio-top-bar/gio-top-bar.component.mjs +4 -4
  117. package/esm2022/lib/oem-theme/gio-top-bar/gio-top-bar.module.mjs +5 -5
  118. package/fesm2022/gravitee-ui-particles-angular-gio-asciidoctor.mjs +10 -10
  119. package/fesm2022/gravitee-ui-particles-angular-gio-asciidoctor.mjs.map +1 -1
  120. package/fesm2022/gravitee-ui-particles-angular-gio-el.mjs +407 -68
  121. package/fesm2022/gravitee-ui-particles-angular-gio-el.mjs.map +1 -1
  122. package/fesm2022/gravitee-ui-particles-angular.mjs +369 -369
  123. package/fesm2022/gravitee-ui-particles-angular.mjs.map +1 -1
  124. package/gio-el/gio-el-editor/gio-el-editor-condition-group/gio-el-editor-condition-group.component.d.ts +4 -4
  125. package/gio-el/gio-el-editor/gio-el-editor-condition-group/gio-el-editor-condition-group.harness.d.ts +6 -2
  126. package/gio-el/gio-el-editor/gio-el-editor.component.d.ts +3 -4
  127. package/gio-el/gio-el-editor/gio-el-editor.harness.d.ts +2 -1
  128. package/gio-el/gio-el-editor/gio-el-field/gio-el-field.component.d.ts +70 -0
  129. package/gio-el/gio-el-editor/gio-el-field/gio-el-field.harness.d.ts +14 -0
  130. package/gio-el/gio-el-editor/gio-el-type/gio-el-editor-type-string/gio-el-editor-type-string.component.d.ts +6 -1
  131. package/gio-el/models/Condition.d.ts +13 -4
  132. package/gio-el/models/ConditionGroup.d.ts +3 -2
  133. package/gio-el/models/ConditionModel.d.ts +19 -2
  134. package/gio-el/models/ExpressionLanguageBuilder.d.ts +1 -0
  135. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, DestroyRef, Component, Input, EventEmitter, HostBinding, Output, ChangeDetectionStrategy } from '@angular/core';
3
- import * as i7$1 from '@angular/material/button-toggle';
2
+ import { inject, DestroyRef, Component, Input, Optional, Self, HostBinding, EventEmitter, Output, ChangeDetectionStrategy } from '@angular/core';
3
+ import * as i4$1 from '@angular/material/button-toggle';
4
4
  import { MatButtonToggleModule } from '@angular/material/button-toggle';
5
5
  import * as i6 from '@angular/forms';
6
6
  import { FormControl, ReactiveFormsModule, FormGroup, Validators, FormArray } from '@angular/forms';
7
- import * as i6$2 from '@angular/material/button';
7
+ import * as i3$1 from '@angular/material/button';
8
8
  import { MatButtonModule } from '@angular/material/button';
9
- import * as i8 from '@angular/material/menu';
9
+ import * as i5$1 from '@angular/material/menu';
10
10
  import { MatMenuModule } from '@angular/material/menu';
11
- import * as i1$1 from '@angular/material/form-field';
12
- import { MatFormFieldModule } from '@angular/material/form-field';
11
+ import * as i2 from '@angular/material/form-field';
12
+ import { MatFormFieldModule, MatFormFieldControl } from '@angular/material/form-field';
13
13
  import * as i5 from '@angular/material/input';
14
14
  import { MatInputModule } from '@angular/material/input';
15
15
  import * as i1 from '@angular/common';
@@ -18,28 +18,27 @@ import * as i3 from '@angular/material/select';
18
18
  import { MatSelectModule } from '@angular/material/select';
19
19
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
20
20
  import { startWith, map } from 'rxjs/operators';
21
- import { isEmpty, toString, isDate, isNil, has } from 'lodash';
21
+ import { isNil, isEmpty, toString, isDate, get, has } from 'lodash';
22
22
  import { GioIconsModule } from '@gravitee/ui-particles-angular';
23
23
  import * as i7 from '@angular/material/autocomplete';
24
24
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
25
- import { Observable } from 'rxjs';
25
+ import { Observable, Subject, combineLatest } from 'rxjs';
26
26
  import * as i4 from '@angular/material/core';
27
27
  import { MatSlideToggle } from '@angular/material/slide-toggle';
28
28
  import * as i6$1 from '@angular/material/datepicker';
29
29
  import { MatDatepickerModule } from '@angular/material/datepicker';
30
- import * as i9 from '@angular/material/icon';
30
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
31
+ import * as i2$1 from '@angular/cdk/a11y';
32
+ import * as i6$2 from '@angular/material/icon';
31
33
  import { ComponentHarness, parallel, HarnessPredicate } from '@angular/cdk/testing';
32
34
  import { MatMenuHarness } from '@angular/material/menu/testing';
33
- import { MatSelectHarness } from '@angular/material/select/testing';
34
35
  import { MatButtonToggleGroupHarness } from '@angular/material/button-toggle/testing';
35
36
  import { DivHarness } from '@gravitee/ui-particles-angular/testing';
36
37
  import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing';
38
+ import { MatSelectHarness } from '@angular/material/select/testing';
37
39
  import { MatInputHarness } from '@angular/material/input/testing';
38
40
  import { MatDatepickerInputHarness } from '@angular/material/datepicker/testing';
39
-
40
- const isConditionModel = (conditions) => {
41
- return 'field' in conditions && 'label' in conditions && 'type' in conditions;
42
- };
41
+ import { MatAutocompleteHarness } from '@angular/material/autocomplete/testing';
43
42
 
44
43
  class ConditionGroup {
45
44
  constructor(condition, conditions) {
@@ -69,16 +68,16 @@ class ExpressionLanguageBuilder {
69
68
  AND: '&&',
70
69
  }; }
71
70
  static { this.OPERATOR_MAP = {
72
- EQUALS: (field, value) => `#${field} == ${value}`,
73
- NOT_EQUALS: (field, value) => `#${field} != ${value}`,
74
- LESS_THAN: (field, value) => `#${field} < ${value}`,
75
- LESS_THAN_OR_EQUALS: (field, value) => `#${field} <= ${value}`,
76
- GREATER_THAN: (field, value) => `#${field} > ${value}`,
77
- GREATER_THAN_OR_EQUALS: (field, value) => `#${field} >= ${value}`,
78
- CONTAINS: (field, value) => `#${field} matches "${value}"`,
79
- NOT_CONTAINS: (field, value) => `!#${field} matches "${value}"`,
80
- STARTS_WITH: (field, value) => `#${field} matches "^${value}"`,
81
- ENDS_WITH: (field, value) => `#${field} matches "${value}$"`,
71
+ EQUALS: (field, value) => `${field} == ${value}`,
72
+ NOT_EQUALS: (field, value) => `${field} != ${value}`,
73
+ LESS_THAN: (field, value) => `${field} < ${value}`,
74
+ LESS_THAN_OR_EQUALS: (field, value) => `${field} <= ${value}`,
75
+ GREATER_THAN: (field, value) => `${field} > ${value}`,
76
+ GREATER_THAN_OR_EQUALS: (field, value) => `${field} >= ${value}`,
77
+ CONTAINS: (field, value) => `${field} matches "${value}"`,
78
+ NOT_CONTAINS: (field, value) => `!${field} matches "${value}"`,
79
+ STARTS_WITH: (field, value) => `${field} matches "^${value}"`,
80
+ ENDS_WITH: (field, value) => `${field} matches "${value}$"`,
82
81
  }; }
83
82
  static buildConditionGroup(conditionGroup) {
84
83
  let el = '';
@@ -107,7 +106,7 @@ class ExpressionLanguageBuilder {
107
106
  }
108
107
  static buildCondition(condition) {
109
108
  const operator = ExpressionLanguageBuilder.OPERATOR_MAP[condition.operator];
110
- return operator(condition.field, ExpressionLanguageBuilder.valueToString(condition.type, condition.value));
109
+ return operator(ExpressionLanguageBuilder.toFieldString(condition.field), ExpressionLanguageBuilder.valueToString(condition.type, condition.value));
111
110
  }
112
111
  static valueToString(type, value) {
113
112
  if (!type) {
@@ -122,6 +121,18 @@ class ExpressionLanguageBuilder {
122
121
  return `${value}`;
123
122
  }
124
123
  }
124
+ static toFieldString(field) {
125
+ if (field instanceof Object && !isNil(field.key1Value) && !isNil(field.key2Value)) {
126
+ return `#${field.field}?.["${field.key1Value}"]?.[${field.key2Value}]`;
127
+ }
128
+ else if (field instanceof Object && !isNil(field.key1Value)) {
129
+ return `#${field.field}?.["${field.key1Value}"]`;
130
+ }
131
+ else if (field instanceof Object) {
132
+ return `#${field.field}`;
133
+ }
134
+ return `#${field}`;
135
+ }
125
136
  constructor(conditionGroup) {
126
137
  this.conditionGroup = conditionGroup;
127
138
  }
@@ -172,18 +183,18 @@ class GioElEditorTypeStringComponent {
172
183
  }
173
184
  this.conditionFormGroup.addControl('operator', new FormControl(null));
174
185
  this.conditionFormGroup.addControl('value', new FormControl(null));
175
- const values = field.values;
186
+ const values = field.values?.map(value => (typeof value === 'string' ? { value, label: value } : value));
176
187
  if (values && !isEmpty(values)) {
177
188
  this.filteredOptions$ = this.conditionFormGroup.get('value').valueChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(''), map(value => filterValues(values, toString(value) ?? '')));
178
189
  }
179
190
  }
180
191
  }
181
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorTypeStringComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
182
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioElEditorTypeStringComponent, isStandalone: true, selector: "gio-el-editor-type-string", inputs: { conditionFormGroup: "conditionFormGroup" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Value</mat-label>\n <input matInput formControlName=\"value\" placeholder=\"Value\" [matAutocomplete]=\"auto\" />\n\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n @for (option of filteredOptions$ | async; track option) {\n <mat-option [value]=\"option\">{{ option }}</mat-option>\n }\n </mat-autocomplete>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i7.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i7.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }] }); }
192
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorTypeStringComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
193
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: GioElEditorTypeStringComponent, isStandalone: true, selector: "gio-el-editor-type-string", inputs: { conditionFormGroup: "conditionFormGroup" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field class=\"condition__operator\">\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Value</mat-label>\n <input matInput formControlName=\"value\" placeholder=\"Value\" [matAutocomplete]=\"auto\" />\n\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n @for (option of filteredOptions$ | async; track option) {\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\n }\n </mat-autocomplete>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.condition__operator{width:120px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i7.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "directive", type: i7.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }] }); }
183
194
  }
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorTypeStringComponent, decorators: [{
195
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorTypeStringComponent, decorators: [{
185
196
  type: Component,
186
- args: [{ selector: 'gio-el-editor-type-string', standalone: true, imports: [CommonModule, MatFormFieldModule, MatSelectModule, MatInputModule, ReactiveFormsModule, MatAutocompleteModule], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Value</mat-label>\n <input matInput formControlName=\"value\" placeholder=\"Value\" [matAutocomplete]=\"auto\" />\n\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n @for (option of filteredOptions$ | async; track option) {\n <mat-option [value]=\"option\">{{ option }}</mat-option>\n }\n </mat-autocomplete>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}\n"] }]
197
+ args: [{ selector: 'gio-el-editor-type-string', standalone: true, imports: [CommonModule, MatFormFieldModule, MatSelectModule, MatInputModule, ReactiveFormsModule, MatAutocompleteModule], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field class=\"condition__operator\">\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Value</mat-label>\n <input matInput formControlName=\"value\" placeholder=\"Value\" [matAutocomplete]=\"auto\" />\n\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\n @for (option of filteredOptions$ | async; track option) {\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\n }\n </mat-autocomplete>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.condition__operator{width:120px}\n"] }]
187
198
  }], propDecorators: { conditionFormGroup: [{
188
199
  type: Input,
189
200
  args: [{
@@ -192,7 +203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
192
203
  }] } });
193
204
  const filterValues = (values, value) => {
194
205
  const filterValue = value.toLowerCase();
195
- return values.filter(option => option.toLowerCase().includes(filterValue));
206
+ return values.filter(option => option.label.toLowerCase().includes(filterValue) || option.value.toLowerCase().includes(filterValue));
196
207
  };
197
208
 
198
209
  /*
@@ -228,12 +239,12 @@ class GioElEditorTypeBooleanComponent {
228
239
  this.conditionFormGroup.get('value')?.setValue(true);
229
240
  }
230
241
  }
231
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorTypeBooleanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
232
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioElEditorTypeBooleanComponent, isStandalone: true, selector: "gio-el-editor-type-boolean", inputs: { conditionFormGroup: "conditionFormGroup" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-slide-toggle class=\"toggle\" #valueToggle formControlName=\"value\">\n <mat-label>{{ valueToggle.checked ? 'True' : 'False' }}</mat-label>\n </mat-slide-toggle>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.toggle{min-width:80px;align-self:center;margin-left:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
242
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorTypeBooleanComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
243
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: GioElEditorTypeBooleanComponent, isStandalone: true, selector: "gio-el-editor-type-boolean", inputs: { conditionFormGroup: "conditionFormGroup" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field class=\"condition__operator\">\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-slide-toggle class=\"toggle\" #valueToggle formControlName=\"value\">\n <mat-label>{{ valueToggle.checked ? 'True' : 'False' }}</mat-label>\n </mat-slide-toggle>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.condition__operator{width:120px}.toggle{min-width:80px;align-self:center;margin-left:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
233
244
  }
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorTypeBooleanComponent, decorators: [{
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorTypeBooleanComponent, decorators: [{
235
246
  type: Component,
236
- args: [{ selector: 'gio-el-editor-type-boolean', standalone: true, imports: [CommonModule, MatFormFieldModule, MatSelectModule, ReactiveFormsModule, MatSlideToggle], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-slide-toggle class=\"toggle\" #valueToggle formControlName=\"value\">\n <mat-label>{{ valueToggle.checked ? 'True' : 'False' }}</mat-label>\n </mat-slide-toggle>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.toggle{min-width:80px;align-self:center;margin-left:8px}\n"] }]
247
+ args: [{ selector: 'gio-el-editor-type-boolean', standalone: true, imports: [CommonModule, MatFormFieldModule, MatSelectModule, ReactiveFormsModule, MatSlideToggle], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field class=\"condition__operator\">\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-slide-toggle class=\"toggle\" #valueToggle formControlName=\"value\">\n <mat-label>{{ valueToggle.checked ? 'True' : 'False' }}</mat-label>\n </mat-slide-toggle>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.condition__operator{width:120px}.toggle{min-width:80px;align-self:center;margin-left:8px}\n"] }]
237
248
  }], propDecorators: { conditionFormGroup: [{
238
249
  type: Input,
239
250
  args: [{
@@ -285,12 +296,12 @@ class GioElEditorTypeNumberComponent {
285
296
  this.conditionFormGroup.addControl('value', new FormControl(true));
286
297
  }
287
298
  }
288
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorTypeNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
289
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioElEditorTypeNumberComponent, isStandalone: true, selector: "gio-el-editor-type-number", inputs: { conditionFormGroup: "conditionFormGroup" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Value</mat-label>\n <input matInput formControlName=\"value\" placeholder=\"Value\" type=\"number\" [min]=\"min\" [max]=\"max\" />\n <mat-error *ngIf=\"conditionFormGroup.get('value')?.hasError('min')\"> Value must be at least {{ min }} </mat-error>\n <mat-error *ngIf=\"conditionFormGroup.get('value')?.hasError('max')\"> Value must be at most {{ max }} </mat-error>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.toggle{min-width:80px;margin-left:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i6.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
299
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorTypeNumberComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
300
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: GioElEditorTypeNumberComponent, isStandalone: true, selector: "gio-el-editor-type-number", inputs: { conditionFormGroup: "conditionFormGroup" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field class=\"condition__operator\">\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Value</mat-label>\n <input matInput formControlName=\"value\" placeholder=\"Value\" type=\"number\" [min]=\"min\" [max]=\"max\" />\n <mat-error *ngIf=\"conditionFormGroup.get('value')?.hasError('min')\"> Value must be at least {{ min }} </mat-error>\n <mat-error *ngIf=\"conditionFormGroup.get('value')?.hasError('max')\"> Value must be at most {{ max }} </mat-error>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.condition__operator{width:120px}.toggle{min-width:80px;margin-left:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i6.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
290
301
  }
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorTypeNumberComponent, decorators: [{
302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorTypeNumberComponent, decorators: [{
292
303
  type: Component,
293
- args: [{ selector: 'gio-el-editor-type-number', standalone: true, imports: [CommonModule, MatFormFieldModule, MatSelectModule, MatInputModule, ReactiveFormsModule], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Value</mat-label>\n <input matInput formControlName=\"value\" placeholder=\"Value\" type=\"number\" [min]=\"min\" [max]=\"max\" />\n <mat-error *ngIf=\"conditionFormGroup.get('value')?.hasError('min')\"> Value must be at least {{ min }} </mat-error>\n <mat-error *ngIf=\"conditionFormGroup.get('value')?.hasError('max')\"> Value must be at most {{ max }} </mat-error>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.toggle{min-width:80px;margin-left:8px}\n"] }]
304
+ args: [{ selector: 'gio-el-editor-type-number', standalone: true, imports: [CommonModule, MatFormFieldModule, MatSelectModule, MatInputModule, ReactiveFormsModule], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field class=\"condition__operator\">\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Value</mat-label>\n <input matInput formControlName=\"value\" placeholder=\"Value\" type=\"number\" [min]=\"min\" [max]=\"max\" />\n <mat-error *ngIf=\"conditionFormGroup.get('value')?.hasError('min')\"> Value must be at least {{ min }} </mat-error>\n <mat-error *ngIf=\"conditionFormGroup.get('value')?.hasError('max')\"> Value must be at most {{ max }} </mat-error>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.condition__operator{width:120px}.toggle{min-width:80px;margin-left:8px}\n"] }]
294
305
  }], propDecorators: { conditionFormGroup: [{
295
306
  type: Input,
296
307
  args: [{
@@ -344,12 +355,12 @@ class GioElEditorTypeDateComponent {
344
355
  });
345
356
  }
346
357
  }
347
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorTypeDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
348
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioElEditorTypeDateComponent, isStandalone: true, selector: "gio-el-editor-type-date", inputs: { conditionFormGroup: "conditionFormGroup" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Choose a date</mat-label>\n <input matInput [matDatepicker]=\"picker\" [formControl]=\"datepickerControl\" />\n <mat-hint>MM/DD/YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.toggle{min-width:80px;margin-left:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i1$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] }); }
358
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorTypeDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
359
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: GioElEditorTypeDateComponent, isStandalone: true, selector: "gio-el-editor-type-date", inputs: { conditionFormGroup: "conditionFormGroup" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field class=\"condition__operator\">\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Choose a date</mat-label>\n <input matInput [matDatepicker]=\"picker\" [formControl]=\"datepickerControl\" />\n <mat-hint>MM/DD/YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.condition__operator{width:120px}.toggle{min-width:80px;margin-left:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i6$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i6$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i6$1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }] }); }
349
360
  }
350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorTypeDateComponent, decorators: [{
361
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorTypeDateComponent, decorators: [{
351
362
  type: Component,
352
- args: [{ selector: 'gio-el-editor-type-date', standalone: true, imports: [CommonModule, MatFormFieldModule, MatSelectModule, MatInputModule, ReactiveFormsModule, MatDatepickerModule], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field>\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Choose a date</mat-label>\n <input matInput [matDatepicker]=\"picker\" [formControl]=\"datepickerControl\" />\n <mat-hint>MM/DD/YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.toggle{min-width:80px;margin-left:8px}\n"] }]
363
+ args: [{ selector: 'gio-el-editor-type-date', standalone: true, imports: [CommonModule, MatFormFieldModule, MatSelectModule, MatInputModule, ReactiveFormsModule, MatDatepickerModule], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n@if (conditionFormGroup) {\n <div [formGroup]=\"conditionFormGroup\" class=\"condition\">\n <mat-form-field class=\"condition__operator\">\n <mat-label>Operator</mat-label>\n\n <mat-select formControlName=\"operator\" placeholder=\"Select Operator\">\n @for (operator of operators; track operator.value) {\n <mat-option [value]=\"operator.value\">{{ operator.label }}</mat-option>\n }\n </mat-select>\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Choose a date</mat-label>\n <input matInput [matDatepicker]=\"picker\" [formControl]=\"datepickerControl\" />\n <mat-hint>MM/DD/YYYY</mat-hint>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n </mat-form-field>\n </div>\n}\n", styles: [".condition{display:flex;flex-direction:row;align-items:flex-start;gap:8px}.condition__operator{width:120px}.toggle{min-width:80px;margin-left:8px}\n"] }]
353
364
  }], propDecorators: { conditionFormGroup: [{
354
365
  type: Input,
355
366
  args: [{
@@ -357,6 +368,260 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
357
368
  }]
358
369
  }] } });
359
370
 
371
+ const isConditionModel = (conditions) => {
372
+ return 'field' in conditions && 'label' in conditions && 'type' in conditions;
373
+ };
374
+
375
+ /*
376
+ * Copyright (C) 2024 The Gravitee team (http://gravitee.io)
377
+ *
378
+ * Licensed under the Apache License, Version 2.0 (the "License");
379
+ * you may not use this file except in compliance with the License.
380
+ * You may obtain a copy of the License at
381
+ *
382
+ * http://www.apache.org/licenses/LICENSE-2.0
383
+ *
384
+ * Unless required by applicable law or agreed to in writing, software
385
+ * distributed under the License is distributed on an "AS IS" BASIS,
386
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
387
+ * See the License for the specific language governing permissions and
388
+ * limitations under the License.
389
+ */
390
+ class GioElFieldComponent {
391
+ // From MatFormFieldControl
392
+ set value(_value) {
393
+ // Not implemented. Only for select new value.
394
+ }
395
+ // From MatFormFieldControl
396
+ static { this.nextId = 0; }
397
+ // From MatFormFieldControl
398
+ get placeholder() {
399
+ return this._placeholder;
400
+ }
401
+ set placeholder(plh) {
402
+ this._placeholder = plh;
403
+ this.stateChanges.next();
404
+ }
405
+ // From MatFormFieldControl
406
+ get empty() {
407
+ return !this.fieldFormControl.value;
408
+ }
409
+ // From MatFormFieldControl
410
+ get shouldLabelFloat() {
411
+ return this.focused || !this.empty;
412
+ }
413
+ // From MatFormFieldControl
414
+ get required() {
415
+ return this._required;
416
+ }
417
+ set required(req) {
418
+ this._required = coerceBooleanProperty(req);
419
+ this.stateChanges.next();
420
+ }
421
+ // From MatFormFieldControl
422
+ get disabled() {
423
+ return this._disabled;
424
+ }
425
+ set disabled(value) {
426
+ this._disabled = coerceBooleanProperty(value);
427
+ this._disabled ? this.fieldFormControl.disable() : this.fieldFormControl.enable();
428
+ this.stateChanges.next();
429
+ }
430
+ // From MatFormFieldControl
431
+ get errorState() {
432
+ return this.fieldFormControl.invalid && this.touched;
433
+ }
434
+ // From MatFormFieldControl
435
+ setDescribedByIds(ids) {
436
+ this.userAriaDescribedBy = ids.join(' ');
437
+ }
438
+ constructor(ngControl, elementRef, focusMonitor) {
439
+ this.ngControl = ngControl;
440
+ this.elementRef = elementRef;
441
+ this.focusMonitor = focusMonitor;
442
+ this.destroyRef = inject(DestroyRef);
443
+ this.conditionsModel = [];
444
+ this.fieldFilteredOptions$ = new Observable();
445
+ this.key1FilteredOptions$ = new Observable();
446
+ this.selectedConditionModel = null;
447
+ this.fieldFormControl = new FormControl(null);
448
+ this.key1FormControl = new FormControl(null);
449
+ this.key2FormControl = new FormControl(null);
450
+ // From MatFormFieldControl
451
+ this.stateChanges = new Subject();
452
+ this.id = `gio-el-editor-input-${GioElFieldComponent.nextId++}`;
453
+ this._placeholder = '';
454
+ // From MatFormFieldControl
455
+ this.focused = false;
456
+ this._required = false;
457
+ this._disabled = false;
458
+ this.touched = false;
459
+ // From MatFormFieldControl
460
+ this.controlType = 'gio-el-editor-input';
461
+ // From MatFormFieldControl
462
+ // disableAutomaticLabeling?: boolean | undefined;
463
+ this._onChange = () => ({});
464
+ this._onTouched = () => ({});
465
+ if (this.ngControl != null) {
466
+ // Setting the value accessor directly (instead of using
467
+ // the providers) to avoid running into a circular import.
468
+ this.ngControl.valueAccessor = this;
469
+ }
470
+ this.focusMonitor
471
+ .monitor(this.elementRef.nativeElement, true)
472
+ .pipe(takeUntilDestroyed(this.destroyRef))
473
+ .subscribe(origin => {
474
+ this.focused = !!origin;
475
+ this.touched = true;
476
+ this._onTouched();
477
+ this.stateChanges.next();
478
+ });
479
+ }
480
+ ngOnChanges(changes) {
481
+ if (changes.conditionsModel) {
482
+ const flattenConditionsModelToOption = (conditions, parent = null) => {
483
+ return conditions.flatMap(condition => {
484
+ if (isConditionModel(condition)) {
485
+ return {
486
+ ...condition,
487
+ label: parent ? `${parent.label} > ${condition.label}` : condition.label,
488
+ field: parent ? `${parent.field}.${condition.field}` : condition.field,
489
+ };
490
+ }
491
+ return flattenConditionsModelToOption(condition.conditions, {
492
+ ...condition,
493
+ field: parent ? `${parent.field}.${condition.field}` : condition.field,
494
+ label: parent ? `${parent.label} > ${condition.label}` : condition.label,
495
+ });
496
+ });
497
+ };
498
+ const autocompleteModel = this.conditionsModel.map(conditionModel => {
499
+ if (isConditionModel(conditionModel)) {
500
+ return {
501
+ ...conditionModel,
502
+ };
503
+ }
504
+ return {
505
+ field: conditionModel.field,
506
+ label: conditionModel.label,
507
+ options: flattenConditionsModelToOption(conditionModel.conditions).map(conditions => ({
508
+ ...conditions,
509
+ field: `${conditionModel.field}.${conditions.field}`,
510
+ })),
511
+ };
512
+ });
513
+ if (autocompleteModel && !isEmpty(autocompleteModel)) {
514
+ this.fieldFilteredOptions$ = this.fieldFormControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(''), map(value => fieldFilterValues(autocompleteModel, toString(value) ?? '')));
515
+ }
516
+ combineLatest([
517
+ this.fieldFormControl.valueChanges,
518
+ this.key1FormControl.valueChanges.pipe(startWith(this.key1FormControl.value)),
519
+ this.key2FormControl.valueChanges.pipe(startWith(this.key1FormControl.value)),
520
+ ])
521
+ .pipe(takeUntilDestroyed(this.destroyRef))
522
+ .subscribe(([fieldValue, key1Value, key2Value]) => {
523
+ let map = fieldValue?.map;
524
+ if (map?.type === 'Map') {
525
+ map = { ...map, key1Value };
526
+ }
527
+ if (map?.type === 'MultiMap') {
528
+ map = { ...map, key1Value, key2Value };
529
+ }
530
+ if (fieldValue && isConditionModel(fieldValue)) {
531
+ this._onChange({
532
+ ...fieldValue,
533
+ map,
534
+ });
535
+ }
536
+ else {
537
+ this._onChange(null);
538
+ }
539
+ this.stateChanges.next();
540
+ });
541
+ }
542
+ }
543
+ displayFn(option) {
544
+ return option?.field;
545
+ }
546
+ onFieldSelected($event) {
547
+ this.selectedConditionModel = $event.option.value;
548
+ const key1AutocompleteValues = this.selectedConditionModel?.map?.key1Values?.map(value => typeof value === 'string' ? { value, label: value } : value);
549
+ if (key1AutocompleteValues && !isEmpty(key1AutocompleteValues)) {
550
+ this.key1FilteredOptions$ = this.key1FormControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef), startWith(''), map(value => key1FilterValues(key1AutocompleteValues, toString(value) ?? '')));
551
+ }
552
+ }
553
+ // From ControlValueAccessor interface
554
+ writeValue() {
555
+ // Not implemented. Only for select new value.
556
+ }
557
+ // From ControlValueAccessor interface
558
+ registerOnChange(fn) {
559
+ this._onChange = fn;
560
+ }
561
+ // From ControlValueAccessor interface
562
+ registerOnTouched(fn) {
563
+ this._onTouched = fn;
564
+ }
565
+ // From ControlValueAccessor interface
566
+ setDisabledState(isDisabled) {
567
+ this.disabled = isDisabled;
568
+ if (isDisabled) {
569
+ this.fieldFormControl.disable();
570
+ }
571
+ else {
572
+ this.fieldFormControl.enable();
573
+ }
574
+ }
575
+ // From ControlValueAccessor interface
576
+ onContainerClick(event) {
577
+ if (event.target.tagName.toLowerCase() != 'input') {
578
+ this.elementRef.nativeElement.querySelector('input')?.focus();
579
+ }
580
+ }
581
+ ngOnDestroy() {
582
+ this.stateChanges.complete();
583
+ this.focusMonitor.stopMonitoring(this.elementRef);
584
+ }
585
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElFieldComponent, deps: [{ token: i6.NgControl, optional: true, self: true }, { token: i0.ElementRef }, { token: i2$1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
586
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: GioElFieldComponent, isStandalone: true, selector: "gio-el-field", inputs: { conditionsModel: "conditionsModel", placeholder: "placeholder", required: "required" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat", "attr.aria-describedBy": "this.userAriaDescribedBy" } }, providers: [{ provide: MatFormFieldControl, useExisting: GioElFieldComponent }], usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"container\">\n <span class=\"text\">#</span>\n <input class=\"input fieldSelect\" matInput [formControl]=\"fieldFormControl\" [matAutocomplete]=\"fieldSelectAuto\" />\n\n <mat-autocomplete\n autoActiveFirstOption\n requireSelection\n #fieldSelectAuto=\"matAutocomplete\"\n panelWidth=\"auto\"\n [displayWith]=\"displayFn\"\n (optionSelected)=\"onFieldSelected($event)\"\n >\n @for (option of fieldFilteredOptions$ | async; track option) {\n @if (option.hasOwnProperty('options')) {\n <mat-optgroup [label]=\"option.label\">\n @for (option of $any(option).options; track option) {\n <mat-option [value]=\"option\">{{ option.label }}</mat-option>\n }\n </mat-optgroup>\n } @else {\n <mat-option [value]=\"option\">{{ option.label }}</mat-option>\n }\n }\n </mat-autocomplete>\n @if (selectedConditionModel?.map) {\n <span class=\"text\">[\"</span>\n <input class=\"input key1\" matInput [formControl]=\"key1FormControl\" [matAutocomplete]=\"key1SelectAuto\" />\n\n <mat-autocomplete #key1SelectAuto=\"matAutocomplete\" panelWidth=\"auto\">\n @for (option of key1FilteredOptions$ | async; track option) {\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\n }\n </mat-autocomplete>\n\n <span class=\"text\">\"]</span>\n }\n @if (selectedConditionModel?.map?.type === 'MultiMap') {\n <span class=\"text\">[</span>\n <input class=\"input key2\" type=\"number\" min=\"0\" matInput [formControl]=\"key2FormControl\" />\n\n <span class=\"text\">]</span>\n }\n</div>\n", styles: [":host{opacity:0}:host.floating{opacity:1}.container{display:flex;align-items:center}.input{flex:3 2 auto;padding:0;border:none;background:none;color:currentcolor;font:inherit;outline:none}.input.key1,.input.key2{flex:2 3 auto;border-bottom:1px dashed #a2a5b5!important}.text{color:#a2a5b5}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i7.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i4.MatOptgroup, selector: "mat-optgroup", inputs: ["label", "disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i7.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i6.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: GioIconsModule }] }); }
587
+ }
588
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElFieldComponent, decorators: [{
589
+ type: Component,
590
+ args: [{ selector: 'gio-el-field', standalone: true, imports: [CommonModule, MatAutocompleteModule, MatInputModule, ReactiveFormsModule, MatButtonModule, GioIconsModule], providers: [{ provide: MatFormFieldControl, useExisting: GioElFieldComponent }], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<div class=\"container\">\n <span class=\"text\">#</span>\n <input class=\"input fieldSelect\" matInput [formControl]=\"fieldFormControl\" [matAutocomplete]=\"fieldSelectAuto\" />\n\n <mat-autocomplete\n autoActiveFirstOption\n requireSelection\n #fieldSelectAuto=\"matAutocomplete\"\n panelWidth=\"auto\"\n [displayWith]=\"displayFn\"\n (optionSelected)=\"onFieldSelected($event)\"\n >\n @for (option of fieldFilteredOptions$ | async; track option) {\n @if (option.hasOwnProperty('options')) {\n <mat-optgroup [label]=\"option.label\">\n @for (option of $any(option).options; track option) {\n <mat-option [value]=\"option\">{{ option.label }}</mat-option>\n }\n </mat-optgroup>\n } @else {\n <mat-option [value]=\"option\">{{ option.label }}</mat-option>\n }\n }\n </mat-autocomplete>\n @if (selectedConditionModel?.map) {\n <span class=\"text\">[\"</span>\n <input class=\"input key1\" matInput [formControl]=\"key1FormControl\" [matAutocomplete]=\"key1SelectAuto\" />\n\n <mat-autocomplete #key1SelectAuto=\"matAutocomplete\" panelWidth=\"auto\">\n @for (option of key1FilteredOptions$ | async; track option) {\n <mat-option [value]=\"option.value\">{{ option.label }}</mat-option>\n }\n </mat-autocomplete>\n\n <span class=\"text\">\"]</span>\n }\n @if (selectedConditionModel?.map?.type === 'MultiMap') {\n <span class=\"text\">[</span>\n <input class=\"input key2\" type=\"number\" min=\"0\" matInput [formControl]=\"key2FormControl\" />\n\n <span class=\"text\">]</span>\n }\n</div>\n", styles: [":host{opacity:0}:host.floating{opacity:1}.container{display:flex;align-items:center}.input{flex:3 2 auto;padding:0;border:none;background:none;color:currentcolor;font:inherit;outline:none}.input.key1,.input.key2{flex:2 3 auto;border-bottom:1px dashed #a2a5b5!important}.text{color:#a2a5b5}\n"] }]
591
+ }], ctorParameters: () => [{ type: i6.NgControl, decorators: [{
592
+ type: Optional
593
+ }, {
594
+ type: Self
595
+ }] }, { type: i0.ElementRef }, { type: i2$1.FocusMonitor }], propDecorators: { conditionsModel: [{
596
+ type: Input,
597
+ args: [{ required: true }]
598
+ }], id: [{
599
+ type: HostBinding
600
+ }], placeholder: [{
601
+ type: Input
602
+ }], shouldLabelFloat: [{
603
+ type: HostBinding,
604
+ args: ['class.floating']
605
+ }], required: [{
606
+ type: Input
607
+ }], userAriaDescribedBy: [{
608
+ type: HostBinding,
609
+ args: ['attr.aria-describedBy']
610
+ }] } });
611
+ const fieldFilterValues = (autocompleteModel, value) => {
612
+ const filterValue = value.toLowerCase();
613
+ return autocompleteModel.filter(option => {
614
+ if ('options' in option) {
615
+ return option.options.filter(condition => condition.label.toLowerCase().includes(filterValue));
616
+ }
617
+ return option.label.toLowerCase().includes(filterValue);
618
+ });
619
+ };
620
+ const key1FilterValues = (values, value) => {
621
+ const filterValue = value.toLowerCase();
622
+ return values.filter(option => option.label.toLowerCase().includes(filterValue) || option.value.toLowerCase().includes(filterValue));
623
+ };
624
+
360
625
  /*
361
626
  * Copyright (C) 2024 The Gravitee team (http://gravitee.io)
362
627
  *
@@ -375,9 +640,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
375
640
  class GioElEditorConditionGroupComponent {
376
641
  constructor() {
377
642
  /**
378
- * Condition models to generate the fields for the conditions.
643
+ * Conditions model to generate the fields for the conditions.
379
644
  */
380
- this.conditionModels = [];
645
+ this.conditionsModel = [];
381
646
  /**
382
647
  * Level of the node in the tree. Useful for testing with Harness to limit the scope of the query.
383
648
  */
@@ -411,10 +676,10 @@ class GioElEditorConditionGroupComponent {
411
676
  this.conditionGroupFormGroup.controls.condition.disable();
412
677
  }
413
678
  }
414
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorConditionGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
415
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioElEditorConditionGroupComponent, isStandalone: true, selector: "gio-el-editor-condition-group", inputs: { conditionGroupFormGroup: "conditionGroupFormGroup", conditionModels: "conditionModels", nodeLvl: "nodeLvl" }, outputs: { remove: "remove" }, host: { properties: { "attr.node-lvl": "this.nodeLvl" } }, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"conditionGroup\" [formGroup]=\"conditionGroupFormGroup\">\n <div class=\"conditionGroup__header\">\n <div class=\"conditionGroup__header__conditionField\"></div>\n <mat-button-toggle-group\n class=\"gio-button-toggle-group\"\n name=\"condition\"\n aria-label=\"Condition\"\n formControlName=\"condition\"\n [hideSingleSelectionIndicator]=\"true\"\n >\n <mat-button-toggle class=\"mat-button-toggle-group\" value=\"AND\">AND</mat-button-toggle>\n <mat-button-toggle class=\"mat-button-toggle-group\" value=\"OR\">OR</mat-button-toggle>\n </mat-button-toggle-group>\n\n <div class=\"conditionGroup__header__addBtn\">\n <button mat-button [matMenuTriggerFor]=\"addBtn\">\n <mat-icon svgIcon=\"gio:plus\">Add</mat-icon>\n </button>\n <mat-menu #addBtn=\"matMenu\">\n <button mat-menu-item (click)=\"addConditionGroup()\">Add Group</button>\n <button mat-menu-item (click)=\"addCondition()\">Add Condition</button>\n </mat-menu>\n </div>\n\n @if (nodeLvl > 0) {\n <button class=\"conditionGroup__header__removeBtn\" mat-button aria-label=\"Remove Group\" (click)=\"removeConditionGroup()\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n }\n </div>\n\n <div class=\"conditionGroup__conditions\">\n @for (condition of conditionGroupFormGroup.controls.conditions.controls; track conditionIndex; let conditionIndex = $index) {\n @if (isConditionGroupForm(condition)) {\n <gio-el-editor-condition-group\n class=\"conditionGroup__conditions__conditionGroup\"\n [conditionGroupFormGroup]=\"condition\"\n [conditionModels]=\"conditionModels\"\n [nodeLvl]=\"nodeLvl + 1\"\n (remove)=\"removeCondition(conditionIndex)\"\n ></gio-el-editor-condition-group>\n } @else {\n <div\n class=\"conditionGroup__conditions__condition\"\n [formGroup]=\"conditionGroupFormGroup.controls.conditions.at(conditionIndex)\"\n [attr.node-lvl]=\"nodeLvl\"\n >\n <mat-form-field class=\"conditionGroup__conditions__condition__field\">\n <mat-label>Field</mat-label>\n\n <mat-select formControlName=\"field\" placeholder=\"Select Field\">\n <mat-option *ngFor=\"let field of conditionModels\" [value]=\"field\">{{ field.label }}</mat-option>\n </mat-select>\n </mat-form-field>\n\n @switch (condition.controls.field.value?.type) {\n @case ('string') {\n <gio-el-editor-type-string [conditionFormGroup]=\"condition\"></gio-el-editor-type-string>\n }\n @case ('boolean') {\n <gio-el-editor-type-boolean [conditionFormGroup]=\"condition\"></gio-el-editor-type-boolean>\n }\n @case ('number') {\n <gio-el-editor-type-number [conditionFormGroup]=\"condition\"></gio-el-editor-type-number>\n }\n @case ('date') {\n <gio-el-editor-type-date [conditionFormGroup]=\"condition\"></gio-el-editor-type-date>\n }\n }\n\n <button\n class=\"conditionGroup__conditions__condition__removeBtn\"\n mat-button\n aria-label=\"Remove Condition\"\n (click)=\"removeCondition(conditionIndex)\"\n >\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".conditionGroup{display:flex;flex-direction:column;gap:8px}.conditionGroup__header{display:flex;flex-direction:row;align-items:center;gap:8px}.conditionGroup__header .gio-button-toggle-group{margin-bottom:0}.conditionGroup__conditions{display:flex;flex-direction:column;gap:8px}.conditionGroup__conditions__condition{display:flex;align-items:flex-start;gap:8px}.conditionGroup__conditions__condition__field{flex:0 0 auto}.conditionGroup__conditions__condition__removeBtn{align-self:center}.conditionGroup__conditions__conditionGroup{margin-left:18px}\n"], dependencies: [{ kind: "component", type: GioElEditorConditionGroupComponent, selector: "gio-el-editor-condition-group", inputs: ["conditionGroupFormGroup", "conditionModels", "nodeLvl"], outputs: ["remove"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i1$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1$1.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i4.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i7$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i7$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i9.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioElEditorTypeBooleanComponent, selector: "gio-el-editor-type-boolean", inputs: ["conditionFormGroup"] }, { kind: "component", type: GioElEditorTypeDateComponent, selector: "gio-el-editor-type-date", inputs: ["conditionFormGroup"] }, { kind: "component", type: GioElEditorTypeStringComponent, selector: "gio-el-editor-type-string", inputs: ["conditionFormGroup"] }, { kind: "component", type: GioElEditorTypeNumberComponent, selector: "gio-el-editor-type-number", inputs: ["conditionFormGroup"] }] }); }
679
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorConditionGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
680
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: GioElEditorConditionGroupComponent, isStandalone: true, selector: "gio-el-editor-condition-group", inputs: { conditionGroupFormGroup: "conditionGroupFormGroup", conditionsModel: "conditionsModel", nodeLvl: "nodeLvl" }, outputs: { remove: "remove" }, host: { properties: { "attr.node-lvl": "this.nodeLvl" } }, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"conditionGroup\" [formGroup]=\"conditionGroupFormGroup\">\n <div class=\"conditionGroup__header\">\n <mat-button-toggle-group\n class=\"gio-button-toggle-group\"\n name=\"condition\"\n aria-label=\"Condition\"\n formControlName=\"condition\"\n [hideSingleSelectionIndicator]=\"true\"\n >\n <mat-button-toggle class=\"mat-button-toggle-group\" value=\"AND\">AND</mat-button-toggle>\n <mat-button-toggle class=\"mat-button-toggle-group\" value=\"OR\">OR</mat-button-toggle>\n </mat-button-toggle-group>\n\n <div class=\"conditionGroup__header__addBtn\">\n <button mat-button [matMenuTriggerFor]=\"addBtn\">\n <mat-icon svgIcon=\"gio:plus\">Add</mat-icon>\n </button>\n <mat-menu #addBtn=\"matMenu\">\n <button mat-menu-item (click)=\"addConditionGroup()\">Add Group</button>\n <button mat-menu-item (click)=\"addCondition()\">Add Condition</button>\n </mat-menu>\n </div>\n\n @if (nodeLvl > 0) {\n <button class=\"conditionGroup__header__removeBtn\" mat-button aria-label=\"Remove Group\" (click)=\"removeConditionGroup()\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n }\n </div>\n\n <div class=\"conditionGroup__conditions\">\n @for (condition of conditionGroupFormGroup.controls.conditions.controls; track conditionIndex; let conditionIndex = $index) {\n @if (isConditionGroupForm(condition)) {\n <gio-el-editor-condition-group\n class=\"conditionGroup__conditions__conditionGroup\"\n [conditionGroupFormGroup]=\"condition\"\n [conditionsModel]=\"conditionsModel\"\n [nodeLvl]=\"nodeLvl + 1\"\n (remove)=\"removeCondition(conditionIndex)\"\n ></gio-el-editor-condition-group>\n } @else {\n <div\n class=\"conditionGroup__conditions__condition\"\n [formGroup]=\"conditionGroupFormGroup.controls.conditions.at(conditionIndex)\"\n [attr.node-lvl]=\"nodeLvl\"\n >\n <mat-form-field class=\"conditionGroup__conditions__condition__field\">\n <mat-label>Field</mat-label>\n <gio-el-field formControlName=\"field\" [conditionsModel]=\"conditionsModel\"></gio-el-field>\n </mat-form-field>\n\n @switch (condition.controls.field.value?.type) {\n @case ('string') {\n <gio-el-editor-type-string [conditionFormGroup]=\"condition\"></gio-el-editor-type-string>\n }\n @case ('boolean') {\n <gio-el-editor-type-boolean [conditionFormGroup]=\"condition\"></gio-el-editor-type-boolean>\n }\n @case ('number') {\n <gio-el-editor-type-number [conditionFormGroup]=\"condition\"></gio-el-editor-type-number>\n }\n @case ('date') {\n <gio-el-editor-type-date [conditionFormGroup]=\"condition\"></gio-el-editor-type-date>\n }\n }\n\n <button\n class=\"conditionGroup__conditions__condition__removeBtn\"\n mat-button\n aria-label=\"Remove Condition\"\n (click)=\"removeCondition(conditionIndex)\"\n >\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".conditionGroup{display:flex;flex-direction:column;gap:8px}.conditionGroup__header{display:flex;flex-direction:row;align-items:center;gap:8px}.conditionGroup__header .gio-button-toggle-group{margin-bottom:0}.conditionGroup__conditions{display:flex;flex-direction:column;justify-content:center;gap:2px}.conditionGroup__conditions__condition{position:relative;display:flex;align-items:flex-start;padding:0 0 0 28px;gap:8px}.conditionGroup__conditions__condition__field{min-width:220px;max-width:440px;flex:auto}.conditionGroup__conditions__condition__removeBtn{align-self:center}.conditionGroup__conditions__condition:before{position:absolute;top:-8px;left:8px;width:1px;height:100%;border-left:2px dashed #a2a5b5;content:\"\"}.conditionGroup__conditions__condition:after{position:absolute;top:32px;left:8px;width:20px;border-top:2px dashed #a2a5b5;content:\"\"}.conditionGroup__conditions__condition:last-child:before{top:-8px;height:40px}.conditionGroup__conditions__conditionGroup{position:relative;display:block;padding:0 0 0 28px}.conditionGroup__conditions__conditionGroup:before{position:absolute;top:-8px;left:8px;width:1px;height:100%;border-left:2px dashed #a2a5b5;content:\"\"}.conditionGroup__conditions__conditionGroup:after{position:absolute;top:20px;left:8px;width:20px;border-top:2px dashed #a2a5b5;content:\"\"}.conditionGroup__conditions__conditionGroup:last-child:before{top:-8px;height:28px}\n"], dependencies: [{ kind: "component", type: GioElEditorConditionGroupComponent, selector: "gio-el-editor-condition-group", inputs: ["conditionGroupFormGroup", "conditionsModel", "nodeLvl"], outputs: ["remove"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i6.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i6.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i4$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i4$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i5$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i5$1.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$1.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: GioIconsModule }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioElEditorTypeBooleanComponent, selector: "gio-el-editor-type-boolean", inputs: ["conditionFormGroup"] }, { kind: "component", type: GioElEditorTypeDateComponent, selector: "gio-el-editor-type-date", inputs: ["conditionFormGroup"] }, { kind: "component", type: GioElEditorTypeStringComponent, selector: "gio-el-editor-type-string", inputs: ["conditionFormGroup"] }, { kind: "component", type: GioElEditorTypeNumberComponent, selector: "gio-el-editor-type-number", inputs: ["conditionFormGroup"] }, { kind: "component", type: GioElFieldComponent, selector: "gio-el-field", inputs: ["conditionsModel", "placeholder", "required"] }] }); }
416
681
  }
417
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorConditionGroupComponent, decorators: [{
682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorConditionGroupComponent, decorators: [{
418
683
  type: Component,
419
684
  args: [{ selector: 'gio-el-editor-condition-group', standalone: true, imports: [
420
685
  CommonModule,
@@ -429,13 +694,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
429
694
  GioElEditorTypeDateComponent,
430
695
  GioElEditorTypeStringComponent,
431
696
  GioElEditorTypeNumberComponent,
432
- ], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"conditionGroup\" [formGroup]=\"conditionGroupFormGroup\">\n <div class=\"conditionGroup__header\">\n <div class=\"conditionGroup__header__conditionField\"></div>\n <mat-button-toggle-group\n class=\"gio-button-toggle-group\"\n name=\"condition\"\n aria-label=\"Condition\"\n formControlName=\"condition\"\n [hideSingleSelectionIndicator]=\"true\"\n >\n <mat-button-toggle class=\"mat-button-toggle-group\" value=\"AND\">AND</mat-button-toggle>\n <mat-button-toggle class=\"mat-button-toggle-group\" value=\"OR\">OR</mat-button-toggle>\n </mat-button-toggle-group>\n\n <div class=\"conditionGroup__header__addBtn\">\n <button mat-button [matMenuTriggerFor]=\"addBtn\">\n <mat-icon svgIcon=\"gio:plus\">Add</mat-icon>\n </button>\n <mat-menu #addBtn=\"matMenu\">\n <button mat-menu-item (click)=\"addConditionGroup()\">Add Group</button>\n <button mat-menu-item (click)=\"addCondition()\">Add Condition</button>\n </mat-menu>\n </div>\n\n @if (nodeLvl > 0) {\n <button class=\"conditionGroup__header__removeBtn\" mat-button aria-label=\"Remove Group\" (click)=\"removeConditionGroup()\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n }\n </div>\n\n <div class=\"conditionGroup__conditions\">\n @for (condition of conditionGroupFormGroup.controls.conditions.controls; track conditionIndex; let conditionIndex = $index) {\n @if (isConditionGroupForm(condition)) {\n <gio-el-editor-condition-group\n class=\"conditionGroup__conditions__conditionGroup\"\n [conditionGroupFormGroup]=\"condition\"\n [conditionModels]=\"conditionModels\"\n [nodeLvl]=\"nodeLvl + 1\"\n (remove)=\"removeCondition(conditionIndex)\"\n ></gio-el-editor-condition-group>\n } @else {\n <div\n class=\"conditionGroup__conditions__condition\"\n [formGroup]=\"conditionGroupFormGroup.controls.conditions.at(conditionIndex)\"\n [attr.node-lvl]=\"nodeLvl\"\n >\n <mat-form-field class=\"conditionGroup__conditions__condition__field\">\n <mat-label>Field</mat-label>\n\n <mat-select formControlName=\"field\" placeholder=\"Select Field\">\n <mat-option *ngFor=\"let field of conditionModels\" [value]=\"field\">{{ field.label }}</mat-option>\n </mat-select>\n </mat-form-field>\n\n @switch (condition.controls.field.value?.type) {\n @case ('string') {\n <gio-el-editor-type-string [conditionFormGroup]=\"condition\"></gio-el-editor-type-string>\n }\n @case ('boolean') {\n <gio-el-editor-type-boolean [conditionFormGroup]=\"condition\"></gio-el-editor-type-boolean>\n }\n @case ('number') {\n <gio-el-editor-type-number [conditionFormGroup]=\"condition\"></gio-el-editor-type-number>\n }\n @case ('date') {\n <gio-el-editor-type-date [conditionFormGroup]=\"condition\"></gio-el-editor-type-date>\n }\n }\n\n <button\n class=\"conditionGroup__conditions__condition__removeBtn\"\n mat-button\n aria-label=\"Remove Condition\"\n (click)=\"removeCondition(conditionIndex)\"\n >\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".conditionGroup{display:flex;flex-direction:column;gap:8px}.conditionGroup__header{display:flex;flex-direction:row;align-items:center;gap:8px}.conditionGroup__header .gio-button-toggle-group{margin-bottom:0}.conditionGroup__conditions{display:flex;flex-direction:column;gap:8px}.conditionGroup__conditions__condition{display:flex;align-items:flex-start;gap:8px}.conditionGroup__conditions__condition__field{flex:0 0 auto}.conditionGroup__conditions__condition__removeBtn{align-self:center}.conditionGroup__conditions__conditionGroup{margin-left:18px}\n"] }]
697
+ GioElFieldComponent,
698
+ ], template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"conditionGroup\" [formGroup]=\"conditionGroupFormGroup\">\n <div class=\"conditionGroup__header\">\n <mat-button-toggle-group\n class=\"gio-button-toggle-group\"\n name=\"condition\"\n aria-label=\"Condition\"\n formControlName=\"condition\"\n [hideSingleSelectionIndicator]=\"true\"\n >\n <mat-button-toggle class=\"mat-button-toggle-group\" value=\"AND\">AND</mat-button-toggle>\n <mat-button-toggle class=\"mat-button-toggle-group\" value=\"OR\">OR</mat-button-toggle>\n </mat-button-toggle-group>\n\n <div class=\"conditionGroup__header__addBtn\">\n <button mat-button [matMenuTriggerFor]=\"addBtn\">\n <mat-icon svgIcon=\"gio:plus\">Add</mat-icon>\n </button>\n <mat-menu #addBtn=\"matMenu\">\n <button mat-menu-item (click)=\"addConditionGroup()\">Add Group</button>\n <button mat-menu-item (click)=\"addCondition()\">Add Condition</button>\n </mat-menu>\n </div>\n\n @if (nodeLvl > 0) {\n <button class=\"conditionGroup__header__removeBtn\" mat-button aria-label=\"Remove Group\" (click)=\"removeConditionGroup()\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n }\n </div>\n\n <div class=\"conditionGroup__conditions\">\n @for (condition of conditionGroupFormGroup.controls.conditions.controls; track conditionIndex; let conditionIndex = $index) {\n @if (isConditionGroupForm(condition)) {\n <gio-el-editor-condition-group\n class=\"conditionGroup__conditions__conditionGroup\"\n [conditionGroupFormGroup]=\"condition\"\n [conditionsModel]=\"conditionsModel\"\n [nodeLvl]=\"nodeLvl + 1\"\n (remove)=\"removeCondition(conditionIndex)\"\n ></gio-el-editor-condition-group>\n } @else {\n <div\n class=\"conditionGroup__conditions__condition\"\n [formGroup]=\"conditionGroupFormGroup.controls.conditions.at(conditionIndex)\"\n [attr.node-lvl]=\"nodeLvl\"\n >\n <mat-form-field class=\"conditionGroup__conditions__condition__field\">\n <mat-label>Field</mat-label>\n <gio-el-field formControlName=\"field\" [conditionsModel]=\"conditionsModel\"></gio-el-field>\n </mat-form-field>\n\n @switch (condition.controls.field.value?.type) {\n @case ('string') {\n <gio-el-editor-type-string [conditionFormGroup]=\"condition\"></gio-el-editor-type-string>\n }\n @case ('boolean') {\n <gio-el-editor-type-boolean [conditionFormGroup]=\"condition\"></gio-el-editor-type-boolean>\n }\n @case ('number') {\n <gio-el-editor-type-number [conditionFormGroup]=\"condition\"></gio-el-editor-type-number>\n }\n @case ('date') {\n <gio-el-editor-type-date [conditionFormGroup]=\"condition\"></gio-el-editor-type-date>\n }\n }\n\n <button\n class=\"conditionGroup__conditions__condition__removeBtn\"\n mat-button\n aria-label=\"Remove Condition\"\n (click)=\"removeCondition(conditionIndex)\"\n >\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".conditionGroup{display:flex;flex-direction:column;gap:8px}.conditionGroup__header{display:flex;flex-direction:row;align-items:center;gap:8px}.conditionGroup__header .gio-button-toggle-group{margin-bottom:0}.conditionGroup__conditions{display:flex;flex-direction:column;justify-content:center;gap:2px}.conditionGroup__conditions__condition{position:relative;display:flex;align-items:flex-start;padding:0 0 0 28px;gap:8px}.conditionGroup__conditions__condition__field{min-width:220px;max-width:440px;flex:auto}.conditionGroup__conditions__condition__removeBtn{align-self:center}.conditionGroup__conditions__condition:before{position:absolute;top:-8px;left:8px;width:1px;height:100%;border-left:2px dashed #a2a5b5;content:\"\"}.conditionGroup__conditions__condition:after{position:absolute;top:32px;left:8px;width:20px;border-top:2px dashed #a2a5b5;content:\"\"}.conditionGroup__conditions__condition:last-child:before{top:-8px;height:40px}.conditionGroup__conditions__conditionGroup{position:relative;display:block;padding:0 0 0 28px}.conditionGroup__conditions__conditionGroup:before{position:absolute;top:-8px;left:8px;width:1px;height:100%;border-left:2px dashed #a2a5b5;content:\"\"}.conditionGroup__conditions__conditionGroup:after{position:absolute;top:20px;left:8px;width:20px;border-top:2px dashed #a2a5b5;content:\"\"}.conditionGroup__conditions__conditionGroup:last-child:before{top:-8px;height:28px}\n"] }]
433
699
  }], propDecorators: { conditionGroupFormGroup: [{
434
700
  type: Input,
435
701
  args: [{
436
702
  required: true,
437
703
  }]
438
- }], conditionModels: [{
704
+ }], conditionsModel: [{
439
705
  type: Input,
440
706
  args: [{
441
707
  required: true,
@@ -481,17 +747,10 @@ class GioElEditorComponent {
481
747
  constructor() {
482
748
  this.destroyRef = inject(DestroyRef);
483
749
  this.conditionsModel = [];
484
- this.conditionsGroupFormArray = new FormArray([]);
750
+ this.elChange = new EventEmitter();
485
751
  this.conditionGroupFormGroup = newConditionGroupFormGroup();
486
- this.fields = [];
487
752
  }
488
753
  ngOnInit() {
489
- for (const conditionModel of this.conditionsModel) {
490
- if (isConditionModel(conditionModel)) {
491
- // TOTO: Impl Deep Tree for conditions Limit to fist Node for fist impl
492
- this.fields.push(conditionModel);
493
- }
494
- }
495
754
  this.conditionGroupFormGroup.valueChanges
496
755
  .pipe(takeUntilDestroyed(this.destroyRef), map(() => this.conditionGroupFormGroup.getRawValue()), map(value => {
497
756
  const toCondition = (conditionValue) => {
@@ -504,7 +763,15 @@ class GioElEditorComponent {
504
763
  isNil(conditionValue.value)) {
505
764
  return null;
506
765
  }
507
- return new Condition(conditionValue.field.field, conditionValue.field.type, conditionValue.operator, conditionValue.value);
766
+ let field = conditionValue.field.field;
767
+ if (conditionValue.field.map) {
768
+ field = {
769
+ field: conditionValue.field.field,
770
+ key1Value: get(conditionValue.field.map, 'key1Value') ?? undefined,
771
+ key2Value: get(conditionValue.field.map, 'key2Value') ?? undefined,
772
+ };
773
+ }
774
+ return new Condition(field, conditionValue.field.type, conditionValue.operator, conditionValue.value);
508
775
  };
509
776
  const toConditionGroup = (conditionGroupValue) => {
510
777
  const conditions = [];
@@ -525,14 +792,15 @@ class GioElEditorComponent {
525
792
  const conditionGroupValue = toConditionGroup(value);
526
793
  if (conditionGroupValue) {
527
794
  this.elOutput = new ExpressionLanguageBuilder(conditionGroupValue).build();
795
+ this.elChange.emit(this.elOutput);
528
796
  }
529
797
  }))
530
798
  .subscribe();
531
799
  }
532
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
533
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.0", type: GioElEditorComponent, isStandalone: true, selector: "gio-el-editor", inputs: { conditionsModel: "conditionsModel" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<gio-el-editor-condition-group\n [conditionGroupFormGroup]=\"conditionGroupFormGroup\"\n [conditionModels]=\"fields\"\n></gio-el-editor-condition-group>\n\n@if (elOutput) {\n <div class=\"elOutput\">\n {{ elOutput }}\n </div>\n}\n", styles: [".conditionGroup{display:flex;flex-direction:column;gap:8px}.conditionGroup__header{display:flex;flex-direction:row;align-items:center;gap:8px}.conditionGroup__conditions{display:flex;flex-direction:column;gap:8px}.condition{display:flex;align-items:flex-start;gap:8px}.condition__removeBtn{align-self:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: GioIconsModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: GioElEditorConditionGroupComponent, selector: "gio-el-editor-condition-group", inputs: ["conditionGroupFormGroup", "conditionModels", "nodeLvl"], outputs: ["remove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
800
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
801
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.11", type: GioElEditorComponent, isStandalone: true, selector: "gio-el-editor", inputs: { conditionsModel: "conditionsModel" }, outputs: { elChange: "elChange" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<gio-el-editor-condition-group\n [conditionGroupFormGroup]=\"conditionGroupFormGroup\"\n [conditionsModel]=\"conditionsModel\"\n></gio-el-editor-condition-group>\n\n@if (elOutput) {\n <div class=\"preview\">\n {{ elOutput }}\n </div>\n}\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.conditionGroup{display:flex;flex-direction:column;gap:8px}.conditionGroup__header{display:flex;flex-direction:row;align-items:center;gap:8px}.conditionGroup__conditions{display:flex;flex-direction:column;gap:8px}.condition{display:flex;align-items:flex-start;gap:8px}.condition__removeBtn{align-self:center}.preview{display:flex;flex-direction:column;align-items:center;padding:8px;border-radius:4px;background-color:#e7e8ef;color:#000}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: GioIconsModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatInputModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: GioElEditorConditionGroupComponent, selector: "gio-el-editor-condition-group", inputs: ["conditionGroupFormGroup", "conditionsModel", "nodeLvl"], outputs: ["remove"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
534
802
  }
535
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: GioElEditorComponent, decorators: [{
803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: GioElEditorComponent, decorators: [{
536
804
  type: Component,
537
805
  args: [{ selector: 'gio-el-editor', standalone: true, imports: [
538
806
  CommonModule,
@@ -549,10 +817,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImpor
549
817
  GioElEditorTypeNumberComponent,
550
818
  GioElEditorTypeDateComponent,
551
819
  GioElEditorConditionGroupComponent,
552
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<gio-el-editor-condition-group\n [conditionGroupFormGroup]=\"conditionGroupFormGroup\"\n [conditionModels]=\"fields\"\n></gio-el-editor-condition-group>\n\n@if (elOutput) {\n <div class=\"elOutput\">\n {{ elOutput }}\n </div>\n}\n", styles: [".conditionGroup{display:flex;flex-direction:column;gap:8px}.conditionGroup__header{display:flex;flex-direction:row;align-items:center;gap:8px}.conditionGroup__conditions{display:flex;flex-direction:column;gap:8px}.condition{display:flex;align-items:flex-start;gap:8px}.condition__removeBtn{align-self:center}\n"] }]
820
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n\n<gio-el-editor-condition-group\n [conditionGroupFormGroup]=\"conditionGroupFormGroup\"\n [conditionsModel]=\"conditionsModel\"\n></gio-el-editor-condition-group>\n\n@if (elOutput) {\n <div class=\"preview\">\n {{ elOutput }}\n </div>\n}\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.conditionGroup{display:flex;flex-direction:column;gap:8px}.conditionGroup__header{display:flex;flex-direction:row;align-items:center;gap:8px}.conditionGroup__conditions{display:flex;flex-direction:column;gap:8px}.condition{display:flex;align-items:flex-start;gap:8px}.condition__removeBtn{align-self:center}.preview{display:flex;flex-direction:column;align-items:center;padding:8px;border-radius:4px;background-color:#e7e8ef;color:#000}\n"] }]
553
821
  }], propDecorators: { conditionsModel: [{
554
822
  type: Input,
555
823
  args: [{ required: true }]
824
+ }], elChange: [{
825
+ type: Output
556
826
  }] } });
557
827
  const newConditionGroupFormGroup = () => {
558
828
  return new FormGroup({
@@ -713,6 +983,56 @@ class GioElEditorTypeDateHarness extends GioElEditorTypeComponentHarness {
713
983
  }
714
984
  }
715
985
 
986
+ /*
987
+ * Copyright (C) 2024 The Gravitee team (http://gravitee.io)
988
+ *
989
+ * Licensed under the Apache License, Version 2.0 (the "License");
990
+ * you may not use this file except in compliance with the License.
991
+ * You may obtain a copy of the License at
992
+ *
993
+ * http://www.apache.org/licenses/LICENSE-2.0
994
+ *
995
+ * Unless required by applicable law or agreed to in writing, software
996
+ * distributed under the License is distributed on an "AS IS" BASIS,
997
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
998
+ * See the License for the specific language governing permissions and
999
+ * limitations under the License.
1000
+ */
1001
+ class GioElFieldHarness extends ComponentHarness {
1002
+ constructor() {
1003
+ super(...arguments);
1004
+ this.getAutocomplete = this.locatorFor(MatAutocompleteHarness.with({ selector: '.fieldSelect' }));
1005
+ this.getKey1Input = this.locatorForOptional(MatInputHarness.with({ selector: '.key1' }));
1006
+ this.getKey2Input = this.locatorForOptional(MatInputHarness.with({ selector: '.key2' }));
1007
+ }
1008
+ static { this.hostSelector = 'gio-el-field'; }
1009
+ static with(options = {}) {
1010
+ return new HarnessPredicate(GioElFieldHarness, options);
1011
+ }
1012
+ async setValue(field, key1, key2) {
1013
+ const autocomplete = await this.getAutocomplete();
1014
+ await autocomplete.focus();
1015
+ await autocomplete.selectOption({ text: new RegExp(`${field}`) });
1016
+ if (key1) {
1017
+ const key1Input = await this.getKey1Input();
1018
+ await key1Input?.setValue(key1);
1019
+ }
1020
+ if (key2) {
1021
+ const key2Input = await this.getKey2Input();
1022
+ await key2Input?.setValue(key2);
1023
+ }
1024
+ }
1025
+ async getValue() {
1026
+ const autocomplete = await this.getAutocomplete();
1027
+ const field = await autocomplete.getValue();
1028
+ const key1Input = await this.getKey1Input();
1029
+ const key1 = await key1Input?.getValue();
1030
+ const key2Input = await this.getKey2Input();
1031
+ const key2 = await key2Input?.getValue();
1032
+ return { field, key1, key2 };
1033
+ }
1034
+ }
1035
+
716
1036
  /*
717
1037
  * Copyright (C) 2024 The Gravitee team (http://gravitee.io)
718
1038
  *
@@ -747,7 +1067,7 @@ class GioElEditorConditionGroupHarness extends ComponentHarness {
747
1067
  };
748
1068
  this.getConditionHarness = async (index) => (await this.getConditionsHarness()).at(index);
749
1069
  this.getConditionTypeHarness = (divHarness) => divHarness.childLocatorForOptional(GioElEditorTypeStringHarness, GioElEditorTypeBooleanHarness, GioElEditorTypeNumberHarness, GioElEditorTypeDateHarness)();
750
- this.getConditionField = (divHarness) => divHarness.childLocatorFor(MatSelectHarness.with({ selector: '[formControlName="field"]' }))();
1070
+ this.getConditionField = (divHarness) => divHarness.childLocatorFor(GioElFieldHarness.with({ selector: '[formControlName="field"]' }))();
751
1071
  }
752
1072
  static { this.hostSelector = 'gio-el-editor-condition-group'; }
753
1073
  static with(options = {}) {
@@ -779,13 +1099,13 @@ class GioElEditorConditionGroupHarness extends ComponentHarness {
779
1099
  }
780
1100
  return toggles[0].check();
781
1101
  }
782
- async selectConditionField(index, field) {
1102
+ async selectConditionField(index, field, key1, key2) {
783
1103
  const conditionDiv = await this.getConditionHarness(index);
784
1104
  if (!conditionDiv || !(conditionDiv instanceof DivHarness)) {
785
1105
  throw new Error(`Condition with index ${index} not found`);
786
1106
  }
787
- const fieldSelect = await this.getConditionField(conditionDiv);
788
- await fieldSelect.clickOptions({ text: field });
1107
+ const conditionField = await this.getConditionField(conditionDiv);
1108
+ await conditionField.setValue(field, key1, key2);
789
1109
  }
790
1110
  async selectConditionOperator(index, operator) {
791
1111
  const conditionDiv = await this.getConditionHarness(index);
@@ -850,7 +1170,7 @@ class GioElEditorConditionGroupHarness extends ComponentHarness {
850
1170
  const conditionField = await this.getConditionField(condition);
851
1171
  const conditionType = await this.getConditionTypeHarness(condition);
852
1172
  return {
853
- field: await conditionField.getValueText(),
1173
+ field: await conditionField.getValue(),
854
1174
  operator: await conditionType?.getOperatorValue(),
855
1175
  value: await conditionType?.getValue(),
856
1176
  };
@@ -883,6 +1203,9 @@ class GioElEditorHarness extends ComponentHarness {
883
1203
  this.getMainConditionGroup = this.locatorFor(GioElEditorConditionGroupHarness);
884
1204
  }
885
1205
  static { this.hostSelector = 'gio-el-editor'; }
1206
+ static with(options = {}) {
1207
+ return new HarnessPredicate(GioElEditorHarness, options);
1208
+ }
886
1209
  }
887
1210
 
888
1211
  /*
@@ -917,6 +1240,22 @@ class GioElEditorHarness extends ComponentHarness {
917
1240
  * limitations under the License.
918
1241
  */
919
1242
 
1243
+ /*
1244
+ * Copyright (C) 2024 The Gravitee team (http://gravitee.io)
1245
+ *
1246
+ * Licensed under the Apache License, Version 2.0 (the "License");
1247
+ * you may not use this file except in compliance with the License.
1248
+ * You may obtain a copy of the License at
1249
+ *
1250
+ * http://www.apache.org/licenses/LICENSE-2.0
1251
+ *
1252
+ * Unless required by applicable law or agreed to in writing, software
1253
+ * distributed under the License is distributed on an "AS IS" BASIS,
1254
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1255
+ * See the License for the specific language governing permissions and
1256
+ * limitations under the License.
1257
+ */
1258
+
920
1259
  /**
921
1260
  * Generated bundle index. Do not edit.
922
1261
  */