@hestia-earth/ui-components 0.42.23 → 0.42.24

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.
@@ -2773,18 +2773,17 @@ var StepStatus;
2773
2773
  StepStatus[StepStatus["next"] = 2] = "next";
2774
2774
  StepStatus[StepStatus["error"] = 3] = "error";
2775
2775
  })(StepStatus || (StepStatus = {}));
2776
- const getStepStatus = (index, statusIndex, success, processing,
2777
- // marks the current step as actively in progress (driven by the `inProgressStatus` input)
2778
- inProgress = false) => index < statusIndex
2776
+ // status of the step the pipeline is currently on (`index === statusIndex`).
2777
+ // `inProgress` (driven by the `inProgressStatus` input) marks the step as actively in progress
2778
+ const getCurrentStepStatus = (success, processing, inProgress) => inProgress || (success && processing)
2779
+ ? StepStatus.current
2780
+ : success
2781
+ ? StepStatus.next
2782
+ : StepStatus.error;
2783
+ const getStepStatus = (index, statusIndex, success, processing, inProgress = false) => index < statusIndex
2779
2784
  ? StepStatus.previous
2780
2785
  : index === statusIndex
2781
- ? inProgress
2782
- ? StepStatus.current
2783
- : success
2784
- ? processing
2785
- ? StepStatus.current
2786
- : StepStatus.next
2787
- : StepStatus.error
2786
+ ? getCurrentStepStatus(success, processing, inProgress)
2788
2787
  : StepStatus.next;
2789
2788
  const getStageStatus = (statuses) => statuses.every(status => status === StepStatus.previous)
2790
2789
  ? 'success'
@@ -3091,7 +3090,7 @@ class PipelineProgressItemComponent {
3091
3090
  this.isSuccess = computed(() => this.timelineStatus() === 'success', ...(ngDevMode ? [{ debugName: "isSuccess" }] : []));
3092
3091
  }
