@gravitee/ui-particles-angular 7.26.0-fix-light-submenu-title-15b961a → 7.26.0-json-schema-e93b38b

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.
@@ -4,7 +4,7 @@ import * as i0 from '@angular/core';
4
4
  import { Injectable, SecurityContext, APP_ID, Component, Inject, Input, NgModule, EventEmitter, HostBinding, Output, HostListener, Optional, Self, ViewChild, Directive, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, Host, ContentChild, InjectionToken } from '@angular/core';
5
5
  import * as i4 from '@angular/common/http';
6
6
  import { HttpClientModule } from '@angular/common/http';
7
- import { shareReplay, switchMap, catchError, takeUntil, startWith, map, distinctUntilChanged, tap, debounce, delay, filter, take, debounceTime } from 'rxjs/operators';
7
+ import { shareReplay, switchMap, catchError, takeUntil, tap, startWith, map, distinctUntilChanged, debounce, delay, filter, take, debounceTime } from 'rxjs/operators';
8
8
  import { Observable, of, ReplaySubject, Subject, forkJoin, timer, fromEvent, BehaviorSubject, merge } from 'rxjs';
9
9
  import * as i3 from '@angular/platform-browser';
10
10
  import { trigger, transition, style, animate } from '@angular/animations';
@@ -550,6 +550,7 @@ class GioFormTagsInputComponent {
550
550
  this.focused = false;
551
551
  this._required = false;
552
552
  this._disabled = false;
553
+ this.displayValueCache = {};
553
554
  // From ControlValueAccessor interface
554
555
  this.describedBy = '';
555
556
  // Replace the provider from above with this.
@@ -569,6 +570,21 @@ class GioFormTagsInputComponent {
569
570
  this._autocompleteOptions = v;
570
571
  this.initAutocomplete();
571
572
  }
573
+ /**
574
+ * Get the label of an option value.
575
+ * To use with autocompleteOptions label & value mode.
576
+ * Function called each time a tag needs to be displayed id defined.
577
+ */
578
+ set displayValueWith(displayValueWith) {
579
+ this._displayValueWith = (value) => {
580
+ if (this.displayValueCache[value]) {
581
+ return of(this.displayValueCache[value]);
582
+ }
583
+ return displayValueWith(value).pipe(tap(label => {
584
+ this.displayValueCache[value] = label;
585
+ }));
586
+ };
587
+ }
572
588
  set tagInput(v) {
573
589
  this._tagInput = v;
574
590
  this.initAutocomplete();
@@ -689,8 +705,17 @@ class GioFormTagsInputComponent {
689
705
  }
690
706
  initAutocomplete() {
691
707
  if (this._autocompleteOptions && this._tagInput?.nativeElement) {
692
- this.autocompleteFilteredOptions$ = fromEvent(this._tagInput.nativeElement, 'keyup').pipe(startWith([]), map(() => {
693
- return (this._autocompleteOptions ?? []).filter(defaultHeader => defaultHeader.toLowerCase().includes((this._tagInput?.nativeElement.value ?? '').toLowerCase()));
708
+ this.autocompleteFilteredOptions$ = fromEvent(this._tagInput.nativeElement, 'keyup').pipe(startWith([]), switchMap(() => {
709
+ if (typeof this._autocompleteOptions === 'function') {
710
+ return this._autocompleteOptions(this._tagInput?.nativeElement.value ?? '').pipe(map(options => sanitizeAutocompleteOptions(options)),
711
+ // Add options to displayValueCache to avoid call on select
712
+ tap(options => {
713
+ options.forEach(option => {
714
+ this.displayValueCache[option.value] = option.label;
715
+ });
716
+ }));
717
+ }
718
+ return of(defaultAutocompleteFilter(this._autocompleteOptions ?? [], this._tagInput?.nativeElement.value ?? ''));
694
719
  }), distinctUntilChanged());
695
720
  this.changeDetectorRef.detectChanges();
696
721
  }
@@ -698,12 +723,12 @@ class GioFormTagsInputComponent {
698
723
  }
699
724
  GioFormTagsInputComponent.nextId = 0;
700
725
  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 });
701
- 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", placeholder: "placeholder", required: "required", disabled: "disabled" }, host: { properties: { "id": "this.id", "class.floating": "this.shouldLabelFloat", "attr.aria-describedby": "this.describedBy" } }, providers: [
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: [
702
727
  {
703
728
  provide: MatFormFieldControl,
704
729
  useExisting: GioFormTagsInputComponent,
705
730
  },
706
- ], viewQueries: [{ propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }], ngImport: i0, template: "<!--\n\n Copyright (C) 2015 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<mat-chip-list #tagChipList [attr.aria-label]=\"ariaLabel\" multiple [disabled]=\"disabled\">\n <mat-chip *ngFor=\"let tag of value\" [selectable]=\"false\" [removable]=\"!disabled\" (removed)=\"removeChipToFormControl(tag)\">\n {{ tag }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n <input\n *ngIf=\"!disabled\"\n #tagInput\n [matAutocompleteDisabled]=\"!_autocompleteOptions\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\"\n [matChipInputFor]=\"tagChipList\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"onMatChipTokenEnd()\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onAutocompleteSelect($event)\">\n <mat-option *ngFor=\"let value of autocompleteFilteredOptions$ | async\" [value]=\"value\">\n {{ value }}\n </mat-option>\n </mat-autocomplete>\n</mat-chip-list>\n", styles: [""], components: [{ type: i3$1.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i2$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i3$1.MatChipRemove, selector: "[matChipRemove]" }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i3$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }], pipes: { "async": i2$1.AsyncPipe } });
731
+ ], viewQueries: [{ propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }], ngImport: i0, template: "<!--\n\n Copyright (C) 2015 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<mat-chip-list #tagChipList [attr.aria-label]=\"ariaLabel\" multiple [disabled]=\"disabled\">\n <mat-chip *ngFor=\"let tag of value\" [selectable]=\"false\" [removable]=\"!disabled\" (removed)=\"removeChipToFormControl(tag)\">\n {{ _displayValueWith ? (_displayValueWith(tag) | async) : tag }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n <input\n *ngIf=\"!disabled\"\n #tagInput\n [matAutocompleteDisabled]=\"!_autocompleteOptions\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\"\n [matChipInputFor]=\"tagChipList\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"onMatChipTokenEnd()\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onAutocompleteSelect($event)\">\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions$ | async\" [value]=\"option.value\">\n {{ option.label }}\n </mat-option>\n </mat-autocomplete>\n</mat-chip-list>\n", styles: [""], components: [{ type: i3$1.MatChipList, selector: "mat-chip-list", inputs: ["errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { type: i2$3.MatOption, selector: "mat-option", exportAs: ["matOption"] }], directives: [{ type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { type: i3$1.MatChipRemove, selector: "[matChipRemove]" }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { type: i3$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }], pipes: { "async": i2$1.AsyncPipe } });
707
732
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormTagsInputComponent, decorators: [{
708
733
  type: Component,
709
734
  args: [{ selector: 'gio-form-tags-input', providers: [
@@ -711,7 +736,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
711
736
  provide: MatFormFieldControl,
712
737
  useExisting: GioFormTagsInputComponent,
713
738
  },
714
- ], template: "<!--\n\n Copyright (C) 2015 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<mat-chip-list #tagChipList [attr.aria-label]=\"ariaLabel\" multiple [disabled]=\"disabled\">\n <mat-chip *ngFor=\"let tag of value\" [selectable]=\"false\" [removable]=\"!disabled\" (removed)=\"removeChipToFormControl(tag)\">\n {{ tag }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n <input\n *ngIf=\"!disabled\"\n #tagInput\n [matAutocompleteDisabled]=\"!_autocompleteOptions\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\"\n [matChipInputFor]=\"tagChipList\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"onMatChipTokenEnd()\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onAutocompleteSelect($event)\">\n <mat-option *ngFor=\"let value of autocompleteFilteredOptions$ | async\" [value]=\"value\">\n {{ value }}\n </mat-option>\n </mat-autocomplete>\n</mat-chip-list>\n", styles: [""] }]
739
+ ], template: "<!--\n\n Copyright (C) 2015 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<mat-chip-list #tagChipList [attr.aria-label]=\"ariaLabel\" multiple [disabled]=\"disabled\">\n <mat-chip *ngFor=\"let tag of value\" [selectable]=\"false\" [removable]=\"!disabled\" (removed)=\"removeChipToFormControl(tag)\">\n {{ _displayValueWith ? (_displayValueWith(tag) | async) : tag }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip>\n <input\n *ngIf=\"!disabled\"\n #tagInput\n [matAutocompleteDisabled]=\"!_autocompleteOptions\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\"\n [matChipInputFor]=\"tagChipList\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"onMatChipTokenEnd()\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onAutocompleteSelect($event)\">\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions$ | async\" [value]=\"option.value\">\n {{ option.label }}\n </mat-option>\n </mat-autocomplete>\n</mat-chip-list>\n", styles: [""] }]
715
740
  }], ctorParameters: function () { return [{ type: i7.NgControl, decorators: [{
716
741
  type: Optional
717
742
  }, {
@@ -725,6 +750,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
725
750
  type: Input
726
751
  }], autocompleteOptions: [{
727
752
  type: Input
753
+ }], displayValueWith: [{
754
+ type: Input
728
755
  }], tagInput: [{
729
756
  type: ViewChild,
730
757
  args: ['tagInput']
@@ -744,6 +771,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
744
771
  type: HostBinding,
745
772
  args: ['attr.aria-describedby']
746
773
  }] } });
