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,171 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
|
|
2
|
-
import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
|
|
3
|
-
import { ItValidators } from '../../../validators/it-validators';
|
|
4
|
-
import { map, Observable } from 'rxjs';
|
|
5
|
-
import { InputPassword } from 'bootstrap-italia';
|
|
6
|
-
import { ReactiveFormsModule, Validators } from '@angular/forms';
|
|
7
|
-
import { AsyncPipe } from '@angular/common';
|
|
8
|
-
import { ItIconComponent } from '../../utils/icon/icon.component';
|
|
9
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
10
|
-
import { inputToBoolean } from '../../../utils/coercion';
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
standalone: true,
|
|
14
|
-
selector: 'it-password-input',
|
|
15
|
-
templateUrl: './password-input.component.html',
|
|
16
|
-
styleUrls: ['./password-input.component.scss'],
|
|
17
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
18
|
-
imports: [ReactiveFormsModule, ItIconComponent, AsyncPipe, TranslateModule],
|
|
19
|
-
})
|
|
20
|
-
export class ItPasswordInputComponent extends ItAbstractFormComponent<string | null | undefined> implements OnInit, AfterViewInit {
|
|
21
|
-
/**
|
|
22
|
-
* The field is required
|
|
23
|
-
* @default true
|
|
24
|
-
*/
|
|
25
|
-
@Input() required: boolean = true;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The password minimum length
|
|
29
|
-
* @default 10
|
|
30
|
-
*/
|
|
31
|
-
@Input() minLength: number = 10;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* The password must contain at least one number
|
|
35
|
-
* @default true
|
|
36
|
-
*/
|
|
37
|
-
@Input() useNumber: boolean = true;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* The password must contain at least one uppercase character
|
|
41
|
-
* @default true
|
|
42
|
-
*/
|
|
43
|
-
@Input() useCapitalCase: boolean = true;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* The password must contain at least one lowercase character
|
|
47
|
-
* @default true
|
|
48
|
-
*/
|
|
49
|
-
@Input() useSmallCase: boolean = true;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* The password must contain at least one special character
|
|
53
|
-
* @default true
|
|
54
|
-
*/
|
|
55
|
-
@Input() useSpecialCharacters: boolean = true;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* The input placeholder
|
|
59
|
-
*/
|
|
60
|
-
@Input() placeholder: string = '';
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The input description
|
|
64
|
-
* - <b>true</b>: show the StrengthMeter description message
|
|
65
|
-
* - <b>string</b>: show custom description
|
|
66
|
-
* @default true for StrengthMeter mode else is undefined
|
|
67
|
-
*/
|
|
68
|
-
@Input() description: string | true | undefined;
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Enable to show the strength meter
|
|
72
|
-
* @default false
|
|
73
|
-
*/
|
|
74
|
-
@Input({ transform: inputToBoolean }) showStrengthMeter?: boolean;
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Is the confirmation password field
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
@Input({ transform: inputToBoolean }) confirmPasswordField?: boolean;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Input autocomplete attribute (Browser autocomplete)
|
|
84
|
-
* @default undefined
|
|
85
|
-
*/
|
|
86
|
-
@Input() autocomplete: string | undefined;
|
|
87
|
-
|
|
88
|
-
private inputPasswordBs?: InputPassword;
|
|
89
|
-
|
|
90
|
-
@ViewChild('input') private inputElement?: ElementRef<HTMLInputElement>;
|
|
91
|
-
|
|
92
|
-
override ngOnInit() {
|
|
93
|
-
super.ngOnInit();
|
|
94
|
-
|
|
95
|
-
if (!this.confirmPasswordField) {
|
|
96
|
-
this.addValidators(
|
|
97
|
-
ItValidators.password(
|
|
98
|
-
this.minLength,
|
|
99
|
-
this.useNumber,
|
|
100
|
-
this.useCapitalCase,
|
|
101
|
-
this.useSmallCase,
|
|
102
|
-
this.useSpecialCharacters,
|
|
103
|
-
this.required
|
|
104
|
-
)
|
|
105
|
-
);
|
|
106
|
-
} else if (this.required) {
|
|
107
|
-
this.addValidators(Validators.required);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
override ngAfterViewInit() {
|
|
112
|
-
super.ngAfterViewInit();
|
|
113
|
-
|
|
114
|
-
if (this.inputElement) {
|
|
115
|
-
this.inputPasswordBs = InputPassword.getOrCreateInstance(this.inputElement.nativeElement, {
|
|
116
|
-
showText: this.isStrengthMeter,
|
|
117
|
-
minimumLength: this.minLength,
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
protected get isStrengthMeter(): boolean {
|
|
123
|
-
return !this.confirmPasswordField && !!this.showStrengthMeter;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Return the invalid message string from TranslateService
|
|
128
|
-
*/
|
|
129
|
-
override get invalidMessage(): Observable<string> {
|
|
130
|
-
if (this.hasError('noPasswordMatch')) {
|
|
131
|
-
return this._translateService.get('it.errors.password-no-match');
|
|
132
|
-
}
|
|
133
|
-
if (this.hasError('minlength')) {
|
|
134
|
-
return this._translateService.get('it.errors.password-min-length', {
|
|
135
|
-
minLength: this.minLength,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
if (this.hasError('hasNumber')) {
|
|
139
|
-
return this._translateService.get('it.errors.password-number');
|
|
140
|
-
}
|
|
141
|
-
if (this.hasError('hasCapitalCase')) {
|
|
142
|
-
return this._translateService.get('it.errors.password-capital-case');
|
|
143
|
-
}
|
|
144
|
-
if (this.hasError('hasSmallCase')) {
|
|
145
|
-
return this._translateService.get('it.errors.password-capital-case');
|
|
146
|
-
}
|
|
147
|
-
if (this.hasError('hasSpecialCharacters')) {
|
|
148
|
-
return this._translateService.get('it.errors.password-special-character');
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
return super.invalidMessage;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Retrieve the default StrengthMeter description message from TranslateService
|
|
156
|
-
*/
|
|
157
|
-
protected get strengthMeterDescription(): Observable<string> {
|
|
158
|
-
const keys = ['it.form.password-strength-meter.description.default'];
|
|
159
|
-
if (this.useNumber) {
|
|
160
|
-
keys.push('it.form.password-strength-meter.description.number');
|
|
161
|
-
}
|
|
162
|
-
if (this.useCapitalCase) {
|
|
163
|
-
keys.push('it.form.password-strength-meter.description.capital-case');
|
|
164
|
-
}
|
|
165
|
-
if (this.useSpecialCharacters) {
|
|
166
|
-
keys.push('it.form.password-strength-meter.description.special-character');
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return this._translateService.get(keys, { minLength: this.minLength }).pipe(map(labels => Object.values(labels).join(', ')));
|
|
170
|
-
}
|
|
171
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<ng-container>
|
|
2
|
-
<div class="form-check" [class.form-check-group]="group" [class.form-check-inline]="inline">
|
|
3
|
-
<input
|
|
4
|
-
[id]="id"
|
|
5
|
-
type="radio"
|
|
6
|
-
[value]="value"
|
|
7
|
-
[name]="name"
|
|
8
|
-
[class.is-invalid]="isInvalid"
|
|
9
|
-
[class.is-valid]="isValid"
|
|
10
|
-
[formControl]="control"
|
|
11
|
-
[attr.aria-describedby]="id + '-help'" />
|
|
12
|
-
|
|
13
|
-
<label class="form-check-label" [for]="id">
|
|
14
|
-
<div #customLabel>
|
|
15
|
-
<ng-content select="[label]"></ng-content>
|
|
16
|
-
</div>
|
|
17
|
-
@if (!customLabel.hasChildNodes()) {
|
|
18
|
-
{{ label }}
|
|
19
|
-
}
|
|
20
|
-
</label>
|
|
21
|
-
|
|
22
|
-
@if (group) {
|
|
23
|
-
<small [id]="id + '-help'" class="form-text">
|
|
24
|
-
<ng-content></ng-content>
|
|
25
|
-
</small>
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@if (isInvalid && group) {
|
|
29
|
-
<div class="form-feedback just-validate-error-label" [id]="id + '-error'">
|
|
30
|
-
<div #customError>
|
|
31
|
-
<ng-content select="[error]"></ng-content>
|
|
32
|
-
</div>
|
|
33
|
-
@if (!customError.hasChildNodes()) {
|
|
34
|
-
{{ invalidMessage | async }}
|
|
35
|
-
}
|
|
36
|
-
</div>
|
|
37
|
-
}
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
@if (isInvalid && !group) {
|
|
41
|
-
<div class="form-feedback just-validate-error-label" [id]="id + '-error'">
|
|
42
|
-
<div #customError>
|
|
43
|
-
<ng-content select="[error]"></ng-content>
|
|
44
|
-
</div>
|
|
45
|
-
@if (!customError.hasChildNodes()) {
|
|
46
|
-
{{ invalidMessage | async }}
|
|
47
|
-
}
|
|
48
|
-
</div>
|
|
49
|
-
}
|
|
50
|
-
</ng-container>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//@import 'bootstrap-italia/src/scss/functions';
|
|
2
|
-
//@import 'bootstrap-italia/src/scss/utilities/colors_vars';
|
|
3
|
-
//
|
|
4
|
-
//.form-check {
|
|
5
|
-
//
|
|
6
|
-
// [type=radio].is-invalid:not(:checked) + label::after,
|
|
7
|
-
// [type=radio].is-invalid:not(:checked) + label::before {
|
|
8
|
-
// border-color: $danger;
|
|
9
|
-
// }
|
|
10
|
-
//
|
|
11
|
-
// [type=radio].is-invalid:not(:checked) + label {
|
|
12
|
-
// color: $danger;
|
|
13
|
-
// }
|
|
14
|
-
//}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItRadioButtonComponent } from './radio-button.component';
|
|
4
|
-
import { tb_base } from '../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItRadioButtonComponent', () => {
|
|
7
|
-
let component: ItRadioButtonComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItRadioButtonComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItRadioButtonComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
|
|
3
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
4
|
-
import { AsyncPipe } from '@angular/common';
|
|
5
|
-
import { inputToBoolean } from '../../../utils/coercion';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
standalone: true,
|
|
9
|
-
selector: 'it-radio-button',
|
|
10
|
-
templateUrl: './radio-button.component.html',
|
|
11
|
-
styleUrls: ['./radio-button.component.scss'],
|
|
12
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13
|
-
imports: [ReactiveFormsModule, AsyncPipe],
|
|
14
|
-
})
|
|
15
|
-
export class ItRadioButtonComponent extends ItAbstractFormComponent<string | number | null | undefined> implements OnInit {
|
|
16
|
-
/**
|
|
17
|
-
* The radio value
|
|
18
|
-
*/
|
|
19
|
-
@Input({ required: true }) value: string | number | undefined | null;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* If show radio inline
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
@Input({ transform: inputToBoolean }) inline?: boolean;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* If is radio group
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
@Input({ transform: inputToBoolean }) group?: boolean;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* If is radio is checked
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
@Input({ transform: inputToBoolean }) checked?: boolean;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Set the radio name manually.
|
|
41
|
-
* For example when the radio button name is duplicated inside page
|
|
42
|
-
* @default by default the radio name is calculated from form field name
|
|
43
|
-
*/
|
|
44
|
-
@Input() forceRadioName?: string;
|
|
45
|
-
|
|
46
|
-
get name(): string {
|
|
47
|
-
if (this.forceRadioName) {
|
|
48
|
-
return this.forceRadioName;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
let name = '';
|
|
52
|
-
if (this._ngControl) {
|
|
53
|
-
name = this._ngControl.name?.toString() || '';
|
|
54
|
-
|
|
55
|
-
// Retrieve parent name, prevent duplicate name inside FormArray or nested FormGroup
|
|
56
|
-
let control = this._ngControl.control?.parent;
|
|
57
|
-
while (control?.parent) {
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
59
|
-
const controls: { [key: string]: any } = control?.parent?.controls || {};
|
|
60
|
-
const parentName = Object.keys(controls).find(name => control === controls[name]) || null;
|
|
61
|
-
if (!parentName) {
|
|
62
|
-
break;
|
|
63
|
-
}
|
|
64
|
-
name = `${parentName}.${name}`; // parent.0.radioName
|
|
65
|
-
control = control.parent;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return name;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
override ngOnInit() {
|
|
73
|
-
super.ngOnInit();
|
|
74
|
-
|
|
75
|
-
if (this.control.value || !this.value || !this.checked) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
this.writeValue(this.value);
|
|
80
|
-
return this.onChange(this.value);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<div class="d-flex justify-content-between align-items-center">
|
|
2
|
-
@if (label) {
|
|
3
|
-
<label [for]="id" class="form-label">{{ label }}</label>
|
|
4
|
-
}
|
|
5
|
-
<ng-content></ng-content>
|
|
6
|
-
</div>
|
|
7
|
-
|
|
8
|
-
<input
|
|
9
|
-
#slider
|
|
10
|
-
[id]="id"
|
|
11
|
-
type="range"
|
|
12
|
-
[min]="min"
|
|
13
|
-
[max]="max"
|
|
14
|
-
[step]="step"
|
|
15
|
-
class="form-range"
|
|
16
|
-
[class.double-color]="!!leftColor && !!rightColor"
|
|
17
|
-
[formControl]="control" />
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.form-range.double-color {
|
|
2
|
-
&::-webkit-slider-runnable-track {
|
|
3
|
-
background: linear-gradient(
|
|
4
|
-
to right,
|
|
5
|
-
var(--range-left-color) var(--range-percentage),
|
|
6
|
-
var(--range-right-color) var(--range-percentage)
|
|
7
|
-
);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&::-moz-range-track {
|
|
11
|
-
background: linear-gradient(
|
|
12
|
-
to right,
|
|
13
|
-
var(--range-left-color) var(--range-percentage),
|
|
14
|
-
var(--range-right-color) var(--range-percentage)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItRangeComponent } from './range.component';
|
|
4
|
-
import { tb_base } from '../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItRangeComponent', () => {
|
|
7
|
-
let component: ItRangeComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItRangeComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItRangeComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
ElementRef,
|
|
5
|
-
Input,
|
|
6
|
-
OnChanges,
|
|
7
|
-
OnDestroy,
|
|
8
|
-
OnInit,
|
|
9
|
-
SimpleChanges,
|
|
10
|
-
ViewChild,
|
|
11
|
-
} from '@angular/core';
|
|
12
|
-
import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
|
|
13
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
14
|
-
import { distinctUntilChanged, startWith, Subscription } from 'rxjs';
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'it-range',
|
|
18
|
-
standalone: true,
|
|
19
|
-
imports: [ReactiveFormsModule],
|
|
20
|
-
templateUrl: './range.component.html',
|
|
21
|
-
styleUrls: ['./range.component.scss'],
|
|
22
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
23
|
-
})
|
|
24
|
-
export class ItRangeComponent extends ItAbstractFormComponent<number | null | undefined> implements OnInit, OnChanges, OnDestroy {
|
|
25
|
-
/**
|
|
26
|
-
* The max value
|
|
27
|
-
*/
|
|
28
|
-
@Input() max?: number;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* The min value
|
|
32
|
-
*/
|
|
33
|
-
@Input() min?: number;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* The step value
|
|
37
|
-
*/
|
|
38
|
-
@Input() step?: number | 'any';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* The color on left of thumb [Require rightColor]
|
|
42
|
-
* @example '#0d6efd' or 'var(--bs-primary)'
|
|
43
|
-
* @default undefined ('var(--bs-gray-300)')
|
|
44
|
-
*/
|
|
45
|
-
@Input() leftColor?: string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The color on right of thumb [Require leftColor]
|
|
49
|
-
* @example '#0d6efd' or 'var(--bs-primary)'
|
|
50
|
-
* @default undefined ('var(--bs-gray-300)')
|
|
51
|
-
*/
|
|
52
|
-
@Input() rightColor?: string;
|
|
53
|
-
|
|
54
|
-
@ViewChild('slider', { static: true }) slider!: ElementRef<HTMLInputElement>;
|
|
55
|
-
|
|
56
|
-
private subscription?: Subscription;
|
|
57
|
-
|
|
58
|
-
override ngOnInit() {
|
|
59
|
-
super.ngOnInit();
|
|
60
|
-
this.subscription = this.control.valueChanges
|
|
61
|
-
.pipe(distinctUntilChanged(), startWith(undefined))
|
|
62
|
-
.subscribe(() => this.updateSliderColor());
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
override ngOnChanges(changes: SimpleChanges) {
|
|
66
|
-
if (changes['leftColor']) {
|
|
67
|
-
this.slider.nativeElement.style.setProperty('--range-left-color', this.leftColor ?? null);
|
|
68
|
-
}
|
|
69
|
-
if (changes['rightColor']) {
|
|
70
|
-
this.slider.nativeElement.style.setProperty('--range-right-color', this.rightColor ?? null);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
ngOnDestroy() {
|
|
75
|
-
this.subscription?.unsubscribe();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
override writeValue(value: number | null | undefined) {
|
|
79
|
-
super.writeValue(value);
|
|
80
|
-
this.updateSliderColor();
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Update the percentage of slider color
|
|
85
|
-
* @private
|
|
86
|
-
*/
|
|
87
|
-
private updateSliderColor(): void {
|
|
88
|
-
if (!this.leftColor || !this.rightColor) {
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const max = Number(this.slider.nativeElement.max) || 100;
|
|
93
|
-
const min = Number(this.slider.nativeElement.min) || 0;
|
|
94
|
-
|
|
95
|
-
// Calculate visible width
|
|
96
|
-
const diff = max - min;
|
|
97
|
-
const val = (((this.control.value ?? diff / 2) - min) * 100) / diff;
|
|
98
|
-
this.slider.nativeElement.style.setProperty('--range-percentage', `${val}%`);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<fieldset class="rating" [class.rating-label]="!!label" [class.rating-read-only]="control.disabled">
|
|
2
|
-
<legend>
|
|
3
|
-
<span>{{ label }}</span>
|
|
4
|
-
<span class="visually-hidden">
|
|
5
|
-
{{ 'it.core.rating-star' | translate: { current: control.value || 0, total: stars.length } }}
|
|
6
|
-
</span>
|
|
7
|
-
</legend>
|
|
8
|
-
|
|
9
|
-
@for (starValue of stars; track starValue) {
|
|
10
|
-
<input
|
|
11
|
-
[id]="id + '-' + starValue"
|
|
12
|
-
type="radio"
|
|
13
|
-
[name]="id"
|
|
14
|
-
[value]="starValue"
|
|
15
|
-
[attr.aria-hidden]="control.disabled"
|
|
16
|
-
[formControl]="control" />
|
|
17
|
-
<label class="full" [for]="id + '-' + starValue">
|
|
18
|
-
<it-icon name="star-full" size="sm" aria-hidden="true"></it-icon>
|
|
19
|
-
<span class="visually-hidden">
|
|
20
|
-
{{ 'it.core.rate-star' | translate: { current: starValue, total: stars.length } }}
|
|
21
|
-
</span>
|
|
22
|
-
</label>
|
|
23
|
-
}
|
|
24
|
-
</fieldset>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItRatingComponent } from './rating.component';
|
|
4
|
-
import { tb_base } from '../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItRatingComponent', () => {
|
|
7
|
-
let component: ItRatingComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItRatingComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItRatingComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
|
|
3
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { ItIconComponent } from '../../utils/icon/icon.component';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
standalone: true,
|
|
9
|
-
selector: 'it-rating',
|
|
10
|
-
templateUrl: './rating.component.html',
|
|
11
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
imports: [TranslateModule, ReactiveFormsModule, ItIconComponent],
|
|
13
|
-
})
|
|
14
|
-
export class ItRatingComponent extends ItAbstractFormComponent<number | null | undefined> implements OnInit, OnChanges {
|
|
15
|
-
/**
|
|
16
|
-
* The rating value
|
|
17
|
-
*/
|
|
18
|
-
@Input() value: number | undefined;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Number of stars to show
|
|
22
|
-
* @default 5
|
|
23
|
-
*/
|
|
24
|
-
@Input() starCount: number = 5;
|
|
25
|
-
|
|
26
|
-
protected stars: Array<number> = this.generateStars();
|
|
27
|
-
|
|
28
|
-
override ngOnChanges(changes: SimpleChanges): void {
|
|
29
|
-
super.ngOnChanges(changes);
|
|
30
|
-
|
|
31
|
-
if (changes['starCount'] || !this.stars.length) {
|
|
32
|
-
this.stars = this.generateStars();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
override ngOnInit() {
|
|
37
|
-
super.ngOnInit();
|
|
38
|
-
|
|
39
|
-
if (!this.control.value && !!this.value) {
|
|
40
|
-
this.writeValue(this.value);
|
|
41
|
-
this.onChange(this.value);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Generate the array of stars
|
|
47
|
-
* @private
|
|
48
|
-
*/
|
|
49
|
-
private generateStars(): Array<number> {
|
|
50
|
-
return Array.from({ length: this.starCount }, (_, i) => i + 1).reverse();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<div class="select-wrapper">
|
|
2
|
-
@if (label) {
|
|
3
|
-
<label [for]="id">{{ label }}</label>
|
|
4
|
-
}
|
|
5
|
-
<select
|
|
6
|
-
[id]="id"
|
|
7
|
-
[formControl]="control"
|
|
8
|
-
[class.is-invalid]="isInvalid"
|
|
9
|
-
[class.is-valid]="isValid"
|
|
10
|
-
(blur)="markAsTouched()"
|
|
11
|
-
[attr.aria-describedby]="id + '-description'">
|
|
12
|
-
@if (defaultOption) {
|
|
13
|
-
<option [ngValue]="null" disabled selected>
|
|
14
|
-
{{ defaultOption }}
|
|
15
|
-
</option>
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
<ng-content></ng-content>
|
|
19
|
-
|
|
20
|
-
@if (options) {
|
|
21
|
-
@for (option of options; track option.value) {
|
|
22
|
-
<option [disabled]="optionIsDisabled(option)" [ngValue]="option.value">
|
|
23
|
-
{{ option.text ?? option.value }}
|
|
24
|
-
</option>
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
@if (groups) {
|
|
29
|
-
@for (group of groups; track group) {
|
|
30
|
-
<optgroup [label]="group.label">
|
|
31
|
-
@for (option of group.options; track option.value) {
|
|
32
|
-
<option [disabled]="optionIsDisabled(option)" [ngValue]="option.value">
|
|
33
|
-
{{ option.text ?? option.value }}
|
|
34
|
-
</option>
|
|
35
|
-
}
|
|
36
|
-
</optgroup>
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
</select>
|
|
40
|
-
@if (description) {
|
|
41
|
-
<small [id]="id + '-description'" class="form-text">{{ description }}</small>
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
@if (isInvalid) {
|
|
45
|
-
<div class="form-feedback just-validate-error-label" [id]="id + '-error'">
|
|
46
|
-
<div #customError>
|
|
47
|
-
<ng-content select="[error]"></ng-content>
|
|
48
|
-
</div>
|
|
49
|
-
@if (!customError.hasChildNodes()) {
|
|
50
|
-
{{ invalidMessage | async }}
|
|
51
|
-
}
|
|
52
|
-
</div>
|
|
53
|
-
}
|
|
54
|
-
</div>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItSelectComponent } from './select.component';
|
|
4
|
-
import { tb_base } from '../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItSelectComponent', () => {
|
|
7
|
-
let component: ItSelectComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItSelectComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItSelectComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
component.options = [];
|
|
16
|
-
fixture.detectChanges();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should create', () => {
|
|
20
|
-
expect(component).toBeTruthy();
|
|
21
|
-
});
|
|
22
|
-
});
|