spiderly 19.0.1 → 19.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 (254) hide show
  1. package/fesm2022/spiderly.mjs +4382 -0
  2. package/fesm2022/spiderly.mjs.map +1 -0
  3. package/index.d.ts +5 -0
  4. package/lib/components/auth/login/login.component.d.ts +35 -0
  5. package/lib/components/auth/partials/auth.component.d.ts +21 -0
  6. package/lib/components/auth/partials/login-verification.component.d.ts +18 -0
  7. package/lib/components/auth/partials/registration-verification.component.d.ts +17 -0
  8. package/lib/components/auth/partials/verification-wrapper.component.d.ts +31 -0
  9. package/lib/components/auth/registration/registration.component.d.ts +34 -0
  10. package/lib/components/base-details/role-base-details.component.d.ts +50 -0
  11. package/lib/components/base-form/base-form copy.d.ts +54 -0
  12. package/lib/components/card-skeleton/card-skeleton.component.d.ts +12 -0
  13. package/lib/components/footer/footer.component.d.ts +9 -0
  14. package/lib/components/index-card/index-card.component.d.ts +22 -0
  15. package/lib/components/info-card/info-card.component.d.ts +11 -0
  16. package/lib/components/layout/layout-base.component.d.ts +37 -0
  17. package/lib/components/layout/sidebar/menuitem.component.d.ts +43 -0
  18. package/lib/components/layout/sidebar/sidebar-menu.component.d.ts +23 -0
  19. package/lib/components/layout/sidebar/sidebar-menu.service.d.ts +12 -0
  20. package/lib/components/layout/sidebar/sidebar.component.d.ts +11 -0
  21. package/lib/components/layout/topbar/topbar.component.d.ts +45 -0
  22. package/lib/components/not-found/not-found.component.d.ts +9 -0
  23. package/lib/components/required/required.component.d.ts +6 -0
  24. package/lib/components/spiderly-buttons/google-button/google-button.component.d.ts +17 -0
  25. package/lib/components/spiderly-buttons/return-button/return-button.component.d.ts +10 -0
  26. package/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.d.ts +6 -0
  27. package/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.d.ts +27 -0
  28. package/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.d.ts +8 -0
  29. package/lib/components/spiderly-data-table/spiderly-data-table.component.d.ts +157 -0
  30. package/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.d.ts +11 -0
  31. package/lib/components/spiderly-form-control/spiderly-form-control.d.ts +37 -0
  32. package/lib/components/spiderly-panels/panel-body/panel-body.component.d.ts +9 -0
  33. package/lib/components/spiderly-panels/panel-footer/panel-footer.component.d.ts +8 -0
  34. package/lib/components/spiderly-panels/panel-header/panel-header.component.d.ts +29 -0
  35. package/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.d.ts +10 -0
  36. package/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.d.ts +25 -0
  37. package/lib/components/spiderly-panels/spiderly-panels.module.d.ts +14 -0
  38. package/lib/controls/base-autocomplete-control.d.ts +9 -0
  39. package/lib/controls/base-control.d.ts +23 -0
  40. package/lib/controls/base-dropdown-control.d.ts +18 -0
  41. package/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.d.ts +18 -0
  42. package/lib/controls/spiderly-calendar/spiderly-calendar.component.d.ts +13 -0
  43. package/lib/controls/spiderly-checkbox/spiderly-checkbox.component.d.ts +14 -0
  44. package/lib/controls/spiderly-colorpick/spiderly-colorpick.component.d.ts +11 -0
  45. package/lib/controls/spiderly-controls.module.d.ts +22 -0
  46. package/lib/controls/spiderly-dropdown/spiderly-dropdown.component.d.ts +14 -0
  47. package/lib/controls/spiderly-editor/spiderly-editor.component.d.ts +16 -0
  48. package/lib/controls/spiderly-file/spiderly-file.component.d.ts +36 -0
  49. package/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.d.ts +13 -0
  50. package/lib/controls/spiderly-multiselect/spiderly-multiselect.component.d.ts +11 -0
  51. package/lib/controls/spiderly-number/spiderly-number.component.d.ts +15 -0
  52. package/lib/controls/spiderly-password/spiderly-password.component.d.ts +12 -0
  53. package/lib/controls/spiderly-textarea/spiderly-textarea.component.d.ts +11 -0
  54. package/lib/controls/spiderly-textbox/spiderly-textbox.component.d.ts +15 -0
  55. package/lib/entities/base-entity.d.ts +14 -0
  56. package/lib/entities/codebook.d.ts +9 -0
  57. package/lib/entities/init-company-auth-dialog-details.d.ts +9 -0
  58. package/lib/entities/init-top-bar-data.d.ts +16 -0
  59. package/lib/entities/is-authorized-for-save-event.d.ts +9 -0
  60. package/lib/entities/last-menu-icon-index-clicked.d.ts +7 -0
  61. package/lib/entities/lazy-load-selected-ids-result.d.ts +9 -0
  62. package/{src/lib/entities/menuchangeevent.ts → lib/entities/menuchangeevent.d.ts} +4 -4
  63. package/lib/entities/mime-type.d.ts +11 -0
  64. package/lib/entities/namebook.d.ts +9 -0
  65. package/lib/entities/primeng-option.d.ts +9 -0
  66. package/lib/entities/security-entities.d.ts +211 -0
  67. package/lib/entities/simple-save-result.d.ts +7 -0
  68. package/lib/entities/spiderly-button.d.ts +13 -0
  69. package/{src/lib/entities/table-filter-context.ts → lib/entities/table-filter-context.d.ts} +5 -6
  70. package/lib/entities/table-filter-sort-meta.d.ts +4 -0
  71. package/{src/lib/entities/table-filter.ts → lib/entities/table-filter.d.ts} +23 -48
  72. package/lib/entities/table-response.d.ts +4 -0
  73. package/lib/enums/security-enums.d.ts +22 -0
  74. package/lib/enums/verification-type-codes.d.ts +4 -0
  75. package/lib/guards/auth.guard.d.ts +15 -0
  76. package/lib/guards/not-auth.guard.d.ts +12 -0
  77. package/lib/handlers/spiderly-error-handler.d.ts +14 -0
  78. package/lib/handlers/spiderly-transloco-fallback-strategy.d.ts +13 -0
  79. package/lib/interceptors/http-loading.interceptor.d.ts +2 -0
  80. package/lib/interceptors/json-parser.interceptor.d.ts +2 -0
  81. package/lib/interceptors/jwt.interceptor.d.ts +2 -0
  82. package/lib/interceptors/unauthorized.interceptor.d.ts +2 -0
  83. package/lib/modules/core.module.d.ts +2 -0
  84. package/lib/modules/spiderly-transloco.module.d.ts +15 -0
  85. package/lib/services/api.service.security.d.ts +35 -0
  86. package/lib/services/app-initializer.d.ts +4 -0
  87. package/lib/services/app-layout-base.service.d.ts +60 -0
  88. package/lib/services/auth-base.service.d.ts +55 -0
  89. package/lib/services/base-form.service.d.ts +27 -0
  90. package/lib/services/config-base.service.d.ts +24 -0
  91. package/lib/services/helper-functions.d.ts +37 -0
  92. package/lib/services/spiderly-message.service.d.ts +17 -0
  93. package/lib/services/spiderly-transloco-loader.d.ts +10 -0
  94. package/lib/services/translate-labels-abstract.service.d.ts +7 -0
  95. package/lib/services/validator-abstract.service.d.ts +13 -0
  96. package/package.json +66 -55
  97. package/{src/public-api.ts → public-api.d.ts} +90 -103
  98. package/{src/lib → styles}/styles/shared.scss +3 -6
  99. package/eslint.config.js +0 -32
  100. package/ng-package.json +0 -10
  101. package/src/lib/components/auth/login/login.component.html +0 -25
  102. package/src/lib/components/auth/login/login.component.ts +0 -77
  103. package/src/lib/components/auth/partials/auth.component.html +0 -29
  104. package/src/lib/components/auth/partials/auth.component.ts +0 -60
  105. package/src/lib/components/auth/partials/login-verification.component.html +0 -2
  106. package/src/lib/components/auth/partials/login-verification.component.ts +0 -41
  107. package/src/lib/components/auth/partials/registration-verification.component.html +0 -1
  108. package/src/lib/components/auth/partials/registration-verification.component.ts +0 -41
  109. package/src/lib/components/auth/partials/verification-wrapper.component.html +0 -39
  110. package/src/lib/components/auth/partials/verification-wrapper.component.ts +0 -68
  111. package/src/lib/components/auth/registration/registration.component.html +0 -31
  112. package/src/lib/components/auth/registration/registration.component.ts +0 -77
  113. package/src/lib/components/base-details/role-base-details.component.html +0 -33
  114. package/src/lib/components/base-details/role-base-details.component.ts +0 -194
  115. package/src/lib/components/base-form/base-form copy.ts +0 -356
  116. package/src/lib/components/card-skeleton/card-skeleton.component.html +0 -8
  117. package/src/lib/components/card-skeleton/card-skeleton.component.ts +0 -21
  118. package/src/lib/components/footer/app.footer.component.ts +0 -17
  119. package/src/lib/components/footer/footer.component.html +0 -3
  120. package/src/lib/components/footer/footer.component.ts +0 -17
  121. package/src/lib/components/index-card/index-card.component.html +0 -15
  122. package/src/lib/components/index-card/index-card.component.ts +0 -48
  123. package/src/lib/components/info-card/info-card.component.html +0 -18
  124. package/src/lib/components/info-card/info-card.component.ts +0 -29
  125. package/src/lib/components/layout/layout-base.component.ts +0 -140
  126. package/src/lib/components/layout/sidebar/menuitem.component.html +0 -40
  127. package/src/lib/components/layout/sidebar/menuitem.component.ts +0 -179
  128. package/src/lib/components/layout/sidebar/sidebar-menu.component.html +0 -6
  129. package/src/lib/components/layout/sidebar/sidebar-menu.component.ts +0 -44
  130. package/src/lib/components/layout/sidebar/sidebar-menu.service.ts +0 -22
  131. package/src/lib/components/layout/sidebar/sidebar.component.html +0 -1
  132. package/src/lib/components/layout/sidebar/sidebar.component.ts +0 -20
  133. package/src/lib/components/layout/topbar/topbar.component.html +0 -64
  134. package/src/lib/components/layout/topbar/topbar.component.ts +0 -137
  135. package/src/lib/components/not-found/not-found.component.html +0 -27
  136. package/src/lib/components/not-found/not-found.component.ts +0 -22
  137. package/src/lib/components/required/required.component.html +0 -1
  138. package/src/lib/components/required/required.component.ts +0 -13
  139. package/src/lib/components/spiderly-buttons/google-button/google-button.component.html +0 -5
  140. package/src/lib/components/spiderly-buttons/google-button/google-button.component.ts +0 -53
  141. package/src/lib/components/spiderly-buttons/return-button/return-button.component.html +0 -3
  142. package/src/lib/components/spiderly-buttons/return-button/return-button.component.ts +0 -35
  143. package/src/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.html +0 -14
  144. package/src/lib/components/spiderly-buttons/spiderly-button/spiderly-button.component.ts +0 -27
  145. package/src/lib/components/spiderly-buttons/spiderly-button-base/spiderly-button-base.ts +0 -61
  146. package/src/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.html +0 -15
  147. package/src/lib/components/spiderly-buttons/spiderly-split-button/spiderly-split-button.component.ts +0 -24
  148. package/src/lib/components/spiderly-data-table/spiderly-data-table.component.html +0 -93
  149. package/src/lib/components/spiderly-data-table/spiderly-data-table.component.ts +0 -614
  150. package/src/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.html +0 -17
  151. package/src/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.ts +0 -39
  152. package/src/lib/components/spiderly-form-control/spiderly-form-control.ts +0 -60
  153. package/src/lib/components/spiderly-panels/panel-body/panel-body.component.html +0 -8
  154. package/src/lib/components/spiderly-panels/panel-body/panel-body.component.ts +0 -16
  155. package/src/lib/components/spiderly-panels/panel-footer/panel-footer.component.html +0 -8
  156. package/src/lib/components/spiderly-panels/panel-footer/panel-footer.component.ts +0 -15
  157. package/src/lib/components/spiderly-panels/panel-header/panel-header.component.html +0 -25
  158. package/src/lib/components/spiderly-panels/panel-header/panel-header.component.ts +0 -69
  159. package/src/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.html +0 -7
  160. package/src/lib/components/spiderly-panels/spiderly-card/spiderly-card.component.ts +0 -17
  161. package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.html +0 -40
  162. package/src/lib/components/spiderly-panels/spiderly-panel/spiderly-panel.component.ts +0 -42
  163. package/src/lib/components/spiderly-panels/spiderly-panels.module.ts +0 -32
  164. package/src/lib/controls/base-autocomplete-control.ts +0 -17
  165. package/src/lib/controls/base-control.ts +0 -60
  166. package/src/lib/controls/base-dropdown-control.ts +0 -37
  167. package/src/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.html +0 -36
  168. package/src/lib/controls/spiderly-autocomplete/spiderly-autocomplete.component.ts +0 -56
  169. package/src/lib/controls/spiderly-calendar/spiderly-calendar.component.html +0 -21
  170. package/src/lib/controls/spiderly-calendar/spiderly-calendar.component.ts +0 -37
  171. package/src/lib/controls/spiderly-checkbox/spiderly-checkbox.component.html +0 -16
  172. package/src/lib/controls/spiderly-checkbox/spiderly-checkbox.component.ts +0 -38
  173. package/src/lib/controls/spiderly-colorpick/spiderly-colorpick.component.html +0 -33
  174. package/src/lib/controls/spiderly-colorpick/spiderly-colorpick.component.ts +0 -40
  175. package/src/lib/controls/spiderly-controls.module.ts +0 -61
  176. package/src/lib/controls/spiderly-dropdown/spiderly-dropdown.component.html +0 -27
  177. package/src/lib/controls/spiderly-dropdown/spiderly-dropdown.component.ts +0 -39
  178. package/src/lib/controls/spiderly-editor/spiderly-editor.component.html +0 -22
  179. package/src/lib/controls/spiderly-editor/spiderly-editor.component.ts +0 -58
  180. package/src/lib/controls/spiderly-file/spiderly-file.component.html +0 -54
  181. package/src/lib/controls/spiderly-file/spiderly-file.component.ts +0 -123
  182. package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.html +0 -30
  183. package/src/lib/controls/spiderly-multiautocomplete/spiderly-multiautocomplete.component.ts +0 -38
  184. package/src/lib/controls/spiderly-multiselect/spiderly-multiselect.component.html +0 -23
  185. package/src/lib/controls/spiderly-multiselect/spiderly-multiselect.component.ts +0 -32
  186. package/src/lib/controls/spiderly-number/spiderly-number.component.html +0 -19
  187. package/src/lib/controls/spiderly-number/spiderly-number.component.ts +0 -37
  188. package/src/lib/controls/spiderly-password/spiderly-password.component.html +0 -17
  189. package/src/lib/controls/spiderly-password/spiderly-password.component.ts +0 -34
  190. package/src/lib/controls/spiderly-textarea/spiderly-textarea.component.html +0 -18
  191. package/src/lib/controls/spiderly-textarea/spiderly-textarea.component.ts +0 -32
  192. package/src/lib/controls/spiderly-textbox/spiderly-textbox.component.html +0 -23
  193. package/src/lib/controls/spiderly-textbox/spiderly-textbox.component.ts +0 -41
  194. package/src/lib/entities/base-entity.ts +0 -25
  195. package/src/lib/entities/codebook.ts +0 -23
  196. package/src/lib/entities/init-company-auth-dialog-details.ts +0 -22
  197. package/src/lib/entities/init-top-bar-data.ts +0 -35
  198. package/src/lib/entities/is-authorized-for-save-event.ts +0 -22
  199. package/src/lib/entities/last-menu-icon-index-clicked.ts +0 -18
  200. package/src/lib/entities/lazy-load-selected-ids-result.ts +0 -22
  201. package/src/lib/entities/mime-type.ts +0 -15
  202. package/src/lib/entities/namebook.ts +0 -22
  203. package/src/lib/entities/primeng-option.ts +0 -23
  204. package/src/lib/entities/readonly-object.ts +0 -1
  205. package/src/lib/entities/security-entities.ts +0 -548
  206. package/src/lib/entities/simple-save-result.ts +0 -19
  207. package/src/lib/entities/spiderly-button.ts +0 -30
  208. package/src/lib/entities/table-filter-sort-meta.ts +0 -5
  209. package/src/lib/entities/table-response.ts +0 -5
  210. package/src/lib/enums/security-enums.ts +0 -28
  211. package/src/lib/enums/verification-type-codes.ts +0 -5
  212. package/src/lib/guards/auth.guard.ts +0 -39
  213. package/src/lib/guards/not-auth.guard.ts +0 -32
  214. package/src/lib/handlers/spiderly-error-handler.ts +0 -32
  215. package/src/lib/handlers/spiderly-transloco-fallback-strategy.ts +0 -25
  216. package/src/lib/interceptors/http-loading.interceptor.ts +0 -21
  217. package/src/lib/interceptors/json-parser.interceptor.ts +0 -44
  218. package/src/lib/interceptors/jwt.interceptor.ts +0 -18
  219. package/src/lib/interceptors/unauthorized.interceptor.ts +0 -77
  220. package/src/lib/modules/core.module.ts +0 -22
  221. package/src/lib/modules/primeng.module.ts +0 -122
  222. package/src/lib/modules/spiderly-transloco.module.ts +0 -50
  223. package/src/lib/services/api.service.security.ts +0 -120
  224. package/src/lib/services/app-initializer.ts +0 -9
  225. package/src/lib/services/app-layout-base.service.ts +0 -184
  226. package/src/lib/services/auth-base.service.ts +0 -271
  227. package/src/lib/services/base-form.service.ts +0 -178
  228. package/src/lib/services/config-base.service.ts +0 -36
  229. package/src/lib/services/helper-functions.ts +0 -288
  230. package/src/lib/services/spiderly-message.service.ts +0 -66
  231. package/src/lib/services/spiderly-transloco-loader.ts +0 -15
  232. package/src/lib/services/translate-labels-abstract.service.ts +0 -13
  233. package/src/lib/services/validator-abstract.service.ts +0 -63
  234. package/tsconfig.lib.json +0 -17
  235. package/tsconfig.lib.prod.json +0 -10
  236. package/tsconfig.spec.json +0 -14
  237. /package/{src/lib → styles}/components/spiderly-data-table/spiderly-data-table.component.scss +0 -0
  238. /package/{src/lib → styles}/components/spiderly-panels/panel-footer/panel-footer.component.scss +0 -0
  239. /package/{src/lib → styles}/components/spiderly-panels/spiderly-panel/spiderly-panel.component.scss +0 -0
  240. /package/{src/lib → styles}/styles/layout/_config.scss +0 -0
  241. /package/{src/lib → styles}/styles/layout/_content.scss +0 -0
  242. /package/{src/lib → styles}/styles/layout/_footer.scss +0 -0
  243. /package/{src/lib → styles}/styles/layout/_main.scss +0 -0
  244. /package/{src/lib → styles}/styles/layout/_menu.scss +0 -0
  245. /package/{src/lib → styles}/styles/layout/_mixins.scss +0 -0
  246. /package/{src/lib → styles}/styles/layout/_preloading.scss +0 -0
  247. /package/{src/lib → styles}/styles/layout/_responsive.scss +0 -0
  248. /package/{src/lib → styles}/styles/layout/_spiderly-controls.scss +0 -0
  249. /package/{src/lib → styles}/styles/layout/_topbar.scss +0 -0
  250. /package/{src/lib → styles}/styles/layout/_typography.scss +0 -0
  251. /package/{src/lib → styles}/styles/layout/_utils.scss +0 -0
  252. /package/{src/lib → styles}/styles/layout/_variables.scss +0 -0
  253. /package/{src/lib → styles}/styles/layout/layout.scss +0 -0
  254. /package/{src/lib → styles}/styles/styles.scss +0 -0
