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,65 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
|
|
3
|
-
import { AsyncPipe, NgTemplateOutlet } from '@angular/common';
|
|
4
|
-
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
import { inputToBoolean } from '../../../utils/coercion';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
standalone: true,
|
|
9
|
-
selector: 'it-checkbox',
|
|
10
|
-
templateUrl: './checkbox.component.html',
|
|
11
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12
|
-
imports: [NgTemplateOutlet, ReactiveFormsModule, AsyncPipe],
|
|
13
|
-
})
|
|
14
|
-
export class ItCheckboxComponent extends ItAbstractFormComponent<boolean | null | undefined> implements OnInit, OnChanges {
|
|
15
|
-
/**
|
|
16
|
-
* If show checkbox as toggle
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
|
-
@Input({ transform: inputToBoolean }) toggle?: boolean;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* If show checkbox inline
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
@Input({ transform: inputToBoolean }) inline?: boolean;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* If is checkbox group
|
|
29
|
-
* @default false
|
|
30
|
-
*/
|
|
31
|
-
@Input({ transform: inputToBoolean }) group?: boolean;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* If checkbox is checked
|
|
35
|
-
* @default false
|
|
36
|
-
*/
|
|
37
|
-
@Input({ transform: inputToBoolean }) checked?: boolean;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* If checkbox is indeterminate
|
|
41
|
-
* @default false
|
|
42
|
-
*/
|
|
43
|
-
@Input({ transform: inputToBoolean }) indeterminate?: boolean;
|
|
44
|
-
|
|
45
|
-
override ngOnInit() {
|
|
46
|
-
super.ngOnInit();
|
|
47
|
-
this.markAsChecked();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
override ngOnChanges(changes: SimpleChanges) {
|
|
51
|
-
if (changes['checked']) {
|
|
52
|
-
this.markAsChecked();
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private markAsChecked(): void {
|
|
57
|
-
if (this.control.value || this.checked === undefined) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const value = this.checked;
|
|
62
|
-
this.writeValue(value);
|
|
63
|
-
return this.onChange(value);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { ItCheckboxComponent } from './checkbox/checkbox.component';
|
|
3
|
-
import { ItInputComponent } from './input/input.component';
|
|
4
|
-
import { ItPasswordInputComponent } from './password-input/password-input.component';
|
|
5
|
-
import { ItRadioButtonComponent } from './radio-button/radio-button.component';
|
|
6
|
-
import { ItRangeComponent } from './range/range.component';
|
|
7
|
-
import { ItRatingComponent } from './rating/rating.component';
|
|
8
|
-
import { ItSelectComponent } from './select/select.component';
|
|
9
|
-
import { ItTextareaComponent } from './textarea/textarea.component';
|
|
10
|
-
import { ItUploadDragDropComponent } from './upload-drag-drop/upload-drag-drop.component';
|
|
11
|
-
import { ItUploadFileListComponent } from './upload-file-list/upload-file-list.component';
|
|
12
|
-
import { ItAutocompleteComponent } from './autocomplete/autocomplete.component';
|
|
13
|
-
import { ItTransferComponent } from './transfer/transfer.component';
|
|
14
|
-
|
|
15
|
-
const formComponents = [
|
|
16
|
-
ItAutocompleteComponent,
|
|
17
|
-
ItCheckboxComponent,
|
|
18
|
-
ItInputComponent,
|
|
19
|
-
ItPasswordInputComponent,
|
|
20
|
-
ItRadioButtonComponent,
|
|
21
|
-
ItRangeComponent,
|
|
22
|
-
ItRatingComponent,
|
|
23
|
-
ItSelectComponent,
|
|
24
|
-
ItTextareaComponent,
|
|
25
|
-
ItTransferComponent,
|
|
26
|
-
ItUploadDragDropComponent,
|
|
27
|
-
ItUploadFileListComponent,
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
@NgModule({
|
|
31
|
-
imports: formComponents,
|
|
32
|
-
exports: formComponents,
|
|
33
|
-
})
|
|
34
|
-
export class ItFormModule {}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<div class="form-group">
|
|
2
|
-
<div
|
|
3
|
-
class="input-group"
|
|
4
|
-
[class.disabled]="!control.enabled"
|
|
5
|
-
[class.input-number]="type === 'number'"
|
|
6
|
-
[class.input-number-currency]="currency"
|
|
7
|
-
[class.input-number-percentage]="percentage"
|
|
8
|
-
[class.input-number-adaptive]="adaptive">
|
|
9
|
-
<span class="input-group-text" #prependText>
|
|
10
|
-
<ng-content select="[prependText]"></ng-content>
|
|
11
|
-
</span>
|
|
12
|
-
@if (label) {
|
|
13
|
-
<label
|
|
14
|
-
[for]="id"
|
|
15
|
-
[class.active]="isActiveLabel"
|
|
16
|
-
[class.input-symbol-label]="percentage || currency"
|
|
17
|
-
[class.input-number-label]="type === 'number'"
|
|
18
|
-
[class.empty-prepend-label]="!(percentage || currency) && !prependText.clientWidth">
|
|
19
|
-
{{ label }}
|
|
20
|
-
</label>
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@if (type === 'number') {
|
|
24
|
-
@if (currency || percentage) {
|
|
25
|
-
<span class="input-group-text fw-semibold">{{ symbol }}</span>
|
|
26
|
-
}
|
|
27
|
-
<input
|
|
28
|
-
type="number"
|
|
29
|
-
[id]="id"
|
|
30
|
-
[step]="step ?? null"
|
|
31
|
-
[min]="min ?? ''"
|
|
32
|
-
[max]="max ?? ''"
|
|
33
|
-
[class.form-control]="readonly !== 'plaintext'"
|
|
34
|
-
[class.form-control-plaintext]="readonly === 'plaintext'"
|
|
35
|
-
[class.is-invalid]="isInvalid"
|
|
36
|
-
[class.just-validate-success-field]="isValid"
|
|
37
|
-
[formControl]="control"
|
|
38
|
-
[placeholder]="placeholder"
|
|
39
|
-
[readonly]="isReadonly"
|
|
40
|
-
[autocomplete]="autocomplete"
|
|
41
|
-
[attr.aria-describedby]="id + '-description'"
|
|
42
|
-
(blur)="markAsTouched()" />
|
|
43
|
-
<span class="input-group-text align-buttons flex-column">
|
|
44
|
-
<button type="button" class="input-number-add" [disabled]="!control.enabled" (click)="incrementNumber()">
|
|
45
|
-
<span class="visually-hidden">{{ 'it.form.increase-value' | translate }}</span>
|
|
46
|
-
</button>
|
|
47
|
-
<button type="button" class="input-number-sub" [disabled]="!control.enabled" (click)="incrementNumber(true)">
|
|
48
|
-
<span class="visually-hidden">{{ 'it.form.decrease-value' | translate }}</span>
|
|
49
|
-
</button>
|
|
50
|
-
</span>
|
|
51
|
-
} @else {
|
|
52
|
-
<input
|
|
53
|
-
[id]="id"
|
|
54
|
-
[type]="type"
|
|
55
|
-
[max]="type === 'date' ? maxDate : undefined"
|
|
56
|
-
[min]="type === 'date' ? minDate : undefined"
|
|
57
|
-
[class.form-control]="readonly !== 'plaintext'"
|
|
58
|
-
[class.form-control-plaintext]="readonly === 'plaintext'"
|
|
59
|
-
[class.is-invalid]="isInvalid"
|
|
60
|
-
[class.just-validate-success-field]="isValid"
|
|
61
|
-
[formControl]="control"
|
|
62
|
-
[placeholder]="placeholder"
|
|
63
|
-
[readonly]="isReadonly"
|
|
64
|
-
[autocomplete]="autocomplete"
|
|
65
|
-
[attr.aria-describedby]="id + '-description'"
|
|
66
|
-
(blur)="markAsTouched()" />
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
<div class="input-group-append">
|
|
70
|
-
<ng-content select="[append]"></ng-content>
|
|
71
|
-
|
|
72
|
-
<div class="input-group-text">
|
|
73
|
-
<ng-content select="[appendText]"></ng-content>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
@if (description) {
|
|
79
|
-
<small [id]="id + '-description'" class="form-text">{{ description }}</small>
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@if (isInvalid) {
|
|
83
|
-
<div class="form-feedback just-validate-error-label" [id]="id + '-error'">
|
|
84
|
-
<div #customError>
|
|
85
|
-
<ng-content select="[error]"></ng-content>
|
|
86
|
-
</div>
|
|
87
|
-
@if (!customError.hasChildNodes()) {
|
|
88
|
-
{{ invalidMessage | async }}
|
|
89
|
-
}
|
|
90
|
-
</div>
|
|
91
|
-
}
|
|
92
|
-
</div>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
.form-group {
|
|
2
|
-
label {
|
|
3
|
-
z-index: 1000;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
input:focus:not(.focus--mouse) {
|
|
7
|
-
box-shadow: inherit !important;
|
|
8
|
-
border-color: inherit !important;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.input-number {
|
|
12
|
-
.align-buttons {
|
|
13
|
-
height: 100%;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.input-group-text:empty {
|
|
18
|
-
display: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
label.empty-prepend-label {
|
|
22
|
-
left: auto !important;
|
|
23
|
-
max-width: 100% !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
label:not(.active):has(+ input:-webkit-autofill) {
|
|
27
|
-
transform: translateY(-75%);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItInputComponent } from './input.component';
|
|
4
|
-
import { tb_base } from '../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItInputComponent', () => {
|
|
7
|
-
let component: ItInputComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItInputComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItInputComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';
|
|
2
|
-
import { ItAbstractFormComponent } from '../../../abstracts/abstract-form.component';
|
|
3
|
-
import { InputControlType } from '../../../interfaces/form';
|
|
4
|
-
import { AbstractControl, ReactiveFormsModule, ValidatorFn, Validators } from '@angular/forms';
|
|
5
|
-
import { ItValidators } from '../../../validators/it-validators';
|
|
6
|
-
import { Observable } from 'rxjs';
|
|
7
|
-
import { AsyncPipe } from '@angular/common';
|
|
8
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
9
|
-
import { inputToBoolean } from '../../../utils/coercion';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
standalone: true,
|
|
13
|
-
selector: 'it-input',
|
|
14
|
-
templateUrl: './input.component.html',
|
|
15
|
-
styleUrls: ['./input.component.scss'],
|
|
16
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17
|
-
imports: [ReactiveFormsModule, TranslateModule, AsyncPipe],
|
|
18
|
-
})
|
|
19
|
-
export class ItInputComponent extends ItAbstractFormComponent<string | number | null | undefined> implements OnInit {
|
|
20
|
-
/**
|
|
21
|
-
* The input type
|
|
22
|
-
* @default text
|
|
23
|
-
*/
|
|
24
|
-
@Input() type: InputControlType = 'text';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The input placeholder
|
|
28
|
-
*/
|
|
29
|
-
@Input() placeholder = '';
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* The input description
|
|
33
|
-
*/
|
|
34
|
-
@Input() description: string | undefined;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* To prevent modification of the contained value.
|
|
38
|
-
* - <b>plaintext</b>: Readonly field in the form stylized as plain text
|
|
39
|
-
* @default undefined
|
|
40
|
-
*/
|
|
41
|
-
@Input() readonly: boolean | 'plaintext' | undefined;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* The max date value [Used only in type = 'date']
|
|
45
|
-
* @default '9999-12-31'
|
|
46
|
-
* @example 'yyyy-mm-dd'
|
|
47
|
-
*/
|
|
48
|
-
@Input() maxDate?: string = '9999-12-31';
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The min date value [Used only in type = 'date']
|
|
52
|
-
* @example 'yyyy-mm-dd'
|
|
53
|
-
*/
|
|
54
|
-
@Input() minDate: string | undefined;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The max value [Used only in type = 'number']
|
|
58
|
-
*/
|
|
59
|
-
@Input() max: number | undefined;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* The min value [Used only in type = 'number']
|
|
63
|
-
*/
|
|
64
|
-
@Input() min: number | undefined;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* The step value [Used only in type = 'number']
|
|
68
|
-
*/
|
|
69
|
-
@Input() step: number | 'any' | undefined;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* If is a currency number [Used only in type = 'number']
|
|
73
|
-
* @default false
|
|
74
|
-
*/
|
|
75
|
-
@Input({ transform: inputToBoolean }) currency?: boolean;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* If is a percentage number [Used only in type = 'number']
|
|
79
|
-
* @default false
|
|
80
|
-
*/
|
|
81
|
-
@Input({ transform: inputToBoolean }) percentage?: boolean;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* The currency or percentage symbol [Used only if percentage or currency]
|
|
85
|
-
* @example '$'
|
|
86
|
-
*/
|
|
87
|
-
@Input() symbol: string | undefined;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* To make the numeric field automatically resize according to the value contained in it. [Used only in type = 'number']
|
|
91
|
-
* @default false
|
|
92
|
-
*/
|
|
93
|
-
@Input({ transform: inputToBoolean }) adaptive?: boolean;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Input autocomplete attribute (Browser autocomplete)
|
|
97
|
-
* @default undefined
|
|
98
|
-
*/
|
|
99
|
-
@Input() autocomplete: string | undefined;
|
|
100
|
-
|
|
101
|
-
get isActiveLabel(): boolean {
|
|
102
|
-
const value = this.control.value;
|
|
103
|
-
if ((!!value && value !== 0) || value === 0 || !!this.placeholder) {
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// if (this.type === 'number' && (!!this.currency || !!this.percentage)) {
|
|
108
|
-
// return true;
|
|
109
|
-
// }
|
|
110
|
-
|
|
111
|
-
return this.type === 'date' || this.type === 'time' || this.type === 'color';
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Check is readonly field
|
|
116
|
-
*/
|
|
117
|
-
protected get isReadonly(): boolean {
|
|
118
|
-
return this.readonly === 'plaintext' || !!this.readonly;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Return the invalid message string from TranslateService
|
|
123
|
-
*/
|
|
124
|
-
override get invalidMessage(): Observable<string> {
|
|
125
|
-
if (this.hasError('min') && this.min) {
|
|
126
|
-
return this._translateService.get('it.errors.min-invalid', {
|
|
127
|
-
min: this.min,
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
if (this.hasError('max') && this.max) {
|
|
131
|
-
return this._translateService.get('it.errors.max-invalid', {
|
|
132
|
-
max: this.max,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
if (this.hasError('minlength')) {
|
|
136
|
-
const error = this.getError('minlength');
|
|
137
|
-
return this._translateService.get('it.errors.min-length-invalid', {
|
|
138
|
-
min: error.requiredLength,
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
if (this.hasError('maxlength')) {
|
|
142
|
-
const error = this.getError('maxlength');
|
|
143
|
-
return this._translateService.get('it.errors.max-length-invalid', {
|
|
144
|
-
max: error.requiredLength,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
if (this.hasError('email') || this.hasError('invalidEmail')) {
|
|
148
|
-
return this._translateService.get('it.errors.email-invalid');
|
|
149
|
-
}
|
|
150
|
-
if (this.hasError('invalidTel')) {
|
|
151
|
-
return this._translateService.get('it.errors.tel-invalid');
|
|
152
|
-
}
|
|
153
|
-
if (this.hasError('invalidUrl')) {
|
|
154
|
-
return this._translateService.get('it.errors.url-invalid');
|
|
155
|
-
}
|
|
156
|
-
if (this.hasError('invalidTaxCode')) {
|
|
157
|
-
return this._translateService.get('it.errors.tax-code-invalid');
|
|
158
|
-
}
|
|
159
|
-
if (this.hasError('invalidVatNumber')) {
|
|
160
|
-
return this._translateService.get('it.errors.vat-number-invalid');
|
|
161
|
-
}
|
|
162
|
-
if (this.hasError('invalidCap')) {
|
|
163
|
-
return this._translateService.get('it.errors.cap-invalid');
|
|
164
|
-
}
|
|
165
|
-
if (this.hasError('invalidIban')) {
|
|
166
|
-
return this._translateService.get('it.errors.iban-invalid');
|
|
167
|
-
}
|
|
168
|
-
if (this.hasError('invalidPlate')) {
|
|
169
|
-
return this._translateService.get('it.errors.plate-invalid');
|
|
170
|
-
}
|
|
171
|
-
if (this.hasError('invalidRegex')) {
|
|
172
|
-
return this._translateService.get('it.errors.regex-invalid');
|
|
173
|
-
}
|
|
174
|
-
if (this.hasError('pattern')) {
|
|
175
|
-
const error = this.getError('pattern');
|
|
176
|
-
return this._translateService.get('it.errors.pattern-invalid', {
|
|
177
|
-
pattern: error.requiredPattern,
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
return super.invalidMessage;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
override ngOnInit() {
|
|
185
|
-
super.ngOnInit();
|
|
186
|
-
|
|
187
|
-
const validators: Array<ValidatorFn> = [];
|
|
188
|
-
switch (this.type) {
|
|
189
|
-
case 'number':
|
|
190
|
-
if (this.percentage) {
|
|
191
|
-
this.min = this.min || 0;
|
|
192
|
-
this.max = this.max || 100;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
// Dynamic min/max validators
|
|
196
|
-
validators.push((control: AbstractControl) => (this.min ? Validators.min(this.min)(control) : null));
|
|
197
|
-
validators.push((control: AbstractControl) => (this.max ? Validators.max(this.max)(control) : null));
|
|
198
|
-
break;
|
|
199
|
-
case 'email':
|
|
200
|
-
validators.push(ItValidators.email);
|
|
201
|
-
break;
|
|
202
|
-
case 'tel':
|
|
203
|
-
validators.push(ItValidators.tel);
|
|
204
|
-
break;
|
|
205
|
-
case 'url':
|
|
206
|
-
validators.push(ItValidators.url);
|
|
207
|
-
break;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
this.addValidators(validators);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Increment or decrease the input number value of step
|
|
215
|
-
* @param decrease true to decrease value
|
|
216
|
-
*/
|
|
217
|
-
protected incrementNumber(decrease = false): void {
|
|
218
|
-
if (this.type !== 'number') {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
const step = this.step === 'any' ? 1 : this.step ?? 1;
|
|
222
|
-
let value = Number(this.control.value);
|
|
223
|
-
value = (isNaN(value) ? 0 : value) + (decrease ? -step : step);
|
|
224
|
-
value = Math.round(value * 1e12) / 1e12; // prevent js decimal error
|
|
225
|
-
|
|
226
|
-
if (this.min !== undefined && value < this.min) {
|
|
227
|
-
value = this.min;
|
|
228
|
-
} else if (this.max !== undefined && value > this.max) {
|
|
229
|
-
value = this.max;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
this.control.setValue(value);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
<div class="form-group">
|
|
2
|
-
@if (label) {
|
|
3
|
-
<label [for]="id" [class.active]="!!control.value || !!placeholder">{{ label }}</label>
|
|
4
|
-
}
|
|
5
|
-
<input
|
|
6
|
-
#input
|
|
7
|
-
[id]="id"
|
|
8
|
-
type="password"
|
|
9
|
-
class="form-control input-password"
|
|
10
|
-
[class.is-invalid]="isInvalid"
|
|
11
|
-
[class.is-valid]="isValid"
|
|
12
|
-
[formControl]="control"
|
|
13
|
-
[placeholder]="placeholder"
|
|
14
|
-
[attr.aria-describedby]="id + '-description'"
|
|
15
|
-
[autocomplete]="confirmPasswordField ? 'off' : autocomplete" />
|
|
16
|
-
|
|
17
|
-
<span class="password-icon" aria-hidden="true">
|
|
18
|
-
<it-icon name="password-visible" size="sm" class="password-icon-visible"></it-icon>
|
|
19
|
-
<it-icon name="password-invisible" size="sm" class="password-icon-invisible d-none"></it-icon>
|
|
20
|
-
</span>
|
|
21
|
-
|
|
22
|
-
@if (isInvalid) {
|
|
23
|
-
<div [id]="id + '-error'" class="form-feedback just-validate-error-label">
|
|
24
|
-
<div #customError>
|
|
25
|
-
<ng-content select="[error]"></ng-content>
|
|
26
|
-
</div>
|
|
27
|
-
@if (!customError.hasChildNodes()) {
|
|
28
|
-
{{ invalidMessage | async }}
|
|
29
|
-
}
|
|
30
|
-
</div>
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@if (description !== undefined && !isStrengthMeter) {
|
|
34
|
-
<small [id]="id + '-description'" class="form-text">
|
|
35
|
-
{{ description !== true ? description : (strengthMeterDescription | async) }}
|
|
36
|
-
</small>
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
<small class="password-caps form-text text-warning position-absolute bg-white w-100">
|
|
40
|
-
{{ 'it.form.caps-inserted' | translate }}
|
|
41
|
-
</small>
|
|
42
|
-
|
|
43
|
-
@if (isStrengthMeter) {
|
|
44
|
-
<div class="password-strength-meter">
|
|
45
|
-
<small
|
|
46
|
-
[id]="id + '-description'"
|
|
47
|
-
class="form-text text-muted"
|
|
48
|
-
[attr.data-bs-short-pass]="'it.form.password-strength-meter.password-short' | translate"
|
|
49
|
-
[attr.data-bs-bad-pas]="'it.form.password-strength-meter.password-bad' | translate"
|
|
50
|
-
[attr.data-bs-good-pass]="'it.form.password-strength-meter.password-good' | translate"
|
|
51
|
-
[attr.data-bs-strong-pass]="'it.form.password-strength-meter.password-strong' | translate">
|
|
52
|
-
{{ description !== undefined && description !== true ? description : (strengthMeterDescription | async) }}
|
|
53
|
-
</small>
|
|
54
|
-
<div class="password-meter progress rounded-0 position-absolute">
|
|
55
|
-
<div class="row position-absolute w-100 m-0">
|
|
56
|
-
<div class="col-3 border-start border-end border-white"></div>
|
|
57
|
-
<div class="col-3 border-start border-end border-white"></div>
|
|
58
|
-
<div class="col-3 border-start border-end border-white"></div>
|
|
59
|
-
<div class="col-3 border-start border-end border-white"></div>
|
|
60
|
-
</div>
|
|
61
|
-
<div class="progress-bar bg-muted" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
}
|
|
65
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ItPasswordInputComponent } from './password-input.component';
|
|
4
|
-
import { tb_base } from '../../../../test';
|
|
5
|
-
|
|
6
|
-
describe('ItPasswordInputComponent', () => {
|
|
7
|
-
let component: ItPasswordInputComponent;
|
|
8
|
-
let fixture: ComponentFixture<ItPasswordInputComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async () => {
|
|
11
|
-
await TestBed.configureTestingModule(tb_base).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(ItPasswordInputComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|