@odx/angular 1.0.0-rc.3 → 1.0.0-rc.4
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/cdk/dynamic-view/lib/dynamic-view.component.d.ts +3 -3
- package/cdk/dynamic-view/lib/dynamic-view.directive.d.ts +3 -1
- package/cdk/dynamic-view/lib/helpers/create-projectable-nodes.d.ts +2 -0
- package/cdk/dynamic-view/lib/helpers/index.d.ts +1 -0
- package/cdk/dynamic-view/lib/models/dynamic-view-options.d.ts +1 -0
- package/components/chip/README.md +3 -0
- package/components/chip/index.d.ts +2 -0
- package/components/chip/lib/chip.component.d.ts +15 -0
- package/components/chip/lib/models/chip-size.d.ts +5 -0
- package/components/chip/lib/models/chip-variant.d.ts +7 -0
- package/components/chip/lib/models/index.d.ts +2 -0
- package/components/circular-progress/README.md +3 -0
- package/components/circular-progress/index.d.ts +2 -0
- package/components/circular-progress/lib/circular-progress.component.d.ts +28 -0
- package/components/circular-progress/lib/models/circular-progress-size.d.ts +7 -0
- package/components/circular-progress/lib/models/index.d.ts +1 -0
- package/components/loading-spinner/README.md +3 -0
- package/components/loading-spinner/index.d.ts +3 -0
- package/components/loading-spinner/lib/loading-spinner.component.d.ts +15 -0
- package/components/loading-spinner/lib/loading-spinner.directive.d.ts +26 -0
- package/components/loading-spinner/lib/loading-spinner.module.d.ts +9 -0
- package/components/loading-spinner/lib/loading-spinner.service.d.ts +9 -0
- package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +6 -1
- package/components/main-menu/lib/main-menu.component.d.ts +3 -1
- package/components/modal/lib/components/modal-header/modal-header.component.d.ts +1 -0
- package/components/modal/lib/modal.component.d.ts +2 -1
- package/components/modal/lib/modal.directive.d.ts +8 -4
- package/components/modal/lib/models/modal-ref.d.ts +4 -2
- package/components/progress/README.md +3 -0
- package/components/progress/index.d.ts +1 -0
- package/components/progress/lib/progress.component.d.ts +14 -0
- package/esm2020/animations/lib/fade.mjs +2 -5
- package/esm2020/cdk/checkbox-control/lib/checkbox-control.directive.mjs +6 -6
- package/esm2020/cdk/custom-form-control/lib/control.directive.mjs +3 -3
- package/esm2020/cdk/custom-form-control/lib/custom-form-control.mjs +3 -3
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.component.mjs +23 -14
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.directive.mjs +20 -8
- package/esm2020/cdk/dynamic-view/lib/dynamic-view.service.mjs +3 -3
- package/esm2020/cdk/dynamic-view/lib/helpers/create-projectable-nodes.mjs +9 -0
- package/esm2020/cdk/dynamic-view/lib/helpers/index.mjs +2 -1
- package/esm2020/cdk/dynamic-view/lib/models/dynamic-component-ref.mjs +3 -2
- package/esm2020/cdk/dynamic-view/lib/models/dynamic-view-options.mjs +1 -1
- package/esm2020/cdk/expandable/lib/directives/expandable-item.directive.mjs +3 -3
- package/esm2020/cdk/expandable/lib/directives/extandable-container.directive.mjs +3 -3
- package/esm2020/cdk/expandable/lib/expandable.module.mjs +4 -4
- package/esm2020/cdk/radio-group-control/lib/radio-control.directive.mjs +6 -6
- package/esm2020/cdk/radio-group-control/lib/radio-group-control.directive.mjs +3 -3
- package/esm2020/cdk/radio-group-control/lib/radio-group-control.module.mjs +4 -4
- package/esm2020/components/accordion/lib/accordion.component.mjs +3 -3
- package/esm2020/components/accordion/lib/accordion.module.mjs +4 -4
- package/esm2020/components/accordion/lib/components/accordion-item/accordion-item.component.mjs +3 -3
- package/esm2020/components/accordion/lib/directives/accordion-item-title.mjs +3 -3
- package/esm2020/components/action-group/action-group.component.mjs +3 -3
- package/esm2020/components/area-header/area-header.component.mjs +3 -3
- package/esm2020/components/area-header/area-header.module.mjs +4 -4
- package/esm2020/components/area-header/directives/area-header-content.directive.mjs +3 -3
- package/esm2020/components/area-header/directives/area-header-subtitle.directive.mjs +3 -3
- package/esm2020/components/avatar/lib/avatar.component.mjs +3 -3
- package/esm2020/components/badge/lib/badge.component.mjs +3 -3
- package/esm2020/components/badge/lib/badge.directive.mjs +3 -3
- package/esm2020/components/button/lib/button.component.mjs +3 -3
- package/esm2020/components/button-group/lib/button-group.component.mjs +3 -3
- package/esm2020/components/checkbox/lib/checkbox.component.mjs +3 -3
- package/esm2020/components/chip/index.mjs +3 -0
- package/esm2020/components/chip/lib/chip.component.mjs +54 -0
- package/esm2020/components/chip/lib/models/chip-size.mjs +5 -0
- package/esm2020/components/chip/lib/models/chip-variant.mjs +7 -0
- package/esm2020/components/chip/lib/models/index.mjs +3 -0
- package/esm2020/components/chip/odx-angular-components-chip.mjs +5 -0
- package/esm2020/components/circular-progress/index.mjs +3 -0
- package/esm2020/components/circular-progress/lib/circular-progress.component.mjs +91 -0
- package/esm2020/components/circular-progress/lib/models/circular-progress-size.mjs +7 -0
- package/esm2020/components/circular-progress/lib/models/index.mjs +2 -0
- package/esm2020/components/circular-progress/odx-angular-components-circular-progress.mjs +5 -0
- package/esm2020/components/content-box/lib/content-box.component.mjs +3 -3
- package/esm2020/components/content-box/lib/content-box.module.mjs +4 -4
- package/esm2020/components/content-box/lib/directives/content-box-footer-directive.mjs +3 -3
- package/esm2020/components/content-box/lib/directives/content-box-header-directive.mjs +3 -3
- package/esm2020/components/form-field/lib/components/form-field-info/form-field-info.component.mjs +3 -3
- package/esm2020/components/form-field/lib/components/form-group/form-group.component.mjs +3 -3
- package/esm2020/components/form-field/lib/directives/form-field-control.directive.mjs +3 -3
- package/esm2020/components/form-field/lib/directives/form-field-error.directive.mjs +3 -3
- package/esm2020/components/form-field/lib/directives/form-field-hint.directive.mjs +3 -3
- package/esm2020/components/form-field/lib/directives/form-field-label.directive.mjs +3 -3
- package/esm2020/components/form-field/lib/directives/form.directive.mjs +3 -3
- package/esm2020/components/form-field/lib/form-field.component.mjs +3 -3
- package/esm2020/components/form-field/lib/form-field.module.mjs +4 -4
- package/esm2020/components/form-field/lib/form-field.service.mjs +3 -3
- package/esm2020/components/form-field/lib/services/form-field-error.service.mjs +3 -3
- package/esm2020/components/header/lib/directives/header-avatar.directive.mjs +3 -3
- package/esm2020/components/header/lib/directives/header-title.directive.mjs +3 -3
- package/esm2020/components/header/lib/header.component.mjs +3 -3
- package/esm2020/components/header/lib/header.module.mjs +4 -4
- package/esm2020/components/icon/lib/icon.component.mjs +3 -3
- package/esm2020/components/link/link.directive.mjs +3 -3
- package/esm2020/components/loading-spinner/index.mjs +4 -0
- package/esm2020/components/loading-spinner/lib/loading-spinner.component.mjs +58 -0
- package/esm2020/components/loading-spinner/lib/loading-spinner.directive.mjs +87 -0
- package/esm2020/components/loading-spinner/lib/loading-spinner.module.mjs +19 -0
- package/esm2020/components/loading-spinner/lib/loading-spinner.service.mjs +17 -0
- package/esm2020/components/loading-spinner/odx-angular-components-loading-spinner.mjs +5 -0
- package/esm2020/components/logo/logo.directive.mjs +3 -3
- package/esm2020/components/main-menu/lib/directives/main-menu-button.directive.mjs +3 -3
- package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +20 -9
- package/esm2020/components/main-menu/lib/main-menu.component.mjs +7 -6
- package/esm2020/components/main-menu/lib/main-menu.module.mjs +4 -4
- package/esm2020/components/main-menu/lib/main-menu.service.mjs +3 -3
- package/esm2020/components/modal/lib/components/modal-footer/modal-footer.component.mjs +3 -3
- package/esm2020/components/modal/lib/components/modal-header/modal-header.component.mjs +10 -8
- package/esm2020/components/modal/lib/directives/modal-close.directive.mjs +3 -3
- package/esm2020/components/modal/lib/directives/modal-content.directive.mjs +3 -3
- package/esm2020/components/modal/lib/directives/modal-dismiss.directive.mjs +3 -3
- package/esm2020/components/modal/lib/modal.component.mjs +11 -7
- package/esm2020/components/modal/lib/modal.directive.mjs +24 -6
- package/esm2020/components/modal/lib/modal.module.mjs +4 -4
- package/esm2020/components/modal/lib/modal.service.mjs +3 -3
- package/esm2020/components/modal/lib/models/modal-ref.mjs +9 -2
- package/esm2020/components/modal/lib/services/open-modal-manager.service.mjs +3 -3
- package/esm2020/components/progress/index.mjs +2 -0
- package/esm2020/components/progress/lib/progress.component.mjs +51 -0
- package/esm2020/components/progress/odx-angular-components-progress.mjs +5 -0
- package/esm2020/components/radio-group/lib/components/radio-button/radio-button.component.mjs +3 -3
- package/esm2020/components/radio-group/lib/radio-group.component.mjs +3 -3
- package/esm2020/components/radio-group/lib/radio-group.module.mjs +4 -4
- package/esm2020/components/switch/lib/switch.component.mjs +3 -3
- package/esm2020/components/toggle-button-group/lib/components/toggle-button/toggle-button.component.mjs +3 -3
- package/esm2020/components/toggle-button-group/lib/toggle-button-group.component.mjs +3 -3
- package/esm2020/components/toggle-button-group/lib/toggle-button-group.module.mjs +4 -4
- package/esm2020/lib/controllers/controller.mjs +11 -10
- package/esm2020/lib/controllers/disabled.controller.mjs +3 -3
- package/esm2020/lib/controllers/readonly.controller.mjs +3 -3
- package/esm2020/lib/core.module.mjs +4 -4
- package/esm2020/lib/directives/click-outside.directive.mjs +3 -3
- package/esm2020/lib/services/window-ref.mjs +3 -3
- package/fesm2015/odx-angular-animations.mjs +1 -1
- package/fesm2015/odx-angular-animations.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-checkbox-control.mjs +5 -5
- package/fesm2015/odx-angular-cdk-checkbox-control.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-custom-form-control.mjs +6 -6
- package/fesm2015/odx-angular-cdk-dynamic-view.mjs +54 -25
- package/fesm2015/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2015/odx-angular-cdk-expandable.mjs +10 -10
- package/fesm2015/odx-angular-cdk-radio-group-control.mjs +12 -12
- package/fesm2015/odx-angular-cdk-radio-group-control.mjs.map +1 -1
- package/fesm2015/odx-angular-components-accordion.mjs +13 -13
- package/fesm2015/odx-angular-components-action-group.mjs +3 -3
- package/fesm2015/odx-angular-components-area-header.mjs +13 -13
- package/fesm2015/odx-angular-components-avatar.mjs +3 -3
- package/fesm2015/odx-angular-components-badge.mjs +6 -6
- package/fesm2015/odx-angular-components-button-group.mjs +3 -3
- package/fesm2015/odx-angular-components-button.mjs +3 -3
- package/fesm2015/odx-angular-components-checkbox.mjs +3 -3
- package/fesm2015/odx-angular-components-chip.mjs +71 -0
- package/fesm2015/odx-angular-components-chip.mjs.map +1 -0
- package/fesm2015/odx-angular-components-circular-progress.mjs +103 -0
- package/fesm2015/odx-angular-components-circular-progress.mjs.map +1 -0
- package/fesm2015/odx-angular-components-content-box.mjs +13 -13
- package/fesm2015/odx-angular-components-form-field.mjs +34 -34
- package/fesm2015/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2015/odx-angular-components-header.mjs +13 -13
- package/fesm2015/odx-angular-components-icon.mjs +3 -3
- package/fesm2015/odx-angular-components-link.mjs +3 -3
- package/fesm2015/odx-angular-components-loading-spinner.mjs +173 -0
- package/fesm2015/odx-angular-components-loading-spinner.mjs.map +1 -0
- package/fesm2015/odx-angular-components-logo.mjs +3 -3
- package/fesm2015/odx-angular-components-main-menu.mjs +34 -23
- package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2015/odx-angular-components-modal.mjs +70 -42
- package/fesm2015/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2015/odx-angular-components-progress.mjs +57 -0
- package/fesm2015/odx-angular-components-progress.mjs.map +1 -0
- package/fesm2015/odx-angular-components-radio-group.mjs +10 -10
- package/fesm2015/odx-angular-components-switch.mjs +3 -3
- package/fesm2015/odx-angular-components-toggle-button-group.mjs +10 -10
- package/fesm2015/odx-angular.mjs +27 -26
- package/fesm2015/odx-angular.mjs.map +1 -1
- package/fesm2020/odx-angular-animations.mjs +1 -4
- package/fesm2020/odx-angular-animations.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-checkbox-control.mjs +5 -5
- package/fesm2020/odx-angular-cdk-checkbox-control.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-custom-form-control.mjs +6 -6
- package/fesm2020/odx-angular-cdk-dynamic-view.mjs +52 -23
- package/fesm2020/odx-angular-cdk-dynamic-view.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-expandable.mjs +10 -10
- package/fesm2020/odx-angular-cdk-radio-group-control.mjs +12 -12
- package/fesm2020/odx-angular-cdk-radio-group-control.mjs.map +1 -1
- package/fesm2020/odx-angular-components-accordion.mjs +13 -13
- package/fesm2020/odx-angular-components-action-group.mjs +3 -3
- package/fesm2020/odx-angular-components-area-header.mjs +13 -13
- package/fesm2020/odx-angular-components-avatar.mjs +3 -3
- package/fesm2020/odx-angular-components-badge.mjs +6 -6
- package/fesm2020/odx-angular-components-button-group.mjs +3 -3
- package/fesm2020/odx-angular-components-button.mjs +3 -3
- package/fesm2020/odx-angular-components-checkbox.mjs +3 -3
- package/fesm2020/odx-angular-components-chip.mjs +71 -0
- package/fesm2020/odx-angular-components-chip.mjs.map +1 -0
- package/fesm2020/odx-angular-components-circular-progress.mjs +103 -0
- package/fesm2020/odx-angular-components-circular-progress.mjs.map +1 -0
- package/fesm2020/odx-angular-components-content-box.mjs +13 -13
- package/fesm2020/odx-angular-components-form-field.mjs +34 -34
- package/fesm2020/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2020/odx-angular-components-header.mjs +13 -13
- package/fesm2020/odx-angular-components-icon.mjs +3 -3
- package/fesm2020/odx-angular-components-link.mjs +3 -3
- package/fesm2020/odx-angular-components-loading-spinner.mjs +172 -0
- package/fesm2020/odx-angular-components-loading-spinner.mjs.map +1 -0
- package/fesm2020/odx-angular-components-logo.mjs +3 -3
- package/fesm2020/odx-angular-components-main-menu.mjs +34 -23
- package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2020/odx-angular-components-modal.mjs +69 -41
- package/fesm2020/odx-angular-components-modal.mjs.map +1 -1
- package/fesm2020/odx-angular-components-progress.mjs +57 -0
- package/fesm2020/odx-angular-components-progress.mjs.map +1 -0
- package/fesm2020/odx-angular-components-radio-group.mjs +10 -10
- package/fesm2020/odx-angular-components-switch.mjs +3 -3
- package/fesm2020/odx-angular-components-toggle-button-group.mjs +10 -10
- package/fesm2020/odx-angular.mjs +27 -26
- package/fesm2020/odx-angular.mjs.map +1 -1
- package/lib/controllers/controller.d.ts +1 -2
- package/package.json +35 -2
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { __decorate } from 'tslib';
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, inject, Directive, HostListener, Component, ViewEncapsulation, ChangeDetectionStrategy,
|
|
3
|
+
import { Injectable, inject, Directive, HostListener, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, Output, NgModule } from '@angular/core';
|
|
4
4
|
import { CSSComponent } from '@odx/angular/internal';
|
|
5
|
-
import { isBoolean, injectElement } from '@odx/angular/utils';
|
|
5
|
+
import { isBoolean, injectElement, Transform } from '@odx/angular/utils';
|
|
6
6
|
import { BehaviorSubject, distinctUntilChanged, shareReplay } from 'rxjs';
|
|
7
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
8
|
+
import { RouterLinkActive } from '@angular/router';
|
|
7
9
|
import * as i3 from '@odx/angular';
|
|
8
10
|
import { DisabledController, CoreModule } from '@odx/angular';
|
|
9
11
|
import { trigger, transition, useAnimation } from '@angular/animations';
|
|
@@ -46,9 +48,9 @@ class MainMenuService {
|
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
}
|
|
49
|
-
MainMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
50
|
-
MainMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
51
|
+
MainMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
52
|
+
MainMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuService, providedIn: 'root' });
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuService, decorators: [{
|
|
52
54
|
type: Injectable,
|
|
53
55
|
args: [{ providedIn: 'root' }]
|
|
54
56
|
}] });
|
|
@@ -62,12 +64,12 @@ let MainMenuButtonDirective = class MainMenuButtonDirective {
|
|
|
62
64
|
this.mainMenuService.toggle();
|
|
63
65
|
}
|
|
64
66
|
};
|
|
65
|
-
MainMenuButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
66
|
-
MainMenuButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
67
|
+
MainMenuButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
68
|
+
MainMenuButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.9", type: MainMenuButtonDirective, isStandalone: true, selector: "button[odxMainMenuButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
67
69
|
MainMenuButtonDirective = __decorate([
|
|
68
70
|
CSSComponent('main-menu-button')
|
|
69
71
|
], MainMenuButtonDirective);
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuButtonDirective, decorators: [{
|
|
71
73
|
type: Directive,
|
|
72
74
|
args: [{
|
|
73
75
|
selector: 'button[odxMainMenuButton]',
|
|
@@ -81,32 +83,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
81
83
|
let MainMenuItemDirective = class MainMenuItemDirective {
|
|
82
84
|
constructor() {
|
|
83
85
|
this.disabledController = DisabledController.inject();
|
|
86
|
+
this.routerLinkActive = inject(RouterLinkActive, { optional: true });
|
|
84
87
|
this.element = injectElement();
|
|
88
|
+
this.isSelected = false;
|
|
85
89
|
}
|
|
86
90
|
get isDisabled() {
|
|
87
91
|
var _a;
|
|
88
92
|
return !!((_a = this.disabledController) === null || _a === void 0 ? void 0 : _a.disabled);
|
|
89
93
|
}
|
|
90
94
|
};
|
|
91
|
-
MainMenuItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
92
|
-
MainMenuItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
95
|
+
MainMenuItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
96
|
+
MainMenuItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.9", type: MainMenuItemDirective, isStandalone: true, selector: "[odxMainMenuItem]", inputs: { isSelected: "isSelected" }, host: { properties: { "class.is-selected": "isSelected || routerLinkActive?.isActive", "class.is-disabled": "isDisabled", "attr.disabled": "isDisabled || null", "attr.role": "\"button\"", "tabindex": "isDisabled ? -1 : 0" } }, providers: [DisabledController.connect()], ngImport: i0 });
|
|
97
|
+
__decorate([
|
|
98
|
+
Transform(coerceBooleanProperty),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], MainMenuItemDirective.prototype, "isSelected", void 0);
|
|
93
101
|
MainMenuItemDirective = __decorate([
|
|
94
102
|
CSSComponent('main-menu-item')
|
|
95
103
|
], MainMenuItemDirective);
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuItemDirective, decorators: [{
|
|
97
105
|
type: Directive,
|
|
98
106
|
args: [{
|
|
99
|
-
selector: '
|
|
107
|
+
selector: '[odxMainMenuItem]',
|
|
100
108
|
standalone: true,
|
|
101
109
|
providers: [DisabledController.connect()],
|
|
102
110
|
host: {
|
|
111
|
+
'[class.is-selected]': 'isSelected || routerLinkActive?.isActive',
|
|
103
112
|
'[class.is-disabled]': 'isDisabled',
|
|
104
113
|
'[attr.disabled]': 'isDisabled || null',
|
|
105
114
|
'[attr.role]': '"button"',
|
|
106
115
|
'[tabindex]': 'isDisabled ? -1 : 0',
|
|
107
116
|
},
|
|
108
117
|
}]
|
|
109
|
-
}]
|
|
118
|
+
}], propDecorators: { isSelected: [{
|
|
119
|
+
type: Input
|
|
120
|
+
}] } });
|
|
110
121
|
|
|
111
122
|
let MainMenuComponent = class MainMenuComponent {
|
|
112
123
|
constructor() {
|
|
@@ -117,7 +128,7 @@ let MainMenuComponent = class MainMenuComponent {
|
|
|
117
128
|
this.menuOpen = this.mainMenuService.isOpen$;
|
|
118
129
|
}
|
|
119
130
|
set isOpen(value) {
|
|
120
|
-
this.mainMenuService.toggle(value);
|
|
131
|
+
this.mainMenuService.toggle(coerceBooleanProperty(value));
|
|
121
132
|
}
|
|
122
133
|
get isOpen() {
|
|
123
134
|
return this.mainMenuService.isOpen();
|
|
@@ -126,22 +137,22 @@ let MainMenuComponent = class MainMenuComponent {
|
|
|
126
137
|
this.mainMenuService.close();
|
|
127
138
|
}
|
|
128
139
|
};
|
|
129
|
-
MainMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
130
|
-
MainMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
140
|
+
MainMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
+
MainMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.9", type: MainMenuComponent, isStandalone: true, selector: "odx-main-menu", inputs: { title: "title", subtitle: "subtitle", copyright: "copyright", isOpen: "isOpen" }, outputs: { menuOpen: "menuOpen" }, host: { listeners: { "window:keydown.escape": "close()" }, properties: { "class.is-open": "isOpen" } }, ngImport: i0, template: "<aside @menuAnimation class=\"odx-main-menu__inner\" cdkTrapFocus cdkTrapFocusAutoCapture *ngIf=\"menuOpen | async\">\n <div class=\"odx-main-menu__actions\">\n <button class=\"odx-main-menu__close\" odxButton disabled=\"false\" (click)=\"close()\">\n <odx-icon name=\"close\"></odx-icon>\n </button>\n </div>\n <odx-area-header class=\"odx-main-menu__header\">\n {{ title }}\n <odx-area-header-subtitle *ngIf=\"subtitle\">\n {{ subtitle }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <nav class=\"odx-main-menu__content\">\n <ng-content></ng-content>\n </nav>\n <div class=\"odx-main-menu__info\">\n <ng-content select=\"[odxLink]\"></ng-content>\n </div>\n <div class=\"odx-main-menu__footer\">\n <odx-logo variant=\"inverse\"></odx-logo>\n <p class=\"odx-text odx-text--small\" *ngIf=\"copyright\">\n {{ copyright }}\n </p>\n </div>\n</aside>\n<div @overlayAnimation class=\"odx-main-menu__overlay\" (click)=\"close()\" *ngIf=\"menuOpen | async\"></div>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "directive", type: i3.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "ngmodule", type: AreaHeaderModule }, { kind: "component", type: i4.AreaHeaderComponent, selector: "odx-area-header", inputs: ["size"] }, { kind: "directive", type: i4.AreaHeaderSubtitleDirective, selector: "odx-area-header-subtitle" }, { kind: "component", type: i5.ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: i6.IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }, { kind: "directive", type: LogoDirective, selector: "odx-logo", inputs: ["size", "variant"] }], animations: [
|
|
131
142
|
trigger('menuAnimation', [transition(':enter', [useAnimation(slideInLeft)]), transition(':leave', [useAnimation(slideOutLeft)])]),
|
|
132
143
|
trigger('overlayAnimation', [transition(':enter', [useAnimation(fadeIn())]), transition(':leave', [useAnimation(fadeOut())])]),
|
|
133
144
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
134
145
|
MainMenuComponent = __decorate([
|
|
135
146
|
CSSComponent('main-menu')
|
|
136
147
|
], MainMenuComponent);
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuComponent, decorators: [{
|
|
138
149
|
type: Component,
|
|
139
150
|
args: [{ selector: 'odx-main-menu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [A11yModule, CoreModule, AreaHeaderModule, ButtonComponent, IconComponent, LogoDirective], standalone: true, host: {
|
|
140
151
|
'[class.is-open]': 'isOpen',
|
|
141
152
|
}, animations: [
|
|
142
153
|
trigger('menuAnimation', [transition(':enter', [useAnimation(slideInLeft)]), transition(':leave', [useAnimation(slideOutLeft)])]),
|
|
143
154
|
trigger('overlayAnimation', [transition(':enter', [useAnimation(fadeIn())]), transition(':leave', [useAnimation(fadeOut())])]),
|
|
144
|
-
], template: "<aside @menuAnimation class=\"odx-main-menu__inner\" cdkTrapFocus cdkTrapFocusAutoCapture *ngIf=\"menuOpen | async\">\n <div class=\"odx-main-menu__actions\">\n <button class=\"odx-main-menu__close\" odxButton disabled=\"false\" (click)=\"close()\">\n <odx-icon name=\"close\"></odx-icon>\n </button>\n </div>\n <odx-area-header class=\"odx-main-menu__header\">\n {{ title }}\n <odx-area-header-subtitle *ngIf=\"subtitle\">\n {{ subtitle }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <nav class=\"odx-main-menu__content\">\n <ng-content
|
|
155
|
+
], template: "<aside @menuAnimation class=\"odx-main-menu__inner\" cdkTrapFocus cdkTrapFocusAutoCapture *ngIf=\"menuOpen | async\">\n <div class=\"odx-main-menu__actions\">\n <button class=\"odx-main-menu__close\" odxButton disabled=\"false\" (click)=\"close()\">\n <odx-icon name=\"close\"></odx-icon>\n </button>\n </div>\n <odx-area-header class=\"odx-main-menu__header\">\n {{ title }}\n <odx-area-header-subtitle *ngIf=\"subtitle\">\n {{ subtitle }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <nav class=\"odx-main-menu__content\">\n <ng-content></ng-content>\n </nav>\n <div class=\"odx-main-menu__info\">\n <ng-content select=\"[odxLink]\"></ng-content>\n </div>\n <div class=\"odx-main-menu__footer\">\n <odx-logo variant=\"inverse\"></odx-logo>\n <p class=\"odx-text odx-text--small\" *ngIf=\"copyright\">\n {{ copyright }}\n </p>\n </div>\n</aside>\n<div @overlayAnimation class=\"odx-main-menu__overlay\" (click)=\"close()\" *ngIf=\"menuOpen | async\"></div>\n" }]
|
|
145
156
|
}], propDecorators: { title: [{
|
|
146
157
|
type: Input
|
|
147
158
|
}], subtitle: [{
|
|
@@ -160,10 +171,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
160
171
|
const modules = [LinkDirective, MainMenuComponent, MainMenuItemDirective, MainMenuButtonDirective];
|
|
161
172
|
class MainMenuModule {
|
|
162
173
|
}
|
|
163
|
-
MainMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
164
|
-
MainMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
165
|
-
MainMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
166
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
174
|
+
MainMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
175
|
+
MainMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.9", ngImport: i0, type: MainMenuModule, imports: [LinkDirective, MainMenuComponent, MainMenuItemDirective, MainMenuButtonDirective], exports: [CoreModule, LinkDirective, MainMenuComponent, MainMenuItemDirective, MainMenuButtonDirective] });
|
|
176
|
+
MainMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuModule, imports: [MainMenuComponent, CoreModule] });
|
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: MainMenuModule, decorators: [{
|
|
167
178
|
type: NgModule,
|
|
168
179
|
args: [{
|
|
169
180
|
imports: modules,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-main-menu.mjs","sources":["../../../../libs/angular/components/main-menu/src/lib/main-menu.service.ts","../../../../libs/angular/components/main-menu/src/lib/directives/main-menu-button.directive.ts","../../../../libs/angular/components/main-menu/src/lib/directives/main-menu-item.directive.ts","../../../../libs/angular/components/main-menu/src/lib/main-menu.component.ts","../../../../libs/angular/components/main-menu/src/lib/main-menu.component.html","../../../../libs/angular/components/main-menu/src/lib/main-menu.module.ts","../../../../libs/angular/components/main-menu/src/odx-angular-components-main-menu.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { isBoolean } from '@odx/angular/utils';\nimport { BehaviorSubject, distinctUntilChanged, shareReplay } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class MainMenuService {\n private readonly isOpen$$ = new BehaviorSubject(false);\n\n public readonly isOpen$ = this.isOpen$$.pipe(distinctUntilChanged(), shareReplay({ refCount: true }));\n\n public isOpen(): boolean {\n return this.isOpen$$.getValue();\n }\n\n public open(): void {\n this.toggle(true);\n }\n\n public close(): void {\n this.toggle(false);\n }\n\n public toggle(forceState?: boolean): void {\n if (isBoolean(forceState)) {\n this.isOpen$$.next(forceState);\n } else if (this.isOpen()) {\n this.isOpen$$.next(false);\n } else {\n this.isOpen$$.next(true);\n }\n }\n}\n","import { Directive, HostListener, inject } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { MainMenuService } from '../main-menu.service';\n\n@CSSComponent('main-menu-button')\n@Directive({\n selector: 'button[odxMainMenuButton]',\n standalone: true,\n})\nexport class MainMenuButtonDirective {\n private readonly mainMenuService = inject(MainMenuService);\n public readonly element = injectElement<HTMLButtonElement>();\n\n @HostListener('click')\n public onClick() {\n this.mainMenuService.toggle();\n }\n}\n","import { Directive } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('main-menu-item')\n@Directive({\n selector: 'a[odxMainMenuItem]',\n standalone: true,\n providers: [DisabledController.connect()],\n host: {\n '[class.is-disabled]': 'isDisabled',\n '[attr.disabled]': 'isDisabled || null',\n '[attr.role]': '\"button\"',\n '[tabindex]': 'isDisabled ? -1 : 0',\n },\n})\nexport class MainMenuItemDirective {\n protected readonly disabledController = DisabledController.inject();\n public readonly element = injectElement<HTMLLinkElement>();\n\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n}\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { ChangeDetectionStrategy, Component, HostListener, inject, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { fadeIn, fadeOut, slideInLeft, slideOutLeft } from '@odx/angular/animations';\nimport { AreaHeaderModule } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { LogoDirective } from '@odx/angular/components/logo';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { MainMenuService } from './main-menu.service';\n\n@CSSComponent('main-menu')\n@Component({\n selector: 'odx-main-menu',\n templateUrl: './main-menu.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [A11yModule, CoreModule, AreaHeaderModule, ButtonComponent, IconComponent, LogoDirective],\n standalone: true,\n host: {\n '[class.is-open]': 'isOpen',\n },\n animations: [\n trigger('menuAnimation', [transition(':enter', [useAnimation(slideInLeft)]), transition(':leave', [useAnimation(slideOutLeft)])]),\n trigger('overlayAnimation', [transition(':enter', [useAnimation(fadeIn())]), transition(':leave', [useAnimation(fadeOut())])]),\n ],\n})\nexport class MainMenuComponent {\n protected readonly mainMenuService = inject(MainMenuService);\n public readonly element = injectElement();\n\n @Input()\n public title!: string;\n\n @Input()\n public subtitle: string | null = null;\n\n @Input()\n public copyright: string | null = null;\n\n @Input()\n public set isOpen(value: boolean) {\n this.mainMenuService.toggle(value);\n }\n\n public get isOpen(): boolean {\n return this.mainMenuService.isOpen();\n }\n\n @Output()\n public menuOpen = this.mainMenuService.isOpen$;\n\n @HostListener('window:keydown.escape')\n public close(): void {\n this.mainMenuService.close();\n }\n}\n","<aside @menuAnimation class=\"odx-main-menu__inner\" cdkTrapFocus cdkTrapFocusAutoCapture *ngIf=\"menuOpen | async\">\n <div class=\"odx-main-menu__actions\">\n <button class=\"odx-main-menu__close\" odxButton disabled=\"false\" (click)=\"close()\">\n <odx-icon name=\"close\"></odx-icon>\n </button>\n </div>\n <odx-area-header class=\"odx-main-menu__header\">\n {{ title }}\n <odx-area-header-subtitle *ngIf=\"subtitle\">\n {{ subtitle }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <nav class=\"odx-main-menu__content\">\n <ng-content select=\"a[odxMainMenuItem]\"></ng-content>\n </nav>\n <div class=\"odx-main-menu__info\">\n <ng-content select=\"[odxLink]\"></ng-content>\n </div>\n <div class=\"odx-main-menu__footer\">\n <odx-logo variant=\"inverse\"></odx-logo>\n <p class=\"odx-text odx-text--small\" *ngIf=\"copyright\">\n {{ copyright }}\n </p>\n </div>\n</aside>\n<div @overlayAnimation class=\"odx-main-menu__overlay\" (click)=\"close()\" *ngIf=\"menuOpen | async\"></div>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { LinkDirective } from '@odx/angular/components/link';\nimport { MainMenuButtonDirective, MainMenuItemDirective } from './directives';\nimport { MainMenuComponent } from './main-menu.component';\n\nconst modules = [LinkDirective, MainMenuComponent, MainMenuItemDirective, MainMenuButtonDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class MainMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAKa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;QAEmB,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvC,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;KAuBvG;IArBQ,MAAM,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;KACjC;IAEM,IAAI,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;KACnB;IAEM,KAAK,GAAA;AACV,QAA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A;;2GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YANV,aAAa,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,uBAAuB,CAIrF,EAAA,OAAA,EAAA,CAAA,UAAU,EAJL,aAAa,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;4GAMpF,cAAc,EAAA,OAAA,EAAA,CANK,iBAAiB,EAIrC,UAAU,CAAA,EAAA,CAAA,CAAA;2FAET,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;iBAClC,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-main-menu.mjs","sources":["../../../../libs/angular/components/main-menu/src/lib/main-menu.service.ts","../../../../libs/angular/components/main-menu/src/lib/directives/main-menu-button.directive.ts","../../../../libs/angular/components/main-menu/src/lib/directives/main-menu-item.directive.ts","../../../../libs/angular/components/main-menu/src/lib/main-menu.component.ts","../../../../libs/angular/components/main-menu/src/lib/main-menu.component.html","../../../../libs/angular/components/main-menu/src/lib/main-menu.module.ts","../../../../libs/angular/components/main-menu/src/odx-angular-components-main-menu.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { isBoolean } from '@odx/angular/utils';\nimport { BehaviorSubject, distinctUntilChanged, shareReplay } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class MainMenuService {\n private readonly isOpen$$ = new BehaviorSubject(false);\n\n public readonly isOpen$ = this.isOpen$$.pipe(distinctUntilChanged(), shareReplay({ refCount: true }));\n\n public isOpen(): boolean {\n return this.isOpen$$.getValue();\n }\n\n public open(): void {\n this.toggle(true);\n }\n\n public close(): void {\n this.toggle(false);\n }\n\n public toggle(forceState?: boolean): void {\n if (isBoolean(forceState)) {\n this.isOpen$$.next(forceState);\n } else if (this.isOpen()) {\n this.isOpen$$.next(false);\n } else {\n this.isOpen$$.next(true);\n }\n }\n}\n","import { Directive, HostListener, inject } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { MainMenuService } from '../main-menu.service';\n\n@CSSComponent('main-menu-button')\n@Directive({\n selector: 'button[odxMainMenuButton]',\n standalone: true,\n})\nexport class MainMenuButtonDirective {\n private readonly mainMenuService = inject(MainMenuService);\n public readonly element = injectElement<HTMLButtonElement>();\n\n @HostListener('click')\n public onClick() {\n this.mainMenuService.toggle();\n }\n}\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Directive, inject, Input } from '@angular/core';\nimport { RouterLinkActive } from '@angular/router';\nimport { DisabledController } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement, Transform } from '@odx/angular/utils';\n\n@CSSComponent('main-menu-item')\n@Directive({\n selector: '[odxMainMenuItem]',\n standalone: true,\n providers: [DisabledController.connect()],\n host: {\n '[class.is-selected]': 'isSelected || routerLinkActive?.isActive',\n '[class.is-disabled]': 'isDisabled',\n '[attr.disabled]': 'isDisabled || null',\n '[attr.role]': '\"button\"',\n '[tabindex]': 'isDisabled ? -1 : 0',\n },\n})\nexport class MainMenuItemDirective {\n public static readonly ngAcceptInputType_isSelected: BooleanInput;\n\n protected readonly disabledController = DisabledController.inject();\n protected readonly routerLinkActive = inject(RouterLinkActive, { optional: true });\n public readonly element = injectElement<HTMLLinkElement>();\n\n @Transform(coerceBooleanProperty)\n @Input()\n public isSelected = false;\n\n public get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n}\n","import { transition, trigger, useAnimation } from '@angular/animations';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, HostListener, inject, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { fadeIn, fadeOut, slideInLeft, slideOutLeft } from '@odx/angular/animations';\nimport { AreaHeaderModule } from '@odx/angular/components/area-header';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { LogoDirective } from '@odx/angular/components/logo';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { MainMenuService } from './main-menu.service';\n\n@CSSComponent('main-menu')\n@Component({\n selector: 'odx-main-menu',\n templateUrl: './main-menu.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [A11yModule, CoreModule, AreaHeaderModule, ButtonComponent, IconComponent, LogoDirective],\n standalone: true,\n host: {\n '[class.is-open]': 'isOpen',\n },\n animations: [\n trigger('menuAnimation', [transition(':enter', [useAnimation(slideInLeft)]), transition(':leave', [useAnimation(slideOutLeft)])]),\n trigger('overlayAnimation', [transition(':enter', [useAnimation(fadeIn())]), transition(':leave', [useAnimation(fadeOut())])]),\n ],\n})\nexport class MainMenuComponent {\n public static readonly ngAcceptInputType_isOpen: BooleanInput;\n\n protected readonly mainMenuService = inject(MainMenuService);\n public readonly element = injectElement();\n\n @Input()\n public title!: string;\n\n @Input()\n public subtitle: string | null = null;\n\n @Input()\n public copyright: string | null = null;\n\n @Input()\n public set isOpen(value: boolean) {\n this.mainMenuService.toggle(coerceBooleanProperty(value));\n }\n\n public get isOpen(): boolean {\n return this.mainMenuService.isOpen();\n }\n\n @Output()\n public menuOpen = this.mainMenuService.isOpen$;\n\n @HostListener('window:keydown.escape')\n public close(): void {\n this.mainMenuService.close();\n }\n}\n","<aside @menuAnimation class=\"odx-main-menu__inner\" cdkTrapFocus cdkTrapFocusAutoCapture *ngIf=\"menuOpen | async\">\n <div class=\"odx-main-menu__actions\">\n <button class=\"odx-main-menu__close\" odxButton disabled=\"false\" (click)=\"close()\">\n <odx-icon name=\"close\"></odx-icon>\n </button>\n </div>\n <odx-area-header class=\"odx-main-menu__header\">\n {{ title }}\n <odx-area-header-subtitle *ngIf=\"subtitle\">\n {{ subtitle }}\n </odx-area-header-subtitle>\n </odx-area-header>\n <nav class=\"odx-main-menu__content\">\n <ng-content></ng-content>\n </nav>\n <div class=\"odx-main-menu__info\">\n <ng-content select=\"[odxLink]\"></ng-content>\n </div>\n <div class=\"odx-main-menu__footer\">\n <odx-logo variant=\"inverse\"></odx-logo>\n <p class=\"odx-text odx-text--small\" *ngIf=\"copyright\">\n {{ copyright }}\n </p>\n </div>\n</aside>\n<div @overlayAnimation class=\"odx-main-menu__overlay\" (click)=\"close()\" *ngIf=\"menuOpen | async\"></div>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { LinkDirective } from '@odx/angular/components/link';\nimport { MainMenuButtonDirective, MainMenuItemDirective } from './directives';\nimport { MainMenuComponent } from './main-menu.component';\n\nconst modules = [LinkDirective, MainMenuComponent, MainMenuItemDirective, MainMenuButtonDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class MainMenuModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAKa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;QAEmB,IAAA,CAAA,QAAQ,GAAG,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC;QAEvC,IAAA,CAAA,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAA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EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;iBAClC,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, Directive, Input, HostListener, ContentChild, Injector, Injectable, TemplateRef, NgModule } from '@angular/core';
|
|
3
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, Directive, Input, HostListener, ContentChild, Injector, Injectable, TemplateRef, EventEmitter, Output, NgModule } from '@angular/core';
|
|
4
4
|
import { CSSComponent, CSSModifier } from '@odx/angular/internal';
|
|
5
|
-
import { injectElement, createModuleConfigTokens, isViewContainer, provideModuleConfig } from '@odx/angular/utils';
|
|
5
|
+
import { injectElement, createModuleConfigTokens, isViewContainer, hasChanged, provideModuleConfig } from '@odx/angular/utils';
|
|
6
6
|
import * as i2 from '@odx/angular';
|
|
7
|
-
import { CoreModule } from '@odx/angular';
|
|
7
|
+
import { Controller, detectControllerChanges, CoreModule } from '@odx/angular';
|
|
8
8
|
import { ActionGroupComponent } from '@odx/angular/components/action-group';
|
|
9
9
|
import { AreaHeaderSize, AreaHeaderComponent, AreaHeaderModule } from '@odx/angular/components/area-header';
|
|
10
10
|
import { ButtonComponent } from '@odx/angular/components/button';
|
|
11
11
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
12
|
+
import { deepmerge } from 'deepmerge-ts';
|
|
12
13
|
import { Subject, share, merge, BehaviorSubject, shareReplay, finalize } from 'rxjs';
|
|
13
14
|
import * as i1 from '@angular/common';
|
|
14
15
|
import { Location, DOCUMENT } from '@angular/common';
|
|
@@ -17,7 +18,6 @@ import * as i1$1 from '@angular/cdk/a11y';
|
|
|
17
18
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
18
19
|
import { fadeIn, slideInY, fadeOut, slideOutY } from '@odx/angular/animations';
|
|
19
20
|
import { DynamicViewDirective, DynamicViewService } from '@odx/angular/cdk/dynamic-view';
|
|
20
|
-
import { deepmerge } from 'deepmerge-ts';
|
|
21
21
|
import { ButtonGroupComponent } from '@odx/angular/components/button-group';
|
|
22
22
|
|
|
23
23
|
let ModalFooterComponent = class ModalFooterComponent {
|
|
@@ -25,18 +25,19 @@ let ModalFooterComponent = class ModalFooterComponent {
|
|
|
25
25
|
this.element = injectElement();
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
ModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
29
|
-
ModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
28
|
+
ModalFooterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
ModalFooterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.9", type: ModalFooterComponent, isStandalone: true, selector: "odx-modal-footer", ngImport: i0, template: "<ng-content></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
30
30
|
ModalFooterComponent = __decorate([
|
|
31
31
|
CSSComponent('modal__footer')
|
|
32
32
|
], ModalFooterComponent);
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalFooterComponent, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{ standalone: true, selector: 'odx-modal-footer', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
36
36
|
}] });
|
|
37
37
|
|
|
38
|
-
class ModalRef {
|
|
38
|
+
class ModalRef extends Controller {
|
|
39
39
|
constructor(internalOptions) {
|
|
40
|
+
super();
|
|
40
41
|
this.internalOptions = internalOptions;
|
|
41
42
|
this.onClose$$ = new Subject();
|
|
42
43
|
this.onDismiss$$ = new Subject();
|
|
@@ -53,6 +54,10 @@ class ModalRef {
|
|
|
53
54
|
get options() {
|
|
54
55
|
return this.internalOptions;
|
|
55
56
|
}
|
|
57
|
+
update(options) {
|
|
58
|
+
this.internalOptions = deepmerge(this.internalOptions, options);
|
|
59
|
+
this.triggerControllerChange();
|
|
60
|
+
}
|
|
56
61
|
dismiss() {
|
|
57
62
|
this.onDismiss$$.next();
|
|
58
63
|
this.destroy();
|
|
@@ -91,9 +96,9 @@ class ModalCloseDirective {
|
|
|
91
96
|
this.modalRef.close(result !== null && result !== void 0 ? result : null);
|
|
92
97
|
}
|
|
93
98
|
}
|
|
94
|
-
ModalCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
95
|
-
ModalCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
99
|
+
ModalCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
100
|
+
ModalCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.9", type: ModalCloseDirective, isStandalone: true, selector: "[odxModalClose]", inputs: { result: ["odxModalClose", "result"] }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalCloseDirective, decorators: [{
|
|
97
102
|
type: Directive,
|
|
98
103
|
args: [{
|
|
99
104
|
standalone: true,
|
|
@@ -112,12 +117,12 @@ let ModalContentDirective = class ModalContentDirective {
|
|
|
112
117
|
this.element = injectElement();
|
|
113
118
|
}
|
|
114
119
|
};
|
|
115
|
-
ModalContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
116
|
-
ModalContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
120
|
+
ModalContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
121
|
+
ModalContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.9", type: ModalContentDirective, isStandalone: true, selector: "odx-modal-content", ngImport: i0 });
|
|
117
122
|
ModalContentDirective = __decorate([
|
|
118
123
|
CSSComponent('modal__content')
|
|
119
124
|
], ModalContentDirective);
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalContentDirective, decorators: [{
|
|
121
126
|
type: Directive,
|
|
122
127
|
args: [{
|
|
123
128
|
standalone: true,
|
|
@@ -133,9 +138,9 @@ class ModalDismissDirective {
|
|
|
133
138
|
this.modalRef.dismiss();
|
|
134
139
|
}
|
|
135
140
|
}
|
|
136
|
-
ModalDismissDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
137
|
-
ModalDismissDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
141
|
+
ModalDismissDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalDismissDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
142
|
+
ModalDismissDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.9", type: ModalDismissDirective, isStandalone: true, selector: "[odxModalDismiss]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalDismissDirective, decorators: [{
|
|
139
144
|
type: Directive,
|
|
140
145
|
args: [{
|
|
141
146
|
standalone: true,
|
|
@@ -150,6 +155,7 @@ let ModalHeaderComponent = class ModalHeaderComponent {
|
|
|
150
155
|
constructor() {
|
|
151
156
|
this.modalRef = injectModalRef();
|
|
152
157
|
this.element = injectElement();
|
|
158
|
+
detectControllerChanges(this.modalRef).subscribe();
|
|
153
159
|
}
|
|
154
160
|
ngAfterContentInit() {
|
|
155
161
|
if (this.areaHeaderComponent) {
|
|
@@ -157,15 +163,16 @@ let ModalHeaderComponent = class ModalHeaderComponent {
|
|
|
157
163
|
}
|
|
158
164
|
}
|
|
159
165
|
};
|
|
160
|
-
ModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
161
|
-
ModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
166
|
+
ModalHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
167
|
+
ModalHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.9", type: ModalHeaderComponent, isStandalone: true, selector: "odx-modal-header", queries: [{ propertyName: "areaHeaderComponent", first: true, predicate: AreaHeaderComponent, descendants: true }], ngImport: i0, template: "<ng-content select=\"odx-area-header\"></ng-content>\n<odx-action-group class=\"odx-modal__dismiss\" *ngIf=\"modalRef.options.dismissable\">\n <button odxButton odxModalDismiss>\n <odx-icon name=\"close\"></odx-icon>\n </button>\n</odx-action-group>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name"] }, { kind: "directive", type: ModalDismissDirective, selector: "[odxModalDismiss]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
162
168
|
ModalHeaderComponent = __decorate([
|
|
163
|
-
CSSComponent('modal__header')
|
|
169
|
+
CSSComponent('modal__header'),
|
|
170
|
+
__metadata("design:paramtypes", [])
|
|
164
171
|
], ModalHeaderComponent);
|
|
165
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
172
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalHeaderComponent, decorators: [{
|
|
166
173
|
type: Component,
|
|
167
174
|
args: [{ standalone: true, selector: 'odx-modal-header', imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent, ModalDismissDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"odx-area-header\"></ng-content>\n<odx-action-group class=\"odx-modal__dismiss\" *ngIf=\"modalRef.options.dismissable\">\n <button odxButton odxModalDismiss>\n <odx-icon name=\"close\"></odx-icon>\n </button>\n</odx-action-group>\n" }]
|
|
168
|
-
}], propDecorators: { areaHeaderComponent: [{
|
|
175
|
+
}], ctorParameters: function () { return []; }, propDecorators: { areaHeaderComponent: [{
|
|
169
176
|
type: ContentChild,
|
|
170
177
|
args: [AreaHeaderComponent]
|
|
171
178
|
}] } });
|
|
@@ -177,6 +184,9 @@ let ModalComponent = class ModalComponent {
|
|
|
177
184
|
this.context = { $implicit: this.modalRef };
|
|
178
185
|
this.element = injectElement();
|
|
179
186
|
this.size = this.modalRef.options.size;
|
|
187
|
+
detectControllerChanges(this.modalRef).subscribe(() => {
|
|
188
|
+
this.size = this.modalRef.options.size;
|
|
189
|
+
});
|
|
180
190
|
}
|
|
181
191
|
onClose() {
|
|
182
192
|
if (this.modalRef.options.dismissable) {
|
|
@@ -184,8 +194,8 @@ let ModalComponent = class ModalComponent {
|
|
|
184
194
|
}
|
|
185
195
|
}
|
|
186
196
|
};
|
|
187
|
-
ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
188
|
-
ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.
|
|
197
|
+
ModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
198
|
+
ModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.9", type: ModalComponent, isStandalone: true, selector: "odx-modal", inputs: { content: "content" }, host: { listeners: { "keyup.esc": "onClose()" }, properties: { "@hostAnimation": "true", "attr.id": "modalRef.options.id" } }, ngImport: i0, template: "<div\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [odxClickOutsideActive]=\"modalRef.options.dismissable\"\n [attr.aria-labelledby]=\"modalRef.modalTitleId\"\n class=\"odx-modal__container\"\n role=\"dialog\"\n (odxClickOutside)=\"modalRef.dismiss()\"\n>\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewContext]=\"context\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n</div>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i2.ClickOutsideDirective, selector: "[odxClickOutside]", inputs: ["odxClickOutsideActive"], outputs: ["odxClickOutside"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }], animations: [
|
|
189
199
|
trigger('hostAnimation', [
|
|
190
200
|
transition(':enter', group([useAnimation(fadeIn()), query('.odx-modal__container', useAnimation(slideInY('8px')))])),
|
|
191
201
|
transition(':leave', group([useAnimation(fadeOut()), query('.odx-modal__container', useAnimation(slideOutY('8px')))])),
|
|
@@ -196,9 +206,10 @@ __decorate([
|
|
|
196
206
|
__metadata("design:type", Object)
|
|
197
207
|
], ModalComponent.prototype, "size", void 0);
|
|
198
208
|
ModalComponent = __decorate([
|
|
199
|
-
CSSComponent('modal')
|
|
209
|
+
CSSComponent('modal'),
|
|
210
|
+
__metadata("design:paramtypes", [])
|
|
200
211
|
], ModalComponent);
|
|
201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalComponent, decorators: [{
|
|
202
213
|
type: Component,
|
|
203
214
|
args: [{ standalone: true, selector: 'odx-modal', imports: [A11yModule, ActionGroupComponent, ButtonComponent, IconComponent, CoreModule, DynamicViewDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
204
215
|
'[@hostAnimation]': 'true',
|
|
@@ -209,7 +220,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
209
220
|
transition(':leave', group([useAnimation(fadeOut()), query('.odx-modal__container', useAnimation(slideOutY('8px')))])),
|
|
210
221
|
]),
|
|
211
222
|
], template: "<div\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n [odxClickOutsideActive]=\"modalRef.options.dismissable\"\n [attr.aria-labelledby]=\"modalRef.modalTitleId\"\n class=\"odx-modal__container\"\n role=\"dialog\"\n (odxClickOutside)=\"modalRef.dismiss()\"\n>\n <ng-template [odxDynamicView]=\"content\" [odxDynamicViewContext]=\"context\" [odxDynamicViewInjector]=\"injector\"></ng-template>\n</div>\n" }]
|
|
212
|
-
}], propDecorators: { size: [], content: [{
|
|
223
|
+
}], ctorParameters: function () { return []; }, propDecorators: { size: [], content: [{
|
|
213
224
|
type: Input
|
|
214
225
|
}], onClose: [{
|
|
215
226
|
type: HostListener,
|
|
@@ -255,9 +266,9 @@ class OpenModalManagerService {
|
|
|
255
266
|
}
|
|
256
267
|
}
|
|
257
268
|
}
|
|
258
|
-
OpenModalManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
259
|
-
OpenModalManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
260
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
269
|
+
OpenModalManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: OpenModalManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
270
|
+
OpenModalManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: OpenModalManagerService, providedIn: 'root' });
|
|
271
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: OpenModalManagerService, decorators: [{
|
|
261
272
|
type: Injectable,
|
|
262
273
|
args: [{ providedIn: 'root' }]
|
|
263
274
|
}] });
|
|
@@ -313,9 +324,9 @@ class ModalService {
|
|
|
313
324
|
}
|
|
314
325
|
}
|
|
315
326
|
ModalService.ID = 0;
|
|
316
|
-
ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
317
|
-
ModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
327
|
+
ModalService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
328
|
+
ModalService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalService, providedIn: 'root' });
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalService, decorators: [{
|
|
319
330
|
type: Injectable,
|
|
320
331
|
args: [{ providedIn: 'root' }]
|
|
321
332
|
}] });
|
|
@@ -325,22 +336,33 @@ class ModalDirective {
|
|
|
325
336
|
this.modalService = inject(ModalService);
|
|
326
337
|
this.modalRef = null;
|
|
327
338
|
this.template = inject(TemplateRef);
|
|
339
|
+
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
340
|
+
this.modalClose = new EventEmitter();
|
|
341
|
+
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
342
|
+
this.modalDismiss = new EventEmitter();
|
|
328
343
|
}
|
|
329
|
-
|
|
344
|
+
ngOnChanges(changes) {
|
|
330
345
|
var _a;
|
|
331
|
-
(
|
|
346
|
+
if (hasChanged(changes, 'modalOptions') && this.modalOptions) {
|
|
347
|
+
(_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.update(this.modalOptions);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
ngOnDestroy() {
|
|
351
|
+
this.dismiss();
|
|
332
352
|
}
|
|
333
353
|
open() {
|
|
334
354
|
this.modalRef = this.modalService.open(this.template, this.modalOptions || {});
|
|
355
|
+
this.modalRef.onClose$.subscribe((result) => this.modalClose.next(result));
|
|
356
|
+
this.modalRef.onDismiss$.subscribe((result) => this.modalDismiss.next(result));
|
|
335
357
|
}
|
|
336
358
|
dismiss() {
|
|
337
359
|
var _a;
|
|
338
360
|
(_a = this.modalRef) === null || _a === void 0 ? void 0 : _a.dismiss();
|
|
339
361
|
}
|
|
340
362
|
}
|
|
341
|
-
ModalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
342
|
-
ModalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.
|
|
343
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
363
|
+
ModalDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
364
|
+
ModalDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.9", type: ModalDirective, isStandalone: true, selector: "ng-template[odxModal]", inputs: { modalOptions: ["odxModal", "modalOptions"] }, outputs: { modalClose: "odxModalClose", modalDismiss: "odxModalDismiss" }, exportAs: ["odxModal"], usesOnChanges: true, ngImport: i0 });
|
|
365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalDirective, decorators: [{
|
|
344
366
|
type: Directive,
|
|
345
367
|
args: [{
|
|
346
368
|
standalone: true,
|
|
@@ -350,6 +372,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
350
372
|
}], propDecorators: { modalOptions: [{
|
|
351
373
|
type: Input,
|
|
352
374
|
args: ['odxModal']
|
|
375
|
+
}], modalClose: [{
|
|
376
|
+
type: Output,
|
|
377
|
+
args: ['odxModalClose']
|
|
378
|
+
}], modalDismiss: [{
|
|
379
|
+
type: Output,
|
|
380
|
+
args: ['odxModalDismiss']
|
|
353
381
|
}] } });
|
|
354
382
|
|
|
355
383
|
const modules = [ModalComponent, ModalHeaderComponent, ModalFooterComponent, ModalDirective, ModalCloseDirective, ModalContentDirective, ModalDismissDirective];
|
|
@@ -361,10 +389,10 @@ class ModalModule {
|
|
|
361
389
|
};
|
|
362
390
|
}
|
|
363
391
|
}
|
|
364
|
-
ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.
|
|
365
|
-
ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.
|
|
366
|
-
ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.
|
|
392
|
+
ModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
393
|
+
ModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.9", ngImport: i0, type: ModalModule, imports: [ButtonComponent, ButtonGroupComponent, ModalComponent, ModalHeaderComponent, ModalFooterComponent, ModalDirective, ModalCloseDirective, ModalContentDirective, ModalDismissDirective], exports: [CoreModule, AreaHeaderModule, ButtonComponent, ButtonGroupComponent, ModalComponent, ModalHeaderComponent, ModalFooterComponent, ModalDirective, ModalCloseDirective, ModalContentDirective, ModalDismissDirective] });
|
|
394
|
+
ModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalModule, imports: [ButtonComponent, ButtonGroupComponent, ModalComponent, ModalHeaderComponent, ModalFooterComponent, CoreModule, AreaHeaderModule] });
|
|
395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.9", ngImport: i0, type: ModalModule, decorators: [{
|
|
368
396
|
type: NgModule,
|
|
369
397
|
args: [{
|
|
370
398
|
imports: [ButtonComponent, ButtonGroupComponent, ...modules],
|