@@ -1,18 +0,0 @@
1
- <div class="card responsive-card-padding" style="background-color: var(--p-primary-100); position: relative; overflow: hidden;">
2
- <!-- TODO FT: Translate -->
3
- <div style="display: flex; align-items: center; gap: 21px; position: relative; z-index: 2;">
4
- <i class="pi pi-info-circle" style="font-size: 26px; color: var(--p-primary-color);"></i>
5
- <div>
6
- <div class="header" style="color:var(--p-primary-color); font-weight: 600; text-align: left;">
7
- {{header}}
8
- </div>
9
- <div style="text-align: left; margin-top: 8px;">
10
- <ng-content></ng-content>
11
- </div>
12
- </div>
13
- </div>
14
-
15
- <div class="card-overflow-icon" style="position: absolute; overflow: hidden; right: 8px; top: -25px; z-index: 1;">
16
- <i class="pi pi-info-circle" style="font-size: 270px;"></i>
17
- </div>
18
- </div>
@@ -1,29 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import { Component, Input } from '@angular/core';
3
- import { FormBuilder } from '@angular/forms';
4
- import { SpiderlyPanelsModule } from "../spiderly-panels/spiderly-panels.module";
5
- import { PrimengModule } from '../../modules/primeng.module';
6
-
7
- @Component({
8
- selector: 'info-card',
9
- templateUrl: './info-card.component.html',
10
- imports: [
11
- CommonModule,
12
- PrimengModule,
13
- SpiderlyPanelsModule
14
- ]
15
- })
16
- export class InfoCardComponent {
17
- @Input() public header: string = '';
18
- @Input() public description: string;
19
-
20
- constructor(
21
- protected formBuilder: FormBuilder,
22
- ) {
23
-
24
- }
25
-
26
- ngOnInit(){
27
- }
28
-
29
- }
@@ -1,140 +0,0 @@
1
- import { Component, OnDestroy, Renderer2, ViewChild } from '@angular/core';
2
- import { NavigationEnd, Router } from '@angular/router';
3
- import { filter, Subscription } from 'rxjs';
4
- import { AppSidebarComponent } from './sidebar/sidebar.component';
5
- import { AppTopBarComponent } from './topbar/topbar.component';
6
- import { LayoutBaseService } from '../../services/app-layout-base.service';
7
-
8
- @Component({
9
- selector: 'layout-base',
10
- template: '',
11
- standalone: true
12
- })
13
- export class LayoutBaseComponent implements OnDestroy {
14
-
15
- overlayMenuOpenSubscription: Subscription;
16
-
17
- menuOutsideClickListener: any;
18
-
19
- profileMenuOutsideClickListener: any;
20
-
21
- @ViewChild(AppSidebarComponent) appSidebar!: AppSidebarComponent;
22
-
23
- @ViewChild(AppTopBarComponent) appTopbar!: AppTopBarComponent;
24
-
25
- constructor(
26
- protected layoutService: LayoutBaseService,
27
- protected renderer: Renderer2,
28
- protected router: Router,
29
- ) {
30
- this.overlayMenuOpenSubscription = this.layoutService.overlayOpen$.subscribe(() => {
31
- if (!this.menuOutsideClickListener) {
32
- this.menuOutsideClickListener = this.renderer.listen('document', 'click', event => {
33
- const isOutsideClicked = !(
34
- this.appSidebar.el.nativeElement.isSameNode(event.target) ||
35
- this.appSidebar.el.nativeElement.contains(event.target) ||
36
- this.appTopbar.menuButton.nativeElement.isSameNode(event.target) ||
37
- this.appTopbar.menuButton.nativeElement.contains(event.target) ||
38
- (event.target.closest('.p-autocomplete-items')) ||
39
- (event.target.closest('.p-autocomplete-clear-icon'))
40
- );
41
-
42
- if (isOutsideClicked) {
43
- this.hideMenu();
44
- }
45
- });
46
- }
47
-
48
- if (!this.profileMenuOutsideClickListener) {
49
- this.profileMenuOutsideClickListener = this.renderer.listen('document', 'click', event => {
50
- const isOutsideClicked = !(
51
- this.appTopbar.menu.nativeElement.isSameNode(event.target) ||
52
- this.appTopbar.menu.nativeElement.contains(event.target)
53
- );
54
-
55
- if (isOutsideClicked) {
56
- this.hideProfileMenu();
57
- }
58
- });
59
- }
60
-
61
- if (this.layoutService.state.staticMenuMobileActive) {
62
- this.blockBodyScroll();
63
- }
64
- });
65
-
66
- this.router.events.pipe(filter(event => event instanceof NavigationEnd))
67
- .subscribe(() => {
68
- this.hideMenu();
69
- this.hideProfileMenu();
70
- });
71
- }
72
-
73
- hideMenu() {
74
- this.layoutService.state.overlayMenuActive = false;
75
- this.layoutService.state.staticMenuMobileActive = false;
76
- this.layoutService.state.menuHoverActive = false;
77
- if (this.menuOutsideClickListener) {
78
- this.menuOutsideClickListener();
79
- this.menuOutsideClickListener = null;
80
- }
81
- this.unblockBodyScroll();
82
- }
83
-
84
- hideProfileMenu() {
85
- this.layoutService.state.profileSidebarVisible = false;
86
- if (this.profileMenuOutsideClickListener) {
87
- this.profileMenuOutsideClickListener();
88
- this.profileMenuOutsideClickListener = null;
89
- }
90
- }
91
-
92
- blockBodyScroll(): void {
93
- if (document.body.classList) {
94
- document.body.classList.add('blocked-scroll');
95
- }
96
- else {
97
- document.body.className += ' blocked-scroll';
98
- }
99
- }
100
-
101
- unblockBodyScroll(): void {
102
- if (document.body.classList) {
103
- document.body.classList.remove('blocked-scroll');
104
- }
105
- else {
106
- document.body.className = document.body.className.replace(new RegExp('(^|\\b)' +
107
- 'blocked-scroll'.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
108
- }
109
- }
110
-
111
- get containerClass() {
112
- return {
113
- 'layout-theme-light': this.layoutService.layoutConfig.colorScheme === 'light',
114
- 'layout-theme-dark': this.layoutService.layoutConfig.colorScheme === 'dark',
115
- 'layout-overlay': this.layoutService.layoutConfig.menuMode === 'overlay',
116
- 'layout-static': this.layoutService.layoutConfig.menuMode === 'static',
117
- 'layout-static-inactive': this.layoutService.state.staticMenuDesktopInactive && this.layoutService.layoutConfig.menuMode === 'static',
118
- 'layout-overlay-active': this.layoutService.state.overlayMenuActive,
119
- 'layout-mobile-active': this.layoutService.state.staticMenuMobileActive,
120
- 'p-input-filled': this.layoutService.layoutConfig.inputStyle === 'filled',
121
- 'p-ripple-disabled': !this.layoutService.layoutConfig.ripple
122
- }
123
- }
124
-
125
- ngOnDestroy() {
126
- if (this.overlayMenuOpenSubscription) {
127
- this.overlayMenuOpenSubscription.unsubscribe();
128
- }
129
-
130
- if (this.menuOutsideClickListener) {
131
- this.menuOutsideClickListener();
132
- }
133
-
134
- this.onAfterNgDestroy();
135
- }
136
-
137
- onAfterNgDestroy = () => {}
138
-
139
- }
140
-
@@ -1,40 +0,0 @@
1
- <ng-container *transloco="let t">
2
- <div *ngIf="root && item.visible === true" class="layout-menuitem-root-text">{{item.label}}</div>
3
- <a *ngIf="(!item.routerLink || item.items) && item.visible === true" [attr.href]="item.url" (click)="itemClick($event)"
4
- [ngClass]="item.styleClass" [attr.target]="item.target" tabindex="0" pRipple>
5
- <i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
6
- <span class="layout-menuitem-text">{{item.label}}</span>
7
- <i class="pi pi-fw pi-angle-down layout-submenu-toggler" *ngIf="item.items"></i>
8
- </a>
9
- <a *ngIf="(item.routerLink && !item.items) && item.visible === true" (click)="itemClick($event)" [ngClass]="item.styleClass"
10
- [routerLink]="item.routerLink" routerLinkActive="active-route" [routerLinkActiveOptions]="item.routerLinkActiveOptions||{ paths: 'exact', queryParams: 'ignored', matrixParams: 'ignored', fragment: 'ignored' }"
11
- [fragment]="item.fragment" [queryParamsHandling]="item.queryParamsHandling" [preserveFragment]="item.preserveFragment"
12
- [skipLocationChange]="item.skipLocationChange" [replaceUrl]="item.replaceUrl" [state]="item.state" [queryParams]="item.queryParams"
13
- [attr.target]="item.target" tabindex="0" pRipple>
14
- <i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
15
- <span class="layout-menuitem-text">{{item.label}}</span>
16
- <i class="pi pi-fw pi-angle-down layout-submenu-toggler" *ngIf="item.items"></i>
17
- </a>
18
-
19
- <ul *ngIf="item.items && item.visible === true" [@children]="submenuAnimation">
20
- <ng-template ngFor let-child let-i="index" [ngForOf]="item.items">
21
- <li menuitem [item]="child" [index]="i" [parentKey]="key" [class]="child.badgeStyleClass"></li>
22
- </ng-template>
23
- </ul>
24
-
25
- <!-- Delete this in the future iterations, make link to partner in /partners page -->
26
- <spiderly-autocomplete
27
- *ngIf="item.showPartnerDialog"
28
- [control]="selectedPartner"
29
- [options]="partnerOptions"
30
- (onTextInput)="searchPartners($event)"
31
- label=""
32
- [placeholder]="t('SelectThePartner')"
33
- [showAddon]="true"
34
- (onButtonClick)="partnersAutocompleteButtonClick()"
35
- addonIcon="pi pi-check"
36
- [emptyMessage]="t('LeftCornerPartnersEmptyMessage')"
37
- class="mobile-stay-open"
38
- ></spiderly-autocomplete>
39
-
40
- </ng-container>
@@ -1,179 +0,0 @@
1
- import { ChangeDetectorRef, Component, HostBinding, Input, OnDestroy, OnInit } from '@angular/core';
2
- import { NavigationEnd, Router, RouterModule } from '@angular/router';
3
- import { animate, state, style, transition, trigger } from '@angular/animations';
4
- import { Subscription } from 'rxjs';
5
- import { filter } from 'rxjs/operators';
6
- import { SidebarMenuService } from './sidebar-menu.service';
7
- import { SpiderlyMenuItem } from './sidebar-menu.component';
8
- import { AutoCompleteCompleteEvent } from 'primeng/autocomplete';
9
- import { SpiderlyFormControl } from '../../spiderly-form-control/spiderly-form-control';
10
- import { PrimengOption } from '../../../entities/primeng-option';
11
- import { LayoutBaseService } from '../../../services/app-layout-base.service';
12
- import { AuthBaseService } from '../../../services/auth-base.service';
13
- import { ApiSecurityService } from '../../../services/api.service.security';
14
- import { ConfigBaseService } from '../../../services/config-base.service';
15
- import { CommonModule } from '@angular/common';
16
- import { PrimengModule } from '../../../modules/primeng.module';
17
- import { SpiderlyControlsModule } from '../../../controls/spiderly-controls.module';
18
- import { TranslocoDirective } from '@jsverse/transloco';
19
-
20
- @Component({
21
- // eslint-disable-next-line @angular-eslint/component-selector
22
- selector: '[menuitem]',
23
- templateUrl: './menuitem.component.html',
24
- animations: [
25
- trigger('children', [
26
- state('collapsed', style({
27
- height: '0'
28
- })),
29
- state('expanded', style({
30
- height: '*'
31
- })),
32
- transition('collapsed <=> expanded', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
33
- ])
34
- ],
35
- imports: [
36
- CommonModule,
37
- RouterModule,
38
- PrimengModule,
39
- TranslocoDirective,
40
- SpiderlyControlsModule,
41
- ]
42
- })
43
- export class MenuitemComponent implements OnInit, OnDestroy {
44
-
45
- @Input() item: SpiderlyMenuItem;
46
-
47
- @Input() index!: number;
48
-
49
- @Input() @HostBinding('class.layout-root-menuitem') root!: boolean;
50
-
51
- @Input() parentKey!: string;
52
-
53
- active = false;
54
-
55
- private menuSourceSubscription: Subscription;
56
-
57
- private menuResetSubscription: Subscription;
58
-
59
- private permissionSubscription: Subscription | null = null;
60
-
61
- key: string = "";
62
-
63
- selectedPartner: SpiderlyFormControl = new SpiderlyFormControl<string>(null, { updateOn: 'change' });
64
-
65
- partnerOptions: PrimengOption[];
66
-
67
- constructor(
68
- public layoutService: LayoutBaseService,
69
- private cd: ChangeDetectorRef,
70
- public router: Router,
71
- private menuService: SidebarMenuService,
72
- private authService: AuthBaseService,
73
- private apiService: ApiSecurityService,
74
- private config: ConfigBaseService
75
- ) {
76
- this.menuSourceSubscription = this.menuService.menuSource$.subscribe(value => {
77
- Promise.resolve(null).then(() => {
78
- if (value.routeEvent) {
79
- this.active = (value.key === this.key || value.key.startsWith(this.key + '-')) ? true : false;
80
- }
81
- else {
82
- if (value.key !== this.key && !value.key.startsWith(this.key + '-')) {
83
- this.active = false;
84
- }
85
- }
86
- });
87
- });
88
-
89
- this.menuResetSubscription = this.menuService.resetSource$.subscribe(() => {
90
- this.active = false;
91
- });
92
-
93
- this.router.events.pipe(filter(event => event instanceof NavigationEnd))
94
- .subscribe(params => {
95
- if (this.item.routerLink) {
96
- this.updateActiveStateFromRoute();
97
- }
98
- });
99
- }
100
-
101
- ngOnInit() {
102
- this.key = this.parentKey ? this.parentKey + '-' + this.index : String(this.index);
103
-
104
- if (this.item.routerLink) {
105
- this.updateActiveStateFromRoute();
106
- }
107
-
108
- this.permissionSubscription = this.authService.currentUserPermissionCodes$.subscribe((currentUserPermissionCodes: string[]) => {
109
- if (this.item && typeof this.item.hasPermission === 'function') {
110
- this.item.visible = this.item.hasPermission(currentUserPermissionCodes);
111
- }
112
- });
113
- }
114
-
115
- updateActiveStateFromRoute() {
116
- let activeRoute = this.router.isActive(this.item.routerLink[0], { paths: 'exact', queryParams: 'ignored', matrixParams: 'ignored', fragment: 'ignored' });
117
-
118
- if (activeRoute) {
119
- this.menuService.onMenuStateChange({ key: this.key, routeEvent: true });
120
- }
121
- }
122
-
123
- itemClick(event: Event) {
124
- // avoid processing disabled items
125
- if (this.item.disabled || event === null) {
126
- event.preventDefault();
127
- return;
128
- }
129
-
130
- // execute command
131
- if (this.item.command) {
132
- this.item.command({ originalEvent: event, item: this.item });
133
- }
134
-
135
- // toggle active state
136
- if (this.item.items) {
137
- this.active = !this.active;
138
- }
139
-
140
- this.menuService.onMenuStateChange({ key: this.key });
141
- }
142
-
143
- get submenuAnimation() {
144
- return this.root ? 'expanded' : (this.active ? 'expanded' : 'collapsed');
145
- }
146
-
147
- @HostBinding('class.active-menuitem')
148
- get activeClass() {
149
- return this.active && !this.root;
150
- }
151
-
152
- //#region FT HACK: Partner
153
-
154
- searchPartners(event: AutoCompleteCompleteEvent) {
155
- this.layoutService.searchPartners(event).subscribe(po => {
156
- this.partnerOptions = po;
157
- })
158
- }
159
-
160
- partnersAutocompleteButtonClick = async () => {
161
- this.layoutService.partnersAutocompleteButtonClick(this.selectedPartner);
162
- }
163
-
164
- //#endregion
165
-
166
- ngOnDestroy() {
167
- if (this.menuSourceSubscription) {
168
- this.menuSourceSubscription.unsubscribe();
169
- }
170
-
171
- if (this.menuResetSubscription) {
172
- this.menuResetSubscription.unsubscribe();
173
- }
174
-
175
- if (this.permissionSubscription) {
176
- this.permissionSubscription.unsubscribe();
177
- }
178
- }
179
- }
@@ -1,6 +0,0 @@
1
- <ul class="layout-menu">
2
- <ng-container *ngFor="let item of menu; let i = index;">
3
- <li menuitem *ngIf="!item.separator" [item]="item" [index]="i" [root]="true"></li>
4
- <li *ngIf="item.separator" class="gray-separator" style="margin-top: 11px;"></li>
5
- </ng-container>
6
- </ul>
@@ -1,44 +0,0 @@
1
- import { TranslocoService } from '@jsverse/transloco';
2
- import { Input, OnInit } from '@angular/core';
3
- import { Component } from '@angular/core';
4
- import { MenuItem } from 'primeng/api';
5
- import { LayoutBaseService } from '../../../services/app-layout-base.service';
6
- import { AuthBaseService } from '../../../services/auth-base.service';
7
- import { ConfigBaseService } from '../../../services/config-base.service';
8
- import { MenuitemComponent } from './menuitem.component';
9
- import { CommonModule } from '@angular/common';
10
-
11
- export interface SpiderlyMenuItem extends MenuItem{
12
- hasPermission?: (permissionCodes: string[]) => boolean;
13
- showPartnerDialog?: boolean;
14
- }
15
-
16
- @Component({
17
- selector: 'sidebar-menu', // FT: Don't chane selector to 'menu', because other style will apply to it
18
- templateUrl: './sidebar-menu.component.html',
19
- imports: [
20
- CommonModule,
21
- MenuitemComponent
22
- ]
23
- })
24
- export class SidebarMenuComponent implements OnInit {
25
- @Input() menu: SpiderlyMenuItem[];
26
-
27
- constructor(
28
- public layoutService: LayoutBaseService,
29
- private authService: AuthBaseService,
30
- private translocoService: TranslocoService,
31
- private config: ConfigBaseService
32
- ) {
33
-
34
- }
35
-
36
- ngOnInit() {
37
- }
38
-
39
-
40
- ngOnDestroy(): void {
41
-
42
- }
43
-
44
- }
@@ -1,22 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import { Subject } from 'rxjs';
3
- import { MenuChangeEvent } from '../../../entities/menuchangeevent';
4
-
5
- @Injectable({
6
- providedIn: 'root'
7
- })
8
- export class SidebarMenuService {
9
- private menuSource = new Subject<MenuChangeEvent>();
10
- private resetSource = new Subject();
11
-
12
- menuSource$ = this.menuSource.asObservable();
13
- resetSource$ = this.resetSource.asObservable();
14
-
15
- onMenuStateChange(event: MenuChangeEvent) {
16
- this.menuSource.next(event);
17
- }
18
-
19
- reset() {
20
- this.resetSource.next(true);
21
- }
22
- }
@@ -1 +0,0 @@
1
- <sidebar-menu [menu]="menu"></sidebar-menu>
@@ -1,20 +0,0 @@
1
- import { Component, ElementRef, Input } from '@angular/core';
2
- import { SidebarMenuComponent, SpiderlyMenuItem } from './sidebar-menu.component';
3
-
4
- @Component({
5
- selector: 'sidebar',
6
- templateUrl: './sidebar.component.html',
7
- imports: [
8
- SidebarMenuComponent
9
- ]
10
- })
11
- export class AppSidebarComponent {
12
- @Input() menu: SpiderlyMenuItem[];
13
-
14
- constructor(public el: ElementRef) {
15
- }
16
-
17
- ngOnInit(){
18
- }
19
- }
20
-
@@ -1,64 +0,0 @@
1
- <div class="layout-topbar">
2
- <a class="layout-topbar-logo" routerLink="/">
3
- <span>{{companyName?.toLocaleUpperCase()}}</span>
4
- </a>
5
-
6
- <button
7
- #menubutton
8
- class="p-link layout-menu-button layout-topbar-button"
9
- (click)="layoutService.onMenuToggle()"
10
- >
11
- <i class="pi pi-bars"></i>
12
- </button>
13
-
14
- <div
15
- #topbarmenu
16
- class="profile-button"
17
- >
18
- <div
19
- #topbarprofiledropdownmenubutton
20
- (click)="layoutService.showProfileDropdownSidebar()"
21
- >
22
- <p-avatar
23
- *ngIf="showProfileIcon"
24
- [label]="avatarLabel"
25
- [style]="{ 'background-color': 'var(--p-primary-color)', 'color': '#fff', 'cursor': 'pointer', 'width': '34px', 'height': '34px', 'font-size': '21px' }"
26
- pBadge
27
- [badgeStyleClass]="'p-badge-danger'"
28
- [badgeDisabled]="unreadNotificationsCount == 0 || unreadNotificationsCount == null"
29
- [value]="unreadNotificationsCount"
30
- />
31
- </div>
32
- <div
33
- #topbarprofiledropdownmenu
34
- (document:click)="onDocumentClick($event)"
35
- >
36
- <div *ngIf="layoutService.state.profileDropdownSidebarVisible" style="width: 280px; position: absolute; right: 26px; top: 60px; padding: 15px;" class="card">
37
- <div style="display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 10px;">
38
- <p-avatar
39
- [label]="avatarLabel"
40
- size="xlarge"
41
- [style]="{ 'background-color': 'var(--p-primary-color)', 'color': '#fff', 'cursor': 'pointer', 'margin': 'auto' }"
42
- (click)="routeToUserPage()"
43
- />
44
- <div>{{currentUser?.email}}</div>
45
- </div>
46
- <div style="margin-top: 15px;">
47
- <div *ngFor="let item of menuItems" [style]="item.showSeparator ? 'margin-top: 5px;' : ''">
48
- <div *ngIf="item.showSeparator" class="gray-separator"></div>
49
- <div (click)="item.onClick()" class="hover-card" style="display: flex; align-items: center; gap: 5px; margin-top: 5px;">
50
- <i
51
- class="pi pi-fw {{item.icon}} primary-color"
52
- style="font-size: 16px; position: relative;"
53
- >
54
- <span *ngIf="item.showNotificationBadge && unreadNotificationsCount != 0" class="badge"></span>
55
- </i>
56
- <div> {{item.label}} </div>
57
- </div>
58
- </div>
59
- </div>
60
- </div>
61
- </div>
62
- </div>
63
- </div>
64
-