@gravitee/ui-particles-angular 7.28.1 → 7.28.2-use-autocomplete-options-only-ab5c68b

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.
@@ -539,6 +539,10 @@ class GioFormTagsInputComponent {
539
539
  * called with `true` it will add the tag, otherwise it will just ignore it
540
540
  */
541
541
  this.tagValidationHook = undefined;
542
+ /**
543
+ * Set to true to force the cip to be part of the autocomplete options.
544
+ */
545
+ this.useAutocompleteOptionValueOnly = false;
542
546
  this._tagInput = null;
543
547
  this._value = null;
544
548
  // From ControlValueAccessor interface
@@ -698,6 +702,9 @@ class GioFormTagsInputComponent {
698
702
  this.addChipToFormControl({ value: event.option.value });
699
703
  }
700
704
  onMatChipTokenEnd() {
705
+ if (this.useAutocompleteOptionValueOnly) {
706
+ return;
707
+ }
701
708
  // Give priority to the `onAutocompleteSelect` when validating with the blur event
702
709
  setTimeout(() => {
703
710
  this.addChipToFormControl({ value: this._tagInput?.nativeElement.value ?? '' });
@@ -723,7 +730,7 @@ class GioFormTagsInputComponent {
723
730
  }
724
731
  GioFormTagsInputComponent.nextId = 0;
725
732
  GioFormTagsInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormTagsInputComponent, deps: [{ token: i7.NgControl, optional: true, self: true }, { token: i0.ElementRef }, { token: i2$2.FocusMonitor }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
726
- GioFormTagsInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormTagsInputComponent, selector: "gio-form-tags-input", inputs: { ariaLabel: ["aria-label", "ariaLabel"], addOnBlur: "addOnBlur", tagValidationHook: "tagValidationHook", autocompleteOptions: "autocompleteOptions", displayValueWith: "displayValueWith", placeholder: "placeholder", required: "required", disabled: "disabled" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat", "attr.aria-describedby": "this.describedBy" } }, providers: [
733
+ GioFormTagsInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormTagsInputComponent, selector: "gio-form-tags-input", inputs: { ariaLabel: ["aria-label", "ariaLabel"], addOnBlur: "addOnBlur", tagValidationHook: "tagValidationHook", autocompleteOptions: "autocompleteOptions", displayValueWith: "displayValueWith", useAutocompleteOptionValueOnly: "useAutocompleteOptionValueOnly", placeholder: "placeholder", required: "required", disabled: "disabled" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat", "attr.aria-describedby": "this.describedBy" } }, providers: [
727
734
  {
728
735
  provide: MatFormFieldControl,
729
736
  useExisting: GioFormTagsInputComponent,
@@ -752,6 +759,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
752
759
  type: Input
753
760
  }], displayValueWith: [{
754
761
  type: Input
762
+ }], useAutocompleteOptionValueOnly: [{
763
+ type: Input
755
764
  }], tagInput: [{
756
765
  type: ViewChild,
757
766
  args: ['tagInput']
@@ -2558,15 +2567,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2558
2567
  class GioSubmenuGroupComponent {
2559
2568
  constructor() {
2560
2569
  this.title = '';
2570
+ this.theme = 'dark';
2561
2571
  }
2562
2572
  }
2563
2573
  GioSubmenuGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioSubmenuGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2564
- GioSubmenuGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioSubmenuGroupComponent, selector: "gio-submenu-group", inputs: { title: "title" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2022 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=\"gio-submenu-group\">\n <div class=\"gio-submenu-group__title\">{{ title }}</div>\n <ng-content></ng-content>\n</div>\n", styles: [".gio-submenu-group{display:flex;flex-direction:column;margin-top:8px}.gio-submenu-group__title{height:36px;padding:8px 12px;border-radius:4px;margin:1px 0;color:#8e8f9c;letter-spacing:.4px}\n"] });
2574
+ GioSubmenuGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioSubmenuGroupComponent, selector: "gio-submenu-group", inputs: { title: "title", theme: "theme" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2022 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=\"gio-submenu-group\">\n <div class=\"gio-submenu-group__title\" [class.gio-submenu-group__title__light]=\"theme === 'light'\">{{ title }}</div>\n <ng-content></ng-content>\n</div>\n", styles: [".gio-submenu-group{display:flex;flex-direction:column;margin-top:8px}.gio-submenu-group__title{height:36px;padding:8px 12px;border-radius:4px;margin:1px 0;color:#8e8f9c;letter-spacing:.4px}.gio-submenu-group__title__light{color:#d3d5dc}\n"] });
2565
2575
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioSubmenuGroupComponent, decorators: [{
2566
2576
  type: Component,
2567
- args: [{ selector: 'gio-submenu-group', template: "<!--\n\n Copyright (C) 2022 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=\"gio-submenu-group\">\n <div class=\"gio-submenu-group__title\">{{ title }}</div>\n <ng-content></ng-content>\n</div>\n", styles: [".gio-submenu-group{display:flex;flex-direction:column;margin-top:8px}.gio-submenu-group__title{height:36px;padding:8px 12px;border-radius:4px;margin:1px 0;color:#8e8f9c;letter-spacing:.4px}\n"] }]
2577
+ args: [{ selector: 'gio-submenu-group', template: "<!--\n\n Copyright (C) 2022 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=\"gio-submenu-group\">\n <div class=\"gio-submenu-group__title\" [class.gio-submenu-group__title__light]=\"theme === 'light'\">{{ title }}</div>\n <ng-content></ng-content>\n</div>\n", styles: [".gio-submenu-group{display:flex;flex-direction:column;margin-top:8px}.gio-submenu-group__title{height:36px;padding:8px 12px;border-radius:4px;margin:1px 0;color:#8e8f9c;letter-spacing:.4px}.gio-submenu-group__title__light{color:#d3d5dc}\n"] }]
2568
2578
  }], propDecorators: { title: [{
2569
2579
  type: Input
2580
+ }], theme: [{
2581
+ type: Input
2570
2582
  }] } });
2571
2583
 
2572
2584
  /*