@gravitee/ui-particles-angular 12.2.0 → 12.3.0-feat-read-only-policy-studio-7e5668a
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/esm2022/lib/gio-form-cron/gio-form-cron.component.mjs +11 -7
- package/esm2022/lib/gio-form-json-schema/gio-form-json-schema.module.mjs +16 -1
- package/esm2022/lib/gio-form-json-schema/gio-formly-json-schema.service.mjs +7 -1
- package/esm2022/lib/gio-form-json-schema/type-component/cron-type.component.mjs +42 -0
- package/fesm2022/gravitee-ui-particles-angular.mjs +1939 -1882
- package/fesm2022/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-form-cron/gio-form-cron.component.d.ts +3 -2
- package/lib/gio-form-json-schema/gio-form-json-schema.module.d.ts +17 -15
- package/lib/gio-form-json-schema/type-component/cron-type.component.d.ts +9 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ import { ComponentHarness, HarnessPredicate, parallel, TestKey } from '@angular/
|
|
|
12
12
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
13
13
|
import * as i6$1 from '@angular/material/form-field';
|
|
14
14
|
import { MatFormFieldControl, MatFormFieldModule, MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
|
|
15
|
-
import { isEmpty, isString, isObject, toLower, dropRight, isNil, isArray, remove, isEqual, cloneDeep, uniqueId, set, has,
|
|
15
|
+
import { isEmpty, isString, isObject, toLower, dropRight, isNil, isArray, remove, isEqual, cloneDeep, uniqueId, range, set, has, some, filter as filter$1, intersection } from 'lodash';
|
|
16
16
|
import { tap, startWith, switchMap, map, distinctUntilChanged, takeUntil, filter, take, delay, debounceTime, shareReplay, catchError, debounce } from 'rxjs/operators';
|
|
17
17
|
import * as i1$1 from '@angular/forms';
|
|
18
18
|
import { FormsModule, UntypedFormArray, UntypedFormGroup, UntypedFormControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule, NgControl, FormControl } from '@angular/forms';
|
|
@@ -24,7 +24,7 @@ import * as i2$1 from '@angular/material/icon';
|
|
|
24
24
|
import { MatIconModule } from '@angular/material/icon';
|
|
25
25
|
import * as i6 from '@angular/material/autocomplete';
|
|
26
26
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
27
|
-
import * as
|
|
27
|
+
import * as i7 from '@angular/material/core';
|
|
28
28
|
import { MatOptionModule, MatRippleModule } from '@angular/material/core';
|
|
29
29
|
import * as i5 from '@angular/material/input';
|
|
30
30
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -38,7 +38,7 @@ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
|
38
38
|
import { MatButtonHarness } from '@angular/material/button/testing';
|
|
39
39
|
import { MatInputHarness } from '@angular/material/input/testing';
|
|
40
40
|
import * as i5$1 from '@angular/cdk/text-field';
|
|
41
|
-
import * as i3$
|
|
41
|
+
import * as i3$1 from 'ngx-file-helpers';
|
|
42
42
|
import { ReadMode, NgxFileHelpersModule } from 'ngx-file-helpers';
|
|
43
43
|
import { toSvg } from 'jdenticon';
|
|
44
44
|
import * as i1$4 from '@ngx-formly/core/json-schema';
|
|
@@ -47,15 +47,15 @@ import { FieldType, FieldArrayType, FieldWrapper, FormlyModule } from '@ngx-form
|
|
|
47
47
|
import { FieldType as FieldType$1, FormlyMaterialModule } from '@ngx-formly/material';
|
|
48
48
|
import * as i5$2 from '@angular/material/slide-toggle';
|
|
49
49
|
import { MatSlideToggle, MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
50
|
-
import
|
|
50
|
+
import * as i4$1 from '@angular/material/button-toggle';
|
|
51
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
51
52
|
import * as i2$4 from '@angular/material/tooltip';
|
|
52
53
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
54
|
+
import Cronstrue from 'cronstrue/i18n';
|
|
55
|
+
import { TestBed } from '@angular/core/testing';
|
|
53
56
|
import * as i1$5 from '@angular/cdk/clipboard';
|
|
54
57
|
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
55
58
|
import * as i1$6 from '@angular/common/http';
|
|
56
|
-
import Cronstrue from 'cronstrue/i18n';
|
|
57
|
-
import * as i4$1 from '@angular/material/button-toggle';
|
|
58
|
-
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
59
59
|
import { MatButtonToggleGroupHarness } from '@angular/material/button-toggle/testing';
|
|
60
60
|
import { MatRadioModule } from '@angular/material/radio';
|
|
61
61
|
import { MatSelectHarness } from '@angular/material/select/testing';
|
|
@@ -534,7 +534,7 @@ class GioFormTagsInputComponent {
|
|
|
534
534
|
provide: MatFormFieldControl,
|
|
535
535
|
useExisting: GioFormTagsInputComponent,
|
|
536
536
|
},
|
|
537
|
-
], viewQueries: [{ propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }], ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<mat-chip-grid #tagChipList [attr.aria-label]=\"ariaLabel\" multiple [disabled]=\"disabled\">\n <mat-chip-row *ngFor=\"let tag of value\" [removable]=\"!disabled\" (removed)=\"removeChipToFormControl(tag)\" [disabled]=\"disabled\">\n {{ _displayValueWith ? (_displayValueWith(tag) | async) : tag }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip-row>\n <input\n #tagInput\n [matAutocompleteDisabled]=\"!_autocompleteOptions || disabled\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\"\n [matChipInputFor]=\"tagChipList\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"onMatChipTokenEnd()\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onAutocompleteSelect($event)\">\n <mat-option *ngIf=\"loading\" disabled id=\"loader\">\n <div class=\"loader-option\"><gio-loader></gio-loader></div>\n </mat-option>\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions$ | async\" [value]=\"option.value\">\n {{ option.label }}\n </mat-option>\n </mat-autocomplete>\n</mat-chip-grid>\n", styles: [".loader-option{display:flex}.loader-option gio-loader{width:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i4.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type:
|
|
537
|
+
], viewQueries: [{ propertyName: "tagInput", first: true, predicate: ["tagInput"], descendants: true }], ngImport: i0, template: "<!--\n\n Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<mat-chip-grid #tagChipList [attr.aria-label]=\"ariaLabel\" multiple [disabled]=\"disabled\">\n <mat-chip-row *ngFor=\"let tag of value\" [removable]=\"!disabled\" (removed)=\"removeChipToFormControl(tag)\" [disabled]=\"disabled\">\n {{ _displayValueWith ? (_displayValueWith(tag) | async) : tag }}\n <mat-icon matChipRemove>cancel</mat-icon>\n </mat-chip-row>\n <input\n #tagInput\n [matAutocompleteDisabled]=\"!_autocompleteOptions || disabled\"\n [matAutocomplete]=\"auto\"\n [placeholder]=\"placeholder\"\n [matChipInputFor]=\"tagChipList\"\n [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"onMatChipTokenEnd()\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onAutocompleteSelect($event)\">\n <mat-option *ngIf=\"loading\" disabled id=\"loader\">\n <div class=\"loader-option\"><gio-loader></gio-loader></div>\n </mat-option>\n <mat-option *ngFor=\"let option of autocompleteFilteredOptions$ | async\" [value]=\"option.value\">\n {{ option.label }}\n </mat-option>\n </mat-autocomplete>\n</mat-chip-grid>\n", styles: [".loader-option{display:flex}.loader-option gio-loader{width:24px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i4.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i4.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i4.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: GioLoaderComponent, selector: "gio-loader" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
538
538
|
}
|
|
539
539
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormTagsInputComponent, decorators: [{
|
|
540
540
|
type: Component,
|
|
@@ -1400,7 +1400,7 @@ class GioFormHeadersComponent {
|
|
|
1400
1400
|
useExisting: forwardRef(() => GioFormHeadersComponent),
|
|
1401
1401
|
multi: true,
|
|
1402
1402
|
},
|
|
1403
|
-
], 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 class=\"label\"><ng-content select=\"gio-form-headers-label\"></ng-content></div>\n<table class=\"gio-form-headers__table gio-table-light\" [class.disabled]=\"disabled\" [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 <div class=\"gio-form-headers__table__header-row__td-key__field\">\n <textarea\n formControlName=\"key\"\n matInput\n placeholder=\"Name...\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"1\"\n [matAutocomplete]=\"headerNamesAutocomplete\"\n ></textarea>\n </div>\n <mat-error *ngIf=\"control.get('key')?.hasError('pattern')\">\n Header name must not contain spaces. (RegExp: {{ control.get('key')?.getError('pattern')?.requiredPattern }})\n </mat-error>\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 <div class=\"gio-form-headers__table__header-row__td-value__field\">\n <textarea formControlName=\"value\" matInput placeholder=\"Value...\" cdkTextareaAutosize cdkAutosizeMinRows=\"1\"></textarea>\n </div>\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: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:block;overflow:hidden}.label{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-left:10px;color:#7a7b80}.label:empty{display:none}.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%;min-height:32px;flex-direction:column;justify-content:center;padding-bottom:0}.gio-form-headers__table__header-row__td-key__field textarea,.gio-form-headers__table__header-row__td-value__field textarea{overflow:auto;width:100%;height:16px;padding:0;border:none;background:transparent;box-shadow:none;outline:none;resize:none;font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.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}:host(.disabled) .label{color:#d3d5dc}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type:
|
|
1403
|
+
], 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 class=\"label\"><ng-content select=\"gio-form-headers-label\"></ng-content></div>\n<table class=\"gio-form-headers__table gio-table-light\" [class.disabled]=\"disabled\" [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 <div class=\"gio-form-headers__table__header-row__td-key__field\">\n <textarea\n formControlName=\"key\"\n matInput\n placeholder=\"Name...\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"1\"\n [matAutocomplete]=\"headerNamesAutocomplete\"\n ></textarea>\n </div>\n <mat-error *ngIf=\"control.get('key')?.hasError('pattern')\">\n Header name must not contain spaces. (RegExp: {{ control.get('key')?.getError('pattern')?.requiredPattern }})\n </mat-error>\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 <div class=\"gio-form-headers__table__header-row__td-value__field\">\n <textarea formControlName=\"value\" matInput placeholder=\"Value...\" cdkTextareaAutosize cdkAutosizeMinRows=\"1\"></textarea>\n </div>\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: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:block;overflow:hidden}.label{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-left:10px;color:#7a7b80}.label:empty{display:none}.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%;min-height:32px;flex-direction:column;justify-content:center;padding-bottom:0}.gio-form-headers__table__header-row__td-key__field textarea,.gio-form-headers__table__header-row__td-value__field textarea{overflow:auto;width:100%;height:16px;padding:0;border:none;background:transparent;box-shadow:none;outline:none;resize:none;font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.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}:host(.disabled) .label{color:#d3d5dc}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i6$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i5$1.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
1404
1404
|
}
|
|
1405
1405
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormHeadersComponent, decorators: [{
|
|
1406
1406
|
type: Component,
|
|
@@ -1595,7 +1595,7 @@ class GioFormHeadersHarness extends ComponentHarness {
|
|
|
1595
1595
|
*/
|
|
1596
1596
|
class GioFormFilePickerAddButtonComponent {
|
|
1597
1597
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFilePickerAddButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1598
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFormFilePickerAddButtonComponent, selector: "gio-form-file-picker-add-button", 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 class=\"add-button\" matRipple>\n <div #content><ng-content></ng-content></div>\n <span *ngIf=\"!content.children.length\">\n <mat-icon class=\"add-button__image\" svgIcon=\"gio:upload\"></mat-icon>\n <span class=\"add-button__content\">Drag your file</span>\n </span>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;flex-direction:column}.file-picker{display:flex;flex:1 1 auto;flex-flow:row wrap;padding:4px}.file-picker__add-button{border:2px dashed #606274;border-radius:6px;margin:4px;cursor:pointer}.file-picker__add-button:hover,.file-picker__add-button.drag-hover{border:2px dashed #876fec;background-color:#0000000a}.file-picker__add-button.drag-hover{pointer-events:none}.file-picker__add-button.complete{padding:6px;border:none}.file-picker__add-button.error{border:2px dashed #ec4899}.file-picker__preview,.file-picker__preview-empty{position:relative;display:flex;min-width:130px;min-height:130px;flex:0 0 130px;flex-flow:column nowrap;justify-content:space-between;padding:6px;border:2px solid #606274;border-radius:6px;margin:4px;inline-size:fit-content}.file-picker__preview.drag-hover,.file-picker__preview-empty.drag-hover{pointer-events:none}.file-picker__preview__image,.file-picker__preview-empty__image{width:100%;height:100%;background-position-x:center;background-position-y:center;background-repeat:no-repeat;background-size:contain}.file-picker__preview__file,.file-picker__preview-empty__file{display:flex;flex:1 1 auto;flex-direction:column;align-items:center;place-content:center center;text-align:center;font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.file-picker__preview__file code,.file-picker__preview-empty__file code{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.file-picker__preview.disabled,.file-picker__preview-empty.disabled{border:2px solid rgba(0,0,0,.12)}.file-picker__preview.error{border:2px solid #ec4899}.file-picker__preview__delete{position:absolute;z-index:200;top:0;right:0;width:24px;height:24px;border-radius:3px;background-color:#f7f8fdb3;color:#100c27;cursor:pointer}.file-picker__preview__delete:hover{color:#fe733f}.file-picker__preview-empty__default{text-align:center}:host{display:block;width:130px;height:130px}.add-button{height:100%;padding:6px;text-align:center}.add-button__image{width:100%;height:54px}.add-button__content{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type:
|
|
1598
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFormFilePickerAddButtonComponent, selector: "gio-form-file-picker-add-button", 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 class=\"add-button\" matRipple>\n <div #content><ng-content></ng-content></div>\n <span *ngIf=\"!content.children.length\">\n <mat-icon class=\"add-button__image\" svgIcon=\"gio:upload\"></mat-icon>\n <span class=\"add-button__content\">Drag your file</span>\n </span>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;flex-direction:column}.file-picker{display:flex;flex:1 1 auto;flex-flow:row wrap;padding:4px}.file-picker__add-button{border:2px dashed #606274;border-radius:6px;margin:4px;cursor:pointer}.file-picker__add-button:hover,.file-picker__add-button.drag-hover{border:2px dashed #876fec;background-color:#0000000a}.file-picker__add-button.drag-hover{pointer-events:none}.file-picker__add-button.complete{padding:6px;border:none}.file-picker__add-button.error{border:2px dashed #ec4899}.file-picker__preview,.file-picker__preview-empty{position:relative;display:flex;min-width:130px;min-height:130px;flex:0 0 130px;flex-flow:column nowrap;justify-content:space-between;padding:6px;border:2px solid #606274;border-radius:6px;margin:4px;inline-size:fit-content}.file-picker__preview.drag-hover,.file-picker__preview-empty.drag-hover{pointer-events:none}.file-picker__preview__image,.file-picker__preview-empty__image{width:100%;height:100%;background-position-x:center;background-position-y:center;background-repeat:no-repeat;background-size:contain}.file-picker__preview__file,.file-picker__preview-empty__file{display:flex;flex:1 1 auto;flex-direction:column;align-items:center;place-content:center center;text-align:center;font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.file-picker__preview__file code,.file-picker__preview-empty__file code{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.file-picker__preview.disabled,.file-picker__preview-empty.disabled{border:2px solid rgba(0,0,0,.12)}.file-picker__preview.error{border:2px solid #ec4899}.file-picker__preview__delete{position:absolute;z-index:200;top:0;right:0;width:24px;height:24px;border-radius:3px;background-color:#f7f8fdb3;color:#100c27;cursor:pointer}.file-picker__preview__delete:hover{color:#fe733f}.file-picker__preview-empty__default{text-align:center}:host{display:block;width:130px;height:130px}.add-button{height:100%;padding:6px;text-align:center}.add-button__image{width:100%;height:54px}.add-button__content{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1599
1599
|
}
|
|
1600
1600
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFilePickerAddButtonComponent, decorators: [{
|
|
1601
1601
|
type: Component,
|
|
@@ -1798,7 +1798,7 @@ class GioFormFilePickerComponent {
|
|
|
1798
1798
|
this.onChangeCallback(this.fileValues.map(fileValue => fileValue.isNew ? new NewFile(fileValue.name, fileValue.dataUrl, fileValue.file) : fileValue.dataUrl));
|
|
1799
1799
|
}
|
|
1800
1800
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFilePickerComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1801
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFormFilePickerComponent, selector: "gio-form-file-picker", inputs: { multiple: "multiple", accept: "accept", disabled: "disabled" }, 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<ng-content select=\"gio-form-file-picker-label\"></ng-content>\n<div\n *ngIf=\"!isDisabled; else disabledTpl\"\n class=\"file-picker\"\n ngxFileDropzone\n [readMode]=\"readMode\"\n (fileDrop)=\"onFileDropped($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragleave)=\"onDragOver($event)\"\n (blur)=\"dragHover = false\"\n>\n <div\n *ngIf=\"!isComplete\"\n class=\"file-picker__add-button\"\n [class.complete]=\"isComplete\"\n [class.error]=\"!isValid\"\n [class.drag-hover]=\"dragHover\"\n ngxFilePicker\n [accept]=\"accept\"\n [readMode]=\"readMode\"\n [multiple]=\"multiple\"\n (filePick)=\"onFilePicked($event)\"\n (click)=\"onTouched()\"\n >\n <div #addButton class=\"file-picker__add-button__content\"><ng-content select=\"gio-form-file-picker-add-button\"></ng-content></div>\n <gio-form-file-picker-add-button *ngIf=\"addButton.children.length === 0\"></gio-form-file-picker-add-button>\n </div>\n <div *ngFor=\"let fileValue of fileValues\" class=\"file-picker__preview\" [class.drag-hover]=\"dragHover\" [class.error]=\"!isValid\">\n <a class=\"file-picker__preview__delete\" (click)=\"onRemoveFile(fileValue)\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </a>\n\n <ng-container *ngTemplateOutlet=\"filePreview; context: { fileValue: this.fileValue }\"></ng-container>\n </div>\n</div>\n\n<ng-template #disabledTpl>\n <div class=\"file-picker disabled\">\n <ng-container *ngIf=\"fileValues.length === 0\">\n <span class=\"file-picker__preview-empty disabled\">\n <gio-form-file-picker-empty\n *ngIf=\"previewEmpty.children.length === 0\"\n class=\"file-picker__preview-empty__default\"\n ></gio-form-file-picker-empty>\n <span #previewEmpty><ng-content select=\"gio-form-file-picker-empty\"></ng-content></span>\n </span>\n </ng-container>\n\n <div class=\"file-picker__preview disabled\" *ngFor=\"let fileValue of fileValues\">\n <ng-container *ngTemplateOutlet=\"filePreview; context: { fileValue: this.fileValue }\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #filePreview let-fileValue=\"fileValue\">\n <div class=\"file-picker__preview__image\" *ngIf=\"fileValue.isImage\" [style.background-image]=\"'url(' + fileValue.dataUrl + ')'\"></div>\n <div class=\"file-picker__preview__file\" *ngIf=\"!fileValue.isImage\">\n <p>{{ fileValue.name }}</p>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;flex-direction:column}.file-picker{display:flex;flex:1 1 auto;flex-flow:row wrap;padding:4px}.file-picker__add-button{border:2px dashed #606274;border-radius:6px;margin:4px;cursor:pointer}.file-picker__add-button:hover,.file-picker__add-button.drag-hover{border:2px dashed #876fec;background-color:#0000000a}.file-picker__add-button.drag-hover{pointer-events:none}.file-picker__add-button.complete{padding:6px;border:none}.file-picker__add-button.error{border:2px dashed #ec4899}.file-picker__preview,.file-picker__preview-empty{position:relative;display:flex;min-width:130px;min-height:130px;flex:0 0 130px;flex-flow:column nowrap;justify-content:space-between;padding:6px;border:2px solid #606274;border-radius:6px;margin:4px;inline-size:fit-content}.file-picker__preview.drag-hover,.file-picker__preview-empty.drag-hover{pointer-events:none}.file-picker__preview__image,.file-picker__preview-empty__image{width:100%;height:100%;background-position-x:center;background-position-y:center;background-repeat:no-repeat;background-size:contain}.file-picker__preview__file,.file-picker__preview-empty__file{display:flex;flex:1 1 auto;flex-direction:column;align-items:center;place-content:center center;text-align:center;font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.file-picker__preview__file code,.file-picker__preview-empty__file code{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.file-picker__preview.disabled,.file-picker__preview-empty.disabled{border:2px solid rgba(0,0,0,.12)}.file-picker__preview.error{border:2px solid #ec4899}.file-picker__preview__delete{position:absolute;z-index:200;top:0;right:0;width:24px;height:24px;border-radius:3px;background-color:#f7f8fdb3;color:#100c27;cursor:pointer}.file-picker__preview__delete:hover{color:#fe733f}.file-picker__preview-empty__default{text-align:center}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3$
|
|
1801
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFormFilePickerComponent, selector: "gio-form-file-picker", inputs: { multiple: "multiple", accept: "accept", disabled: "disabled" }, 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<ng-content select=\"gio-form-file-picker-label\"></ng-content>\n<div\n *ngIf=\"!isDisabled; else disabledTpl\"\n class=\"file-picker\"\n ngxFileDropzone\n [readMode]=\"readMode\"\n (fileDrop)=\"onFileDropped($event)\"\n (dragenter)=\"onDragEnter($event)\"\n (dragleave)=\"onDragOver($event)\"\n (blur)=\"dragHover = false\"\n>\n <div\n *ngIf=\"!isComplete\"\n class=\"file-picker__add-button\"\n [class.complete]=\"isComplete\"\n [class.error]=\"!isValid\"\n [class.drag-hover]=\"dragHover\"\n ngxFilePicker\n [accept]=\"accept\"\n [readMode]=\"readMode\"\n [multiple]=\"multiple\"\n (filePick)=\"onFilePicked($event)\"\n (click)=\"onTouched()\"\n >\n <div #addButton class=\"file-picker__add-button__content\"><ng-content select=\"gio-form-file-picker-add-button\"></ng-content></div>\n <gio-form-file-picker-add-button *ngIf=\"addButton.children.length === 0\"></gio-form-file-picker-add-button>\n </div>\n <div *ngFor=\"let fileValue of fileValues\" class=\"file-picker__preview\" [class.drag-hover]=\"dragHover\" [class.error]=\"!isValid\">\n <a class=\"file-picker__preview__delete\" (click)=\"onRemoveFile(fileValue)\">\n <mat-icon svgIcon=\"gio:cancel\"></mat-icon>\n </a>\n\n <ng-container *ngTemplateOutlet=\"filePreview; context: { fileValue: this.fileValue }\"></ng-container>\n </div>\n</div>\n\n<ng-template #disabledTpl>\n <div class=\"file-picker disabled\">\n <ng-container *ngIf=\"fileValues.length === 0\">\n <span class=\"file-picker__preview-empty disabled\">\n <gio-form-file-picker-empty\n *ngIf=\"previewEmpty.children.length === 0\"\n class=\"file-picker__preview-empty__default\"\n ></gio-form-file-picker-empty>\n <span #previewEmpty><ng-content select=\"gio-form-file-picker-empty\"></ng-content></span>\n </span>\n </ng-container>\n\n <div class=\"file-picker__preview disabled\" *ngFor=\"let fileValue of fileValues\">\n <ng-container *ngTemplateOutlet=\"filePreview; context: { fileValue: this.fileValue }\"></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #filePreview let-fileValue=\"fileValue\">\n <div class=\"file-picker__preview__image\" *ngIf=\"fileValue.isImage\" [style.background-image]=\"'url(' + fileValue.dataUrl + ')'\"></div>\n <div class=\"file-picker__preview__file\" *ngIf=\"!fileValue.isImage\">\n <p>{{ fileValue.name }}</p>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;flex-direction:column}.file-picker{display:flex;flex:1 1 auto;flex-flow:row wrap;padding:4px}.file-picker__add-button{border:2px dashed #606274;border-radius:6px;margin:4px;cursor:pointer}.file-picker__add-button:hover,.file-picker__add-button.drag-hover{border:2px dashed #876fec;background-color:#0000000a}.file-picker__add-button.drag-hover{pointer-events:none}.file-picker__add-button.complete{padding:6px;border:none}.file-picker__add-button.error{border:2px dashed #ec4899}.file-picker__preview,.file-picker__preview-empty{position:relative;display:flex;min-width:130px;min-height:130px;flex:0 0 130px;flex-flow:column nowrap;justify-content:space-between;padding:6px;border:2px solid #606274;border-radius:6px;margin:4px;inline-size:fit-content}.file-picker__preview.drag-hover,.file-picker__preview-empty.drag-hover{pointer-events:none}.file-picker__preview__image,.file-picker__preview-empty__image{width:100%;height:100%;background-position-x:center;background-position-y:center;background-repeat:no-repeat;background-size:contain}.file-picker__preview__file,.file-picker__preview-empty__file{display:flex;flex:1 1 auto;flex-direction:column;align-items:center;place-content:center center;text-align:center;font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.file-picker__preview__file code,.file-picker__preview-empty__file code{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.file-picker__preview.disabled,.file-picker__preview-empty.disabled{border:2px solid rgba(0,0,0,.12)}.file-picker__preview.error{border:2px solid #ec4899}.file-picker__preview__delete{position:absolute;z-index:200;top:0;right:0;width:24px;height:24px;border-radius:3px;background-color:#f7f8fdb3;color:#100c27;cursor:pointer}.file-picker__preview__delete:hover{color:#fe733f}.file-picker__preview-empty__default{text-align:center}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3$1.FileDropzoneDirective, selector: "[ngxFileDropzone]", outputs: ["fileDrop"], exportAs: ["ngxFileDropzone"] }, { kind: "directive", type: i3$1.FilePickerDirective, selector: "[ngxFilePicker]", inputs: ["accept", "multiple"], outputs: ["filePick"], exportAs: ["ngxFilePicker"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioFormFilePickerAddButtonComponent, selector: "gio-form-file-picker-add-button" }, { kind: "component", type: GioFormFilePickerEmptyComponent, selector: "gio-form-file-picker-empty" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1802
1802
|
}
|
|
1803
1803
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFilePickerComponent, decorators: [{
|
|
1804
1804
|
type: Component,
|
|
@@ -2337,6 +2337,12 @@ class GioFormlyJsonSchemaService {
|
|
|
2337
2337
|
monacoEditorConfig: mapSource.gioConfig?.monacoEditorConfig,
|
|
2338
2338
|
};
|
|
2339
2339
|
}
|
|
2340
|
+
else if (mapSource.type === 'string' && mapSource.format === 'gio-cron') {
|
|
2341
|
+
mappedField.type = 'gio-cron';
|
|
2342
|
+
mappedField.props = {
|
|
2343
|
+
...mappedField.props,
|
|
2344
|
+
};
|
|
2345
|
+
}
|
|
2340
2346
|
return mappedField;
|
|
2341
2347
|
}
|
|
2342
2348
|
bannerMap(mappedField, mapSource) {
|
|
@@ -3595,719 +3601,403 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
3595
3601
|
* See the License for the specific language governing permissions and
|
|
3596
3602
|
* limitations under the License.
|
|
3597
3603
|
*/
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
*
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
*
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3604
|
+
const CRON_DISPLAY_MODES = ['secondly', 'minutely', 'hourly', 'daily', 'weekly', 'monthly', 'custom'];
|
|
3605
|
+
const DISPLAY_MODE_LIST = [
|
|
3606
|
+
{
|
|
3607
|
+
mode: 'secondly',
|
|
3608
|
+
default: '*/1 * * * * *',
|
|
3609
|
+
regex: /^(\*\/\d+\s)(\*\s){4}\*/,
|
|
3610
|
+
},
|
|
3611
|
+
{
|
|
3612
|
+
mode: 'minutely',
|
|
3613
|
+
default: '0 */1 * * * *',
|
|
3614
|
+
regex: /^0\s\*\/\d+\s(\*\s){3}\*$/,
|
|
3615
|
+
},
|
|
3616
|
+
{
|
|
3617
|
+
mode: 'hourly',
|
|
3618
|
+
default: '0 0 */1 * * *',
|
|
3619
|
+
regex: /^0\s\d+\s\*\/\d+\s(\*\s){2}\*$/,
|
|
3620
|
+
},
|
|
3621
|
+
{
|
|
3622
|
+
mode: 'daily',
|
|
3623
|
+
default: '0 0 0 */1 * *',
|
|
3624
|
+
regex: /^0\s\d+\s\d+\s\*\/\d+\s\*\s\*$/,
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
mode: 'weekly',
|
|
3628
|
+
default: '0 0 0 * * 0',
|
|
3629
|
+
regex: /^(\d{1,2}\s){2,3}(\*\s){2}\d{1,2}$/,
|
|
3630
|
+
},
|
|
3631
|
+
{
|
|
3632
|
+
mode: 'monthly',
|
|
3633
|
+
default: '0 0 0 1 * *',
|
|
3634
|
+
regex: /^(\d+\s){3,4}\*\s\*$/,
|
|
3635
|
+
},
|
|
3636
|
+
{
|
|
3637
|
+
mode: 'custom',
|
|
3638
|
+
default: '* * * * * *',
|
|
3639
|
+
regex: /^.*$/,
|
|
3640
|
+
},
|
|
3641
|
+
];
|
|
3642
|
+
const getDefaultCronDisplay = (mode) => {
|
|
3643
|
+
const modeFound = DISPLAY_MODE_LIST.find(mf => mf.mode === mode);
|
|
3644
|
+
if (!modeFound) {
|
|
3645
|
+
throw new Error('Invalid cron mode.');
|
|
3646
|
+
}
|
|
3647
|
+
return parseCronExpression(modeFound.default);
|
|
3648
|
+
};
|
|
3649
|
+
const parseCronExpression = (cronExpression) => {
|
|
3650
|
+
throwIfInvalid(cronExpression);
|
|
3651
|
+
const parts = cronExpression.split(' ');
|
|
3652
|
+
// Normalize cron so that second segment is included.
|
|
3653
|
+
if (cronExpression && cronExpression.split(' ').length === 6) {
|
|
3654
|
+
parts.push('');
|
|
3655
|
+
}
|
|
3656
|
+
const hourInterval = getHourInterval(parts);
|
|
3657
|
+
const minuteInterval = getMinuteInterval(parts);
|
|
3658
|
+
const secondInterval = getSecondInterval(parts);
|
|
3659
|
+
const dayInterval = getDayInterval(parts);
|
|
3660
|
+
const dayOfWeek = getDayOfWeek(parts);
|
|
3661
|
+
const dayOfMonth = getDayOfMonth(parts);
|
|
3662
|
+
const hours = getHours(parts);
|
|
3663
|
+
const minutes = getMinutes(parts);
|
|
3664
|
+
const displayMode = getDisplayMode(cronExpression);
|
|
3665
|
+
switch (displayMode.mode) {
|
|
3666
|
+
case 'secondly':
|
|
3667
|
+
return {
|
|
3668
|
+
mode: 'secondly',
|
|
3669
|
+
secondInterval,
|
|
3670
|
+
};
|
|
3671
|
+
case 'minutely':
|
|
3672
|
+
return {
|
|
3673
|
+
mode: 'minutely',
|
|
3674
|
+
minuteInterval,
|
|
3675
|
+
};
|
|
3676
|
+
case 'hourly':
|
|
3677
|
+
return {
|
|
3678
|
+
mode: 'hourly',
|
|
3679
|
+
hourInterval,
|
|
3680
|
+
minutes,
|
|
3681
|
+
};
|
|
3682
|
+
case 'daily':
|
|
3683
|
+
return {
|
|
3684
|
+
mode: 'daily',
|
|
3685
|
+
dayInterval,
|
|
3686
|
+
hours,
|
|
3687
|
+
minutes,
|
|
3688
|
+
};
|
|
3689
|
+
case 'weekly':
|
|
3690
|
+
return {
|
|
3691
|
+
mode: 'weekly',
|
|
3692
|
+
dayOfWeek,
|
|
3693
|
+
hours,
|
|
3694
|
+
minutes,
|
|
3695
|
+
};
|
|
3696
|
+
case 'monthly':
|
|
3697
|
+
return {
|
|
3698
|
+
mode: 'monthly',
|
|
3699
|
+
dayOfMonth,
|
|
3700
|
+
hours,
|
|
3701
|
+
minutes,
|
|
3702
|
+
};
|
|
3703
|
+
case 'custom':
|
|
3704
|
+
return {
|
|
3705
|
+
mode: 'custom',
|
|
3706
|
+
customExpression: cronExpression,
|
|
3707
|
+
};
|
|
3708
|
+
}
|
|
3709
|
+
};
|
|
3710
|
+
const toCronExpression = (cronDisplay) => {
|
|
3711
|
+
switch (cronDisplay.mode) {
|
|
3712
|
+
case 'secondly':
|
|
3713
|
+
return `*/${cronDisplay.secondInterval} * * * * *`;
|
|
3714
|
+
case 'minutely':
|
|
3715
|
+
return `0 */${cronDisplay.minuteInterval} * * * *`;
|
|
3716
|
+
case 'hourly':
|
|
3717
|
+
return `0 ${cronDisplay.minutes} */${cronDisplay.hourInterval} * * *`;
|
|
3718
|
+
case 'daily':
|
|
3719
|
+
return `0 ${cronDisplay.minutes} ${cronDisplay.hours} */${cronDisplay.dayInterval} * *`;
|
|
3720
|
+
case 'weekly':
|
|
3721
|
+
return `0 ${cronDisplay.minutes} ${cronDisplay.hours} * * ${cronDisplay.dayOfWeek}`;
|
|
3722
|
+
case 'monthly':
|
|
3723
|
+
return `0 ${cronDisplay.minutes} ${cronDisplay.hours} ${cronDisplay.dayOfMonth} * *`;
|
|
3724
|
+
case 'custom':
|
|
3725
|
+
return `${cronDisplay.customExpression}`;
|
|
3726
|
+
}
|
|
3727
|
+
};
|
|
3728
|
+
const toCronDescription = (cronExpression) => {
|
|
3729
|
+
throwIfInvalid(cronExpression);
|
|
3730
|
+
if (!isEmpty(cronExpression)) {
|
|
3731
|
+
return Cronstrue.toString(cronExpression);
|
|
3732
|
+
}
|
|
3733
|
+
return '';
|
|
3734
|
+
};
|
|
3735
|
+
/**
|
|
3736
|
+
* Simple validation to ensure that the cron expression has 6 parts.
|
|
3737
|
+
* Note : The full cron expression validation is done by the backend.
|
|
3674
3738
|
*/
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3739
|
+
const throwIfInvalid = (cronExpression) => {
|
|
3740
|
+
const parts = cronExpression.trim().split(/\s+/);
|
|
3741
|
+
if (parts.length != 6) {
|
|
3742
|
+
throw new Error('Cron expression must have 6 parts.');
|
|
3679
3743
|
}
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
<div class="wrapper__header__collapse">
|
|
3689
|
-
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
3690
|
-
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
3691
|
-
</button>
|
|
3692
|
-
</div>
|
|
3693
|
-
</div>
|
|
3694
|
-
|
|
3695
|
-
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
3696
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
|
3697
|
-
</div>
|
|
3698
|
-
|
|
3699
|
-
<div [hidden]="collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
3700
|
-
<div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
|
|
3701
|
-
<formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
|
|
3702
|
-
<div class="wrapper__rows__row__remove">
|
|
3703
|
-
<button type="button" mat-icon-button aria-label="Remove" [disabled]="this.form?.disabled ?? false" (click)="remove(i)">
|
|
3704
|
-
<mat-icon svgIcon="gio:cancel"></mat-icon>
|
|
3705
|
-
</button>
|
|
3706
|
-
</div>
|
|
3707
|
-
</div>
|
|
3708
|
-
|
|
3709
|
-
<div>
|
|
3710
|
-
<button type="button" mat-stroked-button aria-label="Add" [disabled]="this.form?.disabled ?? false" (click)="add()">
|
|
3711
|
-
<mat-icon svgIcon="gio:plus"></mat-icon> Add
|
|
3712
|
-
</button>
|
|
3713
|
-
</div>
|
|
3714
|
-
</div>
|
|
3715
|
-
</div>
|
|
3716
|
-
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.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-size:14px;font-weight:500;line-height:22px;font-family: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-size:12px;font-weight:400;line-height:16px;font-family: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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "component", type: i2$3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
|
|
3717
|
-
}
|
|
3718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsArrayTypeComponent, decorators: [{
|
|
3719
|
-
type: Component,
|
|
3720
|
-
args: [{ selector: 'gio-fjs-array-type', template: `
|
|
3721
|
-
<div class="wrapper" [class.error]="formControl.touched && formControl.invalid">
|
|
3722
|
-
<div class="wrapper__header">
|
|
3723
|
-
<div class="wrapper__header__text">
|
|
3724
|
-
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
3725
|
-
<p *ngIf="to.description">{{ to.description }}</p>
|
|
3726
|
-
</div>
|
|
3727
|
-
<div class="wrapper__header__collapse">
|
|
3728
|
-
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
3729
|
-
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
3730
|
-
</button>
|
|
3731
|
-
</div>
|
|
3732
|
-
</div>
|
|
3733
|
-
|
|
3734
|
-
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
3735
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
|
3736
|
-
</div>
|
|
3737
|
-
|
|
3738
|
-
<div [hidden]="collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
3739
|
-
<div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
|
|
3740
|
-
<formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
|
|
3741
|
-
<div class="wrapper__rows__row__remove">
|
|
3742
|
-
<button type="button" mat-icon-button aria-label="Remove" [disabled]="this.form?.disabled ?? false" (click)="remove(i)">
|
|
3743
|
-
<mat-icon svgIcon="gio:cancel"></mat-icon>
|
|
3744
|
-
</button>
|
|
3745
|
-
</div>
|
|
3746
|
-
</div>
|
|
3747
|
-
|
|
3748
|
-
<div>
|
|
3749
|
-
<button type="button" mat-stroked-button aria-label="Add" [disabled]="this.form?.disabled ?? false" (click)="add()">
|
|
3750
|
-
<mat-icon svgIcon="gio:plus"></mat-icon> Add
|
|
3751
|
-
</button>
|
|
3752
|
-
</div>
|
|
3753
|
-
</div>
|
|
3754
|
-
</div>
|
|
3755
|
-
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.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-size:14px;font-weight:500;line-height:22px;font-family: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-size:12px;font-weight:400;line-height:16px;font-family: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"] }]
|
|
3756
|
-
}] });
|
|
3757
|
-
|
|
3758
|
-
function minItemsValidationMessage(error, field) {
|
|
3759
|
-
return `Should NOT have fewer than ${field.props?.minItems} items`;
|
|
3760
|
-
}
|
|
3761
|
-
function maxItemsValidationMessage(error, field) {
|
|
3762
|
-
return `Should NOT have more than ${field.props?.maxItems} items`;
|
|
3763
|
-
}
|
|
3764
|
-
function minLengthValidationMessage(error, field) {
|
|
3765
|
-
return `Should NOT be shorter than ${field.props?.minLength} characters`;
|
|
3766
|
-
}
|
|
3767
|
-
function maxLengthValidationMessage(error, field) {
|
|
3768
|
-
return `Should NOT be longer than ${field.props?.maxLength} characters`;
|
|
3769
|
-
}
|
|
3770
|
-
function minValidationMessage(error, field) {
|
|
3771
|
-
return `Should be >= ${field.props?.min}`;
|
|
3772
|
-
}
|
|
3773
|
-
function maxValidationMessage(error, field) {
|
|
3774
|
-
return `Should be <= ${field.props?.max}`;
|
|
3775
|
-
}
|
|
3776
|
-
function multipleOfValidationMessage(error, field) {
|
|
3777
|
-
return `Should be multiple of ${field.props?.step}`;
|
|
3778
|
-
}
|
|
3779
|
-
function exclusiveMinimumValidationMessage(error, field) {
|
|
3780
|
-
return `Should be > ${field.props?.step}`;
|
|
3781
|
-
}
|
|
3782
|
-
function exclusiveMaximumValidationMessage(error, field) {
|
|
3783
|
-
return `Should be < ${field.props?.step}`;
|
|
3784
|
-
}
|
|
3785
|
-
function constValidationMessage(error, field) {
|
|
3786
|
-
return `Should be equal to constant "${field.props?.const}"`;
|
|
3787
|
-
}
|
|
3788
|
-
function typeValidationMessage({ schemaType }) {
|
|
3789
|
-
return `Should be "${schemaType[0]}".`;
|
|
3790
|
-
}
|
|
3791
|
-
|
|
3792
|
-
/*
|
|
3793
|
-
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
3794
|
-
*
|
|
3795
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3796
|
-
* you may not use this file except in compliance with the License.
|
|
3797
|
-
* You may obtain a copy of the License at
|
|
3798
|
-
*
|
|
3799
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3800
|
-
*
|
|
3801
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3802
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3803
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3804
|
-
* See the License for the specific language governing permissions and
|
|
3805
|
-
* limitations under the License.
|
|
3806
|
-
*/
|
|
3807
|
-
class GioBannerWrapperComponent extends FieldWrapper {
|
|
3808
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioBannerWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3809
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioBannerWrapperComponent, selector: "gio-banner-wrapper", usesInheritance: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"wrapper\">\n <div class=\"banner\">\n <div class=\"banner__icon\"><mat-icon svgIcon=\"gio:info\"></mat-icon></div>\n <div>\n <div class=\"banner__title\" [innerHTML]=\"props.bannerTitle\"></div>\n <div class=\"banner__text\" [innerHTML]=\"props.bannerText\"></div>\n </div>\n </div>\n <ng-container #fieldComponent></ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}::ng-deep gio-banner-wrapper ul{padding-inline-start:16px}.wrapper{padding:8px 0}.banner{display:flex;flex-direction:row;align-items:flex-start;padding:8px;border-radius:8px;margin-bottom:8px;background:#e7e8ef;gap:8px}.banner__icon{padding-top:2px}.banner__icon mat-icon{width:16px;height:16px;color:#6c59bd}.banner__title{font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.banner__text{font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;color:#606274}\n"], dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
3810
|
-
}
|
|
3811
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioBannerWrapperComponent, decorators: [{
|
|
3812
|
-
type: Component,
|
|
3813
|
-
args: [{ selector: 'gio-banner-wrapper', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"wrapper\">\n <div class=\"banner\">\n <div class=\"banner__icon\"><mat-icon svgIcon=\"gio:info\"></mat-icon></div>\n <div>\n <div class=\"banner__title\" [innerHTML]=\"props.bannerTitle\"></div>\n <div class=\"banner__text\" [innerHTML]=\"props.bannerText\"></div>\n </div>\n </div>\n <ng-container #fieldComponent></ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}::ng-deep gio-banner-wrapper ul{padding-inline-start:16px}.wrapper{padding:8px 0}.banner{display:flex;flex-direction:row;align-items:flex-start;padding:8px;border-radius:8px;margin-bottom:8px;background:#e7e8ef;gap:8px}.banner__icon{padding-top:2px}.banner__icon mat-icon{width:16px;height:16px;color:#6c59bd}.banner__title{font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.banner__text{font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;color:#606274}\n"] }]
|
|
3814
|
-
}] });
|
|
3815
|
-
|
|
3816
|
-
function bannerExtension(field) {
|
|
3817
|
-
if (!field.props || (field.wrappers && field.wrappers.indexOf('gio-with-banner') !== -1)) {
|
|
3818
|
-
return;
|
|
3744
|
+
};
|
|
3745
|
+
const getDisplayMode = (cronExpression) => {
|
|
3746
|
+
const modeFound = DISPLAY_MODE_LIST.find(mf => {
|
|
3747
|
+
const regex = mf.regex;
|
|
3748
|
+
return regex.test(cronExpression);
|
|
3749
|
+
});
|
|
3750
|
+
if (!modeFound) {
|
|
3751
|
+
throw new Error('Invalid cron expression.');
|
|
3819
3752
|
}
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3753
|
+
return {
|
|
3754
|
+
mode: modeFound.mode,
|
|
3755
|
+
default: modeFound.default,
|
|
3756
|
+
};
|
|
3757
|
+
};
|
|
3758
|
+
const getSecondInterval = (expressionParts) => {
|
|
3759
|
+
const v = getSegment(expressionParts[0])[0][1];
|
|
3760
|
+
return typeof v === 'number' ? v : undefined;
|
|
3761
|
+
};
|
|
3762
|
+
const getMinuteInterval = (expressionParts) => {
|
|
3763
|
+
const v = getSegment(expressionParts[1])[0][1];
|
|
3764
|
+
return typeof v === 'number' ? v : undefined;
|
|
3765
|
+
};
|
|
3766
|
+
const getHourInterval = (expressionParts) => {
|
|
3767
|
+
const v = getSegment(expressionParts[2])[0][1];
|
|
3768
|
+
return typeof v === 'number' ? v : undefined;
|
|
3769
|
+
};
|
|
3770
|
+
const getDayInterval = (expressionParts) => {
|
|
3771
|
+
const v = getSegment(expressionParts[3])[0][1];
|
|
3772
|
+
return typeof v === 'number' ? v : undefined;
|
|
3773
|
+
};
|
|
3774
|
+
const getDayOfWeek = (expressionParts) => {
|
|
3775
|
+
const v = getSegment(expressionParts[5])[0][0];
|
|
3776
|
+
return typeof v === 'number' ? v : undefined;
|
|
3777
|
+
};
|
|
3778
|
+
const getDayOfMonth = (expressionParts) => {
|
|
3779
|
+
const v = getSegment(expressionParts[3])[0][0];
|
|
3780
|
+
return typeof v === 'number' ? v : undefined;
|
|
3781
|
+
};
|
|
3782
|
+
const getMinutes = (expressionParts) => {
|
|
3783
|
+
const v = getSegment(expressionParts[1])[0][0];
|
|
3784
|
+
return typeof v === 'number' ? v : undefined;
|
|
3785
|
+
};
|
|
3786
|
+
const getHours = (expressionParts) => {
|
|
3787
|
+
const v = getSegment(expressionParts[2])[0][0];
|
|
3788
|
+
return typeof v === 'number' ? v : undefined;
|
|
3789
|
+
};
|
|
3790
|
+
const getSegment = (value) => {
|
|
3791
|
+
if (value === undefined) {
|
|
3792
|
+
value = '*';
|
|
3823
3793
|
}
|
|
3824
|
-
|
|
3794
|
+
return value.split(',').map(s => {
|
|
3795
|
+
if (s === undefined) {
|
|
3796
|
+
s = '*';
|
|
3797
|
+
}
|
|
3798
|
+
return s.split('/').map(p => {
|
|
3799
|
+
const v = parseInt(p, 10);
|
|
3800
|
+
return isNaN(v) ? p : v;
|
|
3801
|
+
});
|
|
3802
|
+
});
|
|
3803
|
+
};
|
|
3825
3804
|
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
* You may obtain a copy of the License at
|
|
3832
|
-
*
|
|
3833
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3834
|
-
*
|
|
3835
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3836
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3837
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3838
|
-
* See the License for the specific language governing permissions and
|
|
3839
|
-
* limitations under the License.
|
|
3840
|
-
*/
|
|
3841
|
-
class GioFjsMultiSchemaTypeComponent extends FieldType {
|
|
3842
|
-
constructor(cdr) {
|
|
3843
|
-
super();
|
|
3805
|
+
class GioFormCronComponent {
|
|
3806
|
+
constructor(elRef, fm, ngZone, cdr) {
|
|
3807
|
+
this.elRef = elRef;
|
|
3808
|
+
this.fm = fm;
|
|
3809
|
+
this.ngZone = ngZone;
|
|
3844
3810
|
this.cdr = cdr;
|
|
3811
|
+
this._onChange = () => ({});
|
|
3812
|
+
this._onTouched = () => ({});
|
|
3813
|
+
this.seconds = [...range(0, 60)];
|
|
3814
|
+
this.minutes = [...range(0, 60)];
|
|
3815
|
+
this.hours = [...range(0, 24)];
|
|
3816
|
+
this.daysOfMonth = [...range(1, 32)];
|
|
3817
|
+
this.daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
|
3818
|
+
this.isDisabled = false;
|
|
3819
|
+
this.smallDisplay = false;
|
|
3820
|
+
this.touched = false;
|
|
3821
|
+
this.focused = false;
|
|
3822
|
+
this.hasError = false;
|
|
3845
3823
|
this.unsubscribe$ = new Subject();
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3824
|
+
fm.monitor(elRef.nativeElement, true)
|
|
3825
|
+
.pipe(takeUntil(this.unsubscribe$))
|
|
3826
|
+
.subscribe(origin => {
|
|
3827
|
+
this.focused = !!origin;
|
|
3828
|
+
this._onTouched();
|
|
3829
|
+
this.touched = true;
|
|
3830
|
+
});
|
|
3850
3831
|
}
|
|
3851
3832
|
ngOnInit() {
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
</gio-form-slide-toggle>
|
|
3914
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: GioFormSlideToggleComponent, selector: "gio-form-slide-toggle", inputs: ["appearance"] }, { kind: "component", type: GioFormLabelComponent, selector: "gio-form-label" }, { kind: "directive", type: GioFormSlideToggleDirective, selector: "[gioFormSlideToggle]" }, { kind: "component", type: i5$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
|
|
3915
|
-
}
|
|
3916
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsToggleTypeComponent, decorators: [{
|
|
3917
|
-
type: Component,
|
|
3918
|
-
args: [{
|
|
3919
|
-
selector: 'gio-fjs-toggle-type',
|
|
3920
|
-
template: `
|
|
3921
|
-
<gio-form-slide-toggle>
|
|
3922
|
-
<gio-form-label>{{ props.label }}</gio-form-label>
|
|
3923
|
-
{{ props.description }}
|
|
3924
|
-
<mat-slide-toggle
|
|
3925
|
-
gioFormSlideToggle
|
|
3926
|
-
[id]="id"
|
|
3927
|
-
[formControl]="formControl"
|
|
3928
|
-
[formlyAttributes]="field"
|
|
3929
|
-
[tabIndex]="props.tabindex"
|
|
3930
|
-
></mat-slide-toggle>
|
|
3931
|
-
</gio-form-slide-toggle>
|
|
3932
|
-
`,
|
|
3933
|
-
}]
|
|
3934
|
-
}] });
|
|
3935
|
-
|
|
3936
|
-
/*
|
|
3937
|
-
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
3938
|
-
*
|
|
3939
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3940
|
-
* you may not use this file except in compliance with the License.
|
|
3941
|
-
* You may obtain a copy of the License at
|
|
3942
|
-
*
|
|
3943
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3944
|
-
*
|
|
3945
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
3946
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3947
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3948
|
-
* See the License for the specific language governing permissions and
|
|
3949
|
-
* limitations under the License.
|
|
3950
|
-
*/
|
|
3951
|
-
class GioFjsHeadersTypeComponent extends FieldType {
|
|
3952
|
-
constructor() {
|
|
3953
|
-
super(...arguments);
|
|
3954
|
-
this.defaultOptions = {
|
|
3955
|
-
props: {
|
|
3956
|
-
outputConfig: this.outputConfig,
|
|
3957
|
-
},
|
|
3958
|
-
};
|
|
3959
|
-
this.collapse = false;
|
|
3960
|
-
}
|
|
3961
|
-
get outputConfig() {
|
|
3962
|
-
return {
|
|
3963
|
-
keyName: 'name',
|
|
3964
|
-
valueName: 'value',
|
|
3965
|
-
};
|
|
3966
|
-
}
|
|
3967
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsHeadersTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3968
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsHeadersTypeComponent, selector: "gio-fjs-headers-type", usesInheritance: true, ngImport: i0, template: `
|
|
3969
|
-
<div class="wrapper">
|
|
3970
|
-
<div class="wrapper__header">
|
|
3971
|
-
<div class="wrapper__header__text">
|
|
3972
|
-
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
3973
|
-
<p *ngIf="to.description">{{ to.description }}</p>
|
|
3974
|
-
</div>
|
|
3975
|
-
<div class="wrapper__header__collapse">
|
|
3976
|
-
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
3977
|
-
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
3978
|
-
</button>
|
|
3979
|
-
</div>
|
|
3980
|
-
</div>
|
|
3981
|
-
<div class="wrapper__error" *ngIf="showError && formControl.errors">
|
|
3982
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
|
3983
|
-
</div>
|
|
3984
|
-
<div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
3985
|
-
<gio-form-headers [headerFieldMapper]="outputConfig" [formControl]="formControl"></gio-form-headers>
|
|
3986
|
-
</div>
|
|
3987
|
-
</div>
|
|
3988
|
-
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.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-size:14px;font-weight:500;line-height:22px;font-family: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-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioFormHeadersComponent, selector: "gio-form-headers", inputs: ["headerFieldMapper"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
|
|
3989
|
-
}
|
|
3990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsHeadersTypeComponent, decorators: [{
|
|
3991
|
-
type: Component,
|
|
3992
|
-
args: [{ selector: 'gio-fjs-headers-type', template: `
|
|
3993
|
-
<div class="wrapper">
|
|
3994
|
-
<div class="wrapper__header">
|
|
3995
|
-
<div class="wrapper__header__text">
|
|
3996
|
-
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
3997
|
-
<p *ngIf="to.description">{{ to.description }}</p>
|
|
3998
|
-
</div>
|
|
3999
|
-
<div class="wrapper__header__collapse">
|
|
4000
|
-
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
4001
|
-
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
4002
|
-
</button>
|
|
4003
|
-
</div>
|
|
4004
|
-
</div>
|
|
4005
|
-
<div class="wrapper__error" *ngIf="showError && formControl.errors">
|
|
4006
|
-
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4007
|
-
</div>
|
|
4008
|
-
<div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
4009
|
-
<gio-form-headers [headerFieldMapper]="outputConfig" [formControl]="formControl"></gio-form-headers>
|
|
4010
|
-
</div>
|
|
4011
|
-
</div>
|
|
4012
|
-
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.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-size:14px;font-weight:500;line-height:22px;font-family: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-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"] }]
|
|
4013
|
-
}] });
|
|
4014
|
-
|
|
4015
|
-
/*
|
|
4016
|
-
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4017
|
-
*
|
|
4018
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4019
|
-
* you may not use this file except in compliance with the License.
|
|
4020
|
-
* You may obtain a copy of the License at
|
|
4021
|
-
*
|
|
4022
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4023
|
-
*
|
|
4024
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
4025
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4026
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4027
|
-
* See the License for the specific language governing permissions and
|
|
4028
|
-
* limitations under the License.
|
|
4029
|
-
*/
|
|
4030
|
-
class GioPasswordEyeWrapperComponent extends FieldWrapper {
|
|
4031
|
-
constructor() {
|
|
4032
|
-
super(...arguments);
|
|
4033
|
-
this.hide = true;
|
|
3833
|
+
if (window.ResizeObserver) {
|
|
3834
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
3835
|
+
this.ngZone.run(() => {
|
|
3836
|
+
const width = entries[0].contentRect.width;
|
|
3837
|
+
this.smallDisplay = width < 580;
|
|
3838
|
+
this.cdr.markForCheck();
|
|
3839
|
+
});
|
|
3840
|
+
});
|
|
3841
|
+
this.resizeObserver.observe(this.elRef.nativeElement);
|
|
3842
|
+
}
|
|
3843
|
+
this.internalFormGroup = new UntypedFormGroup({
|
|
3844
|
+
mode: new UntypedFormControl(),
|
|
3845
|
+
secondInterval: new UntypedFormControl(),
|
|
3846
|
+
minuteInterval: new UntypedFormControl(),
|
|
3847
|
+
hourInterval: new UntypedFormControl(),
|
|
3848
|
+
dayInterval: new UntypedFormControl(),
|
|
3849
|
+
dayOfWeek: new UntypedFormControl(),
|
|
3850
|
+
dayOfMonth: new UntypedFormControl(),
|
|
3851
|
+
hours: new UntypedFormControl(),
|
|
3852
|
+
minutes: new UntypedFormControl(),
|
|
3853
|
+
customExpression: new UntypedFormControl(),
|
|
3854
|
+
});
|
|
3855
|
+
this.isDisabled ? this.internalFormGroup.disable({ emitEvent: false }) : this.internalFormGroup.enable({ emitEvent: false });
|
|
3856
|
+
this.internalFormGroup
|
|
3857
|
+
.get('mode')
|
|
3858
|
+
?.valueChanges.pipe(filter(mode => !!mode), tap(mode => {
|
|
3859
|
+
this.cronDisplay = getDefaultCronDisplay(mode);
|
|
3860
|
+
this.refreshInternalForm();
|
|
3861
|
+
}), takeUntil(this.unsubscribe$))
|
|
3862
|
+
.subscribe();
|
|
3863
|
+
this.internalFormGroup.valueChanges
|
|
3864
|
+
?.pipe(tap(value => {
|
|
3865
|
+
this.hasError = false;
|
|
3866
|
+
if (!value?.mode) {
|
|
3867
|
+
this._onChange(null);
|
|
3868
|
+
return;
|
|
3869
|
+
}
|
|
3870
|
+
try {
|
|
3871
|
+
this.value = toCronExpression({
|
|
3872
|
+
mode: value.mode,
|
|
3873
|
+
secondInterval: value.secondInterval,
|
|
3874
|
+
minuteInterval: value.minuteInterval,
|
|
3875
|
+
hourInterval: value.hourInterval,
|
|
3876
|
+
dayInterval: value.dayInterval,
|
|
3877
|
+
dayOfWeek: value.dayOfWeek,
|
|
3878
|
+
dayOfMonth: value.dayOfMonth,
|
|
3879
|
+
customExpression: value.customExpression,
|
|
3880
|
+
hours: value.hours,
|
|
3881
|
+
minutes: value.minutes,
|
|
3882
|
+
});
|
|
3883
|
+
this.expressionDescription = toCronDescription(this.value);
|
|
3884
|
+
this._onChange(this.value);
|
|
3885
|
+
}
|
|
3886
|
+
catch (error) {
|
|
3887
|
+
this.hasError = true;
|
|
3888
|
+
this.expressionDescription = `${error}` ?? 'Invalid cron expression.';
|
|
3889
|
+
this._onChange(null);
|
|
3890
|
+
}
|
|
3891
|
+
}), takeUntil(this.unsubscribe$))
|
|
3892
|
+
.subscribe();
|
|
3893
|
+
this.refreshInternalForm();
|
|
4034
3894
|
}
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
3895
|
+
ngOnDestroy() {
|
|
3896
|
+
this.fm.stopMonitoring(this.elRef.nativeElement);
|
|
3897
|
+
this.resizeObserver?.unobserve(this.elRef.nativeElement);
|
|
3898
|
+
this.unsubscribe$.next();
|
|
3899
|
+
this.unsubscribe$.complete();
|
|
3900
|
+
}
|
|
3901
|
+
// From ControlValueAccessor interface
|
|
3902
|
+
writeValue(value) {
|
|
3903
|
+
if (isEmpty(value)) {
|
|
3904
|
+
this.onClear();
|
|
3905
|
+
return;
|
|
3906
|
+
}
|
|
3907
|
+
try {
|
|
3908
|
+
this.value = value;
|
|
3909
|
+
this.cronDisplay = parseCronExpression(value);
|
|
3910
|
+
this.expressionDescription = toCronDescription(this.value);
|
|
3911
|
+
this.refreshInternalForm();
|
|
3912
|
+
}
|
|
3913
|
+
catch (error) {
|
|
3914
|
+
this.hasError = true;
|
|
3915
|
+
this.expressionDescription = `${error}` ?? 'Invalid cron expression.';
|
|
4038
3916
|
}
|
|
4039
3917
|
}
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
this.
|
|
4043
|
-
this.props.type = this.hide ? 'password' : 'text';
|
|
3918
|
+
// From ControlValueAccessor interface
|
|
3919
|
+
registerOnChange(fn) {
|
|
3920
|
+
this._onChange = fn;
|
|
4044
3921
|
}
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
<ng-template #matSuffix>
|
|
4050
|
-
<button mat-icon-button type="button" (click)="addonEyeClick($event)">
|
|
4051
|
-
<mat-icon [svgIcon]="hide ? 'gio:eye-empty' : 'gio:eye-off'"></mat-icon>
|
|
4052
|
-
</button>
|
|
4053
|
-
</ng-template>
|
|
4054
|
-
`, isInline: true, dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
|
|
4055
|
-
}
|
|
4056
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioPasswordEyeWrapperComponent, decorators: [{
|
|
4057
|
-
type: Component,
|
|
4058
|
-
args: [{
|
|
4059
|
-
selector: 'gio-password-eye-wrapper',
|
|
4060
|
-
template: `
|
|
4061
|
-
<ng-container #fieldComponent></ng-container>
|
|
4062
|
-
|
|
4063
|
-
<ng-template #matSuffix>
|
|
4064
|
-
<button mat-icon-button type="button" (click)="addonEyeClick($event)">
|
|
4065
|
-
<mat-icon [svgIcon]="hide ? 'gio:eye-empty' : 'gio:eye-off'"></mat-icon>
|
|
4066
|
-
</button>
|
|
4067
|
-
</ng-template>
|
|
4068
|
-
`,
|
|
4069
|
-
}]
|
|
4070
|
-
}], propDecorators: { matSuffix: [{
|
|
4071
|
-
type: ViewChild,
|
|
4072
|
-
args: ['matSuffix', { static: true }]
|
|
4073
|
-
}] } });
|
|
4074
|
-
function passwordEyeExtension(field) {
|
|
4075
|
-
if (!field.props || (field.wrappers && field.wrappers.indexOf('gio-password-eye') !== -1)) {
|
|
4076
|
-
return;
|
|
3922
|
+
// From ControlValueAccessor interface
|
|
3923
|
+
registerOnTouched(fn) {
|
|
3924
|
+
this._onTouched = fn;
|
|
4077
3925
|
}
|
|
4078
|
-
|
|
4079
|
-
|
|
3926
|
+
// From ControlValueAccessor interface
|
|
3927
|
+
setDisabledState(isDisabled) {
|
|
3928
|
+
this.isDisabled = isDisabled;
|
|
3929
|
+
this.refreshInternalForm();
|
|
4080
3930
|
}
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
/*
|
|
4084
|
-
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4085
|
-
*
|
|
4086
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4087
|
-
* you may not use this file except in compliance with the License.
|
|
4088
|
-
* You may obtain a copy of the License at
|
|
4089
|
-
*
|
|
4090
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4091
|
-
*
|
|
4092
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
4093
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4094
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4095
|
-
* See the License for the specific language governing permissions and
|
|
4096
|
-
* limitations under the License.
|
|
4097
|
-
*/
|
|
4098
|
-
class GioFjsCodeEditorTypeComponent extends FieldType$1 {
|
|
4099
|
-
ngOnInit() {
|
|
4100
|
-
const language = this.props.monacoEditorConfig?.language;
|
|
4101
|
-
switch (language) {
|
|
4102
|
-
case 'json':
|
|
4103
|
-
this.languageConfig = {
|
|
4104
|
-
language: 'json',
|
|
4105
|
-
schemas: [],
|
|
4106
|
-
};
|
|
4107
|
-
break;
|
|
4108
|
-
default:
|
|
4109
|
-
this.languageConfig = undefined;
|
|
4110
|
-
}
|
|
3931
|
+
validate(_) {
|
|
3932
|
+
return this.hasError ? { invalid: true } : null;
|
|
4111
3933
|
}
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
GioFjsObjectTypeComponent,
|
|
4154
|
-
GioFjsMultiSchemaTypeComponent,
|
|
4155
|
-
GioFjsArrayTypeComponent,
|
|
4156
|
-
GioFjsToggleTypeComponent,
|
|
4157
|
-
GioFjsHeadersTypeComponent,
|
|
4158
|
-
GioFjsCodeEditorTypeComponent,
|
|
4159
|
-
GioBannerWrapperComponent,
|
|
4160
|
-
GioPasswordEyeWrapperComponent], imports: [CommonModule,
|
|
4161
|
-
A11yModule,
|
|
4162
|
-
ReactiveFormsModule, i2$3.FormlyModule, FormlyMaterialModule,
|
|
4163
|
-
MatInputModule,
|
|
4164
|
-
GioIconsModule,
|
|
4165
|
-
GioFormSlideToggleModule,
|
|
4166
|
-
GioFormHeadersModule,
|
|
4167
|
-
GioMonacoEditorModule,
|
|
4168
|
-
MatSlideToggleModule,
|
|
4169
|
-
MatButtonModule], exports: [GioFormJsonSchemaComponent, FormlyModule] }); }
|
|
4170
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormJsonSchemaModule, providers: [GioFormlyJsonSchemaService], imports: [CommonModule,
|
|
4171
|
-
A11yModule,
|
|
4172
|
-
ReactiveFormsModule,
|
|
4173
|
-
FormlyModule.forRoot({
|
|
4174
|
-
validationMessages: [
|
|
4175
|
-
{ name: 'required', message: 'This field is required' },
|
|
4176
|
-
{ name: 'type', message: typeValidationMessage },
|
|
4177
|
-
{ name: 'minLength', message: minLengthValidationMessage },
|
|
4178
|
-
{ name: 'maxLength', message: maxLengthValidationMessage },
|
|
4179
|
-
{ name: 'min', message: minValidationMessage },
|
|
4180
|
-
{ name: 'max', message: maxValidationMessage },
|
|
4181
|
-
{ name: 'multipleOf', message: multipleOfValidationMessage },
|
|
4182
|
-
{ name: 'exclusiveMinimum', message: exclusiveMinimumValidationMessage },
|
|
4183
|
-
{ name: 'exclusiveMaximum', message: exclusiveMaximumValidationMessage },
|
|
4184
|
-
{ name: 'minItems', message: minItemsValidationMessage },
|
|
4185
|
-
{ name: 'maxItems', message: maxItemsValidationMessage },
|
|
4186
|
-
{ name: 'uniqueItems', message: 'Should NOT have duplicate items' },
|
|
4187
|
-
{ name: 'const', message: constValidationMessage },
|
|
4188
|
-
],
|
|
4189
|
-
wrappers: [
|
|
4190
|
-
{ name: 'gio-with-banner', component: GioBannerWrapperComponent },
|
|
4191
|
-
{ name: 'gio-password-eye', component: GioPasswordEyeWrapperComponent },
|
|
4192
|
-
],
|
|
4193
|
-
types: [
|
|
4194
|
-
{ name: 'null', component: GioFjsNullTypeComponent, wrappers: ['form-field'] },
|
|
4195
|
-
{ name: 'array', component: GioFjsArrayTypeComponent },
|
|
4196
|
-
{ name: 'object', component: GioFjsObjectTypeComponent },
|
|
4197
|
-
{ name: 'multischema', component: GioFjsMultiSchemaTypeComponent },
|
|
4198
|
-
{
|
|
4199
|
-
name: 'toggle',
|
|
4200
|
-
component: GioFjsToggleTypeComponent,
|
|
4201
|
-
},
|
|
4202
|
-
{
|
|
4203
|
-
name: 'gio-code-editor',
|
|
4204
|
-
component: GioFjsCodeEditorTypeComponent,
|
|
4205
|
-
wrappers: ['form-field'],
|
|
4206
|
-
},
|
|
4207
|
-
{
|
|
4208
|
-
name: 'gio-headers-array',
|
|
4209
|
-
component: GioFjsHeadersTypeComponent,
|
|
4210
|
-
},
|
|
4211
|
-
],
|
|
4212
|
-
extensions: [
|
|
4213
|
-
{ name: 'banner', extension: { onPopulate: bannerExtension } },
|
|
4214
|
-
{ name: 'password-eye', extension: { onPopulate: passwordEyeExtension } },
|
|
4215
|
-
],
|
|
4216
|
-
extras: {
|
|
4217
|
-
checkExpressionOn: 'changeDetectionCheck',
|
|
4218
|
-
},
|
|
4219
|
-
}),
|
|
4220
|
-
FormlyMaterialModule,
|
|
4221
|
-
MatInputModule,
|
|
4222
|
-
GioIconsModule,
|
|
4223
|
-
GioFormSlideToggleModule,
|
|
4224
|
-
GioFormHeadersModule,
|
|
4225
|
-
GioMonacoEditorModule,
|
|
4226
|
-
MatSlideToggleModule,
|
|
4227
|
-
MatButtonModule, FormlyModule] }); }
|
|
3934
|
+
onClear({ touched } = {}) {
|
|
3935
|
+
this.value = undefined;
|
|
3936
|
+
this.cronDisplay = undefined;
|
|
3937
|
+
this.internalFormGroup?.reset({}, { emitEvent: true });
|
|
3938
|
+
if (touched) {
|
|
3939
|
+
this.touched = true;
|
|
3940
|
+
this._onTouched();
|
|
3941
|
+
}
|
|
3942
|
+
}
|
|
3943
|
+
refreshInternalForm() {
|
|
3944
|
+
if (!this.internalFormGroup)
|
|
3945
|
+
return;
|
|
3946
|
+
this.isDisabled ? this.internalFormGroup.disable({ emitEvent: false }) : this.internalFormGroup.enable({ emitEvent: false });
|
|
3947
|
+
const d = this.cronDisplay;
|
|
3948
|
+
if (d) {
|
|
3949
|
+
this.internalFormGroup.patchValue({
|
|
3950
|
+
mode: d.mode,
|
|
3951
|
+
customExpression: d.customExpression,
|
|
3952
|
+
secondInterval: d.secondInterval,
|
|
3953
|
+
minuteInterval: d.minuteInterval,
|
|
3954
|
+
hourInterval: d.hourInterval,
|
|
3955
|
+
dayInterval: d.dayInterval,
|
|
3956
|
+
dayOfWeek: d.dayOfWeek,
|
|
3957
|
+
dayOfMonth: d.dayOfMonth,
|
|
3958
|
+
hours: d.hours,
|
|
3959
|
+
minutes: d.minutes,
|
|
3960
|
+
}, { emitEvent: false });
|
|
3961
|
+
}
|
|
3962
|
+
}
|
|
3963
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronComponent, deps: [{ token: i0.ElementRef }, { token: i1$2.FocusMonitor }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3964
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFormCronComponent, selector: "gio-form-cron", host: { properties: { "class.disabled": "this.isDisabled", "class.smallDisplay": "this.smallDisplay" } }, providers: [
|
|
3965
|
+
{
|
|
3966
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3967
|
+
useExisting: forwardRef(() => GioFormCronComponent),
|
|
3968
|
+
multi: true,
|
|
3969
|
+
},
|
|
3970
|
+
{
|
|
3971
|
+
provide: NG_VALIDATORS,
|
|
3972
|
+
useExisting: forwardRef(() => GioFormCronComponent),
|
|
3973
|
+
multi: true,
|
|
3974
|
+
},
|
|
3975
|
+
], 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 class=\"label\"><ng-content select=\"gio-form-cron-label\"></ng-content></div>\n<div class=\"wrapper\" [class.smallDisplay]=\"smallDisplay\" [class.disabled]=\"isDisabled\">\n <ng-container *ngIf=\"internalFormGroup\" [formGroup]=\"internalFormGroup\">\n <div class=\"menu\">\n <mat-button-toggle-group class=\"gio-button-toggle-group menu__mode\" name=\"mode\" aria-label=\"Cron mode\" formControlName=\"mode\">\n <mat-button-toggle value=\"secondly\" matTooltip=\"Secondly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 's' : 'Secondly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"minutely\" matTooltip=\"Minutely\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'm' : 'Minutely'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"hourly\" matTooltip=\"Hourly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'h' : 'Hourly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"daily\" matTooltip=\"Daily\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'D' : 'Daily'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"weekly\" matTooltip=\"Weekly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'W' : 'Weekly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"monthly\" matTooltip=\"Monthly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'M' : 'Monthly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"custom\" matTooltip=\"Custom\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'C' : 'Custom'\n }}</mat-button-toggle>\n </mat-button-toggle-group>\n <button\n *ngIf=\"value && !isDisabled\"\n mat-button\n aria-label=\"Clear\"\n matTooltip=\"Clear\"\n type=\"button\"\n (click)=\"onClear({ touched: true })\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <ng-container [ngSwitch]=\"internalFormGroup.get('mode')?.value\">\n <ng-container *ngSwitchCase=\"'secondly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Second</mat-label>\n <mat-select formControlName=\"secondInterval\">\n <mat-option *ngFor=\"let second of seconds\" [value]=\"second\">{{ second }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'minutely'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minuteInterval\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'hourly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hour(s)</mat-label>\n <mat-select formControlName=\"hourInterval\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'daily'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Day(s)</mat-label>\n <mat-select formControlName=\"dayInterval\">\n <mat-option *ngFor=\"let day of daysOfMonth\" [value]=\"day\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hour(s)</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'weekly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-medium\">\n <mat-label>Day of the week</mat-label>\n <mat-select formControlName=\"dayOfWeek\">\n <mat-option *ngFor=\"let day of daysOfWeek; let index = index\" [value]=\"index\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hours</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minutes</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'monthly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">On the </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Day(s)</mat-label>\n <mat-select formControlName=\"dayOfMonth\">\n <mat-option *ngFor=\"let day of daysOfMonth\" [value]=\"day\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> of every month at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hours</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minutes</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <div class=\"modeForm\">\n <mat-form-field class=\"modeForm__field-custom\">\n <mat-label>Cron expression</mat-label>\n <input matInput formControlName=\"customExpression\" placeholder=\"* * * * * *\" />\n </mat-form-field>\n </div>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"value; else placeholder\" class=\"preview\">\n <span *ngIf=\"internalFormGroup.get('mode')?.value !== 'custom'\" class=\"preview__value\">\n {{ value }}\n </span>\n <span class=\"preview__hint\">{{ expressionDescription }}</span>\n </div>\n </ng-container>\n\n <ng-template #placeholder>\n <div class=\"placeholder\">No cron expression defined.</div>\n </ng-template>\n</div>\n<div class=\"hint\"><ng-content select=\"gio-form-cron-hint\"></ng-content></div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;min-width:342px;flex-direction:column}::ng-deep gio-form-cron{--mat-form-field-container-height: 48px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 12px;--mat-form-field-filled-with-label-container-padding-top: 12px;--mat-form-field-filled-with-label-container-padding-bottom: 12px}.label{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-left:10px;color:var(--mdc-outlined-text-field-label-text-color)}.label:empty{display:none}.wrapper{display:inline-flex;flex-direction:column;padding:8px;border:1px solid var(--mdc-outlined-text-field-outline-color);border-radius:4px}.wrapper:hover:not(.disabled){padding:8px;border:1px solid var(--mdc-outlined-text-field-hover-outline-color)}.wrapper .menu{display:inline-flex;align-items:center;justify-content:space-between;margin-bottom:4px}.wrapper .menu__mode{border:none;margin-bottom:0}.wrapper .modeForm{display:flex;flex-wrap:wrap;align-items:center;margin-bottom:8px;column-gap:4px}.wrapper .modeForm__field-small,.wrapper .modeForm__field-medium,.wrapper .modeForm__field-custom{display:inline-block;height:52px}.wrapper .modeForm__field-small{width:124px}.wrapper .modeForm__field-medium{width:158px}.wrapper .modeForm__field-custom{width:100%}.wrapper .preview,.wrapper .placeholder{display:flex;flex-direction:column;align-items:center;padding:8px;border-radius:4px;background-color:#e7e8ef;color:#000}.wrapper .preview__hint,.wrapper .placeholder{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.wrapper.disabled .preview,.wrapper.disabled .placeholder{opacity:.4}.hint{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-top:2px;padding-left:10px}.hint:empty{display:none}:host(.ng-invalid.ng-touched) .wrapper{padding:8px;border-width:1px;border-color:var(--mdc-outlined-text-field-error-outline-color)}:host(.ng-invalid.ng-touched) .wrapper .preview,:host(.ng-invalid.ng-touched) .wrapper .placeholder{color:#ec4899}:host(.ng-invalid.ng-touched) .label,:host(.ng-invalid.ng-touched) .hint{color:var(--mdc-outlined-text-field-error-outline-color)}:host(.disabled) .wrapper{border-color:#e7e8ef}:host(.disabled) .wrapper,:host(.disabled) .hint,:host(.disabled) .label{color:#d3d5dc}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i4$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i6$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
4228
3976
|
}
|
|
4229
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4230
|
-
type:
|
|
4231
|
-
args: [{
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
GioPasswordEyeWrapperComponent,
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
{ name: 'required', message: 'This field is required' },
|
|
4251
|
-
{ name: 'type', message: typeValidationMessage },
|
|
4252
|
-
{ name: 'minLength', message: minLengthValidationMessage },
|
|
4253
|
-
{ name: 'maxLength', message: maxLengthValidationMessage },
|
|
4254
|
-
{ name: 'min', message: minValidationMessage },
|
|
4255
|
-
{ name: 'max', message: maxValidationMessage },
|
|
4256
|
-
{ name: 'multipleOf', message: multipleOfValidationMessage },
|
|
4257
|
-
{ name: 'exclusiveMinimum', message: exclusiveMinimumValidationMessage },
|
|
4258
|
-
{ name: 'exclusiveMaximum', message: exclusiveMaximumValidationMessage },
|
|
4259
|
-
{ name: 'minItems', message: minItemsValidationMessage },
|
|
4260
|
-
{ name: 'maxItems', message: maxItemsValidationMessage },
|
|
4261
|
-
{ name: 'uniqueItems', message: 'Should NOT have duplicate items' },
|
|
4262
|
-
{ name: 'const', message: constValidationMessage },
|
|
4263
|
-
],
|
|
4264
|
-
wrappers: [
|
|
4265
|
-
{ name: 'gio-with-banner', component: GioBannerWrapperComponent },
|
|
4266
|
-
{ name: 'gio-password-eye', component: GioPasswordEyeWrapperComponent },
|
|
4267
|
-
],
|
|
4268
|
-
types: [
|
|
4269
|
-
{ name: 'null', component: GioFjsNullTypeComponent, wrappers: ['form-field'] },
|
|
4270
|
-
{ name: 'array', component: GioFjsArrayTypeComponent },
|
|
4271
|
-
{ name: 'object', component: GioFjsObjectTypeComponent },
|
|
4272
|
-
{ name: 'multischema', component: GioFjsMultiSchemaTypeComponent },
|
|
4273
|
-
{
|
|
4274
|
-
name: 'toggle',
|
|
4275
|
-
component: GioFjsToggleTypeComponent,
|
|
4276
|
-
},
|
|
4277
|
-
{
|
|
4278
|
-
name: 'gio-code-editor',
|
|
4279
|
-
component: GioFjsCodeEditorTypeComponent,
|
|
4280
|
-
wrappers: ['form-field'],
|
|
4281
|
-
},
|
|
4282
|
-
{
|
|
4283
|
-
name: 'gio-headers-array',
|
|
4284
|
-
component: GioFjsHeadersTypeComponent,
|
|
4285
|
-
},
|
|
4286
|
-
],
|
|
4287
|
-
extensions: [
|
|
4288
|
-
{ name: 'banner', extension: { onPopulate: bannerExtension } },
|
|
4289
|
-
{ name: 'password-eye', extension: { onPopulate: passwordEyeExtension } },
|
|
4290
|
-
],
|
|
4291
|
-
extras: {
|
|
4292
|
-
checkExpressionOn: 'changeDetectionCheck',
|
|
4293
|
-
},
|
|
4294
|
-
}),
|
|
4295
|
-
FormlyMaterialModule,
|
|
4296
|
-
MatInputModule,
|
|
4297
|
-
GioIconsModule,
|
|
4298
|
-
GioFormSlideToggleModule,
|
|
4299
|
-
GioFormHeadersModule,
|
|
4300
|
-
GioMonacoEditorModule,
|
|
4301
|
-
MatSlideToggleModule,
|
|
4302
|
-
MatButtonModule,
|
|
4303
|
-
],
|
|
4304
|
-
exports: [GioFormJsonSchemaComponent, FormlyModule],
|
|
4305
|
-
providers: [GioFormlyJsonSchemaService],
|
|
4306
|
-
}]
|
|
4307
|
-
}] });
|
|
3977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronComponent, decorators: [{
|
|
3978
|
+
type: Component,
|
|
3979
|
+
args: [{ selector: 'gio-form-cron', providers: [
|
|
3980
|
+
{
|
|
3981
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3982
|
+
useExisting: forwardRef(() => GioFormCronComponent),
|
|
3983
|
+
multi: true,
|
|
3984
|
+
},
|
|
3985
|
+
{
|
|
3986
|
+
provide: NG_VALIDATORS,
|
|
3987
|
+
useExisting: forwardRef(() => GioFormCronComponent),
|
|
3988
|
+
multi: true,
|
|
3989
|
+
},
|
|
3990
|
+
], 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 class=\"label\"><ng-content select=\"gio-form-cron-label\"></ng-content></div>\n<div class=\"wrapper\" [class.smallDisplay]=\"smallDisplay\" [class.disabled]=\"isDisabled\">\n <ng-container *ngIf=\"internalFormGroup\" [formGroup]=\"internalFormGroup\">\n <div class=\"menu\">\n <mat-button-toggle-group class=\"gio-button-toggle-group menu__mode\" name=\"mode\" aria-label=\"Cron mode\" formControlName=\"mode\">\n <mat-button-toggle value=\"secondly\" matTooltip=\"Secondly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 's' : 'Secondly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"minutely\" matTooltip=\"Minutely\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'm' : 'Minutely'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"hourly\" matTooltip=\"Hourly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'h' : 'Hourly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"daily\" matTooltip=\"Daily\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'D' : 'Daily'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"weekly\" matTooltip=\"Weekly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'W' : 'Weekly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"monthly\" matTooltip=\"Monthly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'M' : 'Monthly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"custom\" matTooltip=\"Custom\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'C' : 'Custom'\n }}</mat-button-toggle>\n </mat-button-toggle-group>\n <button\n *ngIf=\"value && !isDisabled\"\n mat-button\n aria-label=\"Clear\"\n matTooltip=\"Clear\"\n type=\"button\"\n (click)=\"onClear({ touched: true })\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <ng-container [ngSwitch]=\"internalFormGroup.get('mode')?.value\">\n <ng-container *ngSwitchCase=\"'secondly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Second</mat-label>\n <mat-select formControlName=\"secondInterval\">\n <mat-option *ngFor=\"let second of seconds\" [value]=\"second\">{{ second }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'minutely'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minuteInterval\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'hourly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hour(s)</mat-label>\n <mat-select formControlName=\"hourInterval\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'daily'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Day(s)</mat-label>\n <mat-select formControlName=\"dayInterval\">\n <mat-option *ngFor=\"let day of daysOfMonth\" [value]=\"day\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hour(s)</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'weekly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-medium\">\n <mat-label>Day of the week</mat-label>\n <mat-select formControlName=\"dayOfWeek\">\n <mat-option *ngFor=\"let day of daysOfWeek; let index = index\" [value]=\"index\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hours</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minutes</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'monthly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">On the </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Day(s)</mat-label>\n <mat-select formControlName=\"dayOfMonth\">\n <mat-option *ngFor=\"let day of daysOfMonth\" [value]=\"day\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> of every month at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hours</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minutes</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <div class=\"modeForm\">\n <mat-form-field class=\"modeForm__field-custom\">\n <mat-label>Cron expression</mat-label>\n <input matInput formControlName=\"customExpression\" placeholder=\"* * * * * *\" />\n </mat-form-field>\n </div>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"value; else placeholder\" class=\"preview\">\n <span *ngIf=\"internalFormGroup.get('mode')?.value !== 'custom'\" class=\"preview__value\">\n {{ value }}\n </span>\n <span class=\"preview__hint\">{{ expressionDescription }}</span>\n </div>\n </ng-container>\n\n <ng-template #placeholder>\n <div class=\"placeholder\">No cron expression defined.</div>\n </ng-template>\n</div>\n<div class=\"hint\"><ng-content select=\"gio-form-cron-hint\"></ng-content></div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;min-width:342px;flex-direction:column}::ng-deep gio-form-cron{--mat-form-field-container-height: 48px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 12px;--mat-form-field-filled-with-label-container-padding-top: 12px;--mat-form-field-filled-with-label-container-padding-bottom: 12px}.label{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-left:10px;color:var(--mdc-outlined-text-field-label-text-color)}.label:empty{display:none}.wrapper{display:inline-flex;flex-direction:column;padding:8px;border:1px solid var(--mdc-outlined-text-field-outline-color);border-radius:4px}.wrapper:hover:not(.disabled){padding:8px;border:1px solid var(--mdc-outlined-text-field-hover-outline-color)}.wrapper .menu{display:inline-flex;align-items:center;justify-content:space-between;margin-bottom:4px}.wrapper .menu__mode{border:none;margin-bottom:0}.wrapper .modeForm{display:flex;flex-wrap:wrap;align-items:center;margin-bottom:8px;column-gap:4px}.wrapper .modeForm__field-small,.wrapper .modeForm__field-medium,.wrapper .modeForm__field-custom{display:inline-block;height:52px}.wrapper .modeForm__field-small{width:124px}.wrapper .modeForm__field-medium{width:158px}.wrapper .modeForm__field-custom{width:100%}.wrapper .preview,.wrapper .placeholder{display:flex;flex-direction:column;align-items:center;padding:8px;border-radius:4px;background-color:#e7e8ef;color:#000}.wrapper .preview__hint,.wrapper .placeholder{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.wrapper.disabled .preview,.wrapper.disabled .placeholder{opacity:.4}.hint{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-top:2px;padding-left:10px}.hint:empty{display:none}:host(.ng-invalid.ng-touched) .wrapper{padding:8px;border-width:1px;border-color:var(--mdc-outlined-text-field-error-outline-color)}:host(.ng-invalid.ng-touched) .wrapper .preview,:host(.ng-invalid.ng-touched) .wrapper .placeholder{color:#ec4899}:host(.ng-invalid.ng-touched) .label,:host(.ng-invalid.ng-touched) .hint{color:var(--mdc-outlined-text-field-error-outline-color)}:host(.disabled) .wrapper{border-color:#e7e8ef}:host(.disabled) .wrapper,:host(.disabled) .hint,:host(.disabled) .label{color:#d3d5dc}\n"] }]
|
|
3991
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$2.FocusMonitor }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { isDisabled: [{
|
|
3992
|
+
type: HostBinding,
|
|
3993
|
+
args: ['class.disabled']
|
|
3994
|
+
}], smallDisplay: [{
|
|
3995
|
+
type: HostBinding,
|
|
3996
|
+
args: ['class.smallDisplay']
|
|
3997
|
+
}] } });
|
|
4308
3998
|
|
|
4309
3999
|
/*
|
|
4310
|
-
* Copyright (C)
|
|
4000
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
4311
4001
|
*
|
|
4312
4002
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4313
4003
|
* you may not use this file except in compliance with the License.
|
|
@@ -4321,6 +4011,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4321
4011
|
* See the License for the specific language governing permissions and
|
|
4322
4012
|
* limitations under the License.
|
|
4323
4013
|
*/
|
|
4014
|
+
class GioFormCronLabelComponent {
|
|
4015
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4016
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFormCronLabelComponent, selector: "gio-form-cron-label", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
4017
|
+
}
|
|
4018
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronLabelComponent, decorators: [{
|
|
4019
|
+
type: Component,
|
|
4020
|
+
args: [{
|
|
4021
|
+
selector: 'gio-form-cron-label',
|
|
4022
|
+
template: `<ng-content></ng-content>`,
|
|
4023
|
+
}]
|
|
4024
|
+
}] });
|
|
4324
4025
|
|
|
4325
4026
|
/*
|
|
4326
4027
|
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
@@ -4337,83 +4038,75 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4337
4038
|
* See the License for the specific language governing permissions and
|
|
4338
4039
|
* limitations under the License.
|
|
4339
4040
|
*/
|
|
4340
|
-
class
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
this.formGroupDirective = formGroupDirective;
|
|
4344
|
-
}
|
|
4345
|
-
focusOnFirstInvalid() {
|
|
4346
|
-
const selector = '.ng-invalid[formControlName],input.ng-invalid,mat-select.ng-invalid,textarea.ng-invalid,.gio-ng-invalid';
|
|
4347
|
-
try {
|
|
4348
|
-
// Mark all controls as touched to display errors
|
|
4349
|
-
if (this.formGroupDirective) {
|
|
4350
|
-
this.formGroupDirective.control.markAllAsTouched();
|
|
4351
|
-
this.formGroupDirective.control.updateValueAndValidity();
|
|
4352
|
-
}
|
|
4353
|
-
const parentForm = this.hostElement.nativeElement.closest('form');
|
|
4354
|
-
const invalidFieldElements = parentForm?.querySelectorAll(selector);
|
|
4355
|
-
const invalidControl = this.getFirstInvalidControl(invalidFieldElements);
|
|
4356
|
-
if (invalidControl) {
|
|
4357
|
-
invalidControl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
4358
|
-
invalidControl.focus({ preventScroll: true });
|
|
4359
|
-
}
|
|
4360
|
-
}
|
|
4361
|
-
catch (error) {
|
|
4362
|
-
// Best effort. If the focus doesn't work it's not very important
|
|
4363
|
-
// 🧪 Useful to avoid som error in tests
|
|
4364
|
-
}
|
|
4365
|
-
}
|
|
4366
|
-
getFirstInvalidControl(invalidFieldElements, index = 0) {
|
|
4367
|
-
let invalidControl = invalidFieldElements?.item(index);
|
|
4368
|
-
const hasIgnoreAttribute = invalidControl?.attributes?.getNamedItem(GIO_FORM_FOCUS_INVALID_IGNORE_SELECTOR);
|
|
4369
|
-
if (hasIgnoreAttribute) {
|
|
4370
|
-
invalidControl = this.getFirstInvalidControl(invalidFieldElements, index + 1);
|
|
4371
|
-
}
|
|
4372
|
-
return invalidControl;
|
|
4373
|
-
}
|
|
4374
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioBaseFormFocusInvalidDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4375
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: GioBaseFormFocusInvalidDirective, ngImport: i0 }); }
|
|
4376
|
-
}
|
|
4377
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioBaseFormFocusInvalidDirective, decorators: [{
|
|
4378
|
-
type: Directive
|
|
4379
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.FormGroupDirective, decorators: [{
|
|
4380
|
-
type: Optional
|
|
4381
|
-
}] }] });
|
|
4382
|
-
class GioFormFocusInvalidFormDirective extends GioBaseFormFocusInvalidDirective {
|
|
4383
|
-
onFormSubmit() {
|
|
4384
|
-
this.focusOnFirstInvalid();
|
|
4385
|
-
}
|
|
4386
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFocusInvalidFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4387
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: GioFormFocusInvalidFormDirective, selector: "form[gioFormFocusInvalid]", host: { listeners: { "submit": "onFormSubmit()" } }, usesInheritance: true, ngImport: i0 }); }
|
|
4041
|
+
class GioFormCronHintComponent {
|
|
4042
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4043
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFormCronHintComponent, selector: "gio-form-cron-hint", ngImport: i0, template: `<ng-content></ng-content>`, isInline: true }); }
|
|
4388
4044
|
}
|
|
4389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4390
|
-
type:
|
|
4045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronHintComponent, decorators: [{
|
|
4046
|
+
type: Component,
|
|
4391
4047
|
args: [{
|
|
4392
|
-
selector: 'form
|
|
4048
|
+
selector: 'gio-form-cron-hint',
|
|
4049
|
+
template: `<ng-content></ng-content>`,
|
|
4393
4050
|
}]
|
|
4394
|
-
}]
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4051
|
+
}] });
|
|
4052
|
+
|
|
4053
|
+
/*
|
|
4054
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
4055
|
+
*
|
|
4056
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4057
|
+
* you may not use this file except in compliance with the License.
|
|
4058
|
+
* You may obtain a copy of the License at
|
|
4059
|
+
*
|
|
4060
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4061
|
+
*
|
|
4062
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4063
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4064
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4065
|
+
* See the License for the specific language governing permissions and
|
|
4066
|
+
* limitations under the License.
|
|
4067
|
+
*/
|
|
4068
|
+
class GioFormCronModule {
|
|
4069
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4070
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronModule, declarations: [GioFormCronComponent, GioFormCronLabelComponent, GioFormCronHintComponent], imports: [CommonModule,
|
|
4071
|
+
ReactiveFormsModule,
|
|
4072
|
+
MatButtonToggleModule,
|
|
4073
|
+
MatFormFieldModule,
|
|
4074
|
+
MatSelectModule,
|
|
4075
|
+
MatInputModule,
|
|
4076
|
+
MatButtonModule,
|
|
4077
|
+
MatTooltipModule,
|
|
4078
|
+
GioIconsModule], exports: [GioFormCronComponent, GioFormCronLabelComponent, GioFormCronHintComponent] }); }
|
|
4079
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronModule, imports: [CommonModule,
|
|
4080
|
+
ReactiveFormsModule,
|
|
4081
|
+
MatButtonToggleModule,
|
|
4082
|
+
MatFormFieldModule,
|
|
4083
|
+
MatSelectModule,
|
|
4084
|
+
MatInputModule,
|
|
4085
|
+
MatButtonModule,
|
|
4086
|
+
MatTooltipModule,
|
|
4087
|
+
GioIconsModule] }); }
|
|
4404
4088
|
}
|
|
4405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4406
|
-
type:
|
|
4089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronModule, decorators: [{
|
|
4090
|
+
type: NgModule,
|
|
4407
4091
|
args: [{
|
|
4408
|
-
|
|
4092
|
+
imports: [
|
|
4093
|
+
CommonModule,
|
|
4094
|
+
ReactiveFormsModule,
|
|
4095
|
+
MatButtonToggleModule,
|
|
4096
|
+
MatFormFieldModule,
|
|
4097
|
+
MatSelectModule,
|
|
4098
|
+
MatInputModule,
|
|
4099
|
+
MatButtonModule,
|
|
4100
|
+
MatTooltipModule,
|
|
4101
|
+
GioIconsModule,
|
|
4102
|
+
],
|
|
4103
|
+
declarations: [GioFormCronComponent, GioFormCronLabelComponent, GioFormCronHintComponent],
|
|
4104
|
+
exports: [GioFormCronComponent, GioFormCronLabelComponent, GioFormCronHintComponent],
|
|
4409
4105
|
}]
|
|
4410
|
-
}]
|
|
4411
|
-
type: HostListener,
|
|
4412
|
-
args: ['click']
|
|
4413
|
-
}] } });
|
|
4106
|
+
}] });
|
|
4414
4107
|
|
|
4415
4108
|
/*
|
|
4416
|
-
* Copyright (C)
|
|
4109
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4417
4110
|
*
|
|
4418
4111
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4419
4112
|
* you may not use this file except in compliance with the License.
|
|
@@ -4427,16 +4120,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4427
4120
|
* See the License for the specific language governing permissions and
|
|
4428
4121
|
* limitations under the License.
|
|
4429
4122
|
*/
|
|
4430
|
-
class
|
|
4431
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4432
|
-
static { this.ɵ
|
|
4433
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFocusInvalidModule }); }
|
|
4123
|
+
class GioFjsNullTypeComponent extends FieldType {
|
|
4124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsNullTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsNullTypeComponent, selector: "gio-fjs-null-type", usesInheritance: true, ngImport: i0, template: ``, isInline: true }); }
|
|
4434
4126
|
}
|
|
4435
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4436
|
-
type:
|
|
4127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsNullTypeComponent, decorators: [{
|
|
4128
|
+
type: Component,
|
|
4437
4129
|
args: [{
|
|
4438
|
-
|
|
4439
|
-
|
|
4130
|
+
selector: 'gio-fjs-null-type',
|
|
4131
|
+
template: ``,
|
|
4440
4132
|
}]
|
|
4441
4133
|
}] });
|
|
4442
4134
|
|
|
@@ -4455,31 +4147,175 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4455
4147
|
* See the License for the specific language governing permissions and
|
|
4456
4148
|
* limitations under the License.
|
|
4457
4149
|
*/
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4150
|
+
class GioFjsObjectTypeComponent extends FieldType {
|
|
4151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsObjectTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4152
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsObjectTypeComponent, selector: "gio-fjs-object-type", usesInheritance: true, ngImport: i0, template: `
|
|
4153
|
+
<div class="wrapper">
|
|
4154
|
+
<div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
|
|
4155
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
4156
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
4157
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4158
|
+
</div>
|
|
4159
|
+
<div class="wrapper__fields">
|
|
4160
|
+
<ng-container *ngFor="let f of field.fieldGroup">
|
|
4161
|
+
<formly-field *ngIf="f.type" class="wrapper__fields__field" [field]="f"></formly-field>
|
|
4162
|
+
</ng-container>
|
|
4163
|
+
</div>
|
|
4164
|
+
</div>
|
|
4165
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.wrapper{display:flex;flex-direction:column}.wrapper__title{font-size:18px;font-weight:600;line-height:24px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:16px}.wrapper:empty{display:none}.wrapper__error{font-size:12px;font-weight:400;line-height:16px;font-family: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:has(>.wrapper__fields__field:only-child):has(>.wrapper__fields__field:empty){display:none}.wrapper__fields__field:empty{display:none}.wrapper__fields__field+.wrapper__fields__field:not(:empty){display:block;margin-top:8px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "component", type: i2$3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }] }); }
|
|
4166
|
+
}
|
|
4167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsObjectTypeComponent, decorators: [{
|
|
4168
|
+
type: Component,
|
|
4169
|
+
args: [{ selector: 'gio-fjs-object-type', template: `
|
|
4170
|
+
<div class="wrapper">
|
|
4171
|
+
<div class="wrapper__title" *ngIf="to.label">{{ to.label }}</div>
|
|
4172
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
4173
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
4174
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4175
|
+
</div>
|
|
4176
|
+
<div class="wrapper__fields">
|
|
4177
|
+
<ng-container *ngFor="let f of field.fieldGroup">
|
|
4178
|
+
<formly-field *ngIf="f.type" class="wrapper__fields__field" [field]="f"></formly-field>
|
|
4179
|
+
</ng-container>
|
|
4180
|
+
</div>
|
|
4181
|
+
</div>
|
|
4182
|
+
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.wrapper{display:flex;flex-direction:column}.wrapper__title{font-size:18px;font-weight:600;line-height:24px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:16px}.wrapper:empty{display:none}.wrapper__error{font-size:12px;font-weight:400;line-height:16px;font-family: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:has(>.wrapper__fields__field:only-child):has(>.wrapper__fields__field:empty){display:none}.wrapper__fields__field:empty{display:none}.wrapper__fields__field+.wrapper__fields__field:not(:empty){display:block;margin-top:8px}\n"] }]
|
|
4183
|
+
}] });
|
|
4184
|
+
|
|
4185
|
+
/*
|
|
4186
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4187
|
+
*
|
|
4188
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4189
|
+
* you may not use this file except in compliance with the License.
|
|
4190
|
+
* You may obtain a copy of the License at
|
|
4191
|
+
*
|
|
4192
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4193
|
+
*
|
|
4194
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4195
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4196
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4197
|
+
* See the License for the specific language governing permissions and
|
|
4198
|
+
* limitations under the License.
|
|
4461
4199
|
*/
|
|
4462
|
-
class
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
changeValue(value) {
|
|
4467
|
-
this._onTouched();
|
|
4468
|
-
this._onChange(value);
|
|
4200
|
+
class GioFjsArrayTypeComponent extends FieldArrayType {
|
|
4201
|
+
constructor() {
|
|
4202
|
+
super(...arguments);
|
|
4203
|
+
this.collapse = false;
|
|
4469
4204
|
}
|
|
4470
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4471
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type:
|
|
4205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsArrayTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4206
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsArrayTypeComponent, selector: "gio-fjs-array-type", usesInheritance: true, ngImport: i0, template: `
|
|
4207
|
+
<div class="wrapper" [class.error]="formControl.touched && formControl.invalid">
|
|
4208
|
+
<div class="wrapper__header">
|
|
4209
|
+
<div class="wrapper__header__text">
|
|
4210
|
+
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
4211
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
4212
|
+
</div>
|
|
4213
|
+
<div class="wrapper__header__collapse">
|
|
4214
|
+
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
4215
|
+
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
4216
|
+
</button>
|
|
4217
|
+
</div>
|
|
4218
|
+
</div>
|
|
4219
|
+
|
|
4220
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
4221
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4222
|
+
</div>
|
|
4223
|
+
|
|
4224
|
+
<div [hidden]="collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
4225
|
+
<div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
|
|
4226
|
+
<formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
|
|
4227
|
+
<div class="wrapper__rows__row__remove">
|
|
4228
|
+
<button type="button" mat-icon-button aria-label="Remove" [disabled]="this.form?.disabled ?? false" (click)="remove(i)">
|
|
4229
|
+
<mat-icon svgIcon="gio:cancel"></mat-icon>
|
|
4230
|
+
</button>
|
|
4231
|
+
</div>
|
|
4232
|
+
</div>
|
|
4233
|
+
|
|
4234
|
+
<div>
|
|
4235
|
+
<button type="button" mat-stroked-button aria-label="Add" [disabled]="this.form?.disabled ?? false" (click)="add()">
|
|
4236
|
+
<mat-icon svgIcon="gio:plus"></mat-icon> Add
|
|
4237
|
+
</button>
|
|
4238
|
+
</div>
|
|
4239
|
+
</div>
|
|
4240
|
+
</div>
|
|
4241
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.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-size:14px;font-weight:500;line-height:22px;font-family: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-size:12px;font-weight:400;line-height:16px;font-family: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"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "component", type: i2$3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
|
|
4472
4242
|
}
|
|
4473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsArrayTypeComponent, decorators: [{
|
|
4474
4244
|
type: Component,
|
|
4475
|
-
args: [{
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4245
|
+
args: [{ selector: 'gio-fjs-array-type', template: `
|
|
4246
|
+
<div class="wrapper" [class.error]="formControl.touched && formControl.invalid">
|
|
4247
|
+
<div class="wrapper__header">
|
|
4248
|
+
<div class="wrapper__header__text">
|
|
4249
|
+
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
4250
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
4251
|
+
</div>
|
|
4252
|
+
<div class="wrapper__header__collapse">
|
|
4253
|
+
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
4254
|
+
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
4255
|
+
</button>
|
|
4256
|
+
</div>
|
|
4257
|
+
</div>
|
|
4258
|
+
|
|
4259
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
4260
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4261
|
+
</div>
|
|
4262
|
+
|
|
4263
|
+
<div [hidden]="collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
4264
|
+
<div *ngFor="let field of field.fieldGroup; let i = index" class="wrapper__rows__row">
|
|
4265
|
+
<formly-field class="wrapper__rows__row__field" [field]="field"></formly-field>
|
|
4266
|
+
<div class="wrapper__rows__row__remove">
|
|
4267
|
+
<button type="button" mat-icon-button aria-label="Remove" [disabled]="this.form?.disabled ?? false" (click)="remove(i)">
|
|
4268
|
+
<mat-icon svgIcon="gio:cancel"></mat-icon>
|
|
4269
|
+
</button>
|
|
4270
|
+
</div>
|
|
4271
|
+
</div>
|
|
4272
|
+
|
|
4273
|
+
<div>
|
|
4274
|
+
<button type="button" mat-stroked-button aria-label="Add" [disabled]="this.form?.disabled ?? false" (click)="add()">
|
|
4275
|
+
<mat-icon svgIcon="gio:plus"></mat-icon> Add
|
|
4276
|
+
</button>
|
|
4277
|
+
</div>
|
|
4278
|
+
</div>
|
|
4279
|
+
</div>
|
|
4280
|
+
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.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-size:14px;font-weight:500;line-height:22px;font-family: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-size:12px;font-weight:400;line-height:16px;font-family: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"] }]
|
|
4479
4281
|
}] });
|
|
4480
4282
|
|
|
4283
|
+
function minItemsValidationMessage(error, field) {
|
|
4284
|
+
return `Should NOT have fewer than ${field.props?.minItems} items`;
|
|
4285
|
+
}
|
|
4286
|
+
function maxItemsValidationMessage(error, field) {
|
|
4287
|
+
return `Should NOT have more than ${field.props?.maxItems} items`;
|
|
4288
|
+
}
|
|
4289
|
+
function minLengthValidationMessage(error, field) {
|
|
4290
|
+
return `Should NOT be shorter than ${field.props?.minLength} characters`;
|
|
4291
|
+
}
|
|
4292
|
+
function maxLengthValidationMessage(error, field) {
|
|
4293
|
+
return `Should NOT be longer than ${field.props?.maxLength} characters`;
|
|
4294
|
+
}
|
|
4295
|
+
function minValidationMessage(error, field) {
|
|
4296
|
+
return `Should be >= ${field.props?.min}`;
|
|
4297
|
+
}
|
|
4298
|
+
function maxValidationMessage(error, field) {
|
|
4299
|
+
return `Should be <= ${field.props?.max}`;
|
|
4300
|
+
}
|
|
4301
|
+
function multipleOfValidationMessage(error, field) {
|
|
4302
|
+
return `Should be multiple of ${field.props?.step}`;
|
|
4303
|
+
}
|
|
4304
|
+
function exclusiveMinimumValidationMessage(error, field) {
|
|
4305
|
+
return `Should be > ${field.props?.step}`;
|
|
4306
|
+
}
|
|
4307
|
+
function exclusiveMaximumValidationMessage(error, field) {
|
|
4308
|
+
return `Should be < ${field.props?.step}`;
|
|
4309
|
+
}
|
|
4310
|
+
function constValidationMessage(error, field) {
|
|
4311
|
+
return `Should be equal to constant "${field.props?.const}"`;
|
|
4312
|
+
}
|
|
4313
|
+
function typeValidationMessage({ schemaType }) {
|
|
4314
|
+
return `Should be "${schemaType[0]}".`;
|
|
4315
|
+
}
|
|
4316
|
+
|
|
4481
4317
|
/*
|
|
4482
|
-
* Copyright (C)
|
|
4318
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4483
4319
|
*
|
|
4484
4320
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4485
4321
|
* you may not use this file except in compliance with the License.
|
|
@@ -4493,53 +4329,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4493
4329
|
* See the License for the specific language governing permissions and
|
|
4494
4330
|
* limitations under the License.
|
|
4495
4331
|
*/
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
});
|
|
4509
|
-
}
|
|
4510
|
-
catch (e) {
|
|
4511
|
-
// Do nothing
|
|
4512
|
-
}
|
|
4513
|
-
};
|
|
4514
|
-
ConfigureTestingGioMonacoEditor();
|
|
4515
|
-
class GioMonacoEditorHarness extends ComponentHarness {
|
|
4516
|
-
static { this.hostSelector = 'gio-monaco-editor'; }
|
|
4517
|
-
constructor(locatorFactory) {
|
|
4518
|
-
super(locatorFactory);
|
|
4519
|
-
this.getInputEl = this.locatorFor('input');
|
|
4520
|
-
}
|
|
4521
|
-
/**
|
|
4522
|
-
* Gets a `HarnessPredicate` that can be used to search for a `GioMonacoEditorHarness` that meets
|
|
4523
|
-
* certain criteria.
|
|
4524
|
-
*
|
|
4525
|
-
* @param options Options for filtering which input instances are considered a match.
|
|
4526
|
-
* @return a `HarnessPredicate` configured with the given options.
|
|
4527
|
-
*/
|
|
4528
|
-
static with(options = {}) {
|
|
4529
|
-
return new HarnessPredicate(GioMonacoEditorHarness, options);
|
|
4530
|
-
}
|
|
4531
|
-
async setValue(value) {
|
|
4532
|
-
const inputEl = await this.getInputEl();
|
|
4533
|
-
await inputEl.clear();
|
|
4534
|
-
await inputEl.sendKeys(value);
|
|
4535
|
-
}
|
|
4536
|
-
async getValue() {
|
|
4537
|
-
const inputEl = await this.getInputEl();
|
|
4538
|
-
return inputEl.getProperty('value');
|
|
4332
|
+
class GioBannerWrapperComponent extends FieldWrapper {
|
|
4333
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioBannerWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4334
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioBannerWrapperComponent, selector: "gio-banner-wrapper", usesInheritance: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"wrapper\">\n <div class=\"banner\">\n <div class=\"banner__icon\"><mat-icon svgIcon=\"gio:info\"></mat-icon></div>\n <div>\n <div class=\"banner__title\" [innerHTML]=\"props.bannerTitle\"></div>\n <div class=\"banner__text\" [innerHTML]=\"props.bannerText\"></div>\n </div>\n </div>\n <ng-container #fieldComponent></ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}::ng-deep gio-banner-wrapper ul{padding-inline-start:16px}.wrapper{padding:8px 0}.banner{display:flex;flex-direction:row;align-items:flex-start;padding:8px;border-radius:8px;margin-bottom:8px;background:#e7e8ef;gap:8px}.banner__icon{padding-top:2px}.banner__icon mat-icon{width:16px;height:16px;color:#6c59bd}.banner__title{font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.banner__text{font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;color:#606274}\n"], dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
4335
|
+
}
|
|
4336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioBannerWrapperComponent, decorators: [{
|
|
4337
|
+
type: Component,
|
|
4338
|
+
args: [{ selector: 'gio-banner-wrapper', template: "<!--\n\n Copyright (C) 2023 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"wrapper\">\n <div class=\"banner\">\n <div class=\"banner__icon\"><mat-icon svgIcon=\"gio:info\"></mat-icon></div>\n <div>\n <div class=\"banner__title\" [innerHTML]=\"props.bannerTitle\"></div>\n <div class=\"banner__text\" [innerHTML]=\"props.bannerText\"></div>\n </div>\n </div>\n <ng-container #fieldComponent></ng-container>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}::ng-deep gio-banner-wrapper ul{padding-inline-start:16px}.wrapper{padding:8px 0}.banner{display:flex;flex-direction:row;align-items:flex-start;padding:8px;border-radius:8px;margin-bottom:8px;background:#e7e8ef;gap:8px}.banner__icon{padding-top:2px}.banner__icon mat-icon{width:16px;height:16px;color:#6c59bd}.banner__title{font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.banner__text{font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;color:#606274}\n"] }]
|
|
4339
|
+
}] });
|
|
4340
|
+
|
|
4341
|
+
function bannerExtension(field) {
|
|
4342
|
+
if (!field.props || (field.wrappers && field.wrappers.indexOf('gio-with-banner') !== -1)) {
|
|
4343
|
+
return;
|
|
4539
4344
|
}
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4345
|
+
if (field.props.bannerTitle || field.props.bannerText) {
|
|
4346
|
+
// WARNING: 'gio-with-banner' must be placed before field wrappers in order to put banner before mat-form-field if exists
|
|
4347
|
+
field.wrappers = ['gio-with-banner', ...(field.wrappers || [])];
|
|
4543
4348
|
}
|
|
4544
4349
|
}
|
|
4545
4350
|
|
|
@@ -4558,62 +4363,98 @@ class GioMonacoEditorHarness extends ComponentHarness {
|
|
|
4558
4363
|
* See the License for the specific language governing permissions and
|
|
4559
4364
|
* limitations under the License.
|
|
4560
4365
|
*/
|
|
4561
|
-
class
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
switchMap(() => this.loadPrismJsComponent('json')),
|
|
4567
|
-
// If already loaded, we don't want to load it again
|
|
4568
|
-
shareReplay(1),
|
|
4569
|
-
// Ignore error
|
|
4570
|
-
catchError(() => of(undefined)));
|
|
4366
|
+
class GioFjsMultiSchemaTypeComponent extends FieldType {
|
|
4367
|
+
constructor(cdr) {
|
|
4368
|
+
super();
|
|
4369
|
+
this.cdr = cdr;
|
|
4370
|
+
this.unsubscribe$ = new Subject();
|
|
4571
4371
|
}
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
observer.next();
|
|
4576
|
-
observer.complete();
|
|
4577
|
-
};
|
|
4578
|
-
if (!window.Prism) {
|
|
4579
|
-
const loaderPrismjs = document.createElement('script');
|
|
4580
|
-
loaderPrismjs.type = 'text/javascript';
|
|
4581
|
-
loaderPrismjs.src = 'assets/prismjs/prism.js';
|
|
4582
|
-
loaderPrismjs.addEventListener('load', onGotPrismJs);
|
|
4583
|
-
loaderPrismjs.addEventListener('error', err => observer.error(err));
|
|
4584
|
-
document.body.appendChild(loaderPrismjs);
|
|
4585
|
-
}
|
|
4586
|
-
else {
|
|
4587
|
-
onGotPrismJs();
|
|
4588
|
-
}
|
|
4589
|
-
});
|
|
4372
|
+
ngOnDestroy() {
|
|
4373
|
+
this.unsubscribe$.next();
|
|
4374
|
+
this.unsubscribe$.unsubscribe();
|
|
4590
4375
|
}
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
observer.next();
|
|
4595
|
-
observer.complete();
|
|
4596
|
-
};
|
|
4597
|
-
if (!window.Prism.languages[name]) {
|
|
4598
|
-
const loaderPrismjsJson = document.createElement('script');
|
|
4599
|
-
loaderPrismjsJson.type = 'text/javascript';
|
|
4600
|
-
loaderPrismjsJson.src = `assets/prismjs/components/prism-${name}.js`;
|
|
4601
|
-
loaderPrismjsJson.addEventListener('load', onGotPrismJsComponent);
|
|
4602
|
-
loaderPrismjsJson.addEventListener('error', err => observer.error(err));
|
|
4603
|
-
document.body.appendChild(loaderPrismjsJson);
|
|
4604
|
-
}
|
|
4605
|
-
else {
|
|
4606
|
-
onGotPrismJsComponent();
|
|
4607
|
-
}
|
|
4608
|
-
});
|
|
4376
|
+
ngOnInit() {
|
|
4377
|
+
set(this.field, 'fieldGroup[0].props.appearance', 'fill');
|
|
4378
|
+
set(this.field, 'fieldGroup[0].props.label', 'Select option');
|
|
4609
4379
|
}
|
|
4610
|
-
|
|
4611
|
-
|
|
4380
|
+
ngAfterViewChecked() {
|
|
4381
|
+
set(this.field, 'fieldGroup[0].props.disabled', this.formControl.disabled);
|
|
4382
|
+
this.cdr.detectChanges();
|
|
4383
|
+
}
|
|
4384
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsMultiSchemaTypeComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4385
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsMultiSchemaTypeComponent, selector: "gio-fjs-multi-schema-type", usesInheritance: true, ngImport: i0, template: `
|
|
4386
|
+
<div class="wrapper">
|
|
4387
|
+
<div class="wrapper__title" *ngIf="props.label">{{ props.label }}</div>
|
|
4388
|
+
<p *ngIf="props.description">{{ props.description }}</p>
|
|
4389
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
4390
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4391
|
+
</div>
|
|
4392
|
+
<formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
|
|
4393
|
+
</div>
|
|
4394
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.wrapper__title{font-size:16px;line-height:24px;font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:4px}.wrapper:empty{display:none}.wrapper__error{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.FormlyField, selector: "formly-field", inputs: ["field"] }, { kind: "component", type: i2$3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }] }); }
|
|
4612
4395
|
}
|
|
4613
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4614
|
-
type:
|
|
4396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsMultiSchemaTypeComponent, decorators: [{
|
|
4397
|
+
type: Component,
|
|
4398
|
+
args: [{ selector: 'gio-fjs-multi-schema-type', template: `
|
|
4399
|
+
<div class="wrapper">
|
|
4400
|
+
<div class="wrapper__title" *ngIf="props.label">{{ props.label }}</div>
|
|
4401
|
+
<p *ngIf="props.description">{{ props.description }}</p>
|
|
4402
|
+
<div class="wrapper__error gio-ng-invalid" *ngIf="showError && formControl.errors">
|
|
4403
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4404
|
+
</div>
|
|
4405
|
+
<formly-field *ngFor="let f of field.fieldGroup" [field]="f"></formly-field>
|
|
4406
|
+
</div>
|
|
4407
|
+
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.wrapper__title{font-size:16px;line-height:24px;font-size:14px;font-weight:500;line-height:20px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin-bottom:4px}.wrapper:empty{display:none}.wrapper__error{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"] }]
|
|
4408
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
|
|
4409
|
+
|
|
4410
|
+
/*
|
|
4411
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4412
|
+
*
|
|
4413
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4414
|
+
* you may not use this file except in compliance with the License.
|
|
4415
|
+
* You may obtain a copy of the License at
|
|
4416
|
+
*
|
|
4417
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4418
|
+
*
|
|
4419
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4420
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4421
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4422
|
+
* See the License for the specific language governing permissions and
|
|
4423
|
+
* limitations under the License.
|
|
4424
|
+
*/
|
|
4425
|
+
class GioFjsToggleTypeComponent extends FieldType {
|
|
4426
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsToggleTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4427
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsToggleTypeComponent, selector: "gio-fjs-toggle-type", usesInheritance: true, ngImport: i0, template: `
|
|
4428
|
+
<gio-form-slide-toggle>
|
|
4429
|
+
<gio-form-label>{{ props.label }}</gio-form-label>
|
|
4430
|
+
{{ props.description }}
|
|
4431
|
+
<mat-slide-toggle
|
|
4432
|
+
gioFormSlideToggle
|
|
4433
|
+
[id]="id"
|
|
4434
|
+
[formControl]="formControl"
|
|
4435
|
+
[formlyAttributes]="field"
|
|
4436
|
+
[tabIndex]="props.tabindex"
|
|
4437
|
+
></mat-slide-toggle>
|
|
4438
|
+
</gio-form-slide-toggle>
|
|
4439
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.ɵFormlyAttributes, selector: "[formlyAttributes]", inputs: ["formlyAttributes", "id"] }, { kind: "component", type: GioFormSlideToggleComponent, selector: "gio-form-slide-toggle", inputs: ["appearance"] }, { kind: "component", type: GioFormLabelComponent, selector: "gio-form-label" }, { kind: "directive", type: GioFormSlideToggleDirective, selector: "[gioFormSlideToggle]" }, { kind: "component", type: i5$2.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }] }); }
|
|
4440
|
+
}
|
|
4441
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsToggleTypeComponent, decorators: [{
|
|
4442
|
+
type: Component,
|
|
4615
4443
|
args: [{
|
|
4616
|
-
|
|
4444
|
+
selector: 'gio-fjs-toggle-type',
|
|
4445
|
+
template: `
|
|
4446
|
+
<gio-form-slide-toggle>
|
|
4447
|
+
<gio-form-label>{{ props.label }}</gio-form-label>
|
|
4448
|
+
{{ props.description }}
|
|
4449
|
+
<mat-slide-toggle
|
|
4450
|
+
gioFormSlideToggle
|
|
4451
|
+
[id]="id"
|
|
4452
|
+
[formControl]="formControl"
|
|
4453
|
+
[formlyAttributes]="field"
|
|
4454
|
+
[tabIndex]="props.tabindex"
|
|
4455
|
+
></mat-slide-toggle>
|
|
4456
|
+
</gio-form-slide-toggle>
|
|
4457
|
+
`,
|
|
4617
4458
|
}]
|
|
4618
4459
|
}] });
|
|
4619
4460
|
|
|
@@ -4632,14 +4473,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4632
4473
|
* See the License for the specific language governing permissions and
|
|
4633
4474
|
* limitations under the License.
|
|
4634
4475
|
*/
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4476
|
+
class GioFjsHeadersTypeComponent extends FieldType {
|
|
4477
|
+
constructor() {
|
|
4478
|
+
super(...arguments);
|
|
4479
|
+
this.defaultOptions = {
|
|
4480
|
+
props: {
|
|
4481
|
+
outputConfig: this.outputConfig,
|
|
4482
|
+
},
|
|
4483
|
+
};
|
|
4484
|
+
this.collapse = false;
|
|
4485
|
+
}
|
|
4486
|
+
get outputConfig() {
|
|
4487
|
+
return {
|
|
4488
|
+
keyName: 'name',
|
|
4489
|
+
valueName: 'value',
|
|
4490
|
+
};
|
|
4491
|
+
}
|
|
4492
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsHeadersTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4493
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsHeadersTypeComponent, selector: "gio-fjs-headers-type", usesInheritance: true, ngImport: i0, template: `
|
|
4494
|
+
<div class="wrapper">
|
|
4495
|
+
<div class="wrapper__header">
|
|
4496
|
+
<div class="wrapper__header__text">
|
|
4497
|
+
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
4498
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
4499
|
+
</div>
|
|
4500
|
+
<div class="wrapper__header__collapse">
|
|
4501
|
+
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
4502
|
+
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
4503
|
+
</button>
|
|
4504
|
+
</div>
|
|
4505
|
+
</div>
|
|
4506
|
+
<div class="wrapper__error" *ngIf="showError && formControl.errors">
|
|
4507
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4508
|
+
</div>
|
|
4509
|
+
<div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
4510
|
+
<gio-form-headers [headerFieldMapper]="outputConfig" [formControl]="formControl"></gio-form-headers>
|
|
4511
|
+
</div>
|
|
4512
|
+
</div>
|
|
4513
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.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-size:14px;font-weight:500;line-height:22px;font-family: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-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$3.ɵFormlyValidationMessage, selector: "formly-validation-message", inputs: ["field"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: GioFormHeadersComponent, selector: "gio-form-headers", inputs: ["headerFieldMapper"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
|
|
4514
|
+
}
|
|
4515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsHeadersTypeComponent, decorators: [{
|
|
4516
|
+
type: Component,
|
|
4517
|
+
args: [{ selector: 'gio-fjs-headers-type', template: `
|
|
4518
|
+
<div class="wrapper">
|
|
4519
|
+
<div class="wrapper__header">
|
|
4520
|
+
<div class="wrapper__header__text">
|
|
4521
|
+
<div class="wrapper__header__text__title" *ngIf="to.label">{{ to.label }}</div>
|
|
4522
|
+
<p *ngIf="to.description">{{ to.description }}</p>
|
|
4523
|
+
</div>
|
|
4524
|
+
<div class="wrapper__header__collapse">
|
|
4525
|
+
<button type="button" mat-icon-button aria-label="Collapse" (click)="collapse = !collapse">
|
|
4526
|
+
<mat-icon [class.collapse-open]="collapse" [class.collapse-close]="!collapse" svgIcon="gio:nav-arrow-down"></mat-icon>
|
|
4527
|
+
</button>
|
|
4528
|
+
</div>
|
|
4529
|
+
</div>
|
|
4530
|
+
<div class="wrapper__error" *ngIf="showError && formControl.errors">
|
|
4531
|
+
<formly-validation-message [field]="field"></formly-validation-message>
|
|
4532
|
+
</div>
|
|
4533
|
+
<div *ngIf="!collapse" class="wrapper__rows" [class.collapse-open]="collapse" [class.collapse-close]="!collapse">
|
|
4534
|
+
<gio-form-headers [headerFieldMapper]="outputConfig" [formControl]="formControl"></gio-form-headers>
|
|
4535
|
+
</div>
|
|
4536
|
+
</div>
|
|
4537
|
+
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.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-size:14px;font-weight:500;line-height:22px;font-family: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-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;color:#ec4899}\n"] }]
|
|
4538
|
+
}] });
|
|
4640
4539
|
|
|
4641
4540
|
/*
|
|
4642
|
-
* Copyright (C)
|
|
4541
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4643
4542
|
*
|
|
4644
4543
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4645
4544
|
* you may not use this file except in compliance with the License.
|
|
@@ -4653,54 +4552,61 @@ const GIO_DIALOG_WIDTH = {
|
|
|
4653
4552
|
* See the License for the specific language governing permissions and
|
|
4654
4553
|
* limitations under the License.
|
|
4655
4554
|
*/
|
|
4656
|
-
class
|
|
4657
|
-
constructor(
|
|
4658
|
-
|
|
4659
|
-
this.
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
this.
|
|
4663
|
-
|
|
4664
|
-
this.tabIndex = undefined;
|
|
4665
|
-
}
|
|
4666
|
-
onCopied(success, tooltip) {
|
|
4667
|
-
tooltip.message = success ? 'Copied!' : 'Failed to copy!';
|
|
4668
|
-
tooltip.hideDelay = 2000;
|
|
4669
|
-
tooltip.show();
|
|
4670
|
-
this.clicked = true;
|
|
4671
|
-
setTimeout(() => {
|
|
4672
|
-
tooltip.hide();
|
|
4673
|
-
}, 2000);
|
|
4674
|
-
setTimeout(() => {
|
|
4675
|
-
this.clicked = false;
|
|
4676
|
-
tooltip.message = this.label;
|
|
4677
|
-
tooltip.hideDelay = this.tooltipHideDelay;
|
|
4678
|
-
}, 2500);
|
|
4679
|
-
}
|
|
4680
|
-
onKeyupSpace() {
|
|
4681
|
-
this.clipboard.copy(this.contentToCopy);
|
|
4682
|
-
if (this.tooltip) {
|
|
4683
|
-
this.onCopied(true, this.tooltip);
|
|
4555
|
+
class GioPasswordEyeWrapperComponent extends FieldWrapper {
|
|
4556
|
+
constructor() {
|
|
4557
|
+
super(...arguments);
|
|
4558
|
+
this.hide = true;
|
|
4559
|
+
}
|
|
4560
|
+
ngAfterViewInit() {
|
|
4561
|
+
if (this.matSuffix) {
|
|
4562
|
+
this.props.suffix = this.matSuffix;
|
|
4684
4563
|
}
|
|
4685
4564
|
}
|
|
4686
|
-
|
|
4687
|
-
|
|
4565
|
+
addonEyeClick($event) {
|
|
4566
|
+
$event.stopPropagation();
|
|
4567
|
+
this.hide = !this.hide;
|
|
4568
|
+
this.props.type = this.hide ? 'password' : 'text';
|
|
4569
|
+
}
|
|
4570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioPasswordEyeWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioPasswordEyeWrapperComponent, selector: "gio-password-eye-wrapper", viewQueries: [{ propertyName: "matSuffix", first: true, predicate: ["matSuffix"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: `
|
|
4572
|
+
<ng-container #fieldComponent></ng-container>
|
|
4573
|
+
|
|
4574
|
+
<ng-template #matSuffix>
|
|
4575
|
+
<button mat-icon-button type="button" (click)="addonEyeClick($event)">
|
|
4576
|
+
<mat-icon [svgIcon]="hide ? 'gio:eye-empty' : 'gio:eye-off'"></mat-icon>
|
|
4577
|
+
</button>
|
|
4578
|
+
</ng-template>
|
|
4579
|
+
`, isInline: true, dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] }); }
|
|
4688
4580
|
}
|
|
4689
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4690
|
-
type:
|
|
4691
|
-
|
|
4581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioPasswordEyeWrapperComponent, decorators: [{
|
|
4582
|
+
type: Component,
|
|
4583
|
+
args: [{
|
|
4584
|
+
selector: 'gio-password-eye-wrapper',
|
|
4585
|
+
template: `
|
|
4586
|
+
<ng-container #fieldComponent></ng-container>
|
|
4587
|
+
|
|
4588
|
+
<ng-template #matSuffix>
|
|
4589
|
+
<button mat-icon-button type="button" (click)="addonEyeClick($event)">
|
|
4590
|
+
<mat-icon [svgIcon]="hide ? 'gio:eye-empty' : 'gio:eye-off'"></mat-icon>
|
|
4591
|
+
</button>
|
|
4592
|
+
</ng-template>
|
|
4593
|
+
`,
|
|
4594
|
+
}]
|
|
4595
|
+
}], propDecorators: { matSuffix: [{
|
|
4692
4596
|
type: ViewChild,
|
|
4693
|
-
args: ['
|
|
4694
|
-
}], contentToCopy: [{
|
|
4695
|
-
type: Input
|
|
4696
|
-
}], alwaysVisible: [{
|
|
4697
|
-
type: Input
|
|
4698
|
-
}], tabIndex: [{
|
|
4699
|
-
type: Input
|
|
4597
|
+
args: ['matSuffix', { static: true }]
|
|
4700
4598
|
}] } });
|
|
4599
|
+
function passwordEyeExtension(field) {
|
|
4600
|
+
if (!field.props || (field.wrappers && field.wrappers.indexOf('gio-password-eye') !== -1)) {
|
|
4601
|
+
return;
|
|
4602
|
+
}
|
|
4603
|
+
if (field.props.type === 'password') {
|
|
4604
|
+
field.wrappers = [...(field.wrappers || []), 'gio-password-eye'];
|
|
4605
|
+
}
|
|
4606
|
+
}
|
|
4701
4607
|
|
|
4702
4608
|
/*
|
|
4703
|
-
* Copyright (C)
|
|
4609
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4704
4610
|
*
|
|
4705
4611
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4706
4612
|
* you may not use this file except in compliance with the License.
|
|
@@ -4714,57 +4620,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4714
4620
|
* See the License for the specific language governing permissions and
|
|
4715
4621
|
* limitations under the License.
|
|
4716
4622
|
*/
|
|
4717
|
-
class
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
`, isInline: true, styles: ["
|
|
4623
|
+
class GioFjsCodeEditorTypeComponent extends FieldType$1 {
|
|
4624
|
+
ngOnInit() {
|
|
4625
|
+
const language = this.props.monacoEditorConfig?.language;
|
|
4626
|
+
switch (language) {
|
|
4627
|
+
case 'json':
|
|
4628
|
+
this.languageConfig = {
|
|
4629
|
+
language: 'json',
|
|
4630
|
+
schemas: [],
|
|
4631
|
+
};
|
|
4632
|
+
break;
|
|
4633
|
+
default:
|
|
4634
|
+
this.languageConfig = undefined;
|
|
4635
|
+
}
|
|
4636
|
+
}
|
|
4637
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsCodeEditorTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4638
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsCodeEditorTypeComponent, selector: "gio-fjs-code-editor-type", usesInheritance: true, ngImport: i0, template: `
|
|
4639
|
+
<gio-monaco-editor
|
|
4640
|
+
gioMonacoEditorFormField
|
|
4641
|
+
ngDefaultControl
|
|
4642
|
+
[formControl]="formControl"
|
|
4643
|
+
[languageConfig]="languageConfig"
|
|
4644
|
+
></gio-monaco-editor>
|
|
4645
|
+
`, isInline: true, styles: ["gio-monaco-editor{min-height:38px}\n"], dependencies: [{ kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: GioMonacoEditorComponent, selector: "gio-monaco-editor", inputs: ["languageConfig", "options", "disableMiniMap"] }, { kind: "directive", type: GioMonacoEditorFormFieldDirective, selector: "[gioMonacoEditorFormField]", inputs: ["placeholder", "required", "disabled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4740
4646
|
}
|
|
4741
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4647
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsCodeEditorTypeComponent, decorators: [{
|
|
4742
4648
|
type: Component,
|
|
4743
|
-
args: [{ selector: '
|
|
4744
|
-
<
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
[class.always-visible]="alwaysVisible"
|
|
4752
|
-
[cdkCopyToClipboard]="contentToCopy"
|
|
4753
|
-
(cdkCopyToClipboardCopied)="onCopied($event, tooltip)"
|
|
4754
|
-
matRipple
|
|
4755
|
-
[matRippleCentered]="true"
|
|
4756
|
-
[matRippleUnbounded]="true"
|
|
4757
|
-
[matTooltip]="label"
|
|
4758
|
-
[matTooltipPosition]="'after'"
|
|
4759
|
-
(keyup.Space)="onKeyupSpace()"
|
|
4760
|
-
>
|
|
4761
|
-
<mat-icon [inline]="true">{{ clicked ? 'check' : 'content_copy' }}</mat-icon>
|
|
4762
|
-
</button>
|
|
4763
|
-
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.right{padding:0;border:none;margin-left:4px;background:none;color:#616266;cursor:pointer;outline:inherit}.right:not(.clicked,.always-visible){opacity:0}.right.clicked{color:#099;opacity:1}:host(:hover,:focus) .right{opacity:1}:host(:hover,:focus) .right:hover,:host(:hover,:focus) .right:focus{color:#099}\n"] }]
|
|
4649
|
+
args: [{ selector: 'gio-fjs-code-editor-type', template: `
|
|
4650
|
+
<gio-monaco-editor
|
|
4651
|
+
gioMonacoEditorFormField
|
|
4652
|
+
ngDefaultControl
|
|
4653
|
+
[formControl]="formControl"
|
|
4654
|
+
[languageConfig]="languageConfig"
|
|
4655
|
+
></gio-monaco-editor>
|
|
4656
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["gio-monaco-editor{min-height:38px}\n"] }]
|
|
4764
4657
|
}] });
|
|
4765
4658
|
|
|
4766
4659
|
/*
|
|
4767
|
-
* Copyright (C)
|
|
4660
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4768
4661
|
*
|
|
4769
4662
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4770
4663
|
* you may not use this file except in compliance with the License.
|
|
@@ -4778,49 +4671,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4778
4671
|
* See the License for the specific language governing permissions and
|
|
4779
4672
|
* limitations under the License.
|
|
4780
4673
|
*/
|
|
4781
|
-
class
|
|
4782
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4783
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type:
|
|
4784
|
-
<
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
(cdkCopyToClipboardCopied)="onCopied($event, tooltip)"
|
|
4792
|
-
matRipple
|
|
4793
|
-
[matRippleCentered]="true"
|
|
4794
|
-
[matRippleUnbounded]="true"
|
|
4795
|
-
[matTooltip]="label"
|
|
4796
|
-
[matTooltipPosition]="'after'"
|
|
4797
|
-
(keyup.Space)="onKeyupSpace()"
|
|
4798
|
-
>
|
|
4799
|
-
<mat-icon>{{ clicked ? 'check' : 'content_copy' }}</mat-icon>
|
|
4800
|
-
</button>
|
|
4801
|
-
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host-context(.mat-mdc-form-field-icon-suffix){padding:12px}.btn{padding:0;border:none;margin-left:4px;background:none;color:#616266;cursor:pointer;outline:inherit}.btn.clicked,.btn:hover,.btn:focus{color:#099}\n"], dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i1$5.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }] }); }
|
|
4802
|
-
}
|
|
4803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardCopyIconComponent, decorators: [{
|
|
4674
|
+
class GioFjsCronTypeComponent extends FieldType$1 {
|
|
4675
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsCronTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4676
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioFjsCronTypeComponent, selector: "gio-fjs-code-editor-type", usesInheritance: true, ngImport: i0, template: `
|
|
4677
|
+
<gio-form-cron [formControl]="formControl">
|
|
4678
|
+
<gio-form-cron-label *ngIf="props.label">{{ props.label }}</gio-form-cron-label>
|
|
4679
|
+
<gio-form-cron-hint *ngIf="props.description">{{ props.description }}</gio-form-cron-hint>
|
|
4680
|
+
</gio-form-cron>
|
|
4681
|
+
`, isInline: true, styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: GioFormCronComponent, selector: "gio-form-cron" }, { kind: "component", type: GioFormCronLabelComponent, selector: "gio-form-cron-label" }, { kind: "component", type: GioFormCronHintComponent, selector: "gio-form-cron-hint" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4682
|
+
}
|
|
4683
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFjsCronTypeComponent, decorators: [{
|
|
4804
4684
|
type: Component,
|
|
4805
|
-
args: [{ selector: 'gio-
|
|
4806
|
-
<
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
[class.clicked]="clicked"
|
|
4812
|
-
[cdkCopyToClipboard]="contentToCopy"
|
|
4813
|
-
(cdkCopyToClipboardCopied)="onCopied($event, tooltip)"
|
|
4814
|
-
matRipple
|
|
4815
|
-
[matRippleCentered]="true"
|
|
4816
|
-
[matRippleUnbounded]="true"
|
|
4817
|
-
[matTooltip]="label"
|
|
4818
|
-
[matTooltipPosition]="'after'"
|
|
4819
|
-
(keyup.Space)="onKeyupSpace()"
|
|
4820
|
-
>
|
|
4821
|
-
<mat-icon>{{ clicked ? 'check' : 'content_copy' }}</mat-icon>
|
|
4822
|
-
</button>
|
|
4823
|
-
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host-context(.mat-mdc-form-field-icon-suffix){padding:12px}.btn{padding:0;border:none;margin-left:4px;background:none;color:#616266;cursor:pointer;outline:inherit}.btn.clicked,.btn:hover,.btn:focus{color:#099}\n"] }]
|
|
4685
|
+
args: [{ selector: 'gio-fjs-code-editor-type', template: `
|
|
4686
|
+
<gio-form-cron [formControl]="formControl">
|
|
4687
|
+
<gio-form-cron-label *ngIf="props.label">{{ props.label }}</gio-form-cron-label>
|
|
4688
|
+
<gio-form-cron-hint *ngIf="props.description">{{ props.description }}</gio-form-cron-hint>
|
|
4689
|
+
</gio-form-cron>
|
|
4690
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush }]
|
|
4824
4691
|
}] });
|
|
4825
4692
|
|
|
4826
4693
|
/*
|
|
@@ -4838,71 +4705,181 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4838
4705
|
* See the License for the specific language governing permissions and
|
|
4839
4706
|
* limitations under the License.
|
|
4840
4707
|
*/
|
|
4841
|
-
class
|
|
4842
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4843
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4844
|
-
|
|
4708
|
+
class GioFormJsonSchemaModule {
|
|
4709
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormJsonSchemaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4710
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioFormJsonSchemaModule, declarations: [GioFormJsonSchemaComponent,
|
|
4711
|
+
GioFjsNullTypeComponent,
|
|
4712
|
+
GioFjsObjectTypeComponent,
|
|
4713
|
+
GioFjsMultiSchemaTypeComponent,
|
|
4714
|
+
GioFjsArrayTypeComponent,
|
|
4715
|
+
GioFjsToggleTypeComponent,
|
|
4716
|
+
GioFjsHeadersTypeComponent,
|
|
4717
|
+
GioFjsCodeEditorTypeComponent,
|
|
4718
|
+
GioFjsCronTypeComponent,
|
|
4719
|
+
GioBannerWrapperComponent,
|
|
4720
|
+
GioPasswordEyeWrapperComponent], imports: [CommonModule,
|
|
4721
|
+
A11yModule,
|
|
4722
|
+
ReactiveFormsModule, i2$3.FormlyModule, FormlyMaterialModule,
|
|
4723
|
+
MatInputModule,
|
|
4724
|
+
GioIconsModule,
|
|
4725
|
+
GioFormSlideToggleModule,
|
|
4726
|
+
GioFormHeadersModule,
|
|
4727
|
+
GioMonacoEditorModule,
|
|
4728
|
+
GioFormCronModule,
|
|
4729
|
+
MatSlideToggleModule,
|
|
4730
|
+
MatButtonModule], exports: [GioFormJsonSchemaComponent, FormlyModule] }); }
|
|
4731
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormJsonSchemaModule, providers: [GioFormlyJsonSchemaService], imports: [CommonModule,
|
|
4732
|
+
A11yModule,
|
|
4733
|
+
ReactiveFormsModule,
|
|
4734
|
+
FormlyModule.forRoot({
|
|
4735
|
+
validationMessages: [
|
|
4736
|
+
{ name: 'required', message: 'This field is required' },
|
|
4737
|
+
{ name: 'type', message: typeValidationMessage },
|
|
4738
|
+
{ name: 'minLength', message: minLengthValidationMessage },
|
|
4739
|
+
{ name: 'maxLength', message: maxLengthValidationMessage },
|
|
4740
|
+
{ name: 'min', message: minValidationMessage },
|
|
4741
|
+
{ name: 'max', message: maxValidationMessage },
|
|
4742
|
+
{ name: 'multipleOf', message: multipleOfValidationMessage },
|
|
4743
|
+
{ name: 'exclusiveMinimum', message: exclusiveMinimumValidationMessage },
|
|
4744
|
+
{ name: 'exclusiveMaximum', message: exclusiveMaximumValidationMessage },
|
|
4745
|
+
{ name: 'minItems', message: minItemsValidationMessage },
|
|
4746
|
+
{ name: 'maxItems', message: maxItemsValidationMessage },
|
|
4747
|
+
{ name: 'uniqueItems', message: 'Should NOT have duplicate items' },
|
|
4748
|
+
{ name: 'const', message: constValidationMessage },
|
|
4749
|
+
],
|
|
4750
|
+
wrappers: [
|
|
4751
|
+
{ name: 'gio-with-banner', component: GioBannerWrapperComponent },
|
|
4752
|
+
{ name: 'gio-password-eye', component: GioPasswordEyeWrapperComponent },
|
|
4753
|
+
],
|
|
4754
|
+
types: [
|
|
4755
|
+
{ name: 'null', component: GioFjsNullTypeComponent, wrappers: ['form-field'] },
|
|
4756
|
+
{ name: 'array', component: GioFjsArrayTypeComponent },
|
|
4757
|
+
{ name: 'object', component: GioFjsObjectTypeComponent },
|
|
4758
|
+
{ name: 'multischema', component: GioFjsMultiSchemaTypeComponent },
|
|
4759
|
+
{
|
|
4760
|
+
name: 'toggle',
|
|
4761
|
+
component: GioFjsToggleTypeComponent,
|
|
4762
|
+
},
|
|
4763
|
+
{
|
|
4764
|
+
name: 'gio-code-editor',
|
|
4765
|
+
component: GioFjsCodeEditorTypeComponent,
|
|
4766
|
+
wrappers: ['form-field'],
|
|
4767
|
+
},
|
|
4768
|
+
{
|
|
4769
|
+
name: 'gio-headers-array',
|
|
4770
|
+
component: GioFjsHeadersTypeComponent,
|
|
4771
|
+
},
|
|
4772
|
+
{
|
|
4773
|
+
name: 'gio-cron',
|
|
4774
|
+
component: GioFjsCronTypeComponent,
|
|
4775
|
+
},
|
|
4776
|
+
],
|
|
4777
|
+
extensions: [
|
|
4778
|
+
{ name: 'banner', extension: { onPopulate: bannerExtension } },
|
|
4779
|
+
{ name: 'password-eye', extension: { onPopulate: passwordEyeExtension } },
|
|
4780
|
+
],
|
|
4781
|
+
extras: {
|
|
4782
|
+
checkExpressionOn: 'changeDetectionCheck',
|
|
4783
|
+
},
|
|
4784
|
+
}),
|
|
4785
|
+
FormlyMaterialModule,
|
|
4786
|
+
MatInputModule,
|
|
4787
|
+
GioIconsModule,
|
|
4788
|
+
GioFormSlideToggleModule,
|
|
4789
|
+
GioFormHeadersModule,
|
|
4790
|
+
GioMonacoEditorModule,
|
|
4791
|
+
GioFormCronModule,
|
|
4792
|
+
MatSlideToggleModule,
|
|
4793
|
+
MatButtonModule, FormlyModule] }); }
|
|
4845
4794
|
}
|
|
4846
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
4795
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormJsonSchemaModule, decorators: [{
|
|
4847
4796
|
type: NgModule,
|
|
4848
4797
|
args: [{
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4798
|
+
declarations: [
|
|
4799
|
+
GioFormJsonSchemaComponent,
|
|
4800
|
+
GioFjsNullTypeComponent,
|
|
4801
|
+
GioFjsObjectTypeComponent,
|
|
4802
|
+
GioFjsMultiSchemaTypeComponent,
|
|
4803
|
+
GioFjsArrayTypeComponent,
|
|
4804
|
+
GioFjsToggleTypeComponent,
|
|
4805
|
+
GioFjsHeadersTypeComponent,
|
|
4806
|
+
GioFjsCodeEditorTypeComponent,
|
|
4807
|
+
GioFjsCronTypeComponent,
|
|
4808
|
+
GioBannerWrapperComponent,
|
|
4809
|
+
GioPasswordEyeWrapperComponent,
|
|
4810
|
+
],
|
|
4811
|
+
imports: [
|
|
4812
|
+
CommonModule,
|
|
4813
|
+
A11yModule,
|
|
4814
|
+
ReactiveFormsModule,
|
|
4815
|
+
FormlyModule.forRoot({
|
|
4816
|
+
validationMessages: [
|
|
4817
|
+
{ name: 'required', message: 'This field is required' },
|
|
4818
|
+
{ name: 'type', message: typeValidationMessage },
|
|
4819
|
+
{ name: 'minLength', message: minLengthValidationMessage },
|
|
4820
|
+
{ name: 'maxLength', message: maxLengthValidationMessage },
|
|
4821
|
+
{ name: 'min', message: minValidationMessage },
|
|
4822
|
+
{ name: 'max', message: maxValidationMessage },
|
|
4823
|
+
{ name: 'multipleOf', message: multipleOfValidationMessage },
|
|
4824
|
+
{ name: 'exclusiveMinimum', message: exclusiveMinimumValidationMessage },
|
|
4825
|
+
{ name: 'exclusiveMaximum', message: exclusiveMaximumValidationMessage },
|
|
4826
|
+
{ name: 'minItems', message: minItemsValidationMessage },
|
|
4827
|
+
{ name: 'maxItems', message: maxItemsValidationMessage },
|
|
4828
|
+
{ name: 'uniqueItems', message: 'Should NOT have duplicate items' },
|
|
4829
|
+
{ name: 'const', message: constValidationMessage },
|
|
4830
|
+
],
|
|
4831
|
+
wrappers: [
|
|
4832
|
+
{ name: 'gio-with-banner', component: GioBannerWrapperComponent },
|
|
4833
|
+
{ name: 'gio-password-eye', component: GioPasswordEyeWrapperComponent },
|
|
4834
|
+
],
|
|
4835
|
+
types: [
|
|
4836
|
+
{ name: 'null', component: GioFjsNullTypeComponent, wrappers: ['form-field'] },
|
|
4837
|
+
{ name: 'array', component: GioFjsArrayTypeComponent },
|
|
4838
|
+
{ name: 'object', component: GioFjsObjectTypeComponent },
|
|
4839
|
+
{ name: 'multischema', component: GioFjsMultiSchemaTypeComponent },
|
|
4840
|
+
{
|
|
4841
|
+
name: 'toggle',
|
|
4842
|
+
component: GioFjsToggleTypeComponent,
|
|
4843
|
+
},
|
|
4844
|
+
{
|
|
4845
|
+
name: 'gio-code-editor',
|
|
4846
|
+
component: GioFjsCodeEditorTypeComponent,
|
|
4847
|
+
wrappers: ['form-field'],
|
|
4848
|
+
},
|
|
4849
|
+
{
|
|
4850
|
+
name: 'gio-headers-array',
|
|
4851
|
+
component: GioFjsHeadersTypeComponent,
|
|
4852
|
+
},
|
|
4853
|
+
{
|
|
4854
|
+
name: 'gio-cron',
|
|
4855
|
+
component: GioFjsCronTypeComponent,
|
|
4856
|
+
},
|
|
4857
|
+
],
|
|
4858
|
+
extensions: [
|
|
4859
|
+
{ name: 'banner', extension: { onPopulate: bannerExtension } },
|
|
4860
|
+
{ name: 'password-eye', extension: { onPopulate: passwordEyeExtension } },
|
|
4861
|
+
],
|
|
4862
|
+
extras: {
|
|
4863
|
+
checkExpressionOn: 'changeDetectionCheck',
|
|
4864
|
+
},
|
|
4865
|
+
}),
|
|
4866
|
+
FormlyMaterialModule,
|
|
4867
|
+
MatInputModule,
|
|
4868
|
+
GioIconsModule,
|
|
4869
|
+
GioFormSlideToggleModule,
|
|
4870
|
+
GioFormHeadersModule,
|
|
4871
|
+
GioMonacoEditorModule,
|
|
4872
|
+
GioFormCronModule,
|
|
4873
|
+
MatSlideToggleModule,
|
|
4874
|
+
MatButtonModule,
|
|
4875
|
+
],
|
|
4876
|
+
exports: [GioFormJsonSchemaComponent, FormlyModule],
|
|
4877
|
+
providers: [GioFormlyJsonSchemaService],
|
|
4852
4878
|
}]
|
|
4853
4879
|
}] });
|
|
4854
4880
|
|
|
4855
4881
|
/*
|
|
4856
|
-
* Copyright (C)
|
|
4857
|
-
*
|
|
4858
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4859
|
-
* you may not use this file except in compliance with the License.
|
|
4860
|
-
* You may obtain a copy of the License at
|
|
4861
|
-
*
|
|
4862
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4863
|
-
*
|
|
4864
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
4865
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4866
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4867
|
-
* See the License for the specific language governing permissions and
|
|
4868
|
-
* limitations under the License.
|
|
4869
|
-
*/
|
|
4870
|
-
class SafePipe {
|
|
4871
|
-
constructor(sanitizer) {
|
|
4872
|
-
this.sanitizer = sanitizer;
|
|
4873
|
-
}
|
|
4874
|
-
transform(value, type) {
|
|
4875
|
-
if (!value) {
|
|
4876
|
-
return '';
|
|
4877
|
-
}
|
|
4878
|
-
switch (type) {
|
|
4879
|
-
// No Sonar because the bypass is deliberate and should only be used with safe data
|
|
4880
|
-
case 'html':
|
|
4881
|
-
return this.sanitizer.bypassSecurityTrustHtml(value); // NOSONAR
|
|
4882
|
-
case 'style':
|
|
4883
|
-
return this.sanitizer.bypassSecurityTrustStyle(value); // NOSONAR
|
|
4884
|
-
case 'script':
|
|
4885
|
-
return this.sanitizer.bypassSecurityTrustScript(value); // NOSONAR
|
|
4886
|
-
case 'url':
|
|
4887
|
-
return this.sanitizer.bypassSecurityTrustUrl(value); // NOSONAR
|
|
4888
|
-
case 'resourceUrl':
|
|
4889
|
-
return this.sanitizer.bypassSecurityTrustResourceUrl(value); // NOSONAR
|
|
4890
|
-
default:
|
|
4891
|
-
throw new Error(`Invalid safe type specified: ${type}`);
|
|
4892
|
-
}
|
|
4893
|
-
}
|
|
4894
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: SafePipe, deps: [{ token: i2$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
4895
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: SafePipe, name: "safe" }); }
|
|
4896
|
-
}
|
|
4897
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: SafePipe, decorators: [{
|
|
4898
|
-
type: Pipe,
|
|
4899
|
-
args: [{
|
|
4900
|
-
name: 'safe',
|
|
4901
|
-
}]
|
|
4902
|
-
}], ctorParameters: () => [{ type: i2$2.DomSanitizer }] });
|
|
4903
|
-
|
|
4904
|
-
/*
|
|
4905
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
4882
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
4906
4883
|
*
|
|
4907
4884
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4908
4885
|
* you may not use this file except in compliance with the License.
|
|
@@ -4916,19 +4893,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4916
4893
|
* See the License for the specific language governing permissions and
|
|
4917
4894
|
* limitations under the License.
|
|
4918
4895
|
*/
|
|
4919
|
-
class GioSafePipeModule {
|
|
4920
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioSafePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4921
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioSafePipeModule, declarations: [SafePipe], exports: [SafePipe] }); }
|
|
4922
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioSafePipeModule }); }
|
|
4923
|
-
}
|
|
4924
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioSafePipeModule, decorators: [{
|
|
4925
|
-
type: NgModule,
|
|
4926
|
-
args: [{
|
|
4927
|
-
imports: [],
|
|
4928
|
-
declarations: [SafePipe],
|
|
4929
|
-
exports: [SafePipe],
|
|
4930
|
-
}]
|
|
4931
|
-
}] });
|
|
4932
4896
|
|
|
4933
4897
|
/*
|
|
4934
4898
|
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
@@ -4945,118 +4909,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
4945
4909
|
* See the License for the specific language governing permissions and
|
|
4946
4910
|
* limitations under the License.
|
|
4947
4911
|
*/
|
|
4948
|
-
class
|
|
4949
|
-
constructor(
|
|
4950
|
-
this.
|
|
4951
|
-
this.
|
|
4952
|
-
this.trialURL = dialogData?.trialURL;
|
|
4953
|
-
}
|
|
4954
|
-
onClose() {
|
|
4955
|
-
this.dialogRef.close();
|
|
4956
|
-
}
|
|
4957
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4958
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioLicenseDialogComponent, selector: "gio-license-dialog", 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 class=\"gio-license-dialog__title\">\n <mat-icon class=\"gio-license-dialog__title__cancel\"></mat-icon>\n <button mat-icon-button [attr.aria-label]=\"'Close'\" (click)=\"onClose()\">\n <mat-icon class=\"gio-license-dialog__title__cancel\" svgIcon=\"gio:cancel\"> </mat-icon>\n </button>\n</div>\n\n<mat-dialog-content class=\"gio-license-dialog__content\">\n <img class=\"gio-license-dialog__content__image\" [src]=\"featureInfo.image\" [alt]=\"featureInfo.title || 'Unlock Gravitee Enterprise'\" />\n <h2 class=\"gio-license-dialog__content__title\" [innerHTML]=\"featureInfo.title || 'Unlock Gravitee Enterprise' | safe: 'html'\"></h2>\n <div class=\"gio-license-dialog__content__description\" [innerHTML]=\"featureInfo.description | safe: 'html'\"></div>\n <div class=\"gio-license-dialog__content__action\">\n <a class=\"gio-license-dialog__content__action__button\" mat-stroked-button color=\"accent\" target=\"_blank\" [href]=\"trialURL\">\n {{ featureInfo.trialButtonLabel || 'Request an enterprise license' }} <mat-icon svgIcon=\"gio:external-link\"></mat-icon>\n </a>\n <div *ngIf=\"!featureInfo.hideDays\" class=\"gio-license-dialog__content__action__info\">14 days trial</div>\n </div>\n</mat-dialog-content>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.gio-license-dialog__title{display:flex;justify-content:space-between}.gio-license-dialog__title__cancel{width:24px;height:24px;color:#8e8f9c}.gio-license-dialog__content{display:flex;width:600px;flex-direction:column;align-items:center;justify-content:center;padding:0}.gio-license-dialog__content__title{margin:0 0 24px;font-size:26px;font-weight:600;line-height:36px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.gio-license-dialog__content__description{padding:0 50px 32px;color:#606274;font-weight:500;line-height:24px;text-align:center}.gio-license-dialog__content__action{display:flex;flex-direction:column;align-items:center;padding:0 40px 16px}.gio-license-dialog__content__action__button{width:250px}.gio-license-dialog__content__action__info{margin-top:10px;color:#606274;text-align:center}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: SafePipe, name: "safe" }] }); }
|
|
4959
|
-
}
|
|
4960
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDialogComponent, decorators: [{
|
|
4961
|
-
type: Component,
|
|
4962
|
-
args: [{ selector: 'gio-license-dialog', 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 class=\"gio-license-dialog__title\">\n <mat-icon class=\"gio-license-dialog__title__cancel\"></mat-icon>\n <button mat-icon-button [attr.aria-label]=\"'Close'\" (click)=\"onClose()\">\n <mat-icon class=\"gio-license-dialog__title__cancel\" svgIcon=\"gio:cancel\"> </mat-icon>\n </button>\n</div>\n\n<mat-dialog-content class=\"gio-license-dialog__content\">\n <img class=\"gio-license-dialog__content__image\" [src]=\"featureInfo.image\" [alt]=\"featureInfo.title || 'Unlock Gravitee Enterprise'\" />\n <h2 class=\"gio-license-dialog__content__title\" [innerHTML]=\"featureInfo.title || 'Unlock Gravitee Enterprise' | safe: 'html'\"></h2>\n <div class=\"gio-license-dialog__content__description\" [innerHTML]=\"featureInfo.description | safe: 'html'\"></div>\n <div class=\"gio-license-dialog__content__action\">\n <a class=\"gio-license-dialog__content__action__button\" mat-stroked-button color=\"accent\" target=\"_blank\" [href]=\"trialURL\">\n {{ featureInfo.trialButtonLabel || 'Request an enterprise license' }} <mat-icon svgIcon=\"gio:external-link\"></mat-icon>\n </a>\n <div *ngIf=\"!featureInfo.hideDays\" class=\"gio-license-dialog__content__action__info\">14 days trial</div>\n </div>\n</mat-dialog-content>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.gio-license-dialog__title{display:flex;justify-content:space-between}.gio-license-dialog__title__cancel{width:24px;height:24px;color:#8e8f9c}.gio-license-dialog__content{display:flex;width:600px;flex-direction:column;align-items:center;justify-content:center;padding:0}.gio-license-dialog__content__title{margin:0 0 24px;font-size:26px;font-weight:600;line-height:36px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.gio-license-dialog__content__description{padding:0 50px 32px;color:#606274;font-weight:500;line-height:24px;text-align:center}.gio-license-dialog__content__action{display:flex;flex-direction:column;align-items:center;padding:0 40px 16px}.gio-license-dialog__content__action__button{width:250px}.gio-license-dialog__content__action__info{margin-top:10px;color:#606274;text-align:center}\n"] }]
|
|
4963
|
-
}], ctorParameters: () => [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
4964
|
-
type: Inject,
|
|
4965
|
-
args: [MAT_DIALOG_DATA]
|
|
4966
|
-
}] }] });
|
|
4967
|
-
|
|
4968
|
-
const isLicensePluginOptions = (licenseOptions) => has(licenseOptions, 'deployed');
|
|
4969
|
-
class GioLicenseService {
|
|
4970
|
-
constructor(http, licenseConfiguration, matDialog) {
|
|
4971
|
-
this.http = http;
|
|
4972
|
-
this.licenseConfiguration = licenseConfiguration;
|
|
4973
|
-
this.matDialog = matDialog;
|
|
4974
|
-
this.loadLicense$ = this.http.get(licenseConfiguration.resourceURL).pipe(shareReplay(1));
|
|
4975
|
-
}
|
|
4976
|
-
getLicense$() {
|
|
4977
|
-
return this.loadLicense$;
|
|
4912
|
+
class GioBaseFormFocusInvalidDirective {
|
|
4913
|
+
constructor(hostElement, formGroupDirective) {
|
|
4914
|
+
this.hostElement = hostElement;
|
|
4915
|
+
this.formGroupDirective = formGroupDirective;
|
|
4978
4916
|
}
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4917
|
+
focusOnFirstInvalid() {
|
|
4918
|
+
const selector = '.ng-invalid[formControlName],input.ng-invalid,mat-select.ng-invalid,textarea.ng-invalid,.gio-ng-invalid';
|
|
4919
|
+
try {
|
|
4920
|
+
// Mark all controls as touched to display errors
|
|
4921
|
+
if (this.formGroupDirective) {
|
|
4922
|
+
this.formGroupDirective.control.markAllAsTouched();
|
|
4923
|
+
this.formGroupDirective.control.updateValueAndValidity();
|
|
4986
4924
|
}
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
}
|
|
4994
|
-
return this.isExpired$().pipe(switchMap(isExpired => {
|
|
4995
|
-
const featuresDefined = licenseOptions.some(o => !!o.feature);
|
|
4996
|
-
if (isExpired && featuresDefined) {
|
|
4997
|
-
return of(false);
|
|
4925
|
+
const parentForm = this.hostElement.nativeElement.closest('form');
|
|
4926
|
+
const invalidFieldElements = parentForm?.querySelectorAll(selector);
|
|
4927
|
+
const invalidControl = this.getFirstInvalidControl(invalidFieldElements);
|
|
4928
|
+
if (invalidControl) {
|
|
4929
|
+
invalidControl.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
4930
|
+
invalidControl.focus({ preventScroll: true });
|
|
4998
4931
|
}
|
|
4999
|
-
return this.getLicense$().pipe(map(license => license != null && licenseOptions.every(o => license.features.some(feat => feat === o.feature))));
|
|
5000
|
-
}));
|
|
5001
|
-
}
|
|
5002
|
-
getFeatureInfo(licenseOptions) {
|
|
5003
|
-
if (!licenseOptions.feature) {
|
|
5004
|
-
throw new Error(`feature is undefined`);
|
|
5005
4932
|
}
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
4933
|
+
catch (error) {
|
|
4934
|
+
// Best effort. If the focus doesn't work it's not very important
|
|
4935
|
+
// 🧪 Useful to avoid som error in tests
|
|
5009
4936
|
}
|
|
5010
|
-
return featureInfo;
|
|
5011
4937
|
}
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
4938
|
+
getFirstInvalidControl(invalidFieldElements, index = 0) {
|
|
4939
|
+
let invalidControl = invalidFieldElements?.item(index);
|
|
4940
|
+
const hasIgnoreAttribute = invalidControl?.attributes?.getNamedItem(GIO_FORM_FOCUS_INVALID_IGNORE_SELECTOR);
|
|
4941
|
+
if (hasIgnoreAttribute) {
|
|
4942
|
+
invalidControl = this.getFirstInvalidControl(invalidFieldElements, index + 1);
|
|
5015
4943
|
}
|
|
5016
|
-
|
|
5017
|
-
? `?utm_source=${this.licenseConfiguration.utmSource}&utm_medium=${licenseOptions.feature}&utm_campaign=${this.licenseConfiguration.utmCampaign}`
|
|
5018
|
-
: '';
|
|
5019
|
-
const context = urlParams.length > 0 && licenseOptions.context ? `&utm_content=${licenseOptions.context}` : '';
|
|
5020
|
-
return `${this.licenseConfiguration.trialResourceURL}${urlParams}${context}`;
|
|
4944
|
+
return invalidControl;
|
|
5021
4945
|
}
|
|
5022
|
-
|
|
5023
|
-
|
|
4946
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioBaseFormFocusInvalidDirective, deps: [{ token: i0.ElementRef }, { token: i1$1.FormGroupDirective, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4947
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: GioBaseFormFocusInvalidDirective, ngImport: i0 }); }
|
|
4948
|
+
}
|
|
4949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioBaseFormFocusInvalidDirective, decorators: [{
|
|
4950
|
+
type: Directive
|
|
4951
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.FormGroupDirective, decorators: [{
|
|
4952
|
+
type: Optional
|
|
4953
|
+
}] }] });
|
|
4954
|
+
class GioFormFocusInvalidFormDirective extends GioBaseFormFocusInvalidDirective {
|
|
4955
|
+
onFormSubmit() {
|
|
4956
|
+
this.focusOnFirstInvalid();
|
|
5024
4957
|
}
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
.subscribe();
|
|
4958
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFocusInvalidFormDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4959
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: GioFormFocusInvalidFormDirective, selector: "form[gioFormFocusInvalid]", host: { listeners: { "submit": "onFormSubmit()" } }, usesInheritance: true, ngImport: i0 }); }
|
|
4960
|
+
}
|
|
4961
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFocusInvalidFormDirective, decorators: [{
|
|
4962
|
+
type: Directive,
|
|
4963
|
+
args: [{
|
|
4964
|
+
selector: 'form[gioFormFocusInvalid]',
|
|
4965
|
+
}]
|
|
4966
|
+
}], propDecorators: { onFormSubmit: [{
|
|
4967
|
+
type: HostListener,
|
|
4968
|
+
args: ['submit']
|
|
4969
|
+
}] } });
|
|
4970
|
+
class GioButtonFocusInvalidButtonDirective extends GioBaseFormFocusInvalidDirective {
|
|
4971
|
+
onClick() {
|
|
4972
|
+
this.focusOnFirstInvalid();
|
|
5041
4973
|
}
|
|
5042
|
-
|
|
5043
|
-
|
|
4974
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioButtonFocusInvalidButtonDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4975
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: GioButtonFocusInvalidButtonDirective, selector: "button[gioFormFocusInvalid]", host: { listeners: { "click": "onClick()" } }, usesInheritance: true, ngImport: i0 }); }
|
|
4976
|
+
}
|
|
4977
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioButtonFocusInvalidButtonDirective, decorators: [{
|
|
4978
|
+
type: Directive,
|
|
4979
|
+
args: [{
|
|
4980
|
+
selector: 'button[gioFormFocusInvalid]',
|
|
4981
|
+
}]
|
|
4982
|
+
}], propDecorators: { onClick: [{
|
|
4983
|
+
type: HostListener,
|
|
4984
|
+
args: ['click']
|
|
4985
|
+
}] } });
|
|
4986
|
+
|
|
4987
|
+
/*
|
|
4988
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
4989
|
+
*
|
|
4990
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4991
|
+
* you may not use this file except in compliance with the License.
|
|
4992
|
+
* You may obtain a copy of the License at
|
|
4993
|
+
*
|
|
4994
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
4995
|
+
*
|
|
4996
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
4997
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
4998
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
4999
|
+
* See the License for the specific language governing permissions and
|
|
5000
|
+
* limitations under the License.
|
|
5001
|
+
*/
|
|
5002
|
+
class GioFormFocusInvalidModule {
|
|
5003
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFocusInvalidModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5004
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioFormFocusInvalidModule, declarations: [GioFormFocusInvalidFormDirective, GioButtonFocusInvalidButtonDirective, GioFormFocusInvalidIgnoreDirective], exports: [GioFormFocusInvalidFormDirective, GioButtonFocusInvalidButtonDirective, GioFormFocusInvalidIgnoreDirective] }); }
|
|
5005
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFocusInvalidModule }); }
|
|
5006
|
+
}
|
|
5007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormFocusInvalidModule, decorators: [{
|
|
5008
|
+
type: NgModule,
|
|
5009
|
+
args: [{
|
|
5010
|
+
declarations: [GioFormFocusInvalidFormDirective, GioButtonFocusInvalidButtonDirective, GioFormFocusInvalidIgnoreDirective],
|
|
5011
|
+
exports: [GioFormFocusInvalidFormDirective, GioButtonFocusInvalidButtonDirective, GioFormFocusInvalidIgnoreDirective],
|
|
5012
|
+
}]
|
|
5013
|
+
}] });
|
|
5014
|
+
|
|
5015
|
+
/*
|
|
5016
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
5017
|
+
*
|
|
5018
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5019
|
+
* you may not use this file except in compliance with the License.
|
|
5020
|
+
* You may obtain a copy of the License at
|
|
5021
|
+
*
|
|
5022
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5023
|
+
*
|
|
5024
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5025
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5026
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5027
|
+
* See the License for the specific language governing permissions and
|
|
5028
|
+
* limitations under the License.
|
|
5029
|
+
*/
|
|
5030
|
+
/**
|
|
5031
|
+
* This component is used to test the GioMonacoEditorComponent.
|
|
5032
|
+
* This component simulates monaco editor with a simple input.
|
|
5033
|
+
*/
|
|
5034
|
+
class GioMonacoEditorTestingComponent extends GioMonacoEditorComponent {
|
|
5035
|
+
get getValue() {
|
|
5036
|
+
return this.value;
|
|
5044
5037
|
}
|
|
5045
|
-
|
|
5046
|
-
|
|
5038
|
+
changeValue(value) {
|
|
5039
|
+
this._onTouched();
|
|
5040
|
+
this._onChange(value);
|
|
5047
5041
|
}
|
|
5048
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5049
|
-
static { this.ɵ
|
|
5042
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioMonacoEditorTestingComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5043
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioMonacoEditorTestingComponent, selector: "gio-monaco-editor", usesInheritance: true, ngImport: i0, template: '<input type="text" [value]="getValue" [disabled]="readOnly" (input)="changeValue($any($event).target?.value)" />', isInline: true }); }
|
|
5050
5044
|
}
|
|
5051
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5052
|
-
type:
|
|
5045
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioMonacoEditorTestingComponent, decorators: [{
|
|
5046
|
+
type: Component,
|
|
5053
5047
|
args: [{
|
|
5054
|
-
|
|
5048
|
+
selector: 'gio-monaco-editor',
|
|
5049
|
+
template: '<input type="text" [value]="getValue" [disabled]="readOnly" (input)="changeValue($any($event).target?.value)" />',
|
|
5055
5050
|
}]
|
|
5056
|
-
}]
|
|
5057
|
-
type: Inject,
|
|
5058
|
-
args: ['LicenseConfiguration']
|
|
5059
|
-
}] }, { type: i1$3.MatDialog }] });
|
|
5051
|
+
}] });
|
|
5060
5052
|
|
|
5061
5053
|
/*
|
|
5062
5054
|
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
@@ -5073,75 +5065,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5073
5065
|
* See the License for the specific language governing permissions and
|
|
5074
5066
|
* limitations under the License.
|
|
5075
5067
|
*/
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5068
|
+
const ConfigureTestingGioMonacoEditor = () => {
|
|
5069
|
+
// Hack to replace the default gio-monaco-editor component with fake one for testing purpose.
|
|
5070
|
+
try {
|
|
5071
|
+
TestBed.overrideModule(GioMonacoEditorModule, {
|
|
5072
|
+
remove: {
|
|
5073
|
+
declarations: [GioMonacoEditorComponent],
|
|
5074
|
+
exports: [GioMonacoEditorComponent],
|
|
5075
|
+
},
|
|
5076
|
+
add: {
|
|
5077
|
+
declarations: [GioMonacoEditorTestingComponent],
|
|
5078
|
+
exports: [GioMonacoEditorTestingComponent],
|
|
5079
|
+
},
|
|
5080
|
+
});
|
|
5085
5081
|
}
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
// If the license is not defined, we do not need to check anything
|
|
5089
|
-
if (isNil(gioLicense)) {
|
|
5090
|
-
return;
|
|
5091
|
-
}
|
|
5092
|
-
this.isNotAllowed$(gioLicense)
|
|
5093
|
-
.pipe(tap(() => {
|
|
5094
|
-
this.elRef.nativeElement.removeEventListener('click', this.onClick, true);
|
|
5095
|
-
}), filter(notAllowed => notAllowed), map(() => this.licenseService.getFeatureInfo(gioLicense)), tap(featureInfo => {
|
|
5096
|
-
this.featureInfo = featureInfo;
|
|
5097
|
-
this.elRef.nativeElement.addEventListener('click', this.onClick, true);
|
|
5098
|
-
}), takeUntil(this.unsubscribe$))
|
|
5099
|
-
.subscribe();
|
|
5100
|
-
if (gioLicense.feature) {
|
|
5101
|
-
this.trialURL = this.licenseService.getTrialURL(gioLicense);
|
|
5102
|
-
}
|
|
5082
|
+
catch (e) {
|
|
5083
|
+
// Do nothing
|
|
5103
5084
|
}
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5085
|
+
};
|
|
5086
|
+
ConfigureTestingGioMonacoEditor();
|
|
5087
|
+
class GioMonacoEditorHarness extends ComponentHarness {
|
|
5088
|
+
static { this.hostSelector = 'gio-monaco-editor'; }
|
|
5089
|
+
constructor(locatorFactory) {
|
|
5090
|
+
super(locatorFactory);
|
|
5091
|
+
this.getInputEl = this.locatorFor('input');
|
|
5109
5092
|
}
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5093
|
+
/**
|
|
5094
|
+
* Gets a `HarnessPredicate` that can be used to search for a `GioMonacoEditorHarness` that meets
|
|
5095
|
+
* certain criteria.
|
|
5096
|
+
*
|
|
5097
|
+
* @param options Options for filtering which input instances are considered a match.
|
|
5098
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
5099
|
+
*/
|
|
5100
|
+
static with(options = {}) {
|
|
5101
|
+
return new HarnessPredicate(GioMonacoEditorHarness, options);
|
|
5114
5102
|
}
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
.afterClosed()
|
|
5128
|
-
.subscribe();
|
|
5129
|
-
return false;
|
|
5103
|
+
async setValue(value) {
|
|
5104
|
+
const inputEl = await this.getInputEl();
|
|
5105
|
+
await inputEl.clear();
|
|
5106
|
+
await inputEl.sendKeys(value);
|
|
5107
|
+
}
|
|
5108
|
+
async getValue() {
|
|
5109
|
+
const inputEl = await this.getInputEl();
|
|
5110
|
+
return inputEl.getProperty('value');
|
|
5111
|
+
}
|
|
5112
|
+
async isDisabled() {
|
|
5113
|
+
const inputEl = await this.getInputEl();
|
|
5114
|
+
return inputEl.getProperty('disabled');
|
|
5130
5115
|
}
|
|
5131
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDirective, deps: [{ token: GioLicenseService }, { token: i1$3.MatDialog }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5132
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: GioLicenseDirective, selector: "[gioLicense]", inputs: { gioLicense: "gioLicense" }, ngImport: i0 }); }
|
|
5133
5116
|
}
|
|
5134
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDirective, decorators: [{
|
|
5135
|
-
type: Directive,
|
|
5136
|
-
args: [{
|
|
5137
|
-
selector: '[gioLicense]',
|
|
5138
|
-
}]
|
|
5139
|
-
}], ctorParameters: () => [{ type: GioLicenseService }, { type: i1$3.MatDialog }, { type: i0.ElementRef }], propDecorators: { gioLicense: [{
|
|
5140
|
-
type: Input
|
|
5141
|
-
}] } });
|
|
5142
5117
|
|
|
5143
5118
|
/*
|
|
5144
|
-
* Copyright (C)
|
|
5119
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
5145
5120
|
*
|
|
5146
5121
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5147
5122
|
* you may not use this file except in compliance with the License.
|
|
@@ -5155,22 +5130,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5155
5130
|
* See the License for the specific language governing permissions and
|
|
5156
5131
|
* limitations under the License.
|
|
5157
5132
|
*/
|
|
5158
|
-
class
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5133
|
+
class GioPrismJsService {
|
|
5134
|
+
loadPrismJs() {
|
|
5135
|
+
// First load PrismJs
|
|
5136
|
+
return this.loadPrimeJsCore().pipe(
|
|
5137
|
+
// Then load PrismJs components
|
|
5138
|
+
switchMap(() => this.loadPrismJsComponent('json')),
|
|
5139
|
+
// If already loaded, we don't want to load it again
|
|
5140
|
+
shareReplay(1),
|
|
5141
|
+
// Ignore error
|
|
5142
|
+
catchError(() => of(undefined)));
|
|
5143
|
+
}
|
|
5144
|
+
loadPrimeJsCore() {
|
|
5145
|
+
return new Observable(observer => {
|
|
5146
|
+
const onGotPrismJs = () => {
|
|
5147
|
+
observer.next();
|
|
5148
|
+
observer.complete();
|
|
5149
|
+
};
|
|
5150
|
+
if (!window.Prism) {
|
|
5151
|
+
const loaderPrismjs = document.createElement('script');
|
|
5152
|
+
loaderPrismjs.type = 'text/javascript';
|
|
5153
|
+
loaderPrismjs.src = 'assets/prismjs/prism.js';
|
|
5154
|
+
loaderPrismjs.addEventListener('load', onGotPrismJs);
|
|
5155
|
+
loaderPrismjs.addEventListener('error', err => observer.error(err));
|
|
5156
|
+
document.body.appendChild(loaderPrismjs);
|
|
5157
|
+
}
|
|
5158
|
+
else {
|
|
5159
|
+
onGotPrismJs();
|
|
5160
|
+
}
|
|
5161
|
+
});
|
|
5162
|
+
}
|
|
5163
|
+
loadPrismJsComponent(name) {
|
|
5164
|
+
return new Observable(observer => {
|
|
5165
|
+
const onGotPrismJsComponent = () => {
|
|
5166
|
+
observer.next();
|
|
5167
|
+
observer.complete();
|
|
5168
|
+
};
|
|
5169
|
+
if (!window.Prism.languages[name]) {
|
|
5170
|
+
const loaderPrismjsJson = document.createElement('script');
|
|
5171
|
+
loaderPrismjsJson.type = 'text/javascript';
|
|
5172
|
+
loaderPrismjsJson.src = `assets/prismjs/components/prism-${name}.js`;
|
|
5173
|
+
loaderPrismjsJson.addEventListener('load', onGotPrismJsComponent);
|
|
5174
|
+
loaderPrismjsJson.addEventListener('error', err => observer.error(err));
|
|
5175
|
+
document.body.appendChild(loaderPrismjsJson);
|
|
5176
|
+
}
|
|
5177
|
+
else {
|
|
5178
|
+
onGotPrismJsComponent();
|
|
5179
|
+
}
|
|
5180
|
+
});
|
|
5181
|
+
}
|
|
5182
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioPrismJsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5183
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioPrismJsService, providedIn: 'root' }); }
|
|
5162
5184
|
}
|
|
5163
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5164
|
-
type:
|
|
5185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioPrismJsService, decorators: [{
|
|
5186
|
+
type: Injectable,
|
|
5165
5187
|
args: [{
|
|
5166
|
-
|
|
5167
|
-
declarations: [GioLicenseDialogComponent],
|
|
5168
|
-
exports: [GioLicenseDialogComponent],
|
|
5188
|
+
providedIn: 'root',
|
|
5169
5189
|
}]
|
|
5170
5190
|
}] });
|
|
5171
5191
|
|
|
5172
5192
|
/*
|
|
5173
|
-
* Copyright (C)
|
|
5193
|
+
* Copyright (C) 2023 The Gravitee team (http://gravitee.io)
|
|
5174
5194
|
*
|
|
5175
5195
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5176
5196
|
* you may not use this file except in compliance with the License.
|
|
@@ -5184,19 +5204,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5184
5204
|
* See the License for the specific language governing permissions and
|
|
5185
5205
|
* limitations under the License.
|
|
5186
5206
|
*/
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
}
|
|
5192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseModule, decorators: [{
|
|
5193
|
-
type: NgModule,
|
|
5194
|
-
args: [{
|
|
5195
|
-
imports: [CommonModule, MatDialogModule, GioLicenseDialogModule],
|
|
5196
|
-
declarations: [GioLicenseDirective],
|
|
5197
|
-
exports: [GioLicenseDirective],
|
|
5198
|
-
}]
|
|
5199
|
-
}] });
|
|
5207
|
+
const GIO_DIALOG_WIDTH = {
|
|
5208
|
+
SMALL: '440px',
|
|
5209
|
+
MEDIUM: '600px',
|
|
5210
|
+
LARGE: '1240px',
|
|
5211
|
+
};
|
|
5200
5212
|
|
|
5201
5213
|
/*
|
|
5202
5214
|
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
@@ -5213,96 +5225,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5213
5225
|
* See the License for the specific language governing permissions and
|
|
5214
5226
|
* limitations under the License.
|
|
5215
5227
|
*/
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
title: 'FOOBAR',
|
|
5226
|
-
},
|
|
5227
|
-
},
|
|
5228
|
-
};
|
|
5229
|
-
const OEM_LICENSE_CONFIGURATION_TESTING = {
|
|
5230
|
-
resourceURL: 'https://oem.test:3000/license',
|
|
5231
|
-
trialResourceURL: 'https://oem.test:3000/trial',
|
|
5232
|
-
featureInfoData: {
|
|
5233
|
-
foobar: {
|
|
5234
|
-
image: 'assets/gio-icons.svg',
|
|
5235
|
-
description: 'Foobar feature description',
|
|
5236
|
-
title: 'FOOBAR',
|
|
5237
|
-
},
|
|
5238
|
-
},
|
|
5239
|
-
};
|
|
5240
|
-
class GioLicenseTestingModule {
|
|
5241
|
-
static with(license) {
|
|
5242
|
-
return {
|
|
5243
|
-
ngModule: GioLicenseTestingModule,
|
|
5244
|
-
providers: [
|
|
5245
|
-
{
|
|
5246
|
-
provide: 'LicenseConfiguration',
|
|
5247
|
-
useValue: LICENSE_CONFIGURATION_TESTING,
|
|
5248
|
-
},
|
|
5249
|
-
{
|
|
5250
|
-
provide: GioLicenseService,
|
|
5251
|
-
useValue: {
|
|
5252
|
-
isMissingFeature$: () => of(!license),
|
|
5253
|
-
getFeatureInfo: () => ({}),
|
|
5254
|
-
getTrialURL: () => '',
|
|
5255
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5256
|
-
openDialog: () => { },
|
|
5257
|
-
},
|
|
5258
|
-
},
|
|
5259
|
-
],
|
|
5260
|
-
};
|
|
5228
|
+
class GioClipboardComponent {
|
|
5229
|
+
constructor(clipboard) {
|
|
5230
|
+
this.clipboard = clipboard;
|
|
5231
|
+
this.label = 'Copy to clipboard';
|
|
5232
|
+
this.tooltipHideDelay = 0;
|
|
5233
|
+
this.clicked = false;
|
|
5234
|
+
this.contentToCopy = '';
|
|
5235
|
+
this.alwaysVisible = false;
|
|
5236
|
+
this.tabIndex = undefined;
|
|
5261
5237
|
}
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5238
|
+
onCopied(success, tooltip) {
|
|
5239
|
+
tooltip.message = success ? 'Copied!' : 'Failed to copy!';
|
|
5240
|
+
tooltip.hideDelay = 2000;
|
|
5241
|
+
tooltip.show();
|
|
5242
|
+
this.clicked = true;
|
|
5243
|
+
setTimeout(() => {
|
|
5244
|
+
tooltip.hide();
|
|
5245
|
+
}, 2000);
|
|
5246
|
+
setTimeout(() => {
|
|
5247
|
+
this.clicked = false;
|
|
5248
|
+
tooltip.message = this.label;
|
|
5249
|
+
tooltip.hideDelay = this.tooltipHideDelay;
|
|
5250
|
+
}, 2500);
|
|
5251
|
+
}
|
|
5252
|
+
onKeyupSpace() {
|
|
5253
|
+
this.clipboard.copy(this.contentToCopy);
|
|
5254
|
+
if (this.tooltip) {
|
|
5255
|
+
this.onCopied(true, this.tooltip);
|
|
5256
|
+
}
|
|
5257
|
+
}
|
|
5258
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardComponent, deps: [{ token: i1$5.Clipboard }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5259
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: GioClipboardComponent, inputs: { contentToCopy: "contentToCopy", alwaysVisible: "alwaysVisible", tabIndex: "tabIndex" }, viewQueries: [{ propertyName: "tooltip", first: true, predicate: ["tooltip"], descendants: true }], ngImport: i0 }); }
|
|
5280
5260
|
}
|
|
5281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5282
|
-
type:
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
isMissingFeature$: () => of(true),
|
|
5294
|
-
getFeatureInfo: () => ({}),
|
|
5295
|
-
getTrialURL: () => '',
|
|
5296
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5297
|
-
openDialog: () => { },
|
|
5298
|
-
},
|
|
5299
|
-
},
|
|
5300
|
-
],
|
|
5301
|
-
}]
|
|
5302
|
-
}] });
|
|
5261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardComponent, decorators: [{
|
|
5262
|
+
type: Directive
|
|
5263
|
+
}], ctorParameters: () => [{ type: i1$5.Clipboard }], propDecorators: { tooltip: [{
|
|
5264
|
+
type: ViewChild,
|
|
5265
|
+
args: ['tooltip']
|
|
5266
|
+
}], contentToCopy: [{
|
|
5267
|
+
type: Input
|
|
5268
|
+
}], alwaysVisible: [{
|
|
5269
|
+
type: Input
|
|
5270
|
+
}], tabIndex: [{
|
|
5271
|
+
type: Input
|
|
5272
|
+
}] } });
|
|
5303
5273
|
|
|
5304
5274
|
/*
|
|
5305
|
-
* Copyright (C)
|
|
5275
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5306
5276
|
*
|
|
5307
5277
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5308
5278
|
* you may not use this file except in compliance with the License.
|
|
@@ -5316,66 +5286,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5316
5286
|
* See the License for the specific language governing permissions and
|
|
5317
5287
|
* limitations under the License.
|
|
5318
5288
|
*/
|
|
5319
|
-
class
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
}], showCallToAction: [{
|
|
5368
|
-
type: Input
|
|
5369
|
-
}], callToActionMessage: [{
|
|
5370
|
-
type: Input
|
|
5371
|
-
}], link: [{
|
|
5372
|
-
type: Input
|
|
5373
|
-
}], inError: [{
|
|
5374
|
-
type: Input
|
|
5375
|
-
}] } });
|
|
5289
|
+
class GioClipboardCopyWrapperComponent extends GioClipboardComponent {
|
|
5290
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardCopyWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5291
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioClipboardCopyWrapperComponent, selector: "[gioClipboardCopyWrapper]", usesInheritance: true, ngImport: i0, template: `
|
|
5292
|
+
<ng-content></ng-content>
|
|
5293
|
+
<button
|
|
5294
|
+
#tooltip="matTooltip"
|
|
5295
|
+
type="button"
|
|
5296
|
+
class="right"
|
|
5297
|
+
[attr.aria-label]="label"
|
|
5298
|
+
[class.clicked]="clicked"
|
|
5299
|
+
[class.always-visible]="alwaysVisible"
|
|
5300
|
+
[cdkCopyToClipboard]="contentToCopy"
|
|
5301
|
+
(cdkCopyToClipboardCopied)="onCopied($event, tooltip)"
|
|
5302
|
+
matRipple
|
|
5303
|
+
[matRippleCentered]="true"
|
|
5304
|
+
[matRippleUnbounded]="true"
|
|
5305
|
+
[matTooltip]="label"
|
|
5306
|
+
[matTooltipPosition]="'after'"
|
|
5307
|
+
(keyup.Space)="onKeyupSpace()"
|
|
5308
|
+
>
|
|
5309
|
+
<mat-icon [inline]="true">{{ clicked ? 'check' : 'content_copy' }}</mat-icon>
|
|
5310
|
+
</button>
|
|
5311
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.right{padding:0;border:none;margin-left:4px;background:none;color:#616266;cursor:pointer;outline:inherit}.right:not(.clicked,.always-visible){opacity:0}.right.clicked{color:#099;opacity:1}:host(:hover,:focus) .right{opacity:1}:host(:hover,:focus) .right:hover,:host(:hover,:focus) .right:focus{color:#099}\n"], dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i1$5.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }] }); }
|
|
5312
|
+
}
|
|
5313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardCopyWrapperComponent, decorators: [{
|
|
5314
|
+
type: Component,
|
|
5315
|
+
args: [{ selector: '[gioClipboardCopyWrapper]', template: `
|
|
5316
|
+
<ng-content></ng-content>
|
|
5317
|
+
<button
|
|
5318
|
+
#tooltip="matTooltip"
|
|
5319
|
+
type="button"
|
|
5320
|
+
class="right"
|
|
5321
|
+
[attr.aria-label]="label"
|
|
5322
|
+
[class.clicked]="clicked"
|
|
5323
|
+
[class.always-visible]="alwaysVisible"
|
|
5324
|
+
[cdkCopyToClipboard]="contentToCopy"
|
|
5325
|
+
(cdkCopyToClipboardCopied)="onCopied($event, tooltip)"
|
|
5326
|
+
matRipple
|
|
5327
|
+
[matRippleCentered]="true"
|
|
5328
|
+
[matRippleUnbounded]="true"
|
|
5329
|
+
[matTooltip]="label"
|
|
5330
|
+
[matTooltipPosition]="'after'"
|
|
5331
|
+
(keyup.Space)="onKeyupSpace()"
|
|
5332
|
+
>
|
|
5333
|
+
<mat-icon [inline]="true">{{ clicked ? 'check' : 'content_copy' }}</mat-icon>
|
|
5334
|
+
</button>
|
|
5335
|
+
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.right{padding:0;border:none;margin-left:4px;background:none;color:#616266;cursor:pointer;outline:inherit}.right:not(.clicked,.always-visible){opacity:0}.right.clicked{color:#099;opacity:1}:host(:hover,:focus) .right{opacity:1}:host(:hover,:focus) .right:hover,:host(:hover,:focus) .right:focus{color:#099}\n"] }]
|
|
5336
|
+
}] });
|
|
5376
5337
|
|
|
5377
5338
|
/*
|
|
5378
|
-
* Copyright (C)
|
|
5339
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5379
5340
|
*
|
|
5380
5341
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5381
5342
|
* you may not use this file except in compliance with the License.
|
|
@@ -5389,18 +5350,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5389
5350
|
* See the License for the specific language governing permissions and
|
|
5390
5351
|
* limitations under the License.
|
|
5391
5352
|
*/
|
|
5392
|
-
class
|
|
5393
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5394
|
-
static { this.ɵ
|
|
5395
|
-
|
|
5353
|
+
class GioClipboardCopyIconComponent extends GioClipboardComponent {
|
|
5354
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardCopyIconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5355
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioClipboardCopyIconComponent, selector: "gio-clipboard-copy-icon", usesInheritance: true, ngImport: i0, template: `
|
|
5356
|
+
<button
|
|
5357
|
+
#tooltip="matTooltip"
|
|
5358
|
+
type="button"
|
|
5359
|
+
class="btn"
|
|
5360
|
+
[attr.aria-label]="label"
|
|
5361
|
+
[class.clicked]="clicked"
|
|
5362
|
+
[cdkCopyToClipboard]="contentToCopy"
|
|
5363
|
+
(cdkCopyToClipboardCopied)="onCopied($event, tooltip)"
|
|
5364
|
+
matRipple
|
|
5365
|
+
[matRippleCentered]="true"
|
|
5366
|
+
[matRippleUnbounded]="true"
|
|
5367
|
+
[matTooltip]="label"
|
|
5368
|
+
[matTooltipPosition]="'after'"
|
|
5369
|
+
(keyup.Space)="onKeyupSpace()"
|
|
5370
|
+
>
|
|
5371
|
+
<mat-icon>{{ clicked ? 'check' : 'content_copy' }}</mat-icon>
|
|
5372
|
+
</button>
|
|
5373
|
+
`, isInline: true, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host-context(.mat-mdc-form-field-icon-suffix){padding:12px}.btn{padding:0;border:none;margin-left:4px;background:none;color:#616266;cursor:pointer;outline:inherit}.btn.clicked,.btn:hover,.btn:focus{color:#099}\n"], dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i1$5.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }] }); }
|
|
5396
5374
|
}
|
|
5397
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5398
|
-
type:
|
|
5399
|
-
args: [{
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5375
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardCopyIconComponent, decorators: [{
|
|
5376
|
+
type: Component,
|
|
5377
|
+
args: [{ selector: 'gio-clipboard-copy-icon', template: `
|
|
5378
|
+
<button
|
|
5379
|
+
#tooltip="matTooltip"
|
|
5380
|
+
type="button"
|
|
5381
|
+
class="btn"
|
|
5382
|
+
[attr.aria-label]="label"
|
|
5383
|
+
[class.clicked]="clicked"
|
|
5384
|
+
[cdkCopyToClipboard]="contentToCopy"
|
|
5385
|
+
(cdkCopyToClipboardCopied)="onCopied($event, tooltip)"
|
|
5386
|
+
matRipple
|
|
5387
|
+
[matRippleCentered]="true"
|
|
5388
|
+
[matRippleUnbounded]="true"
|
|
5389
|
+
[matTooltip]="label"
|
|
5390
|
+
[matTooltipPosition]="'after'"
|
|
5391
|
+
(keyup.Space)="onKeyupSpace()"
|
|
5392
|
+
>
|
|
5393
|
+
<mat-icon>{{ clicked ? 'check' : 'content_copy' }}</mat-icon>
|
|
5394
|
+
</button>
|
|
5395
|
+
`, styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host-context(.mat-mdc-form-field-icon-suffix){padding:12px}.btn{padding:0;border:none;margin-left:4px;background:none;color:#616266;cursor:pointer;outline:inherit}.btn.clicked,.btn:hover,.btn:focus{color:#099}\n"] }]
|
|
5404
5396
|
}] });
|
|
5405
5397
|
|
|
5406
5398
|
/*
|
|
@@ -5418,36 +5410,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5418
5410
|
* See the License for the specific language governing permissions and
|
|
5419
5411
|
* limitations under the License.
|
|
5420
5412
|
*/
|
|
5421
|
-
class
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
this.getTitleMessage = this.locatorFor('.status__title__text');
|
|
5426
|
-
this.getCallToActionMessage = this.locatorFor('.status__action__text');
|
|
5427
|
-
this.getCallToActionLink = this.locatorFor('.status__action');
|
|
5428
|
-
}
|
|
5429
|
-
static { this.hostSelector = 'gio-license-expiration-notification'; }
|
|
5430
|
-
async getTitleText() {
|
|
5431
|
-
return this.getTitleMessage().then(el => el.text());
|
|
5432
|
-
}
|
|
5433
|
-
async isCallToActionVisible() {
|
|
5434
|
-
return this.getCallToActionLink()
|
|
5435
|
-
.then(_ => true)
|
|
5436
|
-
.catch(_ => false);
|
|
5437
|
-
}
|
|
5438
|
-
async getCallToActionText() {
|
|
5439
|
-
return this.getCallToActionMessage().then(el => el.text());
|
|
5440
|
-
}
|
|
5441
|
-
async getLink() {
|
|
5442
|
-
return this.getCallToActionLink().then(el => el.getAttribute('href'));
|
|
5443
|
-
}
|
|
5444
|
-
async isColor(color) {
|
|
5445
|
-
return this.getTitleContainer().then(el => el.hasClass(color));
|
|
5446
|
-
}
|
|
5413
|
+
class GioClipboardModule {
|
|
5414
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5415
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardModule, declarations: [GioClipboardCopyWrapperComponent, GioClipboardCopyIconComponent], imports: [CommonModule, MatIconModule, MatTooltipModule, MatRippleModule, ClipboardModule, MatButtonModule], exports: [GioClipboardCopyWrapperComponent, GioClipboardCopyIconComponent] }); }
|
|
5416
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardModule, imports: [CommonModule, MatIconModule, MatTooltipModule, MatRippleModule, ClipboardModule, MatButtonModule] }); }
|
|
5447
5417
|
}
|
|
5418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioClipboardModule, decorators: [{
|
|
5419
|
+
type: NgModule,
|
|
5420
|
+
args: [{
|
|
5421
|
+
imports: [CommonModule, MatIconModule, MatTooltipModule, MatRippleModule, ClipboardModule, MatButtonModule],
|
|
5422
|
+
declarations: [GioClipboardCopyWrapperComponent, GioClipboardCopyIconComponent],
|
|
5423
|
+
exports: [GioClipboardCopyWrapperComponent, GioClipboardCopyIconComponent],
|
|
5424
|
+
}]
|
|
5425
|
+
}] });
|
|
5448
5426
|
|
|
5449
5427
|
/*
|
|
5450
|
-
* Copyright (C)
|
|
5428
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5451
5429
|
*
|
|
5452
5430
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5453
5431
|
* you may not use this file except in compliance with the License.
|
|
@@ -5461,399 +5439,442 @@ class GioLicenseExpirationNotificationHarness extends ComponentHarness {
|
|
|
5461
5439
|
* See the License for the specific language governing permissions and
|
|
5462
5440
|
* limitations under the License.
|
|
5463
5441
|
*/
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
mode: 'secondly',
|
|
5468
|
-
default: '*/1 * * * * *',
|
|
5469
|
-
regex: /^(\*\/\d+\s)(\*\s){4}\*/,
|
|
5470
|
-
},
|
|
5471
|
-
{
|
|
5472
|
-
mode: 'minutely',
|
|
5473
|
-
default: '0 */1 * * * *',
|
|
5474
|
-
regex: /^0\s\*\/\d+\s(\*\s){3}\*$/,
|
|
5475
|
-
},
|
|
5476
|
-
{
|
|
5477
|
-
mode: 'hourly',
|
|
5478
|
-
default: '0 0 */1 * * *',
|
|
5479
|
-
regex: /^0\s\d+\s\*\/\d+\s(\*\s){2}\*$/,
|
|
5480
|
-
},
|
|
5481
|
-
{
|
|
5482
|
-
mode: 'daily',
|
|
5483
|
-
default: '0 0 0 */1 * *',
|
|
5484
|
-
regex: /^0\s\d+\s\d+\s\*\/\d+\s\*\s\*$/,
|
|
5485
|
-
},
|
|
5486
|
-
{
|
|
5487
|
-
mode: 'weekly',
|
|
5488
|
-
default: '0 0 0 * * 0',
|
|
5489
|
-
regex: /^(\d{1,2}\s){2,3}(\*\s){2}\d{1,2}$/,
|
|
5490
|
-
},
|
|
5491
|
-
{
|
|
5492
|
-
mode: 'monthly',
|
|
5493
|
-
default: '0 0 0 1 * *',
|
|
5494
|
-
regex: /^(\d+\s){3,4}\*\s\*$/,
|
|
5495
|
-
},
|
|
5496
|
-
{
|
|
5497
|
-
mode: 'custom',
|
|
5498
|
-
default: '* * * * * *',
|
|
5499
|
-
regex: /^.*$/,
|
|
5500
|
-
},
|
|
5501
|
-
];
|
|
5502
|
-
const getDefaultCronDisplay = (mode) => {
|
|
5503
|
-
const modeFound = DISPLAY_MODE_LIST.find(mf => mf.mode === mode);
|
|
5504
|
-
if (!modeFound) {
|
|
5505
|
-
throw new Error('Invalid cron mode.');
|
|
5506
|
-
}
|
|
5507
|
-
return parseCronExpression(modeFound.default);
|
|
5508
|
-
};
|
|
5509
|
-
const parseCronExpression = (cronExpression) => {
|
|
5510
|
-
throwIfInvalid(cronExpression);
|
|
5511
|
-
const parts = cronExpression.split(' ');
|
|
5512
|
-
// Normalize cron so that second segment is included.
|
|
5513
|
-
if (cronExpression && cronExpression.split(' ').length === 6) {
|
|
5514
|
-
parts.push('');
|
|
5515
|
-
}
|
|
5516
|
-
const hourInterval = getHourInterval(parts);
|
|
5517
|
-
const minuteInterval = getMinuteInterval(parts);
|
|
5518
|
-
const secondInterval = getSecondInterval(parts);
|
|
5519
|
-
const dayInterval = getDayInterval(parts);
|
|
5520
|
-
const dayOfWeek = getDayOfWeek(parts);
|
|
5521
|
-
const dayOfMonth = getDayOfMonth(parts);
|
|
5522
|
-
const hours = getHours(parts);
|
|
5523
|
-
const minutes = getMinutes(parts);
|
|
5524
|
-
const displayMode = getDisplayMode(cronExpression);
|
|
5525
|
-
switch (displayMode.mode) {
|
|
5526
|
-
case 'secondly':
|
|
5527
|
-
return {
|
|
5528
|
-
mode: 'secondly',
|
|
5529
|
-
secondInterval,
|
|
5530
|
-
};
|
|
5531
|
-
case 'minutely':
|
|
5532
|
-
return {
|
|
5533
|
-
mode: 'minutely',
|
|
5534
|
-
minuteInterval,
|
|
5535
|
-
};
|
|
5536
|
-
case 'hourly':
|
|
5537
|
-
return {
|
|
5538
|
-
mode: 'hourly',
|
|
5539
|
-
hourInterval,
|
|
5540
|
-
minutes,
|
|
5541
|
-
};
|
|
5542
|
-
case 'daily':
|
|
5543
|
-
return {
|
|
5544
|
-
mode: 'daily',
|
|
5545
|
-
dayInterval,
|
|
5546
|
-
hours,
|
|
5547
|
-
minutes,
|
|
5548
|
-
};
|
|
5549
|
-
case 'weekly':
|
|
5550
|
-
return {
|
|
5551
|
-
mode: 'weekly',
|
|
5552
|
-
dayOfWeek,
|
|
5553
|
-
hours,
|
|
5554
|
-
minutes,
|
|
5555
|
-
};
|
|
5556
|
-
case 'monthly':
|
|
5557
|
-
return {
|
|
5558
|
-
mode: 'monthly',
|
|
5559
|
-
dayOfMonth,
|
|
5560
|
-
hours,
|
|
5561
|
-
minutes,
|
|
5562
|
-
};
|
|
5563
|
-
case 'custom':
|
|
5564
|
-
return {
|
|
5565
|
-
mode: 'custom',
|
|
5566
|
-
customExpression: cronExpression,
|
|
5567
|
-
};
|
|
5568
|
-
}
|
|
5569
|
-
};
|
|
5570
|
-
const toCronExpression = (cronDisplay) => {
|
|
5571
|
-
switch (cronDisplay.mode) {
|
|
5572
|
-
case 'secondly':
|
|
5573
|
-
return `*/${cronDisplay.secondInterval} * * * * *`;
|
|
5574
|
-
case 'minutely':
|
|
5575
|
-
return `0 */${cronDisplay.minuteInterval} * * * *`;
|
|
5576
|
-
case 'hourly':
|
|
5577
|
-
return `0 ${cronDisplay.minutes} */${cronDisplay.hourInterval} * * *`;
|
|
5578
|
-
case 'daily':
|
|
5579
|
-
return `0 ${cronDisplay.minutes} ${cronDisplay.hours} */${cronDisplay.dayInterval} * *`;
|
|
5580
|
-
case 'weekly':
|
|
5581
|
-
return `0 ${cronDisplay.minutes} ${cronDisplay.hours} * * ${cronDisplay.dayOfWeek}`;
|
|
5582
|
-
case 'monthly':
|
|
5583
|
-
return `0 ${cronDisplay.minutes} ${cronDisplay.hours} ${cronDisplay.dayOfMonth} * *`;
|
|
5584
|
-
case 'custom':
|
|
5585
|
-
return `${cronDisplay.customExpression}`;
|
|
5442
|
+
class SafePipe {
|
|
5443
|
+
constructor(sanitizer) {
|
|
5444
|
+
this.sanitizer = sanitizer;
|
|
5586
5445
|
}
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5446
|
+
transform(value, type) {
|
|
5447
|
+
if (!value) {
|
|
5448
|
+
return '';
|
|
5449
|
+
}
|
|
5450
|
+
switch (type) {
|
|
5451
|
+
// No Sonar because the bypass is deliberate and should only be used with safe data
|
|
5452
|
+
case 'html':
|
|
5453
|
+
return this.sanitizer.bypassSecurityTrustHtml(value); // NOSONAR
|
|
5454
|
+
case 'style':
|
|
5455
|
+
return this.sanitizer.bypassSecurityTrustStyle(value); // NOSONAR
|
|
5456
|
+
case 'script':
|
|
5457
|
+
return this.sanitizer.bypassSecurityTrustScript(value); // NOSONAR
|
|
5458
|
+
case 'url':
|
|
5459
|
+
return this.sanitizer.bypassSecurityTrustUrl(value); // NOSONAR
|
|
5460
|
+
case 'resourceUrl':
|
|
5461
|
+
return this.sanitizer.bypassSecurityTrustResourceUrl(value); // NOSONAR
|
|
5462
|
+
default:
|
|
5463
|
+
throw new Error(`Invalid safe type specified: ${type}`);
|
|
5464
|
+
}
|
|
5592
5465
|
}
|
|
5593
|
-
|
|
5594
|
-
};
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5466
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: SafePipe, deps: [{ token: i2$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5467
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: SafePipe, name: "safe" }); }
|
|
5468
|
+
}
|
|
5469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: SafePipe, decorators: [{
|
|
5470
|
+
type: Pipe,
|
|
5471
|
+
args: [{
|
|
5472
|
+
name: 'safe',
|
|
5473
|
+
}]
|
|
5474
|
+
}], ctorParameters: () => [{ type: i2$2.DomSanitizer }] });
|
|
5475
|
+
|
|
5476
|
+
/*
|
|
5477
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5478
|
+
*
|
|
5479
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5480
|
+
* you may not use this file except in compliance with the License.
|
|
5481
|
+
* You may obtain a copy of the License at
|
|
5482
|
+
*
|
|
5483
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5484
|
+
*
|
|
5485
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5486
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5487
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5488
|
+
* See the License for the specific language governing permissions and
|
|
5489
|
+
* limitations under the License.
|
|
5598
5490
|
*/
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5491
|
+
class GioSafePipeModule {
|
|
5492
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioSafePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5493
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioSafePipeModule, declarations: [SafePipe], exports: [SafePipe] }); }
|
|
5494
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioSafePipeModule }); }
|
|
5495
|
+
}
|
|
5496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioSafePipeModule, decorators: [{
|
|
5497
|
+
type: NgModule,
|
|
5498
|
+
args: [{
|
|
5499
|
+
imports: [],
|
|
5500
|
+
declarations: [SafePipe],
|
|
5501
|
+
exports: [SafePipe],
|
|
5502
|
+
}]
|
|
5503
|
+
}] });
|
|
5504
|
+
|
|
5505
|
+
/*
|
|
5506
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5507
|
+
*
|
|
5508
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5509
|
+
* you may not use this file except in compliance with the License.
|
|
5510
|
+
* You may obtain a copy of the License at
|
|
5511
|
+
*
|
|
5512
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5513
|
+
*
|
|
5514
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5515
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5516
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5517
|
+
* See the License for the specific language governing permissions and
|
|
5518
|
+
* limitations under the License.
|
|
5519
|
+
*/
|
|
5520
|
+
class GioLicenseDialogComponent {
|
|
5521
|
+
constructor(dialogRef, dialogData) {
|
|
5522
|
+
this.dialogRef = dialogRef;
|
|
5523
|
+
this.featureInfo = dialogData?.featureInfo;
|
|
5524
|
+
this.trialURL = dialogData?.trialURL;
|
|
5612
5525
|
}
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
default: modeFound.default,
|
|
5616
|
-
};
|
|
5617
|
-
};
|
|
5618
|
-
const getSecondInterval = (expressionParts) => {
|
|
5619
|
-
const v = getSegment(expressionParts[0])[0][1];
|
|
5620
|
-
return typeof v === 'number' ? v : undefined;
|
|
5621
|
-
};
|
|
5622
|
-
const getMinuteInterval = (expressionParts) => {
|
|
5623
|
-
const v = getSegment(expressionParts[1])[0][1];
|
|
5624
|
-
return typeof v === 'number' ? v : undefined;
|
|
5625
|
-
};
|
|
5626
|
-
const getHourInterval = (expressionParts) => {
|
|
5627
|
-
const v = getSegment(expressionParts[2])[0][1];
|
|
5628
|
-
return typeof v === 'number' ? v : undefined;
|
|
5629
|
-
};
|
|
5630
|
-
const getDayInterval = (expressionParts) => {
|
|
5631
|
-
const v = getSegment(expressionParts[3])[0][1];
|
|
5632
|
-
return typeof v === 'number' ? v : undefined;
|
|
5633
|
-
};
|
|
5634
|
-
const getDayOfWeek = (expressionParts) => {
|
|
5635
|
-
const v = getSegment(expressionParts[5])[0][0];
|
|
5636
|
-
return typeof v === 'number' ? v : undefined;
|
|
5637
|
-
};
|
|
5638
|
-
const getDayOfMonth = (expressionParts) => {
|
|
5639
|
-
const v = getSegment(expressionParts[3])[0][0];
|
|
5640
|
-
return typeof v === 'number' ? v : undefined;
|
|
5641
|
-
};
|
|
5642
|
-
const getMinutes = (expressionParts) => {
|
|
5643
|
-
const v = getSegment(expressionParts[1])[0][0];
|
|
5644
|
-
return typeof v === 'number' ? v : undefined;
|
|
5645
|
-
};
|
|
5646
|
-
const getHours = (expressionParts) => {
|
|
5647
|
-
const v = getSegment(expressionParts[2])[0][0];
|
|
5648
|
-
return typeof v === 'number' ? v : undefined;
|
|
5649
|
-
};
|
|
5650
|
-
const getSegment = (value) => {
|
|
5651
|
-
if (value === undefined) {
|
|
5652
|
-
value = '*';
|
|
5526
|
+
onClose() {
|
|
5527
|
+
this.dialogRef.close();
|
|
5653
5528
|
}
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
};
|
|
5529
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDialogComponent, deps: [{ token: i1$3.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5530
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioLicenseDialogComponent, selector: "gio-license-dialog", 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 class=\"gio-license-dialog__title\">\n <mat-icon class=\"gio-license-dialog__title__cancel\"></mat-icon>\n <button mat-icon-button [attr.aria-label]=\"'Close'\" (click)=\"onClose()\">\n <mat-icon class=\"gio-license-dialog__title__cancel\" svgIcon=\"gio:cancel\"> </mat-icon>\n </button>\n</div>\n\n<mat-dialog-content class=\"gio-license-dialog__content\">\n <img class=\"gio-license-dialog__content__image\" [src]=\"featureInfo.image\" [alt]=\"featureInfo.title || 'Unlock Gravitee Enterprise'\" />\n <h2 class=\"gio-license-dialog__content__title\" [innerHTML]=\"featureInfo.title || 'Unlock Gravitee Enterprise' | safe: 'html'\"></h2>\n <div class=\"gio-license-dialog__content__description\" [innerHTML]=\"featureInfo.description | safe: 'html'\"></div>\n <div class=\"gio-license-dialog__content__action\">\n <a class=\"gio-license-dialog__content__action__button\" mat-stroked-button color=\"accent\" target=\"_blank\" [href]=\"trialURL\">\n {{ featureInfo.trialButtonLabel || 'Request an enterprise license' }} <mat-icon svgIcon=\"gio:external-link\"></mat-icon>\n </a>\n <div *ngIf=\"!featureInfo.hideDays\" class=\"gio-license-dialog__content__action__info\">14 days trial</div>\n </div>\n</mat-dialog-content>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.gio-license-dialog__title{display:flex;justify-content:space-between}.gio-license-dialog__title__cancel{width:24px;height:24px;color:#8e8f9c}.gio-license-dialog__content{display:flex;width:600px;flex-direction:column;align-items:center;justify-content:center;padding:0}.gio-license-dialog__content__title{margin:0 0 24px;font-size:26px;font-weight:600;line-height:36px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.gio-license-dialog__content__description{padding:0 50px 32px;color:#606274;font-weight:500;line-height:24px;text-align:center}.gio-license-dialog__content__action{display:flex;flex-direction:column;align-items:center;padding:0 40px 16px}.gio-license-dialog__content__action__button{width:250px}.gio-license-dialog__content__action__info{margin-top:10px;color:#606274;text-align:center}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "pipe", type: SafePipe, name: "safe" }] }); }
|
|
5531
|
+
}
|
|
5532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDialogComponent, decorators: [{
|
|
5533
|
+
type: Component,
|
|
5534
|
+
args: [{ selector: 'gio-license-dialog', 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 class=\"gio-license-dialog__title\">\n <mat-icon class=\"gio-license-dialog__title__cancel\"></mat-icon>\n <button mat-icon-button [attr.aria-label]=\"'Close'\" (click)=\"onClose()\">\n <mat-icon class=\"gio-license-dialog__title__cancel\" svgIcon=\"gio:cancel\"> </mat-icon>\n </button>\n</div>\n\n<mat-dialog-content class=\"gio-license-dialog__content\">\n <img class=\"gio-license-dialog__content__image\" [src]=\"featureInfo.image\" [alt]=\"featureInfo.title || 'Unlock Gravitee Enterprise'\" />\n <h2 class=\"gio-license-dialog__content__title\" [innerHTML]=\"featureInfo.title || 'Unlock Gravitee Enterprise' | safe: 'html'\"></h2>\n <div class=\"gio-license-dialog__content__description\" [innerHTML]=\"featureInfo.description | safe: 'html'\"></div>\n <div class=\"gio-license-dialog__content__action\">\n <a class=\"gio-license-dialog__content__action__button\" mat-stroked-button color=\"accent\" target=\"_blank\" [href]=\"trialURL\">\n {{ featureInfo.trialButtonLabel || 'Request an enterprise license' }} <mat-icon svgIcon=\"gio:external-link\"></mat-icon>\n </a>\n <div *ngIf=\"!featureInfo.hideDays\" class=\"gio-license-dialog__content__action__info\">14 days trial</div>\n </div>\n</mat-dialog-content>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.gio-license-dialog__title{display:flex;justify-content:space-between}.gio-license-dialog__title__cancel{width:24px;height:24px;color:#8e8f9c}.gio-license-dialog__content{display:flex;width:600px;flex-direction:column;align-items:center;justify-content:center;padding:0}.gio-license-dialog__content__title{margin:0 0 24px;font-size:26px;font-weight:600;line-height:36px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.gio-license-dialog__content__description{padding:0 50px 32px;color:#606274;font-weight:500;line-height:24px;text-align:center}.gio-license-dialog__content__action{display:flex;flex-direction:column;align-items:center;padding:0 40px 16px}.gio-license-dialog__content__action__button{width:250px}.gio-license-dialog__content__action__info{margin-top:10px;color:#606274;text-align:center}\n"] }]
|
|
5535
|
+
}], ctorParameters: () => [{ type: i1$3.MatDialogRef }, { type: undefined, decorators: [{
|
|
5536
|
+
type: Inject,
|
|
5537
|
+
args: [MAT_DIALOG_DATA]
|
|
5538
|
+
}] }] });
|
|
5664
5539
|
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
this.
|
|
5669
|
-
this.
|
|
5670
|
-
this.
|
|
5671
|
-
this.
|
|
5672
|
-
this.seconds = [...range(0, 60)];
|
|
5673
|
-
this.minutes = [...range(0, 60)];
|
|
5674
|
-
this.hours = [...range(0, 24)];
|
|
5675
|
-
this.daysOfMonth = [...range(1, 32)];
|
|
5676
|
-
this.daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
|
|
5677
|
-
this.isDisabled = false;
|
|
5678
|
-
this.smallDisplay = false;
|
|
5679
|
-
this.touched = false;
|
|
5680
|
-
this.focused = false;
|
|
5681
|
-
this.hasError = false;
|
|
5682
|
-
this.unsubscribe$ = new Subject();
|
|
5683
|
-
fm.monitor(elRef.nativeElement, true).subscribe(origin => {
|
|
5684
|
-
this.focused = !!origin;
|
|
5685
|
-
this._onTouched();
|
|
5686
|
-
this.touched = true;
|
|
5687
|
-
});
|
|
5540
|
+
const isLicensePluginOptions = (licenseOptions) => has(licenseOptions, 'deployed');
|
|
5541
|
+
class GioLicenseService {
|
|
5542
|
+
constructor(http, licenseConfiguration, matDialog) {
|
|
5543
|
+
this.http = http;
|
|
5544
|
+
this.licenseConfiguration = licenseConfiguration;
|
|
5545
|
+
this.matDialog = matDialog;
|
|
5546
|
+
this.loadLicense$ = this.http.get(licenseConfiguration.resourceURL).pipe(shareReplay(1));
|
|
5688
5547
|
}
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
});
|
|
5696
|
-
});
|
|
5697
|
-
this.resizeObserver.observe(this.elRef.nativeElement);
|
|
5548
|
+
getLicense$() {
|
|
5549
|
+
return this.loadLicense$;
|
|
5550
|
+
}
|
|
5551
|
+
isMissingFeature$(feature) {
|
|
5552
|
+
if (feature == null) {
|
|
5553
|
+
return of(false);
|
|
5698
5554
|
}
|
|
5699
|
-
this.
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
minuteInterval: new UntypedFormControl(),
|
|
5703
|
-
hourInterval: new UntypedFormControl(),
|
|
5704
|
-
dayInterval: new UntypedFormControl(),
|
|
5705
|
-
dayOfWeek: new UntypedFormControl(),
|
|
5706
|
-
dayOfMonth: new UntypedFormControl(),
|
|
5707
|
-
hours: new UntypedFormControl(),
|
|
5708
|
-
minutes: new UntypedFormControl(),
|
|
5709
|
-
customExpression: new UntypedFormControl(),
|
|
5710
|
-
});
|
|
5711
|
-
this.isDisabled ? this.internalFormGroup.disable({ emitEvent: false }) : this.internalFormGroup.enable({ emitEvent: false });
|
|
5712
|
-
this.internalFormGroup
|
|
5713
|
-
.get('mode')
|
|
5714
|
-
?.valueChanges.pipe(filter(mode => !!mode), tap(mode => {
|
|
5715
|
-
this.cronDisplay = getDefaultCronDisplay(mode);
|
|
5716
|
-
this.refreshInternalForm();
|
|
5717
|
-
}), takeUntil(this.unsubscribe$))
|
|
5718
|
-
.subscribe();
|
|
5719
|
-
this.internalFormGroup.valueChanges
|
|
5720
|
-
?.pipe(tap(value => {
|
|
5721
|
-
this.hasError = false;
|
|
5722
|
-
if (!value?.mode) {
|
|
5723
|
-
this._onChange(null);
|
|
5724
|
-
return;
|
|
5725
|
-
}
|
|
5726
|
-
try {
|
|
5727
|
-
this.value = toCronExpression({
|
|
5728
|
-
mode: value.mode,
|
|
5729
|
-
secondInterval: value.secondInterval,
|
|
5730
|
-
minuteInterval: value.minuteInterval,
|
|
5731
|
-
hourInterval: value.hourInterval,
|
|
5732
|
-
dayInterval: value.dayInterval,
|
|
5733
|
-
dayOfWeek: value.dayOfWeek,
|
|
5734
|
-
dayOfMonth: value.dayOfMonth,
|
|
5735
|
-
customExpression: value.customExpression,
|
|
5736
|
-
hours: value.hours,
|
|
5737
|
-
minutes: value.minutes,
|
|
5738
|
-
});
|
|
5739
|
-
this.expressionDescription = toCronDescription(this.value);
|
|
5740
|
-
this._onChange(this.value);
|
|
5555
|
+
return this.isExpired$().pipe(switchMap(isExpired => {
|
|
5556
|
+
if (isExpired) {
|
|
5557
|
+
return of(isExpired);
|
|
5741
5558
|
}
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5559
|
+
return this.getLicense$().pipe(map(license => license == null || !license.features.some(feat => feat === feature)));
|
|
5560
|
+
}));
|
|
5561
|
+
}
|
|
5562
|
+
hasAllFeatures$(licenseOptions) {
|
|
5563
|
+
if (!licenseOptions || isEmpty(licenseOptions)) {
|
|
5564
|
+
return of(true);
|
|
5565
|
+
}
|
|
5566
|
+
return this.isExpired$().pipe(switchMap(isExpired => {
|
|
5567
|
+
const featuresDefined = licenseOptions.some(o => !!o.feature);
|
|
5568
|
+
if (isExpired && featuresDefined) {
|
|
5569
|
+
return of(false);
|
|
5746
5570
|
}
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
this.refreshInternalForm();
|
|
5750
|
-
}
|
|
5751
|
-
ngOnDestroy() {
|
|
5752
|
-
this.fm.stopMonitoring(this.elRef.nativeElement);
|
|
5753
|
-
this.resizeObserver?.unobserve(this.elRef.nativeElement);
|
|
5754
|
-
this.unsubscribe$.next();
|
|
5755
|
-
this.unsubscribe$.complete();
|
|
5571
|
+
return this.getLicense$().pipe(map(license => license != null && licenseOptions.every(o => license.features.some(feat => feat === o.feature))));
|
|
5572
|
+
}));
|
|
5756
5573
|
}
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
this.onClear();
|
|
5761
|
-
return;
|
|
5574
|
+
getFeatureInfo(licenseOptions) {
|
|
5575
|
+
if (!licenseOptions.feature) {
|
|
5576
|
+
throw new Error(`feature is undefined`);
|
|
5762
5577
|
}
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
this.expressionDescription = toCronDescription(this.value);
|
|
5767
|
-
this.refreshInternalForm();
|
|
5578
|
+
const featureInfo = this.licenseConfiguration.featureInfoData[licenseOptions.feature];
|
|
5579
|
+
if (!featureInfo) {
|
|
5580
|
+
throw new Error(`Unknown Feature value ${licenseOptions.feature}. Expected one of ${Object.keys(this.licenseConfiguration.featureInfoData)}`);
|
|
5768
5581
|
}
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5582
|
+
return featureInfo;
|
|
5583
|
+
}
|
|
5584
|
+
getTrialURL(licenseOptions) {
|
|
5585
|
+
if (!licenseOptions.feature) {
|
|
5586
|
+
throw new Error(`feature is undefined`);
|
|
5772
5587
|
}
|
|
5588
|
+
const urlParams = this.licenseConfiguration.utmSource || this.licenseConfiguration.utmCampaign
|
|
5589
|
+
? `?utm_source=${this.licenseConfiguration.utmSource}&utm_medium=${licenseOptions.feature}&utm_campaign=${this.licenseConfiguration.utmCampaign}`
|
|
5590
|
+
: '';
|
|
5591
|
+
const context = urlParams.length > 0 && licenseOptions.context ? `&utm_content=${licenseOptions.context}` : '';
|
|
5592
|
+
return `${this.licenseConfiguration.trialResourceURL}${urlParams}${context}`;
|
|
5773
5593
|
}
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
this._onChange = fn;
|
|
5594
|
+
isOEM$() {
|
|
5595
|
+
return this.getLicense$().pipe(map(license => license !== null && license.features.includes('oem-customization')));
|
|
5777
5596
|
}
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5597
|
+
openDialog(licenseOptions, event) {
|
|
5598
|
+
event?.stopPropagation();
|
|
5599
|
+
event?.preventDefault();
|
|
5600
|
+
const featureInfo = this.getFeatureInfo(licenseOptions);
|
|
5601
|
+
const trialURL = this.getTrialURL(licenseOptions);
|
|
5602
|
+
return this.matDialog
|
|
5603
|
+
.open(GioLicenseDialogComponent, {
|
|
5604
|
+
data: {
|
|
5605
|
+
featureInfo,
|
|
5606
|
+
trialURL,
|
|
5607
|
+
},
|
|
5608
|
+
role: 'alertdialog',
|
|
5609
|
+
id: 'gioLicenseDialog',
|
|
5610
|
+
})
|
|
5611
|
+
.afterClosed()
|
|
5612
|
+
.subscribe();
|
|
5781
5613
|
}
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
this.isDisabled = isDisabled;
|
|
5785
|
-
this.refreshInternalForm();
|
|
5614
|
+
getExpiresAt$() {
|
|
5615
|
+
return this.getLicense$().pipe(map(license => (license.expiresAt ? new Date(license.expiresAt) : undefined)));
|
|
5786
5616
|
}
|
|
5787
|
-
|
|
5788
|
-
return this.
|
|
5617
|
+
isExpired$() {
|
|
5618
|
+
return this.getLicense$().pipe(map(license => license?.isExpired === true));
|
|
5789
5619
|
}
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5620
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseService, deps: [{ token: i1$6.HttpClient }, { token: 'LicenseConfiguration' }, { token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5621
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseService, providedIn: 'root' }); }
|
|
5622
|
+
}
|
|
5623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseService, decorators: [{
|
|
5624
|
+
type: Injectable,
|
|
5625
|
+
args: [{
|
|
5626
|
+
providedIn: 'root',
|
|
5627
|
+
}]
|
|
5628
|
+
}], ctorParameters: () => [{ type: i1$6.HttpClient }, { type: undefined, decorators: [{
|
|
5629
|
+
type: Inject,
|
|
5630
|
+
args: ['LicenseConfiguration']
|
|
5631
|
+
}] }, { type: i1$3.MatDialog }] });
|
|
5632
|
+
|
|
5633
|
+
/*
|
|
5634
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5635
|
+
*
|
|
5636
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5637
|
+
* you may not use this file except in compliance with the License.
|
|
5638
|
+
* You may obtain a copy of the License at
|
|
5639
|
+
*
|
|
5640
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5641
|
+
*
|
|
5642
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5643
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5644
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5645
|
+
* See the License for the specific language governing permissions and
|
|
5646
|
+
* limitations under the License.
|
|
5647
|
+
*/
|
|
5648
|
+
class GioLicenseDirective {
|
|
5649
|
+
constructor(licenseService, matDialog, elRef) {
|
|
5650
|
+
this.licenseService = licenseService;
|
|
5651
|
+
this.matDialog = matDialog;
|
|
5652
|
+
this.elRef = elRef;
|
|
5653
|
+
this.featureInfo = {};
|
|
5654
|
+
this.trialURL = '';
|
|
5655
|
+
this.unsubscribe$ = new Subject();
|
|
5656
|
+
this.onClick = this.click.bind(this);
|
|
5798
5657
|
}
|
|
5799
|
-
|
|
5800
|
-
|
|
5658
|
+
ngOnInit() {
|
|
5659
|
+
const gioLicense = this.gioLicense;
|
|
5660
|
+
// If the license is not defined, we do not need to check anything
|
|
5661
|
+
if (isNil(gioLicense)) {
|
|
5801
5662
|
return;
|
|
5802
|
-
this.isDisabled ? this.internalFormGroup.disable({ emitEvent: false }) : this.internalFormGroup.enable({ emitEvent: false });
|
|
5803
|
-
const d = this.cronDisplay;
|
|
5804
|
-
if (d) {
|
|
5805
|
-
this.internalFormGroup.patchValue({
|
|
5806
|
-
mode: d.mode,
|
|
5807
|
-
customExpression: d.customExpression,
|
|
5808
|
-
secondInterval: d.secondInterval,
|
|
5809
|
-
minuteInterval: d.minuteInterval,
|
|
5810
|
-
hourInterval: d.hourInterval,
|
|
5811
|
-
dayInterval: d.dayInterval,
|
|
5812
|
-
dayOfWeek: d.dayOfWeek,
|
|
5813
|
-
dayOfMonth: d.dayOfMonth,
|
|
5814
|
-
hours: d.hours,
|
|
5815
|
-
minutes: d.minutes,
|
|
5816
|
-
}, { emitEvent: false });
|
|
5817
5663
|
}
|
|
5664
|
+
this.isNotAllowed$(gioLicense)
|
|
5665
|
+
.pipe(tap(() => {
|
|
5666
|
+
this.elRef.nativeElement.removeEventListener('click', this.onClick, true);
|
|
5667
|
+
}), filter(notAllowed => notAllowed), map(() => this.licenseService.getFeatureInfo(gioLicense)), tap(featureInfo => {
|
|
5668
|
+
this.featureInfo = featureInfo;
|
|
5669
|
+
this.elRef.nativeElement.addEventListener('click', this.onClick, true);
|
|
5670
|
+
}), takeUntil(this.unsubscribe$))
|
|
5671
|
+
.subscribe();
|
|
5672
|
+
if (gioLicense.feature) {
|
|
5673
|
+
this.trialURL = this.licenseService.getTrialURL(gioLicense);
|
|
5674
|
+
}
|
|
5675
|
+
}
|
|
5676
|
+
isNotAllowed$(gioLicense) {
|
|
5677
|
+
if (isLicensePluginOptions(gioLicense)) {
|
|
5678
|
+
return of(!gioLicense.deployed);
|
|
5679
|
+
}
|
|
5680
|
+
return this.licenseService.isMissingFeature$(gioLicense.feature);
|
|
5681
|
+
}
|
|
5682
|
+
ngOnDestroy() {
|
|
5683
|
+
this.elRef.nativeElement.removeEventListener('click', this.onClick, true);
|
|
5684
|
+
this.unsubscribe$.next(false);
|
|
5685
|
+
this.unsubscribe$.unsubscribe();
|
|
5686
|
+
}
|
|
5687
|
+
click($event) {
|
|
5688
|
+
$event.preventDefault();
|
|
5689
|
+
$event.stopPropagation();
|
|
5690
|
+
this.matDialog
|
|
5691
|
+
.open(GioLicenseDialogComponent, {
|
|
5692
|
+
data: {
|
|
5693
|
+
featureInfo: this.featureInfo,
|
|
5694
|
+
trialURL: this.trialURL,
|
|
5695
|
+
},
|
|
5696
|
+
role: 'alertdialog',
|
|
5697
|
+
id: 'gioLicenseDialog',
|
|
5698
|
+
})
|
|
5699
|
+
.afterClosed()
|
|
5700
|
+
.subscribe();
|
|
5701
|
+
return false;
|
|
5702
|
+
}
|
|
5703
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDirective, deps: [{ token: GioLicenseService }, { token: i1$3.MatDialog }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5704
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.2.3", type: GioLicenseDirective, selector: "[gioLicense]", inputs: { gioLicense: "gioLicense" }, ngImport: i0 }); }
|
|
5705
|
+
}
|
|
5706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDirective, decorators: [{
|
|
5707
|
+
type: Directive,
|
|
5708
|
+
args: [{
|
|
5709
|
+
selector: '[gioLicense]',
|
|
5710
|
+
}]
|
|
5711
|
+
}], ctorParameters: () => [{ type: GioLicenseService }, { type: i1$3.MatDialog }, { type: i0.ElementRef }], propDecorators: { gioLicense: [{
|
|
5712
|
+
type: Input
|
|
5713
|
+
}] } });
|
|
5714
|
+
|
|
5715
|
+
/*
|
|
5716
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5717
|
+
*
|
|
5718
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5719
|
+
* you may not use this file except in compliance with the License.
|
|
5720
|
+
* You may obtain a copy of the License at
|
|
5721
|
+
*
|
|
5722
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5723
|
+
*
|
|
5724
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5725
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5726
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5727
|
+
* See the License for the specific language governing permissions and
|
|
5728
|
+
* limitations under the License.
|
|
5729
|
+
*/
|
|
5730
|
+
class GioLicenseDialogModule {
|
|
5731
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5732
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDialogModule, declarations: [GioLicenseDialogComponent], imports: [CommonModule, MatDialogModule, GioIconsModule, MatButtonModule, GioSafePipeModule], exports: [GioLicenseDialogComponent] }); }
|
|
5733
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDialogModule, imports: [CommonModule, MatDialogModule, GioIconsModule, MatButtonModule, GioSafePipeModule] }); }
|
|
5734
|
+
}
|
|
5735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseDialogModule, decorators: [{
|
|
5736
|
+
type: NgModule,
|
|
5737
|
+
args: [{
|
|
5738
|
+
imports: [CommonModule, MatDialogModule, GioIconsModule, MatButtonModule, GioSafePipeModule],
|
|
5739
|
+
declarations: [GioLicenseDialogComponent],
|
|
5740
|
+
exports: [GioLicenseDialogComponent],
|
|
5741
|
+
}]
|
|
5742
|
+
}] });
|
|
5743
|
+
|
|
5744
|
+
/*
|
|
5745
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5746
|
+
*
|
|
5747
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5748
|
+
* you may not use this file except in compliance with the License.
|
|
5749
|
+
* You may obtain a copy of the License at
|
|
5750
|
+
*
|
|
5751
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5752
|
+
*
|
|
5753
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5754
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5755
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5756
|
+
* See the License for the specific language governing permissions and
|
|
5757
|
+
* limitations under the License.
|
|
5758
|
+
*/
|
|
5759
|
+
class GioLicenseModule {
|
|
5760
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5761
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseModule, declarations: [GioLicenseDirective], imports: [CommonModule, MatDialogModule, GioLicenseDialogModule], exports: [GioLicenseDirective] }); }
|
|
5762
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseModule, imports: [CommonModule, MatDialogModule, GioLicenseDialogModule] }); }
|
|
5763
|
+
}
|
|
5764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseModule, decorators: [{
|
|
5765
|
+
type: NgModule,
|
|
5766
|
+
args: [{
|
|
5767
|
+
imports: [CommonModule, MatDialogModule, GioLicenseDialogModule],
|
|
5768
|
+
declarations: [GioLicenseDirective],
|
|
5769
|
+
exports: [GioLicenseDirective],
|
|
5770
|
+
}]
|
|
5771
|
+
}] });
|
|
5772
|
+
|
|
5773
|
+
/*
|
|
5774
|
+
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
5775
|
+
*
|
|
5776
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5777
|
+
* you may not use this file except in compliance with the License.
|
|
5778
|
+
* You may obtain a copy of the License at
|
|
5779
|
+
*
|
|
5780
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
5781
|
+
*
|
|
5782
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
5783
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
5784
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
5785
|
+
* See the License for the specific language governing permissions and
|
|
5786
|
+
* limitations under the License.
|
|
5787
|
+
*/
|
|
5788
|
+
const LICENSE_CONFIGURATION_TESTING = {
|
|
5789
|
+
resourceURL: 'https://url.test:3000/license',
|
|
5790
|
+
trialResourceURL: 'https://url.test:3000/trial',
|
|
5791
|
+
utmSource: 'oss_utm_source_test',
|
|
5792
|
+
utmCampaign: 'oss_utm_campaign_test',
|
|
5793
|
+
featureInfoData: {
|
|
5794
|
+
foobar: {
|
|
5795
|
+
image: 'assets/gio-icons.svg',
|
|
5796
|
+
description: 'Foobar feature description',
|
|
5797
|
+
title: 'FOOBAR',
|
|
5798
|
+
},
|
|
5799
|
+
},
|
|
5800
|
+
};
|
|
5801
|
+
const OEM_LICENSE_CONFIGURATION_TESTING = {
|
|
5802
|
+
resourceURL: 'https://oem.test:3000/license',
|
|
5803
|
+
trialResourceURL: 'https://oem.test:3000/trial',
|
|
5804
|
+
featureInfoData: {
|
|
5805
|
+
foobar: {
|
|
5806
|
+
image: 'assets/gio-icons.svg',
|
|
5807
|
+
description: 'Foobar feature description',
|
|
5808
|
+
title: 'FOOBAR',
|
|
5809
|
+
},
|
|
5810
|
+
},
|
|
5811
|
+
};
|
|
5812
|
+
class GioLicenseTestingModule {
|
|
5813
|
+
static with(license) {
|
|
5814
|
+
return {
|
|
5815
|
+
ngModule: GioLicenseTestingModule,
|
|
5816
|
+
providers: [
|
|
5817
|
+
{
|
|
5818
|
+
provide: 'LicenseConfiguration',
|
|
5819
|
+
useValue: LICENSE_CONFIGURATION_TESTING,
|
|
5820
|
+
},
|
|
5821
|
+
{
|
|
5822
|
+
provide: GioLicenseService,
|
|
5823
|
+
useValue: {
|
|
5824
|
+
isMissingFeature$: () => of(!license),
|
|
5825
|
+
getFeatureInfo: () => ({}),
|
|
5826
|
+
getTrialURL: () => '',
|
|
5827
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5828
|
+
openDialog: () => { },
|
|
5829
|
+
},
|
|
5830
|
+
},
|
|
5831
|
+
],
|
|
5832
|
+
};
|
|
5818
5833
|
}
|
|
5819
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5820
|
-
static { this.ɵ
|
|
5834
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5835
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseTestingModule }); }
|
|
5836
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseTestingModule, providers: [
|
|
5821
5837
|
{
|
|
5822
|
-
provide:
|
|
5823
|
-
|
|
5824
|
-
multi: true,
|
|
5838
|
+
provide: 'LicenseConfiguration',
|
|
5839
|
+
useValue: LICENSE_CONFIGURATION_TESTING,
|
|
5825
5840
|
},
|
|
5826
5841
|
{
|
|
5827
|
-
provide:
|
|
5828
|
-
|
|
5829
|
-
|
|
5842
|
+
provide: GioLicenseService,
|
|
5843
|
+
useValue: {
|
|
5844
|
+
isMissingFeature$: () => of(true),
|
|
5845
|
+
getFeatureInfo: () => ({}),
|
|
5846
|
+
getTrialURL: () => '',
|
|
5847
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5848
|
+
openDialog: () => { },
|
|
5849
|
+
},
|
|
5830
5850
|
},
|
|
5831
|
-
], 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 class=\"label\"><ng-content select=\"gio-form-cron-label\"></ng-content></div>\n<div class=\"wrapper\" [class.smallDisplay]=\"smallDisplay\" [class.disabled]=\"isDisabled\">\n <ng-container *ngIf=\"internalFormGroup\" [formGroup]=\"internalFormGroup\">\n <div class=\"menu\">\n <mat-button-toggle-group class=\"gio-button-toggle-group menu__mode\" name=\"mode\" aria-label=\"Cron mode\" formControlName=\"mode\">\n <mat-button-toggle value=\"secondly\" matTooltip=\"Secondly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 's' : 'Secondly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"minutely\" matTooltip=\"Minutely\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'm' : 'Minutely'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"hourly\" matTooltip=\"Hourly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'h' : 'Hourly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"daily\" matTooltip=\"Daily\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'D' : 'Daily'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"weekly\" matTooltip=\"Weekly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'W' : 'Weekly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"monthly\" matTooltip=\"Monthly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'M' : 'Monthly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"custom\" matTooltip=\"Custom\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'C' : 'Custom'\n }}</mat-button-toggle>\n </mat-button-toggle-group>\n <button\n *ngIf=\"value && !isDisabled\"\n mat-icon-button\n aria-label=\"Clear\"\n matTooltip=\"Clear\"\n type=\"button\"\n (click)=\"onClear({ touched: true })\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <ng-container [ngSwitch]=\"internalFormGroup.get('mode')?.value\">\n <ng-container *ngSwitchCase=\"'secondly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Second</mat-label>\n <mat-select formControlName=\"secondInterval\">\n <mat-option *ngFor=\"let second of seconds\" [value]=\"second\">{{ second }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'minutely'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minuteInterval\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'hourly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hour(s)</mat-label>\n <mat-select formControlName=\"hourInterval\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'daily'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Day(s)</mat-label>\n <mat-select formControlName=\"dayInterval\">\n <mat-option *ngFor=\"let day of daysOfMonth\" [value]=\"day\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hour(s)</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'weekly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-medium\">\n <mat-label>Day of the week</mat-label>\n <mat-select formControlName=\"dayOfWeek\">\n <mat-option *ngFor=\"let day of daysOfWeek; let index = index\" [value]=\"index\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hours</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minutes</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'monthly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">On the </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Day(s)</mat-label>\n <mat-select formControlName=\"dayOfMonth\">\n <mat-option *ngFor=\"let day of daysOfMonth\" [value]=\"day\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> of every month at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hours</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minutes</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <div class=\"modeForm\">\n <mat-form-field class=\"modeForm__field-custom\">\n <mat-label>Cron expression</mat-label>\n <input matInput formControlName=\"customExpression\" placeholder=\"* * * * * *\" />\n </mat-form-field>\n </div>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"value; else placeholder\" class=\"preview\">\n <span *ngIf=\"internalFormGroup.get('mode')?.value !== 'custom'\" class=\"preview__value\">\n {{ value }}\n </span>\n <span class=\"preview__hint\">{{ expressionDescription }}</span>\n </div>\n </ng-container>\n\n <ng-template #placeholder>\n <div class=\"placeholder\">No cron expression defined.</div>\n </ng-template>\n</div>\n<div class=\"hint\"><ng-content select=\"gio-form-cron-hint\"></ng-content></div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;min-width:356px;flex-direction:column}::ng-deep gio-form-cron{--mat-form-field-container-height: 48px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 12px;--mat-form-field-filled-with-label-container-padding-top: 12px;--mat-form-field-filled-with-label-container-padding-bottom: 12px}.label{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-left:10px;color:#7a7b80}.label:empty{display:none}.wrapper{display:inline-flex;flex-direction:column;padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper:hover:not(.disabled){padding:7px;border:2px solid #313133}.wrapper .menu{display:inline-flex;margin-bottom:4px}.wrapper .menu__mode{border:none;margin-bottom:0}.wrapper .modeForm{display:flex;flex-wrap:wrap;align-items:center;margin-bottom:8px;column-gap:4px}.wrapper .modeForm__field-small,.wrapper .modeForm__field-medium,.wrapper .modeForm__field-custom{display:inline-block;height:52px}.wrapper .modeForm__field-small{width:124px}.wrapper .modeForm__field-medium{width:158px}.wrapper .modeForm__field-custom{width:100%}.wrapper .preview,.wrapper .placeholder{display:flex;flex-direction:column;align-items:center;padding:8px;border-radius:8px;background-color:#e7e8ef;color:#000}.wrapper .preview__hint,.wrapper .placeholder{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.wrapper.disabled .preview,.wrapper.disabled .placeholder{opacity:.4}.hint{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-top:2px;padding-left:10px;color:#7a7b80}.hint:empty{display:none}:host(.ng-invalid.ng-touched) .wrapper{padding:7px;border-width:2px;border-color:#ec4899}:host(.ng-invalid.ng-touched) .wrapper .preview,:host(.ng-invalid.ng-touched) .wrapper .placeholder{color:#ec4899}:host(.disabled) .wrapper{border-color:#e7e8ef}:host(.disabled) .wrapper,:host(.disabled) .hint,:host(.disabled) .label{color:#d3d5dc}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i4$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i6$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i2$4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
5851
|
+
] }); }
|
|
5832
5852
|
}
|
|
5833
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5834
|
-
type:
|
|
5835
|
-
args: [{
|
|
5853
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseTestingModule, decorators: [{
|
|
5854
|
+
type: NgModule,
|
|
5855
|
+
args: [{
|
|
5856
|
+
imports: [],
|
|
5857
|
+
providers: [
|
|
5836
5858
|
{
|
|
5837
|
-
provide:
|
|
5838
|
-
|
|
5839
|
-
multi: true,
|
|
5859
|
+
provide: 'LicenseConfiguration',
|
|
5860
|
+
useValue: LICENSE_CONFIGURATION_TESTING,
|
|
5840
5861
|
},
|
|
5841
5862
|
{
|
|
5842
|
-
provide:
|
|
5843
|
-
|
|
5844
|
-
|
|
5863
|
+
provide: GioLicenseService,
|
|
5864
|
+
useValue: {
|
|
5865
|
+
isMissingFeature$: () => of(true),
|
|
5866
|
+
getFeatureInfo: () => ({}),
|
|
5867
|
+
getTrialURL: () => '',
|
|
5868
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5869
|
+
openDialog: () => { },
|
|
5870
|
+
},
|
|
5845
5871
|
},
|
|
5846
|
-
], 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 class=\"label\"><ng-content select=\"gio-form-cron-label\"></ng-content></div>\n<div class=\"wrapper\" [class.smallDisplay]=\"smallDisplay\" [class.disabled]=\"isDisabled\">\n <ng-container *ngIf=\"internalFormGroup\" [formGroup]=\"internalFormGroup\">\n <div class=\"menu\">\n <mat-button-toggle-group class=\"gio-button-toggle-group menu__mode\" name=\"mode\" aria-label=\"Cron mode\" formControlName=\"mode\">\n <mat-button-toggle value=\"secondly\" matTooltip=\"Secondly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 's' : 'Secondly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"minutely\" matTooltip=\"Minutely\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'm' : 'Minutely'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"hourly\" matTooltip=\"Hourly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'h' : 'Hourly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"daily\" matTooltip=\"Daily\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'D' : 'Daily'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"weekly\" matTooltip=\"Weekly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'W' : 'Weekly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"monthly\" matTooltip=\"Monthly\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'M' : 'Monthly'\n }}</mat-button-toggle>\n <mat-button-toggle value=\"custom\" matTooltip=\"Custom\" [matTooltipDisabled]=\"!smallDisplay\">{{\n smallDisplay ? 'C' : 'Custom'\n }}</mat-button-toggle>\n </mat-button-toggle-group>\n <button\n *ngIf=\"value && !isDisabled\"\n mat-icon-button\n aria-label=\"Clear\"\n matTooltip=\"Clear\"\n type=\"button\"\n (click)=\"onClear({ touched: true })\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n <ng-container [ngSwitch]=\"internalFormGroup.get('mode')?.value\">\n <ng-container *ngSwitchCase=\"'secondly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Second</mat-label>\n <mat-select formControlName=\"secondInterval\">\n <mat-option *ngFor=\"let second of seconds\" [value]=\"second\">{{ second }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'minutely'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minuteInterval\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'hourly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hour(s)</mat-label>\n <mat-select formControlName=\"hourInterval\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'daily'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Day(s)</mat-label>\n <mat-select formControlName=\"dayInterval\">\n <mat-option *ngFor=\"let day of daysOfMonth\" [value]=\"day\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hour(s)</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minute(s)</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'weekly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">Every </span>\n <mat-form-field class=\"modeForm__field-medium\">\n <mat-label>Day of the week</mat-label>\n <mat-select formControlName=\"dayOfWeek\">\n <mat-option *ngFor=\"let day of daysOfWeek; let index = index\" [value]=\"index\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hours</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minutes</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'monthly'\">\n <div class=\"modeForm\">\n <span class=\"cron-form-label\">On the </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Day(s)</mat-label>\n <mat-select formControlName=\"dayOfMonth\">\n <mat-option *ngFor=\"let day of daysOfMonth\" [value]=\"day\">{{ day }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\"> of every month at </span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Hours</mat-label>\n <mat-select formControlName=\"hours\">\n <mat-option *ngFor=\"let hour of hours\" [value]=\"hour\">{{ hour }}</mat-option>\n </mat-select>\n </mat-form-field>\n <span class=\"cron-form-label\">:</span>\n <mat-form-field class=\"modeForm__field-small\">\n <mat-label>Minutes</mat-label>\n <mat-select formControlName=\"minutes\">\n <mat-option *ngFor=\"let minute of minutes\" [value]=\"minute\">{{ minute }}</mat-option>\n </mat-select>\n </mat-form-field>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'custom'\">\n <div class=\"modeForm\">\n <mat-form-field class=\"modeForm__field-custom\">\n <mat-label>Cron expression</mat-label>\n <input matInput formControlName=\"customExpression\" placeholder=\"* * * * * *\" />\n </mat-form-field>\n </div>\n </ng-container>\n </ng-container>\n\n <div *ngIf=\"value; else placeholder\" class=\"preview\">\n <span *ngIf=\"internalFormGroup.get('mode')?.value !== 'custom'\" class=\"preview__value\">\n {{ value }}\n </span>\n <span class=\"preview__hint\">{{ expressionDescription }}</span>\n </div>\n </ng-container>\n\n <ng-template #placeholder>\n <div class=\"placeholder\">No cron expression defined.</div>\n </ng-template>\n</div>\n<div class=\"hint\"><ng-content select=\"gio-form-cron-hint\"></ng-content></div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}:host{display:flex;min-width:356px;flex-direction:column}::ng-deep gio-form-cron{--mat-form-field-container-height: 48px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 12px;--mat-form-field-filled-with-label-container-padding-top: 12px;--mat-form-field-filled-with-label-container-padding-bottom: 12px}.label{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-left:10px;color:#7a7b80}.label:empty{display:none}.wrapper{display:inline-flex;flex-direction:column;padding:8px;border:1px solid #d3d5dc;border-radius:8px}.wrapper:hover:not(.disabled){padding:7px;border:2px solid #313133}.wrapper .menu{display:inline-flex;margin-bottom:4px}.wrapper .menu__mode{border:none;margin-bottom:0}.wrapper .modeForm{display:flex;flex-wrap:wrap;align-items:center;margin-bottom:8px;column-gap:4px}.wrapper .modeForm__field-small,.wrapper .modeForm__field-medium,.wrapper .modeForm__field-custom{display:inline-block;height:52px}.wrapper .modeForm__field-small{width:124px}.wrapper .modeForm__field-medium{width:158px}.wrapper .modeForm__field-custom{width:100%}.wrapper .preview,.wrapper .placeholder{display:flex;flex-direction:column;align-items:center;padding:8px;border-radius:8px;background-color:#e7e8ef;color:#000}.wrapper .preview__hint,.wrapper .placeholder{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}.wrapper.disabled .preview,.wrapper.disabled .placeholder{opacity:.4}.hint{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;padding-top:2px;padding-left:10px;color:#7a7b80}.hint:empty{display:none}:host(.ng-invalid.ng-touched) .wrapper{padding:7px;border-width:2px;border-color:#ec4899}:host(.ng-invalid.ng-touched) .wrapper .preview,:host(.ng-invalid.ng-touched) .wrapper .placeholder{color:#ec4899}:host(.disabled) .wrapper{border-color:#e7e8ef}:host(.disabled) .wrapper,:host(.disabled) .hint,:host(.disabled) .label{color:#d3d5dc}\n"] }]
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
args: ['class.disabled']
|
|
5850
|
-
}], smallDisplay: [{
|
|
5851
|
-
type: HostBinding,
|
|
5852
|
-
args: ['class.smallDisplay']
|
|
5853
|
-
}] } });
|
|
5872
|
+
],
|
|
5873
|
+
}]
|
|
5874
|
+
}] });
|
|
5854
5875
|
|
|
5855
5876
|
/*
|
|
5856
|
-
* Copyright (C)
|
|
5877
|
+
* Copyright (C) 2024 The Gravitee team (http://gravitee.io)
|
|
5857
5878
|
*
|
|
5858
5879
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5859
5880
|
* you may not use this file except in compliance with the License.
|
|
@@ -5867,20 +5888,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5867
5888
|
* See the License for the specific language governing permissions and
|
|
5868
5889
|
* limitations under the License.
|
|
5869
5890
|
*/
|
|
5870
|
-
class
|
|
5871
|
-
|
|
5872
|
-
|
|
5891
|
+
class GioLicenseExpirationNotificationComponent {
|
|
5892
|
+
constructor() {
|
|
5893
|
+
this.showCallToAction = true;
|
|
5894
|
+
this.inError = false;
|
|
5895
|
+
this.title = '';
|
|
5896
|
+
this.daysRemaining = 0;
|
|
5897
|
+
this.statusColor = 'blue';
|
|
5898
|
+
}
|
|
5899
|
+
ngOnInit() {
|
|
5900
|
+
if (!this.expirationDate) {
|
|
5901
|
+
return;
|
|
5902
|
+
}
|
|
5903
|
+
if (this.inError) {
|
|
5904
|
+
this.title = "There's an issue with your license";
|
|
5905
|
+
return;
|
|
5906
|
+
}
|
|
5907
|
+
const date = new Date();
|
|
5908
|
+
const timeRemaining = this.transformDateWithoutHours(this.expirationDate) - this.transformDateWithoutHours(date);
|
|
5909
|
+
this.daysRemaining = Math.round(timeRemaining / (1000 * 3600 * 24));
|
|
5910
|
+
if (this.expirationDate.getTime() - date.getTime() < 0) {
|
|
5911
|
+
this.title = 'Your license has expired';
|
|
5912
|
+
this.statusColor = 'red';
|
|
5913
|
+
}
|
|
5914
|
+
else if (this.daysRemaining === 0) {
|
|
5915
|
+
this.title = `Your license will expire today`;
|
|
5916
|
+
this.statusColor = 'orange';
|
|
5917
|
+
}
|
|
5918
|
+
else {
|
|
5919
|
+
this.title = `Your license will expire in ${this.daysRemaining} day${this.daysRemaining === 1 ? '' : 's'}`;
|
|
5920
|
+
this.statusColor = this.daysRemaining > 5 ? 'blue' : 'orange';
|
|
5921
|
+
}
|
|
5922
|
+
}
|
|
5923
|
+
ngOnChanges(changes) {
|
|
5924
|
+
if (changes.expirationDate) {
|
|
5925
|
+
this.ngOnInit();
|
|
5926
|
+
}
|
|
5927
|
+
}
|
|
5928
|
+
transformDateWithoutHours(date) {
|
|
5929
|
+
return new Date(date.toDateString()).valueOf();
|
|
5930
|
+
}
|
|
5931
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseExpirationNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5932
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioLicenseExpirationNotificationComponent, selector: "gio-license-expiration-notification", inputs: { expirationDate: "expirationDate", showCallToAction: "showCallToAction", callToActionMessage: "callToActionMessage", link: "link", inError: "inError" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 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 *ngIf=\"expirationDate && daysRemaining <= 30\" class=\"status mat-elevation-z2\" rel=\"noopener\">\n <div [ngClass]=\"'status__title ' + statusColor\">\n <div class=\"status__title__text\">\n {{ title }}\n <img src=\"assets/license-expiration-notification-background.svg\" />\n </div>\n </div>\n <a *ngIf=\"showCallToAction\" class=\"status__action\" [href]=\"link ?? 'https://www.gravitee.io/contact-us-licence'\" target=\"_blank\">\n <div class=\"status__action__text\">{{ callToActionMessage ?? 'Contact Gravitee' }}</div>\n <mat-icon svgIcon=\"gio:right-circle\" class=\"status__action__icon\"></mat-icon>\n </a>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.status{position:relative;display:flex;width:192px;height:152px;flex-direction:column;padding:0;border-radius:4px;color:#100c27;border:none;background:#fff;text-decoration:none}.status--disabled{cursor:not-allowed}.status__sub-tile{height:56px;margin-top:16px}.status__title img{position:absolute;top:0;right:0}.status__title.red{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#ffe9f4;color:#930149}.status__title.red img{filter:invert(21%) sepia(96%) saturate(2923%) hue-rotate(316deg) brightness(75%) contrast(116%)}.status__title.blue{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#e9f6ff;color:#006fb9}.status__title.blue img{filter:invert(27%) sepia(98%) saturate(1450%) hue-rotate(183deg) brightness(91%) contrast(102%)}.status__title.orange{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#ffece5;color:#983611}.status__title.orange img{filter:invert(23%) sepia(92%) saturate(1610%) hue-rotate(357deg) brightness(103%) contrast(94%)}.status__title__text{font-size:14px;font-weight:500;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin:24px 12px;text-align:left}.status__action{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;display:flex;width:100%;align-items:center;justify-content:space-between;padding:20px 12px;color:#1c1e39;font-weight:700;text-decoration:none}.status__action__icon{width:20px;height:20px}:host-context(.gio-menu__reduced) .status{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
5873
5933
|
}
|
|
5874
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseExpirationNotificationComponent, decorators: [{
|
|
5875
5935
|
type: Component,
|
|
5876
|
-
args: [{
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5936
|
+
args: [{ selector: 'gio-license-expiration-notification', template: "<!--\n\n Copyright (C) 2024 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 *ngIf=\"expirationDate && daysRemaining <= 30\" class=\"status mat-elevation-z2\" rel=\"noopener\">\n <div [ngClass]=\"'status__title ' + statusColor\">\n <div class=\"status__title__text\">\n {{ title }}\n <img src=\"assets/license-expiration-notification-background.svg\" />\n </div>\n </div>\n <a *ngIf=\"showCallToAction\" class=\"status__action\" [href]=\"link ?? 'https://www.gravitee.io/contact-us-licence'\" target=\"_blank\">\n <div class=\"status__action__text\">{{ callToActionMessage ?? 'Contact Gravitee' }}</div>\n <mat-icon svgIcon=\"gio:right-circle\" class=\"status__action__icon\"></mat-icon>\n </a>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.status{position:relative;display:flex;width:192px;height:152px;flex-direction:column;padding:0;border-radius:4px;color:#100c27;border:none;background:#fff;text-decoration:none}.status--disabled{cursor:not-allowed}.status__sub-tile{height:56px;margin-top:16px}.status__title img{position:absolute;top:0;right:0}.status__title.red{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#ffe9f4;color:#930149}.status__title.red img{filter:invert(21%) sepia(96%) saturate(2923%) hue-rotate(316deg) brightness(75%) contrast(116%)}.status__title.blue{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#e9f6ff;color:#006fb9}.status__title.blue img{filter:invert(27%) sepia(98%) saturate(1450%) hue-rotate(183deg) brightness(91%) contrast(102%)}.status__title.orange{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#ffece5;color:#983611}.status__title.orange img{filter:invert(23%) sepia(92%) saturate(1610%) hue-rotate(357deg) brightness(103%) contrast(94%)}.status__title__text{font-size:14px;font-weight:500;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin:24px 12px;text-align:left}.status__action{font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;display:flex;width:100%;align-items:center;justify-content:space-between;padding:20px 12px;color:#1c1e39;font-weight:700;text-decoration:none}.status__action__icon{width:20px;height:20px}:host-context(.gio-menu__reduced) .status{display:none}\n"] }]
|
|
5937
|
+
}], propDecorators: { expirationDate: [{
|
|
5938
|
+
type: Input
|
|
5939
|
+
}], showCallToAction: [{
|
|
5940
|
+
type: Input
|
|
5941
|
+
}], callToActionMessage: [{
|
|
5942
|
+
type: Input
|
|
5943
|
+
}], link: [{
|
|
5944
|
+
type: Input
|
|
5945
|
+
}], inError: [{
|
|
5946
|
+
type: Input
|
|
5947
|
+
}] } });
|
|
5881
5948
|
|
|
5882
5949
|
/*
|
|
5883
|
-
* Copyright (C)
|
|
5950
|
+
* Copyright (C) 2024 The Gravitee team (http://gravitee.io)
|
|
5884
5951
|
*
|
|
5885
5952
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5886
5953
|
* you may not use this file except in compliance with the License.
|
|
@@ -5894,15 +5961,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5894
5961
|
* See the License for the specific language governing permissions and
|
|
5895
5962
|
* limitations under the License.
|
|
5896
5963
|
*/
|
|
5897
|
-
class
|
|
5898
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5899
|
-
static { this.ɵ
|
|
5964
|
+
class GioLicenseExpirationNotificationModule {
|
|
5965
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseExpirationNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5966
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseExpirationNotificationModule, declarations: [GioLicenseExpirationNotificationComponent], imports: [CommonModule, MatButtonModule, MatTooltipModule, GioIconsModule], exports: [GioLicenseExpirationNotificationComponent] }); }
|
|
5967
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseExpirationNotificationModule, imports: [CommonModule, MatButtonModule, MatTooltipModule, GioIconsModule] }); }
|
|
5900
5968
|
}
|
|
5901
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type:
|
|
5902
|
-
type:
|
|
5969
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioLicenseExpirationNotificationModule, decorators: [{
|
|
5970
|
+
type: NgModule,
|
|
5903
5971
|
args: [{
|
|
5904
|
-
|
|
5905
|
-
|
|
5972
|
+
imports: [CommonModule, MatButtonModule, MatTooltipModule, GioIconsModule],
|
|
5973
|
+
declarations: [GioLicenseExpirationNotificationComponent],
|
|
5974
|
+
exports: [GioLicenseExpirationNotificationComponent],
|
|
5906
5975
|
}]
|
|
5907
5976
|
}] });
|
|
5908
5977
|
|
|
@@ -5921,45 +5990,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImpor
|
|
|
5921
5990
|
* See the License for the specific language governing permissions and
|
|
5922
5991
|
* limitations under the License.
|
|
5923
5992
|
*/
|
|
5924
|
-
class
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5993
|
+
class GioLicenseExpirationNotificationHarness extends ComponentHarness {
|
|
5994
|
+
constructor() {
|
|
5995
|
+
super(...arguments);
|
|
5996
|
+
this.getTitleContainer = this.locatorFor('.status__title');
|
|
5997
|
+
this.getTitleMessage = this.locatorFor('.status__title__text');
|
|
5998
|
+
this.getCallToActionMessage = this.locatorFor('.status__action__text');
|
|
5999
|
+
this.getCallToActionLink = this.locatorFor('.status__action');
|
|
6000
|
+
}
|
|
6001
|
+
static { this.hostSelector = 'gio-license-expiration-notification'; }
|
|
6002
|
+
async getTitleText() {
|
|
6003
|
+
return this.getTitleMessage().then(el => el.text());
|
|
6004
|
+
}
|
|
6005
|
+
async isCallToActionVisible() {
|
|
6006
|
+
return this.getCallToActionLink()
|
|
6007
|
+
.then(_ => true)
|
|
6008
|
+
.catch(_ => false);
|
|
6009
|
+
}
|
|
6010
|
+
async getCallToActionText() {
|
|
6011
|
+
return this.getCallToActionMessage().then(el => el.text());
|
|
6012
|
+
}
|
|
6013
|
+
async getLink() {
|
|
6014
|
+
return this.getCallToActionLink().then(el => el.getAttribute('href'));
|
|
6015
|
+
}
|
|
6016
|
+
async isColor(color) {
|
|
6017
|
+
return this.getTitleContainer().then(el => el.hasClass(color));
|
|
6018
|
+
}
|
|
5944
6019
|
}
|
|
5945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioFormCronModule, decorators: [{
|
|
5946
|
-
type: NgModule,
|
|
5947
|
-
args: [{
|
|
5948
|
-
imports: [
|
|
5949
|
-
CommonModule,
|
|
5950
|
-
ReactiveFormsModule,
|
|
5951
|
-
MatButtonToggleModule,
|
|
5952
|
-
MatFormFieldModule,
|
|
5953
|
-
MatSelectModule,
|
|
5954
|
-
MatInputModule,
|
|
5955
|
-
MatButtonModule,
|
|
5956
|
-
MatTooltipModule,
|
|
5957
|
-
GioIconsModule,
|
|
5958
|
-
],
|
|
5959
|
-
declarations: [GioFormCronComponent, GioFormCronLabelComponent, GioFormCronHintComponent],
|
|
5960
|
-
exports: [GioFormCronComponent, GioFormCronLabelComponent, GioFormCronHintComponent],
|
|
5961
|
-
}]
|
|
5962
|
-
}] });
|
|
5963
6020
|
|
|
5964
6021
|
/*
|
|
5965
6022
|
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
@@ -6349,7 +6406,7 @@ class GioMenuSelectorComponent {
|
|
|
6349
6406
|
this.selectChange.emit($event.value);
|
|
6350
6407
|
}
|
|
6351
6408
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioMenuSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6352
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioMenuSelectorComponent, selector: "gio-menu-selector", inputs: { selectorTitle: "selectorTitle", selectorItems: "selectorItems", selectedItemValue: "selectedItemValue", tabIndex: "tabIndex" }, outputs: { selectChange: "selectChange" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"gio-menu-selector\">\n <span class=\"gio-menu-selector__label mat-caption\">{{ selectorTitle }}</span>\n <mat-select\n class=\"gio-menu-selector__select\"\n [tabIndex]=\"tabIndex\"\n panelClass=\"gio-menu-selector-custom-width\"\n [value]=\"selectedItemValue\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <mat-option class=\"gio-menu-selector__select__mat-option\" *ngFor=\"let item of selectorItems\" [value]=\"item.value\">\n {{ item.displayValue }}\n </mat-option>\n </mat-select>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.gio-menu-selector{width:192px;padding:4px 14px 10px;border:3px solid color-mix(in srgb,var(--gio-oem-palette--background, #1c1e39) 75%,var(--gio-oem-palette--background-contrast, #fff));border-radius:4px;margin-bottom:8px;color:var(--gio-oem-palette--background-contrast, #fff)}.gio-menu-selector__label{margin-bottom:2px}::ng-deep gio-menu-selector .gio-menu-selector>*{display:block}::ng-deep gio-menu-selector .mat-mdc-select-value{color:var(--gio-oem-palette--background-contrast, #fff)}::ng-deep gio-menu-selector .mat-mdc-select-arrow{color:var(--gio-oem-palette--background-contrast, #fff)}::ng-deep .mdc-menu-surface.mat-mdc-select-panel.gio-menu-selector-custom-width{width:192px;margin:10px -16px 0}::ng-deep .mdc-menu-surface.mat-mdc-select-panel.gio-menu-selector-custom-width mat-option[aria-selected=true]>span{color:var(--gio-oem-palette--active, #099)}::ng-deep .mdc-menu-surface.mat-mdc-select-panel.gio-menu-selector-custom-width mat-option[aria-selected=true] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after{color:var(--gio-oem-palette--active, #099)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type:
|
|
6409
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioMenuSelectorComponent, selector: "gio-menu-selector", inputs: { selectorTitle: "selectorTitle", selectorItems: "selectorItems", selectedItemValue: "selectedItemValue", tabIndex: "tabIndex" }, outputs: { selectChange: "selectChange" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div class=\"gio-menu-selector\">\n <span class=\"gio-menu-selector__label mat-caption\">{{ selectorTitle }}</span>\n <mat-select\n class=\"gio-menu-selector__select\"\n [tabIndex]=\"tabIndex\"\n panelClass=\"gio-menu-selector-custom-width\"\n [value]=\"selectedItemValue\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <mat-option class=\"gio-menu-selector__select__mat-option\" *ngFor=\"let item of selectorItems\" [value]=\"item.value\">\n {{ item.displayValue }}\n </mat-option>\n </mat-select>\n</div>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.gio-menu-selector{width:192px;padding:4px 14px 10px;border:3px solid color-mix(in srgb,var(--gio-oem-palette--background, #1c1e39) 75%,var(--gio-oem-palette--background-contrast, #fff));border-radius:4px;margin-bottom:8px;color:var(--gio-oem-palette--background-contrast, #fff)}.gio-menu-selector__label{margin-bottom:2px}::ng-deep gio-menu-selector .gio-menu-selector>*{display:block}::ng-deep gio-menu-selector .mat-mdc-select-value{color:var(--gio-oem-palette--background-contrast, #fff)}::ng-deep gio-menu-selector .mat-mdc-select-arrow{color:var(--gio-oem-palette--background-contrast, #fff)}::ng-deep .mdc-menu-surface.mat-mdc-select-panel.gio-menu-selector-custom-width{width:192px;margin:10px -16px 0}::ng-deep .mdc-menu-surface.mat-mdc-select-panel.gio-menu-selector-custom-width mat-option[aria-selected=true]>span{color:var(--gio-oem-palette--active, #099)}::ng-deep .mdc-menu-surface.mat-mdc-select-panel.gio-menu-selector-custom-width mat-option[aria-selected=true] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal:after{color:var(--gio-oem-palette--active, #099)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: i6$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }] }); }
|
|
6353
6410
|
}
|
|
6354
6411
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioMenuSelectorComponent, decorators: [{
|
|
6355
6412
|
type: Component,
|
|
@@ -6495,7 +6552,7 @@ class GioMenuSearchComponent {
|
|
|
6495
6552
|
return value.toLowerCase().replace(/\s/g, '');
|
|
6496
6553
|
}
|
|
6497
6554
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioMenuSearchComponent, deps: [{ token: GioMenuSearchService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6498
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioMenuSearchComponent, selector: "gio-menu-search", outputs: { valueChanges: "valueChanges" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<form>\n <div class=\"gio-menu-search\">\n <div class=\"gio-menu-search__input-container\">\n <input\n matInput\n class=\"gio-menu-search__input\"\n type=\"text\"\n placeholder=\"Search...\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n (keydown.enter)=\"$event.preventDefault()\"\n />\n </div>\n <div class=\"gio-menu-search__icon-container\">\n <mat-icon svgIcon=\"gio:search\" class=\"gio-menu-search__icon\"></mat-icon>\n </div>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [panelWidth]=\"192\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayFn\"\n (optionSelected)=\"onSelectionChange($event)\"\n >\n <mat-option *ngFor=\"let item of filteredItems$ | async\" [value]=\"item\">\n <div class=\"gio-menu-search__item\">\n <div class=\"gio-menu-search__item__name\">{{ item.name }}</div>\n <div class=\"gio-menu-search__item__category\">{{ item.category }}</div>\n </div>\n </mat-option>\n </mat-autocomplete>\n </div>\n</form>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.gio-menu-search{display:flex;flex-direction:row;border:3px solid color-mix(in srgb,var(--gio-oem-palette--background, #1c1e39) 75%,var(--gio-oem-palette--background-contrast, #fff));border-radius:4px;margin-bottom:16px}.gio-menu-search__input-container,.gio-menu-search__icon-container{display:flex;height:44px;align-items:center}.gio-menu-search__input-container{width:160px}.gio-menu-search__icon-container{width:32px}.gio-menu-search__input{width:100%;flex:1;padding:14px 10px;border:none;background-color:transparent;color:var(--gio-oem-palette--background-contrast, #fff);outline:none;font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.gio-menu-search__input::placeholder{color:var(--gio-oem-palette--background-contrast, #fff)}.gio-menu-search__icon{color:#98999f}.gio-menu-search__item{display:flex;height:55px;flex-direction:column;justify-content:center}.gio-menu-search__item__name{font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.gio-menu-search__item__category{color:#9f8cf0;font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type:
|
|
6555
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.3", type: GioMenuSearchComponent, selector: "gio-menu-search", outputs: { valueChanges: "valueChanges" }, ngImport: i0, template: "<!--\n\n Copyright (C) 2022 The Gravitee team (http://gravitee.io)\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<form>\n <div class=\"gio-menu-search\">\n <div class=\"gio-menu-search__input-container\">\n <input\n matInput\n class=\"gio-menu-search__input\"\n type=\"text\"\n placeholder=\"Search...\"\n [formControl]=\"control\"\n [matAutocomplete]=\"auto\"\n (keydown.enter)=\"$event.preventDefault()\"\n />\n </div>\n <div class=\"gio-menu-search__icon-container\">\n <mat-icon svgIcon=\"gio:search\" class=\"gio-menu-search__icon\"></mat-icon>\n </div>\n <mat-autocomplete\n #auto=\"matAutocomplete\"\n [panelWidth]=\"192\"\n [hideSingleSelectionIndicator]=\"true\"\n [displayWith]=\"displayFn\"\n (optionSelected)=\"onSelectionChange($event)\"\n >\n <mat-option *ngFor=\"let item of filteredItems$ | async\" [value]=\"item\">\n <div class=\"gio-menu-search__item\">\n <div class=\"gio-menu-search__item__name\">{{ item.name }}</div>\n <div class=\"gio-menu-search__item__category\">{{ item.category }}</div>\n </div>\n </mat-option>\n </mat-autocomplete>\n </div>\n</form>\n", styles: ["@charset \"UTF-8\";.gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.gio-menu-search{display:flex;flex-direction:row;border:3px solid color-mix(in srgb,var(--gio-oem-palette--background, #1c1e39) 75%,var(--gio-oem-palette--background-contrast, #fff));border-radius:4px;margin-bottom:16px}.gio-menu-search__input-container,.gio-menu-search__icon-container{display:flex;height:44px;align-items:center}.gio-menu-search__input-container{width:160px}.gio-menu-search__icon-container{width:32px}.gio-menu-search__input{width:100%;flex:1;padding:14px 10px;border:none;background-color:transparent;color:var(--gio-oem-palette--background-contrast, #fff);outline:none;font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.gio-menu-search__input::placeholder{color:var(--gio-oem-palette--background-contrast, #fff)}.gio-menu-search__icon{color:#98999f}.gio-menu-search__item{display:flex;height:55px;flex-direction:column;justify-content:center}.gio-menu-search__item__name{font-size:14px;font-weight:400;line-height:22px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px}.gio-menu-search__item__category{color:#9f8cf0;font-size:12px;font-weight:400;line-height:16px;font-family:Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i6.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i6.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
|
|
6499
6556
|
}
|
|
6500
6557
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.3", ngImport: i0, type: GioMenuSearchComponent, decorators: [{
|
|
6501
6558
|
type: Component,
|