@gravitee/ui-particles-angular 7.18.0 → 7.19.0-policy-studio-step-8-bbdda8f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/gio-form-json-schema/gio-form-json-schema.component.mjs +4 -4
- package/esm2020/lib/gio-form-json-schema/gio-formly-json-schema.service.mjs +5 -1
- package/esm2020/lib/gio-form-json-schema/model/GioJsonSchema.mjs +1 -1
- package/esm2020/lib/gio-form-json-schema/type-component/code-editor-type.component.mjs +12 -2
- package/esm2020/lib/gio-loader/gio-loader.component.mjs +2 -2
- package/esm2020/lib/gio-menu/gio-menu-item/gio-menu-item.component.mjs +4 -4
- package/esm2020/lib/gio-submenu/gio-submenu.component.mjs +6 -6
- package/fesm2015/gravitee-ui-particles-angular.mjs +27 -14
- package/fesm2015/gravitee-ui-particles-angular.mjs.map +1 -1
- package/fesm2020/gravitee-ui-particles-angular.mjs +28 -14
- package/fesm2020/gravitee-ui-particles-angular.mjs.map +1 -1
- package/lib/gio-form-json-schema/model/GioJsonSchema.d.ts +2 -0
- package/lib/gio-form-json-schema/type-component/code-editor-type.component.d.ts +6 -1
- package/package.json +1 -1
|
@@ -2044,12 +2044,12 @@ class GioMenuItemComponent {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
onClick($event) {
|
|
2046
2046
|
of(true)
|
|
2047
|
-
.pipe(
|
|
2047
|
+
.pipe(delay(0), tap(() => this.onMouseEnter($event)), takeUntil(this.unsubscribe$))
|
|
2048
2048
|
.subscribe();
|
|
2049
2049
|
}
|
|
2050
2050
|
onKeydownHandler($event) {
|
|
2051
2051
|
of($event.key === 'Enter' && $event.target)
|
|
2052
|
-
.pipe(
|
|
2052
|
+
.pipe(filter(enterKey => !!enterKey), switchMap(() => of($event.target)), tap(menuItem => {
|
|
2053
2053
|
this.gioMenuService.overlay({ open: false });
|
|
2054
2054
|
if (this.active) {
|
|
2055
2055
|
this.gioMenuService.overlay({ open: true, top: menuItem.getBoundingClientRect().top, parent: menuItem, focus: true });
|
|
@@ -2057,7 +2057,7 @@ class GioMenuItemComponent {
|
|
|
2057
2057
|
else {
|
|
2058
2058
|
menuItem.click();
|
|
2059
2059
|
}
|
|
2060
|
-
}))
|
|
2060
|
+
}), takeUntil(this.unsubscribe$))
|
|
2061
2061
|
.subscribe();
|
|
2062
2062
|
}
|
|
2063
2063
|
}
|
|
@@ -2392,7 +2392,7 @@ class GioSubmenuComponent {
|
|
|
2392
2392
|
}
|
|
2393
2393
|
ngAfterViewInit() {
|
|
2394
2394
|
this.gioMenuService.reduce
|
|
2395
|
-
.pipe(
|
|
2395
|
+
.pipe(filter(reduced => reduced), tap(() => {
|
|
2396
2396
|
this.reduced = true;
|
|
2397
2397
|
this.loaded = true;
|
|
2398
2398
|
}), switchMap(() => this.gioMenuService.overlayObservable), tap(overlayOptions => {
|
|
@@ -2403,17 +2403,17 @@ class GioSubmenuComponent {
|
|
|
2403
2403
|
this.gioSubmenu.nativeElement.style.height = 'auto';
|
|
2404
2404
|
this.gioSubmenu.nativeElement.style.maxHeight = `calc(100vh - ${top + 8}px)`;
|
|
2405
2405
|
}
|
|
2406
|
-
}), filter(overlayOptions => !!overlayOptions.focus), delay(200), switchMap(() => of(this.gioSubmenu.nativeElement.querySelectorAll('gio-submenu-item'))), filter(submenuItems => submenuItems.length > 0), tap(submenuItems => submenuItems[0].focus()))
|
|
2406
|
+
}), filter(overlayOptions => !!overlayOptions.focus), delay(200), switchMap(() => of(this.gioSubmenu.nativeElement.querySelectorAll('gio-submenu-item'))), filter(submenuItems => submenuItems.length > 0), tap(submenuItems => submenuItems[0].focus()), takeUntil(this.unsubscribe$))
|
|
2407
2407
|
.subscribe(() => {
|
|
2408
2408
|
this.changeDetectorRef.detectChanges();
|
|
2409
2409
|
});
|
|
2410
2410
|
this.gioMenuService.reduce
|
|
2411
|
-
.pipe(
|
|
2411
|
+
.pipe(filter(reduced => !reduced), tap(() => {
|
|
2412
2412
|
this.reduced = false;
|
|
2413
2413
|
this.loaded = true;
|
|
2414
2414
|
this.gioSubmenu.nativeElement.style.height = '100%';
|
|
2415
2415
|
this.gioSubmenu.nativeElement.style.maxHeight = 'none';
|
|
2416
|
-
}))
|
|
2416
|
+
}), takeUntil(this.unsubscribe$))
|
|
2417
2417
|
.subscribe(() => {
|
|
2418
2418
|
this.changeDetectorRef.detectChanges();
|
|
2419
2419
|
});
|
|
@@ -2432,7 +2432,7 @@ class GioSubmenuComponent {
|
|
|
2432
2432
|
}
|
|
2433
2433
|
onKeydownHandler(event) {
|
|
2434
2434
|
of(this.reduced && event.key === 'Escape')
|
|
2435
|
-
.pipe(filter(reducedAndEscape => reducedAndEscape), tap(() => this.gioMenuService.overlay({ open: false })), delay(100), tap(() => this.overlayOptions.parent?.focus()))
|
|
2435
|
+
.pipe(filter(reducedAndEscape => reducedAndEscape), tap(() => this.gioMenuService.overlay({ open: false })), delay(100), tap(() => this.overlayOptions.parent?.focus()), takeUntil(this.unsubscribe$))
|
|
2436
2436
|
.subscribe();
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
@@ -3127,6 +3127,10 @@ class GioFormlyJsonSchemaService {
|
|
|
3127
3127
|
}
|
|
3128
3128
|
else if (mapSource.type === 'string' && mapSource.format === 'gio-code-editor') {
|
|
3129
3129
|
mappedField.type = 'gio-code-editor';
|
|
3130
|
+
mappedField.props = {
|
|
3131
|
+
...mappedField.props,
|
|
3132
|
+
monacoEditorConfig: mapSource.gioConfig?.monacoEditorConfig,
|
|
3133
|
+
};
|
|
3130
3134
|
}
|
|
3131
3135
|
return mappedField;
|
|
3132
3136
|
}
|
|
@@ -3227,7 +3231,7 @@ class GioFormJsonSchemaComponent {
|
|
|
3227
3231
|
// When the parent form is touched, mark all the sub formGroup as touched if not already touched
|
|
3228
3232
|
const parentControl = this.ngControl?.control?.parent;
|
|
3229
3233
|
parentControl?.statusChanges
|
|
3230
|
-
?.pipe(
|
|
3234
|
+
?.pipe(map(() => parentControl?.touched), filter(touched => touched === true), distinctUntilChanged(), takeUntil(this.unsubscribe$))
|
|
3231
3235
|
.subscribe(() => {
|
|
3232
3236
|
if (this.isDisabled) {
|
|
3233
3237
|
return;
|
|
@@ -3237,7 +3241,7 @@ class GioFormJsonSchemaComponent {
|
|
|
3237
3241
|
});
|
|
3238
3242
|
// Add async validator to the parent
|
|
3239
3243
|
this.ngControl?.control?.addAsyncValidators(() => {
|
|
3240
|
-
return this.isValid$.pipe(
|
|
3244
|
+
return this.isValid$.pipe(take(1), map(isValid => (isValid ? null : { invalid: true })), takeUntil(this.unsubscribe$));
|
|
3241
3245
|
});
|
|
3242
3246
|
// Subscribe to state changes to manage touches, status and value
|
|
3243
3247
|
this.stateChanges$
|
|
@@ -3271,7 +3275,7 @@ class GioFormJsonSchemaComponent {
|
|
|
3271
3275
|
ngAfterViewInit() {
|
|
3272
3276
|
// Group all valueChanges events emit by formly in a single one
|
|
3273
3277
|
merge(this.formGroup.statusChanges, this.formGroup.valueChanges)
|
|
3274
|
-
.pipe(takeUntil(this.unsubscribe$)
|
|
3278
|
+
.pipe(debounceTime(100), takeUntil(this.unsubscribe$))
|
|
3275
3279
|
.subscribe(() => {
|
|
3276
3280
|
this.stateChanges$.next();
|
|
3277
3281
|
});
|
|
@@ -4474,7 +4478,17 @@ function passwordEyeExtension(field) {
|
|
|
4474
4478
|
*/
|
|
4475
4479
|
class GioFjsCodeEditorTypeComponent extends FieldType$1 {
|
|
4476
4480
|
ngOnInit() {
|
|
4477
|
-
|
|
4481
|
+
const language = this.props.monacoEditorConfig?.language;
|
|
4482
|
+
switch (language) {
|
|
4483
|
+
case 'json':
|
|
4484
|
+
this.languageConfig = {
|
|
4485
|
+
language: 'json',
|
|
4486
|
+
schemas: [],
|
|
4487
|
+
};
|
|
4488
|
+
break;
|
|
4489
|
+
default:
|
|
4490
|
+
this.languageConfig = undefined;
|
|
4491
|
+
}
|
|
4478
4492
|
}
|
|
4479
4493
|
}
|
|
4480
4494
|
GioFjsCodeEditorTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioFjsCodeEditorTypeComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -4934,10 +4948,10 @@ GioMonacoEditorHarness.hostSelector = 'gio-monaco-editor';
|
|
|
4934
4948
|
class GioLoaderComponent {
|
|
4935
4949
|
}
|
|
4936
4950
|
GioLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4937
|
-
GioLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioLoaderComponent, selector: "gio-loader", 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=\"loader\">\n <mat-icon svgIcon=\"gio:loader\"></mat-icon>\n</div>\n", styles: [":host{position:relative;display:flex}.loader{display:flex;align-items:center;justify-content:center;animation:rotation 2s infinite linear}.loader mat-icon{width:100%;height:100%}@keyframes rotation{to{transform:rotate(360deg)}}\n"], components: [{ type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
4951
|
+
GioLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioLoaderComponent, selector: "gio-loader", 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=\"loader\">\n <mat-icon svgIcon=\"gio:loader\"></mat-icon>\n</div>\n", styles: [":host{position:relative;display:flex;width:48px;height:48px;align-self:center;margin:auto}.loader{display:flex;align-items:center;justify-content:center;animation:rotation 2s infinite linear}.loader mat-icon{width:100%;height:100%}@keyframes rotation{to{transform:rotate(360deg)}}\n"], components: [{ type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
4938
4952
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLoaderComponent, decorators: [{
|
|
4939
4953
|
type: Component,
|
|
4940
|
-
args: [{ selector: 'gio-loader', 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=\"loader\">\n <mat-icon svgIcon=\"gio:loader\"></mat-icon>\n</div>\n", styles: [":host{position:relative;display:flex}.loader{display:flex;align-items:center;justify-content:center;animation:rotation 2s infinite linear}.loader mat-icon{width:100%;height:100%}@keyframes rotation{to{transform:rotate(360deg)}}\n"] }]
|
|
4954
|
+
args: [{ selector: 'gio-loader', 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=\"loader\">\n <mat-icon svgIcon=\"gio:loader\"></mat-icon>\n</div>\n", styles: [":host{position:relative;display:flex;width:48px;height:48px;align-self:center;margin:auto}.loader{display:flex;align-items:center;justify-content:center;animation:rotation 2s infinite linear}.loader mat-icon{width:100%;height:100%}@keyframes rotation{to{transform:rotate(360deg)}}\n"] }]
|
|
4941
4955
|
}] });
|
|
4942
4956
|
|
|
4943
4957
|
/*
|