primekit 1.0.11 → 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 -15
- 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
|
File without changes
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
2
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
|
-
import { AtomixDividerComponent } from './atomix-divider.component';
|
|
4
|
-
|
|
5
|
-
describe('AtomixDividerComponent', () => {
|
|
6
|
-
let component: AtomixDividerComponent;
|
|
7
|
-
let fixture: ComponentFixture<AtomixDividerComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [AtomixDividerComponent],
|
|
12
|
-
schemas: [NO_ERRORS_SCHEMA],
|
|
13
|
-
});
|
|
14
|
-
fixture = TestBed.createComponent(AtomixDividerComponent);
|
|
15
|
-
component = fixture.componentInstance;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
describe('configuration inputs', () => {
|
|
23
|
-
it('should have default layout as horizontal', () => {
|
|
24
|
-
expect(component.layout).toBe('horizontal');
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('should accept layout input as vertical', () => {
|
|
28
|
-
component.layout = 'vertical';
|
|
29
|
-
fixture.detectChanges();
|
|
30
|
-
expect(component.layout).toBe('vertical');
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
it('should have default type as solid', () => {
|
|
34
|
-
expect(component.type).toBe('solid');
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('should accept type input as dashed', () => {
|
|
38
|
-
component.type = 'dashed';
|
|
39
|
-
fixture.detectChanges();
|
|
40
|
-
expect(component.type).toBe('dashed');
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('should accept type input as dotted', () => {
|
|
44
|
-
component.type = 'dotted';
|
|
45
|
-
fixture.detectChanges();
|
|
46
|
-
expect(component.type).toBe('dotted');
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('should have default align as undefined', () => {
|
|
50
|
-
expect(component.align).toBeUndefined();
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
it('should accept align input as center', () => {
|
|
54
|
-
component.align = 'center';
|
|
55
|
-
fixture.detectChanges();
|
|
56
|
-
expect(component.align).toBe('center');
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it('should accept align input as left', () => {
|
|
60
|
-
component.align = 'left';
|
|
61
|
-
fixture.detectChanges();
|
|
62
|
-
expect(component.align).toBe('left');
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it('should accept align input as right', () => {
|
|
66
|
-
component.align = 'right';
|
|
67
|
-
fixture.detectChanges();
|
|
68
|
-
expect(component.align).toBe('right');
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it('should have default style as undefined', () => {
|
|
72
|
-
expect(component.style).toBeUndefined();
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it('should accept style input', () => {
|
|
76
|
-
component.style = { 'border-color': 'red' };
|
|
77
|
-
fixture.detectChanges();
|
|
78
|
-
expect(component.style).toEqual({ 'border-color': 'red' });
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it('should have default styleClass as undefined', () => {
|
|
82
|
-
expect(component.styleClass).toBeUndefined();
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
it('should accept styleClass input', () => {
|
|
86
|
-
component.styleClass = 'custom-divider';
|
|
87
|
-
fixture.detectChanges();
|
|
88
|
-
expect(component.styleClass).toBe('custom-divider');
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'atomix-divider',
|
|
5
|
-
templateUrl: './atomix-divider.component.html',
|
|
6
|
-
})
|
|
7
|
-
export class AtomixDividerComponent {
|
|
8
|
-
@Input() style?: { [key: string]: any };
|
|
9
|
-
|
|
10
|
-
@Input() styleClass?: string;
|
|
11
|
-
|
|
12
|
-
@Input() layout: 'horizontal' | 'vertical' = 'horizontal';
|
|
13
|
-
|
|
14
|
-
@Input() type: 'solid' | 'dashed' | 'dotted' = 'solid';
|
|
15
|
-
|
|
16
|
-
@Input() align?: 'left' | 'right' | 'top' | 'bottom' | 'center';
|
|
17
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
::ng-deep .p-dropdown-panel {
|
|
2
|
-
margin-top: 5px !important;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.dropdown-image {
|
|
6
|
-
width: 25px;
|
|
7
|
-
margin-right: 0.7rem;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.dropdown-logo {
|
|
11
|
-
text-align: center;
|
|
12
|
-
font-size: 25px;
|
|
13
|
-
margin-right: 0.7rem;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
::ng-deep .dropdown {
|
|
17
|
-
border-radius: var(--global-border-radius) !important;
|
|
18
|
-
.p-inputtext {
|
|
19
|
-
padding: 1rem 1rem !important;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.error-asterisk {
|
|
24
|
-
color: red;
|
|
25
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
<label *ngIf="label"
|
|
2
|
-
>{{ label }}
|
|
3
|
-
<span *ngIf="isLabelRequired" class="error-asterisk">*</span></label
|
|
4
|
-
>
|
|
5
|
-
<p-dropdown
|
|
6
|
-
[options]="options"
|
|
7
|
-
[(ngModel)]="selectedValues"
|
|
8
|
-
(onChange)="onChange($event)"
|
|
9
|
-
[optionValue]="optionValue"
|
|
10
|
-
[optionLabel]="optionLabel"
|
|
11
|
-
[showClear]="showClear"
|
|
12
|
-
[filter]="filter"
|
|
13
|
-
[filterBy]="optionLabel"
|
|
14
|
-
appendTo="body"
|
|
15
|
-
[disabled]="disabled"
|
|
16
|
-
[styleClass]="dropDownStyleClass + ' dropdown'"
|
|
17
|
-
(onFilter)="onFilter($event)"
|
|
18
|
-
[placeholder]="placeholder"
|
|
19
|
-
>
|
|
20
|
-
<ng-template let-option pTemplate="item">
|
|
21
|
-
<div class="custom-item">
|
|
22
|
-
<i
|
|
23
|
-
[ngClass]="option.dropdownIcon"
|
|
24
|
-
class="dropdown-logo"
|
|
25
|
-
*ngIf="option.dropdownIcon"
|
|
26
|
-
></i>
|
|
27
|
-
<img
|
|
28
|
-
[alt]="option.dropdownImage"
|
|
29
|
-
[src]="option.dropdownImage"
|
|
30
|
-
*ngIf="option.dropdownImage"
|
|
31
|
-
class="dropdown-image"
|
|
32
|
-
/>
|
|
33
|
-
|
|
34
|
-
<span>{{ option[optionLabel] }}</span>
|
|
35
|
-
</div>
|
|
36
|
-
</ng-template>
|
|
37
|
-
</p-dropdown>
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
2
|
-
import { ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
|
|
3
|
-
import { AtomixDropdownComponent } from './atomix-dropdown.component';
|
|
4
|
-
|
|
5
|
-
describe('AtomixDropdownComponent', () => {
|
|
6
|
-
let component: AtomixDropdownComponent;
|
|
7
|
-
let fixture: ComponentFixture<AtomixDropdownComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [AtomixDropdownComponent],
|
|
12
|
-
schemas: [NO_ERRORS_SCHEMA],
|
|
13
|
-
}).overrideComponent(AtomixDropdownComponent, {
|
|
14
|
-
set: {
|
|
15
|
-
template: '<div></div>',
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
fixture = TestBed.createComponent(AtomixDropdownComponent);
|
|
19
|
-
component = fixture.componentInstance;
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should create', () => {
|
|
23
|
-
expect(component).toBeTruthy();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
describe('input bindings', () => {
|
|
27
|
-
it('should have default options as empty array', () => {
|
|
28
|
-
expect(component.options).toEqual([]);
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
it('should have default selectedValues as undefined', () => {
|
|
32
|
-
expect(component.selectedValues).toBeUndefined();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('should have default optionValue as empty string', () => {
|
|
36
|
-
expect(component.optionValue).toBe('');
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('should have default placeholder as empty string', () => {
|
|
40
|
-
expect(component.placeholder).toBe('');
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('should have default optionLabel as empty string', () => {
|
|
44
|
-
expect(component.optionLabel).toBe('');
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it('should have default filter as true', () => {
|
|
48
|
-
expect(component.filter).toBe(true);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('should have default name as empty string', () => {
|
|
52
|
-
expect(component.name).toBe('');
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('should have default dropDownStyleClass as empty string', () => {
|
|
56
|
-
expect(component.dropDownStyleClass).toBe('');
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it('should have default withIcon as false', () => {
|
|
60
|
-
expect(component.withIcon).toBe(false);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
it('should have default disabled as false', () => {
|
|
64
|
-
expect(component.disabled).toBe(false);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
it('should have default showClear as true', () => {
|
|
68
|
-
expect(component.showClear).toBe(true);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it('should have default iconName as empty string', () => {
|
|
72
|
-
expect(component.iconName).toBe('');
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it('should have default containerClass as empty string', () => {
|
|
76
|
-
expect(component.containerClass).toBe('');
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it('should have default label as empty string', () => {
|
|
80
|
-
expect(component.label).toBe('');
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it('should have default isLabelRequired as false', () => {
|
|
84
|
-
expect(component.isLabelRequired).toBe(false);
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
it('should accept options input', () => {
|
|
88
|
-
const options = [
|
|
89
|
-
{ label: 'Option 1', value: 1 },
|
|
90
|
-
{ label: 'Option 2', value: 2 },
|
|
91
|
-
];
|
|
92
|
-
component.options = options;
|
|
93
|
-
expect(component.options).toEqual(options);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it('should accept placeholder input', () => {
|
|
97
|
-
component.placeholder = 'Select an option';
|
|
98
|
-
expect(component.placeholder).toBe('Select an option');
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it('should accept disabled input', () => {
|
|
102
|
-
component.disabled = true;
|
|
103
|
-
expect(component.disabled).toBe(true);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it('should accept selectedValues input', () => {
|
|
107
|
-
component.selectedValues = 'value1';
|
|
108
|
-
expect(component.selectedValues).toBe('value1');
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
describe('selection emission', () => {
|
|
113
|
-
it('should emit handleDropdownValueChange with value and name on onChange', () => {
|
|
114
|
-
const emitSpy = jest.fn();
|
|
115
|
-
component.handleDropdownValueChange.subscribe(emitSpy);
|
|
116
|
-
|
|
117
|
-
component.name = 'testDropdown';
|
|
118
|
-
const mockEvent = { value: 'selectedOption' };
|
|
119
|
-
component.onChange(mockEvent);
|
|
120
|
-
|
|
121
|
-
expect(emitSpy).toHaveBeenCalledWith(['selectedOption', 'testDropdown']);
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it('should emit handleDropdownValueChange with null value when cleared', () => {
|
|
125
|
-
const emitSpy = jest.fn();
|
|
126
|
-
component.handleDropdownValueChange.subscribe(emitSpy);
|
|
127
|
-
|
|
128
|
-
component.name = 'myDropdown';
|
|
129
|
-
const mockEvent = { value: null };
|
|
130
|
-
component.onChange(mockEvent);
|
|
131
|
-
|
|
132
|
-
expect(emitSpy).toHaveBeenCalledWith([null, 'myDropdown']);
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
it('should emit value as array with event value and component name', () => {
|
|
136
|
-
const emitSpy = jest.fn();
|
|
137
|
-
component.handleDropdownValueChange.subscribe(emitSpy);
|
|
138
|
-
|
|
139
|
-
component.name = 'category';
|
|
140
|
-
component.onChange({ value: 'electronics' });
|
|
141
|
-
|
|
142
|
-
expect(emitSpy).toHaveBeenCalledWith(['electronics', 'category']);
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
describe('filter emission', () => {
|
|
147
|
-
it('should emit handleOnFilter after debounce when onFilter is called', fakeAsync(() => {
|
|
148
|
-
const emitSpy = jest.fn();
|
|
149
|
-
component.handleOnFilter.subscribe(emitSpy);
|
|
150
|
-
|
|
151
|
-
const mockFilterEvent = { filter: 'search term' } as any;
|
|
152
|
-
component.onFilter(mockFilterEvent);
|
|
153
|
-
|
|
154
|
-
tick(300);
|
|
155
|
-
|
|
156
|
-
expect(emitSpy).toHaveBeenCalledWith(mockFilterEvent);
|
|
157
|
-
}));
|
|
158
|
-
|
|
159
|
-
it('should debounce rapid filter calls', fakeAsync(() => {
|
|
160
|
-
const emitSpy = jest.fn();
|
|
161
|
-
component.handleOnFilter.subscribe(emitSpy);
|
|
162
|
-
|
|
163
|
-
const event1 = { filter: 'a' } as any;
|
|
164
|
-
const event2 = { filter: 'ab' } as any;
|
|
165
|
-
const event3 = { filter: 'abc' } as any;
|
|
166
|
-
|
|
167
|
-
component.onFilter(event1);
|
|
168
|
-
tick(100);
|
|
169
|
-
component.onFilter(event2);
|
|
170
|
-
tick(100);
|
|
171
|
-
component.onFilter(event3);
|
|
172
|
-
tick(300);
|
|
173
|
-
|
|
174
|
-
expect(emitSpy).toHaveBeenCalledTimes(1);
|
|
175
|
-
expect(emitSpy).toHaveBeenCalledWith(event3);
|
|
176
|
-
}));
|
|
177
|
-
});
|
|
178
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Component,
|
|
3
|
-
Input,
|
|
4
|
-
Output,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
NgZone,
|
|
7
|
-
ChangeDetectorRef,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import { DropdownFilterEvent } from 'primeng/dropdown';
|
|
10
|
-
import {
|
|
11
|
-
debounceTime,
|
|
12
|
-
distinctUntilChanged,
|
|
13
|
-
Subject,
|
|
14
|
-
Subscription,
|
|
15
|
-
} from 'rxjs';
|
|
16
|
-
|
|
17
|
-
@Component({
|
|
18
|
-
selector: 'atomix-dropdown',
|
|
19
|
-
templateUrl: './atomix-dropdown.component.html',
|
|
20
|
-
styleUrls: ['./atomix-dropdown.component.css'],
|
|
21
|
-
})
|
|
22
|
-
export class AtomixDropdownComponent {
|
|
23
|
-
@Input() options: any[] = []; //
|
|
24
|
-
@Input() selectedValues: any;
|
|
25
|
-
@Input() optionValue: string = '';
|
|
26
|
-
@Input() placeholder: string = '';
|
|
27
|
-
@Input() optionLabel: string = '';
|
|
28
|
-
@Input() filter: boolean = true;
|
|
29
|
-
@Input() name: string = '';
|
|
30
|
-
@Input() dropDownStyleClass: string = '';
|
|
31
|
-
@Input() withIcon: boolean = false;
|
|
32
|
-
@Input() disabled: boolean = false;
|
|
33
|
-
@Input() showClear: boolean = true;
|
|
34
|
-
@Input() iconName: string = '';
|
|
35
|
-
@Input() containerClass: string = ''; //
|
|
36
|
-
@Input() label: string = '';
|
|
37
|
-
@Input() isLabelRequired: boolean = false;
|
|
38
|
-
@Output() handleDropdownValueChange = new EventEmitter<any>();
|
|
39
|
-
@Output() handleOnFilter = new EventEmitter<DropdownFilterEvent>();
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The input from the user used to search list
|
|
43
|
-
*/
|
|
44
|
-
filerValue = new Subject<DropdownFilterEvent>();
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* The time in ms that it takes to register when user is done typing
|
|
48
|
-
*/
|
|
49
|
-
debounceTime = 300;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The trigger that uses the debounce time to create delay of when user types to actual filtering
|
|
53
|
-
*/
|
|
54
|
-
trigger = this.filerValue.pipe(
|
|
55
|
-
debounceTime(this.debounceTime),
|
|
56
|
-
distinctUntilChanged()
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Subscription to trigger
|
|
61
|
-
*/
|
|
62
|
-
subscription: Subscription = new Subscription();
|
|
63
|
-
|
|
64
|
-
constructor(
|
|
65
|
-
private cdr: ChangeDetectorRef,
|
|
66
|
-
private ngZone: NgZone
|
|
67
|
-
) {
|
|
68
|
-
this.subscription.add(
|
|
69
|
-
this.trigger.subscribe(($event) => {
|
|
70
|
-
this.handleOnFilter.emit($event);
|
|
71
|
-
})
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
onChange(event: any) {
|
|
76
|
-
this.ngZone.run(() => {
|
|
77
|
-
this.handleDropdownValueChange.emit([event.value, this.name]);
|
|
78
|
-
this.cdr.detectChanges(); // Ensure changes are detected
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
*
|
|
84
|
-
* @param event
|
|
85
|
-
*/
|
|
86
|
-
onFilter(event: DropdownFilterEvent) {
|
|
87
|
-
this.filerValue.next(event);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
|
|
2
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
|
-
import { DialogService, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
4
|
-
import { AtomixDynamicDialogComponent } from './atomix-dynamic-dialog.component';
|
|
5
|
-
import { AtomixDialogConfig } from './atomix-dynamic-dialog.models';
|
|
6
|
-
|
|
7
|
-
@Component({ selector: 'mock-component', template: '' })
|
|
8
|
-
class MockDialogContentComponent {}
|
|
9
|
-
|
|
10
|
-
describe('AtomixDynamicDialogComponent', () => {
|
|
11
|
-
let component: AtomixDynamicDialogComponent;
|
|
12
|
-
let fixture: ComponentFixture<AtomixDynamicDialogComponent>;
|
|
13
|
-
let mockDialogService: { open: jest.Mock };
|
|
14
|
-
let mockDialogRef: Partial<DynamicDialogRef>;
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
mockDialogRef = { close: jest.fn() } as any;
|
|
18
|
-
mockDialogService = { open: jest.fn().mockReturnValue(mockDialogRef) };
|
|
19
|
-
|
|
20
|
-
TestBed.configureTestingModule({
|
|
21
|
-
declarations: [AtomixDynamicDialogComponent],
|
|
22
|
-
providers: [{ provide: DialogService, useValue: mockDialogService }],
|
|
23
|
-
schemas: [NO_ERRORS_SCHEMA],
|
|
24
|
-
});
|
|
25
|
-
fixture = TestBed.createComponent(AtomixDynamicDialogComponent);
|
|
26
|
-
component = fixture.componentInstance;
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('should create', () => {
|
|
30
|
-
expect(component).toBeTruthy();
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
describe('dialog visibility management', () => {
|
|
34
|
-
it('should open a dialog via DialogService', () => {
|
|
35
|
-
const config: AtomixDialogConfig = {
|
|
36
|
-
component: MockDialogContentComponent,
|
|
37
|
-
header: 'Test Dialog',
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
component.openDialog(config);
|
|
41
|
-
|
|
42
|
-
expect(mockDialogService.open).toHaveBeenCalledTimes(1);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should return a DynamicDialogRef when opening a dialog', () => {
|
|
46
|
-
const config: AtomixDialogConfig = {
|
|
47
|
-
component: MockDialogContentComponent,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const ref = component.openDialog(config);
|
|
51
|
-
|
|
52
|
-
expect(ref).toBe(mockDialogRef);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('should pass the component to DialogService.open', () => {
|
|
56
|
-
const config: AtomixDialogConfig = {
|
|
57
|
-
component: MockDialogContentComponent,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
component.openDialog(config);
|
|
61
|
-
|
|
62
|
-
expect(mockDialogService.open).toHaveBeenCalledWith(
|
|
63
|
-
MockDialogContentComponent,
|
|
64
|
-
expect.any(Object)
|
|
65
|
-
);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('should apply default config values when not provided', () => {
|
|
69
|
-
const config: AtomixDialogConfig = {
|
|
70
|
-
component: MockDialogContentComponent,
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
component.openDialog(config);
|
|
74
|
-
|
|
75
|
-
const passedConfig = mockDialogService.open.mock.calls[0][1];
|
|
76
|
-
expect(passedConfig.header).toBe('');
|
|
77
|
-
expect(passedConfig.width).toBe('80%');
|
|
78
|
-
expect(passedConfig.height).toBe('fit-content');
|
|
79
|
-
expect(passedConfig.styleClass).toBe('dialog-width');
|
|
80
|
-
expect(passedConfig.dismissableMask).toBe(true);
|
|
81
|
-
expect(passedConfig.maximizable).toBe(true);
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
it('should override default config values with provided values', () => {
|
|
85
|
-
const config: AtomixDialogConfig = {
|
|
86
|
-
component: MockDialogContentComponent,
|
|
87
|
-
header: 'Custom Header',
|
|
88
|
-
width: '50%',
|
|
89
|
-
height: '400px',
|
|
90
|
-
dismissableMask: false,
|
|
91
|
-
maximizable: false,
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
component.openDialog(config);
|
|
95
|
-
|
|
96
|
-
const passedConfig = mockDialogService.open.mock.calls[0][1];
|
|
97
|
-
expect(passedConfig.header).toBe('Custom Header');
|
|
98
|
-
expect(passedConfig.width).toBe('50%');
|
|
99
|
-
expect(passedConfig.height).toBe('400px');
|
|
100
|
-
expect(passedConfig.dismissableMask).toBe(false);
|
|
101
|
-
expect(passedConfig.maximizable).toBe(false);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
it('should pass additional config options to DialogService', () => {
|
|
105
|
-
const config: AtomixDialogConfig = {
|
|
106
|
-
component: MockDialogContentComponent,
|
|
107
|
-
data: { id: 123, name: 'Test' },
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
component.openDialog(config);
|
|
111
|
-
|
|
112
|
-
const passedConfig = mockDialogService.open.mock.calls[0][1];
|
|
113
|
-
expect(passedConfig.data).toEqual({ id: 123, name: 'Test' });
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
it('should not pass the component property in the dialog config', () => {
|
|
117
|
-
const config: AtomixDialogConfig = {
|
|
118
|
-
component: MockDialogContentComponent,
|
|
119
|
-
header: 'Test',
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
component.openDialog(config);
|
|
123
|
-
|
|
124
|
-
const passedConfig = mockDialogService.open.mock.calls[0][1];
|
|
125
|
-
expect(passedConfig.component).toBeUndefined();
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
});
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
DialogService,
|
|
4
|
-
DynamicDialogConfig,
|
|
5
|
-
DynamicDialogRef,
|
|
6
|
-
} from 'primeng/dynamicdialog';
|
|
7
|
-
import { AtomixDialogConfig } from './atomix-dynamic-dialog.models';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'atomix-dynamic-dialog',
|
|
11
|
-
templateUrl: './atomix-dynamic-dialog.component.html',
|
|
12
|
-
styleUrl: './atomix-dynamic-dialog.component.css',
|
|
13
|
-
})
|
|
14
|
-
export class AtomixDynamicDialogComponent {
|
|
15
|
-
constructor(private dialogService: DialogService) {}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Open a dynamic dialog with the given configuration
|
|
19
|
-
* @param config Configuration object for the dialog
|
|
20
|
-
* @returns DynamicDialogRef instance
|
|
21
|
-
*/
|
|
22
|
-
public openDialog(config: AtomixDialogConfig): DynamicDialogRef {
|
|
23
|
-
// Extract the component and create a dialog configuration
|
|
24
|
-
const { component, ...dialogConfig } = config;
|
|
25
|
-
|
|
26
|
-
// Set default values if not provided
|
|
27
|
-
const finalConfig: DynamicDialogConfig = {
|
|
28
|
-
header: '',
|
|
29
|
-
width: '80%',
|
|
30
|
-
height: 'fit-content',
|
|
31
|
-
styleClass: 'dialog-width',
|
|
32
|
-
dismissableMask: true,
|
|
33
|
-
maximizable: true,
|
|
34
|
-
...dialogConfig,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
// Open the dialog
|
|
38
|
-
const dialogRef = this.dialogService.open(component, finalConfig);
|
|
39
|
-
|
|
40
|
-
return dialogRef;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Reuse the same interface
|
|
2
|
-
export interface AtomixDialogConfig {
|
|
3
|
-
component: any;
|
|
4
|
-
data?: any;
|
|
5
|
-
header?: string;
|
|
6
|
-
width?: string;
|
|
7
|
-
height?: string;
|
|
8
|
-
styleClass?: string;
|
|
9
|
-
dismissableMask?: boolean;
|
|
10
|
-
maximizable?: boolean;
|
|
11
|
-
[key: string]: any; // Allow any additional PrimeNG DynamicDialog configuration options
|
|
12
|
-
}
|
package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.html
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<label *ngIf="label" [for]="controlName"
|
|
2
|
-
>{{ label }}
|
|
3
|
-
<span *ngIf="isLabelRequired" class="error-asterisk">*</span></label
|
|
4
|
-
>
|
|
5
|
-
<p-autoComplete
|
|
6
|
-
[appendTo]="'body'"
|
|
7
|
-
[formControl]="control"
|
|
8
|
-
[id]="controlName"
|
|
9
|
-
[suggestions]="suggestions"
|
|
10
|
-
[placeholder]="placeholder"
|
|
11
|
-
[pTooltip]="tooltip"
|
|
12
|
-
[tooltipPosition]="tooltipPosition"
|
|
13
|
-
field="name"
|
|
14
|
-
(completeMethod)="onQuery($event)"
|
|
15
|
-
(onSelect)="onOptionSelected($event)"
|
|
16
|
-
[showClear]="true"
|
|
17
|
-
[dropdown]="dropdown"
|
|
18
|
-
(onClear)="this.onSelect.emit($event)"
|
|
19
|
-
[styleClass]="styleClass + ' lib-form-autocomplete'"
|
|
20
|
-
/>
|