design-angular-kit 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +461 -0
- package/esm2022/design-angular-kit.mjs +5 -0
- package/esm2022/lib/abstracts/abstract-form.component.mjs +186 -0
- package/esm2022/lib/abstracts/abstract.component.mjs +46 -0
- package/esm2022/lib/components/core/accordion/accordion.component.mjs +39 -0
- package/esm2022/lib/components/core/alert/alert.component.mjs +71 -0
- package/esm2022/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.mjs +43 -0
- package/esm2022/lib/components/core/avatar/avatar-group/avatar-group.component.mjs +40 -0
- package/esm2022/lib/components/core/avatar/avatar.directive.mjs +78 -0
- package/esm2022/lib/components/core/avatar/avatar.module.mjs +33 -0
- package/esm2022/lib/components/core/badge/badge.directive.mjs +39 -0
- package/esm2022/lib/components/core/button/button.directive.mjs +80 -0
- package/esm2022/lib/components/core/callout/callout.component.mjs +64 -0
- package/esm2022/lib/components/core/card/card.component.mjs +59 -0
- package/esm2022/lib/components/core/carousel/carousel/carousel.component.mjs +84 -0
- package/esm2022/lib/components/core/carousel/carousel-item/carousel-item.component.mjs +19 -0
- package/esm2022/lib/components/core/carousel/carousel.module.mjs +18 -0
- package/esm2022/lib/components/core/chip/chip.component.mjs +136 -0
- package/esm2022/lib/components/core/collapse/collapse.component.mjs +116 -0
- package/esm2022/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.mjs +27 -0
- package/esm2022/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.mjs +11 -0
- package/esm2022/lib/components/core/dimmer/dimmer.component.mjs +55 -0
- package/esm2022/lib/components/core/dimmer/dimmer.module.mjs +19 -0
- package/esm2022/lib/components/core/dropdown/dropdown/dropdown.component.mjs +147 -0
- package/esm2022/lib/components/core/dropdown/dropdown-item/dropdown-item.component.mjs +70 -0
- package/esm2022/lib/components/core/dropdown/dropdown.module.mjs +18 -0
- package/esm2022/lib/components/core/forward/forward.directive.mjs +57 -0
- package/esm2022/lib/components/core/link/link.component.mjs +42 -0
- package/esm2022/lib/components/core/list/list/list.component.mjs +22 -0
- package/esm2022/lib/components/core/list/list-item/list-item.component.mjs +56 -0
- package/esm2022/lib/components/core/list/list.module.mjs +18 -0
- package/esm2022/lib/components/core/modal/modal.component.mjs +194 -0
- package/esm2022/lib/components/core/notifications/notifications.component.mjs +111 -0
- package/esm2022/lib/components/core/pagination/pagination.component.mjs +130 -0
- package/esm2022/lib/components/core/popover/popover.directive.mjs +176 -0
- package/esm2022/lib/components/core/progress-bar/progress-bar.component.mjs +34 -0
- package/esm2022/lib/components/core/progress-button/progress-button.component.mjs +25 -0
- package/esm2022/lib/components/core/spinner/spinner.component.mjs +30 -0
- package/esm2022/lib/components/core/steppers/steppers-container/steppers-container.component.mjs +116 -0
- package/esm2022/lib/components/core/steppers/steppers-item/steppers-item.component.mjs +22 -0
- package/esm2022/lib/components/core/steppers/steppers.module.mjs +18 -0
- package/esm2022/lib/components/core/tab/tab-container/tab-container.component.mjs +97 -0
- package/esm2022/lib/components/core/tab/tab-item/tab-item.component.mjs +39 -0
- package/esm2022/lib/components/core/tab/tab.module.mjs +18 -0
- package/esm2022/lib/components/core/table/sort/sort-header/sort-header.component.mjs +134 -0
- package/esm2022/lib/components/core/table/sort/sort.directive.mjs +123 -0
- package/esm2022/lib/components/core/table/table.component.mjs +45 -0
- package/esm2022/lib/components/core/table/table.module.mjs +19 -0
- package/esm2022/lib/components/core/timeline/timeline-item/timeline-item.component.mjs +90 -0
- package/esm2022/lib/components/core/timeline/timeline.component.mjs +36 -0
- package/esm2022/lib/components/core/timeline/timeline.module.mjs +18 -0
- package/esm2022/lib/components/core/tooltip/tooltip.directive.mjs +143 -0
- package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +112 -0
- package/esm2022/lib/components/form/checkbox/checkbox.component.mjs +48 -0
- package/esm2022/lib/components/form/form.module.mjs +63 -0
- package/esm2022/lib/components/form/input/input.component.mjs +190 -0
- package/esm2022/lib/components/form/password-input/password-input.component.mjs +149 -0
- package/esm2022/lib/components/form/radio-button/radio-button.component.mjs +60 -0
- package/esm2022/lib/components/form/range/range.component.mjs +64 -0
- package/esm2022/lib/components/form/rating/rating.component.mjs +50 -0
- package/esm2022/lib/components/form/select/select.component.mjs +70 -0
- package/esm2022/lib/components/form/textarea/textarea.component.mjs +55 -0
- package/esm2022/lib/components/form/transfer/store/transfer.reducers.mjs +191 -0
- package/esm2022/lib/components/form/transfer/store/transfer.state.mjs +2 -0
- package/esm2022/lib/components/form/transfer/store/transfer.store.mjs +70 -0
- package/esm2022/lib/components/form/transfer/transfer-list/transfer-list.component.mjs +72 -0
- package/esm2022/lib/components/form/transfer/transfer.component.mjs +149 -0
- package/esm2022/lib/components/form/transfer/transfer.model.mjs +6 -0
- package/esm2022/lib/components/form/upload-drag-drop/upload-drag-drop.component.mjs +142 -0
- package/esm2022/lib/components/form/upload-file-list/upload-file-list.component.mjs +107 -0
- package/esm2022/lib/components/navigation/back-button/back-button.component.mjs +67 -0
- package/esm2022/lib/components/navigation/back-to-top/back-to-top.component.mjs +68 -0
- package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.mjs +51 -0
- package/esm2022/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.mjs +21 -0
- package/esm2022/lib/components/navigation/breadcrumbs/breadcrumbs.module.mjs +18 -0
- package/esm2022/lib/components/navigation/header/header.component.mjs +103 -0
- package/esm2022/lib/components/navigation/megamenu/megamenu.component.mjs +27 -0
- package/esm2022/lib/components/navigation/navbar/navbar/navbar.component.mjs +49 -0
- package/esm2022/lib/components/navigation/navbar/navbar-item/navbar-item.component.mjs +11 -0
- package/esm2022/lib/components/navigation/navbar/navbar.module.mjs +18 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll-list-item.component.mjs +98 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll-list-items.component.mjs +44 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll.component.mjs +116 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll.model.mjs +2 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll.store.mjs +68 -0
- package/esm2022/lib/components/navigation/navscroll/navscroll.utils.mjs +23 -0
- package/esm2022/lib/components/navigation/sidebar/sidebar.component.mjs +50 -0
- package/esm2022/lib/components/navigation/skiplink/skiplink/skiplink.component.mjs +27 -0
- package/esm2022/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.mjs +26 -0
- package/esm2022/lib/components/navigation/skiplink/skiplink.module.mjs +18 -0
- package/esm2022/lib/components/utils/error-page/error-page.component.mjs +74 -0
- package/esm2022/lib/components/utils/icon/icon.component.mjs +63 -0
- package/esm2022/lib/components/utils/language-switcher/language-switcher.component.mjs +50 -0
- package/esm2022/lib/design-angular-kit.module.mjs +233 -0
- package/esm2022/lib/enums/colors.enums.mjs +12 -0
- package/esm2022/lib/enums/sizes.enum.mjs +9 -0
- package/esm2022/lib/interfaces/core.mjs +16 -0
- package/esm2022/lib/interfaces/design-angular-kit-config.mjs +7 -0
- package/esm2022/lib/interfaces/form.mjs +2 -0
- package/esm2022/lib/interfaces/icon.mjs +168 -0
- package/esm2022/lib/interfaces/sortable-table.mjs +6 -0
- package/esm2022/lib/interfaces/utils.mjs +2 -0
- package/esm2022/lib/pipes/date-ago.pipe.mjs +56 -0
- package/esm2022/lib/pipes/duration.pipe.mjs +115 -0
- package/esm2022/lib/pipes/mark-matching-text.pipe.mjs +48 -0
- package/esm2022/lib/provide-design-angular-kit.mjs +64 -0
- package/esm2022/lib/services/notification/notification.service.mjs +120 -0
- package/esm2022/lib/utils/coercion.mjs +18 -0
- package/esm2022/lib/utils/date-utils.mjs +162 -0
- package/esm2022/lib/utils/file-utils.mjs +73 -0
- package/esm2022/lib/utils/regex.mjs +35 -0
- package/esm2022/lib/validators/it-validators.mjs +156 -0
- package/esm2022/public_api.mjs +110 -0
- package/fesm2022/design-angular-kit.mjs +6731 -0
- package/fesm2022/design-angular-kit.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/abstracts/abstract-form.component.d.ts +87 -0
- package/lib/abstracts/abstract.component.d.ts +30 -0
- package/lib/components/core/accordion/accordion.component.d.ts +18 -0
- package/lib/components/core/alert/alert.component.d.ts +44 -0
- package/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.d.ts +29 -0
- package/lib/components/core/avatar/avatar-group/avatar-group.component.d.ts +15 -0
- package/lib/components/core/avatar/avatar.directive.d.ts +33 -0
- package/lib/components/core/avatar/avatar.module.d.ts +9 -0
- package/lib/components/core/badge/badge.directive.d.ts +23 -0
- package/lib/components/core/button/button.directive.d.ts +48 -0
- package/lib/components/core/callout/callout.component.d.ts +50 -0
- package/lib/components/core/card/card.component.d.ts +69 -0
- package/lib/components/core/carousel/carousel/carousel.component.d.ts +65 -0
- package/lib/components/core/carousel/carousel-item/carousel-item.component.d.ts +15 -0
- package/lib/components/core/carousel/carousel.module.d.ts +8 -0
- package/lib/components/core/chip/chip.component.d.ts +76 -0
- package/lib/components/core/collapse/collapse.component.d.ts +67 -0
- package/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.d.ts +12 -0
- package/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.d.ts +5 -0
- package/lib/components/core/dimmer/dimmer.component.d.ts +24 -0
- package/lib/components/core/dimmer/dimmer.module.d.ts +9 -0
- package/lib/components/core/dropdown/dropdown/dropdown.component.d.ts +94 -0
- package/lib/components/core/dropdown/dropdown-item/dropdown-item.component.d.ts +46 -0
- package/lib/components/core/dropdown/dropdown.module.d.ts +8 -0
- package/lib/components/core/forward/forward.directive.d.ts +14 -0
- package/lib/components/core/link/link.component.d.ts +35 -0
- package/lib/components/core/list/list/list.component.d.ts +24 -0
- package/lib/components/core/list/list-item/list-item.component.d.ts +41 -0
- package/lib/components/core/list/list.module.d.ts +8 -0
- package/lib/components/core/modal/modal.component.d.ts +135 -0
- package/lib/components/core/notifications/notifications.component.d.ts +45 -0
- package/lib/components/core/pagination/pagination.component.d.ts +92 -0
- package/lib/components/core/popover/popover.directive.d.ts +99 -0
- package/lib/components/core/progress-bar/progress-bar.component.d.ts +31 -0
- package/lib/components/core/progress-button/progress-button.component.d.ts +21 -0
- package/lib/components/core/spinner/spinner.component.d.ts +24 -0
- package/lib/components/core/steppers/steppers-container/steppers-container.component.d.ts +130 -0
- package/lib/components/core/steppers/steppers-item/steppers-item.component.d.ts +24 -0
- package/lib/components/core/steppers/steppers.module.d.ts +8 -0
- package/lib/components/core/tab/tab-container/tab-container.component.d.ts +60 -0
- package/lib/components/core/tab/tab-item/tab-item.component.d.ts +38 -0
- package/lib/components/core/tab/tab.module.d.ts +8 -0
- package/lib/components/core/table/sort/sort-header/sort-header.component.d.ts +72 -0
- package/lib/components/core/table/sort/sort.directive.d.ts +53 -0
- package/lib/components/core/table/table.component.d.ts +60 -0
- package/lib/components/core/table/table.module.d.ts +9 -0
- package/lib/components/core/timeline/timeline-item/timeline-item.component.d.ts +79 -0
- package/lib/components/core/timeline/timeline.component.d.ts +21 -0
- package/lib/components/core/timeline/timeline.module.d.ts +8 -0
- package/lib/components/core/tooltip/tooltip.directive.d.ts +82 -0
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +59 -0
- package/lib/components/form/checkbox/checkbox.component.d.ts +41 -0
- package/lib/components/form/form.module.d.ts +18 -0
- package/lib/components/form/input/input.component.d.ts +95 -0
- package/lib/components/form/password-input/password-input.component.d.ts +80 -0
- package/lib/components/form/radio-button/radio-button.component.d.ts +38 -0
- package/lib/components/form/range/range.component.d.ts +42 -0
- package/lib/components/form/rating/rating.component.d.ts +24 -0
- package/lib/components/form/select/select.component.d.ts +36 -0
- package/lib/components/form/textarea/textarea.component.d.ts +34 -0
- package/lib/components/form/transfer/store/transfer.reducers.d.ts +103 -0
- package/lib/components/form/transfer/store/transfer.state.d.ts +18 -0
- package/lib/components/form/transfer/store/transfer.store.d.ts +23 -0
- package/lib/components/form/transfer/transfer-list/transfer-list.component.d.ts +48 -0
- package/lib/components/form/transfer/transfer.component.d.ts +75 -0
- package/{src/lib/components/form/transfer/transfer.model.ts → lib/components/form/transfer/transfer.model.d.ts} +2 -9
- package/lib/components/form/upload-drag-drop/upload-drag-drop.component.d.ts +60 -0
- package/lib/components/form/upload-file-list/upload-file-list.component.d.ts +62 -0
- package/lib/components/navigation/back-button/back-button.component.d.ts +47 -0
- package/lib/components/navigation/back-to-top/back-to-top.component.d.ts +50 -0
- package/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.d.ts +28 -0
- package/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.d.ts +23 -0
- package/lib/components/navigation/breadcrumbs/breadcrumbs.module.d.ts +8 -0
- package/lib/components/navigation/header/header.component.d.ts +38 -0
- package/lib/components/navigation/megamenu/megamenu.component.d.ts +22 -0
- package/lib/components/navigation/navbar/navbar/navbar.component.d.ts +19 -0
- package/lib/components/navigation/navbar/navbar-item/navbar-item.component.d.ts +5 -0
- package/lib/components/navigation/navbar/navbar.module.d.ts +8 -0
- package/lib/components/navigation/navscroll/navscroll-list-item.component.d.ts +16 -0
- package/lib/components/navigation/navscroll/navscroll-list-items.component.d.ts +7 -0
- package/lib/components/navigation/navscroll/navscroll.component.d.ts +47 -0
- package/{src/lib/components/navigation/navscroll/navscroll.model.ts → lib/components/navigation/navscroll/navscroll.model.d.ts} +5 -7
- package/lib/components/navigation/navscroll/navscroll.store.d.ts +16 -0
- package/lib/components/navigation/navscroll/navscroll.utils.d.ts +6 -0
- package/lib/components/navigation/sidebar/sidebar.component.d.ts +26 -0
- package/lib/components/navigation/skiplink/skiplink/skiplink.component.d.ts +17 -0
- package/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.d.ts +24 -0
- package/lib/components/navigation/skiplink/skiplink.module.d.ts +8 -0
- package/lib/components/utils/error-page/error-page.component.d.ts +44 -0
- package/lib/components/utils/icon/icon.component.d.ts +53 -0
- package/lib/components/utils/language-switcher/language-switcher.component.d.ts +27 -0
- package/lib/design-angular-kit.module.d.ts +53 -0
- package/lib/enums/colors.enums.d.ts +10 -0
- package/lib/enums/sizes.enum.d.ts +7 -0
- package/{src/lib/interfaces/core.ts → lib/interfaces/core.d.ts} +53 -95
- package/lib/interfaces/design-angular-kit-config.d.ts +30 -0
- package/lib/interfaces/form.d.ts +67 -0
- package/lib/interfaces/icon.d.ts +4 -0
- package/lib/interfaces/sortable-table.d.ts +33 -0
- package/lib/interfaces/utils.d.ts +10 -0
- package/lib/pipes/date-ago.pipe.d.ts +17 -0
- package/lib/pipes/duration.pipe.d.ts +35 -0
- package/lib/pipes/mark-matching-text.pipe.d.ts +18 -0
- package/lib/provide-design-angular-kit.d.ts +7 -0
- package/lib/services/notification/notification.service.d.ts +63 -0
- package/{src/lib/utils/coercion.ts → lib/utils/coercion.d.ts} +1 -7
- package/lib/utils/date-utils.d.ts +79 -0
- package/lib/utils/file-utils.d.ts +32 -0
- package/lib/utils/regex.d.ts +34 -0
- package/lib/validators/it-validators.d.ts +69 -0
- package/package.json +14 -9
- package/{src/public_api.ts → public_api.d.ts} +0 -43
- package/schematics/ng-add/index.d.ts +3 -0
- package/schematics/ng-add/index.js +29 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/index.spec.d.ts +1 -0
- package/schematics/ng-add/index.spec.js +43 -0
- package/schematics/ng-add/index.spec.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-animations.d.ts +2 -0
- package/schematics/ng-add/rules/setup-project/add-animations.js +11 -0
- package/schematics/ng-add/rules/setup-project/add-animations.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-assets.d.ts +3 -0
- package/schematics/ng-add/rules/setup-project/add-assets.js +50 -0
- package/schematics/ng-add/rules/setup-project/add-assets.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-design-angular-kit.d.ts +3 -0
- package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js +43 -0
- package/schematics/ng-add/rules/setup-project/add-design-angular-kit.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-http-client.d.ts +2 -0
- package/schematics/ng-add/rules/setup-project/add-http-client.js +11 -0
- package/schematics/ng-add/rules/setup-project/add-http-client.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-import-to-style-file.d.ts +11 -0
- package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js +112 -0
- package/schematics/ng-add/rules/setup-project/add-import-to-style-file.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/add-localisation.d.ts +3 -0
- package/schematics/ng-add/rules/setup-project/add-localisation.js +50 -0
- package/schematics/ng-add/rules/setup-project/add-localisation.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/angular-json-helper.d.ts +2 -0
- package/schematics/ng-add/rules/setup-project/angular-json-helper.js +13 -0
- package/schematics/ng-add/rules/setup-project/angular-json-helper.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/exceptions.d.ts +7 -0
- package/schematics/ng-add/rules/setup-project/exceptions.js +17 -0
- package/schematics/ng-add/rules/setup-project/exceptions.js.map +1 -0
- package/schematics/ng-add/rules/setup-project/index.js +23 -0
- package/schematics/ng-add/rules/setup-project/index.js.map +1 -0
- package/schematics/ng-add/{schema.ts → schema.d.ts} +1 -1
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/setup-project.d.ts +3 -0
- package/schematics/ng-add/setup-project.js +37 -0
- package/schematics/ng-add/setup-project.js.map +1 -0
- package/schematics/ng-add/setup-project.spec.d.ts +1 -0
- package/schematics/ng-add/setup-project.spec.js +139 -0
- package/schematics/ng-add/setup-project.spec.js.map +1 -0
- package/schematics/ng-add/utils.d.ts +14 -0
- package/schematics/ng-add/utils.js +49 -0
- package/schematics/ng-add/utils.js.map +1 -0
- package/schematics/ng-add/versions-helper.d.ts +3 -0
- package/schematics/ng-add/versions-helper.js +40 -0
- package/schematics/ng-add/versions-helper.js.map +1 -0
- package/.eslintrc.json +0 -31
- package/karma.conf.js +0 -38
- package/ng-package.json +0 -9
- package/ng-package.prod.json +0 -8
- package/schematics/ng-add/index.spec.ts +0 -45
- package/schematics/ng-add/index.ts +0 -36
- package/schematics/ng-add/rules/setup-project/add-animations.ts +0 -7
- package/schematics/ng-add/rules/setup-project/add-assets.ts +0 -45
- package/schematics/ng-add/rules/setup-project/add-design-angular-kit.ts +0 -40
- package/schematics/ng-add/rules/setup-project/add-http-client.ts +0 -7
- package/schematics/ng-add/rules/setup-project/add-import-to-style-file.ts +0 -120
- package/schematics/ng-add/rules/setup-project/add-localisation.ts +0 -45
- package/schematics/ng-add/rules/setup-project/angular-json-helper.ts +0 -11
- package/schematics/ng-add/rules/setup-project/exceptions.ts +0 -13
- package/schematics/ng-add/setup-project.spec.ts +0 -166
- package/schematics/ng-add/setup-project.ts +0 -31
- package/schematics/ng-add/utils.ts +0 -71
- package/schematics/ng-add/versions-helper.ts +0 -41
- package/src/lib/abstracts/abstract-form.component.ts +0 -200
- package/src/lib/abstracts/abstract.component.ts +0 -63
- package/src/lib/components/core/accordion/accordion.component.html +0 -27
- package/src/lib/components/core/accordion/accordion.component.spec.ts +0 -21
- package/src/lib/components/core/accordion/accordion.component.ts +0 -40
- package/src/lib/components/core/alert/alert.component.html +0 -19
- package/src/lib/components/core/alert/alert.component.scss +0 -3
- package/src/lib/components/core/alert/alert.component.spec.ts +0 -62
- package/src/lib/components/core/alert/alert.component.ts +0 -75
- package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.html +0 -23
- package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.scss +0 -17
- package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.spec.ts +0 -21
- package/src/lib/components/core/avatar/avatar-dropdown/avatar-dropdown.component.ts +0 -50
- package/src/lib/components/core/avatar/avatar-group/avatar-group.component.html +0 -7
- package/src/lib/components/core/avatar/avatar-group/avatar-group.component.spec.ts +0 -38
- package/src/lib/components/core/avatar/avatar-group/avatar-group.component.ts +0 -25
- package/src/lib/components/core/avatar/avatar.directive.ts +0 -73
- package/src/lib/components/core/avatar/avatar.module.ts +0 -18
- package/src/lib/components/core/badge/badge.directive.spec.ts +0 -59
- package/src/lib/components/core/badge/badge.directive.ts +0 -39
- package/src/lib/components/core/button/button.directive.spec.ts +0 -96
- package/src/lib/components/core/button/button.directive.ts +0 -89
- package/src/lib/components/core/callout/callout.component.html +0 -25
- package/src/lib/components/core/callout/callout.component.spec.ts +0 -138
- package/src/lib/components/core/callout/callout.component.ts +0 -92
- package/src/lib/components/core/card/card.component.html +0 -35
- package/src/lib/components/core/card/card.component.scss +0 -30
- package/src/lib/components/core/card/card.component.spec.ts +0 -21
- package/src/lib/components/core/card/card.component.ts +0 -78
- package/src/lib/components/core/carousel/carousel/carousel.component.html +0 -29
- package/src/lib/components/core/carousel/carousel/carousel.component.scss +0 -1
- package/src/lib/components/core/carousel/carousel/carousel.component.spec.ts +0 -21
- package/src/lib/components/core/carousel/carousel/carousel.component.ts +0 -119
- package/src/lib/components/core/carousel/carousel-item/carousel-item.component.html +0 -3
- package/src/lib/components/core/carousel/carousel-item/carousel-item.component.spec.ts +0 -22
- package/src/lib/components/core/carousel/carousel-item/carousel-item.component.ts +0 -20
- package/src/lib/components/core/carousel/carousel.module.ts +0 -11
- package/src/lib/components/core/chip/chip.component.html +0 -26
- package/src/lib/components/core/chip/chip.component.spec.ts +0 -87
- package/src/lib/components/core/chip/chip.component.ts +0 -154
- package/src/lib/components/core/collapse/collapse.component.html +0 -3
- package/src/lib/components/core/collapse/collapse.component.spec.ts +0 -21
- package/src/lib/components/core/collapse/collapse.component.ts +0 -124
- package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.html +0 -3
- package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.spec.ts +0 -35
- package/src/lib/components/core/dimmer/dimmer-buttons/dimmer-buttons.component.ts +0 -23
- package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.html +0 -3
- package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.spec.ts +0 -22
- package/src/lib/components/core/dimmer/dimmer-icon/dimmer-icon.component.ts +0 -10
- package/src/lib/components/core/dimmer/dimmer.component.html +0 -7
- package/src/lib/components/core/dimmer/dimmer.component.spec.ts +0 -49
- package/src/lib/components/core/dimmer/dimmer.component.ts +0 -50
- package/src/lib/components/core/dimmer/dimmer.module.ts +0 -12
- package/src/lib/components/core/dropdown/dropdown/dropdown.component.html +0 -45
- package/src/lib/components/core/dropdown/dropdown/dropdown.component.scss +0 -3
- package/src/lib/components/core/dropdown/dropdown/dropdown.component.spec.ts +0 -21
- package/src/lib/components/core/dropdown/dropdown/dropdown.component.ts +0 -186
- package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.html +0 -18
- package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.scss +0 -4
- package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.spec.ts +0 -21
- package/src/lib/components/core/dropdown/dropdown-item/dropdown-item.component.ts +0 -82
- package/src/lib/components/core/dropdown/dropdown.module.ts +0 -11
- package/src/lib/components/core/forward/forward.directive.spec.ts +0 -60
- package/src/lib/components/core/forward/forward.directive.ts +0 -43
- package/src/lib/components/core/link/link.component.html +0 -13
- package/src/lib/components/core/link/link.component.spec.ts +0 -21
- package/src/lib/components/core/link/link.component.ts +0 -54
- package/src/lib/components/core/list/list/list.component.html +0 -13
- package/src/lib/components/core/list/list/list.component.spec.ts +0 -21
- package/src/lib/components/core/list/list/list.component.ts +0 -30
- package/src/lib/components/core/list/list-item/list-item.component.html +0 -42
- package/src/lib/components/core/list/list-item/list-item.component.scss +0 -16
- package/src/lib/components/core/list/list-item/list-item.component.spec.ts +0 -21
- package/src/lib/components/core/list/list-item/list-item.component.ts +0 -75
- package/src/lib/components/core/list/list.module.ts +0 -11
- package/src/lib/components/core/modal/modal.component.html +0 -36
- package/src/lib/components/core/modal/modal.component.scss +0 -3
- package/src/lib/components/core/modal/modal.component.spec.ts +0 -21
- package/src/lib/components/core/modal/modal.component.ts +0 -218
- package/src/lib/components/core/notifications/notifications.component.html +0 -25
- package/src/lib/components/core/notifications/notifications.component.scss +0 -3
- package/src/lib/components/core/notifications/notifications.component.spec.ts +0 -21
- package/src/lib/components/core/notifications/notifications.component.ts +0 -123
- package/src/lib/components/core/pagination/pagination.component.html +0 -107
- package/src/lib/components/core/pagination/pagination.component.spec.ts +0 -21
- package/src/lib/components/core/pagination/pagination.component.ts +0 -157
- package/src/lib/components/core/popover/popover.directive.spec.ts +0 -21
- package/src/lib/components/core/popover/popover.directive.ts +0 -171
- package/src/lib/components/core/progress-bar/progress-bar.component.html +0 -20
- package/src/lib/components/core/progress-bar/progress-bar.component.spec.ts +0 -21
- package/src/lib/components/core/progress-bar/progress-bar.component.ts +0 -46
- package/src/lib/components/core/progress-button/progress-button.component.html +0 -5
- package/src/lib/components/core/progress-button/progress-button.component.spec.ts +0 -21
- package/src/lib/components/core/progress-button/progress-button.component.ts +0 -39
- package/src/lib/components/core/spinner/spinner.component.html +0 -7
- package/src/lib/components/core/spinner/spinner.component.spec.ts +0 -80
- package/src/lib/components/core/spinner/spinner.component.ts +0 -31
- package/src/lib/components/core/steppers/steppers-container/steppers-container.component.html +0 -126
- package/src/lib/components/core/steppers/steppers-container/steppers-container.component.spec.ts +0 -21
- package/src/lib/components/core/steppers/steppers-container/steppers-container.component.ts +0 -185
- package/src/lib/components/core/steppers/steppers-item/steppers-item.component.html +0 -3
- package/src/lib/components/core/steppers/steppers-item/steppers-item.component.spec.ts +0 -22
- package/src/lib/components/core/steppers/steppers-item/steppers-item.component.ts +0 -33
- package/src/lib/components/core/steppers/steppers.module.ts +0 -11
- package/src/lib/components/core/tab/tab-container/tab-container.component.html +0 -78
- package/src/lib/components/core/tab/tab-container/tab-container.component.spec.ts +0 -21
- package/src/lib/components/core/tab/tab-container/tab-container.component.ts +0 -137
- package/src/lib/components/core/tab/tab-item/tab-item.component.html +0 -3
- package/src/lib/components/core/tab/tab-item/tab-item.component.spec.ts +0 -22
- package/src/lib/components/core/tab/tab-item/tab-item.component.ts +0 -50
- package/src/lib/components/core/tab/tab.module.ts +0 -11
- package/src/lib/components/core/table/sort/sort-header/sort-header.component.html +0 -27
- package/src/lib/components/core/table/sort/sort-header/sort-header.component.scss +0 -65
- package/src/lib/components/core/table/sort/sort-header/sort-header.component.spec.ts +0 -25
- package/src/lib/components/core/table/sort/sort-header/sort-header.component.ts +0 -164
- package/src/lib/components/core/table/sort/sort.directive.spec.ts +0 -73
- package/src/lib/components/core/table/sort/sort.directive.ts +0 -142
- package/src/lib/components/core/table/table.component.html +0 -23
- package/src/lib/components/core/table/table.component.scss +0 -7
- package/src/lib/components/core/table/table.component.spec.ts +0 -21
- package/src/lib/components/core/table/table.component.ts +0 -70
- package/src/lib/components/core/table/table.module.ts +0 -12
- package/src/lib/components/core/timeline/timeline-item/timeline-item.component.html +0 -47
- package/src/lib/components/core/timeline/timeline-item/timeline-item.component.spec.ts +0 -24
- package/src/lib/components/core/timeline/timeline-item/timeline-item.component.ts +0 -102
- package/src/lib/components/core/timeline/timeline.component.html +0 -21
- package/src/lib/components/core/timeline/timeline.component.spec.ts +0 -21
- package/src/lib/components/core/timeline/timeline.component.ts +0 -31
- package/src/lib/components/core/timeline/timeline.module.ts +0 -11
- package/src/lib/components/core/tooltip/tooltip.directive.spec.ts +0 -20
- package/src/lib/components/core/tooltip/tooltip.directive.ts +0 -141
- package/src/lib/components/form/autocomplete/autocomplete.component.html +0 -58
- package/src/lib/components/form/autocomplete/autocomplete.component.spec.ts +0 -21
- package/src/lib/components/form/autocomplete/autocomplete.component.ts +0 -130
- package/src/lib/components/form/checkbox/checkbox.component.html +0 -67
- package/src/lib/components/form/checkbox/checkbox.component.spec.ts +0 -21
- package/src/lib/components/form/checkbox/checkbox.component.ts +0 -65
- package/src/lib/components/form/form.module.ts +0 -34
- package/src/lib/components/form/input/input.component.html +0 -92
- package/src/lib/components/form/input/input.component.scss +0 -29
- package/src/lib/components/form/input/input.component.spec.ts +0 -21
- package/src/lib/components/form/input/input.component.ts +0 -234
- package/src/lib/components/form/password-input/password-input.component.html +0 -65
- package/src/lib/components/form/password-input/password-input.component.scss +0 -9
- package/src/lib/components/form/password-input/password-input.component.spec.ts +0 -21
- package/src/lib/components/form/password-input/password-input.component.ts +0 -171
- package/src/lib/components/form/radio-button/radio-button.component.html +0 -50
- package/src/lib/components/form/radio-button/radio-button.component.scss +0 -14
- package/src/lib/components/form/radio-button/radio-button.component.spec.ts +0 -21
- package/src/lib/components/form/radio-button/radio-button.component.ts +0 -82
- package/src/lib/components/form/range/range.component.html +0 -17
- package/src/lib/components/form/range/range.component.scss +0 -17
- package/src/lib/components/form/range/range.component.spec.ts +0 -21
- package/src/lib/components/form/range/range.component.ts +0 -100
- package/src/lib/components/form/rating/rating.component.html +0 -24
- package/src/lib/components/form/rating/rating.component.spec.ts +0 -21
- package/src/lib/components/form/rating/rating.component.ts +0 -52
- package/src/lib/components/form/select/select.component.html +0 -54
- package/src/lib/components/form/select/select.component.scss +0 -3
- package/src/lib/components/form/select/select.component.spec.ts +0 -22
- package/src/lib/components/form/select/select.component.ts +0 -91
- package/src/lib/components/form/textarea/textarea.component.html +0 -28
- package/src/lib/components/form/textarea/textarea.component.scss +0 -12
- package/src/lib/components/form/textarea/textarea.component.spec.ts +0 -21
- package/src/lib/components/form/textarea/textarea.component.ts +0 -61
- package/src/lib/components/form/transfer/store/transfer.reducers.ts +0 -242
- package/src/lib/components/form/transfer/store/transfer.state.ts +0 -20
- package/src/lib/components/form/transfer/store/transfer.store.ts +0 -88
- package/src/lib/components/form/transfer/transfer-list/transfer-list.component.html +0 -42
- package/src/lib/components/form/transfer/transfer-list/transfer-list.component.spec.ts +0 -33
- package/src/lib/components/form/transfer/transfer-list/transfer-list.component.ts +0 -93
- package/src/lib/components/form/transfer/transfer.component.html +0 -52
- package/src/lib/components/form/transfer/transfer.component.spec.ts +0 -27
- package/src/lib/components/form/transfer/transfer.component.ts +0 -159
- package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.html +0 -36
- package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.spec.ts +0 -21
- package/src/lib/components/form/upload-drag-drop/upload-drag-drop.component.ts +0 -170
- package/src/lib/components/form/upload-file-list/upload-file-list.component.html +0 -46
- package/src/lib/components/form/upload-file-list/upload-file-list.component.spec.ts +0 -22
- package/src/lib/components/form/upload-file-list/upload-file-list.component.ts +0 -120
- package/src/lib/components/navigation/back-button/back-button.component.html +0 -25
- package/src/lib/components/navigation/back-button/back-button.component.spec.ts +0 -91
- package/src/lib/components/navigation/back-button/back-button.component.ts +0 -67
- package/src/lib/components/navigation/back-to-top/back-to-top.component.html +0 -11
- package/src/lib/components/navigation/back-to-top/back-to-top.component.spec.ts +0 -21
- package/src/lib/components/navigation/back-to-top/back-to-top.component.ts +0 -80
- package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.html +0 -23
- package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.spec.ts +0 -21
- package/src/lib/components/navigation/breadcrumbs/breadcrumb/breadcrumb.component.ts +0 -68
- package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.html +0 -3
- package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.spec.ts +0 -22
- package/src/lib/components/navigation/breadcrumbs/breadcrumb-item/breadcrumb-item.component.ts +0 -29
- package/src/lib/components/navigation/breadcrumbs/breadcrumbs.module.ts +0 -11
- package/src/lib/components/navigation/header/header.component.html +0 -102
- package/src/lib/components/navigation/header/header.component.scss +0 -3
- package/src/lib/components/navigation/header/header.component.spec.ts +0 -21
- package/src/lib/components/navigation/header/header.component.ts +0 -107
- package/src/lib/components/navigation/megamenu/megamenu.component.html +0 -34
- package/src/lib/components/navigation/megamenu/megamenu.component.scss +0 -5
- package/src/lib/components/navigation/megamenu/megamenu.component.ts +0 -30
- package/src/lib/components/navigation/navbar/navbar/navbar.component.html +0 -28
- package/src/lib/components/navigation/navbar/navbar/navbar.component.ts +0 -45
- package/src/lib/components/navigation/navbar/navbar-item/navbar-item.component.html +0 -3
- package/src/lib/components/navigation/navbar/navbar-item/navbar-item.component.ts +0 -10
- package/src/lib/components/navigation/navbar/navbar.module.ts +0 -11
- package/src/lib/components/navigation/navscroll/navscroll-list-item.component.ts +0 -95
- package/src/lib/components/navigation/navscroll/navscroll-list-items.component.ts +0 -27
- package/src/lib/components/navigation/navscroll/navscroll.component.html +0 -101
- package/src/lib/components/navigation/navscroll/navscroll.component.scss +0 -9
- package/src/lib/components/navigation/navscroll/navscroll.component.ts +0 -143
- package/src/lib/components/navigation/navscroll/navscroll.store.ts +0 -96
- package/src/lib/components/navigation/navscroll/navscroll.utils.ts +0 -28
- package/src/lib/components/navigation/sidebar/sidebar.component.html +0 -11
- package/src/lib/components/navigation/sidebar/sidebar.component.spec.ts +0 -21
- package/src/lib/components/navigation/sidebar/sidebar.component.ts +0 -39
- package/src/lib/components/navigation/skiplink/skiplink/skiplink.component.html +0 -15
- package/src/lib/components/navigation/skiplink/skiplink/skiplink.component.ts +0 -27
- package/src/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.html +0 -15
- package/src/lib/components/navigation/skiplink/skiplink-item/skiplink-item.component.ts +0 -38
- package/src/lib/components/navigation/skiplink/skiplink.module.ts +0 -11
- package/src/lib/components/utils/error-page/error-page.component.html +0 -33
- package/src/lib/components/utils/error-page/error-page.component.spec.ts +0 -21
- package/src/lib/components/utils/error-page/error-page.component.ts +0 -79
- package/src/lib/components/utils/icon/icon.component.html +0 -6
- package/src/lib/components/utils/icon/icon.component.spec.ts +0 -21
- package/src/lib/components/utils/icon/icon.component.ts +0 -95
- package/src/lib/components/utils/language-switcher/language-switcher.component.html +0 -21
- package/src/lib/components/utils/language-switcher/language-switcher.component.spec.ts +0 -21
- package/src/lib/components/utils/language-switcher/language-switcher.component.ts +0 -56
- package/src/lib/design-angular-kit.module.ts +0 -131
- package/src/lib/enums/colors.enums.ts +0 -10
- package/src/lib/enums/sizes.enum.ts +0 -7
- package/src/lib/interfaces/design-angular-kit-config.ts +0 -34
- package/src/lib/interfaces/form.ts +0 -78
- package/src/lib/interfaces/icon.ts +0 -176
- package/src/lib/interfaces/sortable-table.ts +0 -42
- package/src/lib/interfaces/utils.ts +0 -11
- package/src/lib/pipes/date-ago.pipe.ts +0 -57
- package/src/lib/pipes/duration.pipe.ts +0 -112
- package/src/lib/pipes/mark-matching-text.pipe.ts +0 -43
- package/src/lib/provide-design-angular-kit.ts +0 -73
- package/src/lib/services/notification/notification.service.spec.ts +0 -16
- package/src/lib/services/notification/notification.service.ts +0 -119
- package/src/lib/utils/date-utils.ts +0 -184
- package/src/lib/utils/file-utils.ts +0 -80
- package/src/lib/utils/regex.ts +0 -44
- package/src/lib/validators/it-validators.ts +0 -193
- package/src/test.ts +0 -26
- package/tsconfig.lib.json +0 -24
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.schematics.json +0 -25
- package/tsconfig.spec.json +0 -9
- /package/schematics/ng-add/rules/setup-project/{index.ts → index.d.ts} +0 -0
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { ControlValueAccessor, FormControl, NgControl, ValidatorFn } from '@angular/forms';
|
|
2
|
-
import { Component, DoCheck, Input, OnInit, Optional, Self } from '@angular/core';
|
|
3
|
-
import { ItAbstractComponent } from './abstract.component';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
6
|
-
import { inputToBoolean } from '../utils/coercion';
|
|
7
|
-
|
|
8
|
-
@Component({ template: '' })
|
|
9
|
-
export abstract class ItAbstractFormComponent<T = any> extends ItAbstractComponent implements OnInit, ControlValueAccessor, DoCheck {
|
|
10
|
-
/**
|
|
11
|
-
* The label of form control
|
|
12
|
-
*/
|
|
13
|
-
@Input() label?: string;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Validation color display mode (validation triggered if field is touched or not pristine)
|
|
17
|
-
* - <b>true</b>: Always show the validation color
|
|
18
|
-
* - <b>false</b>: Never show validation color
|
|
19
|
-
* - <b>only-valid</b>: Show only valid validation color
|
|
20
|
-
* - <b>only-invalid</b>: Show only invalid validation color
|
|
21
|
-
* @default <b>true</b>: Always show the validation color
|
|
22
|
-
*/
|
|
23
|
-
@Input() validationMode: boolean | 'only-valid' | 'only-invalid' = true;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Set the disabled state
|
|
27
|
-
*/
|
|
28
|
-
@Input({ transform: inputToBoolean }) set disabled(isDisabled: boolean) {
|
|
29
|
-
this.setDisabledState(isDisabled);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Internal form control
|
|
34
|
-
*/
|
|
35
|
-
protected control: FormControl<T>;
|
|
36
|
-
|
|
37
|
-
constructor(
|
|
38
|
-
protected readonly _translateService: TranslateService,
|
|
39
|
-
@Self() @Optional() protected readonly _ngControl: NgControl
|
|
40
|
-
) {
|
|
41
|
-
super();
|
|
42
|
-
this.control = new FormControl();
|
|
43
|
-
this._ngControl && (this._ngControl.valueAccessor = this);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Check if field is invalid (Validation failed)
|
|
48
|
-
*/
|
|
49
|
-
get isInvalid(): boolean | undefined {
|
|
50
|
-
if (this.validationMode === 'only-valid' || (this.validationMode !== 'only-invalid' && !this.validationMode)) {
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
if (this._ngControl) {
|
|
55
|
-
return this._ngControl.invalid === true && (!this._ngControl.pristine || this._ngControl.touched === true);
|
|
56
|
-
}
|
|
57
|
-
return this.control.invalid && (!this.control.pristine || this.control.touched);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Check if field is valid (Validation successful)
|
|
62
|
-
*/
|
|
63
|
-
get isValid(): boolean | undefined {
|
|
64
|
-
if (this.validationMode === 'only-invalid' || (this.validationMode !== 'only-valid' && !this.validationMode)) {
|
|
65
|
-
return undefined;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (this._ngControl) {
|
|
69
|
-
return this._ngControl.valid === true && (!this._ngControl.pristine || this._ngControl.touched === true);
|
|
70
|
-
}
|
|
71
|
-
return this.control.valid && (!this.control.pristine || this.control.touched);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Return the invalid message string from TranslateService
|
|
76
|
-
*/
|
|
77
|
-
get invalidMessage(): Observable<string> {
|
|
78
|
-
if (this.hasError('required')) {
|
|
79
|
-
return this._translateService.get('it.errors.required-field');
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return this._translateService.get('it.errors.invalid-field');
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
ngOnInit(): void {
|
|
86
|
-
if (this._ngControl?.control) {
|
|
87
|
-
this.control.setValidators((this._ngControl.control as FormControl).validator);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
92
|
-
onChange = (_: T) => {};
|
|
93
|
-
|
|
94
|
-
onTouched = () => {};
|
|
95
|
-
|
|
96
|
-
registerOnChange(fn: any): void {
|
|
97
|
-
this.control.valueChanges.subscribe(fn);
|
|
98
|
-
this.onChange = fn;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
registerOnTouched(fn: any): void {
|
|
102
|
-
this.onTouched = fn;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
setDisabledState(isDisabled: boolean): void {
|
|
106
|
-
if (isDisabled) {
|
|
107
|
-
return this.control.disable();
|
|
108
|
-
}
|
|
109
|
-
this.control.enable();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
writeValue(value: T): void {
|
|
113
|
-
this.control.setValue(value, { emitEvent: false });
|
|
114
|
-
this._changeDetectorRef.detectChanges();
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Mark the control as touched
|
|
119
|
-
*/
|
|
120
|
-
markAsTouched(): void {
|
|
121
|
-
if (!this.control.touched) {
|
|
122
|
-
this.onTouched();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Fired to check if form control is touched
|
|
128
|
-
*/
|
|
129
|
-
ngDoCheck() {
|
|
130
|
-
if (this._ngControl?.control) {
|
|
131
|
-
const ngControl = this._ngControl.control;
|
|
132
|
-
if (this.control.touched !== ngControl.touched) {
|
|
133
|
-
if (ngControl.touched) {
|
|
134
|
-
this.control.markAsTouched();
|
|
135
|
-
} else {
|
|
136
|
-
this.control.markAsUntouched();
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (this.control.pristine !== ngControl.pristine) {
|
|
140
|
-
if (ngControl.pristine) {
|
|
141
|
-
this.control.markAsPristine();
|
|
142
|
-
} else {
|
|
143
|
-
this.control.markAsDirty();
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
this._changeDetectorRef.detectChanges();
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Add the validators in control and parent control
|
|
152
|
-
* @param validators the validators
|
|
153
|
-
* @protected
|
|
154
|
-
*/
|
|
155
|
-
protected addValidators(validators: ValidatorFn | ValidatorFn[]): void {
|
|
156
|
-
if (!Array.isArray(validators)) {
|
|
157
|
-
validators = [validators];
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
validators.forEach(validator => {
|
|
161
|
-
if (!this.control.hasValidator(validator)) {
|
|
162
|
-
this.control.addValidators(validator);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
if (this._ngControl?.control && !this._ngControl.control.hasValidator(validator)) {
|
|
166
|
-
this._ngControl.control.addValidators(validator);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* Reports whether the control with the given path has the error specified. <br/>
|
|
173
|
-
* If the control is not present, false is returned.
|
|
174
|
-
* @param errorCode The code of the error to check
|
|
175
|
-
* @param path A list of control names that designates how to move from the current control
|
|
176
|
-
* to the control that should be queried for errors.
|
|
177
|
-
* @returns whether the given error is present in the control at the given path.
|
|
178
|
-
*/
|
|
179
|
-
public hasError(errorCode: string, path?: Array<string | number> | string): boolean {
|
|
180
|
-
if (this._ngControl) {
|
|
181
|
-
return this._ngControl.hasError(errorCode, path);
|
|
182
|
-
}
|
|
183
|
-
return this.control.hasError(errorCode, path);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Reports error data for the control with the given path.
|
|
188
|
-
* @param errorCode The code of the error to check
|
|
189
|
-
* @param path A list of control names that designates how to move from the current control
|
|
190
|
-
* to the control that should be queried for errors.
|
|
191
|
-
* @returns error data for that particular error. If the control or error is not present,
|
|
192
|
-
* null is returned.
|
|
193
|
-
*/
|
|
194
|
-
public getError(errorCode: string, path?: Array<string | number> | string): any {
|
|
195
|
-
if (this._ngControl) {
|
|
196
|
-
return this._ngControl.getError(errorCode, path);
|
|
197
|
-
}
|
|
198
|
-
return this.control.getError(errorCode, path);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterViewInit,
|
|
3
|
-
ChangeDetectorRef,
|
|
4
|
-
Component,
|
|
5
|
-
ElementRef,
|
|
6
|
-
EventEmitter,
|
|
7
|
-
inject,
|
|
8
|
-
Input,
|
|
9
|
-
OnChanges,
|
|
10
|
-
Output,
|
|
11
|
-
Renderer2,
|
|
12
|
-
SimpleChanges,
|
|
13
|
-
} from '@angular/core';
|
|
14
|
-
|
|
15
|
-
@Component({ template: '' })
|
|
16
|
-
export abstract class ItAbstractComponent implements AfterViewInit, OnChanges {
|
|
17
|
-
/**
|
|
18
|
-
* The element ID
|
|
19
|
-
*/
|
|
20
|
-
@Input() id: string = this.getDefaultId();
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Fired when component input attributes was changed
|
|
24
|
-
*/
|
|
25
|
-
@Output() public valueChanges: EventEmitter<void>;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Counter of active instances
|
|
29
|
-
* @private
|
|
30
|
-
*/
|
|
31
|
-
private static instances = 0;
|
|
32
|
-
|
|
33
|
-
protected readonly _renderer: Renderer2; // Injected
|
|
34
|
-
protected readonly _elementRef: ElementRef; // Injected
|
|
35
|
-
protected readonly _changeDetectorRef: ChangeDetectorRef; // Injected
|
|
36
|
-
|
|
37
|
-
constructor() {
|
|
38
|
-
this._renderer = inject(Renderer2);
|
|
39
|
-
this._elementRef = inject(ElementRef);
|
|
40
|
-
this._changeDetectorRef = inject(ChangeDetectorRef);
|
|
41
|
-
|
|
42
|
-
this.valueChanges = new EventEmitter<void>();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
ngAfterViewInit(): void {
|
|
46
|
-
this._renderer.removeAttribute(this._elementRef.nativeElement, 'id');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
50
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
51
|
-
this.valueChanges.next(); // The inputs were changed
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Generate unique id for components
|
|
56
|
-
* @private
|
|
57
|
-
*/
|
|
58
|
-
private getDefaultId(): string {
|
|
59
|
-
const name = this.constructor.name.replace('Component', '');
|
|
60
|
-
const kebabName = name.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? '-' : '') + $.toLowerCase());
|
|
61
|
-
return `${kebabName}-${ItAbstractComponent.instances++}`;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<div class="accordion">
|
|
2
|
-
<div class="accordion-item">
|
|
3
|
-
<h2 class="accordion-header" id="collapse-{{ id }}-heading">
|
|
4
|
-
<button
|
|
5
|
-
class="accordion-button"
|
|
6
|
-
type="button"
|
|
7
|
-
data-bs-toggle="collapse"
|
|
8
|
-
[class.collapsed]="isCollapsed"
|
|
9
|
-
[attr.data-bs-target]="'#collapse-' + id"
|
|
10
|
-
[attr.aria-controls]="'collapse-' + id"
|
|
11
|
-
[attr.aria-expanded]="opened ? 'true' : 'false'">
|
|
12
|
-
{{ title }}
|
|
13
|
-
</button>
|
|
14
|
-
</h2>
|
|
15
|
-
|
|
16
|
-
<div
|
|
17
|
-
#collapse
|
|
18
|
-
id="collapse-{{ id }}"
|
|
19
|
-
role="region"
|
|
20
|
-
class="accordion-collapse collapse {{ class }}"
|
|
21
|
-
[attr.aria-labelledby]="'collapse-' + id + '-heading'">
|
|
22
|
-
<div class="accordion-body">
|
|
23
|
-
<ng-content></ng-content>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItAccordionComponent } from './accordion.component';
|
|
4
|
-
import { tb_base } from '../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItAccordionComponent', () => {
|
|
7
|
-
let component: ItAccordionComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItAccordionComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItAccordionComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild } from '@angular/core';
|
|
2
|
-
import { ItCollapseComponent } from '../collapse/collapse.component';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Accordion
|
|
6
|
-
* @description Build vertically collapsible accordions based on Collapse.
|
|
7
|
-
*/
|
|
8
|
-
@Component({
|
|
9
|
-
standalone: true,
|
|
10
|
-
selector: 'it-accordion',
|
|
11
|
-
templateUrl: './accordion.component.html',
|
|
12
|
-
exportAs: 'itAccordion',
|
|
13
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
|
-
imports: [],
|
|
15
|
-
})
|
|
16
|
-
export class ItAccordionComponent extends ItCollapseComponent implements AfterViewInit {
|
|
17
|
-
/**
|
|
18
|
-
* Accordion Title
|
|
19
|
-
*/
|
|
20
|
-
@Input({ required: true }) title!: string;
|
|
21
|
-
|
|
22
|
-
@ViewChild('collapse') protected override collapseDiv?: ElementRef<HTMLDivElement>;
|
|
23
|
-
|
|
24
|
-
protected isCollapsed: boolean = true;
|
|
25
|
-
|
|
26
|
-
override ngAfterViewInit(): void {
|
|
27
|
-
super.ngAfterViewInit();
|
|
28
|
-
this._renderer.removeAttribute(this._elementRef.nativeElement, 'title');
|
|
29
|
-
|
|
30
|
-
this.isCollapsed = !this.opened;
|
|
31
|
-
this.hideEvent.subscribe(() => {
|
|
32
|
-
this.isCollapsed = true;
|
|
33
|
-
this._changeDetectorRef.detectChanges();
|
|
34
|
-
});
|
|
35
|
-
this.showEvent.subscribe(() => {
|
|
36
|
-
this.isCollapsed = false;
|
|
37
|
-
this._changeDetectorRef.detectChanges();
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
#alertElement
|
|
3
|
-
class="alert alert-{{ color }}"
|
|
4
|
-
[class.alert-dismissible]="dismissible"
|
|
5
|
-
[class.fade]="dismissible"
|
|
6
|
-
[class.show]="dismissible"
|
|
7
|
-
role="alert">
|
|
8
|
-
<h4 class="alert-heading">
|
|
9
|
-
<ng-content select="[heading]"></ng-content>
|
|
10
|
-
</h4>
|
|
11
|
-
|
|
12
|
-
<ng-content></ng-content>
|
|
13
|
-
|
|
14
|
-
@if (dismissible) {
|
|
15
|
-
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'it.core.close-alert' | translate">
|
|
16
|
-
<it-icon name="close"></it-icon>
|
|
17
|
-
</button>
|
|
18
|
-
}
|
|
19
|
-
</div>
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItAlertComponent } from './alert.component';
|
|
4
|
-
import { By } from '@angular/platform-browser';
|
|
5
|
-
import { Component, Input } from '@angular/core';
|
|
6
|
-
import { AlertColor } from '../../../interfaces/core';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'it-unit-test',
|
|
10
|
-
template: ` <it-alert [color]="selectedColor" [dismissible]="isDismissible"> Questo è un alert di tipo "<b>primary</b>". </it-alert> `,
|
|
11
|
-
})
|
|
12
|
-
class UnitTestComponent {
|
|
13
|
-
@Input() set selectedColor(value: AlertColor | undefined) {
|
|
14
|
-
this._selectedColor = value;
|
|
15
|
-
}
|
|
16
|
-
get selectedColor(): AlertColor | undefined {
|
|
17
|
-
return this._selectedColor;
|
|
18
|
-
}
|
|
19
|
-
private _selectedColor: AlertColor | undefined = undefined;
|
|
20
|
-
|
|
21
|
-
@Input() set isDismissible(value: boolean) {
|
|
22
|
-
this._dismissible = value;
|
|
23
|
-
}
|
|
24
|
-
get isDismissible(): boolean {
|
|
25
|
-
return this._dismissible;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
private _dismissible: boolean = false;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
let component: UnitTestComponent;
|
|
32
|
-
let fixture: ComponentFixture<UnitTestComponent>;
|
|
33
|
-
describe('ItAlertComponent', () => {
|
|
34
|
-
beforeEach(async () => {
|
|
35
|
-
TestBed.configureTestingModule({
|
|
36
|
-
declarations: [UnitTestComponent],
|
|
37
|
-
imports: [ItAlertComponent],
|
|
38
|
-
}).compileComponents();
|
|
39
|
-
|
|
40
|
-
fixture = TestBed.createComponent(UnitTestComponent);
|
|
41
|
-
component = fixture.componentInstance;
|
|
42
|
-
fixture.detectChanges();
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('should create', () => {
|
|
46
|
-
expect(component).toBeTruthy();
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('Dovrebbe avere colore primary', () => {
|
|
50
|
-
component.selectedColor = 'primary';
|
|
51
|
-
fixture.detectChanges();
|
|
52
|
-
const spanElement = fixture.debugElement.query(By.css('div.alert.alert-primary'));
|
|
53
|
-
expect(spanElement).toBeTruthy();
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('Dovrebbe avere colore success', () => {
|
|
57
|
-
component.selectedColor = 'success';
|
|
58
|
-
fixture.detectChanges();
|
|
59
|
-
const spanElement = fixture.debugElement.query(By.css('div.alert.alert-success'));
|
|
60
|
-
expect(spanElement).toBeTruthy();
|
|
61
|
-
});
|
|
62
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
|
2
|
-
import { AlertColor } from '../../../interfaces/core';
|
|
3
|
-
import { ItAbstractComponent } from '../../../abstracts/abstract.component';
|
|
4
|
-
import { Alert } from 'bootstrap-italia';
|
|
5
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
6
|
-
import { ItIconComponent } from '../../utils/icon/icon.component';
|
|
7
|
-
import { inputToBoolean } from '../../../utils/coercion';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Alert
|
|
11
|
-
* @description You can provide feedback to the user via alert messages.
|
|
12
|
-
*/
|
|
13
|
-
@Component({
|
|
14
|
-
standalone: true,
|
|
15
|
-
selector: 'it-alert',
|
|
16
|
-
templateUrl: './alert.component.html',
|
|
17
|
-
styleUrls: ['./alert.component.scss'],
|
|
18
|
-
exportAs: 'itAlert',
|
|
19
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
-
imports: [TranslateModule, ItIconComponent],
|
|
21
|
-
})
|
|
22
|
-
export class ItAlertComponent extends ItAbstractComponent implements AfterViewInit {
|
|
23
|
-
/**
|
|
24
|
-
* The alert color
|
|
25
|
-
* @default info
|
|
26
|
-
*/
|
|
27
|
-
@Input() color: AlertColor = 'info';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Inserts the close button
|
|
31
|
-
* @default false
|
|
32
|
-
*/
|
|
33
|
-
@Input({ transform: inputToBoolean }) dismissible?: boolean;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* This event fires immediately when the instance's close method is called.
|
|
37
|
-
*/
|
|
38
|
-
@Output() public closeEvent: EventEmitter<Event> = new EventEmitter();
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* This event fires when the alert has been closed (it will wait for CSS transitions to complete).
|
|
42
|
-
*/
|
|
43
|
-
@Output() public closedEvent: EventEmitter<Event> = new EventEmitter();
|
|
44
|
-
|
|
45
|
-
private alert?: Alert;
|
|
46
|
-
|
|
47
|
-
@ViewChild('alertElement') private alertElement?: ElementRef<HTMLDivElement>;
|
|
48
|
-
|
|
49
|
-
override ngAfterViewInit() {
|
|
50
|
-
super.ngAfterViewInit();
|
|
51
|
-
|
|
52
|
-
if (this.alertElement) {
|
|
53
|
-
const element = this.alertElement.nativeElement;
|
|
54
|
-
this.alert = Alert.getOrCreateInstance(element);
|
|
55
|
-
|
|
56
|
-
element.addEventListener('close.bs.alert', event => this.closeEvent.emit(event));
|
|
57
|
-
element.addEventListener('closed.bs.alert', event => this.closedEvent.emit(event));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Close an alert by removing it from the DOM.
|
|
63
|
-
* If the `.fade` and `.show` classes are present in the element, the alert will be closed with a disappearing effect.
|
|
64
|
-
*/
|
|
65
|
-
public close(): void {
|
|
66
|
-
this.alert?.close();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* The alert is removed
|
|
71
|
-
*/
|
|
72
|
-
public dispose(): void {
|
|
73
|
-
this.alert?.dispose();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<it-dropdown id="dropdown" class="dropdown">
|
|
2
|
-
<ng-content button select="[it-avatar-dropdown-toggle]"></ng-content>
|
|
3
|
-
<ng-container list class="dropdown-menu">
|
|
4
|
-
@for (item of items; track item) {
|
|
5
|
-
<li>
|
|
6
|
-
@if (item.link) {
|
|
7
|
-
<a
|
|
8
|
-
[routerLink]="item.link"
|
|
9
|
-
class="dropdown-item list-item"
|
|
10
|
-
title="item.title"
|
|
11
|
-
accesskey="item.accesskey"
|
|
12
|
-
tabindex="item.tabindex">
|
|
13
|
-
<ng-template *ngTemplateOutlet="item._implicitContent"></ng-template>
|
|
14
|
-
</a>
|
|
15
|
-
} @else {
|
|
16
|
-
<div class="dropdown-item list-item">
|
|
17
|
-
<ng-template *ngTemplateOutlet="item._implicitContent"></ng-template>
|
|
18
|
-
</div>
|
|
19
|
-
}
|
|
20
|
-
</li>
|
|
21
|
-
}
|
|
22
|
-
</ng-container>
|
|
23
|
-
</it-dropdown>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// made because of bug with before triangle that goes up
|
|
2
|
-
.link-list-wrapper {
|
|
3
|
-
z-index: 2;
|
|
4
|
-
position: relative;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
a {
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host ::ng-deep .dropdown-toggle {
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
.icon {
|
|
15
|
-
display: none;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItAvatarDropdownComponent } from './avatar-dropdown.component';
|
|
4
|
-
import { tb_base } from '../../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItAvatarDropdownComponent', () => {
|
|
7
|
-
let component: ItAvatarDropdownComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItAvatarDropdownComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItAvatarDropdownComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Component, ContentChildren, HostBinding, Input, QueryList, TemplateRef, ViewChild } from '@angular/core';
|
|
2
|
-
import { ItDropdownModule } from '../../dropdown/dropdown.module';
|
|
3
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
-
import { RouterLink } from '@angular/router';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
standalone: true,
|
|
8
|
-
selector: 'it-avatar-dropdown-item',
|
|
9
|
-
template: '<ng-template><ng-content></ng-content></ng-template>',
|
|
10
|
-
styleUrls: ['./avatar-dropdown.component.scss'],
|
|
11
|
-
imports: [NgTemplateOutlet],
|
|
12
|
-
})
|
|
13
|
-
export class ItAvatarDropdownItemComponent {
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
15
|
-
@ViewChild(TemplateRef, { static: true }) _implicitContent!: TemplateRef<any>;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Indica il link che possiamo passare all'elemento
|
|
19
|
-
*/
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
@Input() link: string | any[] | null | undefined;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Permette di utilizzare l'attributo html title
|
|
25
|
-
*/
|
|
26
|
-
@Input() title?: string;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Permette di utilizzare l'attributo html accesskey
|
|
30
|
-
*/
|
|
31
|
-
@Input() accesskey?: string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Permette di utilizzare l'attributo html tabindex
|
|
35
|
-
*/
|
|
36
|
-
@Input() tabindex?: number;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@Component({
|
|
40
|
-
standalone: true,
|
|
41
|
-
selector: 'it-avatar-dropdown',
|
|
42
|
-
templateUrl: './avatar-dropdown.component.html',
|
|
43
|
-
styleUrls: ['./avatar-dropdown.component.scss'],
|
|
44
|
-
imports: [ItDropdownModule, NgTemplateOutlet, RouterLink],
|
|
45
|
-
})
|
|
46
|
-
export class ItAvatarDropdownComponent {
|
|
47
|
-
@HostBinding('class') componentClass = 'avatar avatar-dropdown';
|
|
48
|
-
|
|
49
|
-
@ContentChildren(ItAvatarDropdownItemComponent) items!: QueryList<ItAvatarDropdownItemComponent>;
|
|
50
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItAvatarGroupComponent, ItAvatarGroupItemComponent } from './avatar-group.component';
|
|
4
|
-
import { tb_base } from '../../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItAvatarGroupComponent', () => {
|
|
7
|
-
let component: ItAvatarGroupComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItAvatarGroupComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItAvatarGroupComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
describe('ItAvatarGroupItemComponent', () => {
|
|
24
|
-
let component: ItAvatarGroupItemComponent;
|
|
25
|
-
let fixture: ComponentFixture<ItAvatarGroupItemComponent>;
|
|
26
|
-
|
|
27
|
-
beforeEach(async () => {
|
|
28
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
29
|
-
|
|
30
|
-
fixture = TestBed.createComponent(ItAvatarGroupItemComponent);
|
|
31
|
-
component = fixture.componentInstance;
|
|
32
|
-
fixture.detectChanges();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('should create', () => {
|
|
36
|
-
expect(component).toBeTruthy();
|
|
37
|
-
});
|
|
38
|
-
});
|