774
+ const defaultAutocompleteFilter = (options, search) => {
775
+ return sanitizeAutocompleteOptions(options).filter(defaultHeader => defaultHeader.label.toLowerCase().includes((search ?? '').toLowerCase()) ||
776
+ defaultHeader.value.toLowerCase().includes((search ?? '').toLowerCase()));
777
+ };
778
+ const sanitizeAutocompleteOptions = (options) => {
779
+ return options.map(option => {
780
+ if (option && typeof option !== 'string' && 'value' in option && 'label' in option) {
781
+ return option;
782
+ }
783
+ return { value: option, label: option };
784
+ });
785
+ };
747
786
 
748
787
  /*
749
788
  * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
@@ -2513,18 +2552,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2513
2552
  class GioSubmenuGroupComponent {
2514
2553
  constructor() {
2515
2554
  this.title = '';
2516
- this.theme = 'dark';
2517
2555
  }
2518
2556
  }
2519
2557
  GioSubmenuGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioSubmenuGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2520
- 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"] });
2558
+ 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"] });
2521
2559
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioSubmenuGroupComponent, decorators: [{
2522
2560
  type: Component,
2523
- 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"] }]
2561
+ 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"] }]
2524
2562
  }], propDecorators: { title: [{
2525
2563
  type: Input
2526
- }], theme: [{
2527
- type: Input
2528
2564
  }] } });
2529
2565
 
2530
2566
  /*
@@ -3150,6 +3186,7 @@ class GioFormlyJsonSchemaService {
3150
3186
  mappedField = this.bannerMap(mappedField, mapSource);
3151
3187
  mappedField = this.toggleMap(mappedField, mapSource);
3152
3188
  mappedField = this.disabledMap(mappedField, mapSource);
3189
+ mappedField = this.enumLabelMap(mappedField, mapSource);
3153
3190
  return mappedField;
3154
3191
  },
3155
3192
  });
@@ -3211,6 +3248,20 @@ class GioFormlyJsonSchemaService {
3211
3248
  };
3212
3249
  return mappedField;
3213
3250
  }
3251
+ enumLabelMap(mappedField, mapSource) {
3252
+ if (mapSource.enum && !isEmpty(mapSource.enum) && mapSource.gioConfig?.enumLabelMap && isArray(mappedField.props?.options)) {
3253
+ mappedField.props = {
3254
+ ...mappedField.props,
3255
+ options: mappedField.props?.options?.map(({ value }) => {
3256
+ return {
3257
+ label: value ? mapSource.gioConfig?.enumLabelMap?.[value] : value,
3258
+ value: value,
3259
+ };
3260
+ }),
3261
+ };
3262
+ }
3263
+ return mappedField;
3264
+ }
3214
3265
  }
3215
3266
  GioFormlyJsonSchemaService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormlyJsonSchemaService, deps: [{ token: i1$3.FormlyJsonschema }, { token: i1$4.FormlyFormBuilder }], target: i0.ɵɵFactoryTarget.Injectable });
3216
3267
  GioFormlyJsonSchemaService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormlyJsonSchemaService });