@testgorilla/tgo-ui 2.9.0 → 2.10.1
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/.circleci/config.yml +112 -0
- package/.editorconfig +16 -0
- package/.eslintignore +5 -0
- package/.eslintrc.js +301 -0
- package/.github/README.md +81 -0
- package/.husky/pre-commit +4 -0
- package/.prettierignore +2 -0
- package/.prettierrc +13 -0
- package/.storybook/main.js +25 -0
- package/.storybook/preview-head.html +10 -0
- package/.storybook/preview.js +107 -0
- package/.storybook/tsconfig.json +24 -0
- package/.storybook/typings.d.ts +4 -0
- package/.stylelintrc.json +30 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/CHANGELOG.md +123 -0
- package/README.md +39 -0
- package/angular.json +164 -0
- package/e2e/bannerAction.spec.ts +46 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--default-chromium-darwin.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--default-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--error-chromium-darwin.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--error-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--info-chromium-darwin.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--info-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--warning-chromium-darwin.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--warning-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--with-relative-width-chromium-darwin.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-alert-bars-banner-action--with-relative-width-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-bars-banner-action--default-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-bars-banner-action--error-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-bars-banner-action--info-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-bars-banner-action--warning-chromium-linux.png +0 -0
- package/e2e/bannerAction.spec.ts-snapshots/id-bars-banner-action--with-relative-width-chromium-linux.png +0 -0
- package/e2e/button.spec.ts +53 -0
- package/e2e/button.spec.ts-snapshots/id-button--basic-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--button-as-link-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--button-only-label-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--disabled-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--full-width-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--label-icon-left-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--label-icon-right-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--loading-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--menu-cell-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--menu-trigger-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--only-icon-chromium-linux.png +0 -0
- package/e2e/button.spec.ts-snapshots/id-button--small-chromium-linux.png +0 -0
- package/e2e/card.spec.ts +43 -0
- package/e2e/card.spec.ts-snapshots/id-card--default-chromium-linux.png +0 -0
- package/e2e/colors.spec.ts +47 -0
- package/e2e/colors.spec.ts-snapshots/id-foundations-colors--greysacale-chromium-linux.png +0 -0
- package/e2e/colors.spec.ts-snapshots/id-foundations-colors--primary-error-chromium-linux.png +0 -0
- package/e2e/colors.spec.ts-snapshots/id-foundations-colors--primary-petrol-chromium-linux.png +0 -0
- package/e2e/colors.spec.ts-snapshots/id-foundations-colors--primary-teal-chromium-linux.png +0 -0
- package/e2e/colors.spec.ts-snapshots/id-foundations-colors--primary-warning-chromium-linux.png +0 -0
- package/e2e/colors.spec.ts-snapshots/id-foundations-colors--secondary-colors-chromium-linux.png +0 -0
- package/e2e/createAccount.spec.ts +102 -0
- package/e2e/createAccount.spec.ts-snapshots/id-create-account--default-chromium-linux.png +0 -0
- package/e2e/createAccount.spec.ts-snapshots/id-deprecated-create-account--default-chromium-linux.png +0 -0
- package/e2e/createAccount.spec.ts-snapshots/register-with-errors-chromium-linux.png +0 -0
- package/e2e/createAccount.spec.ts-snapshots/register-with-texts-chromium-linux.png +0 -0
- package/e2e/createPassword.spec.ts +94 -0
- package/e2e/createPassword.spec.ts-snapshots/createPassword-with-errors-chromium-linux.png +0 -0
- package/e2e/createPassword.spec.ts-snapshots/createPassword-with-texts-chromium-linux.png +0 -0
- package/e2e/createPassword.spec.ts-snapshots/id-createpassword--default-args-viewMode-story-chromium-linux.png +0 -0
- package/e2e/createPassword.spec.ts-snapshots/id-createpassword--default-chromium-linux.png +0 -0
- package/e2e/createPassword.spec.ts-snapshots/id-deprecated-create-password--default-chromium-linux.png +0 -0
- package/e2e/dialog.spec.ts +43 -0
- package/e2e/dialog.spec.ts-snapshots/id-dialog-dialog--default-chromium-darwin.png +0 -0
- package/e2e/dialog.spec.ts-snapshots/id-dialog-dialog--default-chromium-linux.png +0 -0
- package/e2e/field.spec.ts +51 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--email-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--number-type-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--password-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--search-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--tel-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--text-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--with-disable-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--with-errors-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--with-require-chromium-linux.png +0 -0
- package/e2e/field.spec.ts-snapshots/id-forms-field--without-label-chromium-linux.png +0 -0
- package/e2e/forgotPassword.spec.ts +94 -0
- package/e2e/forgotPassword.spec.ts-snapshots/forgotPassword-with-errors-chromium-linux.png +0 -0
- package/e2e/forgotPassword.spec.ts-snapshots/forgotPassword-with-texts-chromium-linux.png +0 -0
- package/e2e/forgotPassword.spec.ts-snapshots/id-deprecated-forgot-password--default-chromium-linux.png +0 -0
- package/e2e/forgotPassword.spec.ts-snapshots/id-forgotpassword--default-args-viewMode-story-chromium-linux.png +0 -0
- package/e2e/forgotPassword.spec.ts-snapshots/id-forgotpassword--default-chromium-linux.png +0 -0
- package/e2e/label.spec.ts +47 -0
- package/e2e/label.spec.ts-snapshots/id-label--big-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-label--huge-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-label--large-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-label--medium-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-label--small-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-under-review-label--big-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-under-review-label--huge-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-under-review-label--large-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-under-review-label--medium-chromium-linux.png +0 -0
- package/e2e/label.spec.ts-snapshots/id-under-review-label--small-chromium-linux.png +0 -0
- package/e2e/login.spec.ts +102 -0
- package/e2e/login.spec.ts-snapshots/id-deprecated-login--default-chromium-linux.png +0 -0
- package/e2e/login.spec.ts-snapshots/id-login--default-chromium-linux.png +0 -0
- package/e2e/login.spec.ts-snapshots/login-with-errors-chromium-linux.png +0 -0
- package/e2e/login.spec.ts-snapshots/login-with-texts-chromium-linux.png +0 -0
- package/e2e/logo.spec.ts +45 -0
- package/e2e/logo.spec.ts-snapshots/id-logo--default-chromium-linux.png +0 -0
- package/e2e/logo.spec.ts-snapshots/id-logo--powered-by-chromium-linux.png +0 -0
- package/e2e/logo.spec.ts-snapshots/id-logo--reverse-chromium-linux.png +0 -0
- package/e2e/navbar.spec.ts +42 -0
- package/e2e/navbar.spec.ts-snapshots/id-navbar--default-chromium-linux.png +0 -0
- package/e2e/navigation.spec.ts +43 -0
- package/e2e/navigation.spec.ts-snapshots/id-navigation--default-chromium-linux.png +0 -0
- package/e2e/paginator.spec.ts +42 -0
- package/e2e/paginator.spec.ts-snapshots/id-paginator--default-chromium-linux.png +0 -0
- package/e2e/progressBar.spec.ts +42 -0
- package/e2e/progressBar.spec.ts-snapshots/id-progressbar--determinate-chromium-linux.png +0 -0
- package/e2e/table.spec.ts +47 -0
- package/e2e/table.spec.ts-snapshots/id-deprecated-table--default-chromium-linux.png +0 -0
- package/e2e/table.spec.ts-snapshots/id-table--default-chromium-darwin.png +0 -0
- package/e2e/table.spec.ts-snapshots/id-table--default-chromium-linux.png +0 -0
- package/e2e/table.spec.ts-snapshots/id-table--expandable-chromium-darwin.png +0 -0
- package/e2e/table.spec.ts-snapshots/id-table--expandable-chromium-linux.png +0 -0
- package/e2e/typography.spec.ts +42 -0
- package/e2e/typography.spec.ts-snapshots/id-foundations-typography--page-args-viewMode-story-chromium-linux.png +0 -0
- package/globalSetup.js +9 -0
- package/jest.config.js +69 -0
- package/ng-package.json +9 -0
- package/package.json +68 -17
- package/projects/client/src/app/app.component.html +1 -0
- package/projects/client/src/app/app.component.scss +8 -0
- package/projects/client/src/app/app.component.spec.ts +27 -0
- package/projects/client/src/app/app.component.ts +37 -0
- package/projects/client/src/app/app.routes.ts +8 -0
- package/projects/client/src/app/components/avatar/avatar.component.html +10 -0
- package/projects/client/src/app/components/avatar/avatar.component.scss +0 -0
- package/projects/client/src/app/components/avatar/avatar.component.ts +25 -0
- package/projects/client/src/assets/.gitkeep +0 -0
- package/projects/client/src/favicon.ico +0 -0
- package/projects/client/src/index.html +13 -0
- package/projects/client/src/main.ts +15 -0
- package/projects/client/src/styles.scss +10 -0
- package/projects/client/tsconfig.app.json +14 -0
- package/projects/client/tsconfig.spec.json +14 -0
- package/projects/tgo-canopy-ui/__mocks__/alert-bar.mock.ts +18 -0
- package/projects/tgo-canopy-ui/__mocks__/button.mock.ts +34 -0
- package/projects/tgo-canopy-ui/__mocks__/field.mock.ts +10 -0
- package/projects/tgo-canopy-ui/__mocks__/icon.mock.ts +14 -0
- package/projects/tgo-canopy-ui/__mocks__/tag.mock.ts +9 -0
- package/projects/tgo-canopy-ui/assets/.gitkeep +0 -0
- package/projects/tgo-canopy-ui/components/accordion/accordion.component.html +35 -0
- package/projects/tgo-canopy-ui/components/accordion/accordion.component.module.ts +26 -0
- package/projects/tgo-canopy-ui/components/accordion/accordion.component.scss +284 -0
- package/projects/tgo-canopy-ui/components/accordion/accordion.component.spec.ts +37 -0
- package/projects/tgo-canopy-ui/components/accordion/accordion.component.stories.ts +176 -0
- package/projects/tgo-canopy-ui/components/accordion/accordion.component.ts +97 -0
- package/projects/tgo-canopy-ui/components/alert-banner/__snapshots__/alert-banner.component.spec.ts.snap +42 -0
- package/projects/tgo-canopy-ui/components/alert-banner/alert-banner.component.html +22 -0
- package/projects/tgo-canopy-ui/components/alert-banner/alert-banner.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/alert-banner/alert-banner.component.scss +39 -0
- package/projects/tgo-canopy-ui/components/alert-banner/alert-banner.component.spec.ts +177 -0
- package/projects/tgo-canopy-ui/components/alert-banner/alert-banner.component.stories.ts +100 -0
- package/projects/tgo-canopy-ui/components/alert-banner/alert-banner.component.ts +130 -0
- package/projects/tgo-canopy-ui/components/autocomplete/autocomplete.component.html +198 -0
- package/projects/tgo-canopy-ui/components/autocomplete/autocomplete.component.module.ts +40 -0
- package/projects/tgo-canopy-ui/components/autocomplete/autocomplete.component.scss +283 -0
- package/projects/tgo-canopy-ui/components/autocomplete/autocomplete.component.spec.ts +238 -0
- package/projects/tgo-canopy-ui/components/autocomplete/autocomplete.component.stories.ts +135 -0
- package/projects/tgo-canopy-ui/components/autocomplete/autocomplete.component.ts +519 -0
- package/projects/tgo-canopy-ui/components/autocomplete/autocomplete.model.ts +22 -0
- package/projects/tgo-canopy-ui/components/autocomplete/includes.pipe.spec.ts +33 -0
- package/projects/tgo-canopy-ui/components/autocomplete/includes.pipe.ts +15 -0
- package/projects/tgo-canopy-ui/components/autocomplete/transform-Item.pipe.ts +21 -0
- package/projects/tgo-canopy-ui/components/autocomplete/transform-item.pipe.spec.ts +24 -0
- package/projects/tgo-canopy-ui/components/avatar/avatar.component.html +23 -0
- package/projects/tgo-canopy-ui/components/avatar/avatar.component.module.ts +14 -0
- package/projects/tgo-canopy-ui/components/avatar/avatar.component.scss +75 -0
- package/projects/tgo-canopy-ui/components/avatar/avatar.component.spec.ts +39 -0
- package/projects/tgo-canopy-ui/components/avatar/avatar.component.stories.ts +111 -0
- package/projects/tgo-canopy-ui/components/avatar/avatar.component.ts +76 -0
- package/projects/tgo-canopy-ui/components/avatar/avatar.model.ts +13 -0
- package/projects/tgo-canopy-ui/components/badge/badge.component.html +10 -0
- package/projects/tgo-canopy-ui/components/badge/badge.component.module.ts +11 -0
- package/projects/tgo-canopy-ui/components/badge/badge.component.scss +147 -0
- package/projects/tgo-canopy-ui/components/badge/badge.component.spec.ts +57 -0
- package/projects/tgo-canopy-ui/components/badge/badge.component.stories.ts +61 -0
- package/projects/tgo-canopy-ui/components/badge/badge.component.ts +99 -0
- package/projects/tgo-canopy-ui/components/badge/badge.model.ts +40 -0
- package/projects/tgo-canopy-ui/components/button/__snapshots__/button.component.spec.ts.snap +64 -0
- package/projects/tgo-canopy-ui/components/button/button.component.html +80 -0
- package/projects/tgo-canopy-ui/components/button/button.component.module.ts +23 -0
- package/projects/tgo-canopy-ui/components/button/button.component.scss +1012 -0
- package/projects/tgo-canopy-ui/components/button/button.component.spec.ts +274 -0
- package/projects/tgo-canopy-ui/components/button/button.component.stories.ts +455 -0
- package/projects/tgo-canopy-ui/components/button/button.component.ts +393 -0
- package/projects/tgo-canopy-ui/components/button/button.model.ts +28 -0
- package/projects/tgo-canopy-ui/components/card/card.component.html +9 -0
- package/projects/tgo-canopy-ui/components/card/card.component.module.ts +11 -0
- package/projects/tgo-canopy-ui/components/card/card.component.scss +91 -0
- package/projects/tgo-canopy-ui/components/card/card.component.spec.ts +76 -0
- package/projects/tgo-canopy-ui/components/card/card.component.stories.ts +88 -0
- package/projects/tgo-canopy-ui/components/card/card.component.ts +72 -0
- package/projects/tgo-canopy-ui/components/checkbox/checkbox.component.html +23 -0
- package/projects/tgo-canopy-ui/components/checkbox/checkbox.component.module.ts +17 -0
- package/projects/tgo-canopy-ui/components/checkbox/checkbox.component.scss +221 -0
- package/projects/tgo-canopy-ui/components/checkbox/checkbox.component.spec.ts +191 -0
- package/projects/tgo-canopy-ui/components/checkbox/checkbox.component.stories.ts +122 -0
- package/projects/tgo-canopy-ui/components/checkbox/checkbox.component.ts +233 -0
- package/projects/tgo-canopy-ui/components/confirm-dialog/confirm-dialog.component.html +16 -0
- package/projects/tgo-canopy-ui/components/confirm-dialog/confirm-dialog.component.module.ts +18 -0
- package/projects/tgo-canopy-ui/components/confirm-dialog/confirm-dialog.component.scss +3 -0
- package/projects/tgo-canopy-ui/components/confirm-dialog/confirm-dialog.component.spec.ts +42 -0
- package/projects/tgo-canopy-ui/components/confirm-dialog/confirm-dialog.component.ts +43 -0
- package/projects/tgo-canopy-ui/components/confirm-dialog/confirm-dialog.model.ts +10 -0
- package/projects/tgo-canopy-ui/components/confirm-dialog/confirm-dialog.stories.ts +37 -0
- package/projects/tgo-canopy-ui/components/datepicker/__snapshots__/datepicker.component.spec.ts.snap +56 -0
- package/projects/tgo-canopy-ui/components/datepicker/datepicker.component.html +98 -0
- package/projects/tgo-canopy-ui/components/datepicker/datepicker.component.module.ts +33 -0
- package/projects/tgo-canopy-ui/components/datepicker/datepicker.component.scss +195 -0
- package/projects/tgo-canopy-ui/components/datepicker/datepicker.component.spec.ts +249 -0
- package/projects/tgo-canopy-ui/components/datepicker/datepicker.component.stories.ts +138 -0
- package/projects/tgo-canopy-ui/components/datepicker/datepicker.component.ts +358 -0
- package/projects/tgo-canopy-ui/components/datepicker/no-date-format.directive.spec.ts +35 -0
- package/projects/tgo-canopy-ui/components/datepicker/no-date-format.directive.ts +43 -0
- package/projects/tgo-canopy-ui/components/deprecated-paginator/deprecated-paginator.component.html +5 -0
- package/projects/tgo-canopy-ui/components/deprecated-paginator/deprecated-paginator.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/deprecated-paginator/deprecated-paginator.component.scss +32 -0
- package/projects/tgo-canopy-ui/components/deprecated-paginator/deprecated-paginator.component.stories.ts +31 -0
- package/projects/tgo-canopy-ui/components/deprecated-paginator/deprecated-paginator.component.ts +54 -0
- package/projects/tgo-canopy-ui/components/deprecated-table/deprecated-table.component.html +113 -0
- package/projects/tgo-canopy-ui/components/deprecated-table/deprecated-table.component.module.ts +25 -0
- package/projects/tgo-canopy-ui/components/deprecated-table/deprecated-table.component.scss +188 -0
- package/projects/tgo-canopy-ui/components/deprecated-table/deprecated-table.component.stories.ts +620 -0
- package/projects/tgo-canopy-ui/components/deprecated-table/deprecated-table.component.ts +160 -0
- package/projects/tgo-canopy-ui/components/deprecated-table/deprecated-table.model.ts +51 -0
- package/projects/tgo-canopy-ui/components/deprecated-table/directives/dynamic-component.directive.ts +41 -0
- package/projects/tgo-canopy-ui/components/dialog/__snapshots__/dialog.component.spec.ts.snap +51 -0
- package/projects/tgo-canopy-ui/components/dialog/dialog.component.html +41 -0
- package/projects/tgo-canopy-ui/components/dialog/dialog.component.module.ts +15 -0
- package/projects/tgo-canopy-ui/components/dialog/dialog.component.scss +133 -0
- package/projects/tgo-canopy-ui/components/dialog/dialog.component.spec.ts +230 -0
- package/projects/tgo-canopy-ui/components/dialog/dialog.component.stories.ts +60 -0
- package/projects/tgo-canopy-ui/components/dialog/dialog.component.ts +184 -0
- package/projects/tgo-canopy-ui/components/dialog/dialog.service.spec.ts +55 -0
- package/projects/tgo-canopy-ui/components/dialog/dialog.service.ts +33 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/__snapshots__/dialog-custom.component.spec.ts.snap +28 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/dialog-custom +0 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/dialog-custom.component.html +38 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/dialog-custom.component.mdx +38 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/dialog-custom.component.module.ts +11 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/dialog-custom.component.scss +0 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/dialog-custom.component.spec.ts +56 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/dialog-custom.component.stories.ts +27 -0
- package/projects/tgo-canopy-ui/components/dialog-custom/dialog-custom.component.ts +45 -0
- package/projects/tgo-canopy-ui/components/dialog-demo/__snapshots__/dialog-demo.component.spec.ts.snap +21 -0
- package/projects/tgo-canopy-ui/components/dialog-demo/dialog-demo.component.html +4 -0
- package/projects/tgo-canopy-ui/components/dialog-demo/dialog-demo.component.mdx +28 -0
- package/projects/tgo-canopy-ui/components/dialog-demo/dialog-demo.component.module.ts +15 -0
- package/projects/tgo-canopy-ui/components/dialog-demo/dialog-demo.component.scss +12 -0
- package/projects/tgo-canopy-ui/components/dialog-demo/dialog-demo.component.spec.ts +58 -0
- package/projects/tgo-canopy-ui/components/dialog-demo/dialog-demo.component.stories.ts +30 -0
- package/projects/tgo-canopy-ui/components/dialog-demo/dialog-demo.component.ts +33 -0
- package/projects/tgo-canopy-ui/components/divider/divider.component.html +13 -0
- package/projects/tgo-canopy-ui/components/divider/divider.component.module.ts +11 -0
- package/projects/tgo-canopy-ui/components/divider/divider.component.scss +57 -0
- package/projects/tgo-canopy-ui/components/divider/divider.component.spec.ts +21 -0
- package/projects/tgo-canopy-ui/components/divider/divider.component.stories.ts +48 -0
- package/projects/tgo-canopy-ui/components/divider/divider.component.ts +54 -0
- package/projects/tgo-canopy-ui/components/dropdown/dropdown.component.html +43 -0
- package/projects/tgo-canopy-ui/components/dropdown/dropdown.component.module.ts +31 -0
- package/projects/tgo-canopy-ui/components/dropdown/dropdown.component.scss +237 -0
- package/projects/tgo-canopy-ui/components/dropdown/dropdown.component.spec.ts +104 -0
- package/projects/tgo-canopy-ui/components/dropdown/dropdown.component.stories.ts +213 -0
- package/projects/tgo-canopy-ui/components/dropdown/dropdown.component.ts +250 -0
- package/projects/tgo-canopy-ui/components/dropdown/dropdown.model.ts +5 -0
- package/projects/tgo-canopy-ui/components/elevation-shadow/elevation-shadow.component.html +3 -0
- package/projects/tgo-canopy-ui/components/elevation-shadow/elevation-shadow.component.module.ts +10 -0
- package/projects/tgo-canopy-ui/components/elevation-shadow/elevation-shadow.component.scss +41 -0
- package/projects/tgo-canopy-ui/components/elevation-shadow/elevation-shadow.component.spec.ts +39 -0
- package/projects/tgo-canopy-ui/components/elevation-shadow/elevation-shadow.component.stories.ts +59 -0
- package/projects/tgo-canopy-ui/components/elevation-shadow/elevation-shadow.component.ts +38 -0
- package/projects/tgo-canopy-ui/components/elevation-shadow/elevation-shadow.constant.ts +9 -0
- package/projects/tgo-canopy-ui/components/empty-state/empty-state.component.html +25 -0
- package/projects/tgo-canopy-ui/components/empty-state/empty-state.component.module.ts +13 -0
- package/projects/tgo-canopy-ui/components/empty-state/empty-state.component.scss +70 -0
- package/projects/tgo-canopy-ui/components/empty-state/empty-state.component.spec.ts +80 -0
- package/projects/tgo-canopy-ui/components/empty-state/empty-state.component.stories.ts +159 -0
- package/projects/tgo-canopy-ui/components/empty-state/empty-state.component.ts +174 -0
- package/projects/tgo-canopy-ui/components/field/__snapshots__/field.component.spec.ts.snap +55 -0
- package/projects/tgo-canopy-ui/components/field/field.component.html +105 -0
- package/projects/tgo-canopy-ui/components/field/field.component.module.ts +32 -0
- package/projects/tgo-canopy-ui/components/field/field.component.scss +492 -0
- package/projects/tgo-canopy-ui/components/field/field.component.spec.ts +268 -0
- package/projects/tgo-canopy-ui/components/field/field.component.stories.ts +212 -0
- package/projects/tgo-canopy-ui/components/field/field.component.ts +430 -0
- package/projects/tgo-canopy-ui/components/field/field.model.ts +11 -0
- package/projects/tgo-canopy-ui/components/file-upload/__snapshots__/file-upload.component.spec.ts.snap +59 -0
- package/projects/tgo-canopy-ui/components/file-upload/file-upload.component.html +94 -0
- package/projects/tgo-canopy-ui/components/file-upload/file-upload.component.module.ts +23 -0
- package/projects/tgo-canopy-ui/components/file-upload/file-upload.component.scss +182 -0
- package/projects/tgo-canopy-ui/components/file-upload/file-upload.component.spec.ts +142 -0
- package/projects/tgo-canopy-ui/components/file-upload/file-upload.component.stories.ts +96 -0
- package/projects/tgo-canopy-ui/components/file-upload/file-upload.component.ts +284 -0
- package/projects/tgo-canopy-ui/components/file-upload-demo/file-upload-demo.component.html +32 -0
- package/projects/tgo-canopy-ui/components/file-upload-demo/file-upload-demo.component.module.ts +14 -0
- package/projects/tgo-canopy-ui/components/file-upload-demo/file-upload-demo.component.scss +23 -0
- package/projects/tgo-canopy-ui/components/file-upload-demo/file-upload-demo.component.spec.ts +111 -0
- package/projects/tgo-canopy-ui/components/file-upload-demo/file-upload-demo.component.stories.ts +28 -0
- package/projects/tgo-canopy-ui/components/file-upload-demo/file-upload-demo.component.ts +74 -0
- package/projects/tgo-canopy-ui/components/form-demo/form-demo-component.stories.ts +41 -0
- package/projects/tgo-canopy-ui/components/form-demo/form-demo.component.html +210 -0
- package/projects/tgo-canopy-ui/components/form-demo/form-demo.component.module.ts +34 -0
- package/projects/tgo-canopy-ui/components/form-demo/form-demo.component.scss +59 -0
- package/projects/tgo-canopy-ui/components/form-demo/form-demo.component.spec.ts +127 -0
- package/projects/tgo-canopy-ui/components/form-demo/form-demo.component.ts +217 -0
- package/projects/tgo-canopy-ui/components/form-demo/form-demo.model.ts +6 -0
- package/projects/tgo-canopy-ui/components/icon/__snapshots__/icon.component.spec.ts.snap +20 -0
- package/projects/tgo-canopy-ui/components/icon/icon.component.html +1 -0
- package/projects/tgo-canopy-ui/components/icon/icon.component.module.ts +13 -0
- package/projects/tgo-canopy-ui/components/icon/icon.component.scss +66 -0
- package/projects/tgo-canopy-ui/components/icon/icon.component.spec.ts +150 -0
- package/projects/tgo-canopy-ui/components/icon/icon.component.stories.ts +68 -0
- package/projects/tgo-canopy-ui/components/icon/icon.component.ts +147 -0
- package/projects/tgo-canopy-ui/components/icon/icon.config.ts +658 -0
- package/projects/tgo-canopy-ui/components/icon/icon.model.ts +8 -0
- package/projects/tgo-canopy-ui/components/icon-label/__snapshots__/icon-label.component.spec.ts.snap +15 -0
- package/projects/tgo-canopy-ui/components/icon-label/icon-label.component.html +2 -0
- package/projects/tgo-canopy-ui/components/icon-label/icon-label.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/icon-label/icon-label.component.scss +8 -0
- package/projects/tgo-canopy-ui/components/icon-label/icon-label.component.spec.ts +64 -0
- package/projects/tgo-canopy-ui/components/icon-label/icon-label.component.stories.ts +48 -0
- package/projects/tgo-canopy-ui/components/icon-label/icon-label.component.ts +53 -0
- package/projects/tgo-canopy-ui/components/icons-showcase/__snapshots__/icons-showcase.component.spec.ts.snap +3487 -0
- package/projects/tgo-canopy-ui/components/icons-showcase/icons-showcase.component.html +17 -0
- package/projects/tgo-canopy-ui/components/icons-showcase/icons-showcase.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/icons-showcase/icons-showcase.component.scss +25 -0
- package/projects/tgo-canopy-ui/components/icons-showcase/icons-showcase.component.spec.ts +40 -0
- package/projects/tgo-canopy-ui/components/icons-showcase/icons-showcase.component.stories.ts +44 -0
- package/projects/tgo-canopy-ui/components/icons-showcase/icons-showcase.component.ts +43 -0
- package/projects/tgo-canopy-ui/components/login/login.component.scss +0 -0
- package/projects/tgo-canopy-ui/components/logo/logo.component.html +14 -0
- package/projects/tgo-canopy-ui/components/logo/logo.component.module.ts +10 -0
- package/projects/tgo-canopy-ui/components/logo/logo.component.scss +13 -0
- package/projects/tgo-canopy-ui/components/logo/logo.component.spec.ts +162 -0
- package/projects/tgo-canopy-ui/components/logo/logo.component.stories.ts +55 -0
- package/projects/tgo-canopy-ui/components/logo/logo.component.ts +148 -0
- package/projects/tgo-canopy-ui/components/logo/logo.model.ts +30 -0
- package/projects/tgo-canopy-ui/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.html +36 -0
- package/projects/tgo-canopy-ui/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.scss +70 -0
- package/projects/tgo-canopy-ui/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.spec.ts +58 -0
- package/projects/tgo-canopy-ui/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.ts +58 -0
- package/projects/tgo-canopy-ui/components/navbar/navbar.component.html +62 -0
- package/projects/tgo-canopy-ui/components/navbar/navbar.component.module.ts +36 -0
- package/projects/tgo-canopy-ui/components/navbar/navbar.component.scss +240 -0
- package/projects/tgo-canopy-ui/components/navbar/navbar.component.spec.ts +136 -0
- package/projects/tgo-canopy-ui/components/navbar/navbar.component.stories.ts +134 -0
- package/projects/tgo-canopy-ui/components/navbar/navbar.component.ts +206 -0
- package/projects/tgo-canopy-ui/components/navbar/navbar.model.ts +12 -0
- package/projects/tgo-canopy-ui/components/overflow-menu/__snapshots__/overflow-menu.component.spec.ts.snap +28 -0
- package/projects/tgo-canopy-ui/components/overflow-menu/overflow-menu.component.html +47 -0
- package/projects/tgo-canopy-ui/components/overflow-menu/overflow-menu.component.module.ts +13 -0
- package/projects/tgo-canopy-ui/components/overflow-menu/overflow-menu.component.scss +98 -0
- package/projects/tgo-canopy-ui/components/overflow-menu/overflow-menu.component.spec.ts +124 -0
- package/projects/tgo-canopy-ui/components/overflow-menu/overflow-menu.component.stories.ts +58 -0
- package/projects/tgo-canopy-ui/components/overflow-menu/overflow-menu.component.ts +88 -0
- package/projects/tgo-canopy-ui/components/overflow-menu/overflow-menu.model.ts +11 -0
- package/projects/tgo-canopy-ui/components/page-header/page-header.component.html +35 -0
- package/projects/tgo-canopy-ui/components/page-header/page-header.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/page-header/page-header.component.scss +61 -0
- package/projects/tgo-canopy-ui/components/page-header/page-header.component.spec.ts +34 -0
- package/projects/tgo-canopy-ui/components/page-header/page-header.component.stories.ts +56 -0
- package/projects/tgo-canopy-ui/components/page-header/page-header.component.ts +64 -0
- package/projects/tgo-canopy-ui/components/paginator/paginator.component.html +10 -0
- package/projects/tgo-canopy-ui/components/paginator/paginator.component.module.ts +11 -0
- package/projects/tgo-canopy-ui/components/paginator/paginator.component.scss +159 -0
- package/projects/tgo-canopy-ui/components/paginator/paginator.component.spec.ts +29 -0
- package/projects/tgo-canopy-ui/components/paginator/paginator.component.stories.ts +36 -0
- package/projects/tgo-canopy-ui/components/paginator/paginator.component.ts +67 -0
- package/projects/tgo-canopy-ui/components/password-criteria/password.component.html +31 -0
- package/projects/tgo-canopy-ui/components/password-criteria/password.component.module.ts +22 -0
- package/projects/tgo-canopy-ui/components/password-criteria/password.component.scss +56 -0
- package/projects/tgo-canopy-ui/components/password-criteria/password.component.spec.ts +45 -0
- package/projects/tgo-canopy-ui/components/password-criteria/password.component.stories.ts +49 -0
- package/projects/tgo-canopy-ui/components/password-criteria/password.component.ts +106 -0
- package/projects/tgo-canopy-ui/components/password-strength/password-strength.component.html +19 -0
- package/projects/tgo-canopy-ui/components/password-strength/password-strength.component.module.ts +13 -0
- package/projects/tgo-canopy-ui/components/password-strength/password-strength.component.scss +54 -0
- package/projects/tgo-canopy-ui/components/password-strength/password-strength.component.spec.ts +40 -0
- package/projects/tgo-canopy-ui/components/password-strength/password-strength.component.stories.ts +50 -0
- package/projects/tgo-canopy-ui/components/password-strength/password-strength.component.ts +98 -0
- package/projects/tgo-canopy-ui/components/password-strength-demo/password-strength-demo.component.html +2 -0
- package/projects/tgo-canopy-ui/components/password-strength-demo/password-strength-demo.component.scss +0 -0
- package/projects/tgo-canopy-ui/components/password-strength-demo/password-strength-demo.component.spec.ts +28 -0
- package/projects/tgo-canopy-ui/components/password-strength-demo/password-strength-demo.component.stories.ts +40 -0
- package/projects/tgo-canopy-ui/components/password-strength-demo/password-strength-demo.component.ts +20 -0
- package/projects/tgo-canopy-ui/components/phone-input/join-string.pipe.spec.ts +9 -0
- package/projects/tgo-canopy-ui/components/phone-input/join-strings.pipe.ts +8 -0
- package/projects/tgo-canopy-ui/components/phone-input/phone-input.component.html +64 -0
- package/projects/tgo-canopy-ui/components/phone-input/phone-input.component.module.ts +35 -0
- package/projects/tgo-canopy-ui/components/phone-input/phone-input.component.scss +133 -0
- package/projects/tgo-canopy-ui/components/phone-input/phone-input.component.spec.ts +212 -0
- package/projects/tgo-canopy-ui/components/phone-input/phone-input.component.stories.ts +89 -0
- package/projects/tgo-canopy-ui/components/phone-input/phone-input.component.ts +427 -0
- package/projects/tgo-canopy-ui/components/phone-input/phone-input.model.ts +8 -0
- package/projects/tgo-canopy-ui/components/progress-bar/progress-bar.component.html +9 -0
- package/projects/tgo-canopy-ui/components/progress-bar/progress-bar.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/progress-bar/progress-bar.component.scss +152 -0
- package/projects/tgo-canopy-ui/components/progress-bar/progress-bar.component.spec.ts +76 -0
- package/projects/tgo-canopy-ui/components/progress-bar/progress-bar.component.stories.ts +48 -0
- package/projects/tgo-canopy-ui/components/progress-bar/progress-bar.component.ts +82 -0
- package/projects/tgo-canopy-ui/components/radial-progress/radial-progress.component.html +26 -0
- package/projects/tgo-canopy-ui/components/radial-progress/radial-progress.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/radial-progress/radial-progress.component.scss +41 -0
- package/projects/tgo-canopy-ui/components/radial-progress/radial-progress.component.spec.ts +102 -0
- package/projects/tgo-canopy-ui/components/radial-progress/radial-progress.component.stories.ts +69 -0
- package/projects/tgo-canopy-ui/components/radial-progress/radial-progress.component.ts +114 -0
- package/projects/tgo-canopy-ui/components/radial-progress/radial-progress.model.ts +13 -0
- package/projects/tgo-canopy-ui/components/radio-button/radio-button.component.html +16 -0
- package/projects/tgo-canopy-ui/components/radio-button/radio-button.component.module.ts +13 -0
- package/projects/tgo-canopy-ui/components/radio-button/radio-button.component.scss +175 -0
- package/projects/tgo-canopy-ui/components/radio-button/radio-button.component.spec.ts +141 -0
- package/projects/tgo-canopy-ui/components/radio-button/radio-button.component.stories.ts +126 -0
- package/projects/tgo-canopy-ui/components/radio-button/radio-button.component.ts +190 -0
- package/projects/tgo-canopy-ui/components/radio-button/radio-button.model.ts +4 -0
- package/projects/tgo-canopy-ui/components/rating/__snapshots__/rating.component.spec.ts.snap +47 -0
- package/projects/tgo-canopy-ui/components/rating/half-star.pipe.spec.ts +33 -0
- package/projects/tgo-canopy-ui/components/rating/half-star.pipe.ts +17 -0
- package/projects/tgo-canopy-ui/components/rating/rating.component.html +31 -0
- package/projects/tgo-canopy-ui/components/rating/rating.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/rating/rating.component.scss +139 -0
- package/projects/tgo-canopy-ui/components/rating/rating.component.spec.ts +142 -0
- package/projects/tgo-canopy-ui/components/rating/rating.component.stories.ts +87 -0
- package/projects/tgo-canopy-ui/components/rating/rating.component.ts +97 -0
- package/projects/tgo-canopy-ui/components/scale/__snapshots__/scale.component.spec.ts.snap +42 -0
- package/projects/tgo-canopy-ui/components/scale/scale.component.html +7 -0
- package/projects/tgo-canopy-ui/components/scale/scale.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/scale/scale.component.scss +71 -0
- package/projects/tgo-canopy-ui/components/scale/scale.component.spec.ts +125 -0
- package/projects/tgo-canopy-ui/components/scale/scale.component.stories.ts +60 -0
- package/projects/tgo-canopy-ui/components/scale/scale.component.ts +57 -0
- package/projects/tgo-canopy-ui/components/segmented-bar/segmented-bar.component.html +16 -0
- package/projects/tgo-canopy-ui/components/segmented-bar/segmented-bar.component.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/segmented-bar/segmented-bar.component.scss +86 -0
- package/projects/tgo-canopy-ui/components/segmented-bar/segmented-bar.component.spec.ts +69 -0
- package/projects/tgo-canopy-ui/components/segmented-bar/segmented-bar.component.stories.ts +98 -0
- package/projects/tgo-canopy-ui/components/segmented-bar/segmented-bar.component.ts +69 -0
- package/projects/tgo-canopy-ui/components/segmented-bar/segmented-bar.model.ts +8 -0
- package/projects/tgo-canopy-ui/components/segmented-button/segmented-button.component.html +11 -0
- package/projects/tgo-canopy-ui/components/segmented-button/segmented-button.component.module.ts +22 -0
- package/projects/tgo-canopy-ui/components/segmented-button/segmented-button.component.scss +44 -0
- package/projects/tgo-canopy-ui/components/segmented-button/segmented-button.component.spec.ts +50 -0
- package/projects/tgo-canopy-ui/components/segmented-button/segmented-button.component.stories.ts +48 -0
- package/projects/tgo-canopy-ui/components/segmented-button/segmented-button.component.ts +54 -0
- package/projects/tgo-canopy-ui/components/segmented-button/segmented-button.model.ts +7 -0
- package/projects/tgo-canopy-ui/components/side-sheet/side-sheet.component.html +37 -0
- package/projects/tgo-canopy-ui/components/side-sheet/side-sheet.component.module.ts +24 -0
- package/projects/tgo-canopy-ui/components/side-sheet/side-sheet.component.scss +97 -0
- package/projects/tgo-canopy-ui/components/side-sheet/side-sheet.component.spec.ts +176 -0
- package/projects/tgo-canopy-ui/components/side-sheet/side-sheet.component.ts +110 -0
- package/projects/tgo-canopy-ui/components/side-sheet/side-sheet.model.ts +12 -0
- package/projects/tgo-canopy-ui/components/side-sheet/side-sheet.service.spec.ts +88 -0
- package/projects/tgo-canopy-ui/components/side-sheet/side-sheet.service.ts +28 -0
- package/projects/tgo-canopy-ui/components/side-sheet-demo/side-sheet-demo.component.html +5 -0
- package/projects/tgo-canopy-ui/components/side-sheet-demo/side-sheet-demo.component.scss +14 -0
- package/projects/tgo-canopy-ui/components/side-sheet-demo/side-sheet-demo.component.spec.ts +26 -0
- package/projects/tgo-canopy-ui/components/side-sheet-demo/side-sheet-demo.component.stories.ts +54 -0
- package/projects/tgo-canopy-ui/components/side-sheet-demo/side-sheet-demo.component.ts +98 -0
- package/projects/tgo-canopy-ui/components/side-sheet-demo/side-sheet-demo.module.ts +12 -0
- package/projects/tgo-canopy-ui/components/skeleton/skeleton.component.html +5 -0
- package/projects/tgo-canopy-ui/components/skeleton/skeleton.component.scss +0 -0
- package/projects/tgo-canopy-ui/components/skeleton/skeleton.component.spec.ts +75 -0
- package/projects/tgo-canopy-ui/components/skeleton/skeleton.component.stories.ts +47 -0
- package/projects/tgo-canopy-ui/components/skeleton/skeleton.component.ts +66 -0
- package/projects/tgo-canopy-ui/components/skeleton/skeleton.model.ts +3 -0
- package/projects/tgo-canopy-ui/components/slider/slider.component.html +75 -0
- package/projects/tgo-canopy-ui/components/slider/slider.component.module.ts +24 -0
- package/projects/tgo-canopy-ui/components/slider/slider.component.scss +223 -0
- package/projects/tgo-canopy-ui/components/slider/slider.component.spec.ts +103 -0
- package/projects/tgo-canopy-ui/components/slider/slider.component.stories.ts +87 -0
- package/projects/tgo-canopy-ui/components/slider/slider.component.ts +185 -0
- package/projects/tgo-canopy-ui/components/slider/slider.model.ts +4 -0
- package/projects/tgo-canopy-ui/components/snackbar/__snapshots__/snackbar.component.spec.ts.snap +44 -0
- package/projects/tgo-canopy-ui/components/snackbar/snackbar.component.html +33 -0
- package/projects/tgo-canopy-ui/components/snackbar/snackbar.component.module.ts +16 -0
- package/projects/tgo-canopy-ui/components/snackbar/snackbar.component.scss +45 -0
- package/projects/tgo-canopy-ui/components/snackbar/snackbar.component.spec.ts +214 -0
- package/projects/tgo-canopy-ui/components/snackbar/snackbar.component.stories.ts +159 -0
- package/projects/tgo-canopy-ui/components/snackbar/snackbar.component.ts +196 -0
- package/projects/tgo-canopy-ui/components/snackbar/snackbar.service.spec.ts +52 -0
- package/projects/tgo-canopy-ui/components/snackbar/snackbar.service.ts +37 -0
- package/projects/tgo-canopy-ui/components/spinner/spinner.component.html +6 -0
- package/projects/tgo-canopy-ui/components/spinner/spinner.component.scss +75 -0
- package/projects/tgo-canopy-ui/components/spinner/spinner.component.spec.ts +82 -0
- package/projects/tgo-canopy-ui/components/spinner/spinner.component.stories.ts +46 -0
- package/projects/tgo-canopy-ui/components/spinner/spinner.component.ts +59 -0
- package/projects/tgo-canopy-ui/components/spinner/spinner.module.ts +10 -0
- package/projects/tgo-canopy-ui/components/step/step.component.html +100 -0
- package/projects/tgo-canopy-ui/components/step/step.component.module.ts +11 -0
- package/projects/tgo-canopy-ui/components/step/step.component.scss +315 -0
- package/projects/tgo-canopy-ui/components/step/step.component.spec.ts +61 -0
- package/projects/tgo-canopy-ui/components/step/step.component.ts +134 -0
- package/projects/tgo-canopy-ui/components/stepper/stepper.component.html +79 -0
- package/projects/tgo-canopy-ui/components/stepper/stepper.component.module.ts +25 -0
- package/projects/tgo-canopy-ui/components/stepper/stepper.component.scss +144 -0
- package/projects/tgo-canopy-ui/components/stepper/stepper.component.spec.ts +64 -0
- package/projects/tgo-canopy-ui/components/stepper/stepper.component.stories.ts +84 -0
- package/projects/tgo-canopy-ui/components/stepper/stepper.component.ts +118 -0
- package/projects/tgo-canopy-ui/components/stepper/stepper.model.ts +10 -0
- package/projects/tgo-canopy-ui/components/table/sentence-case.pipe.ts +13 -0
- package/projects/tgo-canopy-ui/components/table/sentence-case.spec.ts +53 -0
- package/projects/tgo-canopy-ui/components/table/table.component.html +290 -0
- package/projects/tgo-canopy-ui/components/table/table.component.module.ts +33 -0
- package/projects/tgo-canopy-ui/components/table/table.component.scss +201 -0
- package/projects/tgo-canopy-ui/components/table/table.component.spec.ts +187 -0
- package/projects/tgo-canopy-ui/components/table/table.component.stories.ts +425 -0
- package/projects/tgo-canopy-ui/components/table/table.component.ts +235 -0
- package/projects/tgo-canopy-ui/components/table/table.model.ts +103 -0
- package/projects/tgo-canopy-ui/components/tabs/tab.directive.ts +33 -0
- package/projects/tgo-canopy-ui/components/tabs/tabs.component.html +19 -0
- package/projects/tgo-canopy-ui/components/tabs/tabs.component.module.ts +22 -0
- package/projects/tgo-canopy-ui/components/tabs/tabs.component.scss +234 -0
- package/projects/tgo-canopy-ui/components/tabs/tabs.component.spec.ts +85 -0
- package/projects/tgo-canopy-ui/components/tabs/tabs.component.stories.ts +73 -0
- package/projects/tgo-canopy-ui/components/tabs/tabs.component.ts +79 -0
- package/projects/tgo-canopy-ui/components/tabs/tabs.directive.spec.ts +90 -0
- package/projects/tgo-canopy-ui/components/tabs/tabs.model.ts +11 -0
- package/projects/tgo-canopy-ui/components/tag/__snapshots__/tag.component.spec.ts.snap +42 -0
- package/projects/tgo-canopy-ui/components/tag/tag.component.html +26 -0
- package/projects/tgo-canopy-ui/components/tag/tag.component.module.ts +15 -0
- package/projects/tgo-canopy-ui/components/tag/tag.component.scss +161 -0
- package/projects/tgo-canopy-ui/components/tag/tag.component.spec.ts +193 -0
- package/projects/tgo-canopy-ui/components/tag/tag.component.stories.ts +125 -0
- package/projects/tgo-canopy-ui/components/tag/tag.component.ts +213 -0
- package/projects/tgo-canopy-ui/components/toggle/toggle.component.html +24 -0
- package/projects/tgo-canopy-ui/components/toggle/toggle.component.module.ts +14 -0
- package/projects/tgo-canopy-ui/components/toggle/toggle.component.scss +202 -0
- package/projects/tgo-canopy-ui/components/toggle/toggle.component.spec.ts +197 -0
- package/projects/tgo-canopy-ui/components/toggle/toggle.component.stories.ts +97 -0
- package/projects/tgo-canopy-ui/components/toggle/toggle.component.ts +179 -0
- package/projects/tgo-canopy-ui/components/tooltip/tooltip.component.html +9 -0
- package/projects/tgo-canopy-ui/components/tooltip/tooltip.component.module.ts +10 -0
- package/projects/tgo-canopy-ui/components/tooltip/tooltip.component.spec.ts +53 -0
- package/projects/tgo-canopy-ui/components/tooltip/tooltip.component.stories.ts +235 -0
- package/projects/tgo-canopy-ui/components/tooltip/tooltip.component.ts +81 -0
- package/projects/tgo-canopy-ui/components/tooltip/tooltip.model.ts +6 -0
- package/projects/tgo-canopy-ui/components/validation-error/validation-error.component.html +29 -0
- package/projects/tgo-canopy-ui/components/validation-error/validation-error.component.scss +0 -0
- package/projects/tgo-canopy-ui/components/validation-error/validation-error.component.spec.ts +75 -0
- package/projects/tgo-canopy-ui/components/validation-error/validation-error.component.ts +53 -0
- package/projects/tgo-canopy-ui/components/validation-error/validation-error.module.ts +12 -0
- package/projects/tgo-canopy-ui/directives/digits-only.directive.spec.ts +121 -0
- package/projects/tgo-canopy-ui/directives/digits-only.directive.ts +42 -0
- package/projects/tgo-canopy-ui/directives/drag-drop.directive.spec.ts +84 -0
- package/projects/tgo-canopy-ui/directives/drag-drop.directive.ts +39 -0
- package/projects/tgo-canopy-ui/directives/ellipse-text.directive.spec.ts +57 -0
- package/projects/tgo-canopy-ui/directives/ellipse-text.directive.ts +27 -0
- package/projects/tgo-canopy-ui/directives/select-text.directive.spec.ts +54 -0
- package/projects/tgo-canopy-ui/directives/select-text.directive.ts +37 -0
- package/projects/tgo-canopy-ui/directives/step-line-width.directive.spec.ts +59 -0
- package/projects/tgo-canopy-ui/directives/step-line-width.directive.ts +31 -0
- package/projects/tgo-canopy-ui/foundations/colors/colors.component.html +4 -0
- package/projects/tgo-canopy-ui/foundations/colors/colors.component.module.ts +10 -0
- package/projects/tgo-canopy-ui/foundations/colors/colors.component.scss +318 -0
- package/projects/tgo-canopy-ui/foundations/colors/colors.component.spec.ts +47 -0
- package/projects/tgo-canopy-ui/foundations/colors/colors.component.ts +22 -0
- package/projects/tgo-canopy-ui/foundations/colors/colors.stories.ts +426 -0
- package/projects/tgo-canopy-ui/foundations/typography/typography.stories.ts +195 -0
- package/projects/tgo-canopy-ui/mocked-assets/images/some_progress.svg +4 -0
- package/projects/tgo-canopy-ui/models/colors.model.ts +88 -0
- package/projects/tgo-canopy-ui/models/screen-breakpoints.model.ts +4 -0
- package/projects/tgo-canopy-ui/pipes/data-property-getter.spec.ts +42 -0
- package/projects/tgo-canopy-ui/pipes/data-property-getter.ts +31 -0
- package/projects/tgo-canopy-ui/pipes/has-validation-error.pipe.spec.ts +32 -0
- package/projects/tgo-canopy-ui/pipes/has-validation-error.pipe.ts +20 -0
- package/projects/tgo-canopy-ui/pipes/name-initials.pipe.spec.ts +44 -0
- package/projects/tgo-canopy-ui/pipes/name-initials.pipe.ts +18 -0
- package/projects/tgo-canopy-ui/pipes/ui-translate.pipe.spec.ts +45 -0
- package/projects/tgo-canopy-ui/pipes/ui-translate.pipe.ts +71 -0
- package/projects/tgo-canopy-ui/polyfills.ts +51 -0
- package/projects/tgo-canopy-ui/providers/is-mobile.ts +11 -0
- package/projects/tgo-canopy-ui/public-api.ts +184 -0
- package/projects/tgo-canopy-ui/services/custom-event-manager.service.spec.ts +57 -0
- package/projects/tgo-canopy-ui/services/custom-event-manager.service.ts +28 -0
- package/projects/tgo-canopy-ui/test-utils/mock-file.spec.ts +44 -0
- package/projects/tgo-canopy-ui/test-utils/mock-file.ts +24 -0
- package/projects/tgo-canopy-ui/test.ts +20 -0
- package/projects/tgo-canopy-ui/theme/_variables.scss +1 -0
- package/projects/tgo-canopy-ui/utils/alert-bars.utils.spec.ts +47 -0
- package/projects/tgo-canopy-ui/utils/alert-bars.utils.ts +36 -0
- package/projects/tgo-canopy-ui/utils/autocomplete-utils.spec.ts +68 -0
- package/projects/tgo-canopy-ui/utils/autocomplete-utils.ts +66 -0
- package/projects/tgo-canopy-ui/utils/color-contrast.spec.ts +46 -0
- package/projects/tgo-canopy-ui/utils/color-contrast.ts +135 -0
- package/projects/tgo-canopy-ui/utils/localization/language.model.ts +14 -0
- package/projects/tgo-canopy-ui/utils/localization/language.service.mocks.ts +6 -0
- package/projects/tgo-canopy-ui/utils/localization/language.service.spec.ts +25 -0
- package/projects/tgo-canopy-ui/utils/localization/language.service.ts +32 -0
- package/projects/tgo-canopy-ui/utils/table.utils.spec.ts +47 -0
- package/projects/tgo-canopy-ui/utils/table.utils.ts +22 -0
- package/projects/tgo-canopy-ui/utils/transform-theme.ts +9 -0
- package/projects/tgo-canopy-ui/utils/transform.theme.spec.ts +16 -0
- package/projects/tgo-canopy-ui/utils/validators.utils.spec.ts +16 -0
- package/projects/tgo-canopy-ui/utils/validators.utils.ts +9 -0
- package/setupJest.ts +1 -0
- package/transloco.config.js +5 -0
- package/tsconfig.json +46 -0
- package/tsconfig.spec.json +17 -0
- package/tsconfig.ui.json +24 -0
- package/tsconfig.ui.prod.json +10 -0
- package/visual-tests/component-page-objects/avatar-component.ts +30 -0
- package/visual-tests/component-page-objects/base-component.ts +44 -0
- package/visual-tests/component-tests/avatar.spec.ts +32 -0
- package/visual-tests/component-tests/avatar.spec.ts-snapshots/Avatar-Component-Visual-Tests-should-allow-edit-for-the-avatar-1-chromium-linux.png +0 -0
- package/visual-tests/component-tests/avatar.spec.ts-snapshots/Avatar-Component-Visual-Tests-should-display-the-avatar-correctly-1-chromium-linux.png +0 -0
- package/visual-tests/playwright.config.ts +45 -0
- package/visual-tests/runConfig.ts +1 -0
- package/components/accordion/accordion.component.d.ts +0 -76
- package/components/accordion/accordion.component.module.d.ts +0 -12
- package/components/alert-banner/alert-banner.component.d.ts +0 -89
- package/components/alert-banner/alert-banner.component.module.d.ts +0 -10
- package/components/autocomplete/autocomplete.component.d.ts +0 -208
- package/components/autocomplete/autocomplete.component.module.d.ts +0 -21
- package/components/autocomplete/autocomplete.model.d.ts +0 -18
- package/components/autocomplete/includes.pipe.d.ts +0 -12
- package/components/autocomplete/transform-Item.pipe.d.ts +0 -11
- package/components/avatar/avatar.component.d.ts +0 -58
- package/components/avatar/avatar.component.module.d.ts +0 -12
- package/components/avatar/avatar.model.d.ts +0 -7
- package/components/badge/badge.component.d.ts +0 -58
- package/components/badge/badge.component.module.d.ts +0 -9
- package/components/badge/badge.model.d.ts +0 -27
- package/components/button/button.component.d.ts +0 -190
- package/components/button/button.component.module.d.ts +0 -13
- package/components/button/button.model.d.ts +0 -14
- package/components/card/card.component.d.ts +0 -46
- package/components/card/card.component.module.d.ts +0 -9
- package/components/checkbox/checkbox.component.d.ts +0 -147
- package/components/checkbox/checkbox.component.module.d.ts +0 -15
- package/components/confirm-dialog/confirm-dialog.component.d.ts +0 -25
- package/components/confirm-dialog/confirm-dialog.component.module.d.ts +0 -12
- package/components/confirm-dialog/confirm-dialog.model.d.ts +0 -9
- package/components/datepicker/datepicker.component.d.ts +0 -205
- package/components/datepicker/datepicker.component.module.d.ts +0 -18
- package/components/datepicker/no-date-format.directive.d.ts +0 -11
- package/components/deprecated-paginator/deprecated-paginator.component.d.ts +0 -38
- package/components/deprecated-paginator/deprecated-paginator.component.module.d.ts +0 -9
- package/components/deprecated-table/deprecated-table.component.d.ts +0 -91
- package/components/deprecated-table/deprecated-table.component.module.d.ts +0 -14
- package/components/deprecated-table/deprecated-table.model.d.ts +0 -45
- package/components/deprecated-table/directives/dynamic-component.directive.d.ts +0 -13
- package/components/dialog/dialog.component.d.ts +0 -108
- package/components/dialog/dialog.component.module.d.ts +0 -11
- package/components/dialog/dialog.service.d.ts +0 -13
- package/components/divider/divider.component.d.ts +0 -39
- package/components/divider/divider.component.module.d.ts +0 -9
- package/components/dropdown/dropdown.component.d.ts +0 -157
- package/components/dropdown/dropdown.component.module.d.ts +0 -17
- package/components/dropdown/dropdown.model.d.ts +0 -5
- package/components/elevation-shadow/elevation-shadow.component.d.ts +0 -26
- package/components/elevation-shadow/elevation-shadow.component.module.d.ts +0 -8
- package/components/elevation-shadow/elevation-shadow.constant.d.ts +0 -8
- package/components/empty-state/empty-state.component.d.ts +0 -124
- package/components/empty-state/empty-state.component.module.d.ts +0 -11
- package/components/field/field.component.d.ts +0 -238
- package/components/field/field.component.module.d.ts +0 -18
- package/components/field/field.model.d.ts +0 -1
- package/components/file-upload/file-upload.component.d.ts +0 -124
- package/components/file-upload/file-upload.component.module.d.ts +0 -14
- package/components/icon/icon.component.d.ts +0 -65
- package/components/icon/icon.component.module.d.ts +0 -10
- package/components/icon/icon.config.d.ts +0 -10
- package/components/icon/icon.model.d.ts +0 -7
- package/components/icon-label/icon-label.component.d.ts +0 -39
- package/components/icon-label/icon-label.component.module.d.ts +0 -9
- package/components/logo/logo.component.d.ts +0 -57
- package/components/logo/logo.component.module.d.ts +0 -8
- package/components/logo/logo.model.d.ts +0 -29
- package/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.d.ts +0 -22
- package/components/navbar/navbar.component.d.ts +0 -113
- package/components/navbar/navbar.component.module.d.ts +0 -20
- package/components/navbar/navbar.model.d.ts +0 -10
- package/components/overflow-menu/overflow-menu.component.d.ts +0 -55
- package/components/overflow-menu/overflow-menu.component.module.d.ts +0 -11
- package/components/overflow-menu/overflow-menu.model.d.ts +0 -10
- package/components/page-header/page-header.component.d.ts +0 -45
- package/components/page-header/page-header.component.module.d.ts +0 -10
- package/components/paginator/paginator.component.d.ts +0 -49
- package/components/paginator/paginator.component.module.d.ts +0 -9
- package/components/password-criteria/password.component.d.ts +0 -49
- package/components/password-criteria/password.component.module.d.ts +0 -13
- package/components/password-strength/password-strength.component.d.ts +0 -52
- package/components/password-strength/password-strength.component.module.d.ts +0 -11
- package/components/phone-input/join-strings.pipe.d.ts +0 -7
- package/components/phone-input/phone-input.component.d.ts +0 -154
- package/components/phone-input/phone-input.component.module.d.ts +0 -20
- package/components/phone-input/phone-input.model.d.ts +0 -8
- package/components/progress-bar/progress-bar.component.d.ts +0 -52
- package/components/progress-bar/progress-bar.component.module.d.ts +0 -9
- package/components/radial-progress/radial-progress.component.d.ts +0 -68
- package/components/radial-progress/radial-progress.component.module.d.ts +0 -10
- package/components/radial-progress/radial-progress.model.d.ts +0 -10
- package/components/radio-button/radio-button.component.d.ts +0 -116
- package/components/radio-button/radio-button.component.module.d.ts +0 -11
- package/components/radio-button/radio-button.model.d.ts +0 -4
- package/components/rating/half-star.pipe.d.ts +0 -14
- package/components/rating/rating.component.d.ts +0 -64
- package/components/rating/rating.component.module.d.ts +0 -10
- package/components/scale/scale.component.d.ts +0 -34
- package/components/scale/scale.component.module.d.ts +0 -8
- package/components/segmented-bar/segmented-bar.component.d.ts +0 -54
- package/components/segmented-bar/segmented-bar.component.module.d.ts +0 -10
- package/components/segmented-bar/segmented-bar.model.d.ts +0 -7
- package/components/segmented-button/segmented-button.component.d.ts +0 -23
- package/components/segmented-button/segmented-button.component.module.d.ts +0 -10
- package/components/segmented-button/segmented-button.model.d.ts +0 -6
- package/components/side-sheet/side-sheet.component.d.ts +0 -49
- package/components/side-sheet/side-sheet.component.module.d.ts +0 -14
- package/components/side-sheet/side-sheet.model.d.ts +0 -10
- package/components/side-sheet/side-sheet.service.d.ts +0 -14
- package/components/skeleton/skeleton.component.d.ts +0 -26
- package/components/skeleton/skeleton.model.d.ts +0 -2
- package/components/slider/slider.component.d.ts +0 -103
- package/components/slider/slider.component.module.d.ts +0 -14
- package/components/slider/slider.model.d.ts +0 -4
- package/components/snackbar/snackbar.component.d.ts +0 -111
- package/components/snackbar/snackbar.component.module.d.ts +0 -12
- package/components/snackbar/snackbar.service.d.ts +0 -12
- package/components/spinner/spinner.component.d.ts +0 -38
- package/components/spinner/spinner.module.d.ts +0 -8
- package/components/step/step.component.d.ts +0 -104
- package/components/step/step.component.module.d.ts +0 -9
- package/components/stepper/stepper.component.d.ts +0 -76
- package/components/stepper/stepper.component.module.d.ts +0 -15
- package/components/stepper/stepper.model.d.ts +0 -9
- package/components/table/sentence-case.pipe.d.ts +0 -7
- package/components/table/table.component.d.ts +0 -86
- package/components/table/table.component.module.d.ts +0 -19
- package/components/table/table.model.d.ts +0 -87
- package/components/tabs/tab.directive.d.ts +0 -18
- package/components/tabs/tabs.component.d.ts +0 -59
- package/components/tabs/tabs.component.module.d.ts +0 -11
- package/components/tabs/tabs.model.d.ts +0 -9
- package/components/tag/tag.component.d.ts +0 -129
- package/components/tag/tag.component.module.d.ts +0 -12
- package/components/toggle/toggle.component.d.ts +0 -99
- package/components/toggle/toggle.component.module.d.ts +0 -12
- package/components/tooltip/tooltip.component.d.ts +0 -44
- package/components/tooltip/tooltip.component.module.d.ts +0 -8
- package/components/tooltip/tooltip.model.d.ts +0 -6
- package/components/validation-error/validation-error.component.d.ts +0 -27
- package/components/validation-error/validation-error.module.d.ts +0 -10
- package/directives/digits-only.directive.d.ts +0 -15
- package/directives/drag-drop.directive.d.ts +0 -12
- package/directives/ellipse-text.directive.d.ts +0 -16
- package/directives/select-text.directive.d.ts +0 -19
- package/directives/step-line-width.directive.d.ts +0 -15
- package/esm2022/assets/i18n/da-dk.json +0 -77
- package/esm2022/assets/i18n/de.json +0 -77
- package/esm2022/assets/i18n/en.json +0 -100
- package/esm2022/assets/i18n/es.json +0 -77
- package/esm2022/assets/i18n/fr.json +0 -77
- package/esm2022/assets/i18n/it-it.json +0 -77
- package/esm2022/assets/i18n/ja-jp.json +0 -77
- package/esm2022/assets/i18n/nb-no.json +0 -77
- package/esm2022/assets/i18n/nl.json +0 -77
- package/esm2022/assets/i18n/pl-pl.json +0 -77
- package/esm2022/assets/i18n/pt-br.json +0 -77
- package/esm2022/assets/i18n/sv-se.json +0 -77
- package/esm2022/components/accordion/accordion.component.mjs +0 -105
- package/esm2022/components/accordion/accordion.component.module.mjs +0 -40
- package/esm2022/components/accordion/accordion.model.mjs +0 -2
- package/esm2022/components/alert-banner/alert-banner.component.mjs +0 -127
- package/esm2022/components/alert-banner/alert-banner.component.module.mjs +0 -20
- package/esm2022/components/alert-banner/alert-banner.model.mjs +0 -2
- package/esm2022/components/autocomplete/autocomplete.component.mjs +0 -496
- package/esm2022/components/autocomplete/autocomplete.component.module.mjs +0 -62
- package/esm2022/components/autocomplete/autocomplete.model.mjs +0 -22
- package/esm2022/components/autocomplete/includes.pipe.mjs +0 -21
- package/esm2022/components/autocomplete/transform-Item.pipe.mjs +0 -29
- package/esm2022/components/avatar/avatar.component.mjs +0 -91
- package/esm2022/components/avatar/avatar.component.module.mjs +0 -22
- package/esm2022/components/avatar/avatar.model.mjs +0 -12
- package/esm2022/components/badge/badge.component.mjs +0 -102
- package/esm2022/components/badge/badge.component.module.mjs +0 -19
- package/esm2022/components/badge/badge.model.mjs +0 -28
- package/esm2022/components/button/button.component.mjs +0 -352
- package/esm2022/components/button/button.component.module.mjs +0 -41
- package/esm2022/components/button/button.model.mjs +0 -2
- package/esm2022/components/card/card.component.mjs +0 -75
- package/esm2022/components/card/card.component.module.mjs +0 -19
- package/esm2022/components/card/card.model.mjs +0 -2
- package/esm2022/components/checkbox/checkbox.component.mjs +0 -228
- package/esm2022/components/checkbox/checkbox.component.module.mjs +0 -25
- package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +0 -48
- package/esm2022/components/confirm-dialog/confirm-dialog.component.module.mjs +0 -29
- package/esm2022/components/confirm-dialog/confirm-dialog.model.mjs +0 -2
- package/esm2022/components/datepicker/datepicker.component.mjs +0 -302
- package/esm2022/components/datepicker/datepicker.component.module.mjs +0 -60
- package/esm2022/components/datepicker/no-date-format.directive.mjs +0 -56
- package/esm2022/components/deprecated-paginator/deprecated-paginator.component.mjs +0 -55
- package/esm2022/components/deprecated-paginator/deprecated-paginator.component.module.mjs +0 -20
- package/esm2022/components/deprecated-table/deprecated-table.component.mjs +0 -158
- package/esm2022/components/deprecated-table/deprecated-table.component.module.mjs +0 -43
- package/esm2022/components/deprecated-table/deprecated-table.model.mjs +0 -13
- package/esm2022/components/deprecated-table/directives/dynamic-component.directive.mjs +0 -40
- package/esm2022/components/dialog/dialog.component.mjs +0 -193
- package/esm2022/components/dialog/dialog.component.module.mjs +0 -23
- package/esm2022/components/dialog/dialog.service.mjs +0 -32
- package/esm2022/components/divider/divider.component.mjs +0 -65
- package/esm2022/components/divider/divider.component.module.mjs +0 -19
- package/esm2022/components/divider/divider.model.mjs +0 -2
- package/esm2022/components/dropdown/dropdown.component.mjs +0 -228
- package/esm2022/components/dropdown/dropdown.component.module.mjs +0 -57
- package/esm2022/components/dropdown/dropdown.model.mjs +0 -2
- package/esm2022/components/elevation-shadow/elevation-shadow.component.mjs +0 -45
- package/esm2022/components/elevation-shadow/elevation-shadow.component.module.mjs +0 -18
- package/esm2022/components/elevation-shadow/elevation-shadow.constant.mjs +0 -9
- package/esm2022/components/empty-state/empty-state.component.mjs +0 -195
- package/esm2022/components/empty-state/empty-state.component.module.mjs +0 -21
- package/esm2022/components/empty-state/empty-state.model.mjs +0 -2
- package/esm2022/components/field/field.component.mjs +0 -409
- package/esm2022/components/field/field.component.module.mjs +0 -58
- package/esm2022/components/field/field.model.mjs +0 -2
- package/esm2022/components/file-upload/file-upload.component.mjs +0 -270
- package/esm2022/components/file-upload/file-upload.component.module.mjs +0 -40
- package/esm2022/components/icon/icon.component.mjs +0 -127
- package/esm2022/components/icon/icon.component.module.mjs +0 -21
- package/esm2022/components/icon/icon.config.mjs +0 -657
- package/esm2022/components/icon/icon.model.mjs +0 -2
- package/esm2022/components/icon-label/icon-label.component.mjs +0 -53
- package/esm2022/components/icon-label/icon-label.component.module.mjs +0 -20
- package/esm2022/components/logo/logo.component.mjs +0 -149
- package/esm2022/components/logo/logo.component.module.mjs +0 -18
- package/esm2022/components/logo/logo.model.mjs +0 -32
- package/esm2022/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.mjs +0 -75
- package/esm2022/components/navbar/navbar.component.mjs +0 -200
- package/esm2022/components/navbar/navbar.component.module.mjs +0 -67
- package/esm2022/components/navbar/navbar.model.mjs +0 -2
- package/esm2022/components/overflow-menu/overflow-menu.component.mjs +0 -73
- package/esm2022/components/overflow-menu/overflow-menu.component.module.mjs +0 -21
- package/esm2022/components/overflow-menu/overflow-menu.model.mjs +0 -2
- package/esm2022/components/page-header/page-header.component.mjs +0 -81
- package/esm2022/components/page-header/page-header.component.module.mjs +0 -20
- package/esm2022/components/paginator/paginator.component.mjs +0 -76
- package/esm2022/components/paginator/paginator.component.module.mjs +0 -19
- package/esm2022/components/password-criteria/password.component.mjs +0 -115
- package/esm2022/components/password-criteria/password.component.module.mjs +0 -39
- package/esm2022/components/password-strength/password-strength.component.mjs +0 -103
- package/esm2022/components/password-strength/password-strength.component.module.mjs +0 -21
- package/esm2022/components/phone-input/join-strings.pipe.mjs +0 -14
- package/esm2022/components/phone-input/phone-input.component.mjs +0 -363
- package/esm2022/components/phone-input/phone-input.component.module.mjs +0 -63
- package/esm2022/components/phone-input/phone-input.model.mjs +0 -2
- package/esm2022/components/progress-bar/progress-bar.component.mjs +0 -74
- package/esm2022/components/progress-bar/progress-bar.component.module.mjs +0 -20
- package/esm2022/components/radial-progress/radial-progress.component.mjs +0 -106
- package/esm2022/components/radial-progress/radial-progress.component.module.mjs +0 -20
- package/esm2022/components/radial-progress/radial-progress.model.mjs +0 -11
- package/esm2022/components/radio-button/radio-button.component.mjs +0 -176
- package/esm2022/components/radio-button/radio-button.component.module.mjs +0 -21
- package/esm2022/components/radio-button/radio-button.model.mjs +0 -2
- package/esm2022/components/rating/half-star.pipe.mjs +0 -23
- package/esm2022/components/rating/rating.component.mjs +0 -92
- package/esm2022/components/rating/rating.component.module.mjs +0 -20
- package/esm2022/components/scale/scale.component.mjs +0 -58
- package/esm2022/components/scale/scale.component.module.mjs +0 -18
- package/esm2022/components/segmented-bar/segmented-bar.component.mjs +0 -75
- package/esm2022/components/segmented-bar/segmented-bar.component.module.mjs +0 -20
- package/esm2022/components/segmented-bar/segmented-bar.model.mjs +0 -2
- package/esm2022/components/segmented-button/segmented-button.component.mjs +0 -53
- package/esm2022/components/segmented-button/segmented-button.component.module.mjs +0 -32
- package/esm2022/components/segmented-button/segmented-button.model.mjs +0 -2
- package/esm2022/components/side-sheet/side-sheet.component.mjs +0 -109
- package/esm2022/components/side-sheet/side-sheet.component.module.mjs +0 -43
- package/esm2022/components/side-sheet/side-sheet.model.mjs +0 -2
- package/esm2022/components/side-sheet/side-sheet.service.mjs +0 -31
- package/esm2022/components/skeleton/skeleton.component.mjs +0 -71
- package/esm2022/components/skeleton/skeleton.model.mjs +0 -2
- package/esm2022/components/slider/slider.component.mjs +0 -191
- package/esm2022/components/slider/slider.component.module.mjs +0 -43
- package/esm2022/components/slider/slider.model.mjs +0 -2
- package/esm2022/components/snackbar/snackbar.component.mjs +0 -208
- package/esm2022/components/snackbar/snackbar.component.module.mjs +0 -24
- package/esm2022/components/snackbar/snackbar.model.mjs +0 -2
- package/esm2022/components/snackbar/snackbar.service.mjs +0 -41
- package/esm2022/components/spinner/spinner.component.mjs +0 -62
- package/esm2022/components/spinner/spinner.model.mjs +0 -2
- package/esm2022/components/spinner/spinner.module.mjs +0 -18
- package/esm2022/components/step/step.component.mjs +0 -110
- package/esm2022/components/step/step.component.module.mjs +0 -19
- package/esm2022/components/stepper/stepper.component.mjs +0 -124
- package/esm2022/components/stepper/stepper.component.module.mjs +0 -44
- package/esm2022/components/stepper/stepper.model.mjs +0 -2
- package/esm2022/components/table/sentence-case.pipe.mjs +0 -19
- package/esm2022/components/table/table.component.mjs +0 -191
- package/esm2022/components/table/table.component.module.mjs +0 -58
- package/esm2022/components/table/table.model.mjs +0 -13
- package/esm2022/components/tabs/tab.directive.mjs +0 -42
- package/esm2022/components/tabs/tabs.component.mjs +0 -99
- package/esm2022/components/tabs/tabs.component.module.mjs +0 -33
- package/esm2022/components/tabs/tabs.model.mjs +0 -2
- package/esm2022/components/tag/tag.component.mjs +0 -201
- package/esm2022/components/tag/tag.component.module.mjs +0 -23
- package/esm2022/components/tag/tag.model.mjs +0 -2
- package/esm2022/components/toggle/toggle.component.mjs +0 -158
- package/esm2022/components/toggle/toggle.component.module.mjs +0 -22
- package/esm2022/components/toggle/toggle.model.mjs +0 -2
- package/esm2022/components/tooltip/tooltip.component.mjs +0 -79
- package/esm2022/components/tooltip/tooltip.component.module.mjs +0 -18
- package/esm2022/components/tooltip/tooltip.model.mjs +0 -8
- package/esm2022/components/validation-error/validation-error.component.mjs +0 -59
- package/esm2022/components/validation-error/validation-error.model.mjs +0 -2
- package/esm2022/components/validation-error/validation-error.module.mjs +0 -20
- package/esm2022/directives/digits-only.directive.mjs +0 -52
- package/esm2022/directives/drag-drop.directive.mjs +0 -55
- package/esm2022/directives/ellipse-text.directive.mjs +0 -37
- package/esm2022/directives/select-text.directive.mjs +0 -41
- package/esm2022/directives/step-line-width.directive.mjs +0 -38
- package/esm2022/models/application-theme.model.mjs +0 -2
- package/esm2022/models/colors.model.mjs +0 -78
- package/esm2022/models/screen-breakpoints.model.mjs +0 -6
- package/esm2022/pipes/data-property-getter.mjs +0 -33
- package/esm2022/pipes/has-validation-error.pipe.mjs +0 -27
- package/esm2022/pipes/name-initials.pipe.mjs +0 -25
- package/esm2022/pipes/ui-translate.pipe.mjs +0 -76
- package/esm2022/providers/is-mobile.mjs +0 -11
- package/esm2022/public-api.mjs +0 -184
- package/esm2022/testgorilla-tgo-ui.mjs +0 -5
- package/esm2022/utils/alert-bar.model.mjs +0 -2
- package/esm2022/utils/alert-bars.utils.mjs +0 -33
- package/esm2022/utils/autocomplete-utils.mjs +0 -61
- package/esm2022/utils/color-contrast.mjs +0 -131
- package/esm2022/utils/localization/language.model.mjs +0 -16
- package/esm2022/utils/localization/language.service.mjs +0 -33
- package/esm2022/utils/table.utils.mjs +0 -19
- package/fesm2022/testgorilla-tgo-ui.mjs +0 -11049
- package/fesm2022/testgorilla-tgo-ui.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/models/colors.model.d.ts +0 -63
- package/models/screen-breakpoints.model.d.ts +0 -4
- package/pipes/data-property-getter.d.ts +0 -8
- package/pipes/has-validation-error.pipe.d.ts +0 -15
- package/pipes/name-initials.pipe.d.ts +0 -7
- package/pipes/ui-translate.pipe.d.ts +0 -28
- package/providers/is-mobile.d.ts +0 -2
- package/public-api.d.ts +0 -130
- package/utils/alert-bars.utils.d.ts +0 -7
- package/utils/autocomplete-utils.d.ts +0 -11
- package/utils/color-contrast.d.ts +0 -28
- package/utils/localization/language.model.d.ts +0 -14
- package/utils/localization/language.service.d.ts +0 -16
- package/utils/table.utils.d.ts +0 -6
- /package/{components/accordion/accordion.model.d.ts → projects/tgo-canopy-ui/components/accordion/accordion.model.ts} +0 -0
- /package/{components/alert-banner/alert-banner.model.d.ts → projects/tgo-canopy-ui/components/alert-banner/alert-banner.model.ts} +0 -0
- /package/{components/card/card.model.d.ts → projects/tgo-canopy-ui/components/card/card.model.ts} +0 -0
- /package/{components/divider/divider.model.d.ts → projects/tgo-canopy-ui/components/divider/divider.model.ts} +0 -0
- /package/{components/empty-state/empty-state.model.d.ts → projects/tgo-canopy-ui/components/empty-state/empty-state.model.ts} +0 -0
- /package/{components/snackbar/snackbar.model.d.ts → projects/tgo-canopy-ui/components/snackbar/snackbar.model.ts} +0 -0
- /package/{components/spinner/spinner.model.d.ts → projects/tgo-canopy-ui/components/spinner/spinner.model.ts} +0 -0
- /package/{components/tag/tag.model.d.ts → projects/tgo-canopy-ui/components/tag/tag.model.ts} +0 -0
- /package/{components/toggle/toggle.model.d.ts → projects/tgo-canopy-ui/components/toggle/toggle.model.ts} +0 -0
- /package/{components/validation-error/validation-error.model.d.ts → projects/tgo-canopy-ui/components/validation-error/validation-error.model.ts} +0 -0
- /package/{models/application-theme.model.d.ts → projects/tgo-canopy-ui/models/application-theme.model.ts} +0 -0
- /package/{utils/alert-bar.model.d.ts → projects/tgo-canopy-ui/utils/alert-bar.model.ts} +0 -0
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
ChangeDetectorRef,
|
|
5
|
+
Component,
|
|
6
|
+
DoCheck,
|
|
7
|
+
ElementRef,
|
|
8
|
+
HostBinding,
|
|
9
|
+
Inject,
|
|
10
|
+
Input,
|
|
11
|
+
OnDestroy,
|
|
12
|
+
OnInit,
|
|
13
|
+
Optional,
|
|
14
|
+
Self,
|
|
15
|
+
ViewChild,
|
|
16
|
+
} from '@angular/core';
|
|
17
|
+
import {
|
|
18
|
+
ControlValueAccessor,
|
|
19
|
+
NgControl,
|
|
20
|
+
UntypedFormBuilder,
|
|
21
|
+
UntypedFormControl,
|
|
22
|
+
UntypedFormGroup,
|
|
23
|
+
} from '@angular/forms';
|
|
24
|
+
import { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS } from '@angular/material/autocomplete';
|
|
25
|
+
import { ErrorStateMatcher } from '@angular/material/core';
|
|
26
|
+
import { MatInput } from '@angular/material/input';
|
|
27
|
+
import { MatSelect } from '@angular/material/select';
|
|
28
|
+
import { parsePhoneNumber } from 'libphonenumber-js';
|
|
29
|
+
import {
|
|
30
|
+
BehaviorSubject,
|
|
31
|
+
combineLatest,
|
|
32
|
+
debounceTime,
|
|
33
|
+
delay,
|
|
34
|
+
filter,
|
|
35
|
+
first,
|
|
36
|
+
map,
|
|
37
|
+
Observable,
|
|
38
|
+
startWith,
|
|
39
|
+
Subject,
|
|
40
|
+
take,
|
|
41
|
+
tap,
|
|
42
|
+
} from 'rxjs';
|
|
43
|
+
import { takeUntil } from 'rxjs/operators';
|
|
44
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
45
|
+
import { ApplicationTheme } from '../../models/application-theme.model';
|
|
46
|
+
import { LanguageService } from '../../utils/localization/language.service';
|
|
47
|
+
import { UICountry } from './phone-input.model';
|
|
48
|
+
|
|
49
|
+
@Component({
|
|
50
|
+
selector: 'ui-phone-input',
|
|
51
|
+
templateUrl: './phone-input.component.html',
|
|
52
|
+
styleUrls: ['./phone-input.component.scss'],
|
|
53
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
54
|
+
providers: [
|
|
55
|
+
{
|
|
56
|
+
provide: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,
|
|
57
|
+
useValue: { overlayPanelClass: 'phone-number-autocomplete' },
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
})
|
|
61
|
+
export class PhoneInputComponent implements OnInit, OnDestroy, ControlValueAccessor, DoCheck {
|
|
62
|
+
/**
|
|
63
|
+
* Phone number
|
|
64
|
+
*
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof PhoneInputComponent
|
|
67
|
+
*/
|
|
68
|
+
@Input()
|
|
69
|
+
set value(value: string) {
|
|
70
|
+
this.initialValue = this.initialValue || value;
|
|
71
|
+
try {
|
|
72
|
+
const parsed = parsePhoneNumber(value);
|
|
73
|
+
const formatted = parsed.formatInternational();
|
|
74
|
+
this.selectedCountry = this.getCountryByAlpha2Code(parsed.country!) || this.selectedCountry;
|
|
75
|
+
this.form.patchValue({ phone_number: formatted.replace(this.selectedCountry.callingCode, '') });
|
|
76
|
+
} catch (err) {
|
|
77
|
+
if (value?.length <= 4) {
|
|
78
|
+
this.selectedCountry = this.getCountryByCallingCode(value) || this.selectedCountry;
|
|
79
|
+
}
|
|
80
|
+
this.form.patchValue({ phone_number: value?.replace(this.selectedCountry?.callingCode, '') });
|
|
81
|
+
}
|
|
82
|
+
this.stateChanges.next();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Country list for select
|
|
87
|
+
*
|
|
88
|
+
* @type {UICountry[]}
|
|
89
|
+
* @memberof PhoneInputComponent
|
|
90
|
+
*/
|
|
91
|
+
@Input() set countryList(countryList: UICountry[]) {
|
|
92
|
+
this.loadCountries$.next(countryList);
|
|
93
|
+
this.selectedCountry = this.selectedCountry ?? countryList[0];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Placeholder input
|
|
98
|
+
*
|
|
99
|
+
* @type {text}
|
|
100
|
+
* @memberof PhoneInputComponent
|
|
101
|
+
*/
|
|
102
|
+
@Input()
|
|
103
|
+
set placeholder(value: string) {
|
|
104
|
+
this.internalPlaceholder = value;
|
|
105
|
+
this.stateChanges.next();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Determines if input is disabled
|
|
110
|
+
*
|
|
111
|
+
* @type {boolean}
|
|
112
|
+
* @memberof PhoneInputComponent
|
|
113
|
+
*/
|
|
114
|
+
@HostBinding('attr.disabled')
|
|
115
|
+
@Input()
|
|
116
|
+
disabled: boolean;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Input is required or not
|
|
120
|
+
*
|
|
121
|
+
* @type {boolean}
|
|
122
|
+
* @memberof PhoneInputComponent
|
|
123
|
+
*/
|
|
124
|
+
@Input() required: boolean;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
*
|
|
128
|
+
* Defines the application theme
|
|
129
|
+
*
|
|
130
|
+
* @type {ApplicationTheme}
|
|
131
|
+
* @memberof PhoneInputComponent
|
|
132
|
+
*/
|
|
133
|
+
@HostBinding('attr.theme')
|
|
134
|
+
@Input()
|
|
135
|
+
applicationTheme: ApplicationTheme = 'light';
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Indicator of the phone input width
|
|
139
|
+
* @property fullWidth
|
|
140
|
+
* @type {boolean}
|
|
141
|
+
* @memberof PhoneInputComponent
|
|
142
|
+
*/
|
|
143
|
+
@Input() fullWidth = false;
|
|
144
|
+
|
|
145
|
+
_errors: SafeHtml[];
|
|
146
|
+
/**
|
|
147
|
+
* Input field errors
|
|
148
|
+
*
|
|
149
|
+
* @type {string}
|
|
150
|
+
* @memberof PhoneInputComponent
|
|
151
|
+
*/
|
|
152
|
+
@Input() set errors(errors: string[]) {
|
|
153
|
+
if (errors) {
|
|
154
|
+
this._errors = errors?.filter(Boolean).map(error => this.sanitizer.bypassSecurityTrustHtml(error));
|
|
155
|
+
this.errorsLength = this.setErrorsLength();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Hide in build errors for Reactive Forms
|
|
161
|
+
*
|
|
162
|
+
* @type {number}
|
|
163
|
+
* @memberof PhoneInputComponent
|
|
164
|
+
*/
|
|
165
|
+
@Input() hideBuiltInErrors = false;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Hide label in errors
|
|
169
|
+
*
|
|
170
|
+
* @type {number}
|
|
171
|
+
* @memberof PhoneInputComponent
|
|
172
|
+
*/
|
|
173
|
+
@Input() hideLabelInErrors = false;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The language to be used
|
|
177
|
+
* @property language
|
|
178
|
+
* @type {Language}
|
|
179
|
+
* @memberof PhoneInputComponent
|
|
180
|
+
*/
|
|
181
|
+
@Input() language = LanguageService.defaultLanguage;
|
|
182
|
+
|
|
183
|
+
static nextId = 0;
|
|
184
|
+
|
|
185
|
+
private countries = new BehaviorSubject<UICountry[]>([]);
|
|
186
|
+
protected countries$ = this.countries.asObservable();
|
|
187
|
+
form: UntypedFormGroup = this.fb.group({
|
|
188
|
+
phone_number: new UntypedFormControl(),
|
|
189
|
+
});
|
|
190
|
+
protected controlType = 'phone-number';
|
|
191
|
+
protected userAriaDescribedBy?: string;
|
|
192
|
+
protected loadCountries$ = new BehaviorSubject<UICountry[]>([]);
|
|
193
|
+
protected countryCode = new BehaviorSubject<string>('US');
|
|
194
|
+
protected stateChanges = new Subject<void>();
|
|
195
|
+
protected focused: boolean;
|
|
196
|
+
protected selectFilterCtrl = new UntypedFormControl('');
|
|
197
|
+
protected errorsLength: boolean;
|
|
198
|
+
protected readonly countryFlagSrc = 'assets/svg-country-flags/';
|
|
199
|
+
|
|
200
|
+
@ViewChild(MatInput, { read: ElementRef, static: true })
|
|
201
|
+
public input: ElementRef<HTMLElement>;
|
|
202
|
+
@ViewChild(MatSelect, { read: ElementRef, static: true })
|
|
203
|
+
public select: ElementRef<HTMLElement>;
|
|
204
|
+
|
|
205
|
+
@HostBinding()
|
|
206
|
+
id = `phone-number${PhoneInputComponent.nextId++}`;
|
|
207
|
+
|
|
208
|
+
@HostBinding('class.floated')
|
|
209
|
+
get shouldLabelFloat(): boolean {
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
@HostBinding('attr.aria-describedby') describedBy = '';
|
|
214
|
+
|
|
215
|
+
get empty(): boolean {
|
|
216
|
+
return !!this.form.value;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
get errorState(): boolean {
|
|
220
|
+
return this.errorMatcher.isErrorState(this.ngControl.control as UntypedFormControl, null);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
get value(): string {
|
|
224
|
+
return this.getNumberWithCountryCode();
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
get placeholder() {
|
|
228
|
+
return this.internalPlaceholder;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
private initialValue: string;
|
|
232
|
+
private readonly DEFAULT_COUNTRY_CODE = 'US';
|
|
233
|
+
private internalPlaceholder: string;
|
|
234
|
+
protected selectedCountry: UICountry;
|
|
235
|
+
private unsubscribeAll$ = new Subject<void>();
|
|
236
|
+
|
|
237
|
+
constructor(
|
|
238
|
+
@Optional() @Self() public ngControl: NgControl,
|
|
239
|
+
private errorMatcher: ErrorStateMatcher,
|
|
240
|
+
private fb: UntypedFormBuilder,
|
|
241
|
+
private focusMonitor: FocusMonitor,
|
|
242
|
+
private ref: ChangeDetectorRef,
|
|
243
|
+
private sanitizer: DomSanitizer,
|
|
244
|
+
@Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,
|
|
245
|
+
) {
|
|
246
|
+
if (this.ngControl != null) {
|
|
247
|
+
this.ngControl.valueAccessor = this;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (defaultAppTheme) {
|
|
251
|
+
this.applicationTheme = defaultAppTheme;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors
|
|
257
|
+
* to display validation errors that might happen (e.g. required)
|
|
258
|
+
*/
|
|
259
|
+
ngDoCheck(): void {
|
|
260
|
+
if (this.ngControl?.touched || this.ngControl?.errors) {
|
|
261
|
+
this.ref.markForCheck();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
ngOnInit(): void {
|
|
266
|
+
this.loadCountries();
|
|
267
|
+
this.preSelectCountry();
|
|
268
|
+
this.subscribeToFocusEvents();
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
setErrorsLength(): boolean {
|
|
272
|
+
if (!!this._errors) {
|
|
273
|
+
return this._errors.filter(err => !!err).length > 0;
|
|
274
|
+
}
|
|
275
|
+
return false;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
setDescribedByIds(ids: string[]): void {
|
|
279
|
+
this.userAriaDescribedBy = ids.join(' ');
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
onChange: (value: string) => void;
|
|
283
|
+
onTouch: () => void;
|
|
284
|
+
|
|
285
|
+
writeValue(phoneNumber: string): void {
|
|
286
|
+
if (phoneNumber) {
|
|
287
|
+
this.value = phoneNumber;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
registerOnChange(fn: (value: string) => void): void {
|
|
292
|
+
this.onChange = fn;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
registerOnTouched(fn: () => void): void {
|
|
296
|
+
this.onTouch = fn;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
setDisabledState(isDisabled: boolean): void {
|
|
300
|
+
if (isDisabled) {
|
|
301
|
+
this.form.disable();
|
|
302
|
+
} else {
|
|
303
|
+
this.form.enable();
|
|
304
|
+
}
|
|
305
|
+
this.disabled = isDisabled;
|
|
306
|
+
this.stateChanges.next();
|
|
307
|
+
this.ref.markForCheck();
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
ngOnDestroy(): void {
|
|
311
|
+
this.focusMonitor.stopMonitoring(this.input);
|
|
312
|
+
this.focusMonitor.stopMonitoring(this.select);
|
|
313
|
+
this.stateChanges.complete();
|
|
314
|
+
this.unsubscribeAll$.next();
|
|
315
|
+
this.unsubscribeAll$.complete();
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
onOptionsSelected(value: UICountry) {
|
|
319
|
+
this.setCountry(value);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
onInput(value: string) {
|
|
323
|
+
this.value = (this.selectedCountry?.callingCode ?? '') + value;
|
|
324
|
+
this.onChange(this.value);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
filteredCountryTrackByMethod(index: number, el: UICountry): string {
|
|
328
|
+
return el.alpha2Code;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
private getNumberWithCountryCode() {
|
|
332
|
+
const nationalNumber = this.form.value?.phone_number as string;
|
|
333
|
+
return nationalNumber ? (this.selectedCountry?.callingCode ?? '') + nationalNumber : '';
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
private subscribeToFocusEvents() {
|
|
337
|
+
const selectAndInputFocus$ = combineLatest([
|
|
338
|
+
this.focusMonitor.monitor(this.select),
|
|
339
|
+
this.focusMonitor.monitor(this.input),
|
|
340
|
+
]).pipe(takeUntil(this.unsubscribeAll$), debounceTime(10));
|
|
341
|
+
|
|
342
|
+
selectAndInputFocus$.subscribe(([selectFocus, inputFocus]) => {
|
|
343
|
+
this.focused = !!(selectFocus || inputFocus);
|
|
344
|
+
this.stateChanges.next();
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
selectAndInputFocus$.pipe(take(1)).subscribe(() => {
|
|
348
|
+
this.onTouch();
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
private preSelectCountry() {
|
|
353
|
+
this.setDisabledState(true);
|
|
354
|
+
combineLatest([
|
|
355
|
+
this.countries$.pipe(
|
|
356
|
+
filter(countries => countries.length > 0),
|
|
357
|
+
first()
|
|
358
|
+
),
|
|
359
|
+
this.countryCode,
|
|
360
|
+
])
|
|
361
|
+
.pipe(
|
|
362
|
+
map(([countries, selectedCountry]) => {
|
|
363
|
+
if (!this.initialValue) {
|
|
364
|
+
const country =
|
|
365
|
+
this.getCountryByAlpha2Code(selectedCountry) || this.getCountryByAlpha2Code(this.DEFAULT_COUNTRY_CODE);
|
|
366
|
+
this.setCountry(country as UICountry);
|
|
367
|
+
} else {
|
|
368
|
+
this.value = this.initialValue;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
this.setDisabledState(false);
|
|
372
|
+
this.ref.markForCheck();
|
|
373
|
+
})
|
|
374
|
+
)
|
|
375
|
+
.subscribe();
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
private setCountry(country: UICountry | null): void {
|
|
379
|
+
if (country) {
|
|
380
|
+
this.selectedCountry = country;
|
|
381
|
+
}
|
|
382
|
+
this.value = this.getNumberWithCountryCode();
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
private getCountryByAlpha2Code(alpha2Code: string) {
|
|
386
|
+
return this.countries.value.find(country => country.alpha2Code === alpha2Code);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
private getCountryByCallingCode(callingCode: string) {
|
|
390
|
+
return this.countries.value.find(country => country.callingCode === callingCode);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
private loadCountries(): void {
|
|
394
|
+
const searchText$: Observable<string> = this.selectFilterCtrl.valueChanges.pipe(debounceTime(100), startWith(''));
|
|
395
|
+
|
|
396
|
+
combineLatest([this.loadCountries$, searchText$])
|
|
397
|
+
.pipe(
|
|
398
|
+
takeUntil(this.unsubscribeAll$),
|
|
399
|
+
tap(([countries, searchText]) => {
|
|
400
|
+
const searchTextLowerCase = searchText.toLowerCase();
|
|
401
|
+
const filteredCountries = countries
|
|
402
|
+
.filter(
|
|
403
|
+
option =>
|
|
404
|
+
option.name.toLowerCase().includes(searchTextLowerCase) ||
|
|
405
|
+
option.alpha2Code.toLowerCase().includes(searchTextLowerCase) ||
|
|
406
|
+
option.callingCode.toLowerCase().includes(searchTextLowerCase)
|
|
407
|
+
)
|
|
408
|
+
.sort((optionA, optionB) => (optionB.name.startsWith(searchText) ? 1 : -1));
|
|
409
|
+
this.countries.next(filteredCountries);
|
|
410
|
+
}),
|
|
411
|
+
delay(1),
|
|
412
|
+
tap(() => {
|
|
413
|
+
const countryFound = this.getCountryByAlpha2Code(this.selectedCountry?.alpha2Code);
|
|
414
|
+
this.selectedCountry = countryFound || this.selectedCountry;
|
|
415
|
+
this.ref.markForCheck();
|
|
416
|
+
})
|
|
417
|
+
)
|
|
418
|
+
.subscribe();
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
disableClick(ev: Event) {
|
|
422
|
+
ev.preventDefault();
|
|
423
|
+
ev.stopPropagation();
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
trackByFn = (index: number, value: any) => value.changingThisBreaksApplicationSecurity;
|
|
427
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { NgModule } from '@angular/core';
|
|
3
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
4
|
+
import { ProgressBarComponent } from './progress-bar.component';
|
|
5
|
+
|
|
6
|
+
@NgModule({
|
|
7
|
+
declarations: [ProgressBarComponent],
|
|
8
|
+
imports: [CommonModule, MatProgressBarModule],
|
|
9
|
+
exports: [ProgressBarComponent],
|
|
10
|
+
providers: [],
|
|
11
|
+
})
|
|
12
|
+
export class ProgressBarComponentModule {}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
@use '../../theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
.mat-mdc-progress-bar.progress-bar {
|
|
4
|
+
--mdc-linear-progress-active-indicator-color: var(--color);
|
|
5
|
+
--mdc-linear-progress-track-color: var(--color);
|
|
6
|
+
--mdc-linear-progress-active-indicator-height: 8px;
|
|
7
|
+
--mdc-linear-progress-track-height: 8px;
|
|
8
|
+
height: 8px;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
|
|
11
|
+
&[aria-valuenow="1"] {
|
|
12
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
13
|
+
border-top-right-radius: 60% 8px !important;
|
|
14
|
+
border-bottom-right-radius: 60% 8px !important;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&[aria-valuenow="2"] {
|
|
19
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
20
|
+
border-top-right-radius: 35% 8px !important;
|
|
21
|
+
border-bottom-right-radius: 35% 8px !important;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&[aria-valuenow="3"] {
|
|
26
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
27
|
+
border-top-right-radius: 30% 8px !important;
|
|
28
|
+
border-bottom-right-radius: 30% 8px !important;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&[aria-valuenow="4"] {
|
|
33
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
34
|
+
border-top-right-radius: 20% 8px !important;
|
|
35
|
+
border-bottom-right-radius: 20% 8px !important;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&[aria-valuenow="5"] {
|
|
40
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
41
|
+
border-top-right-radius: 15% 8px !important;
|
|
42
|
+
border-bottom-right-radius: 15% 8px !important;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[aria-valuenow="6"], &[aria-valuenow="7"], &[aria-valuenow="8"], &[aria-valuenow="9"], &[aria-valuenow="10"], &[aria-valuenow="11"] {
|
|
47
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
48
|
+
border-top-right-radius: 10% 8px !important;
|
|
49
|
+
border-bottom-right-radius: 10% 8px !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&[aria-valuenow="12"], &[aria-valuenow="13"] {
|
|
54
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
55
|
+
border-top-right-radius: 7% 8px !important;
|
|
56
|
+
border-bottom-right-radius: 7% 8px !important;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&[aria-valuenow="14"], &[aria-valuenow="15"] {
|
|
61
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
62
|
+
border-top-right-radius: 6% 8px !important;
|
|
63
|
+
border-bottom-right-radius: 6% 8px !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&[aria-valuenow="16"] {
|
|
68
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
69
|
+
border-top-right-radius: 5% 8px !important;
|
|
70
|
+
border-bottom-right-radius: 5% 8px !important;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&[aria-valuenow="17"], &[aria-valuenow="18"], &[aria-valuenow="19"], &[aria-valuenow="20"], &[aria-valuenow="21"], &[aria-valuenow="22"], &[aria-valuenow="23"] {
|
|
75
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
76
|
+
border-top-right-radius: 4% 8px !important;
|
|
77
|
+
border-bottom-right-radius: 4% 8px !important;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&[aria-valuenow="24"], &[aria-valuenow="25"], &[aria-valuenow="26"], &[aria-valuenow="27"] {
|
|
82
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
83
|
+
border-top-right-radius: 3% 8px !important;
|
|
84
|
+
border-bottom-right-radius: 3% 8px !important;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&[aria-valuenow="28"], &[aria-valuenow="29"], &[aria-valuenow="30"], &[aria-valuenow="31"], &[aria-valuenow="32"],
|
|
89
|
+
&[aria-valuenow="33"] {
|
|
90
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
91
|
+
border-top-right-radius: 2.5% 8px !important;
|
|
92
|
+
border-bottom-right-radius: 2.5% 8px !important;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&[aria-valuenow="34"], &[aria-valuenow="35"], &[aria-valuenow="36"], &[aria-valuenow="37"], &[aria-valuenow="38"],
|
|
97
|
+
&[aria-valuenow="39"], &[aria-valuenow="40"], &[aria-valuenow="41"] {
|
|
98
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
99
|
+
border-top-right-radius: 2.2% 8px !important;
|
|
100
|
+
border-bottom-right-radius: 2.2% 8px !important;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&[aria-valuenow="42"], &[aria-valuenow="43"], &[aria-valuenow="44"], &[aria-valuenow="45"], &[aria-valuenow="46"],
|
|
105
|
+
&[aria-valuenow="47"], &[aria-valuenow="48"], &[aria-valuenow="49"], &[aria-valuenow="50"], &[aria-valuenow="51"],
|
|
106
|
+
&[aria-valuenow="52"], &[aria-valuenow="53"]{
|
|
107
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
108
|
+
border-top-right-radius: 2% 8px !important;
|
|
109
|
+
border-bottom-right-radius: 2% 8px !important;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&[aria-valuenow="54"], &[aria-valuenow="55"], &[aria-valuenow="56"], &[aria-valuenow="57"], &[aria-valuenow="58"],
|
|
114
|
+
&[aria-valuenow="59"], &[aria-valuenow="60"], &[aria-valuenow="61"], &[aria-valuenow="62"], &[aria-valuenow="63"],
|
|
115
|
+
&[aria-valuenow="64"] {
|
|
116
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
117
|
+
border-top-right-radius: 1.5% 8px !important;
|
|
118
|
+
border-bottom-right-radius: 1.5% 8px !important;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&[aria-valuenow="65"], &[aria-valuenow="66"], &[aria-valuenow="67"], &[aria-valuenow="68"], &[aria-valuenow="69"] {
|
|
123
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
124
|
+
border-top-right-radius: 1.4% 8px !important;
|
|
125
|
+
border-bottom-right-radius: 1.4% 8px !important;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&[aria-valuenow="70"], &[aria-valuenow="71"], &[aria-valuenow="72"], &[aria-valuenow="73"], &[aria-valuenow="74"] {
|
|
130
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
131
|
+
border-top-right-radius: 1.2% 8px !important;
|
|
132
|
+
border-bottom-right-radius: 1.2% 8px !important;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
::ng-deep .mdc-linear-progress__buffer-bar {
|
|
137
|
+
background-color: $tgo-medium;
|
|
138
|
+
height: 8px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
::ng-deep .mdc-linear-progress__bar-inner {
|
|
142
|
+
border-top-width: 8px;
|
|
143
|
+
border-top-right-radius: 1% 8px !important;
|
|
144
|
+
border-bottom-right-radius: 1% 8px !important;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&[theme="dark"], &[theme="light"] {
|
|
148
|
+
::ng-deep .mdc-linear-progress__buffer-bar {
|
|
149
|
+
background-color: $grayscale-20;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
3
|
+
import { ProgressBarComponent } from './progress-bar.component';
|
|
4
|
+
import { SimpleChanges } from "@angular/core";
|
|
5
|
+
|
|
6
|
+
describe('ProgressBarComponent', () => {
|
|
7
|
+
let component: ProgressBarComponent;
|
|
8
|
+
let fixture: any;
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
TestBed.initTestEnvironment;
|
|
11
|
+
await TestBed.configureTestingModule({
|
|
12
|
+
declarations: [ProgressBarComponent],
|
|
13
|
+
imports: [MatProgressBarModule],
|
|
14
|
+
}).compileComponents();
|
|
15
|
+
|
|
16
|
+
fixture = TestBed.createComponent(ProgressBarComponent);
|
|
17
|
+
fixture.detectChanges();
|
|
18
|
+
|
|
19
|
+
component = fixture.componentInstance;
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('should create', () => {
|
|
23
|
+
expect(component).toBeTruthy();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('should apply a mode of "determinate" by default', () => {
|
|
27
|
+
expect(component.mode).toBe('determinate');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('should define default values for progress and buffer attributes', () => {
|
|
31
|
+
expect(component.progress).toBe(0);
|
|
32
|
+
expect(component.buffer).toBe(0);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
it('should have default values for progress, mode, and buffer', () => {
|
|
37
|
+
expect(component.progress).toBe(0); // Default progress value
|
|
38
|
+
expect(component.mode).toBe('determinate'); // Default mode
|
|
39
|
+
expect(component.buffer).toBe(0); // Default buffer
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should set the correct color based on companyColor input', () => {
|
|
43
|
+
component.companyColor = '#123456'; // Set a specific color
|
|
44
|
+
|
|
45
|
+
fixture.detectChanges(); // Trigger change detection
|
|
46
|
+
|
|
47
|
+
const hostElement = fixture.nativeElement as HTMLElement;
|
|
48
|
+
expect(hostElement.style.getPropertyValue('--color')).toBe('#123456'); // Check the bound style property
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('should use default companyColor when not provided', () => {
|
|
52
|
+
component.applicationTheme = 'classic'; // Set theme to classic
|
|
53
|
+
|
|
54
|
+
//@ts-ignore
|
|
55
|
+
const changes = { companyColor: { currentValue: null } } as SimpleChanges;
|
|
56
|
+
component.ngOnChanges(changes); // Trigger OnChanges with no companyColor
|
|
57
|
+
|
|
58
|
+
fixture.detectChanges(); // Trigger change detection
|
|
59
|
+
|
|
60
|
+
const hostElement = fixture.nativeElement as HTMLElement;
|
|
61
|
+
expect(hostElement.style.getPropertyValue('--color')).toBe(''); // Default color for classic theme
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('should update companyColor when theme changes', () => {
|
|
65
|
+
component.applicationTheme = 'light'; // Set theme to light
|
|
66
|
+
|
|
67
|
+
//@ts-ignore
|
|
68
|
+
const changes = { companyColor: { currentValue: null } } as SimpleChanges;
|
|
69
|
+
component.ngOnChanges(changes); // Trigger OnChanges with no companyColor
|
|
70
|
+
|
|
71
|
+
fixture.detectChanges(); // Trigger change detection
|
|
72
|
+
|
|
73
|
+
const hostElement = fixture.nativeElement as HTMLElement;
|
|
74
|
+
expect(hostElement.style.getPropertyValue('--color')).toBe(''); // Default color for light theme
|
|
75
|
+
});
|
|
76
|
+
});
|