@gravitee/ui-particles-angular 5.9.0-slide-toggle-bfd7539 → 5.10.0-js-toggle-b9bd22d

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 (24) hide show
  1. package/esm2020/lib/gio-form-headers/gio-form-headers.component.mjs +11 -4
  2. package/esm2020/lib/gio-form-json-schema/gio-form-json-schema.component.mjs +10 -33
  3. package/esm2020/lib/gio-form-json-schema/gio-form-json-schema.module.mjs +43 -3
  4. package/esm2020/lib/gio-form-json-schema/gio-formly-json-schema.service.mjs +64 -0
  5. package/esm2020/lib/gio-form-json-schema/model/GioJsonSchema.mjs +22 -2
  6. package/esm2020/lib/gio-form-json-schema/type-component/array-type.component.mjs +57 -25
  7. package/esm2020/lib/gio-form-json-schema/type-component/headers-type.component.mjs +93 -0
  8. package/esm2020/lib/gio-form-json-schema/type-component/multischema-type.component.mjs +6 -5
  9. package/esm2020/lib/gio-form-json-schema/type-component/object-type.component.mjs +11 -7
  10. package/esm2020/lib/gio-form-json-schema/type-component/toggle-type.component.mjs +59 -0
  11. package/fesm2015/gravitee-ui-particles-angular.mjs +457 -191
  12. package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
  13. package/fesm2020/gravitee-ui-particles-angular.mjs +457 -192
  14. package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
  15. package/lib/gio-form-headers/gio-form-headers.component.d.ts +4 -2
  16. package/lib/gio-form-json-schema/gio-form-json-schema.component.d.ts +3 -5
  17. package/lib/gio-form-json-schema/gio-form-json-schema.module.d.ts +14 -8
  18. package/lib/gio-form-json-schema/gio-formly-json-schema.service.d.ts +15 -0
  19. package/lib/gio-form-json-schema/model/GioJsonSchema.d.ts +20 -11
  20. package/lib/gio-form-json-schema/type-component/array-type.component.d.ts +1 -0
  21. package/lib/gio-form-json-schema/type-component/headers-type.component.d.ts +19 -0
  22. package/lib/gio-form-json-schema/type-component/toggle-type.component.d.ts +8 -0
  23. package/package.json +1 -1
  24. package/src/scss/mat-override/mat-table.scss +3 -3
@@ -48,7 +48,9 @@ import * as i1$3 from '@ngx-formly/core/json-schema';
48
48
  import * as i1$4 from '@ngx-formly/core';
49
49
  import { FieldType, FieldArrayType, FieldWrapper, FormlyModule } from '@ngx-formly/core';
50
50
  import { FormlyMaterialModule } from '@ngx-formly/material';
51
- import { MatSlideToggle } from '@angular/material/slide-toggle';
51
+ import * as i3$2 from '@angular/material/slide-toggle';
52
+ import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
53
+ import 'json-schema';
52
54
 
53
55
  /*
54
56
  * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
@@ -1047,6 +1049,11 @@ class GioFormHeadersComponent {
1047
1049
  }
1048
1050
  // From ControlValueAccessor interface
1049
1051
  registerOnChange(fn) {
1052
+ const adaptOutputFn = this.adaptOutputFn;
1053
+ if (adaptOutputFn) {
1054
+ this._onChange = (headers) => fn(adaptOutputFn(headers));
1055
+ return;
1056
+ }
1050
1057
  this._onChange = fn;
1051
1058
  }
1052
1059
  // From ControlValueAccessor interface
@@ -1133,7 +1140,7 @@ class GioFormHeadersComponent {
1133
1140
  }
1134
1141
  }
1135
1142
  GioFormHeadersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormHeadersComponent, deps: [{ token: i2$2.FocusMonitor }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
1136
- GioFormHeadersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormHeadersComponent, selector: "gio-form-headers", host: { properties: { "class.disabled": "this.disabled" } }, providers: [
1143
+ GioFormHeadersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormHeadersComponent, selector: "gio-form-headers", inputs: { adaptOutputFn: "adaptOutputFn" }, host: { properties: { "class.disabled": "this.disabled" } }, providers: [
1137
1144
  {
1138
1145
  provide: NG_VALUE_ACCESSOR,
1139
1146
  useExisting: forwardRef(() => GioFormHeadersComponent),
@@ -1149,7 +1156,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
1149
1156
  multi: true,
1150
1157
  },
1151
1158
  ], 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<table class=\"gio-form-headers__table gio-table-light\" [formGroup]=\"mainForm\">\n <thead>\n <tr>\n <th>KEY</th>\n <th>VALUE</th>\n </tr>\n </thead>\n <tbody formArrayName=\"headers\">\n <tr\n *ngFor=\"let control of headersFormArray.controls; index as headerIndex\"\n class=\"gio-form-headers__table__header-row\"\n [formGroupName]=\"headerIndex\"\n >\n <td class=\"gio-form-headers__table__header-row__td-key\">\n <mat-form-field class=\"gio-form-headers__table__header-row__td-key__field\" [floatLabel]=\"'never'\" appearance=\"standard\">\n <textarea\n formControlName=\"key\"\n matInput\n placeholder=\"Name...\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"1\"\n [matAutocomplete]=\"headerNamesAutocomplete\"\n ></textarea>\n </mat-form-field>\n <mat-autocomplete #headerNamesAutocomplete=\"matAutocomplete\">\n <mat-option *ngFor=\"let headerName of getFilteredHeaderNames(headerIndex, control.value) | async\" [value]=\"headerName\">{{\n headerName\n }}</mat-option>\n </mat-autocomplete>\n </td>\n <td class=\"gio-form-headers__table__header-row__td-value\">\n <mat-form-field class=\"gio-form-headers__table__header-row__td-value__field\" [floatLabel]=\"'never'\" appearance=\"standard\">\n <textarea formControlName=\"value\" matInput placeholder=\"Value...\" cdkTextareaAutosize cdkAutosizeMinRows=\"1\"></textarea>\n </mat-form-field>\n <button\n class=\"gio-form-headers__table__header-row__td-value__button\"\n *ngIf=\"headersFormArray.controls.length - 1 !== headerIndex\"\n mat-icon-button\n aria-label=\"Delete\"\n (click)=\"onDeleteHeader(headerIndex)\"\n >\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;overflow:hidden}.gio-form-headers__table{width:100%}.gio-form-headers__table__header-row__td-key,.gio-form-headers__table__header-row__td-value{position:relative;width:50%}.gio-form-headers__table__header-row__td-key__field,.gio-form-headers__table__header-row__td-value__field{display:flex;overflow:hidden;width:100%;max-height:32px;flex-direction:column;justify-content:center;padding-bottom:0}.gio-form-headers__table__header-row__td-key__field *,.gio-form-headers__table__header-row__td-value__field *{top:0;overflow:hidden;max-height:32px}.gio-form-headers__table__header-row__td-key__field:focus-within,.gio-form-headers__table__header-row__td-value__field:focus-within{z-index:100;height:auto;background-color:#fff}.gio-form-headers__table__header-row__td-key__field:focus-within *,.gio-form-headers__table__header-row__td-value__field:focus-within *{max-height:none}.gio-form-headers__table__header-row__td-key__button,.gio-form-headers__table__header-row__td-value__button{position:absolute;top:3px;right:3px;display:none}.gio-form-headers__table__header-row__td-remove{width:32px;height:32px;padding:0}.gio-form-headers__table__header-row:hover .gio-form-headers__table__header-row__td-value__button{z-index:110;display:block;background-color:#fff;opacity:.9}::ng-deep gio-form-headers .gio-form-headers__table__header-row .mat-form-field-infix{width:inherit}\n"] }]
1152
- }], ctorParameters: function () { return [{ type: i2$2.FocusMonitor }, { type: i0.ElementRef }]; }, propDecorators: { disabled: [{
1159
+ }], ctorParameters: function () { return [{ type: i2$2.FocusMonitor }, { type: i0.ElementRef }]; }, propDecorators: { adaptOutputFn: [{
1160
+ type: Input
1161
+ }], disabled: [{
1153
1162
  type: HostBinding,
1154
1163
  args: ['class.disabled']
1155
1164
  }] } });
@@ -2744,9 +2753,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2744
2753
  * See the License for the specific language governing permissions and
2745
2754
  * limitations under the License.
2746
2755
  */
