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