primekit 1.0.9 → 1.0.10
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/README.md +25 -25
- package/ng-package.json +8 -0
- package/package.json +12 -25
- package/src/assets/images/empty-table.svg +25 -25
- package/src/lib/lib/atomix-alert/atomix-alert.component.css +67 -0
- package/src/lib/lib/atomix-alert/atomix-alert.component.html +7 -0
- package/src/lib/lib/atomix-alert/atomix-alert.component.spec.ts +154 -0
- package/src/lib/lib/atomix-alert/atomix-alert.component.ts +75 -0
- package/src/lib/lib/atomix-autocomplete/atomix-autocomplete.component.html +35 -0
- package/src/lib/lib/atomix-autocomplete/atomix-autocomplete.component.scss +72 -0
- package/src/lib/lib/atomix-autocomplete/atomix-autocomplete.component.spec.ts +210 -0
- package/src/lib/lib/atomix-autocomplete/atomix-autocomplete.component.ts +70 -0
- package/src/lib/lib/atomix-button/atomix-button.component.css +70 -0
- package/src/lib/lib/atomix-button/atomix-button.component.html +20 -0
- package/src/lib/lib/atomix-button/atomix-button.component.spec.ts +135 -0
- package/src/lib/lib/atomix-button/atomix-button.component.ts +28 -0
- package/{lib/lib/atomix-button/atomix-button.models.d.ts → src/lib/lib/atomix-button/atomix-button.models.ts} +2 -2
- package/src/lib/lib/atomix-calendar/atomix-calendar.component.css +5 -0
- package/src/lib/lib/atomix-calendar/atomix-calendar.component.html +20 -0
- package/src/lib/lib/atomix-calendar/atomix-calendar.component.spec.ts +145 -0
- package/src/lib/lib/atomix-calendar/atomix-calendar.component.ts +71 -0
- package/src/lib/lib/atomix-card/atomix-card.component.css +4 -0
- package/src/lib/lib/atomix-card/atomix-card.component.html +3 -0
- package/src/lib/lib/atomix-card/atomix-card.component.spec.ts +63 -0
- package/src/lib/lib/atomix-card/atomix-card.component.ts +13 -0
- package/src/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.css +12 -0
- package/src/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.html +9 -0
- package/src/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.spec.ts +63 -0
- package/src/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.ts +22 -0
- package/src/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.html +233 -0
- package/src/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.scss +266 -0
- package/src/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.spec.ts +1465 -0
- package/src/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.ts +717 -0
- package/src/lib/lib/atomix-divider/atomix-divider.component.css +0 -0
- package/src/lib/lib/atomix-divider/atomix-divider.component.html +7 -0
- package/src/lib/lib/atomix-divider/atomix-divider.component.spec.ts +91 -0
- package/src/lib/lib/atomix-divider/atomix-divider.component.ts +17 -0
- package/src/lib/lib/atomix-dropdown/atomix-dropdown.component.css +25 -0
- package/src/lib/lib/atomix-dropdown/atomix-dropdown.component.html +37 -0
- package/src/lib/lib/atomix-dropdown/atomix-dropdown.component.spec.ts +178 -0
- package/src/lib/lib/atomix-dropdown/atomix-dropdown.component.ts +89 -0
- 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 +128 -0
- package/src/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.ts +42 -0
- package/src/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.models.ts +12 -0
- package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.html +20 -0
- package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.scss +7 -0
- package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.spec.ts +169 -0
- package/src/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.ts +41 -0
- package/src/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.html +21 -0
- package/src/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.scss +7 -0
- package/src/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.spec.ts +142 -0
- package/src/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.ts +32 -0
- package/src/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.html +13 -0
- package/src/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.scss +14 -0
- package/src/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.spec.ts +112 -0
- package/src/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.ts +28 -0
- package/src/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.html +20 -0
- package/src/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.scss +3 -0
- package/src/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.spec.ts +153 -0
- package/src/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.ts +28 -0
- package/src/lib/lib/atomix-form/atomix-form-chips/form.chips.models.ts +5 -0
- package/src/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.html +24 -0
- package/src/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.scss +15 -0
- package/src/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.spec.ts +156 -0
- package/src/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.ts +36 -0
- package/src/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.html +33 -0
- package/src/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.scss +32 -0
- package/src/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.spec.ts +156 -0
- package/src/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.ts +42 -0
- package/src/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.html +14 -0
- 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 +104 -0
- package/src/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.ts +24 -0
- package/src/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.html +16 -0
- 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 +92 -0
- package/src/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.ts +24 -0
- package/src/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.html +23 -0
- package/src/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.scss +3 -0
- package/src/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.spec.ts +126 -0
- package/src/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.ts +26 -0
- package/src/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.html +17 -0
- package/src/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.scss +6 -0
- package/src/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.spec.ts +120 -0
- package/src/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.ts +24 -0
- package/src/lib/lib/atomix-input/atomix-input.component.css +52 -0
- package/src/lib/lib/atomix-input/atomix-input.component.html +45 -0
- package/src/lib/lib/atomix-input/atomix-input.component.spec.ts +229 -0
- package/src/lib/lib/atomix-input/atomix-input.component.ts +64 -0
- package/src/lib/lib/atomix-input-switch/atomix-input-switch.component.css +12 -0
- package/src/lib/lib/atomix-input-switch/atomix-input-switch.component.html +17 -0
- package/src/lib/lib/atomix-input-switch/atomix-input-switch.component.spec.ts +173 -0
- package/src/lib/lib/atomix-input-switch/atomix-input-switch.component.ts +62 -0
- package/src/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.html +47 -0
- package/src/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.scss +14 -0
- package/src/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.spec.ts +21 -0
- package/src/lib/lib/atomix-loading-overlay/atomix-loading-overlay.component.ts +25 -0
- package/src/lib/lib/atomix-messages/messages.component.css +0 -0
- package/src/lib/lib/atomix-messages/messages.component.html +9 -0
- package/src/lib/lib/atomix-messages/messages.component.spec.ts +115 -0
- package/src/lib/lib/atomix-messages/messages.component.ts +17 -0
- package/src/lib/lib/atomix-pagination/atomix-pagination.component.css +19 -0
- package/src/lib/lib/atomix-pagination/atomix-pagination.component.html +24 -0
- package/src/lib/lib/atomix-pagination/atomix-pagination.component.spec.ts +98 -0
- package/src/lib/lib/atomix-pagination/atomix-pagination.component.ts +36 -0
- 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 +7 -0
- package/src/lib/lib/atomix-radio-button/atomix-radio-button.component.spec.ts +116 -0
- package/src/lib/lib/atomix-radio-button/atomix-radio-button.component.ts +37 -0
- package/src/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.css +49 -0
- package/src/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.html +68 -0
- package/src/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.spec.ts +282 -0
- package/src/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.ts +119 -0
- package/{lib/lib/atomix-select-button/atomix-select-button-models.d.ts → src/lib/lib/atomix-select-button/atomix-select-button-models.ts} +4 -4
- package/src/lib/lib/atomix-select-button/atomix-select-button.component.css +5 -0
- package/src/lib/lib/atomix-select-button/atomix-select-button.component.html +7 -0
- package/src/lib/lib/atomix-select-button/atomix-select-button.component.spec.ts +73 -0
- package/src/lib/lib/atomix-select-button/atomix-select-button.component.ts +19 -0
- package/src/lib/lib/atomix-snackbar/atomix-snackbar.component.css +30 -0
- package/src/lib/lib/atomix-snackbar/atomix-snackbar.component.html +4 -0
- package/src/lib/lib/atomix-snackbar/atomix-snackbar.component.spec.ts +60 -0
- package/src/lib/lib/atomix-snackbar/atomix-snackbar.component.ts +27 -0
- package/src/lib/lib/atomix-spinner/atomix-spinner.component.css +0 -0
- package/src/lib/lib/atomix-spinner/atomix-spinner.component.html +7 -0
- package/src/lib/lib/atomix-spinner/atomix-spinner.component.spec.ts +70 -0
- package/src/lib/lib/atomix-spinner/atomix-spinner.component.ts +13 -0
- package/src/lib/lib/atomix-steps/atomix-steps.component.html +9 -0
- package/src/lib/lib/atomix-steps/atomix-steps.component.scss +0 -0
- package/src/lib/lib/atomix-steps/atomix-steps.component.spec.ts +120 -0
- package/src/lib/lib/atomix-steps/atomix-steps.component.ts +32 -0
- package/src/lib/lib/atomix-tabMenu/atomix-tabMenu.component.css +0 -0
- package/src/lib/lib/atomix-tabMenu/atomix-tabMenu.component.html +26 -0
- package/src/lib/lib/atomix-tabMenu/atomix-tabMenu.component.spec.ts +106 -0
- package/src/lib/lib/atomix-tabMenu/atomix-tabMenu.component.ts +36 -0
- package/src/lib/lib/atomix-table/atomix-table.component.css +152 -0
- package/src/lib/lib/atomix-table/atomix-table.component.html +647 -0
- package/src/lib/lib/atomix-table/atomix-table.component.spec.ts +1648 -0
- package/src/lib/lib/atomix-table/atomix-table.component.ts +422 -0
- package/src/lib/lib/atomix-table/atomix-table.models.ts +39 -0
- package/src/lib/lib/atomix-tag/atomix-tag.component.css +0 -0
- package/src/lib/lib/atomix-tag/atomix-tag.component.html +6 -0
- package/src/lib/lib/atomix-tag/atomix-tag.component.spec.ts +47 -0
- package/src/lib/lib/atomix-tag/atomix-tag.component.ts +13 -0
- package/src/lib/lib/utils/prime-icons.util.spec.ts +21 -0
- package/src/lib/lib/utils/prime-icons.util.ts +11 -0
- package/src/lib/primekit.component.spec.ts +19 -0
- package/src/lib/primekit.component.ts +10 -0
- package/src/lib/primekit.module.spec.ts +155 -0
- package/src/lib/primekit.module.ts +183 -0
- package/src/lib/primekit.service.spec.ts +17 -0
- package/src/lib/primekit.service.ts +8 -0
- package/{public-api.d.ts → src/public-api.ts} +47 -37
- package/tsconfig.lib.json +13 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +10 -0
- package/esm2022/lib/lib/atomix-alert/atomix-alert.component.mjs +0 -76
- package/esm2022/lib/lib/atomix-autocomplete/atomix-autocomplete.component.mjs +0 -108
- package/esm2022/lib/lib/atomix-button/atomix-button.component.mjs +0 -49
- package/esm2022/lib/lib/atomix-button/atomix-button.models.mjs +0 -2
- package/esm2022/lib/lib/atomix-calendar/atomix-calendar.component.mjs +0 -90
- package/esm2022/lib/lib/atomix-card/atomix-card.component.mjs +0 -24
- package/esm2022/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.mjs +0 -28
- package/esm2022/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.mjs +0 -648
- package/esm2022/lib/lib/atomix-divider/atomix-divider.component.mjs +0 -27
- package/esm2022/lib/lib/atomix-dropdown/atomix-dropdown.component.mjs +0 -105
- package/esm2022/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.mjs +0 -38
- package/esm2022/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.models.mjs +0 -2
- package/esm2022/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.mjs +0 -67
- package/esm2022/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.mjs +0 -59
- package/esm2022/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.mjs +0 -48
- package/esm2022/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.mjs +0 -54
- package/esm2022/lib/lib/atomix-form/atomix-form-chips/form.chips.models.mjs +0 -2
- package/esm2022/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.mjs +0 -70
- package/esm2022/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.mjs +0 -80
- package/esm2022/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.mjs +0 -48
- package/esm2022/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.mjs +0 -48
- package/esm2022/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.mjs +0 -46
- package/esm2022/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.mjs +0 -46
- package/esm2022/lib/lib/atomix-input/atomix-input.component.mjs +0 -94
- package/esm2022/lib/lib/atomix-input-switch/atomix-input-switch.component.mjs +0 -85
- package/esm2022/lib/lib/atomix-messages/messages.component.mjs +0 -33
- package/esm2022/lib/lib/atomix-pagination/atomix-pagination.component.mjs +0 -48
- package/esm2022/lib/lib/atomix-radio-button/atomix-radio-button.component.mjs +0 -50
- package/esm2022/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.mjs +0 -149
- package/esm2022/lib/lib/atomix-select-button/atomix-select-button-models.mjs +0 -2
- package/esm2022/lib/lib/atomix-select-button/atomix-select-button.component.mjs +0 -25
- package/esm2022/lib/lib/atomix-snackbar/atomix-snackbar.component.mjs +0 -29
- package/esm2022/lib/lib/atomix-spinner/atomix-spinner.component.mjs +0 -24
- package/esm2022/lib/lib/atomix-steps/atomix-steps.component.mjs +0 -41
- package/esm2022/lib/lib/atomix-tabMenu/atomix-tabMenu.component.mjs +0 -51
- package/esm2022/lib/lib/atomix-table/atomix-table.component.mjs +0 -454
- package/esm2022/lib/lib/atomix-table/atomix-table.models.mjs +0 -2
- package/esm2022/lib/lib/atomix-tag/atomix-tag.component.mjs +0 -24
- package/esm2022/lib/lib/utils/prime-icons.util.mjs +0 -10
- package/esm2022/lib/primekit.component.mjs +0 -11
- package/esm2022/lib/primekit.module.mjs +0 -313
- package/esm2022/lib/primekit.service.mjs +0 -14
- package/esm2022/primekit.mjs +0 -5
- package/esm2022/public-api.mjs +0 -43
- package/fesm2022/primekit.mjs +0 -3041
- package/fesm2022/primekit.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/lib/atomix-alert/atomix-alert.component.d.ts +0 -22
- package/lib/lib/atomix-autocomplete/atomix-autocomplete.component.d.ts +0 -34
- package/lib/lib/atomix-button/atomix-button.component.d.ts +0 -19
- package/lib/lib/atomix-calendar/atomix-calendar.component.d.ts +0 -27
- package/lib/lib/atomix-card/atomix-card.component.d.ts +0 -9
- package/lib/lib/atomix-confirmation-dialog/atomix-confirmation-dialog.component.d.ts +0 -12
- package/lib/lib/atomix-daterange-calendar/atomix-daterange-calendar.component.d.ts +0 -72
- package/lib/lib/atomix-divider/atomix-divider.component.d.ts +0 -12
- package/lib/lib/atomix-dropdown/atomix-dropdown.component.d.ts +0 -50
- package/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.component.d.ts +0 -15
- package/lib/lib/atomix-dynamic-dialog/atomix-dynamic-dialog.models.d.ts +0 -11
- package/lib/lib/atomix-form/atomix-form-autocomplete/atomix-form-autocomplete.component.d.ts +0 -25
- package/lib/lib/atomix-form/atomix-form-calendar/atomix-form-calendar.component.d.ts +0 -23
- package/lib/lib/atomix-form/atomix-form-checkbox/atomix-form-checkbox.component.d.ts +0 -18
- package/lib/lib/atomix-form/atomix-form-chips/atomix-form-chips.component.d.ts +0 -19
- package/lib/lib/atomix-form/atomix-form-chips/form.chips.models.d.ts +0 -5
- package/lib/lib/atomix-form/atomix-form-dropdown/atomix-form-dropdown.component.d.ts +0 -25
- package/lib/lib/atomix-form/atomix-form-input-component/atomix-form-input-component.component.d.ts +0 -28
- package/lib/lib/atomix-form/atomix-form-inputmask-component/atomix-form-inputmask-component.component.d.ts +0 -17
- package/lib/lib/atomix-form/atomix-form-password-component/atomix-form-password-component.component.d.ts +0 -17
- package/lib/lib/atomix-form/atomix-form-radio-button/atomix-radio-button.component.d.ts +0 -19
- package/lib/lib/atomix-form/atomix-form-textarea/atomix-form-textarea.component.d.ts +0 -17
- package/lib/lib/atomix-input/atomix-input.component.d.ts +0 -29
- package/lib/lib/atomix-input-switch/atomix-input-switch.component.d.ts +0 -30
- package/lib/lib/atomix-messages/messages.component.d.ts +0 -13
- package/lib/lib/atomix-pagination/atomix-pagination.component.d.ts +0 -19
- package/lib/lib/atomix-radio-button/atomix-radio-button.component.d.ts +0 -15
- package/lib/lib/atomix-search-dropdown/atomix-search-dropdown.component.d.ts +0 -60
- package/lib/lib/atomix-select-button/atomix-select-button.component.d.ts +0 -12
- package/lib/lib/atomix-snackbar/atomix-snackbar.component.d.ts +0 -12
- package/lib/lib/atomix-spinner/atomix-spinner.component.d.ts +0 -9
- package/lib/lib/atomix-steps/atomix-steps.component.d.ts +0 -19
- package/lib/lib/atomix-tabMenu/atomix-tabMenu.component.d.ts +0 -19
- package/lib/lib/atomix-table/atomix-table.component.d.ts +0 -119
- package/lib/lib/atomix-table/atomix-table.models.d.ts +0 -43
- package/lib/lib/atomix-tag/atomix-tag.component.d.ts +0 -9
- package/lib/lib/utils/prime-icons.util.d.ts +0 -3
- package/lib/primekit.component.d.ts +0 -5
- package/lib/primekit.module.d.ts +0 -70
- package/lib/primekit.service.d.ts +0 -6
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
|
+
import { AtomixAutocompleteComponent } from './atomix-autocomplete.component';
|
|
4
|
+
|
|
5
|
+
describe('AtomixAutocompleteComponent', () => {
|
|
6
|
+
let component: AtomixAutocompleteComponent;
|
|
7
|
+
let fixture: ComponentFixture<AtomixAutocompleteComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [AtomixAutocompleteComponent],
|
|
12
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
13
|
+
}).overrideComponent(AtomixAutocompleteComponent, {
|
|
14
|
+
set: {
|
|
15
|
+
template: '<div></div>',
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
fixture = TestBed.createComponent(AtomixAutocompleteComponent);
|
|
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 suggestions as empty array', () => {
|
|
28
|
+
expect(component.suggestions).toEqual([]);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('should have default placeholder as empty string', () => {
|
|
32
|
+
expect(component.placeholder).toBe('');
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('should have default optionLabel as empty string', () => {
|
|
36
|
+
expect(component.optionLabel).toBe('');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should have default optionValue as empty string', () => {
|
|
40
|
+
expect(component.optionValue).toBe('');
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('should have default optionDescription as empty string', () => {
|
|
44
|
+
expect(component.optionDescription).toBe('');
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('should have default name as empty string', () => {
|
|
48
|
+
expect(component.name).toBe('');
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('should have default disabled as false', () => {
|
|
52
|
+
expect(component.disabled).toBe(false);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('should have default showClear as true', () => {
|
|
56
|
+
expect(component.showClear).toBe(true);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('should have default dropdown as false', () => {
|
|
60
|
+
expect(component.dropdown).toBe(false);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('should have default styleClass as empty string', () => {
|
|
64
|
+
expect(component.styleClass).toBe('');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('should have default autocompleteContainer as empty string', () => {
|
|
68
|
+
expect(component.autocompleteContainer).toBe('');
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('should have default label as empty string', () => {
|
|
72
|
+
expect(component.label).toBe('');
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
it('should have default delay as 300', () => {
|
|
76
|
+
expect(component.delay).toBe(300);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('should have default virtualScroll as false', () => {
|
|
80
|
+
expect(component.virtualScroll).toBe(false);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('should have default virtualScrollItemSize as 32', () => {
|
|
84
|
+
expect(component.virtualScrollItemSize).toBe(32);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('should have default isLabelRequired as false', () => {
|
|
88
|
+
expect(component.isLabelRequired).toBe(false);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it('should accept suggestions input', () => {
|
|
92
|
+
const suggestions = [
|
|
93
|
+
{ label: 'Item 1', value: 1 },
|
|
94
|
+
{ label: 'Item 2', value: 2 },
|
|
95
|
+
];
|
|
96
|
+
component.suggestions = suggestions;
|
|
97
|
+
expect(component.suggestions).toEqual(suggestions);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it('should accept placeholder input', () => {
|
|
101
|
+
component.placeholder = 'Search...';
|
|
102
|
+
expect(component.placeholder).toBe('Search...');
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('should accept disabled input', () => {
|
|
106
|
+
component.disabled = true;
|
|
107
|
+
expect(component.disabled).toBe(true);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
describe('suggestions display', () => {
|
|
112
|
+
it('should store suggestions when provided', () => {
|
|
113
|
+
const suggestions = [
|
|
114
|
+
{ name: 'Apple', code: 'A' },
|
|
115
|
+
{ name: 'Banana', code: 'B' },
|
|
116
|
+
{ name: 'Cherry', code: 'C' },
|
|
117
|
+
];
|
|
118
|
+
component.suggestions = suggestions;
|
|
119
|
+
expect(component.suggestions).toEqual(suggestions);
|
|
120
|
+
expect(component.suggestions.length).toBe(3);
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('should handle empty suggestions array', () => {
|
|
124
|
+
component.suggestions = [];
|
|
125
|
+
expect(component.suggestions).toEqual([]);
|
|
126
|
+
expect(component.suggestions.length).toBe(0);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it('should update suggestions when new values are set', () => {
|
|
130
|
+
component.suggestions = [{ name: 'First' }];
|
|
131
|
+
expect(component.suggestions.length).toBe(1);
|
|
132
|
+
|
|
133
|
+
component.suggestions = [{ name: 'Second' }, { name: 'Third' }];
|
|
134
|
+
expect(component.suggestions.length).toBe(2);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
describe('selection emission', () => {
|
|
139
|
+
it('should emit selectOptionHandler when a suggestion is selected', () => {
|
|
140
|
+
const emitSpy = jest.fn();
|
|
141
|
+
component.selectOptionHandler.subscribe(emitSpy);
|
|
142
|
+
|
|
143
|
+
const mockEvent = { value: { name: 'Apple', code: 'A' } };
|
|
144
|
+
component.name = 'fruit';
|
|
145
|
+
component.selectOptionHandler.emit([mockEvent, 'fruit']);
|
|
146
|
+
|
|
147
|
+
expect(emitSpy).toHaveBeenCalledWith([mockEvent, 'fruit']);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
it('should emit queryHandler when autocomplete query is triggered', () => {
|
|
151
|
+
const emitSpy = jest.fn();
|
|
152
|
+
component.queryHandler.subscribe(emitSpy);
|
|
153
|
+
|
|
154
|
+
const mockEvent = { query: 'app' };
|
|
155
|
+
component.name = 'search';
|
|
156
|
+
component.queryHandler.emit([mockEvent, 'search']);
|
|
157
|
+
|
|
158
|
+
expect(emitSpy).toHaveBeenCalledWith([mockEvent, 'search']);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('should emit selectedValuesChange on model change', () => {
|
|
162
|
+
const emitSpy = jest.fn();
|
|
163
|
+
component.selectedValuesChange.subscribe(emitSpy);
|
|
164
|
+
|
|
165
|
+
const selectedItem = { name: 'Apple', code: 'A' };
|
|
166
|
+
component.onModelChange(selectedItem);
|
|
167
|
+
|
|
168
|
+
expect(emitSpy).toHaveBeenCalledWith(selectedItem);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
it('should update selectedValues on model change', () => {
|
|
172
|
+
const selectedItem = { name: 'Banana', code: 'B' };
|
|
173
|
+
component.onModelChange(selectedItem);
|
|
174
|
+
|
|
175
|
+
expect(component.selectedValues).toEqual(selectedItem);
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
describe('ControlValueAccessor', () => {
|
|
180
|
+
it('should write value via writeValue', () => {
|
|
181
|
+
const value = { name: 'Test', code: 'T' };
|
|
182
|
+
component.writeValue(value);
|
|
183
|
+
expect(component.selectedValues).toEqual(value);
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it('should register onChange function', () => {
|
|
187
|
+
const fn = jest.fn();
|
|
188
|
+
component.registerOnChange(fn);
|
|
189
|
+
|
|
190
|
+
component.onModelChange('newValue');
|
|
191
|
+
expect(fn).toHaveBeenCalledWith('newValue');
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
it('should register onTouched function', () => {
|
|
195
|
+
const fn = jest.fn();
|
|
196
|
+
component.registerOnTouched(fn);
|
|
197
|
+
|
|
198
|
+
component.onModelChange('value');
|
|
199
|
+
expect(fn).toHaveBeenCalled();
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
it('should set disabled state', () => {
|
|
203
|
+
component.setDisabledState(true);
|
|
204
|
+
expect(component.disabled).toBe(true);
|
|
205
|
+
|
|
206
|
+
component.setDisabledState(false);
|
|
207
|
+
expect(component.disabled).toBe(false);
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
EventEmitter,
|
|
4
|
+
Input,
|
|
5
|
+
Output,
|
|
6
|
+
forwardRef,
|
|
7
|
+
} from '@angular/core';
|
|
8
|
+
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'atomix-autocomplete',
|
|
12
|
+
templateUrl: './atomix-autocomplete.component.html',
|
|
13
|
+
styleUrls: ['./atomix-autocomplete.component.scss'],
|
|
14
|
+
providers: [
|
|
15
|
+
{
|
|
16
|
+
provide: NG_VALUE_ACCESSOR,
|
|
17
|
+
useExisting: forwardRef(() => AtomixAutocompleteComponent),
|
|
18
|
+
multi: true,
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
})
|
|
22
|
+
export class AtomixAutocompleteComponent implements ControlValueAccessor {
|
|
23
|
+
@Input() suggestions: any[] = [];
|
|
24
|
+
@Input() placeholder: string = '';
|
|
25
|
+
@Input() optionLabel: string = '';
|
|
26
|
+
@Input() optionValue: string = '';
|
|
27
|
+
@Input() optionDescription: string = '';
|
|
28
|
+
@Input() name: string = '';
|
|
29
|
+
@Input() disabled: boolean = false;
|
|
30
|
+
@Input() showClear: boolean = true;
|
|
31
|
+
@Input() dropdown: boolean = false;
|
|
32
|
+
@Input() styleClass: string = '';
|
|
33
|
+
@Input() autocompleteContainer: string = '';
|
|
34
|
+
@Input() label: string = '';
|
|
35
|
+
@Input() delay: number = 300;
|
|
36
|
+
@Input() virtualScroll: boolean = false;
|
|
37
|
+
@Input() virtualScrollItemSize: number = 32;
|
|
38
|
+
@Input() isLabelRequired: boolean = false;
|
|
39
|
+
|
|
40
|
+
@Output() queryHandler = new EventEmitter<any>();
|
|
41
|
+
@Output() selectOptionHandler = new EventEmitter<any>();
|
|
42
|
+
|
|
43
|
+
@Input() selectedValues: any;
|
|
44
|
+
@Output() selectedValuesChange = new EventEmitter<any>();
|
|
45
|
+
private onChange = (value: any) => {};
|
|
46
|
+
private onTouched = () => {};
|
|
47
|
+
|
|
48
|
+
writeValue(value: any): void {
|
|
49
|
+
this.selectedValues = value;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
registerOnChange(fn: any): void {
|
|
53
|
+
this.onChange = fn;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
registerOnTouched(fn: any): void {
|
|
57
|
+
this.onTouched = fn;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
setDisabledState(isDisabled: boolean): void {
|
|
61
|
+
this.disabled = isDisabled;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
onModelChange(value: any): void {
|
|
65
|
+
this.selectedValues = value;
|
|
66
|
+
this.onChange(value);
|
|
67
|
+
this.onTouched();
|
|
68
|
+
this.selectedValuesChange.emit(value);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
::ng-deep .p-button-primary {
|
|
2
|
+
background-color: #63b77e;
|
|
3
|
+
color: white !important;
|
|
4
|
+
border-radius: var(--global-border-radius);
|
|
5
|
+
height: 40px;
|
|
6
|
+
padding: 10.5px 17.5px 10.5px 17.5px;
|
|
7
|
+
font-size: 14px;
|
|
8
|
+
font-weight: 700;
|
|
9
|
+
line-height: 17px;
|
|
10
|
+
outline: none;
|
|
11
|
+
border: none;
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
|
|
14
|
+
&:enabled:hover {
|
|
15
|
+
background-color: #63b77e;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&:disabled {
|
|
19
|
+
.p-button-label {
|
|
20
|
+
color: rgba(0, 0, 0, 0.38) !important;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
::ng-deep .p-button-outlined {
|
|
26
|
+
background-color: var(--button-outlined-bg) !important;
|
|
27
|
+
color: var(--button-outlined-text) !important;
|
|
28
|
+
border-radius: var(--global-border-radius);
|
|
29
|
+
height: 40px;
|
|
30
|
+
padding: 10.5px 17.5px 10.5px 17.5px;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
font-weight: 700;
|
|
33
|
+
outline: none;
|
|
34
|
+
line-height: 17px;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
::ng-deep .refresh-button {
|
|
39
|
+
background-color: var(--button-outlined-bg) !important;
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
height: 40px;
|
|
42
|
+
width: 40px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
::ng-deep .p-button-text {
|
|
46
|
+
color: #424242;
|
|
47
|
+
background: none;
|
|
48
|
+
border-radius: 1px solid gray;
|
|
49
|
+
&:disabled {
|
|
50
|
+
background: none !important;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
::ng-deep .p-button-danger {
|
|
55
|
+
background-color: var(--error-color) !important;
|
|
56
|
+
border-color: var(--error-color) !important;
|
|
57
|
+
color: var(--error-color-text) !important;
|
|
58
|
+
border-radius: var(--global-border-radius);
|
|
59
|
+
height: 40px;
|
|
60
|
+
padding: 10.5px 17.5px 10.5px 17.5px;
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
font-weight: 700;
|
|
63
|
+
line-height: 17px;
|
|
64
|
+
border: none;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
|
|
67
|
+
&:enabled:hover {
|
|
68
|
+
background-color: var(--error-color) !important;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<button
|
|
2
|
+
pButton
|
|
3
|
+
pRipple
|
|
4
|
+
[label]="label"
|
|
5
|
+
[ngClass]="[
|
|
6
|
+
class,
|
|
7
|
+
buttonType === 'primary' ? 'p-button-primary' : '',
|
|
8
|
+
buttonType === 'outlined' ? 'p-button-outlined' : '',
|
|
9
|
+
buttonType === 'text' ? 'p-button-text' : '',
|
|
10
|
+
buttonType === 'refresh' ? 'refresh-button' : '',
|
|
11
|
+
buttonType === 'danger' ? 'p-button-danger' : '',
|
|
12
|
+
]"
|
|
13
|
+
[disabled]="disabled"
|
|
14
|
+
[loading]="loading"
|
|
15
|
+
[size]="size"
|
|
16
|
+
[icon]="icon"
|
|
17
|
+
[iconPos]="iconPos"
|
|
18
|
+
(click)="onButtonClick($event)"
|
|
19
|
+
[type]="type"
|
|
20
|
+
></button>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
|
2
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
3
|
+
import { AtomixButtonComponent } from './atomix-button.component';
|
|
4
|
+
|
|
5
|
+
describe('AtomixButtonComponent', () => {
|
|
6
|
+
let component: AtomixButtonComponent;
|
|
7
|
+
let fixture: ComponentFixture<AtomixButtonComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
TestBed.configureTestingModule({
|
|
11
|
+
declarations: [AtomixButtonComponent],
|
|
12
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
13
|
+
});
|
|
14
|
+
fixture = TestBed.createComponent(AtomixButtonComponent);
|
|
15
|
+
component = fixture.componentInstance;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
describe('input bindings', () => {
|
|
23
|
+
it('should have default label as empty string', () => {
|
|
24
|
+
expect(component.label).toBe('');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('should accept label input', () => {
|
|
28
|
+
component.label = 'Submit';
|
|
29
|
+
fixture.detectChanges();
|
|
30
|
+
expect(component.label).toBe('Submit');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should have default disabled as false', () => {
|
|
34
|
+
expect(component.disabled).toBe(false);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it('should accept disabled input', () => {
|
|
38
|
+
component.disabled = true;
|
|
39
|
+
fixture.detectChanges();
|
|
40
|
+
expect(component.disabled).toBe(true);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('should have default loading as false', () => {
|
|
44
|
+
expect(component.loading).toBe(false);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it('should accept loading input', () => {
|
|
48
|
+
component.loading = true;
|
|
49
|
+
fixture.detectChanges();
|
|
50
|
+
expect(component.loading).toBe(true);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it('should have default size as small', () => {
|
|
54
|
+
expect(component.size).toBe('small');
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('should accept size input', () => {
|
|
58
|
+
component.size = 'large';
|
|
59
|
+
fixture.detectChanges();
|
|
60
|
+
expect(component.size).toBe('large');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('should have default buttonType as primary', () => {
|
|
64
|
+
expect(component.buttonType).toBe('primary');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('should accept buttonType input', () => {
|
|
68
|
+
component.buttonType = 'danger';
|
|
69
|
+
fixture.detectChanges();
|
|
70
|
+
expect(component.buttonType).toBe('danger');
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('should have default type as empty string', () => {
|
|
74
|
+
expect(component.type).toBe('');
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should accept type input', () => {
|
|
78
|
+
component.type = 'submit';
|
|
79
|
+
fixture.detectChanges();
|
|
80
|
+
expect(component.type).toBe('submit');
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('should have default class as empty string', () => {
|
|
84
|
+
expect(component.class).toBe('');
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it('should accept class input', () => {
|
|
88
|
+
component.class = 'custom-class';
|
|
89
|
+
fixture.detectChanges();
|
|
90
|
+
expect(component.class).toBe('custom-class');
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
it('should have default icon as empty string', () => {
|
|
94
|
+
expect(component.icon).toBe('');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('should accept icon input', () => {
|
|
98
|
+
component.icon = 'pi pi-check';
|
|
99
|
+
fixture.detectChanges();
|
|
100
|
+
expect(component.icon).toBe('pi pi-check');
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('should have default iconPos as left', () => {
|
|
104
|
+
expect(component.iconPos).toBe('left');
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('should accept iconPos input', () => {
|
|
108
|
+
component.iconPos = 'right';
|
|
109
|
+
fixture.detectChanges();
|
|
110
|
+
expect(component.iconPos).toBe('right');
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
describe('buttonClick event emission', () => {
|
|
115
|
+
it('should emit buttonClick when onButtonClick is called', () => {
|
|
116
|
+
const emitSpy = jest.fn();
|
|
117
|
+
component.buttonClick.subscribe(emitSpy);
|
|
118
|
+
|
|
119
|
+
const mockEvent = new MouseEvent('click');
|
|
120
|
+
component.onButtonClick(mockEvent);
|
|
121
|
+
|
|
122
|
+
expect(emitSpy).toHaveBeenCalledWith(mockEvent);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('should emit buttonClick only once per click', () => {
|
|
126
|
+
const emitSpy = jest.fn();
|
|
127
|
+
component.buttonClick.subscribe(emitSpy);
|
|
128
|
+
|
|
129
|
+
const mockEvent = new MouseEvent('click');
|
|
130
|
+
component.onButtonClick(mockEvent);
|
|
131
|
+
|
|
132
|
+
expect(emitSpy).toHaveBeenCalledTimes(1);
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import { ButtonSize, ButtonIconPosition } from './atomix-button.models';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: 'atomix-button',
|
|
6
|
+
templateUrl: './atomix-button.component.html',
|
|
7
|
+
styleUrls: ['./atomix-button.component.css'],
|
|
8
|
+
})
|
|
9
|
+
export class AtomixButtonComponent {
|
|
10
|
+
@Input() label: string = '';
|
|
11
|
+
@Input() disabled: boolean = false;
|
|
12
|
+
@Input() loading: boolean = false;
|
|
13
|
+
@Input() size: ButtonSize = 'small';
|
|
14
|
+
@Input() buttonType: 'primary' | 'danger' | 'text' | 'outlined' | 'refresh' =
|
|
15
|
+
'primary';
|
|
16
|
+
@Input() type: string = '';
|
|
17
|
+
@Input() class: string = '';
|
|
18
|
+
|
|
19
|
+
@Input() icon: string = '';
|
|
20
|
+
@Input() iconPos: ButtonIconPosition = 'left';
|
|
21
|
+
|
|
22
|
+
@Input() buttonData: any;
|
|
23
|
+
@Output() buttonClick = new EventEmitter<Event>();
|
|
24
|
+
|
|
25
|
+
onButtonClick(event: MouseEvent) {
|
|
26
|
+
this.buttonClick.emit(event); // Emit the event when button is clicked
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type ButtonSize = 'small' | 'large' | null | undefined;
|
|
2
|
-
export type ButtonIconPosition = 'left' | 'right';
|
|
1
|
+
export type ButtonSize = 'small' | 'large' | null | undefined;
|
|
2
|
+
export type ButtonIconPosition = 'left' | 'right';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<p-calendar
|
|
2
|
+
[(ngModel)]="selectedDate"
|
|
3
|
+
[selectionMode]="selectionMode"
|
|
4
|
+
[showButtonBar]="true"
|
|
5
|
+
[dateFormat]="'mm/dd/yy'"
|
|
6
|
+
[showOtherMonths]="true"
|
|
7
|
+
[showOnFocus]="true"
|
|
8
|
+
[locale]="enLocale"
|
|
9
|
+
[showIcon]="true"
|
|
10
|
+
[placeholder]="placeholder"
|
|
11
|
+
[styleClass]="styleClass"
|
|
12
|
+
[inputStyleClass]="inputStyleClass"
|
|
13
|
+
(ngModelChange)="onDateRangeChange($event)"
|
|
14
|
+
appendTo="body"
|
|
15
|
+
[showClear]="true"
|
|
16
|
+
[disabled]="disabled"
|
|
17
|
+
[maxDate]="maxDate"
|
|
18
|
+
[minDate]="minDate"
|
|
19
|
+
>
|
|
20
|
+
</p-calendar>
|