@sixbell-telco/sdk 0.1.3 → 0.1.5
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/CHANGELOG.md +128 -4
- package/README.md +53 -45
- package/components/accordion/accordion-item/accordion-item.component.d.ts +9 -6
- package/components/avatar/src/avatar.component.d.ts +17 -12
- package/components/button/src/button.component.d.ts +29 -28
- package/components/card/src/card.component.d.ts +18 -12
- package/components/dropdown/src/dropdown.component.d.ts +29 -27
- package/components/dual-list/src/dual-list.component.d.ts +47 -37
- package/components/file-upload/file-uploader/src/file-uploader.component.d.ts +20 -11
- package/components/forms/checkbox/src/checkbox.component.d.ts +7 -3
- package/components/forms/combobox/src/combobox.component.d.ts +17 -16
- package/components/forms/input/src/input.component.d.ts +20 -15
- package/components/forms/radio/src/radio.component.d.ts +14 -1
- package/components/forms/range/src/range.component.d.ts +11 -11
- package/components/forms/select/src/select.component.d.ts +17 -15
- package/components/forms/switch/src/switch.component.d.ts +11 -11
- package/components/forms/textarea/src/textarea.component.d.ts +20 -16
- package/components/forms/toggle/src/toggle.component.d.ts +12 -7
- package/components/icon/src/icon.component.d.ts +12 -7
- package/components/link/src/link.component.d.ts +27 -16
- package/components/modal/src/modal.component.d.ts +18 -7
- package/components/notification/src/notification.component.d.ts +15 -7
- package/components/paginator/components/pagination-item/pagination-item.component.d.ts +18 -7
- package/components/product-card/src/product-card.component.d.ts +42 -17
- package/components/progress/src/progress.component.d.ts +9 -7
- package/components/tab/directives/tab-content/tab-content.directive.d.ts +8 -10
- package/components/tab/directives/tab-header/tab-header.directive.d.ts +9 -12
- package/components/tab/src/tab.component.d.ts +14 -9
- package/components/table/src/table.component.d.ts +28 -17
- package/components/toast/toast-message/toast-message.component.d.ts +9 -7
- package/components/tooltip/src/tooltip.component.d.ts +12 -7
- package/components/wizard/wizard-content/wizard-content.component.d.ts +3 -3
- package/directives/typography/src/typography.directive.d.ts +13 -12
- package/esm2022/components/accordion/accordion-item/accordion-item.component.mjs +7 -7
- package/esm2022/components/accordion/src/accordion.component.mjs +3 -3
- package/esm2022/components/avatar/src/avatar.component.mjs +7 -7
- package/esm2022/components/button/src/button.component.mjs +13 -11
- package/esm2022/components/card/src/card.component.mjs +7 -7
- package/esm2022/components/dropdown/src/dropdown.component.mjs +15 -11
- package/esm2022/components/dual-list/src/dual-list.component.mjs +53 -33
- package/esm2022/components/file-upload/file-dropzone/src/file-dropzone.component.mjs +3 -4
- package/esm2022/components/file-upload/file-uploader/src/file-uploader.component.mjs +28 -22
- package/esm2022/components/forms/checkbox/src/checkbox.component.mjs +9 -9
- package/esm2022/components/forms/combobox/src/combobox.component.mjs +31 -28
- package/esm2022/components/forms/datepicker/src/datepicker.component.mjs +3 -3
- package/esm2022/components/forms/form-error/src/form-error.component.mjs +3 -3
- package/esm2022/components/forms/input/src/input.component.mjs +34 -34
- package/esm2022/components/forms/radio/src/radio.component.mjs +53 -4
- package/esm2022/components/forms/range/src/range.component.mjs +14 -13
- package/esm2022/components/forms/select/src/select.component.mjs +30 -28
- package/esm2022/components/forms/switch/src/switch.component.mjs +15 -14
- package/esm2022/components/forms/textarea/src/textarea.component.mjs +35 -36
- package/esm2022/components/forms/toggle/src/toggle.component.mjs +113 -90
- package/esm2022/components/icon/src/icon.component.mjs +9 -8
- package/esm2022/components/link/src/link.component.mjs +26 -20
- package/esm2022/components/modal/src/modal.component.mjs +17 -13
- package/esm2022/components/notification/src/notification.component.mjs +10 -8
- package/esm2022/components/paginator/components/pagination-item/pagination-item.component.mjs +18 -15
- package/esm2022/components/paginator/src/paginator.component.mjs +3 -3
- package/esm2022/components/product-card/src/product-card.component.mjs +52 -46
- package/esm2022/components/progress/src/progress.component.mjs +11 -11
- package/esm2022/components/tab/directives/tab-content/tab-content.directive.mjs +14 -13
- package/esm2022/components/tab/directives/tab-header/tab-header.directive.mjs +17 -15
- package/esm2022/components/tab/src/tab.component.mjs +17 -15
- package/esm2022/components/table/src/table.component.mjs +32 -23
- package/esm2022/components/table/table-header-checkbox/table-header-checkbox.component.mjs +1 -1
- package/esm2022/components/table/table-row-checkbox/table-row-checkbox.component.mjs +1 -1
- package/esm2022/components/toast/toast-message/toast-message.component.mjs +22 -17
- package/esm2022/components/toast/toasts-container/toasts-container.component.mjs +2 -2
- package/esm2022/components/tooltip/src/tooltip.component.mjs +12 -10
- package/esm2022/components/wizard/wizard-content/wizard-content.component.mjs +6 -6
- package/esm2022/components/wizard/wizard-marker/wizard-marker.component.mjs +3 -3
- package/esm2022/components/wizard/wizard-step/wizard-step.component.mjs +3 -4
- package/esm2022/components/wizard/wizard-wrapper/wizard-wrapper.component.mjs +3 -11
- package/esm2022/directives/typography/src/typography.directive.mjs +9 -6
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs +9 -9
- package/fesm2022/sixbell-telco-sdk-components-accordion.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs +7 -7
- package/fesm2022/sixbell-telco-sdk-components-avatar.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-button.mjs +13 -11
- package/fesm2022/sixbell-telco-sdk-components-button.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-card.mjs +7 -7
- package/fesm2022/sixbell-telco-sdk-components-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs +15 -11
- package/fesm2022/sixbell-telco-sdk-components-dropdown.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs +51 -31
- package/fesm2022/sixbell-telco-sdk-components-dual-list.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs +2 -3
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-dropzone.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs +27 -21
- package/fesm2022/sixbell-telco-sdk-components-file-upload-file-uploader.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs +8 -8
- package/fesm2022/sixbell-telco-sdk-components-forms-checkbox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs +30 -27
- package/fesm2022/sixbell-telco-sdk-components-forms-combobox.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-datepicker.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs +2 -2
- package/fesm2022/sixbell-telco-sdk-components-forms-form-error.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs +33 -33
- package/fesm2022/sixbell-telco-sdk-components-forms-input.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs +52 -3
- package/fesm2022/sixbell-telco-sdk-components-forms-radio.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs +13 -12
- package/fesm2022/sixbell-telco-sdk-components-forms-range.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs +29 -27
- package/fesm2022/sixbell-telco-sdk-components-forms-select.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs +14 -13
- package/fesm2022/sixbell-telco-sdk-components-forms-switch.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs +34 -35
- package/fesm2022/sixbell-telco-sdk-components-forms-textarea.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs +113 -90
- package/fesm2022/sixbell-telco-sdk-components-forms-toggle.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs +9 -8
- package/fesm2022/sixbell-telco-sdk-components-icon.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-link.mjs +26 -20
- package/fesm2022/sixbell-telco-sdk-components-link.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-modal.mjs +17 -13
- package/fesm2022/sixbell-telco-sdk-components-modal.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs +10 -8
- package/fesm2022/sixbell-telco-sdk-components-notification.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs +20 -17
- package/fesm2022/sixbell-telco-sdk-components-paginator.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs +52 -46
- package/fesm2022/sixbell-telco-sdk-components-product-card.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs +11 -11
- package/fesm2022/sixbell-telco-sdk-components-progress.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs +46 -41
- package/fesm2022/sixbell-telco-sdk-components-tab.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-table.mjs +35 -25
- package/fesm2022/sixbell-telco-sdk-components-table.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs +23 -18
- package/fesm2022/sixbell-telco-sdk-components-toast.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs +12 -10
- package/fesm2022/sixbell-telco-sdk-components-tooltip.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs +11 -19
- package/fesm2022/sixbell-telco-sdk-components-wizard.mjs.map +1 -1
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs +8 -5
- package/fesm2022/sixbell-telco-sdk-directives-typography.mjs.map +1 -1
- package/package.json +9 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-table.mjs","sources":["../../../projects/sdk/components/table/table-header-checkbox/table-header-checkbox.component.ts","../../../projects/sdk/components/table/table-header-checkbox/table-header-checkbox.component.html","../../../projects/sdk/components/table/table-row-checkbox/table-row-checkbox.component.ts","../../../projects/sdk/components/table/table-row-checkbox/table-row-checkbox.component.html","../../../projects/sdk/components/table/src/table.component.ts","../../../projects/sdk/components/table/src/table.component.html","../../../projects/sdk/components/table/sixbell-telco-sdk-components-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Host, input, signal } from '@angular/core';\nimport { CheckboxComponent, CheckboxSizeProps, CheckboxVariantProps } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { TableComponent } from '../src/table.component';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'tr[header-checkbox]',\n\tstandalone: true,\n\timports: [CheckboxComponent],\n\ttemplateUrl: './table-header-checkbox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableHeaderCheckboxComponent {\n\tcheckboxVariant = input<CheckboxVariantProps>('primary');\n\tcheckboxSize = input<CheckboxSizeProps>('md');\n\tchecked = signal<boolean>(false);\n\tconstructor(@Host() private table: TableComponent) {}\n\n\thandleSelectAll(value: boolean) {\n\t\tthis.table.handleToggleAll(value);\n\t}\n}\n","<td class=\"w-4\">\n\t<app-checkbox [(value)]=\"checked\" (onChange)=\"handleSelectAll($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\" />\n</td>\n<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component, Host, input, signal } from '@angular/core';\nimport { CheckboxComponent, CheckboxSizeProps, CheckboxVariantProps } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { TableComponent } from '../src/table.component';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'tr[row-checkbox]',\n\tstandalone: true,\n\timports: [CheckboxComponent],\n\ttemplateUrl: './table-row-checkbox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableRowCheckboxComponent {\n\tcheckboxVariant = input<CheckboxVariantProps>('primary');\n\tcheckboxSize = input<CheckboxSizeProps>('md');\n\tidentifier = input.required();\n\tchecked = signal<boolean>(false);\n\n\tconstructor(@Host() private table: TableComponent) {}\n\n\thandleSelect(value: boolean) {\n\t\tthis.table.handleToggleCheckbox(value, this.identifier());\n\t}\n}\n","<td>\n\t<app-checkbox [(value)]=\"checked\" (onChange)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></app-checkbox>\n</td>\n<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect, input, output, signal } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { CheckboxComponent } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { SelectComponent } from '@sixbell-telco/sdk/components/forms/select';\nimport { PaginatorComponent } from '@sixbell-telco/sdk/components/paginator';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { VariantProps, cva, cx } from 'class-variance-authority';\nimport { TableHeaderCheckboxComponent } from '../table-header-checkbox/table-header-checkbox.component';\nimport { TableRowCheckboxComponent } from '../table-row-checkbox/table-row-checkbox.component';\n\nexport type PaginationType = 'default' | 'dots';\n\nexport const tableBase = cva(['relative border-separate border-spacing-0'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: ['table', 'font-body'],\n\t\t\tzebra: ['table', 'table-zebra', 'font-body'],\n\t\t},\n\t\tsize: {\n\t\t\txs: ['table-xs'],\n\t\t\tsm: ['table-sm'],\n\t\t\tmd: ['table-md'],\n\t\t\tlg: ['table-lg'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'zebra',\n\t\tsize: 'md',\n\t},\n});\n\nexport type TableBaseVariantProps = VariantProps<typeof tableBase>;\n\nexport const tableBox = cva(['flex flex-col gap-4 px-4 pb-10 pt-5 overflow-y-auto'], {\n\tvariants: {\n\t\tboxShadow: {\n\t\t\tnone: [],\n\t\t\tsecondary: ['shadow-secondary'],\n\t\t},\n\t\tboxHeight: {\n\t\t\tauto: ['h-auto'],\n\t\t\tfull: ['h-full'],\n\t\t\tsm: ['h-[400px]'],\n\t\t\tmd: ['h-[700px]'],\n\t\t\tlg: ['h-[80vh]'],\n\t\t},\n\t\tboxShape: {\n\t\t\t'round-sm': ['rounded-box-sm'],\n\t\t\t'round-md': ['rounded-box-md'],\n\t\t\t'round-lg': ['rounded-box-lg'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tboxShadow: 'none',\n\t\tboxHeight: 'auto',\n\t\tboxShape: 'round-sm',\n\t},\n});\nexport type TableBoxVariantProps = VariantProps<typeof tableBox>;\n\nexport interface TableVariantProps extends TableBaseVariantProps, TableBoxVariantProps {}\nexport const table = ({ size, variant, boxHeight, boxShadow, boxShape }: TableVariantProps = {}) =>\n\tcx(tableBase({ variant, size }), tableBox({ boxHeight, boxShadow, boxShape }));\n\nexport type TablePagination = {\n\tid: string;\n\tcurrentPage: number;\n\titemsPerPage: number;\n\tsearch: string;\n};\n\n@Component({\n\tselector: 'app-table',\n\tstandalone: true,\n\timports: [CommonModule, TranslateModule, PaginatorComponent, TypographyDirective, SelectComponent, CheckboxComponent],\n\ttemplateUrl: './table.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent {\n\t// Base table properties\n\tvariants = input<TableVariantProps>();\n\tbaseClass = input<string>('');\n\tboxClass = input<string>('');\n\tpaginatorType = input<PaginationType>('default');\n\n\t// Table data\n\tdata = input<unknown[]>([]);\n\ttotalItems = input<number>(0);\n\terror = input<string>('common.errors.no_data_found');\n\n\t// Paginator properties\n\tpagination = input<TablePagination>({ id: 'paginator', currentPage: 1, itemsPerPage: 10, search: '' });\n\tmaxSize = input<number>(7);\n\tonPageChange = output<number>();\n\tonPageSizeChange = output<number>();\n\tshowItemsPerPage = input<boolean>(true);\n\tshowEntries = input<boolean>(true);\n\n\tpaginationRange = computed(() => {\n\t\tconst start = this.pagination().currentPage * this.pagination().itemsPerPage - this.pagination().itemsPerPage + 1;\n\t\tconst end = Math.min(this.pagination().currentPage * this.pagination().itemsPerPage, this.totalItems());\n\t\treturn `${start}-${end}`;\n\t});\n\n\thandlePageChange(page: number) {\n\t\tthis.handleToggleAll(false);\n\t\tthis.onPageChange.emit(page);\n\t}\n\n\thandlePageSizeChange(size: number) {\n\t\tthis.handleToggleAll(false);\n\t\tthis.onPageSizeChange.emit(size);\n\t}\n\n\tget baseClasses() {\n\t\treturn cn(\n\t\t\ttableBase({\n\t\t\t\tvariant: this.variants()?.variant,\n\t\t\t\tsize: this.variants()?.size,\n\t\t\t}),\n\t\t\tthis.baseClass(),\n\t\t);\n\t}\n\n\tget boxClasses() {\n\t\treturn cn(\n\t\t\ttableBox({ boxShadow: this.variants()?.boxShadow, boxHeight: this.variants()?.boxHeight, boxShape: this.variants()?.boxShape }),\n\t\t\tthis.boxClass(),\n\t\t);\n\t}\n\n\t// For checkboxes on child components\n\theader = contentChild(TableHeaderCheckboxComponent, { descendants: true });\n\trows = contentChildren(TableRowCheckboxComponent, { descendants: true });\n\tidentifiers = signal<Set<unknown>>(new Set());\n\tonCheck = output<unknown[]>();\n\n\tcheckEffect = effect(() => {\n\t\tthis.onCheck.emit(Array.from(this.identifiers()));\n\t});\n\n\thandleToggleAll(value: boolean) {\n\t\tif (!value) {\n\t\t\tthis.clearList();\n\t\t}\n\n\t\tthis.rows().forEach((row) => {\n\t\t\trow.checked.set(value);\n\t\t\tif (value) {\n\t\t\t\tthis.identifiers.update((items) => new Set(items).add(row.identifier()));\n\t\t\t}\n\t\t});\n\t}\n\n\thandleToggleCheckbox(value: boolean, identifier: unknown) {\n\t\tif (value) {\n\t\t\tthis.identifiers.update((items) => new Set(items).add(identifier));\n\t\t} else {\n\t\t\tthis.header()?.checked.set(false);\n\t\t\tthis.identifiers.update((items) => {\n\t\t\t\titems.delete(identifier);\n\t\t\t\treturn new Set(items);\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate clearList() {\n\t\tthis.identifiers.set(new Set());\n\t\tthis.header()?.checked.set(false);\n\t}\n}\n","@let total = totalItems();\n@if (total > 0 || data().length > 0) {\n\t<section [class]=\"boxClasses\">\n\t\t<!-- Table -->\n\t\t<div class=\"h-full overflow-x-auto overflow-y-auto\">\n\t\t\t<table [class]=\"baseClasses\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\n\t\t@if (total > 0) {\n\t\t\t<!-- Paginator -->\n\t\t\t<div class=\"grid grid-cols-[1fr_3fr_1fr] items-center\">\n\t\t\t\t<!-- Pagination info -->\n\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t@if (showItemsPerPage()) {\n\t\t\t\t\t\t<app-select\n\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t[value]=\"pagination().itemsPerPage\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t(onChange)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\t[variants]=\"{ variant: 'secondary', shape: 'round-sm', height: 'sm' }\"\n\t\t\t\t\t\t\t[class]=\"'min-w-min'\"\n\t\t\t\t\t\t></app-select>\n\t\t\t\t\t\t<span [typography]=\"{ variant: 'body-xs' }\" class=\"ml-2 text-gray-500\"> entradas por página</span>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\n\t\t\t\t@if (total) {\n\t\t\t\t\t@if (paginatorType() === 'default') {\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t<app-paginator\n\t\t\t\t\t\t\t\t[paginatorId]=\"pagination().id\"\n\t\t\t\t\t\t\t\t[currentPage]=\"pagination().currentPage\"\n\t\t\t\t\t\t\t\t[maxSize]=\"maxSize()\"\n\t\t\t\t\t\t\t\t(onPageChange)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t></app-paginator>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t} @else if (paginatorType() === 'dots') {\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t<app-paginator [paginatorId]=\"pagination().id\" (onPageChange)=\"handlePageChange($event)\" type=\"dots\"></app-paginator>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\n\t\t\t\t\t<div class=\"flex items-center justify-self-end\">\n\t\t\t\t\t\t@if (showEntries()) {\n\t\t\t\t\t\t\t<span [typography]=\"{ variant: 'body-xs' }\" class=\"text-gray-500\"> {{ paginationRange() }} de {{ total }} entradas </span>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</section>\n} @else {\n\t<div class=\"flex justify-center justify-self-center p-3\">\n\t\t<span [typography]=\"{ variant: 'body-xs' }\" class=\"text-gray-500\">{{ error() | translate }}</span>\n\t</div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TableComponent"],"mappings":";;;;;;;;;;;;MAYa,4BAA4B,CAAA;AAIZ,IAAA,KAAA,CAAA;AAH5B,IAAA,eAAe,GAAG,KAAK,CAAuB,SAAS,CAAC,CAAC;AACzD,IAAA,YAAY,GAAG,KAAK,CAAoB,IAAI,CAAC,CAAC;AAC9C,IAAA,OAAO,GAAG,MAAM,CAAU,KAAK,CAAC,CAAC;AACjC,IAAA,WAAA,CAA4B,KAAqB,EAAA;QAArB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;KAAI;AAErD,IAAA,eAAe,CAAC,KAAc,EAAA;AAC7B,QAAA,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KAClC;uGARW,4BAA4B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,cAAA,EAAA,IAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAA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A,CAAA;;2FAIrF,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,cACT,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,eAAe,EAAE,iBAAiB,CAAC,EAEpG,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8xEAAA,EAAA,CAAA;;;AEhFhD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-table.mjs","sources":["../../../projects/sdk/components/table/table-header-checkbox/table-header-checkbox.component.ts","../../../projects/sdk/components/table/table-header-checkbox/table-header-checkbox.component.html","../../../projects/sdk/components/table/table-row-checkbox/table-row-checkbox.component.ts","../../../projects/sdk/components/table/table-row-checkbox/table-row-checkbox.component.html","../../../projects/sdk/components/table/src/table.component.ts","../../../projects/sdk/components/table/src/table.component.html","../../../projects/sdk/components/table/sixbell-telco-sdk-components-table.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Host, input, signal } from '@angular/core';\nimport { CheckboxComponent, CheckboxSizeProps, CheckboxVariantProps } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { TableComponent } from '../src/table.component';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'tr[header-checkbox]',\n\tstandalone: true,\n\timports: [CheckboxComponent],\n\ttemplateUrl: './table-header-checkbox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableHeaderCheckboxComponent {\n\tcheckboxVariant = input<CheckboxVariantProps>('primary');\n\tcheckboxSize = input<CheckboxSizeProps>('md');\n\tchecked = signal<boolean>(false);\n\tconstructor(@Host() private table: TableComponent) {}\n\n\thandleSelectAll(value: boolean) {\n\t\tthis.table.handleToggleAll(value);\n\t}\n}\n","<td class=\"w-4\">\n\t<app-checkbox [(value)]=\"checked\" (onChange)=\"handleSelectAll($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\" />\n</td>\n<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component, Host, input, signal } from '@angular/core';\nimport { CheckboxComponent, CheckboxSizeProps, CheckboxVariantProps } from '@sixbell-telco/sdk/components/forms/checkbox';\nimport { TableComponent } from '../src/table.component';\n\n@Component({\n\t// eslint-disable-next-line @angular-eslint/component-selector\n\tselector: 'tr[row-checkbox]',\n\tstandalone: true,\n\timports: [CheckboxComponent],\n\ttemplateUrl: './table-row-checkbox.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableRowCheckboxComponent {\n\tcheckboxVariant = input<CheckboxVariantProps>('primary');\n\tcheckboxSize = input<CheckboxSizeProps>('md');\n\tidentifier = input.required();\n\tchecked = signal<boolean>(false);\n\n\tconstructor(@Host() private table: TableComponent) {}\n\n\thandleSelect(value: boolean) {\n\t\tthis.table.handleToggleCheckbox(value, this.identifier());\n\t}\n}\n","<td>\n\t<app-checkbox [(value)]=\"checked\" (onChange)=\"handleSelect($event)\" [variant]=\"checkboxVariant()\" [size]=\"checkboxSize()\"></app-checkbox>\n</td>\n<ng-content></ng-content>\n","import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, contentChild, contentChildren, effect, input, output, signal } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { SelectComponent } from '@sixbell-telco/sdk/components/forms/select';\nimport { PaginatorComponent } from '@sixbell-telco/sdk/components/paginator';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva, cx } from 'class-variance-authority';\nimport { TableHeaderCheckboxComponent } from '../table-header-checkbox/table-header-checkbox.component';\nimport { TableRowCheckboxComponent } from '../table-row-checkbox/table-row-checkbox.component';\n\nexport type PaginationType = 'default' | 'dots';\n\nexport const tableContent = cva(['relative border-separate border-spacing-0'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tdefault: ['table', 'font-body'],\n\t\t\tzebra: ['table', 'table-zebra', 'font-body'],\n\t\t},\n\t\tsize: {\n\t\t\txs: ['table-xs'],\n\t\t\tsm: ['table-sm'],\n\t\t\tmd: ['table-md'],\n\t\t\tlg: ['table-lg'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'zebra',\n\t\tsize: 'md',\n\t},\n});\n\nexport type TableContentVariantProps = 'default' | 'zebra' | null | undefined;\nexport type TableContentSizeProps = 'xs' | 'sm' | 'md' | 'lg' | null | undefined;\n\nexport const tableContainer = cva(['flex flex-col gap-4 px-4 pb-10 pt-5 overflow-y-auto'], {\n\tvariants: {\n\t\tcontainerShadow: {\n\t\t\tnone: [],\n\t\t\tsecondary: ['shadow-secondary'],\n\t\t},\n\t\tcontainerHeight: {\n\t\t\tauto: ['h-auto'],\n\t\t\tfull: ['h-full'],\n\t\t\tsm: ['h-[400px]'],\n\t\t\tmd: ['h-[700px]'],\n\t\t\tlg: ['h-[80vh]'],\n\t\t},\n\t\tcontainerShape: {\n\t\t\t'round-sm': ['rounded-box-sm'],\n\t\t\t'round-md': ['rounded-box-md'],\n\t\t\t'round-lg': ['rounded-box-lg'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tcontainerShadow: 'none',\n\t\tcontainerHeight: 'auto',\n\t\tcontainerShape: 'round-sm',\n\t},\n});\nexport type TableContainerShadowProps = 'none' | 'secondary' | null | undefined;\nexport type TableContainerHeightProps = 'auto' | 'full' | 'sm' | 'md' | 'lg' | null | undefined;\nexport type TableContainerShapeProps = 'round-sm' | 'round-md' | 'round-lg' | null | undefined;\n\nexport type TableVariantProps = {\n\tsize?: TableContentSizeProps;\n\tvariant?: TableContentVariantProps;\n\tcontainerHeight?: TableContainerHeightProps;\n\tcontainerShadow?: TableContainerShadowProps;\n\tcontainerShape?: TableContainerShapeProps;\n};\nexport const tableComponent = ({ size, variant, containerHeight, containerShadow, containerShape }: TableVariantProps = {}) =>\n\tcx(tableContent({ variant, size }), tableContainer({ containerHeight, containerShadow, containerShape }));\n\nexport type TablePagination = {\n\tid: string;\n\tcurrentPage: number;\n\titemsPerPage: number;\n\tsearch: string;\n};\n\n@Component({\n\tselector: 'app-table',\n\tstandalone: true,\n\timports: [CommonModule, TranslateModule, PaginatorComponent, TypographyDirective, SelectComponent],\n\ttemplateUrl: './table.component.html',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TableComponent {\n\t// Base table properties\n\tvariant = input<TableContentVariantProps>();\n\tsize = input<TableContentSizeProps>();\n\theight = input<TableContainerHeightProps>();\n\tshadow = input<TableContainerShadowProps>();\n\tshape = input<TableContainerShapeProps>();\n\tcontentClasses = input<string>('');\n\tcontainerClasses = input<string>('');\n\tpaginatorType = input<PaginationType>('default');\n\n\t// Table data\n\tdata = input<unknown[]>([]);\n\ttotalItems = input<number>(0);\n\terror = input<string>('common.errors.no_data_found');\n\n\t// Paginator properties\n\tpagination = input<TablePagination>({ id: 'paginator', currentPage: 1, itemsPerPage: 10, search: '' });\n\tmaxSize = input<number>(7);\n\tonPageChange = output<number>();\n\tonPageSizeChange = output<number>();\n\tshowItemsPerPage = input<boolean>(true);\n\tshowEntries = input<boolean>(true);\n\n\tpaginationRange = computed(() => {\n\t\tconst start = this.pagination().currentPage * this.pagination().itemsPerPage - this.pagination().itemsPerPage + 1;\n\t\tconst end = Math.min(this.pagination().currentPage * this.pagination().itemsPerPage, this.totalItems());\n\t\treturn `${start}-${end}`;\n\t});\n\n\thandlePageChange(page: number) {\n\t\tthis.handleToggleAll(false);\n\t\tthis.onPageChange.emit(page);\n\t}\n\n\thandlePageSizeChange(size: number) {\n\t\tthis.handleToggleAll(false);\n\t\tthis.onPageSizeChange.emit(size);\n\t}\n\n\tget contentClass() {\n\t\treturn cn(\n\t\t\ttableContent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tsize: this.size(),\n\t\t\t\tclass: this.contentClasses(),\n\t\t\t}),\n\t\t);\n\t}\n\n\tget containerClass() {\n\t\treturn cn(\n\t\t\ttableContainer({\n\t\t\t\tcontainerShadow: this.shadow(),\n\t\t\t\tcontainerHeight: this.height(),\n\t\t\t\tcontainerShape: this.shape(),\n\t\t\t\tclass: this.containerClasses(),\n\t\t\t}),\n\t\t);\n\t}\n\n\t// For checkboxes on child components\n\theader = contentChild(TableHeaderCheckboxComponent, { descendants: true });\n\trows = contentChildren(TableRowCheckboxComponent, { descendants: true });\n\tidentifiers = signal<Set<unknown>>(new Set());\n\tonCheck = output<unknown[]>();\n\n\tcheckEffect = effect(() => {\n\t\tthis.onCheck.emit(Array.from(this.identifiers()));\n\t});\n\n\thandleToggleAll(value: boolean) {\n\t\tif (!value) {\n\t\t\tthis.clearList();\n\t\t}\n\n\t\tthis.rows().forEach((row) => {\n\t\t\trow.checked.set(value);\n\t\t\tif (value) {\n\t\t\t\tthis.identifiers.update((items) => new Set(items).add(row.identifier()));\n\t\t\t}\n\t\t});\n\t}\n\n\thandleToggleCheckbox(value: boolean, identifier: unknown) {\n\t\tif (value) {\n\t\t\tthis.identifiers.update((items) => new Set(items).add(identifier));\n\t\t} else {\n\t\t\tthis.header()?.checked.set(false);\n\t\t\tthis.identifiers.update((items) => {\n\t\t\t\titems.delete(identifier);\n\t\t\t\treturn new Set(items);\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate clearList() {\n\t\tthis.identifiers.set(new Set());\n\t\tthis.header()?.checked.set(false);\n\t}\n}\n","@let total = totalItems();\n@if (total > 0 || data().length > 0) {\n\t<section [class]=\"containerClass\">\n\t\t<!-- Table -->\n\t\t<div class=\"h-full overflow-x-auto overflow-y-auto\">\n\t\t\t<table [class]=\"contentClass\">\n\t\t\t\t<ng-content select=\"thead\"></ng-content>\n\t\t\t\t<ng-content select=\"tbody\"></ng-content>\n\t\t\t</table>\n\t\t</div>\n\n\t\t@if (total > 0) {\n\t\t\t<!-- Paginator -->\n\t\t\t<div class=\"grid grid-cols-[1fr_3fr_1fr] items-center\">\n\t\t\t\t<!-- Pagination info -->\n\t\t\t\t<div class=\"flex items-center justify-self-start\">\n\t\t\t\t\t@if (showItemsPerPage()) {\n\t\t\t\t\t\t<app-select\n\t\t\t\t\t\t\t[options]=\"[5, 10, 20, 50, 100]\"\n\t\t\t\t\t\t\t[value]=\"pagination().itemsPerPage\"\n\t\t\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\t\t\t(onChange)=\"handlePageSizeChange($event)\"\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tshape=\"round-sm\"\n\t\t\t\t\t\t\theight=\"sm\"\n\t\t\t\t\t\t\t[class]=\"'min-w-min'\"\n\t\t\t\t\t\t></app-select>\n\t\t\t\t\t\t<div class=\"ml-2\">\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\" [typographyColor]=\"'black'\"> entradas por página</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\n\t\t\t\t@if (total) {\n\t\t\t\t\t@if (paginatorType() === 'default') {\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t<app-paginator\n\t\t\t\t\t\t\t\t[paginatorId]=\"pagination().id\"\n\t\t\t\t\t\t\t\t[currentPage]=\"pagination().currentPage\"\n\t\t\t\t\t\t\t\t[maxSize]=\"maxSize()\"\n\t\t\t\t\t\t\t\t(onPageChange)=\"handlePageChange($event)\"\n\t\t\t\t\t\t\t></app-paginator>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t} @else if (paginatorType() === 'dots') {\n\t\t\t\t\t\t<div class=\"justify-self-center\">\n\t\t\t\t\t\t\t<app-paginator [paginatorId]=\"pagination().id\" (onPageChange)=\"handlePageChange($event)\" type=\"dots\"></app-paginator>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\n\t\t\t\t\t<div class=\"flex items-center justify-self-end\">\n\t\t\t\t\t\t@if (showEntries()) {\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-xs'\" [typographyColor]=\"'black'\"> {{ paginationRange() }} de {{ total }} entradas </span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t}\n\t</section>\n} @else {\n\t<div class=\"flex justify-center justify-self-center p-3\">\n\t\t<span typography [typographyVariant]=\"'body-xs'\" [typographyColor]=\"'black'\">{{ error() | translate }}</span>\n\t</div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.TableComponent"],"mappings":";;;;;;;;;;;;MAYa,4BAA4B,CAAA;AAIZ,IAAA,KAAA,CAAA;AAH5B,IAAA,eAAe,GAAG,KAAK,CAAuB,SAAS,CAAC,CAAC;AACzD,IAAA,YAAY,GAAG,KAAK,CAAoB,IAAI,CAAC,CAAC;AAC9C,IAAA,OAAO,GAAG,MAAM,CAAU,KAAK,CAAC,CAAC;AACjC,IAAA,WAAA,CAA4B,KAAqB,EAAA;QAArB,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;KAAI;AAErD,IAAA,eAAe,CAAC,KAAc,EAAA;AAC7B,QAAA,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;KAClC;uGARW,4BAA4B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,cAAA,EAAA,IAAA,EAAA,IAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;2FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,YAA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A,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,EAAE,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,SAAA,EAAA,MAAA,EAAA,OAAA,EAAA,aAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,EAAA,mBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,mBAAmB,8IAAE,eAAe,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,OAAA,EAAA,MAAA,EAAA,aAAA,EAAA,OAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,KAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,gBAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIrF,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,cACT,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,eAAe,CAAC,EAEjF,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,g7EAAA,EAAA,CAAA;;;AExFhD;;AAEG;;;;"}
|
|
@@ -81,7 +81,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
|
81
81
|
}]
|
|
82
82
|
}], ctorParameters: () => [] });
|
|
83
83
|
|
|
84
|
-
const
|
|
84
|
+
const toastComponent = cva([
|
|
85
85
|
'toast-message relative mb-2 flex min-h-20 h-20 w-[400px] cursor-pointer items-center rounded-lg border-2 bg-white p-2 transition-all duration-300 ease-ease-in-and-out-back',
|
|
86
86
|
], {
|
|
87
87
|
variants: {
|
|
@@ -98,50 +98,55 @@ const toastBase = cva([
|
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
class ToastMessageComponent {
|
|
101
|
-
|
|
102
|
-
|
|
101
|
+
variant = input();
|
|
102
|
+
classes = input('');
|
|
103
103
|
types = ToastTypes;
|
|
104
104
|
toast = input.required();
|
|
105
105
|
toastAmount = input.required();
|
|
106
106
|
toastIndex = input.required();
|
|
107
107
|
onClick = output();
|
|
108
108
|
iconName = signal('check-circle');
|
|
109
|
-
get
|
|
109
|
+
get componentClass() {
|
|
110
110
|
if (this.toast().type === this.types.SUCCESS) {
|
|
111
|
-
return cn(
|
|
111
|
+
return cn(toastComponent({
|
|
112
112
|
variant: 'success',
|
|
113
|
-
|
|
113
|
+
class: this.classes(),
|
|
114
|
+
}));
|
|
114
115
|
}
|
|
115
116
|
else if (this.toast().type === this.types.ERROR) {
|
|
116
|
-
return cn(
|
|
117
|
+
return cn(toastComponent({
|
|
117
118
|
variant: 'error',
|
|
118
|
-
|
|
119
|
+
class: this.classes(),
|
|
120
|
+
}));
|
|
119
121
|
}
|
|
120
122
|
else if (this.toast().type === this.types.INFO) {
|
|
121
|
-
return cn(
|
|
123
|
+
return cn(toastComponent({
|
|
122
124
|
variant: 'info',
|
|
123
|
-
|
|
125
|
+
class: this.classes(),
|
|
126
|
+
}));
|
|
124
127
|
}
|
|
125
128
|
else if (this.toast().type === this.types.WARNING) {
|
|
126
|
-
return cn(
|
|
129
|
+
return cn(toastComponent({
|
|
127
130
|
variant: 'warning',
|
|
128
|
-
|
|
131
|
+
class: this.classes(),
|
|
132
|
+
}));
|
|
129
133
|
}
|
|
130
134
|
else {
|
|
131
|
-
return cn(
|
|
135
|
+
return cn(toastComponent({
|
|
132
136
|
variant: 'info',
|
|
133
|
-
|
|
137
|
+
class: this.classes(),
|
|
138
|
+
}));
|
|
134
139
|
}
|
|
135
140
|
}
|
|
136
141
|
handleClose() {
|
|
137
142
|
this.onClick.emit(this.toast());
|
|
138
143
|
}
|
|
139
144
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ToastMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
140
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: ToastMessageComponent, isStandalone: true, selector: "app-toast-message", inputs: {
|
|
145
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: ToastMessageComponent, isStandalone: true, selector: "app-toast-message", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null }, toast: { classPropertyName: "toast", publicName: "toast", isSignal: true, isRequired: true, transformFunction: null }, toastAmount: { classPropertyName: "toastAmount", publicName: "toastAmount", isSignal: true, isRequired: true, transformFunction: null }, toastIndex: { classPropertyName: "toastIndex", publicName: "toastIndex", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<li\n\t[class]=\"componentClass\"\n\t[ngClass]=\"{\n\t\t'bottom-0 animate-toast-slide-out': toast().animate === 'leave' && toastAmount() > 1,\n\t\t'animate-slide-out': toast().animate === 'leave' && toastAmount() === 1,\n\t\t'animate-fade-out': toast().animate === 'leave' && toastAmount() > 1 && toastIndex() === 0,\n\t\t'animate-slide-in': toast().animate === 'enter',\n\t}\"\n\t(click)=\"handleClose()\"\n\trole=\"button\"\n\ttabindex=\"0\"\n>\n\t<div class=\"flex flex-1 items-center justify-center\">\n\t\t@if (this.toast().type === this.types.SUCCESS) {\n\t\t\t<app-icon [iconName]=\"'check-circle'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.WARNING) {\n\t\t\t<app-icon [iconName]=\"'exclamation-diamond'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.ERROR) {\n\t\t\t<app-icon [iconName]=\"'x-hexagonal'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.INFO) {\n\t\t\t<app-icon [iconName]=\"'info-circle'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t}\n\t</div>\n\t<div class=\"flex-[4]\">\n\t\t<div class=\"grid grid-rows-[min-content_1fr]\">\n\t\t\t<span\n\t\t\t\tclasses=\"block max-h-6 truncate\"\n\t\t\t\ttypography\n\t\t\t\t[typographyVariant]=\"'body'\"\n\t\t\t\t[typographyColor]=\"'black'\"\n\t\t\t\t[typographyFontWeight]=\"'semibold'\"\n\t\t\t\t>{{ toast().title }}</span\n\t\t\t>\n\t\t\t<span\n\t\t\t\tclasses=\"block max-h-8 overflow-y-auto\"\n\t\t\t\ttypography\n\t\t\t\t[typographyVariant]=\"'body-xs'\"\n\t\t\t\t[typographyColor]=\"'black'\"\n\t\t\t\t[typographyFontWeight]=\"'normal'\"\n\t\t\t\t>{{ toast().message }}\n\t\t\t</span>\n\t\t</div>\n\t</div>\n</li>\n", dependencies: [{ kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }, { kind: "component", type: IconComponent, selector: "app-icon", inputs: ["color", "size", "classes", "iconName"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
141
146
|
}
|
|
142
147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ToastMessageComponent, decorators: [{
|
|
143
148
|
type: Component,
|
|
144
|
-
args: [{ selector: 'app-toast-message', standalone: true, imports: [TypographyDirective, IconComponent, NgClass], template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<li\n\t[class]=\"
|
|
149
|
+
args: [{ selector: 'app-toast-message', standalone: true, imports: [TypographyDirective, IconComponent, NgClass], template: "<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<li\n\t[class]=\"componentClass\"\n\t[ngClass]=\"{\n\t\t'bottom-0 animate-toast-slide-out': toast().animate === 'leave' && toastAmount() > 1,\n\t\t'animate-slide-out': toast().animate === 'leave' && toastAmount() === 1,\n\t\t'animate-fade-out': toast().animate === 'leave' && toastAmount() > 1 && toastIndex() === 0,\n\t\t'animate-slide-in': toast().animate === 'enter',\n\t}\"\n\t(click)=\"handleClose()\"\n\trole=\"button\"\n\ttabindex=\"0\"\n>\n\t<div class=\"flex flex-1 items-center justify-center\">\n\t\t@if (this.toast().type === this.types.SUCCESS) {\n\t\t\t<app-icon [iconName]=\"'check-circle'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.WARNING) {\n\t\t\t<app-icon [iconName]=\"'exclamation-diamond'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.ERROR) {\n\t\t\t<app-icon [iconName]=\"'x-hexagonal'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.INFO) {\n\t\t\t<app-icon [iconName]=\"'info-circle'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t}\n\t</div>\n\t<div class=\"flex-[4]\">\n\t\t<div class=\"grid grid-rows-[min-content_1fr]\">\n\t\t\t<span\n\t\t\t\tclasses=\"block max-h-6 truncate\"\n\t\t\t\ttypography\n\t\t\t\t[typographyVariant]=\"'body'\"\n\t\t\t\t[typographyColor]=\"'black'\"\n\t\t\t\t[typographyFontWeight]=\"'semibold'\"\n\t\t\t\t>{{ toast().title }}</span\n\t\t\t>\n\t\t\t<span\n\t\t\t\tclasses=\"block max-h-8 overflow-y-auto\"\n\t\t\t\ttypography\n\t\t\t\t[typographyVariant]=\"'body-xs'\"\n\t\t\t\t[typographyColor]=\"'black'\"\n\t\t\t\t[typographyFontWeight]=\"'normal'\"\n\t\t\t\t>{{ toast().message }}\n\t\t\t</span>\n\t\t</div>\n\t</div>\n</li>\n" }]
|
|
145
150
|
}] });
|
|
146
151
|
|
|
147
152
|
class ToastsContainerComponent {
|
|
@@ -181,7 +186,7 @@ class ToastsContainerComponent {
|
|
|
181
186
|
return this.toastService.toasts().findIndex((t) => t.id === toast.id);
|
|
182
187
|
}
|
|
183
188
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ToastsContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
184
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: ToastsContainerComponent, isStandalone: true, selector: "app-toasts-container", ngImport: i0, template: "<section class=\"fixed bottom-2 right-4 z-10\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<app-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(onClick)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n", dependencies: [{ kind: "component", type: ToastMessageComponent, selector: "app-toast-message", inputs: ["
|
|
189
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: ToastsContainerComponent, isStandalone: true, selector: "app-toasts-container", ngImport: i0, template: "<section class=\"fixed bottom-2 right-4 z-10\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<app-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(onClick)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n", dependencies: [{ kind: "component", type: ToastMessageComponent, selector: "app-toast-message", inputs: ["variant", "classes", "toast", "toastAmount", "toastIndex"], outputs: ["onClick"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
185
190
|
}
|
|
186
191
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ToastsContainerComponent, decorators: [{
|
|
187
192
|
type: Component,
|
|
@@ -192,5 +197,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
|
192
197
|
* Generated bundle index. Do not edit.
|
|
193
198
|
*/
|
|
194
199
|
|
|
195
|
-
export { ToastMessageComponent, ToastService, ToastTypes, ToastsContainerComponent,
|
|
200
|
+
export { ToastMessageComponent, ToastService, ToastTypes, ToastsContainerComponent, toastComponent };
|
|
196
201
|
//# sourceMappingURL=sixbell-telco-sdk-components-toast.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-toast.mjs","sources":["../../../projects/sdk/components/toast/services/toast.service.ts","../../../projects/sdk/components/toast/toast-message/toast-message.component.ts","../../../projects/sdk/components/toast/toast-message/toast-message.component.html","../../../projects/sdk/components/toast/toasts-container/toasts-container.component.ts","../../../projects/sdk/components/toast/toasts-container/toasts-container.component.html","../../../projects/sdk/components/toast/sixbell-telco-sdk-components-toast.ts"],"sourcesContent":["import { computed, effect, Injectable, signal } from '@angular/core';\nimport { generateUniqueId } from '@sixbell-telco/sdk/utils/generators/uuid';\n\nexport enum ToastTypes {\n\tSUCCESS = 'toast-success',\n\tERROR = 'toast-error',\n\tINFO = 'toast-info',\n\tWARNING = 'toast-warning',\n}\n\nexport type Toast = {\n\tid: string;\n\ttype: ToastTypes;\n\tmessage: string;\n\ttitle: string;\n\tduration: number;\n\tanimate: 'enter' | 'leave';\n};\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class ToastService {\n\tprivate toastsSignal = signal<Toast[]>([]);\n\tprivate expandedSignal = signal(false);\n\n\t// Create computed signals for derived state\n\treadonly toasts = computed(() => this.toastsSignal());\n\treadonly expanded = computed(() => this.expandedSignal());\n\treadonly isEmpty = computed(() => this.toasts().length === 0);\n\n\tconstructor() {\n\t\t// Debug effect to monitor state changes\n\t\teffect(() => {\n\t\t\tconsole.log('Toast state changed:', {\n\t\t\t\ttoasts: this.toasts(),\n\t\t\t\texpanded: this.expanded(),\n\t\t\t\tisEmpty: this.isEmpty(),\n\t\t\t});\n\t\t});\n\t}\n\n\tnotify(type: ToastTypes, message: string, title: string = '', duration: number = 10000) {\n\t\tconst toast: Toast = {\n\t\t\tid: generateUniqueId(),\n\t\t\ttype,\n\t\t\tmessage,\n\t\t\ttitle,\n\t\t\tduration,\n\t\t\tanimate: 'enter',\n\t\t};\n\n\t\t// Create a new array reference to ensure change detection\n\t\tthis.toastsSignal.update((toasts) => [toast, ...toasts]);\n\n\t\tthis.scheduleDismiss(toast);\n\t}\n\n\tscheduleDismiss(toast: Toast) {\n\t\tsetTimeout(() => {\n\t\t\tthis.remove(toast);\n\t\t}, toast.duration);\n\t}\n\n\tanimateRemoval(toast: Toast) {\n\t\tthis.toastsSignal.update((toasts) => toasts.map((t) => (t.id === toast.id ? { ...t, animate: 'leave' } : t)));\n\t}\n\n\tremove(toast: Toast) {\n\t\tthis.toastsSignal.update((toasts) => toasts.filter((t) => t.id !== toast.id));\n\n\t\tif (this.isEmpty()) {\n\t\t\tthis.collapse();\n\t\t}\n\t}\n\n\tclear() {\n\t\tthis.toastsSignal.set([]);\n\t\tthis.collapse();\n\t}\n\n\ttoggle() {\n\t\tthis.expandedSignal.update((expanded) => !expanded);\n\t}\n\n\tcollapse() {\n\t\tthis.expandedSignal.set(false);\n\t}\n\n\texpand() {\n\t\tthis.expandedSignal.set(true);\n\t}\n}\n","import { NgClass } from '@angular/common';\nimport { Component, input, output, signal } from '@angular/core';\nimport { IconComponent, IconName } from '@sixbell-telco/sdk/components/icon';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { VariantProps, cva } from 'class-variance-authority';\nimport { Toast, ToastTypes } from '../services/toast.service';\n\nexport const toastBase = cva(\n\t[\n\t\t'toast-message relative mb-2 flex min-h-20 h-20 w-[400px] cursor-pointer items-center rounded-lg border-2 bg-white p-2 transition-all duration-300 ease-ease-in-and-out-back',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tinfo: ['border-primary', 'text-primary'],\n\t\t\t\tsuccess: ['border-success', 'text-success'],\n\t\t\t\twarning: ['border-warning', 'text-warning'],\n\t\t\t\terror: ['border-error', 'text-error'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'info',\n\t\t},\n\t},\n);\n\nexport type ToastVariantProps = VariantProps<typeof toastBase>;\n\n@Component({\n\tselector: 'app-toast-message',\n\tstandalone: true,\n\timports: [TypographyDirective, IconComponent, NgClass],\n\ttemplateUrl: './toast-message.component.html',\n})\nexport class ToastMessageComponent {\n\tvariants = input<ToastVariantProps>();\n\tclass = input<string>('');\n\ttypes = ToastTypes;\n\ttoast = input.required<Toast>();\n\ttoastAmount = input.required<number>();\n\ttoastIndex = input.required<number>();\n\tonClick = output<Toast>();\n\ticonName = signal<IconName>('check-circle');\n\n\tget baseClasses() {\n\t\tif (this.toast().type === this.types.SUCCESS) {\n\t\t\treturn cn(\n\t\t\t\ttoastBase({\n\t\t\t\t\tvariant: 'success',\n\t\t\t\t}),\n\t\t\t\tthis.class(),\n\t\t\t);\n\t\t} else if (this.toast().type === this.types.ERROR) {\n\t\t\treturn cn(\n\t\t\t\ttoastBase({\n\t\t\t\t\tvariant: 'error',\n\t\t\t\t}),\n\t\t\t\tthis.class(),\n\t\t\t);\n\t\t} else if (this.toast().type === this.types.INFO) {\n\t\t\treturn cn(\n\t\t\t\ttoastBase({\n\t\t\t\t\tvariant: 'info',\n\t\t\t\t}),\n\t\t\t\tthis.class(),\n\t\t\t);\n\t\t} else if (this.toast().type === this.types.WARNING) {\n\t\t\treturn cn(\n\t\t\t\ttoastBase({\n\t\t\t\t\tvariant: 'warning',\n\t\t\t\t}),\n\t\t\t\tthis.class(),\n\t\t\t);\n\t\t} else {\n\t\t\treturn cn(\n\t\t\t\ttoastBase({\n\t\t\t\t\tvariant: 'info',\n\t\t\t\t}),\n\t\t\t\tthis.class(),\n\t\t\t);\n\t\t}\n\t}\n\n\thandleClose() {\n\t\tthis.onClick.emit(this.toast());\n\t}\n}\n","<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<li\n\t[class]=\"baseClasses\"\n\t[ngClass]=\"{\n\t\t'bottom-0 animate-toast-slide-out': toast().animate === 'leave' && toastAmount() > 1,\n\t\t'animate-slide-out': toast().animate === 'leave' && toastAmount() === 1,\n\t\t'animate-fade-out': toast().animate === 'leave' && toastAmount() > 1 && toastIndex() === 0,\n\t\t'animate-slide-in': toast().animate === 'enter',\n\t}\"\n\t(click)=\"handleClose()\"\n\trole=\"button\"\n\ttabindex=\"0\"\n>\n\t<div class=\"flex flex-1 items-center justify-center\">\n\t\t@if (this.toast().type === this.types.SUCCESS) {\n\t\t\t<app-icon [iconName]=\"'check-circle'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.WARNING) {\n\t\t\t<app-icon [iconName]=\"'exclamation-diamond'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.ERROR) {\n\t\t\t<app-icon [iconName]=\"'x-hexagonal'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.INFO) {\n\t\t\t<app-icon [iconName]=\"'info-circle'\" [variants]=\"{ color: 'inherit', size: 'md' }\"></app-icon>\n\t\t}\n\t</div>\n\t<div class=\"flex-[4]\">\n\t\t<div class=\"grid grid-rows-[min-content_1fr]\">\n\t\t\t<span class=\"block max-h-6 truncate\" [typography]=\"{ variant: 'body', color: 'black', fontWeight: 'semibold' }\">{{ toast().title }}</span>\n\t\t\t<span class=\"block max-h-8 overflow-y-auto\" [typography]=\"{ variant: 'body-xs', color: 'black', fontWeight: 'normal' }\"\n\t\t\t\t>{{ toast().message }}\n\t\t\t</span>\n\t\t</div>\n\t</div>\n</li>\n","import { NgClass } from '@angular/common';\nimport { Component, computed, effect, inject } from '@angular/core';\nimport { Toast, ToastService } from '../services/toast.service';\nimport { ToastMessageComponent } from '../toast-message/toast-message.component';\n\n@Component({\n\tselector: 'app-toasts-container',\n\tstandalone: true,\n\timports: [ToastMessageComponent, NgClass],\n\ttemplateUrl: './toasts-container.component.html',\n})\nexport class ToastsContainerComponent {\n\ttoastService = inject(ToastService);\n\n\tprotected containerClasses = computed(() => {\n\t\tconst toastCount = this.toastService.toasts().length;\n\t\tconst isExpanded = this.toastService.expanded();\n\n\t\treturn {\n\t\t\t'min-h-64': toastCount === 3 && isExpanded,\n\t\t\t'min-h-48': toastCount === 2 && isExpanded,\n\t\t\t'h-24 min-h-24': toastCount === 1 && isExpanded,\n\t\t\t'h-28 min-h-28': toastCount > 0 && !isExpanded,\n\t\t\t'h-0 min-h-0': toastCount === 0 && !isExpanded,\n\t\t};\n\t});\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconsole.log('Container state:', {\n\t\t\t\ttoastCount: this.toastService.toasts().length,\n\t\t\t\texpanded: this.toastService.expanded(),\n\t\t\t});\n\t\t});\n\t}\n\n\thandleExpand(): void {\n\t\tthis.toastService.expand();\n\t}\n\n\thandleCollapse(): void {\n\t\tthis.toastService.collapse();\n\t}\n\n\thandleRemove(toast: Toast): void {\n\t\tthis.toastService.animateRemoval(toast);\n\t\tsetTimeout(() => {\n\t\t\tthis.toastService.remove(toast);\n\t\t}, 500);\n\t}\n\n\tgetToastIndex(toast: Toast): number {\n\t\treturn this.toastService.toasts().findIndex((t) => t.id === toast.id);\n\t}\n}\n","<section class=\"fixed bottom-2 right-4 z-10\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<app-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(onClick)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;IAGY,WAKX;AALD,CAAA,UAAY,UAAU,EAAA;AACrB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,eAAyB,CAAA;AACzB,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,aAAqB,CAAA;AACrB,IAAA,UAAA,CAAA,MAAA,CAAA,GAAA,YAAmB,CAAA;AACnB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,eAAyB,CAAA;AAC1B,CAAC,EALW,UAAU,KAAV,UAAU,GAKrB,EAAA,CAAA,CAAA,CAAA;MAcY,YAAY,CAAA;AAChB,IAAA,YAAY,GAAG,MAAM,CAAU,EAAE,CAAC,CA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AAA,CAAA,EAAA,CAAA,CAAA;;2FAG5B,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,cACpB,IAAI,EAAA,OAAA,EACP,CAAC,qBAAqB,EAAE,OAAO,CAAC,EAAA,QAAA,EAAA,ylBAAA,EAAA,CAAA;;;AER1C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-toast.mjs","sources":["../../../projects/sdk/components/toast/services/toast.service.ts","../../../projects/sdk/components/toast/toast-message/toast-message.component.ts","../../../projects/sdk/components/toast/toast-message/toast-message.component.html","../../../projects/sdk/components/toast/toasts-container/toasts-container.component.ts","../../../projects/sdk/components/toast/toasts-container/toasts-container.component.html","../../../projects/sdk/components/toast/sixbell-telco-sdk-components-toast.ts"],"sourcesContent":["import { computed, effect, Injectable, signal } from '@angular/core';\nimport { generateUniqueId } from '@sixbell-telco/sdk/utils/generators/uuid';\n\nexport enum ToastTypes {\n\tSUCCESS = 'toast-success',\n\tERROR = 'toast-error',\n\tINFO = 'toast-info',\n\tWARNING = 'toast-warning',\n}\n\nexport type Toast = {\n\tid: string;\n\ttype: ToastTypes;\n\tmessage: string;\n\ttitle: string;\n\tduration: number;\n\tanimate: 'enter' | 'leave';\n};\n\n@Injectable({\n\tprovidedIn: 'root',\n})\nexport class ToastService {\n\tprivate toastsSignal = signal<Toast[]>([]);\n\tprivate expandedSignal = signal(false);\n\n\t// Create computed signals for derived state\n\treadonly toasts = computed(() => this.toastsSignal());\n\treadonly expanded = computed(() => this.expandedSignal());\n\treadonly isEmpty = computed(() => this.toasts().length === 0);\n\n\tconstructor() {\n\t\t// Debug effect to monitor state changes\n\t\teffect(() => {\n\t\t\tconsole.log('Toast state changed:', {\n\t\t\t\ttoasts: this.toasts(),\n\t\t\t\texpanded: this.expanded(),\n\t\t\t\tisEmpty: this.isEmpty(),\n\t\t\t});\n\t\t});\n\t}\n\n\tnotify(type: ToastTypes, message: string, title: string = '', duration: number = 10000) {\n\t\tconst toast: Toast = {\n\t\t\tid: generateUniqueId(),\n\t\t\ttype,\n\t\t\tmessage,\n\t\t\ttitle,\n\t\t\tduration,\n\t\t\tanimate: 'enter',\n\t\t};\n\n\t\t// Create a new array reference to ensure change detection\n\t\tthis.toastsSignal.update((toasts) => [toast, ...toasts]);\n\n\t\tthis.scheduleDismiss(toast);\n\t}\n\n\tscheduleDismiss(toast: Toast) {\n\t\tsetTimeout(() => {\n\t\t\tthis.remove(toast);\n\t\t}, toast.duration);\n\t}\n\n\tanimateRemoval(toast: Toast) {\n\t\tthis.toastsSignal.update((toasts) => toasts.map((t) => (t.id === toast.id ? { ...t, animate: 'leave' } : t)));\n\t}\n\n\tremove(toast: Toast) {\n\t\tthis.toastsSignal.update((toasts) => toasts.filter((t) => t.id !== toast.id));\n\n\t\tif (this.isEmpty()) {\n\t\t\tthis.collapse();\n\t\t}\n\t}\n\n\tclear() {\n\t\tthis.toastsSignal.set([]);\n\t\tthis.collapse();\n\t}\n\n\ttoggle() {\n\t\tthis.expandedSignal.update((expanded) => !expanded);\n\t}\n\n\tcollapse() {\n\t\tthis.expandedSignal.set(false);\n\t}\n\n\texpand() {\n\t\tthis.expandedSignal.set(true);\n\t}\n}\n","import { NgClass } from '@angular/common';\nimport { Component, input, output, signal } from '@angular/core';\nimport { IconComponent, IconName } from '@sixbell-telco/sdk/components/icon';\nimport { TypographyDirective } from '@sixbell-telco/sdk/directives/typography';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\nimport { Toast, ToastTypes } from '../services/toast.service';\n\nexport const toastComponent = cva(\n\t[\n\t\t'toast-message relative mb-2 flex min-h-20 h-20 w-[400px] cursor-pointer items-center rounded-lg border-2 bg-white p-2 transition-all duration-300 ease-ease-in-and-out-back',\n\t],\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tinfo: ['border-primary', 'text-primary'],\n\t\t\t\tsuccess: ['border-success', 'text-success'],\n\t\t\t\twarning: ['border-warning', 'text-warning'],\n\t\t\t\terror: ['border-error', 'text-error'],\n\t\t\t},\n\t\t},\n\t\tcompoundVariants: [],\n\t\tdefaultVariants: {\n\t\t\tvariant: 'info',\n\t\t},\n\t},\n);\n\nexport type ToastVariantProps = 'info' | 'success' | 'warning' | 'error' | null | undefined;\n\nexport type ToastProps = {\n\tvariant?: ToastVariantProps;\n};\n\n@Component({\n\tselector: 'app-toast-message',\n\tstandalone: true,\n\timports: [TypographyDirective, IconComponent, NgClass],\n\ttemplateUrl: './toast-message.component.html',\n})\nexport class ToastMessageComponent {\n\tvariant = input<ToastVariantProps>();\n\tclasses = input<string>('');\n\ttypes = ToastTypes;\n\ttoast = input.required<Toast>();\n\ttoastAmount = input.required<number>();\n\ttoastIndex = input.required<number>();\n\tonClick = output<Toast>();\n\ticonName = signal<IconName>('check-circle');\n\n\tget componentClass() {\n\t\tif (this.toast().type === this.types.SUCCESS) {\n\t\t\treturn cn(\n\t\t\t\ttoastComponent({\n\t\t\t\t\tvariant: 'success',\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t} else if (this.toast().type === this.types.ERROR) {\n\t\t\treturn cn(\n\t\t\t\ttoastComponent({\n\t\t\t\t\tvariant: 'error',\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t} else if (this.toast().type === this.types.INFO) {\n\t\t\treturn cn(\n\t\t\t\ttoastComponent({\n\t\t\t\t\tvariant: 'info',\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t} else if (this.toast().type === this.types.WARNING) {\n\t\t\treturn cn(\n\t\t\t\ttoastComponent({\n\t\t\t\t\tvariant: 'warning',\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t} else {\n\t\t\treturn cn(\n\t\t\t\ttoastComponent({\n\t\t\t\t\tvariant: 'info',\n\t\t\t\t\tclass: this.classes(),\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t}\n\n\thandleClose() {\n\t\tthis.onClick.emit(this.toast());\n\t}\n}\n","<!-- eslint-disable @angular-eslint/template/click-events-have-key-events -->\n<li\n\t[class]=\"componentClass\"\n\t[ngClass]=\"{\n\t\t'bottom-0 animate-toast-slide-out': toast().animate === 'leave' && toastAmount() > 1,\n\t\t'animate-slide-out': toast().animate === 'leave' && toastAmount() === 1,\n\t\t'animate-fade-out': toast().animate === 'leave' && toastAmount() > 1 && toastIndex() === 0,\n\t\t'animate-slide-in': toast().animate === 'enter',\n\t}\"\n\t(click)=\"handleClose()\"\n\trole=\"button\"\n\ttabindex=\"0\"\n>\n\t<div class=\"flex flex-1 items-center justify-center\">\n\t\t@if (this.toast().type === this.types.SUCCESS) {\n\t\t\t<app-icon [iconName]=\"'check-circle'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.WARNING) {\n\t\t\t<app-icon [iconName]=\"'exclamation-diamond'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.ERROR) {\n\t\t\t<app-icon [iconName]=\"'x-hexagonal'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t} @else if (this.toast().type === this.types.INFO) {\n\t\t\t<app-icon [iconName]=\"'info-circle'\" color=\"inherit\" size=\"md\"></app-icon>\n\t\t}\n\t</div>\n\t<div class=\"flex-[4]\">\n\t\t<div class=\"grid grid-rows-[min-content_1fr]\">\n\t\t\t<span\n\t\t\t\tclasses=\"block max-h-6 truncate\"\n\t\t\t\ttypography\n\t\t\t\t[typographyVariant]=\"'body'\"\n\t\t\t\t[typographyColor]=\"'black'\"\n\t\t\t\t[typographyFontWeight]=\"'semibold'\"\n\t\t\t\t>{{ toast().title }}</span\n\t\t\t>\n\t\t\t<span\n\t\t\t\tclasses=\"block max-h-8 overflow-y-auto\"\n\t\t\t\ttypography\n\t\t\t\t[typographyVariant]=\"'body-xs'\"\n\t\t\t\t[typographyColor]=\"'black'\"\n\t\t\t\t[typographyFontWeight]=\"'normal'\"\n\t\t\t\t>{{ toast().message }}\n\t\t\t</span>\n\t\t</div>\n\t</div>\n</li>\n","import { NgClass } from '@angular/common';\nimport { Component, computed, effect, inject } from '@angular/core';\nimport { Toast, ToastService } from '../services/toast.service';\nimport { ToastMessageComponent } from '../toast-message/toast-message.component';\n\n@Component({\n\tselector: 'app-toasts-container',\n\tstandalone: true,\n\timports: [ToastMessageComponent, NgClass],\n\ttemplateUrl: './toasts-container.component.html',\n})\nexport class ToastsContainerComponent {\n\ttoastService = inject(ToastService);\n\n\tprotected containerClasses = computed(() => {\n\t\tconst toastCount = this.toastService.toasts().length;\n\t\tconst isExpanded = this.toastService.expanded();\n\n\t\treturn {\n\t\t\t'min-h-64': toastCount === 3 && isExpanded,\n\t\t\t'min-h-48': toastCount === 2 && isExpanded,\n\t\t\t'h-24 min-h-24': toastCount === 1 && isExpanded,\n\t\t\t'h-28 min-h-28': toastCount > 0 && !isExpanded,\n\t\t\t'h-0 min-h-0': toastCount === 0 && !isExpanded,\n\t\t};\n\t});\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconsole.log('Container state:', {\n\t\t\t\ttoastCount: this.toastService.toasts().length,\n\t\t\t\texpanded: this.toastService.expanded(),\n\t\t\t});\n\t\t});\n\t}\n\n\thandleExpand(): void {\n\t\tthis.toastService.expand();\n\t}\n\n\thandleCollapse(): void {\n\t\tthis.toastService.collapse();\n\t}\n\n\thandleRemove(toast: Toast): void {\n\t\tthis.toastService.animateRemoval(toast);\n\t\tsetTimeout(() => {\n\t\t\tthis.toastService.remove(toast);\n\t\t}, 500);\n\t}\n\n\tgetToastIndex(toast: Toast): number {\n\t\treturn this.toastService.toasts().findIndex((t) => t.id === toast.id);\n\t}\n}\n","<section class=\"fixed bottom-2 right-4 z-10\">\n\t<ol\n\t\tclass=\"toast-container group flex min-w-[400px] flex-col gap-2\"\n\t\t[ngClass]=\"containerClasses()\"\n\t\t[attr.aria-expanded]=\"toastService.expanded()\"\n\t\t(mouseenter)=\"handleExpand()\"\n\t\t(mouseleave)=\"handleCollapse()\"\n\t>\n\t\t@for (toast of toastService.toasts(); track toast.id) {\n\t\t\t<app-toast-message\n\t\t\t\t[toast]=\"toast\"\n\t\t\t\t[toastIndex]=\"getToastIndex(toast)\"\n\t\t\t\t[toastAmount]=\"toastService.toasts().length\"\n\t\t\t\t(onClick)=\"handleRemove($event)\"\n\t\t\t/>\n\t\t}\n\t</ol>\n</section>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;IAGY,WAKX;AALD,CAAA,UAAY,UAAU,EAAA;AACrB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,eAAyB,CAAA;AACzB,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,aAAqB,CAAA;AACrB,IAAA,UAAA,CAAA,MAAA,CAAA,GAAA,YAAmB,CAAA;AACnB,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,eAAyB,CAAA;AAC1B,CAAC,EALW,UAAU,KAAV,UAAU,GAKrB,EAAA,CAAA,CAAA,CAAA;MAcY,YAAY,CAAA;AAChB,IAAA,YAAY,GAAG,MAAM,CAAU,EAAE,CAAC,CAAC;AACnC,IAAA,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;;IAG9B,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;IAC7C,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;AACjD,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;AAE9D,IAAA,WAAA,GAAA;;QAEC,MAAM,CAAC,MAAK;AACX,YAAA,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;AACnC,gBAAA,MAAM,EAA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3
3
|
import { cn } from '@sixbell-telco/sdk/utils/cn';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const tooltipComponent = cva(['tooltip'], {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
|
9
9
|
primary: ['tooltip-primary'],
|
|
@@ -28,25 +28,27 @@ const tooltipBase = cva(['tooltip'], {
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
class TooltipComponent {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
variant = input();
|
|
32
|
+
position = input();
|
|
33
|
+
classes = input('');
|
|
33
34
|
label = input.required();
|
|
34
|
-
get
|
|
35
|
-
return cn(
|
|
36
|
-
variant: this.
|
|
37
|
-
|
|
35
|
+
get componentClass() {
|
|
36
|
+
return cn(tooltipComponent({
|
|
37
|
+
variant: this.variant(),
|
|
38
|
+
class: this.classes(),
|
|
39
|
+
}));
|
|
38
40
|
}
|
|
39
41
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: TooltipComponent, isStandalone: true, selector: "app-tooltip", inputs: {
|
|
42
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: TooltipComponent, isStandalone: true, selector: "app-tooltip", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div [class]=\"componentClass\" [attr.data-tip]=\"label()\">\n\t<ng-content></ng-content>\n</div>\n", styles: [""] });
|
|
41
43
|
}
|
|
42
44
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
43
45
|
type: Component,
|
|
44
|
-
args: [{ selector: 'app-tooltip', standalone: true, imports: [], template: "<div [class]=\"
|
|
46
|
+
args: [{ selector: 'app-tooltip', standalone: true, imports: [], template: "<div [class]=\"componentClass\" [attr.data-tip]=\"label()\">\n\t<ng-content></ng-content>\n</div>\n" }]
|
|
45
47
|
}] });
|
|
46
48
|
|
|
47
49
|
/**
|
|
48
50
|
* Generated bundle index. Do not edit.
|
|
49
51
|
*/
|
|
50
52
|
|
|
51
|
-
export { TooltipComponent,
|
|
53
|
+
export { TooltipComponent, tooltipComponent };
|
|
52
54
|
//# sourceMappingURL=sixbell-telco-sdk-components-tooltip.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sixbell-telco-sdk-components-tooltip.mjs","sources":["../../../projects/sdk/components/tooltip/src/tooltip.component.ts","../../../projects/sdk/components/tooltip/src/tooltip.component.html","../../../projects/sdk/components/tooltip/sixbell-telco-sdk-components-tooltip.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport {
|
|
1
|
+
{"version":3,"file":"sixbell-telco-sdk-components-tooltip.mjs","sources":["../../../projects/sdk/components/tooltip/src/tooltip.component.ts","../../../projects/sdk/components/tooltip/src/tooltip.component.html","../../../projects/sdk/components/tooltip/sixbell-telco-sdk-components-tooltip.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\nimport { cn } from '@sixbell-telco/sdk/utils/cn';\nimport { cva } from 'class-variance-authority';\n\nexport const tooltipComponent = cva(['tooltip'], {\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: ['tooltip-primary'],\n\t\t\tsecondary: ['tooltip-secondary'],\n\t\t\tsuccess: ['tooltip-success'],\n\t\t\tneutral: ['tooltip-neutral'],\n\t\t\twarning: ['tooltip-warning'],\n\t\t\terror: ['tooltip-error'],\n\t\t\tinfo: ['tooltip-info'],\n\t\t},\n\t\tposition: {\n\t\t\ttop: ['tooltip-top'],\n\t\t\tbottom: ['tooltip-bottom'],\n\t\t\tright: ['tooltip-right'],\n\t\t\tleft: ['tooltip-left'],\n\t\t},\n\t},\n\tcompoundVariants: [],\n\tdefaultVariants: {\n\t\tvariant: 'primary',\n\t\tposition: 'bottom',\n\t},\n});\n\nexport type TooltipVariantProps = 'primary' | 'secondary' | 'success' | 'neutral' | 'warning' | 'error' | 'info' | null | undefined;\nexport type TooltipPositionProps = 'top' | 'bottom' | 'right' | 'left' | null | undefined;\n\nexport type TooltipProps = {\n\tvariant?: TooltipVariantProps;\n\tposition?: TooltipPositionProps;\n};\n\n@Component({\n\tselector: 'app-tooltip',\n\tstandalone: true,\n\timports: [],\n\ttemplateUrl: './tooltip.component.html',\n\tstyles: '',\n})\nexport class TooltipComponent {\n\tvariant = input<TooltipVariantProps>();\n\tposition = input<TooltipPositionProps>();\n\tclasses = input<string>('');\n\tlabel = input.required<string>();\n\n\tget componentClass() {\n\t\treturn cn(\n\t\t\ttooltipComponent({\n\t\t\t\tvariant: this.variant(),\n\t\t\t\tclass: this.classes(),\n\t\t\t}),\n\t\t);\n\t}\n}\n","<div [class]=\"componentClass\" [attr.data-tip]=\"label()\">\n\t<ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAIa,gBAAgB,GAAG,GAAG,CAAC,CAAC,SAAS,CAAC,EAAE;AAChD,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,OAAO,EAAE,CAAC,iBAAiB,CAAC;YAC5B,SAAS,EAAE,CAAC,mBAAmB,CAAC;YAChC,OAAO,EAAE,CAAC,iBAAiB,CAAC;YAC5B,OAAO,EAAE,CAAC,iBAAiB,CAAC;YAC5B,OAAO,EAAE,CAAC,iBAAiB,CAA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AAI,EAAA,OAAA,EACP,EAAE,EAAA,QAAA,EAAA,qGAAA,EAAA,CAAA;;;AExCZ;;AAEG;;;;"}
|
|
@@ -19,11 +19,11 @@ class WizardMarkerComponent {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WizardMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: WizardMarkerComponent, isStandalone: true, selector: "app-wizard-marker", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let contentVar = content();\n<
|
|
22
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: WizardMarkerComponent, isStandalone: true, selector: "app-wizard-marker", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let contentVar = content();\n<div [class]=\"getStepStatusMarkerClasses(contentVar)\">\n\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">{{\n\t\tgetStatusMarkerMessage(contentVar)\n\t}}</span>\n</div>\n", dependencies: [{ kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
23
23
|
}
|
|
24
24
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WizardMarkerComponent, decorators: [{
|
|
25
25
|
type: Component,
|
|
26
|
-
args: [{ selector: 'app-wizard-marker', standalone: true, imports: [TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let contentVar = content();\n<
|
|
26
|
+
args: [{ selector: 'app-wizard-marker', standalone: true, imports: [TypographyDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let contentVar = content();\n<div [class]=\"getStepStatusMarkerClasses(contentVar)\">\n\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">{{\n\t\tgetStatusMarkerMessage(contentVar)\n\t}}</span>\n</div>\n" }]
|
|
27
27
|
}] });
|
|
28
28
|
|
|
29
29
|
class WizardStepComponent {
|
|
@@ -56,11 +56,11 @@ class WizardStepComponent {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WizardStepComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: WizardStepComponent, isStandalone: true, selector: "app-wizard-step", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let currentStepVar = currentStep();\n@let contentVar = content();\n\n<div [class]=\"getStepClasses(currentStepVar, contentVar).outerClasses\">\n\t<div [class]=\"getStepClasses(currentStepVar, contentVar).innerClasses\">\n\t\t<
|
|
59
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.8", type: WizardStepComponent, isStandalone: true, selector: "app-wizard-step", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: true, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let currentStepVar = currentStep();\n@let contentVar = content();\n\n<div [class]=\"getStepClasses(currentStepVar, contentVar).outerClasses\">\n\t<div [class]=\"getStepClasses(currentStepVar, contentVar).innerClasses\">\n\t\t<div [class]=\"stepNumberClasses\">\n\t\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">\n\t\t\t\t{{ contentVar.step() + 1 }}\n\t\t\t</span>\n\t\t</div>\n\t\t<app-icon [class]=\"stepIconClasses\" [iconName]=\"'check'\" color=\"inherit\" size=\"md\"></app-icon>\n\t</div>\n</div>\n", dependencies: [{ kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }, { kind: "component", type: IconComponent, selector: "app-icon", inputs: ["color", "size", "classes", "iconName"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
60
60
|
}
|
|
61
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WizardStepComponent, decorators: [{
|
|
62
62
|
type: Component,
|
|
63
|
-
args: [{ selector: 'app-wizard-step', standalone: true, imports: [TypographyDirective, IconComponent
|
|
63
|
+
args: [{ selector: 'app-wizard-step', standalone: true, imports: [TypographyDirective, IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let currentStepVar = currentStep();\n@let contentVar = content();\n\n<div [class]=\"getStepClasses(currentStepVar, contentVar).outerClasses\">\n\t<div [class]=\"getStepClasses(currentStepVar, contentVar).innerClasses\">\n\t\t<div [class]=\"stepNumberClasses\">\n\t\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'semibold'\">\n\t\t\t\t{{ contentVar.step() + 1 }}\n\t\t\t</span>\n\t\t</div>\n\t\t<app-icon [class]=\"stepIconClasses\" [iconName]=\"'check'\" color=\"inherit\" size=\"md\"></app-icon>\n\t</div>\n</div>\n" }]
|
|
64
64
|
}] });
|
|
65
65
|
|
|
66
66
|
class WizardSubStepComponent {
|
|
@@ -163,19 +163,11 @@ class WizardWrapperComponent {
|
|
|
163
163
|
return { outerClasses, innerClasses };
|
|
164
164
|
}
|
|
165
165
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WizardWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
166
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: WizardWrapperComponent, isStandalone: true, selector: "app-wizard", inputs: { currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentStep: "currentStepChange", onBack: "onBack", oncompleted: "oncompleted" }, queries: [{ propertyName: "contents", predicate: WizardContentComponent, isSignal: true }], ngImport: i0, template: "@let contentsVar = contents();\n@let currentStepVar = currentStep();\n\n<div class=\"flex flex-col gap-5\">\n\t<ul class=\"flex gap-4 px-[20%] pt-6\">\n\t\t@for (content of contentsVar; track $index) {\n\t\t\t<li [ngClass]=\"{ 'flex-1': contentsVar.length - 1 !== $index }\">\n\t\t\t\t<div class=\"flex items-center gap-4\">\n\t\t\t\t\t<app-wizard-step [currentStep]=\"currentStepVar\" [content]=\"content\" [status]=\"content.status()\"></app-wizard-step>\n\t\t\t\t\t@if (contentsVar.length - 1 !== $index) {\n\t\t\t\t\t\t<div class=\"flex flex-1 flex-col justify-center\">\n\t\t\t\t\t\t\t<div class=\"flex -translate-y-6 justify-center\">\n\t\t\t\t\t\t\t\t<app-wizard-marker [content]=\"content\"></app-wizard-marker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<app-wizard-sub-step [currentStep]=\"currentStepVar\" [content]=\"content\"></app-wizard-sub-step>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"w-[50px]\">\n\t\t\t\t\t<div class=\"flex max-w-fit flex-col items-center text-secondary\">\n\t\t\t\t\t\t<
|
|
166
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: WizardWrapperComponent, isStandalone: true, selector: "app-wizard", inputs: { currentStep: { classPropertyName: "currentStep", publicName: "currentStep", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { currentStep: "currentStepChange", onBack: "onBack", oncompleted: "oncompleted" }, queries: [{ propertyName: "contents", predicate: WizardContentComponent, isSignal: true }], ngImport: i0, template: "@let contentsVar = contents();\n@let currentStepVar = currentStep();\n\n<div class=\"flex flex-col gap-5\">\n\t<ul class=\"flex gap-4 px-[20%] pt-6\">\n\t\t@for (content of contentsVar; track $index) {\n\t\t\t<li [ngClass]=\"{ 'flex-1': contentsVar.length - 1 !== $index }\">\n\t\t\t\t<div class=\"flex items-center gap-4\">\n\t\t\t\t\t<app-wizard-step [currentStep]=\"currentStepVar\" [content]=\"content\" [status]=\"content.status()\"></app-wizard-step>\n\t\t\t\t\t@if (contentsVar.length - 1 !== $index) {\n\t\t\t\t\t\t<div class=\"flex flex-1 flex-col justify-center\">\n\t\t\t\t\t\t\t<div class=\"flex -translate-y-6 justify-center\">\n\t\t\t\t\t\t\t\t<app-wizard-marker [content]=\"content\"></app-wizard-marker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<app-wizard-sub-step [currentStep]=\"currentStepVar\" [content]=\"content\"></app-wizard-sub-step>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"w-[50px]\">\n\t\t\t\t\t<div class=\"flex max-w-fit flex-col items-center text-secondary\">\n\t\t\t\t\t\t<div class=\"min-w-max\">\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{\n\t\t\t\t\t\t\t\tcontent.name()\n\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"min-w-max\">\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ content.label() }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t}\n\t</ul>\n\n\t<div>\n\t\t<ng-content></ng-content>\n\t</div>\n\n\t<div class=\"flex items-center justify-center gap-5\">\n\t\t@if (isFirstStep()) {\n\t\t\t<app-button label=\"Volver\" type=\"button\" containerClasses=\"w-60\" variant=\"secondary\" shape=\"round-lg\" padding=\"md\" (click)=\"handleBack()\" />\n\t\t} @else {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Anterior\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tcontainerClasses=\"w-60\"\n\t\t\t\ticonName=\"arrow-left\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handlePreviousStep()\"\n\t\t\t/>\n\t\t}\n\t\t@if (isLastStep()) {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Finalizar\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tcontainerClasses=\"w-60\"\n\t\t\t\t[disabled]=\"!allStepsAreValid()\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handleComplete()\"\n\t\t\t/>\n\t\t} @else {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Siguiente\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tcontainerClasses=\"w-60\"\n\t\t\t\t[disabled]=\"!isCurrentStepValid()\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handleNextStep()\"\n\t\t\t/>\n\t\t}\n\t</div>\n</div>\n", dependencies: [{ kind: "component", type: WizardStepComponent, selector: "app-wizard-step", inputs: ["status", "content", "currentStep"] }, { kind: "component", type: ButtonComponent, selector: "app-button", inputs: ["variant", "shape", "padding", "height", "width", "alignment", "iconPosition", "fontSize", "containerClasses", "iconClasses", "label", "type", "iconName", "disabled"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TypographyDirective, selector: "[typography]", inputs: ["typographyVariant", "typographyColor", "typographyFontWeight", "classes"] }, { kind: "component", type: WizardMarkerComponent, selector: "app-wizard-marker", inputs: ["content"] }, { kind: "component", type: WizardSubStepComponent, selector: "app-wizard-sub-step", inputs: ["content", "currentStep"] }] });
|
|
167
167
|
}
|
|
168
168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WizardWrapperComponent, decorators: [{
|
|
169
169
|
type: Component,
|
|
170
|
-
args: [{ selector: 'app-wizard', standalone: true, imports: [
|
|
171
|
-
WizardStepComponent,
|
|
172
|
-
ButtonComponent,
|
|
173
|
-
NgClass,
|
|
174
|
-
TypographyDirective,
|
|
175
|
-
WizardMarkerComponent,
|
|
176
|
-
WizardSubStepComponent,
|
|
177
|
-
WizardContentComponent,
|
|
178
|
-
], template: "@let contentsVar = contents();\n@let currentStepVar = currentStep();\n\n<div class=\"flex flex-col gap-5\">\n\t<ul class=\"flex gap-4 px-[20%] pt-6\">\n\t\t@for (content of contentsVar; track $index) {\n\t\t\t<li [ngClass]=\"{ 'flex-1': contentsVar.length - 1 !== $index }\">\n\t\t\t\t<div class=\"flex items-center gap-4\">\n\t\t\t\t\t<app-wizard-step [currentStep]=\"currentStepVar\" [content]=\"content\" [status]=\"content.status()\"></app-wizard-step>\n\t\t\t\t\t@if (contentsVar.length - 1 !== $index) {\n\t\t\t\t\t\t<div class=\"flex flex-1 flex-col justify-center\">\n\t\t\t\t\t\t\t<div class=\"flex -translate-y-6 justify-center\">\n\t\t\t\t\t\t\t\t<app-wizard-marker [content]=\"content\"></app-wizard-marker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<app-wizard-sub-step [currentStep]=\"currentStepVar\" [content]=\"content\"></app-wizard-sub-step>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"w-[50px]\">\n\t\t\t\t\t<div class=\"flex max-w-fit flex-col items-center text-secondary\">\n\t\t\t\t\t\t<span class=\"min-w-max\" [typography]=\"{ variant: 'body-sm', fontWeight: 'normal', color: 'inherit' }\">{{ content.name() }}</span>\n\t\t\t\t\t\t<span class=\"min-w-max\" [typography]=\"{ variant: 'body', fontWeight: 'normal', color: 'black' }\">{{ content.label() }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t}\n\t</ul>\n\n\t<div>\n\t\t<ng-content></ng-content>\n\t</div>\n\n\t<div class=\"flex items-center justify-center gap-5\">\n\t\t@if (isFirstStep()) {\n\t\t\t<app-button label=\"Volver\" type=\"button\" baseClass=\"w-60\" variant=\"secondary\" shape=\"round-lg\" padding=\"md\" (click)=\"handleBack()\" />\n\t\t} @else {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Anterior\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tbaseClass=\"w-60\"\n\t\t\t\ticonName=\"arrow-left\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handlePreviousStep()\"\n\t\t\t/>\n\t\t}\n\t\t@if (isLastStep()) {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Finalizar\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tbaseClass=\"w-60\"\n\t\t\t\t[disabled]=\"!allStepsAreValid()\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handleComplete()\"\n\t\t\t/>\n\t\t} @else {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Siguiente\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tbaseClass=\"w-60\"\n\t\t\t\t[disabled]=\"!isCurrentStepValid()\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handleNextStep()\"\n\t\t\t/>\n\t\t}\n\t</div>\n</div>\n" }]
|
|
170
|
+
args: [{ selector: 'app-wizard', standalone: true, imports: [WizardStepComponent, ButtonComponent, NgClass, TypographyDirective, WizardMarkerComponent, WizardSubStepComponent], template: "@let contentsVar = contents();\n@let currentStepVar = currentStep();\n\n<div class=\"flex flex-col gap-5\">\n\t<ul class=\"flex gap-4 px-[20%] pt-6\">\n\t\t@for (content of contentsVar; track $index) {\n\t\t\t<li [ngClass]=\"{ 'flex-1': contentsVar.length - 1 !== $index }\">\n\t\t\t\t<div class=\"flex items-center gap-4\">\n\t\t\t\t\t<app-wizard-step [currentStep]=\"currentStepVar\" [content]=\"content\" [status]=\"content.status()\"></app-wizard-step>\n\t\t\t\t\t@if (contentsVar.length - 1 !== $index) {\n\t\t\t\t\t\t<div class=\"flex flex-1 flex-col justify-center\">\n\t\t\t\t\t\t\t<div class=\"flex -translate-y-6 justify-center\">\n\t\t\t\t\t\t\t\t<app-wizard-marker [content]=\"content\"></app-wizard-marker>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<app-wizard-sub-step [currentStep]=\"currentStepVar\" [content]=\"content\"></app-wizard-sub-step>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div class=\"w-[50px]\">\n\t\t\t\t\t<div class=\"flex max-w-fit flex-col items-center text-secondary\">\n\t\t\t\t\t\t<div class=\"min-w-max\">\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body-sm'\" [typographyColor]=\"'inherit'\" [typographyFontWeight]=\"'normal'\">{{\n\t\t\t\t\t\t\t\tcontent.name()\n\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"min-w-max\">\n\t\t\t\t\t\t\t<span typography [typographyVariant]=\"'body'\" [typographyColor]=\"'black'\" [typographyFontWeight]=\"'normal'\">{{ content.label() }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</li>\n\t\t}\n\t</ul>\n\n\t<div>\n\t\t<ng-content></ng-content>\n\t</div>\n\n\t<div class=\"flex items-center justify-center gap-5\">\n\t\t@if (isFirstStep()) {\n\t\t\t<app-button label=\"Volver\" type=\"button\" containerClasses=\"w-60\" variant=\"secondary\" shape=\"round-lg\" padding=\"md\" (click)=\"handleBack()\" />\n\t\t} @else {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Anterior\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tcontainerClasses=\"w-60\"\n\t\t\t\ticonName=\"arrow-left\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handlePreviousStep()\"\n\t\t\t/>\n\t\t}\n\t\t@if (isLastStep()) {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Finalizar\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tcontainerClasses=\"w-60\"\n\t\t\t\t[disabled]=\"!allStepsAreValid()\"\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handleComplete()\"\n\t\t\t/>\n\t\t} @else {\n\t\t\t<app-button\n\t\t\t\tlabel=\"Siguiente\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tcontainerClasses=\"w-60\"\n\t\t\t\t[disabled]=\"!isCurrentStepValid()\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tshape=\"round-lg\"\n\t\t\t\tpadding=\"md\"\n\t\t\t\t(click)=\"handleNextStep()\"\n\t\t\t/>\n\t\t}\n\t</div>\n</div>\n" }]
|
|
179
171
|
}] });
|
|
180
172
|
|
|
181
173
|
class WizardContentComponent {
|
|
@@ -185,21 +177,21 @@ class WizardContentComponent {
|
|
|
185
177
|
status = model.required();
|
|
186
178
|
isValid = model.required();
|
|
187
179
|
label = input('');
|
|
188
|
-
|
|
180
|
+
classes = input('');
|
|
189
181
|
currentStep = computed(() => this.wizard.currentStep());
|
|
190
182
|
isStepActive = computed(() => this.step() === this.currentStep());
|
|
191
183
|
constructor(wizard) {
|
|
192
184
|
this.wizard = wizard;
|
|
193
185
|
}
|
|
194
|
-
get
|
|
195
|
-
return cn('animate-fade-in animate-duration-300', this.
|
|
186
|
+
get componentClass() {
|
|
187
|
+
return cn('animate-fade-in animate-duration-300', this.classes());
|
|
196
188
|
}
|
|
197
189
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WizardContentComponent, deps: [{ token: WizardWrapperComponent, host: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
198
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: WizardContentComponent, isStandalone: true, selector: "app-wizard-content", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: true, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null },
|
|
190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: WizardContentComponent, isStandalone: true, selector: "app-wizard-content", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: true, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { status: "statusChange", isValid: "isValidChange" }, ngImport: i0, template: "@if (this.isStepActive()) {\n\t<div [class]=\"componentClass\">\n\t\t<ng-content></ng-content>\n\t</div>\n}\n" });
|
|
199
191
|
}
|
|
200
192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: WizardContentComponent, decorators: [{
|
|
201
193
|
type: Component,
|
|
202
|
-
args: [{ selector: 'app-wizard-content', standalone: true, imports: [], template: "@if (this.isStepActive()) {\n\t<div [class]=\"
|
|
194
|
+
args: [{ selector: 'app-wizard-content', standalone: true, imports: [], template: "@if (this.isStepActive()) {\n\t<div [class]=\"componentClass\">\n\t\t<ng-content></ng-content>\n\t</div>\n}\n" }]
|
|
203
195
|
}], ctorParameters: () => [{ type: WizardWrapperComponent, decorators: [{
|
|
204
196
|
type: Host
|
|
205
197
|
}] }] });
|