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,60 +0,0 @@
1
- import { FormArray, FormControl, FormControlOptions, FormControlState, FormGroup, ValidatorFn } from '@angular/forms';
2
- import { Observable } from 'rxjs';
3
- import { BaseEntity } from '../../entities/base-entity';
4
-
5
- export interface SpiderlyValidatorFn extends ValidatorFn {
6
- hasNotEmptyRule?: boolean;
7
- }
8
-
9
- // It's made like generic type because of <number>, <string> etc. not to put class like User.
10
- export class SpiderlyFormControl<T = any> extends FormControl<T> {
11
- public label: string;
12
- public labelForDisplay: string;
13
- public required: boolean;
14
- private _spiderlyValidator: SpiderlyValidatorFn | null;
15
-
16
- constructor(value: any, opts: FormControlOptions=null, required:boolean=false) {
17
- opts = opts ?? {updateOn: 'blur'};
18
- super(value, opts);
19
- this.required = required;
20
- }
21
-
22
- override getRawValue(): T { // Doing this because .value gets only not disabled values
23
- return super.getRawValue() as T;
24
- }
25
-
26
- public override get validator(): SpiderlyValidatorFn | null {
27
- return this._spiderlyValidator;
28
- }
29
-
30
- public override set validator(validator: SpiderlyValidatorFn | null) {
31
- this._spiderlyValidator = validator;
32
- this.setValidators(validator);
33
- }
34
- }
35
-
36
- export class SpiderlyFormGroup<TValue = any> extends FormGroup {
37
- declare controls: { [P in keyof TValue]: SpiderlyFormControl<TValue[P]> };
38
-
39
- constructor(controls: { [P in keyof TValue]: SpiderlyFormControl<TValue[P]> }) {
40
- super(controls);
41
- }
42
-
43
- override getRawValue(): TValue { // Doing this because .value gets only not disabled values
44
- return super.getRawValue() as TValue;
45
- }
46
-
47
- public name?: string; // Using for nested form groups
48
- public mainDTOName?: string;
49
- public saveObservableMethod?: (saveBody: any) => Observable<any>;
50
- public initSaveBody?: () => BaseEntity = () => null;
51
- public controlNamesFromHtml?: string[] = [];
52
- }
53
-
54
- export class SpiderlyFormArray<TValue = any> extends FormArray {
55
- override value: TValue[]; // There is no getRawValue in FormArray
56
- public required: boolean;
57
- public modelConstructor: TValue;
58
- public translationKey: string;
59
- public controlNamesFromHtml?: string[] = [];
60
- }
@@ -1,8 +0,0 @@
1
- <!-- FT: this is selector, not the class -->
2
- <div class="panel-body"
3
- [ngClass]="{
4
- 'non-grid-panel-bottom-padding': normalBottomPadding,
5
- }">
6
- <!-- 'card': true, -->
7
- <ng-content></ng-content>
8
- </div>
@@ -1,16 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'panel-body',
5
- templateUrl: './panel-body.component.html',
6
- styles: [],
7
- standalone: false
8
- })
9
- export class PanelBodyComponent implements OnInit {
10
- @Input() normalBottomPadding: boolean = false; // FT: By default we set to false, when the grid is inside the body.
11
-
12
- constructor() { }
13
-
14
- ngOnInit(): void {
15
- }
16
- }
@@ -1,8 +0,0 @@
1
- <div class="spiderly-panel-footer">
2
- <div class="buttons-wrapper">
3
- <ng-content></ng-content>
4
- </div>
5
- <span class="p-text-secondary">
6
- <ng-content select="[footerRight]"></ng-content>
7
- </span>
8
- </div>
@@ -1,15 +0,0 @@
1
- import { Component, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'panel-footer',
5
- templateUrl: './panel-footer.component.html',
6
- styleUrl: './panel-footer.component.scss',
7
- standalone: false
8
- })
9
- export class PanelFooterComponent implements OnInit {
10
-
11
- constructor() { }
12
-
13
- ngOnInit(): void {
14
- }
15
- }
@@ -1,25 +0,0 @@
1
- <div style="display: flex; align-items: center; gap: 24px; flex-wrap: wrap;">
2
- @if (tabs == null) {
3
- <div style="display: flex; align-items: center; gap: 14px;">
4
- <span *ngIf="index != null" class="number-circle">{{index + 1}}</span>
5
- <i class="{{icon}} primary-color" [style]="showBigTitle ? 'font-size: 19px' : 'font-size: 16px;'"></i>
6
- <h2 [style]="(showBigTitle ? 'font-size: 16px;' : '')" class="remove-h-css">{{title}}</h2>
7
- </div>
8
- }
9
- @else {
10
- @for (tab of tabs; track $index) {
11
- <div (click)="setTabIsSelected(tab)"
12
- [style]="{
13
- display: 'flex',
14
- alignItems: 'center',
15
- gap: '14px',
16
- cursor: 'pointer',
17
- fontWeight: tab.isSelected ? '700' : 'normal'
18
- }">
19
- <span *ngIf="index != null" class="number-circle">{{index + 1}}</span>
20
- <i class="{{tab.icon}} primary-color" [style]="showBigTitle ? 'font-size: 19px' : 'font-size: 16px;'"></i>
21
- <div [style]="showBigTitle ? 'font-size: 16px' : ''">{{tab.label}}</div>
22
- </div>
23
- }
24
- }
25
- </div>
@@ -1,69 +0,0 @@
1
- import { TranslocoService } from '@jsverse/transloco';
2
- import { Component, OnInit, Input } from '@angular/core';
3
-
4
- @Component({
5
- selector: 'panel-header',
6
- templateUrl: './panel-header.component.html',
7
- styles: [`
8
- .p-panel-icons-end {
9
- font-size: 50px;
10
- }
11
- `],
12
- standalone: false
13
- })
14
- export class PanelHeaderComponent implements OnInit {
15
- @Input() title: string;
16
- @Input() showBigTitle: boolean;
17
- @Input() showIcon: boolean = true;
18
- @Input() icon: string;
19
- @Input() index: number;
20
- @Input() tabs: SpiderlyTab[];
21
-
22
- constructor(
23
- private translocoService: TranslocoService
24
- ) { }
25
-
26
- ngOnInit(): void {
27
- if (this.title == null)
28
- this.title = this.translocoService.translate('Details');
29
-
30
- if (this.showIcon === true && this.icon == null)
31
- this.icon = 'pi pi-file-edit';
32
- }
33
-
34
- setTabIsSelected(tab: SpiderlyTab){
35
- this.tabs.forEach(t => {
36
- t.isSelected = false;
37
- });
38
-
39
- tab.isSelected = true;
40
- }
41
- }
42
-
43
- export class SpiderlyTab
44
- {
45
- label?: string;
46
- id?: number;
47
- icon?: string;
48
- isSelected?: boolean;
49
-
50
- constructor(
51
- {
52
- label,
53
- id,
54
- icon,
55
- isSelected,
56
- }:{
57
- label?: string;
58
- id?: number;
59
- icon?: string;
60
- isSelected?: boolean;
61
- } = {}
62
- ) {
63
- this.label = label;
64
- this.id = id;
65
- this.icon = icon;
66
- this.isSelected = isSelected;
67
- }
68
-
69
- }
@@ -1,7 +0,0 @@
1
- <div class="card responsive-card-padding">
2
- <div style="display: flex; align-items: center; margin-bottom: 14px; gap: 12px;">
3
- <i style="font-size: 20px;" class="{{icon}} primary-color"></i>
4
- <h5 style="margin: 0;">{{title}}</h5>
5
- </div>
6
- <ng-content></ng-content>
7
- </div>
@@ -1,17 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'spiderly-card',
5
- templateUrl: './spiderly-card.component.html',
6
- styles: [],
7
- standalone: false
8
- })
9
- export class SpiderlyCardComponent implements OnInit {
10
- @Input() icon: string = 'pi pi-file-edit';
11
- @Input() title: string;
12
-
13
- constructor() { }
14
-
15
- ngOnInit(): void {
16
- }
17
- }
@@ -1,40 +0,0 @@
1
- <p-panel
2
- [showHeader]="showPanelHeader"
3
- [ngClass]="{
4
- 'multiple-panel-first-without-header': isFirstMultiplePanel && !showPanelHeader,
5
- 'multiple-panel-first': isFirstMultiplePanel,
6
- 'multiple-panel-middle-without-header': isMiddleMultiplePanel && !showPanelHeader,
7
- 'multiple-panel-middle': isMiddleMultiplePanel,
8
- 'multiple-panel-last-without-header': isLastMultiplePanel && !showPanelHeader,
9
- 'multiple-panel-last': isLastMultiplePanel,
10
- 'panel-border': !isFirstMultiplePanel,
11
- 'spiderly-panel': true,
12
- }"
13
- [toggleable]="toggleable"
14
- [collapsed]="toggleable && collapsed"
15
- expandIcon="pi pi-chevron-up"
16
- collapseIcon="pi pi-chevron-down"
17
- >
18
- <ng-template pTemplate="header">
19
- <div>
20
- <ng-content select="panel-header"></ng-content>
21
- </div>
22
- </ng-template>
23
-
24
- <ng-template pTemplate="icons">
25
- <div *ngIf="showCrudMenu && crudMenu" class="mr-2">
26
- <i class="pi pi-ellipsis-h icon-hover" (click)="menuItemClick(index, $event)"></i>
27
- <p-menu #menu [model]="crudMenu" [popup]="true" appendTo="body"></p-menu>
28
- </div>
29
- <div *ngIf="showRemoveIcon" class="mr-2">
30
- <i class="pi pi-minus icon-hover error-color-light" (click)="removeItemClick()"></i>
31
- </div>
32
- </ng-template>
33
-
34
- <div class="panel-body-wrapper">
35
- <ng-content select="panel-body"></ng-content>
36
- </div>
37
-
38
- <ng-content select="panel-footer"></ng-content>
39
-
40
- </p-panel>
@@ -1,42 +0,0 @@
1
- import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
2
- import { MenuItem } from 'primeng/api';
3
- import { Menu } from 'primeng/menu';
4
-
5
- @Component({
6
- selector: 'spiderly-panel',
7
- templateUrl: './spiderly-panel.component.html',
8
- styleUrl: './spiderly-panel.component.scss',
9
- standalone: false
10
- })
11
- export class SpiderlyPanelComponent implements OnInit {
12
- @Input() isFirstMultiplePanel: boolean = false;
13
- @Input() isMiddleMultiplePanel: boolean = false;
14
- @Input() isLastMultiplePanel: boolean = false;
15
- @Input() toggleable: boolean = false;
16
- @Input() collapsed: boolean = false;
17
- @Input() crudMenu: MenuItem[];
18
- @Input() showCrudMenu: boolean = true;
19
- @Input() showRemoveIcon: boolean = false;
20
- @Input() index: number;
21
- @Input() showPanelHeader: boolean = true;
22
-
23
- @Output() onMenuIconClick: EventEmitter<number> = new EventEmitter();
24
- @Output() onRemoveIconClick: EventEmitter<null> = new EventEmitter();
25
-
26
- @ViewChild('menu') menu: Menu;
27
-
28
- constructor() { }
29
-
30
- ngOnInit(): void {
31
- }
32
-
33
- menuItemClick(index: number, event){
34
- this.menu.toggle(event);
35
- this.onMenuIconClick.next(index);
36
- }
37
-
38
- removeItemClick(){
39
- this.onRemoveIconClick.next(null);
40
- }
41
-
42
- }
@@ -1,32 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { PanelBodyComponent } from './panel-body/panel-body.component';
4
- import { PanelFooterComponent } from './panel-footer/panel-footer.component';
5
- import { PanelHeaderComponent } from './panel-header/panel-header.component';
6
- import { SpiderlyPanelComponent } from './spiderly-panel/spiderly-panel.component';
7
- import { SpiderlyCardComponent } from './spiderly-card/spiderly-card.component';
8
- import { PrimengModule } from '../../modules/primeng.module';
9
-
10
- @NgModule({
11
- imports: [
12
- CommonModule,
13
- PrimengModule,
14
- ],
15
- exports: [
16
- PanelHeaderComponent,
17
- PanelBodyComponent,
18
- PanelFooterComponent,
19
- SpiderlyPanelComponent,
20
- SpiderlyCardComponent
21
- ],
22
- declarations: [
23
- PanelHeaderComponent,
24
- PanelBodyComponent,
25
- PanelFooterComponent,
26
- SpiderlyPanelComponent,
27
- SpiderlyCardComponent
28
- ],
29
- providers: [
30
- ]
31
- })
32
- export class SpiderlyPanelsModule {}
@@ -1,17 +0,0 @@
1
- import {
2
- Component,
3
- EventEmitter,
4
- Output,
5
- } from '@angular/core';
6
- import { AutoCompleteCompleteEvent } from 'primeng/autocomplete';
7
- import { BaseDropdownControl } from './base-dropdown-control';
8
-
9
- @Component({
10
- selector: 'base-autocomplete-control',
11
- template: '',
12
- styles: [],
13
- standalone: false
14
- })
15
- export class BaseAutocompleteControl extends BaseDropdownControl {
16
- @Output() onTextInput: EventEmitter<AutoCompleteCompleteEvent> = new EventEmitter();
17
- }
@@ -1,60 +0,0 @@
1
- import {
2
- Component, Input,
3
- } from '@angular/core';
4
- import { SpiderlyFormControl } from '../components/spiderly-form-control/spiderly-form-control';
5
- import { TranslocoService } from '@jsverse/transloco';
6
-
7
- @Component({
8
- selector: 'base-control',
9
- template: '',
10
- styles: [],
11
- standalone: false
12
- })
13
- export class BaseControl {
14
- @Input() control: SpiderlyFormControl; // FT: if you name it formControl: https://stackoverflow.com/a/54755671/21209982
15
- @Input() disabled: boolean = false;
16
- @Input() showLabel: boolean = true;
17
- @Input() label: string = null; // NgModel/Want custom translation
18
- @Input() controlValid: boolean = true; // NgModel
19
- @Input() placeholder: string = '';
20
- @Input() showTooltip: boolean = false;
21
- @Input() tooltipText: string = null;
22
- @Input() tooltipIcon: string = 'pi pi-info-circle';
23
- errorMessageTooltipEvent: 'hover' | 'focus';
24
-
25
- constructor(
26
- protected translocoService: TranslocoService,
27
- ) {
28
-
29
- }
30
-
31
- ngOnInit(){
32
- if(this.control != null && this.disabled == true)
33
- this.control.disable();
34
-
35
- // TODO FT: Delete if you don't need
36
- // if(this.control?.validator?.hasNotEmptyRule == true) // FT HACK: Be carefull with this name, if you change it in generator you need to change it here also
37
- // this.control.required = true;
38
-
39
- this.errorMessageTooltipEvent = window.innerWidth > 1000 ? 'hover' : 'focus'
40
- }
41
-
42
- ngAfterViewInit(){
43
-
44
- }
45
-
46
- getTranslatedLabel(): string{
47
- return this.label ?? this.control.labelForDisplay;
48
- }
49
-
50
- getValidationErrrorMessages(){
51
- if(this.control?.errors && this.control?.dirty){
52
- // FT: it should always be one error message for single form control,
53
- // also i don't need to reassign it to null because it will be shown only when control.valid == false
54
- return this.control.errors['_'];
55
- }
56
-
57
- return null;
58
- }
59
-
60
- }
@@ -1,37 +0,0 @@
1
- import {
2
- Component,
3
- EventEmitter,
4
- Input,
5
- Output,
6
- } from '@angular/core';
7
- import { BaseControl } from './base-control';
8
- import { PrimengOption } from '../entities/primeng-option';
9
- import { TranslocoService } from '@jsverse/transloco';
10
-
11
- @Component({
12
- selector: 'base-dropdown-control',
13
- template: '',
14
- styles: [],
15
- standalone: false
16
- })
17
- export class BaseDropdownControl extends BaseControl {
18
- @Input() options: PrimengOption[];
19
- @Input() showAddon: boolean = false;
20
- @Input() addonIcon: string = 'pi pi-ellipsis-h';
21
- @Input() override placeholder: string = this.translocoService.translate('SelectFromTheList');
22
- @Output() onButtonClick: EventEmitter<null> = new EventEmitter();
23
-
24
- constructor(
25
- protected override translocoService: TranslocoService,
26
- ) {
27
- super(translocoService);
28
- }
29
-
30
- dropdownMarkAsDirty(){
31
- this.control.markAsDirty();
32
- }
33
-
34
- addonClick(){
35
- this.onButtonClick.next(null);
36
- }
37
- }
@@ -1,36 +0,0 @@
1
- <ng-container *transloco="let t">
2
- <div class="flex flex-column gap-2">
3
- <div *ngIf="getTranslatedLabel() != '' && getTranslatedLabel() != null">
4
- <label>{{getTranslatedLabel()}}</label>
5
- <required *ngIf="control?.required"></required>
6
- </div>
7
-
8
- <p-inputgroup>
9
- <p-autocomplete
10
- *ngIf="control"
11
- [pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
12
- [id]="label"
13
- [formControl]="control"
14
- [placeholder]="placeholder"
15
- [suggestions]="options"
16
- optionLabel="label"
17
- optionValue="code"
18
- (completeMethod)="search($event)"
19
- [forceSelection]="true"
20
- [dropdown]="false"
21
- [showClear]="showClear"
22
- (onHide)="dropdownMarkAsDirty()"
23
- (onSelect)="select($event)"
24
- [completeOnFocus]="true"
25
- [style]="{'width': '100%'}"
26
- [fluid]="true"
27
- [appendTo]="appendTo"
28
- [emptyMessage]="emptyMessage"
29
- [lazy]="true"
30
- />
31
- <p-inputgroup-addon *ngIf="showAddon" (click)="addonClick()" [style]="{'cursor': 'pointer', 'background-color': 'var(--p-primary-color)', 'border-color': 'var(--p-primary-color)'}">
32
- <i class="{{addonIcon}}" style="color: #fff;"></i>
33
- </p-inputgroup-addon>
34
- </p-inputgroup>
35
- </div>
36
- </ng-container>
@@ -1,56 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { AutoCompleteCompleteEvent } from 'primeng/autocomplete';
3
- import { BaseAutocompleteControl } from '../base-autocomplete-control';
4
- import { CommonModule } from '@angular/common';
5
- import { ReactiveFormsModule, FormsModule } from '@angular/forms';
6
- import { RequiredComponent } from '../../components/required/required.component';
7
- import { TranslocoDirective, TranslocoService } from '@jsverse/transloco';
8
- import { PrimengModule } from '../../modules/primeng.module';
9
-
10
- @Component({
11
- selector: 'spiderly-autocomplete',
12
- templateUrl: './spiderly-autocomplete.component.html',
13
- styles: [],
14
- imports: [
15
- ReactiveFormsModule,
16
- FormsModule,
17
- PrimengModule,
18
- CommonModule,
19
- RequiredComponent,
20
- TranslocoDirective,
21
- ]
22
- })
23
- export class SpiderlyAutocompleteComponent extends BaseAutocompleteControl implements OnInit {
24
- @Input() appendTo: any = 'body';
25
- @Input() showClear: boolean = true;
26
- @Input() emptyMessage: string;
27
- @Input() displayName: string; // Added because when we initialize the object options are null
28
-
29
- constructor(
30
- protected override translocoService: TranslocoService,
31
- ) {
32
- super(translocoService);
33
- }
34
-
35
- override ngOnInit(){
36
- super.ngOnInit();
37
-
38
- if (this.options == null && this.control.value != null) {
39
- this.options = [
40
- { label: this.displayName, code: this.control.value }
41
- ];
42
- }
43
-
44
- if (this.emptyMessage == null) {
45
- this.emptyMessage = this.translocoService.translate('EmptyMessage');
46
- }
47
- }
48
-
49
- search(event: AutoCompleteCompleteEvent){
50
- this.onTextInput.next(event);
51
- }
52
-
53
- select(event){
54
- }
55
-
56
- }
@@ -1,21 +0,0 @@
1
- <div class="flex flex-column gap-2">
2
- <div *ngIf="getTranslatedLabel() != '' && getTranslatedLabel() != null">
3
- <label>{{getTranslatedLabel()}}</label>
4
- <required *ngIf="control?.required"></required>
5
- <!-- tabindex="-1": Makes the element focusable, but removes it from the tab order. -->
6
- <i *ngIf="showTooltip" class="{{tooltipIcon}}" style="margin-left: 5px; cursor: pointer;" [pTooltip]="tooltipText" tabindex="-1" tooltipEvent="focus"></i>
7
- </div>
8
- <p-datepicker
9
- *ngIf="control"
10
- [pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
11
- [formControl]="control"
12
- (onBlur)="control.markAsDirty()"
13
- dateFormat="dd.mm.yy."
14
- iconDisplay="input"
15
- [showIcon]="true"
16
- [showTime]="showTime"
17
- (onSelect)="setDate($event)"
18
- appendTo="body"
19
- [fluid]="true"
20
- />
21
- </div>
@@ -1,37 +0,0 @@
1
- import { Component, Input, OnInit } from '@angular/core';
2
- import { BaseControl } from '../base-control';
3
- import { CommonModule } from '@angular/common';
4
- import { ReactiveFormsModule, FormsModule } from '@angular/forms';
5
- import { RequiredComponent } from '../../components/required/required.component';
6
- import { TranslocoService } from '@jsverse/transloco';
7
- import { PrimengModule } from '../../modules/primeng.module';
8
-
9
- @Component({
10
- selector: 'spiderly-calendar',
11
- templateUrl: './spiderly-calendar.component.html',
12
- styles: [],
13
- imports: [
14
- CommonModule,
15
- ReactiveFormsModule,
16
- FormsModule,
17
- PrimengModule,
18
- RequiredComponent
19
- ]
20
- })
21
- export class SpiderlyCalendarComponent extends BaseControl implements OnInit {
22
- @Input() showTime: boolean = false;
23
-
24
- constructor(
25
- protected override translocoService: TranslocoService,
26
- ) {
27
- super(translocoService);
28
- }
29
-
30
- override ngOnInit(){
31
- super.ngOnInit();
32
- }
33
-
34
- setDate(event:Date) {
35
-
36
- }
37
- }
@@ -1,16 +0,0 @@
1
- <div class="flex flex-column gap-2">
2
- <div *ngIf="inlineLabel === false && getTranslatedLabel() != '' && getTranslatedLabel() != null">
3
- <label>{{getTranslatedLabel()}}</label>
4
- <required *ngIf="control?.required"></required>
5
- </div>
6
- <div class="p-inputgroup p-fluid" style="margin-top: 0.5rem;">
7
- <p-checkbox
8
- *ngIf="control"
9
- [pTooltip]="getValidationErrrorMessages()" [tooltipEvent]="errorMessageTooltipEvent" tooltipPosition="bottom" [tooltipDisabled]="control.valid" tooltipStyleClass="spiderly-tooltip-invalid"
10
- [formControl]="control"
11
- [value]="inlineLabel ? label : null"
12
- [id]="label"
13
- [binary]="true"
14
- />
15
- </div>
16
- </div>