2747
- class GioFormJsonSchemaComponent {
2748
- constructor(formlyJsonschema, elRef, fm, ngControl) {
2756
+ class GioFormlyJsonSchemaService {
2757
+ constructor(formlyJsonschema, builder) {
2749
2758
  this.formlyJsonschema = formlyJsonschema;
2759
+ this.builder = builder;
2760
+ }
2761
+ toFormlyFieldConfig(jsonSchema) {
2762
+ return this.formlyJsonschema.toFieldConfig(jsonSchema, {
2763
+ map: (mappedField, mapSource) => {
2764
+ mappedField = this.uiTypeMap(mappedField, mapSource);
2765
+ mappedField = this.bannerMap(mappedField, mapSource);
2766
+ mappedField = this.toggleMap(mappedField, mapSource);
2767
+ return mappedField;
2768
+ },
2769
+ });
2770
+ }
2771
+ uiTypeMap(mappedField, mapSource) {
2772
+ var _a, _b;
2773
+ mappedField.type = (_b = (_a = mapSource.gioConfig) === null || _a === void 0 ? void 0 : _a.uiType) !== null && _b !== void 0 ? _b : mappedField.type;
2774
+ return mappedField;
2775
+ }
2776
+ bannerMap(mappedField, mapSource) {
2777
+ var _a;
2778
+ mappedField.props = Object.assign(Object.assign({}, mappedField.props), (((_a = mapSource.gioConfig) === null || _a === void 0 ? void 0 : _a.banner) ? getBannerProperties(mapSource.gioConfig.banner) : {}));
2779
+ return mappedField;
2780
+ }
2781
+ toggleMap(mappedField, mapSource) {
2782
+ if (mapSource.type === 'boolean') {
2783
+ mappedField.type = 'toggle';
2784
+ }
2785
+ return mappedField;
2786
+ }
2787
+ }
2788
+ 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 });
2789
+ GioFormlyJsonSchemaService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormlyJsonSchemaService });
2790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormlyJsonSchemaService, decorators: [{
2791
+ type: Injectable
2792
+ }], ctorParameters: function () { return [{ type: i1$3.FormlyJsonschema }, { type: i1$4.FormlyFormBuilder }]; } });
2793
+ const getBannerProperties = (banner) => {
2794
+ return {
2795
+ bannerText: banner.text,
2796
+ bannerTitle: 'title' in banner ? banner.title : undefined,
2797
+ };
2798
+ };
2799
+
2800
+ /*
2801
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
2802
+ *
2803
+ * Licensed under the Apache License, Version 2.0 (the "License");
2804
+ * you may not use this file except in compliance with the License.
2805
+ * You may obtain a copy of the License at
2806
+ *
2807
+ * http://www.apache.org/licenses/LICENSE-2.0
2808
+ *
2809
+ * Unless required by applicable law or agreed to in writing, software
2810
+ * distributed under the License is distributed on an "AS IS" BASIS,
2811
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2812
+ * See the License for the specific language governing permissions and
2813
+ * limitations under the License.
2814
+ */
2815
+ class GioFormJsonSchemaComponent {
2816
+ constructor(gioFormlyJsonSchema, elRef, fm, ngControl) {
2817
+ this.gioFormlyJsonSchema = gioFormlyJsonSchema;
2750
2818
  this.elRef = elRef;
2751
2819
  this.fm = fm;
2752
2820
  this.ngControl = ngControl;
@@ -2773,7 +2841,7 @@ class GioFormJsonSchemaComponent {
2773
2841
  }
2774
2842
  set jsonSchema(jsonSchema) {
2775
2843
  if (isObject(jsonSchema)) {
2776
- this.fields = [this.toFormlyFieldConfig(jsonSchema)];
2844
+ this.fields = [this.gioFormlyJsonSchema.toFormlyFieldConfig(jsonSchema)];
2777
2845
  }
2778
2846
  }
2779
2847
  ngOnInit() {
@@ -2816,35 +2884,14 @@ class GioFormJsonSchemaComponent {
2816
2884
  setDisabledState(_isDisabled) {
2817
2885
  throw new Error('Method not implemented.');
2818
2886
  }
2819
- toFormlyFieldConfig(jsonSchema) {
2820
- return this.formlyJsonschema.toFieldConfig(jsonSchema, {
2821
- map: (mappedField, mapSource) => {
2822
- var _a;
2823
- // Casting fields into our specific type
2824
- const gioMapSource = mapSource;
2825
- mappedField.props = Object.assign(Object.assign({}, mappedField.props), (((_a = gioMapSource.gioConfig) === null || _a === void 0 ? void 0 : _a.banner) ? this.getBannerProperties(gioMapSource.gioConfig.banner) : {}));
2826
- return mappedField;
2827
- },
2828
- });
2829
- }
2830
- getBannerProperties(banner) {
2831
- return {
2832
- bannerText: banner.text,
2833
- bannerTitle: 'title' in banner ? banner.title : undefined,
2834
- };
2835
- }
2836
2887
  }
2837
- GioFormJsonSchemaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaComponent, deps: [{ token: i1$3.FormlyJsonschema }, { token: i0.ElementRef }, { token: i2$2.FocusMonitor }, { token: i7.NgControl, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2838
- GioFormJsonSchemaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormJsonSchemaComponent, selector: "gio-form-json-schema", inputs: { jsonSchema: "jsonSchema", options: "options" }, ngImport: i0, template: `<formly-form *ngIf="formGroup" [fields]="fields" [options]="options" [form]="formGroup" [model]="model"></formly-form>`, isInline: true, components: [{ type: i1$4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2888
+ GioFormJsonSchemaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaComponent, deps: [{ token: GioFormlyJsonSchemaService }, { token: i0.ElementRef }, { token: i2$2.FocusMonitor }, { token: i7.NgControl, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Component });
2889
+ GioFormJsonSchemaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormJsonSchemaComponent, selector: "gio-form-json-schema", inputs: { jsonSchema: "jsonSchema", options: "options" }, ngImport: i0, template: `<formly-form *ngIf="formGroup" [fields]="fields" [options]="options" [form]="formGroup" [model]="model"></formly-form>`, isInline: true, styles: ["::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-outline:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)){padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-outline:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)) .mat-form-field-wrapper{padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-fill:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)){padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-fill:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)) .mat-form-field-wrapper{margin-bottom:-1.34375em}\n"], components: [{ type: i1$4.FormlyForm, selector: "formly-form", inputs: ["form", "model", "fields", "options"], outputs: ["modelChange"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2839
2890
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaComponent, decorators: [{
2840
2891
  type: Component,
2841
- args: [{
2842
- selector: 'gio-form-json-schema',
2843
- template: `<formly-form *ngIf="formGroup" [fields]="fields" [options]="options" [form]="formGroup" [model]="model"></formly-form>`,
2844
- changeDetection: ChangeDetectionStrategy.OnPush,
2845
- }]
2892
+ args: [{ selector: 'gio-form-json-schema', template: `<formly-form *ngIf="formGroup" [fields]="fields" [options]="options" [form]="formGroup" [model]="model"></formly-form>`, styles: ["::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-outline:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)){padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-outline:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)) .mat-form-field-wrapper{padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-fill:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)){padding-bottom:0}::ng-deep gio-form-json-schema .mat-form-field.mat-form-field-appearance-fill:not(::ng-deep :has(mat-hint),::ng-deep :has(mat-error)) .mat-form-field-wrapper{margin-bottom:-1.34375em}\n"] }]
2846
2893
  }], ctorParameters: function () {
2847
- return [{ type: i1$3.FormlyJsonschema }, { type: i0.ElementRef }, { type: i2$2.FocusMonitor }, { type: i7.NgControl, decorators: [{
2894
+ return [{ type: GioFormlyJsonSchemaService }, { type: i0.ElementRef }, { type: i2$2.FocusMonitor }, { type: i7.NgControl, decorators: [{
2848
2895
  type: Host
2849
2896
  }, {
2850
2897
  type: Optional
@@ -2855,6 +2902,147 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2855
2902
  type: Input
2856
2903
  }] } });
2857
2904
 
2905
+ /*
2906
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
2907
+ *
2908
+ * Licensed under the Apache License, Version 2.0 (the "License");
2909
+ * you may not use this file except in compliance with the License.
2910
+ * You may obtain a copy of the License at
2911
+ *
2912
+ * http://www.apache.org/licenses/LICENSE-2.0
2913
+ *
2914
+ * Unless required by applicable law or agreed to in writing, software
2915
+ * distributed under the License is distributed on an "AS IS" BASIS,
2916
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2917
+ * See the License for the specific language governing permissions and
2918
+ * limitations under the License.
2919
+ */
2920
+ class GioFormLabelComponent {
2921
+ }
2922
+ GioFormLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2923
+ GioFormLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormLabelComponent, selector: "gio-form-label", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
2924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormLabelComponent, decorators: [{
2925
+ type: Component,
2926
+ args: [{
2927
+ selector: 'gio-form-label',
2928
+ template: `<ng-content></ng-content>`,
2929
+ }]
2930
+ }] });
2931
+ class GioFormPrefixDirective {
2932
+ }
2933
+ GioFormPrefixDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2934
+ GioFormPrefixDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormPrefixDirective, selector: "[gioFormPrefix]", ngImport: i0 });
2935
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormPrefixDirective, decorators: [{
2936
+ type: Directive,
2937
+ args: [{
2938
+ selector: '[gioFormPrefix]',
2939
+ }]
2940
+ }] });
2941
+ class GioFormSlideToggleDirective {
2942
+ }
2943
+ GioFormSlideToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
2944
+ GioFormSlideToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormSlideToggleDirective, selector: "[gioFormSlideToggle]", ngImport: i0 });
2945
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleDirective, decorators: [{
2946
+ type: Directive,
2947
+ args: [{
2948
+ selector: '[gioFormSlideToggle]',
2949
+ }]
2950
+ }] });
2951
+
2952
+ /*
2953
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
2954
+ *
2955
+ * Licensed under the Apache License, Version 2.0 (the "License");
2956
+ * you may not use this file except in compliance with the License.
2957
+ * You may obtain a copy of the License at
2958
+ *
2959
+ * http://www.apache.org/licenses/LICENSE-2.0
2960
+ *
2961
+ * Unless required by applicable law or agreed to in writing, software
2962
+ * distributed under the License is distributed on an "AS IS" BASIS,
2963
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2964
+ * See the License for the specific language governing permissions and
2965
+ * limitations under the License.
2966
+ */
2967
+ class GioFormSlideToggleComponent {
2968
+ constructor() {
2969
+ this.unsubscribe$ = new Subject();
2970
+ this.appearance = 'outline';
2971
+ this.innerMatSlideToggle = null;
2972
+ this.innerFormControlName = null;
2973
+ this.disabled = false;
2974
+ }
2975
+ ngAfterContentInit() {
2976
+ var _a;
2977
+ let isDisabled$ = undefined;
2978
+ // Check if disabled is delegated to inner FormControlName
2979
+ if (this.innerFormControlName) {
2980
+ isDisabled$ = (_a = this.innerFormControlName.statusChanges) === null || _a === void 0 ? void 0 : _a.pipe(map(() => { var _a; return !!((_a = this.innerFormControlName) === null || _a === void 0 ? void 0 : _a.disabled); }), startWith(!!this.innerFormControlName.disabled));
2981
+ }
2982
+ // If not, check state of inner MatSlideToggle
2983
+ else if (this.innerMatSlideToggle) {
2984
+ isDisabled$ = this.innerMatSlideToggle.change.pipe(map(event => event.source.disabled), startWith(this.innerMatSlideToggle.disabled));
2985
+ }
2986
+ if (isDisabled$) {
2987
+ isDisabled$.pipe(takeUntil(this.unsubscribe$)).subscribe(disabled => {
2988
+ this.disabled = disabled;
2989
+ });
2990
+ }
2991
+ }
2992
+ ngOnDestroy() {
2993
+ this.unsubscribe$.next();
2994
+ this.unsubscribe$.complete();
2995
+ }
2996
+ }
2997
+ GioFormSlideToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2998
+ GioFormSlideToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormSlideToggleComponent, selector: "gio-form-slide-toggle", inputs: { appearance: "appearance" }, queries: [{ propertyName: "innerMatSlideToggle", first: true, predicate: MatSlideToggle, descendants: true }, { propertyName: "innerFormControlName", first: true, predicate: NgControl, 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<div\n class=\"form-slide-toggle\"\n [class.appearance-standard]=\"appearance === 'standard'\"\n [class.appearance-fill]=\"appearance === 'fill'\"\n [class.appearance-outline]=\"appearance === 'outline'\"\n>\n <div class=\"form-slide-toggle__icon\">\n <ng-content select=\"[gioFormPrefix]\"></ng-content>\n </div>\n <div class=\"form-slide-toggle__field\">\n <div class=\"form-slide-toggle__field__mat-slide-toggle\">\n <ng-content select=\"[gioFormSlideToggle]\"></ng-content>\n </div>\n <div class=\"form-slide-toggle__field__text\" [class.disabled]=\"disabled\">\n <span class=\"form-slide-toggle__field__text__label-1\">\n <ng-content select=\"gio-form-label\"></ng-content>\n </span>\n <span class=\"form-slide-toggle__field__text__label-2\">\n <ng-content></ng-content>\n </span>\n </div>\n </div>\n</div>\n", styles: [":host{display:inline-block;padding:4px 0}::ng-deep gio-form-slide-toggle div.form-slide-toggle__icon .mat-icon{font-size:150%;line-height:1.125}.form-slide-toggle{display:flex;min-height:60px;align-items:center}.form-slide-toggle.appearance-fill,.form-slide-toggle.appearance-outline{padding:0 .75em}.form-slide-toggle__icon{padding-right:8px}.form-slide-toggle__icon:empty{display:none}.form-slide-toggle__field{display:flex;min-width:180px;flex:1 1 auto;flex-direction:row;align-items:center;justify-content:flex-start}.form-slide-toggle__field__text{display:flex;flex:1 1 100%;flex-direction:column;padding-left:14px}.form-slide-toggle__field__text__label-1{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.form-slide-toggle__field__text__label-2{font:400 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.form-slide-toggle__field__text.disabled{color:#00000061}\n"] });
2999
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleComponent, decorators: [{
3000
+ type: Component,
3001
+ args: [{ selector: 'gio-form-slide-toggle', 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<div\n class=\"form-slide-toggle\"\n [class.appearance-standard]=\"appearance === 'standard'\"\n [class.appearance-fill]=\"appearance === 'fill'\"\n [class.appearance-outline]=\"appearance === 'outline'\"\n>\n <div class=\"form-slide-toggle__icon\">\n <ng-content select=\"[gioFormPrefix]\"></ng-content>\n </div>\n <div class=\"form-slide-toggle__field\">\n <div class=\"form-slide-toggle__field__mat-slide-toggle\">\n <ng-content select=\"[gioFormSlideToggle]\"></ng-content>\n </div>\n <div class=\"form-slide-toggle__field__text\" [class.disabled]=\"disabled\">\n <span class=\"form-slide-toggle__field__text__label-1\">\n <ng-content select=\"gio-form-label\"></ng-content>\n </span>\n <span class=\"form-slide-toggle__field__text__label-2\">\n <ng-content></ng-content>\n </span>\n </div>\n </div>\n</div>\n", styles: [":host{display:inline-block;padding:4px 0}::ng-deep gio-form-slide-toggle div.form-slide-toggle__icon .mat-icon{font-size:150%;line-height:1.125}.form-slide-toggle{display:flex;min-height:60px;align-items:center}.form-slide-toggle.appearance-fill,.form-slide-toggle.appearance-outline{padding:0 .75em}.form-slide-toggle__icon{padding-right:8px}.form-slide-toggle__icon:empty{display:none}.form-slide-toggle__field{display:flex;min-width:180px;flex:1 1 auto;flex-direction:row;align-items:center;justify-content:flex-start}.form-slide-toggle__field__text{display:flex;flex:1 1 100%;flex-direction:column;padding-left:14px}.form-slide-toggle__field__text__label-1{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.form-slide-toggle__field__text__label-2{font:400 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.form-slide-toggle__field__text.disabled{color:#00000061}\n"] }]
3002
+ }], propDecorators: { appearance: [{
3003
+ type: Input
3004
+ }], innerMatSlideToggle: [{
3005
+ type: ContentChild,
3006
+ args: [MatSlideToggle, {
3007
+ static: false,
3008
+ }]
3009
+ }], innerFormControlName: [{
3010
+ type: ContentChild,
3011
+ args: [NgControl, {
3012
+ static: false,
3013
+ }]
3014
+ }] } });
3015
+
3016
+ /*
3017
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3018
+ *
3019
+ * Licensed under the Apache License, Version 2.0 (the "License");
3020
+ * you may not use this file except in compliance with the License.
3021
+ * You may obtain a copy of the License at
3022
+ *
3023
+ * http://www.apache.org/licenses/LICENSE-2.0
3024
+ *
3025
+ * Unless required by applicable law or agreed to in writing, software
3026
+ * distributed under the License is distributed on an "AS IS" BASIS,
3027
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3028
+ * See the License for the specific language governing permissions and
3029
+ * limitations under the License.
3030
+ */
3031
+ class GioFormSlideToggleModule {
3032
+ }
3033
+ GioFormSlideToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3034
+ GioFormSlideToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, declarations: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective], imports: [CommonModule], exports: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective] });
3035
+ GioFormSlideToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, imports: [[CommonModule]] });
3036
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, decorators: [{
3037
+ type: NgModule,
3038
+ args: [{
3039
+ imports: [CommonModule],
3040
+ declarations: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective],
3041
+ exports: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective],
3042
+ entryComponents: [GioFormSlideToggleComponent],
3043
+ }]
3044
+ }] });
3045
+
2858
3046
  /*
2859
3047
  * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
2860
3048
  *
@@ -2910,24 +3098,28 @@ GioFjsObjectTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
2910
3098
  <div class="wrapper">
2911
3099
  <div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
2912
3100
  <p *ngIf="to.description">{{ to.description }}</p>
2913
- <div class="alert alert-danger" role="alert" *ngIf="showError && formControl.errors">
3101
+ <div class="wrapper__error" *ngIf="showError && formControl.errors">
2914
3102
  <formly-validation-message [field]="field"></formly-validation-message>
2915
3103
  </div>
2916
- <formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
3104
+ <div class="wrapper__fields">
3105
+ <formly-field *ngFor="let f of field.fieldGroup" class="wrapper__fields__field" [field]="f"></formly-field>
3106
+ </div>
2917
3107
  </div>
2918
- `, isInline: true, styles: [".wrapper{display:flex;flex-direction:column;padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:16px}.wrapper:empty{display:none}.wrapper formly-field+formly-field{margin-top:8px}\n"], components: [{ type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3108
+ `, isInline: true, styles: [".wrapper{display:flex;flex-direction:column}.wrapper__title{font:600 18px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:16px}.wrapper:empty{display:none}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}.wrapper__fields{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__fields:empty{display:none}.wrapper__fields__field:empty{display:none}.wrapper__fields__field+.wrapper__fields__field:not(:empty){display:block;margin-top:8px}\n"], components: [{ type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
2919
3109
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsObjectTypeComponent, decorators: [{
2920
3110
  type: Component,
2921
3111
  args: [{ selector: 'gio-fjs-object-type', template: `
2922
3112
  <div class="wrapper">
2923
3113
  <div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
2924
3114
  <p *ngIf="to.description">{{ to.description }}</p>
2925
- <div class="alert alert-danger" role="alert" *ngIf="showError && formControl.errors">
3115
+ <div class="wrapper__error" *ngIf="showError && formControl.errors">
2926
3116
  <formly-validation-message [field]="field"></formly-validation-message>
2927
3117
  </div>
2928
- <formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
3118
+ <div class="wrapper__fields">
3119
+ <formly-field *ngFor="let f of field.fieldGroup" class="wrapper__fields__field" [field]="f"></formly-field>
3120
+ </div>
2929
3121
  </div>
2930
- `, styles: [".wrapper{display:flex;flex-direction:column;padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:16px}.wrapper:empty{display:none}.wrapper formly-field+formly-field{margin-top:8px}\n"] }]
3122
+ `, styles: [".wrapper{display:flex;flex-direction:column}.wrapper__title{font:600 18px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:16px}.wrapper:empty{display:none}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}.wrapper__fields{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__fields:empty{display:none}.wrapper__fields__field:empty{display:none}.wrapper__fields__field+.wrapper__fields__field:not(:empty){display:block;margin-top:8px}\n"] }]
2931
3123
  }] });
2932
3124
 
2933
3125
  /*
@@ -2946,52 +3138,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
2946
3138
  * limitations under the License.
2947
3139
  */
