chrv-components 1.12.108 → 1.12.109
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/chrv-components-1.12.109.tgz +0 -0
- package/ng-package.json +17 -0
- package/package.json +21 -33
- package/src/lib/animations/in-out.animation.ts +13 -0
- package/src/lib/animations/rotation.animation.ts +35 -0
- package/src/lib/animations/rotation.scss +8 -0
- package/src/lib/chr-breadcrumb/chr-breadcrumb.component.html +13 -0
- package/src/lib/chr-breadcrumb/chr-breadcrumb.component.scss +0 -0
- package/src/lib/chr-breadcrumb/chr-breadcrumb.component.spec.ts +22 -0
- package/src/lib/chr-breadcrumb/chr-breadcrumb.component.ts +29 -0
- package/src/lib/chr-button/button.component.css +185 -0
- package/src/lib/chr-button/button.component.html +20 -0
- package/src/lib/chr-button/button.component.ts +116 -0
- package/src/lib/chr-button-legacy/chr-button.component.html +11 -0
- package/src/lib/chr-button-legacy/chr-button.component.scss +53 -0
- package/src/lib/chr-button-legacy/chr-button.component.spec.ts +22 -0
- package/src/lib/chr-button-legacy/chr-button.component.ts +83 -0
- package/src/lib/chr-button-new/chr-button.component.css +30 -0
- package/src/lib/chr-button-new/chr-button.component.html +34 -0
- package/src/lib/chr-button-new/chr-button.component.spec.ts +22 -0
- package/src/lib/chr-button-new/chr-button.component.ts +60 -0
- package/src/lib/chr-carousel/chr-carousel.component.css +46 -0
- package/src/lib/chr-carousel/chr-carousel.component.html +46 -0
- package/src/lib/chr-carousel/chr-carousel.component.spec.ts +23 -0
- package/src/lib/chr-carousel/chr-carousel.component.ts +178 -0
- package/src/lib/chr-checkbox/chr-checkbox.component.html +17 -0
- package/src/lib/chr-checkbox/chr-checkbox.component.scss +9 -0
- package/src/lib/chr-checkbox/chr-checkbox.component.spec.ts +23 -0
- package/src/lib/chr-checkbox/chr-checkbox.component.ts +35 -0
- package/src/lib/chr-context-menu/chr-context-menu.component.html +20 -0
- package/src/lib/chr-context-menu/chr-context-menu.component.scss +60 -0
- package/src/lib/chr-context-menu/chr-context-menu.component.spec.ts +23 -0
- package/src/lib/chr-context-menu/chr-context-menu.component.ts +49 -0
- package/src/lib/chr-data-list/chr-data-list.html +37 -0
- package/src/lib/chr-data-list/chr-data-list.scss +89 -0
- package/src/lib/chr-data-list/chr-data-list.spec.ts +22 -0
- package/src/lib/chr-data-list/chr-data-list.ts +341 -0
- package/src/lib/chr-datagrid/data-grid/data-grid.html +180 -0
- package/src/lib/chr-datagrid/data-grid/data-grid.scss +342 -0
- package/src/lib/chr-datagrid/data-grid/data-grid.spec.ts +23 -0
- package/src/lib/chr-datagrid/data-grid/data-grid.ts +807 -0
- package/src/lib/chr-datagrid/editable-cell/editable-cell.html +43 -0
- package/src/lib/chr-datagrid/editable-cell/editable-cell.scss +81 -0
- package/src/lib/chr-datagrid/editable-cell/editable-cell.spec.ts +23 -0
- package/src/lib/chr-datagrid/editable-cell/editable-cell.ts +158 -0
- package/src/lib/chr-datagrid/filter/column-filter.html +36 -0
- package/src/lib/chr-datagrid/filter/column-filter.scss +108 -0
- package/src/lib/chr-datagrid/filter/column-filter.spec.ts +22 -0
- package/src/lib/chr-datagrid/filter/column-filter.ts +148 -0
- package/src/lib/chr-datagrid/group/column-group.html +27 -0
- package/src/lib/chr-datagrid/group/column-group.scss +100 -0
- package/src/lib/chr-datagrid/group/column-group.spec.ts +22 -0
- package/src/lib/chr-datagrid/group/column-group.ts +106 -0
- package/src/lib/chr-deactivation-warning-modal/chr-deactivation-warning-modal.html +13 -0
- package/src/lib/chr-deactivation-warning-modal/chr-deactivation-warning-modal.scss +8 -0
- package/src/lib/chr-deactivation-warning-modal/chr-deactivation-warning-modal.spec.ts +22 -0
- package/src/lib/chr-deactivation-warning-modal/chr-deactivation-warning-modal.ts +18 -0
- package/src/lib/chr-default-modal/chr-default-modal.component.html +19 -0
- package/src/lib/chr-default-modal/chr-default-modal.component.scss +5 -0
- package/src/lib/chr-default-modal/chr-default-modal.component.spec.ts +23 -0
- package/src/lib/chr-default-modal/chr-default-modal.component.ts +73 -0
- package/src/lib/chr-delete-modal/chr-delete-modal.component.html +24 -0
- package/src/lib/chr-delete-modal/chr-delete-modal.component.scss +5 -0
- package/src/lib/chr-delete-modal/chr-delete-modal.component.spec.ts +23 -0
- package/src/lib/chr-delete-modal/chr-delete-modal.component.ts +41 -0
- package/src/lib/chr-dropdown/chr-dropdown.component.css +44 -0
- package/src/lib/chr-dropdown/chr-dropdown.component.html +25 -0
- package/src/lib/chr-dropdown/chr-dropdown.component.spec.ts +22 -0
- package/src/lib/chr-dropdown/chr-dropdown.component.ts +62 -0
- package/src/lib/chr-form/chr-base-input/chr-base-input.component.html +53 -0
- package/src/lib/chr-form/chr-base-input/chr-base-input.component.scss +151 -0
- package/src/lib/chr-form/chr-base-input/chr-base-input.component.spec.ts +23 -0
- package/src/lib/chr-form/chr-base-input/chr-base-input.component.ts +577 -0
- package/src/lib/chr-form/chr-color-input/chr-color-input.component.html +45 -0
- package/src/lib/chr-form/chr-color-input/chr-color-input.component.scss +15 -0
- package/src/lib/chr-form/chr-color-input/chr-color-input.component.spec.ts +23 -0
- package/src/lib/chr-form/chr-color-input/chr-color-input.component.ts +61 -0
- package/src/lib/chr-form/chr-date-input/chr-date-input.component.html +38 -0
- package/src/lib/chr-form/chr-date-input/chr-date-input.component.scss +5 -0
- package/src/lib/chr-form/chr-date-input/chr-date-input.component.spec.ts +23 -0
- package/src/lib/chr-form/chr-date-input/chr-date-input.component.ts +113 -0
- package/src/lib/chr-form/chr-datetime-input/chr-datetime-input.component.html +38 -0
- package/src/lib/chr-form/chr-datetime-input/chr-datetime-input.component.scss +5 -0
- package/src/lib/chr-form/chr-datetime-input/chr-datetime-input.component.spec.ts +23 -0
- package/src/lib/chr-form/chr-datetime-input/chr-datetime-input.component.ts +108 -0
- package/src/lib/chr-form/chr-file-input/chr-file-input.component.html +94 -0
- package/src/lib/chr-form/chr-file-input/chr-file-input.component.scss +148 -0
- package/src/lib/chr-form/chr-file-input/chr-file-input.component.spec.ts +23 -0
- package/src/lib/chr-form/chr-file-input/chr-file-input.component.ts +196 -0
- package/src/lib/chr-form/chr-form.component.html +211 -0
- package/src/lib/chr-form/chr-form.component.scss +48 -0
- package/src/lib/chr-form/chr-form.component.spec.ts +22 -0
- package/src/lib/chr-form/chr-form.component.ts +465 -0
- package/src/lib/chr-form/chr-nice-file-input/chr-nice-file-input.component.html +57 -0
- package/src/lib/chr-form/chr-nice-file-input/chr-nice-file-input.component.scss +21 -0
- package/src/lib/chr-form/chr-nice-file-input/chr-nice-file-input.component.spec.ts +22 -0
- package/src/lib/chr-form/chr-nice-file-input/chr-nice-file-input.component.ts +23 -0
- package/src/lib/chr-form/chr-textarea-input/chr-textarea-input.component.html +37 -0
- package/src/lib/chr-form/chr-textarea-input/chr-textarea-input.component.scss +27 -0
- package/src/lib/chr-form/chr-textarea-input/chr-textarea-input.component.spec.ts +23 -0
- package/src/lib/chr-form/chr-textarea-input/chr-textarea-input.component.ts +93 -0
- package/src/lib/chr-form/chr-toggle-input/chr-toggle-input.component.html +37 -0
- package/src/lib/chr-form/chr-toggle-input/chr-toggle-input.component.scss +59 -0
- package/src/lib/chr-form/chr-toggle-input/chr-toggle-input.component.spec.ts +23 -0
- package/src/lib/chr-form/chr-toggle-input/chr-toggle-input.component.ts +66 -0
- package/src/lib/chr-form-legacy/chr-form-legacy.component.html +233 -0
- package/src/lib/chr-form-legacy/chr-form-legacy.component.scss +159 -0
- package/src/lib/chr-form-legacy/chr-form-legacy.component.spec.ts +22 -0
- package/src/lib/chr-form-legacy/chr-form-legacy.component.ts +399 -0
- package/src/lib/chr-hover-title/chr-hover-title.component.html +4 -0
- package/src/lib/chr-hover-title/chr-hover-title.component.scss +91 -0
- package/src/lib/chr-hover-title/chr-hover-title.component.spec.ts +23 -0
- package/src/lib/chr-hover-title/chr-hover-title.component.ts +31 -0
- package/src/lib/chr-inline-svg/chr-inline-svg.component.css +0 -0
- package/src/lib/chr-inline-svg/chr-inline-svg.component.html +3 -0
- package/src/lib/chr-inline-svg/chr-inline-svg.component.spec.ts +23 -0
- package/src/lib/chr-inline-svg/chr-inline-svg.component.ts +53 -0
- package/src/lib/chr-inputs/chr-file-input/chr-file-input.component.css +137 -0
- package/src/lib/chr-inputs/chr-file-input/chr-file-input.component.html +40 -0
- package/src/lib/chr-inputs/chr-file-input/chr-file-input.component.ts +163 -0
- package/src/lib/chr-inputs/chr-input/chr-input.component.css +176 -0
- package/src/lib/chr-inputs/chr-input/chr-input.component.html +41 -0
- package/src/lib/chr-inputs/chr-input/chr-input.component.ts +303 -0
- package/src/lib/chr-inputs/chr-password-input/chr-password-input.component.css +7 -0
- package/src/lib/chr-inputs/chr-password-input/chr-password-input.component.html +9 -0
- package/src/lib/chr-inputs/chr-password-input/chr-password-input.component.ts +29 -0
- package/src/lib/chr-inputs/chr-search-select-input/chr-search-select-input.component.css +32 -0
- package/src/lib/chr-inputs/chr-search-select-input/chr-search-select-input.component.html +19 -0
- package/src/lib/chr-inputs/chr-search-select-input/chr-search-select-input.component.ts +62 -0
- package/src/lib/chr-inputs/chr-tag-select-input/chr-tag-select-input.component.css +57 -0
- package/src/lib/chr-inputs/chr-tag-select-input/chr-tag-select-input.component.html +31 -0
- package/src/lib/chr-inputs/chr-tag-select-input/chr-tag-select-input.component.ts +100 -0
- package/src/lib/chr-message-banner/message-banner.html +15 -0
- package/src/lib/chr-message-banner/message-banner.scss +81 -0
- package/src/lib/chr-message-banner/message-banner.spec.ts +23 -0
- package/src/lib/chr-message-banner/message-banner.ts +22 -0
- package/src/lib/chr-modal/chr-modal.component.html +8 -0
- package/src/lib/chr-modal/chr-modal.component.scss +133 -0
- package/src/lib/chr-modal/chr-modal.component.ts +114 -0
- package/src/lib/chr-old-spinner/chr-old-spinner.component.html +12 -0
- package/src/lib/chr-old-spinner/chr-old-spinner.component.scss +75 -0
- package/src/lib/chr-old-spinner/chr-old-spinner.component.ts +69 -0
- package/src/lib/chr-paginator/chr-paginator.component.html +43 -0
- package/src/lib/chr-paginator/chr-paginator.component.scss +25 -0
- package/src/lib/chr-paginator/chr-paginator.component.spec.ts +22 -0
- package/src/lib/chr-paginator/chr-paginator.component.ts +201 -0
- package/src/lib/chr-search-select/chr-search-select.component.html +77 -0
- package/src/lib/chr-search-select/chr-search-select.component.scss +41 -0
- package/src/lib/chr-search-select/chr-search-select.component.spec.ts +23 -0
- package/src/lib/chr-search-select/chr-search-select.component.ts +197 -0
- package/src/lib/chr-searchbar/chr-searchbar.component.html +19 -0
- package/src/lib/chr-searchbar/chr-searchbar.component.scss +0 -0
- package/src/lib/chr-searchbar/chr-searchbar.component.spec.ts +23 -0
- package/src/lib/chr-searchbar/chr-searchbar.component.ts +28 -0
- package/src/lib/chr-separator/chr-separator.component.html +3 -0
- package/src/lib/chr-separator/chr-separator.component.scss +13 -0
- package/src/lib/chr-separator/chr-separator.component.spec.ts +23 -0
- package/src/lib/chr-separator/chr-separator.component.ts +13 -0
- package/src/lib/chr-spinner/chr-spinner.html +16 -0
- package/src/lib/chr-spinner/chr-spinner.scss +203 -0
- package/src/lib/chr-spinner/chr-spinner.ts +25 -0
- package/src/lib/chr-tab/chr-tab.component.css +11 -0
- package/src/lib/chr-tab/chr-tab.component.html +3 -0
- package/src/lib/chr-tab/chr-tab.component.spec.ts +22 -0
- package/src/lib/chr-tab/chr-tab.component.ts +23 -0
- package/src/lib/chr-tab-group/chr-tab-group.component.css +20 -0
- package/src/lib/chr-tab-group/chr-tab-group.component.html +23 -0
- package/src/lib/chr-tab-group/chr-tab-group.component.spec.ts +23 -0
- package/src/lib/chr-tab-group/chr-tab-group.component.ts +48 -0
- package/src/lib/chr-table/chr-table.component.html +151 -0
- package/src/lib/chr-table/chr-table.component.scss +35 -0
- package/src/lib/chr-table/chr-table.component.spec.ts +23 -0
- package/src/lib/chr-table/chr-table.component.ts +277 -0
- package/src/lib/chr-table-header-cell/chr-table-header-cell.component.html +18 -0
- package/src/lib/chr-table-header-cell/chr-table-header-cell.component.scss +22 -0
- package/src/lib/chr-table-header-cell/chr-table-header-cell.component.spec.ts +23 -0
- package/src/lib/chr-table-header-cell/chr-table-header-cell.component.ts +51 -0
- package/src/lib/chr-table-new/chr-table-new.component.html +212 -0
- package/src/lib/chr-table-new/chr-table-new.component.scss +191 -0
- package/src/lib/chr-table-new/chr-table-new.component.spec.ts +22 -0
- package/src/lib/chr-table-new/chr-table-new.component.ts +322 -0
- package/src/lib/chr-tag-select/chr-tag-select.component.html +77 -0
- package/src/lib/chr-tag-select/chr-tag-select.component.scss +29 -0
- package/src/lib/chr-tag-select/chr-tag-select.component.spec.ts +22 -0
- package/src/lib/chr-tag-select/chr-tag-select.component.ts +292 -0
- package/src/lib/chr-toast/toast.html +42 -0
- package/src/lib/chr-toast/toast.scss +152 -0
- package/src/lib/chr-toast/toast.spec.ts +22 -0
- package/src/lib/chr-toast/toast.ts +60 -0
- package/src/lib/chr-toast-container/toast-container.html +7 -0
- package/src/lib/chr-toast-container/toast-container.scss +6 -0
- package/src/lib/chr-toast-container/toast-container.spec.ts +23 -0
- package/src/lib/chr-toast-container/toast-container.ts +55 -0
- package/src/lib/chr-toast-legacy/chr-toast.component.html +15 -0
- package/src/lib/chr-toast-legacy/chr-toast.component.scss +46 -0
- package/src/lib/chr-toast-legacy/chr-toast.component.spec.ts +23 -0
- package/src/lib/chr-toast-legacy/chr-toast.component.ts +18 -0
- package/src/lib/config/interceptors/CachingInterceptor.ts +47 -0
- package/src/lib/config/interceptors/ProgressInterceptor.ts +56 -0
- package/src/lib/config/interceptors/SpinnerInterceptor.ts +31 -0
- package/src/lib/config/interceptors/XsrfInterceptor.ts +66 -0
- package/src/lib/config/interceptors/old_SpinnerInterceptor.ts +40 -0
- package/src/lib/config/ngx-mask.config.ts +59 -0
- package/src/lib/config/providers/debounce-plugin-provider.ts +10 -0
- package/src/lib/config/providers/xsrf-provider.ts +46 -0
- package/src/lib/directives/autofocus.directive.ts +14 -0
- package/src/lib/directives/chr-hover-title.directive.ts +266 -0
- package/src/lib/directives/chr-hover.directive.ts +260 -0
- package/src/lib/directives/chr-popover-directive.directive.ts +185 -0
- package/src/lib/directives/context-menu.directive.ts +220 -0
- package/src/lib/directives/control-click.directive.ts +69 -0
- package/src/lib/directives/cross-cell-navigation.directive.ts +78 -0
- package/src/lib/directives/debounce.directive.ts +73 -0
- package/src/lib/directives/outside-click-aware.directive.ts +29 -0
- package/src/lib/directives/prevent-reload.directive.ts +19 -0
- package/src/lib/directives/scroll-into-view.directive.ts +30 -0
- package/src/lib/directives/tab-input-only-handler.directive.ts +30 -0
- package/src/lib/directives/tab-to-enter-handler.directive.ts +24 -0
- package/src/lib/guards/form-deactivation/deactivation.guard.spec.ts +21 -0
- package/src/lib/guards/form-deactivation/deactivation.guard.ts +36 -0
- package/src/lib/models/AnonymousTable.model.ts +219 -0
- package/src/lib/models/AutoDataSource.model.ts +283 -0
- package/src/lib/models/AutoDataTable.model.ts +144 -0
- package/src/lib/models/CanBeDeactivated.ts +3 -0
- package/src/lib/models/ColumnMetadata.model.ts +250 -0
- package/src/lib/models/FilterMode.enum.ts +9 -0
- package/src/lib/models/GroupAggregationEnum.ts +7 -0
- package/src/lib/models/Position.model.ts +14 -0
- package/src/lib/models/TableConstraint.model.ts +68 -0
- package/src/lib/models/TableConstraintColumn.model.ts +58 -0
- package/src/lib/models/TableConstraintReference.model.ts +46 -0
- package/src/lib/models/chr-validators/base-validator.ts +117 -0
- package/src/lib/models/chr-validators/decimal-validator.ts +58 -0
- package/src/lib/models/chr-validators/max-date-validator.ts +51 -0
- package/src/lib/models/chr-validators/max-file-size-validator.ts +72 -0
- package/src/lib/models/chr-validators/maxlength-validator.ts +50 -0
- package/src/lib/models/chr-validators/min-file-size-validator.ts +73 -0
- package/src/lib/models/chr-validators/minlength-validator.ts +50 -0
- package/src/lib/models/chr-validators/required-validator.ts +53 -0
- package/src/lib/models/chr-validators/type-validator.ts +56 -0
- package/src/lib/models/colors.ts +92 -0
- package/src/lib/models/context-menu.ts +21 -0
- package/src/lib/models/controls.ts +74 -0
- package/src/lib/models/exporters/csvExporter.ts +28 -0
- package/src/lib/models/exporters/exporter.ts +15 -0
- package/src/lib/models/exporters/jsonExporter.ts +25 -0
- package/src/lib/models/file.ts +46 -0
- package/src/lib/models/formatters/base.formatter.ts +52 -0
- package/src/lib/models/formatters/bit.formatter.ts +65 -0
- package/src/lib/models/formatters/character.formatter.ts +71 -0
- package/src/lib/models/formatters/date.formatter.ts +75 -0
- package/src/lib/models/formatters/formatter.interface.ts +22 -0
- package/src/lib/models/formatters/number.formatter.ts +93 -0
- package/src/lib/models/formatters/time.formatter.ts +65 -0
- package/src/lib/models/formatters/varchar.formatter.ts +66 -0
- package/src/lib/models/live-update-message.ts +18 -0
- package/src/lib/models/modal.ts +279 -0
- package/src/lib/models/toasts/toast-config.ts +28 -0
- package/src/lib/models/toasts/toast-ref.ts +23 -0
- package/src/lib/models/toasts/toast.ts +25 -0
- package/src/lib/models/tokens/caching-defaults-token.ts +18 -0
- package/src/lib/models/tokens/debounce-defaults-token.ts +22 -0
- package/src/lib/models/tokens/http-context-tokens.ts +3 -0
- package/src/lib/models/tokens/modal-tokens.ts +13 -0
- package/src/lib/models/tokens/spinner-token.ts +3 -0
- package/src/lib/plugins/debounce-event.ts +34 -0
- package/src/lib/services/cache/cache.service.ts +94 -0
- package/src/lib/services/cache/cache.spec.ts +16 -0
- package/src/lib/services/cookie.service.ts +56 -0
- package/src/lib/services/data-exporter.service.ts +44 -0
- package/src/lib/services/data-formatter.service.ts +62 -0
- package/src/lib/services/data.service.ts +81 -0
- package/src/lib/services/dialog.service.ts +45 -0
- package/src/lib/services/files.service.ts +122 -0
- package/src/lib/services/live-update.service.ts +130 -0
- package/src/lib/services/loader.service.ts +33 -0
- package/src/lib/services/modal.service.ts +52 -0
- package/src/lib/services/progress/progress.service.ts +47 -0
- package/src/lib/services/progress/progress.spec.ts +16 -0
- package/src/lib/services/spinner.service.ts +56 -0
- package/src/lib/services/toast/toast-service.spec.ts +16 -0
- package/src/lib/services/toast/toast-service.ts +60 -0
- package/src/lib/services/toast.service.ts +77 -0
- package/src/lib/styles/_colors-classes.scss +111 -0
- package/src/lib/styles/_colors-selectors.scss +59 -0
- package/src/lib/styles/_hover-colors-selectors.scss +59 -0
- package/src/lib/styles/colors.scss +3 -0
- package/src/lib/styles/corners.scss +251 -0
- package/src/lib/styles/forms.scss +72 -0
- package/src/lib/styles/h.scss +17 -0
- package/src/lib/styles/hollow-font.scss +35 -0
- package/src/lib/styles/links.scss +41 -0
- package/src/lib/styles/material_symbols.scss +18 -0
- package/src/lib/styles/trapeze.scss +57 -0
- package/src/public-api.ts +163 -0
- package/tailwind.config.js +46 -0
- package/tsconfig.lib.json +25 -0
- package/tsconfig.lib.prod.json +16 -0
- package/tsconfig.spec.json +22 -0
- package/chrv-components-1.12.108.tgz +0 -0
- package/fesm2022/chrv-components.mjs +0 -8984
- package/fesm2022/chrv-components.mjs.map +0 -1
- package/types/chrv-components.d.ts +0 -3192
|
Binary file
|
package/ng-package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
|
3
|
+
"dest": "../../dist/chrv-components",
|
|
4
|
+
"lib": {
|
|
5
|
+
"entryFile": "src/public-api.ts"
|
|
6
|
+
},
|
|
7
|
+
"assets": ["styles.scss", "src/lib/styles/**/*.css"],
|
|
8
|
+
"allowedNonPeerDependencies": [
|
|
9
|
+
"@angular/material",
|
|
10
|
+
"ngx-pagination",
|
|
11
|
+
"chrv-pipes",
|
|
12
|
+
"@microsoft/signalr",
|
|
13
|
+
"material-symbols",
|
|
14
|
+
"date-fns",
|
|
15
|
+
"ngx-mask"
|
|
16
|
+
]
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,33 +1,21 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "chrv-components",
|
|
3
|
-
"version": "1.12.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": ">=22.0.0",
|
|
6
|
-
"@angular/core": ">=22.0.0",
|
|
7
|
-
"@angular/forms": ">=22.0.0",
|
|
8
|
-
"tailwindcss": ">=3.2.4"
|
|
9
|
-
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"tslib": ">=2.3.0",
|
|
12
|
-
"@angular/material": ">=22.0.0",
|
|
13
|
-
"material-symbols": ">=0.38.0",
|
|
14
|
-
"ngx-pagination": ">=6.0.3",
|
|
15
|
-
"chrv-pipes": ">=1.3.5",
|
|
16
|
-
"date-fns": ">=4.1.0",
|
|
17
|
-
"@microsoft/signalr": ">=8.0.7",
|
|
18
|
-
"ngx-mask": ">=20.0.3"
|
|
19
|
-
},
|
|
20
|
-
"sideEffects": false
|
|
21
|
-
|
|
22
|
-
"typings": "types/chrv-components.d.ts",
|
|
23
|
-
"exports": {
|
|
24
|
-
"./package.json": {
|
|
25
|
-
"default": "./package.json"
|
|
26
|
-
},
|
|
27
|
-
".": {
|
|
28
|
-
"types": "./types/chrv-components.d.ts",
|
|
29
|
-
"default": "./fesm2022/chrv-components.mjs"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"type": "module"
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "chrv-components",
|
|
3
|
+
"version": "1.12.109",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": ">=22.0.0",
|
|
6
|
+
"@angular/core": ">=22.0.0",
|
|
7
|
+
"@angular/forms": ">=22.0.0",
|
|
8
|
+
"tailwindcss": ">=3.2.4"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"tslib": ">=2.3.0",
|
|
12
|
+
"@angular/material": ">=22.0.0",
|
|
13
|
+
"material-symbols": ">=0.38.0",
|
|
14
|
+
"ngx-pagination": ">=6.0.3",
|
|
15
|
+
"chrv-pipes": ">=1.3.5",
|
|
16
|
+
"date-fns": ">=4.1.0",
|
|
17
|
+
"@microsoft/signalr": ">=8.0.7",
|
|
18
|
+
"ngx-mask": ">=20.0.3"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// import { animate, style, transition, trigger } from '@angular/animations';
|
|
2
|
+
|
|
3
|
+
// export const inOutAnimation = (duration: number = 500) =>
|
|
4
|
+
// trigger('inOutAnimation', [
|
|
5
|
+
// transition(':enter', [
|
|
6
|
+
// style({ opacity: 0 }),
|
|
7
|
+
// animate(`${duration}ms ease-out`, style({ opacity: 1 })),
|
|
8
|
+
// ]),
|
|
9
|
+
// transition(':leave', [
|
|
10
|
+
// style({ opacity: 1 }),
|
|
11
|
+
// animate(`${duration}ms ease-in`, style({ opacity: 0 })),
|
|
12
|
+
// ]),
|
|
13
|
+
// ]);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// import {
|
|
2
|
+
// animate,
|
|
3
|
+
// style,
|
|
4
|
+
// transition,
|
|
5
|
+
// trigger,
|
|
6
|
+
// state,
|
|
7
|
+
// } from '@angular/animations';
|
|
8
|
+
|
|
9
|
+
// export const rotationAnimation = (
|
|
10
|
+
// initialAngle: number = 0,
|
|
11
|
+
// endAngle: number = 360,
|
|
12
|
+
// duration: number = 500
|
|
13
|
+
// ) =>
|
|
14
|
+
// trigger('rotationAnimation', [
|
|
15
|
+
// state(
|
|
16
|
+
// 'initial',
|
|
17
|
+
// style({
|
|
18
|
+
// transform: `rotate(${initialAngle}deg)`,
|
|
19
|
+
// })
|
|
20
|
+
// ),
|
|
21
|
+
// state(
|
|
22
|
+
// 'rotated',
|
|
23
|
+
// style({
|
|
24
|
+
// transform: `rotate(${endAngle}deg)`,
|
|
25
|
+
// })
|
|
26
|
+
// ),
|
|
27
|
+
// transition('initial => rotated', [
|
|
28
|
+
// //style({ opacity: 0 }),
|
|
29
|
+
// animate(`${duration}ms ease`),
|
|
30
|
+
// ]),
|
|
31
|
+
// transition('rotated => initial', [
|
|
32
|
+
// //style({ opacity: 1 }),
|
|
33
|
+
// animate(`${duration}ms ease`),
|
|
34
|
+
// ]),
|
|
35
|
+
// ]);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="w-full flex flex-row flex-wrap dark:!text-gray-400">
|
|
2
|
+
@for (crumb of crumbs(); track crumb; let index = $index) {
|
|
3
|
+
<div class="w-fit min-w-fit">
|
|
4
|
+
<button class="dark:!text-gray-400" [disabled]="!crumb.link && !crumb.callback" mat-button
|
|
5
|
+
(click)="crumb.callback?.() || crumb.link && navigateTo(crumb.link)">
|
|
6
|
+
{{ crumb.display }}
|
|
7
|
+
</button>
|
|
8
|
+
@if (index < (crumbs()?.length || 1) - 1) {
|
|
9
|
+
<span>></span>
|
|
10
|
+
}
|
|
11
|
+
</div>
|
|
12
|
+
}
|
|
13
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { BreadcrumbComponent } from './chr-breadcrumb.component';
|
|
4
|
+
|
|
5
|
+
describe('BreadcrumbComponent', () => {
|
|
6
|
+
let component: BreadcrumbComponent;
|
|
7
|
+
let fixture: ComponentFixture<BreadcrumbComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [BreadcrumbComponent],
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
|
|
14
|
+
fixture = TestBed.createComponent(BreadcrumbComponent);
|
|
15
|
+
component = fixture.componentInstance;
|
|
16
|
+
fixture.detectChanges();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('should create', () => {
|
|
20
|
+
expect(component).toBeTruthy();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Component, inject, input, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import { MatButton } from '@angular/material/button';
|
|
4
|
+
|
|
5
|
+
export interface Breadcrumb {
|
|
6
|
+
display: string;
|
|
7
|
+
link?: string;
|
|
8
|
+
callback?: Function;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: 'app-chr-breadcrumb, chr-breadcrumb',
|
|
13
|
+
templateUrl: './chr-breadcrumb.component.html',
|
|
14
|
+
styleUrls: [
|
|
15
|
+
'./chr-breadcrumb.component.scss',
|
|
16
|
+
'../../../../../tailwindbuild.css',
|
|
17
|
+
],
|
|
18
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
19
|
+
imports: [MatButton],
|
|
20
|
+
})
|
|
21
|
+
export class BreadcrumbComponent {
|
|
22
|
+
router = inject(Router);
|
|
23
|
+
|
|
24
|
+
readonly crumbs = input<Breadcrumb[]>();
|
|
25
|
+
|
|
26
|
+
navigateTo = (uri: string, data?: any) => {
|
|
27
|
+
this.router.navigate([uri], { state: data });
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
button {
|
|
6
|
+
font-size: inherit;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
gap: 0.5rem;
|
|
11
|
+
text-align: center;
|
|
12
|
+
|
|
13
|
+
.material-symbols {
|
|
14
|
+
font-size: inherit;
|
|
15
|
+
|
|
16
|
+
&[data-size="small"]{
|
|
17
|
+
font-size: 0.85rem;
|
|
18
|
+
}
|
|
19
|
+
&[data-size="medium"] {
|
|
20
|
+
font-size: 1rem;
|
|
21
|
+
}
|
|
22
|
+
&[data-size="large"] {
|
|
23
|
+
font-size: 1.25rem;
|
|
24
|
+
}
|
|
25
|
+
&[data-size="inherit"] {
|
|
26
|
+
font-size: inherit;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.spinner-wrapper {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
align-items: center;
|
|
35
|
+
|
|
36
|
+
&[data-size="medium"] {
|
|
37
|
+
--btn-spinner-size: 1rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[data-size="large"] {
|
|
41
|
+
--btn-spinner-size: 1.25rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&[data-size="inherit"] {
|
|
45
|
+
--btn-spinner-size: inherit;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
height: var(--btn-spinner-size);
|
|
49
|
+
width: var(--btn-spinner-size);
|
|
50
|
+
|
|
51
|
+
.spinner {
|
|
52
|
+
aspect-ratio: 1 / 1;
|
|
53
|
+
height: var(--btn-spinner-size);
|
|
54
|
+
width: var(--btn-spinner-size);
|
|
55
|
+
/* border: 0.125rem solid color-mix(in srgb, var(--btn-bg-color) 20%, var(--background-color) 80%);
|
|
56
|
+
border-top: 0.125rem solid var(--btn-bg-contrast-color); */
|
|
57
|
+
border: 0.125rem solid color-mix(in srgb, var(--btn-bg-color) 60%, var(--background-color) 40%);
|
|
58
|
+
border-top: 0.125rem solid var(--btn-bg-contrast-color);
|
|
59
|
+
border-radius: 50%;
|
|
60
|
+
animation: spin 0.7s linear infinite;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:hover{
|
|
65
|
+
.spinner{
|
|
66
|
+
border-color: var(--btn-bg-color);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@keyframes spin {
|
|
72
|
+
0% {
|
|
73
|
+
transform: rotate(0deg);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
100% {
|
|
77
|
+
transform: rotate(360deg);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.btn {
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
gap: 0.25rem;
|
|
84
|
+
border: none;
|
|
85
|
+
border-radius: 0.5rem;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
user-select: none;
|
|
88
|
+
padding: 0.5rem 1rem;
|
|
89
|
+
background: var(--btn-bg-color, var(--background-color));
|
|
90
|
+
color: var(--btn-bg-contrast-color, var(--text-color));
|
|
91
|
+
transition: background 0.2s, color 0.2s;
|
|
92
|
+
|
|
93
|
+
&:hover {
|
|
94
|
+
background: color-mix(in srgb, var(--btn-bg-contrast-color, var(--background-color)) 10%, var(--btn-bg-color, var(--neutral-color)) 90%);
|
|
95
|
+
color: color-mix(in srgb, var(--btn-bg-color, var(--background-color)) 10%, var(--btn-bg-contrast-color, var(--text-color)) 90%);
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.btn-outlined {
|
|
101
|
+
background: none;
|
|
102
|
+
border: 1px solid var(--btn-bg-color, var(--neutral-color));
|
|
103
|
+
color: var(--btn-bg-color, var(--text-color));
|
|
104
|
+
|
|
105
|
+
&:hover {
|
|
106
|
+
background: var(--btn-bg-color, var(--neutral-color));
|
|
107
|
+
color: var(--btn-bg-contrast-color, var(--text-color));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.btn-ghost {
|
|
112
|
+
background: none;
|
|
113
|
+
color: var(--btn-bg-color, var(--text-color));
|
|
114
|
+
|
|
115
|
+
&:hover {
|
|
116
|
+
background: color-mix(in srgb, var(--btn-bg-color, var(--text-color)) 10%, transparent 90%);
|
|
117
|
+
color: var(--btn-bg-color, var(--text-color));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.btn-min-pdg {
|
|
122
|
+
padding: 0.125rem 0.125rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.btn-med-pdg {
|
|
126
|
+
padding: 0.375rem 0.75rem;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.btn-fixed {
|
|
130
|
+
width: 8rem;
|
|
131
|
+
text-align: center;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.btn-primary {
|
|
135
|
+
--btn-bg-color: var(--primary-color);
|
|
136
|
+
--btn-bg-contrast-color: var(--primary-contrast-color);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.btn-secondary {
|
|
140
|
+
--btn-bg-color: var(--secondary-color);
|
|
141
|
+
--btn-bg-contrast-color: var(--secondary-contrast-color);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.btn-tertiary {
|
|
145
|
+
--btn-bg-color: var(--tertiary-color);
|
|
146
|
+
--btn-bg-contrast-color: var(--tertiary-contrast-color);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.btn-warning {
|
|
150
|
+
--btn-bg-color: var(--warn-color);
|
|
151
|
+
--btn-bg-contrast-color: var(--warn-contrast-color);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.btn-error {
|
|
155
|
+
--btn-bg-color: var(--error-color);
|
|
156
|
+
--btn-bg-contrast-color: var(--error-contrast-color);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.btn-success {
|
|
160
|
+
--btn-bg-color: var(--success-color);
|
|
161
|
+
--btn-bg-contrast-color: var(--success-contrast-color);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.btn-disabled,
|
|
165
|
+
.btn[disabled] {
|
|
166
|
+
--btn-bg-color: color-mix(in srgb, var(--neutral-color) 50%, var(--btn-bg-color) 50%);
|
|
167
|
+
--btn-bg-contrast-color: color-mix(in srgb, var(--text-color) 50%, var(--btn-bg-contrast-color) 50%);
|
|
168
|
+
|
|
169
|
+
cursor: not-allowed;
|
|
170
|
+
opacity: 0.6;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.btn-link {
|
|
174
|
+
background: none;
|
|
175
|
+
border: none;
|
|
176
|
+
color: var(--link-color);
|
|
177
|
+
text-decoration: underline;
|
|
178
|
+
padding: 0;
|
|
179
|
+
|
|
180
|
+
/* font-size: 1rem; */
|
|
181
|
+
&:hover {
|
|
182
|
+
color: var(--link-hover-color);
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<button [type]="type()" class="btn btn-{{color()}}" [class.btn-outlined]="variant() == 'outlined'"
|
|
2
|
+
[class.btn-ghost]="variant() == 'ghost'" [class.btn-med-pdg]="padding() == 'medium'"
|
|
3
|
+
[class.btn-min-pdg]="padding() == 'none'" [disabled]="disabled()" [style.width.rem]="fixed()"
|
|
4
|
+
(click)="handleClick($event)">
|
|
5
|
+
@if(loading()){
|
|
6
|
+
<div class="spinner-wrapper" [attr.data-size]="iconSize()">
|
|
7
|
+
<div class="spinner"></div>
|
|
8
|
+
</div>
|
|
9
|
+
} @else {
|
|
10
|
+
@let text = display();
|
|
11
|
+
@if(text){
|
|
12
|
+
<span>{{text}}</span>
|
|
13
|
+
} @else {
|
|
14
|
+
<ng-content></ng-content>
|
|
15
|
+
}
|
|
16
|
+
@if(icon()){
|
|
17
|
+
<span [attr.data-size]="iconSize()" class="material-symbols">{{icon()}}</span>
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
</button>
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
ElementRef,
|
|
5
|
+
inject,
|
|
6
|
+
input,
|
|
7
|
+
model,
|
|
8
|
+
OnInit,
|
|
9
|
+
output,
|
|
10
|
+
} from '@angular/core';
|
|
11
|
+
import { MaybeAsync } from '@angular/router';
|
|
12
|
+
import { from, Observable } from 'rxjs';
|
|
13
|
+
|
|
14
|
+
export type ButtonColors =
|
|
15
|
+
| 'primary'
|
|
16
|
+
| 'secondary'
|
|
17
|
+
| 'tertiary'
|
|
18
|
+
| 'error'
|
|
19
|
+
| 'warning'
|
|
20
|
+
| 'success'
|
|
21
|
+
| 'none';
|
|
22
|
+
|
|
23
|
+
@Component({
|
|
24
|
+
selector: 'chr-button',
|
|
25
|
+
imports: [],
|
|
26
|
+
templateUrl: './button.component.html',
|
|
27
|
+
styleUrl: './button.component.css',
|
|
28
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
29
|
+
})
|
|
30
|
+
export class ChrButtonComponent implements OnInit {
|
|
31
|
+
private elementRef = inject(ElementRef);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Button's text
|
|
35
|
+
*/
|
|
36
|
+
public display = input<string>();
|
|
37
|
+
|
|
38
|
+
public variant = input<'filled' | 'outlined' | 'ghost'>('filled');
|
|
39
|
+
|
|
40
|
+
public padding = input<'large' | 'medium' | 'none'>('large');
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Name of the Google Material Symbols icon
|
|
44
|
+
*/
|
|
45
|
+
public icon = input<string>();
|
|
46
|
+
public iconSize = input<'small' | 'medium' | 'large' | 'inherit'>('medium');
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Button's color. It will affect both the text and the icon
|
|
50
|
+
*/
|
|
51
|
+
public color = input<ButtonColors>('none');
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* HTML Button type
|
|
55
|
+
*/
|
|
56
|
+
public type = input<'submit' | 'button'>('button');
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Whether or not the button is disabled
|
|
60
|
+
*/
|
|
61
|
+
public disabled = input<boolean>(false);
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Fixed width in REM
|
|
65
|
+
*/
|
|
66
|
+
public fixed = input<number | null>(null);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The input may be either a function that returns a value or an observable, or a value that will be wrapped in a click event.
|
|
70
|
+
* If the value is an observable the button will enter a loading state during the observable's execution. Otherwise, the function will be executed and it's return value directly returned.
|
|
71
|
+
* If the value is not a function, the value will be directly returned.
|
|
72
|
+
* @param The function the value to be handled on click
|
|
73
|
+
*/
|
|
74
|
+
public action = input<any | (() => MaybeAsync<any>)>();
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Trigger a click programmatically.
|
|
78
|
+
*/
|
|
79
|
+
public click = () => {
|
|
80
|
+
this.elementRef.nativeElement.click();
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The event that will be thrown when the button is clicked
|
|
85
|
+
*/
|
|
86
|
+
public onAction = output<{ event: MouseEvent; value: any }>();
|
|
87
|
+
|
|
88
|
+
public loading = model<true | false>(false);
|
|
89
|
+
|
|
90
|
+
ngOnInit(): void {}
|
|
91
|
+
|
|
92
|
+
public handleClick = (
|
|
93
|
+
event: MouseEvent | Event | null = null,
|
|
94
|
+
): { event: MouseEvent | Event | null; value: any } => {
|
|
95
|
+
this.loading.set(true);
|
|
96
|
+
const click = this.action();
|
|
97
|
+
const result = typeof click === 'function' ? click() : click;
|
|
98
|
+
|
|
99
|
+
const obs: Observable<any> | any =
|
|
100
|
+
result instanceof Promise || (result && typeof result.then === 'function')
|
|
101
|
+
? from(result)
|
|
102
|
+
: result instanceof Observable
|
|
103
|
+
? result
|
|
104
|
+
: result;
|
|
105
|
+
|
|
106
|
+
if (result)
|
|
107
|
+
(result as Observable<any>).subscribe({
|
|
108
|
+
complete: () => this.loading.set(false),
|
|
109
|
+
error: () => this.loading.set(false),
|
|
110
|
+
});
|
|
111
|
+
else {
|
|
112
|
+
this.loading.set(false);
|
|
113
|
+
}
|
|
114
|
+
return { event: event, value: obs };
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<a class="flex flex-row cursor-pointer items-center justify-center align-middle h-9 m-0 p-2 rounded-md"
|
|
2
|
+
style="--color: {{getBackgroundColor(color())}};" [ngClass]="[getBackgroundColor(color()), getWidth(), getShadow()]"
|
|
3
|
+
[attr.disabled]="disabled() || false" (click)="doClick()" [attr.href]="href() && href()"
|
|
4
|
+
[attr.target]="target() && target()" [chrTitle]="tooltip()||''" [chrTitlePosition]="tooltipPosition()||'above'">
|
|
5
|
+
@if (display()) {
|
|
6
|
+
<span [ngClass]="getTextColor(color())" class="text-nowrap overflow-hidden text-ellipsis">{{display()}}</span>
|
|
7
|
+
}
|
|
8
|
+
@if (icon()) {
|
|
9
|
+
<mat-icon class="!m-0" [ngClass]="getTextColor(color())">{{ icon() }}</mat-icon>
|
|
10
|
+
}
|
|
11
|
+
</a>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
@use '../../../styles.scss';
|
|
2
|
+
|
|
3
|
+
.icon-button {
|
|
4
|
+
width: 20px !important;
|
|
5
|
+
}
|
|
6
|
+
.icon-button > *{
|
|
7
|
+
width: min-content;
|
|
8
|
+
margin: 0 !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.chr-button{
|
|
12
|
+
color: var(--textcolor) !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.chr-button.mat-mdc-button-disabled {
|
|
16
|
+
color: rgba(0, 0, 0, 0.26);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.small-button {
|
|
20
|
+
@apply sm:w-9;
|
|
21
|
+
@apply sm:h-9;
|
|
22
|
+
min-width: 38px !important;
|
|
23
|
+
padding: 0px !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
a:hover{
|
|
27
|
+
filter: brightness(120%);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
a[disabled=true]{
|
|
31
|
+
background-color: rgba(0, 0, 0, 0.26) !important;
|
|
32
|
+
cursor: not-allowed;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.button-shadow{
|
|
36
|
+
box-shadow: 1px 6px 10px 0px rgba(black, $alpha: 0.2);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@media (prefers-color-scheme: dark) {
|
|
40
|
+
a[disabled=true] {
|
|
41
|
+
background-color: rgba(250, 250, 250, 0.26) !important;
|
|
42
|
+
}
|
|
43
|
+
a[disabled=true]>* {
|
|
44
|
+
color: rgba(200, 200, 200, .54) !important;
|
|
45
|
+
}
|
|
46
|
+
a:hover {
|
|
47
|
+
filter: brightness(80%);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
a[disabled=true] > * {
|
|
52
|
+
color: rgba(0, 0, 0, .54) !important;
|
|
53
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
|
|
3
|
+
import { ChrButtonLegacyComponent } from './chr-button.component';
|
|
4
|
+
|
|
5
|
+
describe('ChrButtonComponent', () => {
|
|
6
|
+
let component: ChrButtonLegacyComponent;
|
|
7
|
+
let fixture: ComponentFixture<ChrButtonLegacyComponent>;
|
|
8
|
+
|
|
9
|
+
beforeEach(async () => {
|
|
10
|
+
await TestBed.configureTestingModule({
|
|
11
|
+
imports: [ChrButtonLegacyComponent],
|
|
12
|
+
}).compileComponents();
|
|
13
|
+
|
|
14
|
+
fixture = TestBed.createComponent(ChrButtonLegacyComponent);
|
|
15
|
+
component = fixture.componentInstance;
|
|
16
|
+
fixture.detectChanges();
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it('should create', () => {
|
|
20
|
+
expect(component).toBeTruthy();
|
|
21
|
+
});
|
|
22
|
+
});
|