spiderly 19.0.1 → 19.0.2

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 (255) hide show
  1. package/fesm2022/spiderly.mjs +4612 -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 +13 -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/primeng.module.d.ts +42 -0
  85. package/lib/modules/spiderly-transloco.module.d.ts +15 -0
  86. package/lib/services/api.service.security.d.ts +35 -0
  87. package/lib/services/app-initializer.d.ts +4 -0
  88. package/lib/services/app-layout-base.service.d.ts +60 -0
  89. package/lib/services/auth-base.service.d.ts +55 -0
  90. package/lib/services/base-form.service.d.ts +27 -0
  91. package/lib/services/config-base.service.d.ts +24 -0
  92. package/lib/services/helper-functions.d.ts +37 -0
  93. package/lib/services/spiderly-message.service.d.ts +17 -0
  94. package/lib/services/spiderly-transloco-loader.d.ts +10 -0
  95. package/lib/services/translate-labels-abstract.service.d.ts +7 -0
  96. package/lib/services/validator-abstract.service.d.ts +13 -0
  97. package/package.json +66 -55
  98. package/{src/public-api.ts → public-api.d.ts} +91 -103
  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/shared.scss +0 -0
  255. /package/{src/lib → styles}/styles/styles.scss +0 -0
@@ -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
-
@@ -1,137 +0,0 @@
1
- import { TranslocoService } from '@jsverse/transloco';
2
- import { NavigationEnd, Router, RouterModule } from '@angular/router';
3
- import { Component, ElementRef, OnDestroy, ViewChild } from '@angular/core';
4
- import { filter, Subscription } from 'rxjs';
5
- import { AuthBaseService } from '../../../services/auth-base.service';
6
- import { LayoutBaseService } from '../../../services/app-layout-base.service';
7
- import { ApiSecurityService } from '../../../services/api.service.security';
8
- import { ConfigBaseService } from '../../../services/config-base.service';
9
- import { User } from '../../../entities/security-entities';
10
- import { CommonModule } from '@angular/common';
11
- import { PrimengModule } from '../../../modules/primeng.module';
12
-
13
- interface SpiderlyMenuItem {
14
- label?: string;
15
- icon?: string;
16
- showSeparator?: boolean;
17
- onClick?: () => void;
18
- showNotificationBadge?: boolean;
19
- }
20
-
21
- @Component({
22
- selector: 'topbar',
23
- templateUrl: './topbar.component.html',
24
- styles: [],
25
- imports: [
26
- CommonModule,
27
- PrimengModule,
28
- RouterModule
29
- ]
30
- })
31
- export class AppTopBarComponent implements OnDestroy {
32
- private initTopBarSubscription: Subscription | null = null;
33
-
34
- currentUser: User;
35
- userProfilePath: string;
36
- unreadNotificationsCount: number;
37
- menuItems: SpiderlyMenuItem[] = [];
38
- avatarLabel: string;
39
- companyName: string;
40
- showProfileIcon: boolean = false;
41
-
42
- notificationMenuItem: SpiderlyMenuItem =
43
- {
44
- label: this.translocoService.translate('Notifications'),
45
- icon: 'pi-bell',
46
- showNotificationBadge: true,
47
- onClick: () => {
48
- this.router.navigateByUrl(`/notifications`);
49
- },
50
- };
51
-
52
- @ViewChild('menubutton') menuButton!: ElementRef;
53
-
54
- @ViewChild('topbarmenu') menu!: ElementRef;
55
-
56
- @ViewChild('topbarprofiledropdownmenubutton') topbarProfileDropdownMenuButton!: ElementRef;
57
-
58
- constructor(
59
- public layoutService: LayoutBaseService,
60
- private authService: AuthBaseService,
61
- private apiService: ApiSecurityService,
62
- protected router: Router,
63
- private translocoService: TranslocoService,
64
- private config: ConfigBaseService
65
- ) {
66
- }
67
-
68
- async ngOnInit(){
69
- this.menuItems = [
70
- {
71
- label: this.translocoService.translate('YourProfile'),
72
- icon: 'pi-user',
73
- showSeparator: true,
74
- onClick: () => {
75
- this.routeToUserPage();
76
- }
77
- },
78
- this.notificationMenuItem,
79
- // {
80
- // label: this.translocoService.translate('Settings'),
81
- // icon: 'pi-cog',
82
- // onClick: () => {
83
- // this.router.navigateByUrl(`/administration/users`);
84
- // }
85
- // },
86
- {
87
- label: this.translocoService.translate('Logout'),
88
- icon: 'pi-sign-out',
89
- showSeparator: true,
90
- onClick: () => {
91
- this.authService.logout();
92
- }
93
- }
94
- ];
95
-
96
- this.router.events
97
- .pipe(filter(event => event instanceof NavigationEnd))
98
- .subscribe((event: NavigationEnd) => {
99
- this.layoutService.state.profileDropdownSidebarVisible = false;
100
- });
101
-
102
- this.onAfterNgOnInit();
103
- }
104
-
105
- onAfterNgOnInit = () => {
106
- this.initTopBarSubscription = this.layoutService.initTopBarData().subscribe(initTopBarData => {
107
- this.userProfilePath = initTopBarData.userProfilePath;
108
- this.companyName = initTopBarData.companyName;
109
- this.unreadNotificationsCount = initTopBarData.unreadNotificationsCount;
110
- this.notificationMenuItem.showNotificationBadge = initTopBarData.unreadNotificationsCount > 0;
111
- this.showProfileIcon = initTopBarData.showProfileIcon;
112
- this.currentUser = initTopBarData.currentUser;
113
- this.avatarLabel = initTopBarData.currentUser?.email.charAt(0).toLocaleUpperCase();
114
- });
115
- }
116
-
117
- onDocumentClick(event: any) {
118
- if (
119
- !this.menu.nativeElement.contains(event.target)
120
- ) {
121
- if (this.layoutService.state.profileDropdownSidebarVisible == true) {
122
- this.layoutService.state.profileDropdownSidebarVisible = false;
123
- }
124
- }
125
- }
126
-
127
- routeToUserPage(){
128
- this.router.navigateByUrl(this.userProfilePath);
129
- }
130
-
131
- ngOnDestroy(): void {
132
- if (this.initTopBarSubscription) {
133
- this.initTopBarSubscription.unsubscribe();
134
- }
135
- }
136
-
137
- }
@@ -1,27 +0,0 @@
1
- <div class="flex min-h-screen overflow-hidden" style="padding: 20px;">
2
- <div class="flex flex-column w-full">
3
- <div class="w-full sm:w-30rem" style="margin: auto; border-radius:50px; padding:0.3rem; background: linear-gradient(180deg, var(--p-primary-color) 10%, rgba(33, 150, 243, 0) 30%);">
4
- <div class="surface-card py-6 px-5 sm:px-6" style="border-radius:45px;">
5
- <div class="text-center">
6
- <img
7
- src="assets/images/logo/logo.svg"
8
- alt="{{companyName}} Logo"
9
- title="{{companyName}} Logo"
10
- height="60"
11
- class="mb-2 w-6rem flex-shrink-0"
12
- >
13
- </div>
14
- <h1 class="mb-4">
15
- <div class="font-bold text-5xl lg:text-6xl gradient-title">404</div>
16
- <div class="font-bold text-5xl lg:text-6xl">Page Not Found</div>
17
- </h1>
18
- <div class="text-600 text-lg mb-5">
19
- The page you're looking for doesn't exist or has been moved. Let's get you back on track.
20
- </div>
21
- <div>
22
- <p-button [routerLink]="['/']" label="Go to Homepage"></p-button>
23
- </div>
24
- </div>
25
- </div>
26
- </div>
27
- </div>
@@ -1,22 +0,0 @@
1
- import { Component } from '@angular/core';
2
- import { ConfigBaseService } from '../../services/config-base.service';
3
- import { RouterModule } from '@angular/router';
4
- import { ButtonModule } from 'primeng/button';
5
-
6
- @Component({
7
- selector: 'not-found',
8
- templateUrl: './not-found.component.html',
9
- imports: [
10
- RouterModule,
11
- ButtonModule,
12
- ]
13
- })
14
- export class NotFoundComponent {
15
- companyName = this.config.companyName;
16
-
17
- constructor(
18
- private config: ConfigBaseService
19
- ) {
20
-
21
- }
22
- }
@@ -1 +0,0 @@
1
- <span style="color: red; margin-left: 4px;">*</span>
@@ -1,13 +0,0 @@
1
- import { Component } from "@angular/core";
2
-
3
- @Component({
4
- selector: 'required',
5
- templateUrl: './required.component.html',
6
- styles: [],
7
- standalone: true,
8
- })
9
- export class RequiredComponent {
10
-
11
- constructor() {}
12
-
13
- }
@@ -1,5 +0,0 @@
1
- <ng-container *transloco="let t">
2
- <spiderly-button (onClick)="handleGoogleLogin()" [label]="t('ContinueWithGoogle')" [outlined]="true" [style]="{width: '100%'}">
3
- <svg xmlns="http://www.w3.org/2000/svg" width="0.98em" height="1em" viewBox="0 0 256 262"><path fill="#4285f4" d="M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"/><path fill="#34a853" d="M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"/><path fill="#fbbc05" d="M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z"/><path fill="#eb4335" d="M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"/></svg>
4
- </spiderly-button>
5
- </ng-container>
@@ -1,53 +0,0 @@
1
- import { Component, EventEmitter, Output } from "@angular/core";
2
- import { TranslocoDirective } from "@jsverse/transloco";
3
- import { ButtonModule } from "primeng/button";
4
- import { SpiderlyButtonComponent } from "../spiderly-button/spiderly-button.component";
5
-
6
- @Component({
7
- selector: 'google-button',
8
- templateUrl: './google-button.component.html',
9
- styles: [],
10
- imports: [
11
- ButtonModule,
12
- TranslocoDirective,
13
- SpiderlyButtonComponent
14
- ]
15
- })
16
- export class GoogleButtonComponent { // Custom styling of the google button - https://medium.com/simform-engineering/implement-custom-google-sign-in-using-angular-16-9c93aeff6252
17
- // @Output() onClick: EventEmitter<any> = new EventEmitter();
18
- @Output() loginWithGoogle: EventEmitter<any> = new EventEmitter<any>();
19
-
20
- constructor() {}
21
-
22
- createFakeGoogleWrapper = () => {
23
- const googleLoginWrapper = document.createElement('div');
24
- googleLoginWrapper.style.display = 'none';
25
- googleLoginWrapper.classList.add('custom-google-button');
26
- document.body.appendChild(googleLoginWrapper);
27
- window.google.accounts.id.renderButton(googleLoginWrapper, {
28
- type: 'icon',
29
- width: '200',
30
- });
31
-
32
- const googleLoginWrapperButton = googleLoginWrapper.querySelector(
33
- 'div[role=button]'
34
- ) as HTMLElement;
35
-
36
- return {
37
- click: () => {
38
- googleLoginWrapperButton?.click();
39
- },
40
- };
41
- };
42
-
43
- handleGoogleLogin() {
44
- this.loginWithGoogle.emit(this.createFakeGoogleWrapper());
45
- }
46
-
47
- }
48
-
49
- declare global {
50
- interface Window {
51
- google: any;
52
- }
53
- }
@@ -1,3 +0,0 @@
1
- <ng-container *transloco="let t">
2
- <spiderly-button (onClick)="onReturn()" [label]="t('Return')" icon="pi pi-undo" [outlined]="true"></spiderly-button>
3
- </ng-container>