@tekus/design-system 5.29.2 → 5.31.0

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.
Files changed (27) hide show
  1. package/fesm2022/tekus-design-system-components-action-group.mjs +69 -0
  2. package/fesm2022/tekus-design-system-components-action-group.mjs.map +1 -0
  3. package/fesm2022/tekus-design-system-components-card-list.mjs +1 -1
  4. package/fesm2022/tekus-design-system-components-card-list.mjs.map +1 -1
  5. package/fesm2022/tekus-design-system-components-card.mjs +22 -4
  6. package/fesm2022/tekus-design-system-components-card.mjs.map +1 -1
  7. package/fesm2022/tekus-design-system-components-multiselect.mjs +257 -22
  8. package/fesm2022/tekus-design-system-components-multiselect.mjs.map +1 -1
  9. package/fesm2022/tekus-design-system-components-select.mjs +1 -1
  10. package/fesm2022/tekus-design-system-components-select.mjs.map +1 -1
  11. package/fesm2022/tekus-design-system-components-stepper.mjs +115 -0
  12. package/fesm2022/tekus-design-system-components-stepper.mjs.map +1 -0
  13. package/fesm2022/tekus-design-system-components-table.mjs +173 -3
  14. package/fesm2022/tekus-design-system-components-table.mjs.map +1 -1
  15. package/fesm2022/tekus-design-system-components-time-ago.mjs +154 -0
  16. package/fesm2022/tekus-design-system-components-time-ago.mjs.map +1 -0
  17. package/fesm2022/tekus-design-system-core-types.mjs +23 -0
  18. package/fesm2022/tekus-design-system-core-types.mjs.map +1 -1
  19. package/fesm2022/tekus-design-system-core.mjs +23 -0
  20. package/fesm2022/tekus-design-system-core.mjs.map +1 -1
  21. package/package.json +13 -1
  22. package/types/tekus-design-system-components-action-group.d.ts +55 -0
  23. package/types/tekus-design-system-components-card.d.ts +14 -1
  24. package/types/tekus-design-system-components-multiselect.d.ts +165 -12
  25. package/types/tekus-design-system-components-stepper.d.ts +117 -0
  26. package/types/tekus-design-system-components-table.d.ts +88 -1
  27. package/types/tekus-design-system-components-time-ago.d.ts +53 -0
