primekit 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/lib/atomix-alert/atomix-alert.component.mjs +76 -0
- package/esm2022/lib/lib/atomix-autocomplete/atomix-autocomplete.component.mjs +108 -0
- package/esm2022/lib/lib/atomix-button/atomix-button.component.mjs +49 -0
- package/esm2022/lib/lib/atomix-button/atomix-button.models.mjs +2 -0
- package/esm2022/lib/lib/atomix-calendar/atomix-calendar.component.mjs +90 -0
- package/esm2022/lib/lib/atomix-card/atomix-card.component.mjs +24 -0
- package/esm2022/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.mjs +28 -0
- package/esm2022/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.mjs +674 -0
- package/esm2022/lib/lib/atomix-divider/atomix-divider.component.mjs +27 -0
- package/esm2022/lib/lib/atomix-dropdown/atomix-dropdown.component.mjs +105 -0
- package/esm2022/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.mjs +38 -0
- package/esm2022/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.models.mjs +2 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.mjs +67 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.mjs +59 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.mjs +48 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.mjs +54 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-chips/form.chips.models.mjs +2 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.mjs +70 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.mjs +80 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.mjs +48 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.mjs +48 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.mjs +46 -0
- package/esm2022/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.mjs +46 -0
- package/esm2022/lib/lib/atomix-input/atomix-input.component.mjs +94 -0
- package/esm2022/lib/lib/atomix-input-switch/atomix-input-switch.component.mjs +85 -0
- package/esm2022/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.mjs +44 -0
- package/esm2022/lib/lib/atomix-messages/messages.component.mjs +33 -0
- package/esm2022/lib/lib/atomix-pagination/atomix-pagination.component.mjs +48 -0
- package/esm2022/lib/lib/atomix-radio-button/atomix-radio-button.component.mjs +50 -0
- package/esm2022/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.mjs +149 -0
- package/esm2022/lib/lib/atomix-select-button/atomix-select-button-models.mjs +2 -0
- package/esm2022/lib/lib/atomix-select-button/atomix-select-button.component.mjs +25 -0
- package/esm2022/lib/lib/atomix-snackbar/atomix-snackbar.component.mjs +29 -0
- package/esm2022/lib/lib/atomix-spinner/atomix-spinner.component.mjs +24 -0
- package/esm2022/lib/lib/atomix-steps/atomix-steps.component.mjs +41 -0
- package/esm2022/lib/lib/atomix-tabMenu/atomix-tabMenu.component.mjs +51 -0
- package/esm2022/lib/lib/atomix-table/atomix-table.component.mjs +454 -0
- package/esm2022/lib/lib/atomix-table/atomix-table.models.mjs +2 -0
- package/esm2022/lib/lib/atomix-tag/atomix-tag.component.mjs +24 -0
- package/esm2022/lib/lib/utils/prime-icons.util.mjs +10 -0
- package/esm2022/lib/primekit.component.mjs +11 -0
- package/esm2022/lib/primekit.module.mjs +322 -0
- package/esm2022/lib/primekit.service.mjs +14 -0
- package/esm2022/primekit.mjs +5 -0
- package/esm2022/public-api.mjs +44 -0
- package/fesm2022/primekit.mjs +3115 -0
- package/fesm2022/primekit.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/lib/atomix-alert/atomix-alert.component.d.ts +22 -0
- package/lib/lib/atomix-autocomplete/atomix-autocomplete.component.d.ts +34 -0
- package/lib/lib/atomix-button/atomix-button.component.d.ts +19 -0
- package/{src/lib/lib/atomix-button/atomix-button.models.ts → lib/lib/atomix-button/atomix-button.models.d.ts} +2 -2
- package/lib/lib/atomix-calendar/atomix-calendar.component.d.ts +27 -0
- package/lib/lib/atomix-card/atomix-card.component.d.ts +9 -0
- package/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.d.ts +12 -0
- package/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.d.ts +72 -0
- package/lib/lib/atomix-divider/atomix-divider.component.d.ts +12 -0
- package/lib/lib/atomix-dropdown/atomix-dropdown.component.d.ts +50 -0
- package/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.d.ts +15 -0
- package/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.models.d.ts +11 -0
- package/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.d.ts +25 -0
- package/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.d.ts +23 -0
- package/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.d.ts +18 -0
- package/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.d.ts +19 -0
- package/lib/lib/atomix-form/atomix-form-chips/form.chips.models.d.ts +5 -0
- package/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.d.ts +25 -0
- package/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.d.ts +28 -0
- package/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.d.ts +17 -0
- package/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.d.ts +17 -0
- package/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.d.ts +19 -0
- package/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.d.ts +17 -0
- package/lib/lib/atomix-input/atomix-input.component.d.ts +29 -0
- package/lib/lib/atomix-input-switch/atomix-input-switch.component.d.ts +30 -0
- package/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.d.ts +16 -0
- package/lib/lib/atomix-messages/messages.component.d.ts +13 -0
- package/lib/lib/atomix-pagination/atomix-pagination.component.d.ts +19 -0
- package/lib/lib/atomix-radio-button/atomix-radio-button.component.d.ts +15 -0
- package/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.d.ts +60 -0
- package/{src/lib/lib/atomix-select-button/atomix-select-button-models.ts → lib/lib/atomix-select-button/atomix-select-button-models.d.ts} +4 -4
- package/lib/lib/atomix-select-button/atomix-select-button.component.d.ts +12 -0
- package/lib/lib/atomix-snackbar/atomix-snackbar.component.d.ts +12 -0
- package/lib/lib/atomix-spinner/atomix-spinner.component.d.ts +9 -0
- package/lib/lib/atomix-steps/atomix-steps.component.d.ts +19 -0
- package/lib/lib/atomix-tabMenu/atomix-tabMenu.component.d.ts +19 -0
- package/lib/lib/atomix-table/atomix-table.component.d.ts +119 -0
- package/lib/lib/atomix-table/atomix-table.models.d.ts +43 -0
- package/lib/lib/atomix-tag/atomix-tag.component.d.ts +9 -0
- package/lib/lib/utils/prime-icons.util.d.ts +3 -0
- package/lib/primekit.component.d.ts +5 -0
- package/lib/primekit.module.d.ts +72 -0
- package/lib/primekit.service.d.ts +6 -0
- package/package.json +28 -12
- package/{src/public-api.ts → public-api.d.ts} +38 -47
- package/ng-package.json +0 -8
- package/src/lib/lib/atomix-alert/atomix-alert.component.css +0 -67
- package/src/lib/lib/atomix-alert/atomix-alert.component.html +0 -7
- package/src/lib/lib/atomix-alert/atomix-alert.component.spec.ts +0 -154
- package/src/lib/lib/atomix-alert/atomix-alert.component.ts +0 -75
- package/src/lib/lib/atomix-autocomplete/atomix-autocomplete.component.html +0 -35
- package/src/lib/lib/atomix-autocomplete/atomix-autocomplete.component.scss +0 -72
- package/src/lib/lib/atomix-autocomplete/atomix-autocomplete.component.spec.ts +0 -210
- package/src/lib/lib/atomix-autocomplete/atomix-autocomplete.component.ts +0 -70
- package/src/lib/lib/atomix-button/atomix-button.component.css +0 -70
- package/src/lib/lib/atomix-button/atomix-button.component.html +0 -20
- package/src/lib/lib/atomix-button/atomix-button.component.spec.ts +0 -135
- package/src/lib/lib/atomix-button/atomix-button.component.ts +0 -28
- package/src/lib/lib/atomix-calendar/atomix-calendar.component.css +0 -5
- package/src/lib/lib/atomix-calendar/atomix-calendar.component.html +0 -20
- package/src/lib/lib/atomix-calendar/atomix-calendar.component.spec.ts +0 -145
- package/src/lib/lib/atomix-calendar/atomix-calendar.component.ts +0 -71
- package/src/lib/lib/atomix-card/atomix-card.component.css +0 -4
- package/src/lib/lib/atomix-card/atomix-card.component.html +0 -3
- package/src/lib/lib/atomix-card/atomix-card.component.spec.ts +0 -63
- package/src/lib/lib/atomix-card/atomix-card.component.ts +0 -13
- package/src/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.css +0 -12
- package/src/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.html +0 -9
- package/src/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.spec.ts +0 -63
- package/src/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.ts +0 -22
- package/src/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.html +0 -233
- package/src/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.scss +0 -266
- package/src/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.spec.ts +0 -1465
- package/src/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.ts +0 -717
- package/src/lib/lib/atomix-divider/atomix-divider.component.css +0 -0
- package/src/lib/lib/atomix-divider/atomix-divider.component.html +0 -7
- package/src/lib/lib/atomix-divider/atomix-divider.component.spec.ts +0 -91
- package/src/lib/lib/atomix-divider/atomix-divider.component.ts +0 -17
- package/src/lib/lib/atomix-dropdown/atomix-dropdown.component.css +0 -25
- package/src/lib/lib/atomix-dropdown/atomix-dropdown.component.html +0 -37
- package/src/lib/lib/atomix-dropdown/atomix-dropdown.component.spec.ts +0 -178
- package/src/lib/lib/atomix-dropdown/atomix-dropdown.component.ts +0 -89
- package/src/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.css +0 -0
- package/src/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.html +0 -0
- package/src/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.spec.ts +0 -128
- package/src/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.ts +0 -42
- package/src/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.models.ts +0 -12
- package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.html +0 -20
- package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.scss +0 -7
- package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.spec.ts +0 -169
- package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.ts +0 -41
- package/src/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.html +0 -21
- package/src/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.scss +0 -7
- package/src/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.spec.ts +0 -142
- package/src/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.ts +0 -32
- package/src/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.html +0 -13
- package/src/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.scss +0 -14
- package/src/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.spec.ts +0 -112
- package/src/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.ts +0 -28
- package/src/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.html +0 -20
- package/src/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.scss +0 -3
- package/src/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.spec.ts +0 -153
- package/src/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.ts +0 -28
- package/src/lib/lib/atomix-form/atomix-form-chips/form.chips.models.ts +0 -5
- package/src/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.html +0 -24
- package/src/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.scss +0 -15
- package/src/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.spec.ts +0 -156
- package/src/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.ts +0 -36
- package/src/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.html +0 -33
- package/src/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.scss +0 -32
- package/src/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.spec.ts +0 -156
- package/src/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.ts +0 -42
- package/src/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.html +0 -14
- package/src/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.scss +0 -0
- package/src/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.spec.ts +0 -104
- package/src/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.ts +0 -24
- package/src/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.html +0 -16
- package/src/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.scss +0 -0
- package/src/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.spec.ts +0 -92
- package/src/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.ts +0 -24
- package/src/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.html +0 -23
- package/src/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.scss +0 -3
- package/src/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.spec.ts +0 -126
- package/src/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.ts +0 -26
- package/src/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.html +0 -17
- package/src/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.scss +0 -6
- package/src/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.spec.ts +0 -120
- package/src/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.ts +0 -24
- package/src/lib/lib/atomix-input/atomix-input.component.css +0 -52
- package/src/lib/lib/atomix-input/atomix-input.component.html +0 -45
- package/src/lib/lib/atomix-input/atomix-input.component.spec.ts +0 -229
- package/src/lib/lib/atomix-input/atomix-input.component.ts +0 -64
- package/src/lib/lib/atomix-input-switch/atomix-input-switch.component.css +0 -12
- package/src/lib/lib/atomix-input-switch/atomix-input-switch.component.html +0 -17
- package/src/lib/lib/atomix-input-switch/atomix-input-switch.component.spec.ts +0 -173
- package/src/lib/lib/atomix-input-switch/atomix-input-switch.component.ts +0 -62
- package/src/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.html +0 -47
- package/src/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.scss +0 -14
- package/src/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.spec.ts +0 -21
- package/src/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.ts +0 -25
- package/src/lib/lib/atomix-messages/messages.component.css +0 -0
- package/src/lib/lib/atomix-messages/messages.component.html +0 -9
- package/src/lib/lib/atomix-messages/messages.component.spec.ts +0 -115
- package/src/lib/lib/atomix-messages/messages.component.ts +0 -17
- package/src/lib/lib/atomix-pagination/atomix-pagination.component.css +0 -19
- package/src/lib/lib/atomix-pagination/atomix-pagination.component.html +0 -24
- package/src/lib/lib/atomix-pagination/atomix-pagination.component.spec.ts +0 -98
- package/src/lib/lib/atomix-pagination/atomix-pagination.component.ts +0 -36
- package/src/lib/lib/atomix-radio-button/atomix-radio-button.component.css +0 -0
- package/src/lib/lib/atomix-radio-button/atomix-radio-button.component.html +0 -7
- package/src/lib/lib/atomix-radio-button/atomix-radio-button.component.spec.ts +0 -116
- package/src/lib/lib/atomix-radio-button/atomix-radio-button.component.ts +0 -37
- package/src/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.css +0 -49
- package/src/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.html +0 -68
- package/src/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.spec.ts +0 -282
- package/src/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.ts +0 -119
- package/src/lib/lib/atomix-select-button/atomix-select-button.component.css +0 -5
- package/src/lib/lib/atomix-select-button/atomix-select-button.component.html +0 -7
- package/src/lib/lib/atomix-select-button/atomix-select-button.component.spec.ts +0 -73
- package/src/lib/lib/atomix-select-button/atomix-select-button.component.ts +0 -19
- package/src/lib/lib/atomix-snackbar/atomix-snackbar.component.css +0 -30
- package/src/lib/lib/atomix-snackbar/atomix-snackbar.component.html +0 -4
- package/src/lib/lib/atomix-snackbar/atomix-snackbar.component.spec.ts +0 -60
- package/src/lib/lib/atomix-snackbar/atomix-snackbar.component.ts +0 -27
- package/src/lib/lib/atomix-spinner/atomix-spinner.component.css +0 -0
- package/src/lib/lib/atomix-spinner/atomix-spinner.component.html +0 -7
- package/src/lib/lib/atomix-spinner/atomix-spinner.component.spec.ts +0 -70
- package/src/lib/lib/atomix-spinner/atomix-spinner.component.ts +0 -13
- package/src/lib/lib/atomix-steps/atomix-steps.component.html +0 -9
- package/src/lib/lib/atomix-steps/atomix-steps.component.scss +0 -0
- package/src/lib/lib/atomix-steps/atomix-steps.component.spec.ts +0 -120
- package/src/lib/lib/atomix-steps/atomix-steps.component.ts +0 -32
- package/src/lib/lib/atomix-tabMenu/atomix-tabMenu.component.css +0 -0
- package/src/lib/lib/atomix-tabMenu/atomix-tabMenu.component.html +0 -26
- package/src/lib/lib/atomix-tabMenu/atomix-tabMenu.component.spec.ts +0 -106
- package/src/lib/lib/atomix-tabMenu/atomix-tabMenu.component.ts +0 -36
- package/src/lib/lib/atomix-table/atomix-table.component.css +0 -152
- package/src/lib/lib/atomix-table/atomix-table.component.html +0 -647
- package/src/lib/lib/atomix-table/atomix-table.component.spec.ts +0 -1648
- package/src/lib/lib/atomix-table/atomix-table.component.ts +0 -422
- package/src/lib/lib/atomix-table/atomix-table.models.ts +0 -39
- package/src/lib/lib/atomix-tag/atomix-tag.component.css +0 -0
- package/src/lib/lib/atomix-tag/atomix-tag.component.html +0 -6
- package/src/lib/lib/atomix-tag/atomix-tag.component.spec.ts +0 -47
- package/src/lib/lib/atomix-tag/atomix-tag.component.ts +0 -13
- package/src/lib/lib/utils/prime-icons.util.spec.ts +0 -21
- package/src/lib/lib/utils/prime-icons.util.ts +0 -11
- package/src/lib/primekit.component.spec.ts +0 -19
- package/src/lib/primekit.component.ts +0 -10
- package/src/lib/primekit.module.spec.ts +0 -155
- package/src/lib/primekit.module.ts +0 -183
- package/src/lib/primekit.service.spec.ts +0 -17
- package/src/lib/primekit.service.ts +0 -8
- package/tsconfig.lib.json +0 -13
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -10
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectorRef,
|
|
3
|
-
Component,
|
|
4
|
-
contentChild,
|
|
5
|
-
ContentChild,
|
|
6
|
-
EventEmitter,
|
|
7
|
-
Input,
|
|
8
|
-
OnChanges,
|
|
9
|
-
Output,
|
|
10
|
-
SimpleChanges,
|
|
11
|
-
TemplateRef,
|
|
12
|
-
ViewChild,
|
|
13
|
-
} from '@angular/core';
|
|
14
|
-
import type {
|
|
15
|
-
Table,
|
|
16
|
-
TablePageEvent,
|
|
17
|
-
TableRowReorderEvent,
|
|
18
|
-
} from 'primeng/table';
|
|
19
|
-
import { Column, Row, TableActionButton } from './atomix-table.models';
|
|
20
|
-
import { ConfirmationService } from 'primeng/api';
|
|
21
|
-
import { DatePipe } from '@angular/common';
|
|
22
|
-
import { AtomixSnackbarComponent } from '../atomix-snackbar/atomix-snackbar.component';
|
|
23
|
-
import { CheckboxChangeEvent } from 'primeng/checkbox';
|
|
24
|
-
|
|
25
|
-
@Component({
|
|
26
|
-
selector: 'atomix-table',
|
|
27
|
-
templateUrl: './atomix-table.component.html',
|
|
28
|
-
styleUrls: ['./atomix-table.component.css'],
|
|
29
|
-
})
|
|
30
|
-
export class AtomixTableComponent implements OnChanges {
|
|
31
|
-
@ViewChild(AtomixSnackbarComponent)
|
|
32
|
-
atomixSnackbarComponent!: AtomixSnackbarComponent;
|
|
33
|
-
@Input() rows!: Row[];
|
|
34
|
-
|
|
35
|
-
// The selected table rows passed from primeng
|
|
36
|
-
selectedTableRows: Row[] | undefined;
|
|
37
|
-
|
|
38
|
-
@Input() cols!: Column[];
|
|
39
|
-
@Input() size: number = 25;
|
|
40
|
-
@Input() currentPage: number = 0;
|
|
41
|
-
@Input() expandedColumns: Column[] = [];
|
|
42
|
-
|
|
43
|
-
@Input() emptyExpandableRowMessage = '';
|
|
44
|
-
|
|
45
|
-
@Input() secondaryRowsKey = '';
|
|
46
|
-
|
|
47
|
-
@Input() title = '';
|
|
48
|
-
|
|
49
|
-
@Input() enablePaginator = false;
|
|
50
|
-
|
|
51
|
-
@Input() reorderableColumns = true;
|
|
52
|
-
|
|
53
|
-
@Input() enableReorderableRow = false;
|
|
54
|
-
|
|
55
|
-
// Empty state properties
|
|
56
|
-
@Input() emptyStateMessage: string = 'No records found';
|
|
57
|
-
|
|
58
|
-
// TODO: Enable checkboxes if we can use checkboxes and press anywhere on row.
|
|
59
|
-
// @Input() enableCheckboxes: boolean = false;
|
|
60
|
-
|
|
61
|
-
// Enables multiselect without checkboxes
|
|
62
|
-
@Input() enableMultiselect = false;
|
|
63
|
-
|
|
64
|
-
// Enables an expandable row that another table fits inside of
|
|
65
|
-
@Input() enableExpandableRow = false;
|
|
66
|
-
|
|
67
|
-
// Enables an selecting all rows when the rows are initialized
|
|
68
|
-
@Input() enableSelectAllOnInit = false;
|
|
69
|
-
|
|
70
|
-
// Enables each column to have a filter checkbox. Also adds a "Clear All" button to remove all filters.
|
|
71
|
-
@Input() enableColumnFilters = false;
|
|
72
|
-
|
|
73
|
-
@Input() isLoading: boolean = false;
|
|
74
|
-
|
|
75
|
-
@Input() pageSize = 25;
|
|
76
|
-
|
|
77
|
-
// Required as only used when totalRecords must be set
|
|
78
|
-
@Input() totalRecords!: number;
|
|
79
|
-
|
|
80
|
-
// Hide main row actions when the row has child rows (useful for expandable tables)
|
|
81
|
-
@Input() hideMainRowActionsWhenExpanded = false;
|
|
82
|
-
|
|
83
|
-
// Disable expand button for rows without child rows (when using secondaryRowsKey)
|
|
84
|
-
@Input() disableExpandWhenNoChildren = false;
|
|
85
|
-
|
|
86
|
-
// Emits the rows the user has selected
|
|
87
|
-
@Output() selectedRows: EventEmitter<Row[]> = new EventEmitter();
|
|
88
|
-
|
|
89
|
-
@Output() pageChange: EventEmitter<{ page: number; size: number }> =
|
|
90
|
-
new EventEmitter();
|
|
91
|
-
|
|
92
|
-
@Output() filterChange: EventEmitter<any> = new EventEmitter();
|
|
93
|
-
|
|
94
|
-
@Input() enableEditButtons = false;
|
|
95
|
-
@Input() enableDeleteButtons = false;
|
|
96
|
-
@Input() actionButtonConfig: {
|
|
97
|
-
enabled: boolean;
|
|
98
|
-
icon: string;
|
|
99
|
-
message?: string;
|
|
100
|
-
confirmation?: boolean;
|
|
101
|
-
class?: string;
|
|
102
|
-
} = {
|
|
103
|
-
enabled: false,
|
|
104
|
-
icon: '',
|
|
105
|
-
message: '',
|
|
106
|
-
confirmation: true,
|
|
107
|
-
class: 'p-button-rounded p-button-help',
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
@Output() editRow: EventEmitter<any> = new EventEmitter();
|
|
111
|
-
@Output() actionRow: EventEmitter<any> = new EventEmitter();
|
|
112
|
-
@Output() deleteRow: EventEmitter<any> = new EventEmitter();
|
|
113
|
-
@Output() actionButton: EventEmitter<Row> = new EventEmitter();
|
|
114
|
-
@Output() expandedRow: EventEmitter<Row> = new EventEmitter();
|
|
115
|
-
@Output() dropdownSelectionChanged: EventEmitter<{
|
|
116
|
-
field: string;
|
|
117
|
-
value: any;
|
|
118
|
-
}> = new EventEmitter();
|
|
119
|
-
@Output() rowReordered: EventEmitter<{
|
|
120
|
-
previousIndex: number;
|
|
121
|
-
currentIndex: number;
|
|
122
|
-
}> = new EventEmitter();
|
|
123
|
-
@Output() logButton: EventEmitter<any> = new EventEmitter();
|
|
124
|
-
@Output() pageDropdownChange = new EventEmitter<any>();
|
|
125
|
-
@Output() childRowAction = new EventEmitter<any>();
|
|
126
|
-
@ContentChild(TemplateRef) rowDataOutlet!: TemplateRef<any>;
|
|
127
|
-
|
|
128
|
-
// Sort Functionality
|
|
129
|
-
@Input() sortBy: string = '';
|
|
130
|
-
@Input() orderBy: string = '';
|
|
131
|
-
@Input() isEnableSorting: boolean = false;
|
|
132
|
-
@Output() sortHandler = new EventEmitter<any>();
|
|
133
|
-
|
|
134
|
-
// Pagination Functionality
|
|
135
|
-
options = [
|
|
136
|
-
{ label: 10, value: 10 },
|
|
137
|
-
{ label: 25, value: 25 },
|
|
138
|
-
{ label: 50, value: 50 },
|
|
139
|
-
{ label: 75, value: 75 },
|
|
140
|
-
{ label: 100, value: 100 },
|
|
141
|
-
{ label: 500, value: 500 },
|
|
142
|
-
];
|
|
143
|
-
first2: number = 0;
|
|
144
|
-
rows2: number = 10;
|
|
145
|
-
|
|
146
|
-
page: number = 0;
|
|
147
|
-
@Input() showPagination: boolean = true;
|
|
148
|
-
@Input() childRowsActionButtonsData: TableActionButton[] = [];
|
|
149
|
-
|
|
150
|
-
// Action Column
|
|
151
|
-
@Input() showActionsColumn: boolean = false;
|
|
152
|
-
@Input() showExpandedActionsColumn: boolean = false;
|
|
153
|
-
@Input() actionButtonsData!: TableActionButton[];
|
|
154
|
-
@ViewChild('dt1') dt1!: Table;
|
|
155
|
-
|
|
156
|
-
@Input() getChipCss: (type: string) => string = () => '';
|
|
157
|
-
@Input() getChipIcon: (type: string) => string = () => '';
|
|
158
|
-
constructor(
|
|
159
|
-
private confirmationService: ConfirmationService,
|
|
160
|
-
private datePipe: DatePipe,
|
|
161
|
-
private cdr: ChangeDetectorRef
|
|
162
|
-
) {}
|
|
163
|
-
|
|
164
|
-
onRowsInit() {
|
|
165
|
-
if (this.rows.length === 0) return;
|
|
166
|
-
|
|
167
|
-
this.selectedTableRows = this.enableSelectAllOnInit ? this.rows : undefined;
|
|
168
|
-
this.selectedRows.emit(this.selectedTableRows);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
ngOnChanges(changes: SimpleChanges) {
|
|
172
|
-
this.onRowsInit();
|
|
173
|
-
// if (changes['isLoading']) {
|
|
174
|
-
// this.cdr.detectChanges(); // Force UI update
|
|
175
|
-
// }
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
onRowSelect() {
|
|
179
|
-
this.selectedRows.emit(this.selectedTableRows);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
onRowUnselect() {
|
|
183
|
-
this.selectedRows.emit(this.selectedTableRows);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
onCheckboxSelect() {
|
|
187
|
-
this.selectedRows.emit(this.selectedTableRows);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
clearFilters() {
|
|
191
|
-
if (this.dt1) {
|
|
192
|
-
this.dt1.clear();
|
|
193
|
-
this.filterChange.emit({});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
onPage(event: TablePageEvent) {
|
|
198
|
-
const page = event.first === 0 ? 0 : event.first / event.rows;
|
|
199
|
-
const size = event.rows;
|
|
200
|
-
this.pageChange.emit({ page, size });
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
filterResults(event: any) {
|
|
204
|
-
const filteredFilters: any = {};
|
|
205
|
-
for (const field of Object?.keys(event.filters)) {
|
|
206
|
-
const filtersArray = event.filters[field];
|
|
207
|
-
const nonNullFilters = filtersArray?.filter(
|
|
208
|
-
(item: any) => item.value !== null
|
|
209
|
-
);
|
|
210
|
-
|
|
211
|
-
if (nonNullFilters?.length > 0) {
|
|
212
|
-
// Convert Date objects to formatted string for date filters
|
|
213
|
-
const processedFilters = nonNullFilters.map((item: any) => {
|
|
214
|
-
if (item.value instanceof Date) {
|
|
215
|
-
return {
|
|
216
|
-
...item,
|
|
217
|
-
matchMode: 'equals',
|
|
218
|
-
value: this.datePipe.transform(item.value, 'yyyy-MM-dd'),
|
|
219
|
-
operator: 'and',
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
// Handle date range filters (array of dates)
|
|
223
|
-
if (
|
|
224
|
-
Array.isArray(item.value) &&
|
|
225
|
-
item.value.length === 2 &&
|
|
226
|
-
item.value.every((v: unknown) => v instanceof Date)
|
|
227
|
-
) {
|
|
228
|
-
return {
|
|
229
|
-
...item,
|
|
230
|
-
matchMode: 'between',
|
|
231
|
-
value: item.value.map((date: Date) =>
|
|
232
|
-
this.datePipe.transform(date, 'yyyy-MM-dd')
|
|
233
|
-
),
|
|
234
|
-
operator: 'and',
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
// For date filter strings, also normalize to equals matchMode
|
|
238
|
-
if (item.matchMode === 'dateIs') {
|
|
239
|
-
return {
|
|
240
|
-
...item,
|
|
241
|
-
matchMode: 'equals',
|
|
242
|
-
operator: 'and',
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
return item;
|
|
246
|
-
});
|
|
247
|
-
filteredFilters[field] = processedFilters;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
this.filterChange.emit(filteredFilters);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
deleteRowConfirmation(rowData: any) {
|
|
254
|
-
this.confirmationService.confirm({
|
|
255
|
-
message: 'Delete this item?',
|
|
256
|
-
accept: () => {
|
|
257
|
-
this.deleteRow.emit(rowData);
|
|
258
|
-
},
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
actionRowConfirmation(rowData: Row) {
|
|
263
|
-
if (this.actionButtonConfig.confirmation) {
|
|
264
|
-
this.confirmationService.confirm({
|
|
265
|
-
message: this.actionButtonConfig.message,
|
|
266
|
-
accept: () => {
|
|
267
|
-
this.actionButton.emit(rowData);
|
|
268
|
-
},
|
|
269
|
-
});
|
|
270
|
-
} else {
|
|
271
|
-
this.actionButton.emit(rowData);
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
onRowReorder(event: TableRowReorderEvent) {
|
|
276
|
-
this.rowReordered.emit({
|
|
277
|
-
previousIndex: event.dragIndex as number,
|
|
278
|
-
currentIndex: event.dropIndex as number,
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
getRowDataValue(rowData: any, field: string, type: string) {
|
|
283
|
-
let value = field
|
|
284
|
-
.split('.')
|
|
285
|
-
.reduce((acc, part) => acc && acc[part], rowData);
|
|
286
|
-
|
|
287
|
-
if (type === 'date') {
|
|
288
|
-
value = this.datePipe.transform(value, 'MM/dd/yyyy');
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
return value;
|
|
292
|
-
}
|
|
293
|
-
copyHandler(event: Event, element: any) {
|
|
294
|
-
event.stopPropagation();
|
|
295
|
-
navigator.clipboard.writeText(element);
|
|
296
|
-
this.atomixSnackbarComponent.showSnackbar(`Copied ${element} to clipboard`);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
customSort(columnName: any) {
|
|
300
|
-
let direction =
|
|
301
|
-
this.sortBy !== columnName
|
|
302
|
-
? 'asc'
|
|
303
|
-
: this.orderBy === 'asc'
|
|
304
|
-
? 'desc'
|
|
305
|
-
: this.orderBy === 'desc'
|
|
306
|
-
? ''
|
|
307
|
-
: 'asc';
|
|
308
|
-
|
|
309
|
-
this.sortBy = columnName;
|
|
310
|
-
this.orderBy = direction;
|
|
311
|
-
this.sortHandler.emit({ columnName, direction });
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
handlePageChange(event: any) {
|
|
315
|
-
this.pageChange.emit(event);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
dropdownHandler(event: any) {
|
|
319
|
-
this.pageDropdownChange.emit(event?.value);
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
handleActionClick(action: any, rowData: any) {
|
|
323
|
-
if (action.click) {
|
|
324
|
-
action.click(rowData); // Call the passed function with the row data
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
handleChildActionClick(action: any, rowData: any) {
|
|
329
|
-
if (action.click) {
|
|
330
|
-
// If the action provides a custom click handler, call it
|
|
331
|
-
action.click(rowData);
|
|
332
|
-
} else {
|
|
333
|
-
// Normalize the action to a string if action.action exists
|
|
334
|
-
const actionName = action?.action || action?.tooltip || action;
|
|
335
|
-
// Emit using the expected shape: { action, childRow }
|
|
336
|
-
this.childRowAction.emit({ action: actionName, childRow: rowData });
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
shouldShowAction(action: any, rowData: any): boolean {
|
|
341
|
-
if (!action) return true;
|
|
342
|
-
if (action.showOnlyWhen) {
|
|
343
|
-
return Object.entries(action.showOnlyWhen).every(([key, value]) => {
|
|
344
|
-
const rowVal = (rowData?.[key] ?? '')?.toString();
|
|
345
|
-
if (!rowVal) return false;
|
|
346
|
-
return rowVal.toLowerCase() === String(value).toLowerCase();
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
return true;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
@Input() isAllSelected: boolean = false;
|
|
353
|
-
@Output() headerCheckboxHandler = new EventEmitter<boolean>();
|
|
354
|
-
@Output() checkboxHandler = new EventEmitter<any>();
|
|
355
|
-
isAnyRowSelected(): boolean {
|
|
356
|
-
if (this.rows?.every((row) => row?.isSelected)) {
|
|
357
|
-
this.isAllSelected = true;
|
|
358
|
-
return false;
|
|
359
|
-
} else if (this.rows?.some((row: any) => row.isSelected)) {
|
|
360
|
-
this.isAllSelected = true;
|
|
361
|
-
return true;
|
|
362
|
-
} else {
|
|
363
|
-
this.isAllSelected = false;
|
|
364
|
-
return false;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
|
|
368
|
-
toggleAllRows(event: CheckboxChangeEvent) {
|
|
369
|
-
this.rows?.forEach((row) => {
|
|
370
|
-
row.isSelected = this.isAllSelected;
|
|
371
|
-
});
|
|
372
|
-
this.headerCheckboxHandler.emit(this.isAllSelected);
|
|
373
|
-
this.checkboxHandler.emit();
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
singleCheckboxHandler(event: CheckboxChangeEvent, row: any) {
|
|
377
|
-
this.isAllSelected = true;
|
|
378
|
-
this.headerCheckboxHandler.emit(false);
|
|
379
|
-
this.checkboxHandler.emit();
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
isString(value: any): boolean {
|
|
383
|
-
return typeof value === 'string';
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
handleDateRangeFilter(
|
|
387
|
-
value: any,
|
|
388
|
-
filterCallback: (value: any) => void
|
|
389
|
-
): void {
|
|
390
|
-
// Only apply filter when both dates are selected (array with 2 dates)
|
|
391
|
-
if (
|
|
392
|
-
Array.isArray(value) &&
|
|
393
|
-
value.length === 2 &&
|
|
394
|
-
value.every((v) => v instanceof Date)
|
|
395
|
-
) {
|
|
396
|
-
filterCallback(value);
|
|
397
|
-
} else if (value === null) {
|
|
398
|
-
// Clear the filter when value is null (e.g., when cross icon is clicked)
|
|
399
|
-
filterCallback(null);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
hasChildRows(rowData: any): boolean {
|
|
404
|
-
if (!this.secondaryRowsKey) {
|
|
405
|
-
return false;
|
|
406
|
-
}
|
|
407
|
-
const childRows = rowData[this.secondaryRowsKey];
|
|
408
|
-
return Array.isArray(childRows) && childRows.length > 0;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
shouldShowActionButton(action: any, rowData: any): boolean {
|
|
412
|
-
if (this.hideMainRowActionsWhenExpanded && this.hasChildRows(rowData)) {
|
|
413
|
-
return false;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
if (action.showOnlyWhenNoChildRows && this.hasChildRows(rowData)) {
|
|
417
|
-
return false;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
return true;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TODO: Move this to models folder
|
|
3
|
-
*/
|
|
4
|
-
export interface Row {
|
|
5
|
-
id: string;
|
|
6
|
-
[k: string]: unknown;
|
|
7
|
-
isSelected?: boolean;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* TODO: Move this to models folder
|
|
11
|
-
*/
|
|
12
|
-
export interface Column {
|
|
13
|
-
name: string;
|
|
14
|
-
field: string;
|
|
15
|
-
type?: string;
|
|
16
|
-
isEditable?: boolean;
|
|
17
|
-
isRequired?: boolean;
|
|
18
|
-
filterDisabled?: boolean;
|
|
19
|
-
hideFilter?: boolean;
|
|
20
|
-
isHide?: boolean;
|
|
21
|
-
filterByDropdown?: { value: string; label: string }[];
|
|
22
|
-
filterByDate?: boolean;
|
|
23
|
-
filterByDateRange?: boolean;
|
|
24
|
-
hideAdvancedFilters?: boolean;
|
|
25
|
-
copyIcon?: boolean;
|
|
26
|
-
chip?: boolean;
|
|
27
|
-
chipIcon?: boolean;
|
|
28
|
-
progress?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type SortDirection = 'asc' | 'desc' | '';
|
|
32
|
-
export interface TableActionButton {
|
|
33
|
-
icon?: string;
|
|
34
|
-
class?: string;
|
|
35
|
-
tooltip?: string;
|
|
36
|
-
click?: (event: any) => void;
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
showOnlyWhen?: { [k: string]: string };
|
|
39
|
-
}
|
|
File without changes
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
2
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
|
-
import { AtomixTagComponent } from './atomix-tag.component';
|
|
4
|
-
|
|
5
|
-
describe('AtomixTagComponent', () => {
|
|
6
|
-
let component: AtomixTagComponent;
|
|
7
|
-
let fixture: ComponentFixture<AtomixTagComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [AtomixTagComponent],
|
|
12
|
-
schemas: [NO_ERRORS_SCHEMA],
|
|
13
|
-
});
|
|
14
|
-
fixture = TestBed.createComponent(AtomixTagComponent);
|
|
15
|
-
component = fixture.componentInstance;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
describe('input bindings', () => {
|
|
23
|
-
it('should accept value input', () => {
|
|
24
|
-
component.value = 'Active';
|
|
25
|
-
fixture.detectChanges();
|
|
26
|
-
expect(component.value).toBe('Active');
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('should accept rounded input', () => {
|
|
30
|
-
component.rounded = true;
|
|
31
|
-
fixture.detectChanges();
|
|
32
|
-
expect(component.rounded).toBe(true);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('should accept icon input', () => {
|
|
36
|
-
component.icon = 'pi pi-check';
|
|
37
|
-
fixture.detectChanges();
|
|
38
|
-
expect(component.icon).toBe('pi pi-check');
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
it('should accept styleClass input', () => {
|
|
42
|
-
component.styleClass = 'custom-tag';
|
|
43
|
-
fixture.detectChanges();
|
|
44
|
-
expect(component.styleClass).toBe('custom-tag');
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'atomix-tag',
|
|
5
|
-
templateUrl: './atomix-tag.component.html',
|
|
6
|
-
styleUrls: ['./atomix-tag.component.css'],
|
|
7
|
-
})
|
|
8
|
-
export class AtomixTagComponent {
|
|
9
|
-
@Input() value!: string;
|
|
10
|
-
@Input() rounded!: boolean;
|
|
11
|
-
@Input() icon!: string;
|
|
12
|
-
@Input() styleClass!: string;
|
|
13
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { getEditIcon, getTrashIcon, getPowerOffIcon } from './prime-icons.util';
|
|
2
|
-
|
|
3
|
-
describe('prime-icons.util', () => {
|
|
4
|
-
describe('getEditIcon', () => {
|
|
5
|
-
it('should return the pencil icon class', () => {
|
|
6
|
-
expect(getEditIcon()).toBe('pi pi-pencil');
|
|
7
|
-
});
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
describe('getTrashIcon', () => {
|
|
11
|
-
it('should return the trash icon class', () => {
|
|
12
|
-
expect(getTrashIcon()).toBe('pi pi-trash');
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
describe('getPowerOffIcon', () => {
|
|
17
|
-
it('should return the power-off icon class', () => {
|
|
18
|
-
expect(getPowerOffIcon()).toBe('pi pi-power-off');
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { PrimekitComponent } from './primekit.component';
|
|
3
|
-
|
|
4
|
-
describe('PrimekitComponent', () => {
|
|
5
|
-
let component: PrimekitComponent;
|
|
6
|
-
let fixture: ComponentFixture<PrimekitComponent>;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({
|
|
10
|
-
imports: [PrimekitComponent],
|
|
11
|
-
});
|
|
12
|
-
fixture = TestBed.createComponent(PrimekitComponent);
|
|
13
|
-
component = fixture.componentInstance;
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
it('should create', () => {
|
|
17
|
-
expect(component).toBeTruthy();
|
|
18
|
-
});
|
|
19
|
-
});
|