2948
3140
  class GioFjsArrayTypeComponent extends FieldArrayType {
3141
+ constructor() {
3142
+ super(...arguments);
3143
+ this.collapse = false;
3144
+ }
2949
3145
  }
2950
3146
  GioFjsArrayTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
2951
3147
  GioFjsArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFjsArrayTypeComponent, selector: "gio-fjs-array-type", usesInheritance: true, ngImport: i0, template: `
2952
3148
  <div class="wrapper">
2953
- <div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
2954
- <p *ngIf="to.description">{{ to.description }}</p>
3149
+ <div class="wrapper__header">
3150
+ <div class="wrapper__header__text">
3151
+ <div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
3152
+ <p *ngIf="to.description">{{ to.description }}</p>
3153
+ </div>
3154
+ <div class="wrapper__header__collapse">
3155
+ <button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
3156
+ <mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
3157
+ </button>
3158
+ </div>
3159
+ </div>
2955
3160
 
2956
- <div class="alert alert-danger" role="alert" *ngIf="showError && formControl.errors">
3161
+ <div class="wrapper__error" *ngIf="showError && formControl.errors">
2957
3162
  <formly-validation-message [field]="field"></formly-validation-message>
2958
3163
  </div>
2959
3164
 
2960
- <div *ngFor="let field of field.fieldGroup; let i = index" class="row">
2961
- <formly-field [field]="field"></formly-field>
2962
- <div>
2963
- <button class="btn btn-danger" type="button" (click)="remove(i)">-</button>
3165
+ <div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
3166
+ <div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
3167
+ <formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
3168
+ <div class="wrapper__rows__row__remove">
3169
+ <button type="button" mat-icon-button aria-label="Remove" (click)="remove(i)">
3170
+ <mat-icon svgIcon="gio:cancel"></mat-icon>
3171
+ </button>
3172
+ </div>
2964
3173
  </div>
2965
- </div>
2966
3174
 
2967
- <div>
2968
- <button class="btn btn-primary" type="button" (click)="add()">+</button>
3175
+ <div>
3176
+ <button type="button" mat-stroked-button aria-label="Add" (click)="add()"><mat-icon svgIcon="gio:plus"></mat-icon> Add</button>
3177
+ </div>
2969
3178
  </div>
2970
3179
  </div>
2971
- `, isInline: true, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:16px}.wrapper:empty{display:none}.wrapper formly-field+formly-field{display:block;margin-top:8px}\n"], components: [{ type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3180
+ `, isInline: true, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper:empty{display:none}.wrapper__header{display:flex}.wrapper__header__text{flex:1 1 auto}.wrapper__header__text__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:8px}.wrapper__header__collapse{flex:0 0 auto}.wrapper__header__collapse .collapse-open{transform:rotate(180deg);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__header__collapse .collapse-close{transform:rotate(0);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}.wrapper__rows__row{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.wrapper__rows__row+.wrapper__rows__row{padding-top:3px;border-top:1px solid #d3d5dc;margin-top:4px}.wrapper__rows__row__field{flex:1 1 auto}.wrapper__rows__row__remove{flex:0 0 auto}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
2972
3181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsArrayTypeComponent, decorators: [{
2973
3182
  type: Component,
2974
3183
  args: [{ selector: 'gio-fjs-array-type', template: `
