@kato-lee/components 1.0.3

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.
Files changed (207) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +7 -0
  3. package/assets/_fade-in.scss +40 -0
  4. package/assets/_fields.scss +76 -0
  5. package/assets/_grids.scss +317 -0
  6. package/assets/components/_buttons.scss +3 -0
  7. package/assets/components/_cards.scss +26 -0
  8. package/assets/components/_dialogs.scss +13 -0
  9. package/assets/components/_fields.scss +110 -0
  10. package/assets/components/_material.scss +15 -0
  11. package/assets/components/_pretty-box.scss +41 -0
  12. package/assets/components/_scroll-bar.scss +23 -0
  13. package/assets/components/_snack-bar.scss +18 -0
  14. package/assets/components/_tables.scss +235 -0
  15. package/assets/components/_tabs.scss +7 -0
  16. package/assets/components/main.scss +25 -0
  17. package/assets/fonts/body/Transpass-Bold.ttf +0 -0
  18. package/assets/fonts/body/Transpass-Light.ttf +0 -0
  19. package/assets/fonts/body/Transpass-Medium.ttf +0 -0
  20. package/assets/fonts/body/Transpass-Regular.ttf +0 -0
  21. package/assets/fonts/body/style-font.scss +40 -0
  22. package/assets/fonts/main.scss +2 -0
  23. package/assets/fonts/title/Poppins-Bold.ttf +0 -0
  24. package/assets/fonts/title/Poppins-Light.ttf +0 -0
  25. package/assets/fonts/title/Poppins-Medium.ttf +0 -0
  26. package/assets/fonts/title/Poppins-Regular.ttf +0 -0
  27. package/assets/fonts/title/Poppins-SemiBold.ttf +0 -0
  28. package/assets/fonts/title/style-font.scss +39 -0
  29. package/assets/layouts/_loader.scss +71 -0
  30. package/assets/layouts/origin.scss +775 -0
  31. package/assets/main.scss +4 -0
  32. package/assets/material/icons/icons.woff2 +0 -0
  33. package/assets/material/icons/local.css +1 -0
  34. package/assets/material/icons/remote.css +1 -0
  35. package/assets/material/themes/dark.scss +55 -0
  36. package/assets/material/themes/default.scss +106 -0
  37. package/assets/material/themes/main.scss +2907 -0
  38. package/assets/themes/_dark.scss +15 -0
  39. package/assets/themes/_default.scss +30 -0
  40. package/assets/themes/main.scss +2 -0
  41. package/assets/variables.scss +7 -0
  42. package/box-form/box-form.component.d.ts +34 -0
  43. package/box-form/box-form.module.d.ts +13 -0
  44. package/box-form/common.d.ts +5 -0
  45. package/box-form/index.d.ts +3 -0
  46. package/box-form/package.json +3 -0
  47. package/capsule/capsule.component.d.ts +14 -0
  48. package/capsule/capsule.module.d.ts +7 -0
  49. package/capsule/index.d.ts +2 -0
  50. package/capsule/package.json +3 -0
  51. package/cards/cards.module.d.ts +7 -0
  52. package/cards/index.d.ts +2 -0
  53. package/cards/package.json +3 -0
  54. package/cards/simple-card.component.d.ts +8 -0
  55. package/dialogs/dialogs.module.d.ts +11 -0
  56. package/dialogs/dismiss-dialog-button.component.d.ts +8 -0
  57. package/dialogs/index.d.ts +2 -0
  58. package/dialogs/package.json +3 -0
  59. package/esm2022/box-form/box-form.component.mjs +99 -0
  60. package/esm2022/box-form/box-form.module.mjs +40 -0
  61. package/esm2022/box-form/common.mjs +2 -0
  62. package/esm2022/box-form/index.mjs +7 -0
  63. package/esm2022/box-form/kato-lee-components-box-form.mjs +5 -0
  64. package/esm2022/capsule/capsule.component.mjs +78 -0
  65. package/esm2022/capsule/capsule.module.mjs +16 -0
  66. package/esm2022/capsule/index.mjs +6 -0
  67. package/esm2022/capsule/kato-lee-components-capsule.mjs +5 -0
  68. package/esm2022/cards/cards.module.mjs +17 -0
  69. package/esm2022/cards/index.mjs +6 -0
  70. package/esm2022/cards/kato-lee-components-cards.mjs +5 -0
  71. package/esm2022/cards/simple-card.component.mjs +47 -0
  72. package/esm2022/dialogs/dialogs.module.mjs +22 -0
  73. package/esm2022/dialogs/dismiss-dialog-button.component.mjs +44 -0
  74. package/esm2022/dialogs/index.mjs +6 -0
  75. package/esm2022/dialogs/kato-lee-components-dialogs.mjs +5 -0
  76. package/esm2022/fields/autocomplete-field/autocomplete-field.component.mjs +240 -0
  77. package/esm2022/fields/date-field/date-field.component.mjs +148 -0
  78. package/esm2022/fields/date-range-field/date-range-field.component.mjs +70 -0
  79. package/esm2022/fields/error/error-equals.pipe.mjs +19 -0
  80. package/esm2022/fields/error/error.component.mjs +55 -0
  81. package/esm2022/fields/error/error.module.mjs +21 -0
  82. package/esm2022/fields/error/error.msg.pipe.mjs +19 -0
  83. package/esm2022/fields/error/lang/_en.mjs +12 -0
  84. package/esm2022/fields/error/lang/_es.mjs +12 -0
  85. package/esm2022/fields/error/lang/index.mjs +3 -0
  86. package/esm2022/fields/fields.common.mjs +8 -0
  87. package/esm2022/fields/fields.module.mjs +118 -0
  88. package/esm2022/fields/general-field/general-field.component.mjs +188 -0
  89. package/esm2022/fields/index.mjs +17 -0
  90. package/esm2022/fields/kato-lee-components-fields.mjs +5 -0
  91. package/esm2022/fields/money-field/money-field.component.mjs +188 -0
  92. package/esm2022/fields/number-field/number-field.component.mjs +165 -0
  93. package/esm2022/fields/select-field/select-field.component.mjs +135 -0
  94. package/esm2022/fields/text-area/textarea.component.mjs +171 -0
  95. package/esm2022/index.mjs +2 -0
  96. package/esm2022/kato-lee-components.mjs +5 -0
  97. package/esm2022/layouts/origin/breadcrumb/breadcrumb.component.mjs +65 -0
  98. package/esm2022/layouts/origin/footer/footer.component.mjs +11 -0
  99. package/esm2022/layouts/origin/header/header.component.mjs +46 -0
  100. package/esm2022/layouts/origin/index.mjs +12 -0
  101. package/esm2022/layouts/origin/kato-lee-components-layouts-origin.mjs +5 -0
  102. package/esm2022/layouts/origin/layout.component.mjs +210 -0
  103. package/esm2022/layouts/origin/layout.module.mjs +52 -0
  104. package/esm2022/layouts/origin/layout.navigation.mjs +19 -0
  105. package/esm2022/layouts/origin/navigation-interfaces.mjs +2 -0
  106. package/esm2022/layouts/origin/services/index.mjs +4 -0
  107. package/esm2022/layouts/origin/services/route-parts.service.mjs +28 -0
  108. package/esm2022/layouts/origin/services/toggle-sidebar.mjs +48 -0
  109. package/esm2022/layouts/origin/services/validate-access.pipe.mjs +53 -0
  110. package/esm2022/layouts/origin/sidebar/sidebar.component.mjs +69 -0
  111. package/esm2022/layouts/origin/sidebar/sidenav/expansion/accordion.component.mjs +74 -0
  112. package/esm2022/layouts/origin/sidebar/sidenav/expansion/expansion-panel-header.component.mjs +51 -0
  113. package/esm2022/layouts/origin/sidebar/sidenav/expansion/expansion-panel.component.mjs +63 -0
  114. package/esm2022/layouts/origin/sidebar/sidenav/sidenav.component.mjs +130 -0
  115. package/esm2022/modal/config.mjs +2 -0
  116. package/esm2022/modal/index.mjs +8 -0
  117. package/esm2022/modal/kato-lee-components-modal.mjs +5 -0
  118. package/esm2022/modal/modal.component.mjs +63 -0
  119. package/esm2022/modal/modal.module.mjs +21 -0
  120. package/esm2022/modal/modal.service.mjs +33 -0
  121. package/esm2022/pretty-box/index.mjs +5 -0
  122. package/esm2022/pretty-box/kato-lee-components-pretty-box.mjs +5 -0
  123. package/esm2022/pretty-box/pretty-box.component.mjs +94 -0
  124. package/esm2022/tables/index.mjs +6 -0
  125. package/esm2022/tables/kato-lee-components-tables.mjs +5 -0
  126. package/esm2022/tables/mat-paginator.translation.mjs +22 -0
  127. package/esm2022/tables/tables.module.mjs +19 -0
  128. package/esm2022/toast/index.mjs +5 -0
  129. package/esm2022/toast/kato-lee-components-toast.mjs +5 -0
  130. package/esm2022/toast/toast.service.mjs +42 -0
  131. package/fesm2022/kato-lee-components-box-form.mjs +146 -0
  132. package/fesm2022/kato-lee-components-box-form.mjs.map +1 -0
  133. package/fesm2022/kato-lee-components-capsule.mjs +102 -0
  134. package/fesm2022/kato-lee-components-capsule.mjs.map +1 -0
  135. package/fesm2022/kato-lee-components-cards.mjs +72 -0
  136. package/fesm2022/kato-lee-components-cards.mjs.map +1 -0
  137. package/fesm2022/kato-lee-components-dialogs.mjs +74 -0
  138. package/fesm2022/kato-lee-components-dialogs.mjs.map +1 -0
  139. package/fesm2022/kato-lee-components-fields.mjs +1486 -0
  140. package/fesm2022/kato-lee-components-fields.mjs.map +1 -0
  141. package/fesm2022/kato-lee-components-layouts-origin.mjs +872 -0
  142. package/fesm2022/kato-lee-components-layouts-origin.mjs.map +1 -0
  143. package/fesm2022/kato-lee-components-modal.mjs +121 -0
  144. package/fesm2022/kato-lee-components-modal.mjs.map +1 -0
  145. package/fesm2022/kato-lee-components-pretty-box.mjs +105 -0
  146. package/fesm2022/kato-lee-components-pretty-box.mjs.map +1 -0
  147. package/fesm2022/kato-lee-components-tables.mjs +51 -0
  148. package/fesm2022/kato-lee-components-tables.mjs.map +1 -0
  149. package/fesm2022/kato-lee-components-toast.mjs +53 -0
  150. package/fesm2022/kato-lee-components-toast.mjs.map +1 -0
  151. package/fesm2022/kato-lee-components.mjs +4 -0
  152. package/fesm2022/kato-lee-components.mjs.map +1 -0
  153. package/fields/autocomplete-field/autocomplete-field.component.d.ts +65 -0
  154. package/fields/date-field/date-field.component.d.ts +46 -0
  155. package/fields/date-range-field/date-range-field.component.d.ts +23 -0
  156. package/fields/error/error-equals.pipe.d.ts +7 -0
  157. package/fields/error/error.component.d.ts +22 -0
  158. package/fields/error/error.module.d.ts +11 -0
  159. package/fields/error/error.msg.pipe.d.ts +7 -0
  160. package/fields/error/lang/_en.d.ts +1 -0
  161. package/fields/error/lang/_es.d.ts +1 -0
  162. package/fields/error/lang/index.d.ts +2 -0
  163. package/fields/fields.common.d.ts +5 -0
  164. package/fields/fields.module.d.ts +28 -0
  165. package/fields/general-field/general-field.component.d.ts +56 -0
  166. package/fields/index.d.ts +13 -0
  167. package/fields/money-field/money-field.component.d.ts +53 -0
  168. package/fields/number-field/number-field.component.d.ts +52 -0
  169. package/fields/package.json +3 -0
  170. package/fields/select-field/select-field.component.d.ts +44 -0
  171. package/fields/text-area/textarea.component.d.ts +55 -0
  172. package/index.d.ts +1 -0
  173. package/layouts/origin/breadcrumb/breadcrumb.component.d.ts +24 -0
  174. package/layouts/origin/footer/footer.component.d.ts +5 -0
  175. package/layouts/origin/header/header.component.d.ts +15 -0
  176. package/layouts/origin/index.d.ts +8 -0
  177. package/layouts/origin/layout.component.d.ts +58 -0
  178. package/layouts/origin/layout.module.d.ts +18 -0
  179. package/layouts/origin/layout.navigation.d.ts +10 -0
  180. package/layouts/origin/navigation-interfaces.d.ts +24 -0
  181. package/layouts/origin/package.json +3 -0
  182. package/layouts/origin/services/index.d.ts +3 -0
  183. package/layouts/origin/services/route-parts.service.d.ts +15 -0
  184. package/layouts/origin/services/toggle-sidebar.d.ts +10 -0
  185. package/layouts/origin/services/validate-access.pipe.d.ts +7 -0
  186. package/layouts/origin/sidebar/sidebar.component.d.ts +27 -0
  187. package/layouts/origin/sidebar/sidenav/expansion/accordion.component.d.ts +10 -0
  188. package/layouts/origin/sidebar/sidenav/expansion/expansion-panel-header.component.d.ts +11 -0
  189. package/layouts/origin/sidebar/sidenav/expansion/expansion-panel.component.d.ts +12 -0
  190. package/layouts/origin/sidebar/sidenav/sidenav.component.d.ts +23 -0
  191. package/modal/config.d.ts +9 -0
  192. package/modal/index.d.ts +4 -0
  193. package/modal/modal.component.d.ts +35 -0
  194. package/modal/modal.module.d.ts +11 -0
  195. package/modal/modal.service.d.ts +13 -0
  196. package/modal/package.json +3 -0
  197. package/package.json +82 -0
  198. package/pretty-box/index.d.ts +1 -0
  199. package/pretty-box/package.json +3 -0
  200. package/pretty-box/pretty-box.component.d.ts +24 -0
  201. package/tables/index.d.ts +2 -0
  202. package/tables/mat-paginator.translation.d.ts +2 -0
  203. package/tables/package.json +3 -0
  204. package/tables/tables.module.d.ts +9 -0
  205. package/toast/index.d.ts +1 -0
  206. package/toast/package.json +3 -0
  207. package/toast/toast.service.d.ts +21 -0
