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