2975
3184
  <div class="wrapper">
2976
- <div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
2977
- <p *ngIf="to.description">{{ to.description }}</p>
3185
+ <div class="wrapper__header">
3186
+ <div class="wrapper__header__text">
3187
+ <div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
3188
+ <p *ngIf="to.description">{{ to.description }}</p>
3189
+ </div>
3190
+ <div class="wrapper__header__collapse">
3191
+ <button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
3192
+ <mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
3193
+ </button>
3194
+ </div>
3195
+ </div>
2978
3196
 
2979
- <div class="alert alert-danger" role="alert" *ngIf="showError && formControl.errors">
3197
+ <div class="wrapper__error" *ngIf="showError && formControl.errors">
2980
3198
  <formly-validation-message [field]="field"></formly-validation-message>
2981
3199
  </div>
2982
3200
 
2983
- <div *ngFor="let field of field.fieldGroup; let i = index" class="row">
2984
- <formly-field [field]="field"></formly-field>
2985
- <div>
2986
- <button class="btn btn-danger" type="button" (click)="remove(i)">-</button>
3201
+ <div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
3202
+ <div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
3203
+ <formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
3204
+ <div class="wrapper__rows__row__remove">
3205
+ <button type="button" mat-icon-button aria-label="Remove" (click)="remove(i)">
3206
+ <mat-icon svgIcon="gio:cancel"></mat-icon>
3207
+ </button>
3208
+ </div>
2987
3209
  </div>
