@cdevhub/ngx-tw 0.2.1 → 0.3.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.
- package/README.md +264 -49
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs +11 -7
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-alert.mjs +43 -29
- package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-aspect-ratio.mjs +103 -0
- package/fesm2022/cdevhub-ngx-tw-aspect-ratio.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs +56 -31
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +61 -35
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +154 -93
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +24 -15
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +3 -3
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +408 -215
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-card.mjs +33 -24
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +144 -79
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +99 -47
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +34 -20
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +46 -29
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +195 -110
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +140 -73
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-core.mjs +16 -11
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +393 -149
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +305 -150
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs +56 -43
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +51 -33
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs +905 -0
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +49 -26
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +133 -74
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-icon.mjs +28 -17
- package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs +37 -21
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-item.mjs +33 -24
- package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-menu.mjs +63 -48
- package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs +622 -0
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +137 -71
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +101 -46
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +57 -30
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +108 -57
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +46 -26
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select.mjs +217 -122
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-separator.mjs +21 -12
- package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs +58 -44
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs +25 -14
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +155 -79
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +44 -25
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs +29 -16
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-split.mjs +72 -42
- package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stat.mjs +107 -64
- package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +113 -47
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +61 -32
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +88 -42
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-table.mjs +266 -118
- package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +101 -51
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +798 -0
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +11 -7
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-theme.mjs +22 -14
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +243 -95
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs +149 -82
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +89 -55
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +50 -28
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs +1129 -0
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tree.mjs +554 -0
- package/fesm2022/cdevhub-ngx-tw-tree.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw.mjs +7 -0
- package/fesm2022/cdevhub-ngx-tw.mjs.map +1 -1
- package/package.json +45 -20
- package/theme/index.css +10 -2
- package/types/cdevhub-ngx-tw-aspect-ratio.d.ts +40 -0
- package/types/cdevhub-ngx-tw-calendar.d.ts +39 -8
- package/types/cdevhub-ngx-tw-command-palette.d.ts +7 -0
- package/types/cdevhub-ngx-tw-date-picker.d.ts +36 -10
- package/types/cdevhub-ngx-tw-file-upload.d.ts +250 -0
- package/types/cdevhub-ngx-tw-form-field.d.ts +22 -3
- package/types/cdevhub-ngx-tw-icon-lucide.d.ts +21 -3
- package/types/cdevhub-ngx-tw-number-input.d.ts +130 -0
- package/types/cdevhub-ngx-tw-popover.d.ts +8 -0
- package/types/cdevhub-ngx-tw-stepper.d.ts +30 -2
- package/types/cdevhub-ngx-tw-tab-nav.d.ts +8 -0
- package/types/cdevhub-ngx-tw-table.d.ts +30 -1
- package/types/cdevhub-ngx-tw-tabs.d.ts +8 -0
- package/types/cdevhub-ngx-tw-tags-input.d.ts +217 -0
- package/types/cdevhub-ngx-tw-time-picker.d.ts +31 -6
- package/types/cdevhub-ngx-tw-transfer.d.ts +330 -0
- package/types/cdevhub-ngx-tw-tree.d.ts +189 -0
- package/types/cdevhub-ngx-tw.d.ts +7 -0
|
@@ -387,10 +387,10 @@ const CHEVRON_CLASSES = 'absolute top-1/2 -translate-y-1/2 z-10 inline-flex item
|
|
|
387
387
|
* ```
|
|
388
388
|
*/
|
|
389
389
|
class TimelineMarkerDirective {
|
|
390
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
391
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
390
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineMarkerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
391
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: TimelineMarkerDirective, isStandalone: true, selector: "[twTimelineMarker]", ngImport: i0 });
|
|
392
392
|
}
|
|
393
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
393
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineMarkerDirective, decorators: [{
|
|
394
394
|
type: Directive,
|
|
395
395
|
args: [{
|
|
396
396
|
selector: '[twTimelineMarker]',
|
|
@@ -401,10 +401,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
401
401
|
* output. Use for relative-time components ("2 hours ago").
|
|
402
402
|
*/
|
|
403
403
|
class TimelineTimestampDirective {
|
|
404
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
405
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineTimestampDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
405
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: TimelineTimestampDirective, isStandalone: true, selector: "[twTimelineTimestamp]", ngImport: i0 });
|
|
406
406
|
}
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineTimestampDirective, decorators: [{
|
|
408
408
|
type: Directive,
|
|
409
409
|
args: [{
|
|
410
410
|
selector: '[twTimelineTimestamp]',
|
|
@@ -415,10 +415,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
415
415
|
* `align="alternate"` / `align="split"` (vertical orientation only).
|
|
416
416
|
*/
|
|
417
417
|
class TimelineOppositeDirective {
|
|
418
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
419
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
418
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineOppositeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
419
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: TimelineOppositeDirective, isStandalone: true, selector: "[twTimelineOpposite]", ngImport: i0 });
|
|
420
420
|
}
|
|
421
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineOppositeDirective, decorators: [{
|
|
422
422
|
type: Directive,
|
|
423
423
|
args: [{
|
|
424
424
|
selector: '[twTimelineOpposite]',
|
|
@@ -439,13 +439,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
439
439
|
*/
|
|
440
440
|
class TimelineComponent {
|
|
441
441
|
/** Axis along which items are laid out. `'vertical'` stacks items top-to-bottom; `'horizontal'` lays them out left-to-right (RTL-aware). Defaults to `'vertical'`. */
|
|
442
|
-
orientation = input('vertical',
|
|
442
|
+
orientation = input('vertical', /* @ts-ignore */
|
|
443
|
+
...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
443
444
|
/** Vertical layout strategy. `'left'` / `'right'` place the marker on that side; `'alternate'` centers the marker and flips the body left ↔ right per item; `'split'` centers the marker with body on the right and the opposite slot on the left. Ignored when orientation is `'horizontal'`. Defaults to `'left'`. */
|
|
444
|
-
align = input('left',
|
|
445
|
+
align = input('left', /* @ts-ignore */
|
|
446
|
+
...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
|
|
445
447
|
/** Density and typography scale. Controls marker diameter, gap between items, and body typography step. Defaults to `'md'`. */
|
|
446
|
-
size = input('md',
|
|
448
|
+
size = input('md', /* @ts-ignore */
|
|
449
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
447
450
|
/** Connector line style applied to every gap between items. Defaults to `'solid'`. */
|
|
448
|
-
lineStyle = input('solid',
|
|
451
|
+
lineStyle = input('solid', /* @ts-ignore */
|
|
452
|
+
...(ngDevMode ? [{ debugName: "lineStyle" }] : /* istanbul ignore next */ []));
|
|
449
453
|
/**
|
|
450
454
|
* Visibility policy for the horizontal-overflow chevron buttons. `'auto'`
|
|
451
455
|
* shows them only when the inner scroll region can scroll in that direction;
|
|
@@ -462,7 +466,8 @@ class TimelineComponent {
|
|
|
462
466
|
* The added input MUST be a single tri-state and MUST be inert on axis
|
|
463
467
|
* values where overflow cannot occur (here: `orientation === 'vertical'`).
|
|
464
468
|
*/
|
|
465
|
-
scrollControls = input('auto',
|
|
469
|
+
scrollControls = input('auto', /* @ts-ignore */
|
|
470
|
+
...(ngDevMode ? [{ debugName: "scrollControls" }] : /* istanbul ignore next */ []));
|
|
466
471
|
/** @internal Static class string for the horizontal scroll viewport — see `HORIZONTAL_VIEWPORT_CLASSES`. */
|
|
467
472
|
horizontalViewportClasses = HORIZONTAL_VIEWPORT_CLASSES;
|
|
468
473
|
/** @internal Projected `tw-timeline-item` children in DOM order. */
|
|
@@ -470,26 +475,32 @@ class TimelineComponent {
|
|
|
470
475
|
// ── Horizontal scroll / chevron wiring ──
|
|
471
476
|
_destroyRef = inject(DestroyRef);
|
|
472
477
|
_directionality = inject(Directionality, { optional: true });
|
|
473
|
-
_viewportRef = viewChild('scrollViewport',
|
|
478
|
+
_viewportRef = viewChild('scrollViewport', /* @ts-ignore */
|
|
479
|
+
...(ngDevMode ? [{ debugName: "_viewportRef" }] : /* istanbul ignore next */ []));
|
|
474
480
|
_scrollLabelsOverride = inject(TW_TIMELINE_SCROLL_LABELS, {
|
|
475
481
|
optional: true,
|
|
476
482
|
});
|
|
477
483
|
/** @internal Live `dir` from CDK `Directionality`. */
|
|
478
|
-
_cdkDir = signal(this._directionality?.value ?? 'ltr',
|
|
484
|
+
_cdkDir = signal(this._directionality?.value ?? 'ltr', /* @ts-ignore */
|
|
485
|
+
...(ngDevMode ? [{ debugName: "_cdkDir" }] : /* istanbul ignore next */ []));
|
|
479
486
|
/** @internal True when the host renders inside a `dir="rtl"` ancestor. */
|
|
480
|
-
_isRtl = computed(() => this._cdkDir() === 'rtl',
|
|
487
|
+
_isRtl = computed(() => this._cdkDir() === 'rtl', /* @ts-ignore */
|
|
488
|
+
...(ngDevMode ? [{ debugName: "_isRtl" }] : /* istanbul ignore next */ []));
|
|
481
489
|
/**
|
|
482
490
|
* @internal Defaults to `false` until the first measurement runs in
|
|
483
491
|
* `afterNextRender`. This avoids a one-frame "enabled-then-disabled" flash
|
|
484
492
|
* where the buttons appear live before the scroll state has been read.
|
|
485
493
|
*/
|
|
486
|
-
_canScrollPrev = signal(false,
|
|
487
|
-
|
|
494
|
+
_canScrollPrev = signal(false, /* @ts-ignore */
|
|
495
|
+
...(ngDevMode ? [{ debugName: "_canScrollPrev" }] : /* istanbul ignore next */ []));
|
|
496
|
+
_canScrollNext = signal(false, /* @ts-ignore */
|
|
497
|
+
...(ngDevMode ? [{ debugName: "_canScrollNext" }] : /* istanbul ignore next */ []));
|
|
488
498
|
/** @internal Resolved label record. Falls back to English defaults for any missing key. */
|
|
489
499
|
scrollLabels = computed(() => ({
|
|
490
500
|
...DEFAULT_TW_TIMELINE_SCROLL_LABELS,
|
|
491
501
|
...(this._scrollLabelsOverride ?? {}),
|
|
492
|
-
}),
|
|
502
|
+
}), /* @ts-ignore */
|
|
503
|
+
...(ngDevMode ? [{ debugName: "scrollLabels" }] : /* istanbul ignore next */ []));
|
|
493
504
|
/** @internal True when the prev button should be aria-hidden + visually suppressed. */
|
|
494
505
|
_prevButtonHidden = computed(() => {
|
|
495
506
|
const policy = this.scrollControls();
|
|
@@ -498,7 +509,8 @@ class TimelineComponent {
|
|
|
498
509
|
if (policy === 'always')
|
|
499
510
|
return false;
|
|
500
511
|
return !this._canScrollPrev();
|
|
501
|
-
},
|
|
512
|
+
}, /* @ts-ignore */
|
|
513
|
+
...(ngDevMode ? [{ debugName: "_prevButtonHidden" }] : /* istanbul ignore next */ []));
|
|
502
514
|
/** @internal True when the next button should be aria-hidden + visually suppressed. */
|
|
503
515
|
_nextButtonHidden = computed(() => {
|
|
504
516
|
const policy = this.scrollControls();
|
|
@@ -507,17 +519,22 @@ class TimelineComponent {
|
|
|
507
519
|
if (policy === 'always')
|
|
508
520
|
return false;
|
|
509
521
|
return !this._canScrollNext();
|
|
510
|
-
},
|
|
522
|
+
}, /* @ts-ignore */
|
|
523
|
+
...(ngDevMode ? [{ debugName: "_nextButtonHidden" }] : /* istanbul ignore next */ []));
|
|
511
524
|
/** @internal Native `disabled` attribute. Always true for hidden buttons (defensive); also true for `'always'` policy when can't scroll. */
|
|
512
|
-
_prevButtonDisabled = computed(() => this._prevButtonHidden() || !this._canScrollPrev(),
|
|
513
|
-
|
|
525
|
+
_prevButtonDisabled = computed(() => this._prevButtonHidden() || !this._canScrollPrev(), /* @ts-ignore */
|
|
526
|
+
...(ngDevMode ? [{ debugName: "_prevButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
527
|
+
_nextButtonDisabled = computed(() => this._nextButtonHidden() || !this._canScrollNext(), /* @ts-ignore */
|
|
528
|
+
...(ngDevMode ? [{ debugName: "_nextButtonDisabled" }] : /* istanbul ignore next */ []));
|
|
514
529
|
/**
|
|
515
530
|
* @internal Final class string for the prev chevron — combines the shared
|
|
516
531
|
* `CHEVRON_CLASSES`, the directional anchor (`left-0` in LTR, `right-0` in
|
|
517
532
|
* RTL), and the visibility variant driven by `scrollControls`.
|
|
518
533
|
*/
|
|
519
|
-
prevChevronClasses = computed(() => this._chevronClasses('prev'),
|
|
520
|
-
|
|
534
|
+
prevChevronClasses = computed(() => this._chevronClasses('prev'), /* @ts-ignore */
|
|
535
|
+
...(ngDevMode ? [{ debugName: "prevChevronClasses" }] : /* istanbul ignore next */ []));
|
|
536
|
+
nextChevronClasses = computed(() => this._chevronClasses('next'), /* @ts-ignore */
|
|
537
|
+
...(ngDevMode ? [{ debugName: "nextChevronClasses" }] : /* istanbul ignore next */ []));
|
|
521
538
|
_chevronClasses(side) {
|
|
522
539
|
const isRtl = this._isRtl();
|
|
523
540
|
// In LTR the prev arrow anchors to the host's left, next to the right.
|
|
@@ -612,18 +629,29 @@ class TimelineComponent {
|
|
|
612
629
|
orientation: this.orientation(),
|
|
613
630
|
size: this.size(),
|
|
614
631
|
lineStyle: this.lineStyle(),
|
|
615
|
-
}),
|
|
616
|
-
|
|
632
|
+
}), /* @ts-ignore */
|
|
633
|
+
...(ngDevMode ? [{ debugName: "variantResult" }] : /* istanbul ignore next */ []));
|
|
634
|
+
rootClasses = computed(() => this.variantResult().root(), /* @ts-ignore */
|
|
635
|
+
...(ngDevMode ? [{ debugName: "rootClasses" }] : /* istanbul ignore next */ []));
|
|
617
636
|
/** @internal Item slot classes shared with `TimelineItemComponent`. */
|
|
618
|
-
itemSlotClasses = computed(() => this.variantResult().item(),
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
637
|
+
itemSlotClasses = computed(() => this.variantResult().item(), /* @ts-ignore */
|
|
638
|
+
...(ngDevMode ? [{ debugName: "itemSlotClasses" }] : /* istanbul ignore next */ []));
|
|
639
|
+
markerSideSlotClasses = computed(() => this.variantResult().markerSide(), /* @ts-ignore */
|
|
640
|
+
...(ngDevMode ? [{ debugName: "markerSideSlotClasses" }] : /* istanbul ignore next */ []));
|
|
641
|
+
markerSlotClasses = computed(() => this.variantResult().marker(), /* @ts-ignore */
|
|
642
|
+
...(ngDevMode ? [{ debugName: "markerSlotClasses" }] : /* istanbul ignore next */ []));
|
|
643
|
+
connectorLeadingSlotClasses = computed(() => this.variantResult().connectorLeading(), /* @ts-ignore */
|
|
644
|
+
...(ngDevMode ? [{ debugName: "connectorLeadingSlotClasses" }] : /* istanbul ignore next */ []));
|
|
645
|
+
connectorTrailingSlotClasses = computed(() => this.variantResult().connectorTrailing(), /* @ts-ignore */
|
|
646
|
+
...(ngDevMode ? [{ debugName: "connectorTrailingSlotClasses" }] : /* istanbul ignore next */ []));
|
|
647
|
+
bodySlotClasses = computed(() => this.variantResult().body(), /* @ts-ignore */
|
|
648
|
+
...(ngDevMode ? [{ debugName: "bodySlotClasses" }] : /* istanbul ignore next */ []));
|
|
649
|
+
oppositeSlotClasses = computed(() => this.variantResult().opposite(), /* @ts-ignore */
|
|
650
|
+
...(ngDevMode ? [{ debugName: "oppositeSlotClasses" }] : /* istanbul ignore next */ []));
|
|
651
|
+
numberSlotClasses = computed(() => this.variantResult().number(), /* @ts-ignore */
|
|
652
|
+
...(ngDevMode ? [{ debugName: "numberSlotClasses" }] : /* istanbul ignore next */ []));
|
|
653
|
+
timestampSlotClasses = computed(() => this.variantResult().timestamp(), /* @ts-ignore */
|
|
654
|
+
...(ngDevMode ? [{ debugName: "timestampSlotClasses" }] : /* istanbul ignore next */ []));
|
|
627
655
|
/** @internal Variant builder reused by items so per-item state can recompose without rebuilding the base tv() result. */
|
|
628
656
|
itemMarkerVariant = (state, marker) => timelineVariants({
|
|
629
657
|
orientation: this.orientation(),
|
|
@@ -639,8 +667,8 @@ class TimelineComponent {
|
|
|
639
667
|
lineStyle: this.lineStyle(),
|
|
640
668
|
state,
|
|
641
669
|
}).number();
|
|
642
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
643
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
670
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
671
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: TimelineComponent, isStandalone: true, selector: "tw-timeline", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, lineStyle: { classPropertyName: "lineStyle", publicName: "lineStyle", isSignal: true, isRequired: false, transformFunction: null }, scrollControls: { classPropertyName: "scrollControls", publicName: "scrollControls", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "list" }, properties: { "class": "rootClasses()", "attr.aria-orientation": "orientation() === \"horizontal\" ? \"horizontal\" : null" } }, queries: [{ propertyName: "items", predicate: TimelineItemComponent, isSignal: true }], viewQueries: [{ propertyName: "_viewportRef", first: true, predicate: ["scrollViewport"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
644
672
|
<ng-template #itemsTpl>
|
|
645
673
|
<ng-content />
|
|
646
674
|
</ng-template>
|
|
@@ -698,7 +726,7 @@ class TimelineComponent {
|
|
|
698
726
|
}
|
|
699
727
|
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
700
728
|
}
|
|
701
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
729
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineComponent, decorators: [{
|
|
702
730
|
type: Component,
|
|
703
731
|
args: [{
|
|
704
732
|
selector: 'tw-timeline',
|
|
@@ -785,35 +813,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
785
813
|
*/
|
|
786
814
|
class TimelineItemComponent {
|
|
787
815
|
/** Semantic color for the marker fill and the trailing connector when the item is in a reached state. Ignored when state is `'error'` (which forces the error palette). Defaults to `'primary'`. */
|
|
788
|
-
color = input('primary',
|
|
816
|
+
color = input('primary', /* @ts-ignore */
|
|
817
|
+
...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
|
|
789
818
|
/** Marker geometry. `'dot'` is a small filled circle. `'circle'` is a larger ring that may contain a projected icon, avatar, or an auto-computed 1-based index. Defaults to `'dot'`. */
|
|
790
|
-
marker = input('dot',
|
|
819
|
+
marker = input('dot', /* @ts-ignore */
|
|
820
|
+
...(ngDevMode ? [{ debugName: "marker" }] : /* istanbul ignore next */ []));
|
|
791
821
|
/** Semantic state of the event. Drives marker fill, ring, and trailing-connector color, and applies `aria-current="step"` when `'current'`. Defaults to `'reached'`. */
|
|
792
|
-
state = input('reached',
|
|
822
|
+
state = input('reached', /* @ts-ignore */
|
|
823
|
+
...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
793
824
|
/** Timestamp shown in the timestamp slot. A `Date` is formatted via `Intl.DateTimeFormat(undefined, { dateStyle: 'medium', timeStyle: 'short' })`; a string is rendered verbatim; `null` omits the timestamp element. Overridden by projected `[twTimelineTimestamp]` content when present. Defaults to `null`. */
|
|
794
|
-
timestamp = input(null,
|
|
825
|
+
timestamp = input(null, /* @ts-ignore */
|
|
826
|
+
...(ngDevMode ? [{ debugName: "timestamp" }] : /* istanbul ignore next */ []));
|
|
795
827
|
/** Machine-readable ISO 8601 datetime for the rendered `<time datetime="…">` attribute. Derived from `timestamp` when it is a `Date` and this input is `null`; required (explicit) when `timestamp` is a string and machine-readability is desired. When `null` with a string timestamp, the timestamp renders as a `<span>` instead. Defaults to `null`. */
|
|
796
|
-
dateTime = input(null,
|
|
828
|
+
dateTime = input(null, /* @ts-ignore */
|
|
829
|
+
...(ngDevMode ? [{ debugName: "dateTime" }] : /* istanbul ignore next */ []));
|
|
797
830
|
/** @internal Direct parent timeline. A `tw-timeline-item` outside a `tw-timeline` is a programmer error — the DI failure throws naturally. */
|
|
798
831
|
timeline = inject(TimelineComponent);
|
|
799
832
|
/** @internal */
|
|
800
|
-
markerSlot = contentChild(TimelineMarkerDirective,
|
|
833
|
+
markerSlot = contentChild(TimelineMarkerDirective, /* @ts-ignore */
|
|
834
|
+
...(ngDevMode ? [{ debugName: "markerSlot" }] : /* istanbul ignore next */ []));
|
|
801
835
|
/** @internal */
|
|
802
|
-
timestampSlot = contentChild(TimelineTimestampDirective,
|
|
836
|
+
timestampSlot = contentChild(TimelineTimestampDirective, /* @ts-ignore */
|
|
837
|
+
...(ngDevMode ? [{ debugName: "timestampSlot" }] : /* istanbul ignore next */ []));
|
|
803
838
|
/** @internal */
|
|
804
|
-
oppositeSlot = contentChild(TimelineOppositeDirective,
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
839
|
+
oppositeSlot = contentChild(TimelineOppositeDirective, /* @ts-ignore */
|
|
840
|
+
...(ngDevMode ? [{ debugName: "oppositeSlot" }] : /* istanbul ignore next */ []));
|
|
841
|
+
hasMarkerSlot = computed(() => !!this.markerSlot(), /* @ts-ignore */
|
|
842
|
+
...(ngDevMode ? [{ debugName: "hasMarkerSlot" }] : /* istanbul ignore next */ []));
|
|
843
|
+
hasTimestampSlot = computed(() => !!this.timestampSlot(), /* @ts-ignore */
|
|
844
|
+
...(ngDevMode ? [{ debugName: "hasTimestampSlot" }] : /* istanbul ignore next */ []));
|
|
845
|
+
hasOppositeSlot = computed(() => !!this.oppositeSlot(), /* @ts-ignore */
|
|
846
|
+
...(ngDevMode ? [{ debugName: "hasOppositeSlot" }] : /* istanbul ignore next */ []));
|
|
808
847
|
/** @internal 0-based index in the parent timeline's content. -1 until contentChildren materialises. */
|
|
809
|
-
index = computed(() => this.timeline.items().indexOf(this),
|
|
810
|
-
|
|
848
|
+
index = computed(() => this.timeline.items().indexOf(this), /* @ts-ignore */
|
|
849
|
+
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
850
|
+
isFirst = computed(() => this.index() === 0, /* @ts-ignore */
|
|
851
|
+
...(ngDevMode ? [{ debugName: "isFirst" }] : /* istanbul ignore next */ []));
|
|
811
852
|
isLast = computed(() => {
|
|
812
853
|
const idx = this.index();
|
|
813
854
|
if (idx < 0)
|
|
814
855
|
return false;
|
|
815
856
|
return idx === this.timeline.items().length - 1;
|
|
816
|
-
},
|
|
857
|
+
}, /* @ts-ignore */
|
|
858
|
+
...(ngDevMode ? [{ debugName: "isLast" }] : /* istanbul ignore next */ []));
|
|
817
859
|
/**
|
|
818
860
|
* Leading-connector visibility. In vertical orientation the marker sits at
|
|
819
861
|
* the top of the body and only the trailing segment is rendered. In
|
|
@@ -821,7 +863,8 @@ class TimelineItemComponent {
|
|
|
821
863
|
* the ends of the timeline, so the leading segment is always rendered — as a
|
|
822
864
|
* coloured line for non-first items, as an invisible spacer for the first.
|
|
823
865
|
*/
|
|
824
|
-
renderLeadingConnector = computed(() => this.timeline.orientation() === 'horizontal',
|
|
866
|
+
renderLeadingConnector = computed(() => this.timeline.orientation() === 'horizontal', /* @ts-ignore */
|
|
867
|
+
...(ngDevMode ? [{ debugName: "renderLeadingConnector" }] : /* istanbul ignore next */ []));
|
|
825
868
|
/**
|
|
826
869
|
* Trailing-connector visibility. Rendered for every item in horizontal
|
|
827
870
|
* orientation (as a spacer on the last item) so all markers stay centered.
|
|
@@ -832,9 +875,11 @@ class TimelineItemComponent {
|
|
|
832
875
|
if (this.timeline.orientation() === 'horizontal')
|
|
833
876
|
return true;
|
|
834
877
|
return !this.isLast();
|
|
835
|
-
},
|
|
878
|
+
}, /* @ts-ignore */
|
|
879
|
+
...(ngDevMode ? [{ debugName: "renderTrailingConnector" }] : /* istanbul ignore next */ []));
|
|
836
880
|
/** @internal `error` state forces the error palette regardless of the color input. */
|
|
837
|
-
resolvedColor = computed(() => this.state() === 'error' ? 'error' : this.color(),
|
|
881
|
+
resolvedColor = computed(() => this.state() === 'error' ? 'error' : this.color(), /* @ts-ignore */
|
|
882
|
+
...(ngDevMode ? [{ debugName: "resolvedColor" }] : /* istanbul ignore next */ []));
|
|
838
883
|
/** @internal Previous item's state (drives the leading connector color so a line between two items reads as one color). */
|
|
839
884
|
previousState = computed(() => {
|
|
840
885
|
const idx = this.index();
|
|
@@ -842,7 +887,8 @@ class TimelineItemComponent {
|
|
|
842
887
|
return 'reached';
|
|
843
888
|
const prev = this.timeline.items()[idx - 1];
|
|
844
889
|
return prev.state();
|
|
845
|
-
},
|
|
890
|
+
}, /* @ts-ignore */
|
|
891
|
+
...(ngDevMode ? [{ debugName: "previousState" }] : /* istanbul ignore next */ []));
|
|
846
892
|
/** @internal Previous item's resolved color, for the same reason as `previousState`. */
|
|
847
893
|
previousColor = computed(() => {
|
|
848
894
|
const idx = this.index();
|
|
@@ -850,7 +896,8 @@ class TimelineItemComponent {
|
|
|
850
896
|
return 'primary';
|
|
851
897
|
const prev = this.timeline.items()[idx - 1];
|
|
852
898
|
return prev.resolvedColor();
|
|
853
|
-
},
|
|
899
|
+
}, /* @ts-ignore */
|
|
900
|
+
...(ngDevMode ? [{ debugName: "previousColor" }] : /* istanbul ignore next */ []));
|
|
854
901
|
stateLabel = computed(() => {
|
|
855
902
|
switch (this.state()) {
|
|
856
903
|
case 'pending':
|
|
@@ -862,7 +909,8 @@ class TimelineItemComponent {
|
|
|
862
909
|
default:
|
|
863
910
|
return null;
|
|
864
911
|
}
|
|
865
|
-
},
|
|
912
|
+
}, /* @ts-ignore */
|
|
913
|
+
...(ngDevMode ? [{ debugName: "stateLabel" }] : /* istanbul ignore next */ []));
|
|
866
914
|
formattedTimestamp = computed(() => {
|
|
867
915
|
const ts = this.timestamp();
|
|
868
916
|
if (ts === null)
|
|
@@ -874,7 +922,8 @@ class TimelineItemComponent {
|
|
|
874
922
|
}).format(ts);
|
|
875
923
|
}
|
|
876
924
|
return ts;
|
|
877
|
-
},
|
|
925
|
+
}, /* @ts-ignore */
|
|
926
|
+
...(ngDevMode ? [{ debugName: "formattedTimestamp" }] : /* istanbul ignore next */ []));
|
|
878
927
|
resolvedDateTime = computed(() => {
|
|
879
928
|
const dt = this.dateTime();
|
|
880
929
|
if (dt !== null)
|
|
@@ -883,14 +932,16 @@ class TimelineItemComponent {
|
|
|
883
932
|
if (ts instanceof Date)
|
|
884
933
|
return ts.toISOString();
|
|
885
934
|
return null;
|
|
886
|
-
},
|
|
935
|
+
}, /* @ts-ignore */
|
|
936
|
+
...(ngDevMode ? [{ debugName: "resolvedDateTime" }] : /* istanbul ignore next */ []));
|
|
887
937
|
/** @internal True when the layout needs a third (opposite) column. */
|
|
888
938
|
hasOppositeColumn = computed(() => {
|
|
889
939
|
if (this.timeline.orientation() === 'horizontal')
|
|
890
940
|
return false;
|
|
891
941
|
const align = this.timeline.align();
|
|
892
942
|
return align === 'alternate' || align === 'split';
|
|
893
|
-
},
|
|
943
|
+
}, /* @ts-ignore */
|
|
944
|
+
...(ngDevMode ? [{ debugName: "hasOppositeColumn" }] : /* istanbul ignore next */ []));
|
|
894
945
|
/** @internal Order of the marker side wrapper. Always center column (2) in three-column layouts; in two-column vertical layouts the order varies. Horizontal layouts use CSS grid placement (`row-start-*`) instead, so flex-order utilities are noise — return ''. */
|
|
895
946
|
markerOrderClass = computed(() => {
|
|
896
947
|
if (this.timeline.orientation() === 'horizontal')
|
|
@@ -901,7 +952,8 @@ class TimelineItemComponent {
|
|
|
901
952
|
if (align === 'right')
|
|
902
953
|
return 'order-2';
|
|
903
954
|
return 'order-1';
|
|
904
|
-
},
|
|
955
|
+
}, /* @ts-ignore */
|
|
956
|
+
...(ngDevMode ? [{ debugName: "markerOrderClass" }] : /* istanbul ignore next */ []));
|
|
905
957
|
/** @internal Order of the body wrapper. Alternate flips body left/right per item. Horizontal layouts use CSS grid placement (`row-start-*`) instead, so flex-order utilities are noise — return ''. */
|
|
906
958
|
bodyOrderClass = computed(() => {
|
|
907
959
|
if (this.timeline.orientation() === 'horizontal')
|
|
@@ -914,14 +966,16 @@ class TimelineItemComponent {
|
|
|
914
966
|
if (this.hasOppositeColumn())
|
|
915
967
|
return 'order-3';
|
|
916
968
|
return 'order-2';
|
|
917
|
-
},
|
|
969
|
+
}, /* @ts-ignore */
|
|
970
|
+
...(ngDevMode ? [{ debugName: "bodyOrderClass" }] : /* istanbul ignore next */ []));
|
|
918
971
|
/** @internal Order of the opposite wrapper. Always left of the marker except on odd-indexed alternate items. */
|
|
919
972
|
oppositeOrderClass = computed(() => {
|
|
920
973
|
const align = this.timeline.align();
|
|
921
974
|
if (align === 'alternate' && this.index() % 2 === 1)
|
|
922
975
|
return 'order-3';
|
|
923
976
|
return 'order-1';
|
|
924
|
-
},
|
|
977
|
+
}, /* @ts-ignore */
|
|
978
|
+
...(ngDevMode ? [{ debugName: "oppositeOrderClass" }] : /* istanbul ignore next */ []));
|
|
925
979
|
/** @internal Width affordance for the marker side. Vertical needs a fixed-ish column; horizontal needs to span the row. */
|
|
926
980
|
markerSideSizeClass = computed(() => {
|
|
927
981
|
if (this.timeline.orientation() === 'horizontal')
|
|
@@ -940,7 +994,8 @@ class TimelineItemComponent {
|
|
|
940
994
|
case 'xl':
|
|
941
995
|
return 'w-12';
|
|
942
996
|
}
|
|
943
|
-
},
|
|
997
|
+
}, /* @ts-ignore */
|
|
998
|
+
...(ngDevMode ? [{ debugName: "markerSideSizeClass" }] : /* istanbul ignore next */ []));
|
|
944
999
|
/** @internal Width affordance for the body in alternate/split layouts so the marker stays centered. */
|
|
945
1000
|
bodyFlexClass = computed(() => {
|
|
946
1001
|
if (this.timeline.orientation() === 'horizontal')
|
|
@@ -948,13 +1003,18 @@ class TimelineItemComponent {
|
|
|
948
1003
|
if (this.hasOppositeColumn())
|
|
949
1004
|
return 'flex-1';
|
|
950
1005
|
return 'flex-1';
|
|
951
|
-
},
|
|
1006
|
+
}, /* @ts-ignore */
|
|
1007
|
+
...(ngDevMode ? [{ debugName: "bodyFlexClass" }] : /* istanbul ignore next */ []));
|
|
952
1008
|
/** @internal Width affordance for the opposite column (mirrors the body to keep the marker centered). */
|
|
953
|
-
oppositeFlexClass = computed(() => 'flex-1',
|
|
1009
|
+
oppositeFlexClass = computed(() => 'flex-1', /* @ts-ignore */
|
|
1010
|
+
...(ngDevMode ? [{ debugName: "oppositeFlexClass" }] : /* istanbul ignore next */ []));
|
|
954
1011
|
// ── Composed class outputs ──
|
|
955
|
-
itemClasses = computed(() => this.timeline.itemSlotClasses(),
|
|
956
|
-
|
|
957
|
-
|
|
1012
|
+
itemClasses = computed(() => this.timeline.itemSlotClasses(), /* @ts-ignore */
|
|
1013
|
+
...(ngDevMode ? [{ debugName: "itemClasses" }] : /* istanbul ignore next */ []));
|
|
1014
|
+
markerSideClasses = computed(() => `${this.timeline.markerSideSlotClasses()} ${this.markerSideSizeClass()} ${this.markerOrderClass()}`, /* @ts-ignore */
|
|
1015
|
+
...(ngDevMode ? [{ debugName: "markerSideClasses" }] : /* istanbul ignore next */ []));
|
|
1016
|
+
markerClasses = computed(() => `${this.timeline.itemMarkerVariant(this.state(), this.marker())} ${resolveMarkerClasses(this.state(), this.resolvedColor(), this.hasMarkerSlot())}`, /* @ts-ignore */
|
|
1017
|
+
...(ngDevMode ? [{ debugName: "markerClasses" }] : /* istanbul ignore next */ []));
|
|
958
1018
|
leadingConnectorClasses = computed(() => {
|
|
959
1019
|
const base = this.timeline.connectorLeadingSlotClasses();
|
|
960
1020
|
// The first horizontal item gets an invisible spacer — same geometry,
|
|
@@ -962,7 +1022,8 @@ class TimelineItemComponent {
|
|
|
962
1022
|
if (this.isFirst())
|
|
963
1023
|
return base;
|
|
964
1024
|
return `${base} ${resolveConnectorClasses(this.previousState(), this.previousColor(), this.timeline.lineStyle())}`;
|
|
965
|
-
},
|
|
1025
|
+
}, /* @ts-ignore */
|
|
1026
|
+
...(ngDevMode ? [{ debugName: "leadingConnectorClasses" }] : /* istanbul ignore next */ []));
|
|
966
1027
|
trailingConnectorClasses = computed(() => {
|
|
967
1028
|
const base = this.timeline.connectorTrailingSlotClasses();
|
|
968
1029
|
// The last horizontal item also gets an invisible spacer; in vertical
|
|
@@ -972,7 +1033,8 @@ class TimelineItemComponent {
|
|
|
972
1033
|
return base;
|
|
973
1034
|
}
|
|
974
1035
|
return `${base} ${resolveConnectorClasses(this.state(), this.resolvedColor(), this.timeline.lineStyle())}`;
|
|
975
|
-
},
|
|
1036
|
+
}, /* @ts-ignore */
|
|
1037
|
+
...(ngDevMode ? [{ debugName: "trailingConnectorClasses" }] : /* istanbul ignore next */ []));
|
|
976
1038
|
bodyClasses = computed(() => {
|
|
977
1039
|
const base = `${this.timeline.bodySlotClasses()} ${this.bodyFlexClass()} ${this.bodyOrderClass()}`;
|
|
978
1040
|
// The per-size `pb-*` on the body slot exists only to space adjacent
|
|
@@ -986,13 +1048,18 @@ class TimelineItemComponent {
|
|
|
986
1048
|
return `${base} !pb-0`;
|
|
987
1049
|
}
|
|
988
1050
|
return base;
|
|
989
|
-
},
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1051
|
+
}, /* @ts-ignore */
|
|
1052
|
+
...(ngDevMode ? [{ debugName: "bodyClasses" }] : /* istanbul ignore next */ []));
|
|
1053
|
+
oppositeClasses = computed(() => `${this.timeline.oppositeSlotClasses()} ${this.oppositeFlexClass()} ${this.oppositeOrderClass()}`, /* @ts-ignore */
|
|
1054
|
+
...(ngDevMode ? [{ debugName: "oppositeClasses" }] : /* istanbul ignore next */ []));
|
|
1055
|
+
numberClasses = computed(() => this.timeline.itemNumberVariant(this.state()), /* @ts-ignore */
|
|
1056
|
+
...(ngDevMode ? [{ debugName: "numberClasses" }] : /* istanbul ignore next */ []));
|
|
1057
|
+
timestampClasses = computed(() => this.timeline.timestampSlotClasses(), /* @ts-ignore */
|
|
1058
|
+
...(ngDevMode ? [{ debugName: "timestampClasses" }] : /* istanbul ignore next */ []));
|
|
993
1059
|
enterAnimationClass = computed(() => this.timeline.orientation() === 'horizontal'
|
|
994
1060
|
? 'timeline-item-enter-horizontal'
|
|
995
|
-
: 'timeline-item-enter',
|
|
1061
|
+
: 'timeline-item-enter', /* @ts-ignore */
|
|
1062
|
+
...(ngDevMode ? [{ debugName: "enterAnimationClass" }] : /* istanbul ignore next */ []));
|
|
996
1063
|
ngAfterContentInit() {
|
|
997
1064
|
// One-shot dev warning when a [twTimelineMarker] slot is projected onto a
|
|
998
1065
|
// marker="dot" item. Runs in ngAfterContentInit because contentChild signals
|
|
@@ -1006,8 +1073,8 @@ class TimelineItemComponent {
|
|
|
1006
1073
|
}
|
|
1007
1074
|
}
|
|
1008
1075
|
}
|
|
1009
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1010
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1076
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1077
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: TimelineItemComponent, isStandalone: true, selector: "tw-timeline-item", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, marker: { classPropertyName: "marker", publicName: "marker", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, timestamp: { classPropertyName: "timestamp", publicName: "timestamp", isSignal: true, isRequired: false, transformFunction: null }, dateTime: { classPropertyName: "dateTime", publicName: "dateTime", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listitem" }, properties: { "class": "itemClasses()", "attr.aria-current": "state() === \"current\" ? \"step\" : null", "animate.enter": "enterAnimationClass()" } }, queries: [{ propertyName: "markerSlot", first: true, predicate: TimelineMarkerDirective, descendants: true, isSignal: true }, { propertyName: "timestampSlot", first: true, predicate: TimelineTimestampDirective, descendants: true, isSignal: true }, { propertyName: "oppositeSlot", first: true, predicate: TimelineOppositeDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1011
1078
|
<div [class]="markerSideClasses()">
|
|
1012
1079
|
@if (renderLeadingConnector()) {
|
|
1013
1080
|
<span [class]="leadingConnectorClasses()" aria-hidden="true"></span>
|
|
@@ -1061,7 +1128,7 @@ class TimelineItemComponent {
|
|
|
1061
1128
|
}
|
|
1062
1129
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1063
1130
|
}
|
|
1064
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: TimelineItemComponent, decorators: [{
|
|
1065
1132
|
type: Component,
|
|
1066
1133
|
args: [{
|
|
1067
1134
|
selector: 'tw-timeline-item',
|