@hermes-ui/angular 0.1.7 → 0.2.0

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.
Files changed (108) hide show
  1. package/README.md +6 -6
  2. package/button/_buttons.clarity.scss +80 -2
  3. package/button/_mixins.buttons.scss +44 -2
  4. package/button/_properties.buttons.scss +209 -247
  5. package/button/_variables.buttons.scss +22 -0
  6. package/fesm2022/hermes-ui-angular-accordion.mjs +2 -2
  7. package/fesm2022/hermes-ui-angular-accordion.mjs.map +1 -1
  8. package/fesm2022/hermes-ui-angular-addons-card-container.mjs +3 -3
  9. package/fesm2022/hermes-ui-angular-addons-card-container.mjs.map +1 -1
  10. package/fesm2022/hermes-ui-angular-addons-certificate-viewer.mjs +2 -2
  11. package/fesm2022/hermes-ui-angular-addons-certificate-viewer.mjs.map +1 -1
  12. package/fesm2022/hermes-ui-angular-addons-datagrid-filters.mjs +2 -2
  13. package/fesm2022/hermes-ui-angular-addons-datagrid-filters.mjs.map +1 -1
  14. package/fesm2022/hermes-ui-angular-addons-datagrid.mjs +2 -2
  15. package/fesm2022/hermes-ui-angular-addons-datagrid.mjs.map +1 -1
  16. package/fesm2022/hermes-ui-angular-addons-property-view.mjs +2 -2
  17. package/fesm2022/hermes-ui-angular-addons-property-view.mjs.map +1 -1
  18. package/fesm2022/hermes-ui-angular-addons-theme-builder.mjs +66 -66
  19. package/fesm2022/hermes-ui-angular-addons-theme-builder.mjs.map +1 -1
  20. package/fesm2022/hermes-ui-angular-addons-var.mjs +2 -2
  21. package/fesm2022/hermes-ui-angular-addons-var.mjs.map +1 -1
  22. package/fesm2022/hermes-ui-angular-addons-wizard.mjs +2 -2
  23. package/fesm2022/hermes-ui-angular-addons-wizard.mjs.map +1 -1
  24. package/fesm2022/hermes-ui-angular-button.mjs +2 -2
  25. package/fesm2022/hermes-ui-angular-button.mjs.map +1 -1
  26. package/fesm2022/hermes-ui-angular-data-datagrid.mjs +2 -2
  27. package/fesm2022/hermes-ui-angular-data-datagrid.mjs.map +1 -1
  28. package/fesm2022/hermes-ui-angular-data-stack-view.mjs +2 -2
  29. package/fesm2022/hermes-ui-angular-data-stack-view.mjs.map +1 -1
  30. package/fesm2022/hermes-ui-angular-data-tree-view.mjs +2 -2
  31. package/fesm2022/hermes-ui-angular-data-tree-view.mjs.map +1 -1
  32. package/fesm2022/hermes-ui-angular-emphasis-alert.mjs +2 -2
  33. package/fesm2022/hermes-ui-angular-emphasis-alert.mjs.map +1 -1
  34. package/fesm2022/hermes-ui-angular-forms-checkbox.mjs +2 -2
  35. package/fesm2022/hermes-ui-angular-forms-checkbox.mjs.map +1 -1
  36. package/fesm2022/hermes-ui-angular-forms-combobox.mjs +2 -2
  37. package/fesm2022/hermes-ui-angular-forms-combobox.mjs.map +1 -1
  38. package/fesm2022/hermes-ui-angular-forms-common.mjs +2 -2
  39. package/fesm2022/hermes-ui-angular-forms-common.mjs.map +1 -1
  40. package/fesm2022/hermes-ui-angular-forms-datalist.mjs +2 -2
  41. package/fesm2022/hermes-ui-angular-forms-datalist.mjs.map +1 -1
  42. package/fesm2022/hermes-ui-angular-forms-datepicker.mjs +3 -3
  43. package/fesm2022/hermes-ui-angular-forms-datepicker.mjs.map +1 -1
  44. package/fesm2022/hermes-ui-angular-forms-file-input.mjs +2 -2
  45. package/fesm2022/hermes-ui-angular-forms-file-input.mjs.map +1 -1
  46. package/fesm2022/hermes-ui-angular-forms-input.mjs +2 -2
  47. package/fesm2022/hermes-ui-angular-forms-input.mjs.map +1 -1
  48. package/fesm2022/hermes-ui-angular-forms-native-select.mjs +2 -2
  49. package/fesm2022/hermes-ui-angular-forms-native-select.mjs.map +1 -1
  50. package/fesm2022/hermes-ui-angular-forms-number-input.mjs +2 -2
  51. package/fesm2022/hermes-ui-angular-forms-number-input.mjs.map +1 -1
  52. package/fesm2022/hermes-ui-angular-forms-password.mjs +2 -2
  53. package/fesm2022/hermes-ui-angular-forms-password.mjs.map +1 -1
  54. package/fesm2022/hermes-ui-angular-forms-radio.mjs +2 -2
  55. package/fesm2022/hermes-ui-angular-forms-radio.mjs.map +1 -1
  56. package/fesm2022/hermes-ui-angular-forms-range.mjs +2 -2
  57. package/fesm2022/hermes-ui-angular-forms-range.mjs.map +1 -1
  58. package/fesm2022/hermes-ui-angular-forms-select.mjs +2 -2
  59. package/fesm2022/hermes-ui-angular-forms-select.mjs.map +1 -1
  60. package/fesm2022/hermes-ui-angular-forms-textarea.mjs +2 -2
  61. package/fesm2022/hermes-ui-angular-forms-textarea.mjs.map +1 -1
  62. package/fesm2022/hermes-ui-angular-icon.mjs +29 -29
  63. package/fesm2022/hermes-ui-angular-icon.mjs.map +1 -1
  64. package/fesm2022/hermes-ui-angular-layout-nav.mjs +2 -2
  65. package/fesm2022/hermes-ui-angular-layout-nav.mjs.map +1 -1
  66. package/fesm2022/hermes-ui-angular-layout-tabs.mjs +2 -2
  67. package/fesm2022/hermes-ui-angular-layout-tabs.mjs.map +1 -1
  68. package/fesm2022/hermes-ui-angular-layout-vertical-nav.mjs +382 -28
  69. package/fesm2022/hermes-ui-angular-layout-vertical-nav.mjs.map +1 -1
  70. package/fesm2022/hermes-ui-angular-modal.mjs +2 -2
  71. package/fesm2022/hermes-ui-angular-modal.mjs.map +1 -1
  72. package/fesm2022/hermes-ui-angular-popover-signpost.mjs +2 -2
  73. package/fesm2022/hermes-ui-angular-popover-signpost.mjs.map +1 -1
  74. package/fesm2022/hermes-ui-angular-stepper.mjs +2 -2
  75. package/fesm2022/hermes-ui-angular-stepper.mjs.map +1 -1
  76. package/fesm2022/hermes-ui-angular-timeline.mjs +2 -2
  77. package/fesm2022/hermes-ui-angular-timeline.mjs.map +1 -1
  78. package/fesm2022/hermes-ui-angular-toast.mjs +2 -2
  79. package/fesm2022/hermes-ui-angular-toast.mjs.map +1 -1
  80. package/fesm2022/hermes-ui-angular-utils.mjs +6 -0
  81. package/fesm2022/hermes-ui-angular-utils.mjs.map +1 -1
  82. package/fesm2022/hermes-ui-angular-wizard.mjs +2 -2
  83. package/fesm2022/hermes-ui-angular-wizard.mjs.map +1 -1
  84. package/forms/combobox/_combobox.clarity.scss +18 -4
  85. package/forms/combobox/_properties.combobox.scss +5 -5
  86. package/forms/styles/_input-group.clarity.scss +7 -0
  87. package/forms/styles/_mixins.forms.scss +12 -10
  88. package/forms/styles/_native-select.clarity.scss +17 -5
  89. package/forms/styles/_properties.forms.scss +29 -18
  90. package/forms/styles/_textarea.clarity.scss +4 -4
  91. package/forms/styles/_variables.forms.scss +6 -0
  92. package/layout/main-container/_properties.header.scss +44 -6
  93. package/layout/main-container/_variables.header.scss +11 -0
  94. package/layout/nav/_header.clarity.scss +14 -0
  95. package/layout/nav/_mixins.header.scss +55 -40
  96. package/layout/nav/_responsive-nav.clarity.scss +21 -10
  97. package/layout/vertical-nav/_properties.vertical-nav.scss +77 -27
  98. package/layout/vertical-nav/_variables.vertical-nav.scss +23 -0
  99. package/layout/vertical-nav/_vertical-nav.clarity.scss +418 -277
  100. package/package.json +1 -1
  101. package/types/hermes-ui-angular-addons-theme-builder.d.ts +2 -2
  102. package/types/hermes-ui-angular-addons-theme-builder.d.ts.map +1 -1
  103. package/types/hermes-ui-angular-icon.d.ts +3 -3
  104. package/types/hermes-ui-angular-icon.d.ts.map +1 -1
  105. package/types/hermes-ui-angular-layout-vertical-nav.d.ts +134 -10
  106. package/types/hermes-ui-angular-layout-vertical-nav.d.ts.map +1 -1
  107. package/types/hermes-ui-angular-utils.d.ts +12 -0
  108. package/types/hermes-ui-angular-utils.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"hermes-ui-angular-addons-var.mjs","sources":["../../../addons/var/config/workflow-configuration.service.ts","../../../addons/var/model/resettable-share-replay.ts","../../../addons/var/util/util.ts","../../../addons/var/model/var.ts","../../../addons/var/debug/workflow-model-monitor.component.ts","../../../addons/var/debug/workflow-model-monitor.component.html","../../../addons/var/error/error.component.ts","../../../addons/var/error/error.component.html","../../../addons/var/spinner/spinner.component.ts","../../../addons/var/spinner/spinner.component.html","../../../addons/var/step-container/validation-banner/validation-banner.component.ts","../../../addons/var/step-container/step-container.component.ts","../../../addons/var/step-container/step-container.component.html","../../../addons/var/appfx-workfow-core.module.ts","../../../addons/var/mappings/input-mapping.ts","../../../addons/var/mappings/output-mapping.ts","../../../addons/var/mappings/mappings.ts","../../../addons/var/model/relevance.service.ts","../../../addons/var/model/step-validation-state.ts","../../../addons/var/model/tab-layout.ts","../../../addons/var/model/workflow-model-manager.service.ts","../../../addons/var/index.ts","../../../addons/var/hermes-ui-angular-addons-var.ts"],"sourcesContent":["/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class WorkflowConfigurationService {\r\n private readonly debugLocalStorageKey = 'hermes-addons-var.debug';\r\n private readonly localStorage: LocalStorage | undefined;\r\n private debugValue: boolean;\r\n\r\n constructor() {\r\n this.localStorage = this.getLocalStorage(window);\r\n this.debugValue = this.getData(this.debugLocalStorageKey, false);\r\n }\r\n\r\n get debug(): boolean {\r\n return this.debugValue;\r\n }\r\n set debug(newValue: boolean) {\r\n this.debugValue = newValue;\r\n }\r\n\r\n private getData<T>(key: string, defaultValue: T): T {\r\n if (this.localStorage) {\r\n let data: any = this.localStorage.getItem(key);\r\n if (data) {\r\n data = JSON.parse(data);\r\n return <T>data;\r\n }\r\n }\r\n return defaultValue;\r\n }\r\n\r\n private getLocalStorage(window: any): LocalStorage | undefined {\r\n try {\r\n if (window.localStorage) {\r\n return window.localStorage;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n } catch (_ignored) {\r\n // swallow exception\r\n }\r\n return undefined;\r\n }\r\n}\r\n\r\ninterface LocalStorage {\r\n getItem(key: string): string;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { MonoTypeOperatorFunction, Observable, ReplaySubject, ShareReplayConfig, Subscriber, Subscription } from 'rxjs';\r\n\r\nexport interface ResettableShareReplayConfig extends ShareReplayConfig {\r\n reset: Observable<void>;\r\n}\r\n\r\n/**\r\n * Custom {@link shareReplay} operator that allows the internal {@link ReplaySubject} to be reset.\r\n * The {@link shareReplay} operator works the following way:\r\n *\r\n * Source Observable <-- ReplaySubject <-- Observer(s)\r\n *\r\n * The operator subscribes to the source observable and forwards its next/complete/error to a\r\n * ReplaySubject. All observers subscribe to the ReplaySubject. This way there is only\r\n * subscription to the source and all observers receive the emitted values.\r\n * If refCount = true, when all observers unsubscribe from the ReplaySubject, the operator\r\n * unsubscribes from the source observable.\r\n *\r\n * This operator is enhanced version of the {@link shareReplay} operator. It adds capability\r\n * to \"reset\" the internal ReplaySubject. As a result of this any new subscribers will not\r\n * get the cached values from the internal ReplaySubject, but will wait for the source to emit.\r\n * There is no effect on the existing subscribers. Once the source emits, all observers will\r\n * get the new values.\r\n *\r\n * <b>Usage:</b>\r\n * @example\r\n *\r\n * const source$ = new Subject<number>();\r\n * const reset$ = new Subject<void>();\r\n *\r\n * const value$ = source$.pipe(\r\n * resettableShareReplay({\r\n * bufferSize: 1,\r\n * refCount: true,\r\n * reset: reset$\r\n * })\r\n * );\r\n *\r\n * // First subscription will wait for the source to emit.\r\n * const sub1 = value$.subscribe(value => console.log(\"sub1: \" + value));\r\n *\r\n * // Source emits\r\n * source$.next(1);\r\n *\r\n * // Console: sub1: 1\r\n *\r\n * // The new subscription will get the cached value\r\n * const sub2 = value$.subscribe(value => console.log(\"sub2: \" + value));\r\n * // Console: sub2: 1\r\n *\r\n * // Clear the cache\r\n * reset$.next();\r\n *\r\n * // The new subscription will NOT receive cached value\r\n * const sub3 = value$.subscribe(value => console.log(\"sub3: \" + value));\r\n *\r\n * // Source emits again. All the 3 subscriptions will receive the emitted value.\r\n * source$.next(2);\r\n *\r\n * // Console:\r\n * // sub1: 2\r\n * // sub2: 2\r\n * // sub3: 2\r\n */\r\nexport function resettableShareReplay<T>(config: ResettableShareReplayConfig): MonoTypeOperatorFunction<T> {\r\n return (source: Observable<T>) => source.lift(shareReplayOperator(config));\r\n}\r\n\r\nfunction shareReplayOperator<T>({\r\n bufferSize = Infinity,\r\n windowTime = Infinity,\r\n refCount: useRefCount,\r\n scheduler,\r\n reset: onReset,\r\n}: ResettableShareReplayConfig) {\r\n let subject: ReplaySubject<T> | undefined;\r\n let refCount = 0;\r\n let subscription: Subscription | undefined;\r\n let resetSubscription: Subscription | undefined;\r\n let hasError = false;\r\n\r\n return function shareReplayOperation(this: Subscriber<T>, source: Observable<T>) {\r\n refCount++;\r\n if (!subject || hasError) {\r\n resetSubscription = onReset.subscribe(() => {\r\n if (subject) {\r\n // Remove existing observers, if any.\r\n subject.unsubscribe();\r\n }\r\n subject = new ReplaySubject<T>(bufferSize, windowTime, scheduler);\r\n });\r\n\r\n hasError = false;\r\n subject = new ReplaySubject<T>(bufferSize, windowTime, scheduler);\r\n subscription = source.subscribe({\r\n next(value) {\r\n subject?.next(value);\r\n },\r\n error(err: unknown) {\r\n hasError = true;\r\n subject?.error(err);\r\n },\r\n complete() {\r\n subscription = undefined;\r\n subject?.complete();\r\n },\r\n });\r\n }\r\n\r\n let innerSub: Subscription | undefined = subject.subscribe(this);\r\n const resetSub = onReset.subscribe(() => {\r\n // Subscribe to the new 'subject'. 'subject' is always defined at this point\r\n innerSub = subject?.subscribe(this);\r\n });\r\n\r\n this.add(() => {\r\n refCount--;\r\n innerSub?.unsubscribe();\r\n resetSub.unsubscribe();\r\n\r\n if (subscription && useRefCount && refCount === 0) {\r\n subscription.unsubscribe();\r\n subscription = undefined;\r\n subject = undefined;\r\n resetSubscription?.unsubscribe();\r\n resetSubscription = undefined;\r\n }\r\n });\r\n };\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { ActivationError } from '../error/interfaces';\r\n\r\nexport const stringify = (value: any, propertyName = ''): string | undefined => {\r\n try {\r\n return JSON.stringify(value);\r\n } catch (e) {\r\n console.warn(`Cannot stringify property: ${propertyName}`, value, e);\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const parse = (value: any, propertyName = ''): any => {\r\n if (value) {\r\n try {\r\n return JSON.parse(value);\r\n } catch (e) {\r\n console.warn(`Cannot parse property: ${propertyName}`, value, e);\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const formatError = (error: any): ActivationError => {\r\n if (typeof error === 'object') {\r\n // if error is from http call, this is mostly the case\r\n if (error.data?.message) {\r\n return error;\r\n }\r\n\r\n // if error is a backend response of vapi type\r\n if (error.messages?.length) {\r\n return handleVapiErrorMessages(error.messages);\r\n }\r\n if (error.info?.messages?.length) {\r\n return handleVapiErrorMessages(error.info.messages);\r\n }\r\n\r\n // if error is thrown like throwError(new Error(\"error message\"))\r\n if (error.message) {\r\n return {\r\n data: {\r\n message: error.message,\r\n stackTrace: error.stack,\r\n },\r\n };\r\n }\r\n }\r\n // if error is thrown like throwError(\"error message\")\r\n if (typeof error === 'string') {\r\n return {\r\n data: {\r\n message: error,\r\n },\r\n };\r\n }\r\n // Stringify the object. That is the default formatting when all other options are exhausted.\r\n return {\r\n data: {\r\n message: stringify(error),\r\n },\r\n };\r\n};\r\n\r\nconst handleVapiErrorMessages = (messages: any[]): ActivationError => {\r\n return {\r\n data: {\r\n message: messages.map((message: any) => message?.localized || message.defaultMessage).join('\\n'),\r\n },\r\n };\r\n};\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { combineLatest, Observable, of, ReplaySubject, Subject, throwError } from 'rxjs';\r\nimport { catchError, shareReplay, switchMap, tap } from 'rxjs/operators';\r\n\r\nimport { resettableShareReplay } from './resettable-share-replay';\r\nimport {\r\n From0DepReturnSchema,\r\n From1DepReturnSchema,\r\n From2DepReturnSchema,\r\n From3DepReturnSchema,\r\n From4DepReturnSchema,\r\n From5DepReturnSchema,\r\n FromMultiDepReturnSchema,\r\n} from './var-builder-api';\r\nimport { stringify } from '../util/util';\r\n\r\n/**\r\n * Workflow variable used to define properties in the workflow model.\r\n *\r\n * <h2>Use Cases</h2>\r\n * This class is designed for the following use cases:\r\n * <ol>\r\n * <li>Create variable, that wraps generic data type. Use cases:\r\n * <ul>\r\n * <li>Pass a value as dependency to other workflow variables. When a new value is\r\n * set, the dependent variable will be reevaluated.\r\n * <li>[Future] Define mapping between workflow and step model variables.\r\n * <li>[Future] Output step model values in a reactive manner.\r\n * </ul>\r\n * @see {@link Var.of}\r\n *\r\n * <li>Create variable, that can depend on other {@link Var}s. Use cases:\r\n * <ul>\r\n * <li>Invoke async function to retrieve data.\r\n * <li>Transform the result of another {@link Var}.\r\n * <li>Extract a property of another {@link Var}.\r\n * <li>[Future] Use the result of one {@link Var} as initial value of another.\r\n * </ul>\r\n * @see {@link Var.from}\r\n * </ol>\r\n *\r\n * <h2>Using Var for Data Retrieval</h2>\r\n *\r\n * The main use case of this class is to move the data request outside of the step component.\r\n * This gives the following benefits:\r\n * - Component will not deal with asynchronous data; it will be pre-computed and injected\r\n * - Increased re-usability of steps\r\n * - Loading indicator comes for free.\r\n * - Default error handling\r\n * - Caching of calculated values and re-calculating when necessary\r\n *\r\n * <h2>Step Model Mapping</h2>\r\n *\r\n * <b>Step model property</b> can reference workflow {@link Var} property using\r\n * <code>@InputMapping</code> and <code>@OutputMapping</code> decorators.\r\n * Mapped step model property should be of type \"T\".\r\n *\r\n * <h2>Examples:</h2>\r\n *\r\n * @example Create new variable without initial value\r\n * const v1: Var<string> = Var.of();\r\n *\r\n *\r\n * @example Create new variable with initial value\r\n * const v2: Var<string> = Var.of(\"hello\");\r\n *\r\n *\r\n * @example Data Retrieval\r\n * // \"portGroupInfo\" depends on \"hostId\"\r\n * this.model.portGroupInfo = Var.from(this.model.hostId).by(\r\n * (hostId: string) => {\r\n * // Note that \"hostId\" is \"this.model.hostId.value\", pre-calculated if it is ComputedVar.\r\n * return <Observable<HostStandardSwitchData>>this.dataService.getData$(hostId, PG_INFO_PROP);\r\n * }\r\n * );\r\n *\r\n *\r\n * @example Created computed property without any dependencies\r\n * const c1: Var<number> = Var.from().by(() => of(42));\r\n *\r\n *\r\n * @example Create computed property with dependencies\r\n * const c2: Var<string> = Var.from(c1, v2).by(\r\n * (c1Val, c2Val) => of(`Result: ${c1Val} ${c2Val}`));\r\n *\r\n *\r\n * @example Transform another Var value\r\n * // Invoke transformation function on \"c2\" result.\r\n * const c3: Var<number> = Var.from(c2).by((c2Val: string) => of(c2Val.length + 3));\r\n *\r\n *\r\n * @example Extract single property from another var\r\n * const v3 = Var.of({ name: \"dummy\", value: true });\r\n *\r\n * const p1: Var<string> = Var.from(v3).pluck(\"name\");\r\n * const p2: Var<boolean> = Var.from(v3).pluck(\"value\");\r\n *\r\n * // There is a compile-time check for the specified property name.\r\n * Var.from(v3).pluck(\"non_existing_property_name\"); // compile time error\r\n *\r\n *\r\n * @example Mapping step model property to workflow model Var\r\n * class MyWizardModel {\r\n * readonly vlanIds: Var<number[]> = Var.of();\r\n * }\r\n *\r\n * // First step outputs selected vLANs\r\n * class Step1Model {\r\n * @OutputMapping({propertyName=\"vlanIds\"})\r\n * vlanIds: number[];\r\n * }\r\n *\r\n * // Second step uses the selected vLANs form the first step\r\n * class Step2Model {\r\n * @InputMapping({propertyName=\"vlanIds\"})\r\n * vlanIds: number[];\r\n * }\r\n */\r\nexport abstract class Var<T> {\r\n #value: T;\r\n\r\n protected constructor() {\r\n // no action\r\n }\r\n\r\n /**\r\n * Value of the variable. It can be undefined\r\n */\r\n get value(): T {\r\n return this.#value;\r\n }\r\n set value(newValue: T) {\r\n this.#value = newValue;\r\n this.onSetValue(newValue);\r\n }\r\n\r\n /**\r\n * Create a variable, that wraps generic data type.\r\n * @param initialValue Initial value of the {@link value} property.\r\n */\r\n static of<U>(initialValue?: U): Var<U> {\r\n const result: Var<U> = <Var<U>>new SimpleVar<U>();\r\n if (initialValue !== undefined) {\r\n result.value = initialValue;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Create a variable by applying a transition function simultaneously on zero or more\r\n * {@link Var} results. Created Var maintains a dependency chain with the Vars, it is\r\n * built from. If any of the dependent variables is changed, the transition function\r\n * will be re-evaluated. The orchestration of when this happens is done in\r\n * WorkflowModelManager.\r\n */\r\n static from(): From0DepReturnSchema;\r\n static from<D1>(dep: Var<D1>): From1DepReturnSchema<D1>;\r\n static from<D1, D2>(dep1: Var<D1>, dep2: Var<D2>): From2DepReturnSchema<D1, D2>;\r\n static from<D1, D2, D3>(dep1: Var<D1>, dep2: Var<D2>, dep3: Var<D3>): From3DepReturnSchema<D1, D2, D3>;\r\n static from<D1, D2, D3, D4>(\r\n dep1: Var<D1>,\r\n dep2: Var<D2>,\r\n dep3: Var<D3>,\r\n dep4: Var<D4>\r\n ): From4DepReturnSchema<D1, D2, D3, D4>;\r\n static from<D1, D2, D3, D4, D5>(\r\n dep1: Var<D1>,\r\n dep2: Var<D2>,\r\n dep3: Var<D3>,\r\n dep4: Var<D4>,\r\n dep5: Var<D5>\r\n ): From5DepReturnSchema<D1, D2, D3, D4, D5>;\r\n static from(...deps: Var<any>[]): FromMultiDepReturnSchema;\r\n static from(...deps: Var<any>[]): any {\r\n function fromApi(strategy: ComputeStrategy) {\r\n return {\r\n by<U>(fn: (...depValues: any[]) => Observable<U>): Var<U> {\r\n return <Var<U>>new ComputedVar<U>({\r\n dependsOn: deps,\r\n computeFn: fn,\r\n strategy: strategy,\r\n });\r\n },\r\n\r\n pluck<U>(propName: string): Var<U> {\r\n return <Var<U>>new ComputedVar<U>({\r\n dependsOn: deps,\r\n computeFn: (depValue: any) => of(depValue[propName]),\r\n strategy: strategy,\r\n });\r\n },\r\n };\r\n }\r\n\r\n return {\r\n ...fromApi(ComputeStrategy.lazy),\r\n withEagerEval: () => fromApi(ComputeStrategy.eager),\r\n withLazyEval: () => fromApi(ComputeStrategy.lazy),\r\n };\r\n }\r\n\r\n /**\r\n * Hook that is invoked when {@link value} setter is invoked. This is necessary, because\r\n * of TS issue with overriding property setters - setting the protected \"this._value\"\r\n * in a descendant class is breaking the {@link value} getter - it will always return\r\n * undefined. The TS issue is fixed in newer versions.\r\n */\r\n protected abstract onSetValue(newValue: T): void;\r\n}\r\n\r\nexport class SimpleVar<T> extends Var<T> {\r\n private static count = 0;\r\n\r\n /**\r\n * Workflow property name. Used only for troubleshooting.\r\n * Set by WorkflowModelManager.\r\n */\r\n name: string;\r\n\r\n private lastValueStr: string | undefined;\r\n\r\n #value$: Observable<T> = new ReplaySubject<T>(1);\r\n #isSet = false;\r\n\r\n constructor() {\r\n super();\r\n this.name = 'simpleVar' + SimpleVar.count++;\r\n }\r\n\r\n /**\r\n * Observable that emits every time when {@link value} property is set.\r\n */\r\n get value$(): Observable<T> {\r\n return this.#value$;\r\n }\r\n\r\n /**\r\n * Whether the value is set.\r\n * If initial value is undefined (e.g. Var.of(undefined)), this will return false.\r\n * Undefined can be set only through the {@link value} setter.\r\n */\r\n get isSet(): boolean {\r\n return this.#isSet;\r\n }\r\n\r\n /**\r\n * When {@link value} is updated without calling setter i.e., nested object of value is updated\r\n * {@link value$} does not emit updated value, call this method to emit {@link value$} with updated {@link value}\r\n */\r\n updateValueIfDirty(): void {\r\n if (this.lastValueStr !== stringify(this.value)) {\r\n this.onSetValue(this.value);\r\n }\r\n }\r\n\r\n protected onSetValue(newValue: T): void {\r\n this.#isSet = true;\r\n this.lastValueStr = stringify(newValue);\r\n (<ReplaySubject<T>>this.#value$).next(newValue);\r\n }\r\n}\r\n\r\n/**\r\n * Parameters of the {@link ComputedVar} constructor.\r\n */\r\nexport interface ComputedVarSchema<T> {\r\n /**\r\n * Properties, on which this computed property depends.\r\n * These are other workflow model properties, necessary to calculate this one.\r\n * Dependency values (i.e. {@link Var.value}) are passed to \"computeFn\"\r\n * as input parameters in the same order as they are defined here.\r\n *\r\n * Dependencies can be of type {@link ComputedVar}. This will create property\r\n * chain that will be executed whenever necessary.\r\n */\r\n dependsOn: Var<any>[];\r\n\r\n /**\r\n * Function that will calculate the value of the property based on its dependencies.\r\n *\r\n * @param dependencyValues\r\n * <b>Values</b> (i.e. {@link Var.value}) of the defined dependent\r\n * properties, passed in the same order.\r\n */\r\n computeFn: (...depValues: any[]) => Observable<T>;\r\n\r\n /**\r\n * Strategy for executing the {@link computeFn}. Implementation of the strategies is\r\n * in the WorkflowModelManager class.\r\n *\r\n * @default ComputeStrategy.lazy\r\n */\r\n strategy?: ComputeStrategy;\r\n}\r\n\r\n/**\r\n * Types of strategies that are available for a {@link ComputedVar}.\r\n * Implementation of the strategies is in the WorkflowModelManager class.\r\n */\r\nexport enum ComputeStrategy {\r\n /**\r\n * Invoke the {@link ComputedVarSchema.computeFn} as soon as its dependencies are populated.\r\n */\r\n eager = 'eager',\r\n\r\n /**\r\n * Invoke the {@link ComputedVarSchema.computeFn} on navigation to a step that has an\r\n * <code>@InputMapping</code> to the workflow Var.\r\n */\r\n lazy = 'lazy',\r\n}\r\n\r\n/**\r\n * Workflow variable that is calculated using user-defined function.\r\n * Optionally the property can depend on other properties of type {@link SimpleVar}\r\n * or {@link ComputedVar}. Dependency values (i.e. {@link Var#value})\r\n * are passed to \"computeFn\" as input parameters. \"computeFn\" must use only these input\r\n * parameters to do its business and must not access directly other model variables\r\n * (using closure).\r\n *\r\n * Computed property is executed once on {@link ComputedVar.value$} subscription and its\r\n * result is cached. It will be re-calculated if its dependencies are changed.\r\n */\r\nexport class ComputedVar<T> extends Var<T> {\r\n private static count = 0;\r\n\r\n /**\r\n * Workflow property name. Used only for troubleshooting.\r\n * Set by WorkflowModelManager.\r\n */\r\n name: string;\r\n\r\n private lastDependencyValues: string | undefined;\r\n private isLastComputationSuccessful = false;\r\n #value$: Observable<T>;\r\n\r\n constructor(private config: ComputedVarSchema<T>) {\r\n super();\r\n this.name = 'computedVar' + ComputedVar.count++;\r\n this.validateArguments(config);\r\n this.setDefaults(config);\r\n this.initValue();\r\n }\r\n\r\n /**\r\n * Subscription to this observable triggers the calculation of compute function.\r\n */\r\n get value$(): Observable<T> {\r\n return this.#value$;\r\n }\r\n\r\n /**\r\n * Return the {@link ComputeStrategy|strategy} that will be used to evaluate the\r\n * compute function.\r\n */\r\n get strategy(): ComputeStrategy {\r\n return this.config.strategy as ComputeStrategy;\r\n }\r\n\r\n /**\r\n * Return boolean whether the dependencies are satisfied for the compute function\r\n */\r\n get areDependenciesSatisfied(): boolean {\r\n const computedVarDependencySatisfied = this.config.dependsOn\r\n .filter((flowVar: Var<any>) => {\r\n return flowVar instanceof ComputedVar;\r\n })\r\n .every(curr => (<ComputedVar<any>>curr).areDependenciesSatisfied);\r\n const simpleVarDependencySatisfied = this.config.dependsOn\r\n .filter((flowVar: Var<any>) => {\r\n return flowVar instanceof SimpleVar;\r\n })\r\n .every(curr => (<SimpleVar<any>>curr).isSet);\r\n return computedVarDependencySatisfied && simpleVarDependencySatisfied;\r\n }\r\n\r\n /**\r\n * Returns the list of property names that have unsatisfied dependencies\r\n */\r\n get unsatisfiedDependencies(): string[] {\r\n const unsatisfiedDependencies: string[] = [];\r\n this.config.dependsOn.forEach(flowVar => {\r\n if (flowVar instanceof SimpleVar && !flowVar.isSet) {\r\n unsatisfiedDependencies.push(flowVar.name);\r\n } else if (flowVar instanceof ComputedVar && !flowVar.areDependenciesSatisfied) {\r\n unsatisfiedDependencies.push(flowVar.name);\r\n } else {\r\n // no action\r\n }\r\n });\r\n return unsatisfiedDependencies;\r\n }\r\n\r\n protected onSetValue(): void {}\r\n\r\n private validateArguments(arg: ComputedVarSchema<T>): void {\r\n arg.dependsOn.forEach((dependency: Var<any>, index: number) => {\r\n if (!dependency) {\r\n throw new Error(`${name}: Dependency is null or undefined at dependsOn[${index}]`);\r\n }\r\n });\r\n }\r\n\r\n private setDefaults(config: ComputedVarSchema<T>): void {\r\n config.strategy = config.strategy || ComputeStrategy.lazy;\r\n }\r\n\r\n /**\r\n * Initialize {@link _value} field.\r\n */\r\n private initValue(): void {\r\n const depValues$: Observable<any>[] = this.extractDependencyValues$();\r\n this.#value$ = depValues$.length\r\n ? this.initValueFromDependencies(depValues$)\r\n : this.config.computeFn().pipe(\r\n tap((fnResult: T) => {\r\n this.value = fnResult;\r\n }),\r\n // Execute \"computeFn\" only on first subscription. Subsequent subscriptions\r\n // will get the cached value.\r\n shareReplay(1)\r\n );\r\n }\r\n\r\n private initValueFromDependencies(depValues$: Observable<any>[]): Observable<T> {\r\n const reset$ = new Subject<void>();\r\n return combineLatest(depValues$).pipe(\r\n switchMap((depValues: any[]) => {\r\n let depValuesChanged = true;\r\n const depValuesStr = stringify(depValues);\r\n if (depValuesStr !== undefined) {\r\n if (depValues?.length && this.lastDependencyValues === depValuesStr) {\r\n depValuesChanged = false;\r\n }\r\n } else {\r\n console.warn(\r\n 'Can not detect if dependencies have changed for Var ' + this.name + '. Assume they have changed!'\r\n );\r\n }\r\n\r\n if (!this.isLastComputationSuccessful || depValuesChanged) {\r\n // Do not reset if there is no computed value yet.\r\n if (this.lastDependencyValues) {\r\n // Reset the ReplaySubject in 'resettableShareReplay'. Subscribers\r\n // will no longer get the cached value. They will be subscribed to the\r\n // new ReplaySubject, that will emit once the 'computeFn' finishes.\r\n reset$.next();\r\n }\r\n\r\n return this.config.computeFn(...depValues).pipe(\r\n tap((fnResult: T) => {\r\n this.lastDependencyValues = depValuesStr;\r\n this.isLastComputationSuccessful = true;\r\n this.value = fnResult;\r\n }),\r\n catchError((e: unknown) => {\r\n this.isLastComputationSuccessful = false;\r\n return throwError(() => e);\r\n })\r\n );\r\n }\r\n return of(this.value);\r\n }),\r\n resettableShareReplay({\r\n bufferSize: 1,\r\n // When subscriptions count reaches zero, unsubscribe from source.\r\n // The next subscription will subscribe again and will NOT reply the last value.\r\n refCount: true,\r\n reset: reset$,\r\n })\r\n );\r\n }\r\n\r\n private extractDependencyValues$(): Observable<any>[] {\r\n return this.config.dependsOn.map((flowVar: Var<any>) => {\r\n if (flowVar instanceof ComputedVar) {\r\n return flowVar.value$;\r\n } else if (flowVar instanceof SimpleVar) {\r\n return flowVar.value$;\r\n } else {\r\n // Developer error.\r\n throw new Error('Unsupported Var descendant');\r\n }\r\n });\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { HermesPopoverContent } from '@hermes-ui/angular/popover/common';\r\nimport { Subscription } from 'rxjs';\r\nimport { bufferTime, map } from 'rxjs/operators';\r\n\r\nimport { ComputedVar, SimpleVar } from '../model/var';\r\nimport { ModelChange, StepWithChanges, WorkflowModelManager } from '../model/workflow-model-manager.service';\r\n\r\n/**\r\n * Render given workflow model in a Clarity signpost.\r\n * Values, changed in the current step are marked in different color.\r\n * On next step, changed properties are reset.\r\n */\r\n@Component({\r\n selector: 'appfx-model-popup',\r\n standalone: false,\r\n templateUrl: 'workflow-model-monitor.component.html',\r\n styleUrls: ['workflow-model-monitor.component.scss'],\r\n})\r\nexport class WorkflowModelMonitorComponent implements OnInit, OnDestroy {\r\n @Input() modelMgr: WorkflowModelManager;\r\n\r\n isOpen = false;\r\n debugModel: NameValue[] = [];\r\n\r\n private subscriptions: Subscription = new Subscription();\r\n\r\n @ViewChild(HermesPopoverContent)\r\n set popoverContent(popoverContent: HermesPopoverContent) {\r\n if (popoverContent) {\r\n popoverContent.outsideClickClose = false;\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.bindModelChangeListeners();\r\n this.bindStepChangeListeners();\r\n this.initDebugModel();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscriptions.unsubscribe();\r\n }\r\n\r\n private bindModelChangeListeners(): void {\r\n this.subscriptions.add(\r\n // There could be a burst of onModelChange$ events on the same property\r\n // which can cause ExpressionChangedAfterItHasBeenCheckedError\r\n // use buffer time of 100ms\r\n this.modelMgr.onModelChange$\r\n .pipe(\r\n bufferTime(100),\r\n map(changes => ([] as ModelChange[]).concat(...changes)) // flatten the array\r\n )\r\n .subscribe(changes => this.updateDebugModel(changes))\r\n );\r\n }\r\n\r\n private bindStepChangeListeners(): void {\r\n this.subscriptions.add(\r\n this.modelMgr.onStepChange$.subscribe((value: StepWithChanges) => {\r\n this.resetDebugModel();\r\n this.updateDebugModel(value.changes);\r\n })\r\n );\r\n }\r\n\r\n private updateDebugModel(changes: ModelChange[]): void {\r\n if (!this.modelMgr.model) {\r\n return;\r\n }\r\n\r\n for (const change of changes) {\r\n const propertyModelValue = (this.modelMgr.model as any)[change.propertyName];\r\n const nameValue = this.getPropertyNameValue(change.propertyName, propertyModelValue);\r\n const existing = this.debugModel.find(value => value.name === change.propertyName);\r\n if (!nameValue) {\r\n // The property is a function. Ignore it.\r\n continue;\r\n }\r\n\r\n if (existing) {\r\n existing.value = nameValue.value;\r\n existing.changed = true;\r\n } else {\r\n nameValue.changed = true;\r\n this.debugModel.push(nameValue);\r\n // Sort model properties alphabetically.\r\n this.debugModel.sort((a: NameValue, b: NameValue) => a.name.localeCompare(b.name));\r\n }\r\n }\r\n }\r\n\r\n private initDebugModel(): void {\r\n this.debugModel = [];\r\n if (!this.modelMgr.model) {\r\n return;\r\n }\r\n\r\n for (const [name, value] of Object.entries(this.modelMgr.model)) {\r\n const nameValue = this.getPropertyNameValue(name, value);\r\n if (nameValue) {\r\n this.debugModel.push(nameValue);\r\n }\r\n }\r\n\r\n // Sort model properties alphabetically.\r\n this.debugModel.sort((a: NameValue, b: NameValue) => a.name.localeCompare(b.name));\r\n }\r\n\r\n private resetDebugModel(): void {\r\n for (const entry of this.debugModel) {\r\n entry.changed = false;\r\n }\r\n }\r\n\r\n private getPropertyNameValue(name: string, value: any): NameValue | null {\r\n let propValue = value;\r\n let strValue = '';\r\n let isComputedVar = false;\r\n let isSimpleVar = false;\r\n\r\n if (value instanceof ComputedVar) {\r\n const varValue = <ComputedVar<any>>value;\r\n propValue = varValue.value;\r\n isComputedVar = true;\r\n } else if (value instanceof SimpleVar) {\r\n const varValue = <SimpleVar<any>>value;\r\n propValue = varValue.value;\r\n isSimpleVar = true;\r\n } else {\r\n throw new Error('Unsupported step type: ' + value);\r\n }\r\n\r\n if (typeof propValue === 'object') {\r\n try {\r\n strValue = JSON.stringify(propValue);\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n } catch (_ignored) {\r\n console.warn(`Cannot stringify workflow property ${name}`);\r\n strValue = '{object}';\r\n }\r\n } else if (typeof propValue === 'function') {\r\n return null;\r\n } else {\r\n strValue = propValue + '';\r\n }\r\n\r\n return {\r\n name: name,\r\n value: strValue,\r\n computedVar: isComputedVar,\r\n simpleVar: isSimpleVar,\r\n changed: false,\r\n };\r\n }\r\n}\r\n\r\ninterface NameValue {\r\n name: string;\r\n value: string;\r\n computedVar: boolean;\r\n simpleVar: boolean;\r\n changed: boolean;\r\n}\r\n","<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n\r\n<hermes-signpost>\r\n <ng-template [(hermesIfOpen)]=\"isOpen\">\r\n <hermes-signpost-content #signpostContent hermesPosition=\"left-bottom\">\r\n <h4 class=\"title\">Workflow Model</h4>\r\n\r\n <div *ngFor=\"let prop of debugModel\" class=\"hermes-row hermes-flex-nowrap\">\r\n <div class=\"hermes-col-7\">\r\n <h6\r\n class=\"prop-name text-truncate\"\r\n title=\"{{ prop.name }}\"\r\n [class.simple-var]=\"prop.simpleVar\"\r\n [class.computed-var]=\"prop.computedVar\"\r\n >\r\n {{ prop.name }}\r\n </h6>\r\n </div>\r\n <div class=\"hermes-col-5\">\r\n <h6 class=\"prop-value text-truncate\" title=\"{{ prop.value }}\" [class.prop-changed]=\"prop.changed\">\r\n {{ prop.value }}\r\n </h6>\r\n </div>\r\n </div>\r\n </hermes-signpost-content>\r\n </ng-template>\r\n</hermes-signpost>\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { WorkflowStrings } from '@hermes-ui/angular/addons/workflow/strings';\r\n\r\nimport { ActivationError } from './interfaces';\r\n\r\n@Component({\r\n selector: 'appfx-error',\r\n standalone: false,\r\n templateUrl: 'error.component.html',\r\n styleUrls: ['error.component.scss'],\r\n})\r\nexport class ErrorComponent {\r\n @Input() error?: ActivationError;\r\n\r\n @Output() onRetry: EventEmitter<any> = new EventEmitter();\r\n\r\n constructor(public workflowStrings: WorkflowStrings) {}\r\n\r\n retry() {\r\n this.onRetry.emit();\r\n }\r\n}\r\n","<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<div class=\"hermes-row\">\r\n <div class=\"hermes-col-12\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <hermes-icon shape=\"exclamation-circle\" solid status=\"danger\" size=\"36\"></hermes-icon>\r\n <span>{{ workflowStrings.error.title }}</span>\r\n </div>\r\n <div class=\"card-block\">\r\n <div>{{ workflowStrings.error.description }}</div>\r\n <hermes-stack-view class=\"hermes-component mt-1\">\r\n <hermes-stack-block [hermesStackViewLevel]=\"1\">\r\n <hermes-stack-label>{{ workflowStrings.error.details }}</hermes-stack-label>\r\n <hermes-stack-block [hermesStackViewLevel]=\"2\" class=\"error-details-block\">\r\n <hermes-stack-content>\r\n <span>{{ error?.data?.message }}</span>\r\n <div *ngIf=\"error?.data?.stackTrace\" class=\"stack-trace mt-1\">\r\n {{ error?.data?.stackTrace }}\r\n </div>\r\n </hermes-stack-content>\r\n </hermes-stack-block>\r\n </hermes-stack-block>\r\n </hermes-stack-view>\r\n </div>\r\n <div class=\"card-footer text-right\">\r\n <button class=\"btn btn-primary\" (click)=\"retry()\">\r\n <hermes-icon shape=\"refresh\"></hermes-icon>{{ workflowStrings.error.retry }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'appfx-spinner',\r\n standalone: false,\r\n templateUrl: 'spinner.component.html',\r\n styleUrls: ['spinner.component.scss'],\r\n})\r\nexport class SpinnerComponent {\r\n /**\r\n * String that should be announced\r\n */\r\n @Input() message: string;\r\n\r\n /**\r\n * Politeness when announcing, This could be 'polite', 'assertive' or 'off'\r\n * @default 'assertive'\r\n */\r\n @Input() politeness: 'assertive' | 'polite' | 'off' = 'assertive';\r\n\r\n /**\r\n * Modal content has its own container (the modal), so that overlay spinner is already within its scope.\r\n * Specify \"false\" for non-modal cases to contain the overlay spinner within desired scope and not whole page.\r\n * @default 'true'\r\n */\r\n @Input() isModal = true;\r\n\r\n /**\r\n * Optional message to be shown below the spinner. It can be used to\r\n * report progress details.\r\n */\r\n @Input() progressDetails: string;\r\n\r\n /**\r\n * Optional flag, when set to true an Action button will be rendered below the spinner and\r\n * the progress details text. For example, this can be used to render a \"cancel\" button\r\n * below the spinner.\r\n */\r\n @Input() showActionButton: boolean;\r\n\r\n /**\r\n * The label of the action button. Applicable only when showActionButton is set to True.\r\n */\r\n @Input() actionButtonLabel: string;\r\n\r\n /**\r\n * Emits when the action button is clicked.\r\n */\r\n @Output() actionClick: EventEmitter<void> = new EventEmitter();\r\n\r\n invokeAction(): void {\r\n this.actionClick.next();\r\n }\r\n}\r\n","<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<section class=\"overlay-spinner\" *ngIf=\"!isModal; else spinner\">\r\n <ng-template [ngTemplateOutlet]=\"spinner\"></ng-template>\r\n</section>\r\n\r\n<ng-template #spinner>\r\n <hermes-spinner>\r\n {{ message }}\r\n </hermes-spinner>\r\n <span [attr.aria-live]=\"politeness\" class=\"hermes-sr-only\">\r\n {{ message }}\r\n </span>\r\n\r\n <span *ngIf=\"progressDetails\" class=\"progress-item\" aria-live=\"polite\">\r\n {{ progressDetails }}\r\n </span>\r\n\r\n <button *ngIf=\"showActionButton\" class=\"btn btn-link btn-sm\" (click)=\"invokeAction()\">\r\n {{ actionButtonLabel }}\r\n </button>\r\n</ng-template>\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, Input } from '@angular/core';\r\n\r\nimport { StepValidationState } from '../../model/step-validation-state';\r\n\r\n@Component({\r\n selector: 'appfx-validation-banner-internal',\r\n standalone: false,\r\n template: ` <hermes-alert\r\n role=\"alert\"\r\n aria-live=\"polite\"\r\n [hermesAlertType]=\"type\"\r\n *ngIf=\"items?.length\"\r\n [hermesAlertClosable]=\"closable\"\r\n [(hermesAlertClosed)]=\"closed\"\r\n >\r\n <hermes-alert-item *ngFor=\"let item of items\">\r\n <span class=\"alert-text\" [textContent]=\"item\"></span>\r\n </hermes-alert-item>\r\n </hermes-alert>`,\r\n})\r\nexport class ValidationBannerInternalComponent {\r\n @Input() type: string;\r\n\r\n @Input() closable = true;\r\n\r\n @Input() closed = false;\r\n\r\n #items: string[] = [];\r\n\r\n get items(): string[] {\r\n return this.#items;\r\n }\r\n\r\n @Input()\r\n set items(value: string[]) {\r\n this.#items = value;\r\n\r\n // every time we get new items - were remove closed state and become visible again\r\n this.closed = false;\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'appfx-validation-banner',\r\n standalone: false,\r\n template: `\r\n <appfx-validation-banner-internal\r\n *ngIf=\"state && state.errors?.length\"\r\n [items]=\"state.errors\"\r\n [type]=\"'danger'\"\r\n [closable]=\"closable\"\r\n [closed]=\"closed\"\r\n ></appfx-validation-banner-internal>\r\n <appfx-validation-banner-internal\r\n *ngIf=\"state && state.warnings?.length\"\r\n [items]=\"state.warnings\"\r\n [type]=\"'warning'\"\r\n [closable]=\"closable\"\r\n [closed]=\"closed\"\r\n ></appfx-validation-banner-internal>\r\n <appfx-validation-banner-internal\r\n *ngIf=\"state && state.infos?.length\"\r\n [items]=\"state.infos\"\r\n [type]=\"'info'\"\r\n [closable]=\"closable\"\r\n [closed]=\"closed\"\r\n ></appfx-validation-banner-internal>\r\n `,\r\n styles: [\r\n `\r\n :host {\r\n display: block;\r\n margin-bottom: var(--hermes-global-space-4);\r\n }\r\n `,\r\n ],\r\n})\r\nexport class ValidationBannerComponent {\r\n @Input() state?: StepValidationState;\r\n\r\n @Input() closable = true;\r\n\r\n get closed() {\r\n return !this.state || this.state.isEmpty();\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, ViewContainerRef } from '@angular/core';\r\nimport { Observable, of, Subscription } from 'rxjs';\r\nimport { map, take } from 'rxjs/operators';\r\n\r\nimport { ErrorComponent } from '../error/error.component';\r\nimport { ActivationError } from '../error/interfaces';\r\nimport { StepInternal } from '../model/step';\r\nimport { ModelChanges } from '../model/step-interfaces';\r\nimport { StepModel } from '../model/step.model';\r\n\r\n/**\r\n * Dynamically renders a step component specified by the step descriptor.\r\n */\r\n@Component({\r\n selector: 'appfx-step-container',\r\n standalone: false,\r\n templateUrl: 'step-container.component.html',\r\n})\r\nexport class StepContainerComponent implements OnInit, OnDestroy {\r\n @Input() step: StepInternal;\r\n\r\n @Input() description?: string;\r\n\r\n @Output() onRetry: EventEmitter<StepInternal> = new EventEmitter();\r\n\r\n // eslint-disable-next-line decorator-position/decorator-position\r\n @ViewChild('componentContainer', { read: ViewContainerRef, static: true })\r\n private componentContainer: ViewContainerRef;\r\n\r\n private pageComponent?: any;\r\n private retrySubscription: Subscription;\r\n\r\n get readyToComplete(): boolean {\r\n if (this.pageComponent?.model) {\r\n const stepModel: StepModel = this.pageComponent.model;\r\n return stepModel.readyToComplete === undefined ? true : stepModel.readyToComplete;\r\n }\r\n return true;\r\n }\r\n\r\n private get isValid(): boolean {\r\n return this.readyToComplete && this.isPageStateValid;\r\n }\r\n\r\n private get isPageStateValid(): boolean {\r\n if (this.pageComponent?.model?.validationState) {\r\n return this.pageComponent.model.validationState.isValid();\r\n }\r\n return true;\r\n }\r\n\r\n ngOnInit(): void {\r\n if (!this.step.instantiateLazy) {\r\n this.loadComponent();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unsubscribeRetry();\r\n }\r\n\r\n onActivate(\r\n error?: ActivationError,\r\n stepModelChanges?: ModelChanges,\r\n recreateComponent?: boolean,\r\n resetValidationState = true\r\n ): void {\r\n this.unsubscribeRetry();\r\n if (error) {\r\n this.loadErrorComponent(error);\r\n return;\r\n }\r\n\r\n if (recreateComponent || (!this.pageComponent && !!this.step.instantiateLazy)) {\r\n this.loadComponent();\r\n }\r\n if (!this.pageComponent) {\r\n return;\r\n }\r\n if (resetValidationState) {\r\n this.resetValidationState();\r\n }\r\n if (typeof this.pageComponent.activate === 'function') {\r\n this.pageComponent.activate(stepModelChanges);\r\n }\r\n }\r\n\r\n onCommit(): Observable<boolean> {\r\n if (!this.pageComponent) {\r\n return of(true);\r\n }\r\n if (typeof this.pageComponent.validate === 'function') {\r\n const result = this.pageComponent.validate();\r\n if (!(result instanceof Observable)) {\r\n throw new Error(\"'validate' function must return Observable<boolean>\");\r\n }\r\n return result.pipe(map((isValid: boolean) => isValid && this.isValid));\r\n }\r\n return of(this.isValid);\r\n }\r\n\r\n private loadComponent(): void {\r\n if (!this.step.componentClass) {\r\n return;\r\n }\r\n this.componentContainer.clear();\r\n const cr = this.componentContainer.createComponent(this.step.componentClass);\r\n this.pageComponent = cr.instance;\r\n this.pageComponent.model = this.step.modelInstance;\r\n }\r\n\r\n private loadErrorComponent(error: ActivationError): void {\r\n this.componentContainer.clear();\r\n const cr = this.componentContainer.createComponent(ErrorComponent);\r\n this.pageComponent = cr.instance;\r\n (this.pageComponent as ErrorComponent).error = error;\r\n this.retrySubscription = (this.pageComponent as ErrorComponent).onRetry\r\n .pipe(take(1))\r\n .subscribe(() => this.onRetry.emit(this.step));\r\n }\r\n\r\n private unsubscribeRetry(): void {\r\n if (this.retrySubscription && !this.retrySubscription.closed) {\r\n this.retrySubscription.unsubscribe();\r\n }\r\n }\r\n\r\n private resetValidationState(): void {\r\n if (this.pageComponent?.model) {\r\n this.pageComponent.model.readyToComplete = true;\r\n if (this.pageComponent.model.validationState) {\r\n this.pageComponent.model.validationState.errors = [];\r\n this.pageComponent.model.validationState.warnings = [];\r\n this.pageComponent.model.validationState.infos = [];\r\n }\r\n }\r\n }\r\n}\r\n","<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<div class=\"pr-1 hermes-flex-grow-0 hermes-flex-shrink-0\">\r\n <span *ngIf=\"description\">{{ description }}</span>\r\n <appfx-validation-banner\r\n *ngIf=\"step.modelInstance?.validationState?.isEmpty() === false\"\r\n [state]=\"step.modelInstance?.validationState\"\r\n >\r\n </appfx-validation-banner>\r\n</div>\r\n<div class=\"content-container hermes-flex-column hermes-flex-grow-1 hermes-flex-shrink-1\">\r\n <ng-template #componentContainer> </ng-template>\r\n</div>\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { CommonModule } from '@angular/common';\r\nimport { InjectionToken, NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { A11yModule } from '@hermes-ui/angular/addons/a11y';\r\nimport { PropertyViewModule } from '@hermes-ui/angular/addons/property-view';\r\nimport { WorkflowStrings } from '@hermes-ui/angular/addons/workflow/strings';\r\nimport { HermesStackViewModule } from '@hermes-ui/angular/data/stack-view';\r\nimport { HermesAlertModule } from '@hermes-ui/angular/emphasis/alert';\r\nimport {\r\n angleIcon,\r\n barsIcon,\r\n ClarityIcons,\r\n HermesIcon,\r\n exclamationCircleIcon,\r\n pencilIcon,\r\n refreshIcon,\r\n successStandardIcon,\r\n} from '@hermes-ui/angular/icon';\r\nimport { HermesSignpostModule } from '@hermes-ui/angular/popover/signpost';\r\nimport { HermesSpinnerModule } from '@hermes-ui/angular/progress/spinner';\r\n\r\nimport { WorkflowConfigurationService } from './config/workflow-configuration.service';\r\nimport { WorkflowModelMonitorComponent } from './debug/workflow-model-monitor.component';\r\nimport { ErrorComponent } from './error/error.component';\r\nimport { SpinnerComponent } from './spinner/spinner.component';\r\nimport { StepContainerComponent } from './step-container/step-container.component';\r\nimport {\r\n ValidationBannerComponent,\r\n ValidationBannerInternalComponent,\r\n} from './step-container/validation-banner/validation-banner.component';\r\n\r\n/**\r\n * This token is used to determine if the Wizard/Dialog is opened through ModalService.\r\n * If it is not injected (value is null), this means the the component is used directly,\r\n * without ModalService.\r\n * If the value is true, this means that the component is opened using\r\n * ModalService.openModalComponent API.\r\n * If the value is false, this means that the component is opened using\r\n * ModalService.openModal API (which is not correct).\r\n */\r\nexport const modalServiceToken = new InjectionToken('ModalService#openModalComponent');\r\n\r\nexport function workflowConfigurationServiceFactory(existing: WorkflowConfigurationService) {\r\n return existing || new WorkflowConfigurationService();\r\n}\r\n\r\nexport function workflowStringsServiceFactory(existing: WorkflowStrings) {\r\n return existing || new WorkflowStrings();\r\n}\r\n\r\nconst components = [\r\n ValidationBannerComponent,\r\n ValidationBannerInternalComponent,\r\n StepContainerComponent,\r\n WorkflowModelMonitorComponent,\r\n ErrorComponent,\r\n SpinnerComponent,\r\n];\r\n\r\nconst clarityDependencies = [HermesAlertModule, HermesIcon, HermesSpinnerModule, HermesStackViewModule, HermesSignpostModule];\r\n\r\nconst addonsDependencies = [PropertyViewModule, A11yModule];\r\n\r\n@NgModule({\r\n imports: [...addonsDependencies, ...clarityDependencies, CommonModule, FormsModule, ReactiveFormsModule],\r\n declarations: [...components],\r\n providers: [\r\n {\r\n // This pattern allows the importer of this module to specify its own WorkflowConfigurationService.\r\n provide: WorkflowConfigurationService,\r\n useFactory: workflowConfigurationServiceFactory,\r\n deps: [[new Optional(), new SkipSelf(), WorkflowConfigurationService]],\r\n },\r\n {\r\n // This pattern allows the importer of this module to specify its own WorkflowStrings.\r\n provide: WorkflowStrings,\r\n useFactory: workflowStringsServiceFactory,\r\n deps: [[new Optional(), new SkipSelf(), WorkflowStrings]],\r\n },\r\n ],\r\n exports: [...components],\r\n})\r\nexport class AppfxWorkflowCoreModule {\r\n constructor() {\r\n ClarityIcons.addIcons(angleIcon, barsIcon, exclamationCircleIcon, pencilIcon, refreshIcon, successStandardIcon);\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport 'reflect-metadata';\r\n\r\nexport interface InputMappings {\r\n [propName: string]: InputMappingMetadata;\r\n}\r\n\r\nconst inputMappingMetadataKey = 'InputMapping';\r\n\r\nexport interface InputMappingMetadata extends InDecoratorSchema {\r\n /**\r\n * The name of the property of the object from where to extract the value and inject\r\n * it in the decorated property.\r\n */\r\n propertyName: string;\r\n}\r\n\r\nexport interface InDecoratorSchema {\r\n /**\r\n * If the property does not need to be always provided set optional to true\r\n */\r\n optional?: boolean;\r\n}\r\n\r\n/**\r\n * Decorates property with input mapping information\r\n * which is used for injecting property value from another object.\r\n */\r\n// TODO: see how decorators can be called out to apply class-like conventions.\r\n\r\nexport function In(inputMapping?: InDecoratorSchema) {\r\n return function (prototype: any, srcPropName: string) {\r\n const mapping: InputMappingMetadata = {\r\n propertyName: srcPropName,\r\n optional: inputMapping && inputMapping.optional,\r\n };\r\n let mappings: any = Reflect.getMetadata(inputMappingMetadataKey, prototype);\r\n if (!mappings) {\r\n mappings = {};\r\n Reflect.defineMetadata(inputMappingMetadataKey, mappings, prototype);\r\n }\r\n mappings[srcPropName] = mapping;\r\n };\r\n}\r\n\r\n/**\r\n * Gets all input property mappings for the given object.\r\n */\r\nexport function getInputMappings(target: any): InputMappings {\r\n const mappings = Reflect.getMetadata(inputMappingMetadataKey, target.constructor.prototype);\r\n if (mappings) {\r\n // Return deep clone of the mappings to protect them from accidental alternation.\r\n return JSON.parse(JSON.stringify(mappings));\r\n }\r\n return mappings;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport 'reflect-metadata';\r\n\r\nexport interface OutputMappings {\r\n [propName: string]: OutputMappingMetadata;\r\n}\r\n\r\nconst outputMappingMetadataKey = 'OutputMapping';\r\n\r\nexport interface OutputMappingMetadata {\r\n /**\r\n * The name of the property where the value from the decorated property will be\r\n * ejected/output.\r\n */\r\n propertyName: string;\r\n}\r\n\r\n/**\r\n * Decorates property with output mapping information\r\n * which is used for ejecting/outputting property value into another object.\r\n */\r\n// TODO: see how decorators can be called out to apply class-like conventions.\r\n\r\nexport function Out() {\r\n return function (prototype: any, srcPropName: string) {\r\n const mapping: OutputMappingMetadata = {\r\n propertyName: srcPropName,\r\n };\r\n let mappings: any = Reflect.getMetadata(outputMappingMetadataKey, prototype);\r\n if (!mappings) {\r\n mappings = {};\r\n Reflect.defineMetadata(outputMappingMetadataKey, mappings, prototype);\r\n }\r\n mappings[srcPropName] = mapping;\r\n };\r\n}\r\n\r\n/**\r\n * Gets all output property mappings for the given object.\r\n */\r\nexport function getOutputMappings(target: any): OutputMappings {\r\n const mappings = Reflect.getMetadata(outputMappingMetadataKey, target.constructor.prototype);\r\n if (mappings) {\r\n // Return deep clone of the mappings to protect them from accidental alternation.\r\n return JSON.parse(JSON.stringify(mappings));\r\n }\r\n return mappings;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { getInputMappings, InputMappings } from './input-mapping';\r\nimport { getOutputMappings, OutputMappings } from './output-mapping';\r\n\r\n/**\r\n * Class to define property mappings between step model and wizard model.\r\n *\r\n * Note: If property name of both Step model and Wizard model is the same, no need to define this external mappings.\r\n * @template S any object that has @In/@Out decorators\r\n * @template W Wizard Model\r\n */\r\nexport class Mappings<S, W> {\r\n private mappings: PropertyMappings = {};\r\n\r\n /**\r\n * step model property name to which wizard model {@link wizardModelPropertyName} to be mapped\r\n * @param stepModelPropertyName Step model property name to map\r\n */\r\n mapStepProp(stepModelPropertyName: keyof S) {\r\n // TODO: fix the above exclusion\r\n\r\n const self = this;\r\n return {\r\n /**\r\n * wizard model property name to which step model {@link stepModelPropertyName} to be mapped\r\n * @param wizardModelPropertyName Wizard model property name to map\r\n */\r\n to(wizardModelPropertyName: keyof W): Mappings<S, W> {\r\n if (self.mappings[stepModelPropertyName as string]) {\r\n throw new Error(`A mapping for property ${String(stepModelPropertyName)} is defined more than once.`);\r\n } else if (Object.values(self.mappings).indexOf(wizardModelPropertyName as string) >= 0) {\r\n throw new Error(`A mapping for property ${String(wizardModelPropertyName)} is defined more than once.`);\r\n } else {\r\n // no action\r\n }\r\n self.mappings[stepModelPropertyName as string] = wizardModelPropertyName as string;\r\n return self;\r\n },\r\n };\r\n }\r\n\r\n /**\r\n * Validates input and output mappings property names with the mappings defined by {@link mapStepProp} method.\r\n * @param model Step model\r\n */\r\n validate(model: any) {\r\n if (model) {\r\n const inputMappings = getInputMappings(model);\r\n const outputMappings = getOutputMappings(model);\r\n const missingMappings = this.validateMappings(inputMappings, outputMappings);\r\n if (missingMappings.length) {\r\n throw new Error(`No @In or @Out decorator found for property names ` + JSON.stringify(missingMappings));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Returns property mappings defined.\r\n */\r\n getPropertyMappings(): PropertyMappings {\r\n return { ...this.mappings };\r\n }\r\n\r\n private validateMappings(inputMappings: InputMappings, outputMappings: OutputMappings): string[] {\r\n const defaultMappings = {\r\n ...inputMappings,\r\n ...outputMappings,\r\n };\r\n return Object.keys(this.mappings).filter(key => !defaultMappings[key]);\r\n }\r\n}\r\n\r\n/**\r\n * Interface which represents property Mappings\r\n */\r\nexport interface PropertyMappings {\r\n /**\r\n * @param {string} propertyName Step model property name\r\n */\r\n [propertyName: string]: string;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { combineLatest, Observable, of, Subject, Subscription } from 'rxjs';\r\nimport { map, startWith } from 'rxjs/operators';\r\n\r\nimport { Step, StepInternal } from './step';\r\nimport { ComputedVar, SimpleVar } from './var';\r\n\r\n@Injectable()\r\nexport class RelevanceService {\r\n loading = false;\r\n\r\n private isRelevantSubs: Subscription[] = [];\r\n private stepRelevanceChange$ = new Subject<StepInternal>();\r\n\r\n #steps: StepInternal[] = [];\r\n\r\n /**\r\n * Workflow steps.\r\n */\r\n set steps(steps: Step[]) {\r\n this.#steps = steps || [];\r\n this.unbindIsRelevantListeners();\r\n this.bindIsRelevantListeners();\r\n }\r\n\r\n /**\r\n * Checks for relevance check to complete.\r\n */\r\n checkComplete$(): Observable<Step[]> {\r\n const relevantVarValues = this.#steps\r\n .filter(step => step.isRelevant instanceof ComputedVar && step.isRelevant.areDependenciesSatisfied)\r\n .map(step => (<ComputedVar<boolean>>step.isRelevant).value$);\r\n let stepsObservable: Observable<StepInternal[]>;\r\n if (relevantVarValues.length) {\r\n this.loading = true;\r\n stepsObservable = combineLatest(relevantVarValues).pipe(\r\n map(() => {\r\n this.loading = false;\r\n return this.#steps;\r\n })\r\n );\r\n } else {\r\n stepsObservable = of(this.#steps);\r\n }\r\n return stepsObservable;\r\n }\r\n\r\n destroy(): void {\r\n this.#steps = [];\r\n this.unbindIsRelevantListeners();\r\n }\r\n\r\n /**\r\n * Emits step which relevance has been changed\r\n */\r\n onStepRelevanceChange$(): Observable<StepInternal> {\r\n return this.stepRelevanceChange$.asObservable();\r\n }\r\n\r\n private bindIsRelevantListeners(): void {\r\n return this.#steps\r\n .filter(step => step.isRelevant)\r\n .forEach((step: StepInternal) => {\r\n if (step.isRelevant instanceof ComputedVar || step.isRelevant instanceof SimpleVar) {\r\n this.isRelevantSubs.push(\r\n step.isRelevant.value$\r\n .pipe(\r\n startWith(false) // Assume isRelevant is false by default.\r\n )\r\n .subscribe(isRelevant => {\r\n const oldValue = step.isSkipped;\r\n step.isSkipped = !isRelevant;\r\n if (oldValue !== step.isSkipped) {\r\n this.stepRelevanceChange$.next(step);\r\n }\r\n })\r\n );\r\n }\r\n });\r\n }\r\n\r\n private unbindIsRelevantListeners(): void {\r\n this.isRelevantSubs.forEach(s => s.unsubscribe());\r\n this.isRelevantSubs = [];\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport class StepValidationState {\r\n #errors: string[];\r\n #warnings: string[];\r\n #infos: string[];\r\n\r\n constructor(errors: string[] = [], warnings: string[] = [], infos: string[] = []) {\r\n this.#errors = errors;\r\n this.#warnings = warnings;\r\n this.#infos = infos;\r\n }\r\n\r\n get errors(): string[] {\r\n return this.#errors || [];\r\n }\r\n\r\n set errors(messages: string[]) {\r\n this.#errors = messages;\r\n }\r\n\r\n get warnings(): string[] {\r\n return this.#warnings || [];\r\n }\r\n\r\n set warnings(messages: string[]) {\r\n this.#warnings = messages;\r\n }\r\n\r\n get infos(): string[] {\r\n return this.#infos || [];\r\n }\r\n\r\n set infos(messages: string[]) {\r\n this.#infos = messages;\r\n }\r\n\r\n isEmpty(): boolean {\r\n return this.errors.length === 0 && this.warnings.length === 0 && this.infos.length === 0;\r\n }\r\n\r\n isValid(): boolean {\r\n return !this.#errors || this.#errors.length === 0;\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\n/**\r\n * Options:\r\n * - `horizontal`: Default layout with horizontal alignment.\r\n * - `vertical`: Tabs aligned vertically, typically for sidebar navigation.\r\n * - `secondary`: Tabs styled horizontally as Clarity buttons for a secondary level of navigation.\r\n */\r\nexport enum TabLayout {\r\n horizontal = 'horizontal',\r\n vertical = 'vertical',\r\n secondary = 'horizontal-secondary',\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, combineLatest, Observable, of, Subject, Subscription, throwError } from 'rxjs';\r\nimport { catchError, map, pairwise, startWith, take, tap } from 'rxjs/operators';\r\n\r\nimport { StepInternal } from './step';\r\nimport { ModelChanges } from './step-interfaces';\r\nimport { StepModel } from './step.model';\r\nimport { ComputedVar, ComputeStrategy, SimpleVar } from './var';\r\nimport { WorkflowModel } from './workflow.model';\r\nimport { ActivationError } from '../error/interfaces';\r\nimport { getInputMappings, InputMappingMetadata, InputMappings } from '../mappings/input-mapping';\r\nimport { Mappings } from '../mappings/mappings';\r\nimport { getOutputMappings, OutputMappingMetadata, OutputMappings } from '../mappings/output-mapping';\r\nimport { formatError, parse, stringify } from '../util/util';\r\n\r\nexport class ModelChange {\r\n constructor(\r\n public propertyName: string,\r\n public oldValue: any,\r\n public newValue: any\r\n ) {}\r\n}\r\n\r\nexport interface StepWithChanges {\r\n step?: StepInternal;\r\n changes: ModelChange[];\r\n}\r\n\r\n@Injectable()\r\nexport class WorkflowModelManager {\r\n /**\r\n * Emit when {@link injectPropertiesToPendingStep} method completes.\r\n * Emitted value contains the pending step and calculated properties for it.\r\n */\r\n onStepChange$ = new Subject<StepWithChanges>();\r\n\r\n /**\r\n * Emit when one or more workflow properties are changed.\r\n */\r\n onModelChange$ = new Subject<Array<ModelChange>>();\r\n\r\n /**\r\n * Emit \"true\" before start of computed properties evaluation.\r\n * Emit \"false\" when computed properties are evaluated.\r\n */\r\n loading$ = new BehaviorSubject<boolean>(false);\r\n\r\n private stepModelBindings: Map<StepModel, Subscription> = new Map();\r\n private workflowModelSubs: Subscription[] = [];\r\n private wizardModel: any;\r\n // Contains stringified values of the 'wizardModel' properties.\r\n private wizardModelOldValues: any = {};\r\n // Contains stringified values of the input step model properties.\r\n private stepModelLastValuesIn: Map<StepModel, any> = new Map();\r\n\r\n #steps: StepInternal[];\r\n\r\n /**\r\n * Workflow steps.\r\n */\r\n set steps(value: StepInternal[]) {\r\n this.#steps = value;\r\n this.initStepModels();\r\n this.onStepsOrModelChange();\r\n }\r\n\r\n /**\r\n * Workflow model.\r\n */\r\n get model(): WorkflowModel {\r\n return this.wizardModel;\r\n }\r\n\r\n set model(value: WorkflowModel) {\r\n if (typeof value === 'function' || Array.isArray(value)) {\r\n throw new Error('Workflow model cannot be a function or array.');\r\n }\r\n if (!value) {\r\n console.warn('Workflow model not initialized.!');\r\n }\r\n this.wizardModel = value;\r\n this.wizardModelOldValues = {};\r\n this.onStepsOrModelChange();\r\n }\r\n\r\n destroy(): void {\r\n this.unbindStepModelListeners();\r\n this.unbindWorkflowModelListeners();\r\n }\r\n\r\n /**\r\n * Ejects properties from provided step model to wizard model.\r\n */\r\n ejectPropertiesFromCurrentStep(currentStep: StepInternal | undefined): void {\r\n if (!this.wizardModel) {\r\n return;\r\n }\r\n\r\n if (!currentStep?.modelInstance) {\r\n return;\r\n }\r\n\r\n const outputMappings: OutputMappings = this.getOutputMappings(currentStep.modelInstance, currentStep.mappings);\r\n if (!outputMappings) {\r\n return;\r\n }\r\n\r\n const changes: (ModelChange | null)[] = [];\r\n for (const [key, outputMapping] of Object.entries(outputMappings)) {\r\n const stepModelValue = (currentStep.modelInstance as any)[key];\r\n const change = this.updateWizardModel(stepModelValue, outputMapping);\r\n changes.push(change);\r\n }\r\n\r\n this.emitModelChange(changes);\r\n }\r\n\r\n /**\r\n * Calculate the {@link ComputedVar} properties, if any.\r\n * Then inject properties to the provided step model.\r\n */\r\n injectPropertiesToPendingStep(pendingStep: StepInternal | undefined): Observable<InjectPropertiesResult> {\r\n if (!this.wizardModel) {\r\n return of({\r\n pendingStep: pendingStep,\r\n });\r\n }\r\n return this.injectPropertiesToPendingStepInternal(pendingStep).pipe(\r\n tap((result: InjectPropertiesInternalResult) => {\r\n this.emitModelChange(result.wizardModelChanges);\r\n this.onStepChange$.next({\r\n step: pendingStep,\r\n changes: result.wizardModelChanges,\r\n });\r\n }),\r\n map((result: InjectPropertiesInternalResult) => {\r\n return {\r\n pendingStep: pendingStep,\r\n stepModelChanges: result.stepModelChanges,\r\n recreateComponent: result.recreateComponent,\r\n };\r\n }),\r\n catchError((error: unknown) => {\r\n console.error(error);\r\n return of({\r\n pendingStep: pendingStep,\r\n error: formatError(error),\r\n });\r\n })\r\n );\r\n }\r\n\r\n private onStepsOrModelChange(): void {\r\n // Clear bindings to old steps/model.\r\n this.unbindStepModelListeners();\r\n this.unbindWorkflowModelListeners();\r\n this.stepModelLastValuesIn.clear();\r\n\r\n if (!this.#steps || !this.wizardModel) {\r\n return;\r\n }\r\n // Both steps and model is set.\r\n this.bindStepModelListeners();\r\n this.processWorkflowModel();\r\n }\r\n\r\n private initStepModels() {\r\n (this.#steps || [])\r\n .filter(step => !step.instantiateLazy) // if instantiateLazy, init later when required ( in injectPropertiesToPendingStepInternal )\r\n .forEach(step => {\r\n this.initStepModel(step);\r\n });\r\n }\r\n\r\n private initStepModel(step: StepInternal): StepModel | undefined {\r\n if (typeof step.model === 'function') {\r\n step.modelInstance = step.model();\r\n } else {\r\n if (step.recreateComponent) {\r\n throw new Error('When recreateComponent is defined, model should be a factory function');\r\n }\r\n step.modelInstance = step.model;\r\n }\r\n if (step.mappings) {\r\n step.mappings.validate(step.modelInstance);\r\n }\r\n return step.modelInstance;\r\n }\r\n\r\n private bindStepModelListeners(): void {\r\n for (const page of this.#steps) {\r\n this.bindStepModelListener(page);\r\n }\r\n }\r\n\r\n private bindStepModelListener(page: StepInternal): void {\r\n if (!page.modelInstance) {\r\n return;\r\n }\r\n\r\n const mappings: OutputMappings = this.getOutputMappings(page.modelInstance, page.mappings);\r\n if (!mappings) {\r\n return;\r\n }\r\n const subscription: Subscription = new Subscription();\r\n for (const [propertyName, outputMapping] of Object.entries(mappings)) {\r\n const propertyValue = (page.modelInstance as any)[propertyName];\r\n if (propertyValue instanceof Observable) {\r\n // TODO: Deprecated; to be removed!\r\n console.warn(\r\n `Step ${page.title} has property ${propertyName}: Observable.` +\r\n 'Using Observable in Step models is deprecated and will be removed soon. ' +\r\n 'Use Var.from() instead'\r\n );\r\n\r\n subscription.add(\r\n propertyValue.subscribe(value => {\r\n if (this.wizardModel) {\r\n const change = this.updateWizardModel(value, outputMapping);\r\n this.emitModelChange([change]);\r\n }\r\n })\r\n );\r\n } else if (propertyValue instanceof SimpleVar) {\r\n subscription.add(\r\n propertyValue.value$.subscribe(value => {\r\n if (this.wizardModel) {\r\n const change = this.updateWizardModel(value, outputMapping);\r\n this.emitModelChange([change]);\r\n }\r\n })\r\n );\r\n } else {\r\n // no action\r\n }\r\n }\r\n this.stepModelBindings.set(page.modelInstance, subscription);\r\n }\r\n\r\n private unbindStepModelListeners(): void {\r\n this.stepModelBindings.forEach(s => s.unsubscribe());\r\n this.stepModelBindings.clear();\r\n }\r\n\r\n private unbindStepModelListener(page: StepInternal) {\r\n if (!page.modelInstance) {\r\n return;\r\n }\r\n const stepModelBinding = this.stepModelBindings.get(page.modelInstance);\r\n if (stepModelBinding) {\r\n stepModelBinding.unsubscribe();\r\n this.stepModelBindings.delete(page.modelInstance);\r\n }\r\n }\r\n\r\n private processWorkflowModel(): void {\r\n for (const [propName, propValue] of Object.entries(this.wizardModel)) {\r\n if (propValue instanceof SimpleVar) {\r\n propValue.name = propName;\r\n } else if (propValue instanceof ComputedVar) {\r\n propValue.name = propName;\r\n if (propValue.strategy === ComputeStrategy.eager) {\r\n this.workflowModelSubs.push(\r\n propValue.value$.pipe(startWith(undefined), pairwise()).subscribe(([prevValue, newValue]) => {\r\n const change = new ModelChange(propName, prevValue, newValue);\r\n this.emitModelChange([change]);\r\n })\r\n );\r\n }\r\n } else {\r\n // no action\r\n }\r\n }\r\n }\r\n\r\n private unbindWorkflowModelListeners(): void {\r\n this.workflowModelSubs.forEach(s => s.unsubscribe());\r\n this.workflowModelSubs = [];\r\n }\r\n\r\n private updateWizardModel(newValue: any, outputMapping: OutputMappingMetadata): ModelChange | null {\r\n if (newValue instanceof Observable) {\r\n // TODO: This case is deprecated and will be removed soon.\r\n return null;\r\n }\r\n\r\n if (newValue instanceof SimpleVar) {\r\n // Wizard model is updated through bindings.\r\n // Make sure that the SimpleVar is not dirty, i.e. value is not changed without calling the \"value\" setter.\r\n newValue.updateValueIfDirty();\r\n return null;\r\n }\r\n const outputMappingPropertyName = outputMapping.propertyName;\r\n const oldValue = this.wizardModel[outputMappingPropertyName];\r\n if (oldValue instanceof ComputedVar) {\r\n throw new Error(`Cannot update ${outputMappingPropertyName} in WizardModel, because it is ComputedVar.`);\r\n } else if (oldValue instanceof SimpleVar) {\r\n this.wizardModel[outputMappingPropertyName].value = newValue;\r\n } else {\r\n this.wizardModel[outputMappingPropertyName] = newValue;\r\n }\r\n\r\n const newValueStr = stringify(newValue, outputMappingPropertyName);\r\n const oldValueStr = this.wizardModelOldValues[outputMappingPropertyName];\r\n if (oldValueStr !== newValueStr) {\r\n this.wizardModelOldValues[outputMappingPropertyName] = newValueStr;\r\n const oldValueParsed = parse(oldValueStr, outputMappingPropertyName);\r\n return new ModelChange(outputMappingPropertyName, oldValueParsed, newValue);\r\n }\r\n return null;\r\n }\r\n\r\n private injectPropertiesToPendingStepInternal(\r\n pendingStep: StepInternal | undefined\r\n ): Observable<InjectPropertiesInternalResult> {\r\n const defaultResult: InjectPropertiesInternalResult = {\r\n wizardModelChanges: [],\r\n stepModelChanges: {},\r\n };\r\n const result: Observable<InjectPropertiesInternalResult> = of(defaultResult);\r\n if (!pendingStep) {\r\n return result;\r\n }\r\n\r\n let createdModelInstance = false;\r\n if (pendingStep.instantiateLazy && !pendingStep.modelInstance) {\r\n // If lazy instantiated, modelInstance may not be initialized yet.\r\n this.initStepModel(pendingStep);\r\n this.bindStepModelListener(pendingStep);\r\n createdModelInstance = true;\r\n }\r\n const stepModel = pendingStep.modelInstance;\r\n if (!stepModel) {\r\n return result;\r\n }\r\n\r\n const inputMappings: InputMappings = this.getInputMappings(stepModel, pendingStep.mappings);\r\n if (!inputMappings) {\r\n // If there are no input mappings and recreateComponent is true, then re-create modelInstance\r\n // Since, there are no input properties, pass empty object as modelChanges to recreateComponent method.\r\n if (pendingStep.recreateComponent && pendingStep.recreateComponent({})) {\r\n this.unbindStepModelListener(pendingStep);\r\n this.initStepModel(pendingStep);\r\n this.bindStepModelListener(pendingStep);\r\n return of({\r\n ...defaultResult,\r\n recreateComponent: true,\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n const wizardProps: PropertyWrapper[] = Object.entries(inputMappings).map(([stepModelPropName, inputMapping]) => {\r\n return this.wrapWorkflowPropertyInObservable(stepModelPropName, inputMapping);\r\n });\r\n const wizardProps$: Observable<any>[] = wizardProps.map(wrapper => wrapper.value$);\r\n\r\n const wizardCompProps = Object.keys(this.wizardModel).filter(\r\n propName => this.wizardModel[propName] instanceof ComputedVar\r\n );\r\n const oldWizardModelCompPropValues = this.extractModelProperties(this.wizardModel, wizardCompProps);\r\n if (oldWizardModelCompPropValues.length) {\r\n this.loading$.next(true);\r\n }\r\n const stepInputProperties = Object.keys(inputMappings);\r\n const oldStepModelValues = this.extractLastStepInputValues(stepModel, stepInputProperties);\r\n\r\n return combineLatest(wizardProps$).pipe(\r\n take(1), // apply the 'take' operator first to avoid recursive calls when both @In and @Out are declared on same property\r\n map((propValues: any[]) => {\r\n // Inject workflow values into the step model.\r\n this.injectWizardPropertiesToStepModel(wizardProps, propValues, stepModel);\r\n\r\n const newStepModelValues = this.extractModelProperties(stepModel, stepInputProperties);\r\n const stepModelChangesList = this.diffPropertyValues(oldStepModelValues, newStepModelValues);\r\n const stepModelChanges = (stepModelChangesList || []).reduce<ModelChanges>((res, curr) => {\r\n res[curr.propertyName] = curr;\r\n return res;\r\n }, {});\r\n\r\n // if recreateComponent, create new model.\r\n const recreateComponent = pendingStep.recreateComponent && pendingStep.recreateComponent(stepModelChanges);\r\n if (recreateComponent && !createdModelInstance) {\r\n this.unbindStepModelListener(pendingStep);\r\n const newStepModel = this.initStepModel(pendingStep);\r\n this.bindStepModelListener(pendingStep);\r\n this.injectWizardPropertiesToStepModel(wizardProps, propValues, newStepModel, pendingStep.mappings);\r\n }\r\n\r\n // Detect changes in all computed properties, because dependent computed\r\n // properties might also have changed.\r\n const newWizardModelCompPropValues = this.extractModelProperties(this.wizardModel, wizardCompProps);\r\n const wizardModelChanges = this.diffPropertyValues(oldWizardModelCompPropValues, newWizardModelCompPropValues);\r\n return {\r\n wizardModelChanges: wizardModelChanges,\r\n stepModelChanges: stepModelChanges,\r\n recreateComponent: recreateComponent,\r\n };\r\n }),\r\n tap(() => this.loading$.next(false)),\r\n catchError((error: unknown) => {\r\n this.loading$.next(false);\r\n return throwError(() => error);\r\n })\r\n );\r\n }\r\n\r\n private injectWizardPropertiesToStepModel(\r\n wizardProps: PropertyWrapper[],\r\n propValues: any[],\r\n stepModel: any,\r\n mappings?: Mappings<any, any>\r\n ) {\r\n wizardProps.forEach((wrapper: PropertyWrapper, index: number) => {\r\n const stepModelNewValue = propValues[index];\r\n this.updateStepModel(stepModel, wrapper.name, stepModelNewValue);\r\n });\r\n\r\n this.cacheStepModelInputProps(stepModel, mappings);\r\n }\r\n\r\n private wrapWorkflowPropertyInObservable(\r\n stepModelPropName: string,\r\n inputMapping: InputMappingMetadata\r\n ): PropertyWrapper {\r\n const wizardProp = this.wizardModel[inputMapping.propertyName];\r\n if (\r\n !Object.prototype.hasOwnProperty.call(this.wizardModel, inputMapping.propertyName) &&\r\n !Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.wizardModel), inputMapping.propertyName)\r\n ) {\r\n return this.wrapOptionalWorkflowPropertyInObservable(stepModelPropName, inputMapping);\r\n } else if (wizardProp instanceof ComputedVar) {\r\n return this.wrapComputedWorkflowPropertyInObservable(stepModelPropName, inputMapping);\r\n } else if (wizardProp instanceof SimpleVar) {\r\n return this.wrapSimpleWorkflowPropertyInObservable(stepModelPropName, inputMapping);\r\n } else {\r\n return {\r\n name: stepModelPropName,\r\n value$: of(wizardProp),\r\n computed: false,\r\n };\r\n }\r\n }\r\n\r\n private wrapOptionalWorkflowPropertyInObservable(stepModelPropName: string, inputMapping: InputMappingMetadata) {\r\n if (!inputMapping.optional) {\r\n throw new Error(`Workflow model property ${inputMapping.propertyName} not found or not initialized.`);\r\n }\r\n return {\r\n name: stepModelPropName,\r\n value$: of(missingOptionalProperty),\r\n computed: false,\r\n };\r\n }\r\n\r\n private wrapComputedWorkflowPropertyInObservable(stepModelPropName: string, inputMapping: InputMappingMetadata) {\r\n const wizardProp = this.wizardModel[inputMapping.propertyName];\r\n const unsatisfiedDeps = wizardProp.unsatisfiedDependencies;\r\n if (unsatisfiedDeps.length) {\r\n if (inputMapping.optional) {\r\n return {\r\n name: stepModelPropName,\r\n value$: of(missingOptionalProperty),\r\n computed: true,\r\n };\r\n } else {\r\n throw new Error(`Dependencies not satisfied for Var: ${wizardProp.name} --> ${unsatisfiedDeps}`);\r\n }\r\n } else {\r\n return {\r\n name: stepModelPropName,\r\n value$: wizardProp.value$,\r\n computed: true,\r\n };\r\n }\r\n }\r\n\r\n private wrapSimpleWorkflowPropertyInObservable(stepModelPropName: string, inputMapping: InputMappingMetadata) {\r\n const wizardProp = this.wizardModel[inputMapping.propertyName];\r\n if (wizardProp.value === undefined) {\r\n if (inputMapping.optional) {\r\n return {\r\n name: stepModelPropName,\r\n value$: of(missingOptionalProperty),\r\n computed: false,\r\n };\r\n } else {\r\n throw new Error(`Value not initialized for Var: ${wizardProp.name}`);\r\n }\r\n } else {\r\n return {\r\n name: stepModelPropName,\r\n value$: wizardProp.value$,\r\n computed: false,\r\n };\r\n }\r\n }\r\n\r\n private updateStepModel(stepModel: any, propertyName: string, newValue: any): void {\r\n // Early return if input mapping is defined as optional and there is no value.\r\n if (newValue === missingOptionalProperty) {\r\n return;\r\n }\r\n\r\n // Set the new value\r\n if (stepModel[propertyName] instanceof SimpleVar) {\r\n stepModel[propertyName].value = newValue;\r\n } else {\r\n stepModel[propertyName] = newValue;\r\n }\r\n }\r\n\r\n private diffPropertyValues(oldValues: NameValue[], newValues: NameValue[]): ModelChange[] {\r\n const changes: ModelChange[] = [];\r\n oldValues.forEach((nameValue: NameValue, index: number) => {\r\n const oldValueStr = nameValue.valueStr;\r\n const newValueStr = newValues[index].valueStr;\r\n if (oldValueStr !== newValueStr) {\r\n const change = new ModelChange(nameValue.name, nameValue.value, newValues[index].value);\r\n changes.push(change);\r\n }\r\n });\r\n return changes;\r\n }\r\n\r\n /**\r\n * Return the input step model values, that were cached during the last invocation of\r\n * {@link ejectPropertiesFromCurrentStep} method.\r\n */\r\n private extractLastStepInputValues(model: StepModel, propNames: string[]): NameValue[] {\r\n const lastStepModelValues = this.stepModelLastValuesIn.get(model);\r\n if (!lastStepModelValues) {\r\n // When a step is activated for the first time, it has no \"last\" values cached.\r\n return this.extractModelProperties(model, propNames);\r\n }\r\n\r\n const result: NameValue[] = [];\r\n for (const propertyName of propNames) {\r\n const valueStr = lastStepModelValues[propertyName];\r\n const propertyValue = parse(valueStr, propertyName);\r\n result.push({\r\n name: propertyName,\r\n value: propertyValue,\r\n valueStr: valueStr,\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Return stringified values of {@link propNames} of the {@link model}.\r\n */\r\n private extractModelProperties(model: any, propNames: string[]): NameValue[] {\r\n const result: NameValue[] = [];\r\n for (const propertyName of propNames) {\r\n let propertyValue = model[propertyName];\r\n if (propertyValue instanceof ComputedVar || propertyValue instanceof SimpleVar) {\r\n propertyValue = propertyValue.value;\r\n }\r\n const valueStr = stringify(propertyValue, propertyName);\r\n result.push({\r\n name: propertyName,\r\n value: propertyValue,\r\n valueStr: valueStr,\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Remove null elements from the \"changes\" array and emit on {@link onModelChange$}\r\n * if there are changes.\r\n */\r\n private emitModelChange(changes: (ModelChange | null)[]): void {\r\n const nonNullChanges: ModelChange[] = <ModelChange[]>changes.filter(change => !!change);\r\n\r\n if (nonNullChanges.length) {\r\n this.onModelChange$.next(nonNullChanges);\r\n }\r\n }\r\n\r\n private cacheStepModelInputProps(stepModel: any, mappings?: Mappings<any, any>): void {\r\n const inputMappings: InputMappings = this.getInputMappings(stepModel, mappings);\r\n if (inputMappings) {\r\n const stepModelStringifiedProps: any = {};\r\n for (const [key] of Object.entries(inputMappings)) {\r\n let propertyValue = stepModel[key];\r\n if (propertyValue instanceof ComputedVar || propertyValue instanceof SimpleVar) {\r\n propertyValue = propertyValue.value;\r\n }\r\n const stepModelValueStr = stringify(propertyValue, key);\r\n stepModelStringifiedProps[key] = stepModelValueStr;\r\n }\r\n this.stepModelLastValuesIn.set(stepModel, stepModelStringifiedProps);\r\n }\r\n }\r\n\r\n private getInputMappings(stepModel?: StepModel, mappings?: Mappings<any, any>): InputMappings {\r\n const externalMappings = mappings?.getPropertyMappings();\r\n const inputMappings = getInputMappings(stepModel);\r\n if (inputMappings && externalMappings) {\r\n for (const [stepModelPropertyName, wizardModelPropertyName] of Object.entries(externalMappings)) {\r\n const propertyMapping = inputMappings[stepModelPropertyName];\r\n if (propertyMapping) {\r\n propertyMapping.propertyName = wizardModelPropertyName;\r\n }\r\n }\r\n }\r\n return inputMappings;\r\n }\r\n\r\n private getOutputMappings(stepModel?: StepModel, mappings?: Mappings<any, any>): OutputMappings {\r\n const externalMappings = mappings?.getPropertyMappings();\r\n const outputMappings = getOutputMappings(stepModel);\r\n if (outputMappings && externalMappings) {\r\n for (const [stepModelPropertyName, wizardModelPropertyName] of Object.entries(externalMappings)) {\r\n const propertyMapping = outputMappings[stepModelPropertyName];\r\n if (propertyMapping) {\r\n propertyMapping.propertyName = wizardModelPropertyName;\r\n }\r\n }\r\n }\r\n return outputMappings;\r\n }\r\n}\r\n\r\nclass OptionalProperty {}\r\n\r\n// Value that will be returned when @InputMapping refers to an optional property,\r\n// that is missing from the wizard model.\r\nconst missingOptionalProperty = new OptionalProperty();\r\n\r\ninterface PropertyWrapper {\r\n name: string;\r\n value$: Observable<any>;\r\n computed: boolean;\r\n}\r\n\r\ninterface NameValue {\r\n name: string;\r\n value: any;\r\n\r\n /**\r\n * Stringified 'value' field.\r\n * If 'value' is undefined, 'valueStr' will also be undefined.\r\n */\r\n valueStr: string | undefined;\r\n}\r\n\r\nexport interface InjectPropertiesResult {\r\n pendingStep?: StepInternal;\r\n error?: ActivationError;\r\n stepModelChanges?: ModelChanges;\r\n recreateComponent?: boolean;\r\n}\r\n\r\ninterface InjectPropertiesInternalResult {\r\n wizardModelChanges: ModelChange[];\r\n stepModelChanges: ModelChanges;\r\n recreateComponent?: boolean;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport { AppfxWorkflowCoreModule, modalServiceToken } from './appfx-workfow-core.module';\r\nexport { WorkflowConfigurationService } from './config/workflow-configuration.service';\r\nexport { WorkflowModelMonitorComponent } from './debug/workflow-model-monitor.component';\r\nexport { WorkflowModelMonitorComponent as WorkflowModelMonitor } from './debug/workflow-model-monitor.component';\r\nexport { ErrorComponent } from './error/error.component';\r\nexport { In } from './mappings/input-mapping';\r\nexport { Mappings } from './mappings/mappings';\r\nexport { Out } from './mappings/output-mapping';\r\nexport { CloseHandler } from './model/close-handler';\r\nexport { RelevanceService } from './model/relevance.service';\r\nexport { Step, StepInternal, StepModelFactory } from './model/step';\r\nexport { CancelableStepValidation, StepModel } from './model/step.model';\r\nexport { ModelChanges, OnStepActivate, OnStepValidate, StepComponent, StepModelHolder } from './model/step-interfaces';\r\nexport { StepValidationState } from './model/step-validation-state';\r\nexport { TabLayout, TabLayout as DialogLayout } from './model/tab-layout';\r\nexport { Var } from './model/var';\r\nexport { WizardFooter, WizardFooterConfig } from './model/wizard-footer';\r\nexport { WorkflowModel } from './model/workflow.model';\r\nexport { ModelChange, InjectPropertiesResult, WorkflowModelManager } from './model/workflow-model-manager.service';\r\nexport { SpinnerComponent } from './spinner/spinner.component';\r\nexport { SpinnerComponent as Spinner } from './spinner/spinner.component';\r\nexport { formatError, stringify } from './util/util';\r\nexport { StepContainerComponent } from './step-container/step-container.component';\r\nexport { StepContainerComponent as StepContainer } from './step-container/step-container.component';\r\nexport {\r\n ValidationBannerComponent,\r\n ValidationBannerComponent as ValidationBanner,\r\n ValidationBannerInternalComponent,\r\n ValidationBannerInternalComponent as ValidationBannerInternal,\r\n} from './step-container/validation-banner/validation-banner.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3","i1","i2","i4","i2.ValidationBannerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;MAKU,4BAA4B,CAAA;AAKvC,IAAA,WAAA,GAAA;QAJiB,IAAA,CAAA,oBAAoB,GAAG,yBAAyB;QAK/D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;AAChD,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC;IAClE;AAEA,IAAA,IAAI,KAAK,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AC;AACnD,QAAA,IAAI,cAAc,IAAI,gBAAgB,EAAE;AACtC,YAAA,KAAK,MAAM,CAAC,qBAAqB,EAAE,uBAAuB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE;AAC/F,gBAAA,MAAM,eAAe,GAAG,cAAc,CAAC,qBAAqB,CAAC;gBAC7D,IAAI,eAAe,EAAE;AACnB,oBAAA,eAAe,CAAC,YAAY,GAAG,uBAAuB;gBACxD;YACF;QACF;AACA,QAAA,OAAO,cAAc;IACvB;+GAllBW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAApB,oBAAoB,EAAA,CAAA,CAAA;;4FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC;;AAslBD,MAAM,gBAAgB,CAAA;AAAG;AAEzB;AACA;AACA,MAAM,uBAAuB,GAAG,IAAI,gBAAgB,EAAE;;AC7nBtD;;;;;AAKG;;ACLH;;AAEG;;"}
