{"version":3,"file":"orchestrator-core-testing.mjs","sources":["../../../../libs/core/testing/src/dynamic-components.ts","../../../../libs/core/testing/src/orchestrator.module.ts","../../../../libs/core/testing/src/orchestrator-core-testing.ts"],"sourcesContent":["/* eslint-disable @nrwl/nx/enforce-module-boundaries */\nimport {\n  ANALYZE_FOR_ENTRY_COMPONENTS,\n  Component,\n  EventEmitter,\n  Input,\n  Output,\n  Provider,\n} from '@angular/core';\nimport { OrchestratorDynamicComponent } from '@orchestrator/core';\n\n/**\n * In unit tests dynamic components should be registered as in pre-Ivy\n */\nexport function provideDynamicComponents(comps: any): Provider {\n  return {\n    provide: ANALYZE_FOR_ENTRY_COMPONENTS,\n    useValue: comps,\n    multi: true,\n  };\n}\n\n@Component({ selector: 'orc-dyn-base', template: `` })\nexport class DynamicBaseComponent implements OrchestratorDynamicComponent {\n  @Input() items;\n  @Input() config;\n  // eslint-disable-next-line @angular-eslint/no-output-rename\n  @Output('customEvent') customEvt = new EventEmitter<any>();\n}\n\n@Component({\n  selector: 'orc-dyn1-comp',\n  template: `\n    <orc-render-item *ngFor=\"let item of items\" [item]=\"item\"></orc-render-item>\n  `,\n})\nexport class Dynamic1Component extends DynamicBaseComponent {}\n\n@Component({ selector: 'orc-dyn2-comp', template: `` })\nexport class Dynamic2Component extends DynamicBaseComponent {}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport {\n  ComponentRegistry,\n  OrchestratorCoreModule,\n  OrchestratorDynamicComponentType,\n} from '@orchestrator/core';\n\nimport { provideDynamicComponents } from './dynamic-components';\n\n@NgModule({})\nexport class OrchestratorCoreTestingModule {\n  static withComponents(\n    components: ComponentRegistry<OrchestratorDynamicComponentType<any>>,\n  ): ModuleWithProviders<OrchestratorCoreModule> {\n    return {\n      ngModule: OrchestratorCoreModule,\n      providers: [\n        ...OrchestratorCoreModule.withComponents(components).providers,\n        provideDynamicComponents(components),\n      ],\n    };\n  }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAAA;AAWA;;;SAGgB,wBAAwB,CAAC,KAAU;IACjD,OAAO;QACL,OAAO,EAAE,4BAA4B;QACrC,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,IAAI;KACZ,CAAC;AACJ,CAAC;MAGY,oBAAoB;IADjC;;QAKyB,cAAS,GAAG,IAAI,YAAY,EAAO,CAAC;KAC5D;;uJALY,oBAAoB;2IAApB,oBAAoB,yIADgB,EAAE;2FACtC,oBAAoB;kBADhC,SAAS;mBAAC,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAE,EAAE;8BAE1C,KAAK;sBAAb,KAAK;gBACG,MAAM;sBAAd,KAAK;gBAEiB,SAAS;sBAA/B,MAAM;uBAAC,aAAa;;MASV,0BAA0B,oBAAoB;;oJAA9C,iBAAiB;wIAAjB,iBAAiB,4EAJlB;;GAET;2FAEU,iBAAiB;kBAN7B,SAAS;mBAAC;oBACT,QAAQ,EAAE,eAAe;oBACzB,QAAQ,EAAE;;GAET;iBACF;;MAIY,0BAA0B,oBAAoB;;oJAA9C,iBAAiB;wIAAjB,iBAAiB,4EADoB,EAAE;2FACvC,iBAAiB;kBAD7B,SAAS;mBAAC,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE;;;MC5BzC,6BAA6B;IACxC,OAAO,cAAc,CACnB,UAAoE;QAEpE,OAAO;YACL,QAAQ,EAAE,sBAAsB;YAChC,SAAS,EAAE;gBACT,GAAG,sBAAsB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,SAAS;gBAC9D,wBAAwB,CAAC,UAAU,CAAC;aACrC;SACF,CAAC;KACH;;gKAXU,6BAA6B;iKAA7B,6BAA6B;iKAA7B,6BAA6B;2FAA7B,6BAA6B;kBADzC,QAAQ;mBAAC,EAAE;;;ACTZ;;;;;;"}