@koalarx/ui 14.0.0 → 14.0.1
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/alert/esm2020/lib/dialog-alert.component.mjs +3 -3
- package/alert/esm2020/lib/koala.alert.module.mjs +4 -4
- package/alert/esm2020/lib/koala.alert.service.mjs +3 -3
- package/alert/fesm2015/koalarx-ui-alert.mjs +10 -10
- package/alert/fesm2020/koalarx-ui-alert.mjs +10 -10
- package/button/esm2020/lib/button.component.mjs +3 -3
- package/button/esm2020/lib/koala.button.module.mjs +4 -4
- package/button/fesm2015/koalarx-ui-button.mjs +7 -7
- package/button/fesm2020/koalarx-ui-button.mjs +7 -7
- package/common/esm2020/lib/services/csv/koala.csv.service.mjs +3 -3
- package/common/esm2020/lib/services/xlsx/koala.xlsx.service.mjs +58 -4
- package/common/fesm2015/koalarx-ui-common.mjs +63 -6
- package/common/fesm2015/koalarx-ui-common.mjs.map +1 -1
- package/common/fesm2020/koalarx-ui-common.mjs +60 -6
- package/common/fesm2020/koalarx-ui-common.mjs.map +1 -1
- package/common/lib/services/xlsx/koala.xlsx.service.d.ts +5 -0
- package/core/esm2020/lib/loader/loader-bar-page.component.mjs +3 -3
- package/core/esm2020/lib/ngx-koala.module.mjs +4 -4
- package/core/esm2020/lib/page/koala.page.module.mjs +4 -4
- package/core/esm2020/lib/page/notifications/notification.component.mjs +4 -4
- package/core/esm2020/lib/page/page.component.mjs +3 -3
- package/core/esm2020/lib/router/koala.parameter-hash-location-stategy.mjs +3 -3
- package/core/esm2020/lib/services/api-requester/koala.api-requester.service.mjs +3 -3
- package/core/esm2020/lib/services/loader/koala.loader.service.mjs +3 -3
- package/core/esm2020/lib/services/openid/koala.oauth2.service.mjs +3 -3
- package/core/esm2020/lib/services/request/koala.request.service.mjs +3 -3
- package/core/esm2020/lib/services/token/koala.token.service.mjs +3 -3
- package/core/fesm2015/koalarx-ui-core.mjs +36 -36
- package/core/fesm2015/koalarx-ui-core.mjs.map +1 -1
- package/core/fesm2020/koalarx-ui-core.mjs +36 -36
- package/core/fesm2020/koalarx-ui-core.mjs.map +1 -1
- package/dialog/esm2020/lib/dialog.component.mjs +3 -3
- package/dialog/esm2020/lib/koala.dialog.module.mjs +4 -4
- package/dialog/esm2020/lib/koala.dialog.service.mjs +3 -3
- package/dialog/fesm2015/koalarx-ui-dialog.mjs +10 -10
- package/dialog/fesm2020/koalarx-ui-dialog.mjs +10 -10
- package/dynamic-component/esm2020/lib/koala-dynamic-component.directive.mjs +3 -3
- package/dynamic-component/esm2020/lib/koala-dynamic-component.factory.mjs +3 -3
- package/dynamic-component/esm2020/lib/koala-dynamic-component.module.mjs +4 -4
- package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.mjs +10 -10
- package/dynamic-component/fesm2020/koalarx-ui-dynamic-component.mjs +10 -10
- package/file-button/esm2020/lib/file-button.component.mjs +3 -3
- package/file-button/esm2020/lib/koala.btn-file.service.mjs +3 -3
- package/file-button/esm2020/lib/koala.file-button.module.mjs +4 -4
- package/file-button/fesm2015/koalarx-ui-file-button.mjs +10 -10
- package/file-button/fesm2020/koalarx-ui-file-button.mjs +10 -10
- package/folder-page/esm2020/lib/folder.component.mjs +3 -3
- package/folder-page/esm2020/lib/koala.folder-page.module.mjs +4 -4
- package/folder-page/fesm2015/koalarx-ui-folder-page.mjs +7 -7
- package/folder-page/fesm2015/koalarx-ui-folder-page.mjs.map +1 -1
- package/folder-page/fesm2020/koalarx-ui-folder-page.mjs +7 -7
- package/folder-page/fesm2020/koalarx-ui-folder-page.mjs.map +1 -1
- package/form/esm2020/lib/btn-submit/btn-submit.component.mjs +3 -3
- package/form/esm2020/lib/directives/koala-autofocus.directive.mjs +3 -3
- package/form/esm2020/lib/dynamic-form/dynamic-form.component.mjs +5 -5
- package/form/esm2020/lib/dynamic-form/koala.dynamic-form.service.mjs +3 -3
- package/form/esm2020/lib/koala.form.module.mjs +4 -4
- package/form/fesm2015/koalarx-ui-form.mjs +17 -17
- package/form/fesm2015/koalarx-ui-form.mjs.map +1 -1
- package/form/fesm2020/koalarx-ui-form.mjs +17 -17
- package/form/fesm2020/koalarx-ui-form.mjs.map +1 -1
- package/icon/esm2020/lib/icon.component.mjs +3 -3
- package/icon/esm2020/lib/koala.icon.module.mjs +4 -4
- package/icon/fesm2015/koalarx-ui-icon.mjs +7 -7
- package/icon/fesm2020/koalarx-ui-icon.mjs +7 -7
- package/icons-animated/esm2020/lib/icons/downloading/downloading-icon-animated.component.mjs +4 -4
- package/icons-animated/esm2020/lib/icons/loading/loading-icon-animated.component.mjs +4 -4
- package/icons-animated/esm2020/lib/icons-animated.component.mjs +3 -3
- package/icons-animated/esm2020/lib/icons-animated.service.mjs +3 -3
- package/icons-animated/esm2020/lib/koala-icons-animated.module.mjs +4 -4
- package/icons-animated/fesm2015/koalarx-ui-icons-animated.mjs +18 -18
- package/icons-animated/fesm2015/koalarx-ui-icons-animated.mjs.map +1 -1
- package/icons-animated/fesm2020/koalarx-ui-icons-animated.mjs +18 -18
- package/icons-animated/fesm2020/koalarx-ui-icons-animated.mjs.map +1 -1
- package/list/esm2020/lib/koala.list.module.mjs +4 -4
- package/list/esm2020/lib/koala.list.service.mjs +3 -3
- package/list/esm2020/lib/list.component.mjs +3 -3
- package/list/esm2020/lib/providers/pagination/pagination.provider.mjs +3 -3
- package/list/fesm2015/koalarx-ui-list.mjs +13 -13
- package/list/fesm2020/koalarx-ui-list.mjs +13 -13
- package/menu/esm2020/lib/koala.menu.module.mjs +4 -4
- package/menu/esm2020/lib/koala.menu.service.mjs +3 -3
- package/menu/esm2020/lib/menu.component.mjs +4 -4
- package/menu/fesm2015/koalarx-ui-menu.mjs +11 -11
- package/menu/fesm2015/koalarx-ui-menu.mjs.map +1 -1
- package/menu/fesm2020/koalarx-ui-menu.mjs +11 -11
- package/menu/fesm2020/koalarx-ui-menu.mjs.map +1 -1
- package/package.json +1 -1
- package/question/esm2020/lib/dialog-question.component.mjs +3 -3
- package/question/esm2020/lib/koala.question.module.mjs +4 -4
- package/question/esm2020/lib/koala.question.service.mjs +3 -3
- package/question/fesm2015/koalarx-ui-question.mjs +10 -10
- package/question/fesm2020/koalarx-ui-question.mjs +10 -10
- package/snackbar/esm2020/lib/koala.snackbar.component.mjs +3 -3
- package/snackbar/esm2020/lib/koala.snackbar.module.mjs +4 -4
- package/snackbar/esm2020/lib/koala.snackbar.service.mjs +3 -3
- package/snackbar/fesm2015/koalarx-ui-snackbar.mjs +10 -10
- package/snackbar/fesm2020/koalarx-ui-snackbar.mjs +10 -10
|
@@ -87,11 +87,11 @@ export class MenuComponent {
|
|
|
87
87
|
return JSON.parse(JSON.stringify(this.optionsSubject?.getValue()));
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
91
|
-
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
90
|
+
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MenuComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
91
|
+
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: MenuComponent, selector: "koala-menu", inputs: { titleMenu: "titleMenu", optionsSubject: "optionsSubject" }, ngImport: i0, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-moz-fit-content;height:fit-content;overflow:hidden;width:100%}ul li{cursor:pointer;display:block;font-size:14px;outline:none;padding:0;position:relative;transition:.2s;overflow:hidden;border-radius:0 20px 20px 0}ul li a{transition:.2s}.module{outline:none;padding:5px 15px;text-decoration:none}a.module{box-sizing:border-box;cursor:pointer;display:block;width:100%}ul li li{border:none!important;padding:0!important;height:0}.state-module{position:absolute;right:10px;top:4px}ul li.active ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080}ul li.expanded ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080;height:-moz-fit-content;height:fit-content;padding:15px 0}ul li.expanded ul li{height:30px}ul li li a.active{background:rgba(0,0,0,.1)!important;cursor:default;height:-moz-fit-content!important;height:fit-content!important}ul li h3,ul li h4,ul li koala-icon,ul li mat-icon{display:inline-flex;line-height:1.5em;margin:0;vertical-align:middle}ul li h3,ul li h4{font-size:.9em}ul li koala-icon,ul li li koala-icon{font-size:18px;height:18px;line-height:18px;margin-right:5px;width:18px}ul li mat-icon,ul li li mat-icon{font-size:20px;height:20px;line-height:20px;margin-right:5px;width:20px}ul li koala-icon,ul li li koala-icon{margin-right:10px}ul li li a{cursor:pointer;display:block;padding:5px 15px!important;text-decoration:none;width:100%}ul li li:hover{background:rgba(0,0,0,.1)}ul li li a.active:hover{background:transparent}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.IconComponent, selector: "koala-icon", inputs: ["color", "icon", "size"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MenuComponent, decorators: [{
|
|
93
93
|
type: Component,
|
|
94
|
-
args: [{ selector: 'koala-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-
|
|
94
|
+
args: [{ selector: 'koala-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-moz-fit-content;height:fit-content;overflow:hidden;width:100%}ul li{cursor:pointer;display:block;font-size:14px;outline:none;padding:0;position:relative;transition:.2s;overflow:hidden;border-radius:0 20px 20px 0}ul li a{transition:.2s}.module{outline:none;padding:5px 15px;text-decoration:none}a.module{box-sizing:border-box;cursor:pointer;display:block;width:100%}ul li li{border:none!important;padding:0!important;height:0}.state-module{position:absolute;right:10px;top:4px}ul li.active ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080}ul li.expanded ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080;height:-moz-fit-content;height:fit-content;padding:15px 0}ul li.expanded ul li{height:30px}ul li li a.active{background:rgba(0,0,0,.1)!important;cursor:default;height:-moz-fit-content!important;height:fit-content!important}ul li h3,ul li h4,ul li koala-icon,ul li mat-icon{display:inline-flex;line-height:1.5em;margin:0;vertical-align:middle}ul li h3,ul li h4{font-size:.9em}ul li koala-icon,ul li li koala-icon{font-size:18px;height:18px;line-height:18px;margin-right:5px;width:18px}ul li mat-icon,ul li li mat-icon{font-size:20px;height:20px;line-height:20px;margin-right:5px;width:20px}ul li koala-icon,ul li li koala-icon{margin-right:10px}ul li li a{cursor:pointer;display:block;padding:5px 15px!important;text-decoration:none;width:100%}ul li li:hover{background:rgba(0,0,0,.1)}ul li li a.active:hover{background:transparent}\n"] }]
|
|
95
95
|
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { titleMenu: [{
|
|
96
96
|
type: Input
|
|
97
97
|
}], optionsSubject: [{
|
|
@@ -96,11 +96,11 @@ class MenuComponent {
|
|
|
96
96
|
return JSON.parse(JSON.stringify((_a = this.optionsSubject) === null || _a === void 0 ? void 0 : _a.getValue()));
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
100
|
-
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
99
|
+
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MenuComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
100
|
+
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: MenuComponent, selector: "koala-menu", inputs: { titleMenu: "titleMenu", optionsSubject: "optionsSubject" }, ngImport: i0, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-moz-fit-content;height:fit-content;overflow:hidden;width:100%}ul li{cursor:pointer;display:block;font-size:14px;outline:none;padding:0;position:relative;transition:.2s;overflow:hidden;border-radius:0 20px 20px 0}ul li a{transition:.2s}.module{outline:none;padding:5px 15px;text-decoration:none}a.module{box-sizing:border-box;cursor:pointer;display:block;width:100%}ul li li{border:none!important;padding:0!important;height:0}.state-module{position:absolute;right:10px;top:4px}ul li.active ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080}ul li.expanded ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080;height:-moz-fit-content;height:fit-content;padding:15px 0}ul li.expanded ul li{height:30px}ul li li a.active{background:rgba(0,0,0,.1)!important;cursor:default;height:-moz-fit-content!important;height:fit-content!important}ul li h3,ul li h4,ul li koala-icon,ul li mat-icon{display:inline-flex;line-height:1.5em;margin:0;vertical-align:middle}ul li h3,ul li h4{font-size:.9em}ul li koala-icon,ul li li koala-icon{font-size:18px;height:18px;line-height:18px;margin-right:5px;width:18px}ul li mat-icon,ul li li mat-icon{font-size:20px;height:20px;line-height:20px;margin-right:5px;width:20px}ul li koala-icon,ul li li koala-icon{margin-right:10px}ul li li a{cursor:pointer;display:block;padding:5px 15px!important;text-decoration:none;width:100%}ul li li:hover{background:rgba(0,0,0,.1)}ul li li a.active:hover{background:transparent}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.IconComponent, selector: "koala-icon", inputs: ["color", "icon", "size"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MenuComponent, decorators: [{
|
|
102
102
|
type: Component,
|
|
103
|
-
args: [{ selector: 'koala-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-
|
|
103
|
+
args: [{ selector: 'koala-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-moz-fit-content;height:fit-content;overflow:hidden;width:100%}ul li{cursor:pointer;display:block;font-size:14px;outline:none;padding:0;position:relative;transition:.2s;overflow:hidden;border-radius:0 20px 20px 0}ul li a{transition:.2s}.module{outline:none;padding:5px 15px;text-decoration:none}a.module{box-sizing:border-box;cursor:pointer;display:block;width:100%}ul li li{border:none!important;padding:0!important;height:0}.state-module{position:absolute;right:10px;top:4px}ul li.active ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080}ul li.expanded ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080;height:-moz-fit-content;height:fit-content;padding:15px 0}ul li.expanded ul li{height:30px}ul li li a.active{background:rgba(0,0,0,.1)!important;cursor:default;height:-moz-fit-content!important;height:fit-content!important}ul li h3,ul li h4,ul li koala-icon,ul li mat-icon{display:inline-flex;line-height:1.5em;margin:0;vertical-align:middle}ul li h3,ul li h4{font-size:.9em}ul li koala-icon,ul li li koala-icon{font-size:18px;height:18px;line-height:18px;margin-right:5px;width:18px}ul li mat-icon,ul li li mat-icon{font-size:20px;height:20px;line-height:20px;margin-right:5px;width:20px}ul li koala-icon,ul li li koala-icon{margin-right:10px}ul li li a{cursor:pointer;display:block;padding:5px 15px!important;text-decoration:none;width:100%}ul li li:hover{background:rgba(0,0,0,.1)}ul li li a.active:hover{background:transparent}\n"] }]
|
|
104
104
|
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { titleMenu: [{
|
|
105
105
|
type: Input
|
|
106
106
|
}], optionsSubject: [{
|
|
@@ -121,25 +121,25 @@ class KoalaMenuService {
|
|
|
121
121
|
menuStateSubject.next(null);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
KoalaMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
125
|
-
KoalaMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
124
|
+
KoalaMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
125
|
+
KoalaMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuService, providedIn: "any" });
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuService, decorators: [{
|
|
127
127
|
type: Injectable,
|
|
128
128
|
args: [{ providedIn: "any" }]
|
|
129
129
|
}] });
|
|
130
130
|
|
|
131
131
|
class KoalaMenuModule {
|
|
132
132
|
}
|
|
133
|
-
KoalaMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
134
|
-
KoalaMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
133
|
+
KoalaMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
134
|
+
KoalaMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuModule, declarations: [MenuComponent], imports: [CommonModule,
|
|
135
135
|
RouterModule,
|
|
136
136
|
MatIconModule,
|
|
137
137
|
KoalaIconModule], exports: [MenuComponent] });
|
|
138
|
-
KoalaMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
138
|
+
KoalaMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuModule, imports: [CommonModule,
|
|
139
139
|
RouterModule,
|
|
140
140
|
MatIconModule,
|
|
141
141
|
KoalaIconModule] });
|
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuModule, decorators: [{
|
|
143
143
|
type: NgModule,
|
|
144
144
|
args: [{
|
|
145
145
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-menu.mjs","sources":["../../../projects/menu/src/lib/menu.component.ts","../../../projects/menu/src/lib/menu.component.html","../../../projects/menu/src/lib/koala.menu.service.ts","../../../projects/menu/src/lib/koala.menu.module.ts","../../../projects/menu/src/koalarx-ui-menu.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { KoalaMenuModuleInterface } from './koala.menu-module.interface';\nimport { NavigationEnd, Router, Scroll } from '@angular/router';\nimport { BehaviorSubject } from 'rxjs';\nimport { koala } from '@koalarx/utils';\nimport { map, switchMap } from 'rxjs/operators';\nimport { delay } from '@koalarx/utils/operators/delay';\nimport { KoalaMenuToolInterface } from './koala.menu-tool.interface';\nimport { KoalaIconType } from '@koalarx/ui/icon';\n\nexport type MenuStateType = 'open' | 'close';\nexport const menuStateSubject = new BehaviorSubject<MenuStateType | null>(null);\n\n@Component({\n selector: 'koala-menu',\n templateUrl: 'menu.component.html',\n styleUrls: ['menu.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MenuComponent implements OnInit {\n @Input() titleMenu?: string;\n @Input() optionsSubject?: BehaviorSubject<KoalaMenuModuleInterface[]>;\n\n constructor(private router: Router) {}\n\n ngOnInit() {\n if (this.optionsSubject) {\n this.optionsSubject.pipe(map((options) => this.defineMenuOptions(options))).subscribe();\n this.router.events\n .pipe(\n switchMap(\n (event) =>\n new Promise(async (resolve) => {\n while (this.optionsSubject?.getValue()?.length === 0) {\n await delay(300);\n }\n\n resolve(event);\n }),\n ),\n )\n .pipe(\n map((event) => {\n const options = this.cloneOptions();\n this.optionsSubject?.next(\n options.map((option) => {\n option.active = false;\n return option;\n }),\n );\n\n return event;\n }),\n )\n .subscribe((event) => {\n switch (true) {\n case event instanceof Scroll:\n case event instanceof NavigationEnd:\n const options = this.cloneOptions();\n if (options?.length > 0) {\n this.optionsSubject?.next(this.defineMenuOptions(options, true));\n }\n }\n });\n }\n }\n\n public toogle(module: KoalaMenuModuleInterface) {\n if (this.optionsSubject) {\n const options = JSON.parse(JSON.stringify(this.optionsSubject.getValue())) as KoalaMenuModuleInterface[];\n this.optionsSubject.next(\n koala(options)\n .array<KoalaMenuModuleInterface>()\n .map((item) => {\n item.animateOpen = false;\n item.animateClose = false;\n if (item.name === module.name) {\n item.expanded = !module.expanded;\n item.animateOpen = item.expanded;\n item.animateClose = !item.expanded;\n } else {\n item.expanded = false;\n }\n return item;\n })\n .getValue(),\n );\n }\n }\n\n public getKoalaIcon(config: KoalaMenuModuleInterface | KoalaMenuToolInterface) {\n return config.icon as KoalaIconType;\n }\n\n private defineMenuOptions(options: KoalaMenuModuleInterface[], routerChange = false) {\n options.map((module) => {\n if (routerChange) {\n module.animateOpen = false;\n module.animateClose = false;\n module.active = module.tools\n ? this.router.url === module.routerLink ||\n !!module.tools.find((tool) => this.router.url.indexOf(tool.routerLink) >= 0)\n : this.router.url === module.routerLink;\n module.expanded = module.active;\n }\n\n return module;\n });\n return options;\n }\n\n private cloneOptions() {\n return JSON.parse(JSON.stringify(this.optionsSubject?.getValue())) as KoalaMenuModuleInterface[];\n }\n}\n","<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n","import { Injectable } from '@angular/core';\nimport { menuStateSubject, MenuStateType } from './menu.component';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaMenuService {\n\n\tpublic getMenuState(): MenuStateType | null {\n\t\treturn menuStateSubject.getValue();\n\t}\n\n\tpublic open() {\n\t\tmenuStateSubject.next('open');\n\t}\n\n\tpublic close() {\n\t\tmenuStateSubject.next('close');\n\t}\n\n\tpublic clearConfig() {\n\t\tmenuStateSubject.next(null);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { MenuComponent } from './menu.component';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { RouterModule } from '@angular/router';\nimport { KoalaIconModule } from \"@koalarx/ui/icon\";\n\n@NgModule({\n declarations: [\n MenuComponent\n ],\n imports: [\n CommonModule,\n RouterModule,\n MatIconModule,\n KoalaIconModule\n ],\n exports: [\n MenuComponent\n ]\n})\nexport class KoalaMenuModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAWa,gBAAgB,GAAG,IAAI,eAAe,CAAuB,IAAI,EAAE;MAQnE,aAAa,CAAA;AAIxB,IAAA,WAAA,CAAoB,MAAc,EAAA;AAAd,QAAA,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;KAAI;IAEtC,QAAQ,GAAA;QACN,IAAI,IAAI,CAAC,cAAc,EAAE;YACvB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,KAAK,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;YACxF,IAAI,CAAC,MAAM,CAAC,MAAM;AACf,iBAAA,IAAI,CACH,SAAS,CACP,CAAC,KAAK,KACJ,IAAI,OAAO,CAAC,CAAO,OAAO,KAAI,SAAA,CAAA,IAAA,EAAA,KAAA,CAAA,EAAA,KAAA,CAAA,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A,CAAA,CAAA;2FACjB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B,UAAU;mBAAC,EAAC,UAAU,EAAE,KAAK,EAAC,CAAA;;;MCkBlB,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,CAZxB,aAAa,CAAA,EAAA,OAAA,EAAA,CAGb,YAAY;QACZ,YAAY;QACZ,aAAa;QACb,eAAe,aAGf,aAAa,CAAA,EAAA,CAAA,CAAA;AAGJ,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YATxB,YAAY;QACZ,YAAY;QACZ,aAAa;QACb,eAAe,CAAA,EAAA,CAAA,CAAA;2FAMN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,aAAa;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,aAAa;wBACb,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;AACd,qBAAA;iBACF,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koalarx-ui-menu.mjs","sources":["../../../projects/menu/src/lib/menu.component.ts","../../../projects/menu/src/lib/menu.component.html","../../../projects/menu/src/lib/koala.menu.service.ts","../../../projects/menu/src/lib/koala.menu.module.ts","../../../projects/menu/src/koalarx-ui-menu.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { KoalaMenuModuleInterface } from './koala.menu-module.interface';\nimport { NavigationEnd, Router, Scroll } from '@angular/router';\nimport { BehaviorSubject } from 'rxjs';\nimport { koala } from '@koalarx/utils';\nimport { map, switchMap } from 'rxjs/operators';\nimport { delay } from '@koalarx/utils/operators/delay';\nimport { KoalaMenuToolInterface } from './koala.menu-tool.interface';\nimport { KoalaIconType } from '@koalarx/ui/icon';\n\nexport type MenuStateType = 'open' | 'close';\nexport const menuStateSubject = new BehaviorSubject<MenuStateType | null>(null);\n\n@Component({\n selector: 'koala-menu',\n templateUrl: 'menu.component.html',\n styleUrls: ['menu.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MenuComponent implements OnInit {\n @Input() titleMenu?: string;\n @Input() optionsSubject?: BehaviorSubject<KoalaMenuModuleInterface[]>;\n\n constructor(private router: Router) {}\n\n ngOnInit() {\n if (this.optionsSubject) {\n this.optionsSubject.pipe(map((options) => this.defineMenuOptions(options))).subscribe();\n this.router.events\n .pipe(\n switchMap(\n (event) =>\n new Promise(async (resolve) => {\n while (this.optionsSubject?.getValue()?.length === 0) {\n await delay(300);\n }\n\n resolve(event);\n }),\n ),\n )\n .pipe(\n map((event) => {\n const options = this.cloneOptions();\n this.optionsSubject?.next(\n options.map((option) => {\n option.active = false;\n return option;\n }),\n );\n\n return event;\n }),\n )\n .subscribe((event) => {\n switch (true) {\n case event instanceof Scroll:\n case event instanceof NavigationEnd:\n const options = this.cloneOptions();\n if (options?.length > 0) {\n this.optionsSubject?.next(this.defineMenuOptions(options, true));\n }\n }\n });\n }\n }\n\n public toogle(module: KoalaMenuModuleInterface) {\n if (this.optionsSubject) {\n const options = JSON.parse(JSON.stringify(this.optionsSubject.getValue())) as KoalaMenuModuleInterface[];\n this.optionsSubject.next(\n koala(options)\n .array<KoalaMenuModuleInterface>()\n .map((item) => {\n item.animateOpen = false;\n item.animateClose = false;\n if (item.name === module.name) {\n item.expanded = !module.expanded;\n item.animateOpen = item.expanded;\n item.animateClose = !item.expanded;\n } else {\n item.expanded = false;\n }\n return item;\n })\n .getValue(),\n );\n }\n }\n\n public getKoalaIcon(config: KoalaMenuModuleInterface | KoalaMenuToolInterface) {\n return config.icon as KoalaIconType;\n }\n\n private defineMenuOptions(options: KoalaMenuModuleInterface[], routerChange = false) {\n options.map((module) => {\n if (routerChange) {\n module.animateOpen = false;\n module.animateClose = false;\n module.active = module.tools\n ? this.router.url === module.routerLink ||\n !!module.tools.find((tool) => this.router.url.indexOf(tool.routerLink) >= 0)\n : this.router.url === module.routerLink;\n module.expanded = module.active;\n }\n\n return module;\n });\n return options;\n }\n\n private cloneOptions() {\n return JSON.parse(JSON.stringify(this.optionsSubject?.getValue())) as KoalaMenuModuleInterface[];\n }\n}\n","<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n","import { Injectable } from '@angular/core';\nimport { menuStateSubject, MenuStateType } from './menu.component';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaMenuService {\n\n\tpublic getMenuState(): MenuStateType | null {\n\t\treturn menuStateSubject.getValue();\n\t}\n\n\tpublic open() {\n\t\tmenuStateSubject.next('open');\n\t}\n\n\tpublic close() {\n\t\tmenuStateSubject.next('close');\n\t}\n\n\tpublic clearConfig() {\n\t\tmenuStateSubject.next(null);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { MenuComponent } from './menu.component';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { RouterModule } from '@angular/router';\nimport { KoalaIconModule } from \"@koalarx/ui/icon\";\n\n@NgModule({\n declarations: [\n MenuComponent\n ],\n imports: [\n CommonModule,\n RouterModule,\n MatIconModule,\n KoalaIconModule\n ],\n exports: [\n MenuComponent\n ]\n})\nexport class KoalaMenuModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAWa,gBAAgB,GAAG,IAAI,eAAe,CAAuB,IAAI,EAAE;MAQnE,aAAa,CAAA;AAIxB,IAAA,WAAA,CAAoB,MAAc,EAAA;AAAd,QAAA,IAAM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BACb,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;AACd,qBAAA;iBACF,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -91,11 +91,11 @@ class MenuComponent {
|
|
|
91
91
|
return JSON.parse(JSON.stringify(this.optionsSubject?.getValue()));
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
95
|
-
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
94
|
+
MenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MenuComponent, deps: [{ token: i1.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
MenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: MenuComponent, selector: "koala-menu", inputs: { titleMenu: "titleMenu", optionsSubject: "optionsSubject" }, ngImport: i0, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-moz-fit-content;height:fit-content;overflow:hidden;width:100%}ul li{cursor:pointer;display:block;font-size:14px;outline:none;padding:0;position:relative;transition:.2s;overflow:hidden;border-radius:0 20px 20px 0}ul li a{transition:.2s}.module{outline:none;padding:5px 15px;text-decoration:none}a.module{box-sizing:border-box;cursor:pointer;display:block;width:100%}ul li li{border:none!important;padding:0!important;height:0}.state-module{position:absolute;right:10px;top:4px}ul li.active ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080}ul li.expanded ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080;height:-moz-fit-content;height:fit-content;padding:15px 0}ul li.expanded ul li{height:30px}ul li li a.active{background:rgba(0,0,0,.1)!important;cursor:default;height:-moz-fit-content!important;height:fit-content!important}ul li h3,ul li h4,ul li koala-icon,ul li mat-icon{display:inline-flex;line-height:1.5em;margin:0;vertical-align:middle}ul li h3,ul li h4{font-size:.9em}ul li koala-icon,ul li li koala-icon{font-size:18px;height:18px;line-height:18px;margin-right:5px;width:18px}ul li mat-icon,ul li li mat-icon{font-size:20px;height:20px;line-height:20px;margin-right:5px;width:20px}ul li koala-icon,ul li li koala-icon{margin-right:10px}ul li li a{cursor:pointer;display:block;padding:5px 15px!important;text-decoration:none;width:100%}ul li li:hover{background:rgba(0,0,0,.1)}ul li li a.active:hover{background:transparent}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.IconComponent, selector: "koala-icon", inputs: ["color", "icon", "size"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
96
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: MenuComponent, decorators: [{
|
|
97
97
|
type: Component,
|
|
98
|
-
args: [{ selector: 'koala-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-
|
|
98
|
+
args: [{ selector: 'koala-menu', changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n", styles: [".title{font-family:OpenSans,sans-serif;font-size:.8em;font-weight:700;line-height:.8em;margin:0;padding:8px 15px}ul{font-size:0;list-style:none;margin:0;padding:0 20px 0 0;width:100%;box-sizing:border-box}ul.list-menu{height:calc(100vh - 107px);overflow:auto}ul.list-menu.without-title{height:calc(100vh - 78px)}ul ul{height:-moz-fit-content;height:fit-content;overflow:hidden;width:100%}ul li{cursor:pointer;display:block;font-size:14px;outline:none;padding:0;position:relative;transition:.2s;overflow:hidden;border-radius:0 20px 20px 0}ul li a{transition:.2s}.module{outline:none;padding:5px 15px;text-decoration:none}a.module{box-sizing:border-box;cursor:pointer;display:block;width:100%}ul li li{border:none!important;padding:0!important;height:0}.state-module{position:absolute;right:10px;top:4px}ul li.active ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080}ul li.expanded ul{border-bottom:1px solid rgba(0,0,0,.1);box-shadow:0 1px 3px #00000080;height:-moz-fit-content;height:fit-content;padding:15px 0}ul li.expanded ul li{height:30px}ul li li a.active{background:rgba(0,0,0,.1)!important;cursor:default;height:-moz-fit-content!important;height:fit-content!important}ul li h3,ul li h4,ul li koala-icon,ul li mat-icon{display:inline-flex;line-height:1.5em;margin:0;vertical-align:middle}ul li h3,ul li h4{font-size:.9em}ul li koala-icon,ul li li koala-icon{font-size:18px;height:18px;line-height:18px;margin-right:5px;width:18px}ul li mat-icon,ul li li mat-icon{font-size:20px;height:20px;line-height:20px;margin-right:5px;width:20px}ul li koala-icon,ul li li koala-icon{margin-right:10px}ul li li a{cursor:pointer;display:block;padding:5px 15px!important;text-decoration:none;width:100%}ul li li:hover{background:rgba(0,0,0,.1)}ul li li a.active:hover{background:transparent}\n"] }]
|
|
99
99
|
}], ctorParameters: function () { return [{ type: i1.Router }]; }, propDecorators: { titleMenu: [{
|
|
100
100
|
type: Input
|
|
101
101
|
}], optionsSubject: [{
|
|
@@ -116,25 +116,25 @@ class KoalaMenuService {
|
|
|
116
116
|
menuStateSubject.next(null);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
KoalaMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
120
|
-
KoalaMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
119
|
+
KoalaMenuService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
120
|
+
KoalaMenuService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuService, providedIn: "any" });
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuService, decorators: [{
|
|
122
122
|
type: Injectable,
|
|
123
123
|
args: [{ providedIn: "any" }]
|
|
124
124
|
}] });
|
|
125
125
|
|
|
126
126
|
class KoalaMenuModule {
|
|
127
127
|
}
|
|
128
|
-
KoalaMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
129
|
-
KoalaMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
128
|
+
KoalaMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
129
|
+
KoalaMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuModule, declarations: [MenuComponent], imports: [CommonModule,
|
|
130
130
|
RouterModule,
|
|
131
131
|
MatIconModule,
|
|
132
132
|
KoalaIconModule], exports: [MenuComponent] });
|
|
133
|
-
KoalaMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
133
|
+
KoalaMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuModule, imports: [CommonModule,
|
|
134
134
|
RouterModule,
|
|
135
135
|
MatIconModule,
|
|
136
136
|
KoalaIconModule] });
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaMenuModule, decorators: [{
|
|
138
138
|
type: NgModule,
|
|
139
139
|
args: [{
|
|
140
140
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koalarx-ui-menu.mjs","sources":["../../../projects/menu/src/lib/menu.component.ts","../../../projects/menu/src/lib/menu.component.html","../../../projects/menu/src/lib/koala.menu.service.ts","../../../projects/menu/src/lib/koala.menu.module.ts","../../../projects/menu/src/koalarx-ui-menu.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { KoalaMenuModuleInterface } from './koala.menu-module.interface';\nimport { NavigationEnd, Router, Scroll } from '@angular/router';\nimport { BehaviorSubject } from 'rxjs';\nimport { koala } from '@koalarx/utils';\nimport { map, switchMap } from 'rxjs/operators';\nimport { delay } from '@koalarx/utils/operators/delay';\nimport { KoalaMenuToolInterface } from './koala.menu-tool.interface';\nimport { KoalaIconType } from '@koalarx/ui/icon';\n\nexport type MenuStateType = 'open' | 'close';\nexport const menuStateSubject = new BehaviorSubject<MenuStateType | null>(null);\n\n@Component({\n selector: 'koala-menu',\n templateUrl: 'menu.component.html',\n styleUrls: ['menu.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MenuComponent implements OnInit {\n @Input() titleMenu?: string;\n @Input() optionsSubject?: BehaviorSubject<KoalaMenuModuleInterface[]>;\n\n constructor(private router: Router) {}\n\n ngOnInit() {\n if (this.optionsSubject) {\n this.optionsSubject.pipe(map((options) => this.defineMenuOptions(options))).subscribe();\n this.router.events\n .pipe(\n switchMap(\n (event) =>\n new Promise(async (resolve) => {\n while (this.optionsSubject?.getValue()?.length === 0) {\n await delay(300);\n }\n\n resolve(event);\n }),\n ),\n )\n .pipe(\n map((event) => {\n const options = this.cloneOptions();\n this.optionsSubject?.next(\n options.map((option) => {\n option.active = false;\n return option;\n }),\n );\n\n return event;\n }),\n )\n .subscribe((event) => {\n switch (true) {\n case event instanceof Scroll:\n case event instanceof NavigationEnd:\n const options = this.cloneOptions();\n if (options?.length > 0) {\n this.optionsSubject?.next(this.defineMenuOptions(options, true));\n }\n }\n });\n }\n }\n\n public toogle(module: KoalaMenuModuleInterface) {\n if (this.optionsSubject) {\n const options = JSON.parse(JSON.stringify(this.optionsSubject.getValue())) as KoalaMenuModuleInterface[];\n this.optionsSubject.next(\n koala(options)\n .array<KoalaMenuModuleInterface>()\n .map((item) => {\n item.animateOpen = false;\n item.animateClose = false;\n if (item.name === module.name) {\n item.expanded = !module.expanded;\n item.animateOpen = item.expanded;\n item.animateClose = !item.expanded;\n } else {\n item.expanded = false;\n }\n return item;\n })\n .getValue(),\n );\n }\n }\n\n public getKoalaIcon(config: KoalaMenuModuleInterface | KoalaMenuToolInterface) {\n return config.icon as KoalaIconType;\n }\n\n private defineMenuOptions(options: KoalaMenuModuleInterface[], routerChange = false) {\n options.map((module) => {\n if (routerChange) {\n module.animateOpen = false;\n module.animateClose = false;\n module.active = module.tools\n ? this.router.url === module.routerLink ||\n !!module.tools.find((tool) => this.router.url.indexOf(tool.routerLink) >= 0)\n : this.router.url === module.routerLink;\n module.expanded = module.active;\n }\n\n return module;\n });\n return options;\n }\n\n private cloneOptions() {\n return JSON.parse(JSON.stringify(this.optionsSubject?.getValue())) as KoalaMenuModuleInterface[];\n }\n}\n","<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n","import { Injectable } from '@angular/core';\nimport { menuStateSubject, MenuStateType } from './menu.component';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaMenuService {\n\n\tpublic getMenuState(): MenuStateType | null {\n\t\treturn menuStateSubject.getValue();\n\t}\n\n\tpublic open() {\n\t\tmenuStateSubject.next('open');\n\t}\n\n\tpublic close() {\n\t\tmenuStateSubject.next('close');\n\t}\n\n\tpublic clearConfig() {\n\t\tmenuStateSubject.next(null);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { MenuComponent } from './menu.component';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { RouterModule } from '@angular/router';\nimport { KoalaIconModule } from \"@koalarx/ui/icon\";\n\n@NgModule({\n declarations: [\n MenuComponent\n ],\n imports: [\n CommonModule,\n RouterModule,\n MatIconModule,\n KoalaIconModule\n ],\n exports: [\n MenuComponent\n ]\n})\nexport class KoalaMenuModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;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AAU;mBAAC,EAAC,UAAU,EAAE,KAAK,EAAC,CAAA;;;MCkBlB,eAAe,CAAA;;4GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GAAf,eAAe,EAAA,YAAA,EAAA,CAZxB,aAAa,CAAA,EAAA,OAAA,EAAA,CAGb,YAAY;QACZ,YAAY;QACZ,aAAa;AACb,QAAA,eAAe,aAGf,aAAa,CAAA,EAAA,CAAA,CAAA;AAGJ,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YATxB,YAAY;QACZ,YAAY;QACZ,aAAa;QACb,eAAe,CAAA,EAAA,CAAA,CAAA;2FAMN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,aAAa;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,aAAa;wBACb,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koalarx-ui-menu.mjs","sources":["../../../projects/menu/src/lib/menu.component.ts","../../../projects/menu/src/lib/menu.component.html","../../../projects/menu/src/lib/koala.menu.service.ts","../../../projects/menu/src/lib/koala.menu.module.ts","../../../projects/menu/src/koalarx-ui-menu.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { KoalaMenuModuleInterface } from './koala.menu-module.interface';\nimport { NavigationEnd, Router, Scroll } from '@angular/router';\nimport { BehaviorSubject } from 'rxjs';\nimport { koala } from '@koalarx/utils';\nimport { map, switchMap } from 'rxjs/operators';\nimport { delay } from '@koalarx/utils/operators/delay';\nimport { KoalaMenuToolInterface } from './koala.menu-tool.interface';\nimport { KoalaIconType } from '@koalarx/ui/icon';\n\nexport type MenuStateType = 'open' | 'close';\nexport const menuStateSubject = new BehaviorSubject<MenuStateType | null>(null);\n\n@Component({\n selector: 'koala-menu',\n templateUrl: 'menu.component.html',\n styleUrls: ['menu.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MenuComponent implements OnInit {\n @Input() titleMenu?: string;\n @Input() optionsSubject?: BehaviorSubject<KoalaMenuModuleInterface[]>;\n\n constructor(private router: Router) {}\n\n ngOnInit() {\n if (this.optionsSubject) {\n this.optionsSubject.pipe(map((options) => this.defineMenuOptions(options))).subscribe();\n this.router.events\n .pipe(\n switchMap(\n (event) =>\n new Promise(async (resolve) => {\n while (this.optionsSubject?.getValue()?.length === 0) {\n await delay(300);\n }\n\n resolve(event);\n }),\n ),\n )\n .pipe(\n map((event) => {\n const options = this.cloneOptions();\n this.optionsSubject?.next(\n options.map((option) => {\n option.active = false;\n return option;\n }),\n );\n\n return event;\n }),\n )\n .subscribe((event) => {\n switch (true) {\n case event instanceof Scroll:\n case event instanceof NavigationEnd:\n const options = this.cloneOptions();\n if (options?.length > 0) {\n this.optionsSubject?.next(this.defineMenuOptions(options, true));\n }\n }\n });\n }\n }\n\n public toogle(module: KoalaMenuModuleInterface) {\n if (this.optionsSubject) {\n const options = JSON.parse(JSON.stringify(this.optionsSubject.getValue())) as KoalaMenuModuleInterface[];\n this.optionsSubject.next(\n koala(options)\n .array<KoalaMenuModuleInterface>()\n .map((item) => {\n item.animateOpen = false;\n item.animateClose = false;\n if (item.name === module.name) {\n item.expanded = !module.expanded;\n item.animateOpen = item.expanded;\n item.animateClose = !item.expanded;\n } else {\n item.expanded = false;\n }\n return item;\n })\n .getValue(),\n );\n }\n }\n\n public getKoalaIcon(config: KoalaMenuModuleInterface | KoalaMenuToolInterface) {\n return config.icon as KoalaIconType;\n }\n\n private defineMenuOptions(options: KoalaMenuModuleInterface[], routerChange = false) {\n options.map((module) => {\n if (routerChange) {\n module.animateOpen = false;\n module.animateClose = false;\n module.active = module.tools\n ? this.router.url === module.routerLink ||\n !!module.tools.find((tool) => this.router.url.indexOf(tool.routerLink) >= 0)\n : this.router.url === module.routerLink;\n module.expanded = module.active;\n }\n\n return module;\n });\n return options;\n }\n\n private cloneOptions() {\n return JSON.parse(JSON.stringify(this.optionsSubject?.getValue())) as KoalaMenuModuleInterface[];\n }\n}\n","<nav>\n <h2 *ngIf=\"titleMenu\" class=\"title\">{{titleMenu}}</h2>\n <ul *ngIf=\"(optionsSubject | async) as options\" class=\"list-menu\" [ngClass]=\"{'without-title': !titleMenu}\">\n <li\n #moduleItem\n\t *ngFor=\"let module of options\"\n\t [ngClass]=\"{\n\t animateOpen: module.animateOpen,\n\t animateClose: module.animateClose,\n expanded: module.expanded,\n active: module.active\n }\">\n <a *ngIf=\"!!module.routerLink else moduleWithoutLink\" [routerLink]=\"module.routerLink\" (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </a>\n <ng-template #moduleWithoutLink>\n <div (click)=\"toogle(module)\" class=\"module\">\n <mat-icon *ngIf=\"module.icon && !module.koalaIcon\">{{module.icon}}</mat-icon>\n <koala-icon *ngIf=\"module.icon && module.koalaIcon\" [icon]=\"getKoalaIcon(module)\" [size]=\"18\"></koala-icon>\n <h3>{{module.name}}</h3>\n <mat-icon\n\t *ngIf=\"module.tools?.length ?? 0 > 0\"\n\t class=\"state-module\">{{module.expanded || module.active ? 'keyboard_arrow_down' : 'keyboard_arrow_right'}}</mat-icon>\n </div>\n </ng-template>\n <ul *ngIf=\"module.tools?.length ?? 0 > 0\">\n <li *ngFor=\"let tool of module.tools\">\n\t\t <a [routerLink]=\"tool.routerLink\" routerLinkActive=\"active\">\n\t <mat-icon *ngIf=\"tool.icon && !tool.koalaIcon\">{{tool.icon}}</mat-icon>\n <koala-icon *ngIf=\"tool.icon && tool.koalaIcon\" [icon]=\"getKoalaIcon(tool)\" [size]=\"18\"></koala-icon>\n\t <h4>{{tool.name}}</h4>\n\t\t </a>\n </li>\n </ul>\n </li>\n </ul>\n</nav>\n","import { Injectable } from '@angular/core';\nimport { menuStateSubject, MenuStateType } from './menu.component';\n\n@Injectable({providedIn: \"any\"})\nexport class KoalaMenuService {\n\n\tpublic getMenuState(): MenuStateType | null {\n\t\treturn menuStateSubject.getValue();\n\t}\n\n\tpublic open() {\n\t\tmenuStateSubject.next('open');\n\t}\n\n\tpublic close() {\n\t\tmenuStateSubject.next('close');\n\t}\n\n\tpublic clearConfig() {\n\t\tmenuStateSubject.next(null);\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { MenuComponent } from './menu.component';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { RouterModule } from '@angular/router';\nimport { KoalaIconModule } from \"@koalarx/ui/icon\";\n\n@NgModule({\n declarations: [\n MenuComponent\n ],\n imports: [\n CommonModule,\n RouterModule,\n MatIconModule,\n KoalaIconModule\n ],\n exports: [\n MenuComponent\n ]\n})\nexport class KoalaMenuModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAWa,gBAAgB,GAAG,IAAI,eAAe,CAAuB,IAAI,EAAE;MAQnE,aAAa,CAAA;AAIxB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;KAAI;IAEtC,QAAQ,GAAA;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e,EAAA,YAAA,EAAA,CAZxB,aAAa,CAAA,EAAA,OAAA,EAAA,CAGb,YAAY;QACZ,YAAY;QACZ,aAAa;AACb,QAAA,eAAe,aAGf,aAAa,CAAA,EAAA,CAAA,CAAA;AAGJ,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YATxB,YAAY;QACZ,YAAY;QACZ,aAAa;QACb,eAAe,CAAA,EAAA,CAAA,CAAA;2FAMN,eAAe,EAAA,UAAA,EAAA,CAAA;kBAd3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,aAAa;AACd,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY;wBACZ,aAAa;wBACb,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,aAAa;AACd,qBAAA;AACF,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koalarx/ui",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "Koala UI is a Design System developed in Angular whose objective is to facilitate and make your development faster and simpler, making this framework your greatest ally.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,9 +13,9 @@ export class DialogQuestionComponent {
|
|
|
13
13
|
this.languageHelper = KoalaLanguageHelper;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
DialogQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
17
|
-
DialogQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
18
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
16
|
+
DialogQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: DialogQuestionComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
+
DialogQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: DialogQuestionComponent, selector: "ng-component", ngImport: i0, template: "<div mat-dialog-content>\n <div class=\"question\">\n\t <koala-dynamic-component\n\t\t *ngIf=\"config.avatar else notHaveAvatar\"\n\t\t [dynamicComponent]=\"config.avatar\">\n\t </koala-dynamic-component>\n\t <ng-template #notHaveAvatar>\n <mat-icon>help</mat-icon>\n\t </ng-template>\n <p [innerHTML]=\"config.message\" class=\"alert-message text-center\"></p>\n </div>\n</div>\n<div align=\"center\" mat-dialog-actions>\n <button [mat-dialog-close]=\"{question: true}\" color=\"primary\" class=\"outline\" mat-button>{{languageHelper.getYesMessage()}}</button>\n <button [mat-dialog-close]=\"{question: false}\" color=\"warn\" class=\"outline\" mat-button>{{languageHelper.getNoMessage()}}</button>\n</div>\n", styles: [".question{color:#616161}.question .alert-message{font-family:OpenSans,sans-serif;margin:20px auto 10px!important}.question mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px;color:#1565c0}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.KoalaDynamicComponentFactory, selector: "koala-dynamic-component", inputs: ["dynamicComponent"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: DialogQuestionComponent, decorators: [{
|
|
19
19
|
type: Component,
|
|
20
20
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<div mat-dialog-content>\n <div class=\"question\">\n\t <koala-dynamic-component\n\t\t *ngIf=\"config.avatar else notHaveAvatar\"\n\t\t [dynamicComponent]=\"config.avatar\">\n\t </koala-dynamic-component>\n\t <ng-template #notHaveAvatar>\n <mat-icon>help</mat-icon>\n\t </ng-template>\n <p [innerHTML]=\"config.message\" class=\"alert-message text-center\"></p>\n </div>\n</div>\n<div align=\"center\" mat-dialog-actions>\n <button [mat-dialog-close]=\"{question: true}\" color=\"primary\" class=\"outline\" mat-button>{{languageHelper.getYesMessage()}}</button>\n <button [mat-dialog-close]=\"{question: false}\" color=\"warn\" class=\"outline\" mat-button>{{languageHelper.getNoMessage()}}</button>\n</div>\n", styles: [".question{color:#616161}.question .alert-message{font-family:OpenSans,sans-serif;margin:20px auto 10px!important}.question mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px;color:#1565c0}\n"] }]
|
|
21
21
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -8,18 +8,18 @@ import { KoalaDynamicComponentModule } from '@koalarx/ui/dynamic-component';
|
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export class KoalaQuestionModule {
|
|
10
10
|
}
|
|
11
|
-
KoalaQuestionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
12
|
-
KoalaQuestionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
11
|
+
KoalaQuestionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12
|
+
KoalaQuestionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionModule, declarations: [DialogQuestionComponent], imports: [CommonModule,
|
|
13
13
|
KoalaDynamicComponentModule,
|
|
14
14
|
MatDialogModule,
|
|
15
15
|
MatButtonModule,
|
|
16
16
|
MatIconModule], exports: [DialogQuestionComponent] });
|
|
17
|
-
KoalaQuestionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
17
|
+
KoalaQuestionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionModule, imports: [CommonModule,
|
|
18
18
|
KoalaDynamicComponentModule,
|
|
19
19
|
MatDialogModule,
|
|
20
20
|
MatButtonModule,
|
|
21
21
|
MatIconModule] });
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionModule, decorators: [{
|
|
23
23
|
type: NgModule,
|
|
24
24
|
args: [{
|
|
25
25
|
declarations: [
|
|
@@ -17,9 +17,9 @@ export class KoalaQuestionService {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
KoalaQuestionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
21
|
-
KoalaQuestionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
20
|
+
KoalaQuestionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionService, deps: [{ token: i1.KoalaDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
21
|
+
KoalaQuestionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionService, providedIn: "any" });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionService, decorators: [{
|
|
23
23
|
type: Injectable,
|
|
24
24
|
args: [{ providedIn: "any" }]
|
|
25
25
|
}], ctorParameters: function () { return [{ type: i1.KoalaDialogService }]; } });
|
|
@@ -19,9 +19,9 @@ class DialogQuestionComponent {
|
|
|
19
19
|
this.languageHelper = KoalaLanguageHelper;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
DialogQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
23
|
-
DialogQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
22
|
+
DialogQuestionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: DialogQuestionComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
DialogQuestionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: DialogQuestionComponent, selector: "ng-component", ngImport: i0, template: "<div mat-dialog-content>\n <div class=\"question\">\n\t <koala-dynamic-component\n\t\t *ngIf=\"config.avatar else notHaveAvatar\"\n\t\t [dynamicComponent]=\"config.avatar\">\n\t </koala-dynamic-component>\n\t <ng-template #notHaveAvatar>\n <mat-icon>help</mat-icon>\n\t </ng-template>\n <p [innerHTML]=\"config.message\" class=\"alert-message text-center\"></p>\n </div>\n</div>\n<div align=\"center\" mat-dialog-actions>\n <button [mat-dialog-close]=\"{question: true}\" color=\"primary\" class=\"outline\" mat-button>{{languageHelper.getYesMessage()}}</button>\n <button [mat-dialog-close]=\"{question: false}\" color=\"warn\" class=\"outline\" mat-button>{{languageHelper.getNoMessage()}}</button>\n</div>\n", styles: [".question{color:#616161}.question .alert-message{font-family:OpenSans,sans-serif;margin:20px auto 10px!important}.question mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px;color:#1565c0}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.KoalaDynamicComponentFactory, selector: "koala-dynamic-component", inputs: ["dynamicComponent"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: DialogQuestionComponent, decorators: [{
|
|
25
25
|
type: Component,
|
|
26
26
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<div mat-dialog-content>\n <div class=\"question\">\n\t <koala-dynamic-component\n\t\t *ngIf=\"config.avatar else notHaveAvatar\"\n\t\t [dynamicComponent]=\"config.avatar\">\n\t </koala-dynamic-component>\n\t <ng-template #notHaveAvatar>\n <mat-icon>help</mat-icon>\n\t </ng-template>\n <p [innerHTML]=\"config.message\" class=\"alert-message text-center\"></p>\n </div>\n</div>\n<div align=\"center\" mat-dialog-actions>\n <button [mat-dialog-close]=\"{question: true}\" color=\"primary\" class=\"outline\" mat-button>{{languageHelper.getYesMessage()}}</button>\n <button [mat-dialog-close]=\"{question: false}\" color=\"warn\" class=\"outline\" mat-button>{{languageHelper.getNoMessage()}}</button>\n</div>\n", styles: [".question{color:#616161}.question .alert-message{font-family:OpenSans,sans-serif;margin:20px auto 10px!important}.question mat-icon{position:relative;display:block;margin:15px auto;width:60px;height:60px;font-size:60px;color:#1565c0}\n"] }]
|
|
27
27
|
}], ctorParameters: function () {
|
|
@@ -46,27 +46,27 @@ class KoalaQuestionService {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
KoalaQuestionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
50
|
-
KoalaQuestionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
49
|
+
KoalaQuestionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionService, deps: [{ token: i1$1.KoalaDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
50
|
+
KoalaQuestionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionService, providedIn: "any" });
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionService, decorators: [{
|
|
52
52
|
type: Injectable,
|
|
53
53
|
args: [{ providedIn: "any" }]
|
|
54
54
|
}], ctorParameters: function () { return [{ type: i1$1.KoalaDialogService }]; } });
|
|
55
55
|
|
|
56
56
|
class KoalaQuestionModule {
|
|
57
57
|
}
|
|
58
|
-
KoalaQuestionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
59
|
-
KoalaQuestionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
58
|
+
KoalaQuestionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
59
|
+
KoalaQuestionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionModule, declarations: [DialogQuestionComponent], imports: [CommonModule,
|
|
60
60
|
KoalaDynamicComponentModule,
|
|
61
61
|
MatDialogModule,
|
|
62
62
|
MatButtonModule,
|
|
63
63
|
MatIconModule], exports: [DialogQuestionComponent] });
|
|
64
|
-
KoalaQuestionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
64
|
+
KoalaQuestionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionModule, imports: [CommonModule,
|
|
65
65
|
KoalaDynamicComponentModule,
|
|
66
66
|
MatDialogModule,
|
|
67
67
|
MatButtonModule,
|
|
68
68
|
MatIconModule] });
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: KoalaQuestionModule, decorators: [{
|
|
70
70
|
type: NgModule,
|
|
71
71
|
args: [{
|
|
72
72
|
declarations: [
|