1
+ {"version":3,"file":"hermes-ui-angular-addons-var.mjs","sources":["../../../addons/var/config/workflow-configuration.service.ts","../../../addons/var/model/resettable-share-replay.ts","../../../addons/var/util/util.ts","../../../addons/var/model/var.ts","../../../addons/var/debug/workflow-model-monitor.component.ts","../../../addons/var/debug/workflow-model-monitor.component.html","../../../addons/var/error/error.component.ts","../../../addons/var/error/error.component.html","../../../addons/var/spinner/spinner.component.ts","../../../addons/var/spinner/spinner.component.html","../../../addons/var/step-container/validation-banner/validation-banner.component.ts","../../../addons/var/step-container/step-container.component.ts","../../../addons/var/step-container/step-container.component.html","../../../addons/var/appfx-workfow-core.module.ts","../../../addons/var/mappings/input-mapping.ts","../../../addons/var/mappings/output-mapping.ts","../../../addons/var/mappings/mappings.ts","../../../addons/var/model/relevance.service.ts","../../../addons/var/model/step-validation-state.ts","../../../addons/var/model/tab-layout.ts","../../../addons/var/model/workflow-model-manager.service.ts","../../../addons/var/index.ts","../../../addons/var/hermes-ui-angular-addons-var.ts"],"sourcesContent":["/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class WorkflowConfigurationService {\r\n private readonly debugLocalStorageKey = 'hermes-addons-var.debug';\r\n private readonly localStorage: LocalStorage | undefined;\r\n private debugValue: boolean;\r\n\r\n constructor() {\r\n this.localStorage = this.getLocalStorage(window);\r\n this.debugValue = this.getData(this.debugLocalStorageKey, false);\r\n }\r\n\r\n get debug(): boolean {\r\n return this.debugValue;\r\n }\r\n set debug(newValue: boolean) {\r\n this.debugValue = newValue;\r\n }\r\n\r\n private getData<T>(key: string, defaultValue: T): T {\r\n if (this.localStorage) {\r\n let data: any = this.localStorage.getItem(key);\r\n if (data) {\r\n data = JSON.parse(data);\r\n return <T>data;\r\n }\r\n }\r\n return defaultValue;\r\n }\r\n\r\n private getLocalStorage(window: any): LocalStorage | undefined {\r\n try {\r\n if (window.localStorage) {\r\n return window.localStorage;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n } catch (_ignored) {\r\n // swallow exception\r\n }\r\n return undefined;\r\n }\r\n}\r\n\r\ninterface LocalStorage {\r\n getItem(key: string): string;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { MonoTypeOperatorFunction, Observable, ReplaySubject, ShareReplayConfig, Subscriber, Subscription } from 'rxjs';\r\n\r\nexport interface ResettableShareReplayConfig extends ShareReplayConfig {\r\n reset: Observable<void>;\r\n}\r\n\r\n/**\r\n * Custom {@link shareReplay} operator that allows the internal {@link ReplaySubject} to be reset.\r\n * The {@link shareReplay} operator works the following way:\r\n *\r\n * Source Observable <-- ReplaySubject <-- Observer(s)\r\n *\r\n * The operator subscribes to the source observable and forwards its next/complete/error to a\r\n * ReplaySubject. All observers subscribe to the ReplaySubject. This way there is only\r\n * subscription to the source and all observers receive the emitted values.\r\n * If refCount = true, when all observers unsubscribe from the ReplaySubject, the operator\r\n * unsubscribes from the source observable.\r\n *\r\n * This operator is enhanced version of the {@link shareReplay} operator. It adds capability\r\n * to \"reset\" the internal ReplaySubject. As a result of this any new subscribers will not\r\n * get the cached values from the internal ReplaySubject, but will wait for the source to emit.\r\n * There is no effect on the existing subscribers. Once the source emits, all observers will\r\n * get the new values.\r\n *\r\n * <b>Usage:</b>\r\n * @example\r\n *\r\n * const source$ = new Subject<number>();\r\n * const reset$ = new Subject<void>();\r\n *\r\n * const value$ = source$.pipe(\r\n * resettableShareReplay({\r\n * bufferSize: 1,\r\n * refCount: true,\r\n * reset: reset$\r\n * })\r\n * );\r\n *\r\n * // First subscription will wait for the source to emit.\r\n * const sub1 = value$.subscribe(value => console.log(\"sub1: \" + value));\r\n *\r\n * // Source emits\r\n * source$.next(1);\r\n *\r\n * // Console: sub1: 1\r\n *\r\n * // The new subscription will get the cached value\r\n * const sub2 = value$.subscribe(value => console.log(\"sub2: \" + value));\r\n * // Console: sub2: 1\r\n *\r\n * // Clear the cache\r\n * reset$.next();\r\n *\r\n * // The new subscription will NOT receive cached value\r\n * const sub3 = value$.subscribe(value => console.log(\"sub3: \" + value));\r\n *\r\n * // Source emits again. All the 3 subscriptions will receive the emitted value.\r\n * source$.next(2);\r\n *\r\n * // Console:\r\n * // sub1: 2\r\n * // sub2: 2\r\n * // sub3: 2\r\n */\r\nexport function resettableShareReplay<T>(config: ResettableShareReplayConfig): MonoTypeOperatorFunction<T> {\r\n return (source: Observable<T>) => source.lift(shareReplayOperator(config));\r\n}\r\n\r\nfunction shareReplayOperator<T>({\r\n bufferSize = Infinity,\r\n windowTime = Infinity,\r\n refCount: useRefCount,\r\n scheduler,\r\n reset: onReset,\r\n}: ResettableShareReplayConfig) {\r\n let subject: ReplaySubject<T> | undefined;\r\n let refCount = 0;\r\n let subscription: Subscription | undefined;\r\n let resetSubscription: Subscription | undefined;\r\n let hasError = false;\r\n\r\n return function shareReplayOperation(this: Subscriber<T>, source: Observable<T>) {\r\n refCount++;\r\n if (!subject || hasError) {\r\n resetSubscription = onReset.subscribe(() => {\r\n if (subject) {\r\n // Remove existing observers, if any.\r\n subject.unsubscribe();\r\n }\r\n subject = new ReplaySubject<T>(bufferSize, windowTime, scheduler);\r\n });\r\n\r\n hasError = false;\r\n subject = new ReplaySubject<T>(bufferSize, windowTime, scheduler);\r\n subscription = source.subscribe({\r\n next(value) {\r\n subject?.next(value);\r\n },\r\n error(err: unknown) {\r\n hasError = true;\r\n subject?.error(err);\r\n },\r\n complete() {\r\n subscription = undefined;\r\n subject?.complete();\r\n },\r\n });\r\n }\r\n\r\n let innerSub: Subscription | undefined = subject.subscribe(this);\r\n const resetSub = onReset.subscribe(() => {\r\n // Subscribe to the new 'subject'. 'subject' is always defined at this point\r\n innerSub = subject?.subscribe(this);\r\n });\r\n\r\n this.add(() => {\r\n refCount--;\r\n innerSub?.unsubscribe();\r\n resetSub.unsubscribe();\r\n\r\n if (subscription && useRefCount && refCount === 0) {\r\n subscription.unsubscribe();\r\n subscription = undefined;\r\n subject = undefined;\r\n resetSubscription?.unsubscribe();\r\n resetSubscription = undefined;\r\n }\r\n });\r\n };\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { ActivationError } from '../error/interfaces';\r\n\r\nexport const stringify = (value: any, propertyName = ''): string | undefined => {\r\n try {\r\n return JSON.stringify(value);\r\n } catch (e) {\r\n console.warn(`Cannot stringify property: ${propertyName}`, value, e);\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const parse = (value: any, propertyName = ''): any => {\r\n if (value) {\r\n try {\r\n return JSON.parse(value);\r\n } catch (e) {\r\n console.warn(`Cannot parse property: ${propertyName}`, value, e);\r\n }\r\n }\r\n return undefined;\r\n};\r\n\r\nexport const formatError = (error: any): ActivationError => {\r\n if (typeof error === 'object') {\r\n // if error is from http call, this is mostly the case\r\n if (error.data?.message) {\r\n return error;\r\n }\r\n\r\n // if error is a backend response of vapi type\r\n if (error.messages?.length) {\r\n return handleVapiErrorMessages(error.messages);\r\n }\r\n if (error.info?.messages?.length) {\r\n return handleVapiErrorMessages(error.info.messages);\r\n }\r\n\r\n // if error is thrown like throwError(new Error(\"error message\"))\r\n if (error.message) {\r\n return {\r\n data: {\r\n message: error.message,\r\n stackTrace: error.stack,\r\n },\r\n };\r\n }\r\n }\r\n // if error is thrown like throwError(\"error message\")\r\n if (typeof error === 'string') {\r\n return {\r\n data: {\r\n message: error,\r\n },\r\n };\r\n }\r\n // Stringify the object. That is the default formatting when all other options are exhausted.\r\n return {\r\n data: {\r\n message: stringify(error),\r\n },\r\n };\r\n};\r\n\r\nconst handleVapiErrorMessages = (messages: any[]): ActivationError => {\r\n return {\r\n data: {\r\n message: messages.map((message: any) => message?.localized || message.defaultMessage).join('\\n'),\r\n },\r\n };\r\n};\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { combineLatest, Observable, of, ReplaySubject, Subject, throwError } from 'rxjs';\r\nimport { catchError, shareReplay, switchMap, tap } from 'rxjs/operators';\r\n\r\nimport { resettableShareReplay } from './resettable-share-replay';\r\nimport {\r\n From0DepReturnSchema,\r\n From1DepReturnSchema,\r\n From2DepReturnSchema,\r\n From3DepReturnSchema,\r\n From4DepReturnSchema,\r\n From5DepReturnSchema,\r\n FromMultiDepReturnSchema,\r\n} from './var-builder-api';\r\nimport { stringify } from '../util/util';\r\n\r\n/**\r\n * Workflow variable used to define properties in the workflow model.\r\n *\r\n * <h2>Use Cases</h2>\r\n * This class is designed for the following use cases:\r\n * <ol>\r\n * <li>Create variable, that wraps generic data type. Use cases:\r\n * <ul>\r\n * <li>Pass a value as dependency to other workflow variables. When a new value is\r\n * set, the dependent variable will be reevaluated.\r\n * <li>[Future] Define mapping between workflow and step model variables.\r\n * <li>[Future] Output step model values in a reactive manner.\r\n * </ul>\r\n * @see {@link Var.of}\r\n *\r\n * <li>Create variable, that can depend on other {@link Var}s. Use cases:\r\n * <ul>\r\n * <li>Invoke async function to retrieve data.\r\n * <li>Transform the result of another {@link Var}.\r\n * <li>Extract a property of another {@link Var}.\r\n * <li>[Future] Use the result of one {@link Var} as initial value of another.\r\n * </ul>\r\n * @see {@link Var.from}\r\n * </ol>\r\n *\r\n * <h2>Using Var for Data Retrieval</h2>\r\n *\r\n * The main use case of this class is to move the data request outside of the step component.\r\n * This gives the following benefits:\r\n * - Component will not deal with asynchronous data; it will be pre-computed and injected\r\n * - Increased re-usability of steps\r\n * - Loading indicator comes for free.\r\n * - Default error handling\r\n * - Caching of calculated values and re-calculating when necessary\r\n *\r\n * <h2>Step Model Mapping</h2>\r\n *\r\n * <b>Step model property</b> can reference workflow {@link Var} property using\r\n * <code>@InputMapping</code> and <code>@OutputMapping</code> decorators.\r\n * Mapped step model property should be of type \"T\".\r\n *\r\n * <h2>Examples:</h2>\r\n *\r\n * @example Create new variable without initial value\r\n * const v1: Var<string> = Var.of();\r\n *\r\n *\r\n * @example Create new variable with initial value\r\n * const v2: Var<string> = Var.of(\"hello\");\r\n *\r\n *\r\n * @example Data Retrieval\r\n * // \"portGroupInfo\" depends on \"hostId\"\r\n * this.model.portGroupInfo = Var.from(this.model.hostId).by(\r\n * (hostId: string) => {\r\n * // Note that \"hostId\" is \"this.model.hostId.value\", pre-calculated if it is ComputedVar.\r\n * return <Observable<HostStandardSwitchData>>this.dataService.getData$(hostId, PG_INFO_PROP);\r\n * }\r\n * );\r\n *\r\n *\r\n * @example Created computed property without any dependencies\r\n * const c1: Var<number> = Var.from().by(() => of(42));\r\n *\r\n *\r\n * @example Create computed property with dependencies\r\n * const c2: Var<string> = Var.from(c1, v2).by(\r\n * (c1Val, c2Val) => of(`Result: ${c1Val} ${c2Val}`));\r\n *\r\n *\r\n * @example Transform another Var value\r\n * // Invoke transformation function on \"c2\" result.\r\n * const c3: Var<number> = Var.from(c2).by((c2Val: string) => of(c2Val.length + 3));\r\n *\r\n *\r\n * @example Extract single property from another var\r\n * const v3 = Var.of({ name: \"dummy\", value: true });\r\n *\r\n * const p1: Var<string> = Var.from(v3).pluck(\"name\");\r\n * const p2: Var<boolean> = Var.from(v3).pluck(\"value\");\r\n *\r\n * // There is a compile-time check for the specified property name.\r\n * Var.from(v3).pluck(\"non_existing_property_name\"); // compile time error\r\n *\r\n *\r\n * @example Mapping step model property to workflow model Var\r\n * class MyWizardModel {\r\n * readonly vlanIds: Var<number[]> = Var.of();\r\n * }\r\n *\r\n * // First step outputs selected vLANs\r\n * class Step1Model {\r\n * @OutputMapping({propertyName=\"vlanIds\"})\r\n * vlanIds: number[];\r\n * }\r\n *\r\n * // Second step uses the selected vLANs form the first step\r\n * class Step2Model {\r\n * @InputMapping({propertyName=\"vlanIds\"})\r\n * vlanIds: number[];\r\n * }\r\n */\r\nexport abstract class Var<T> {\r\n #value: T;\r\n\r\n protected constructor() {\r\n // no action\r\n }\r\n\r\n /**\r\n * Value of the variable. It can be undefined\r\n */\r\n get value(): T {\r\n return this.#value;\r\n }\r\n set value(newValue: T) {\r\n this.#value = newValue;\r\n this.onSetValue(newValue);\r\n }\r\n\r\n /**\r\n * Create a variable, that wraps generic data type.\r\n * @param initialValue Initial value of the {@link value} property.\r\n */\r\n static of<U>(initialValue?: U): Var<U> {\r\n const result: Var<U> = <Var<U>>new SimpleVar<U>();\r\n if (initialValue !== undefined) {\r\n result.value = initialValue;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Create a variable by applying a transition function simultaneously on zero or more\r\n * {@link Var} results. Created Var maintains a dependency chain with the Vars, it is\r\n * built from. If any of the dependent variables is changed, the transition function\r\n * will be re-evaluated. The orchestration of when this happens is done in\r\n * WorkflowModelManager.\r\n */\r\n static from(): From0DepReturnSchema;\r\n static from<D1>(dep: Var<D1>): From1DepReturnSchema<D1>;\r\n static from<D1, D2>(dep1: Var<D1>, dep2: Var<D2>): From2DepReturnSchema<D1, D2>;\r\n static from<D1, D2, D3>(dep1: Var<D1>, dep2: Var<D2>, dep3: Var<D3>): From3DepReturnSchema<D1, D2, D3>;\r\n static from<D1, D2, D3, D4>(\r\n dep1: Var<D1>,\r\n dep2: Var<D2>,\r\n dep3: Var<D3>,\r\n dep4: Var<D4>\r\n ): From4DepReturnSchema<D1, D2, D3, D4>;\r\n static from<D1, D2, D3, D4, D5>(\r\n dep1: Var<D1>,\r\n dep2: Var<D2>,\r\n dep3: Var<D3>,\r\n dep4: Var<D4>,\r\n dep5: Var<D5>\r\n ): From5DepReturnSchema<D1, D2, D3, D4, D5>;\r\n static from(...deps: Var<any>[]): FromMultiDepReturnSchema;\r\n static from(...deps: Var<any>[]): any {\r\n function fromApi(strategy: ComputeStrategy) {\r\n return {\r\n by<U>(fn: (...depValues: any[]) => Observable<U>): Var<U> {\r\n return <Var<U>>new ComputedVar<U>({\r\n dependsOn: deps,\r\n computeFn: fn,\r\n strategy: strategy,\r\n });\r\n },\r\n\r\n pluck<U>(propName: string): Var<U> {\r\n return <Var<U>>new ComputedVar<U>({\r\n dependsOn: deps,\r\n computeFn: (depValue: any) => of(depValue[propName]),\r\n strategy: strategy,\r\n });\r\n },\r\n };\r\n }\r\n\r\n return {\r\n ...fromApi(ComputeStrategy.lazy),\r\n withEagerEval: () => fromApi(ComputeStrategy.eager),\r\n withLazyEval: () => fromApi(ComputeStrategy.lazy),\r\n };\r\n }\r\n\r\n /**\r\n * Hook that is invoked when {@link value} setter is invoked. This is necessary, because\r\n * of TS issue with overriding property setters - setting the protected \"this._value\"\r\n * in a descendant class is breaking the {@link value} getter - it will always return\r\n * undefined. The TS issue is fixed in newer versions.\r\n */\r\n protected abstract onSetValue(newValue: T): void;\r\n}\r\n\r\nexport class SimpleVar<T> extends Var<T> {\r\n private static count = 0;\r\n\r\n /**\r\n * Workflow property name. Used only for troubleshooting.\r\n * Set by WorkflowModelManager.\r\n */\r\n name: string;\r\n\r\n private lastValueStr: string | undefined;\r\n\r\n #value$: Observable<T> = new ReplaySubject<T>(1);\r\n #isSet = false;\r\n\r\n constructor() {\r\n super();\r\n this.name = 'simpleVar' + SimpleVar.count++;\r\n }\r\n\r\n /**\r\n * Observable that emits every time when {@link value} property is set.\r\n */\r\n get value$(): Observable<T> {\r\n return this.#value$;\r\n }\r\n\r\n /**\r\n * Whether the value is set.\r\n * If initial value is undefined (e.g. Var.of(undefined)), this will return false.\r\n * Undefined can be set only through the {@link value} setter.\r\n */\r\n get isSet(): boolean {\r\n return this.#isSet;\r\n }\r\n\r\n /**\r\n * When {@link value} is updated without calling setter i.e., nested object of value is updated\r\n * {@link value$} does not emit updated value, call this method to emit {@link value$} with updated {@link value}\r\n */\r\n updateValueIfDirty(): void {\r\n if (this.lastValueStr !== stringify(this.value)) {\r\n this.onSetValue(this.value);\r\n }\r\n }\r\n\r\n protected onSetValue(newValue: T): void {\r\n this.#isSet = true;\r\n this.lastValueStr = stringify(newValue);\r\n (<ReplaySubject<T>>this.#value$).next(newValue);\r\n }\r\n}\r\n\r\n/**\r\n * Parameters of the {@link ComputedVar} constructor.\r\n */\r\nexport interface ComputedVarSchema<T> {\r\n /**\r\n * Properties, on which this computed property depends.\r\n * These are other workflow model properties, necessary to calculate this one.\r\n * Dependency values (i.e. {@link Var.value}) are passed to \"computeFn\"\r\n * as input parameters in the same order as they are defined here.\r\n *\r\n * Dependencies can be of type {@link ComputedVar}. This will create property\r\n * chain that will be executed whenever necessary.\r\n */\r\n dependsOn: Var<any>[];\r\n\r\n /**\r\n * Function that will calculate the value of the property based on its dependencies.\r\n *\r\n * @param dependencyValues\r\n * <b>Values</b> (i.e. {@link Var.value}) of the defined dependent\r\n * properties, passed in the same order.\r\n */\r\n computeFn: (...depValues: any[]) => Observable<T>;\r\n\r\n /**\r\n * Strategy for executing the {@link computeFn}. Implementation of the strategies is\r\n * in the WorkflowModelManager class.\r\n *\r\n * @default ComputeStrategy.lazy\r\n */\r\n strategy?: ComputeStrategy;\r\n}\r\n\r\n/**\r\n * Types of strategies that are available for a {@link ComputedVar}.\r\n * Implementation of the strategies is in the WorkflowModelManager class.\r\n */\r\nexport enum ComputeStrategy {\r\n /**\r\n * Invoke the {@link ComputedVarSchema.computeFn} as soon as its dependencies are populated.\r\n */\r\n eager = 'eager',\r\n\r\n /**\r\n * Invoke the {@link ComputedVarSchema.computeFn} on navigation to a step that has an\r\n * <code>@InputMapping</code> to the workflow Var.\r\n */\r\n lazy = 'lazy',\r\n}\r\n\r\n/**\r\n * Workflow variable that is calculated using user-defined function.\r\n * Optionally the property can depend on other properties of type {@link SimpleVar}\r\n * or {@link ComputedVar}. Dependency values (i.e. {@link Var#value})\r\n * are passed to \"computeFn\" as input parameters. \"computeFn\" must use only these input\r\n * parameters to do its business and must not access directly other model variables\r\n * (using closure).\r\n *\r\n * Computed property is executed once on {@link ComputedVar.value$} subscription and its\r\n * result is cached. It will be re-calculated if its dependencies are changed.\r\n */\r\nexport class ComputedVar<T> extends Var<T> {\r\n private static count = 0;\r\n\r\n /**\r\n * Workflow property name. Used only for troubleshooting.\r\n * Set by WorkflowModelManager.\r\n */\r\n name: string;\r\n\r\n private lastDependencyValues: string | undefined;\r\n private isLastComputationSuccessful = false;\r\n #value$: Observable<T>;\r\n\r\n constructor(private config: ComputedVarSchema<T>) {\r\n super();\r\n this.name = 'computedVar' + ComputedVar.count++;\r\n this.validateArguments(config);\r\n this.setDefaults(config);\r\n this.initValue();\r\n }\r\n\r\n /**\r\n * Subscription to this observable triggers the calculation of compute function.\r\n */\r\n get value$(): Observable<T> {\r\n return this.#value$;\r\n }\r\n\r\n /**\r\n * Return the {@link ComputeStrategy|strategy} that will be used to evaluate the\r\n * compute function.\r\n */\r\n get strategy(): ComputeStrategy {\r\n return this.config.strategy as ComputeStrategy;\r\n }\r\n\r\n /**\r\n * Return boolean whether the dependencies are satisfied for the compute function\r\n */\r\n get areDependenciesSatisfied(): boolean {\r\n const computedVarDependencySatisfied = this.config.dependsOn\r\n .filter((flowVar: Var<any>) => {\r\n return flowVar instanceof ComputedVar;\r\n })\r\n .every(curr => (<ComputedVar<any>>curr).areDependenciesSatisfied);\r\n const simpleVarDependencySatisfied = this.config.dependsOn\r\n .filter((flowVar: Var<any>) => {\r\n return flowVar instanceof SimpleVar;\r\n })\r\n .every(curr => (<SimpleVar<any>>curr).isSet);\r\n return computedVarDependencySatisfied && simpleVarDependencySatisfied;\r\n }\r\n\r\n /**\r\n * Returns the list of property names that have unsatisfied dependencies\r\n */\r\n get unsatisfiedDependencies(): string[] {\r\n const unsatisfiedDependencies: string[] = [];\r\n this.config.dependsOn.forEach(flowVar => {\r\n if (flowVar instanceof SimpleVar && !flowVar.isSet) {\r\n unsatisfiedDependencies.push(flowVar.name);\r\n } else if (flowVar instanceof ComputedVar && !flowVar.areDependenciesSatisfied) {\r\n unsatisfiedDependencies.push(flowVar.name);\r\n } else {\r\n // no action\r\n }\r\n });\r\n return unsatisfiedDependencies;\r\n }\r\n\r\n protected onSetValue(): void {}\r\n\r\n private validateArguments(arg: ComputedVarSchema<T>): void {\r\n arg.dependsOn.forEach((dependency: Var<any>, index: number) => {\r\n if (!dependency) {\r\n throw new Error(`${name}: Dependency is null or undefined at dependsOn[${index}]`);\r\n }\r\n });\r\n }\r\n\r\n private setDefaults(config: ComputedVarSchema<T>): void {\r\n config.strategy = config.strategy || ComputeStrategy.lazy;\r\n }\r\n\r\n /**\r\n * Initialize {@link _value} field.\r\n */\r\n private initValue(): void {\r\n const depValues$: Observable<any>[] = this.extractDependencyValues$();\r\n this.#value$ = depValues$.length\r\n ? this.initValueFromDependencies(depValues$)\r\n : this.config.computeFn().pipe(\r\n tap((fnResult: T) => {\r\n this.value = fnResult;\r\n }),\r\n // Execute \"computeFn\" only on first subscription. Subsequent subscriptions\r\n // will get the cached value.\r\n shareReplay(1)\r\n );\r\n }\r\n\r\n private initValueFromDependencies(depValues$: Observable<any>[]): Observable<T> {\r\n const reset$ = new Subject<void>();\r\n return combineLatest(depValues$).pipe(\r\n switchMap((depValues: any[]) => {\r\n let depValuesChanged = true;\r\n const depValuesStr = stringify(depValues);\r\n if (depValuesStr !== undefined) {\r\n if (depValues?.length && this.lastDependencyValues === depValuesStr) {\r\n depValuesChanged = false;\r\n }\r\n } else {\r\n console.warn(\r\n 'Can not detect if dependencies have changed for Var ' + this.name + '. Assume they have changed!'\r\n );\r\n }\r\n\r\n if (!this.isLastComputationSuccessful || depValuesChanged) {\r\n // Do not reset if there is no computed value yet.\r\n if (this.lastDependencyValues) {\r\n // Reset the ReplaySubject in 'resettableShareReplay'. Subscribers\r\n // will no longer get the cached value. They will be subscribed to the\r\n // new ReplaySubject, that will emit once the 'computeFn' finishes.\r\n reset$.next();\r\n }\r\n\r\n return this.config.computeFn(...depValues).pipe(\r\n tap((fnResult: T) => {\r\n this.lastDependencyValues = depValuesStr;\r\n this.isLastComputationSuccessful = true;\r\n this.value = fnResult;\r\n }),\r\n catchError((e: unknown) => {\r\n this.isLastComputationSuccessful = false;\r\n return throwError(() => e);\r\n })\r\n );\r\n }\r\n return of(this.value);\r\n }),\r\n resettableShareReplay({\r\n bufferSize: 1,\r\n // When subscriptions count reaches zero, unsubscribe from source.\r\n // The next subscription will subscribe again and will NOT reply the last value.\r\n refCount: true,\r\n reset: reset$,\r\n })\r\n );\r\n }\r\n\r\n private extractDependencyValues$(): Observable<any>[] {\r\n return this.config.dependsOn.map((flowVar: Var<any>) => {\r\n if (flowVar instanceof ComputedVar) {\r\n return flowVar.value$;\r\n } else if (flowVar instanceof SimpleVar) {\r\n return flowVar.value$;\r\n } else {\r\n // Developer error.\r\n throw new Error('Unsupported Var descendant');\r\n }\r\n });\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { HermesPopoverContent } from '@hermes-ui/angular/popover/common';\r\nimport { Subscription } from 'rxjs';\r\nimport { bufferTime, map } from 'rxjs/operators';\r\n\r\nimport { ComputedVar, SimpleVar } from '../model/var';\r\nimport { ModelChange, StepWithChanges, WorkflowModelManager } from '../model/workflow-model-manager.service';\r\n\r\n/**\r\n * Render given workflow model in a Clarity signpost.\r\n * Values, changed in the current step are marked in different color.\r\n * On next step, changed properties are reset.\r\n */\r\n@Component({\r\n selector: 'appfx-model-popup',\r\n standalone: false,\r\n templateUrl: 'workflow-model-monitor.component.html',\r\n styleUrls: ['workflow-model-monitor.component.scss'],\r\n})\r\nexport class WorkflowModelMonitorComponent implements OnInit, OnDestroy {\r\n @Input() modelMgr: WorkflowModelManager;\r\n\r\n isOpen = false;\r\n debugModel: NameValue[] = [];\r\n\r\n private subscriptions: Subscription = new Subscription();\r\n\r\n @ViewChild(HermesPopoverContent)\r\n set popoverContent(popoverContent: HermesPopoverContent) {\r\n if (popoverContent) {\r\n popoverContent.outsideClickClose = false;\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.bindModelChangeListeners();\r\n this.bindStepChangeListeners();\r\n this.initDebugModel();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscriptions.unsubscribe();\r\n }\r\n\r\n private bindModelChangeListeners(): void {\r\n this.subscriptions.add(\r\n // There could be a burst of onModelChange$ events on the same property\r\n // which can cause ExpressionChangedAfterItHasBeenCheckedError\r\n // use buffer time of 100ms\r\n this.modelMgr.onModelChange$\r\n .pipe(\r\n bufferTime(100),\r\n map(changes => ([] as ModelChange[]).concat(...changes)) // flatten the array\r\n )\r\n .subscribe(changes => this.updateDebugModel(changes))\r\n );\r\n }\r\n\r\n private bindStepChangeListeners(): void {\r\n this.subscriptions.add(\r\n this.modelMgr.onStepChange$.subscribe((value: StepWithChanges) => {\r\n this.resetDebugModel();\r\n this.updateDebugModel(value.changes);\r\n })\r\n );\r\n }\r\n\r\n private updateDebugModel(changes: ModelChange[]): void {\r\n if (!this.modelMgr.model) {\r\n return;\r\n }\r\n\r\n for (const change of changes) {\r\n const propertyModelValue = (this.modelMgr.model as any)[change.propertyName];\r\n const nameValue = this.getPropertyNameValue(change.propertyName, propertyModelValue);\r\n const existing = this.debugModel.find(value => value.name === change.propertyName);\r\n if (!nameValue) {\r\n // The property is a function. Ignore it.\r\n continue;\r\n }\r\n\r\n if (existing) {\r\n existing.value = nameValue.value;\r\n existing.changed = true;\r\n } else {\r\n nameValue.changed = true;\r\n this.debugModel.push(nameValue);\r\n // Sort model properties alphabetically.\r\n this.debugModel.sort((a: NameValue, b: NameValue) => a.name.localeCompare(b.name));\r\n }\r\n }\r\n }\r\n\r\n private initDebugModel(): void {\r\n this.debugModel = [];\r\n if (!this.modelMgr.model) {\r\n return;\r\n }\r\n\r\n for (const [name, value] of Object.entries(this.modelMgr.model)) {\r\n const nameValue = this.getPropertyNameValue(name, value);\r\n if (nameValue) {\r\n this.debugModel.push(nameValue);\r\n }\r\n }\r\n\r\n // Sort model properties alphabetically.\r\n this.debugModel.sort((a: NameValue, b: NameValue) => a.name.localeCompare(b.name));\r\n }\r\n\r\n private resetDebugModel(): void {\r\n for (const entry of this.debugModel) {\r\n entry.changed = false;\r\n }\r\n }\r\n\r\n private getPropertyNameValue(name: string, value: any): NameValue | null {\r\n let propValue = value;\r\n let strValue = '';\r\n let isComputedVar = false;\r\n let isSimpleVar = false;\r\n\r\n if (value instanceof ComputedVar) {\r\n const varValue = <ComputedVar<any>>value;\r\n propValue = varValue.value;\r\n isComputedVar = true;\r\n } else if (value instanceof SimpleVar) {\r\n const varValue = <SimpleVar<any>>value;\r\n propValue = varValue.value;\r\n isSimpleVar = true;\r\n } else {\r\n throw new Error('Unsupported step type: ' + value);\r\n }\r\n\r\n if (typeof propValue === 'object') {\r\n try {\r\n strValue = JSON.stringify(propValue);\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n } catch (_ignored) {\r\n console.warn(`Cannot stringify workflow property ${name}`);\r\n strValue = '{object}';\r\n }\r\n } else if (typeof propValue === 'function') {\r\n return null;\r\n } else {\r\n strValue = propValue + '';\r\n }\r\n\r\n return {\r\n name: name,\r\n value: strValue,\r\n computedVar: isComputedVar,\r\n simpleVar: isSimpleVar,\r\n changed: false,\r\n };\r\n }\r\n}\r\n\r\ninterface NameValue {\r\n name: string;\r\n value: string;\r\n computedVar: boolean;\r\n simpleVar: boolean;\r\n changed: boolean;\r\n}\r\n","<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n\r\n<hermes-signpost>\r\n <ng-template [(hermesIfOpen)]=\"isOpen\">\r\n <hermes-signpost-content #signpostContent hermesPosition=\"left-bottom\">\r\n <h4 class=\"title\">Workflow Model</h4>\r\n\r\n <div *ngFor=\"let prop of debugModel\" class=\"hermes-row hermes-flex-nowrap\">\r\n <div class=\"hermes-col-7\">\r\n <h6\r\n class=\"prop-name text-truncate\"\r\n title=\"{{ prop.name }}\"\r\n [class.simple-var]=\"prop.simpleVar\"\r\n [class.computed-var]=\"prop.computedVar\"\r\n >\r\n {{ prop.name }}\r\n </h6>\r\n </div>\r\n <div class=\"hermes-col-5\">\r\n <h6 class=\"prop-value text-truncate\" title=\"{{ prop.value }}\" [class.prop-changed]=\"prop.changed\">\r\n {{ prop.value }}\r\n </h6>\r\n </div>\r\n </div>\r\n </hermes-signpost-content>\r\n </ng-template>\r\n</hermes-signpost>\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\nimport { WorkflowStrings } from '@hermes-ui/angular/addons/workflow/strings';\r\n\r\nimport { ActivationError } from './interfaces';\r\n\r\n@Component({\r\n selector: 'appfx-error',\r\n standalone: false,\r\n templateUrl: 'error.component.html',\r\n styleUrls: ['error.component.scss'],\r\n})\r\nexport class ErrorComponent {\r\n @Input() error?: ActivationError;\r\n\r\n @Output() onRetry: EventEmitter<any> = new EventEmitter();\r\n\r\n constructor(public workflowStrings: WorkflowStrings) {}\r\n\r\n retry() {\r\n this.onRetry.emit();\r\n }\r\n}\r\n","<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<div class=\"hermes-row\">\r\n <div class=\"hermes-col-12\">\r\n <div class=\"card\">\r\n <div class=\"card-header\">\r\n <hermes-icon shape=\"exclamation-circle\" solid status=\"danger\" size=\"36\"></hermes-icon>\r\n <span>{{ workflowStrings.error.title }}</span>\r\n </div>\r\n <div class=\"card-block\">\r\n <div>{{ workflowStrings.error.description }}</div>\r\n <hermes-stack-view class=\"hermes-component mt-1\">\r\n <hermes-stack-block [hermesStackViewLevel]=\"1\">\r\n <hermes-stack-label>{{ workflowStrings.error.details }}</hermes-stack-label>\r\n <hermes-stack-block [hermesStackViewLevel]=\"2\" class=\"error-details-block\">\r\n <hermes-stack-content>\r\n <span>{{ error?.data?.message }}</span>\r\n <div *ngIf=\"error?.data?.stackTrace\" class=\"stack-trace mt-1\">\r\n {{ error?.data?.stackTrace }}\r\n </div>\r\n </hermes-stack-content>\r\n </hermes-stack-block>\r\n </hermes-stack-block>\r\n </hermes-stack-view>\r\n </div>\r\n <div class=\"card-footer text-right\">\r\n <button class=\"btn btn-primary\" (click)=\"retry()\">\r\n <hermes-icon shape=\"refresh\"></hermes-icon>{{ workflowStrings.error.retry }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'appfx-spinner',\r\n standalone: false,\r\n templateUrl: 'spinner.component.html',\r\n styleUrls: ['spinner.component.scss'],\r\n})\r\nexport class SpinnerComponent {\r\n /**\r\n * String that should be announced\r\n */\r\n @Input() message: string;\r\n\r\n /**\r\n * Politeness when announcing, This could be 'polite', 'assertive' or 'off'\r\n * @default 'assertive'\r\n */\r\n @Input() politeness: 'assertive' | 'polite' | 'off' = 'assertive';\r\n\r\n /**\r\n * Modal content has its own container (the modal), so that overlay spinner is already within its scope.\r\n * Specify \"false\" for non-modal cases to contain the overlay spinner within desired scope and not whole page.\r\n * @default 'true'\r\n */\r\n @Input() isModal = true;\r\n\r\n /**\r\n * Optional message to be shown below the spinner. It can be used to\r\n * report progress details.\r\n */\r\n @Input() progressDetails: string;\r\n\r\n /**\r\n * Optional flag, when set to true an Action button will be rendered below the spinner and\r\n * the progress details text. For example, this can be used to render a \"cancel\" button\r\n * below the spinner.\r\n */\r\n @Input() showActionButton: boolean;\r\n\r\n /**\r\n * The label of the action button. Applicable only when showActionButton is set to True.\r\n */\r\n @Input() actionButtonLabel: string;\r\n\r\n /**\r\n * Emits when the action button is clicked.\r\n */\r\n @Output() actionClick: EventEmitter<void> = new EventEmitter();\r\n\r\n invokeAction(): void {\r\n this.actionClick.next();\r\n }\r\n}\r\n","<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<section class=\"overlay-spinner\" *ngIf=\"!isModal; else spinner\">\r\n <ng-template [ngTemplateOutlet]=\"spinner\"></ng-template>\r\n</section>\r\n\r\n<ng-template #spinner>\r\n <hermes-spinner>\r\n {{ message }}\r\n </hermes-spinner>\r\n <span [attr.aria-live]=\"politeness\" class=\"hermes-sr-only\">\r\n {{ message }}\r\n </span>\r\n\r\n <span *ngIf=\"progressDetails\" class=\"progress-item\" aria-live=\"polite\">\r\n {{ progressDetails }}\r\n </span>\r\n\r\n <button *ngIf=\"showActionButton\" class=\"btn btn-link btn-sm\" (click)=\"invokeAction()\">\r\n {{ actionButtonLabel }}\r\n </button>\r\n</ng-template>\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, Input } from '@angular/core';\r\n\r\nimport { StepValidationState } from '../../model/step-validation-state';\r\n\r\n@Component({\r\n selector: 'appfx-validation-banner-internal',\r\n standalone: false,\r\n template: ` <hermes-alert\r\n role=\"alert\"\r\n aria-live=\"polite\"\r\n [hermesAlertType]=\"type\"\r\n *ngIf=\"items?.length\"\r\n [hermesAlertClosable]=\"closable\"\r\n [(hermesAlertClosed)]=\"closed\"\r\n >\r\n <hermes-alert-item *ngFor=\"let item of items\">\r\n <span class=\"alert-text\" [textContent]=\"item\"></span>\r\n </hermes-alert-item>\r\n </hermes-alert>`,\r\n})\r\nexport class ValidationBannerInternalComponent {\r\n @Input() type: string;\r\n\r\n @Input() closable = true;\r\n\r\n @Input() closed = false;\r\n\r\n #items: string[] = [];\r\n\r\n get items(): string[] {\r\n return this.#items;\r\n }\r\n\r\n @Input()\r\n set items(value: string[]) {\r\n this.#items = value;\r\n\r\n // every time we get new items - were remove closed state and become visible again\r\n this.closed = false;\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'appfx-validation-banner',\r\n standalone: false,\r\n template: `\r\n <appfx-validation-banner-internal\r\n *ngIf=\"state && state.errors?.length\"\r\n [items]=\"state.errors\"\r\n [type]=\"'danger'\"\r\n [closable]=\"closable\"\r\n [closed]=\"closed\"\r\n ></appfx-validation-banner-internal>\r\n <appfx-validation-banner-internal\r\n *ngIf=\"state && state.warnings?.length\"\r\n [items]=\"state.warnings\"\r\n [type]=\"'warning'\"\r\n [closable]=\"closable\"\r\n [closed]=\"closed\"\r\n ></appfx-validation-banner-internal>\r\n <appfx-validation-banner-internal\r\n *ngIf=\"state && state.infos?.length\"\r\n [items]=\"state.infos\"\r\n [type]=\"'info'\"\r\n [closable]=\"closable\"\r\n [closed]=\"closed\"\r\n ></appfx-validation-banner-internal>\r\n `,\r\n styles: [\r\n `\r\n :host {\r\n display: block;\r\n margin-bottom: var(--hermes-global-space-4);\r\n }\r\n `,\r\n ],\r\n})\r\nexport class ValidationBannerComponent {\r\n @Input() state?: StepValidationState;\r\n\r\n @Input() closable = true;\r\n\r\n get closed() {\r\n return !this.state || this.state.isEmpty();\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, ViewContainerRef } from '@angular/core';\r\nimport { Observable, of, Subscription } from 'rxjs';\r\nimport { map, take } from 'rxjs/operators';\r\n\r\nimport { ErrorComponent } from '../error/error.component';\r\nimport { ActivationError } from '../error/interfaces';\r\nimport { StepInternal } from '../model/step';\r\nimport { ModelChanges } from '../model/step-interfaces';\r\nimport { StepModel } from '../model/step.model';\r\n\r\n/**\r\n * Dynamically renders a step component specified by the step descriptor.\r\n */\r\n@Component({\r\n selector: 'appfx-step-container',\r\n standalone: false,\r\n templateUrl: 'step-container.component.html',\r\n})\r\nexport class StepContainerComponent implements OnInit, OnDestroy {\r\n @Input() step: StepInternal;\r\n\r\n @Input() description?: string;\r\n\r\n @Output() onRetry: EventEmitter<StepInternal> = new EventEmitter();\r\n\r\n // eslint-disable-next-line decorator-position/decorator-position\r\n @ViewChild('componentContainer', { read: ViewContainerRef, static: true })\r\n private componentContainer: ViewContainerRef;\r\n\r\n private pageComponent?: any;\r\n private retrySubscription: Subscription;\r\n\r\n get readyToComplete(): boolean {\r\n if (this.pageComponent?.model) {\r\n const stepModel: StepModel = this.pageComponent.model;\r\n return stepModel.readyToComplete === undefined ? true : stepModel.readyToComplete;\r\n }\r\n return true;\r\n }\r\n\r\n private get isValid(): boolean {\r\n return this.readyToComplete && this.isPageStateValid;\r\n }\r\n\r\n private get isPageStateValid(): boolean {\r\n if (this.pageComponent?.model?.validationState) {\r\n return this.pageComponent.model.validationState.isValid();\r\n }\r\n return true;\r\n }\r\n\r\n ngOnInit(): void {\r\n if (!this.step.instantiateLazy) {\r\n this.loadComponent();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.unsubscribeRetry();\r\n }\r\n\r\n onActivate(\r\n error?: ActivationError,\r\n stepModelChanges?: ModelChanges,\r\n recreateComponent?: boolean,\r\n resetValidationState = true\r\n ): void {\r\n this.unsubscribeRetry();\r\n if (error) {\r\n this.loadErrorComponent(error);\r\n return;\r\n }\r\n\r\n if (recreateComponent || (!this.pageComponent && !!this.step.instantiateLazy)) {\r\n this.loadComponent();\r\n }\r\n if (!this.pageComponent) {\r\n return;\r\n }\r\n if (resetValidationState) {\r\n this.resetValidationState();\r\n }\r\n if (typeof this.pageComponent.activate === 'function') {\r\n this.pageComponent.activate(stepModelChanges);\r\n }\r\n }\r\n\r\n onCommit(): Observable<boolean> {\r\n if (!this.pageComponent) {\r\n return of(true);\r\n }\r\n if (typeof this.pageComponent.validate === 'function') {\r\n const result = this.pageComponent.validate();\r\n if (!(result instanceof Observable)) {\r\n throw new Error(\"'validate' function must return Observable<boolean>\");\r\n }\r\n return result.pipe(map((isValid: boolean) => isValid && this.isValid));\r\n }\r\n return of(this.isValid);\r\n }\r\n\r\n private loadComponent(): void {\r\n if (!this.step.componentClass) {\r\n return;\r\n }\r\n this.componentContainer.clear();\r\n const cr = this.componentContainer.createComponent(this.step.componentClass);\r\n this.pageComponent = cr.instance;\r\n this.pageComponent.model = this.step.modelInstance;\r\n }\r\n\r\n private loadErrorComponent(error: ActivationError): void {\r\n this.componentContainer.clear();\r\n const cr = this.componentContainer.createComponent(ErrorComponent);\r\n this.pageComponent = cr.instance;\r\n (this.pageComponent as ErrorComponent).error = error;\r\n this.retrySubscription = (this.pageComponent as ErrorComponent).onRetry\r\n .pipe(take(1))\r\n .subscribe(() => this.onRetry.emit(this.step));\r\n }\r\n\r\n private unsubscribeRetry(): void {\r\n if (this.retrySubscription && !this.retrySubscription.closed) {\r\n this.retrySubscription.unsubscribe();\r\n }\r\n }\r\n\r\n private resetValidationState(): void {\r\n if (this.pageComponent?.model) {\r\n this.pageComponent.model.readyToComplete = true;\r\n if (this.pageComponent.model.validationState) {\r\n this.pageComponent.model.validationState.errors = [];\r\n this.pageComponent.model.validationState.warnings = [];\r\n this.pageComponent.model.validationState.infos = [];\r\n }\r\n }\r\n }\r\n}\r\n","<!--\r\n ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n ~ This software is released under MIT license.\r\n ~ The full license information can be found in LICENSE in the root directory of this project.\r\n -->\r\n<div class=\"pr-1 hermes-flex-grow-0 hermes-flex-shrink-0\">\r\n <span *ngIf=\"description\">{{ description }}</span>\r\n <appfx-validation-banner\r\n *ngIf=\"step.modelInstance?.validationState?.isEmpty() === false\"\r\n [state]=\"step.modelInstance?.validationState\"\r\n >\r\n </appfx-validation-banner>\r\n</div>\r\n<div class=\"content-container hermes-flex-column hermes-flex-grow-1 hermes-flex-shrink-1\">\r\n <ng-template #componentContainer> </ng-template>\r\n</div>\r\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { CommonModule } from '@angular/common';\nimport { InjectionToken, NgModule, Optional, SkipSelf } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { A11yModule } from '@hermes-ui/angular/addons/a11y';\nimport { PropertyViewModule } from '@hermes-ui/angular/addons/property-view';\nimport { WorkflowStrings } from '@hermes-ui/angular/addons/workflow/strings';\nimport { HermesStackViewModule } from '@hermes-ui/angular/data/stack-view';\nimport { HermesAlertModule } from '@hermes-ui/angular/emphasis/alert';\nimport {\n angleIcon,\n barsIcon,\n HermesIcons,\n HermesIcon,\n exclamationCircleIcon,\n pencilIcon,\n refreshIcon,\n successStandardIcon,\n} from '@hermes-ui/angular/icon';\nimport { HermesSignpostModule } from '@hermes-ui/angular/popover/signpost';\nimport { HermesSpinnerModule } from '@hermes-ui/angular/progress/spinner';\n\nimport { WorkflowConfigurationService } from './config/workflow-configuration.service';\nimport { WorkflowModelMonitorComponent } from './debug/workflow-model-monitor.component';\nimport { ErrorComponent } from './error/error.component';\nimport { SpinnerComponent } from './spinner/spinner.component';\nimport { StepContainerComponent } from './step-container/step-container.component';\nimport {\n ValidationBannerComponent,\n ValidationBannerInternalComponent,\n} from './step-container/validation-banner/validation-banner.component';\n\n/**\n * This token is used to determine if the Wizard/Dialog is opened through ModalService.\n * If it is not injected (value is null), this means the the component is used directly,\n * without ModalService.\n * If the value is true, this means that the component is opened using\n * ModalService.openModalComponent API.\n * If the value is false, this means that the component is opened using\n * ModalService.openModal API (which is not correct).\n */\nexport const modalServiceToken = new InjectionToken('ModalService#openModalComponent');\n\nexport function workflowConfigurationServiceFactory(existing: WorkflowConfigurationService) {\n return existing || new WorkflowConfigurationService();\n}\n\nexport function workflowStringsServiceFactory(existing: WorkflowStrings) {\n return existing || new WorkflowStrings();\n}\n\nconst components = [\n ValidationBannerComponent,\n ValidationBannerInternalComponent,\n StepContainerComponent,\n WorkflowModelMonitorComponent,\n ErrorComponent,\n SpinnerComponent,\n];\n\nconst clarityDependencies = [HermesAlertModule, HermesIcon, HermesSpinnerModule, HermesStackViewModule, HermesSignpostModule];\n\nconst addonsDependencies = [PropertyViewModule, A11yModule];\n\n@NgModule({\n imports: [...addonsDependencies, ...clarityDependencies, CommonModule, FormsModule, ReactiveFormsModule],\n declarations: [...components],\n providers: [\n {\n // This pattern allows the importer of this module to specify its own WorkflowConfigurationService.\n provide: WorkflowConfigurationService,\n useFactory: workflowConfigurationServiceFactory,\n deps: [[new Optional(), new SkipSelf(), WorkflowConfigurationService]],\n },\n {\n // This pattern allows the importer of this module to specify its own WorkflowStrings.\n provide: WorkflowStrings,\n useFactory: workflowStringsServiceFactory,\n deps: [[new Optional(), new SkipSelf(), WorkflowStrings]],\n },\n ],\n exports: [...components],\n})\nexport class AppfxWorkflowCoreModule {\n constructor() {\n HermesIcons.addIcons(angleIcon, barsIcon, exclamationCircleIcon, pencilIcon, refreshIcon, successStandardIcon);\n }\n}\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport 'reflect-metadata';\r\n\r\nexport interface InputMappings {\r\n [propName: string]: InputMappingMetadata;\r\n}\r\n\r\nconst inputMappingMetadataKey = 'InputMapping';\r\n\r\nexport interface InputMappingMetadata extends InDecoratorSchema {\r\n /**\r\n * The name of the property of the object from where to extract the value and inject\r\n * it in the decorated property.\r\n */\r\n propertyName: string;\r\n}\r\n\r\nexport interface InDecoratorSchema {\r\n /**\r\n * If the property does not need to be always provided set optional to true\r\n */\r\n optional?: boolean;\r\n}\r\n\r\n/**\r\n * Decorates property with input mapping information\r\n * which is used for injecting property value from another object.\r\n */\r\n// TODO: see how decorators can be called out to apply class-like conventions.\r\n\r\nexport function In(inputMapping?: InDecoratorSchema) {\r\n return function (prototype: any, srcPropName: string) {\r\n const mapping: InputMappingMetadata = {\r\n propertyName: srcPropName,\r\n optional: inputMapping && inputMapping.optional,\r\n };\r\n let mappings: any = Reflect.getMetadata(inputMappingMetadataKey, prototype);\r\n if (!mappings) {\r\n mappings = {};\r\n Reflect.defineMetadata(inputMappingMetadataKey, mappings, prototype);\r\n }\r\n mappings[srcPropName] = mapping;\r\n };\r\n}\r\n\r\n/**\r\n * Gets all input property mappings for the given object.\r\n */\r\nexport function getInputMappings(target: any): InputMappings {\r\n const mappings = Reflect.getMetadata(inputMappingMetadataKey, target.constructor.prototype);\r\n if (mappings) {\r\n // Return deep clone of the mappings to protect them from accidental alternation.\r\n return JSON.parse(JSON.stringify(mappings));\r\n }\r\n return mappings;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport 'reflect-metadata';\r\n\r\nexport interface OutputMappings {\r\n [propName: string]: OutputMappingMetadata;\r\n}\r\n\r\nconst outputMappingMetadataKey = 'OutputMapping';\r\n\r\nexport interface OutputMappingMetadata {\r\n /**\r\n * The name of the property where the value from the decorated property will be\r\n * ejected/output.\r\n */\r\n propertyName: string;\r\n}\r\n\r\n/**\r\n * Decorates property with output mapping information\r\n * which is used for ejecting/outputting property value into another object.\r\n */\r\n// TODO: see how decorators can be called out to apply class-like conventions.\r\n\r\nexport function Out() {\r\n return function (prototype: any, srcPropName: string) {\r\n const mapping: OutputMappingMetadata = {\r\n propertyName: srcPropName,\r\n };\r\n let mappings: any = Reflect.getMetadata(outputMappingMetadataKey, prototype);\r\n if (!mappings) {\r\n mappings = {};\r\n Reflect.defineMetadata(outputMappingMetadataKey, mappings, prototype);\r\n }\r\n mappings[srcPropName] = mapping;\r\n };\r\n}\r\n\r\n/**\r\n * Gets all output property mappings for the given object.\r\n */\r\nexport function getOutputMappings(target: any): OutputMappings {\r\n const mappings = Reflect.getMetadata(outputMappingMetadataKey, target.constructor.prototype);\r\n if (mappings) {\r\n // Return deep clone of the mappings to protect them from accidental alternation.\r\n return JSON.parse(JSON.stringify(mappings));\r\n }\r\n return mappings;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { getInputMappings, InputMappings } from './input-mapping';\r\nimport { getOutputMappings, OutputMappings } from './output-mapping';\r\n\r\n/**\r\n * Class to define property mappings between step model and wizard model.\r\n *\r\n * Note: If property name of both Step model and Wizard model is the same, no need to define this external mappings.\r\n * @template S any object that has @In/@Out decorators\r\n * @template W Wizard Model\r\n */\r\nexport class Mappings<S, W> {\r\n private mappings: PropertyMappings = {};\r\n\r\n /**\r\n * step model property name to which wizard model {@link wizardModelPropertyName} to be mapped\r\n * @param stepModelPropertyName Step model property name to map\r\n */\r\n mapStepProp(stepModelPropertyName: keyof S) {\r\n // TODO: fix the above exclusion\r\n\r\n const self = this;\r\n return {\r\n /**\r\n * wizard model property name to which step model {@link stepModelPropertyName} to be mapped\r\n * @param wizardModelPropertyName Wizard model property name to map\r\n */\r\n to(wizardModelPropertyName: keyof W): Mappings<S, W> {\r\n if (self.mappings[stepModelPropertyName as string]) {\r\n throw new Error(`A mapping for property ${String(stepModelPropertyName)} is defined more than once.`);\r\n } else if (Object.values(self.mappings).indexOf(wizardModelPropertyName as string) >= 0) {\r\n throw new Error(`A mapping for property ${String(wizardModelPropertyName)} is defined more than once.`);\r\n } else {\r\n // no action\r\n }\r\n self.mappings[stepModelPropertyName as string] = wizardModelPropertyName as string;\r\n return self;\r\n },\r\n };\r\n }\r\n\r\n /**\r\n * Validates input and output mappings property names with the mappings defined by {@link mapStepProp} method.\r\n * @param model Step model\r\n */\r\n validate(model: any) {\r\n if (model) {\r\n const inputMappings = getInputMappings(model);\r\n const outputMappings = getOutputMappings(model);\r\n const missingMappings = this.validateMappings(inputMappings, outputMappings);\r\n if (missingMappings.length) {\r\n throw new Error(`No @In or @Out decorator found for property names ` + JSON.stringify(missingMappings));\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Returns property mappings defined.\r\n */\r\n getPropertyMappings(): PropertyMappings {\r\n return { ...this.mappings };\r\n }\r\n\r\n private validateMappings(inputMappings: InputMappings, outputMappings: OutputMappings): string[] {\r\n const defaultMappings = {\r\n ...inputMappings,\r\n ...outputMappings,\r\n };\r\n return Object.keys(this.mappings).filter(key => !defaultMappings[key]);\r\n }\r\n}\r\n\r\n/**\r\n * Interface which represents property Mappings\r\n */\r\nexport interface PropertyMappings {\r\n /**\r\n * @param {string} propertyName Step model property name\r\n */\r\n [propertyName: string]: string;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { combineLatest, Observable, of, Subject, Subscription } from 'rxjs';\r\nimport { map, startWith } from 'rxjs/operators';\r\n\r\nimport { Step, StepInternal } from './step';\r\nimport { ComputedVar, SimpleVar } from './var';\r\n\r\n@Injectable()\r\nexport class RelevanceService {\r\n loading = false;\r\n\r\n private isRelevantSubs: Subscription[] = [];\r\n private stepRelevanceChange$ = new Subject<StepInternal>();\r\n\r\n #steps: StepInternal[] = [];\r\n\r\n /**\r\n * Workflow steps.\r\n */\r\n set steps(steps: Step[]) {\r\n this.#steps = steps || [];\r\n this.unbindIsRelevantListeners();\r\n this.bindIsRelevantListeners();\r\n }\r\n\r\n /**\r\n * Checks for relevance check to complete.\r\n */\r\n checkComplete$(): Observable<Step[]> {\r\n const relevantVarValues = this.#steps\r\n .filter(step => step.isRelevant instanceof ComputedVar && step.isRelevant.areDependenciesSatisfied)\r\n .map(step => (<ComputedVar<boolean>>step.isRelevant).value$);\r\n let stepsObservable: Observable<StepInternal[]>;\r\n if (relevantVarValues.length) {\r\n this.loading = true;\r\n stepsObservable = combineLatest(relevantVarValues).pipe(\r\n map(() => {\r\n this.loading = false;\r\n return this.#steps;\r\n })\r\n );\r\n } else {\r\n stepsObservable = of(this.#steps);\r\n }\r\n return stepsObservable;\r\n }\r\n\r\n destroy(): void {\r\n this.#steps = [];\r\n this.unbindIsRelevantListeners();\r\n }\r\n\r\n /**\r\n * Emits step which relevance has been changed\r\n */\r\n onStepRelevanceChange$(): Observable<StepInternal> {\r\n return this.stepRelevanceChange$.asObservable();\r\n }\r\n\r\n private bindIsRelevantListeners(): void {\r\n return this.#steps\r\n .filter(step => step.isRelevant)\r\n .forEach((step: StepInternal) => {\r\n if (step.isRelevant instanceof ComputedVar || step.isRelevant instanceof SimpleVar) {\r\n this.isRelevantSubs.push(\r\n step.isRelevant.value$\r\n .pipe(\r\n startWith(false) // Assume isRelevant is false by default.\r\n )\r\n .subscribe(isRelevant => {\r\n const oldValue = step.isSkipped;\r\n step.isSkipped = !isRelevant;\r\n if (oldValue !== step.isSkipped) {\r\n this.stepRelevanceChange$.next(step);\r\n }\r\n })\r\n );\r\n }\r\n });\r\n }\r\n\r\n private unbindIsRelevantListeners(): void {\r\n this.isRelevantSubs.forEach(s => s.unsubscribe());\r\n this.isRelevantSubs = [];\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport class StepValidationState {\r\n #errors: string[];\r\n #warnings: string[];\r\n #infos: string[];\r\n\r\n constructor(errors: string[] = [], warnings: string[] = [], infos: string[] = []) {\r\n this.#errors = errors;\r\n this.#warnings = warnings;\r\n this.#infos = infos;\r\n }\r\n\r\n get errors(): string[] {\r\n return this.#errors || [];\r\n }\r\n\r\n set errors(messages: string[]) {\r\n this.#errors = messages;\r\n }\r\n\r\n get warnings(): string[] {\r\n return this.#warnings || [];\r\n }\r\n\r\n set warnings(messages: string[]) {\r\n this.#warnings = messages;\r\n }\r\n\r\n get infos(): string[] {\r\n return this.#infos || [];\r\n }\r\n\r\n set infos(messages: string[]) {\r\n this.#infos = messages;\r\n }\r\n\r\n isEmpty(): boolean {\r\n return this.errors.length === 0 && this.warnings.length === 0 && this.infos.length === 0;\r\n }\r\n\r\n isValid(): boolean {\r\n return !this.#errors || this.#errors.length === 0;\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\n/**\r\n * Options:\r\n * - `horizontal`: Default layout with horizontal alignment.\r\n * - `vertical`: Tabs aligned vertically, typically for sidebar navigation.\r\n * - `secondary`: Tabs styled horizontally as Clarity buttons for a secondary level of navigation.\r\n */\r\nexport enum TabLayout {\r\n horizontal = 'horizontal',\r\n vertical = 'vertical',\r\n secondary = 'horizontal-secondary',\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { BehaviorSubject, combineLatest, Observable, of, Subject, Subscription, throwError } from 'rxjs';\r\nimport { catchError, map, pairwise, startWith, take, tap } from 'rxjs/operators';\r\n\r\nimport { StepInternal } from './step';\r\nimport { ModelChanges } from './step-interfaces';\r\nimport { StepModel } from './step.model';\r\nimport { ComputedVar, ComputeStrategy, SimpleVar } from './var';\r\nimport { WorkflowModel } from './workflow.model';\r\nimport { ActivationError } from '../error/interfaces';\r\nimport { getInputMappings, InputMappingMetadata, InputMappings } from '../mappings/input-mapping';\r\nimport { Mappings } from '../mappings/mappings';\r\nimport { getOutputMappings, OutputMappingMetadata, OutputMappings } from '../mappings/output-mapping';\r\nimport { formatError, parse, stringify } from '../util/util';\r\n\r\nexport class ModelChange {\r\n constructor(\r\n public propertyName: string,\r\n public oldValue: any,\r\n public newValue: any\r\n ) {}\r\n}\r\n\r\nexport interface StepWithChanges {\r\n step?: StepInternal;\r\n changes: ModelChange[];\r\n}\r\n\r\n@Injectable()\r\nexport class WorkflowModelManager {\r\n /**\r\n * Emit when {@link injectPropertiesToPendingStep} method completes.\r\n * Emitted value contains the pending step and calculated properties for it.\r\n */\r\n onStepChange$ = new Subject<StepWithChanges>();\r\n\r\n /**\r\n * Emit when one or more workflow properties are changed.\r\n */\r\n onModelChange$ = new Subject<Array<ModelChange>>();\r\n\r\n /**\r\n * Emit \"true\" before start of computed properties evaluation.\r\n * Emit \"false\" when computed properties are evaluated.\r\n */\r\n loading$ = new BehaviorSubject<boolean>(false);\r\n\r\n private stepModelBindings: Map<StepModel, Subscription> = new Map();\r\n private workflowModelSubs: Subscription[] = [];\r\n private wizardModel: any;\r\n // Contains stringified values of the 'wizardModel' properties.\r\n private wizardModelOldValues: any = {};\r\n // Contains stringified values of the input step model properties.\r\n private stepModelLastValuesIn: Map<StepModel, any> = new Map();\r\n\r\n #steps: StepInternal[];\r\n\r\n /**\r\n * Workflow steps.\r\n */\r\n set steps(value: StepInternal[]) {\r\n this.#steps = value;\r\n this.initStepModels();\r\n this.onStepsOrModelChange();\r\n }\r\n\r\n /**\r\n * Workflow model.\r\n */\r\n get model(): WorkflowModel {\r\n return this.wizardModel;\r\n }\r\n\r\n set model(value: WorkflowModel) {\r\n if (typeof value === 'function' || Array.isArray(value)) {\r\n throw new Error('Workflow model cannot be a function or array.');\r\n }\r\n if (!value) {\r\n console.warn('Workflow model not initialized.!');\r\n }\r\n this.wizardModel = value;\r\n this.wizardModelOldValues = {};\r\n this.onStepsOrModelChange();\r\n }\r\n\r\n destroy(): void {\r\n this.unbindStepModelListeners();\r\n this.unbindWorkflowModelListeners();\r\n }\r\n\r\n /**\r\n * Ejects properties from provided step model to wizard model.\r\n */\r\n ejectPropertiesFromCurrentStep(currentStep: StepInternal | undefined): void {\r\n if (!this.wizardModel) {\r\n return;\r\n }\r\n\r\n if (!currentStep?.modelInstance) {\r\n return;\r\n }\r\n\r\n const outputMappings: OutputMappings = this.getOutputMappings(currentStep.modelInstance, currentStep.mappings);\r\n if (!outputMappings) {\r\n return;\r\n }\r\n\r\n const changes: (ModelChange | null)[] = [];\r\n for (const [key, outputMapping] of Object.entries(outputMappings)) {\r\n const stepModelValue = (currentStep.modelInstance as any)[key];\r\n const change = this.updateWizardModel(stepModelValue, outputMapping);\r\n changes.push(change);\r\n }\r\n\r\n this.emitModelChange(changes);\r\n }\r\n\r\n /**\r\n * Calculate the {@link ComputedVar} properties, if any.\r\n * Then inject properties to the provided step model.\r\n */\r\n injectPropertiesToPendingStep(pendingStep: StepInternal | undefined): Observable<InjectPropertiesResult> {\r\n if (!this.wizardModel) {\r\n return of({\r\n pendingStep: pendingStep,\r\n });\r\n }\r\n return this.injectPropertiesToPendingStepInternal(pendingStep).pipe(\r\n tap((result: InjectPropertiesInternalResult) => {\r\n this.emitModelChange(result.wizardModelChanges);\r\n this.onStepChange$.next({\r\n step: pendingStep,\r\n changes: result.wizardModelChanges,\r\n });\r\n }),\r\n map((result: InjectPropertiesInternalResult) => {\r\n return {\r\n pendingStep: pendingStep,\r\n stepModelChanges: result.stepModelChanges,\r\n recreateComponent: result.recreateComponent,\r\n };\r\n }),\r\n catchError((error: unknown) => {\r\n console.error(error);\r\n return of({\r\n pendingStep: pendingStep,\r\n error: formatError(error),\r\n });\r\n })\r\n );\r\n }\r\n\r\n private onStepsOrModelChange(): void {\r\n // Clear bindings to old steps/model.\r\n this.unbindStepModelListeners();\r\n this.unbindWorkflowModelListeners();\r\n this.stepModelLastValuesIn.clear();\r\n\r\n if (!this.#steps || !this.wizardModel) {\r\n return;\r\n }\r\n // Both steps and model is set.\r\n this.bindStepModelListeners();\r\n this.processWorkflowModel();\r\n }\r\n\r\n private initStepModels() {\r\n (this.#steps || [])\r\n .filter(step => !step.instantiateLazy) // if instantiateLazy, init later when required ( in injectPropertiesToPendingStepInternal )\r\n .forEach(step => {\r\n this.initStepModel(step);\r\n });\r\n }\r\n\r\n private initStepModel(step: StepInternal): StepModel | undefined {\r\n if (typeof step.model === 'function') {\r\n step.modelInstance = step.model();\r\n } else {\r\n if (step.recreateComponent) {\r\n throw new Error('When recreateComponent is defined, model should be a factory function');\r\n }\r\n step.modelInstance = step.model;\r\n }\r\n if (step.mappings) {\r\n step.mappings.validate(step.modelInstance);\r\n }\r\n return step.modelInstance;\r\n }\r\n\r\n private bindStepModelListeners(): void {\r\n for (const page of this.#steps) {\r\n this.bindStepModelListener(page);\r\n }\r\n }\r\n\r\n private bindStepModelListener(page: StepInternal): void {\r\n if (!page.modelInstance) {\r\n return;\r\n }\r\n\r\n const mappings: OutputMappings = this.getOutputMappings(page.modelInstance, page.mappings);\r\n if (!mappings) {\r\n return;\r\n }\r\n const subscription: Subscription = new Subscription();\r\n for (const [propertyName, outputMapping] of Object.entries(mappings)) {\r\n const propertyValue = (page.modelInstance as any)[propertyName];\r\n if (propertyValue instanceof Observable) {\r\n // TODO: Deprecated; to be removed!\r\n console.warn(\r\n `Step ${page.title} has property ${propertyName}: Observable.` +\r\n 'Using Observable in Step models is deprecated and will be removed soon. ' +\r\n 'Use Var.from() instead'\r\n );\r\n\r\n subscription.add(\r\n propertyValue.subscribe(value => {\r\n if (this.wizardModel) {\r\n const change = this.updateWizardModel(value, outputMapping);\r\n this.emitModelChange([change]);\r\n }\r\n })\r\n );\r\n } else if (propertyValue instanceof SimpleVar) {\r\n subscription.add(\r\n propertyValue.value$.subscribe(value => {\r\n if (this.wizardModel) {\r\n const change = this.updateWizardModel(value, outputMapping);\r\n this.emitModelChange([change]);\r\n }\r\n })\r\n );\r\n } else {\r\n // no action\r\n }\r\n }\r\n this.stepModelBindings.set(page.modelInstance, subscription);\r\n }\r\n\r\n private unbindStepModelListeners(): void {\r\n this.stepModelBindings.forEach(s => s.unsubscribe());\r\n this.stepModelBindings.clear();\r\n }\r\n\r\n private unbindStepModelListener(page: StepInternal) {\r\n if (!page.modelInstance) {\r\n return;\r\n }\r\n const stepModelBinding = this.stepModelBindings.get(page.modelInstance);\r\n if (stepModelBinding) {\r\n stepModelBinding.unsubscribe();\r\n this.stepModelBindings.delete(page.modelInstance);\r\n }\r\n }\r\n\r\n private processWorkflowModel(): void {\r\n for (const [propName, propValue] of Object.entries(this.wizardModel)) {\r\n if (propValue instanceof SimpleVar) {\r\n propValue.name = propName;\r\n } else if (propValue instanceof ComputedVar) {\r\n propValue.name = propName;\r\n if (propValue.strategy === ComputeStrategy.eager) {\r\n this.workflowModelSubs.push(\r\n propValue.value$.pipe(startWith(undefined), pairwise()).subscribe(([prevValue, newValue]) => {\r\n const change = new ModelChange(propName, prevValue, newValue);\r\n this.emitModelChange([change]);\r\n })\r\n );\r\n }\r\n } else {\r\n // no action\r\n }\r\n }\r\n }\r\n\r\n private unbindWorkflowModelListeners(): void {\r\n this.workflowModelSubs.forEach(s => s.unsubscribe());\r\n this.workflowModelSubs = [];\r\n }\r\n\r\n private updateWizardModel(newValue: any, outputMapping: OutputMappingMetadata): ModelChange | null {\r\n if (newValue instanceof Observable) {\r\n // TODO: This case is deprecated and will be removed soon.\r\n return null;\r\n }\r\n\r\n if (newValue instanceof SimpleVar) {\r\n // Wizard model is updated through bindings.\r\n // Make sure that the SimpleVar is not dirty, i.e. value is not changed without calling the \"value\" setter.\r\n newValue.updateValueIfDirty();\r\n return null;\r\n }\r\n const outputMappingPropertyName = outputMapping.propertyName;\r\n const oldValue = this.wizardModel[outputMappingPropertyName];\r\n if (oldValue instanceof ComputedVar) {\r\n throw new Error(`Cannot update ${outputMappingPropertyName} in WizardModel, because it is ComputedVar.`);\r\n } else if (oldValue instanceof SimpleVar) {\r\n this.wizardModel[outputMappingPropertyName].value = newValue;\r\n } else {\r\n this.wizardModel[outputMappingPropertyName] = newValue;\r\n }\r\n\r\n const newValueStr = stringify(newValue, outputMappingPropertyName);\r\n const oldValueStr = this.wizardModelOldValues[outputMappingPropertyName];\r\n if (oldValueStr !== newValueStr) {\r\n this.wizardModelOldValues[outputMappingPropertyName] = newValueStr;\r\n const oldValueParsed = parse(oldValueStr, outputMappingPropertyName);\r\n return new ModelChange(outputMappingPropertyName, oldValueParsed, newValue);\r\n }\r\n return null;\r\n }\r\n\r\n private injectPropertiesToPendingStepInternal(\r\n pendingStep: StepInternal | undefined\r\n ): Observable<InjectPropertiesInternalResult> {\r\n const defaultResult: InjectPropertiesInternalResult = {\r\n wizardModelChanges: [],\r\n stepModelChanges: {},\r\n };\r\n const result: Observable<InjectPropertiesInternalResult> = of(defaultResult);\r\n if (!pendingStep) {\r\n return result;\r\n }\r\n\r\n let createdModelInstance = false;\r\n if (pendingStep.instantiateLazy && !pendingStep.modelInstance) {\r\n // If lazy instantiated, modelInstance may not be initialized yet.\r\n this.initStepModel(pendingStep);\r\n this.bindStepModelListener(pendingStep);\r\n createdModelInstance = true;\r\n }\r\n const stepModel = pendingStep.modelInstance;\r\n if (!stepModel) {\r\n return result;\r\n }\r\n\r\n const inputMappings: InputMappings = this.getInputMappings(stepModel, pendingStep.mappings);\r\n if (!inputMappings) {\r\n // If there are no input mappings and recreateComponent is true, then re-create modelInstance\r\n // Since, there are no input properties, pass empty object as modelChanges to recreateComponent method.\r\n if (pendingStep.recreateComponent && pendingStep.recreateComponent({})) {\r\n this.unbindStepModelListener(pendingStep);\r\n this.initStepModel(pendingStep);\r\n this.bindStepModelListener(pendingStep);\r\n return of({\r\n ...defaultResult,\r\n recreateComponent: true,\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n const wizardProps: PropertyWrapper[] = Object.entries(inputMappings).map(([stepModelPropName, inputMapping]) => {\r\n return this.wrapWorkflowPropertyInObservable(stepModelPropName, inputMapping);\r\n });\r\n const wizardProps$: Observable<any>[] = wizardProps.map(wrapper => wrapper.value$);\r\n\r\n const wizardCompProps = Object.keys(this.wizardModel).filter(\r\n propName => this.wizardModel[propName] instanceof ComputedVar\r\n );\r\n const oldWizardModelCompPropValues = this.extractModelProperties(this.wizardModel, wizardCompProps);\r\n if (oldWizardModelCompPropValues.length) {\r\n this.loading$.next(true);\r\n }\r\n const stepInputProperties = Object.keys(inputMappings);\r\n const oldStepModelValues = this.extractLastStepInputValues(stepModel, stepInputProperties);\r\n\r\n return combineLatest(wizardProps$).pipe(\r\n take(1), // apply the 'take' operator first to avoid recursive calls when both @In and @Out are declared on same property\r\n map((propValues: any[]) => {\r\n // Inject workflow values into the step model.\r\n this.injectWizardPropertiesToStepModel(wizardProps, propValues, stepModel);\r\n\r\n const newStepModelValues = this.extractModelProperties(stepModel, stepInputProperties);\r\n const stepModelChangesList = this.diffPropertyValues(oldStepModelValues, newStepModelValues);\r\n const stepModelChanges = (stepModelChangesList || []).reduce<ModelChanges>((res, curr) => {\r\n res[curr.propertyName] = curr;\r\n return res;\r\n }, {});\r\n\r\n // if recreateComponent, create new model.\r\n const recreateComponent = pendingStep.recreateComponent && pendingStep.recreateComponent(stepModelChanges);\r\n if (recreateComponent && !createdModelInstance) {\r\n this.unbindStepModelListener(pendingStep);\r\n const newStepModel = this.initStepModel(pendingStep);\r\n this.bindStepModelListener(pendingStep);\r\n this.injectWizardPropertiesToStepModel(wizardProps, propValues, newStepModel, pendingStep.mappings);\r\n }\r\n\r\n // Detect changes in all computed properties, because dependent computed\r\n // properties might also have changed.\r\n const newWizardModelCompPropValues = this.extractModelProperties(this.wizardModel, wizardCompProps);\r\n const wizardModelChanges = this.diffPropertyValues(oldWizardModelCompPropValues, newWizardModelCompPropValues);\r\n return {\r\n wizardModelChanges: wizardModelChanges,\r\n stepModelChanges: stepModelChanges,\r\n recreateComponent: recreateComponent,\r\n };\r\n }),\r\n tap(() => this.loading$.next(false)),\r\n catchError((error: unknown) => {\r\n this.loading$.next(false);\r\n return throwError(() => error);\r\n })\r\n );\r\n }\r\n\r\n private injectWizardPropertiesToStepModel(\r\n wizardProps: PropertyWrapper[],\r\n propValues: any[],\r\n stepModel: any,\r\n mappings?: Mappings<any, any>\r\n ) {\r\n wizardProps.forEach((wrapper: PropertyWrapper, index: number) => {\r\n const stepModelNewValue = propValues[index];\r\n this.updateStepModel(stepModel, wrapper.name, stepModelNewValue);\r\n });\r\n\r\n this.cacheStepModelInputProps(stepModel, mappings);\r\n }\r\n\r\n private wrapWorkflowPropertyInObservable(\r\n stepModelPropName: string,\r\n inputMapping: InputMappingMetadata\r\n ): PropertyWrapper {\r\n const wizardProp = this.wizardModel[inputMapping.propertyName];\r\n if (\r\n !Object.prototype.hasOwnProperty.call(this.wizardModel, inputMapping.propertyName) &&\r\n !Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.wizardModel), inputMapping.propertyName)\r\n ) {\r\n return this.wrapOptionalWorkflowPropertyInObservable(stepModelPropName, inputMapping);\r\n } else if (wizardProp instanceof ComputedVar) {\r\n return this.wrapComputedWorkflowPropertyInObservable(stepModelPropName, inputMapping);\r\n } else if (wizardProp instanceof SimpleVar) {\r\n return this.wrapSimpleWorkflowPropertyInObservable(stepModelPropName, inputMapping);\r\n } else {\r\n return {\r\n name: stepModelPropName,\r\n value$: of(wizardProp),\r\n computed: false,\r\n };\r\n }\r\n }\r\n\r\n private wrapOptionalWorkflowPropertyInObservable(stepModelPropName: string, inputMapping: InputMappingMetadata) {\r\n if (!inputMapping.optional) {\r\n throw new Error(`Workflow model property ${inputMapping.propertyName} not found or not initialized.`);\r\n }\r\n return {\r\n name: stepModelPropName,\r\n value$: of(missingOptionalProperty),\r\n computed: false,\r\n };\r\n }\r\n\r\n private wrapComputedWorkflowPropertyInObservable(stepModelPropName: string, inputMapping: InputMappingMetadata) {\r\n const wizardProp = this.wizardModel[inputMapping.propertyName];\r\n const unsatisfiedDeps = wizardProp.unsatisfiedDependencies;\r\n if (unsatisfiedDeps.length) {\r\n if (inputMapping.optional) {\r\n return {\r\n name: stepModelPropName,\r\n value$: of(missingOptionalProperty),\r\n computed: true,\r\n };\r\n } else {\r\n throw new Error(`Dependencies not satisfied for Var: ${wizardProp.name} --> ${unsatisfiedDeps}`);\r\n }\r\n } else {\r\n return {\r\n name: stepModelPropName,\r\n value$: wizardProp.value$,\r\n computed: true,\r\n };\r\n }\r\n }\r\n\r\n private wrapSimpleWorkflowPropertyInObservable(stepModelPropName: string, inputMapping: InputMappingMetadata) {\r\n const wizardProp = this.wizardModel[inputMapping.propertyName];\r\n if (wizardProp.value === undefined) {\r\n if (inputMapping.optional) {\r\n return {\r\n name: stepModelPropName,\r\n value$: of(missingOptionalProperty),\r\n computed: false,\r\n };\r\n } else {\r\n throw new Error(`Value not initialized for Var: ${wizardProp.name}`);\r\n }\r\n } else {\r\n return {\r\n name: stepModelPropName,\r\n value$: wizardProp.value$,\r\n computed: false,\r\n };\r\n }\r\n }\r\n\r\n private updateStepModel(stepModel: any, propertyName: string, newValue: any): void {\r\n // Early return if input mapping is defined as optional and there is no value.\r\n if (newValue === missingOptionalProperty) {\r\n return;\r\n }\r\n\r\n // Set the new value\r\n if (stepModel[propertyName] instanceof SimpleVar) {\r\n stepModel[propertyName].value = newValue;\r\n } else {\r\n stepModel[propertyName] = newValue;\r\n }\r\n }\r\n\r\n private diffPropertyValues(oldValues: NameValue[], newValues: NameValue[]): ModelChange[] {\r\n const changes: ModelChange[] = [];\r\n oldValues.forEach((nameValue: NameValue, index: number) => {\r\n const oldValueStr = nameValue.valueStr;\r\n const newValueStr = newValues[index].valueStr;\r\n if (oldValueStr !== newValueStr) {\r\n const change = new ModelChange(nameValue.name, nameValue.value, newValues[index].value);\r\n changes.push(change);\r\n }\r\n });\r\n return changes;\r\n }\r\n\r\n /**\r\n * Return the input step model values, that were cached during the last invocation of\r\n * {@link ejectPropertiesFromCurrentStep} method.\r\n */\r\n private extractLastStepInputValues(model: StepModel, propNames: string[]): NameValue[] {\r\n const lastStepModelValues = this.stepModelLastValuesIn.get(model);\r\n if (!lastStepModelValues) {\r\n // When a step is activated for the first time, it has no \"last\" values cached.\r\n return this.extractModelProperties(model, propNames);\r\n }\r\n\r\n const result: NameValue[] = [];\r\n for (const propertyName of propNames) {\r\n const valueStr = lastStepModelValues[propertyName];\r\n const propertyValue = parse(valueStr, propertyName);\r\n result.push({\r\n name: propertyName,\r\n value: propertyValue,\r\n valueStr: valueStr,\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Return stringified values of {@link propNames} of the {@link model}.\r\n */\r\n private extractModelProperties(model: any, propNames: string[]): NameValue[] {\r\n const result: NameValue[] = [];\r\n for (const propertyName of propNames) {\r\n let propertyValue = model[propertyName];\r\n if (propertyValue instanceof ComputedVar || propertyValue instanceof SimpleVar) {\r\n propertyValue = propertyValue.value;\r\n }\r\n const valueStr = stringify(propertyValue, propertyName);\r\n result.push({\r\n name: propertyName,\r\n value: propertyValue,\r\n valueStr: valueStr,\r\n });\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Remove null elements from the \"changes\" array and emit on {@link onModelChange$}\r\n * if there are changes.\r\n */\r\n private emitModelChange(changes: (ModelChange | null)[]): void {\r\n const nonNullChanges: ModelChange[] = <ModelChange[]>changes.filter(change => !!change);\r\n\r\n if (nonNullChanges.length) {\r\n this.onModelChange$.next(nonNullChanges);\r\n }\r\n }\r\n\r\n private cacheStepModelInputProps(stepModel: any, mappings?: Mappings<any, any>): void {\r\n const inputMappings: InputMappings = this.getInputMappings(stepModel, mappings);\r\n if (inputMappings) {\r\n const stepModelStringifiedProps: any = {};\r\n for (const [key] of Object.entries(inputMappings)) {\r\n let propertyValue = stepModel[key];\r\n if (propertyValue instanceof ComputedVar || propertyValue instanceof SimpleVar) {\r\n propertyValue = propertyValue.value;\r\n }\r\n const stepModelValueStr = stringify(propertyValue, key);\r\n stepModelStringifiedProps[key] = stepModelValueStr;\r\n }\r\n this.stepModelLastValuesIn.set(stepModel, stepModelStringifiedProps);\r\n }\r\n }\r\n\r\n private getInputMappings(stepModel?: StepModel, mappings?: Mappings<any, any>): InputMappings {\r\n const externalMappings = mappings?.getPropertyMappings();\r\n const inputMappings = getInputMappings(stepModel);\r\n if (inputMappings && externalMappings) {\r\n for (const [stepModelPropertyName, wizardModelPropertyName] of Object.entries(externalMappings)) {\r\n const propertyMapping = inputMappings[stepModelPropertyName];\r\n if (propertyMapping) {\r\n propertyMapping.propertyName = wizardModelPropertyName;\r\n }\r\n }\r\n }\r\n return inputMappings;\r\n }\r\n\r\n private getOutputMappings(stepModel?: StepModel, mappings?: Mappings<any, any>): OutputMappings {\r\n const externalMappings = mappings?.getPropertyMappings();\r\n const outputMappings = getOutputMappings(stepModel);\r\n if (outputMappings && externalMappings) {\r\n for (const [stepModelPropertyName, wizardModelPropertyName] of Object.entries(externalMappings)) {\r\n const propertyMapping = outputMappings[stepModelPropertyName];\r\n if (propertyMapping) {\r\n propertyMapping.propertyName = wizardModelPropertyName;\r\n }\r\n }\r\n }\r\n return outputMappings;\r\n }\r\n}\r\n\r\nclass OptionalProperty {}\r\n\r\n// Value that will be returned when @InputMapping refers to an optional property,\r\n// that is missing from the wizard model.\r\nconst missingOptionalProperty = new OptionalProperty();\r\n\r\ninterface PropertyWrapper {\r\n name: string;\r\n value$: Observable<any>;\r\n computed: boolean;\r\n}\r\n\r\ninterface NameValue {\r\n name: string;\r\n value: any;\r\n\r\n /**\r\n * Stringified 'value' field.\r\n * If 'value' is undefined, 'valueStr' will also be undefined.\r\n */\r\n valueStr: string | undefined;\r\n}\r\n\r\nexport interface InjectPropertiesResult {\r\n pendingStep?: StepInternal;\r\n error?: ActivationError;\r\n stepModelChanges?: ModelChanges;\r\n recreateComponent?: boolean;\r\n}\r\n\r\ninterface InjectPropertiesInternalResult {\r\n wizardModelChanges: ModelChange[];\r\n stepModelChanges: ModelChanges;\r\n recreateComponent?: boolean;\r\n}\r\n","/*\r\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\r\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\r\n * This software is released under MIT license.\r\n * The full license information can be found in LICENSE in the root directory of this project.\r\n */\r\n\r\nexport { AppfxWorkflowCoreModule, modalServiceToken } from './appfx-workfow-core.module';\r\nexport { WorkflowConfigurationService } from './config/workflow-configuration.service';\r\nexport { WorkflowModelMonitorComponent } from './debug/workflow-model-monitor.component';\r\nexport { WorkflowModelMonitorComponent as WorkflowModelMonitor } from './debug/workflow-model-monitor.component';\r\nexport { ErrorComponent } from './error/error.component';\r\nexport { In } from './mappings/input-mapping';\r\nexport { Mappings } from './mappings/mappings';\r\nexport { Out } from './mappings/output-mapping';\r\nexport { CloseHandler } from './model/close-handler';\r\nexport { RelevanceService } from './model/relevance.service';\r\nexport { Step, StepInternal, StepModelFactory } from './model/step';\r\nexport { CancelableStepValidation, StepModel } from './model/step.model';\r\nexport { ModelChanges, OnStepActivate, OnStepValidate, StepComponent, StepModelHolder } from './model/step-interfaces';\r\nexport { StepValidationState } from './model/step-validation-state';\r\nexport { TabLayout, TabLayout as DialogLayout } from './model/tab-layout';\r\nexport { Var } from './model/var';\r\nexport { WizardFooter, WizardFooterConfig } from './model/wizard-footer';\r\nexport { WorkflowModel } from './model/workflow.model';\r\nexport { ModelChange, InjectPropertiesResult, WorkflowModelManager } from './model/workflow-model-manager.service';\r\nexport { SpinnerComponent } from './spinner/spinner.component';\r\nexport { SpinnerComponent as Spinner } from './spinner/spinner.component';\r\nexport { formatError, stringify } from './util/util';\r\nexport { StepContainerComponent } from './step-container/step-container.component';\r\nexport { StepContainerComponent as StepContainer } from './step-container/step-container.component';\r\nexport {\r\n ValidationBannerComponent,\r\n ValidationBannerComponent as ValidationBanner,\r\n ValidationBannerInternalComponent,\r\n ValidationBannerInternalComponent as ValidationBannerInternal,\r\n} from './step-container/validation-banner/validation-banner.component';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3","i1","i2","i4","i2.ValidationBannerComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAKG;MAKU,4BAA4B,CAAA;AAKvC,IAAA,WAAA,GAAA;QAJiB,IAAA,CAAA,oBAAoB,GAAG,yBAAyB;QAK/D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC;AAChD,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC;IAClE;AAEA,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,UAAU;IACxB;IACA,IAAI,KAAK,CAAC,QAAiB,EAAA;AACzB,QAAA,IAAI,CAAC,UAAU,GAAG,QAAQ;IAC5B;IAEQ,OAAO,CAAI,GAAW,EAAE,YAAe,EAAA;AAC7C,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,IAAI,IAAI,GAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC;YAC9C,IAAI,IAAI,EAAE;AACR,gBAAA,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;AACvB,gBAAA,OAAU,IAAI;YAChB;QACF;AACA,QAAA,OAAO,YAAY;IACrB;AAEQ,IAAA,eAAe,CAAC,MAAW,EAAA;AACjC,QAAA,IAAI;AACF,YAAA,IAAI,MAAM,CAAC,YAAY,EAAE;gB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