@gravitee/ui-particles-angular 5.10.0 → 5.11.0-focus-invalid-1937485
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.
- package/esm2020/lib/gio-confirm-and-validate-dialog/gio-confirm-and-validate-dialog.module.mjs +2 -2
- package/esm2020/lib/gio-form-headers/gio-form-headers.component.mjs +11 -4
- package/esm2020/lib/gio-form-json-schema/gio-form-json-schema.component.mjs +16 -34
- package/esm2020/lib/gio-form-json-schema/gio-form-json-schema.module.mjs +43 -3
- package/esm2020/lib/gio-form-json-schema/gio-formly-json-schema.service.mjs +64 -0
- package/esm2020/lib/gio-form-json-schema/model/GioJsonSchema.mjs +16 -1
- package/esm2020/lib/gio-form-json-schema/type-component/array-type.component.mjs +59 -27
- package/esm2020/lib/gio-form-json-schema/type-component/headers-type.component.mjs +93 -0
- package/esm2020/lib/gio-form-json-schema/type-component/multischema-type.component.mjs +6 -5
- package/esm2020/lib/gio-form-json-schema/type-component/object-type.component.mjs +11 -7
- package/esm2020/lib/gio-form-json-schema/type-component/toggle-type.component.mjs +59 -0
- package/fesm2015/gravitee-ui-particles-angular.mjs +461 -208
- package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-particles-angular.mjs +463 -194
- package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-form-headers/gio-form-headers.component.d.ts +4 -2
- package/lib/gio-form-json-schema/gio-form-json-schema.component.d.ts +3 -5
- package/lib/gio-form-json-schema/gio-form-json-schema.module.d.ts +14 -8
- package/lib/gio-form-json-schema/gio-formly-json-schema.service.d.ts +15 -0
- package/lib/gio-form-json-schema/model/GioJsonSchema.d.ts +19 -11
- package/lib/gio-form-json-schema/type-component/array-type.component.d.ts +1 -0
- package/lib/gio-form-json-schema/type-component/headers-type.component.d.ts +19 -0
- package/lib/gio-form-json-schema/type-component/toggle-type.component.d.ts +8 -0
- package/package.json +1 -1
- package/src/scss/mat-override/mat-table.scss +3 -3
|
@@ -47,7 +47,8 @@ import * as i1$3 from '@ngx-formly/core/json-schema';
|
|
|
47
47
|
import * as i1$4 from '@ngx-formly/core';
|
|
48
48
|
import { FieldType, FieldArrayType, FieldWrapper, FormlyModule } from '@ngx-formly/core';
|
|
49
49
|
import { FormlyMaterialModule } from '@ngx-formly/material';
|
|
50
|
-
import
|
|
50
|
+
import * as i3$2 from '@angular/material/slide-toggle';
|
|
51
|
+
import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
51
52
|
|
|
52
53
|
/*
|
|
53
54
|
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
@@ -1062,6 +1063,11 @@ class GioFormHeadersComponent {
|
|
|
1062
1063
|
}
|
|
1063
1064
|
// From ControlValueAccessor interface
|
|
1064
1065
|
registerOnChange(fn) {
|
|
1066
|
+
const adaptOutputFn = this.adaptOutputFn;
|
|
1067
|
+
if (adaptOutputFn) {
|
|
1068
|
+
this._onChange = (headers) => fn(adaptOutputFn(headers));
|
|
1069
|
+
return;
|
|
1070
|
+
}
|
|
1065
1071
|
this._onChange = fn;
|
|
1066
1072
|
}
|
|
1067
1073
|
// From ControlValueAccessor interface
|
|
@@ -1149,7 +1155,7 @@ class GioFormHeadersComponent {
|
|
|
1149
1155
|
}
|
|
1150
1156
|
}
|
|
1151
1157
|
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 });
|
|
1152
|
-
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: [
|
|
1158
|
+
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: [
|
|
1153
1159
|
{
|
|
1154
1160
|
provide: NG_VALUE_ACCESSOR,
|
|
1155
1161
|
useExisting: forwardRef(() => GioFormHeadersComponent),
|
|
@@ -1165,7 +1171,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
1165
1171
|
multi: true,
|
|
1166
1172
|
},
|
|
1167
1173
|
], 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"] }]
|
|
1168
|
-
}], ctorParameters: function () { return [{ type: i2$2.FocusMonitor }, { type: i0.ElementRef }]; }, propDecorators: {
|
|
1174
|
+
}], ctorParameters: function () { return [{ type: i2$2.FocusMonitor }, { type: i0.ElementRef }]; }, propDecorators: { adaptOutputFn: [{
|
|
1175
|
+
type: Input
|
|
1176
|
+
}], disabled: [{
|
|
1169
1177
|
type: HostBinding,
|
|
1170
1178
|
args: ['class.disabled']
|
|
1171
1179
|
}] } });
|
|
@@ -2779,9 +2787,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2779
2787
|
* See the License for the specific language governing permissions and
|
|
2780
2788
|
* limitations under the License.
|
|
2781
2789
|
*/
|
|
2782
|
-
class
|
|
2783
|
-
constructor(formlyJsonschema,
|
|
2790
|
+
class GioFormlyJsonSchemaService {
|
|
2791
|
+
constructor(formlyJsonschema, builder) {
|
|
2784
2792
|
this.formlyJsonschema = formlyJsonschema;
|
|
2793
|
+
this.builder = builder;
|
|
2794
|
+
}
|
|
2795
|
+
toFormlyFieldConfig(jsonSchema) {
|
|
2796
|
+
return this.formlyJsonschema.toFieldConfig(jsonSchema, {
|
|
2797
|
+
map: (mappedField, mapSource) => {
|
|
2798
|
+
mappedField = this.uiTypeMap(mappedField, mapSource);
|
|
2799
|
+
mappedField = this.bannerMap(mappedField, mapSource);
|
|
2800
|
+
mappedField = this.toggleMap(mappedField, mapSource);
|
|
2801
|
+
return mappedField;
|
|
2802
|
+
},
|
|
2803
|
+
});
|
|
2804
|
+
}
|
|
2805
|
+
uiTypeMap(mappedField, mapSource) {
|
|
2806
|
+
mappedField.type = mapSource.gioConfig?.uiType ?? mappedField.type;
|
|
2807
|
+
return mappedField;
|
|
2808
|
+
}
|
|
2809
|
+
bannerMap(mappedField, mapSource) {
|
|
2810
|
+
mappedField.props = {
|
|
2811
|
+
...mappedField.props,
|
|
2812
|
+
...(mapSource.gioConfig?.banner ? getBannerProperties(mapSource.gioConfig.banner) : {}),
|
|
2813
|
+
};
|
|
2814
|
+
return mappedField;
|
|
2815
|
+
}
|
|
2816
|
+
toggleMap(mappedField, mapSource) {
|
|
2817
|
+
if (mapSource.type === 'boolean') {
|
|
2818
|
+
mappedField.type = 'toggle';
|
|
2819
|
+
}
|
|
2820
|
+
return mappedField;
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
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 });
|
|
2824
|
+
GioFormlyJsonSchemaService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormlyJsonSchemaService });
|
|
2825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormlyJsonSchemaService, decorators: [{
|
|
2826
|
+
type: Injectable
|
|
2827
|
+
}], ctorParameters: function () { return [{ type: i1$3.FormlyJsonschema }, { type: i1$4.FormlyFormBuilder }]; } });
|
|
2828
|
+
const getBannerProperties = (banner) => {
|
|
2829
|
+
return {
|
|
2830
|
+
bannerText: banner.text,
|
|
2831
|
+
bannerTitle: 'title' in banner ? banner.title : undefined,
|
|
2832
|
+
};
|
|
2833
|
+
};
|
|
2834
|
+
|
|
2835
|
+
/*
|
|
2836
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
2837
|
+
*
|
|
2838
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2839
|
+
* you may not use this file except in compliance with the License.
|
|
2840
|
+
* You may obtain a copy of the License at
|
|
2841
|
+
*
|
|
2842
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2843
|
+
*
|
|
2844
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2845
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2846
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2847
|
+
* See the License for the specific language governing permissions and
|
|
2848
|
+
* limitations under the License.
|
|
2849
|
+
*/
|
|
2850
|
+
class GioFormJsonSchemaComponent {
|
|
2851
|
+
constructor(gioFormlyJsonSchema, elRef, fm, ngControl) {
|
|
2852
|
+
this.gioFormlyJsonSchema = gioFormlyJsonSchema;
|
|
2785
2853
|
this.elRef = elRef;
|
|
2786
2854
|
this.fm = fm;
|
|
2787
2855
|
this.ngControl = ngControl;
|
|
@@ -2808,10 +2876,15 @@ class GioFormJsonSchemaComponent {
|
|
|
2808
2876
|
}
|
|
2809
2877
|
set jsonSchema(jsonSchema) {
|
|
2810
2878
|
if (isObject(jsonSchema)) {
|
|
2811
|
-
this.fields = [this.toFormlyFieldConfig(jsonSchema)];
|
|
2879
|
+
this.fields = [this.gioFormlyJsonSchema.toFormlyFieldConfig(jsonSchema)];
|
|
2812
2880
|
}
|
|
2813
2881
|
}
|
|
2814
2882
|
ngOnInit() {
|
|
2883
|
+
// When the parent form is touched, mark all the sub formGroup as touched
|
|
2884
|
+
const parentControl = this.ngControl?.control?.parent;
|
|
2885
|
+
parentControl?.statusChanges
|
|
2886
|
+
?.pipe(takeUntil(this.unsubscribe$), map(() => parentControl?.touched), filter(touched => touched === true), tap(() => this.formGroup.markAllAsTouched()))
|
|
2887
|
+
.subscribe();
|
|
2815
2888
|
this.formGroup.statusChanges.pipe(takeUntil(this.unsubscribe$)).subscribe(status => {
|
|
2816
2889
|
if (status === 'VALID') {
|
|
2817
2890
|
this.ngControl?.control?.setErrors(null);
|
|
@@ -2849,36 +2922,13 @@ class GioFormJsonSchemaComponent {
|
|
|
2849
2922
|
setDisabledState(_isDisabled) {
|
|
2850
2923
|
throw new Error('Method not implemented.');
|
|
2851
2924
|
}
|
|
2852
|
-
toFormlyFieldConfig(jsonSchema) {
|
|
2853
|
-
return this.formlyJsonschema.toFieldConfig(jsonSchema, {
|
|
2854
|
-
map: (mappedField, mapSource) => {
|
|
2855
|
-
// Casting fields into our specific type
|
|
2856
|
-
const gioMapSource = mapSource;
|
|
2857
|
-
mappedField.props = {
|
|
2858
|
-
...mappedField.props,
|
|
2859
|
-
...(gioMapSource.gioConfig?.banner ? this.getBannerProperties(gioMapSource.gioConfig.banner) : {}),
|
|
2860
|
-
};
|
|
2861
|
-
return mappedField;
|
|
2862
|
-
},
|
|
2863
|
-
});
|
|
2864
|
-
}
|
|
2865
|
-
getBannerProperties(banner) {
|
|
2866
|
-
return {
|
|
2867
|
-
bannerText: banner.text,
|
|
2868
|
-
bannerTitle: 'title' in banner ? banner.title : undefined,
|
|
2869
|
-
};
|
|
2870
|
-
}
|
|
2871
2925
|
}
|
|
2872
|
-
GioFormJsonSchemaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaComponent, deps: [{ token:
|
|
2873
|
-
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"] }]
|
|
2926
|
+
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 });
|
|
2927
|
+
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"] }] });
|
|
2874
2928
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaComponent, decorators: [{
|
|
2875
2929
|
type: Component,
|
|
2876
|
-
args: [{
|
|
2877
|
-
|
|
2878
|
-
template: `<formly-form *ngIf="formGroup" [fields]="fields" [options]="options" [form]="formGroup" [model]="model"></formly-form>`,
|
|
2879
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
2880
|
-
}]
|
|
2881
|
-
}], ctorParameters: function () { return [{ type: i1$3.FormlyJsonschema }, { type: i0.ElementRef }, { type: i2$2.FocusMonitor }, { type: i7.NgControl, decorators: [{
|
|
2930
|
+
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"] }]
|
|
2931
|
+
}], ctorParameters: function () { return [{ type: GioFormlyJsonSchemaService }, { type: i0.ElementRef }, { type: i2$2.FocusMonitor }, { type: i7.NgControl, decorators: [{
|
|
2882
2932
|
type: Host
|
|
2883
2933
|
}, {
|
|
2884
2934
|
type: Optional
|
|
@@ -2888,6 +2938,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2888
2938
|
type: Input
|
|
2889
2939
|
}] } });
|
|
2890
2940
|
|
|
2941
|
+
/*
|
|
2942
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
2943
|
+
*
|
|
2944
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2945
|
+
* you may not use this file except in compliance with the License.
|
|
2946
|
+
* You may obtain a copy of the License at
|
|
2947
|
+
*
|
|
2948
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2949
|
+
*
|
|
2950
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2951
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2952
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2953
|
+
* See the License for the specific language governing permissions and
|
|
2954
|
+
* limitations under the License.
|
|
2955
|
+
*/
|
|
2956
|
+
class GioFormLabelComponent {
|
|
2957
|
+
}
|
|
2958
|
+
GioFormLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2959
|
+
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 });
|
|
2960
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormLabelComponent, decorators: [{
|
|
2961
|
+
type: Component,
|
|
2962
|
+
args: [{
|
|
2963
|
+
selector: 'gio-form-label',
|
|
2964
|
+
template: `<ng-content></ng-content>`,
|
|
2965
|
+
}]
|
|
2966
|
+
}] });
|
|
2967
|
+
class GioFormPrefixDirective {
|
|
2968
|
+
}
|
|
2969
|
+
GioFormPrefixDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2970
|
+
GioFormPrefixDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormPrefixDirective, selector: "[gioFormPrefix]", ngImport: i0 });
|
|
2971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormPrefixDirective, decorators: [{
|
|
2972
|
+
type: Directive,
|
|
2973
|
+
args: [{
|
|
2974
|
+
selector: '[gioFormPrefix]',
|
|
2975
|
+
}]
|
|
2976
|
+
}] });
|
|
2977
|
+
class GioFormSlideToggleDirective {
|
|
2978
|
+
}
|
|
2979
|
+
GioFormSlideToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2980
|
+
GioFormSlideToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormSlideToggleDirective, selector: "[gioFormSlideToggle]", ngImport: i0 });
|
|
2981
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleDirective, decorators: [{
|
|
2982
|
+
type: Directive,
|
|
2983
|
+
args: [{
|
|
2984
|
+
selector: '[gioFormSlideToggle]',
|
|
2985
|
+
}]
|
|
2986
|
+
}] });
|
|
2987
|
+
|
|
2988
|
+
/*
|
|
2989
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
2990
|
+
*
|
|
2991
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
2992
|
+
* you may not use this file except in compliance with the License.
|
|
2993
|
+
* You may obtain a copy of the License at
|
|
2994
|
+
*
|
|
2995
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
2996
|
+
*
|
|
2997
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
2998
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
2999
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3000
|
+
* See the License for the specific language governing permissions and
|
|
3001
|
+
* limitations under the License.
|
|
3002
|
+
*/
|
|
3003
|
+
class GioFormSlideToggleComponent {
|
|
3004
|
+
constructor() {
|
|
3005
|
+
this.unsubscribe$ = new Subject();
|
|
3006
|
+
this.appearance = 'outline';
|
|
3007
|
+
this.innerMatSlideToggle = null;
|
|
3008
|
+
this.innerFormControlName = null;
|
|
3009
|
+
this.disabled = false;
|
|
3010
|
+
}
|
|
3011
|
+
ngAfterContentInit() {
|
|
3012
|
+
let isDisabled$ = undefined;
|
|
3013
|
+
// Check if disabled is delegated to inner FormControlName
|
|
3014
|
+
if (this.innerFormControlName) {
|
|
3015
|
+
isDisabled$ = this.innerFormControlName.statusChanges?.pipe(map(() => !!this.innerFormControlName?.disabled), startWith(!!this.innerFormControlName.disabled));
|
|
3016
|
+
}
|
|
3017
|
+
// If not, check state of inner MatSlideToggle
|
|
3018
|
+
else if (this.innerMatSlideToggle) {
|
|
3019
|
+
isDisabled$ = this.innerMatSlideToggle.change.pipe(map(event => event.source.disabled), startWith(this.innerMatSlideToggle.disabled));
|
|
3020
|
+
}
|
|
3021
|
+
if (isDisabled$) {
|
|
3022
|
+
isDisabled$.pipe(takeUntil(this.unsubscribe$)).subscribe(disabled => {
|
|
3023
|
+
this.disabled = disabled;
|
|
3024
|
+
});
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
ngOnDestroy() {
|
|
3028
|
+
this.unsubscribe$.next();
|
|
3029
|
+
this.unsubscribe$.complete();
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3032
|
+
GioFormSlideToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3033
|
+
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"] });
|
|
3034
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleComponent, decorators: [{
|
|
3035
|
+
type: Component,
|
|
3036
|
+
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"] }]
|
|
3037
|
+
}], propDecorators: { appearance: [{
|
|
3038
|
+
type: Input
|
|
3039
|
+
}], innerMatSlideToggle: [{
|
|
3040
|
+
type: ContentChild,
|
|
3041
|
+
args: [MatSlideToggle, {
|
|
3042
|
+
static: false,
|
|
3043
|
+
}]
|
|
3044
|
+
}], innerFormControlName: [{
|
|
3045
|
+
type: ContentChild,
|
|
3046
|
+
args: [NgControl, {
|
|
3047
|
+
static: false,
|
|
3048
|
+
}]
|
|
3049
|
+
}] } });
|
|
3050
|
+
|
|
3051
|
+
/*
|
|
3052
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3053
|
+
*
|
|
3054
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3055
|
+
* you may not use this file except in compliance with the License.
|
|
3056
|
+
* You may obtain a copy of the License at
|
|
3057
|
+
*
|
|
3058
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3059
|
+
*
|
|
3060
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3061
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3062
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3063
|
+
* See the License for the specific language governing permissions and
|
|
3064
|
+
* limitations under the License.
|
|
3065
|
+
*/
|
|
3066
|
+
class GioFormSlideToggleModule {
|
|
3067
|
+
}
|
|
3068
|
+
GioFormSlideToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3069
|
+
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] });
|
|
3070
|
+
GioFormSlideToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, imports: [[CommonModule]] });
|
|
3071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, decorators: [{
|
|
3072
|
+
type: NgModule,
|
|
3073
|
+
args: [{
|
|
3074
|
+
imports: [CommonModule],
|
|
3075
|
+
declarations: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective],
|
|
3076
|
+
exports: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective],
|
|
3077
|
+
entryComponents: [GioFormSlideToggleComponent],
|
|
3078
|
+
}]
|
|
3079
|
+
}] });
|
|
3080
|
+
|
|
2891
3081
|
/*
|
|
2892
3082
|
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
2893
3083
|
*
|
|
@@ -2943,24 +3133,28 @@ GioFjsObjectTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
|
|
|
2943
3133
|
<div class="wrapper">
|
|
2944
3134
|
<div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
|
|
2945
3135
|
<p *ngIf="to.description">{{ to.description }}</p>
|
|
2946
|
-
<div class="
|
|
3136
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
2947
3137
|
<formly-validation-message [field]="field"></formly-validation-message>
|
|
2948
3138
|
</div>
|
|
2949
|
-
<
|
|
3139
|
+
<div class="wrapper__fields">
|
|
3140
|
+
<formly-field *ngFor="let f of field.fieldGroup" class="wrapper__fields__field" [field]="f"></formly-field>
|
|
3141
|
+
</div>
|
|
2950
3142
|
</div>
|
|
2951
|
-
`, isInline: true, styles: [".wrapper{display:flex;flex-direction:column
|
|
3143
|
+
`, 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"] }] });
|
|
2952
3144
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsObjectTypeComponent, decorators: [{
|
|
2953
3145
|
type: Component,
|
|
2954
3146
|
args: [{ selector: 'gio-fjs-object-type', template: `
|
|
2955
3147
|
<div class="wrapper">
|
|
2956
3148
|
<div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
|
|
2957
3149
|
<p *ngIf="to.description">{{ to.description }}</p>
|
|
2958
|
-
<div class="
|
|
3150
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
2959
3151
|
<formly-validation-message [field]="field"></formly-validation-message>
|
|
2960
3152
|
</div>
|
|
2961
|
-
<
|
|
3153
|
+
<div class="wrapper__fields">
|
|
3154
|
+
<formly-field *ngFor="let f of field.fieldGroup" class="wrapper__fields__field" [field]="f"></formly-field>
|
|
3155
|
+
</div>
|
|
2962
3156
|
</div>
|
|
2963
|
-
`, styles: [".wrapper{display:flex;flex-direction:column
|
|
3157
|
+
`, 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"] }]
|
|
2964
3158
|
}] });
|
|
2965
3159
|
|
|
2966
3160
|
/*
|
|
@@ -2979,52 +3173,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2979
3173
|
* limitations under the License.
|
|
2980
3174
|
*/
|
|
2981
3175
|
class GioFjsArrayTypeComponent extends FieldArrayType {
|
|
3176
|
+
constructor() {
|
|
3177
|
+
super(...arguments);
|
|
3178
|
+
this.collapse = false;
|
|
3179
|
+
}
|
|
2982
3180
|
}
|
|
2983
3181
|
GioFjsArrayTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
2984
3182
|
GioFjsArrayTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFjsArrayTypeComponent, selector: "gio-fjs-array-type", usesInheritance: true, ngImport: i0, template: `
|
|
2985
|
-
<div class="wrapper">
|
|
2986
|
-
<div class="
|
|
2987
|
-
|
|
3183
|
+
<div class="wrapper" [class.error]="formControl.touched && formControl.invalid">
|
|
3184
|
+
<div class="wrapper__header">
|
|
3185
|
+
<div class="wrapper__header__text">
|
|
3186
|
+
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
3187
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
3188
|
+
</div>
|
|
3189
|
+
<div class="wrapper__header__collapse">
|
|
3190
|
+
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
3191
|
+
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
3192
|
+
</button>
|
|
3193
|
+
</div>
|
|
3194
|
+
</div>
|
|
2988
3195
|
|
|
2989
|
-
<div class="
|
|
3196
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
2990
3197
|
<formly-validation-message [field]="field"></formly-validation-message>
|
|
2991
3198
|
</div>
|
|
2992
3199
|
|
|
2993
|
-
<div
|
|
2994
|
-
<
|
|
2995
|
-
|
|
2996
|
-
<
|
|
3200
|
+
<div [hidden]="collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
3201
|
+
<div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
|
|
3202
|
+
<formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
|
|
3203
|
+
<div class="wrapper__rows__row__remove">
|
|
3204
|
+
<button type="button" mat-icon-button aria-label="Remove" (click)="remove(i)">
|
|
3205
|
+
<mat-icon svgIcon="gio:cancel"></mat-icon>
|
|
3206
|
+
</button>
|
|
3207
|
+
</div>
|
|
2997
3208
|
</div>
|
|
2998
|
-
</div>
|
|
2999
3209
|
|
|
3000
|
-
|
|
3001
|
-
|
|
3210
|
+
<div>
|
|
3211
|
+
<button type="button" mat-stroked-button aria-label="Add" (click)="add()"><mat-icon svgIcon="gio:plus"></mat-icon> Add</button>
|
|
3212
|
+
</div>
|
|
3002
3213
|
</div>
|
|
3003
3214
|
</div>
|
|
3004
|
-
`, isInline: true, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.
|
|
3215
|
+
`, isInline: true, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper.error{border-color:#ec4899}.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"] }] });
|
|
3005
3216
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsArrayTypeComponent, decorators: [{
|
|
3006
3217
|
type: Component,
|
|
3007
3218
|
args: [{ selector: 'gio-fjs-array-type', template: `
|
|
3008
|
-
<div class="wrapper">
|
|
3009
|
-
<div class="
|
|
3010
|
-
|
|
3219
|
+
<div class="wrapper" [class.error]="formControl.touched && formControl.invalid">
|
|
3220
|
+
<div class="wrapper__header">
|
|
3221
|
+
<div class="wrapper__header__text">
|
|
3222
|
+
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
3223
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
3224
|
+
</div>
|
|
3225
|
+
<div class="wrapper__header__collapse">
|
|
3226
|
+
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
3227
|
+
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
3228
|
+
</button>
|
|
3229
|
+
</div>
|
|
3230
|
+
</div>
|
|
3011
3231
|
|
|
3012
|
-
<div class="
|
|
3232
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
3013
3233
|
<formly-validation-message [field]="field"></formly-validation-message>
|
|
3014
3234
|
</div>
|
|
3015
3235
|
|
|
3016
|
-
<div
|
|
3017
|
-
<
|
|
3018
|
-
|
|
3019
|
-
<
|
|
3236
|
+
<div [hidden]="collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
3237
|
+
<div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
|
|
3238
|
+
<formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
|
|
3239
|
+
<div class="wrapper__rows__row__remove">
|
|
3240
|
+
<button type="button" mat-icon-button aria-label="Remove" (click)="remove(i)">
|
|
3241
|
+
<mat-icon svgIcon="gio:cancel"></mat-icon>
|
|
3242
|
+
</button>
|
|
3243
|
+
</div>
|
|
3020
3244
|
</div>
|
|
3021
|
-
</div>
|
|
3022
3245
|
|
|
3023
|
-
|
|
3024
|
-
|
|
3246
|
+
<div>
|
|
3247
|
+
<button type="button" mat-stroked-button aria-label="Add" (click)="add()"><mat-icon svgIcon="gio:plus"></mat-icon> Add</button>
|
|
3248
|
+
</div>
|
|
3025
3249
|
</div>
|
|
3026
3250
|
</div>
|
|
3027
|
-
`, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.
|
|
3251
|
+
`, styles: [".wrapper{padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper.error{border-color:#ec4899}.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"] }]
|
|
3028
3252
|
}] });
|
|
3029
3253
|
|
|
3030
3254
|
function minItemsValidationMessage(error, field) {
|
|
@@ -3113,6 +3337,7 @@ function bannerExtension(field) {
|
|
|
3113
3337
|
class GioFjsMultiSchemaTypeComponent extends FieldType {
|
|
3114
3338
|
ngOnInit() {
|
|
3115
3339
|
set(this.field, 'fieldGroup[0].props.appearance', 'fill');
|
|
3340
|
+
set(this.field, 'fieldGroup[0].props.label', 'Select option');
|
|
3116
3341
|
}
|
|
3117
3342
|
}
|
|
3118
3343
|
GioFjsMultiSchemaTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsMultiSchemaTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -3120,24 +3345,159 @@ GioFjsMultiSchemaTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
|
3120
3345
|
<div class="wrapper">
|
|
3121
3346
|
<div class="wrapper__title" *ngIf="props.label">{{ props.label }}</div>
|
|
3122
3347
|
<p *ngIf="props.description">{{ props.description }}</p>
|
|
3123
|
-
<div
|
|
3348
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
3124
3349
|
<formly-validation-message [field]="field"></formly-validation-message>
|
|
3125
3350
|
</div>
|
|
3126
3351
|
<formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
|
|
3127
3352
|
</div>
|
|
3128
|
-
`, isInline: true, styles: ["
|
|
3353
|
+
`, 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"] }] });
|
|
3129
3354
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsMultiSchemaTypeComponent, decorators: [{
|
|
3130
3355
|
type: Component,
|
|
3131
3356
|
args: [{ selector: 'gio-fjs-multi-schema-type', template: `
|
|
3132
3357
|
<div class="wrapper">
|
|
3133
3358
|
<div class="wrapper__title" *ngIf="props.label">{{ props.label }}</div>
|
|
3134
3359
|
<p *ngIf="props.description">{{ props.description }}</p>
|
|
3135
|
-
<div
|
|
3360
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
3136
3361
|
<formly-validation-message [field]="field"></formly-validation-message>
|
|
3137
3362
|
</div>
|
|
3138
3363
|
<formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
|
|
3139
3364
|
</div>
|
|
3140
|
-
`, styles: ["
|
|
3365
|
+
`, 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"] }]
|
|
3366
|
+
}] });
|
|
3367
|
+
|
|
3368
|
+
/*
|
|
3369
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
3370
|
+
*
|
|
3371
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3372
|
+
* you may not use this file except in compliance with the License.
|
|
3373
|
+
* You may obtain a copy of the License at
|
|
3374
|
+
*
|
|
3375
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3376
|
+
*
|
|
3377
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3378
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3379
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3380
|
+
* See the License for the specific language governing permissions and
|
|
3381
|
+
* limitations under the License.
|
|
3382
|
+
*/
|
|
3383
|
+
class GioFjsToggleTypeComponent extends FieldType {
|
|
3384
|
+
}
|
|
3385
|
+
GioFjsToggleTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsToggleTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3386
|
+
GioFjsToggleTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFjsToggleTypeComponent, selector: "gio-fjs-toggle-type", usesInheritance: true, ngImport: i0, template: `
|
|
3387
|
+
<gio-form-slide-toggle>
|
|
3388
|
+
<gio-form-label>{{ props.label }}</gio-form-label>
|
|
3389
|
+
{{ props.description }}
|
|
3390
|
+
<mat-slide-toggle
|
|
3391
|
+
gioFormSlideToggle
|
|
3392
|
+
[id]="id"
|
|
3393
|
+
[formControl]="formControl"
|
|
3394
|
+
[formlyAttributes]="field"
|
|
3395
|
+
[tabIndex]="props.tabindex"
|
|
3396
|
+
></mat-slide-toggle>
|
|
3397
|
+
</gio-form-slide-toggle>
|
|
3398
|
+
`, 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"] }] });
|
|
3399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsToggleTypeComponent, decorators: [{
|
|
3400
|
+
type: Component,
|
|
3401
|
+
args: [{
|
|
3402
|
+
selector: 'gio-fjs-toggle-type',
|
|
3403
|
+
template: `
|
|
3404
|
+
<gio-form-slide-toggle>
|
|
3405
|
+
<gio-form-label>{{ props.label }}</gio-form-label>
|
|
3406
|
+
{{ props.description }}
|
|
3407
|
+
<mat-slide-toggle
|
|
3408
|
+
gioFormSlideToggle
|
|
3409
|
+
[id]="id"
|
|
3410
|
+
[formControl]="formControl"
|
|
3411
|
+
[formlyAttributes]="field"
|
|
3412
|
+
[tabIndex]="props.tabindex"
|
|
3413
|
+
></mat-slide-toggle>
|
|
3414
|
+
</gio-form-slide-toggle>
|
|
3415
|
+
`,
|
|
3416
|
+
}]
|
|
3417
|
+
}] });
|
|
3418
|
+
|
|
3419
|
+
/*
|
|
3420
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
3421
|
+
*
|
|
3422
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3423
|
+
* you may not use this file except in compliance with the License.
|
|
3424
|
+
* You may obtain a copy of the License at
|
|
3425
|
+
*
|
|
3426
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3427
|
+
*
|
|
3428
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3429
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3430
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3431
|
+
* See the License for the specific language governing permissions and
|
|
3432
|
+
* limitations under the License.
|
|
3433
|
+
*/
|
|
3434
|
+
class GioFjsHeadersTypeComponent extends FieldType {
|
|
3435
|
+
constructor() {
|
|
3436
|
+
super(...arguments);
|
|
3437
|
+
this.defaultOptions = {
|
|
3438
|
+
props: {
|
|
3439
|
+
outputConfig: {
|
|
3440
|
+
keyName: 'name',
|
|
3441
|
+
valueName: 'value',
|
|
3442
|
+
},
|
|
3443
|
+
},
|
|
3444
|
+
};
|
|
3445
|
+
this.collapse = false;
|
|
3446
|
+
}
|
|
3447
|
+
get map() {
|
|
3448
|
+
return (headers) => [...(headers ?? [])].map(header => {
|
|
3449
|
+
return {
|
|
3450
|
+
[this.props.outputConfig.keyName]: header.key,
|
|
3451
|
+
[this.props.outputConfig.valueName]: header.value,
|
|
3452
|
+
};
|
|
3453
|
+
});
|
|
3454
|
+
}
|
|
3455
|
+
}
|
|
3456
|
+
GioFjsHeadersTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsHeadersTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3457
|
+
GioFjsHeadersTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioFjsHeadersTypeComponent, selector: "gio-fjs-headers-type", usesInheritance: true, ngImport: i0, template: `
|
|
3458
|
+
<div class="wrapper">
|
|
3459
|
+
<div class="wrapper__header">
|
|
3460
|
+
<div class="wrapper__header__text">
|
|
3461
|
+
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
3462
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
3463
|
+
</div>
|
|
3464
|
+
<div class="wrapper__header__collapse">
|
|
3465
|
+
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
3466
|
+
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
3467
|
+
</button>
|
|
3468
|
+
</div>
|
|
3469
|
+
</div>
|
|
3470
|
+
<div class="wrapper__error" *ngIf="showError && formControl.errors">
|
|
3471
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
3472
|
+
</div>
|
|
3473
|
+
<div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
3474
|
+
<gio-form-headers [adaptOutputFn]="map" [formControl]="formControl"></gio-form-headers>
|
|
3475
|
+
</div>
|
|
3476
|
+
</div>
|
|
3477
|
+
`, 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"] }] });
|
|
3478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsHeadersTypeComponent, decorators: [{
|
|
3479
|
+
type: Component,
|
|
3480
|
+
args: [{ selector: 'gio-fjs-headers-type', template: `
|
|
3481
|
+
<div class="wrapper">
|
|
3482
|
+
<div class="wrapper__header">
|
|
3483
|
+
<div class="wrapper__header__text">
|
|
3484
|
+
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
3485
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
3486
|
+
</div>
|
|
3487
|
+
<div class="wrapper__header__collapse">
|
|
3488
|
+
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
3489
|
+
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
3490
|
+
</button>
|
|
3491
|
+
</div>
|
|
3492
|
+
</div>
|
|
3493
|
+
<div class="wrapper__error" *ngIf="showError && formControl.errors">
|
|
3494
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
3495
|
+
</div>
|
|
3496
|
+
<div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
3497
|
+
<gio-form-headers [adaptOutputFn]="map" [formControl]="formControl"></gio-form-headers>
|
|
3498
|
+
</div>
|
|
3499
|
+
</div>
|
|
3500
|
+
`, 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"] }]
|
|
3141
3501
|
}] });
|
|
3142
3502
|
|
|
3143
3503
|
/*
|
|
@@ -3163,11 +3523,17 @@ GioFormJsonSchemaModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
3163
3523
|
GioFjsObjectTypeComponent,
|
|
3164
3524
|
GioFjsMultiSchemaTypeComponent,
|
|
3165
3525
|
GioFjsArrayTypeComponent,
|
|
3526
|
+
GioFjsToggleTypeComponent,
|
|
3527
|
+
GioFjsHeadersTypeComponent,
|
|
3166
3528
|
GioFormFieldWrapperComponent], imports: [CommonModule,
|
|
3167
3529
|
A11yModule,
|
|
3168
3530
|
ReactiveFormsModule, i1$4.FormlyModule, FormlyMaterialModule,
|
|
3169
|
-
GioIconsModule
|
|
3170
|
-
|
|
3531
|
+
GioIconsModule,
|
|
3532
|
+
GioFormSlideToggleModule,
|
|
3533
|
+
GioFormHeadersModule,
|
|
3534
|
+
MatSlideToggleModule,
|
|
3535
|
+
MatButtonModule], exports: [GioFormJsonSchemaComponent, FormlyModule] });
|
|
3536
|
+
GioFormJsonSchemaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaModule, providers: [GioFormlyJsonSchemaService], imports: [[
|
|
3171
3537
|
CommonModule,
|
|
3172
3538
|
A11yModule,
|
|
3173
3539
|
ReactiveFormsModule,
|
|
@@ -3193,6 +3559,14 @@ GioFormJsonSchemaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
3193
3559
|
{ name: 'array', component: GioFjsArrayTypeComponent },
|
|
3194
3560
|
{ name: 'object', component: GioFjsObjectTypeComponent },
|
|
3195
3561
|
{ name: 'multischema', component: GioFjsMultiSchemaTypeComponent },
|
|
3562
|
+
{
|
|
3563
|
+
name: 'toggle',
|
|
3564
|
+
component: GioFjsToggleTypeComponent,
|
|
3565
|
+
},
|
|
3566
|
+
{
|
|
3567
|
+
name: 'gio-headers-array',
|
|
3568
|
+
component: GioFjsHeadersTypeComponent,
|
|
3569
|
+
},
|
|
3196
3570
|
],
|
|
3197
3571
|
extensions: [{ name: 'banner', extension: { onPopulate: bannerExtension } }],
|
|
3198
3572
|
extras: {
|
|
@@ -3201,6 +3575,10 @@ GioFormJsonSchemaModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
3201
3575
|
}),
|
|
3202
3576
|
FormlyMaterialModule,
|
|
3203
3577
|
GioIconsModule,
|
|
3578
|
+
GioFormSlideToggleModule,
|
|
3579
|
+
GioFormHeadersModule,
|
|
3580
|
+
MatSlideToggleModule,
|
|
3581
|
+
MatButtonModule,
|
|
3204
3582
|
], FormlyModule] });
|
|
3205
3583
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormJsonSchemaModule, decorators: [{
|
|
3206
3584
|
type: NgModule,
|
|
@@ -3211,6 +3589,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3211
3589
|
GioFjsObjectTypeComponent,
|
|
3212
3590
|
GioFjsMultiSchemaTypeComponent,
|
|
3213
3591
|
GioFjsArrayTypeComponent,
|
|
3592
|
+
GioFjsToggleTypeComponent,
|
|
3593
|
+
GioFjsHeadersTypeComponent,
|
|
3214
3594
|
GioFormFieldWrapperComponent,
|
|
3215
3595
|
],
|
|
3216
3596
|
imports: [
|
|
@@ -3239,6 +3619,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3239
3619
|
{ name: 'array', component: GioFjsArrayTypeComponent },
|
|
3240
3620
|
{ name: 'object', component: GioFjsObjectTypeComponent },
|
|
3241
3621
|
{ name: 'multischema', component: GioFjsMultiSchemaTypeComponent },
|
|
3622
|
+
{
|
|
3623
|
+
name: 'toggle',
|
|
3624
|
+
component: GioFjsToggleTypeComponent,
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
name: 'gio-headers-array',
|
|
3628
|
+
component: GioFjsHeadersTypeComponent,
|
|
3629
|
+
},
|
|
3242
3630
|
],
|
|
3243
3631
|
extensions: [{ name: 'banner', extension: { onPopulate: bannerExtension } }],
|
|
3244
3632
|
extras: {
|
|
@@ -3247,123 +3635,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3247
3635
|
}),
|
|
3248
3636
|
FormlyMaterialModule,
|
|
3249
3637
|
GioIconsModule,
|
|
3638
|
+
GioFormSlideToggleModule,
|
|
3639
|
+
GioFormHeadersModule,
|
|
3640
|
+
MatSlideToggleModule,
|
|
3641
|
+
MatButtonModule,
|
|
3250
3642
|
],
|
|
3251
3643
|
exports: [GioFormJsonSchemaComponent, FormlyModule],
|
|
3644
|
+
providers: [GioFormlyJsonSchemaService],
|
|
3252
3645
|
}]
|
|
3253
3646
|
}] });
|
|
3254
3647
|
|
|
3255
3648
|
/*
|
|
3256
|
-
* Copyright (C)
|
|
3257
|
-
*
|
|
3258
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3259
|
-
* you may not use this file except in compliance with the License.
|
|
3260
|
-
* You may obtain a copy of the License at
|
|
3261
|
-
*
|
|
3262
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3263
|
-
*
|
|
3264
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3265
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3266
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3267
|
-
* See the License for the specific language governing permissions and
|
|
3268
|
-
* limitations under the License.
|
|
3269
|
-
*/
|
|
3270
|
-
class GioFormSlideToggleComponent {
|
|
3271
|
-
constructor() {
|
|
3272
|
-
this.unsubscribe$ = new Subject();
|
|
3273
|
-
this.appearance = 'outline';
|
|
3274
|
-
this.innerMatSlideToggle = null;
|
|
3275
|
-
this.innerFormControlName = null;
|
|
3276
|
-
this.disabled = false;
|
|
3277
|
-
}
|
|
3278
|
-
ngAfterContentInit() {
|
|
3279
|
-
let isDisabled$ = undefined;
|
|
3280
|
-
// Check if disabled is delegated to inner FormControlName
|
|
3281
|
-
if (this.innerFormControlName) {
|
|
3282
|
-
isDisabled$ = this.innerFormControlName.statusChanges?.pipe(map(() => !!this.innerFormControlName?.disabled), startWith(!!this.innerFormControlName.disabled));
|
|
3283
|
-
}
|
|
3284
|
-
// If not, check state of inner MatSlideToggle
|
|
3285
|
-
else if (this.innerMatSlideToggle) {
|
|
3286
|
-
isDisabled$ = this.innerMatSlideToggle.change.pipe(map(event => event.source.disabled), startWith(this.innerMatSlideToggle.disabled));
|
|
3287
|
-
}
|
|
3288
|
-
if (isDisabled$) {
|
|
3289
|
-
isDisabled$.pipe(takeUntil(this.unsubscribe$)).subscribe(disabled => {
|
|
3290
|
-
this.disabled = disabled;
|
|
3291
|
-
});
|
|
3292
|
-
}
|
|
3293
|
-
}
|
|
3294
|
-
ngOnDestroy() {
|
|
3295
|
-
this.unsubscribe$.next();
|
|
3296
|
-
this.unsubscribe$.complete();
|
|
3297
|
-
}
|
|
3298
|
-
}
|
|
3299
|
-
GioFormSlideToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3300
|
-
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"] });
|
|
3301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleComponent, decorators: [{
|
|
3302
|
-
type: Component,
|
|
3303
|
-
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"] }]
|
|
3304
|
-
}], propDecorators: { appearance: [{
|
|
3305
|
-
type: Input
|
|
3306
|
-
}], innerMatSlideToggle: [{
|
|
3307
|
-
type: ContentChild,
|
|
3308
|
-
args: [MatSlideToggle, {
|
|
3309
|
-
static: false,
|
|
3310
|
-
}]
|
|
3311
|
-
}], innerFormControlName: [{
|
|
3312
|
-
type: ContentChild,
|
|
3313
|
-
args: [NgControl, {
|
|
3314
|
-
static: false,
|
|
3315
|
-
}]
|
|
3316
|
-
}] } });
|
|
3317
|
-
|
|
3318
|
-
/*
|
|
3319
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3320
|
-
*
|
|
3321
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3322
|
-
* you may not use this file except in compliance with the License.
|
|
3323
|
-
* You may obtain a copy of the License at
|
|
3324
|
-
*
|
|
3325
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3326
|
-
*
|
|
3327
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3328
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3329
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3330
|
-
* See the License for the specific language governing permissions and
|
|
3331
|
-
* limitations under the License.
|
|
3332
|
-
*/
|
|
3333
|
-
class GioFormLabelComponent {
|
|
3334
|
-
}
|
|
3335
|
-
GioFormLabelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3336
|
-
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 });
|
|
3337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormLabelComponent, decorators: [{
|
|
3338
|
-
type: Component,
|
|
3339
|
-
args: [{
|
|
3340
|
-
selector: 'gio-form-label',
|
|
3341
|
-
template: `<ng-content></ng-content>`,
|
|
3342
|
-
}]
|
|
3343
|
-
}] });
|
|
3344
|
-
class GioFormPrefixDirective {
|
|
3345
|
-
}
|
|
3346
|
-
GioFormPrefixDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3347
|
-
GioFormPrefixDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormPrefixDirective, selector: "[gioFormPrefix]", ngImport: i0 });
|
|
3348
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormPrefixDirective, decorators: [{
|
|
3349
|
-
type: Directive,
|
|
3350
|
-
args: [{
|
|
3351
|
-
selector: '[gioFormPrefix]',
|
|
3352
|
-
}]
|
|
3353
|
-
}] });
|
|
3354
|
-
class GioFormSlideToggleDirective {
|
|
3355
|
-
}
|
|
3356
|
-
GioFormSlideToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
3357
|
-
GioFormSlideToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: GioFormSlideToggleDirective, selector: "[gioFormSlideToggle]", ngImport: i0 });
|
|
3358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleDirective, decorators: [{
|
|
3359
|
-
type: Directive,
|
|
3360
|
-
args: [{
|
|
3361
|
-
selector: '[gioFormSlideToggle]',
|
|
3362
|
-
}]
|
|
3363
|
-
}] });
|
|
3364
|
-
|
|
3365
|
-
/*
|
|
3366
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3649
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
3367
3650
|
*
|
|
3368
3651
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3369
3652
|
* you may not use this file except in compliance with the License.
|
|
@@ -3377,20 +3660,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
3377
3660
|
* See the License for the specific language governing permissions and
|
|
3378
3661
|
* limitations under the License.
|
|
3379
3662
|
*/
|
|
3380
|
-
class GioFormSlideToggleModule {
|
|
3381
|
-
}
|
|
3382
|
-
GioFormSlideToggleModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3383
|
-
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] });
|
|
3384
|
-
GioFormSlideToggleModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, imports: [[CommonModule]] });
|
|
3385
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFormSlideToggleModule, decorators: [{
|
|
3386
|
-
type: NgModule,
|
|
3387
|
-
args: [{
|
|
3388
|
-
imports: [CommonModule],
|
|
3389
|
-
declarations: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective],
|
|
3390
|
-
exports: [GioFormSlideToggleComponent, GioFormLabelComponent, GioFormPrefixDirective],
|
|
3391
|
-
entryComponents: [GioFormSlideToggleComponent],
|
|
3392
|
-
}]
|
|
3393
|
-
}] });
|
|
3394
3663
|
|
|
3395
3664
|
/*
|
|
3396
3665
|
* Copyright (C) 2021 The Gravitee team (http://gravitee.io)
|