{"version":3,"file":"c8y-ngx-components-operations-bulk-operations-stepper-container.mjs","sources":["../../operations/bulk-operations-stepper-container/bulk-operations-stepper-container.component.ts","../../operations/bulk-operations-stepper-container/bulk-operations-stepper-container.component.html","../../operations/bulk-operations-stepper-container/bulk-operations-stepper-container.module.ts","../../operations/bulk-operations-stepper-container/c8y-ngx-components-operations-bulk-operations-stepper-container.ts"],"sourcesContent":["import { ChangeDetectorRef, Component, OnInit, ViewChild, ViewContainerRef } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { BulkOperationsService } from '@c8y/ngx-components/operations/bulk-operations-service';\nimport { TitleComponent, C8yTranslatePipe } from '@c8y/ngx-components';\n\n@Component({\n  selector: 'bulk-operations-stepper-container',\n  templateUrl: 'bulk-operations-stepper-container.component.html',\n  imports: [TitleComponent, C8yTranslatePipe]\n})\nexport class BulkOperationsStepperContainerComponent implements OnInit {\n  @ViewChild('container', { static: false, read: ViewContainerRef }) container;\n  bulkOperationType: string;\n\n  private component: any;\n  constructor(\n    private activatedRoute: ActivatedRoute,\n    private bulkOpsService: BulkOperationsService,\n    private changeDetector: ChangeDetectorRef\n  ) {}\n\n  ngOnInit() {\n    this.activatedRoute.params.subscribe(params => {\n      if (params && params.type) {\n        this.bulkOperationType = params.type;\n\n        this.component = this.bulkOpsService\n          .getBulkTypes()\n          .find(element => element.path.includes(this.bulkOperationType)).component;\n\n        this.changeDetector.detectChanges();\n        this.createComponent(this.component);\n      }\n    });\n  }\n\n  private createComponent(component) {\n    if (component) {\n      this.container.createComponent(component);\n    }\n  }\n}\n","<c8y-title>{{ 'Add bulk operation' | translate }}</c8y-title>\n<div class=\"card card--grid--fullpage\">\n  <div class=\"d-contents\">\n    <template #container></template>\n  </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\n\nimport { Route } from '@c8y/ngx-components';\n\nimport { BulkOperationsStepperContainerComponent } from './bulk-operations-stepper-container.component';\n\nexport const bulkOperatioStepperRoutes: Route[] = [\n  {\n    path: 'devicecontrol/bulk/creation/:type',\n    component: BulkOperationsStepperContainerComponent\n  }\n];\n\n/**\n * Container module for the new bulk operation steppers. Use this module in your application\n * to provide a step by step guided process for scheduling of bulk operations.\n * The module reads the bulk operation type from the URL and displays the corresponding stepper.\n * You can provide stepper for your custom bulk operation type by registering it with the\n * HOOK_LIST_BULK_TYPE injection token.\n */\n@NgModule({\n  imports: [\n    RouterModule.forChild(bulkOperatioStepperRoutes),\n    BulkOperationsStepperContainerComponent\n  ]\n})\nexport class BulkOperationsStepperContainerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAUa,uCAAuC,CAAA;AAKlD,IAAA,WAAA,CACU,cAA8B,EAC9B,cAAqC,EACrC,cAAiC,EAAA;QAFjC,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,cAAc,GAAd,cAAc;IACrB;IAEH,QAAQ,GAAA;QACN,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,IAAG;AAC5C,YAAA,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;AACzB,gBAAA,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,IAAI;AAEpC,gBAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;AACnB,qBAAA,YAAY;AACZ,qBAAA,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS;AAE3E,gBAAA,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE;AACnC,gBAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC;YACtC;AACF,QAAA,CAAC,CAAC;IACJ;AAEQ,IAAA,eAAe,CAAC,SAAS,EAAA;QAC/B,IAAI,SAAS,EAAE;AACb,YAAA,IAAI,CAAC,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