UNPKG

@orchestrator/stepper

Version:

> A stepper component for Orchestrator library.

1 lines 22.5 kB
{"version":3,"file":"orchestrator-stepper.mjs","sources":["../../../../libs/stepper/src/lib/step-host/step-config.ts","../../../../libs/stepper/src/lib/step-host/step-host.component.ts","../../../../libs/stepper/src/lib/step-host/step-host.component.html","../../../../libs/stepper/src/lib/stepper.class.ts","../../../../libs/stepper/src/lib/stepper-host/stepper-config.ts","../../../../libs/stepper/src/lib/stepper/animation.ts","../../../../libs/stepper/src/lib/stepper/stepper.component.ts","../../../../libs/stepper/src/lib/stepper/stepper.component.html","../../../../libs/stepper/src/lib/stepper-host/stepper-host.component.ts","../../../../libs/stepper/src/lib/stepper-host/stepper-host.component.html","../../../../libs/stepper/src/lib/stepper.module.ts","../../../../libs/stepper/src/orchestrator-stepper.ts"],"sourcesContent":["import { Option, OrchestratorConfigItem } from '@orchestrator/core';\n\nexport interface StepperContext extends OrchestratorConfigItem<StepConfig> {}\n\nexport class StepConfig {\n @Option({ required: true })\n id: string;\n\n @Option()\n name?: string;\n\n @Option()\n header?: OrchestratorConfigItem<any, StepperContext> | boolean = true;\n\n @Option()\n footer?: OrchestratorConfigItem<any, StepperContext> | boolean = true;\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport {\n DynamicComponent,\n OrchestratorConfigItem,\n OrchestratorDynamicComponent,\n} from '@orchestrator/core';\n\nimport { StepConfig } from './step-config';\n\n@Component({\n selector: 'orc-step-host',\n templateUrl: './step-host.component.html',\n styleUrls: ['./step-host.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n@DynamicComponent({ config: StepConfig })\nexport class StepHostComponent\n implements OrchestratorDynamicComponent<StepConfig> {\n @Input() items: OrchestratorConfigItem<any>[];\n}\n","<orc-render-item *ngIf=\"items\" [item]=\"items[0]\"></orc-render-item>\n","import { OrchestratorDynamicComponent } from '@orchestrator/core';\n\nexport abstract class Stepper {\n steps: OrchestratorDynamicComponent[] | undefined;\n currentStep: OrchestratorDynamicComponent | undefined;\n currentStepIdx: number | undefined;\n stepsCount: number;\n abstract goTo(offsetOrName: string | number, stepData?: any): Promise<void>;\n abstract goNext(stepData?: any): Promise<void>;\n abstract goBack(stepData?: any): Promise<void>;\n abstract goToStart(stepData?: any): Promise<void>;\n abstract goToEnd(stepData?: any): Promise<void>;\n abstract activateStep(idx: number, stepData?: any): Promise<void>;\n}\n","import { Injectable } from '@angular/core';\nimport { Option, OrchestratorConfigItem } from '@orchestrator/core';\n\nimport { StepperContext } from '../step-host';\n\n@Injectable()\nexport class StepperConfig {\n @Option()\n loopSteps?: boolean;\n\n @Option()\n header?: OrchestratorConfigItem<any, StepperContext>;\n\n @Option()\n footer?: OrchestratorConfigItem<any, StepperContext>;\n}\n","import {\n animate,\n animateChild,\n group,\n query,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\nexport function getStepAnimation(name: string) {\n return [\n trigger(`${name}Backward`, [stepAnimationTransition(name, false)]),\n trigger(`${name}Forward`, [stepAnimationTransition(name, true)]),\n trigger(`${name}Prev`, []),\n trigger(`${name}Next`, []),\n ];\n}\n\nexport function stepAnimationTransition(name: string, forwards: boolean) {\n return transition('* <=> *', [\n // Initial state\n style({\n position: 'relative',\n display: 'flex',\n overflow: 'hidden',\n 'flex-direction': 'row',\n 'flex-wrap': 'nowrap',\n }),\n query(`@${name}Prev, @${name}Next`, [\n style({\n width: '100%',\n 'flex-shrink': 0,\n 'will-change': 'transform',\n }),\n ]),\n query(\n `@${name}Prev`,\n [style({ position: 'absolute', top: 0 }), animateChild()],\n { optional: true },\n ),\n query(\n `@${name}Next`,\n style({ transform: `translateX(${forwards ? '' : '-'}100%)` }),\n ),\n // Transition\n group([\n query(\n `@${name}Prev`,\n animate(\n '300ms ease-out',\n style({ transform: `translateX(${forwards ? '-' : ''}100%)` }),\n ),\n { optional: true },\n ),\n query(\n `@${name}Next`,\n animate('300ms ease-out', style({ transform: 'translateX(0)' })),\n ),\n ]),\n query(`@${name}Next`, animateChild()),\n ]);\n}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n OnChanges,\n OnInit,\n SimpleChanges,\n} from '@angular/core';\nimport { OrchestratorConfigItem } from '@orchestrator/core';\n\nimport { StepConfig } from '../step-host';\nimport { Stepper } from '../stepper.class';\nimport { getStepAnimation } from './animation';\n\ninterface SectionAnimation {\n curr: boolean;\n prev: boolean;\n animate: boolean;\n shouldAnimate(): boolean;\n}\n\n@Component({\n selector: 'orc-stepper',\n templateUrl: './stepper.component.html',\n styleUrls: ['./stepper.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [...getStepAnimation('stepAnimation')],\n providers: [{ provide: Stepper, useExisting: StepperComponent }],\n})\nexport class StepperComponent implements OnInit, OnChanges, Stepper {\n @Input() steps: OrchestratorConfigItem<StepConfig>[] = [];\n @Input() header: OrchestratorConfigItem;\n @Input() footer: OrchestratorConfigItem;\n\n @Input() initialStep = 0;\n\n @Input() loop = false;\n\n get stepsCount() {\n return this.steps ? this.steps.length : 0;\n }\n\n currentStepIdx: number | undefined;\n currentStep: OrchestratorConfigItem<StepConfig> | undefined;\n prevStep: OrchestratorConfigItem<StepConfig> | undefined;\n\n get hideHeader() {\n return this.isHeaderHidden(this.currentStep);\n }\n\n get headerItem() {\n if (this.hideHeader) {\n return;\n }\n\n const header = this.currentStep.config.header;\n return typeof header === 'object' ? header : this.header;\n }\n\n get hideFooter() {\n return this.isFooterHidden(this.currentStep);\n }\n\n get footerItem() {\n if (this.hideFooter) {\n return;\n }\n\n const footer = this.currentStep.config.footer;\n return typeof footer === 'object' ? footer : this.footer;\n }\n\n goingBack = false;\n\n animationHeader: SectionAnimation = {\n curr: false,\n prev: false,\n animate: false,\n shouldAnimate: () => this.doAnimateHeader(),\n };\n animationContent: SectionAnimation = {\n curr: false,\n prev: false,\n animate: false,\n shouldAnimate: () => this.doAnimateContent(),\n };\n animationFooter: SectionAnimation = {\n curr: false,\n prev: false,\n animate: false,\n shouldAnimate: () => this.doAnimateFooter(),\n };\n\n private animations: SectionAnimation[] = [\n this.animationHeader,\n this.animationContent,\n this.animationFooter,\n ];\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n if (this.steps) {\n this.activateStep(this.initialStep);\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if ('steps' in changes) {\n this.activateStep(\n this.currentStepIdx != null ? this.currentStepIdx : this.initialStep,\n );\n }\n }\n\n async goTo(offsetOrId: string | number, stepData?: any) {\n if (typeof offsetOrId === 'number') {\n return await this.jumpSteps(offsetOrId, stepData);\n } else {\n return await this.toStep(offsetOrId, stepData);\n }\n }\n\n async goNext(stepData?: any) {\n return await this.goTo(1, stepData);\n }\n\n async goBack(stepData?: any) {\n return await this.goTo(-1, stepData);\n }\n\n async goToStart(stepData?: any) {\n return await this.activateStep(0, stepData);\n }\n\n async goToEnd(stepData?: any) {\n return await this.activateStep(this.steps.length - 1, stepData);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async activateStep(idx: number, stepData?: any) {\n // Bounds normalization\n if (idx >= this.steps.length) {\n idx = this.loop ? idx % this.steps.length : this.steps.length - 1;\n } else if (idx < 0) {\n idx = this.loop ? idx + this.steps.length : 0;\n }\n\n if (idx === this.currentStepIdx) {\n return;\n }\n\n // TODO(gund): do something with stepData...\n\n this.goingBack = this.currentStepIdx > idx;\n\n this.prevStep = this.currentStep;\n this.currentStep = this.steps[idx];\n this.currentStepIdx = idx;\n\n this.updateAnimations();\n this.cdr.markForCheck();\n }\n\n cleanupPrevStep() {\n this.prevStep = undefined;\n }\n\n private async toStep(id: string, stepData?: any) {\n const idx = this.steps.findIndex((step) => step.config.id === id);\n\n if (idx !== -1) {\n return await this.activateStep(idx, stepData);\n }\n }\n\n private async jumpSteps(n: number, stepData?: any) {\n return await this.activateStep(this.currentStepIdx + n, stepData);\n }\n\n private updateAnimations() {\n this.animations.forEach((animation) => {\n animation.animate = animation.shouldAnimate();\n\n if (animation.animate) {\n if (this.goingBack) {\n animation.prev = !animation.prev;\n } else {\n animation.curr = !animation.curr;\n }\n }\n });\n }\n\n private doAnimateHeader() {\n return (\n !!this.currentStep &&\n !!this.prevStep &&\n this.isHeaderHidden(this.currentStep) !==\n this.isHeaderHidden(this.prevStep)\n );\n }\n\n private doAnimateContent() {\n return !!this.currentStep && !!this.prevStep;\n }\n\n private doAnimateFooter() {\n return (\n !!this.currentStep &&\n !!this.prevStep &&\n this.isFooterHidden(this.currentStep) !==\n this.isFooterHidden(this.prevStep)\n );\n }\n\n private isHeaderHidden(step: OrchestratorConfigItem<StepConfig>) {\n return 'header' in step.config && !step.config.header;\n }\n\n private isFooterHidden(step: OrchestratorConfigItem<StepConfig>) {\n return 'footer' in step.config && !step.config.footer;\n }\n}\n","<div class=\"step-wrapper\">\n <div class=\"step\">\n <div class=\"step-header-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n renderStepTpl;\n context: {\n $implicit: stepHeader,\n animation: animationHeader\n }\n \"\n ></ng-container>\n </div>\n <div class=\"step-content-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n renderStepTpl;\n context: {\n $implicit: stepContent,\n animation: animationContent\n }\n \"\n ></ng-container>\n </div>\n <div class=\"step-footer-wrapper\">\n <ng-container\n *ngTemplateOutlet=\"\n renderStepTpl;\n context: {\n $implicit: stepFooter,\n animation: animationFooter\n }\n \"\n ></ng-container>\n </div>\n </div>\n</div>\n\n<ng-template #renderStepTpl let-tpl let-animation=\"animation\">\n <div\n [@stepAnimationForward]=\"animation.curr\"\n [@stepAnimationBackward]=\"animation.prev\"\n (@stepAnimationForward.done)=\"cleanupPrevStep()\"\n (@stepAnimationBackward.done)=\"cleanupPrevStep()\"\n >\n <div *ngIf=\"animation.animate\" @stepAnimationPrev>\n <ng-container\n *ngTemplateOutlet=\"tpl; context: { $implicit: prevStep }\"\n ></ng-container>\n </div>\n <div @stepAnimationNext>\n <ng-container\n *ngTemplateOutlet=\"tpl; context: { $implicit: currentStep }\"\n ></ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #stepHeader let-step>\n <div *ngIf=\"step && !hideHeader\" class=\"step-header\">\n <orc-render-item\n *ngIf=\"headerItem; else defaultHeader\"\n [item]=\"headerItem\"\n [context]=\"step\"\n ></orc-render-item>\n <ng-template #defaultHeader>{{ step.config.name }}</ng-template>\n </div>\n</ng-template>\n\n<ng-template #stepContent let-step>\n <div *ngIf=\"step\" class=\"step-content\">\n <orc-render-item [item]=\"step\"></orc-render-item>\n </div>\n</ng-template>\n\n<ng-template #stepFooter let-step>\n <div *ngIf=\"step && !hideFooter\" class=\"step-footer\">\n <orc-render-item\n *ngIf=\"footerItem; else defaultFooter\"\n [item]=\"footerItem\"\n [context]=\"step\"\n ></orc-render-item>\n <ng-template #defaultFooter>\n <button type=\"button\" class=\"step-footer--prev\" (click)=\"goBack()\">\n Prev\n </button>\n <button type=\"button\" class=\"step-footer--next\" (click)=\"goNext()\">\n Next\n </button>\n </ng-template>\n </div>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport {\n DynamicComponent,\n OrchestratorConfigItem,\n OrchestratorDynamicComponent,\n} from '@orchestrator/core';\n\nimport { StepperConfig } from './stepper-config';\n\n@Component({\n selector: 'orc-stepper-host',\n templateUrl: './stepper-host.component.html',\n styleUrls: ['./stepper-host.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n@DynamicComponent({ config: StepperConfig })\nexport class StepperHostComponent\n implements OrchestratorDynamicComponent<StepperConfig> {\n @Input() items: OrchestratorConfigItem[];\n @Input() config: StepperConfig;\n}\n","<orc-stepper\n [steps]=\"items\"\n [header]=\"config?.header\"\n [footer]=\"config?.footer\"\n [loop]=\"config?.loopSteps\"\n></orc-stepper>\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { OrchestratorCoreModule, provideInjectorMap } from '@orchestrator/core';\n\nimport { StepHostComponent } from './step-host/step-host.component';\nimport { Stepper } from './stepper.class';\nimport { StepperHostComponent } from './stepper-host/stepper-host.component';\nimport { StepperComponent } from './stepper/stepper.component';\n\n@NgModule({\n imports: [CommonModule, OrchestratorCoreModule],\n declarations: [StepperHostComponent, StepperComponent, StepHostComponent],\n exports: [\n OrchestratorCoreModule,\n StepperComponent,\n StepperHostComponent,\n StepHostComponent,\n ],\n})\nexport class StepperModule {\n static forRoot(): ModuleWithProviders<StepperModule> {\n return {\n ngModule: StepperModule,\n providers: [\n ...OrchestratorCoreModule.registerComponents([\n StepperHostComponent,\n StepHostComponent,\n ]),\n provideInjectorMap({ Stepper: Stepper as any }),\n ],\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;MAIa,UAAU;IAAvB;QAQE,WAAM,GAA2D,IAAI,CAAC;QAGtE,WAAM,GAA2D,IAAI,CAAC;KACvE;CAAA;AAVC;IADC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAChB;AAGX;IADC,MAAM,EAAE;;wCACK;AAGd;IADC,MAAM,EAAE;;0CAC6D;AAGtE;IADC,MAAM,EAAE;;0CAC6D;;ICC3D,iBAAiB,SAAjB,iBAAiB;EAG7B;oJAHY,iBAAiB;wIAAjB,iBAAiB,iFChB9B,2EACA;ADea,iBAAiB;IAD7B,gBAAgB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;GAC5B,iBAAiB,CAG7B;2FAHY,iBAAiB;kBAP7B,SAAS;+BACE,eAAe,mBAGR,uBAAuB,CAAC,MAAM;8BAKtC,KAAK;sBAAb,KAAK;;;MEhBc,OAAO;;;MCIhB,aAAa;;gJAAb,aAAa;oJAAb,aAAa;AAExB;IADC,MAAM,EAAE;;gDACW;AAGpB;IADC,MAAM,EAAE;;6CAC4C;AAGrD;IADC,MAAM,EAAE;;6CAC4C;2FAR1C,aAAa;kBADzB,UAAU;8BAGT,SAAS,MAGT,MAAM,MAGN,MAAM;;SCJQ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