2988
- </div>
2989
3210
 
2990
- <div>
2991
- <button class="btn btn-primary" type="button" (click)="add()">+</button>
3211
+ <div>
3212
+ <button type="button" mat-stroked-button aria-label="Add" (click)="add()"><mat-icon svgIcon="gio:plus"></mat-icon> Add</button>
3213
+ </div>
2992
3214
  </div>
2993
3215
  </div>
2994
- `, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:16px}.wrapper:empty{display:none}.wrapper formly-field+formly-field{display:block;margin-top:8px}\n"] }]
3216
+ `, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper:empty{display:none}.wrapper__header{display:flex}.wrapper__header__text{flex:1 1 auto}.wrapper__header__text__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:8px}.wrapper__header__collapse{flex:0 0 auto}.wrapper__header__collapse .collapse-open{transform:rotate(180deg);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__header__collapse .collapse-close{transform:rotate(0);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}.wrapper__rows__row{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.wrapper__rows__row+.wrapper__rows__row{padding-top:3px;border-top:1px solid #d3d5dc;margin-top:4px}.wrapper__rows__row__field{flex:1 1 auto}.wrapper__rows__row__remove{flex:0 0 auto}\n"] }]
2995
3217
  }] });
2996
3218
 
2997
3219
  function minItemsValidationMessage(error, field) {
@@ -3090,6 +3312,7 @@ function bannerExtension(field) {
3090
3312
  class GioFjsMultiSchemaTypeComponent extends FieldType {
3091
3313
  ngOnInit() {
3092
3314
  set(this.field, 'fieldGroup[0].props.appearance', 'fill');
3315
+ set(this.field, 'fieldGroup[0].props.label', 'Select option');
3093
3316
  }
3094
3317
  }
3095
3318
  GioFjsMultiSchemaTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsMultiSchemaTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
@@ -3097,24 +3320,159 @@ GioFjsMultiSchemaTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
3097
3320
  <div class="wrapper">
3098
3321
  <div class="wrapper__title" *ngIf="props.label">{{ props.label }}</div>
3099
3322
  <p *ngIf="props.description">{{ props.description }}</p>
3100
- <div role="alert" *ngIf="showError && formControl.errors">
3323
+ <div class="wrapper__error" *ngIf="showError && formControl.errors">
3101
3324
  <formly-validation-message [field]="field"></formly-validation-message>
3102
3325
  </div>
3103
3326
  <formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
3104
3327
  </div>
3105
- `, isInline: true, styles: ["::ng-deep gio-fjs-multi-schema-type div.wrapper formly-field:first-child mat-form-field{padding-bottom:0}.wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__title{font-size:16px;font-weight:500;letter-spacing:.4px;line-height:24px;margin-bottom:4px}.wrapper:empty{display:none}\n"], components: [{ type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3328
+ `, isInline: true, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__title{font-size:16px;font-weight:500;line-height:24px;font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:4px}.wrapper:empty{display:none}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"], components: [{ type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: i1$4.FormlyField, selector: "formly-field", inputs: ["field"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3106
3329
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsMultiSchemaTypeComponent, decorators: [{
3107
3330
  type: Component,
3108
3331
  args: [{ selector: 'gio-fjs-multi-schema-type', template: `
3109
3332
  <div class="wrapper">
3110
3333
  <div class="wrapper__title" *ngIf="props.label">{{ props.label }}</div>
3111
3334
  <p *ngIf="props.description">{{ props.description }}</p>
3112
- <div role="alert" *ngIf="showError && formControl.errors">
3335
+ <div class="wrapper__error" *ngIf="showError && formControl.errors">
3113
3336
  <formly-validation-message [field]="field"></formly-validation-message>
3114
3337
  </div>
3115
3338
  <formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
3116
3339
  </div>
3117
- `, styles: ["::ng-deep gio-fjs-multi-schema-type div.wrapper formly-field:first-child mat-form-field{padding-bottom:0}.wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__title{font-size:16px;font-weight:500;letter-spacing:.4px;line-height:24px;margin-bottom:4px}.wrapper:empty{display:none}\n"] }]
3340
+ `, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__title{font-size:16px;font-weight:500;line-height:24px;font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:4px}.wrapper:empty{display:none}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"] }]
3341
+ }] });
3342
+
3343
+ /*
3344
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
3345
+ *
3346
+ * Licensed under the Apache License, Version 2.0 (the "License");
3347
+ * you may not use this file except in compliance with the License.
3348
+ * You may obtain a copy of the License at
3349
+ *
3350
+ * http://www.apache.org/licenses/LICENSE-2.0
3351
+ *
3352
+ * Unless required by applicable law or agreed to in writing, software
3353
+ * distributed under the License is distributed on an "AS IS" BASIS,
3354
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3355
+ * See the License for the specific language governing permissions and
3356
+ * limitations under the License.
3357
+ */
3358
+ class GioFjsToggleTypeComponent extends FieldType {
3359
+ }
3360
+ GioFjsToggleTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsToggleTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3361
+ GioFjsToggleTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFjsToggleTypeComponent, selector: "gio-fjs-toggle-type", usesInheritance: true, ngImport: i0, template: `
3362
+ <gio-form-slide-toggle>
3363
+ <gio-form-label>{{ props.label }}</gio-form-label>
3364
+ {{ props.description }}
3365
+ <mat-slide-toggle
3366
+ gioFormSlideToggle
3367
+ [id]="id"
3368
+ [formControl]="formControl"
3369
+ [formlyAttributes]="field"
3370
+ [tabIndex]="props.tabindex"
3371
+ ></mat-slide-toggle>
3372
+ </gio-form-slide-toggle>
3373
+ `, isInline: true, components: [{ type: GioFormSlideToggleComponent, selector: "gio-form-slide-toggle", inputs: ["appearance"] }, { type: GioFormLabelComponent, selector: "gio-form-label" }, { type: i3$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex", "name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "checked"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }], directives: [{ type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i1$4.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }] });
3374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsToggleTypeComponent, decorators: [{
3375
+ type: Component,
3376
+ args: [{
3377
+ selector: 'gio-fjs-toggle-type',
3378
+ template: `
3379
+ <gio-form-slide-toggle>
3380
+ <gio-form-label>{{ props.label }}</gio-form-label>
3381
+ {{ props.description }}
3382
+ <mat-slide-toggle
3383
+ gioFormSlideToggle
3384
+ [id]="id"
3385
+ [formControl]="formControl"
3386
+ [formlyAttributes]="field"
3387
+ [tabIndex]="props.tabindex"
3388
+ ></mat-slide-toggle>
3389
+ </gio-form-slide-toggle>
3390
+ `,
3391
+ }]
3392
+ }] });
3393
+
3394
+ /*
3395
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
3396
+ *
3397
+ * Licensed under the Apache License, Version 2.0 (the "License");
3398
+ * you may not use this file except in compliance with the License.
3399
+ * You may obtain a copy of the License at
3400
+ *
3401
+ * http://www.apache.org/licenses/LICENSE-2.0
3402
+ *
3403
+ * Unless required by applicable law or agreed to in writing, software
3404
+ * distributed under the License is distributed on an "AS IS" BASIS,
3405
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3406
+ * See the License for the specific language governing permissions and
3407
+ * limitations under the License.
3408
+ */
3409
+ class GioFjsHeadersTypeComponent extends FieldType {
3410
+ constructor() {
3411
+ super(...arguments);
3412
+ this.defaultOptions = {
3413
+ props: {
3414
+ outputConfig: {
3415
+ keyName: 'name',
3416
+ valueName: 'value',
3417
+ },
3418
+ },
3419
+ };
3420
+ this.collapse = false;
3421
+ }
3422
+ get map() {
3423
+ return (headers) => [...(headers !== null && headers !== void 0 ? headers : [])].map(header => {
3424
+ return {
3425
+ [this.props.outputConfig.keyName]: header.key,
3426
+ [this.props.outputConfig.valueName]: header.value,
3427
+ };
3428
+ });
3429
+ }
3430
+ }
3431
+ GioFjsHeadersTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsHeadersTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3432
+ GioFjsHeadersTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFjsHeadersTypeComponent, selector: "gio-fjs-headers-type", usesInheritance: true, ngImport: i0, template: `
3433
+ <div class="wrapper">
3434
+ <div class="wrapper__header">
3435
+ <div class="wrapper__header__text">
3436
+ <div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
3437
+ <p *ngIf="to.description">{{ to.description }}</p>
3438
+ </div>
3439
+ <div class="wrapper__header__collapse">
3440
+ <button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
3441
+ <mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
3442
+ </button>
3443
+ </div>
3444
+ </div>
3445
+ <div class="wrapper__error" *ngIf="showError && formControl.errors">
3446
+ <formly-validation-message [field]="field"></formly-validation-message>
3447
+ </div>
3448
+ <div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
3449
+ <gio-form-headers [adaptOutputFn]="map" [formControl]="formControl"></gio-form-headers>
3450
+ </div>
3451
+ </div>
3452
+ `, isInline: true, styles: [".wrapper{display:flex;flex-direction:column;padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__header{display:flex}.wrapper__header__text{flex:1 1 auto}.wrapper__header__text__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:8px}.wrapper__header__collapse{flex:0 0 auto}.wrapper__header__collapse .collapse-open{transform:rotate(180deg);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__header__collapse .collapse-close{transform:rotate(0);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"], components: [{ type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1$4.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { type: GioFormHeadersComponent, selector: "gio-form-headers", inputs: ["adaptOutputFn"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
3453
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsHeadersTypeComponent, decorators: [{
3454
+ type: Component,
3455
+ args: [{ selector: 'gio-fjs-headers-type', template: `
3456
+ <div class="wrapper">
3457
+ <div class="wrapper__header">
3458
+ <div class="wrapper__header__text">
3459
+ <div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
3460
+ <p *ngIf="to.description">{{ to.description }}</p>
3461
+ </div>
3462
+ <div class="wrapper__header__collapse">
3463
+ <button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
3464
+ <mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
3465
+ </button>
3466
+ </div>
3467
+ </div>
3468
+ <div class="wrapper__error" *ngIf="showError && formControl.errors">
3469
+ <formly-validation-message [field]="field"></formly-validation-message>
3470
+ </div>
3471
+ <div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
3472
+ <gio-form-headers [adaptOutputFn]="map" [formControl]="formControl"></gio-form-headers>
3473
+ </div>
3474
+ </div>
3475
+ `, styles: [".wrapper{display:flex;flex-direction:column;padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper__header{display:flex}.wrapper__header__text{flex:1 1 auto}.wrapper__header__text__title{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:8px}.wrapper__header__collapse{flex:0 0 auto}.wrapper__header__collapse .collapse-open{transform:rotate(180deg);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__header__collapse .collapse-close{transform:rotate(0);transition:transform 225ms cubic-bezier(.4,0,.2,1)}.wrapper__error{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"] }]
3118
3476
  }] });
3119
3477
 
3120
3478
  /*
@@ -3140,11 +3498,17 @@ GioFormJsonSchemaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
3140
3498
  GioFjsObjectTypeComponent,
3141
3499
  GioFjsMultiSchemaTypeComponent,
3142
3500
  GioFjsArrayTypeComponent,
3501
+ GioFjsToggleTypeComponent,
3502
+ GioFjsHeadersTypeComponent,
3143
3503
  GioFormFieldWrapperComponent], imports: [CommonModule,
3144
3504
  A11yModule,
3145
3505
  ReactiveFormsModule, i1$4.FormlyModule, FormlyMaterialModule,
3146
- GioIconsModule], exports: [GioFormJsonSchemaComponent, FormlyModule] });
3147
- GioFormJsonSchemaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaModule, imports: [[
3506
+ GioIconsModule,
3507
+ GioFormSlideToggleModule,
3508
+ GioFormHeadersModule,
3509
+ MatSlideToggleModule,
3510
+ MatButtonModule], exports: [GioFormJsonSchemaComponent, FormlyModule] });
3511
+ GioFormJsonSchemaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaModule, providers: [GioFormlyJsonSchemaService], imports: [[
3148
3512
  CommonModule,
3149
3513
  A11yModule,
3150
3514
  ReactiveFormsModule,
@@ -3170,6 +3534,14 @@ GioFormJsonSchemaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
3170
3534
  { name: 'array', component: GioFjsArrayTypeComponent },
3171
3535
  { name: 'object', component: GioFjsObjectTypeComponent },
3172
3536
  { name: 'multischema', component: GioFjsMultiSchemaTypeComponent },
3537
+ {
3538
+ name: 'toggle',
3539
+ component: GioFjsToggleTypeComponent,
3540
+ },
3541
+ {
3542
+ name: 'gio-headers-array',
3543
+ component: GioFjsHeadersTypeComponent,
3544
+ },
3173
3545
  ],
3174
3546
  extensions: [{ name: 'banner', extension: { onPopulate: bannerExtension } }],
3175
3547
  extras: {
@@ -3178,6 +3550,10 @@ GioFormJsonSchemaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
3178
3550
  }),
3179
3551
  FormlyMaterialModule,
3180
3552
  GioIconsModule,
3553
+ GioFormSlideToggleModule,
3554
+ GioFormHeadersModule,
3555
+ MatSlideToggleModule,
3556
+ MatButtonModule,
3181
3557
  ], FormlyModule] });
3182
3558
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaModule, decorators: [{
3183
3559
  type: NgModule,
@@ -3188,6 +3564,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3188
3564
  GioFjsObjectTypeComponent,
3189
3565
  GioFjsMultiSchemaTypeComponent,
3190
3566
  GioFjsArrayTypeComponent,
3567
+ GioFjsToggleTypeComponent,
3568
+ GioFjsHeadersTypeComponent,
3191
3569
  GioFormFieldWrapperComponent,
3192
3570
  ],
3193
3571
  imports: [
@@ -3216,6 +3594,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3216
3594
  { name: 'array', component: GioFjsArrayTypeComponent },
3217
3595
  { name: 'object', component: GioFjsObjectTypeComponent },
3218
3596
  { name: 'multischema', component: GioFjsMultiSchemaTypeComponent },
3597
+ {
3598
+ name: 'toggle',
3599
+ component: GioFjsToggleTypeComponent,
3600
+ },
3601
+ {
3602
+ name: 'gio-headers-array',
3603
+ component: GioFjsHeadersTypeComponent,
3604
+ },
3219
3605
  ],
3220
3606
  extensions: [{ name: 'banner', extension: { onPopulate: bannerExtension } }],
3221
3607
  extras: {
@@ -3224,124 +3610,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3224
3610
  }),
3225
3611
  FormlyMaterialModule,
3226
3612
  GioIconsModule,
3613
+ GioFormSlideToggleModule,
3614
+ GioFormHeadersModule,
3615
+ MatSlideToggleModule,
3616
+ MatButtonModule,
3227
3617
  ],
3228
3618
  exports: [GioFormJsonSchemaComponent, FormlyModule],
3619
+ providers: [GioFormlyJsonSchemaService],
3229
3620
  }]
3230
3621
  }] });
3231
3622
 
3232
3623
  /*
3233
- * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3234
- *
3235
- * Licensed under the Apache License, Version 2.0 (the "License");
3236
- * you may not use this file except in compliance with the License.
3237
- * You may obtain a copy of the License at
3238
- *
3239
- * http://www.apache.org/licenses/LICENSE-2.0
3240
- *
3241
- * Unless required by applicable law or agreed to in writing, software
3242
- * distributed under the License is distributed on an "AS IS" BASIS,
3243
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3244
- * See the License for the specific language governing permissions and
3245
- * limitations under the License.
3246
- */
3247
- class GioFormSlideToggleComponent {
3248
- constructor() {
3249
- this.unsubscribe$ = new Subject();
3250
- this.appearance = 'outline';
3251
- this.innerMatSlideToggle = null;
3252
- this.innerFormControlName = null;
3253
- this.disabled = false;
3254
- }
3255
- ngAfterContentInit() {
3256
- var _a;
3257
- let isDisabled$ = undefined;
3258
- // Check if disabled is delegated to inner FormControlName
3259
- if (this.innerFormControlName) {
3260
- isDisabled$ = (_a = this.innerFormControlName.statusChanges) === null || _a === void 0 ? void 0 : _a.pipe(map(() => { var _a; return !!((_a = this.innerFormControlName) === null || _a === void 0 ? void 0 : _a.disabled); }), startWith(!!this.innerFormControlName.disabled));
3261
- }
3262
- // If not, check state of inner MatSlideToggle
3263
- else if (this.innerMatSlideToggle) {
3264
- isDisabled$ = this.innerMatSlideToggle.change.pipe(map(event => event.source.disabled), startWith(this.innerMatSlideToggle.disabled));
3265
- }
3266
- if (isDisabled$) {
3267
- isDisabled$.pipe(takeUntil(this.unsubscribe$)).subscribe(disabled => {
3268
- this.disabled = disabled;
3269
- });
3270
- }
3271
- }
3272
- ngOnDestroy() {
3273
- this.unsubscribe$.next();
3274
- this.unsubscribe$.complete();
3275
- }
3276
- }
3277
- GioFormSlideToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3278
- GioFormSlideToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormSlideToggleComponent, selector: "gio-form-slide-toggle", inputs: { appearance: "appearance" }, queries: [{ propertyName: "innerMatSlideToggle", first: true, predicate: MatSlideToggle, descendants: true }, { propertyName: "innerFormControlName", first: true, predicate: NgControl, 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<div\n class=\"form-slide-toggle\"\n [class.appearance-standard]=\"appearance === 'standard'\"\n [class.appearance-fill]=\"appearance === 'fill'\"\n [class.appearance-outline]=\"appearance === 'outline'\"\n>\n <div class=\"form-slide-toggle__icon\">\n <ng-content select=\"[gioFormPrefix]\"></ng-content>\n </div>\n <div class=\"form-slide-toggle__field\">\n <div class=\"form-slide-toggle__field__mat-slide-toggle\">\n <ng-content select=\"[gioFormSlideToggle]\"></ng-content>\n </div>\n <div class=\"form-slide-toggle__field__text\" [class.disabled]=\"disabled\">\n <span class=\"form-slide-toggle__field__text__label-1\">\n <ng-content select=\"gio-form-label\"></ng-content>\n </span>\n <span class=\"form-slide-toggle__field__text__label-2\">\n <ng-content></ng-content>\n </span>\n </div>\n </div>\n</div>\n", styles: [":host{display:inline-block;padding:4px 0}::ng-deep gio-form-slide-toggle div.form-slide-toggle__icon .mat-icon{font-size:150%;line-height:1.125}.form-slide-toggle{display:flex;min-height:60px;align-items:center}.form-slide-toggle.appearance-fill,.form-slide-toggle.appearance-outline{padding:0 .75em}.form-slide-toggle__icon{padding-right:8px}.form-slide-toggle__icon:empty{display:none}.form-slide-toggle__field{display:flex;min-width:180px;flex:1 1 auto;flex-direction:row;align-items:center;justify-content:flex-start}.form-slide-toggle__field__text{display:flex;flex:1 1 100%;flex-direction:column;padding-left:14px}.form-slide-toggle__field__text__label-1{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.form-slide-toggle__field__text__label-2{font:400 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.form-slide-toggle__field__text.disabled{color:#00000061}\n"] });
3279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleComponent, decorators: [{
3280
- type: Component,
3281
- args: [{ selector: 'gio-form-slide-toggle', 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<div\n class=\"form-slide-toggle\"\n [class.appearance-standard]=\"appearance === 'standard'\"\n [class.appearance-fill]=\"appearance === 'fill'\"\n [class.appearance-outline]=\"appearance === 'outline'\"\n>\n <div class=\"form-slide-toggle__icon\">\n <ng-content select=\"[gioFormPrefix]\"></ng-content>\n </div>\n <div class=\"form-slide-toggle__field\">\n <div class=\"form-slide-toggle__field__mat-slide-toggle\">\n <ng-content select=\"[gioFormSlideToggle]\"></ng-content>\n </div>\n <div class=\"form-slide-toggle__field__text\" [class.disabled]=\"disabled\">\n <span class=\"form-slide-toggle__field__text__label-1\">\n <ng-content select=\"gio-form-label\"></ng-content>\n </span>\n <span class=\"form-slide-toggle__field__text__label-2\">\n <ng-content></ng-content>\n </span>\n </div>\n </div>\n</div>\n", styles: [":host{display:inline-block;padding:4px 0}::ng-deep gio-form-slide-toggle div.form-slide-toggle__icon .mat-icon{font-size:150%;line-height:1.125}.form-slide-toggle{display:flex;min-height:60px;align-items:center}.form-slide-toggle.appearance-fill,.form-slide-toggle.appearance-outline{padding:0 .75em}.form-slide-toggle__icon{padding-right:8px}.form-slide-toggle__icon:empty{display:none}.form-slide-toggle__field{display:flex;min-width:180px;flex:1 1 auto;flex-direction:row;align-items:center;justify-content:flex-start}.form-slide-toggle__field__text{display:flex;flex:1 1 100%;flex-direction:column;padding-left:14px}.form-slide-toggle__field__text__label-1{font:600 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.form-slide-toggle__field__text__label-2{font:400 14px/20px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.form-slide-toggle__field__text.disabled{color:#00000061}\n"] }]
3282
- }], propDecorators: { appearance: [{
3283
- type: Input
3284
- }], innerMatSlideToggle: [{
3285
- type: ContentChild,
3286
- args: [MatSlideToggle, {
3287
- static: false,
3288
- }]
3289
- }], innerFormControlName: [{
3290
- type: ContentChild,
3291
- args: [NgControl, {
3292
- static: false,
3293
- }]
3294
- }] } });
3295
-
3296
- /*
3297
- * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3298
- *
3299
- * Licensed under the Apache License, Version 2.0 (the "License");
3300
- * you may not use this file except in compliance with the License.
3301
- * You may obtain a copy of the License at
3302
- *
3303
- * http://www.apache.org/licenses/LICENSE-2.0
3304
- *
3305
- * Unless required by applicable law or agreed to in writing, software
3306
- * distributed under the License is distributed on an "AS IS" BASIS,
3307
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
3308
- * See the License for the specific language governing permissions and
3309
- * limitations under the License.
3310
- */
3311
- class GioFormLabelComponent {
3312
- }
3313
- GioFormLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
3314
- GioFormLabelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFormLabelComponent, selector: "gio-form-label", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true });
3315
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormLabelComponent, decorators: [{
3316
- type: Component,
3317
- args: [{
3318
- selector: 'gio-form-label',
3319
- template: `<ng-content></ng-content>`,
3320
- }]
3321
- }] });
3322
- class GioFormPrefixDirective {
3323
- }
3324
- GioFormPrefixDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3325
- GioFormPrefixDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormPrefixDirective, selector: "[gioFormPrefix]", ngImport: i0 });
3326
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormPrefixDirective, decorators: [{
3327
- type: Directive,
3328
- args: [{
3329
- selector: '[gioFormPrefix]',
3330
- }]
3331
- }] });
3332
- class GioFormSlideToggleDirective {
3333
- }
3334
- GioFormSlideToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
3335
- GioFormSlideToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormSlideToggleDirective, selector: "[gioFormSlideToggle]", ngImport: i0 });
3336
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleDirective, decorators: [{
3337
- type: Directive,
3338
- args: [{
3339
- selector: '[gioFormSlideToggle]',
3340
- }]
3341
- }] });
3342
-
3343
- /*
3344
- * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
3624
+ * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
3345
3625
  *
3346
3626
  * Licensed under the Apache License, Version 2.0 (the "License");
3347
3627
  * you may not use this file except in compliance with the License.
@@ -3355,20 +3635,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3355
3635
  * See the License for the specific language governing permissions and
3356
3636
  * limitations under the License.
3357
3637
  */
3358
- class GioFormSlideToggleModule {
3359
- }
3360
- GioFormSlideToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3361
- GioFormSlideToggleModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, declarations: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective], imports: [CommonModule], exports: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective] });
3362
- GioFormSlideToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, imports: [[CommonModule]] });
3363
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, decorators: [{
3364
- type: NgModule,
3365
- args: [{
3366
- imports: [CommonModule],
3367
- declarations: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective],
3368
- exports: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective],
3369
- entryComponents: [GioFormSlideToggleComponent],
3370
- }]
3371
- }] });
3372
3638
 
3373
3639
  /*
3374
3640
  * Copyright (C) 2021 The Gravitee team (http://gravitee.io)