3093
3092
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: PipelineProgressItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3094
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: PipelineProgressItemComponent, isStandalone: true, selector: "he-pipeline-progress-item", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, showStatus: { classPropertyName: "showStatus", publicName: "showStatus", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, statusToLabelMap: { classPropertyName: "statusToLabelMap", publicName: "statusToLabelMap", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.timeline-status": "timelineStatus()", "attr.timeline-position": "position()" }, classAttribute: "is-flex is-align-items-center timeline-item" }, ngImport: i0, template: "@if (status(); as stat) {\n <he-pipeline-progress-status class=\"mr-2\" [status]=\"timelineStatus()\" size=\"small\" />\n\n <div class=\"is-size-7\" [style.opacity]=\"showStatus() ? 1 : 0\">\n <p class=\"status-label\">\n {{ statusToLabelMap()[stat.status] }}\n </p>\n\n <p class=\"has-text-grey-lighter\">\n @if (stat.duration > 0) {\n {{ stat.duration | pipelineDuration }}\n } @else if (isSuccess()) {\n <span>&nbsp;</span>\n }\n </p>\n </div>\n}\n", styles: [":root{--pipeline-progress-item-background: #249da5;--pipeline-progress-item-border-color: #e1eded}:host{position:relative;line-height:1.1;z-index:1}:host:before{content:\"\";position:absolute;top:0;left:2px;width:14px;height:100%;border:0 solid;border-left-width:6px!important;border-right-width:6px!important;z-index:-1;background-color:var(--pipeline-progress-item-background);border-color:var(--pipeline-progress-item-border-color)}:host[timeline-position=top]:before{bottom:0;top:auto;height:50%}:host[timeline-position=bottom]:before{height:50%}:host[timeline-status=error] .status-label{color:#ff3844}:host[timeline-status=pending] .status-label{color:#b5b5b5}:host[timeline-status=none] .status-label{color:#b5b5b5}:host>*{transition:opacity .3s}\n"], dependencies: [{ kind: "component", type: PipelineProgressStatusComponent, selector: "he-pipeline-progress-status", inputs: ["status", "size"] }, { kind: "pipe", type: PipelineDurationPipe, name: "pipelineDuration" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3093
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: PipelineProgressItemComponent, isStandalone: true, selector: "he-pipeline-progress-item", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, showStatus: { classPropertyName: "showStatus", publicName: "showStatus", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, statusToLabelMap: { classPropertyName: "statusToLabelMap", publicName: "statusToLabelMap", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.timeline-status": "timelineStatus()", "attr.timeline-position": "position()" }, classAttribute: "is-flex is-align-items-center timeline-item" }, ngImport: i0, template: "@if (status(); as stat) {\n <he-pipeline-progress-status class=\"mr-2\" [status]=\"timelineStatus()\" size=\"small\" />\n\n <div class=\"is-size-7\" [style.opacity]=\"showStatus() ? 1 : 0\">\n <p class=\"status-label\">\n {{ statusToLabelMap()[stat.status] }}\n </p>\n\n <p class=\"has-text-grey-lighter | step-subtitle\" [title]=\"stat.subtitle || null\">\n @if (stat.subtitle) {\n {{ stat.subtitle }}\n } @else if (stat.duration > 0) {\n {{ stat.duration | pipelineDuration }}\n } @else if (isSuccess()) {\n <span>&nbsp;</span>\n }\n </p>\n </div>\n}\n", styles: [":root{--pipeline-progress-item-background: #249da5;--pipeline-progress-item-border-color: #e1eded}:host{position:relative;line-height:1.1;z-index:1}:host .step-subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host:before{content:\"\";position:absolute;top:0;left:2px;width:14px;height:100%;border:0 solid;border-left-width:6px!important;border-right-width:6px!important;z-index:-1;background-color:var(--pipeline-progress-item-background);border-color:var(--pipeline-progress-item-border-color)}:host[timeline-position=top]:before{bottom:0;top:auto;height:50%}:host[timeline-position=bottom]:before{height:50%}:host[timeline-status=error] .status-label{color:#ff3844}:host[timeline-status=pending] .status-label{color:#b5b5b5}:host[timeline-status=none] .status-label{color:#b5b5b5}:host>*{transition:opacity .3s}\n"], dependencies: [{ kind: "component", type: PipelineProgressStatusComponent, selector: "he-pipeline-progress-status", inputs: ["status", "size"] }, { kind: "pipe", type: PipelineDurationPipe, name: "pipelineDuration" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3095
3094
  }
3096
3095
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: PipelineProgressItemComponent, decorators: [{
3097
3096
  type: Component$1,
@@ -3099,7 +3098,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
3099
3098
  class: 'is-flex is-align-items-center timeline-item',
3100
3099
  '[attr.timeline-status]': 'timelineStatus()',
3101
3100
  '[attr.timeline-position]': 'position()'
3102
- }, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (status(); as stat) {\n <he-pipeline-progress-status class=\"mr-2\" [status]=\"timelineStatus()\" size=\"small\" />\n\n <div class=\"is-size-7\" [style.opacity]=\"showStatus() ? 1 : 0\">\n <p class=\"status-label\">\n {{ statusToLabelMap()[stat.status] }}\n </p>\n\n <p class=\"has-text-grey-lighter\">\n @if (stat.duration > 0) {\n {{ stat.duration | pipelineDuration }}\n } @else if (isSuccess()) {\n <span>&nbsp;</span>\n }\n </p>\n </div>\n}\n", styles: [":root{--pipeline-progress-item-background: #249da5;--pipeline-progress-item-border-color: #e1eded}:host{position:relative;line-height:1.1;z-index:1}:host:before{content:\"\";position:absolute;top:0;left:2px;width:14px;height:100%;border:0 solid;border-left-width:6px!important;border-right-width:6px!important;z-index:-1;background-color:var(--pipeline-progress-item-background);border-color:var(--pipeline-progress-item-border-color)}:host[timeline-position=top]:before{bottom:0;top:auto;height:50%}:host[timeline-position=bottom]:before{height:50%}:host[timeline-status=error] .status-label{color:#ff3844}:host[timeline-status=pending] .status-label{color:#b5b5b5}:host[timeline-status=none] .status-label{color:#b5b5b5}:host>*{transition:opacity .3s}\n"] }]
3101
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (status(); as stat) {\n <he-pipeline-progress-status class=\"mr-2\" [status]=\"timelineStatus()\" size=\"small\" />\n\n <div class=\"is-size-7\" [style.opacity]=\"showStatus() ? 1 : 0\">\n <p class=\"status-label\">\n {{ statusToLabelMap()[stat.status] }}\n </p>\n\n <p class=\"has-text-grey-lighter | step-subtitle\" [title]=\"stat.subtitle || null\">\n @if (stat.subtitle) {\n {{ stat.subtitle }}\n } @else if (stat.duration > 0) {\n {{ stat.duration | pipelineDuration }}\n } @else if (isSuccess()) {\n <span>&nbsp;</span>\n }\n </p>\n </div>\n}\n", styles: [":root{--pipeline-progress-item-background: #249da5;--pipeline-progress-item-border-color: #e1eded}:host{position:relative;line-height:1.1;z-index:1}:host .step-subtitle{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host:before{content:\"\";position:absolute;top:0;left:2px;width:14px;height:100%;border:0 solid;border-left-width:6px!important;border-right-width:6px!important;z-index:-1;background-color:var(--pipeline-progress-item-background);border-color:var(--pipeline-progress-item-border-color)}:host[timeline-position=top]:before{bottom:0;top:auto;height:50%}:host[timeline-position=bottom]:before{height:50%}:host[timeline-status=error] .status-label{color:#ff3844}:host[timeline-status=pending] .status-label{color:#b5b5b5}:host[timeline-status=none] .status-label{color:#b5b5b5}:host>*{transition:opacity .3s}\n"] }]
3103
3102
  }], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], showStatus: [{ type: i0.Input, args: [{ isSignal: true, alias: "showStatus", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], statusToLabelMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusToLabelMap", required: true }] }] } });
3104
3103
 
3105
3104
  const PIPELINE_PROGRESS_ITEM_HEIGHT = 50;
@@ -3181,6 +3180,10 @@ class PipelineStagesProgressComponent {
3181
3180
  * Duration per status, in milliseconds.
3182
3181
  */
3183
3182
  this.statusDurationMap = input(...(ngDevMode ? [undefined, { debugName: "statusDurationMap" }] : []));
3183
+ /**
3184
+ * Optional subtitle rendered under each step label (e.g. the provider/model used for that step).
3185
+ */
3186
+ this.statusSubtitleMap = input(...(ngDevMode ? [undefined, { debugName: "statusSubtitleMap" }] : []));
3184
3187
  this.openedStage = signal(null, ...(ngDevMode ? [{ debugName: "openedStage" }] : []));
3185
3188
  this.slideDirection = signal('up', ...(ngDevMode ? [{ debugName: "slideDirection" }] : []));
3186
3189
  this.successes = computed(() => this.statuses().map(status => `${status}Done`), ...(ngDevMode ? [{ debugName: "successes" }] : []));
@@ -3204,7 +3207,8 @@ class PipelineStagesProgressComponent {
3204
3207
  status,
3205
3208
  group: this.statusToGroupMap()[status],
3206
3209
  stepStatus: getStepStatus(index, this.statusIndex(), this.success(), this.processing(), this.inProgress()),
3207
- duration: this.statusDurationMap()?.[status]
3210
+ duration: this.statusDurationMap()?.[status],
3211
+ subtitle: this.statusSubtitleMap()?.[status]
3208
3212
  })), ...(ngDevMode ? [{ debugName: "statusesWithStepStatus" }] : []));
3209
3213
  this.groups = computed(() => {
3210
3214
  const statusesWithStepStatus = this.statusesWithStepStatus();
@@ -3253,12 +3257,12 @@ class PipelineStagesProgressComponent {
3253
3257
  this.openedStage.set(this.openedStage() === index ? null : index);
3254
3258
  }
3255
3259
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: PipelineStagesProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3256
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: PipelineStagesProgressComponent, isStandalone: true, selector: "he-pipeline-stages-progress", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, processing: { classPropertyName: "processing", publicName: "processing", isSignal: true, isRequired: false, transformFunction: null }, inProgressStatus: { classPropertyName: "inProgressStatus", publicName: "inProgressStatus", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: true, transformFunction: null }, statusToGroupMap: { classPropertyName: "statusToGroupMap", publicName: "statusToGroupMap", isSignal: true, isRequired: true, transformFunction: null }, statusToLabelMap: { classPropertyName: "statusToLabelMap", publicName: "statusToLabelMap", isSignal: true, isRequired: true, transformFunction: null }, statusGroupColorFn: { classPropertyName: "statusGroupColorFn", publicName: "statusGroupColorFn", isSignal: true, isRequired: true, transformFunction: null }, statusDurationMap: { classPropertyName: "statusDurationMap", publicName: "statusDurationMap", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@for (group of groups(); track group.group; let index = $index, first = $first, last = $last) {\n <div class=\"pipeline-stage-container is-centered\" [ngStyle]=\"group.palette\">\n <div>&nbsp;</div>\n <he-pipeline-progress-stage (click)=\"toggleOpenedStage(index)\" [processing]=\"processing()\" [group]=\"group\" />\n <div>&nbsp;</div>\n <he-pipeline-progress-group\n [style.order]=\"slideDirection() === 'up' ? -99 : 99\"\n [direction]=\"slideDirection()\"\n [statuses]=\"group.statuses\"\n [statusToLabelMap]=\"statusToLabelMap()\"\n [isFirstStage]=\"first\"\n [isLastStage]=\"last\"\n [visible]=\"openedStage() === index\" />\n </div>\n}\n", styles: [":host{display:grid;grid-template-columns:1fr auto auto 1fr}:host .pipeline-stage-container{grid-column:span 4;position:relative;overflow:hidden;display:grid;grid-template-columns:subgrid}he-pipeline-progress-stage{grid-column:span 2}he-pipeline-progress-group{grid-column:span 4}\n"], dependencies: [{ kind: "component", type: PipelineProgressStageComponent, selector: "he-pipeline-progress-stage", inputs: ["group", "processing"] }, { kind: "component", type: PipelineProgressGroupComponent, selector: "he-pipeline-progress-group", inputs: ["visible", "isFirstStage", "isLastStage", "stepStatus", "statuses", "direction", "statusToLabelMap"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3260
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: PipelineStagesProgressComponent, isStandalone: true, selector: "he-pipeline-stages-progress", inputs: { status: { classPropertyName: "status", publicName: "status", isSignal: true, isRequired: false, transformFunction: null }, processing: { classPropertyName: "processing", publicName: "processing", isSignal: true, isRequired: false, transformFunction: null }, inProgressStatus: { classPropertyName: "inProgressStatus", publicName: "inProgressStatus", isSignal: true, isRequired: false, transformFunction: null }, statuses: { classPropertyName: "statuses", publicName: "statuses", isSignal: true, isRequired: true, transformFunction: null }, statusToGroupMap: { classPropertyName: "statusToGroupMap", publicName: "statusToGroupMap", isSignal: true, isRequired: true, transformFunction: null }, statusToLabelMap: { classPropertyName: "statusToLabelMap", publicName: "statusToLabelMap", isSignal: true, isRequired: true, transformFunction: null }, statusGroupColorFn: { classPropertyName: "statusGroupColorFn", publicName: "statusGroupColorFn", isSignal: true, isRequired: true, transformFunction: null }, statusDurationMap: { classPropertyName: "statusDurationMap", publicName: "statusDurationMap", isSignal: true, isRequired: false, transformFunction: null }, statusSubtitleMap: { classPropertyName: "statusSubtitleMap", publicName: "statusSubtitleMap", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@for (group of groups(); track group.group; let index = $index, first = $first, last = $last) {\n <div class=\"pipeline-stage-container is-centered\" [ngStyle]=\"group.palette\">\n <div>&nbsp;</div>\n <he-pipeline-progress-stage (click)=\"toggleOpenedStage(index)\" [processing]=\"processing()\" [group]=\"group\" />\n <div>&nbsp;</div>\n <he-pipeline-progress-group\n [style.order]=\"slideDirection() === 'up' ? -99 : 99\"\n [direction]=\"slideDirection()\"\n [statuses]=\"group.statuses\"\n [statusToLabelMap]=\"statusToLabelMap()\"\n [isFirstStage]=\"first\"\n [isLastStage]=\"last\"\n [visible]=\"openedStage() === index\" />\n </div>\n}\n", styles: [":host{display:grid;grid-template-columns:1fr auto auto 1fr}:host .pipeline-stage-container{grid-column:span 4;position:relative;overflow:hidden;display:grid;grid-template-columns:subgrid}he-pipeline-progress-stage{grid-column:span 2}he-pipeline-progress-group{grid-column:span 4}\n"], dependencies: [{ kind: "component", type: PipelineProgressStageComponent, selector: "he-pipeline-progress-stage", inputs: ["group", "processing"] }, { kind: "component", type: PipelineProgressGroupComponent, selector: "he-pipeline-progress-group", inputs: ["visible", "isFirstStage", "isLastStage", "stepStatus", "statuses", "direction", "statusToLabelMap"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3257
3261
  }
3258
3262
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: PipelineStagesProgressComponent, decorators: [{
3259
3263
  type: Component$1,
3260
3264
  args: [{ selector: 'he-pipeline-stages-progress', changeDetection: ChangeDetectionStrategy.OnPush, imports: [PipelineProgressStageComponent, PipelineProgressGroupComponent, NgStyle], template: "@for (group of groups(); track group.group; let index = $index, first = $first, last = $last) {\n <div class=\"pipeline-stage-container is-centered\" [ngStyle]=\"group.palette\">\n <div>&nbsp;</div>\n <he-pipeline-progress-stage (click)=\"toggleOpenedStage(index)\" [processing]=\"processing()\" [group]=\"group\" />\n <div>&nbsp;</div>\n <he-pipeline-progress-group\n [style.order]=\"slideDirection() === 'up' ? -99 : 99\"\n [direction]=\"slideDirection()\"\n [statuses]=\"group.statuses\"\n [statusToLabelMap]=\"statusToLabelMap()\"\n [isFirstStage]=\"first\"\n [isLastStage]=\"last\"\n [visible]=\"openedStage() === index\" />\n </div>\n}\n", styles: [":host{display:grid;grid-template-columns:1fr auto auto 1fr}:host .pipeline-stage-container{grid-column:span 4;position:relative;overflow:hidden;display:grid;grid-template-columns:subgrid}he-pipeline-progress-stage{grid-column:span 2}he-pipeline-progress-group{grid-column:span 4}\n"] }]
3261
- }], ctorParameters: () => [], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], processing: [{ type: i0.Input, args: [{ isSignal: true, alias: "processing", required: false }] }], inProgressStatus: [{ type: i0.Input, args: [{ isSignal: true, alias: "inProgressStatus", required: false }] }], statuses: [{ type: i0.Input, args: [{ isSignal: true, alias: "statuses", required: true }] }], statusToGroupMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusToGroupMap", required: true }] }], statusToLabelMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusToLabelMap", required: true }] }], statusGroupColorFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusGroupColorFn", required: true }] }], statusDurationMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusDurationMap", required: false }] }] } });
3265
+ }], ctorParameters: () => [], propDecorators: { status: [{ type: i0.Input, args: [{ isSignal: true, alias: "status", required: false }] }], processing: [{ type: i0.Input, args: [{ isSignal: true, alias: "processing", required: false }] }], inProgressStatus: [{ type: i0.Input, args: [{ isSignal: true, alias: "inProgressStatus", required: false }] }], statuses: [{ type: i0.Input, args: [{ isSignal: true, alias: "statuses", required: true }] }], statusToGroupMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusToGroupMap", required: true }] }], statusToLabelMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusToLabelMap", required: true }] }], statusGroupColorFn: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusGroupColorFn", required: true }] }], statusDurationMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusDurationMap", required: false }] }], statusSubtitleMap: [{ type: i0.Input, args: [{ isSignal: true, alias: "statusSubtitleMap", required: false }] }] } });
3262
3266
 
3263
3267
  class PopoverComponent {
3264
3268
  constructor() {