@@ -1 +1 @@
1
- {"version":3,"file":"tekus-design-system-components-select.mjs","sources":["../../../projects/design-system/components/select/src/select.manager.ts","../../../projects/design-system/components/select/src/select.component.ts","../../../projects/design-system/components/select/src/select.component.html","../../../projects/design-system/components/select/src/intersection.directive.ts","../../../projects/design-system/components/select/tekus-design-system-components-select.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { auditTime, combineLatest, debounceTime, distinctUntilChanged, map, Observable, of, scan, switchMap, tap } from 'rxjs';\n\n/**\n * Standard request object for fetching data from an asynchronous source.\n * Aligned with PrimeNG LazyLoadEvent patterns.\n */\nexport interface TkSelectRequest {\n filter: string;\n page: number;\n pageSize: number;\n sortField?: string;\n sortOrder?: number;\n params?: Record<string, unknown>;\n}\n\n/**\n * Interface representing the data source for the Select manager.\n */\nexport interface SelectDataSource<T> {\n fetch(request: TkSelectRequest): Observable<T[]>;\n}\n\n@Injectable()\nexport class TkSelectManager<T> {\n /**\n * Reactive signal for the current search query.\n */\n searchQuery = signal<string>('');\n\n /**\n * Reactive signal for the current pagination page.\n */\n page = signal<number>(1);\n\n /**\n * Data source provider for fetching items.\n */\n public dataSource: SelectDataSource<T> | undefined;\n\n /**\n * Additional parameters to send to the data source.\n */\n fetchParams = signal<Record<string, unknown>>({});\n\n /**\n * Sorting field.\n */\n sortField = signal<string | undefined>(undefined);\n\n /**\n * Sorting order (1 for ASC, -1 for DESC).\n */\n sortOrder = signal<number | undefined>(undefined);\n\n /**\n * Reactive signal indicating if data is currently being fetched.\n */\n loading = signal<boolean>(false);\n\n /**\n * Reactive signal indicating if there are more items to fetch.\n */\n hasMore = signal<boolean>(true);\n\n /**\n * Number of items per page to detect the end of data.\n */\n pageSize = 20;\n\n /**\n * Final accumulated list of items exposed as a Signal.\n */\n items = toSignal(\n combineLatest({\n filter: toObservable(this.searchQuery).pipe(debounceTime(200)),\n page: toObservable(this.page),\n params: toObservable(this.fetchParams),\n sortField: toObservable(this.sortField),\n sortOrder: toObservable(this.sortOrder)\n }).pipe(\n auditTime(0),\n distinctUntilChanged((prev, curr) => \n JSON.stringify(prev) === JSON.stringify(curr)\n ),\n map(data => ({ ...data, pageSize: this.pageSize } as TkSelectRequest)),\n tap((request) => {\n if (request.page === 1) {\n this.hasMore.set(true);\n }\n this.loading.set(true);\n }),\n switchMap((request: TkSelectRequest): Observable<{ results: T[]; page: number }> => {\n const fetcher$ = this.dataSource \n ? this.dataSource.fetch(request) \n : of([] as T[]);\n\n return fetcher$.pipe(\n tap(results => {\n if (results.length < this.pageSize) {\n this.hasMore.set(false);\n }\n }),\n map(results => ({ results, page: request.page })),\n tap(() => this.loading.set(false))\n );\n }),\n scan((acc: T[], { results, page }: { results: T[]; page: number }) => {\n return page === 1 ? results : [...acc, ...results];\n }, [] as T[])\n ),\n { initialValue: [] as T[] }\n );\n\n /**\n * Updates the search query and resets pagination.\n * @param query - The new search string.\n */\n updateSearch(query: string): void {\n if (this.searchQuery() !== query) {\n this.searchQuery.set(query);\n this.page.set(1);\n this.hasMore.set(true);\n }\n }\n\n /**\n * Increments the page to trigger the next data chunk.\n */\n loadNextPage(): void {\n this.page.update(p => p + 1);\n }\n\n /**\n * Configures the data provider for the manager.\n * @param provider - Object implementing the SelectDataSource interface.\n */\n setDataSource(provider: SelectDataSource<T>): void {\n this.dataSource = provider;\n }\n\n /**\n * Updates additional fetch parameters and resets pagination.\n * @param params - The new parameters object.\n */\n updateParams(params: Record<string, unknown>): void {\n if (JSON.stringify(this.fetchParams()) !== JSON.stringify(params)) {\n this.fetchParams.set(params);\n this.page.set(1);\n this.hasMore.set(true);\n }\n }\n\n /**\n * Resets the manager state to its initial values.\n */\n reset(): void {\n this.searchQuery.set('');\n this.page.set(1);\n this.hasMore.set(true);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n model,\n input,\n output,\n inject,\n viewChild,\n effect,\n signal,\n OnDestroy,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NgControl,\n FormControl,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { Select } from 'primeng/select';\nimport { MessageModule } from 'primeng/message';\nimport { IconComponent } from '@tekus/design-system/components/icon';\nimport { TkSelectManager, SelectDataSource } from './select.manager';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'tk-select',\n providers: [TkSelectManager],\n imports: [\n FormsModule,\n Select,\n FloatLabelModule,\n MessageModule,\n ReactiveFormsModule,\n IconComponent,\n ],\n templateUrl: './select.component.html',\n styleUrl: './select.component.scss',\n})\nexport class SelectComponent<T = unknown> implements ControlValueAccessor, OnDestroy {\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n readonly manager = inject(TkSelectManager<T>);\n\n /** PrimeNG Select instance */\n readonly selectComponent = viewChild<Select>('pSelect');\n\n /** Final reactive list of items */\n\n /**\n * HTML id attribute for the select input.\n * @default 'select'\n */\n id = input<string>('select');\n\n /**\n * External FormControl used to read/set the input value.\n */\n control = input<FormControl>();\n\n /**\n * Static options for synchronous mode.\n * If provided, they take precedence over the manager's async stream.\n */\n options = input<T[]>([]);\n\n /**\n * Data source for asynchronous infinite scroll mode.\n */\n dataSource = model<SelectDataSource<T>>();\n\n /**\n * Name of the property used to display the text of each option.\n * @default 'label'\n */\n optionLabel = input<string>('label');\n\n /**\n * Floating label displayed above the select input.\n */\n label = input<string>('');\n\n /**\n * Enables the clear button to remove the current selection.\n * @default true\n */\n showClear = input<boolean>(true);\n\n /**\n * Determines whether the select field is disabled.\n * @default false\n */\n disabled = input<boolean>(false);\n\n /**\n * Message to display when the control is invalid and touched.\n */\n errorMessage = input<string>('');\n\n /**\n * Hint text to display below the input.\n */\n hint = input<string>('');\n\n /**\n * Enables filtering/search input.\n * @default false\n */\n filter = input<boolean>(false);\n\n /**\n * Placeholder text displayed when no value is selected.\n * @default 'Select an option'\n */\n placeholder = input<string>('Select an option');\n\n /**\n * Loading state for the dropdown.\n */\n loading = input<boolean>(false);\n\n /**\n * Additional parameters for the async data source.\n * Useful for sending context like categoryId, parentId, etc.\n */\n fetchParams = input<Record<string, unknown>>({});\n\n /**\n * Field name to sort by in the async data source.\n */\n sortField = input<string | undefined>(undefined);\n\n /**\n * Order to sort by (1 for ASC, -1 for DESC).\n */\n sortOrder = input<number | undefined>(undefined);\n\n /**\n * Internal writable signal for the disabled state.\n */\n internalDisabled = signal<boolean>(false);\n\n /**\n * Two-way binding model using Angular signals.\n * This is the single source of truth for the selected value.\n */\n model = model<T | null>(null);\n\n /**\n * Text to display when there are no options.\n */\n emptyMessage = input<string>('No data available');\n\n /**\n * Text to display when no results match the filter.\n */\n emptyFilterMessage = input<string>('No results found');\n\n /**\n * Emits whenever the value changes.\n */\n modelChange = output<T | null>();\n\n /**\n * Emits the filter search term.\n */\n filterChange = output<{ filter: string | null }>();\n\n // CVA callbacks\n private onChangeFn: (value: T | null) => void = () => {};\n private onTouchedFn = () => {};\n private scrollHandler = this.handleScroll.bind(this);\n private lastListContainer: HTMLElement | null = null;\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n // Synchronize parameters with the manager\n effect(() => {\n this.manager.updateParams(this.fetchParams());\n });\n\n effect(() => {\n this.manager.sortField.set(this.sortField());\n this.manager.sortOrder.set(this.sortOrder());\n });\n\n // Synchronize disabled state\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n // Synchronize data source (Strictly necessary effect to bridge with manager)\n effect(() => {\n const source = this.dataSource();\n if (source) {\n this.manager.setDataSource(source);\n }\n });\n }\n\n /**\n * Displays the items from the manager if provided, otherwise the static options.\n * Includes a \"Ghost Option\" logic to ensure the selected item is always visible\n * even if it's not in the current loaded chunk of data.\n */\n get items(): T[] {\n const baseItems = this.dataSource()\n ? (this.manager.items() as T[])\n : this.options();\n const selected = this.model();\n\n if (!selected) return baseItems;\n\n // Check if selected item is already in the list to avoid duplicates\n // We compare by stringifying or by a known 'id' field if possible\n const exists = baseItems.some(item => {\n if (item === selected) return true;\n const itemId = (item as Record<string, unknown> | null)?.['id'] || (item as Record<string, unknown> | null)?.['code'];\n const selectedId = (selected as Record<string, unknown> | null)?.['id'] || (selected as Record<string, unknown> | null)?.['code'];\n return itemId !== undefined && itemId === selectedId;\n });\n\n return exists ? baseItems : [selected, ...baseItems];\n }\n\n /**\n * Receives value updates from Angular Forms API.\n * @param value - New value from the forms API.\n */\n writeValue(value: T | null): void {\n this.model.set(value);\n }\n\n /**\n * Registers a callback that is invoked when the component's value changes.\n * @param fn - The callback function.\n */\n registerOnChange(fn: (value: T | null) => void): void {\n this.onChangeFn = fn;\n }\n\n /**\n * Registers a callback invoked when the component is touched.\n * @param fn - The callback function.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n /**\n * Updates the disabled state of the control.\n * @param isDisabled - Whether the component should be disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n /**\n * Handles UI changes from the PrimeNG Select.\n * @param event - Event containing the selected value.\n */\n handleChange(event: { value: T | null }): void {\n const value = event.value ?? null;\n this.model.set(value);\n this.onChangeFn(value);\n this.onTouchedFn();\n this.modelChange.emit(value);\n\n if (this.effectiveControl) {\n this.effectiveControl.setValue(value, { emitEvent: false });\n this.effectiveControl.markAsDirty();\n this.effectiveControl.markAsTouched();\n }\n }\n\n /**\n * Handles filter input changes and notifies the manager.\n * @param event - Filter event containing the search term.\n */\n handleFilter(event: { filter: string | null }): void {\n const query = event.filter || '';\n this.manager.updateSearch(query);\n this.filterChange.emit(event);\n }\n\n /**\n * Returns the underlying FormControl for validation state checking.\n */\n get effectiveControl(): FormControl | null {\n return (this.ngControl?.control as FormControl) || null;\n }\n\n /**\n * Adds a scroll listener to the PrimeNG select list container when the panel opens.\n */\n onPanelShow(): void {\n const listContainer = document.querySelector('.p-select-list-container') as HTMLElement;\n if (listContainer) {\n this.lastListContainer = listContainer;\n listContainer.addEventListener('scroll', this.scrollHandler);\n }\n }\n\n /**\n * Cleans up state, removes listeners and resets the manager when the panel closes.\n */\n onPanelHide(): void {\n this.removeScrollListener();\n this.manager.reset();\n }\n\n /**\n * Cleans up listeners on component destruction.\n */\n ngOnDestroy(): void {\n this.removeScrollListener();\n }\n\n /**\n * Safely removes the scroll event listener.\n */\n private removeScrollListener(): void {\n if (this.lastListContainer) {\n this.lastListContainer.removeEventListener('scroll', this.scrollHandler);\n this.lastListContainer = null;\n }\n }\n\n /**\n * Detects if the user has reached the bottom of the list.\n */\n private handleScroll(event: Event): void {\n const target = event.target as HTMLElement;\n if (!target) return;\n\n // Trigger near the bottom (1px threshold)\n const atBottom =\n target.scrollHeight - target.scrollTop <= target.clientHeight + 1;\n\n if (\n atBottom &&\n this.manager.dataSource &&\n !this.manager.loading() &&\n this.manager.hasMore()\n ) {\n this.manager.loadNextPage();\n }\n }\n}\n","<p-floatlabel class=\"w-full\">\n <p-select\n #pSelect\n [id]=\"id()\"\n class=\"w-full\"\n [options]=\"items\"\n [optionLabel]=\"optionLabel()\"\n [showClear]=\"showClear()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"model()\"\n [filter]=\"filter()\"\n [loading]=\"manager.loading()\"\n [emptyMessage]=\"emptyMessage()\"\n [emptyFilterMessage]=\"emptyFilterMessage()\"\n [class.ng-invalid]=\"\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched)\n \"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onChange)=\"handleChange($event)\"\n (onFilter)=\"handleFilter($event)\"\n (onShow)=\"onPanelShow()\"\n (onHide)=\"onPanelHide()\"\n [resetFilterOnHide]=\"true\">\n \n <ng-template pTemplate=\"selectedItem\" let-selectedOption>\n @if (model()) {\n <div>{{ $any(model())[optionLabel()] }}</div>\n } @else if (placeholder()) {\n <span class=\"text-secondary\">{{ placeholder() }}</span>\n }\n </ng-template>\n\n <ng-template pTemplate=\"empty\">\n <div class=\"tk-select-empty-container\">\n <tk-icon icon=\"info\" size=\"2xl\"></tk-icon>\n <span>{{ emptyMessage() }}</span>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"emptyfilter\">\n <div class=\"tk-select-empty-container\">\n <tk-icon icon=\"magnifying-glass\" size=\"2xl\"></tk-icon>\n <span>{{ emptyFilterMessage() }}</span>\n </div>\n </ng-template>\n </p-select>\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if (\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched) &&\n errorMessage()\n ) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{\n errorMessage()\n }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{\n hint()\n }}</p-message>\n }\n </div>\n</div>\n","import { Directive, ElementRef, output, OnDestroy, OnInit, inject } from '@angular/core';\n\n@Directive({\n selector: '[tkIntersection]',\n standalone: true\n})\nexport class IntersectionDirective implements OnInit, OnDestroy {\n /**\n * Emits when the element enters the viewport.\n */\n intersect = output<void>();\n\n private readonly element = inject(ElementRef);\n private observer?: IntersectionObserver;\n\n constructor() {}\n\n /**\n * Initializes the Intersection Observer on component mount.\n */\n ngOnInit(): void {\n this.observer = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting) {\n this.intersect.emit();\n }\n }, { threshold: 0.1 });\n\n this.observer.observe(this.element.nativeElement);\n }\n\n /**\n * Cleans up the observer to prevent memory leaks.\n */\n ngOnDestroy(): void {\n this.observer?.disconnect();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAyBa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE;;AAEG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAS,EAAE,kFAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAS,CAAC,2EAAC;AAO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A;AAShC,IAAA,WAAA,GAAA;AARA;;AAEG;QACH,IAAA,CAAA,SAAS,GAAG,MAAM,EAAQ;AAET,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;IAG9B;AAEf;;AAEG;IACH,QAAQ,GAAA;QACN,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAI;AACnD,YAAA,IAAI,KAAK,CAAC,cAAc,EAAE;AACxB,gBAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;YACvB;AACF,QAAA,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;QAEtB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;IACnD;AAEA;;AAEG;IACH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE;IAC7B;8GA7BW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"tekus-design-system-components-select.mjs","sources":["../../../projects/design-system/components/select/src/select.manager.ts","../../../projects/design-system/components/select/src/select.component.ts","../../../projects/design-system/components/select/src/select.component.html","../../../projects/design-system/components/select/src/intersection.directive.ts","../../../projects/design-system/components/select/tekus-design-system-components-select.ts"],"sourcesContent":["import { Injectable, signal } from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { auditTime, combineLatest, debounceTime, distinctUntilChanged, map, Observable, of, scan, switchMap, tap } from 'rxjs';\n\n/**\n * Standard request object for fetching data from an asynchronous source.\n * Aligned with PrimeNG LazyLoadEvent patterns.\n */\nexport interface TkSelectRequest {\n filter: string;\n page: number;\n pageSize: number;\n sortField?: string;\n sortOrder?: number;\n params?: Record<string, unknown>;\n}\n\n/**\n * Interface representing the data source for the Select manager.\n */\nexport interface SelectDataSource<T> {\n fetch(request: TkSelectRequest): Observable<T[]>;\n}\n\n@Injectable()\nexport class TkSelectManager<T> {\n /**\n * Reactive signal for the current search query.\n */\n searchQuery = signal<string>('');\n\n /**\n * Reactive signal for the current pagination page.\n */\n page = signal<number>(1);\n\n /**\n * Data source provider for fetching items.\n */\n public dataSource: SelectDataSource<T> | undefined;\n\n /**\n * Additional parameters to send to the data source.\n */\n fetchParams = signal<Record<string, unknown>>({});\n\n /**\n * Sorting field.\n */\n sortField = signal<string | undefined>(undefined);\n\n /**\n * Sorting order (1 for ASC, -1 for DESC).\n */\n sortOrder = signal<number | undefined>(undefined);\n\n /**\n * Reactive signal indicating if data is currently being fetched.\n */\n loading = signal<boolean>(false);\n\n /**\n * Reactive signal indicating if there are more items to fetch.\n */\n hasMore = signal<boolean>(true);\n\n /**\n * Number of items per page to detect the end of data.\n */\n pageSize = 20;\n\n /**\n * Final accumulated list of items exposed as a Signal.\n */\n items = toSignal(\n combineLatest({\n filter: toObservable(this.searchQuery).pipe(debounceTime(200)),\n page: toObservable(this.page),\n params: toObservable(this.fetchParams),\n sortField: toObservable(this.sortField),\n sortOrder: toObservable(this.sortOrder)\n }).pipe(\n auditTime(0),\n distinctUntilChanged((prev, curr) => \n JSON.stringify(prev) === JSON.stringify(curr)\n ),\n map(data => ({ ...data, pageSize: this.pageSize } as TkSelectRequest)),\n tap((request) => {\n if (request.page === 1) {\n this.hasMore.set(true);\n }\n this.loading.set(true);\n }),\n switchMap((request: TkSelectRequest): Observable<{ results: T[]; page: number }> => {\n const fetcher$ = this.dataSource \n ? this.dataSource.fetch(request) \n : of([] as T[]);\n\n return fetcher$.pipe(\n tap(results => {\n if (results.length < this.pageSize) {\n this.hasMore.set(false);\n }\n }),\n map(results => ({ results, page: request.page })),\n tap(() => this.loading.set(false))\n );\n }),\n scan((acc: T[], { results, page }: { results: T[]; page: number }) => {\n return page === 1 ? results : [...acc, ...results];\n }, [] as T[])\n ),\n { initialValue: [] as T[] }\n );\n\n /**\n * Updates the search query and resets pagination.\n * @param query - The new search string.\n */\n updateSearch(query: string): void {\n if (this.searchQuery() !== query) {\n this.searchQuery.set(query);\n this.page.set(1);\n this.hasMore.set(true);\n }\n }\n\n /**\n * Increments the page to trigger the next data chunk.\n */\n loadNextPage(): void {\n this.page.update(p => p + 1);\n }\n\n /**\n * Configures the data provider for the manager.\n * @param provider - Object implementing the SelectDataSource interface.\n */\n setDataSource(provider: SelectDataSource<T>): void {\n this.dataSource = provider;\n }\n\n /**\n * Updates additional fetch parameters and resets pagination.\n * @param params - The new parameters object.\n */\n updateParams(params: Record<string, unknown>): void {\n if (JSON.stringify(this.fetchParams()) !== JSON.stringify(params)) {\n this.fetchParams.set(params);\n this.page.set(1);\n this.hasMore.set(true);\n }\n }\n\n /**\n * Resets the manager state to its initial values.\n */\n reset(): void {\n this.searchQuery.set('');\n this.page.set(1);\n this.hasMore.set(true);\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n model,\n input,\n output,\n inject,\n viewChild,\n effect,\n signal,\n OnDestroy,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NgControl,\n FormControl,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { Select } from 'primeng/select';\nimport { MessageModule } from 'primeng/message';\nimport { IconComponent } from '@tekus/design-system/components/icon';\nimport { TkSelectManager, SelectDataSource } from './select.manager';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'tk-select',\n providers: [TkSelectManager],\n imports: [\n FormsModule,\n Select,\n FloatLabelModule,\n MessageModule,\n ReactiveFormsModule,\n IconComponent,\n ],\n templateUrl: './select.component.html',\n styleUrl: './select.component.scss',\n})\nexport class SelectComponent<T = unknown> implements ControlValueAccessor, OnDestroy {\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n readonly manager = inject(TkSelectManager<T>);\n\n /** PrimeNG Select instance */\n readonly selectComponent = viewChild<Select>('pSelect');\n\n /** Final reactive list of items */\n\n /**\n * HTML id attribute for the select input.\n * @default 'select'\n */\n id = input<string>('select');\n\n /**\n * External FormControl used to read/set the input value.\n */\n control = input<FormControl>();\n\n /**\n * Static options for synchronous mode.\n * If provided, they take precedence over the manager's async stream.\n */\n options = input<T[]>([]);\n\n /**\n * Data source for asynchronous infinite scroll mode.\n */\n dataSource = model<SelectDataSource<T>>();\n\n /**\n * Name of the property used to display the text of each option.\n * @default 'label'\n */\n optionLabel = input<string>('label');\n\n /**\n * Floating label displayed above the select input.\n */\n label = input<string>('');\n\n /**\n * Enables the clear button to remove the current selection.\n * @default true\n */\n showClear = input<boolean>(true);\n\n /**\n * Determines whether the select field is disabled.\n * @default false\n */\n disabled = input<boolean>(false);\n\n /**\n * Message to display when the control is invalid and touched.\n */\n errorMessage = input<string>('');\n\n /**\n * Hint text to display below the input.\n */\n hint = input<string>('');\n\n /**\n * Enables filtering/search input.\n * @default false\n */\n filter = input<boolean>(false);\n\n /**\n * Placeholder text displayed when no value is selected.\n * @default 'Select an option'\n */\n placeholder = input<string>('Select an option');\n\n /**\n * Loading state for the dropdown.\n */\n loading = input<boolean>(false);\n\n /**\n * Additional parameters for the async data source.\n * Useful for sending context like categoryId, parentId, etc.\n */\n fetchParams = input<Record<string, unknown>>({});\n\n /**\n * Field name to sort by in the async data source.\n */\n sortField = input<string | undefined>(undefined);\n\n /**\n * Order to sort by (1 for ASC, -1 for DESC).\n */\n sortOrder = input<number | undefined>(undefined);\n\n /**\n * Internal writable signal for the disabled state.\n */\n internalDisabled = signal<boolean>(false);\n\n /**\n * Two-way binding model using Angular signals.\n * This is the single source of truth for the selected value.\n */\n model = model<T | null>(null);\n\n /**\n * Text to display when there are no options.\n */\n emptyMessage = input<string>('No data available');\n\n /**\n * Text to display when no results match the filter.\n */\n emptyFilterMessage = input<string>('No results found');\n\n /**\n * Emits whenever the value changes.\n */\n modelChange = output<T | null>();\n\n /**\n * Emits the filter search term.\n */\n filterChange = output<{ filter: string | null }>();\n\n // CVA callbacks\n private onChangeFn: (value: T | null) => void = () => {};\n private onTouchedFn = () => {};\n private scrollHandler = this.handleScroll.bind(this);\n private lastListContainer: HTMLElement | null = null;\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n // Synchronize parameters with the manager\n effect(() => {\n this.manager.updateParams(this.fetchParams());\n });\n\n effect(() => {\n this.manager.sortField.set(this.sortField());\n this.manager.sortOrder.set(this.sortOrder());\n });\n\n // Synchronize disabled state\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n // Synchronize data source (Strictly necessary effect to bridge with manager)\n effect(() => {\n const source = this.dataSource();\n if (source) {\n this.manager.setDataSource(source);\n }\n });\n }\n\n /**\n * Displays the items from the manager if provided, otherwise the static options.\n * Includes a \"Ghost Option\" logic to ensure the selected item is always visible\n * even if it's not in the current loaded chunk of data.\n */\n get items(): T[] {\n const baseItems = this.dataSource()\n ? (this.manager.items() as T[])\n : this.options();\n const selected = this.model();\n\n if (!selected) return baseItems;\n\n // Check if selected item is already in the list to avoid duplicates\n // We compare by stringifying or by a known 'id' field if possible\n const exists = baseItems.some(item => {\n if (item === selected) return true;\n const itemId = (item as Record<string, unknown> | null)?.['id'] || (item as Record<string, unknown> | null)?.['code'];\n const selectedId = (selected as Record<string, unknown> | null)?.['id'] || (selected as Record<string, unknown> | null)?.['code'];\n return itemId !== undefined && itemId === selectedId;\n });\n\n return exists ? baseItems : [selected, ...baseItems];\n }\n\n /**\n * Receives value updates from Angular Forms API.\n * @param value - New value from the forms API.\n */\n writeValue(value: T | null): void {\n this.model.set(value);\n }\n\n /**\n * Registers a callback that is invoked when the component's value changes.\n * @param fn - The callback function.\n */\n registerOnChange(fn: (value: T | null) => void): void {\n this.onChangeFn = fn;\n }\n\n /**\n * Registers a callback invoked when the component is touched.\n * @param fn - The callback function.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n /**\n * Updates the disabled state of the control.\n * @param isDisabled - Whether the component should be disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n /**\n * Handles UI changes from the PrimeNG Select.\n * @param event - Event containing the selected value.\n */\n handleChange(event: { value: T | null }): void {\n const value = event.value ?? null;\n this.model.set(value);\n this.onChangeFn(value);\n this.onTouchedFn();\n this.modelChange.emit(value);\n\n if (this.effectiveControl) {\n this.effectiveControl.setValue(value, { emitEvent: false });\n this.effectiveControl.markAsDirty();\n this.effectiveControl.markAsTouched();\n }\n }\n\n /**\n * Handles filter input changes and notifies the manager.\n * @param event - Filter event containing the search term.\n */\n handleFilter(event: { filter: string | null }): void {\n const query = event.filter || '';\n this.manager.updateSearch(query);\n this.filterChange.emit(event);\n }\n\n /**\n * Returns the underlying FormControl for validation state checking.\n */\n get effectiveControl(): FormControl | null {\n return (this.ngControl?.control as FormControl) || this.control() || null;\n }\n\n /**\n * Adds a scroll listener to the PrimeNG select list container when the panel opens.\n */\n onPanelShow(): void {\n const listContainer = document.querySelector('.p-select-list-container') as HTMLElement;\n if (listContainer) {\n this.lastListContainer = listContainer;\n listContainer.addEventListener('scroll', this.scrollHandler);\n }\n }\n\n /**\n * Cleans up state, removes listeners and resets the manager when the panel closes.\n */\n onPanelHide(): void {\n this.removeScrollListener();\n this.manager.reset();\n }\n\n /**\n * Cleans up listeners on component destruction.\n */\n ngOnDestroy(): void {\n this.removeScrollListener();\n }\n\n /**\n * Safely removes the scroll event listener.\n */\n private removeScrollListener(): void {\n if (this.lastListContainer) {\n this.lastListContainer.removeEventListener('scroll', this.scrollHandler);\n this.lastListContainer = null;\n }\n }\n\n /**\n * Detects if the user has reached the bottom of the list.\n */\n private handleScroll(event: Event): void {\n const target = event.target as HTMLElement;\n if (!target) return;\n\n // Trigger near the bottom (1px threshold)\n const atBottom =\n target.scrollHeight - target.scrollTop <= target.clientHeight + 1;\n\n if (\n atBottom &&\n this.manager.dataSource &&\n !this.manager.loading() &&\n this.manager.hasMore()\n ) {\n this.manager.loadNextPage();\n }\n }\n}\n","<p-floatlabel class=\"w-full\">\n <p-select\n #pSelect\n [id]=\"id()\"\n class=\"w-full\"\n [options]=\"items\"\n [optionLabel]=\"optionLabel()\"\n [showClear]=\"showClear()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"model()\"\n [filter]=\"filter()\"\n [loading]=\"manager.loading()\"\n [emptyMessage]=\"emptyMessage()\"\n [emptyFilterMessage]=\"emptyFilterMessage()\"\n [class.ng-invalid]=\"\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched)\n \"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onChange)=\"handleChange($event)\"\n (onFilter)=\"handleFilter($event)\"\n (onShow)=\"onPanelShow()\"\n (onHide)=\"onPanelHide()\"\n [resetFilterOnHide]=\"true\">\n \n <ng-template pTemplate=\"selectedItem\" let-selectedOption>\n @if (model()) {\n <div>{{ $any(model())[optionLabel()] }}</div>\n } @else if (placeholder()) {\n <span class=\"text-secondary\">{{ placeholder() }}</span>\n }\n </ng-template>\n\n <ng-template pTemplate=\"empty\">\n <div class=\"tk-select-empty-container\">\n <tk-icon icon=\"info\" size=\"2xl\"></tk-icon>\n <span>{{ emptyMessage() }}</span>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"emptyfilter\">\n <div class=\"tk-select-empty-container\">\n <tk-icon icon=\"magnifying-glass\" size=\"2xl\"></tk-icon>\n <span>{{ emptyFilterMessage() }}</span>\n </div>\n </ng-template>\n </p-select>\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if (\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched) &&\n errorMessage()\n ) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{\n errorMessage()\n }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{\n hint()\n }}</p-message>\n }\n </div>\n</div>\n","import { Directive, ElementRef, output, OnDestroy, OnInit, inject } from '@angular/core';\n\n@Directive({\n selector: '[tkIntersection]',\n standalone: true\n})\nexport class IntersectionDirective implements OnInit, OnDestroy {\n /**\n * Emits when the element enters the viewport.\n */\n intersect = output<void>();\n\n private readonly element = inject(ElementRef);\n private observer?: IntersectionObserver;\n\n constructor() {}\n\n /**\n * Initializes the Intersection Observer on component mount.\n */\n ngOnInit(): void {\n this.observer = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting) {\n this.intersect.emit();\n }\n }, { threshold: 0.1 });\n\n this.observer.observe(this.element.nativeElement);\n }\n\n /**\n * Cleans up the observer to prevent memory leaks.\n */\n ngOnDestroy(): void {\n this.observer?.disconnect();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAyBa,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEE;;AAEG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAS,EAAE,kFAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAS,CAAC,2EAAC;AAOxB;;AAEG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAA0B,EAAE,kFAAC;AAEjD;;AAEG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAqB,SAAS,gFAAC;AAEjD;;A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,UAAU,CAAC;IAG9B;AAEf;;AAEG;IACH,QAAQ,GAAA;QACN,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,KAAI;AACnD,YAAA,IAAI,KAAK,CAAC,cAAc,EAAE;AACxB,gBAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;YACvB;AACF,QAAA,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;QAEtB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;IACnD;AAEA;;AAEG;IACH,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE;IAC7B;8GA7BW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -0,0 +1,115 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, model, output, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { NgTemplateOutlet } from '@angular/common';
4
+ import * as i1 from 'primeng/stepper';
5
+ import { StepperModule } from 'primeng/stepper';
6
+ import * as i2 from 'primeng/api';
7
+ import { SharedModule } from 'primeng/api';
8
+ import { ButtonComponent } from '@tekus/design-system/components/button';
9
+
10
+ /**
11
+ * @component StepperComponent
12
+ * @description
13
+ * Reusable stepper component that acts as a wrapper around PrimeNG's Stepper.
14
+ * Supports horizontal and vertical orientations, linear step completion rules,
15
+ * and automated footer action buttons.
16
+ *
17
+ * @usage
18
+ * ```html
19
+ * <tk-stepper
20
+ * [steps]="steps"
21
+ * [(activeStep)]="currentStep"
22
+ * [linear]="true"
23
+ * orientation="horizontal">
24
+ * </tk-stepper>
25
+ * ```
26
+ */
27
+ class StepperComponent {
28
+ constructor() {
29
+ /**
30
+ * @property {InputSignal<StepData[]>} steps
31
+ * @description Array of step configurations to display.
32
+ */
33
+ this.steps = input([], ...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
34
+ /**
35
+ * @property {ModelSignal<number>} activeStep
36
+ * @description The 0-based index of the currently active step. Supports two-way binding.
37
+ * @default 0
38
+ */
39
+ this.activeStep = model(0, ...(ngDevMode ? [{ debugName: "activeStep" }] : /* istanbul ignore next */ []));
40
+ /**
41
+ * @property {InputSignal<boolean>} linear
42
+ * @description If true, blocks navigation to steps ahead of the active step.
43
+ * @default true
44
+ */
45
+ this.linear = input(true, ...(ngDevMode ? [{ debugName: "linear" }] : /* istanbul ignore next */ []));
46
+ /**
47
+ * @property {InputSignal<'horizontal' | 'vertical'>} orientation
48
+ * @description Defines the layout orientation of the stepper.
49
+ * @default 'horizontal'
50
+ */
51
+ this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
52
+ /**
53
+ * @property {InputSignal<boolean>} showFooter
54
+ * @description Whether to render the default footer action buttons for each step.
55
+ * @default true
56
+ */
57
+ this.showFooter = input(true, ...(ngDevMode ? [{ debugName: "showFooter" }] : /* istanbul ignore next */ []));
58
+ /**
59
+ * @event stepChange
60
+ * @description Emitted when the active step changes.
61
+ */
62
+ this.stepChange = output();
63
+ }
64
+ /**
65
+ * Checks if a step header should be disabled.
66
+ * Steps ahead of the active index are disabled in linear mode.
67
+ */
68
+ isStepDisabled(index) {
69
+ const step = this.steps()[index];
70
+ if (!step)
71
+ return true;
72
+ if (step.disabled)
73
+ return true;
74
+ if (this.linear() && index > this.activeStep())
75
+ return true;
76
+ return false;
77
+ }
78
+ /**
79
+ * Helper to evaluate button disabled states dynamically.
80
+ */
81
+ evalDisabled(disabled) {
82
+ if (disabled === undefined)
83
+ return false;
84
+ if (typeof disabled === 'function')
85
+ return disabled();
86
+ return disabled;
87
+ }
88
+ /**
89
+ * Handles step transition events.
90
+ */
91
+ onStepChange(index) {
92
+ if (this.activeStep() === index)
93
+ return;
94
+ this.activeStep.set(index);
95
+ if (this.steps()[index]) {
96
+ this.stepChange.emit({
97
+ index,
98
+ step: this.steps()[index],
99
+ });
100
+ }
101
+ }
102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
103
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.3", type: StepperComponent, isStandalone: true, selector: "tk-stepper", inputs: { steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null }, activeStep: { classPropertyName: "activeStep", publicName: "activeStep", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeStep: "activeStepChange", stepChange: "stepChange" }, ngImport: i0, template: "<div class=\"tk-stepper-container\" [class.tk-stepper-vertical]=\"orientation() === 'vertical'\" [class.tk-stepper-horizontal]=\"orientation() === 'horizontal'\">\n @if (steps().length > 0) {\n @if (orientation() === 'horizontal') {\n <p-stepper [value]=\"activeStep()\" [linear]=\"linear()\" (valueChange)=\"onStepChange($event !== undefined ? +$event : activeStep())\">\n <p-step-list class=\"tk-step-list-horizontal\">\n @for (step of steps(); track $index) {\n <p-step [value]=\"$index\" [disabled]=\"isStepDisabled($index)\">\n <div class=\"tk-step-header-content\">\n <span class=\"tk-step-number\">{{ $index + 1 }}</span>\n <span class=\"tk-step-title\">{{ step.label }}</span>\n </div>\n </p-step>\n }\n </p-step-list>\n\n <p-step-panels class=\"tk-step-panels-horizontal\">\n @for (step of steps(); track $index) {\n <p-step-panel [value]=\"$index\">\n <ng-template pTemplate=\"content\">\n <div class=\"tk-step-panel-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n \n @if (showFooter() && (step.actionsPrimary?.length || step.actionsSecondary?.length)) {\n <div class=\"tk-step-actions-footer\">\n <div class=\"tk-step-actions-secondary\">\n @for (action of step.actionsSecondary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'secondary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n <div class=\"tk-step-actions-primary\">\n @for (action of step.actionsPrimary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'primary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n </div>\n }\n </ng-template>\n </p-step-panel>\n }\n </p-step-panels>\n </p-stepper>\n } @else {\n <p-stepper [value]=\"activeStep()\" [linear]=\"linear()\" (valueChange)=\"onStepChange($event !== undefined ? +$event : activeStep())\">\n @for (step of steps(); track $index) {\n <p-step-item [value]=\"$index\">\n <p-step [value]=\"$index\" [disabled]=\"isStepDisabled($index)\">\n <div class=\"tk-step-header-content\">\n <span class=\"tk-step-number\">{{ $index + 1 }}</span>\n <span class=\"tk-step-title\">{{ step.label }}</span>\n </div>\n </p-step>\n <p-step-panel [value]=\"$index\">\n <ng-template pTemplate=\"content\">\n <div class=\"tk-step-panel-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n\n @if (showFooter() && (step.actionsPrimary?.length || step.actionsSecondary?.length)) {\n <div class=\"tk-step-actions-footer vertical\">\n @for (action of step.actionsSecondary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'secondary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n @for (action of step.actionsPrimary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'primary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n }\n </ng-template>\n </p-step-panel>\n </p-step-item>\n }\n </p-stepper>\n }\n }\n</div>\n", styles: [":host{display:block;width:100%}.tk-stepper-container{display:block;width:100%;box-sizing:border-box}.tk-stepper-container.tk-stepper-vertical{padding-right:1rem;padding-bottom:.5rem}:host ::ng-deep .p-stepper{display:flex;flex-direction:column;width:100%;background:transparent}:host ::ng-deep .p-steplist{display:flex;align-items:center;width:100%;background:transparent;padding:0;margin-bottom:var(--tk-spacing-base-150, 1.5rem)}:host ::ng-deep .p-step{padding:0;background:transparent;border:none;outline:none!important;box-shadow:none!important;cursor:pointer;display:flex}:host ::ng-deep .p-step:focus,:host ::ng-deep .p-step:focus-visible,:host ::ng-deep .p-step:focus-within{outline:none!important;box-shadow:none!important}:host ::ng-deep .p-step{align-items:center;gap:var(--tk-spacing-base-50, .5rem)}:host ::ng-deep .p-step .p-step-header{outline:none!important;box-shadow:none!important;border:none!important;background:transparent!important}:host ::ng-deep .p-step .p-step-header:focus,:host ::ng-deep .p-step .p-step-header:focus-visible,:host ::ng-deep .p-step .p-step-header:focus-within{outline:none!important;box-shadow:none!important}:host ::ng-deep .p-step .p-step-number{display:none!important}:host ::ng-deep .p-step .tk-step-header-content{display:flex;align-items:center;gap:var(--tk-spacing-base-50, .5rem)}:host ::ng-deep .p-step .tk-step-number{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid var(--tk-color-border-default, #cecdcd);border-radius:var(--tk-borderRadius-full, 50%);color:var(--tk-color-text-muted, #8a8a8b);font-size:var(--tk-font-size-paragraph-s, .875rem);font-weight:var(--tk-font-weight-600, 600);background-color:var(--tk-color-background-default, #ffffff);transition:all .2s ease-in-out}:host ::ng-deep .p-step .tk-step-title{color:var(--tk-color-text-muted, #8a8a8b);font-size:var(--tk-font-size-paragraph-m, 1rem);font-weight:var(--tk-font-weight-400, 400);transition:all .2s ease-in-out}:host ::ng-deep .p-step.p-step-active .tk-step-number,:host ::ng-deep .p-step[data-p-active=true] .tk-step-number{border-color:var(--tk-color-border-default, #cecdcd);color:var(--tk-color-primary-default, #16006f);background-color:var(--tk-color-background-default, #ffffff)}:host ::ng-deep .p-step.p-step-active .tk-step-title,:host ::ng-deep .p-step[data-p-active=true] .tk-step-title{color:var(--tk-color-primary-default, #16006f);font-weight:var(--tk-font-weight-600, 600)}:host ::ng-deep .p-step.p-disabled,:host ::ng-deep .p-step[disabled],:host ::ng-deep .p-step[data-p-disabled=true]{opacity:.6;cursor:not-allowed}:host ::ng-deep .p-stepper-separator{flex:1 1 0;height:1px!important;background-color:var(--tk-color-primary-default, #16006f)!important;margin:0 var(--tk-spacing-base-100, 1rem)!important;border:none!important;transition:background-color .2s ease-in-out}:host ::ng-deep .p-steppanels{width:100%;background:transparent;padding:0}:host ::ng-deep .p-steppanel{width:100%;outline:none}:host ::ng-deep .tk-stepper-vertical .p-stepper{flex-direction:column;gap:0}:host ::ng-deep .tk-stepper-vertical .p-stepitem{display:flex;flex-direction:column;width:calc(100% - .95rem);margin-left:.95rem;padding-left:var(--tk-spacing-base-100, 1rem);padding-bottom:var(--tk-spacing-base-150, 1.5rem);position:relative;box-sizing:border-box}:host ::ng-deep .tk-stepper-vertical .p-stepitem:before{content:\"\";position:absolute;left:0;top:2.6rem;bottom:1rem;width:1px;background-color:transparent;transition:background-color .2s ease-in-out}:host ::ng-deep .tk-stepper-vertical .p-stepitem[data-p-active=true]:before{background-color:var(--tk-color-primary-default, #16006f)}:host ::ng-deep .tk-stepper-vertical .p-stepitem:last-child{padding-bottom:0}:host ::ng-deep .tk-stepper-vertical .p-stepitem:last-child:before{display:none!important}:host ::ng-deep .tk-stepper-vertical .p-stepitem .p-step{margin-left:-2rem;background:transparent;position:relative;z-index:2;margin-bottom:var(--tk-spacing-base-75, .75rem)}:host ::ng-deep .tk-stepper-vertical .p-stepitem .p-steppanel{padding:0;width:100%}:host ::ng-deep .tk-stepper-vertical .p-stepitem .p-steppanel .p-steppanel-content-wrapper,:host ::ng-deep .tk-stepper-vertical .p-stepitem .p-steppanel .p-steppanel-content{margin:0!important;padding:0!important;margin-inline-start:0!important}.tk-step-panel-content{width:100%;min-height:100px}.tk-step-actions-footer{display:flex;justify-content:space-between;align-items:center;margin-top:var(--tk-spacing-base-150, 1.5rem);width:100%}.tk-step-actions-footer .tk-step-actions-secondary{display:flex;gap:var(--tk-spacing-base-50, .5rem)}.tk-step-actions-footer .tk-step-actions-primary{display:flex;gap:var(--tk-spacing-base-50, .5rem);margin-left:auto}.tk-step-actions-footer.vertical{justify-content:flex-start;gap:var(--tk-spacing-base-50, .5rem);margin-top:var(--tk-spacing-base-100, 1rem)}\n"], dependencies: [{ kind: "ngmodule", type: StepperModule }, { kind: "component", type: i1.Stepper, selector: "p-stepper", inputs: ["value", "linear", "transitionOptions", "motionOptions"], outputs: ["valueChange"] }, { kind: "component", type: i1.StepList, selector: "p-step-list" }, { kind: "component", type: i1.StepPanels, selector: "p-step-panels" }, { kind: "component", type: i1.StepPanel, selector: "p-step-panel", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: i1.StepItem, selector: "p-step-item", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: i1.Step, selector: "p-step", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "tk-button", inputs: ["label", "disabled", "type", "severity", "variant", "link", "icon", "iconPosition", "tooltipText", "size"], outputs: ["clicked"] }, { kind: "ngmodule", type: SharedModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
104
+ }
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.3", ngImport: i0, type: StepperComponent, decorators: [{
106
+ type: Component,
107
+ args: [{ selector: 'tk-stepper', imports: [StepperModule, NgTemplateOutlet, ButtonComponent, SharedModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"tk-stepper-container\" [class.tk-stepper-vertical]=\"orientation() === 'vertical'\" [class.tk-stepper-horizontal]=\"orientation() === 'horizontal'\">\n @if (steps().length > 0) {\n @if (orientation() === 'horizontal') {\n <p-stepper [value]=\"activeStep()\" [linear]=\"linear()\" (valueChange)=\"onStepChange($event !== undefined ? +$event : activeStep())\">\n <p-step-list class=\"tk-step-list-horizontal\">\n @for (step of steps(); track $index) {\n <p-step [value]=\"$index\" [disabled]=\"isStepDisabled($index)\">\n <div class=\"tk-step-header-content\">\n <span class=\"tk-step-number\">{{ $index + 1 }}</span>\n <span class=\"tk-step-title\">{{ step.label }}</span>\n </div>\n </p-step>\n }\n </p-step-list>\n\n <p-step-panels class=\"tk-step-panels-horizontal\">\n @for (step of steps(); track $index) {\n <p-step-panel [value]=\"$index\">\n <ng-template pTemplate=\"content\">\n <div class=\"tk-step-panel-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n \n @if (showFooter() && (step.actionsPrimary?.length || step.actionsSecondary?.length)) {\n <div class=\"tk-step-actions-footer\">\n <div class=\"tk-step-actions-secondary\">\n @for (action of step.actionsSecondary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'secondary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n <div class=\"tk-step-actions-primary\">\n @for (action of step.actionsPrimary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'primary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n </div>\n }\n </ng-template>\n </p-step-panel>\n }\n </p-step-panels>\n </p-stepper>\n } @else {\n <p-stepper [value]=\"activeStep()\" [linear]=\"linear()\" (valueChange)=\"onStepChange($event !== undefined ? +$event : activeStep())\">\n @for (step of steps(); track $index) {\n <p-step-item [value]=\"$index\">\n <p-step [value]=\"$index\" [disabled]=\"isStepDisabled($index)\">\n <div class=\"tk-step-header-content\">\n <span class=\"tk-step-number\">{{ $index + 1 }}</span>\n <span class=\"tk-step-title\">{{ step.label }}</span>\n </div>\n </p-step>\n <p-step-panel [value]=\"$index\">\n <ng-template pTemplate=\"content\">\n <div class=\"tk-step-panel-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n\n @if (showFooter() && (step.actionsPrimary?.length || step.actionsSecondary?.length)) {\n <div class=\"tk-step-actions-footer vertical\">\n @for (action of step.actionsSecondary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'secondary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n @for (action of step.actionsPrimary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'primary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n }\n </ng-template>\n </p-step-panel>\n </p-step-item>\n }\n </p-stepper>\n }\n }\n</div>\n", styles: [":host{display:block;width:100%}.tk-stepper-container{display:block;width:100%;box-sizing:border-box}.tk-stepper-container.tk-stepper-vertical{padding-right:1rem;padding-bottom:.5rem}:host ::ng-deep .p-stepper{display:flex;flex-direction:column;width:100%;background:transparent}:host ::ng-deep .p-steplist{display:flex;align-items:center;width:100%;background:transparent;padding:0;margin-bottom:var(--tk-spacing-base-150, 1.5rem)}:host ::ng-deep .p-step{padding:0;background:transparent;border:none;outline:none!important;box-shadow:none!important;cursor:pointer;display:flex}:host ::ng-deep .p-step:focus,:host ::ng-deep .p-step:focus-visible,:host ::ng-deep .p-step:focus-within{outline:none!important;box-shadow:none!important}:host ::ng-deep .p-step{align-items:center;gap:var(--tk-spacing-base-50, .5rem)}:host ::ng-deep .p-step .p-step-header{outline:none!important;box-shadow:none!important;border:none!important;background:transparent!important}:host ::ng-deep .p-step .p-step-header:focus,:host ::ng-deep .p-step .p-step-header:focus-visible,:host ::ng-deep .p-step .p-step-header:focus-within{outline:none!important;box-shadow:none!important}:host ::ng-deep .p-step .p-step-number{display:none!important}:host ::ng-deep .p-step .tk-step-header-content{display:flex;align-items:center;gap:var(--tk-spacing-base-50, .5rem)}:host ::ng-deep .p-step .tk-step-number{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:1px solid var(--tk-color-border-default, #cecdcd);border-radius:var(--tk-borderRadius-full, 50%);color:var(--tk-color-text-muted, #8a8a8b);font-size:var(--tk-font-size-paragraph-s, .875rem);font-weight:var(--tk-font-weight-600, 600);background-color:var(--tk-color-background-default, #ffffff);transition:all .2s ease-in-out}:host ::ng-deep .p-step .tk-step-title{color:var(--tk-color-text-muted, #8a8a8b);font-size:var(--tk-font-size-paragraph-m, 1rem);font-weight:var(--tk-font-weight-400, 400);transition:all .2s ease-in-out}:host ::ng-deep .p-step.p-step-active .tk-step-number,:host ::ng-deep .p-step[data-p-active=true] .tk-step-number{border-color:var(--tk-color-border-default, #cecdcd);color:var(--tk-color-primary-default, #16006f);background-color:var(--tk-color-background-default, #ffffff)}:host ::ng-deep .p-step.p-step-active .tk-step-title,:host ::ng-deep .p-step[data-p-active=true] .tk-step-title{color:var(--tk-color-primary-default, #16006f);font-weight:var(--tk-font-weight-600, 600)}:host ::ng-deep .p-step.p-disabled,:host ::ng-deep .p-step[disabled],:host ::ng-deep .p-step[data-p-disabled=true]{opacity:.6;cursor:not-allowed}:host ::ng-deep .p-stepper-separator{flex:1 1 0;height:1px!important;background-color:var(--tk-color-primary-default, #16006f)!important;margin:0 var(--tk-spacing-base-100, 1rem)!important;border:none!important;transition:background-color .2s ease-in-out}:host ::ng-deep .p-steppanels{width:100%;background:transparent;padding:0}:host ::ng-deep .p-steppanel{width:100%;outline:none}:host ::ng-deep .tk-stepper-vertical .p-stepper{flex-direction:column;gap:0}:host ::ng-deep .tk-stepper-vertical .p-stepitem{display:flex;flex-direction:column;width:calc(100% - .95rem);margin-left:.95rem;padding-left:var(--tk-spacing-base-100, 1rem);padding-bottom:var(--tk-spacing-base-150, 1.5rem);position:relative;box-sizing:border-box}:host ::ng-deep .tk-stepper-vertical .p-stepitem:before{content:\"\";position:absolute;left:0;top:2.6rem;bottom:1rem;width:1px;background-color:transparent;transition:background-color .2s ease-in-out}:host ::ng-deep .tk-stepper-vertical .p-stepitem[data-p-active=true]:before{background-color:var(--tk-color-primary-default, #16006f)}:host ::ng-deep .tk-stepper-vertical .p-stepitem:last-child{padding-bottom:0}:host ::ng-deep .tk-stepper-vertical .p-stepitem:last-child:before{display:none!important}:host ::ng-deep .tk-stepper-vertical .p-stepitem .p-step{margin-left:-2rem;background:transparent;position:relative;z-index:2;margin-bottom:var(--tk-spacing-base-75, .75rem)}:host ::ng-deep .tk-stepper-vertical .p-stepitem .p-steppanel{padding:0;width:100%}:host ::ng-deep .tk-stepper-vertical .p-stepitem .p-steppanel .p-steppanel-content-wrapper,:host ::ng-deep .tk-stepper-vertical .p-stepitem .p-steppanel .p-steppanel-content{margin:0!important;padding:0!important;margin-inline-start:0!important}.tk-step-panel-content{width:100%;min-height:100px}.tk-step-actions-footer{display:flex;justify-content:space-between;align-items:center;margin-top:var(--tk-spacing-base-150, 1.5rem);width:100%}.tk-step-actions-footer .tk-step-actions-secondary{display:flex;gap:var(--tk-spacing-base-50, .5rem)}.tk-step-actions-footer .tk-step-actions-primary{display:flex;gap:var(--tk-spacing-base-50, .5rem);margin-left:auto}.tk-step-actions-footer.vertical{justify-content:flex-start;gap:var(--tk-spacing-base-50, .5rem);margin-top:var(--tk-spacing-base-100, 1rem)}\n"] }]
108
+ }], propDecorators: { steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }], activeStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeStep", required: false }] }, { type: i0.Output, args: ["activeStepChange"] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], showFooter: [{ type: i0.Input, args: [{ isSignal: true, alias: "showFooter", required: false }] }], stepChange: [{ type: i0.Output, args: ["stepChange"] }] } });
109
+
110
+ /**
111
+ * Generated bundle index. Do not edit.
112
+ */
113
+
114
+ export { StepperComponent };
115
+ //# sourceMappingURL=tekus-design-system-components-stepper.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tekus-design-system-components-stepper.mjs","sources":["../../../projects/design-system/components/stepper/src/stepper.component.ts","../../../projects/design-system/components/stepper/src/stepper.component.html","../../../projects/design-system/components/stepper/tekus-design-system-components-stepper.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, model, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { StepperModule } from 'primeng/stepper';\nimport { SharedModule } from 'primeng/api';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { StepData } from './stepper.types';\n\n/**\n * @component StepperComponent\n * @description\n * Reusable stepper component that acts as a wrapper around PrimeNG's Stepper.\n * Supports horizontal and vertical orientations, linear step completion rules,\n * and automated footer action buttons.\n *\n * @usage\n * ```html\n * <tk-stepper\n * [steps]=\"steps\"\n * [(activeStep)]=\"currentStep\"\n * [linear]=\"true\"\n * orientation=\"horizontal\">\n * </tk-stepper>\n * ```\n */\n@Component({\n selector: 'tk-stepper',\n imports: [StepperModule, NgTemplateOutlet, ButtonComponent, SharedModule],\n templateUrl: './stepper.component.html',\n styleUrl: './stepper.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class StepperComponent {\n /**\n * @property {InputSignal<StepData[]>} steps\n * @description Array of step configurations to display.\n */\n steps = input<StepData[]>([]);\n\n /**\n * @property {ModelSignal<number>} activeStep\n * @description The 0-based index of the currently active step. Supports two-way binding.\n * @default 0\n */\n activeStep = model<number>(0);\n\n /**\n * @property {InputSignal<boolean>} linear\n * @description If true, blocks navigation to steps ahead of the active step.\n * @default true\n */\n linear = input<boolean>(true);\n\n /**\n * @property {InputSignal<'horizontal' | 'vertical'>} orientation\n * @description Defines the layout orientation of the stepper.\n * @default 'horizontal'\n */\n orientation = input<'horizontal' | 'vertical'>('horizontal');\n\n /**\n * @property {InputSignal<boolean>} showFooter\n * @description Whether to render the default footer action buttons for each step.\n * @default true\n */\n showFooter = input<boolean>(true);\n\n /**\n * @event stepChange\n * @description Emitted when the active step changes.\n */\n stepChange = output<{\n index: number;\n step: StepData;\n }>();\n\n /**\n * Checks if a step header should be disabled.\n * Steps ahead of the active index are disabled in linear mode.\n */\n isStepDisabled(index: number): boolean {\n const step = this.steps()[index];\n if (!step) return true;\n if (step.disabled) return true;\n if (this.linear() && index > this.activeStep()) return true;\n return false;\n }\n\n /**\n * Helper to evaluate button disabled states dynamically.\n */\n evalDisabled(disabled: boolean | (() => boolean) | undefined): boolean {\n if (disabled === undefined) return false;\n if (typeof disabled === 'function') return disabled();\n return disabled;\n }\n\n /**\n * Handles step transition events.\n */\n onStepChange(index: number) {\n if (this.activeStep() === index) return;\n this.activeStep.set(index);\n if (this.steps()[index]) {\n this.stepChange.emit({\n index,\n step: this.steps()[index],\n });\n }\n }\n}\n\n","<div class=\"tk-stepper-container\" [class.tk-stepper-vertical]=\"orientation() === 'vertical'\" [class.tk-stepper-horizontal]=\"orientation() === 'horizontal'\">\n @if (steps().length > 0) {\n @if (orientation() === 'horizontal') {\n <p-stepper [value]=\"activeStep()\" [linear]=\"linear()\" (valueChange)=\"onStepChange($event !== undefined ? +$event : activeStep())\">\n <p-step-list class=\"tk-step-list-horizontal\">\n @for (step of steps(); track $index) {\n <p-step [value]=\"$index\" [disabled]=\"isStepDisabled($index)\">\n <div class=\"tk-step-header-content\">\n <span class=\"tk-step-number\">{{ $index + 1 }}</span>\n <span class=\"tk-step-title\">{{ step.label }}</span>\n </div>\n </p-step>\n }\n </p-step-list>\n\n <p-step-panels class=\"tk-step-panels-horizontal\">\n @for (step of steps(); track $index) {\n <p-step-panel [value]=\"$index\">\n <ng-template pTemplate=\"content\">\n <div class=\"tk-step-panel-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n \n @if (showFooter() && (step.actionsPrimary?.length || step.actionsSecondary?.length)) {\n <div class=\"tk-step-actions-footer\">\n <div class=\"tk-step-actions-secondary\">\n @for (action of step.actionsSecondary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'secondary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n <div class=\"tk-step-actions-primary\">\n @for (action of step.actionsPrimary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'primary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n </div>\n }\n </ng-template>\n </p-step-panel>\n }\n </p-step-panels>\n </p-stepper>\n } @else {\n <p-stepper [value]=\"activeStep()\" [linear]=\"linear()\" (valueChange)=\"onStepChange($event !== undefined ? +$event : activeStep())\">\n @for (step of steps(); track $index) {\n <p-step-item [value]=\"$index\">\n <p-step [value]=\"$index\" [disabled]=\"isStepDisabled($index)\">\n <div class=\"tk-step-header-content\">\n <span class=\"tk-step-number\">{{ $index + 1 }}</span>\n <span class=\"tk-step-title\">{{ step.label }}</span>\n </div>\n </p-step>\n <p-step-panel [value]=\"$index\">\n <ng-template pTemplate=\"content\">\n <div class=\"tk-step-panel-content\">\n <ng-container [ngTemplateOutlet]=\"step.content\"></ng-container>\n </div>\n\n @if (showFooter() && (step.actionsPrimary?.length || step.actionsSecondary?.length)) {\n <div class=\"tk-step-actions-footer vertical\">\n @for (action of step.actionsSecondary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'secondary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n @for (action of step.actionsPrimary; track $index) {\n <tk-button\n [label]=\"action.label\"\n [icon]=\"action.icon\"\n [severity]=\"action.severity || 'primary'\"\n [variant]=\"action.variant\"\n [disabled]=\"evalDisabled(action.disabled)\"\n (clicked)=\"action.action()\">\n </tk-button>\n }\n </div>\n }\n </ng-template>\n </p-step-panel>\n </p-step-item>\n }\n </p-stepper>\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAOA;;;;;;;;;;;;;;;;AAgBG;MAQU,gBAAgB,CAAA;AAP7B,IAAA,WAAA,GAAA;AAQE;;;AAGG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAa,EAAE,4EAAC;AAE7B;;;;AAIG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,CAAC,iFAAC;AAE7B;;;;AAIG;AACH,QAAA,IAAA,CAAA,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