@@ -0,0 +1,872 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Injectable, EventEmitter, Output, Input, HostListener, Pipe, ViewChild, NgModule } from '@angular/core';
3
+ import * as i2 from '@angular/router';
4
+ import { NavigationEnd, RouteConfigLoadStart, ResolveStart, RouteConfigLoadEnd, ResolveEnd, RouterModule } from '@angular/router';
5
+ import { filter, debounceTime, BehaviorSubject } from 'rxjs';
6
+ import { FormControl, ReactiveFormsModule } from '@angular/forms';
7
+ import * as i3 from '@angular/platform-browser';
8
+
9
+ class TakFooterComponent {
10
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TakFooterComponent, selector: "tak-footer", ngImport: i0, template: "<footer class=\"tak__footer\">\r\n <ng-content select=\"[tak-custom-footer]\"></ng-content>\r\n</footer>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12
+ }
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakFooterComponent, decorators: [{
14
+ type: Component,
15
+ args: [{ selector: 'tak-footer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<footer class=\"tak__footer\">\r\n <ng-content select=\"[tak-custom-footer]\"></ng-content>\r\n</footer>\r\n" }]
16
+ }] });
17
+
18
+ const LAYOUT_CONTAINER = 'tak__layout__container';
19
+ class ToggleSidebar {
20
+ openSidebar() {
21
+ try {
22
+ document.getElementsByClassName(LAYOUT_CONTAINER)[0].classList.remove('compact');
23
+ document.getElementsByClassName(LAYOUT_CONTAINER)[0].classList.add('full');
24
+ }
25
+ catch (error) { }
26
+ }
27
+ closeSidebar() {
28
+ try {
29
+ document.getElementsByClassName(LAYOUT_CONTAINER)[0].classList.add('compact');
30
+ document.getElementsByClassName(LAYOUT_CONTAINER)[0].classList.remove('full');
31
+ }
32
+ catch (error) { }
33
+ }
34
+ toggleMobile(isMobile) {
35
+ try {
36
+ if (!isMobile)
37
+ document.getElementsByClassName(LAYOUT_CONTAINER)[0].classList.remove('mobile');
38
+ else
39
+ document.getElementsByClassName(LAYOUT_CONTAINER)[0].classList.add('mobile');
40
+ }
41
+ catch (error) { }
42
+ }
43
+ expansionButton(expand) {
44
+ try {
45
+ if (!expand) {
46
+ document.getElementsByClassName(LAYOUT_CONTAINER)[0].classList.add('expand');
47
+ document.getElementsByClassName('tak__container')[0].classList.add('sidebar-fixed');
48
+ }
49
+ else {
50
+ document.getElementsByClassName(LAYOUT_CONTAINER)[0].classList.remove('expand');
51
+ document.getElementsByClassName('tak__container')[0].classList.remove('sidebar-fixed');
52
+ }
53
+ }
54
+ catch (error) { }
55
+ }
56
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ToggleSidebar, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
57
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ToggleSidebar, providedIn: 'root' }); }
58
+ }
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ToggleSidebar, decorators: [{
60
+ type: Injectable,
61
+ args: [{ providedIn: 'root' }]
62
+ }] });
63
+
64
+ class TakHeaderComponent {
65
+ constructor(_cd) {
66
+ this._cd = _cd;
67
+ this.toggleSidebar = new EventEmitter();
68
+ this.mdWidth = 640;
69
+ this.isActionButton = false;
70
+ this.isScreenMd = false;
71
+ }
72
+ onResize() {
73
+ this.isScreenMd = window.matchMedia(`(max-width:${this.mdWidth}px)`).matches;
74
+ this._cd.markForCheck();
75
+ }
76
+ onToggleSidebar() {
77
+ const isOpen = document
78
+ .getElementsByClassName(LAYOUT_CONTAINER)[0]
79
+ .classList.contains('compact');
80
+ if (isOpen) {
81
+ this.toggleSidebar.emit(false);
82
+ }
83
+ else {
84
+ this.toggleSidebar.emit(true);
85
+ }
86
+ }
87
+ ngAfterViewInit() {
88
+ this.onResize();
89
+ }
90
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakHeaderComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
91
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: TakHeaderComponent, selector: "tak-header", inputs: { mdWidth: "mdWidth", isActionButton: "isActionButton" }, outputs: { toggleSidebar: "toggleSidebar" }, host: { listeners: { "window:resize": "onResize($event)" } }, ngImport: i0, template: "<header class=\"tak__header\">\r\n @if (!isActionButton || isScreenMd) {\r\n <div class=\"tak__header__toggle-sbar-btn__container\">\r\n <button mat-icon-button (click)=\"onToggleSidebar()\">\r\n <span class=\"material-icons\">menu</span>\r\n </button>\r\n </div>\r\n }\r\n <div class=\"tak__header__custom__container\">\r\n <ng-content select=\"[tak-custom-header]\"></ng-content>\r\n </div>\r\n</header>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
92
+ }
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakHeaderComponent, decorators: [{
94
+ type: Component,
95
+ args: [{ selector: 'tak-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"tak__header\">\r\n @if (!isActionButton || isScreenMd) {\r\n <div class=\"tak__header__toggle-sbar-btn__container\">\r\n <button mat-icon-button (click)=\"onToggleSidebar()\">\r\n <span class=\"material-icons\">menu</span>\r\n </button>\r\n </div>\r\n }\r\n <div class=\"tak__header__custom__container\">\r\n <ng-content select=\"[tak-custom-header]\"></ng-content>\r\n </div>\r\n</header>\r\n" }]
96
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { toggleSidebar: [{
97
+ type: Output
98
+ }], mdWidth: [{
99
+ type: Input
100
+ }], isActionButton: [{
101
+ type: Input
102
+ }], onResize: [{
103
+ type: HostListener,
104
+ args: ['window:resize', ['$event']]
105
+ }] } });
106
+
107
+ class RoutePartsService {
108
+ generateRouteParts(snapshot) {
109
+ var routeParts = [];
110
+ if (snapshot) {
111
+ if (snapshot.firstChild) {
112
+ routeParts = routeParts.concat(this.generateRouteParts(snapshot.firstChild));
113
+ }
114
+ if (snapshot.data['title'] && snapshot.url.length) {
115
+ routeParts.push({
116
+ title: snapshot.data['title'],
117
+ breadcrumb: snapshot.data['breadcrumb'],
118
+ url: snapshot.url[0].path,
119
+ urlSegments: snapshot.url,
120
+ params: snapshot.params,
121
+ });
122
+ }
123
+ }
124
+ return routeParts;
125
+ }
126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RoutePartsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
127
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RoutePartsService }); }
128
+ }
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RoutePartsService, decorators: [{
130
+ type: Injectable
131
+ }] });
132
+
133
+ class ValidateAccessPipe {
134
+ transform(_valuesToCompare, _user) {
135
+ const valuesToCompare = {
136
+ authorities: _valuesToCompare[0],
137
+ blockOnCtxs: _valuesToCompare[1],
138
+ };
139
+ const user = {
140
+ context: _user[0],
141
+ authorities: _user[1],
142
+ };
143
+ let contextIsValid = true;
144
+ let permissionsIsValid = true;
145
+ let authorities;
146
+ let blockOnCtxs;
147
+ let userAuthorities;
148
+ let userContext = user.context;
149
+ if (valuesToCompare.authorities) {
150
+ authorities = Array.isArray(valuesToCompare.authorities)
151
+ ? valuesToCompare.authorities
152
+ : [valuesToCompare.authorities];
153
+ }
154
+ if (valuesToCompare.blockOnCtxs) {
155
+ blockOnCtxs = Array.isArray(valuesToCompare.blockOnCtxs)
156
+ ? valuesToCompare.blockOnCtxs
157
+ : [valuesToCompare.blockOnCtxs];
158
+ }
159
+ if (user.authorities) {
160
+ userAuthorities = Array.isArray(user.authorities) ? user.authorities : [user.authorities];
161
+ }
162
+ if (blockOnCtxs)
163
+ if (userContext)
164
+ contextIsValid = !(blockOnCtxs.indexOf(userContext) >= 0);
165
+ if (authorities) {
166
+ if (userAuthorities) {
167
+ permissionsIsValid = false;
168
+ userAuthorities.forEach(userAuthority => {
169
+ if (authorities.indexOf(userAuthority) >= 0)
170
+ permissionsIsValid = true;
171
+ });
172
+ }
173
+ }
174
+ return !(contextIsValid && permissionsIsValid);
175
+ }
176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ValidateAccessPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
177
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: ValidateAccessPipe, name: "validateAccess" }); }
178
+ }
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: ValidateAccessPipe, decorators: [{
180
+ type: Pipe,
181
+ args: [{ name: 'validateAccess' }]
182
+ }] });
183
+
184
+ class TakBreadcrumbComponent {
185
+ constructor(router, routePartsService, _cd, activeRoute) {
186
+ this.router = router;
187
+ this.routePartsService = routePartsService;
188
+ this._cd = _cd;
189
+ this.activeRoute = activeRoute;
190
+ this._base = '';
191
+ this._title = '';
192
+ this._singleRoute = false;
193
+ }
194
+ ngOnInit() {
195
+ this._generateTitle();
196
+ this._routerEventSub = this.router.events
197
+ .pipe(filter(event => event instanceof NavigationEnd))
198
+ .subscribe(() => {
199
+ this._generateTitle();
200
+ });
201
+ }
202
+ _generateTitle() {
203
+ this._routeParts = this.routePartsService.generateRouteParts(this.activeRoute.snapshot);
204
+ this._routeParts.reverse().map((item, i) => {
205
+ if (this._routeParts.reverse().length === 1) {
206
+ this._base = item.title;
207
+ this._title = item.title;
208
+ this._singleRoute = true;
209
+ }
210
+ else {
211
+ this._singleRoute = false;
212
+ if (!i)
213
+ this._base = item.title;
214
+ if (i === 1)
215
+ this._title = item.title;
216
+ if (i === 2)
217
+ this._title += ` / ${item.title}`;
218
+ }
219
+ });
220
+ this._cd.markForCheck();
221
+ }
222
+ ngOnDestroy() {
223
+ if (this._routerEventSub)
224
+ this._routerEventSub.unsubscribe();
225
+ }
226
+ get base() {
227
+ return this._base;
228
+ }
229
+ get title() {
230
+ return this._title;
231
+ }
232
+ get singleRoute() {
233
+ return this._singleRoute;
234
+ }
235
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakBreadcrumbComponent, deps: [{ token: i2.Router }, { token: RoutePartsService }, { token: i0.ChangeDetectorRef }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
236
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: TakBreadcrumbComponent, selector: "tak-breadcrumb", ngImport: i0, template: "<div class=\"tak-breadcrumb-pagetitle\">\r\n <h1>{{ title }}</h1>\r\n <nav>\r\n <ol class=\"tak-breadcrumb\">\r\n <li class=\"tak-breadcrumb-item\">\r\n <span>{{ base }}</span>\r\n </li>\r\n @if (!singleRoute) {\r\n <li class=\"tak-breadcrumb-item active\">{{ title }}</li>\r\n }\r\n </ol>\r\n </nav>\r\n</div>\r\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
237
+ }
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakBreadcrumbComponent, decorators: [{
239
+ type: Component,
240
+ args: [{ selector: 'tak-breadcrumb', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"tak-breadcrumb-pagetitle\">\r\n <h1>{{ title }}</h1>\r\n <nav>\r\n <ol class=\"tak-breadcrumb\">\r\n <li class=\"tak-breadcrumb-item\">\r\n <span>{{ base }}</span>\r\n </li>\r\n @if (!singleRoute) {\r\n <li class=\"tak-breadcrumb-item active\">{{ title }}</li>\r\n }\r\n </ol>\r\n </nav>\r\n</div>\r\n" }]
241
+ }], ctorParameters: () => [{ type: i2.Router }, { type: RoutePartsService }, { type: i0.ChangeDetectorRef }, { type: i2.ActivatedRoute }] });
242
+
243
+ class TakExpansionPanelHeaderComponent {
244
+ constructor() {
245
+ this.style = '';
246
+ this.class = '';
247
+ }
248
+ ngAfterViewInit() { }
249
+ toggle() {
250
+ const expansionPanelHeader = this.expansionPanelHeader?.nativeElement;
251
+ if (!expansionPanelHeader.classList.contains('tak-layout-accordion')) {
252
+ expansionPanelHeader.classList.toggle('active');
253
+ }
254
+ }
255
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakExpansionPanelHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
256
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TakExpansionPanelHeaderComponent, selector: "tak-layout-expansion-panel-header", inputs: { style: "style", class: "class" }, viewQueries: [{ propertyName: "expansionPanelHeader", first: true, predicate: ["expansionPanelHeader"], descendants: true }], ngImport: i0, template: `
257
+ <button
258
+ class="tak-layout-expansion-panel-header {{ class }}"
259
+ style="{{ style }}"
260
+ #expansionPanelHeader
261
+ (click)="toggle()"
262
+ >
263
+ <ng-content></ng-content>
264
+ </button>
265
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
266
+ }
267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakExpansionPanelHeaderComponent, decorators: [{
268
+ type: Component,
269
+ args: [{
270
+ selector: 'tak-layout-expansion-panel-header',
271
+ template: `
272
+ <button
273
+ class="tak-layout-expansion-panel-header {{ class }}"
274
+ style="{{ style }}"
275
+ #expansionPanelHeader
276
+ (click)="toggle()"
277
+ >
278
+ <ng-content></ng-content>
279
+ </button>
280
+ `,
281
+ changeDetection: ChangeDetectionStrategy.OnPush,
282
+ }]
283
+ }], propDecorators: { expansionPanelHeader: [{
284
+ type: ViewChild,
285
+ args: ['expansionPanelHeader']
286
+ }], style: [{
287
+ type: Input
288
+ }], class: [{
289
+ type: Input
290
+ }] } });
291
+
292
+ class TakExpansionPanelComponent {
293
+ constructor(_cd) {
294
+ this._cd = _cd;
295
+ this.style = '';
296
+ this.class = '';
297
+ }
298
+ ngAfterViewInit() {
299
+ const expansionPanelHeader = this.expansionPanelHeader?.nativeElement;
300
+ setTimeout(() => {
301
+ if (!expansionPanelHeader.classList.contains('tak-layout-accordion')) {
302
+ expansionPanelHeader.addEventListener('click', () => {
303
+ expansionPanelHeader.classList.toggle('active');
304
+ const accordionItemBody = expansionPanelHeader.nextElementSibling;
305
+ if (expansionPanelHeader.classList.contains('active')) {
306
+ accordionItemBody.style.maxHeight = accordionItemBody.scrollHeight + 'px';
307
+ }
308
+ else {
309
+ accordionItemBody.style.maxHeight = 0;
310
+ }
311
+ });
312
+ }
313
+ this._cd.markForCheck();
314
+ }, 100);
315
+ }
316
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakExpansionPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
317
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TakExpansionPanelComponent, selector: "tak-layout-expansion-panel", inputs: { style: "style", class: "class" }, viewQueries: [{ propertyName: "expansionPanelHeader", first: true, predicate: ["expansionPanelHeader"], descendants: true }], ngImport: i0, template: `
318
+ <div class="tak-layout-expansion-panel-container">
319
+ <div class="tak-layout-expansion-panel {{ class }}" style="{{ style }}" #expansionPanelHeader>
320
+ <ng-content select="tak-layout-expansion-panel-header"></ng-content>
321
+ </div>
322
+ <div class="tak-layout-expansion-panel-body">
323
+ <ng-content></ng-content>
324
+ </div>
325
+ </div>
326
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
327
+ }
328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakExpansionPanelComponent, decorators: [{
329
+ type: Component,
330
+ args: [{
331
+ selector: 'tak-layout-expansion-panel',
332
+ template: `
333
+ <div class="tak-layout-expansion-panel-container">
334
+ <div class="tak-layout-expansion-panel {{ class }}" style="{{ style }}" #expansionPanelHeader>
335
+ <ng-content select="tak-layout-expansion-panel-header"></ng-content>
336
+ </div>
337
+ <div class="tak-layout-expansion-panel-body">
338
+ <ng-content></ng-content>
339
+ </div>
340
+ </div>
341
+ `,
342
+ changeDetection: ChangeDetectionStrategy.OnPush,
343
+ }]
344
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { expansionPanelHeader: [{
345
+ type: ViewChild,
346
+ args: ['expansionPanelHeader']
347
+ }], style: [{
348
+ type: Input
349
+ }], class: [{
350
+ type: Input
351
+ }] } });
352
+
353
+ class TakAccordionComponent {
354
+ ngAfterViewInit() {
355
+ const expansionPanels = this.accordion.nativeElement.querySelectorAll('.tak-layout-expansion-panel');
356
+ expansionPanels.forEach((expansionPanel) => {
357
+ expansionPanel.classList.add(`tak-layout-accordion`);
358
+ });
359
+ const expansionPanelHeaders = this.accordion.nativeElement.querySelectorAll('.tak-layout-expansion-panel-header');
360
+ expansionPanelHeaders.forEach((expansionPanelHeader) => {
361
+ expansionPanelHeader.classList.add(`tak-layout-accordion`);
362
+ });
363
+ this._subscribeToExpansionPanels(expansionPanels);
364
+ }
365
+ _subscribeToExpansionPanels(expansionPanels) {
366
+ expansionPanels.forEach((expansionPanel) => {
367
+ expansionPanel.addEventListener('click', () => {
368
+ this._activeAccordionMode(expansionPanel);
369
+ expansionPanel.classList.toggle('active');
370
+ try {
371
+ const currentlyActiveExpansionPanel = this.accordion.nativeElement.querySelector('.tak-layout-expansion-panel.active');
372
+ currentlyActiveExpansionPanel
373
+ .querySelector('.tak-layout-expansion-panel-header')
374
+ .classList.toggle('active');
375
+ }
376
+ catch (error) {
377
+ const expansionPanelHeaders = this.accordion.nativeElement.querySelectorAll('.tak-layout-expansion-panel-header');
378
+ expansionPanelHeaders.forEach((expansionPanelHeader) => {
379
+ expansionPanelHeader.classList.remove('active');
380
+ });
381
+ }
382
+ const expansionPanelBody = expansionPanel.nextElementSibling;
383
+ if (expansionPanel.classList.contains('active')) {
384
+ expansionPanelBody.style.maxHeight = expansionPanelBody.scrollHeight + 'px';
385
+ }
386
+ else {
387
+ expansionPanelBody.style.maxHeight = 0;
388
+ }
389
+ });
390
+ });
391
+ }
392
+ _activeAccordionMode(expansionPanel) {
393
+ const currentlyActiveExpansionPanel = this.accordion.nativeElement.querySelector('.tak-layout-expansion-panel.active');
394
+ if (currentlyActiveExpansionPanel && currentlyActiveExpansionPanel !== expansionPanel) {
395
+ currentlyActiveExpansionPanel
396
+ .querySelector('.tak-layout-expansion-panel-header')
397
+ .classList.toggle('active');
398
+ currentlyActiveExpansionPanel.classList.toggle('active');
399
+ currentlyActiveExpansionPanel.nextElementSibling.style.maxHeight = 0;
400
+ }
401
+ }
402
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
403
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TakAccordionComponent, selector: "tak-layout-accordion", viewQueries: [{ propertyName: "accordion", first: true, predicate: ["accordion"], descendants: true }], ngImport: i0, template: `
404
+ <div #accordion>
405
+ <ng-content></ng-content>
406
+ </div>
407
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
408
+ }
409
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakAccordionComponent, decorators: [{
410
+ type: Component,
411
+ args: [{
412
+ selector: 'tak-layout-accordion',
413
+ template: `
414
+ <div #accordion>
415
+ <ng-content></ng-content>
416
+ </div>
417
+ `,
418
+ changeDetection: ChangeDetectionStrategy.OnPush,
419
+ }]
420
+ }], propDecorators: { accordion: [{
421
+ type: ViewChild,
422
+ args: ['accordion']
423
+ }] } });
424
+
425
+ class TakSidenavComponent {
426
+ constructor(_toggleSidebar, _cd) {
427
+ this._toggleSidebar = _toggleSidebar;
428
+ this._cd = _cd;
429
+ this.navigation = [];
430
+ this.authorities = [];
431
+ this.mdWidth = 640;
432
+ this.accordionInCollections = true;
433
+ this.disableHiddenCollections = false;
434
+ this._isMobile = false;
435
+ }
436
+ ngOnInit() {
437
+ this.navigation.map(item => {
438
+ if (item.showCollectionContent === undefined) {
439
+ if (this.disableHiddenCollections)
440
+ item.showCollectionContent = true;
441
+ else
442
+ item.showCollectionContent = false;
443
+ }
444
+ if (['dropdown', 'collection'].indexOf(item.type) >= 0) {
445
+ const dropdowns = item.type === 'dropdown' ? [item] : item.objects;
446
+ let avalaibleModules = 0;
447
+ dropdowns?.map(dr => {
448
+ if (dr.dropdownLinks) {
449
+ let avalaibleModulesDropdown = 0;
450
+ dr.dropdownLinks.forEach(dl => {
451
+ if (dl.authorities) {
452
+ this.authorities.forEach(au => {
453
+ if (dl.authorities.includes(au)) {
454
+ if (!dl.disableOnContexts?.includes(this.context) && !dl.forceDisabledContent) {
455
+ avalaibleModules++;
456
+ avalaibleModulesDropdown++;
457
+ }
458
+ }
459
+ });
460
+ }
461
+ else {
462
+ if (!dl.disableOnContexts?.includes(this.context) && !dl.forceDisabledContent) {
463
+ avalaibleModules++;
464
+ avalaibleModulesDropdown++;
465
+ }
466
+ }
467
+ });
468
+ if (!avalaibleModulesDropdown)
469
+ dr.forceDisabledContent = true;
470
+ else
471
+ dr.forceDisabledContent = false;
472
+ }
473
+ else {
474
+ if (dr.authorities) {
475
+ this.authorities.forEach(au => {
476
+ if (dr.authorities.includes(au)) {
477
+ if (!dr.disableOnContexts?.includes(this.context) && !dr.forceDisabledContent) {
478
+ avalaibleModules++;
479
+ }
480
+ }
481
+ });
482
+ }
483
+ else {
484
+ if (!dr.disableOnContexts?.includes(this.context) && !dr.forceDisabledContent) {
485
+ avalaibleModules++;
486
+ }
487
+ }
488
+ }
489
+ if (!avalaibleModules)
490
+ item.forceDisabledContent = true;
491
+ else
492
+ item.forceDisabledContent = false;
493
+ });
494
+ }
495
+ });
496
+ }
497
+ onCloseSidebar() {
498
+ const matches = window.matchMedia(`(max-width:${this.mdWidth}px)`).matches;
499
+ if (matches)
500
+ this._toggleSidebar.closeSidebar();
501
+ else
502
+ this._isMobile = false;
503
+ this._cd.markForCheck();
504
+ }
505
+ toggleModule(index) {
506
+ if (!this.disableHiddenCollections)
507
+ this.navigation.map((item, i) => {
508
+ if (index === i && item.showCollectionContent === false)
509
+ item.showCollectionContent = true;
510
+ else if (index === i && item.showCollectionContent === true) {
511
+ item.showCollectionContent = false;
512
+ }
513
+ else if (this.accordionInCollections) {
514
+ item.showCollectionContent = false;
515
+ }
516
+ });
517
+ }
518
+ onResize() {
519
+ this.onCloseSidebar();
520
+ }
521
+ get isMobile() {
522
+ return this._isMobile;
523
+ }
524
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakSidenavComponent, deps: [{ token: ToggleSidebar }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
525
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: TakSidenavComponent, selector: "tak-sidenav", inputs: { navigation: "navigation", authorities: "authorities", context: "context", mdWidth: "mdWidth", accordionInCollections: "accordionInCollections", disableHiddenCollections: "disableHiddenCollections" }, host: { listeners: { "window:resize": "onResize($event)" } }, ngImport: i0, template: "<div class=\"tak__sidenav__container\">\r\n <tak-layout-accordion>\r\n @for (item of navigation; track item; let i = $index) {\r\n <div>\r\n <!-- Links -->\r\n @if (item.type === 'link') {\r\n <a\r\n class=\"tak__txt-dec-none\"\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, item.disableOnContexts!]\r\n | validateAccess: [context, item.authorities!]) || item.forceDisabledContent\r\n \"\r\n routerLink=\"{{ item.url }}\"\r\n routerLinkActive=\"tak__snav-link-active\"\r\n (click)=\"onCloseSidebar()\"\r\n >\r\n <tak-layout-expansion-panel-header class=\"tak__sidenav__accordion__header is-link\">\r\n <span class=\"material-icons tak__min-wdh-32 icon-link\">{{ item.icon }}</span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ item.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n </a>\r\n }\r\n <!-- Dropdowns -->\r\n @if (item.type === 'dropdown') {\r\n <tak-layout-expansion-panel\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, item.disableOnContexts!]\r\n | validateAccess: [context, item.authorities!]) || item.forceDisabledContent\r\n \"\r\n >\r\n <tak-layout-expansion-panel-header class=\"tak__sidenav__accordion__header\">\r\n <span class=\"material-icons tak__min-wdh-32 icon-link\">{{ item.icon }}</span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ item.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n @for (link of item.dropdownLinks; track link) {\r\n <div\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, link.disableOnContexts!]\r\n | validateAccess: [context, link.authorities!]) || link.forceDisabledContent\r\n \"\r\n >\r\n <div takRipple class=\"tak__sidenav__accordion__link-container\">\r\n <a\r\n class=\"tak__txt-dec-none\"\r\n routerLink=\"{{\r\n link.urlIsNotAutoCompleted ? link.url : item.url + '/' + link.url\r\n }}\"\r\n routerLinkActive=\"tak__snav-link-active\"\r\n (click)=\"onCloseSidebar()\"\r\n >\r\n <button class=\"tak__sidenav__accordion__link-button\">\r\n <span>\r\n {{ link.name }}\r\n </span>\r\n </button>\r\n </a>\r\n </div>\r\n </div>\r\n }\r\n </tak-layout-expansion-panel>\r\n }\r\n <!-- Collections -->\r\n @if (item.type === 'collection') {\r\n <section>\r\n <div\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, item.disableOnContexts!]\r\n | validateAccess: [context, item.authorities!]) || item.forceDisabledContent\r\n \"\r\n >\r\n <tak-layout-expansion-panel-header\r\n (click)=\"toggleModule(i)\"\r\n class=\"tak__sidenav__accordion__header is-module\"\r\n >\r\n <span class=\"material-icons tak__min-wdh-32 icon-link is-module\">\r\n {{\r\n !disableHiddenCollections\r\n ? item.showCollectionContent\r\n ? 'visibility'\r\n : 'visibility_off'\r\n : 'radio_button_checked'\r\n }}\r\n </span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ item.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n <div\r\n class=\"tak-divider custom\"\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, item.disableOnContexts!]\r\n | validateAccess: [context, item.authorities!]) || item.forceDisabledContent\r\n \"\r\n ></div>\r\n @for (el of item.objects; track el) {\r\n <div [hidden]=\"!item.showCollectionContent\">\r\n <a\r\n class=\"tak__txt-dec-none\"\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, el.disableOnContexts!]\r\n | validateAccess: [context, el.authorities!]) || el.forceDisabledContent\r\n \"\r\n routerLink=\"{{ !el.urlIsNotAutoCompleted ? item.url + '/' + el.url : el.url }}\"\r\n routerLinkActive=\"tak__snav-link-active\"\r\n (click)=\"onCloseSidebar()\"\r\n >\r\n @if (el.type === 'link') {\r\n <tak-layout-expansion-panel-header\r\n class=\"tak__sidenav__accordion__header is-link\"\r\n >\r\n <span class=\"material-icons tak__min-wdh-32 icon-link\">{{ el.icon }}</span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ el.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n }\r\n </a>\r\n @if (el.type === 'dropdown') {\r\n <tak-layout-expansion-panel\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, el.disableOnContexts!]\r\n | validateAccess: [context, el.authorities!]) || el.forceDisabledContent\r\n \"\r\n >\r\n <tak-layout-expansion-panel-header class=\"tak__sidenav__accordion__header\">\r\n <span class=\"material-icons tak__min-wdh-32 icon-link\">{{ el.icon }}</span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ el.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n @for (link of el.dropdownLinks; track link) {\r\n <div\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, link.disableOnContexts!]\r\n | validateAccess: [context, link.authorities!]) ||\r\n link.forceDisabledContent\r\n \"\r\n >\r\n <div takRipple class=\"tak__sidenav__accordion__link-container\">\r\n <a\r\n class=\"tak__txt-dec-none\"\r\n routerLink=\"{{\r\n !link.urlIsNotAutoCompleted\r\n ? item.url + '/' + el.url + '/' + link.url\r\n : link.url\r\n }}\"\r\n routerLinkActive=\"tak__snav-link-active\"\r\n (click)=\"onCloseSidebar()\"\r\n >\r\n <button class=\"tak__sidenav__accordion__link-button\">\r\n <span>\r\n {{ link.name }}\r\n </span>\r\n </button>\r\n </a>\r\n </div>\r\n </div>\r\n }\r\n </tak-layout-expansion-panel>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n }\r\n </div>\r\n }\r\n </tak-layout-accordion>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: TakExpansionPanelHeaderComponent, selector: "tak-layout-expansion-panel-header", inputs: ["style", "class"] }, { kind: "component", type: TakExpansionPanelComponent, selector: "tak-layout-expansion-panel", inputs: ["style", "class"] }, { kind: "component", type: TakAccordionComponent, selector: "tak-layout-accordion" }, { kind: "pipe", type: ValidateAccessPipe, name: "validateAccess" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
526
+ }
527
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakSidenavComponent, decorators: [{
528
+ type: Component,
529
+ args: [{ selector: 'tak-sidenav', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"tak__sidenav__container\">\r\n <tak-layout-accordion>\r\n @for (item of navigation; track item; let i = $index) {\r\n <div>\r\n <!-- Links -->\r\n @if (item.type === 'link') {\r\n <a\r\n class=\"tak__txt-dec-none\"\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, item.disableOnContexts!]\r\n | validateAccess: [context, item.authorities!]) || item.forceDisabledContent\r\n \"\r\n routerLink=\"{{ item.url }}\"\r\n routerLinkActive=\"tak__snav-link-active\"\r\n (click)=\"onCloseSidebar()\"\r\n >\r\n <tak-layout-expansion-panel-header class=\"tak__sidenav__accordion__header is-link\">\r\n <span class=\"material-icons tak__min-wdh-32 icon-link\">{{ item.icon }}</span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ item.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n </a>\r\n }\r\n <!-- Dropdowns -->\r\n @if (item.type === 'dropdown') {\r\n <tak-layout-expansion-panel\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, item.disableOnContexts!]\r\n | validateAccess: [context, item.authorities!]) || item.forceDisabledContent\r\n \"\r\n >\r\n <tak-layout-expansion-panel-header class=\"tak__sidenav__accordion__header\">\r\n <span class=\"material-icons tak__min-wdh-32 icon-link\">{{ item.icon }}</span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ item.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n @for (link of item.dropdownLinks; track link) {\r\n <div\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, link.disableOnContexts!]\r\n | validateAccess: [context, link.authorities!]) || link.forceDisabledContent\r\n \"\r\n >\r\n <div takRipple class=\"tak__sidenav__accordion__link-container\">\r\n <a\r\n class=\"tak__txt-dec-none\"\r\n routerLink=\"{{\r\n link.urlIsNotAutoCompleted ? link.url : item.url + '/' + link.url\r\n }}\"\r\n routerLinkActive=\"tak__snav-link-active\"\r\n (click)=\"onCloseSidebar()\"\r\n >\r\n <button class=\"tak__sidenav__accordion__link-button\">\r\n <span>\r\n {{ link.name }}\r\n </span>\r\n </button>\r\n </a>\r\n </div>\r\n </div>\r\n }\r\n </tak-layout-expansion-panel>\r\n }\r\n <!-- Collections -->\r\n @if (item.type === 'collection') {\r\n <section>\r\n <div\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, item.disableOnContexts!]\r\n | validateAccess: [context, item.authorities!]) || item.forceDisabledContent\r\n \"\r\n >\r\n <tak-layout-expansion-panel-header\r\n (click)=\"toggleModule(i)\"\r\n class=\"tak__sidenav__accordion__header is-module\"\r\n >\r\n <span class=\"material-icons tak__min-wdh-32 icon-link is-module\">\r\n {{\r\n !disableHiddenCollections\r\n ? item.showCollectionContent\r\n ? 'visibility'\r\n : 'visibility_off'\r\n : 'radio_button_checked'\r\n }}\r\n </span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ item.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n <div\r\n class=\"tak-divider custom\"\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, item.disableOnContexts!]\r\n | validateAccess: [context, item.authorities!]) || item.forceDisabledContent\r\n \"\r\n ></div>\r\n @for (el of item.objects; track el) {\r\n <div [hidden]=\"!item.showCollectionContent\">\r\n <a\r\n class=\"tak__txt-dec-none\"\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, el.disableOnContexts!]\r\n | validateAccess: [context, el.authorities!]) || el.forceDisabledContent\r\n \"\r\n routerLink=\"{{ !el.urlIsNotAutoCompleted ? item.url + '/' + el.url : el.url }}\"\r\n routerLinkActive=\"tak__snav-link-active\"\r\n (click)=\"onCloseSidebar()\"\r\n >\r\n @if (el.type === 'link') {\r\n <tak-layout-expansion-panel-header\r\n class=\"tak__sidenav__accordion__header is-link\"\r\n >\r\n <span class=\"material-icons tak__min-wdh-32 icon-link\">{{ el.icon }}</span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ el.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n }\r\n </a>\r\n @if (el.type === 'dropdown') {\r\n <tak-layout-expansion-panel\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, el.disableOnContexts!]\r\n | validateAccess: [context, el.authorities!]) || el.forceDisabledContent\r\n \"\r\n >\r\n <tak-layout-expansion-panel-header class=\"tak__sidenav__accordion__header\">\r\n <span class=\"material-icons tak__min-wdh-32 icon-link\">{{ el.icon }}</span>\r\n <span class=\"tak__sidenav__link-name accordion\">{{ el.name }}</span>\r\n </tak-layout-expansion-panel-header>\r\n @for (link of el.dropdownLinks; track link) {\r\n <div\r\n [class.tak__admin-layout__not-exist]=\"\r\n ([authorities, link.disableOnContexts!]\r\n | validateAccess: [context, link.authorities!]) ||\r\n link.forceDisabledContent\r\n \"\r\n >\r\n <div takRipple class=\"tak__sidenav__accordion__link-container\">\r\n <a\r\n class=\"tak__txt-dec-none\"\r\n routerLink=\"{{\r\n !link.urlIsNotAutoCompleted\r\n ? item.url + '/' + el.url + '/' + link.url\r\n : link.url\r\n }}\"\r\n routerLinkActive=\"tak__snav-link-active\"\r\n (click)=\"onCloseSidebar()\"\r\n >\r\n <button class=\"tak__sidenav__accordion__link-button\">\r\n <span>\r\n {{ link.name }}\r\n </span>\r\n </button>\r\n </a>\r\n </div>\r\n </div>\r\n }\r\n </tak-layout-expansion-panel>\r\n }\r\n </div>\r\n }\r\n </div>\r\n </section>\r\n }\r\n </div>\r\n }\r\n </tak-layout-accordion>\r\n</div>\r\n" }]
530
+ }], ctorParameters: () => [{ type: ToggleSidebar }, { type: i0.ChangeDetectorRef }], propDecorators: { navigation: [{
531
+ type: Input
532
+ }], authorities: [{
533
+ type: Input
534
+ }], context: [{
535
+ type: Input
536
+ }], mdWidth: [{
537
+ type: Input
538
+ }], accordionInCollections: [{
539
+ type: Input
540
+ }], disableHiddenCollections: [{
541
+ type: Input
542
+ }], onResize: [{
543
+ type: HostListener,
544
+ args: ['window:resize', ['$event']]
545
+ }] } });
546
+
547
+ class TakSidebarComponent {
548
+ constructor() {
549
+ this.blockSidebar = new EventEmitter();
550
+ this.toggleSidebar = new EventEmitter();
551
+ this.mdWidth = 640;
552
+ this.navigation = [];
553
+ this.authorities = [];
554
+ this.isToggleShow = false;
555
+ this.isCompact = false;
556
+ this.isMd = false;
557
+ this.accordionInCollections = true;
558
+ this.disableHiddenCollections = false;
559
+ this.hideSidebar = new FormControl(true);
560
+ }
561
+ ngAfterViewInit() {
562
+ if (this.isCompact)
563
+ this.onBlockSidebar(true);
564
+ }
565
+ onToggleSidebar() {
566
+ this.toggleSidebar.emit(true);
567
+ }
568
+ onBlockSidebar(checked) {
569
+ const isChecked = checked || this.checkbox.nativeElement.checked;
570
+ localStorage.setItem('tak-sidebar-is-compact', isChecked);
571
+ this.blockSidebar.emit(isChecked);
572
+ }
573
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
574
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TakSidebarComponent, selector: "tak-sidebar", inputs: { appIcon: "appIcon", appTitle: "appTitle", appSubtitle: "appSubtitle", mdWidth: "mdWidth", navigation: "navigation", authorities: "authorities", context: "context", isToggleShow: "isToggleShow", isCompact: "isCompact", isMd: "isMd", accordionInCollections: "accordionInCollections", disableHiddenCollections: "disableHiddenCollections" }, outputs: { blockSidebar: "blockSidebar", toggleSidebar: "toggleSidebar" }, viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkbox"], descendants: true }], ngImport: i0, template: "<button class=\"tak__sidebar__mobile-toggle-sidebar-button\" (click)=\"onToggleSidebar()\"></button>\r\n<div class=\"tak__sidebar__container\">\r\n <div class=\"tak__sidebar__branding\">\r\n <img class=\"tak__sidebar__branding__logo\" [src]=\"appIcon\" />\r\n <div class=\"tak__sidebar__branding__container\" style=\"margin: 0 5px 0 5px\">\r\n <h1 class=\"tak__sidebar__branding__title\">{{ appTitle }}</h1>\r\n <h2 class=\"tak__sidebar__branding__subtitle\">{{ appSubtitle }}</h2>\r\n </div>\r\n <div class=\"tak__sidebar__branding__toggle__container\">\r\n <div class=\"tak__sidebar__branding__toggle\">\r\n <div class=\"button r\" id=\"button-1\">\r\n <input\r\n #checkbox\r\n type=\"checkbox\"\r\n class=\"checkbox\"\r\n [checked]=\"isCompact\"\r\n (change)=\"onBlockSidebar()\"\r\n />\r\n <div class=\"knobs\"></div>\r\n <div class=\"layer\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"tak__sidebar__divider\" style=\"padding: 0\"></div>\r\n <div class=\"tak__sidebar__content\">\r\n <tak-sidenav\r\n [mdWidth]=\"mdWidth\"\r\n [navigation]=\"navigation\"\r\n [authorities]=\"authorities\"\r\n [context]=\"context\"\r\n [accordionInCollections]=\"accordionInCollections\"\r\n [disableHiddenCollections]=\"disableHiddenCollections\"\r\n ></tak-sidenav>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: TakSidenavComponent, selector: "tak-sidenav", inputs: ["navigation", "authorities", "context", "mdWidth", "accordionInCollections", "disableHiddenCollections"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
575
+ }
576
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakSidebarComponent, decorators: [{
577
+ type: Component,
578
+ args: [{ selector: 'tak-sidebar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<button class=\"tak__sidebar__mobile-toggle-sidebar-button\" (click)=\"onToggleSidebar()\"></button>\r\n<div class=\"tak__sidebar__container\">\r\n <div class=\"tak__sidebar__branding\">\r\n <img class=\"tak__sidebar__branding__logo\" [src]=\"appIcon\" />\r\n <div class=\"tak__sidebar__branding__container\" style=\"margin: 0 5px 0 5px\">\r\n <h1 class=\"tak__sidebar__branding__title\">{{ appTitle }}</h1>\r\n <h2 class=\"tak__sidebar__branding__subtitle\">{{ appSubtitle }}</h2>\r\n </div>\r\n <div class=\"tak__sidebar__branding__toggle__container\">\r\n <div class=\"tak__sidebar__branding__toggle\">\r\n <div class=\"button r\" id=\"button-1\">\r\n <input\r\n #checkbox\r\n type=\"checkbox\"\r\n class=\"checkbox\"\r\n [checked]=\"isCompact\"\r\n (change)=\"onBlockSidebar()\"\r\n />\r\n <div class=\"knobs\"></div>\r\n <div class=\"layer\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"tak__sidebar__divider\" style=\"padding: 0\"></div>\r\n <div class=\"tak__sidebar__content\">\r\n <tak-sidenav\r\n [mdWidth]=\"mdWidth\"\r\n [navigation]=\"navigation\"\r\n [authorities]=\"authorities\"\r\n [context]=\"context\"\r\n [accordionInCollections]=\"accordionInCollections\"\r\n [disableHiddenCollections]=\"disableHiddenCollections\"\r\n ></tak-sidenav>\r\n </div>\r\n</div>\r\n" }]
579
+ }], propDecorators: { checkbox: [{
580
+ type: ViewChild,
581
+ args: ['checkbox']
582
+ }], blockSidebar: [{
583
+ type: Output
584
+ }], toggleSidebar: [{
585
+ type: Output
586
+ }], appIcon: [{
587
+ type: Input
588
+ }], appTitle: [{
589
+ type: Input
590
+ }], appSubtitle: [{
591
+ type: Input
592
+ }], mdWidth: [{
593
+ type: Input
594
+ }], navigation: [{
595
+ type: Input
596
+ }], authorities: [{
597
+ type: Input
598
+ }], context: [{
599
+ type: Input
600
+ }], isToggleShow: [{
601
+ type: Input
602
+ }], isCompact: [{
603
+ type: Input
604
+ }], isMd: [{
605
+ type: Input
606
+ }], accordionInCollections: [{
607
+ type: Input
608
+ }], disableHiddenCollections: [{
609
+ type: Input
610
+ }] } });
611
+
612
+ class TakOriginLayoutComponent {
613
+ constructor(_routePartsService, _toggleSidebar, _activeRoute, _cd, _router, _title) {
614
+ this._routePartsService = _routePartsService;
615
+ this._toggleSidebar = _toggleSidebar;
616
+ this._activeRoute = _activeRoute;
617
+ this._cd = _cd;
618
+ this._router = _router;
619
+ this._title = _title;
620
+ this.navigation = [];
621
+ this.appIcon = 'favicon.ico';
622
+ this.appTitle = 'KatoLee Devs';
623
+ this.appSidebarTitle = 'KatoLee (Sidebar)';
624
+ this.appSidebarSubtitle = 'KatoLee (Sidebar)';
625
+ this.sidebarDebounceTime = 250;
626
+ this.mdWidth = 640;
627
+ this.isDinamicSidebar = true;
628
+ this.includeBreadcrumbs = false;
629
+ this.accordionInCollections = true;
630
+ this.disableHiddenCollections = false;
631
+ this.hasFooter = true;
632
+ this.authorities = [];
633
+ this._isModuleLoading = false;
634
+ this._pageTitle = '';
635
+ this._isSidebarCompact = localStorage.getItem('tak-sidebar-is-compact') === 'true' ? true : false;
636
+ this.isSidebarFixed = false;
637
+ this.isMd = false;
638
+ this.sidebarRespForm = new FormControl();
639
+ }
640
+ ngOnInit() {
641
+ this._title.setTitle(this.appTitle);
642
+ this._changePageTitle();
643
+ this._routerSubs = this._router.events.subscribe(event => {
644
+ if (event instanceof RouteConfigLoadStart || event instanceof ResolveStart) {
645
+ this._isModuleLoading = true;
646
+ }
647
+ if (event instanceof RouteConfigLoadEnd || event instanceof ResolveEnd) {
648
+ this._isModuleLoading = false;
649
+ this.scrollToTop();
650
+ }
651
+ this._cd.markForCheck();
652
+ });
653
+ document.getElementsByTagName('body')[0].classList.add('tak-layout');
654
+ }
655
+ ngAfterViewInit() {
656
+ if (window.matchMedia(`(max-width:${this.mdWidth}px)`).matches) {
657
+ this._toggleSidebar.closeSidebar();
658
+ }
659
+ this.onResize();
660
+ if (this.isDinamicSidebar) {
661
+ this._sidebarStatus = this.sidebarRespForm.valueChanges
662
+ .pipe(debounceTime(this.sidebarDebounceTime))
663
+ .subscribe(_ => {
664
+ if (!this.isMd && _)
665
+ this._toggleSidebar.openSidebar();
666
+ });
667
+ }
668
+ }
669
+ onResize() {
670
+ this.isMd = window.matchMedia(`(max-width:${this.mdWidth}px)`).matches;
671
+ if (this.isMd) {
672
+ this._toggleSidebar.toggleMobile(true);
673
+ }
674
+ else {
675
+ this._toggleSidebar.toggleMobile(false);
676
+ if (this.isSidebarFixed) {
677
+ this._toggleSidebar.openSidebar();
678
+ }
679
+ else {
680
+ this._toggleSidebar.closeSidebar();
681
+ }
682
+ if (!this.isDinamicSidebar)
683
+ this._toggleSidebar.expansionButton(this.isDinamicSidebar);
684
+ }
685
+ this._cd.markForCheck();
686
+ }
687
+ sidebarMouseEnter() {
688
+ this.sidebarRespForm.setValue(true);
689
+ }
690
+ sidebarMouseLeave() {
691
+ if (!this.isSidebarFixed && !this.isMd) {
692
+ this.sidebarRespForm.setValue(false);
693
+ this._toggleSidebar.closeSidebar();
694
+ }
695
+ }
696
+ toggleSidebar(event) {
697
+ if (event) {
698
+ this._toggleSidebar.closeSidebar();
699
+ }
700
+ else {
701
+ this._toggleSidebar.openSidebar();
702
+ }
703
+ }
704
+ onBlockSidebar(event) {
705
+ this.isSidebarFixed = event;
706
+ if (event)
707
+ this.sidebarMouseEnter();
708
+ if (event)
709
+ document.getElementsByClassName('tak__container')[0].classList.add('sidebar-fixed');
710
+ else
711
+ document.getElementsByClassName('tak__container')[0].classList.remove('sidebar-fixed');
712
+ }
713
+ scrollToTop() {
714
+ if (this.scrollLayout)
715
+ this.scrollLayout.nativeElement.scrollTo({ top: 0 });
716
+ }
717
+ _changePageTitle() {
718
+ this._routerChangeTitleSubs = this._router.events
719
+ .pipe(filter(event => event instanceof NavigationEnd))
720
+ .subscribe(() => {
721
+ const routeParts = this._routePartsService.generateRouteParts(this._activeRoute.snapshot);
722
+ if (routeParts.length) {
723
+ this._pageTitle = routeParts
724
+ .reverse()
725
+ .map(part => part.title)
726
+ .reduce((partA, partI) => {
727
+ return `${partA} > ${partI}`;
728
+ });
729
+ this._pageTitle = `${this.appTitle} | ${this._pageTitle}`;
730
+ this._title.setTitle(this._pageTitle);
731
+ }
732
+ });
733
+ }
734
+ ngOnDestroy() {
735
+ this._routerSubs.unsubscribe();
736
+ this._routerChangeTitleSubs.unsubscribe();
737
+ if (this._sidebarStatus)
738
+ this._sidebarStatus.unsubscribe();
739
+ }
740
+ get isModuleLoading() {
741
+ return this._isModuleLoading;
742
+ }
743
+ get isSidebarCompact() {
744
+ return this._isSidebarCompact;
745
+ }
746
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakOriginLayoutComponent, deps: [{ token: RoutePartsService }, { token: ToggleSidebar }, { token: i2.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: i2.Router }, { token: i3.Title }], target: i0.ɵɵFactoryTarget.Component }); }
747
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: TakOriginLayoutComponent, selector: "tak-origin-layout", inputs: { navigation: "navigation", appIcon: "appIcon", appTitle: "appTitle", appSidebarTitle: "appSidebarTitle", appSidebarSubtitle: "appSidebarSubtitle", sidebarDebounceTime: "sidebarDebounceTime", mdWidth: "mdWidth", isDinamicSidebar: "isDinamicSidebar", includeBreadcrumbs: "includeBreadcrumbs", accordionInCollections: "accordionInCollections", disableHiddenCollections: "disableHiddenCollections", hasFooter: "hasFooter", authorities: "authorities", context: "context" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "scrollLayout", first: true, predicate: ["scrollLayout"], descendants: true }], ngImport: i0, template: "<div class=\"tak__layout__container {{ isSidebarCompact ? 'compact' : 'full' }}\">\r\n <tak-sidebar\r\n [isCompact]=\"isSidebarCompact\"\r\n [isMd]=\"isMd\"\r\n [navigation]=\"navigation\"\r\n [authorities]=\"authorities\"\r\n [appIcon]=\"appIcon\"\r\n [appTitle]=\"appSidebarTitle\"\r\n [appSubtitle]=\"appSidebarSubtitle\"\r\n [isToggleShow]=\"isDinamicSidebar\"\r\n [mdWidth]=\"mdWidth\"\r\n [context]=\"context\"\r\n [accordionInCollections]=\"accordionInCollections\"\r\n [disableHiddenCollections]=\"disableHiddenCollections\"\r\n (mouseenter)=\"isDinamicSidebar ? sidebarMouseEnter() : ''\"\r\n (mouseleave)=\"isDinamicSidebar ? sidebarMouseLeave() : ''\"\r\n (blockSidebar)=\"onBlockSidebar($event)\"\r\n (toggleSidebar)=\"toggleSidebar($event)\"\r\n ></tak-sidebar>\r\n <div class=\"tak__container\">\r\n <div class=\"tak__header-container\">\r\n <tak-header\r\n (toggleSidebar)=\"toggleSidebar($event)\"\r\n [mdWidth]=\"mdWidth\"\r\n [isActionButton]=\"isDinamicSidebar\"\r\n >\r\n <ng-content tak-custom-header select=\"[tak-custom-header]\"></ng-content>\r\n </tak-header>\r\n </div>\r\n <div class=\"tak__scroll\" #scrollLayout>\r\n <div class=\"tak__content\">\r\n <!-- View Loader -->\r\n @if (isModuleLoading) {\r\n <div class=\"view-loader\" style=\"position: fixed\">\r\n <div class=\"spinner\">\r\n <div class=\"double-bounce1\"></div>\r\n <div class=\"double-bounce2\"></div>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"tak__outlet\">\r\n <tak-breadcrumb [class.tak-breadcrumb-hidden]=\"!includeBreadcrumbs\"></tak-breadcrumb>\r\n <div>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n @if (hasFooter) {\r\n <tak-footer>\r\n <ng-content tak-custom-footer select=\"[tak-custom-footer]\"></ng-content>\r\n </tak-footer>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "component", type: TakBreadcrumbComponent, selector: "tak-breadcrumb" }, { kind: "component", type: TakSidebarComponent, selector: "tak-sidebar", inputs: ["appIcon", "appTitle", "appSubtitle", "mdWidth", "navigation", "authorities", "context", "isToggleShow", "isCompact", "isMd", "accordionInCollections", "disableHiddenCollections"], outputs: ["blockSidebar", "toggleSidebar"] }, { kind: "component", type: TakHeaderComponent, selector: "tak-header", inputs: ["mdWidth", "isActionButton"], outputs: ["toggleSidebar"] }, { kind: "component", type: TakFooterComponent, selector: "tak-footer" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
748
+ }
749
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakOriginLayoutComponent, decorators: [{
750
+ type: Component,
751
+ args: [{ selector: 'tak-origin-layout', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"tak__layout__container {{ isSidebarCompact ? 'compact' : 'full' }}\">\r\n <tak-sidebar\r\n [isCompact]=\"isSidebarCompact\"\r\n [isMd]=\"isMd\"\r\n [navigation]=\"navigation\"\r\n [authorities]=\"authorities\"\r\n [appIcon]=\"appIcon\"\r\n [appTitle]=\"appSidebarTitle\"\r\n [appSubtitle]=\"appSidebarSubtitle\"\r\n [isToggleShow]=\"isDinamicSidebar\"\r\n [mdWidth]=\"mdWidth\"\r\n [context]=\"context\"\r\n [accordionInCollections]=\"accordionInCollections\"\r\n [disableHiddenCollections]=\"disableHiddenCollections\"\r\n (mouseenter)=\"isDinamicSidebar ? sidebarMouseEnter() : ''\"\r\n (mouseleave)=\"isDinamicSidebar ? sidebarMouseLeave() : ''\"\r\n (blockSidebar)=\"onBlockSidebar($event)\"\r\n (toggleSidebar)=\"toggleSidebar($event)\"\r\n ></tak-sidebar>\r\n <div class=\"tak__container\">\r\n <div class=\"tak__header-container\">\r\n <tak-header\r\n (toggleSidebar)=\"toggleSidebar($event)\"\r\n [mdWidth]=\"mdWidth\"\r\n [isActionButton]=\"isDinamicSidebar\"\r\n >\r\n <ng-content tak-custom-header select=\"[tak-custom-header]\"></ng-content>\r\n </tak-header>\r\n </div>\r\n <div class=\"tak__scroll\" #scrollLayout>\r\n <div class=\"tak__content\">\r\n <!-- View Loader -->\r\n @if (isModuleLoading) {\r\n <div class=\"view-loader\" style=\"position: fixed\">\r\n <div class=\"spinner\">\r\n <div class=\"double-bounce1\"></div>\r\n <div class=\"double-bounce2\"></div>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"tak__outlet\">\r\n <tak-breadcrumb [class.tak-breadcrumb-hidden]=\"!includeBreadcrumbs\"></tak-breadcrumb>\r\n <div>\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n @if (hasFooter) {\r\n <tak-footer>\r\n <ng-content tak-custom-footer select=\"[tak-custom-footer]\"></ng-content>\r\n </tak-footer>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n" }]
752
+ }], ctorParameters: () => [{ type: RoutePartsService }, { type: ToggleSidebar }, { type: i2.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: i2.Router }, { type: i3.Title }], propDecorators: { scrollLayout: [{
753
+ type: ViewChild,
754
+ args: ['scrollLayout']
755
+ }], navigation: [{
756
+ type: Input
757
+ }], appIcon: [{
758
+ type: Input
759
+ }], appTitle: [{
760
+ type: Input
761
+ }], appSidebarTitle: [{
762
+ type: Input
763
+ }], appSidebarSubtitle: [{
764
+ type: Input
765
+ }], sidebarDebounceTime: [{
766
+ type: Input
767
+ }], mdWidth: [{
768
+ type: Input
769
+ }], isDinamicSidebar: [{
770
+ type: Input
771
+ }], includeBreadcrumbs: [{
772
+ type: Input
773
+ }], accordionInCollections: [{
774
+ type: Input
775
+ }], disableHiddenCollections: [{
776
+ type: Input
777
+ }], hasFooter: [{
778
+ type: Input
779
+ }], authorities: [{
780
+ type: Input
781
+ }], context: [{
782
+ type: Input
783
+ }], onResize: [{
784
+ type: HostListener,
785
+ args: ['window:resize', ['$event']]
786
+ }] } });
787
+ class TakLoader {
788
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakLoader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
789
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.3", type: TakLoader, selector: "tak-loader", ngImport: i0, template: `<div class="app-loader">
790
+ <div class="spinner">
791
+ <div class="double-bounce1"></div>
792
+ <div class="double-bounce2"></div>
793
+ </div>
794
+ </div>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
795
+ }
796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakLoader, decorators: [{
797
+ type: Component,
798
+ args: [{
799
+ selector: 'tak-loader',
800
+ template: `<div class="app-loader">
801
+ <div class="spinner">
802
+ <div class="double-bounce1"></div>
803
+ <div class="double-bounce2"></div>
804
+ </div>
805
+ </div>`,
806
+ changeDetection: ChangeDetectionStrategy.OnPush,
807
+ }]
808
+ }] });
809
+
810
+ class TakOriginLayoutModule {
811
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakOriginLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
812
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.3", ngImport: i0, type: TakOriginLayoutModule, declarations: [ValidateAccessPipe,
813
+ TakExpansionPanelHeaderComponent,
814
+ TakExpansionPanelComponent,
815
+ TakBreadcrumbComponent,
816
+ TakAccordionComponent,
817
+ TakSidebarComponent,
818
+ TakSidenavComponent,
819
+ TakOriginLayoutComponent,
820
+ TakHeaderComponent,
821
+ TakFooterComponent,
822
+ TakLoader], imports: [ReactiveFormsModule, RouterModule], exports: [TakOriginLayoutComponent, TakLoader] }); }
823
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakOriginLayoutModule, providers: [RoutePartsService], imports: [ReactiveFormsModule, RouterModule] }); }
824
+ }
825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: TakOriginLayoutModule, decorators: [{
826
+ type: NgModule,
827
+ args: [{
828
+ declarations: [
829
+ ValidateAccessPipe,
830
+ TakExpansionPanelHeaderComponent,
831
+ TakExpansionPanelComponent,
832
+ TakBreadcrumbComponent,
833
+ TakAccordionComponent,
834
+ TakSidebarComponent,
835
+ TakSidenavComponent,
836
+ TakOriginLayoutComponent,
837
+ TakHeaderComponent,
838
+ TakFooterComponent,
839
+ TakLoader,
840
+ ],
841
+ imports: [ReactiveFormsModule, RouterModule],
842
+ exports: [TakOriginLayoutComponent, TakLoader],
843
+ providers: [RoutePartsService],
844
+ }]
845
+ }] });
846
+
847
+ class NavigationService {
848
+ constructor() {
849
+ this.iconMenu = [];
850
+ this.menuItems = new BehaviorSubject(this.iconMenu);
851
+ this.menuItems$ = this.menuItems.asObservable();
852
+ }
853
+ publishNavigationChange() {
854
+ this.menuItems.next(this.iconMenu);
855
+ }
856
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
857
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: NavigationService }); }
858
+ }
859
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: NavigationService, decorators: [{
860
+ type: Injectable
861
+ }] });
862
+
863
+ /*
864
+ * Public API Surface of @kato-lee/components/layouts/origin
865
+ */
866
+
867
+ /**
868
+ * Generated bundle index. Do not edit.
869
+ */
870
+
871
+ export { LAYOUT_CONTAINER, NavigationService, RoutePartsService, TakFooterComponent, TakHeaderComponent, TakLoader, TakOriginLayoutComponent, TakOriginLayoutModule, TakSidebarComponent, ToggleSidebar, ValidateAccessPipe };
872
+ //# sourceMappingURL=kato-lee-components-layouts-origin.mjs.map