invensys-ng 21.3.5 → 21.3.7

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.
@@ -6296,6 +6296,187 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
6296
6296
  args: ['document:click', ['$event']]
6297
6297
  }] } });
6298
6298
 
6299
+ /** A single step rendered inside an {@link IStepper}. */
6300
+ class IStep {
6301
+ /** Primary text shown in the step navigation. */
6302
+ label;
6303
+ /** Optional supporting text shown below the label. */
6304
+ description;
6305
+ /** Optional PrimeIcons class used instead of the step number. */
6306
+ icon;
6307
+ /** Marks the step as successfully completed. */
6308
+ completed = false;
6309
+ /** Marks the step as optional. */
6310
+ optional = false;
6311
+ /** Prevents the step from being selected. */
6312
+ disabled = false;
6313
+ /** Projected step content. */
6314
+ contentTemplate;
6315
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IStep, deps: [], target: i0.ɵɵFactoryTarget.Component });
6316
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.12", type: IStep, isStandalone: true, selector: "i-step", inputs: { label: "label", description: "description", icon: "icon", completed: "completed", optional: "optional", disabled: "disabled" }, viewQueries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true, static: true }], ngImport: i0, template: `
6317
+ <ng-template #contentTemplate>
6318
+ <ng-content></ng-content>
6319
+ </ng-template>
6320
+ `, isInline: true });
6321
+ }
6322
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IStep, decorators: [{
6323
+ type: Component,
6324
+ args: [{
6325
+ selector: 'i-step',
6326
+ standalone: true,
6327
+ template: `
6328
+ <ng-template #contentTemplate>
6329
+ <ng-content></ng-content>
6330
+ </ng-template>
6331
+ `,
6332
+ }]
6333
+ }], propDecorators: { label: [{
6334
+ type: Input,
6335
+ args: [{ required: true }]
6336
+ }], description: [{
6337
+ type: Input
6338
+ }], icon: [{
6339
+ type: Input
6340
+ }], completed: [{
6341
+ type: Input
6342
+ }], optional: [{
6343
+ type: Input
6344
+ }], disabled: [{
6345
+ type: Input
6346
+ }], contentTemplate: [{
6347
+ type: ViewChild,
6348
+ args: ['contentTemplate', { static: true }]
6349
+ }] } });
6350
+
6351
+ /**
6352
+ * Guided, stateful navigation for multi-step workflows.
6353
+ *
6354
+ * @example
6355
+ * ```html
6356
+ * <i-stepper [(activeIndex)]="activeStep" [linear]="true">
6357
+ * <i-step label="Details" description="Name and access" [completed]="detailsValid">
6358
+ * Details form
6359
+ * </i-step>
6360
+ * <i-step label="Columns" [disabled]="!detailsValid">
6361
+ * Column selection
6362
+ * </i-step>
6363
+ * </i-stepper>
6364
+ * ```
6365
+ */
6366
+ class IStepper {
6367
+ /** Zero-based index of the active step. */
6368
+ activeIndex = 0;
6369
+ /** Prevents skipping incomplete steps when enabled. */
6370
+ linear = false;
6371
+ /** Navigation layout. Horizontal steppers collapse to vertical on small screens. */
6372
+ orientation = 'horizontal';
6373
+ /** Accessible label for the step navigation. */
6374
+ ariaLabel = 'Progress';
6375
+ /** Supports two-way binding of the active step. */
6376
+ activeIndexChange = new EventEmitter();
6377
+ /** Emitted after the user selects a different step. */
6378
+ onChange = new EventEmitter();
6379
+ stepComponents;
6380
+ componentId = UniqueComponentId('i-stepper-');
6381
+ steps = [];
6382
+ ngAfterContentInit() {
6383
+ this.syncSteps();
6384
+ this.stepComponents.changes.subscribe(() => this.syncSteps());
6385
+ }
6386
+ selectStep(event, index) {
6387
+ if (index === this.activeIndex || !this.canSelect(index)) {
6388
+ return;
6389
+ }
6390
+ const previousIndex = this.activeIndex;
6391
+ this.activeIndex = index;
6392
+ this.activeIndexChange.emit(index);
6393
+ this.onChange.emit({ originalEvent: event, index, previousIndex });
6394
+ }
6395
+ canSelect(index) {
6396
+ const step = this.steps[index];
6397
+ if (!step || step.disabled) {
6398
+ return false;
6399
+ }
6400
+ if (!this.linear || index <= this.activeIndex) {
6401
+ return true;
6402
+ }
6403
+ return this.steps.slice(0, index).every(item => item.completed || item.optional);
6404
+ }
6405
+ onKeyDown(event, index) {
6406
+ const directionKeys = this.orientation === 'vertical'
6407
+ ? ['ArrowUp', 'ArrowDown']
6408
+ : ['ArrowLeft', 'ArrowRight'];
6409
+ if (event.key === directionKeys[0]) {
6410
+ this.focusAdjacent(index, -1);
6411
+ event.preventDefault();
6412
+ }
6413
+ else if (event.key === directionKeys[1]) {
6414
+ this.focusAdjacent(index, 1);
6415
+ event.preventDefault();
6416
+ }
6417
+ else if (event.key === 'Home') {
6418
+ this.focusBoundary(0, 1);
6419
+ event.preventDefault();
6420
+ }
6421
+ else if (event.key === 'End') {
6422
+ this.focusBoundary(this.steps.length - 1, -1);
6423
+ event.preventDefault();
6424
+ }
6425
+ }
6426
+ syncSteps() {
6427
+ this.steps = this.stepComponents.toArray();
6428
+ if (this.steps.length === 0) {
6429
+ this.activeIndex = 0;
6430
+ return;
6431
+ }
6432
+ this.activeIndex = Math.min(Math.max(this.activeIndex, 0), this.steps.length - 1);
6433
+ }
6434
+ focusAdjacent(index, direction) {
6435
+ let nextIndex = index + direction;
6436
+ while (nextIndex >= 0 && nextIndex < this.steps.length) {
6437
+ if (this.canSelect(nextIndex)) {
6438
+ this.focusStep(nextIndex);
6439
+ return;
6440
+ }
6441
+ nextIndex += direction;
6442
+ }
6443
+ }
6444
+ focusBoundary(index, direction) {
6445
+ let candidate = index;
6446
+ while (candidate >= 0 && candidate < this.steps.length) {
6447
+ if (this.canSelect(candidate)) {
6448
+ this.focusStep(candidate);
6449
+ return;
6450
+ }
6451
+ candidate += direction;
6452
+ }
6453
+ }
6454
+ focusStep(index) {
6455
+ document.getElementById(`${this.componentId}-step-${index}`)?.focus();
6456
+ }
6457
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IStepper, deps: [], target: i0.ɵɵFactoryTarget.Component });
6458
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: IStepper, isStandalone: true, selector: "i-stepper", inputs: { activeIndex: "activeIndex", linear: "linear", orientation: "orientation", ariaLabel: "ariaLabel" }, outputs: { activeIndexChange: "activeIndexChange", onChange: "onChange" }, queries: [{ propertyName: "stepComponents", predicate: IStep }], ngImport: i0, template: "<div\n class=\"i-stepper\"\n [ngClass]=\"'i-stepper--' + orientation\"\n [attr.id]=\"componentId\"\n>\n <ol class=\"i-stepper__navigation\" [attr.aria-label]=\"ariaLabel\">\n @for (step of steps; track step; let index = $index; let last = $last) {\n <li\n class=\"i-stepper__item\"\n [class.i-stepper__item--active]=\"activeIndex === index\"\n [class.i-stepper__item--completed]=\"step.completed\"\n [class.i-stepper__item--disabled]=\"!canSelect(index)\"\n >\n <button\n class=\"i-stepper__trigger\"\n type=\"button\"\n [attr.id]=\"componentId + '-step-' + index\"\n [attr.aria-current]=\"activeIndex === index ? 'step' : null\"\n [attr.aria-controls]=\"componentId + '-panel-' + index\"\n [attr.aria-describedby]=\"step.description ? componentId + '-description-' + index : null\"\n [attr.tabindex]=\"activeIndex === index ? 0 : -1\"\n [disabled]=\"!canSelect(index)\"\n (click)=\"selectStep($event, index)\"\n (keydown)=\"onKeyDown($event, index)\"\n >\n <span class=\"i-stepper__indicator\" aria-hidden=\"true\">\n @if (step.icon) {\n <i [ngClass]=\"step.icon\" class=\"i-stepper__icon\"></i>\n } @else {\n {{ index + 1 }}\n }\n @if (step.completed) {\n <span class=\"i-stepper__complete-mark\">\n <i class=\"pi pi-check\"></i>\n </span>\n }\n </span>\n <span class=\"i-stepper__copy\">\n <span class=\"i-stepper__meta\">\n <span>Step {{ index + 1 }} of {{ steps.length }}</span>\n @if (step.completed) {\n <span class=\"i-stepper__status i-stepper__status--completed\">Completed</span>\n } @else if (step.optional) {\n <span class=\"i-stepper__status\">Optional</span>\n }\n </span>\n <span class=\"i-stepper__label\">{{ step.label }}</span>\n @if (step.description) {\n <span\n class=\"i-stepper__description\"\n [attr.id]=\"componentId + '-description-' + index\"\n >{{ step.description }}</span>\n }\n </span>\n <i class=\"pi pi-chevron-right i-stepper__chevron\" aria-hidden=\"true\"></i>\n </button>\n @if (!last) {\n <span class=\"i-stepper__connector\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n </ol>\n\n @for (step of steps; track step; let index = $index) {\n <section\n class=\"i-stepper__panel\"\n [class.i-stepper__panel--active]=\"activeIndex === index\"\n [attr.id]=\"componentId + '-panel-' + index\"\n [attr.aria-labelledby]=\"componentId + '-step-' + index\"\n [attr.hidden]=\"activeIndex !== index || null\"\n role=\"region\"\n >\n @if (activeIndex === index) {\n <ng-container [ngTemplateOutlet]=\"step.contentTemplate\"></ng-container>\n }\n </section>\n }\n</div>\n", styles: [".i-stepper{color:var(--color-text-primary)}.i-stepper__trigger{border-color:var(--color-border);background:var(--surface-card)}.i-stepper__trigger:hover:not(:disabled){background:var(--surface-hover);border-color:color-mix(in srgb,var(--color-primary) 35%,var(--color-border));transform:translateY(-1px)}.i-stepper__trigger:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.i-stepper__trigger:disabled{color:var(--color-text-disabled);cursor:not-allowed}.i-stepper__indicator{border-color:var(--color-border);background:var(--surface-ground);color:var(--color-text-secondary)}.i-stepper__description,.i-stepper__meta{color:var(--color-text-secondary)}.i-stepper__status{background:var(--surface-hover)}.i-stepper__status--completed{background:color-mix(in srgb,var(--color-success) 12%,transparent);color:var(--color-success)}.i-stepper__complete-mark{border-color:var(--surface-card);background:var(--color-success);color:var(--color-contrast-inverse)}.i-stepper__connector{background:var(--color-border)}.i-stepper__item--active .i-stepper__trigger{border-color:color-mix(in srgb,var(--color-primary) 55%,var(--color-border));box-shadow:0 6px 18px color-mix(in srgb,var(--color-primary) 12%,transparent)}.i-stepper__item--active .i-stepper__indicator{border-color:color-mix(in srgb,var(--color-primary) 35%,transparent);background:color-mix(in srgb,var(--color-primary) 10%,var(--surface-card));color:var(--color-primary)}.i-stepper__item--active .i-stepper__label{color:var(--color-primary)}.i-stepper__item--active .i-stepper__chevron{color:var(--color-primary);opacity:1;transform:translate(0)}.i-stepper__item--completed .i-stepper__indicator{border-color:var(--color-success);background:color-mix(in srgb,var(--color-success) 10%,var(--surface-card));color:var(--color-success)}.i-stepper__item--completed .i-stepper__connector{background:var(--color-success)}.i-stepper__item--disabled{opacity:.58}.i-stepper{display:flex;width:100%}.i-stepper--horizontal{flex-direction:column}.i-stepper--horizontal .i-stepper__navigation{display:flex;width:100%;align-items:stretch}.i-stepper--horizontal .i-stepper__item{display:flex;flex:1 1 0;align-items:center;min-width:0}.i-stepper--horizontal .i-stepper__trigger{flex:1 1 auto;align-self:stretch}.i-stepper--horizontal .i-stepper__connector{flex:0 0 24px;height:2px;margin:0 6px}.i-stepper--vertical{flex-direction:row;gap:24px}.i-stepper--vertical .i-stepper__navigation{flex:0 0 min(280px,35%)}.i-stepper--vertical .i-stepper__item{position:relative;padding-bottom:12px}.i-stepper--vertical .i-stepper__trigger{width:100%}.i-stepper--vertical .i-stepper__connector{position:absolute;top:66px;bottom:0;left:34px;width:2px}.i-stepper--vertical .i-stepper__panel{flex:1 1 auto;min-width:0}.i-stepper__navigation{box-sizing:border-box;margin:0;padding:0;list-style:none}.i-stepper__trigger{position:relative;display:flex;align-items:center;gap:12px;min-width:0;min-height:82px;padding:14px;overflow:hidden;border:1px solid;border-radius:8px;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background .2s,border-color .2s,box-shadow .2s,transform .2s}.i-stepper__indicator{position:relative;display:inline-flex;flex:0 0 42px;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid;border-radius:10px;font-weight:600;transition:background .2s,border-color .2s,color .2s}.i-stepper__icon{font-size:18px}.i-stepper__complete-mark{position:absolute;right:-5px;bottom:-5px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:2px solid;border-radius:50%;font-size:9px}.i-stepper__copy,.i-stepper__label,.i-stepper__description{display:block}.i-stepper__copy{flex:1 1 auto;min-width:0}.i-stepper__meta{display:flex;align-items:center;gap:7px;margin-bottom:4px;font-size:.72em;font-weight:600;letter-spacing:.035em;line-height:1.2;text-transform:uppercase}.i-stepper__status{display:inline-flex;align-items:center;min-height:18px;padding:0 6px;border-radius:999px;font-size:.9em;letter-spacing:.02em}.i-stepper__label{font-weight:600;line-height:1.3}.i-stepper__description{margin-top:3px;font-size:.8em;line-height:1.35}.i-stepper__chevron{flex:0 0 auto;font-size:11px;opacity:0;transform:translate(-4px);transition:opacity .2s,transform .2s}.i-stepper__panel{display:none;padding-top:24px}.i-stepper__panel--active{display:block}@media(max-width:768px){.i-stepper--horizontal .i-stepper__navigation{flex-direction:column}.i-stepper--horizontal .i-stepper__item{position:relative;padding-bottom:10px}.i-stepper--horizontal .i-stepper__connector{position:absolute;top:82px;bottom:0;left:34px;width:2px;height:auto;margin:0}.i-stepper--vertical{flex-direction:column;gap:0}.i-stepper--vertical .i-stepper__navigation{flex-basis:auto}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
6459
+ }
6460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IStepper, decorators: [{
6461
+ type: Component,
6462
+ args: [{ selector: 'i-stepper', standalone: true, imports: [NgClass, NgTemplateOutlet], template: "<div\n class=\"i-stepper\"\n [ngClass]=\"'i-stepper--' + orientation\"\n [attr.id]=\"componentId\"\n>\n <ol class=\"i-stepper__navigation\" [attr.aria-label]=\"ariaLabel\">\n @for (step of steps; track step; let index = $index; let last = $last) {\n <li\n class=\"i-stepper__item\"\n [class.i-stepper__item--active]=\"activeIndex === index\"\n [class.i-stepper__item--completed]=\"step.completed\"\n [class.i-stepper__item--disabled]=\"!canSelect(index)\"\n >\n <button\n class=\"i-stepper__trigger\"\n type=\"button\"\n [attr.id]=\"componentId + '-step-' + index\"\n [attr.aria-current]=\"activeIndex === index ? 'step' : null\"\n [attr.aria-controls]=\"componentId + '-panel-' + index\"\n [attr.aria-describedby]=\"step.description ? componentId + '-description-' + index : null\"\n [attr.tabindex]=\"activeIndex === index ? 0 : -1\"\n [disabled]=\"!canSelect(index)\"\n (click)=\"selectStep($event, index)\"\n (keydown)=\"onKeyDown($event, index)\"\n >\n <span class=\"i-stepper__indicator\" aria-hidden=\"true\">\n @if (step.icon) {\n <i [ngClass]=\"step.icon\" class=\"i-stepper__icon\"></i>\n } @else {\n {{ index + 1 }}\n }\n @if (step.completed) {\n <span class=\"i-stepper__complete-mark\">\n <i class=\"pi pi-check\"></i>\n </span>\n }\n </span>\n <span class=\"i-stepper__copy\">\n <span class=\"i-stepper__meta\">\n <span>Step {{ index + 1 }} of {{ steps.length }}</span>\n @if (step.completed) {\n <span class=\"i-stepper__status i-stepper__status--completed\">Completed</span>\n } @else if (step.optional) {\n <span class=\"i-stepper__status\">Optional</span>\n }\n </span>\n <span class=\"i-stepper__label\">{{ step.label }}</span>\n @if (step.description) {\n <span\n class=\"i-stepper__description\"\n [attr.id]=\"componentId + '-description-' + index\"\n >{{ step.description }}</span>\n }\n </span>\n <i class=\"pi pi-chevron-right i-stepper__chevron\" aria-hidden=\"true\"></i>\n </button>\n @if (!last) {\n <span class=\"i-stepper__connector\" aria-hidden=\"true\"></span>\n }\n </li>\n }\n </ol>\n\n @for (step of steps; track step; let index = $index) {\n <section\n class=\"i-stepper__panel\"\n [class.i-stepper__panel--active]=\"activeIndex === index\"\n [attr.id]=\"componentId + '-panel-' + index\"\n [attr.aria-labelledby]=\"componentId + '-step-' + index\"\n [attr.hidden]=\"activeIndex !== index || null\"\n role=\"region\"\n >\n @if (activeIndex === index) {\n <ng-container [ngTemplateOutlet]=\"step.contentTemplate\"></ng-container>\n }\n </section>\n }\n</div>\n", styles: [".i-stepper{color:var(--color-text-primary)}.i-stepper__trigger{border-color:var(--color-border);background:var(--surface-card)}.i-stepper__trigger:hover:not(:disabled){background:var(--surface-hover);border-color:color-mix(in srgb,var(--color-primary) 35%,var(--color-border));transform:translateY(-1px)}.i-stepper__trigger:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px}.i-stepper__trigger:disabled{color:var(--color-text-disabled);cursor:not-allowed}.i-stepper__indicator{border-color:var(--color-border);background:var(--surface-ground);color:var(--color-text-secondary)}.i-stepper__description,.i-stepper__meta{color:var(--color-text-secondary)}.i-stepper__status{background:var(--surface-hover)}.i-stepper__status--completed{background:color-mix(in srgb,var(--color-success) 12%,transparent);color:var(--color-success)}.i-stepper__complete-mark{border-color:var(--surface-card);background:var(--color-success);color:var(--color-contrast-inverse)}.i-stepper__connector{background:var(--color-border)}.i-stepper__item--active .i-stepper__trigger{border-color:color-mix(in srgb,var(--color-primary) 55%,var(--color-border));box-shadow:0 6px 18px color-mix(in srgb,var(--color-primary) 12%,transparent)}.i-stepper__item--active .i-stepper__indicator{border-color:color-mix(in srgb,var(--color-primary) 35%,transparent);background:color-mix(in srgb,var(--color-primary) 10%,var(--surface-card));color:var(--color-primary)}.i-stepper__item--active .i-stepper__label{color:var(--color-primary)}.i-stepper__item--active .i-stepper__chevron{color:var(--color-primary);opacity:1;transform:translate(0)}.i-stepper__item--completed .i-stepper__indicator{border-color:var(--color-success);background:color-mix(in srgb,var(--color-success) 10%,var(--surface-card));color:var(--color-success)}.i-stepper__item--completed .i-stepper__connector{background:var(--color-success)}.i-stepper__item--disabled{opacity:.58}.i-stepper{display:flex;width:100%}.i-stepper--horizontal{flex-direction:column}.i-stepper--horizontal .i-stepper__navigation{display:flex;width:100%;align-items:stretch}.i-stepper--horizontal .i-stepper__item{display:flex;flex:1 1 0;align-items:center;min-width:0}.i-stepper--horizontal .i-stepper__trigger{flex:1 1 auto;align-self:stretch}.i-stepper--horizontal .i-stepper__connector{flex:0 0 24px;height:2px;margin:0 6px}.i-stepper--vertical{flex-direction:row;gap:24px}.i-stepper--vertical .i-stepper__navigation{flex:0 0 min(280px,35%)}.i-stepper--vertical .i-stepper__item{position:relative;padding-bottom:12px}.i-stepper--vertical .i-stepper__trigger{width:100%}.i-stepper--vertical .i-stepper__connector{position:absolute;top:66px;bottom:0;left:34px;width:2px}.i-stepper--vertical .i-stepper__panel{flex:1 1 auto;min-width:0}.i-stepper__navigation{box-sizing:border-box;margin:0;padding:0;list-style:none}.i-stepper__trigger{position:relative;display:flex;align-items:center;gap:12px;min-width:0;min-height:82px;padding:14px;overflow:hidden;border:1px solid;border-radius:8px;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background .2s,border-color .2s,box-shadow .2s,transform .2s}.i-stepper__indicator{position:relative;display:inline-flex;flex:0 0 42px;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid;border-radius:10px;font-weight:600;transition:background .2s,border-color .2s,color .2s}.i-stepper__icon{font-size:18px}.i-stepper__complete-mark{position:absolute;right:-5px;bottom:-5px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:2px solid;border-radius:50%;font-size:9px}.i-stepper__copy,.i-stepper__label,.i-stepper__description{display:block}.i-stepper__copy{flex:1 1 auto;min-width:0}.i-stepper__meta{display:flex;align-items:center;gap:7px;margin-bottom:4px;font-size:.72em;font-weight:600;letter-spacing:.035em;line-height:1.2;text-transform:uppercase}.i-stepper__status{display:inline-flex;align-items:center;min-height:18px;padding:0 6px;border-radius:999px;font-size:.9em;letter-spacing:.02em}.i-stepper__label{font-weight:600;line-height:1.3}.i-stepper__description{margin-top:3px;font-size:.8em;line-height:1.35}.i-stepper__chevron{flex:0 0 auto;font-size:11px;opacity:0;transform:translate(-4px);transition:opacity .2s,transform .2s}.i-stepper__panel{display:none;padding-top:24px}.i-stepper__panel--active{display:block}@media(max-width:768px){.i-stepper--horizontal .i-stepper__navigation{flex-direction:column}.i-stepper--horizontal .i-stepper__item{position:relative;padding-bottom:10px}.i-stepper--horizontal .i-stepper__connector{position:absolute;top:82px;bottom:0;left:34px;width:2px;height:auto;margin:0}.i-stepper--vertical{flex-direction:column;gap:0}.i-stepper--vertical .i-stepper__navigation{flex-basis:auto}}\n"] }]
6463
+ }], propDecorators: { activeIndex: [{
6464
+ type: Input
6465
+ }], linear: [{
6466
+ type: Input
6467
+ }], orientation: [{
6468
+ type: Input
6469
+ }], ariaLabel: [{
6470
+ type: Input
6471
+ }], activeIndexChange: [{
6472
+ type: Output
6473
+ }], onChange: [{
6474
+ type: Output
6475
+ }], stepComponents: [{
6476
+ type: ContentChildren,
6477
+ args: [IStep]
6478
+ }] } });
6479
+
6299
6480
  /**
6300
6481
  * Tab Panel Component
6301
6482
  *
@@ -8993,36 +9174,6 @@ const CHART_COLOR_PALETTE = {
8993
9174
  950: '#020617',
8994
9175
  },
8995
9176
  };
8996
- /**
8997
- * Chart Component
8998
- *
8999
- * A Chart.js-based chart component for displaying various chart types.
9000
- * Supports multiple charts in a responsive grid layout.
9001
- *
9002
- * @example
9003
- * ```html
9004
- * <i-chart
9005
- * [charts]="myCharts"
9006
- * height="25rem">
9007
- * </i-chart>
9008
- * ```
9009
- *
9010
- * @example
9011
- * ```typescript
9012
- * myCharts: IChartData[] = [
9013
- * {
9014
- * chartId: 'sales-chart',
9015
- * chartType: 'bar',
9016
- * labels: ['Jan', 'Feb', 'Mar'],
9017
- * dataSets: [{
9018
- * label: 'Sales',
9019
- * data: [100, 200, 150],
9020
- * backgroundColors: ['--blue-500', '--green-500', '--orange-500']
9021
- * }]
9022
- * }
9023
- * ];
9024
- * ```
9025
- */
9026
9177
  class IChart {
9027
9178
  /**
9028
9179
  * Array of chart data objects to render
@@ -9053,6 +9204,11 @@ class IChart {
9053
9204
  * @internal
9054
9205
  */
9055
9206
  chartInstances = [];
9207
+ /**
9208
+ * Legend items generated from Chart.js for each chart instance.
9209
+ * @internal
9210
+ */
9211
+ chartLegendItems = [];
9056
9212
  /**
9057
9213
  * Flag to track if component has initialized
9058
9214
  * @internal
@@ -9123,6 +9279,7 @@ class IChart {
9123
9279
  if (chartDisplay && canvasRef?.nativeElement) {
9124
9280
  const chartInstance = this.createChartInstance(canvasRef.nativeElement, chartDisplay);
9125
9281
  this.chartInstances.push(chartInstance);
9282
+ this.updateLegendItems(index);
9126
9283
  }
9127
9284
  });
9128
9285
  }
@@ -9136,6 +9293,7 @@ class IChart {
9136
9293
  });
9137
9294
  this.chartInstances = [];
9138
9295
  this.chartDisplays = [];
9296
+ this.chartLegendItems = [];
9139
9297
  }
9140
9298
  /**
9141
9299
  * Create a Chart.js instance
@@ -9221,6 +9379,7 @@ class IChart {
9221
9379
  responsive: this.responsive,
9222
9380
  plugins: {
9223
9381
  legend: {
9382
+ display: false,
9224
9383
  labels: {
9225
9384
  color: textColor,
9226
9385
  },
@@ -9255,6 +9414,7 @@ class IChart {
9255
9414
  ...baseOptions,
9256
9415
  plugins: {
9257
9416
  legend: {
9417
+ display: false,
9258
9418
  labels: {
9259
9419
  color: textColor,
9260
9420
  },
@@ -9272,6 +9432,7 @@ class IChart {
9272
9432
  ...baseOptions,
9273
9433
  plugins: {
9274
9434
  legend: {
9435
+ display: false,
9275
9436
  labels: {
9276
9437
  color: textColor,
9277
9438
  },
@@ -9447,6 +9608,51 @@ class IChart {
9447
9608
  // If it's already rgba, leave as-is (user specified their own alpha)
9448
9609
  return color;
9449
9610
  }
9611
+ /**
9612
+ * Get legend items for a chart display.
9613
+ * @param chartIndex - The index of the chart display
9614
+ * @returns Legend items generated by Chart.js
9615
+ */
9616
+ getLegendItems(chartIndex) {
9617
+ return this.chartLegendItems[chartIndex] ?? [];
9618
+ }
9619
+ /**
9620
+ * Toggle a chart legend item using the same Chart.js behavior as the built-in legend.
9621
+ * @param chartIndex - The index of the chart display
9622
+ * @param item - The legend item to toggle
9623
+ */
9624
+ toggleLegendItem(chartIndex, item) {
9625
+ const chart = this.chartInstances[chartIndex];
9626
+ if (!chart) {
9627
+ return;
9628
+ }
9629
+ if (item.datasetIndex !== undefined) {
9630
+ chart.setDatasetVisibility(item.datasetIndex, !chart.isDatasetVisible(item.datasetIndex));
9631
+ }
9632
+ else if (item.index !== undefined) {
9633
+ chart.toggleDataVisibility(item.index);
9634
+ }
9635
+ chart.update();
9636
+ this.updateLegendItems(chartIndex);
9637
+ }
9638
+ /**
9639
+ * Refresh the custom legend items for a chart instance.
9640
+ * @internal
9641
+ */
9642
+ updateLegendItems(chartIndex) {
9643
+ const chart = this.chartInstances[chartIndex];
9644
+ const generateLabels = chart?.options.plugins?.legend?.labels?.generateLabels;
9645
+ if (!chart || !generateLabels) {
9646
+ this.chartLegendItems[chartIndex] = [];
9647
+ return;
9648
+ }
9649
+ this.chartLegendItems[chartIndex] = generateLabels(chart).map((item) => ({
9650
+ ...item,
9651
+ fillStyleText: String(item.fillStyle ?? 'transparent'),
9652
+ strokeStyleText: String(item.strokeStyle ?? item.fillStyle ?? 'transparent'),
9653
+ }));
9654
+ this.cdr.detectChanges();
9655
+ }
9450
9656
  /**
9451
9657
  * Get the height style for a chart display
9452
9658
  * @param display - The chart display configuration
@@ -9463,11 +9669,11 @@ class IChart {
9463
9669
  return this.chartInstances.length;
9464
9670
  }
9465
9671
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IChart, deps: [], target: i0.ɵɵFactoryTarget.Component });
9466
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: IChart, isStandalone: true, selector: "i-chart", inputs: { charts: "charts", height: "height", responsive: "responsive" }, viewQueries: [{ propertyName: "canvasElements", predicate: ["chartCanvas"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"i-charts-container\">\n @for (chartDisplay of chartDisplays; track chartDisplay.id) {\n <div class=\"i-chart-item\" [style.height]=\"getChartHeightStyle(chartDisplay)\">\n <canvas #chartCanvas></canvas>\n </div>\n }\n</div>\n", styles: [":host{--chart-grid-color: var(--surface-border);--chart-text-color: var(--color-text-primary);--chart-text-secondary: var(--color-text-secondary)}.i-charts-container{display:flex;flex-wrap:wrap;width:100%;gap:4rem}.i-chart-item{flex:1 1 45%;min-width:300px;box-sizing:border-box}@media(max-width:768px){.i-charts-container{flex-direction:column}.i-chart-item{width:100%}}\n"] });
9672
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: IChart, isStandalone: true, selector: "i-chart", inputs: { charts: "charts", height: "height", responsive: "responsive" }, viewQueries: [{ propertyName: "canvasElements", predicate: ["chartCanvas"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"i-charts-container\">\n @for (chartDisplay of chartDisplays; track chartDisplay.id; let chartIndex = $index) {\n <div class=\"i-chart-panel\">\n <div class=\"i-chart-item\" [style.height]=\"getChartHeightStyle(chartDisplay)\">\n <canvas #chartCanvas></canvas>\n </div>\n\n @if (getLegendItems(chartIndex).length) {\n <div class=\"i-chart-legend\" role=\"list\" aria-label=\"Chart data series\">\n @for (legendItem of getLegendItems(chartIndex); track $index) {\n <button\n class=\"i-chart-legend-item\"\n type=\"button\"\n role=\"listitem\"\n [class.i-chart-legend-item-hidden]=\"legendItem.hidden\"\n [attr.aria-pressed]=\"!legendItem.hidden\"\n (click)=\"toggleLegendItem(chartIndex, legendItem)\"\n >\n <span\n class=\"i-chart-legend-marker\"\n [style.background-color]=\"legendItem.fillStyleText\"\n [style.border-color]=\"legendItem.strokeStyleText\"\n ></span>\n <span class=\"i-chart-legend-label\">{{ legendItem.text }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{--chart-grid-color: var(--surface-border);--chart-text-color: var(--color-text-primary);--chart-text-secondary: var(--color-text-secondary)}.i-charts-container{display:flex;flex-wrap:wrap;width:100%;gap:4rem}.i-chart-panel{flex:1 1 45%;min-width:300px;box-sizing:border-box}.i-chart-item{width:100%;box-sizing:border-box}.i-chart-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.75rem 1rem;margin-top:1rem;padding:.75rem 1rem;border:1px solid var(--surface-border);border-radius:var(--border-radius, .5rem);background:var(--surface-card, var(--surface-ground, transparent))}.i-chart-legend-item{display:inline-flex;align-items:center;gap:.5rem;min-width:0;padding:.25rem .5rem;border:0;border-radius:var(--border-radius, .5rem);background:transparent;color:var(--chart-text-color);font:inherit;cursor:pointer;transition:background-color .2s ease,opacity .2s ease}.i-chart-legend-item:hover,.i-chart-legend-item:focus-visible{background:var(--surface-hover, rgba(148, 163, 184, .12));outline:none}.i-chart-legend-item-hidden{opacity:.55}.i-chart-legend-item-hidden .i-chart-legend-label{text-decoration:line-through}.i-chart-legend-marker{width:.875rem;height:.875rem;flex:0 0 .875rem;border:1px solid;border-radius:.25rem}.i-chart-legend-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:768px){.i-charts-container{flex-direction:column}.i-chart-panel{width:100%}}\n"] });
9467
9673
  }
9468
9674
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: IChart, decorators: [{
9469
9675
  type: Component,
9470
- args: [{ selector: 'i-chart', standalone: true, imports: [], template: "<div class=\"i-charts-container\">\n @for (chartDisplay of chartDisplays; track chartDisplay.id) {\n <div class=\"i-chart-item\" [style.height]=\"getChartHeightStyle(chartDisplay)\">\n <canvas #chartCanvas></canvas>\n </div>\n }\n</div>\n", styles: [":host{--chart-grid-color: var(--surface-border);--chart-text-color: var(--color-text-primary);--chart-text-secondary: var(--color-text-secondary)}.i-charts-container{display:flex;flex-wrap:wrap;width:100%;gap:4rem}.i-chart-item{flex:1 1 45%;min-width:300px;box-sizing:border-box}@media(max-width:768px){.i-charts-container{flex-direction:column}.i-chart-item{width:100%}}\n"] }]
9676
+ args: [{ selector: 'i-chart', standalone: true, imports: [], template: "<div class=\"i-charts-container\">\n @for (chartDisplay of chartDisplays; track chartDisplay.id; let chartIndex = $index) {\n <div class=\"i-chart-panel\">\n <div class=\"i-chart-item\" [style.height]=\"getChartHeightStyle(chartDisplay)\">\n <canvas #chartCanvas></canvas>\n </div>\n\n @if (getLegendItems(chartIndex).length) {\n <div class=\"i-chart-legend\" role=\"list\" aria-label=\"Chart data series\">\n @for (legendItem of getLegendItems(chartIndex); track $index) {\n <button\n class=\"i-chart-legend-item\"\n type=\"button\"\n role=\"listitem\"\n [class.i-chart-legend-item-hidden]=\"legendItem.hidden\"\n [attr.aria-pressed]=\"!legendItem.hidden\"\n (click)=\"toggleLegendItem(chartIndex, legendItem)\"\n >\n <span\n class=\"i-chart-legend-marker\"\n [style.background-color]=\"legendItem.fillStyleText\"\n [style.border-color]=\"legendItem.strokeStyleText\"\n ></span>\n <span class=\"i-chart-legend-label\">{{ legendItem.text }}</span>\n </button>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host{--chart-grid-color: var(--surface-border);--chart-text-color: var(--color-text-primary);--chart-text-secondary: var(--color-text-secondary)}.i-charts-container{display:flex;flex-wrap:wrap;width:100%;gap:4rem}.i-chart-panel{flex:1 1 45%;min-width:300px;box-sizing:border-box}.i-chart-item{width:100%;box-sizing:border-box}.i-chart-legend{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.75rem 1rem;margin-top:1rem;padding:.75rem 1rem;border:1px solid var(--surface-border);border-radius:var(--border-radius, .5rem);background:var(--surface-card, var(--surface-ground, transparent))}.i-chart-legend-item{display:inline-flex;align-items:center;gap:.5rem;min-width:0;padding:.25rem .5rem;border:0;border-radius:var(--border-radius, .5rem);background:transparent;color:var(--chart-text-color);font:inherit;cursor:pointer;transition:background-color .2s ease,opacity .2s ease}.i-chart-legend-item:hover,.i-chart-legend-item:focus-visible{background:var(--surface-hover, rgba(148, 163, 184, .12));outline:none}.i-chart-legend-item-hidden{opacity:.55}.i-chart-legend-item-hidden .i-chart-legend-label{text-decoration:line-through}.i-chart-legend-marker{width:.875rem;height:.875rem;flex:0 0 .875rem;border:1px solid;border-radius:.25rem}.i-chart-legend-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:768px){.i-charts-container{flex-direction:column}.i-chart-panel{width:100%}}\n"] }]
9471
9677
  }], propDecorators: { charts: [{
9472
9678
  type: Input
9473
9679
  }], height: [{
@@ -9900,5 +10106,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
9900
10106
  * Generated bundle index. Do not edit.
9901
10107
  */
9902
10108
 
9903
- export { AbstractDialog, CLAIMS_CHECKER, ConfirmationDialogComponent, ConfirmationDialogService, DataUpdateEventService, DialogService, EmptyStateComponent, IAccordion, IAccordionList, IButton, ICalendar, ICard, IChart, ICheckbox, IChip, IChipsComponent, IDialog, IDialogActions, IDialogBase, IDivider, IInputText, IListbox, IMessage, IMultiSelect, IOverlayPanel, IPanel, IPlaceholder, IProgressSpinner, IRadioButton, ISelect, ITabPanel, ITable, ITabs, ITag, ITextarea, IToggle, ITreeView, IWhisper, LayoutComponent, LayoutService, LocalStorageColorSchemeKey, MenuComponent, NoContentComponent, SeoService, SidebarComponent, StructuredDataService, TooltipComponent, TooltipDirective, TopbarComponent, UniqueComponentId, WhisperService, ZIndexUtils, lastId, provideMenuClaimsChecker };
10109
+ export { AbstractDialog, CLAIMS_CHECKER, ConfirmationDialogComponent, ConfirmationDialogService, DataUpdateEventService, DialogService, EmptyStateComponent, IAccordion, IAccordionList, IButton, ICalendar, ICard, IChart, ICheckbox, IChip, IChipsComponent, IDialog, IDialogActions, IDialogBase, IDivider, IInputText, IListbox, IMessage, IMultiSelect, IOverlayPanel, IPanel, IPlaceholder, IProgressSpinner, IRadioButton, ISelect, IStep, IStepper, ITabPanel, ITable, ITabs, ITag, ITextarea, IToggle, ITreeView, IWhisper, LayoutComponent, LayoutService, LocalStorageColorSchemeKey, MenuComponent, NoContentComponent, SeoService, SidebarComponent, StructuredDataService, TooltipComponent, TooltipDirective, TopbarComponent, UniqueComponentId, WhisperService, ZIndexUtils, lastId, provideMenuClaimsChecker };
9904
10110
  //# sourceMappingURL=invensys-ng.mjs.map