@veloceapps/sdk 8.0.0-11 → 8.0.0-110
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +0 -1
- package/cms/README.md +0 -20
- package/cms/cms.actions.d.ts +7 -1
- package/cms/components/preview/preview.component.d.ts +1 -2
- package/cms/components/preview/preview.types.d.ts +4 -0
- package/cms/index.d.ts +1 -0
- package/cms/modules/runtime/services/runtime.service.d.ts +1 -1
- package/cms/services/index.d.ts +0 -1
- package/cms/types/index.d.ts +0 -1
- package/cms/utils/element-metadata-worker.d.ts +11 -0
- package/cms/utils/element.utils.d.ts +1 -0
- package/cms/utils/elements-resolver.d.ts +0 -2
- package/cms/utils/index.d.ts +3 -0
- package/cms/utils/transpilation-worker.d.ts +13 -0
- package/cms/vendor-map.d.ts +21 -13
- package/core/README.md +20 -0
- package/core/modules/configuration/helpers.d.ts +2 -2
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +1 -1
- package/core/modules/configuration/services/configuration.service.d.ts +6 -1
- package/core/pipes/action-code.pipe.d.ts +8 -0
- package/core/pipes/date.pipe.d.ts +2 -1
- package/core/pipes/index.d.ts +1 -0
- package/core/pipes/pipes.module.d.ts +2 -1
- package/core/services/context.service.d.ts +2 -0
- package/core/services/flow-info.service.d.ts +27 -0
- package/core/services/flow-state.service.d.ts +55 -0
- package/core/services/index.d.ts +3 -0
- package/core/services/quote-draft.service.d.ts +8 -1
- package/core/services/runtime-settings.service.d.ts +4 -1
- package/core/types/flow-customization.types.d.ts +22 -0
- package/core/types/flow-state.types.d.ts +6 -0
- package/core/types/formatting-settings.types.d.ts +2 -0
- package/core/types/index.d.ts +3 -0
- package/{cms → core}/types/integration.types.d.ts +1 -0
- package/core/types/pipe.types.d.ts +1 -0
- package/esm2020/cms/cms.actions.mjs +15 -1
- package/esm2020/cms/components/element-children/element-children.component.mjs +3 -3
- package/esm2020/cms/components/element-children/element-children.module.mjs +4 -4
- package/esm2020/cms/components/element-drop-handle/element-drop-handle.component.mjs +3 -3
- package/esm2020/cms/components/element-drop-handle/element-drop-handle.module.mjs +4 -4
- package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +3 -3
- package/esm2020/cms/components/element-renderer/element-renderer.module.mjs +4 -4
- package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +5 -5
- package/esm2020/cms/components/plugin.component.mjs +3 -3
- package/esm2020/cms/components/preview/preview.component.mjs +11 -11
- package/esm2020/cms/components/preview/preview.module.mjs +6 -6
- package/esm2020/cms/components/preview/preview.types.mjs +1 -1
- package/esm2020/cms/directives/custom-template.directive.mjs +7 -7
- package/esm2020/cms/index.mjs +2 -1
- package/esm2020/cms/launcher.module.mjs +7 -7
- package/esm2020/cms/modules/federated/federated-host.directive.mjs +3 -3
- package/esm2020/cms/modules/federated/federated.component.mjs +3 -3
- package/esm2020/cms/modules/federated/federated.module.mjs +4 -4
- package/esm2020/cms/modules/migrations/migrations.module.mjs +4 -4
- package/esm2020/cms/modules/migrations/services/migrations.service.mjs +3 -3
- package/esm2020/cms/modules/runtime/runtime.module.mjs +4 -4
- package/esm2020/cms/modules/runtime/services/compilation.service.mjs +12 -8
- package/esm2020/cms/modules/runtime/services/runtime-editor.service.mjs +3 -3
- package/esm2020/cms/modules/runtime/services/runtime.service.mjs +7 -7
- package/esm2020/cms/plugins/configuration.plugin.mjs +3 -3
- package/esm2020/cms/plugins/element-hover.plugin.mjs +3 -3
- package/esm2020/cms/plugins/io.plugin.mjs +8 -7
- package/esm2020/cms/plugins/page.plugin.mjs +3 -3
- package/esm2020/cms/plugins/region.plugin.mjs +3 -3
- package/esm2020/cms/plugins/script.plugin.mjs +3 -3
- package/esm2020/cms/services/element-context.service.mjs +3 -3
- package/esm2020/cms/services/index.mjs +1 -2
- package/esm2020/cms/services/io-provider.service.mjs +3 -3
- package/esm2020/cms/services/resources.service.mjs +3 -3
- package/esm2020/cms/services/templates.service.mjs +3 -3
- package/esm2020/cms/types/index.mjs +1 -2
- package/esm2020/cms/utils/element-metadata-worker.mjs +31 -0
- package/esm2020/cms/utils/element.utils.mjs +10 -3
- package/esm2020/cms/utils/elements-resolver.mjs +14 -28
- package/esm2020/cms/utils/index.mjs +4 -1
- package/esm2020/cms/utils/transpilation-worker.mjs +52 -0
- package/esm2020/cms/vendor-map.mjs +13 -5
- package/esm2020/core/core.module.mjs +10 -17
- package/esm2020/core/directives/directives.module.mjs +4 -4
- package/esm2020/core/directives/primeng-calendar.directive.mjs +3 -3
- package/esm2020/core/modules/configuration/configuration.module.mjs +4 -4
- package/esm2020/core/modules/configuration/helpers.mjs +8 -3
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +11 -14
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +29 -10
- package/esm2020/core/modules/configuration/services/configuration.state.mjs +5 -5
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +9 -9
- package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +4 -4
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +3 -3
- package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +3 -3
- package/esm2020/core/pipes/action-code.pipe.mjs +20 -0
- package/esm2020/core/pipes/date.pipe.mjs +13 -7
- package/esm2020/core/pipes/index.mjs +2 -1
- package/esm2020/core/pipes/number.pipe.mjs +3 -3
- package/esm2020/core/pipes/pipes.module.mjs +8 -7
- package/esm2020/core/pipes/price.pipe.mjs +3 -3
- package/esm2020/core/services/context.service.mjs +20 -5
- package/esm2020/core/services/flow-info.service.mjs +94 -0
- package/esm2020/core/services/flow-state.service.mjs +363 -0
- package/esm2020/core/services/index.mjs +4 -1
- package/esm2020/core/services/integration.state.mjs +37 -0
- package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +3 -3
- package/esm2020/core/services/product-images.service.mjs +3 -3
- package/esm2020/core/services/quote-draft.service.mjs +31 -6
- package/esm2020/core/services/runtime-settings.service.mjs +20 -5
- package/esm2020/core/types/flow-customization.types.mjs +3 -0
- package/esm2020/core/types/flow-state.types.mjs +2 -0
- package/esm2020/core/types/formatting-settings.types.mjs +1 -1
- package/esm2020/core/types/index.mjs +4 -1
- package/esm2020/core/types/integration.types.mjs +2 -0
- package/esm2020/core/types/pipe.types.mjs +2 -0
- package/esm2020/src/components/dialog/dialog.component.mjs +3 -3
- package/esm2020/src/components/dialog/dialog.module.mjs +4 -4
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +45 -54
- package/esm2020/src/components/doc-gen/doc-gen.module.mjs +4 -4
- package/esm2020/src/components/flow-header/flow-header.component.mjs +108 -0
- package/esm2020/src/components/flow-header/flow-header.module.mjs +19 -0
- package/esm2020/src/components/flow-header/index.mjs +2 -0
- package/esm2020/src/components/guided-selling/guided-selling.component.mjs +42 -51
- package/esm2020/src/components/guided-selling/guided-selling.module.mjs +4 -4
- package/esm2020/src/configure-primeng.mjs +33 -0
- package/esm2020/src/flow-routing.module.mjs +66 -75
- package/esm2020/src/flow.component.mjs +21 -29
- package/esm2020/src/flow.module.mjs +11 -9
- package/esm2020/src/guards/context.guard.mjs +7 -12
- package/esm2020/src/guards/flow.guard.mjs +31 -0
- package/esm2020/src/guards/product-unload.guard.mjs +7 -4
- package/esm2020/src/guards/root.guard.mjs +17 -13
- package/esm2020/src/pages/assets/assets.component.mjs +34 -38
- package/esm2020/src/pages/assets/assets.module.mjs +4 -4
- package/esm2020/src/pages/catalog/catalog.component.mjs +34 -38
- package/esm2020/src/pages/catalog/catalog.module.mjs +4 -4
- package/esm2020/src/pages/debug/debug.component.mjs +12 -16
- package/esm2020/src/pages/debug/debug.module.mjs +4 -4
- package/esm2020/src/pages/empty-account/empty-account.component.mjs +3 -3
- package/esm2020/src/pages/empty-account/empty-account.module.mjs +4 -4
- package/esm2020/src/pages/product/product.component.mjs +7 -10
- package/esm2020/src/pages/product/product.module.mjs +4 -4
- package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +3 -3
- package/esm2020/src/pages/record-not-found/record-not-found.module.mjs +4 -4
- package/esm2020/src/pages/remote/remote.component.mjs +13 -14
- package/esm2020/src/pages/remote/remote.module.mjs +4 -4
- package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +35 -39
- package/esm2020/src/pages/shopping-cart/shopping-cart.module.mjs +4 -4
- package/esm2020/src/resolvers/flow.resolver.mjs +37 -51
- package/esm2020/src/resolvers/quote.resolver.mjs +40 -65
- package/esm2020/src/services/doc-gen.service.mjs +7 -6
- package/esm2020/src/services/flow-dialog.service.mjs +8 -4
- package/esm2020/src/services/flow-router.service.mjs +31 -10
- package/esm2020/src/services/flow.service.mjs +36 -11
- package/esm2020/src/services/guided-selling.service.mjs +7 -6
- package/esm2020/src/services/index.mjs +3 -1
- package/esm2020/src/types/index.mjs +1 -2
- package/esm2020/src/utils/flow.utils.mjs +6 -2
- package/fesm2015/veloceapps-sdk-cms.mjs +324 -247
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +1404 -839
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +734 -1543
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +338 -270
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +1709 -1156
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +845 -1653
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +7 -13
- package/src/components/doc-gen/doc-gen.component.d.ts +8 -12
- package/src/components/flow-header/flow-header.component.d.ts +25 -0
- package/src/components/flow-header/flow-header.module.d.ts +9 -0
- package/src/components/flow-header/index.d.ts +1 -0
- package/src/components/guided-selling/guided-selling.component.d.ts +7 -11
- package/src/configure-primeng.d.ts +1 -0
- package/src/flow-routing.module.d.ts +6 -7
- package/src/flow.component.d.ts +7 -10
- package/src/flow.module.d.ts +2 -2
- package/src/guards/context.guard.d.ts +4 -5
- package/src/guards/flow.guard.d.ts +2 -0
- package/src/guards/product-unload.guard.d.ts +2 -2
- package/src/guards/root.guard.d.ts +0 -1
- package/src/pages/assets/assets.component.d.ts +5 -7
- package/src/pages/catalog/catalog.component.d.ts +5 -7
- package/src/pages/debug/debug.component.d.ts +5 -8
- package/src/pages/product/product.component.d.ts +2 -3
- package/src/pages/remote/remote.component.d.ts +1 -2
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +5 -7
- package/src/resolvers/flow.resolver.d.ts +6 -7
- package/src/resolvers/quote.resolver.d.ts +6 -12
- package/src/services/doc-gen.service.d.ts +1 -1
- package/src/services/flow-dialog.service.d.ts +1 -0
- package/src/services/flow-router.service.d.ts +4 -2
- package/src/services/flow.service.d.ts +4 -2
- package/src/services/guided-selling.service.d.ts +1 -1
- package/src/services/index.d.ts +2 -0
- package/src/types/index.d.ts +0 -1
- package/esm2020/cms/services/integration.state.mjs +0 -37
- package/esm2020/cms/types/integration.types.mjs +0 -2
- package/esm2020/runtime/components/component-preview/component-preview.component.mjs +0 -125
- package/esm2020/runtime/components/index.mjs +0 -5
- package/esm2020/runtime/components/section-renderer/section-renderer.component.mjs +0 -67
- package/esm2020/runtime/components/ui-runtime/runtime.component.mjs +0 -440
- package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +0 -108
- package/esm2020/runtime/execution/components/children-placeholder/children-placeholder.component.mjs +0 -60
- package/esm2020/runtime/execution/components/context-provider/context-provider.component.mjs +0 -39
- package/esm2020/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.mjs +0 -67
- package/esm2020/runtime/execution/components/federated/federated.component.mjs +0 -74
- package/esm2020/runtime/execution/components/velo-attribute/velo-attribute.component.mjs +0 -60
- package/esm2020/runtime/execution/components/velo-multiselect/velo-multiselect.component.mjs +0 -130
- package/esm2020/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.mjs +0 -72
- package/esm2020/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.mjs +0 -97
- package/esm2020/runtime/execution/components/velo-port-radio/velo-port-radio.component.mjs +0 -142
- package/esm2020/runtime/execution/components/velo-type/velo-type.component.mjs +0 -119
- package/esm2020/runtime/execution/directives/section-script.directive.mjs +0 -247
- package/esm2020/runtime/execution/directives/sf-query.directive.mjs +0 -35
- package/esm2020/runtime/execution/directives/velo-attribute.directive.mjs +0 -88
- package/esm2020/runtime/execution/directives/velo-port.directive.mjs +0 -376
- package/esm2020/runtime/execution/directives/vl-approval.directive.mjs +0 -23
- package/esm2020/runtime/execution/directives/vl-document-attachments.directive.mjs +0 -36
- package/esm2020/runtime/execution/directives/vl-document-templates.directive.mjs +0 -60
- package/esm2020/runtime/execution/directives/vl-quote.directive.mjs +0 -42
- package/esm2020/runtime/execution/directives/vl-ramp.directive.mjs +0 -55
- package/esm2020/runtime/execution/runtime-execution.module.mjs +0 -133
- package/esm2020/runtime/execution/utils/federated.util.mjs +0 -32
- package/esm2020/runtime/index.mjs +0 -5
- package/esm2020/runtime/runtime.module.mjs +0 -74
- package/esm2020/runtime/services/cart.service.mjs +0 -29
- package/esm2020/runtime/services/collapsible-state.service.mjs +0 -34
- package/esm2020/runtime/services/configuration.service.mjs +0 -119
- package/esm2020/runtime/services/current-state.service.mjs +0 -17
- package/esm2020/runtime/services/form-scope.service.mjs +0 -30
- package/esm2020/runtime/services/index.mjs +0 -4
- package/esm2020/runtime/services/product-model-cache.service.mjs +0 -31
- package/esm2020/runtime/services/runtime-context.service.mjs +0 -60
- package/esm2020/runtime/services/runtime-form.service.mjs +0 -219
- package/esm2020/runtime/services/runtime.service.mjs +0 -115
- package/esm2020/runtime/services/section-helper.service.mjs +0 -27
- package/esm2020/runtime/services/section-scope.service.mjs +0 -36
- package/esm2020/runtime/services/section-store.service.mjs +0 -22
- package/esm2020/runtime/services/section.service.mjs +0 -117
- package/esm2020/runtime/types/bound-data.types.mjs +0 -7
- package/esm2020/runtime/types/index.mjs +0 -3
- package/esm2020/runtime/types/quote-states.types.mjs +0 -2
- package/esm2020/runtime/types/runtime.types.mjs +0 -2
- package/esm2020/runtime/types/script-registry.types.mjs +0 -51
- package/esm2020/runtime/utils/line-item.util.mjs +0 -270
- package/esm2020/runtime/utils/section.utils.mjs +0 -26
- package/esm2020/runtime/utils/sections-binder.helper.mjs +0 -105
- package/esm2020/runtime/veloceapps-sdk-runtime.mjs +0 -5
- package/esm2020/src/components/header/cart-overlay/cart-preview.component.mjs +0 -119
- package/esm2020/src/components/header/cart-overlay/cart-preview.module.mjs +0 -47
- package/esm2020/src/components/header/header.component.mjs +0 -355
- package/esm2020/src/components/header/header.module.mjs +0 -52
- package/esm2020/src/components/header/header.types.mjs +0 -2
- package/esm2020/src/components/header/metrics/index.mjs +0 -2
- package/esm2020/src/components/header/metrics/metrics.component.mjs +0 -255
- package/esm2020/src/components/header/metrics/metrics.definitions.mjs +0 -2
- package/esm2020/src/components/header/metrics/metrics.module.mjs +0 -69
- package/esm2020/src/pages/legacy-product/legacy-product.component.mjs +0 -137
- package/esm2020/src/pages/legacy-product/legacy-product.module.mjs +0 -19
- package/esm2020/src/types/flow-customization.types.mjs +0 -3
- package/fesm2015/veloceapps-sdk-runtime.mjs +0 -3770
- package/fesm2015/veloceapps-sdk-runtime.mjs.map +0 -1
- package/fesm2020/veloceapps-sdk-runtime.mjs +0 -3767
- package/fesm2020/veloceapps-sdk-runtime.mjs.map +0 -1
- package/runtime/README.md +0 -5
- package/runtime/components/component-preview/component-preview.component.d.ts +0 -27
- package/runtime/components/index.d.ts +0 -4
- package/runtime/components/section-renderer/section-renderer.component.d.ts +0 -25
- package/runtime/components/ui-runtime/runtime.component.d.ts +0 -53
- package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +0 -27
- package/runtime/execution/components/children-placeholder/children-placeholder.component.d.ts +0 -30
- package/runtime/execution/components/context-provider/context-provider.component.d.ts +0 -14
- package/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.d.ts +0 -25
- package/runtime/execution/components/federated/federated.component.d.ts +0 -36
- package/runtime/execution/components/velo-attribute/velo-attribute.component.d.ts +0 -19
- package/runtime/execution/components/velo-multiselect/velo-multiselect.component.d.ts +0 -35
- package/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.d.ts +0 -22
- package/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.d.ts +0 -22
- package/runtime/execution/components/velo-port-radio/velo-port-radio.component.d.ts +0 -28
- package/runtime/execution/components/velo-type/velo-type.component.d.ts +0 -31
- package/runtime/execution/directives/section-script.directive.d.ts +0 -59
- package/runtime/execution/directives/sf-query.directive.d.ts +0 -15
- package/runtime/execution/directives/velo-attribute.directive.d.ts +0 -26
- package/runtime/execution/directives/velo-port.directive.d.ts +0 -74
- package/runtime/execution/directives/vl-approval.directive.d.ts +0 -10
- package/runtime/execution/directives/vl-document-attachments.directive.d.ts +0 -15
- package/runtime/execution/directives/vl-document-templates.directive.d.ts +0 -33
- package/runtime/execution/directives/vl-quote.directive.d.ts +0 -14
- package/runtime/execution/directives/vl-ramp.directive.d.ts +0 -15
- package/runtime/execution/runtime-execution.module.d.ts +0 -25
- package/runtime/execution/utils/federated.util.d.ts +0 -6
- package/runtime/index.d.ts +0 -4
- package/runtime/runtime.module.d.ts +0 -16
- package/runtime/services/cart.service.d.ts +0 -15
- package/runtime/services/collapsible-state.service.d.ts +0 -15
- package/runtime/services/configuration.service.d.ts +0 -20
- package/runtime/services/current-state.service.d.ts +0 -8
- package/runtime/services/form-scope.service.d.ts +0 -20
- package/runtime/services/index.d.ts +0 -3
- package/runtime/services/product-model-cache.service.d.ts +0 -14
- package/runtime/services/runtime-context.service.d.ts +0 -16
- package/runtime/services/runtime-form.service.d.ts +0 -24
- package/runtime/services/runtime.service.d.ts +0 -44
- package/runtime/services/section-helper.service.d.ts +0 -8
- package/runtime/services/section-scope.service.d.ts +0 -14
- package/runtime/services/section-store.service.d.ts +0 -11
- package/runtime/services/section.service.d.ts +0 -30
- package/runtime/types/bound-data.types.d.ts +0 -13
- package/runtime/types/index.d.ts +0 -2
- package/runtime/types/quote-states.types.d.ts +0 -6
- package/runtime/types/runtime.types.d.ts +0 -19
- package/runtime/types/script-registry.types.d.ts +0 -13
- package/runtime/utils/line-item.util.d.ts +0 -34
- package/runtime/utils/section.utils.d.ts +0 -2
- package/runtime/utils/sections-binder.helper.d.ts +0 -16
- package/src/components/header/cart-overlay/cart-preview.component.d.ts +0 -36
- package/src/components/header/cart-overlay/cart-preview.module.d.ts +0 -14
- package/src/components/header/header.component.d.ts +0 -70
- package/src/components/header/header.module.d.ts +0 -16
- package/src/components/header/header.types.d.ts +0 -20
- package/src/components/header/metrics/index.d.ts +0 -1
- package/src/components/header/metrics/metrics.component.d.ts +0 -67
- package/src/components/header/metrics/metrics.definitions.d.ts +0 -1
- package/src/components/header/metrics/metrics.module.d.ts +0 -18
- package/src/pages/legacy-product/legacy-product.component.d.ts +0 -37
- package/src/pages/legacy-product/legacy-product.module.d.ts +0 -9
- package/src/types/flow-customization.types.d.ts +0 -12
- /package/{cms → core}/services/integration.state.d.ts +0 -0
@@ -1,51 +1,33 @@
|
|
1
1
|
import * as i4 from '@angular/common';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Component, ChangeDetectionStrategy, NgModule,
|
5
|
-
import * as
|
4
|
+
import { Component, ChangeDetectionStrategy, NgModule, Optional, Inject, Injectable, inject } from '@angular/core';
|
5
|
+
import * as i1$1 from '@veloceapps/api';
|
6
6
|
import { ApiModule } from '@veloceapps/api';
|
7
|
-
import * as
|
8
|
-
import { ToastType,
|
7
|
+
import * as i2$1 from '@veloceapps/components';
|
8
|
+
import { ToastType, LoaderModule, EmptyStateModule, LetDirectiveModule } from '@veloceapps/components';
|
9
9
|
import * as i5 from '@veloceapps/sdk/cms';
|
10
|
-
import {
|
11
|
-
import * as
|
12
|
-
import {
|
10
|
+
import { extractElementMetadata, extendElementMetadata, btoaSafe, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
|
11
|
+
import * as i2 from '@veloceapps/sdk/core';
|
12
|
+
import { FLOW_CUSTOMIZATION, ContextService, FlowStateService, FlowInfoService, QuoteDraftService, ConfigurationService, IntegrationState, SdkCoreModule } from '@veloceapps/sdk/core';
|
13
13
|
import * as i3 from 'primeng/button';
|
14
14
|
import { ButtonModule } from 'primeng/button';
|
15
15
|
import * as i1 from 'primeng/dynamicdialog';
|
16
|
-
import {
|
17
|
-
import { Subject, BehaviorSubject, tap, takeUntil, first, catchError, of, map, switchMap, filter, shareReplay, startWith, distinctUntilChanged, combineLatest, finalize, noop, forkJoin, from, throwError } from 'rxjs';
|
18
|
-
import * as i7 from 'primeng/overlaypanel';
|
19
|
-
import { OverlayPanel, OverlayPanelModule } from 'primeng/overlaypanel';
|
20
|
-
import * as i13 from 'primeng/splitbutton';
|
21
|
-
import { SplitButtonModule } from 'primeng/splitbutton';
|
22
|
-
import * as i10$1 from 'primeng/tooltip';
|
23
|
-
import { TooltipModule } from 'primeng/tooltip';
|
24
|
-
import * as i5$1 from '@angular/forms';
|
25
|
-
import { FormGroup, FormControl, ReactiveFormsModule, Validators, FormsModule } from '@angular/forms';
|
26
|
-
import { InputNumberModule } from 'primeng/inputnumber';
|
27
|
-
import * as i9 from 'primeng/virtualscroller';
|
28
|
-
import { VirtualScrollerModule } from 'primeng/virtualscroller';
|
16
|
+
import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, forkJoin, throwError } from 'rxjs';
|
29
17
|
import * as i1$2 from '@angular/router';
|
30
18
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
31
|
-
import
|
32
|
-
import
|
33
|
-
import
|
34
|
-
import {
|
35
|
-
import { cloneDeep, uniq } from 'lodash';
|
36
|
-
import { withLatestFrom, tap as tap$1, takeUntil as takeUntil$1, first as first$1, take, map as map$1, switchMap as switchMap$1 } from 'rxjs/operators';
|
37
|
-
import * as i9$1 from 'primeng/sidebar';
|
38
|
-
import { SidebarModule } from 'primeng/sidebar';
|
39
|
-
import * as i10 from 'primeng/inputtext';
|
40
|
-
import { InputTextModule } from 'primeng/inputtext';
|
41
|
-
import * as i11 from 'primeng/checkbox';
|
42
|
-
import { CheckboxModule } from 'primeng/checkbox';
|
43
|
-
import { HttpErrorResponse } from '@angular/common/http';
|
19
|
+
import { SalesforceIdUtils, ConfigurationContextMode, UUID } from '@veloceapps/core';
|
20
|
+
import { HttpErrorResponse, HttpParams } from '@angular/common/http';
|
21
|
+
import * as i5$1 from '@angular/forms';
|
22
|
+
import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
44
23
|
import { DropdownModule } from 'primeng/dropdown';
|
24
|
+
import * as i8 from 'primeng/inputtext';
|
25
|
+
import { InputTextModule } from 'primeng/inputtext';
|
45
26
|
import * as i6 from 'primeng/radiobutton';
|
46
27
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
47
|
-
import * as
|
48
|
-
import {
|
28
|
+
import * as i2$2 from 'primeng/api';
|
29
|
+
import { catchError as catchError$1 } from 'rxjs/operators';
|
30
|
+
import { DomHandler } from 'primeng/dom';
|
49
31
|
|
50
32
|
const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
|
51
33
|
|
@@ -72,19 +54,19 @@ class FlowDialogComponent {
|
|
72
54
|
}
|
73
55
|
}
|
74
56
|
}
|
75
|
-
FlowDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
76
|
-
FlowDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
77
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
57
|
+
FlowDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogComponent, deps: [{ token: i1.DynamicDialogConfig }, { token: i1.DynamicDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
58
|
+
FlowDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0, template: "<div class=\"header\">\n <div class=\"title\">\n {{ config.title }}\n </div>\n\n <i class=\"vl-icon vl-cross\" (click)=\"cancelHandler()\"></i>\n</div>\n\n<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host *{font-family:var(--cg-font-family)}:host .header{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 8px}:host .header .title{color:var(--cg-black);font-size:16px;font-style:normal;font-weight:500;line-height:20px}:host .header .vl-icon{cursor:pointer}:host .description{flex:1;padding:0 16px 16px;color:var(--cg-black);font-size:12px;font-style:normal;font-weight:300;line-height:16px;letter-spacing:.3px}:host .form-actions{background:var(--cg-bg-color);padding:12px 16px;display:flex;justify-content:flex-end;width:100%;gap:16px}:host p-button ::ng-deep button{border-radius:24px;width:100%;font-size:12px;font-family:var(--cg-font-family);font-weight:300;line-height:16px;letter-spacing:.3px;white-space:nowrap}:host p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}:host p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}:host p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}:host p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}::ng-deep .p-dialog.flow-dialog{border-radius:8px;box-shadow:0 8px 32px #0000001a}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogComponent, decorators: [{
|
78
60
|
type: Component,
|
79
61
|
args: [{ selector: 'vl-flow-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"header\">\n <div class=\"title\">\n {{ config.title }}\n </div>\n\n <i class=\"vl-icon vl-cross\" (click)=\"cancelHandler()\"></i>\n</div>\n\n<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host *{font-family:var(--cg-font-family)}:host .header{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 8px}:host .header .title{color:var(--cg-black);font-size:16px;font-style:normal;font-weight:500;line-height:20px}:host .header .vl-icon{cursor:pointer}:host .description{flex:1;padding:0 16px 16px;color:var(--cg-black);font-size:12px;font-style:normal;font-weight:300;line-height:16px;letter-spacing:.3px}:host .form-actions{background:var(--cg-bg-color);padding:12px 16px;display:flex;justify-content:flex-end;width:100%;gap:16px}:host p-button ::ng-deep button{border-radius:24px;width:100%;font-size:12px;font-family:var(--cg-font-family);font-weight:300;line-height:16px;letter-spacing:.3px;white-space:nowrap}:host p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}:host p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}:host p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}:host p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}::ng-deep .p-dialog.flow-dialog{border-radius:8px;box-shadow:0 8px 32px #0000001a}\n"] }]
|
80
62
|
}], ctorParameters: function () { return [{ type: i1.DynamicDialogConfig }, { type: i1.DynamicDialogRef }]; } });
|
81
63
|
|
82
64
|
class FlowDialogModule {
|
83
65
|
}
|
84
|
-
FlowDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
85
|
-
FlowDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
86
|
-
FlowDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
87
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
66
|
+
FlowDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
67
|
+
FlowDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogModule, declarations: [FlowDialogComponent], imports: [CommonModule, ButtonModule], exports: [FlowDialogComponent] });
|
68
|
+
FlowDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogModule, imports: [CommonModule, ButtonModule] });
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogModule, decorators: [{
|
88
70
|
type: NgModule,
|
89
71
|
args: [{
|
90
72
|
declarations: [FlowDialogComponent],
|
@@ -93,51 +75,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
93
75
|
}]
|
94
76
|
}] });
|
95
77
|
|
96
|
-
class FlowDocGenService {
|
97
|
-
constructor(integrationState) {
|
98
|
-
this.integrationState = integrationState;
|
99
|
-
this.cleanup$ = new Subject();
|
100
|
-
this.isVisibleSubj$ = new BehaviorSubject(false);
|
101
|
-
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
102
|
-
this.initSubscriptions();
|
103
|
-
}
|
104
|
-
cleanup() {
|
105
|
-
this.cleanup$.next();
|
106
|
-
}
|
107
|
-
initSubscriptions() {
|
108
|
-
this.integrationState
|
109
|
-
.listen$(FlowAction.FLOW_OPEN_DOC_GEN)
|
110
|
-
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
111
|
-
.subscribe();
|
112
|
-
this.integrationState
|
113
|
-
.listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
|
114
|
-
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
115
|
-
.subscribe();
|
116
|
-
}
|
117
|
-
}
|
118
|
-
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
119
|
-
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService });
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService, decorators: [{
|
121
|
-
type: Injectable
|
122
|
-
}], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
|
123
|
-
|
124
|
-
const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
|
125
|
-
|
126
78
|
class DocGenComponent {
|
127
|
-
constructor(
|
128
|
-
this.quoteDraftService = quoteDraftService;
|
129
|
-
this.contextService = contextService;
|
79
|
+
constructor(templatesApi, contextService, flowStateService, flowInfo, toastService, customizationService) {
|
130
80
|
this.templatesApi = templatesApi;
|
131
|
-
this.
|
81
|
+
this.contextService = contextService;
|
82
|
+
this.flowStateService = flowStateService;
|
83
|
+
this.flowInfo = flowInfo;
|
132
84
|
this.toastService = toastService;
|
133
85
|
this.customizationService = customizationService;
|
134
86
|
this.uiDefinition$ = new BehaviorSubject(null);
|
135
87
|
this.templateApiName = '';
|
136
88
|
this.destroy$ = new Subject();
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
.pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
89
|
+
// wait until flow is initialized
|
90
|
+
this.flowStateService
|
91
|
+
.isInitialized$()
|
92
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
141
93
|
.subscribe();
|
142
94
|
}
|
143
95
|
ngOnDestroy() {
|
@@ -145,7 +97,7 @@ class DocGenComponent {
|
|
145
97
|
this.destroy$.complete();
|
146
98
|
}
|
147
99
|
initialize() {
|
148
|
-
this.templateApiName = this.
|
100
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates.docGen ?? '';
|
149
101
|
this.generateUIDefinition$()
|
150
102
|
.pipe(tap(uiDef => {
|
151
103
|
if (!uiDef) {
|
@@ -159,42 +111,39 @@ class DocGenComponent {
|
|
159
111
|
}), takeUntil(this.destroy$))
|
160
112
|
.subscribe();
|
161
113
|
}
|
162
|
-
|
163
|
-
|
164
|
-
.fetchComponents$(template.id)
|
165
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
166
|
-
}
|
167
|
-
getLocalTemplateComponentMeta$() {
|
168
|
-
if (!this.customizationService?.getTemplateComponent) {
|
114
|
+
getLocalMeta$() {
|
115
|
+
if (!this.customizationService?.getTemplateComponents) {
|
169
116
|
return of(undefined);
|
170
117
|
}
|
171
|
-
return this.customizationService?.
|
172
|
-
if (!
|
118
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
119
|
+
if (!components) {
|
173
120
|
return;
|
174
121
|
}
|
175
|
-
return {
|
122
|
+
return components.map(component => ({
|
176
123
|
html: component.html,
|
177
124
|
css: component.css,
|
178
125
|
js: component.js,
|
179
126
|
json: component.json,
|
180
|
-
};
|
127
|
+
}));
|
181
128
|
}));
|
182
129
|
}
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
return
|
187
|
-
}
|
130
|
+
getOrgMeta$() {
|
131
|
+
const template = this.flowInfo.templates.DOCGEN;
|
132
|
+
if (!template) {
|
133
|
+
return of(undefined);
|
134
|
+
}
|
135
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
188
136
|
}
|
189
137
|
generateUIDefinition$() {
|
190
138
|
return of(undefined).pipe(tap(() => {
|
191
139
|
if (!this.templateApiName) {
|
192
|
-
throw new Error("Flow
|
140
|
+
throw new Error("Flow 'docGen' template is not defined.");
|
193
141
|
}
|
194
|
-
}), switchMap(() => this.
|
195
|
-
if (!
|
142
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
143
|
+
if (!metaList) {
|
196
144
|
return;
|
197
145
|
}
|
146
|
+
const meta = metaList?.[0] ?? metaList;
|
198
147
|
const headerId = this.contextService.resolve().properties.Id ?? null;
|
199
148
|
let script = meta.js;
|
200
149
|
if (script) {
|
@@ -212,25 +161,23 @@ class DocGenComponent {
|
|
212
161
|
primary: true,
|
213
162
|
type: 'DEFAULT',
|
214
163
|
version: 2,
|
215
|
-
children:
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
},
|
222
|
-
],
|
164
|
+
children: metaList.map(child => ({
|
165
|
+
children: [],
|
166
|
+
template: child.html && btoaSafe(child.html),
|
167
|
+
script: child.js && btoaSafe(child.js),
|
168
|
+
styles: child.css && btoaSafe(child.css),
|
169
|
+
})),
|
223
170
|
};
|
224
171
|
return uiDef;
|
225
172
|
}));
|
226
173
|
}
|
227
174
|
}
|
228
|
-
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
229
|
-
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
230
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
175
|
+
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.ContextService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
176
|
+
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
|
231
178
|
type: Component,
|
232
|
-
args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"
|
233
|
-
}], ctorParameters: function () { return [{ type: i1$1.
|
179
|
+
args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
180
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.ContextService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
234
181
|
type: Optional
|
235
182
|
}, {
|
236
183
|
type: Inject,
|
@@ -239,10 +186,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
239
186
|
|
240
187
|
class DocGenModule {
|
241
188
|
}
|
242
|
-
DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
243
|
-
DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
244
|
-
DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
189
|
+
DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
190
|
+
DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
|
191
|
+
DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, decorators: [{
|
246
193
|
type: NgModule,
|
247
194
|
args: [{
|
248
195
|
declarations: [DocGenComponent],
|
@@ -251,48 +198,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
251
198
|
}]
|
252
199
|
}] });
|
253
200
|
|
254
|
-
class FlowGuidedSellingService {
|
255
|
-
constructor(integrationState) {
|
256
|
-
this.integrationState = integrationState;
|
257
|
-
this.cleanup$ = new Subject();
|
258
|
-
this.isVisibleSubj$ = new BehaviorSubject(true);
|
259
|
-
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
260
|
-
this.initSubscriptions();
|
261
|
-
}
|
262
|
-
cleanup() {
|
263
|
-
this.cleanup$.next();
|
264
|
-
}
|
265
|
-
initSubscriptions() {
|
266
|
-
this.integrationState
|
267
|
-
.listen$(FlowAction.OPEN_GUIDED_SELLING)
|
268
|
-
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
269
|
-
.subscribe();
|
270
|
-
this.integrationState
|
271
|
-
.listen$(FlowAction.CLOSE_GUIDED_SELLING)
|
272
|
-
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
273
|
-
.subscribe();
|
274
|
-
}
|
275
|
-
}
|
276
|
-
FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
277
|
-
FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService });
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
|
279
|
-
type: Injectable
|
280
|
-
}], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
|
281
|
-
|
282
201
|
class GuidedSellingComponent {
|
283
|
-
constructor(
|
284
|
-
this.quoteDraftService = quoteDraftService;
|
285
|
-
this.contextService = contextService;
|
202
|
+
constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
|
286
203
|
this.templatesApi = templatesApi;
|
287
|
-
this.
|
204
|
+
this.flowStateService = flowStateService;
|
205
|
+
this.flowInfo = flowInfo;
|
288
206
|
this.toastService = toastService;
|
289
207
|
this.customizationService = customizationService;
|
290
208
|
this.uiDefinition$ = new BehaviorSubject(null);
|
291
209
|
this.templateApiName = '';
|
292
210
|
this.destroy$ = new Subject();
|
293
|
-
//
|
294
|
-
this.
|
295
|
-
.
|
211
|
+
// wait until flow is initialized
|
212
|
+
this.flowStateService
|
213
|
+
.isInitialized$()
|
214
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
296
215
|
.subscribe();
|
297
216
|
}
|
298
217
|
ngOnDestroy() {
|
@@ -300,7 +219,7 @@ class GuidedSellingComponent {
|
|
300
219
|
this.destroy$.complete();
|
301
220
|
}
|
302
221
|
initialize() {
|
303
|
-
this.templateApiName = this.
|
222
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates.guidedSelling ?? '';
|
304
223
|
this.generateUIDefinition$()
|
305
224
|
.pipe(tap(uiDef => {
|
306
225
|
if (!uiDef) {
|
@@ -314,40 +233,36 @@ class GuidedSellingComponent {
|
|
314
233
|
}), takeUntil(this.destroy$))
|
315
234
|
.subscribe();
|
316
235
|
}
|
317
|
-
|
318
|
-
|
319
|
-
.fetchComponents$(template.id)
|
320
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
321
|
-
}
|
322
|
-
getLocalTemplateComponentMeta$() {
|
323
|
-
if (!this.customizationService?.getTemplateComponent) {
|
236
|
+
getLocalMeta$() {
|
237
|
+
if (!this.customizationService?.getTemplateComponents) {
|
324
238
|
return of(undefined);
|
325
239
|
}
|
326
|
-
return this.customizationService?.
|
327
|
-
if (!
|
240
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
241
|
+
if (!components) {
|
328
242
|
return;
|
329
243
|
}
|
330
|
-
return {
|
244
|
+
return components.map(component => ({
|
331
245
|
html: component.html,
|
332
246
|
css: component.css,
|
333
247
|
js: component.js,
|
334
248
|
json: component.json,
|
335
|
-
};
|
249
|
+
}));
|
336
250
|
}));
|
337
251
|
}
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
return
|
342
|
-
}
|
252
|
+
getOrgMeta$() {
|
253
|
+
const template = this.flowInfo.templates.GUIDED_SELLING;
|
254
|
+
if (!template) {
|
255
|
+
return of(undefined);
|
256
|
+
}
|
257
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
343
258
|
}
|
344
259
|
generateUIDefinition$() {
|
345
260
|
return of(undefined).pipe(tap(() => {
|
346
261
|
if (!this.templateApiName) {
|
347
|
-
throw new Error("Flow
|
262
|
+
throw new Error("Flow 'guidedSelling' template is not defined.");
|
348
263
|
}
|
349
|
-
}), switchMap(() => this.
|
350
|
-
if (!
|
264
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
265
|
+
if (!metaList) {
|
351
266
|
return;
|
352
267
|
}
|
353
268
|
const uiDef = {
|
@@ -356,25 +271,23 @@ class GuidedSellingComponent {
|
|
356
271
|
primary: true,
|
357
272
|
type: 'DEFAULT',
|
358
273
|
version: 2,
|
359
|
-
children:
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
},
|
366
|
-
],
|
274
|
+
children: metaList.map(meta => ({
|
275
|
+
children: [],
|
276
|
+
template: meta.html && btoaSafe(meta.html),
|
277
|
+
script: meta.js && btoaSafe(meta.js),
|
278
|
+
styles: meta.css && btoaSafe(meta.css),
|
279
|
+
})),
|
367
280
|
};
|
368
281
|
return uiDef;
|
369
282
|
}));
|
370
283
|
}
|
371
284
|
}
|
372
|
-
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
373
|
-
GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
285
|
+
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
286
|
+
GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: GuidedSellingComponent, selector: "vl-flow-guided-selling", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
287
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
|
375
288
|
type: Component,
|
376
289
|
args: [{ selector: 'vl-flow-guided-selling', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
377
|
-
}], ctorParameters: function () { return [{ type: i1$1.
|
290
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
378
291
|
type: Optional
|
379
292
|
}, {
|
380
293
|
type: Inject,
|
@@ -383,10 +296,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
383
296
|
|
384
297
|
class GuidedSellingModule {
|
385
298
|
}
|
386
|
-
GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
387
|
-
GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
388
|
-
GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
299
|
+
GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
300
|
+
GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, declarations: [GuidedSellingComponent], imports: [CommonModule, PreviewModule], exports: [GuidedSellingComponent] });
|
301
|
+
GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, imports: [CommonModule, PreviewModule] });
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, decorators: [{
|
390
303
|
type: NgModule,
|
391
304
|
args: [{
|
392
305
|
declarations: [GuidedSellingComponent],
|
@@ -395,314 +308,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
395
308
|
}]
|
396
309
|
}] });
|
397
310
|
|
398
|
-
class
|
399
|
-
constructor(
|
400
|
-
this.
|
401
|
-
this.
|
402
|
-
this.
|
403
|
-
this.
|
404
|
-
this.
|
405
|
-
this.
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
};
|
414
|
-
this.getLastChildRouteSnapshot = (route) => {
|
415
|
-
return route.firstChild ? this.getLastChildRouteSnapshot(route.firstChild) : route;
|
416
|
-
};
|
417
|
-
this.watchLastChildRoute$ = (route) => {
|
418
|
-
return this.routeChange$.pipe(map(() => this.getLastChildRouteSnapshot(route.snapshot)));
|
419
|
-
};
|
420
|
-
this.getLastChildParams = (route) => {
|
421
|
-
return route.firstChild ? this.getLastChildParams(route.firstChild) : route.params;
|
422
|
-
};
|
423
|
-
this.watchLastChildParams$ = (route) => {
|
424
|
-
return this.routeChange$.pipe(map(() => this.getLastChildParams(route.snapshot)));
|
425
|
-
};
|
426
|
-
this.getFlowSubpath$ = () => {
|
427
|
-
return this.route$.pipe(map(route => {
|
428
|
-
const url = route.url.join('/');
|
429
|
-
const flowRootUrl = this.getFlowRootPath(route);
|
430
|
-
return url.replace(flowRootUrl, '');
|
431
|
-
}));
|
432
|
-
};
|
433
|
-
this.routeChange$ = this.router.events.pipe(filter(e => e instanceof NavigationEnd), shareReplay());
|
434
|
-
this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(startWith(this.getLastChildParams(this.route.snapshot)), shareReplay());
|
435
|
-
this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), shareReplay());
|
436
|
-
this.loading$ = this.router.events.pipe(filter(e => e instanceof NavigationStart ||
|
437
|
-
e instanceof NavigationCancel ||
|
438
|
-
e instanceof NavigationEnd ||
|
439
|
-
e instanceof NavigationError), map(e => e instanceof NavigationStart), startWith(false), distinctUntilChanged());
|
440
|
-
this.routeChange$.subscribe(() => {
|
441
|
-
this.urlHistory.push(this.router.url);
|
442
|
-
// Close Guided Selling when user navigates to another flow page
|
443
|
-
this.integrationState.dispatch(FlowAction.CloseGuidedSelling({ keepState: true }));
|
444
|
-
});
|
311
|
+
class FlowHeaderComponent {
|
312
|
+
constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
|
313
|
+
this.templatesApi = templatesApi;
|
314
|
+
this.flowStateService = flowStateService;
|
315
|
+
this.flowInfo = flowInfo;
|
316
|
+
this.toastService = toastService;
|
317
|
+
this.customizationService = customizationService;
|
318
|
+
this.uiDefinition$ = new BehaviorSubject(null);
|
319
|
+
this.templateApiName = '';
|
320
|
+
this.destroy$ = new Subject();
|
321
|
+
// wait until flow is initialized
|
322
|
+
this.flowStateService
|
323
|
+
.isInitialized$()
|
324
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
325
|
+
.subscribe();
|
445
326
|
}
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
327
|
+
ngOnDestroy() {
|
328
|
+
this.destroy$.next();
|
329
|
+
this.destroy$.complete();
|
330
|
+
}
|
331
|
+
initialize() {
|
332
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates.flowHeader ?? '';
|
333
|
+
this.generateUIDefinition$()
|
334
|
+
.pipe(tap(uiDef => {
|
335
|
+
if (!uiDef) {
|
336
|
+
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
455
337
|
}
|
456
|
-
|
457
|
-
|
338
|
+
this.uiDefinition$.next(uiDef);
|
339
|
+
}), catchError(err => {
|
340
|
+
const message = 'Failed to resolve Flow Header component. ' + (err.message ?? '');
|
341
|
+
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
342
|
+
return of();
|
343
|
+
}), takeUntil(this.destroy$))
|
344
|
+
.subscribe();
|
458
345
|
}
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
return '';
|
346
|
+
getLocalMeta$() {
|
347
|
+
if (!this.customizationService?.getTemplateComponents) {
|
348
|
+
return of(undefined);
|
463
349
|
}
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
350
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
351
|
+
if (!components) {
|
352
|
+
return;
|
353
|
+
}
|
354
|
+
return components.map(component => ({
|
355
|
+
html: component.html,
|
356
|
+
css: component.css,
|
357
|
+
js: component.js,
|
358
|
+
json: component.json,
|
359
|
+
}));
|
360
|
+
}));
|
475
361
|
}
|
476
|
-
|
477
|
-
|
362
|
+
getOrgMeta$() {
|
363
|
+
const template = this.flowInfo.templates.FLOW_HEADER;
|
364
|
+
if (!template) {
|
365
|
+
return of(undefined);
|
366
|
+
}
|
367
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
478
368
|
}
|
479
|
-
|
480
|
-
return
|
369
|
+
generateUIDefinition$() {
|
370
|
+
return of(undefined).pipe(tap(() => {
|
371
|
+
if (!this.templateApiName) {
|
372
|
+
throw new Error("Flow 'flowHeader' template is not defined.");
|
373
|
+
}
|
374
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
375
|
+
if (!metaList) {
|
376
|
+
return;
|
377
|
+
}
|
378
|
+
const uiDef = {
|
379
|
+
name: '',
|
380
|
+
createdTimestamp: 0,
|
381
|
+
primary: true,
|
382
|
+
type: 'DEFAULT',
|
383
|
+
version: 2,
|
384
|
+
children: metaList.map(meta => ({
|
385
|
+
children: [],
|
386
|
+
template: meta.html && btoaSafe(meta.html),
|
387
|
+
script: meta.js && btoaSafe(meta.js),
|
388
|
+
styles: meta.css && btoaSafe(meta.css),
|
389
|
+
})),
|
390
|
+
};
|
391
|
+
return uiDef;
|
392
|
+
}));
|
481
393
|
}
|
482
|
-
|
483
|
-
|
394
|
+
}
|
395
|
+
FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
396
|
+
FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowHeaderComponent, selector: "vl-flow-new-header", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
397
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
398
|
+
type: Component,
|
399
|
+
args: [{ selector: 'vl-flow-new-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
400
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
401
|
+
type: Optional
|
402
|
+
}, {
|
403
|
+
type: Inject,
|
404
|
+
args: [FLOW_CUSTOMIZATION]
|
405
|
+
}] }]; } });
|
406
|
+
|
407
|
+
class FlowNewHeaderModule {
|
408
|
+
}
|
409
|
+
FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
410
|
+
FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
|
411
|
+
FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
|
412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
|
413
|
+
type: NgModule,
|
414
|
+
args: [{
|
415
|
+
declarations: [FlowHeaderComponent],
|
416
|
+
imports: [CommonModule, PreviewModule],
|
417
|
+
exports: [FlowHeaderComponent],
|
418
|
+
}]
|
419
|
+
}] });
|
420
|
+
|
421
|
+
class FlowDialogService {
|
422
|
+
constructor(dialogService, contextService) {
|
423
|
+
this.dialogService = dialogService;
|
424
|
+
this.contextService = contextService;
|
484
425
|
}
|
485
|
-
|
486
|
-
return this.
|
426
|
+
show(config) {
|
427
|
+
return this.dialogService.open(FlowDialogComponent, {
|
428
|
+
dismissableMask: true,
|
429
|
+
closeOnEscape: true,
|
430
|
+
closable: true,
|
431
|
+
showHeader: false,
|
432
|
+
width: '320px',
|
433
|
+
data: { config },
|
434
|
+
styleClass: 'flow-dialog',
|
435
|
+
}).onClose;
|
487
436
|
}
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
437
|
+
showEmptyCartDialog() {
|
438
|
+
return this.show({
|
439
|
+
title: 'No Products in Quote',
|
440
|
+
description: 'There are no products in your Quote. To save a Quote, add at least one product.',
|
441
|
+
primaryButton: 'Ok',
|
442
|
+
});
|
493
443
|
}
|
494
|
-
|
495
|
-
this.contextService.
|
496
|
-
const
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
}
|
502
|
-
navigateToShoppingCart() {
|
503
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
504
|
-
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
505
|
-
this.router.navigate([flowRouteUrl, 'cart'], { queryParams: routeSnapshot.queryParams });
|
506
|
-
}
|
507
|
-
navigateToCatalog() {
|
508
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
509
|
-
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
510
|
-
this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
|
511
|
-
}
|
512
|
-
navigateToAssets() {
|
513
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
514
|
-
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
515
|
-
this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
|
516
|
-
}
|
517
|
-
switchObject(id) {
|
518
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
519
|
-
const route = this.getLastChildRoute(this.route);
|
520
|
-
const objName = SalesforceIdUtils.getSfObjectNameById(id);
|
521
|
-
const queryParams = {
|
522
|
-
quoteId: objName === 'Quote' ? id : undefined,
|
523
|
-
accountId: objName === 'Account' ? id : undefined,
|
524
|
-
orderId: objName === 'Order' ? id : undefined,
|
525
|
-
};
|
526
|
-
this.router.navigate([], { relativeTo: route, queryParams: { ...routeSnapshot.queryParams, ...queryParams } });
|
527
|
-
}
|
528
|
-
}
|
529
|
-
FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i1$1.ContextService }, { token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
530
|
-
FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
|
531
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRouterService, decorators: [{
|
532
|
-
type: Injectable,
|
533
|
-
args: [{ providedIn: 'root' }]
|
534
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i1$1.ContextService }, { type: i5.IntegrationState }]; } });
|
535
|
-
|
536
|
-
class CartPreviewComponent {
|
537
|
-
constructor(flowConfiguration, routerService, productImagesService, quoteDraftService) {
|
538
|
-
this.flowConfiguration = flowConfiguration;
|
539
|
-
this.routerService = routerService;
|
540
|
-
this.productImagesService = productImagesService;
|
541
|
-
this.quoteDraftService = quoteDraftService;
|
542
|
-
this.productRowHeight = 65;
|
543
|
-
this.form = new FormGroup({});
|
544
|
-
this.hasTermInProducts = false;
|
545
|
-
this.scrollHeight = 0;
|
546
|
-
this.shouldUpdate$ = new BehaviorSubject(true);
|
547
|
-
this.destroyed$ = new Subject();
|
548
|
-
this.lockedProductId$ = combineLatest([this.routerService.route$, this.routerService.isConfigurationRoute$()]).pipe(map(([route, isConfigurationRoute]) => {
|
549
|
-
if (!isConfigurationRoute) {
|
550
|
-
return null;
|
551
|
-
}
|
552
|
-
return route.queryParams['productId'];
|
553
|
-
}));
|
554
|
-
this.isEditMode$ = this.quoteDraftService.isEditMode$();
|
555
|
-
}
|
556
|
-
ngOnChanges(changes) {
|
557
|
-
const { products } = changes;
|
558
|
-
if (products) {
|
559
|
-
this.shouldUpdate$.next(true);
|
560
|
-
this.scrollHeight = Math.min(this.products.length * this.productRowHeight, 460);
|
561
|
-
}
|
562
|
-
}
|
563
|
-
ngAfterViewInit() {
|
564
|
-
combineLatest([this.lockedProductId$, this.isEditMode$, this.shouldUpdate$, this.overlayPanel.onShow])
|
565
|
-
.pipe(filter(() => this.overlayPanel.overlayVisible), takeUntil(this.destroyed$))
|
566
|
-
.subscribe(([lockedProductId, isEditMode]) => this.updateControls(this.products, isEditMode, lockedProductId));
|
567
|
-
}
|
568
|
-
ngOnDestroy() {
|
569
|
-
this.destroyed$.next();
|
570
|
-
this.destroyed$.complete();
|
571
|
-
}
|
572
|
-
getImageUrl(productId) {
|
573
|
-
return this.productImagesService.getImageUrl$(productId);
|
574
|
-
}
|
575
|
-
navigateToProductConfiguration(productId, lineItemId) {
|
576
|
-
this.overlayPanel.hide();
|
577
|
-
this.routerService.navigateToProductConfiguration(productId, lineItemId);
|
578
|
-
}
|
579
|
-
controlBlurHandler(product) {
|
580
|
-
const control = this.form.get(product.id);
|
581
|
-
if (!control || control.invalid) {
|
582
|
-
return;
|
583
|
-
}
|
584
|
-
this.flowConfiguration.update([
|
585
|
-
{
|
586
|
-
dataType: 'LINEITEM',
|
587
|
-
attributeType: 'QTY',
|
588
|
-
id: product.id,
|
589
|
-
newValue: control.value,
|
590
|
-
},
|
591
|
-
]);
|
592
|
-
}
|
593
|
-
deleteHandler(product) {
|
594
|
-
this.flowConfiguration.delete([product.id]);
|
595
|
-
}
|
596
|
-
deleteAllHandler() {
|
597
|
-
const productIds = this.products.map(product => product.id);
|
598
|
-
this.flowConfiguration.delete(productIds);
|
599
|
-
}
|
600
|
-
updateControls(products, isEditMode, lockedProductId) {
|
601
|
-
const ids = [];
|
602
|
-
products.forEach(item => {
|
603
|
-
if (!item.id) {
|
604
|
-
return;
|
605
|
-
}
|
606
|
-
ids.push(item.id);
|
607
|
-
let control = this.form.get(item.id);
|
608
|
-
if (!control) {
|
609
|
-
control = new FormControl(item.qty, []);
|
610
|
-
this.form.addControl(item.id, control);
|
611
|
-
}
|
612
|
-
else {
|
613
|
-
control.setValue(item.qty);
|
614
|
-
}
|
615
|
-
if (!isEditMode || item.deleted || item.productId === lockedProductId) {
|
616
|
-
control.disable();
|
617
|
-
}
|
618
|
-
else {
|
619
|
-
control.enable();
|
620
|
-
}
|
621
|
-
});
|
622
|
-
const removedIds = Object.keys(this.form.controls).filter(id => !ids.includes(id));
|
623
|
-
removedIds.forEach(id => this.form.removeControl(id));
|
624
|
-
this.hasTermInProducts = products.some((item) => item.hasTerm);
|
625
|
-
}
|
626
|
-
}
|
627
|
-
CartPreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewComponent, deps: [{ token: i1$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i1$1.ProductImagesService }, { token: i1$1.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
|
628
|
-
CartPreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p-overlayPanel\n styleClass=\"catalog-overlay flow-header-overlay center no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"lockedProductId$ | async as lockedProductId\">\n <ng-container *vlLet=\"isEditMode$ | async as isEditMode\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-cross close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <p-virtualScroller [value]=\"products\" scrollHeight=\"{{ scrollHeight }}px\" [itemSize]=\"productRowHeight\">\n <ng-template pTemplate=\"item\" let-product>\n <div\n class=\"product item\"\n *vlLet=\"!isEditMode || product.deleted as isReadonlyProduct\"\n [class.readonly]=\"isReadonlyProduct\"\n [class.deleted]=\"product.deleted\"\n >\n <ng-container *vlLet=\"lockedProductId === product.productId as isLockedProduct\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break product-name\" [class.line-through]=\"product.deleted\">\n {{ product.name }}\n </div>\n <div class=\"actions\" *ngIf=\"!isReadonlyProduct\">\n <p-button\n label=\"Configure\"\n [disabled]=\"isLockedProduct || !product.configurable || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"isLockedProduct || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-button-secondary\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"form.get(product.id) as control\">\n <div class=\"qty\" *ngIf=\"!isReadonlyProduct; else readonlyQty\">\n <vl-quantity-control\n [formControl]=\"$any(control)\"\n (valueChange)=\"controlBlurHandler(product)\"\n ></vl-quantity-control>\n </div>\n <ng-template #readonlyQty\n ><span class=\"text-right\">{{ control.value }}</span></ng-template\n >\n </ng-container>\n </ng-container>\n </div>\n </ng-template>\n </p-virtualScroller>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-no-image no-image-icon\"></i>\n </ng-template>\n\n <div class=\"flex footer\">\n <p-button\n label=\"Clear Cart\"\n styleClass=\"p-button-link p-button-sm pl-0 pr-0\"\n [disabled]=\"!isEditMode || !!lockedProductId || hasTermInProducts\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-cross close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">\n <i class=\"vl-icon vl-bag\"></i>\n There are no products added to the Shopping Cart yet.\n </span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: ["p-virtualscroller ::ng-deep .p-virtualscroller-header{background:none;padding:0;border:none;font-weight:unset}.flow-header-overlay *{font-family:var(--cg-font-family)}.flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px;font-size:16px;font-style:normal;font-weight:500;line-height:20px}.empty-state{background:var(--cg-bg-color);padding:16px;display:flex;gap:8px;justify-content:center;font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}.product{display:grid;grid-template-columns:auto 100px;padding:8px 0;border-bottom:1px solid var(--cg-border-color)}.product.readonly{align-items:center}.product.deleted{opacity:.5}.product.item{height:65px;overflow:hidden}.product__info{display:flex;gap:16px}.product__image-wrapper{flex-shrink:0;height:48px;width:48px;display:flex;justify-content:center;align-items:center;background:var(--cg-bg-color-hover);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .product-name{margin-bottom:4px;font-size:14px;font-weight:500;line-height:20px}.product .actions{display:flex;gap:16px}.footer{padding-top:8px}.word-break{word-break:break-word}.no-image-icon{height:24px;width:24px}.qty{display:flex;align-items:center}.flow-header-overlay__wrapper ::ng-deep .p-button-link{padding:0;font-size:12px;font-weight:400;line-height:18px;letter-spacing:.3px;color:var(--cg-primary-color)}.flow-header-overlay__wrapper ::ng-deep .p-button-link:hover:enabled{color:var(--cg-text-color-secondary)}.flow-header-overlay__wrapper ::ng-deep .p-button-link:hover:enabled .p-button-label{text-decoration:none}.flow-header-overlay__wrapper ::ng-deep .p-button-link.p-button-secondary{color:var(--cg-text-color-secondary)}.flow-header-overlay__wrapper ::ng-deep .p-button-link.p-button-secondary:hover:enabled{color:var(--cg-primary-color)}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i7.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { kind: "component", type: i9.VirtualScroller, selector: "p-virtualScroller", inputs: ["value", "itemSize", "style", "styleClass", "scrollHeight", "lazy", "rows", "minBufferPx", "maxBufferPx", "delay", "trackBy", "totalRecords", "first", "cache"], outputs: ["onLazyLoad"] }, { kind: "component", type: i3$1.QuantityControlComponent, selector: "vl-quantity-control", outputs: ["valueChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
629
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewComponent, decorators: [{
|
630
|
-
type: Component,
|
631
|
-
args: [{ selector: 'vl-cart-preview', changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-overlayPanel\n styleClass=\"catalog-overlay flow-header-overlay center no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"lockedProductId$ | async as lockedProductId\">\n <ng-container *vlLet=\"isEditMode$ | async as isEditMode\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-cross close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <p-virtualScroller [value]=\"products\" scrollHeight=\"{{ scrollHeight }}px\" [itemSize]=\"productRowHeight\">\n <ng-template pTemplate=\"item\" let-product>\n <div\n class=\"product item\"\n *vlLet=\"!isEditMode || product.deleted as isReadonlyProduct\"\n [class.readonly]=\"isReadonlyProduct\"\n [class.deleted]=\"product.deleted\"\n >\n <ng-container *vlLet=\"lockedProductId === product.productId as isLockedProduct\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break product-name\" [class.line-through]=\"product.deleted\">\n {{ product.name }}\n </div>\n <div class=\"actions\" *ngIf=\"!isReadonlyProduct\">\n <p-button\n label=\"Configure\"\n [disabled]=\"isLockedProduct || !product.configurable || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"isLockedProduct || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-button-secondary\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"form.get(product.id) as control\">\n <div class=\"qty\" *ngIf=\"!isReadonlyProduct; else readonlyQty\">\n <vl-quantity-control\n [formControl]=\"$any(control)\"\n (valueChange)=\"controlBlurHandler(product)\"\n ></vl-quantity-control>\n </div>\n <ng-template #readonlyQty\n ><span class=\"text-right\">{{ control.value }}</span></ng-template\n >\n </ng-container>\n </ng-container>\n </div>\n </ng-template>\n </p-virtualScroller>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-no-image no-image-icon\"></i>\n </ng-template>\n\n <div class=\"flex footer\">\n <p-button\n label=\"Clear Cart\"\n styleClass=\"p-button-link p-button-sm pl-0 pr-0\"\n [disabled]=\"!isEditMode || !!lockedProductId || hasTermInProducts\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-cross close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">\n <i class=\"vl-icon vl-bag\"></i>\n There are no products added to the Shopping Cart yet.\n </span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: ["p-virtualscroller ::ng-deep .p-virtualscroller-header{background:none;padding:0;border:none;font-weight:unset}.flow-header-overlay *{font-family:var(--cg-font-family)}.flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px;font-size:16px;font-style:normal;font-weight:500;line-height:20px}.empty-state{background:var(--cg-bg-color);padding:16px;display:flex;gap:8px;justify-content:center;font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}.product{display:grid;grid-template-columns:auto 100px;padding:8px 0;border-bottom:1px solid var(--cg-border-color)}.product.readonly{align-items:center}.product.deleted{opacity:.5}.product.item{height:65px;overflow:hidden}.product__info{display:flex;gap:16px}.product__image-wrapper{flex-shrink:0;height:48px;width:48px;display:flex;justify-content:center;align-items:center;background:var(--cg-bg-color-hover);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .product-name{margin-bottom:4px;font-size:14px;font-weight:500;line-height:20px}.product .actions{display:flex;gap:16px}.footer{padding-top:8px}.word-break{word-break:break-word}.no-image-icon{height:24px;width:24px}.qty{display:flex;align-items:center}.flow-header-overlay__wrapper ::ng-deep .p-button-link{padding:0;font-size:12px;font-weight:400;line-height:18px;letter-spacing:.3px;color:var(--cg-primary-color)}.flow-header-overlay__wrapper ::ng-deep .p-button-link:hover:enabled{color:var(--cg-text-color-secondary)}.flow-header-overlay__wrapper ::ng-deep .p-button-link:hover:enabled .p-button-label{text-decoration:none}.flow-header-overlay__wrapper ::ng-deep .p-button-link.p-button-secondary{color:var(--cg-text-color-secondary)}.flow-header-overlay__wrapper ::ng-deep .p-button-link.p-button-secondary:hover:enabled{color:var(--cg-primary-color)}\n"] }]
|
632
|
-
}], ctorParameters: function () { return [{ type: i1$1.FlowConfigurationService }, { type: FlowRouterService }, { type: i1$1.ProductImagesService }, { type: i1$1.QuoteDraftService }]; }, propDecorators: { overlayPanel: [{
|
633
|
-
type: ViewChild,
|
634
|
-
args: [OverlayPanel]
|
635
|
-
}], products: [{
|
636
|
-
type: Input
|
637
|
-
}] } });
|
638
|
-
|
639
|
-
class CartPreviewModule {
|
640
|
-
}
|
641
|
-
CartPreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
642
|
-
CartPreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, declarations: [CartPreviewComponent], imports: [CommonModule,
|
643
|
-
ReactiveFormsModule,
|
644
|
-
ButtonModule,
|
645
|
-
OverlayPanelModule,
|
646
|
-
LetDirectiveModule,
|
647
|
-
InputNumberModule,
|
648
|
-
VirtualScrollerModule,
|
649
|
-
QuantityControlModule], exports: [CartPreviewComponent] });
|
650
|
-
CartPreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, imports: [CommonModule,
|
651
|
-
ReactiveFormsModule,
|
652
|
-
ButtonModule,
|
653
|
-
OverlayPanelModule,
|
654
|
-
LetDirectiveModule,
|
655
|
-
InputNumberModule,
|
656
|
-
VirtualScrollerModule,
|
657
|
-
QuantityControlModule] });
|
658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, decorators: [{
|
659
|
-
type: NgModule,
|
660
|
-
args: [{
|
661
|
-
declarations: [CartPreviewComponent],
|
662
|
-
imports: [
|
663
|
-
CommonModule,
|
664
|
-
ReactiveFormsModule,
|
665
|
-
ButtonModule,
|
666
|
-
OverlayPanelModule,
|
667
|
-
LetDirectiveModule,
|
668
|
-
InputNumberModule,
|
669
|
-
VirtualScrollerModule,
|
670
|
-
QuantityControlModule,
|
671
|
-
],
|
672
|
-
exports: [CartPreviewComponent],
|
673
|
-
}]
|
674
|
-
}] });
|
675
|
-
|
676
|
-
class FlowDialogService {
|
677
|
-
constructor(dialogService, contextService) {
|
678
|
-
this.dialogService = dialogService;
|
679
|
-
this.contextService = contextService;
|
680
|
-
}
|
681
|
-
show(config) {
|
682
|
-
return this.dialogService.open(FlowDialogComponent, {
|
683
|
-
dismissableMask: true,
|
684
|
-
closeOnEscape: true,
|
685
|
-
closable: true,
|
686
|
-
showHeader: false,
|
687
|
-
width: '320px',
|
688
|
-
data: { config },
|
689
|
-
styleClass: 'flow-dialog',
|
690
|
-
}).onClose;
|
691
|
-
}
|
692
|
-
showEmptyCartDialog() {
|
693
|
-
return this.show({
|
694
|
-
title: 'No Products in Quote',
|
695
|
-
description: 'There are no products in your Quote. To save a Quote, add at least one product.',
|
696
|
-
primaryButton: 'Ok',
|
697
|
-
});
|
698
|
-
}
|
699
|
-
showReadonlyModeDialog() {
|
700
|
-
const ctx = this.contextService.resolve();
|
701
|
-
const objectName = ctx.mode ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
|
702
|
-
return this.show({
|
703
|
-
title: 'Error',
|
704
|
-
description: `${objectName} Cannot be Saved`,
|
705
|
-
primaryButton: 'Ok',
|
444
|
+
showReadonlyModeDialog() {
|
445
|
+
const ctx = this.contextService.resolve();
|
446
|
+
const objectName = ctx.mode ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
|
447
|
+
return this.show({
|
448
|
+
title: 'Error',
|
449
|
+
description: `${objectName} Cannot be Saved`,
|
450
|
+
primaryButton: 'Ok',
|
706
451
|
});
|
707
452
|
}
|
708
453
|
showQuoteReadonlyModeDialog() {
|
@@ -785,682 +530,190 @@ class FlowDialogService {
|
|
785
530
|
secondaryButton: 'Cancel',
|
786
531
|
});
|
787
532
|
}
|
533
|
+
showDialog(dialog) {
|
534
|
+
const dialogFunction = this[dialog].bind(this);
|
535
|
+
return dialogFunction(dialog);
|
536
|
+
}
|
788
537
|
}
|
789
|
-
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
790
|
-
FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
538
|
+
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i2.ContextService }], target: i0.ɵɵFactoryTarget.Injectable });
|
539
|
+
FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
|
792
541
|
type: Injectable
|
793
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type:
|
542
|
+
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }]; } });
|
794
543
|
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
544
|
+
class FlowRouterService {
|
545
|
+
constructor(router, route, contextService, integrationState) {
|
546
|
+
this.router = router;
|
547
|
+
this.route = route;
|
799
548
|
this.contextService = contextService;
|
800
|
-
this.
|
801
|
-
this.
|
802
|
-
this.
|
803
|
-
|
804
|
-
|
805
|
-
this.
|
806
|
-
|
807
|
-
|
808
|
-
{ name: 'E.MRR', value: 0 },
|
809
|
-
{ name: 'NRR', value: 0 },
|
810
|
-
{ name: 'E.NRR', value: 0 },
|
811
|
-
];
|
812
|
-
this.visibleSelectedMetrics = [];
|
813
|
-
this.restSelectedMetrics = [];
|
814
|
-
this.metrics = [];
|
815
|
-
this.filteredMetrics = [];
|
816
|
-
this.sidebarVisible = false;
|
817
|
-
this.searchControl = new FormControl('');
|
818
|
-
this.isFocused = false;
|
819
|
-
this.nameControl = new FormControl('', [
|
820
|
-
requiredValidator,
|
821
|
-
invalidCharactersValidator(standardCharSetWithSpaceRegExp),
|
822
|
-
reservedIdentifierValidator,
|
823
|
-
Validators.maxLength(80),
|
824
|
-
]);
|
825
|
-
this.activeMetricRules = [];
|
826
|
-
this.activeMetricRuleNames = [];
|
827
|
-
this.defaultMetricRuleNames = [];
|
828
|
-
this.metricKeys = [];
|
829
|
-
this.lastSavedMetrics = [];
|
830
|
-
this.destroyed$ = new Subject();
|
831
|
-
this.currencySymbol = this.runtimeSettings.getCurrencySettings().symbol;
|
832
|
-
}
|
833
|
-
ngOnInit() {
|
834
|
-
this.activeMetricRules = this.flowConfiguration.activeMetricsSnapshot.filter(metricRule => metricRule.metrics.some(metric => !!metric.totalName));
|
835
|
-
const activeMetricRuleNames = this.activeMetricRules.map(metricRule => metricRule.title);
|
836
|
-
this.shoppingCartSettingsApiService
|
837
|
-
.getSettingsMap()
|
838
|
-
.pipe(withLatestFrom(this.quoteDraftService.currentState$), tap$1(([settings, lineItems]) => {
|
839
|
-
this.defaultMetricRuleNames = (settings?.DEFAULT_HEADER_METRICS || []).filter(ruleName => activeMetricRuleNames.includes(ruleName));
|
840
|
-
this.metricKeys = this.collectMetricKeys(lineItems);
|
841
|
-
this.activeMetricRuleNames = this.getActiveMetricRuleNames();
|
842
|
-
}), takeUntil$1(this.destroyed$))
|
843
|
-
.subscribe(() => {
|
844
|
-
this.collectAvailableMetrics();
|
845
|
-
});
|
846
|
-
this.searchControl.valueChanges.pipe(takeUntil$1(this.destroyed$), startWith('')).subscribe(query => {
|
847
|
-
this.filteredMetrics = this.metrics.filter(({ name }) => {
|
848
|
-
return (name || '').toLowerCase().includes(query?.toLowerCase());
|
849
|
-
});
|
850
|
-
});
|
851
|
-
this.metricsCalculationService.onMetricsUpdate$
|
852
|
-
.pipe(takeUntil$1(this.destroyed$))
|
853
|
-
.subscribe(() => this.cdr.detectChanges());
|
854
|
-
}
|
855
|
-
ngOnDestroy() {
|
856
|
-
this.destroyed$.next();
|
857
|
-
this.destroyed$.complete();
|
858
|
-
}
|
859
|
-
toggleOverlay(event, overlay, target) {
|
860
|
-
event.stopPropagation();
|
861
|
-
if (this.restSelectedMetrics.length) {
|
862
|
-
if (!overlay.overlayVisible) {
|
863
|
-
document.dispatchEvent(new Event('click'));
|
549
|
+
this.integrationState = integrationState;
|
550
|
+
this.urlHistory = [];
|
551
|
+
this.getLastChildRoute = (route) => {
|
552
|
+
return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;
|
553
|
+
};
|
554
|
+
this.getNthChildRoute = (route, index) => {
|
555
|
+
if (index <= 0) {
|
556
|
+
return route;
|
864
557
|
}
|
865
|
-
|
866
|
-
}
|
867
|
-
|
868
|
-
this.
|
869
|
-
}
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
this.
|
874
|
-
|
875
|
-
|
876
|
-
this.
|
877
|
-
|
878
|
-
|
879
|
-
this.
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
this.
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
changeMetricOrder(event) {
|
898
|
-
moveItemInArray(this.metrics, event.previousIndex, event.currentIndex);
|
899
|
-
this.filteredMetrics = this.metrics;
|
900
|
-
}
|
901
|
-
editMetric(metric) {
|
902
|
-
if (this.editingMetric && this.nameControl.invalid) {
|
903
|
-
return;
|
904
|
-
}
|
905
|
-
this.editingMetric = metric;
|
906
|
-
this.nameControl.setValue(metric.name);
|
907
|
-
}
|
908
|
-
saveMetric() {
|
909
|
-
if (this.nameControl.invalid) {
|
910
|
-
return;
|
911
|
-
}
|
912
|
-
if (this.editingMetric) {
|
913
|
-
this.editingMetric.name = this.nameControl.value?.trim();
|
914
|
-
}
|
915
|
-
this.editingMetric = undefined;
|
916
|
-
}
|
917
|
-
cancelMetric() {
|
918
|
-
this.editingMetric = undefined;
|
919
|
-
}
|
920
|
-
resetToDefault() {
|
921
|
-
this.collectAvailableMetrics(true);
|
922
|
-
}
|
923
|
-
onFocus() {
|
924
|
-
this.isFocused = true;
|
925
|
-
}
|
926
|
-
onBlur() {
|
927
|
-
this.isFocused = false;
|
928
|
-
}
|
929
|
-
clearSearch(event) {
|
930
|
-
event.stopPropagation();
|
931
|
-
this.searchControl.setValue('');
|
932
|
-
}
|
933
|
-
collectMetricKeys(lineItems) {
|
934
|
-
const keys = [];
|
935
|
-
lineItems.forEach(lineItem => {
|
936
|
-
keys.push(...Object.keys(lineItem.totalMetrics || {}));
|
937
|
-
keys.push(...this.collectMetricKeys(lineItem.lineItems));
|
558
|
+
return route.firstChild ? this.getNthChildRoute(route.firstChild, index - 1) : route;
|
559
|
+
};
|
560
|
+
this.getLastChildRouteSnapshot = (route) => {
|
561
|
+
return route.firstChild ? this.getLastChildRouteSnapshot(route.firstChild) : route;
|
562
|
+
};
|
563
|
+
this.watchLastChildRoute$ = (route) => {
|
564
|
+
return this.routeChange$.pipe(map(() => this.getLastChildRouteSnapshot(route.snapshot)));
|
565
|
+
};
|
566
|
+
this.getLastChildParams = (route) => {
|
567
|
+
return route.firstChild ? this.getLastChildParams(route.firstChild) : route.params;
|
568
|
+
};
|
569
|
+
this.watchLastChildParams$ = (route) => {
|
570
|
+
return this.routeChange$.pipe(map(() => this.getLastChildParams(route.snapshot)));
|
571
|
+
};
|
572
|
+
this.getFlowSubpath$ = () => {
|
573
|
+
return this.route$.pipe(map(route => {
|
574
|
+
const url = route.url.join('/');
|
575
|
+
const flowRootUrl = this.getFlowRootPath(route);
|
576
|
+
return url.replace(flowRootUrl, '');
|
577
|
+
}));
|
578
|
+
};
|
579
|
+
this.routeChange$ = this.router.events.pipe(filter(e => e instanceof NavigationEnd), shareReplay());
|
580
|
+
this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(startWith(this.getLastChildParams(this.route.snapshot)), shareReplay());
|
581
|
+
this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), shareReplay());
|
582
|
+
this.loading$ = this.router.events.pipe(filter(e => e instanceof NavigationStart ||
|
583
|
+
e instanceof NavigationCancel ||
|
584
|
+
e instanceof NavigationEnd ||
|
585
|
+
e instanceof NavigationError), map(e => e instanceof NavigationStart), startWith(false), distinctUntilChanged());
|
586
|
+
this.routeChange$.subscribe(() => {
|
587
|
+
this.urlHistory.push(this.router.url);
|
588
|
+
// Close Guided Selling when user navigates to another flow page
|
589
|
+
this.integrationState.dispatch(FlowAction.CloseGuidedSelling({ keepState: true }));
|
938
590
|
});
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
collectAvailableMetrics(resetToDefault = false) {
|
947
|
-
const storedMetrics = JSON.parse(localStorage.getItem(METRICS_STORAGE_KEY) || '[]');
|
948
|
-
const metricKeys = this.metricKeys.slice();
|
949
|
-
const isDefaultConfiguration = !storedMetrics.length || resetToDefault;
|
950
|
-
this.metrics = (isDefaultConfiguration ? this.activeMetricRuleNames : storedMetrics).reduce((result, metric) => {
|
951
|
-
const metricKeyIndex = metricKeys.findIndex(key => key === metric.key);
|
952
|
-
if (metricKeyIndex >= 0) {
|
953
|
-
metricKeys.splice(metricKeyIndex, 1);
|
591
|
+
}
|
592
|
+
getFlowRootRoute(route) {
|
593
|
+
const path = [...route.pathFromRoot];
|
594
|
+
while (path.length) {
|
595
|
+
const parent = path.pop();
|
596
|
+
if (!parent) {
|
597
|
+
break;
|
954
598
|
}
|
955
|
-
if (
|
956
|
-
|
599
|
+
if (parent.routeConfig?.id === VELOCE_FLOW_ROOT_ROUTE) {
|
600
|
+
return parent;
|
957
601
|
}
|
958
|
-
return [...result, metric];
|
959
|
-
}, []);
|
960
|
-
this.metrics = [
|
961
|
-
...this.metrics,
|
962
|
-
...metricKeys.map(metricKey => {
|
963
|
-
return { key: metricKey, name: this.getMetricName(metricKey), visible: false };
|
964
|
-
}),
|
965
|
-
];
|
966
|
-
// sort the metrics by the order of default metric rule names from the shopping cart settings
|
967
|
-
this.metrics = this.sortMetrics();
|
968
|
-
this.metrics = cloneDeep(this.metrics);
|
969
|
-
this.searchControl.setValue('');
|
970
|
-
if (!resetToDefault) {
|
971
|
-
this.lastSavedMetrics = cloneDeep(this.metrics);
|
972
|
-
this.setMetrics();
|
973
602
|
}
|
974
|
-
|
975
|
-
}
|
976
|
-
getMetricName(key) {
|
977
|
-
return (this.activeMetricRules.find(metricRule => metricRule.metrics.find(metric => metric.totalName === key))?.title ||
|
978
|
-
key);
|
979
|
-
}
|
980
|
-
toNumber(value) {
|
981
|
-
return +(value || 0);
|
982
|
-
}
|
983
|
-
getActiveMetricRuleNames() {
|
984
|
-
return this.activeMetricRules.reduce((result, metricRule) => {
|
985
|
-
const name = metricRule.title;
|
986
|
-
const visible = this.defaultMetricRuleNames.includes(name);
|
987
|
-
metricRule.metrics.forEach(metric => {
|
988
|
-
result.push({
|
989
|
-
key: metric.totalName || metric.name,
|
990
|
-
name,
|
991
|
-
visible,
|
992
|
-
});
|
993
|
-
});
|
994
|
-
return result;
|
995
|
-
}, []);
|
996
|
-
}
|
997
|
-
/**
|
998
|
-
* Sorts the Metrics array by the order of the default metric rule names from the shopping cart settings.
|
999
|
-
* If a metric is included in the list of default metrics, it raises the metric to the top of the metrics array.
|
1000
|
-
*/
|
1001
|
-
sortMetrics() {
|
1002
|
-
return this.metrics.slice().sort((a, b) => {
|
1003
|
-
const indexA = this.defaultMetricRuleNames.indexOf(a.name);
|
1004
|
-
const indexB = this.defaultMetricRuleNames.indexOf(b.name);
|
1005
|
-
if (indexA === -1 && indexB === -1) {
|
1006
|
-
return 0;
|
1007
|
-
}
|
1008
|
-
if (indexA === -1) {
|
1009
|
-
return 1;
|
1010
|
-
}
|
1011
|
-
if (indexB === -1) {
|
1012
|
-
return -1;
|
1013
|
-
}
|
1014
|
-
return indexA - indexB;
|
1015
|
-
});
|
1016
|
-
}
|
1017
|
-
}
|
1018
|
-
MetricsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsComponent, deps: [{ token: i1$1.ContextService }, { token: i1$1.QuoteDraftService }, { token: i0.ChangeDetectorRef }, { token: i1$1.MetricsCalculationService }, { token: i1$1.FlowConfigurationService }, { token: i2.ShoppingCartSettingsApiService }, { token: i1$1.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Component });
|
1019
|
-
MetricsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: MetricsComponent, selector: "vl-metrics", viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: OverlayPanel, descendants: true }], ngImport: i0, template: "<div class=\"header-metrics\" (click)=\"toggleOverlay($event, overlayPanel, metricsTarget)\">\n <div class=\"metrics\">\n <div *ngFor=\"let metric of visibleSelectedMetrics\" class=\"metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ getMetricValue(metric.key) | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ getMetricValue(metric.key) | vlPrice }}\n </span>\n </div>\n\n <ng-container *ngIf=\"!visibleSelectedMetrics.length\">\n <div *ngFor=\"let metric of emptyStateMetrics\" class=\"metric empty-state-metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ metric.value | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.value | vlPrice }}\n </span>\n </div>\n </ng-container>\n </div>\n\n <div #metricsTarget class=\"metrics-overlay-target\" [class.expanded]=\"overlayPanel?.overlayVisible\">\n <i class=\"vl-icon vl-arrow-down\"></i>\n </div>\n</div>\n\n<p-overlayPanel\n styleClass=\"catalog-overlay metrics-overlay-container right no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"overlay-metrics\">\n <div *ngFor=\"let metric of restSelectedMetrics\" class=\"metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ getMetricValue(metric.key) | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ getMetricValue(metric.key) | vlPrice }}\n </span>\n </div>\n </div>\n <button class=\"config\" (click)=\"openSidebar()\">\n Metrics Config\n <i class=\"vl-icon vl-arrow-right\"></i>\n </button>\n </ng-template>\n</p-overlayPanel>\n\n<p-sidebar\n [visible]=\"sidebarVisible\"\n (visibleChange)=\"closeSidebar()\"\n position=\"right\"\n [baseZIndex]=\"1000\"\n [style]=\"{ width: '300px' }\"\n>\n <div class=\"container\">\n <div class=\"header\">\n Quote Metrics Config\n <i class=\"vl-icon vl-cross\" (click)=\"closeSidebar()\"></i>\n </div>\n\n <label class=\"search-container\" [class.active]=\"searchControl.value || isFocused\">\n <i class=\"vl-icon vl-search\"></i>\n <input\n data-test-id=\"search\"\n [formControl]=\"searchControl\"\n pInputText\n placeholder=\"Search for metric\u2026\"\n class=\"w-full search-input\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <i *ngIf=\"searchControl.value\" class=\"vl-icon vl-cross\" (click)=\"clearSearch($event)\"></i>\n </label>\n\n <div class=\"content\">\n <div class=\"sidebar-metrics\" cdkDropList (cdkDropListDropped)=\"changeMetricOrder($event)\">\n <div\n *ngFor=\"let metric of filteredMetrics\"\n class=\"sidebar-metric\"\n [class.edit]=\"metric.key === editingMetric?.key\"\n cdkDrag\n [cdkDragDisabled]=\"!!searchControl.value\"\n >\n <div class=\"drag-icon\">\n <i class=\"vl-icon vl-drag\" cdkDragHandle></i>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"metricTemplate\"\n [ngTemplateOutletContext]=\"{ metric: metric }\"\n ></ng-container>\n </div>\n </div>\n\n <div class=\"empty-state\" *ngIf=\"!filteredMetrics.length\">There are no items matching your search criteria</div>\n </div>\n <div class=\"footer\">\n <p-button\n label=\"Reset to Default\"\n styleClass=\"p-button-outlined p-button-sm\"\n (onClick)=\"resetToDefault()\"\n ></p-button>\n <p-button label=\"Save\" styleClass=\"p-button p-button-filled p-button-sm\" (onClick)=\"save()\"></p-button>\n </div>\n </div>\n</p-sidebar>\n\n<ng-template #metricTemplate let-metric=\"metric\">\n <div *ngIf=\"editingMetric?.key !== metric.key\" class=\"preview-state\">\n <p-checkbox\n [ngModel]=\"metric.visible\"\n (ngModelChange)=\"metric.visible = !metric.visible\"\n [binary]=\"true\"\n checkboxIcon=\"vl-icon vl-check\"\n ></p-checkbox>\n <div class=\"title\">{{ metric.name }}</div>\n </div>\n\n <div *ngIf=\"editingMetric?.key === metric.key\" class=\"edit-state\">\n <input data-test-id=\"name\" [formControl]=\"nameControl\" pInputText placeholder=\"Metric name\" class=\"w-full\" />\n <vl-error-tooltip [tooltip]=\"nameControl | error : 'name'\" [visible]=\"!!nameControl.errors\"></vl-error-tooltip>\n </div>\n <div class=\"actions\">\n <div *ngIf=\"editingMetric?.key !== metric.key\" (click)=\"editMetric(metric)\" class=\"action edit\">\n <i class=\"vl-icon vl-edit\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"cancelMetric()\" class=\"action cancel\">\n <i class=\"vl-icon vl-cross\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"saveMetric()\" class=\"action save\">\n <i class=\"vl-icon vl-check\"></i>\n </div>\n </div>\n</ng-template>\n", styles: [":host .header-metrics{display:flex;gap:8px;cursor:pointer}:host .header-metrics *{font-family:var(--cg-font-family)}:host .header-metrics .metrics{min-width:130px;max-width:260px;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:0 8px;height:32px;align-items:flex-start}:host .header-metrics .metric{flex:1;flex-basis:114px;max-width:122px;display:flex;justify-content:space-between;align-items:flex-end;font-size:12px;line-height:16px;letter-spacing:.3px}:host .header-metrics .metric .name{color:#ffffffb3;max-width:55px;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .header-metrics .metric .value{overflow:hidden;text-overflow:ellipsis}:host .header-metrics .metric.empty-state-metric{filter:blur(1.5px)}:host .metrics-overlay-target{display:flex;align-items:center;width:16px;border-radius:4px;background:rgba(255,255,255,.1)}:host .metrics-overlay-target .vl-icon{color:var(--cg-white)}:host .metrics-overlay-target.expanded .vl-icon:before{transform:rotate(180deg)}:host ::ng-deep .p-sidebar-header{display:none}:host ::ng-deep .p-sidebar-content{padding:0;height:100%}::ng-deep .p-overlaypanel.metrics-overlay-container{max-width:300px;min-width:152px}::ng-deep .p-overlaypanel.metrics-overlay-container *{font-family:var(--cg-font-family)}::ng-deep .p-overlaypanel.metrics-overlay-container .p-overlaypanel-content{padding:0;margin-top:0}::ng-deep .p-overlaypanel.metrics-overlay-container .overlay-metrics{padding:16px;max-height:112px;overflow:auto}::ng-deep .p-overlaypanel.metrics-overlay-container .metric{display:flex;font-size:12px;line-height:16px;letter-spacing:.3px;align-items:flex-end}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .name{color:var(--cg-text-color-secondary);max-width:50%;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .value{overflow:hidden;text-overflow:ellipsis}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .filler:before{background-image:radial-gradient(circle at 1px 1px,var(--cg-text-color-secondary) 1px,transparent 0)}::ng-deep .p-overlaypanel.metrics-overlay-container .config{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 8px 8px 16px;cursor:pointer;background:var(--cg-white);outline:none;border:none;border-top:1px solid var(--cg-border-color);width:100%;height:32px;font-size:12px;line-height:16px;letter-spacing:.3px}::ng-deep .p-overlaypanel.metrics-overlay-container .config .vl-icon-chevron-down{color:var(--cg-primary-color)}.filler{flex:1;margin:0 4px 7px;min-width:7px}.filler:before{display:block;width:100%;height:2px;content:\"\";background-image:radial-gradient(circle at 1px 1px,rgba(255,255,255,.7) 1px,transparent 0);background-size:5px 2px}.container{display:flex;flex-direction:column;height:100%}.container .header{box-sizing:content-box;padding:24px 24px 0;margin-bottom:16px;height:32px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;font-family:var(--vl-font-family);font-size:20px;font-style:normal;font-weight:500;line-height:24px;letter-spacing:-.6px;color:var(--vl-accent-color)}.container .header i{cursor:pointer}.container .search-container{cursor:pointer;display:flex;height:32px;margin:0 24px 8px;padding:8px;background:var(--cg-bg-color);border:1px solid transparent;border-radius:32px}.container .search-container:hover,.container .search-container.active{background:var(--cg-white);border-color:var(--cg-primary-color)}.container .search-container .vl-icon{flex:0 0 auto}.container .search-container .search-input{width:100%;height:16px;padding:0 8px;border:none;font-size:12px;line-height:16px;letter-spacing:.3px;color:var(--cg-black-color);background:none}.container .search-container .search-input::placeholder{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.3px;color:var(--cg-text-color-secondary)}.container .content{padding:0 24px;display:flex;flex-direction:column;flex:1;overflow:hidden}.container .footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-top:1px solid var(--cg-border-color)}.container .footer p-button{flex:1}.container .footer p-button ::ng-deep button{border-radius:24px;width:100%;font-size:12px;font-family:var(--cg-font-family);font-weight:300;line-height:16px;letter-spacing:.3px;white-space:nowrap}.container .footer p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}.container .footer p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}.container .footer p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}.container .footer p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}.container app-empty-state::ng-deep{margin-bottom:12px}.container app-empty-state::ng-deep .container{width:100%;padding-bottom:0}.sidebar-metrics{width:100%;overflow:auto;padding:1px 0}.empty-state{display:flex;align-items:center;justify-content:center;padding:16px;color:var(--cg-text-color-secondary);font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}.sidebar-metric{display:flex;align-items:center;height:32px;position:relative;border-bottom:1px solid var(--cg-border-color)}.sidebar-metric.edit{border-bottom-color:var(--cg-primary-color)}.sidebar-metric.edit .drag-icon{display:none}.sidebar-metric:hover:not(.edit){background:var(--cg-bg-color)}.sidebar-metric:hover:not(.edit) .edit{visibility:visible}.sidebar-metric p-checkbox{margin-right:8px}.sidebar-metric .drag-icon{width:16px;height:16px;margin-right:8px}.sidebar-metric .drag-icon i{cursor:pointer;color:var(--cg-text-color-disabled)}.sidebar-metric.cdk-drag-disabled .drag-icon i{cursor:default}.sidebar-metric .title{font-weight:400;font-size:12px;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:text;user-select:text;cursor:text;color:var(--cg-black)}.sidebar-metric .preview-state,.sidebar-metric .edit-state{position:relative;margin-right:8px;min-width:0;display:flex;align-items:center;flex:1}.sidebar-metric .preview-state input,.sidebar-metric .edit-state input{padding-left:48px;border:none;background:transparent;width:100%}.sidebar-metric .actions{display:flex;gap:4px}.sidebar-metric .action{cursor:pointer;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:4px}.sidebar-metric .action:hover{background:var(--cg-primary-color);color:var(--cg-white)}.sidebar-metric .edit{visibility:hidden}.sidebar-metric .save{border-color:var(--cg-primary-color);border-radius:4px}.sidebar-metric ::ng-deep .p-checkbox{width:16px;height:16px}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box{width:16px;height:16px;border-width:1px;border-color:var(--cg-border-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box:hover{border-color:var(--cg-primary-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{background:var(--cg-primary-color);border-color:var(--cg-primary-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box .p-checkbox-icon{flex:0 0 auto;width:12px;height:12px}.cdk-drag-preview{z-index:10001!important;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .metric-tooltip .p-tooltip-text{font-size:11px;line-height:14px;letter-spacing:.3px;background:var(--vl-text-color-accent)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$2.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5$2.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i5$2.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i7.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i9$1.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { kind: "directive", type: i10.InputText, selector: "[pInputText]" }, { kind: "component", type: i11.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange"] }, { kind: "component", type: i3$1.ErrorTooltipComponent, selector: "vl-error-tooltip", inputs: ["tooltip", "visible", "top"] }, { kind: "directive", type: i3$1.AppHiddenTextTooltipDirective, selector: "[vlHiddenTextTooltip]", inputs: ["vlHiddenTextTooltip"] }, { kind: "pipe", type: i3$1.ErrorPipe, name: "error" }, { kind: "pipe", type: i1$1.PricePipe, name: "vlPrice" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1020
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsComponent, decorators: [{
|
1021
|
-
type: Component,
|
1022
|
-
args: [{ selector: 'vl-metrics', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"header-metrics\" (click)=\"toggleOverlay($event, overlayPanel, metricsTarget)\">\n <div class=\"metrics\">\n <div *ngFor=\"let metric of visibleSelectedMetrics\" class=\"metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ getMetricValue(metric.key) | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ getMetricValue(metric.key) | vlPrice }}\n </span>\n </div>\n\n <ng-container *ngIf=\"!visibleSelectedMetrics.length\">\n <div *ngFor=\"let metric of emptyStateMetrics\" class=\"metric empty-state-metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ metric.value | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.value | vlPrice }}\n </span>\n </div>\n </ng-container>\n </div>\n\n <div #metricsTarget class=\"metrics-overlay-target\" [class.expanded]=\"overlayPanel?.overlayVisible\">\n <i class=\"vl-icon vl-arrow-down\"></i>\n </div>\n</div>\n\n<p-overlayPanel\n styleClass=\"catalog-overlay metrics-overlay-container right no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"overlay-metrics\">\n <div *ngFor=\"let metric of restSelectedMetrics\" class=\"metric\">\n <span\n class=\"name\"\n [vlHiddenTextTooltip]=\"metric.name\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"{{ getMetricValue(metric.key) | vlPrice }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n {{ getMetricValue(metric.key) | vlPrice }}\n </span>\n </div>\n </div>\n <button class=\"config\" (click)=\"openSidebar()\">\n Metrics Config\n <i class=\"vl-icon vl-arrow-right\"></i>\n </button>\n </ng-template>\n</p-overlayPanel>\n\n<p-sidebar\n [visible]=\"sidebarVisible\"\n (visibleChange)=\"closeSidebar()\"\n position=\"right\"\n [baseZIndex]=\"1000\"\n [style]=\"{ width: '300px' }\"\n>\n <div class=\"container\">\n <div class=\"header\">\n Quote Metrics Config\n <i class=\"vl-icon vl-cross\" (click)=\"closeSidebar()\"></i>\n </div>\n\n <label class=\"search-container\" [class.active]=\"searchControl.value || isFocused\">\n <i class=\"vl-icon vl-search\"></i>\n <input\n data-test-id=\"search\"\n [formControl]=\"searchControl\"\n pInputText\n placeholder=\"Search for metric\u2026\"\n class=\"w-full search-input\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n />\n <i *ngIf=\"searchControl.value\" class=\"vl-icon vl-cross\" (click)=\"clearSearch($event)\"></i>\n </label>\n\n <div class=\"content\">\n <div class=\"sidebar-metrics\" cdkDropList (cdkDropListDropped)=\"changeMetricOrder($event)\">\n <div\n *ngFor=\"let metric of filteredMetrics\"\n class=\"sidebar-metric\"\n [class.edit]=\"metric.key === editingMetric?.key\"\n cdkDrag\n [cdkDragDisabled]=\"!!searchControl.value\"\n >\n <div class=\"drag-icon\">\n <i class=\"vl-icon vl-drag\" cdkDragHandle></i>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"metricTemplate\"\n [ngTemplateOutletContext]=\"{ metric: metric }\"\n ></ng-container>\n </div>\n </div>\n\n <div class=\"empty-state\" *ngIf=\"!filteredMetrics.length\">There are no items matching your search criteria</div>\n </div>\n <div class=\"footer\">\n <p-button\n label=\"Reset to Default\"\n styleClass=\"p-button-outlined p-button-sm\"\n (onClick)=\"resetToDefault()\"\n ></p-button>\n <p-button label=\"Save\" styleClass=\"p-button p-button-filled p-button-sm\" (onClick)=\"save()\"></p-button>\n </div>\n </div>\n</p-sidebar>\n\n<ng-template #metricTemplate let-metric=\"metric\">\n <div *ngIf=\"editingMetric?.key !== metric.key\" class=\"preview-state\">\n <p-checkbox\n [ngModel]=\"metric.visible\"\n (ngModelChange)=\"metric.visible = !metric.visible\"\n [binary]=\"true\"\n checkboxIcon=\"vl-icon vl-check\"\n ></p-checkbox>\n <div class=\"title\">{{ metric.name }}</div>\n </div>\n\n <div *ngIf=\"editingMetric?.key === metric.key\" class=\"edit-state\">\n <input data-test-id=\"name\" [formControl]=\"nameControl\" pInputText placeholder=\"Metric name\" class=\"w-full\" />\n <vl-error-tooltip [tooltip]=\"nameControl | error : 'name'\" [visible]=\"!!nameControl.errors\"></vl-error-tooltip>\n </div>\n <div class=\"actions\">\n <div *ngIf=\"editingMetric?.key !== metric.key\" (click)=\"editMetric(metric)\" class=\"action edit\">\n <i class=\"vl-icon vl-edit\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"cancelMetric()\" class=\"action cancel\">\n <i class=\"vl-icon vl-cross\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"saveMetric()\" class=\"action save\">\n <i class=\"vl-icon vl-check\"></i>\n </div>\n </div>\n</ng-template>\n", styles: [":host .header-metrics{display:flex;gap:8px;cursor:pointer}:host .header-metrics *{font-family:var(--cg-font-family)}:host .header-metrics .metrics{min-width:130px;max-width:260px;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:0 8px;height:32px;align-items:flex-start}:host .header-metrics .metric{flex:1;flex-basis:114px;max-width:122px;display:flex;justify-content:space-between;align-items:flex-end;font-size:12px;line-height:16px;letter-spacing:.3px}:host .header-metrics .metric .name{color:#ffffffb3;max-width:55px;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .header-metrics .metric .value{overflow:hidden;text-overflow:ellipsis}:host .header-metrics .metric.empty-state-metric{filter:blur(1.5px)}:host .metrics-overlay-target{display:flex;align-items:center;width:16px;border-radius:4px;background:rgba(255,255,255,.1)}:host .metrics-overlay-target .vl-icon{color:var(--cg-white)}:host .metrics-overlay-target.expanded .vl-icon:before{transform:rotate(180deg)}:host ::ng-deep .p-sidebar-header{display:none}:host ::ng-deep .p-sidebar-content{padding:0;height:100%}::ng-deep .p-overlaypanel.metrics-overlay-container{max-width:300px;min-width:152px}::ng-deep .p-overlaypanel.metrics-overlay-container *{font-family:var(--cg-font-family)}::ng-deep .p-overlaypanel.metrics-overlay-container .p-overlaypanel-content{padding:0;margin-top:0}::ng-deep .p-overlaypanel.metrics-overlay-container .overlay-metrics{padding:16px;max-height:112px;overflow:auto}::ng-deep .p-overlaypanel.metrics-overlay-container .metric{display:flex;font-size:12px;line-height:16px;letter-spacing:.3px;align-items:flex-end}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .name{color:var(--cg-text-color-secondary);max-width:50%;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .value{overflow:hidden;text-overflow:ellipsis}::ng-deep .p-overlaypanel.metrics-overlay-container .metric .filler:before{background-image:radial-gradient(circle at 1px 1px,var(--cg-text-color-secondary) 1px,transparent 0)}::ng-deep .p-overlaypanel.metrics-overlay-container .config{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 8px 8px 16px;cursor:pointer;background:var(--cg-white);outline:none;border:none;border-top:1px solid var(--cg-border-color);width:100%;height:32px;font-size:12px;line-height:16px;letter-spacing:.3px}::ng-deep .p-overlaypanel.metrics-overlay-container .config .vl-icon-chevron-down{color:var(--cg-primary-color)}.filler{flex:1;margin:0 4px 7px;min-width:7px}.filler:before{display:block;width:100%;height:2px;content:\"\";background-image:radial-gradient(circle at 1px 1px,rgba(255,255,255,.7) 1px,transparent 0);background-size:5px 2px}.container{display:flex;flex-direction:column;height:100%}.container .header{box-sizing:content-box;padding:24px 24px 0;margin-bottom:16px;height:32px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;font-family:var(--vl-font-family);font-size:20px;font-style:normal;font-weight:500;line-height:24px;letter-spacing:-.6px;color:var(--vl-accent-color)}.container .header i{cursor:pointer}.container .search-container{cursor:pointer;display:flex;height:32px;margin:0 24px 8px;padding:8px;background:var(--cg-bg-color);border:1px solid transparent;border-radius:32px}.container .search-container:hover,.container .search-container.active{background:var(--cg-white);border-color:var(--cg-primary-color)}.container .search-container .vl-icon{flex:0 0 auto}.container .search-container .search-input{width:100%;height:16px;padding:0 8px;border:none;font-size:12px;line-height:16px;letter-spacing:.3px;color:var(--cg-black-color);background:none}.container .search-container .search-input::placeholder{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.3px;color:var(--cg-text-color-secondary)}.container .content{padding:0 24px;display:flex;flex-direction:column;flex:1;overflow:hidden}.container .footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-top:1px solid var(--cg-border-color)}.container .footer p-button{flex:1}.container .footer p-button ::ng-deep button{border-radius:24px;width:100%;font-size:12px;font-family:var(--cg-font-family);font-weight:300;line-height:16px;letter-spacing:.3px;white-space:nowrap}.container .footer p-button ::ng-deep .p-button-outlined{background-color:var(--cg-white);color:var(--cg-primary-color)}.container .footer p-button ::ng-deep .p-button-outlined:hover{background-color:var(--cg-primary-color);color:var(--cg-white)}.container .footer p-button ::ng-deep .p-button-filled{background-color:var(--cg-primary-color);color:var(--cg-white);border:1px solid var(--cg-primary-color)}.container .footer p-button ::ng-deep .p-button-filled:hover{background-color:var(--cg-primary-color-hover);border-color:var(--cg-primary-color-hover)}.container app-empty-state::ng-deep{margin-bottom:12px}.container app-empty-state::ng-deep .container{width:100%;padding-bottom:0}.sidebar-metrics{width:100%;overflow:auto;padding:1px 0}.empty-state{display:flex;align-items:center;justify-content:center;padding:16px;color:var(--cg-text-color-secondary);font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}.sidebar-metric{display:flex;align-items:center;height:32px;position:relative;border-bottom:1px solid var(--cg-border-color)}.sidebar-metric.edit{border-bottom-color:var(--cg-primary-color)}.sidebar-metric.edit .drag-icon{display:none}.sidebar-metric:hover:not(.edit){background:var(--cg-bg-color)}.sidebar-metric:hover:not(.edit) .edit{visibility:visible}.sidebar-metric p-checkbox{margin-right:8px}.sidebar-metric .drag-icon{width:16px;height:16px;margin-right:8px}.sidebar-metric .drag-icon i{cursor:pointer;color:var(--cg-text-color-disabled)}.sidebar-metric.cdk-drag-disabled .drag-icon i{cursor:default}.sidebar-metric .title{font-weight:400;font-size:12px;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:text;user-select:text;cursor:text;color:var(--cg-black)}.sidebar-metric .preview-state,.sidebar-metric .edit-state{position:relative;margin-right:8px;min-width:0;display:flex;align-items:center;flex:1}.sidebar-metric .preview-state input,.sidebar-metric .edit-state input{padding-left:48px;border:none;background:transparent;width:100%}.sidebar-metric .actions{display:flex;gap:4px}.sidebar-metric .action{cursor:pointer;width:24px;height:24px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:4px}.sidebar-metric .action:hover{background:var(--cg-primary-color);color:var(--cg-white)}.sidebar-metric .edit{visibility:hidden}.sidebar-metric .save{border-color:var(--cg-primary-color);border-radius:4px}.sidebar-metric ::ng-deep .p-checkbox{width:16px;height:16px}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box{width:16px;height:16px;border-width:1px;border-color:var(--cg-border-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box:hover{border-color:var(--cg-primary-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box.p-highlight{background:var(--cg-primary-color);border-color:var(--cg-primary-color)}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box .p-checkbox-icon{flex:0 0 auto;width:12px;height:12px}.cdk-drag-preview{z-index:10001!important;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}::ng-deep .metric-tooltip .p-tooltip-text{font-size:11px;line-height:14px;letter-spacing:.3px;background:var(--vl-text-color-accent)}\n"] }]
|
1023
|
-
}], ctorParameters: function () { return [{ type: i1$1.ContextService }, { type: i1$1.QuoteDraftService }, { type: i0.ChangeDetectorRef }, { type: i1$1.MetricsCalculationService }, { type: i1$1.FlowConfigurationService }, { type: i2.ShoppingCartSettingsApiService }, { type: i1$1.RuntimeSettingsService }]; }, propDecorators: { overlayPanel: [{
|
1024
|
-
type: ViewChild,
|
1025
|
-
args: [OverlayPanel]
|
1026
|
-
}] } });
|
1027
|
-
|
1028
|
-
class FlowHeaderComponent {
|
1029
|
-
constructor(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService, integrationState) {
|
1030
|
-
this.contextService = contextService;
|
1031
|
-
this.quoteDraftService = quoteDraftService;
|
1032
|
-
this.quoteApiService = quoteApiService;
|
1033
|
-
this.sfApiService = sfApiService;
|
1034
|
-
this.flowConfiguration = flowConfiguration;
|
1035
|
-
this.routerService = routerService;
|
1036
|
-
this.dialogService = dialogService;
|
1037
|
-
this.integrationState = integrationState;
|
1038
|
-
this.isSaveInProgress$ = new BehaviorSubject(false);
|
1039
|
-
this.isSubmitInProgress$ = new BehaviorSubject(false);
|
1040
|
-
this.dateFormat = 'MM.dd.yyyy';
|
1041
|
-
this.assetPriceLists$ = new BehaviorSubject([]);
|
1042
|
-
this.mode$ = new BehaviorSubject(ConfigurationContextMode.TEST);
|
1043
|
-
this.destroyed$ = new Subject();
|
1044
|
-
this.contextProperties$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties));
|
1045
|
-
this.objectName$ = this.mode$.pipe(map(mode => mode?.toLocaleLowerCase() ?? ''));
|
1046
|
-
this.activePriceList$ = this.quoteDraftService.activePriceList$;
|
1047
|
-
this.isReadonlyMode$ = this.quoteDraftService.hasProducts$.pipe(map(() => this.isReadonlyMode()));
|
1048
|
-
this.status$ = this.contextService.resolve$().pipe(map(context => context.properties.Status ?? ''));
|
1049
|
-
this.isEditMode$ = this.quoteDraftService.isEditMode$();
|
1050
|
-
this.assetsCount$ = this.getAssets$().pipe(map(lineItems => lineItems.length));
|
1051
|
-
this.products$ = this.getDraftItems$().pipe(map(lineItems => this.generateProducts(lineItems)));
|
1052
|
-
this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
|
1053
|
-
this.isCartRoute$ = this.routerService.isCartRoute$();
|
1054
|
-
this.isCatalogRoute$ = this.routerService.isCatalogRoute$();
|
1055
|
-
this.isAssetsRoute$ = this.routerService.isAssetsRoute$();
|
1056
|
-
this.objectDetails$ = this.getObjectDetails$();
|
1057
|
-
}
|
1058
|
-
ngOnInit() {
|
1059
|
-
this.contextService
|
1060
|
-
.resolve$()
|
1061
|
-
.pipe(takeUntil(this.destroyed$))
|
1062
|
-
.subscribe(ctx => this.mode$.next(ctx.mode));
|
1063
|
-
// update assetPriceLists on quoteDraft change in ACCOUNT mode
|
1064
|
-
this.quoteDraftService.quoteDraft$
|
1065
|
-
.pipe(takeUntil(this.destroyed$), filter(() => this.isAccountMode))
|
1066
|
-
.subscribe(() => this.assetPriceLists$.next(this.quoteDraftService.assetPriceLists));
|
1067
|
-
}
|
1068
|
-
ngOnDestroy() {
|
1069
|
-
this.destroyed$.next();
|
1070
|
-
this.destroyed$.complete();
|
603
|
+
return;
|
1071
604
|
}
|
1072
|
-
|
1073
|
-
|
605
|
+
getFlowRootPath(route) {
|
606
|
+
const rootRoute = this.getFlowRootRoute(route);
|
607
|
+
if (!rootRoute) {
|
608
|
+
return '';
|
609
|
+
}
|
610
|
+
const path = rootRoute.pathFromRoot
|
611
|
+
.map(r => r.url[0])
|
612
|
+
.filter(Boolean)
|
613
|
+
.join('/');
|
614
|
+
return '/' + path;
|
1074
615
|
}
|
1075
|
-
get
|
1076
|
-
return this.
|
616
|
+
get route$() {
|
617
|
+
return this.lastChildRoute$;
|
1077
618
|
}
|
1078
|
-
get
|
1079
|
-
return this.
|
619
|
+
get params$() {
|
620
|
+
return this.lastChildParams$;
|
1080
621
|
}
|
1081
|
-
get
|
1082
|
-
return this.
|
622
|
+
get params() {
|
623
|
+
return this.getLastChildParams(this.route.snapshot);
|
1083
624
|
}
|
1084
|
-
|
1085
|
-
return
|
1086
|
-
{
|
1087
|
-
label: 'Save to Quote',
|
1088
|
-
command: () => {
|
1089
|
-
this.saveButtonClickHandler(isCartRoute);
|
1090
|
-
},
|
1091
|
-
},
|
1092
|
-
{
|
1093
|
-
label: 'Quick Save',
|
1094
|
-
command: () => {
|
1095
|
-
this.saveButtonClickHandler(isCartRoute, true);
|
1096
|
-
},
|
1097
|
-
},
|
1098
|
-
{
|
1099
|
-
label: 'Generate Document',
|
1100
|
-
command: () => {
|
1101
|
-
this.docGenButtonClickHandler(isCartRoute);
|
1102
|
-
},
|
1103
|
-
},
|
1104
|
-
{
|
1105
|
-
label: 'Submit For Approval',
|
1106
|
-
command: () => {
|
1107
|
-
this.submitButtonClickHandler(isCartRoute);
|
1108
|
-
},
|
1109
|
-
},
|
1110
|
-
];
|
625
|
+
isConfigurationRoute$() {
|
626
|
+
return this.getFlowSubpath$().pipe(map(url => url.startsWith('product')));
|
1111
627
|
}
|
1112
|
-
|
1113
|
-
|
1114
|
-
if (targetId) {
|
1115
|
-
window.VELO_BACK_FN.apply(null, [targetId]);
|
1116
|
-
}
|
628
|
+
isCartRoute$() {
|
629
|
+
return this.getFlowSubpath$().pipe(map(url => url.startsWith('cart')));
|
1117
630
|
}
|
1118
|
-
|
1119
|
-
|
1120
|
-
return '';
|
1121
|
-
}
|
1122
|
-
return `${window.location.origin}/${objectId}`;
|
631
|
+
isCatalogRoute$() {
|
632
|
+
return this.getFlowSubpath$().pipe(map(url => url.startsWith('catalog')));
|
1123
633
|
}
|
1124
|
-
|
1125
|
-
|
1126
|
-
this.routerService.navigateToShoppingCart();
|
1127
|
-
}
|
634
|
+
isAssetsRoute$() {
|
635
|
+
return this.getFlowSubpath$().pipe(map(url => url.startsWith('assets')));
|
1128
636
|
}
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
637
|
+
navigateBack() {
|
638
|
+
const prevUrl = this.urlHistory[this.urlHistory.length - 2];
|
639
|
+
if (prevUrl) {
|
640
|
+
this.router.navigateByUrl(prevUrl);
|
1132
641
|
}
|
1133
642
|
}
|
1134
|
-
|
1135
|
-
if (
|
1136
|
-
this.
|
643
|
+
navigateTo(path, productId, lineItemId) {
|
644
|
+
if (path === 'shopping-cart') {
|
645
|
+
this.navigateToShoppingCart();
|
1137
646
|
}
|
1138
|
-
|
1139
|
-
|
1140
|
-
if (this.isAccountMode) {
|
1141
|
-
if (!this.quoteDraftService.hasUnsavedChanges) {
|
1142
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1143
|
-
}
|
1144
|
-
else {
|
1145
|
-
this.dialogService.showDocgenAccountUnsavedChangesDialog().subscribe();
|
1146
|
-
}
|
1147
|
-
return;
|
1148
|
-
}
|
1149
|
-
if (!this.quoteDraftService.isEditMode()) {
|
1150
|
-
this.dialogService.showDocgenReadonlyDialog().subscribe();
|
1151
|
-
return;
|
647
|
+
else if (path === 'catalog') {
|
648
|
+
this.navigateToCatalog();
|
1152
649
|
}
|
1153
|
-
if (
|
1154
|
-
this.
|
1155
|
-
return;
|
650
|
+
else if (path === 'assets') {
|
651
|
+
this.navigateToAssets();
|
1156
652
|
}
|
1157
|
-
|
1158
|
-
|
1159
|
-
shouldOpen$ = this.dialogService.showDocgenUnsavedChangesDialog().pipe(switchMap(confirmed => {
|
1160
|
-
if (!confirmed) {
|
1161
|
-
return of(false);
|
1162
|
-
}
|
1163
|
-
return this.saveQuote$(true).pipe(map(() => true));
|
1164
|
-
}));
|
653
|
+
else if (path === 'product' && productId) {
|
654
|
+
this.navigateToProductConfiguration(productId, lineItemId);
|
1165
655
|
}
|
1166
|
-
shouldOpen$
|
1167
|
-
.pipe(first(), tap(shouldOpen => shouldOpen && this.integrationState.dispatch(FlowAction.OpenDocGenAction())))
|
1168
|
-
.subscribe();
|
1169
656
|
}
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
}
|
1178
|
-
return;
|
1179
|
-
}
|
1180
|
-
if (this.isUpsellQuoteWithoutChanges()) {
|
1181
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1182
|
-
return;
|
1183
|
-
}
|
1184
|
-
if (this.isAccountMode && !this.quoteDraftService.hasUnsavedChanges) {
|
1185
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1186
|
-
return;
|
1187
|
-
}
|
1188
|
-
if (!isCartRoute) {
|
1189
|
-
this.dialogService.showQuoteOutsideShoppingCartDialog().subscribe();
|
1190
|
-
return;
|
1191
|
-
}
|
1192
|
-
const lineItems = this.flowConfiguration.getSnapshot();
|
1193
|
-
if (!lineItems.length) {
|
1194
|
-
this.dialogService.showEmptyCartDialog().subscribe();
|
1195
|
-
return;
|
1196
|
-
}
|
1197
|
-
this.saveQuote$(stayOnPage).subscribe();
|
657
|
+
navigateToProductConfiguration(productId, lineItemId) {
|
658
|
+
this.contextService.update({ properties: { productId, lineItemId } });
|
659
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
660
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
661
|
+
this.router.navigate([flowRouteUrl, 'product'], {
|
662
|
+
queryParams: { ...routeSnapshot.queryParams, productId },
|
663
|
+
});
|
1198
664
|
}
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
}
|
1204
|
-
if (this.isUpsellQuoteWithoutChanges()) {
|
1205
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1206
|
-
return;
|
1207
|
-
}
|
1208
|
-
if (this.isAccountMode) {
|
1209
|
-
this.dialogService.showAccountSubmitFailureDialog();
|
1210
|
-
return;
|
1211
|
-
}
|
1212
|
-
if (!isCartRoute) {
|
1213
|
-
this.dialogService.showOutsideShoppingCartQuoteSubmitFailureDialog().subscribe();
|
1214
|
-
return;
|
1215
|
-
}
|
1216
|
-
const quoteDraft = this.quoteDraftService.quoteDraft;
|
1217
|
-
if (!quoteDraft) {
|
1218
|
-
return;
|
1219
|
-
}
|
1220
|
-
this.isSubmitInProgress$.next(true);
|
1221
|
-
this.quoteApiService
|
1222
|
-
.submitQuote(quoteDraft)
|
1223
|
-
.pipe(tap(({ quoteId }) => {
|
1224
|
-
this.quoteDraftService.hasUnsavedChanges = false;
|
1225
|
-
this.back(quoteId);
|
1226
|
-
}), finalize(() => this.isSubmitInProgress$.next(false)), takeUntil(this.destroyed$))
|
1227
|
-
.subscribe();
|
665
|
+
navigateToShoppingCart() {
|
666
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
667
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
668
|
+
this.router.navigate([flowRouteUrl, 'cart'], { queryParams: routeSnapshot.queryParams });
|
1228
669
|
}
|
1229
|
-
|
1230
|
-
this.
|
670
|
+
navigateToCatalog() {
|
671
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
672
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
673
|
+
this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
|
1231
674
|
}
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
document.dispatchEvent(new Event('click'));
|
1237
|
-
}
|
1238
|
-
cart?.overlayPanel.toggle(event);
|
1239
|
-
}
|
675
|
+
navigateToAssets() {
|
676
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
677
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
678
|
+
this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
|
1240
679
|
}
|
1241
|
-
|
1242
|
-
const
|
1243
|
-
|
1244
|
-
|
1245
|
-
}
|
1246
|
-
this.isSaveInProgress$.next(true);
|
1247
|
-
return this.quoteApiService.upsertQuote(quoteDraft).pipe(tap(({ quoteId }) => {
|
1248
|
-
this.quoteDraftService.hasUnsavedChanges = false;
|
1249
|
-
if (!stayOnPage) {
|
1250
|
-
this.back(quoteId);
|
1251
|
-
}
|
1252
|
-
}), finalize(() => this.isSaveInProgress$.next(false)), map(noop), takeUntil(this.destroyed$));
|
680
|
+
showErrorPage$(message) {
|
681
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
682
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
683
|
+
return from(this.router.navigate([flowRouteUrl, '404'], { state: { message }, replaceUrl: true })).pipe(map(() => false));
|
1253
684
|
}
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
const
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
685
|
+
switchObject(id) {
|
686
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
687
|
+
const route = this.getLastChildRoute(this.route);
|
688
|
+
const objName = SalesforceIdUtils.getSfObjectNameById(id);
|
689
|
+
const queryParams = {
|
690
|
+
quoteId: objName === 'Quote' ? id : undefined,
|
691
|
+
accountId: objName === 'Account' ? id : undefined,
|
692
|
+
orderId: objName === 'Order' ? id : undefined,
|
1262
693
|
};
|
1263
|
-
|
1264
|
-
}
|
1265
|
-
getObjectDetails$() {
|
1266
|
-
return this.contextService.resolve$().pipe(distinctUntilChanged((prevCtx, currCtx) => prevCtx.properties.Id === currCtx.properties.Id), map(ctx => {
|
1267
|
-
const isAccountMode = ctx.mode === ConfigurationContextMode.ACCOUNT;
|
1268
|
-
const isQuoteMode = ctx.mode === ConfigurationContextMode.QUOTE;
|
1269
|
-
return {
|
1270
|
-
accountId: isAccountMode ? ctx.properties.Id : ctx.properties.AccountId,
|
1271
|
-
opportunityId: ctx.properties.OpportunityId,
|
1272
|
-
quoteId: isQuoteMode ? ctx.properties.Id : undefined,
|
1273
|
-
quoteName: isQuoteMode ? ctx.properties.Name : undefined,
|
1274
|
-
quoteNumber: isQuoteMode ? ctx.properties.QuoteNumber : undefined,
|
1275
|
-
};
|
1276
|
-
}), switchMap(details => combineLatest([
|
1277
|
-
of(details),
|
1278
|
-
this.queryName$('Account', details.accountId),
|
1279
|
-
this.queryName$('Opportunity', details.opportunityId),
|
1280
|
-
])), map(([details, accountName, opportunityName]) => ({ ...details, accountName, opportunityName })));
|
1281
|
-
}
|
1282
|
-
formatMetric(value) {
|
1283
|
-
return (value ? Number(value) : 0).toFixed(2);
|
1284
|
-
}
|
1285
|
-
getDraftItems$() {
|
1286
|
-
return combineLatest([
|
1287
|
-
this.flowConfiguration.get(),
|
1288
|
-
this.integrationState.state$.pipe(map(state => state.modifiedAssets), distinctUntilChanged()),
|
1289
|
-
]).pipe(map(([lineItems, modifiedAssets]) => {
|
1290
|
-
const currentTerms = lineItems.reduce((acc, li) => {
|
1291
|
-
const assetId = li.assetId || li.openOrderLineItemId;
|
1292
|
-
const isModified = isLineItemModified(li);
|
1293
|
-
const currentTerm = getOriginParent(lineItems, li) ?? li;
|
1294
|
-
if (isModified || (assetId && modifiedAssets?.[assetId])) {
|
1295
|
-
acc.push(currentTerm);
|
1296
|
-
}
|
1297
|
-
return acc;
|
1298
|
-
}, []);
|
1299
|
-
const uniqCurrentTerms = currentTerms.filter((value, index, array) => array.indexOf(value) === index);
|
1300
|
-
return uniqCurrentTerms;
|
1301
|
-
}));
|
1302
|
-
}
|
1303
|
-
getAssets$() {
|
1304
|
-
return this.flowConfiguration
|
1305
|
-
.get()
|
1306
|
-
.pipe(map(lineItems => lineItems.filter(li => (!!li.assetId || !!li.openOrderLineItemId) && !li.rampInstanceId)));
|
1307
|
-
}
|
1308
|
-
generateProducts(lineItems) {
|
1309
|
-
const date = new Date();
|
1310
|
-
date.setHours(0, 0, 0, 0);
|
1311
|
-
const now = date.getTime();
|
1312
|
-
const termParentIds = lineItems.map(li => li.rampInstanceId).filter(Boolean);
|
1313
|
-
const lineItemsRampInstanceIdMap = lineItems.reduce((acc, li) => {
|
1314
|
-
acc[li.rampInstanceId ?? ''] = li;
|
1315
|
-
return acc;
|
1316
|
-
}, {});
|
1317
|
-
return lineItems.reduce((result, li) => {
|
1318
|
-
// find main term line item
|
1319
|
-
if (li.rampInstanceId) {
|
1320
|
-
return result;
|
1321
|
-
}
|
1322
|
-
// find current term line item
|
1323
|
-
let target = li;
|
1324
|
-
while (target && target.endDate && new Date(target.endDate).getTime() <= now) {
|
1325
|
-
target = lineItemsRampInstanceIdMap[li.id];
|
1326
|
-
}
|
1327
|
-
if (target && target.productId) {
|
1328
|
-
result.push({
|
1329
|
-
id: target.id,
|
1330
|
-
productId: target.productId,
|
1331
|
-
name: target.name,
|
1332
|
-
configurable: target.properties['#configurable'] === 'true',
|
1333
|
-
deleted: target.actionCode === 'DELETE',
|
1334
|
-
hasTerm: termParentIds.includes(target.id),
|
1335
|
-
qty: target.qty,
|
1336
|
-
mrr: this.formatMetric(target.properties.VDM_Total_MRR),
|
1337
|
-
nrr: this.formatMetric(target.properties.VDM_Total_NRR),
|
1338
|
-
});
|
1339
|
-
}
|
1340
|
-
return result;
|
1341
|
-
}, []);
|
1342
|
-
}
|
1343
|
-
isReadonlyMode() {
|
1344
|
-
return (this.quoteDraftService.quoteDraft?.context.properties.mode === ConfigurationContextMode.ACCOUNT &&
|
1345
|
-
!this.quoteDraftService.hasProducts);
|
1346
|
-
}
|
1347
|
-
isUpsellQuoteWithoutChanges() {
|
1348
|
-
const noUpdates = this.quoteDraftService.activeCurrentState.every(lineItem => lineItem.actionCode === 'EXIST');
|
1349
|
-
const sameNumberOfProducts = this.quoteDraftService.getInitialCurrentState().length === this.quoteDraftService.activeCurrentState.length;
|
1350
|
-
return noUpdates && sameNumberOfProducts;
|
694
|
+
this.router.navigate([], { relativeTo: route, queryParams: { ...routeSnapshot.queryParams, ...queryParams } });
|
1351
695
|
}
|
1352
696
|
}
|
1353
|
-
|
1354
|
-
FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0, template: "<ng-container *ngIf=\"contextProperties$ | async as contextProperties\">\n <ng-container *ngIf=\"objectDetails$ | async as details\">\n <div class=\"flow-info\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-back\"></i>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode$ | async\">\n <nav\n class=\"account-name nav-item\"\n [pTooltip]=\"contextProperties.Name ?? ''\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"1000\"\n >\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode$ | async\">\n <span class=\"nav-item\">Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ status$ | async }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"catalog-overlay quote-info-overlay\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"quote-info\">\n <div class=\"title\">\n <span>Quote Information</span>\n <span class=\"close-action\" (click)=\"quoteDetails.hide()\">\n <i class=\"vl-icon vl-cross\"></i>\n </span>\n </div>\n\n <div class=\"details\">\n <div class=\"details-row\">\n <div class=\"label\">Account Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n {{ details.accountName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Opportunity Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n {{ details.opportunityName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Quote Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n {{ details.quoteName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Quote Number</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n {{ details.quoteNumber }}\n </a>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n </div>\n\n <div class=\"flow-navigation\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <nav\n class=\"nav-item\"\n *vlLet=\"assetsCount$ | async as assetsCount\"\n [ngClass]=\"{ active: (isAssetsRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToAssets()\"\n >\n Assets\n <div *ngIf=\"assetsCount\" class=\"counter\">{{ assetsCount }}</div>\n </nav>\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCatalogRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToCatalog()\"\n >\n Catalog\n </nav>\n <nav\n *vlLet=\"isConfigurationRoute$ | async as isConfigurationRoute\"\n class=\"nav-item\"\n [ngClass]=\"{ active: isConfigurationRoute, disabled: !isConfigurationRoute }\"\n >\n Configurator\n </nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToShoppingCart()\"\n >\n Shopping Cart\n <div *ngIf=\"products?.length\" class=\"counter\">{{ products?.length }}</div>\n\n <nav\n class=\"nav-popover-toggle\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"toggleCartOverlay(cart, $event)\"\n >\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n </nav>\n\n <vl-cart-preview #cart [products]=\"products ?? []\"></vl-cart-preview>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"flow-controls\">\n <ng-container *ngIf=\"(isReadonlyMode$ | async) === false\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <div class=\"price-plan\">\n <ng-container *vlLet=\"assetPriceLists$ | async as assetPriceLists\">\n <ng-container\n *ngIf=\"(isAccountMode$ | async) && assetPriceLists && assetPriceLists.length > 1; else singlePriceList\"\n >\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList?.name }}</span>\n <i *ngIf=\"!priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"price-list-overlay\" #priceListsOverlay>\n <ng-template pTemplate>\n <span\n *ngFor=\"let option of assetPriceLists\"\n class=\"price-list-option\"\n [class.active]=\"priceList?.id === option.id\"\n (click)=\"selectPriceList(option.id); priceListsOverlay.hide()\"\n >\n {{ option.name }}\n </span>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n </ng-container>\n\n <ng-template #singlePriceList>\n <div>{{ priceList?.name }}</div>\n </ng-template>\n\n <div *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date : dateFormat }}</div>\n </div>\n </ng-container>\n </ng-container>\n\n <vl-metrics></vl-metrics>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <ng-container *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\">\n <ng-container *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\">\n <p-splitButton\n *ngIf=\"!isSaveInProgress && !isSubmitInProgress\"\n #splitButton\n label=\"Save to Quote\"\n (onClick)=\"saveButtonClickHandler(isCartRoute === true)\"\n [model]=\"getSplitButtonActions(isCartRoute === true)\"\n [disabled]=\"isReadonlyMode === true\"\n styleClass=\"catalog-split-button p-button-outlined\"\n [class.opened]=\"splitButton?.menu?.visible\"\n icon=\"vl-icon vl-arrow-down\"\n [menuStyle]=\"{ width: '144px' }\"\n >\n </p-splitButton>\n\n <p-button\n *ngIf=\"isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button\"\n label=\"Saving\"\n [loading]=\"true\"\n ></p-button>\n\n <p-button\n *ngIf=\"isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n label=\"Submitting\"\n [loading]=\"true\"\n ></p-button>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{font-family:var(--cg-font-family);display:flex;align-items:center;height:48px;width:100%;background-color:var(--cg-primary-color);color:#fff;padding:0 16px;flex-shrink:0}:host *{font-family:var(--cg-font-family)}::ng-deep .p-overlaypanel.quote-info-overlay{margin-left:-16px}.quote-info{width:348px}.quote-info .title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:16px;font-style:normal;font-weight:500;line-height:20px}.quote-info .title .close-action{padding:4px}.quote-info .title .vl-icon{cursor:pointer}.quote-info .details .details-row{display:flex;align-items:center}.quote-info .details .details-row .label,.quote-info .details .details-row .value{flex:1;padding:8px;color:var(--cg-black)}.quote-info .details .details-row .label{font-size:12px;font-weight:500;line-height:16px;letter-spacing:.2px}.quote-info .details .details-row .value{text-align:right}.quote-info .details .details-row a{color:var(--cg-black);text-decoration:none;font-size:12px;line-height:18px;letter-spacing:.3px;border-bottom:1px solid var(--cg-black)}:host ::ng-deep .catalog-split-button .p-splitbutton-defaultbutton{padding:8px 0 8px 16px;border-top-left-radius:24px;border-bottom-left-radius:24px;color:var(--cg-white);background:var(--cg-primary-color);border-color:var(--cg-white)}:host ::ng-deep .catalog-split-button .p-splitbutton-defaultbutton .p-button-icon{display:none}:host ::ng-deep .catalog-split-button .p-splitbutton-menubutton{width:16px;box-sizing:content-box;padding:8px;border-top-right-radius:24px;border-bottom-right-radius:24px;border-left:none;color:var(--cg-white);background:var(--cg-primary-color);border-color:var(--cg-white)}:host ::ng-deep .catalog-split-button .p-splitbutton-menubutton:hover:enabled{border-left:none}:host ::ng-deep .catalog-split-button .p-button{line-height:16px}:host ::ng-deep .catalog-split-button .p-button-label{font-size:12px;font-weight:300}:host ::ng-deep .catalog-split-button:hover .p-splitbutton-defaultbutton,:host ::ng-deep .catalog-split-button:hover .p-splitbutton-menubutton{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button:hover .p-splitbutton-defaultbutton:hover,:host ::ng-deep .catalog-split-button:hover .p-splitbutton-menubutton:hover{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay{overflow:hidden;margin-top:4px;padding:0;border-radius:8px;box-shadow:0 8px 32px #0000001a}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem:not(:last-child){border-bottom:1px solid var(--cg-border-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link{padding:8px;color:var(--cg-primary-color);white-space:nowrap;font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link .p-menuitem-text{color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link:hover{background:var(--cg-bg-color)}:host ::ng-deep p-splitButton.opened .p-button-icon{transform:rotate(180deg)}:host ::ng-deep p-splitButton.opened .p-splitbutton-defaultbutton,:host ::ng-deep p-splitButton.opened .p-splitbutton-menubutton{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .save-button,:host ::ng-deep .submit-button{height:32px;width:136px;display:flex}:host ::ng-deep .save-button .p-button,:host ::ng-deep .submit-button .p-button{border-radius:24px;width:100%;height:100%;background:rgba(255,255,255,.3);opacity:1;border:none}:host ::ng-deep .save-button .p-button .p-button-label,:host ::ng-deep .submit-button .p-button .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;gap:8px;align-items:center}.flow-info .nav-item{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.3px}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;height:32px}nav.disabled{opacity:.6;cursor:default}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:16px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.metrics__row{display:flex;justify-content:space-between;gap:2px}.dot-separator:after{content:\"\";display:block;width:2px;height:2px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-navigation{margin-left:16px;margin-right:auto;display:flex;gap:8px;justify-content:center}.flow-navigation .nav-item{padding:8px 16px;border-radius:32px;color:#ffffff80;font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.flow-navigation .nav-item:not(.disabled):hover:not(.active){color:var(--cg-white);background:rgba(255,255,255,.1)}.flow-navigation .nav-item:not(.disabled).active{color:var(--cg-white)}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:8px}.price-list-option{padding:8px;color:var(--vl-primary-color);cursor:pointer}.price-list-option.active,.price-list-option:hover{background:var(--vl-secondary-nav-bg)}.flow-controls{flex-shrink:0;display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px}.flow-controls .price-plan{color:#ffffffb3}.counter{margin-left:8px;height:16px;min-width:16px;text-align:center;background:rgba(255,255,255,.2);border-radius:16px;padding:0 4px}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i8.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i3$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { kind: "directive", type: i10$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: ["products"] }, { kind: "component", type: i13.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onClick", "onDropdownClick"] }, { kind: "component", type: MetricsComponent, selector: "vl-metrics" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1356
|
-
type:
|
1357
|
-
args: [{ selector: 'vl-flow-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"contextProperties$ | async as contextProperties\">\n <ng-container *ngIf=\"objectDetails$ | async as details\">\n <div class=\"flow-info\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-back\"></i>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode$ | async\">\n <nav\n class=\"account-name nav-item\"\n [pTooltip]=\"contextProperties.Name ?? ''\"\n tooltipPosition=\"bottom\"\n [showDelay]=\"1000\"\n >\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode$ | async\">\n <span class=\"nav-item\">Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ status$ | async }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"catalog-overlay quote-info-overlay\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"quote-info\">\n <div class=\"title\">\n <span>Quote Information</span>\n <span class=\"close-action\" (click)=\"quoteDetails.hide()\">\n <i class=\"vl-icon vl-cross\"></i>\n </span>\n </div>\n\n <div class=\"details\">\n <div class=\"details-row\">\n <div class=\"label\">Account Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n {{ details.accountName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Opportunity Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n {{ details.opportunityName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Quote Name</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n {{ details.quoteName }}\n </a>\n </div>\n </div>\n <div class=\"details-row\">\n <div class=\"label\">Quote Number</div>\n <div class=\"value\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n {{ details.quoteNumber }}\n </a>\n </div>\n </div>\n </div>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n </div>\n\n <div class=\"flow-navigation\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <nav\n class=\"nav-item\"\n *vlLet=\"assetsCount$ | async as assetsCount\"\n [ngClass]=\"{ active: (isAssetsRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToAssets()\"\n >\n Assets\n <div *ngIf=\"assetsCount\" class=\"counter\">{{ assetsCount }}</div>\n </nav>\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCatalogRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToCatalog()\"\n >\n Catalog\n </nav>\n <nav\n *vlLet=\"isConfigurationRoute$ | async as isConfigurationRoute\"\n class=\"nav-item\"\n [ngClass]=\"{ active: isConfigurationRoute, disabled: !isConfigurationRoute }\"\n >\n Configurator\n </nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav\n class=\"nav-item\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToShoppingCart()\"\n >\n Shopping Cart\n <div *ngIf=\"products?.length\" class=\"counter\">{{ products?.length }}</div>\n\n <nav\n class=\"nav-popover-toggle\"\n [ngClass]=\"{ active: (isCartRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"toggleCartOverlay(cart, $event)\"\n >\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n </nav>\n\n <vl-cart-preview #cart [products]=\"products ?? []\"></vl-cart-preview>\n </ng-container>\n </ng-container>\n </div>\n\n <div class=\"flow-controls\">\n <ng-container *ngIf=\"(isReadonlyMode$ | async) === false\">\n <ng-container *vlLet=\"activePriceList$ | async as priceList\">\n <div class=\"price-plan\">\n <ng-container *vlLet=\"assetPriceLists$ | async as assetPriceLists\">\n <ng-container\n *ngIf=\"(isAccountMode$ | async) && assetPriceLists && assetPriceLists.length > 1; else singlePriceList\"\n >\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList?.name }}</span>\n <i *ngIf=\"!priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-arrow-down icon-with-margin\"></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-arrow-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"price-list-overlay\" #priceListsOverlay>\n <ng-template pTemplate>\n <span\n *ngFor=\"let option of assetPriceLists\"\n class=\"price-list-option\"\n [class.active]=\"priceList?.id === option.id\"\n (click)=\"selectPriceList(option.id); priceListsOverlay.hide()\"\n >\n {{ option.name }}\n </span>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n </ng-container>\n\n <ng-template #singlePriceList>\n <div>{{ priceList?.name }}</div>\n </ng-template>\n\n <div *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date : dateFormat }}</div>\n </div>\n </ng-container>\n </ng-container>\n\n <vl-metrics></vl-metrics>\n\n <ng-container *vlLet=\"isCartRoute$ | async as isCartRoute\">\n <ng-container *vlLet=\"isReadonlyMode$ | async as isReadonlyMode\">\n <ng-container *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\">\n <ng-container *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\">\n <p-splitButton\n *ngIf=\"!isSaveInProgress && !isSubmitInProgress\"\n #splitButton\n label=\"Save to Quote\"\n (onClick)=\"saveButtonClickHandler(isCartRoute === true)\"\n [model]=\"getSplitButtonActions(isCartRoute === true)\"\n [disabled]=\"isReadonlyMode === true\"\n styleClass=\"catalog-split-button p-button-outlined\"\n [class.opened]=\"splitButton?.menu?.visible\"\n icon=\"vl-icon vl-arrow-down\"\n [menuStyle]=\"{ width: '144px' }\"\n >\n </p-splitButton>\n\n <p-button\n *ngIf=\"isSaveInProgress\"\n class=\"save-button\"\n styleClass=\"p-button\"\n label=\"Saving\"\n [loading]=\"true\"\n ></p-button>\n\n <p-button\n *ngIf=\"isSubmitInProgress\"\n class=\"submit-button\"\n styleClass=\"p-button\"\n label=\"Submitting\"\n [loading]=\"true\"\n ></p-button>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n </div>\n </ng-container>\n</ng-container>\n", styles: [":host{font-family:var(--cg-font-family);display:flex;align-items:center;height:48px;width:100%;background-color:var(--cg-primary-color);color:#fff;padding:0 16px;flex-shrink:0}:host *{font-family:var(--cg-font-family)}::ng-deep .p-overlaypanel.quote-info-overlay{margin-left:-16px}.quote-info{width:348px}.quote-info .title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:16px;font-style:normal;font-weight:500;line-height:20px}.quote-info .title .close-action{padding:4px}.quote-info .title .vl-icon{cursor:pointer}.quote-info .details .details-row{display:flex;align-items:center}.quote-info .details .details-row .label,.quote-info .details .details-row .value{flex:1;padding:8px;color:var(--cg-black)}.quote-info .details .details-row .label{font-size:12px;font-weight:500;line-height:16px;letter-spacing:.2px}.quote-info .details .details-row .value{text-align:right}.quote-info .details .details-row a{color:var(--cg-black);text-decoration:none;font-size:12px;line-height:18px;letter-spacing:.3px;border-bottom:1px solid var(--cg-black)}:host ::ng-deep .catalog-split-button .p-splitbutton-defaultbutton{padding:8px 0 8px 16px;border-top-left-radius:24px;border-bottom-left-radius:24px;color:var(--cg-white);background:var(--cg-primary-color);border-color:var(--cg-white)}:host ::ng-deep .catalog-split-button .p-splitbutton-defaultbutton .p-button-icon{display:none}:host ::ng-deep .catalog-split-button .p-splitbutton-menubutton{width:16px;box-sizing:content-box;padding:8px;border-top-right-radius:24px;border-bottom-right-radius:24px;border-left:none;color:var(--cg-white);background:var(--cg-primary-color);border-color:var(--cg-white)}:host ::ng-deep .catalog-split-button .p-splitbutton-menubutton:hover:enabled{border-left:none}:host ::ng-deep .catalog-split-button .p-button{line-height:16px}:host ::ng-deep .catalog-split-button .p-button-label{font-size:12px;font-weight:300}:host ::ng-deep .catalog-split-button:hover .p-splitbutton-defaultbutton,:host ::ng-deep .catalog-split-button:hover .p-splitbutton-menubutton{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button:hover .p-splitbutton-defaultbutton:hover,:host ::ng-deep .catalog-split-button:hover .p-splitbutton-menubutton:hover{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay{overflow:hidden;margin-top:4px;padding:0;border-radius:8px;box-shadow:0 8px 32px #0000001a}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem:not(:last-child){border-bottom:1px solid var(--cg-border-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link{padding:8px;color:var(--cg-primary-color);white-space:nowrap;font-size:12px;font-weight:300;line-height:16px;letter-spacing:.3px}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link .p-menuitem-text{color:var(--cg-primary-color)}:host ::ng-deep .catalog-split-button .p-menu-overlay .p-menuitem-link:hover{background:var(--cg-bg-color)}:host ::ng-deep p-splitButton.opened .p-button-icon{transform:rotate(180deg)}:host ::ng-deep p-splitButton.opened .p-splitbutton-defaultbutton,:host ::ng-deep p-splitButton.opened .p-splitbutton-menubutton{color:var(--cg-primary-color);background:var(--cg-white);border-color:var(--cg-primary-color)}:host ::ng-deep .save-button,:host ::ng-deep .submit-button{height:32px;width:136px;display:flex}:host ::ng-deep .save-button .p-button,:host ::ng-deep .submit-button .p-button{border-radius:24px;width:100%;height:100%;background:rgba(255,255,255,.3);opacity:1;border:none}:host ::ng-deep .save-button .p-button .p-button-label,:host ::ng-deep .submit-button .p-button .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;gap:8px;align-items:center}.flow-info .nav-item{font-weight:400;font-size:12px;line-height:16px;letter-spacing:.3px}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;height:32px}nav.disabled{opacity:.6;cursor:default}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:16px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.metrics__row{display:flex;justify-content:space-between;gap:2px}.dot-separator:after{content:\"\";display:block;width:2px;height:2px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-navigation{margin-left:16px;margin-right:auto;display:flex;gap:8px;justify-content:center}.flow-navigation .nav-item{padding:8px 16px;border-radius:32px;color:#ffffff80;font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}.flow-navigation .nav-item:not(.disabled):hover:not(.active){color:var(--cg-white);background:rgba(255,255,255,.1)}.flow-navigation .nav-item:not(.disabled).active{color:var(--cg-white)}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:8px}.price-list-option{padding:8px;color:var(--vl-primary-color);cursor:pointer}.price-list-option.active,.price-list-option:hover{background:var(--vl-secondary-nav-bg)}.flow-controls{flex-shrink:0;display:flex;align-items:center;gap:8px;font-size:12px;line-height:16px}.flow-controls .price-plan{color:#ffffffb3}.counter{margin-left:8px;height:16px;min-width:16px;text-align:center;background:rgba(255,255,255,.2);border-radius:16px;padding:0 4px}\n"] }]
|
1358
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1359
|
-
|
1360
|
-
class MetricsModule {
|
1361
|
-
}
|
1362
|
-
MetricsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1363
|
-
MetricsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, declarations: [MetricsComponent], imports: [CommonModule,
|
1364
|
-
FormsModule,
|
1365
|
-
ReactiveFormsModule,
|
1366
|
-
DragDropModule,
|
1367
|
-
ButtonModule,
|
1368
|
-
OverlayPanelModule,
|
1369
|
-
SidebarModule,
|
1370
|
-
InputTextModule,
|
1371
|
-
CheckboxModule,
|
1372
|
-
LetDirectiveModule,
|
1373
|
-
VirtualScrollerModule,
|
1374
|
-
ErrorTooltipModule,
|
1375
|
-
HiddenTextTooltipModule,
|
1376
|
-
SdkPipesModule], exports: [MetricsComponent] });
|
1377
|
-
MetricsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, imports: [CommonModule,
|
1378
|
-
FormsModule,
|
1379
|
-
ReactiveFormsModule,
|
1380
|
-
DragDropModule,
|
1381
|
-
ButtonModule,
|
1382
|
-
OverlayPanelModule,
|
1383
|
-
SidebarModule,
|
1384
|
-
InputTextModule,
|
1385
|
-
CheckboxModule,
|
1386
|
-
LetDirectiveModule,
|
1387
|
-
VirtualScrollerModule,
|
1388
|
-
ErrorTooltipModule,
|
1389
|
-
HiddenTextTooltipModule,
|
1390
|
-
SdkPipesModule] });
|
1391
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, decorators: [{
|
1392
|
-
type: NgModule,
|
1393
|
-
args: [{
|
1394
|
-
declarations: [MetricsComponent],
|
1395
|
-
imports: [
|
1396
|
-
CommonModule,
|
1397
|
-
FormsModule,
|
1398
|
-
ReactiveFormsModule,
|
1399
|
-
DragDropModule,
|
1400
|
-
ButtonModule,
|
1401
|
-
OverlayPanelModule,
|
1402
|
-
SidebarModule,
|
1403
|
-
InputTextModule,
|
1404
|
-
CheckboxModule,
|
1405
|
-
LetDirectiveModule,
|
1406
|
-
VirtualScrollerModule,
|
1407
|
-
ErrorTooltipModule,
|
1408
|
-
HiddenTextTooltipModule,
|
1409
|
-
SdkPipesModule,
|
1410
|
-
],
|
1411
|
-
exports: [MetricsComponent],
|
1412
|
-
}]
|
1413
|
-
}] });
|
1414
|
-
|
1415
|
-
class FlowHeaderModule {
|
1416
|
-
}
|
1417
|
-
FlowHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1418
|
-
FlowHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule,
|
1419
|
-
OverlayPanelModule,
|
1420
|
-
LetDirectiveModule,
|
1421
|
-
TooltipModule,
|
1422
|
-
ButtonModule,
|
1423
|
-
CartPreviewModule,
|
1424
|
-
SplitButtonModule,
|
1425
|
-
MetricsModule,
|
1426
|
-
SdkPipesModule], exports: [FlowHeaderComponent] });
|
1427
|
-
FlowHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, imports: [CommonModule,
|
1428
|
-
OverlayPanelModule,
|
1429
|
-
LetDirectiveModule,
|
1430
|
-
TooltipModule,
|
1431
|
-
ButtonModule,
|
1432
|
-
CartPreviewModule,
|
1433
|
-
SplitButtonModule,
|
1434
|
-
MetricsModule,
|
1435
|
-
SdkPipesModule] });
|
1436
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, decorators: [{
|
1437
|
-
type: NgModule,
|
1438
|
-
args: [{
|
1439
|
-
declarations: [FlowHeaderComponent],
|
1440
|
-
imports: [
|
1441
|
-
CommonModule,
|
1442
|
-
OverlayPanelModule,
|
1443
|
-
LetDirectiveModule,
|
1444
|
-
TooltipModule,
|
1445
|
-
ButtonModule,
|
1446
|
-
CartPreviewModule,
|
1447
|
-
SplitButtonModule,
|
1448
|
-
MetricsModule,
|
1449
|
-
SdkPipesModule,
|
1450
|
-
],
|
1451
|
-
exports: [FlowHeaderComponent],
|
1452
|
-
}]
|
1453
|
-
}] });
|
697
|
+
FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2.ContextService }, { token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
698
|
+
FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, decorators: [{
|
700
|
+
type: Injectable,
|
701
|
+
args: [{ providedIn: 'root' }]
|
702
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.IntegrationState }]; } });
|
1454
703
|
|
1455
704
|
class FlowService {
|
1456
|
-
constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService) {
|
705
|
+
constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService, flowDialogService) {
|
1457
706
|
this.integrationState = integrationState;
|
1458
707
|
this.flowRouterService = flowRouterService;
|
1459
708
|
this.quoteDraftService = quoteDraftService;
|
1460
709
|
this.configurationService = configurationService;
|
1461
710
|
this.flowConfigurationService = flowConfigurationService;
|
711
|
+
this.flowDialogService = flowDialogService;
|
1462
712
|
this.cleanup$ = new Subject();
|
1463
713
|
}
|
714
|
+
cleanup() {
|
715
|
+
this.cleanup$.next();
|
716
|
+
}
|
1464
717
|
initSubscriptions() {
|
1465
718
|
this.integrationState
|
1466
719
|
.listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
|
@@ -1485,10 +738,24 @@ class FlowService {
|
|
1485
738
|
.listen$(FlowAction.FLOW_NAVIGATE_BACK)
|
1486
739
|
.pipe(tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
|
1487
740
|
.subscribe();
|
741
|
+
this.integrationState
|
742
|
+
.listen$(FlowAction.FLOW_NAVIGATE_TO)
|
743
|
+
.pipe(tap(payload => this.flowRouterService.navigateTo(payload.path, payload.productId, payload.lineItemId)), takeUntil(this.cleanup$))
|
744
|
+
.subscribe();
|
745
|
+
this.integrationState
|
746
|
+
.listen$(FlowAction.OPEN_DIALOG)
|
747
|
+
.pipe(switchMap(payload => this.flowDialogService.showDialog(payload.dialog).pipe(take(1))), takeUntil(this.cleanup$))
|
748
|
+
.subscribe(dialogResult => {
|
749
|
+
this.integrationState.patchState({ dialogResult });
|
750
|
+
});
|
1488
751
|
this.integrationState
|
1489
752
|
.listen$(FlowAction.FLOW_NAVIGATE_TO_CATALOG)
|
1490
753
|
.pipe(tap(() => this.flowRouterService.navigateToCatalog()), takeUntil(this.cleanup$))
|
1491
754
|
.subscribe();
|
755
|
+
this.integrationState
|
756
|
+
.listen$(FlowAction.FLOW_NAVIGATE_TO_SHOPPING_CART)
|
757
|
+
.pipe(tap(() => this.flowRouterService.navigateToShoppingCart()), takeUntil(this.cleanup$))
|
758
|
+
.subscribe();
|
1492
759
|
this.integrationState
|
1493
760
|
.listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
|
1494
761
|
.pipe(switchMap(() => {
|
@@ -1498,6 +765,7 @@ class FlowService {
|
|
1498
765
|
return of(undefined);
|
1499
766
|
}
|
1500
767
|
const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
|
768
|
+
const assetId = lineItem.assetId || lineItem.openOrderLineItemId;
|
1501
769
|
let updatedState;
|
1502
770
|
if (isNewLineItem) {
|
1503
771
|
updatedState = [...quoteDraft.currentState, lineItem];
|
@@ -1505,7 +773,14 @@ class FlowService {
|
|
1505
773
|
else {
|
1506
774
|
updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
|
1507
775
|
}
|
1508
|
-
return this.flowConfigurationService.calculate$({ ...quoteDraft, currentState: updatedState })
|
776
|
+
return this.flowConfigurationService.calculate$({ ...quoteDraft, currentState: updatedState }).pipe(tap(() => {
|
777
|
+
if (assetId) {
|
778
|
+
const modifiedAssets = this.integrationState.state.modifiedAssets ?? {};
|
779
|
+
this.integrationState.patchState({
|
780
|
+
modifiedAssets: { ...modifiedAssets, [assetId]: true },
|
781
|
+
});
|
782
|
+
}
|
783
|
+
}));
|
1509
784
|
}), tap(() => {
|
1510
785
|
this.configurationService.hasUnsavedChanges = false;
|
1511
786
|
this.flowRouterService.navigateToShoppingCart();
|
@@ -1513,9 +788,6 @@ class FlowService {
|
|
1513
788
|
.subscribe();
|
1514
789
|
this.updateFlowPath();
|
1515
790
|
}
|
1516
|
-
cleanup() {
|
1517
|
-
this.cleanup$.next();
|
1518
|
-
}
|
1519
791
|
updateFlowPath() {
|
1520
792
|
this.flowRouterService
|
1521
793
|
.getFlowSubpath$()
|
@@ -1523,38 +795,60 @@ class FlowService {
|
|
1523
795
|
.subscribe(flowPath => this.integrationState.patchState({ flowPath }));
|
1524
796
|
}
|
1525
797
|
}
|
1526
|
-
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1527
|
-
FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1528
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
798
|
+
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i5.IntegrationState }, { token: FlowRouterService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationService }, { token: i2.FlowConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
799
|
+
FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
|
800
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
|
801
|
+
type: Injectable
|
802
|
+
}], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: i2.FlowConfigurationService }, { type: FlowDialogService }]; } });
|
803
|
+
|
804
|
+
class FlowGuidedSellingService {
|
805
|
+
constructor(integrationState) {
|
806
|
+
this.integrationState = integrationState;
|
807
|
+
this.cleanup$ = new Subject();
|
808
|
+
this.isVisibleSubj$ = new BehaviorSubject(true);
|
809
|
+
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
810
|
+
this.initSubscriptions();
|
811
|
+
}
|
812
|
+
cleanup() {
|
813
|
+
this.cleanup$.next();
|
814
|
+
}
|
815
|
+
initSubscriptions() {
|
816
|
+
this.integrationState
|
817
|
+
.listen$(FlowAction.OPEN_GUIDED_SELLING)
|
818
|
+
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
819
|
+
.subscribe();
|
820
|
+
this.integrationState
|
821
|
+
.listen$(FlowAction.CLOSE_GUIDED_SELLING)
|
822
|
+
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
823
|
+
.subscribe();
|
824
|
+
}
|
825
|
+
}
|
826
|
+
FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
827
|
+
FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
|
828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
|
1529
829
|
type: Injectable
|
1530
|
-
}], ctorParameters: function () { return [{ type:
|
830
|
+
}], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
|
1531
831
|
|
1532
832
|
class FlowComponent {
|
1533
|
-
constructor(routerService, quoteDraftService, flowService,
|
833
|
+
constructor(routerService, quoteDraftService, flowService, flowInfo, guidedSellingService) {
|
1534
834
|
this.routerService = routerService;
|
1535
835
|
this.quoteDraftService = quoteDraftService;
|
1536
836
|
this.flowService = flowService;
|
1537
|
-
this.
|
1538
|
-
this.
|
837
|
+
this.flowInfo = flowInfo;
|
838
|
+
this.guidedSellingService = guidedSellingService;
|
1539
839
|
this.isLoading$ = this.routerService.loading$;
|
1540
|
-
this.showHeader$ = this.routerService.route
|
840
|
+
this.showHeader$ = combineLatest([this.routerService.route$, this.flowInfo.flow$]).pipe(map(([route, flow]) => route.data['showHeader'] && !flow?.properties.standalone));
|
1541
841
|
this.isStandalone$ = this.quoteDraftService.isStandalone$;
|
842
|
+
this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
|
1542
843
|
this.flowService.initSubscriptions();
|
1543
844
|
}
|
1544
|
-
ngOnInit() {
|
1545
|
-
this.integrationState.clear();
|
1546
|
-
}
|
1547
|
-
ngOnDestroy() {
|
1548
|
-
this.flowService.cleanup();
|
1549
|
-
this.docGenService.cleanup();
|
1550
|
-
}
|
1551
845
|
}
|
1552
|
-
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1553
|
-
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
1554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
846
|
+
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i2.QuoteDraftService }, { token: FlowService }, { token: i2.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
|
847
|
+
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: DocGenComponent, selector: "vl-flow-doc-gen" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
|
1555
849
|
type: Component,
|
1556
|
-
args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#
|
1557
|
-
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type:
|
850
|
+
args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"] }]
|
851
|
+
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i2.QuoteDraftService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
|
1558
852
|
|
1559
853
|
const getFlowObjectIdPropertyName = (id) => {
|
1560
854
|
const objectName = SalesforceIdUtils.getSfObjectNameById(id);
|
@@ -1570,8 +864,12 @@ const getFlowObjectIdPropertyName = (id) => {
|
|
1570
864
|
};
|
1571
865
|
const getDefaultProperties = (params) => {
|
1572
866
|
const properties = {};
|
867
|
+
let standalone = params.flowParams?.standalone;
|
1573
868
|
if (params.flowParams?.entryPath.includes('/product') || params.mode === ConfigurationContextMode.REMOTE) {
|
1574
|
-
|
869
|
+
standalone = standalone ?? true;
|
870
|
+
}
|
871
|
+
if (standalone != null) {
|
872
|
+
properties.standalone = standalone ? 'true' : 'false';
|
1575
873
|
}
|
1576
874
|
return properties;
|
1577
875
|
};
|
@@ -1590,7 +888,7 @@ class ContextGuard {
|
|
1590
888
|
const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
|
1591
889
|
// Restrict if mode is not defined
|
1592
890
|
if (mode == null) {
|
1593
|
-
return this.
|
891
|
+
return this.routerService.showErrorPage$('Mode is undefined');
|
1594
892
|
}
|
1595
893
|
const headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
|
1596
894
|
// Allow if context is already initialized with the same headerId
|
@@ -1615,7 +913,7 @@ class ContextGuard {
|
|
1615
913
|
this.runtimeSettingsService.initCurrency(context.properties['CurrencyIsoCode']);
|
1616
914
|
}), map(() => true), catchError(e => {
|
1617
915
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1618
|
-
return this.
|
916
|
+
return this.routerService.showErrorPage$(message);
|
1619
917
|
}));
|
1620
918
|
}
|
1621
919
|
canActivate(route) {
|
@@ -1648,17 +946,39 @@ class ContextGuard {
|
|
1648
946
|
}
|
1649
947
|
return;
|
1650
948
|
}
|
1651
|
-
handleError(route, message) {
|
1652
|
-
this.contextService.delete();
|
1653
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
1654
|
-
return from(this.router.navigate([parentUrl, '404'], { state: { message } })).pipe(map(() => false));
|
1655
|
-
}
|
1656
949
|
}
|
1657
|
-
ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1658
|
-
ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1659
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
950
|
+
ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
951
|
+
ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard });
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, decorators: [{
|
1660
953
|
type: Injectable
|
1661
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type:
|
954
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
|
955
|
+
|
956
|
+
const keepFlowInitialized = (route) => {
|
957
|
+
const contextService = inject(ContextService);
|
958
|
+
const flowState = inject(FlowStateService);
|
959
|
+
const flowInfoService = inject(FlowInfoService);
|
960
|
+
const routerService = inject(FlowRouterService);
|
961
|
+
const quoteDraft = inject(QuoteDraftService);
|
962
|
+
const configurationService = inject(ConfigurationService);
|
963
|
+
const integrationState = inject(IntegrationState);
|
964
|
+
const { flowId } = route.queryParams;
|
965
|
+
const flow = flowInfoService.flow;
|
966
|
+
if (flow && flow?.id === flowId) {
|
967
|
+
return true;
|
968
|
+
}
|
969
|
+
// Cleanup
|
970
|
+
flowState.cleanup();
|
971
|
+
quoteDraft.reset();
|
972
|
+
configurationService.reset();
|
973
|
+
integrationState.clear();
|
974
|
+
flowInfoService.cleanup();
|
975
|
+
contextService.delete();
|
976
|
+
if (!flowId) {
|
977
|
+
return true;
|
978
|
+
}
|
979
|
+
const params = { ...route.queryParams, ...flow?.properties.queryParams };
|
980
|
+
return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => routerService.showErrorPage$(e)));
|
981
|
+
};
|
1662
982
|
|
1663
983
|
class ProductUnloadGuard {
|
1664
984
|
constructor(router, contextService, quoteDraftService, configurationService, flowDialogService) {
|
@@ -1682,6 +1002,9 @@ class ProductUnloadGuard {
|
|
1682
1002
|
}
|
1683
1003
|
// clear obsolete queryParams
|
1684
1004
|
const urlTree = this.router.parseUrl(nextState.url);
|
1005
|
+
if (!urlTree.queryParams['productId']) {
|
1006
|
+
return true;
|
1007
|
+
}
|
1685
1008
|
delete urlTree.queryParams['productId'];
|
1686
1009
|
// replace url after deactivation has finished
|
1687
1010
|
setTimeout(() => this.router.navigateByUrl(urlTree.toString(), { replaceUrl: true }));
|
@@ -1691,32 +1014,36 @@ class ProductUnloadGuard {
|
|
1691
1014
|
}));
|
1692
1015
|
}
|
1693
1016
|
}
|
1694
|
-
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1695
|
-
ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1696
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1017
|
+
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i2.ContextService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1018
|
+
ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard });
|
1019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, decorators: [{
|
1697
1020
|
type: Injectable
|
1698
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type:
|
1021
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: FlowDialogService }]; } });
|
1699
1022
|
|
1700
1023
|
class RootGuard {
|
1701
1024
|
constructor(router, routerService) {
|
1702
1025
|
this.router = router;
|
1703
1026
|
this.routerService = routerService;
|
1704
1027
|
this.initialized = false;
|
1705
|
-
this.navToRestore = null;
|
1706
1028
|
}
|
1707
1029
|
canActivate(route) {
|
1708
1030
|
// We always need to initialize root component first, and only then start checking guards/resolvers
|
1709
1031
|
if (!this.initialized) {
|
1710
1032
|
this.initialized = true;
|
1711
|
-
|
1033
|
+
const navToRestore = this.router.getCurrentNavigation();
|
1712
1034
|
const rootUrl = this.routerService.getFlowRootPath(route);
|
1713
|
-
this.router
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1035
|
+
this.router
|
1036
|
+
.navigate([rootUrl], {
|
1037
|
+
replaceUrl: !navToRestore?.previousNavigation,
|
1038
|
+
skipLocationChange: true,
|
1039
|
+
})
|
1040
|
+
.then(success => {
|
1041
|
+
if (!success || !navToRestore) {
|
1042
|
+
return;
|
1043
|
+
}
|
1044
|
+
setTimeout(() => {
|
1045
|
+
this.router.navigateByUrl(navToRestore.extractedUrl, navToRestore.extras);
|
1046
|
+
});
|
1720
1047
|
});
|
1721
1048
|
}
|
1722
1049
|
return true;
|
@@ -1726,25 +1053,25 @@ class RootGuard {
|
|
1726
1053
|
return true;
|
1727
1054
|
}
|
1728
1055
|
}
|
1729
|
-
RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1730
|
-
RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1731
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1056
|
+
RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1057
|
+
RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, providedIn: 'root' });
|
1058
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, decorators: [{
|
1732
1059
|
type: Injectable,
|
1733
1060
|
args: [{ providedIn: 'root' }]
|
1734
1061
|
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
|
1735
1062
|
|
1736
1063
|
class AssetsComponent {
|
1737
|
-
constructor(templatesApi,
|
1064
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
1738
1065
|
this.templatesApi = templatesApi;
|
1739
|
-
this.contextService = contextService;
|
1740
1066
|
this.cdr = cdr;
|
1741
1067
|
this.toastService = toastService;
|
1068
|
+
this.flowInfo = flowInfo;
|
1742
1069
|
this.customizationService = customizationService;
|
1743
1070
|
this.uiDefinition = undefined;
|
1744
1071
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
1745
1072
|
this.templateApiName = '';
|
1746
1073
|
this.destroyed$ = new Subject();
|
1747
|
-
this.templateApiName = this.
|
1074
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates.assets ?? '';
|
1748
1075
|
}
|
1749
1076
|
ngOnInit() {
|
1750
1077
|
this.generateUIDefinition$()
|
@@ -1767,37 +1094,36 @@ class AssetsComponent {
|
|
1767
1094
|
this.destroyed$.next();
|
1768
1095
|
this.destroyed$.complete();
|
1769
1096
|
}
|
1770
|
-
|
1771
|
-
|
1772
|
-
.fetchComponents$(template.id)
|
1773
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
1774
|
-
}
|
1775
|
-
getLocalAssetsComponentMeta$() {
|
1776
|
-
if (!this.customizationService?.getAssetsComponent) {
|
1097
|
+
getLocalMeta$() {
|
1098
|
+
if (!this.customizationService?.getTemplateComponents) {
|
1777
1099
|
return of(undefined);
|
1778
1100
|
}
|
1779
|
-
return this.customizationService?.
|
1780
|
-
if (!
|
1101
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1102
|
+
if (!components) {
|
1781
1103
|
return;
|
1782
1104
|
}
|
1783
|
-
return {
|
1105
|
+
return components.map(component => ({
|
1784
1106
|
html: component.html,
|
1785
1107
|
css: component.css,
|
1786
1108
|
js: component.js,
|
1787
1109
|
json: component.json,
|
1788
|
-
};
|
1110
|
+
}));
|
1789
1111
|
}));
|
1790
1112
|
}
|
1791
|
-
|
1792
|
-
|
1113
|
+
getOrgMeta$() {
|
1114
|
+
const template = this.flowInfo.templates.SHOPPING_CART;
|
1115
|
+
if (!template) {
|
1116
|
+
return of(undefined);
|
1117
|
+
}
|
1118
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
1793
1119
|
}
|
1794
1120
|
generateUIDefinition$() {
|
1795
1121
|
return of(undefined).pipe(tap(() => {
|
1796
1122
|
if (!this.templateApiName) {
|
1797
|
-
throw new Error("Flow
|
1123
|
+
throw new Error("Flow 'assets' template is not defined.");
|
1798
1124
|
}
|
1799
|
-
}), switchMap(() => this.
|
1800
|
-
if (!
|
1125
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
1126
|
+
if (!metaList) {
|
1801
1127
|
return;
|
1802
1128
|
}
|
1803
1129
|
const uiDef = {
|
@@ -1806,25 +1132,23 @@ class AssetsComponent {
|
|
1806
1132
|
primary: true,
|
1807
1133
|
type: 'DEFAULT',
|
1808
1134
|
version: 2,
|
1809
|
-
children:
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
},
|
1816
|
-
],
|
1135
|
+
children: metaList.map(meta => ({
|
1136
|
+
children: [],
|
1137
|
+
template: meta.html && btoaSafe(meta.html),
|
1138
|
+
script: meta.js && btoaSafe(meta.js),
|
1139
|
+
styles: meta.css && btoaSafe(meta.css),
|
1140
|
+
})),
|
1817
1141
|
};
|
1818
1142
|
return uiDef;
|
1819
1143
|
}));
|
1820
1144
|
}
|
1821
1145
|
}
|
1822
|
-
AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1823
|
-
AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
1824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1146
|
+
AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1147
|
+
AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, decorators: [{
|
1825
1149
|
type: Component,
|
1826
1150
|
args: [{ selector: 'vl-flow-assets', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
|
1827
|
-
}], ctorParameters: function () { return [{ type:
|
1151
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
1828
1152
|
type: Optional
|
1829
1153
|
}, {
|
1830
1154
|
type: Inject,
|
@@ -1833,10 +1157,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
1833
1157
|
|
1834
1158
|
class AssetsModule {
|
1835
1159
|
}
|
1836
|
-
AssetsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1837
|
-
AssetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
1838
|
-
AssetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
1839
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1160
|
+
AssetsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1161
|
+
AssetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, declarations: [AssetsComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [AssetsComponent] });
|
1162
|
+
AssetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, decorators: [{
|
1840
1164
|
type: NgModule,
|
1841
1165
|
args: [{
|
1842
1166
|
declarations: [AssetsComponent],
|
@@ -1846,17 +1170,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
1846
1170
|
}] });
|
1847
1171
|
|
1848
1172
|
class CatalogComponent {
|
1849
|
-
constructor(templatesApi,
|
1173
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
1850
1174
|
this.templatesApi = templatesApi;
|
1851
|
-
this.contextService = contextService;
|
1852
1175
|
this.cdr = cdr;
|
1853
1176
|
this.toastService = toastService;
|
1177
|
+
this.flowInfo = flowInfo;
|
1854
1178
|
this.customizationService = customizationService;
|
1855
1179
|
this.uiDefinition = undefined;
|
1856
1180
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
1857
1181
|
this.templateApiName = '';
|
1858
1182
|
this.destroyed$ = new Subject();
|
1859
|
-
this.templateApiName = this.
|
1183
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates.catalog ?? '';
|
1860
1184
|
}
|
1861
1185
|
ngOnInit() {
|
1862
1186
|
this.generateUIDefinition$()
|
@@ -1879,37 +1203,36 @@ class CatalogComponent {
|
|
1879
1203
|
this.destroyed$.next();
|
1880
1204
|
this.destroyed$.complete();
|
1881
1205
|
}
|
1882
|
-
|
1883
|
-
|
1884
|
-
.fetchComponents$(template.id)
|
1885
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
1886
|
-
}
|
1887
|
-
getLocalCatalogComponentMeta$() {
|
1888
|
-
if (!this.customizationService?.getCatalogComponent) {
|
1206
|
+
getLocalMeta$() {
|
1207
|
+
if (!this.customizationService?.getTemplateComponents) {
|
1889
1208
|
return of(undefined);
|
1890
1209
|
}
|
1891
|
-
return this.customizationService?.
|
1892
|
-
if (!
|
1210
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1211
|
+
if (!components) {
|
1893
1212
|
return;
|
1894
1213
|
}
|
1895
|
-
return {
|
1214
|
+
return components.map(component => ({
|
1896
1215
|
html: component.html,
|
1897
1216
|
css: component.css,
|
1898
1217
|
js: component.js,
|
1899
1218
|
json: component.json,
|
1900
|
-
};
|
1219
|
+
}));
|
1901
1220
|
}));
|
1902
1221
|
}
|
1903
|
-
|
1904
|
-
|
1222
|
+
getOrgMeta$() {
|
1223
|
+
const template = this.flowInfo.templates.CATALOG;
|
1224
|
+
if (!template) {
|
1225
|
+
return of(undefined);
|
1226
|
+
}
|
1227
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
1905
1228
|
}
|
1906
1229
|
generateUIDefinition$() {
|
1907
1230
|
return of(undefined).pipe(tap(() => {
|
1908
1231
|
if (!this.templateApiName) {
|
1909
|
-
throw new Error("Flow
|
1232
|
+
throw new Error("Flow 'catalog' template is not defined.");
|
1910
1233
|
}
|
1911
|
-
}), switchMap(() => this.
|
1912
|
-
if (!
|
1234
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
1235
|
+
if (!metaList) {
|
1913
1236
|
return;
|
1914
1237
|
}
|
1915
1238
|
const uiDef = {
|
@@ -1918,25 +1241,23 @@ class CatalogComponent {
|
|
1918
1241
|
primary: true,
|
1919
1242
|
type: 'DEFAULT',
|
1920
1243
|
version: 2,
|
1921
|
-
children:
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
},
|
1928
|
-
],
|
1244
|
+
children: metaList.map(meta => ({
|
1245
|
+
children: [],
|
1246
|
+
template: meta.html && btoaSafe(meta.html),
|
1247
|
+
script: meta.js && btoaSafe(meta.js),
|
1248
|
+
styles: meta.css && btoaSafe(meta.css),
|
1249
|
+
})),
|
1929
1250
|
};
|
1930
1251
|
return uiDef;
|
1931
1252
|
}));
|
1932
1253
|
}
|
1933
1254
|
}
|
1934
|
-
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1935
|
-
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
1936
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1255
|
+
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1256
|
+
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, decorators: [{
|
1937
1258
|
type: Component,
|
1938
1259
|
args: [{ selector: 'vl-flow-catalog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
|
1939
|
-
}], ctorParameters: function () { return [{ type:
|
1260
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
1940
1261
|
type: Optional
|
1941
1262
|
}, {
|
1942
1263
|
type: Inject,
|
@@ -1945,10 +1266,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
1945
1266
|
|
1946
1267
|
class CatalogModule {
|
1947
1268
|
}
|
1948
|
-
CatalogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1949
|
-
CatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
1950
|
-
CatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
1951
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1269
|
+
CatalogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1270
|
+
CatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, declarations: [CatalogComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [CatalogComponent] });
|
1271
|
+
CatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, decorators: [{
|
1952
1273
|
type: NgModule,
|
1953
1274
|
args: [{
|
1954
1275
|
declarations: [CatalogComponent],
|
@@ -1967,15 +1288,7 @@ class DebugComponent {
|
|
1967
1288
|
this.form = new FormGroup({
|
1968
1289
|
id: new FormControl(''),
|
1969
1290
|
});
|
1970
|
-
this.flows$ = this.flowsApiService.fetchFlows().pipe(
|
1971
|
-
const queryParams = flow?.properties?.queryParams ?? {};
|
1972
|
-
return {
|
1973
|
-
id: flow.id,
|
1974
|
-
entryPath: flow?.properties?.entryPath,
|
1975
|
-
queryParams,
|
1976
|
-
queryParamsStr: JSON.stringify(queryParams),
|
1977
|
-
};
|
1978
|
-
})), shareReplay());
|
1291
|
+
this.flows$ = this.flowsApiService.fetchFlows().pipe(shareReplay());
|
1979
1292
|
}
|
1980
1293
|
runFlow() {
|
1981
1294
|
const { id } = this.form.value;
|
@@ -1990,30 +1303,33 @@ class DebugComponent {
|
|
1990
1303
|
queryParams: {
|
1991
1304
|
flowId: this.selectedFlow.id,
|
1992
1305
|
[objectPropertyName]: id,
|
1993
|
-
...this.selectedFlow.queryParams,
|
1306
|
+
...this.selectedFlow.properties.queryParams,
|
1994
1307
|
},
|
1995
1308
|
relativeTo: this.activatedRoute,
|
1996
1309
|
});
|
1997
1310
|
}
|
1311
|
+
getQueryParamsString(params) {
|
1312
|
+
return new HttpParams({ fromObject: params }).toString();
|
1313
|
+
}
|
1998
1314
|
}
|
1999
|
-
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2000
|
-
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2001
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1315
|
+
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i1$1.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2.ContextService }, { token: i2.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
|
1316
|
+
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}tbody>tr{cursor:pointer}tbody>tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px;line-height:18px}.cell-query-params{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, decorators: [{
|
2002
1318
|
type: Component,
|
2003
|
-
args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.
|
2004
|
-
}], ctorParameters: function () { return [{ type:
|
1319
|
+
args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}tbody>tr{cursor:pointer}tbody>tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px;line-height:18px}.cell-query-params{word-break:break-all}\n"] }]
|
1320
|
+
}], ctorParameters: function () { return [{ type: i1$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.QuoteDraftService }]; } });
|
2005
1321
|
|
2006
1322
|
const routes$1 = [{ path: '', component: DebugComponent }];
|
2007
1323
|
class DebugModule {
|
2008
1324
|
}
|
2009
|
-
DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2010
|
-
DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
1325
|
+
DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1326
|
+
DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, declarations: [DebugComponent], imports: [CommonModule,
|
2011
1327
|
FormsModule,
|
2012
1328
|
ReactiveFormsModule, i1$2.RouterModule, RadioButtonModule,
|
2013
1329
|
ButtonModule,
|
2014
1330
|
InputTextModule,
|
2015
1331
|
DropdownModule] });
|
2016
|
-
DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
1332
|
+
DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, imports: [CommonModule,
|
2017
1333
|
FormsModule,
|
2018
1334
|
ReactiveFormsModule,
|
2019
1335
|
RouterModule.forChild(routes$1),
|
@@ -2021,7 +1337,7 @@ DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "1
|
|
2021
1337
|
ButtonModule,
|
2022
1338
|
InputTextModule,
|
2023
1339
|
DropdownModule] });
|
2024
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, decorators: [{
|
2025
1341
|
type: NgModule,
|
2026
1342
|
args: [{
|
2027
1343
|
declarations: [DebugComponent],
|
@@ -2040,19 +1356,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2040
1356
|
|
2041
1357
|
class EmptyAccountComponent {
|
2042
1358
|
}
|
2043
|
-
EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2044
|
-
EmptyAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: EmptyAccountComponent, selector: "vl-empty-account", ngImport: i0, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"], dependencies: [{ kind: "component", type: i3$1.EmptyStateComponent, selector: "vl-empty-state", inputs: ["primaryText", "secondaryText", "buttonLabel", "icon", "disabled"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1359
|
+
EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1360
|
+
EmptyAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EmptyAccountComponent, selector: "vl-empty-account", ngImport: i0, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"], dependencies: [{ kind: "component", type: i2$1.EmptyStateComponent, selector: "vl-empty-state", inputs: ["primaryText", "secondaryText", "buttonLabel", "icon", "disabled"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, decorators: [{
|
2046
1362
|
type: Component,
|
2047
1363
|
args: [{ selector: 'vl-empty-account', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"] }]
|
2048
1364
|
}] });
|
2049
1365
|
|
2050
1366
|
class EmptyAccountModule {
|
2051
1367
|
}
|
2052
|
-
EmptyAccountModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2053
|
-
EmptyAccountModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2054
|
-
EmptyAccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2055
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1368
|
+
EmptyAccountModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1369
|
+
EmptyAccountModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, declarations: [EmptyAccountComponent], imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule], exports: [EmptyAccountComponent] });
|
1370
|
+
EmptyAccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule] });
|
1371
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, decorators: [{
|
2056
1372
|
type: NgModule,
|
2057
1373
|
args: [{
|
2058
1374
|
declarations: [EmptyAccountComponent],
|
@@ -2061,143 +1377,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2061
1377
|
}]
|
2062
1378
|
}] });
|
2063
1379
|
|
2064
|
-
class LegacyProductComponent {
|
2065
|
-
constructor(route, quoteDraftService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
|
2066
|
-
this.route = route;
|
2067
|
-
this.quoteDraftService = quoteDraftService;
|
2068
|
-
this.quoteApiService = quoteApiService;
|
2069
|
-
this.contextService = contextService;
|
2070
|
-
this.runtimeContextService = runtimeContextService;
|
2071
|
-
this.runtimeService = runtimeService;
|
2072
|
-
this.currentStateService = currentStateService;
|
2073
|
-
this.customizationService = customizationService;
|
2074
|
-
this.destroyed$ = new Subject();
|
2075
|
-
}
|
2076
|
-
ngOnInit() {
|
2077
|
-
this.quoteDraftService.quoteDraft$
|
2078
|
-
.pipe(first$1(), takeUntil$1(this.destroyed$))
|
2079
|
-
.subscribe(quote => this.init(quote, this.route.snapshot.queryParams));
|
2080
|
-
this.runtimeService.onSolutionStopEvent.pipe(take(1)).subscribe(lineItem => this.onSolutionStop(lineItem));
|
2081
|
-
this.runtimeService.onSolutionReadyEvent.pipe(take(1)).subscribe(event => this.onSolutionReady(event));
|
2082
|
-
this.runtimeService.onSolutionCancelEvent.pipe(take(1)).subscribe(() => this.onSolutionCancel());
|
2083
|
-
}
|
2084
|
-
ngOnDestroy() {
|
2085
|
-
this.destroyed$.next();
|
2086
|
-
this.destroyed$.complete();
|
2087
|
-
}
|
2088
|
-
onSolutionReady(lineItem) {
|
2089
|
-
lineItem.actionCode = lineItem.actionCode ?? 'ADD';
|
2090
|
-
}
|
2091
|
-
onSolutionCancel() {
|
2092
|
-
this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
|
2093
|
-
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
2094
|
-
});
|
2095
|
-
}
|
2096
|
-
onSolutionUpdated(lineItem) {
|
2097
|
-
const states = {
|
2098
|
-
configurableRamp: lineItem,
|
2099
|
-
currentState: this.currentStateService.currentState,
|
2100
|
-
asset: this.getAsset(lineItem),
|
2101
|
-
};
|
2102
|
-
this.runtimeService.updateRuntime(states);
|
2103
|
-
}
|
2104
|
-
onSolutionStop(lineItem) {
|
2105
|
-
this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
|
2106
|
-
const quoteToUpsert = {
|
2107
|
-
...quote,
|
2108
|
-
context: this.contextService.resolve(),
|
2109
|
-
currentState: [...(this.currentStateService.currentState || []).filter(li => li.id !== lineItem.id), lineItem],
|
2110
|
-
};
|
2111
|
-
this.quoteApiService
|
2112
|
-
.upsertQuote(quoteToUpsert)
|
2113
|
-
.pipe(take(1))
|
2114
|
-
.subscribe(quote => {
|
2115
|
-
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
2116
|
-
});
|
2117
|
-
});
|
2118
|
-
}
|
2119
|
-
init(quote, queryParams) {
|
2120
|
-
const productId = queryParams['productId'];
|
2121
|
-
const lineItemId = this.getLineItemId(quote, queryParams);
|
2122
|
-
this.assets = quote.initialState;
|
2123
|
-
lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
|
2124
|
-
}
|
2125
|
-
getLineItemId(quote, queryParams) {
|
2126
|
-
if (EntityUtil.isPresent(queryParams['lineItemId'])) {
|
2127
|
-
return queryParams['lineItemId'];
|
2128
|
-
}
|
2129
|
-
return quote.currentState
|
2130
|
-
.filter(lineItem => lineItem.productId === queryParams['productId'])
|
2131
|
-
.map(lineItem => lineItem.id)
|
2132
|
-
.find(id => id);
|
2133
|
-
}
|
2134
|
-
configure(productId) {
|
2135
|
-
const runtimeContext = this.getRuntimeContext(productId, '', RuntimeOperation.INIT);
|
2136
|
-
this.startRuntime({}, runtimeContext);
|
2137
|
-
}
|
2138
|
-
reConfigure(lineItemId, currentState) {
|
2139
|
-
const currentStateItem = EntityUtil.findById(lineItemId, currentState);
|
2140
|
-
const runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, RuntimeOperation.UPDATE);
|
2141
|
-
const states = {
|
2142
|
-
configurableRamp: currentStateItem,
|
2143
|
-
currentState,
|
2144
|
-
asset: this.getAsset(currentStateItem),
|
2145
|
-
};
|
2146
|
-
this.currentStateService.update(currentState);
|
2147
|
-
this.startRuntime(states, runtimeContext);
|
2148
|
-
}
|
2149
|
-
getAsset(lineItem) {
|
2150
|
-
return this.assets && this.assets.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
|
2151
|
-
}
|
2152
|
-
startRuntime(states, runtimeContext$) {
|
2153
|
-
runtimeContext$
|
2154
|
-
.pipe(take(1), map$1(runtimeContext => {
|
2155
|
-
this.runtimeService.startRuntime(runtimeContext, states);
|
2156
|
-
}))
|
2157
|
-
.subscribe();
|
2158
|
-
}
|
2159
|
-
customizeContext(productId, context) {
|
2160
|
-
if (!this.customizationService?.getLegacyUiDefinition) {
|
2161
|
-
return of(context);
|
2162
|
-
}
|
2163
|
-
return this.customizationService.getLegacyUiDefinition(productId).pipe(map$1(uiDefinitionContainer => ({
|
2164
|
-
...context,
|
2165
|
-
uiDefinitionContainer: uiDefinitionContainer ?? undefined,
|
2166
|
-
})));
|
2167
|
-
}
|
2168
|
-
getRuntimeContext(productId, offeringId, runtimeOperation) {
|
2169
|
-
return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(map$1(runtimeContext => {
|
2170
|
-
runtimeContext.invocationContext = { runtimeOperation: RuntimeOperation[runtimeOperation] };
|
2171
|
-
return runtimeContext;
|
2172
|
-
}), switchMap$1(runtimeContext => this.customizeContext(productId, runtimeContext)));
|
2173
|
-
}
|
2174
|
-
}
|
2175
|
-
LegacyProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductComponent, deps: [{ token: i1$2.ActivatedRoute }, { token: i1$1.QuoteDraftService }, { token: i2.QuoteApiService }, { token: i1$1.ContextService }, { token: i4$1.RuntimeContextService }, { token: i4$1.RuntimeService }, { token: i4$1.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
2176
|
-
LegacyProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: LegacyProductComponent, selector: "ng-component", ngImport: i0, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], dependencies: [{ kind: "component", type: i4$1.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
|
2177
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductComponent, decorators: [{
|
2178
|
-
type: Component,
|
2179
|
-
args: [{ template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"] }]
|
2180
|
-
}], ctorParameters: function () { return [{ type: i1$2.ActivatedRoute }, { type: i1$1.QuoteDraftService }, { type: i2.QuoteApiService }, { type: i1$1.ContextService }, { type: i4$1.RuntimeContextService }, { type: i4$1.RuntimeService }, { type: i4$1.CurrentStateService }, { type: undefined, decorators: [{
|
2181
|
-
type: Optional
|
2182
|
-
}, {
|
2183
|
-
type: Inject,
|
2184
|
-
args: [FLOW_CUSTOMIZATION]
|
2185
|
-
}] }]; } });
|
2186
|
-
|
2187
|
-
class LegacyProductModule {
|
2188
|
-
}
|
2189
|
-
LegacyProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2190
|
-
LegacyProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [CommonModule, RuntimeModule], exports: [LegacyProductComponent] });
|
2191
|
-
LegacyProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, imports: [CommonModule, RuntimeModule] });
|
2192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, decorators: [{
|
2193
|
-
type: NgModule,
|
2194
|
-
args: [{
|
2195
|
-
declarations: [LegacyProductComponent],
|
2196
|
-
imports: [CommonModule, RuntimeModule],
|
2197
|
-
exports: [LegacyProductComponent],
|
2198
|
-
}]
|
2199
|
-
}] });
|
2200
|
-
|
2201
1380
|
class ProductComponent {
|
2202
1381
|
constructor(contextService, configurationRuntimeService, configurationService, configurationState, quoteDraftService, integrationState, customizationService) {
|
2203
1382
|
this.contextService = contextService;
|
@@ -2239,7 +1418,7 @@ class ProductComponent {
|
|
2239
1418
|
return this.configurationRuntimeService.init({ productId, offeringId });
|
2240
1419
|
}), switchMap(() => this.customizeUI$()), tap(() => {
|
2241
1420
|
const uiDefinition = this.configurationRuntimeService.runtimeContext?.uiDefinitionContainer?.source;
|
2242
|
-
if (uiDefinition
|
1421
|
+
if (uiDefinition) {
|
2243
1422
|
this.uiDefinition$.next(uiDefinition);
|
2244
1423
|
}
|
2245
1424
|
else {
|
@@ -2261,12 +1440,12 @@ class ProductComponent {
|
|
2261
1440
|
return id;
|
2262
1441
|
}
|
2263
1442
|
}
|
2264
|
-
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2265
|
-
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1443
|
+
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token: i2.ContextService }, { token: i2.ConfigurationRuntimeService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationState }, { token: i2.QuoteDraftService }, { token: i2.IntegrationState }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1444
|
+
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n", styles: [""], dependencies: [{ kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, decorators: [{
|
2267
1446
|
type: Component,
|
2268
1447
|
args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n" }]
|
2269
|
-
}], ctorParameters: function () { return [{ type:
|
1448
|
+
}], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationState }, { type: i2.QuoteDraftService }, { type: i2.IntegrationState }, { type: undefined, decorators: [{
|
2270
1449
|
type: Optional
|
2271
1450
|
}, {
|
2272
1451
|
type: Inject,
|
@@ -2275,10 +1454,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2275
1454
|
|
2276
1455
|
class ProductModule {
|
2277
1456
|
}
|
2278
|
-
ProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2279
|
-
ProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2280
|
-
ProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2281
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1457
|
+
ProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1458
|
+
ProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, declarations: [ProductComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ProductComponent] });
|
1459
|
+
ProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, decorators: [{
|
2282
1461
|
type: NgModule,
|
2283
1462
|
args: [{
|
2284
1463
|
declarations: [ProductComponent],
|
@@ -2300,9 +1479,9 @@ class RecordNotFoundComponent {
|
|
2300
1479
|
}
|
2301
1480
|
}
|
2302
1481
|
}
|
2303
|
-
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2304
|
-
RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2305
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1482
|
+
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
1483
|
+
RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
|
2306
1485
|
type: Component,
|
2307
1486
|
args: [{ selector: 'vl-flow-record-not-found', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"] }]
|
2308
1487
|
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
|
@@ -2310,10 +1489,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2310
1489
|
const routes = [{ path: '', component: RecordNotFoundComponent }];
|
2311
1490
|
class RecordNotFoundModule {
|
2312
1491
|
}
|
2313
|
-
RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2314
|
-
RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2315
|
-
RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1492
|
+
RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1493
|
+
RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$2.RouterModule] });
|
1494
|
+
RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, imports: [CommonModule, RouterModule.forChild(routes)] });
|
1495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, decorators: [{
|
2317
1496
|
type: NgModule,
|
2318
1497
|
args: [{
|
2319
1498
|
declarations: [RecordNotFoundComponent],
|
@@ -2366,9 +1545,8 @@ class RemoteComponent {
|
|
2366
1545
|
this.runtimeService
|
2367
1546
|
.init({ productId })
|
2368
1547
|
.pipe(first(), tap(context => {
|
2369
|
-
const uiDefinitionProperties =
|
2370
|
-
|
2371
|
-
this.uiDefinition = uiDefinition && !isLegacyUIDefinition(uiDefinition) ? uiDefinition : undefined;
|
1548
|
+
const uiDefinitionProperties = context.uiDefinitionContainer?.source.properties ?? {};
|
1549
|
+
this.uiDefinition = context.uiDefinitionContainer?.source;
|
2372
1550
|
const pricingEnabled = uiDefinitionProperties.pricingEnabled ? 'true' : 'false';
|
2373
1551
|
const priceListId = uiDefinitionProperties.priceList;
|
2374
1552
|
const runtimeContextProperties = this.runtimeService.runtimeContext?.properties;
|
@@ -2643,19 +1821,19 @@ class RemoteComponent {
|
|
2643
1821
|
return optionConfigurations;
|
2644
1822
|
}
|
2645
1823
|
}
|
2646
|
-
RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2647
|
-
RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1824
|
+
RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, deps: [{ token: i2.ContextService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationRuntimeService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationState }, { token: i2$2.MessageService }, { token: i2.IntegrationState }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component });
|
1825
|
+
RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RemoteComponent, selector: "vl-flow-remote", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, decorators: [{
|
2649
1827
|
type: Component,
|
2650
1828
|
args: [{ selector: 'vl-flow-remote', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
|
2651
|
-
}], ctorParameters: function () { return [{ type:
|
1829
|
+
}], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationState }, { type: i2$2.MessageService }, { type: i2.IntegrationState }, { type: i4.Location }]; } });
|
2652
1830
|
|
2653
1831
|
class RemoteModule {
|
2654
1832
|
}
|
2655
|
-
RemoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2656
|
-
RemoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2657
|
-
RemoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2658
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1833
|
+
RemoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1834
|
+
RemoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, declarations: [RemoteComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [RemoteComponent] });
|
1835
|
+
RemoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1836
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, decorators: [{
|
2659
1837
|
type: NgModule,
|
2660
1838
|
args: [{
|
2661
1839
|
declarations: [RemoteComponent],
|
@@ -2665,17 +1843,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2665
1843
|
}] });
|
2666
1844
|
|
2667
1845
|
class ShoppingCartComponent {
|
2668
|
-
constructor(templatesApi,
|
1846
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
2669
1847
|
this.templatesApi = templatesApi;
|
2670
|
-
this.contextService = contextService;
|
2671
1848
|
this.cdr = cdr;
|
2672
1849
|
this.toastService = toastService;
|
1850
|
+
this.flowInfo = flowInfo;
|
2673
1851
|
this.customizationService = customizationService;
|
2674
1852
|
this.uiDefinition = undefined;
|
2675
1853
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
2676
1854
|
this.templateApiName = '';
|
2677
1855
|
this.destroyed$ = new Subject();
|
2678
|
-
this.templateApiName = this.
|
1856
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates.shoppingCart ?? '';
|
2679
1857
|
}
|
2680
1858
|
ngOnInit() {
|
2681
1859
|
this.generateUIDefinition$()
|
@@ -2686,7 +1864,7 @@ class ShoppingCartComponent {
|
|
2686
1864
|
this.uiDefinition = uiDef;
|
2687
1865
|
this.state$.next({ loading: false, failure: false });
|
2688
1866
|
}), catchError(err => {
|
2689
|
-
const message = 'Failed to resolve Shopping
|
1867
|
+
const message = 'Failed to resolve Shopping Cart component. ' + (err.message ?? '');
|
2690
1868
|
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
2691
1869
|
this.uiDefinition = undefined;
|
2692
1870
|
this.state$.next({ loading: false, failure: true });
|
@@ -2698,37 +1876,36 @@ class ShoppingCartComponent {
|
|
2698
1876
|
this.destroyed$.next();
|
2699
1877
|
this.destroyed$.complete();
|
2700
1878
|
}
|
2701
|
-
|
2702
|
-
|
2703
|
-
.fetchComponents$(template.id)
|
2704
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
2705
|
-
}
|
2706
|
-
getLocalShoppingCartComponentMeta$() {
|
2707
|
-
if (!this.customizationService?.getShoppingCartComponent) {
|
1879
|
+
getLocalMeta$() {
|
1880
|
+
if (!this.customizationService?.getTemplateComponents) {
|
2708
1881
|
return of(undefined);
|
2709
1882
|
}
|
2710
|
-
return this.customizationService?.
|
2711
|
-
if (!
|
1883
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1884
|
+
if (!components) {
|
2712
1885
|
return;
|
2713
1886
|
}
|
2714
|
-
return {
|
1887
|
+
return components.map(component => ({
|
2715
1888
|
html: component.html,
|
2716
1889
|
css: component.css,
|
2717
1890
|
js: component.js,
|
2718
1891
|
json: component.json,
|
2719
|
-
};
|
1892
|
+
}));
|
2720
1893
|
}));
|
2721
1894
|
}
|
2722
|
-
|
2723
|
-
|
1895
|
+
getOrgMeta$() {
|
1896
|
+
const template = this.flowInfo.templates.SHOPPING_CART;
|
1897
|
+
if (!template) {
|
1898
|
+
return of(undefined);
|
1899
|
+
}
|
1900
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
2724
1901
|
}
|
2725
1902
|
generateUIDefinition$() {
|
2726
1903
|
return of(undefined).pipe(tap(() => {
|
2727
1904
|
if (!this.templateApiName) {
|
2728
|
-
throw new Error("Flow
|
1905
|
+
throw new Error("Flow 'shoppingCart' template is not defined.");
|
2729
1906
|
}
|
2730
|
-
}), switchMap(() => this.
|
2731
|
-
if (!
|
1907
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
1908
|
+
if (!metaList) {
|
2732
1909
|
return;
|
2733
1910
|
}
|
2734
1911
|
const uiDef = {
|
@@ -2737,25 +1914,23 @@ class ShoppingCartComponent {
|
|
2737
1914
|
primary: true,
|
2738
1915
|
type: 'DEFAULT',
|
2739
1916
|
version: 2,
|
2740
|
-
children:
|
2741
|
-
|
2742
|
-
|
2743
|
-
|
2744
|
-
|
2745
|
-
|
2746
|
-
},
|
2747
|
-
],
|
1917
|
+
children: metaList.map(meta => ({
|
1918
|
+
children: [],
|
1919
|
+
template: meta.html && btoaSafe(meta.html),
|
1920
|
+
script: meta.js && btoaSafe(meta.js),
|
1921
|
+
styles: meta.css && btoaSafe(meta.css),
|
1922
|
+
})),
|
2748
1923
|
};
|
2749
1924
|
return uiDef;
|
2750
1925
|
}));
|
2751
1926
|
}
|
2752
1927
|
}
|
2753
|
-
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2754
|
-
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2755
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1928
|
+
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1929
|
+
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1930
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, decorators: [{
|
2756
1931
|
type: Component,
|
2757
1932
|
args: [{ selector: 'vl-flow-shopping-cart', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
|
2758
|
-
}], ctorParameters: function () { return [{ type:
|
1933
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
2759
1934
|
type: Optional
|
2760
1935
|
}, {
|
2761
1936
|
type: Inject,
|
@@ -2764,10 +1939,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2764
1939
|
|
2765
1940
|
class ShoppingCartModule {
|
2766
1941
|
}
|
2767
|
-
ShoppingCartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2768
|
-
ShoppingCartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2769
|
-
ShoppingCartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1942
|
+
ShoppingCartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1943
|
+
ShoppingCartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ShoppingCartComponent] });
|
1944
|
+
ShoppingCartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1945
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, decorators: [{
|
2771
1946
|
type: NgModule,
|
2772
1947
|
args: [{
|
2773
1948
|
declarations: [ShoppingCartComponent],
|
@@ -2777,138 +1952,102 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2777
1952
|
}] });
|
2778
1953
|
|
2779
1954
|
class FlowResolver {
|
2780
|
-
constructor(router,
|
1955
|
+
constructor(router, routerService, contextService, flowInfo) {
|
2781
1956
|
this.router = router;
|
2782
|
-
this.flowsApiService = flowsApiService;
|
2783
1957
|
this.routerService = routerService;
|
2784
1958
|
this.contextService = contextService;
|
2785
|
-
|
2786
|
-
handleError(route, message, queryParams) {
|
2787
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
2788
|
-
return this.router.navigate([parentUrl, '404'], {
|
2789
|
-
queryParams,
|
2790
|
-
state: {
|
2791
|
-
message: message,
|
2792
|
-
},
|
2793
|
-
});
|
1959
|
+
this.flowInfo = flowInfo;
|
2794
1960
|
}
|
2795
1961
|
resolve(route) {
|
2796
1962
|
const { queryParams } = route;
|
2797
|
-
const
|
2798
|
-
if (!
|
2799
|
-
return
|
2800
|
-
}
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
|
2810
|
-
|
2811
|
-
|
2812
|
-
|
2813
|
-
|
2814
|
-
|
2815
|
-
|
2816
|
-
|
2817
|
-
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2823
|
-
.catch(e => {
|
2824
|
-
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2825
|
-
return this.handleError(route, message, mergedParams);
|
2826
|
-
});
|
1963
|
+
const flow = this.flowInfo.flow;
|
1964
|
+
if (!flow) {
|
1965
|
+
return of(false);
|
1966
|
+
}
|
1967
|
+
const { properties } = flow;
|
1968
|
+
const { queryParams: flowQueryParams, entryPath } = properties;
|
1969
|
+
const mergedQueryParams = {
|
1970
|
+
...queryParams,
|
1971
|
+
...flowQueryParams,
|
1972
|
+
};
|
1973
|
+
const contextProperties = Object.entries({
|
1974
|
+
...mergedQueryParams,
|
1975
|
+
...getDefaultProperties({ flowParams: properties }),
|
1976
|
+
}).reduce((trunk, [key, value]) => ({ ...trunk, [key]: String(value) }), {});
|
1977
|
+
this.contextService.update({ properties: contextProperties });
|
1978
|
+
this.flowInfo.flow = flow;
|
1979
|
+
const parentUrl = this.routerService.getFlowRootPath(route);
|
1980
|
+
const entryUrl = String(entryPath ?? '')
|
1981
|
+
.split('/')
|
1982
|
+
.filter(Boolean);
|
1983
|
+
return from(this.router.navigate([parentUrl, ...entryUrl], {
|
1984
|
+
queryParams: mergedQueryParams,
|
1985
|
+
replaceUrl: true,
|
1986
|
+
})).pipe(catchError$1(e => {
|
1987
|
+
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1988
|
+
return this.routerService.showErrorPage$(message);
|
2827
1989
|
}));
|
2828
1990
|
}
|
2829
1991
|
}
|
2830
|
-
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2831
|
-
FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2832
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1992
|
+
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1993
|
+
FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver });
|
1994
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, decorators: [{
|
2833
1995
|
type: Injectable
|
2834
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type:
|
1996
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }]; } });
|
2835
1997
|
|
2836
1998
|
class QuoteResolver {
|
2837
|
-
constructor(router, quoteDraftService, routerService, contextService,
|
1999
|
+
constructor(router, quoteDraftService, routerService, contextService, flowInfo, flowStateService) {
|
2838
2000
|
this.router = router;
|
2839
2001
|
this.quoteDraftService = quoteDraftService;
|
2840
2002
|
this.routerService = routerService;
|
2841
2003
|
this.contextService = contextService;
|
2842
|
-
this.
|
2843
|
-
this.
|
2844
|
-
}
|
2845
|
-
handleError(route, message) {
|
2846
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
2847
|
-
return from(this.router.navigate([parentUrl, '404'], { state: { message } }));
|
2848
|
-
}
|
2849
|
-
calculate$() {
|
2850
|
-
const quoteDraft = this.quoteDraftService.quoteDraft;
|
2851
|
-
if (!this.quoteDraftService.isStandalone && quoteDraft && !this.accountHasNotAssets()) {
|
2852
|
-
return this.flowConfiguration.calculate$(quoteDraft);
|
2853
|
-
}
|
2854
|
-
return of(undefined);
|
2004
|
+
this.flowInfo = flowInfo;
|
2005
|
+
this.flowStateService = flowStateService;
|
2855
2006
|
}
|
2856
2007
|
resolve(route) {
|
2857
|
-
const
|
2858
|
-
|
2859
|
-
|
2008
|
+
const flow = this.flowInfo.flow;
|
2009
|
+
if (!flow) {
|
2010
|
+
return of(false);
|
2011
|
+
}
|
2012
|
+
if (this.flowStateService.isInitialized()) {
|
2860
2013
|
return of(true);
|
2861
2014
|
}
|
2862
|
-
|
2863
|
-
return this.quoteDraftService.init(headerId, queryParams).pipe(switchMap(() => this.calculate$()), tap(() => {
|
2864
|
-
if (!this.quoteDraftService.isStandalone && queryParams.suppressInitialNavigation !== 'true') {
|
2865
|
-
if (this.shouldNavigateToAssets()) {
|
2866
|
-
this.changeNavigation('/assets', route);
|
2867
|
-
}
|
2868
|
-
else if (!this.quoteDraftService.isInitialized && this.quoteDraftService.hasProducts) {
|
2869
|
-
this.changeNavigation('/cart', route);
|
2870
|
-
}
|
2871
|
-
}
|
2872
|
-
this.initializeModifiedAssetsMap();
|
2873
|
-
this.quoteDraftService.isInitialized = true;
|
2874
|
-
this.quoteDraftService.hasUnsavedChanges = false;
|
2875
|
-
}), catchError(e => {
|
2015
|
+
return this.flowStateService.init$().pipe(switchMap(() => this.checkDynamicNavigation$(route)), catchError(e => {
|
2876
2016
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2877
|
-
return this.
|
2017
|
+
return this.routerService.showErrorPage$(message);
|
2878
2018
|
}));
|
2879
2019
|
}
|
2880
|
-
|
2881
|
-
const
|
2882
|
-
|
2883
|
-
|
2884
|
-
queryParams: route.queryParams,
|
2885
|
-
replaceUrl: true,
|
2886
|
-
})
|
2887
|
-
.catch(e => {
|
2888
|
-
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2889
|
-
return this.handleError(route, message);
|
2890
|
-
});
|
2891
|
-
}
|
2892
|
-
shouldNavigateToAssets() {
|
2893
|
-
if (this.contextService.mode === ConfigurationContextMode.ACCOUNT) {
|
2894
|
-
return true;
|
2020
|
+
checkDynamicNavigation$(route) {
|
2021
|
+
const flow = this.flowInfo.flow;
|
2022
|
+
if (!flow) {
|
2023
|
+
return of(true);
|
2895
2024
|
}
|
2896
|
-
|
2897
|
-
|
2898
|
-
|
2899
|
-
|
2900
|
-
|
2901
|
-
|
2902
|
-
|
2903
|
-
|
2904
|
-
|
2025
|
+
if (flow.properties.suppressInitialNavigation || flow.properties.standalone) {
|
2026
|
+
return of(true);
|
2027
|
+
}
|
2028
|
+
let navigateTo;
|
2029
|
+
const isAccountMode = this.contextService.mode === ConfigurationContextMode.ACCOUNT;
|
2030
|
+
if (isAccountMode && this.quoteDraftService.hasAssets) {
|
2031
|
+
navigateTo = '/assets';
|
2032
|
+
}
|
2033
|
+
else if (this.quoteDraftService.hasProducts) {
|
2034
|
+
navigateTo = '/cart';
|
2035
|
+
}
|
2036
|
+
if (navigateTo) {
|
2037
|
+
const parentUrl = this.routerService.getFlowRootPath(route);
|
2038
|
+
return from(this.router.navigate([parentUrl + navigateTo], {
|
2039
|
+
queryParams: route.queryParams,
|
2040
|
+
replaceUrl: true,
|
2041
|
+
}));
|
2042
|
+
}
|
2043
|
+
return of(true);
|
2905
2044
|
}
|
2906
2045
|
}
|
2907
|
-
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2908
|
-
QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2909
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2046
|
+
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i2.QuoteDraftService }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2047
|
+
QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver });
|
2048
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, decorators: [{
|
2910
2049
|
type: Injectable
|
2911
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type:
|
2050
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.QuoteDraftService }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
|
2912
2051
|
|
2913
2052
|
const rootRoute = {
|
2914
2053
|
id: VELOCE_FLOW_ROOT_ROUTE,
|
@@ -2918,107 +2057,99 @@ const rootRoute = {
|
|
2918
2057
|
canDeactivate: [RootGuard],
|
2919
2058
|
children: [
|
2920
2059
|
{
|
2921
|
-
path: '
|
2922
|
-
|
2923
|
-
|
2924
|
-
canActivate: [ContextGuard],
|
2925
|
-
children: [],
|
2926
|
-
},
|
2927
|
-
{
|
2928
|
-
path: 'legacy',
|
2060
|
+
path: '',
|
2061
|
+
canActivate: [keepFlowInitialized],
|
2062
|
+
runGuardsAndResolvers: 'always',
|
2929
2063
|
children: [
|
2064
|
+
{
|
2065
|
+
path: 'flows',
|
2066
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2067
|
+
resolve: { flow: FlowResolver },
|
2068
|
+
canActivate: [ContextGuard],
|
2069
|
+
children: [],
|
2070
|
+
},
|
2930
2071
|
{
|
2931
2072
|
path: 'product',
|
2932
|
-
component:
|
2073
|
+
component: ProductComponent,
|
2074
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2075
|
+
resolve: { quote: QuoteResolver },
|
2076
|
+
canActivate: [ContextGuard],
|
2077
|
+
canDeactivate: [ProductUnloadGuard],
|
2078
|
+
data: { showHeader: true },
|
2079
|
+
},
|
2080
|
+
{
|
2081
|
+
path: 'cart',
|
2082
|
+
component: ShoppingCartComponent,
|
2083
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2084
|
+
resolve: { quote: QuoteResolver },
|
2085
|
+
canActivate: [ContextGuard],
|
2086
|
+
data: { showHeader: true },
|
2087
|
+
},
|
2088
|
+
{
|
2089
|
+
path: 'catalog',
|
2090
|
+
component: CatalogComponent,
|
2091
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2092
|
+
resolve: { quote: QuoteResolver },
|
2093
|
+
canActivate: [ContextGuard],
|
2094
|
+
data: { showHeader: true },
|
2095
|
+
},
|
2096
|
+
{
|
2097
|
+
path: 'assets',
|
2098
|
+
component: AssetsComponent,
|
2099
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2100
|
+
resolve: { quote: QuoteResolver },
|
2101
|
+
canActivate: [ContextGuard],
|
2102
|
+
data: { showHeader: true },
|
2103
|
+
},
|
2104
|
+
{
|
2105
|
+
path: 'empty',
|
2106
|
+
component: EmptyAccountComponent,
|
2107
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2108
|
+
resolve: { quote: QuoteResolver },
|
2109
|
+
canActivate: [ContextGuard],
|
2110
|
+
data: { showHeader: true },
|
2111
|
+
},
|
2112
|
+
{
|
2113
|
+
path: 'remote',
|
2114
|
+
component: RemoteComponent,
|
2933
2115
|
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2934
2116
|
resolve: { quote: QuoteResolver },
|
2935
2117
|
canActivate: [ContextGuard],
|
2936
2118
|
},
|
2119
|
+
{
|
2120
|
+
path: 'debug',
|
2121
|
+
loadChildren: () => DebugModule,
|
2122
|
+
},
|
2123
|
+
{
|
2124
|
+
path: '404',
|
2125
|
+
loadChildren: () => RecordNotFoundModule,
|
2126
|
+
},
|
2937
2127
|
],
|
2938
2128
|
},
|
2939
|
-
{
|
2940
|
-
path: 'product',
|
2941
|
-
component: ProductComponent,
|
2942
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2943
|
-
resolve: { quote: QuoteResolver },
|
2944
|
-
canActivate: [ContextGuard],
|
2945
|
-
canDeactivate: [ProductUnloadGuard],
|
2946
|
-
data: { showHeader: true },
|
2947
|
-
},
|
2948
|
-
{
|
2949
|
-
path: 'cart',
|
2950
|
-
component: ShoppingCartComponent,
|
2951
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2952
|
-
resolve: { quote: QuoteResolver },
|
2953
|
-
canActivate: [ContextGuard],
|
2954
|
-
data: { showHeader: true },
|
2955
|
-
},
|
2956
|
-
{
|
2957
|
-
path: 'catalog',
|
2958
|
-
component: CatalogComponent,
|
2959
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2960
|
-
resolve: { quote: QuoteResolver },
|
2961
|
-
canActivate: [ContextGuard],
|
2962
|
-
data: { showHeader: true },
|
2963
|
-
},
|
2964
|
-
{
|
2965
|
-
path: 'assets',
|
2966
|
-
component: AssetsComponent,
|
2967
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2968
|
-
resolve: { quote: QuoteResolver },
|
2969
|
-
canActivate: [ContextGuard],
|
2970
|
-
data: { showHeader: true },
|
2971
|
-
},
|
2972
|
-
{
|
2973
|
-
path: 'empty',
|
2974
|
-
component: EmptyAccountComponent,
|
2975
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2976
|
-
resolve: { quote: QuoteResolver },
|
2977
|
-
canActivate: [ContextGuard],
|
2978
|
-
data: { showHeader: true },
|
2979
|
-
},
|
2980
|
-
{
|
2981
|
-
path: 'remote',
|
2982
|
-
component: RemoteComponent,
|
2983
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2984
|
-
resolve: { quote: QuoteResolver },
|
2985
|
-
canActivate: [ContextGuard],
|
2986
|
-
},
|
2987
|
-
{
|
2988
|
-
path: 'debug',
|
2989
|
-
loadChildren: () => DebugModule,
|
2990
|
-
},
|
2991
|
-
{
|
2992
|
-
path: '404',
|
2993
|
-
loadChildren: () => RecordNotFoundModule,
|
2994
|
-
},
|
2995
2129
|
],
|
2996
2130
|
};
|
2997
2131
|
class FlowRoutingModule {
|
2998
2132
|
}
|
2999
|
-
FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
3000
|
-
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
3001
|
-
LegacyProductModule,
|
2133
|
+
FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2134
|
+
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
|
3002
2135
|
ShoppingCartModule,
|
3003
2136
|
CatalogModule,
|
3004
2137
|
AssetsModule,
|
3005
2138
|
RemoteModule,
|
3006
2139
|
EmptyAccountModule], exports: [RouterModule] });
|
3007
|
-
FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2140
|
+
FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver], imports: [RouterModule.forChild([rootRoute]),
|
3008
2141
|
ProductModule,
|
3009
|
-
LegacyProductModule,
|
3010
2142
|
ShoppingCartModule,
|
3011
2143
|
CatalogModule,
|
3012
2144
|
AssetsModule,
|
3013
2145
|
RemoteModule,
|
3014
2146
|
EmptyAccountModule, RouterModule] });
|
3015
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, decorators: [{
|
3016
2148
|
type: NgModule,
|
3017
2149
|
args: [{
|
3018
2150
|
imports: [
|
3019
2151
|
RouterModule.forChild([rootRoute]),
|
3020
2152
|
ProductModule,
|
3021
|
-
LegacyProductModule,
|
3022
2153
|
ShoppingCartModule,
|
3023
2154
|
CatalogModule,
|
3024
2155
|
AssetsModule,
|
@@ -3030,32 +2161,93 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
3030
2161
|
}]
|
3031
2162
|
}] });
|
3032
2163
|
|
2164
|
+
class FlowDocGenService {
|
2165
|
+
constructor(integrationState) {
|
2166
|
+
this.integrationState = integrationState;
|
2167
|
+
this.cleanup$ = new Subject();
|
2168
|
+
this.isVisibleSubj$ = new BehaviorSubject(false);
|
2169
|
+
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
2170
|
+
this.initSubscriptions();
|
2171
|
+
}
|
2172
|
+
cleanup() {
|
2173
|
+
this.cleanup$.next();
|
2174
|
+
}
|
2175
|
+
initSubscriptions() {
|
2176
|
+
this.integrationState
|
2177
|
+
.listen$(FlowAction.FLOW_OPEN_DOC_GEN)
|
2178
|
+
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
2179
|
+
.subscribe();
|
2180
|
+
this.integrationState
|
2181
|
+
.listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
|
2182
|
+
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
2183
|
+
.subscribe();
|
2184
|
+
}
|
2185
|
+
}
|
2186
|
+
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
2187
|
+
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
|
2188
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
|
2189
|
+
type: Injectable
|
2190
|
+
}], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
|
2191
|
+
|
2192
|
+
const configurePrimengShadowDOM = () => {
|
2193
|
+
DomHandler.getScrollableParents = (element) => {
|
2194
|
+
const scrollableParents = [];
|
2195
|
+
if (element) {
|
2196
|
+
const parents = DomHandler.getParents(element).filter((item) => !(item instanceof ShadowRoot));
|
2197
|
+
const overflowRegex = /(auto|scroll)/;
|
2198
|
+
const overflowCheck = (node) => {
|
2199
|
+
const styleDeclaration = window['getComputedStyle'](node, null);
|
2200
|
+
return (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) ||
|
2201
|
+
overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) ||
|
2202
|
+
overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
|
2203
|
+
};
|
2204
|
+
for (const parent of parents) {
|
2205
|
+
const scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
|
2206
|
+
if (scrollSelectors) {
|
2207
|
+
const selectors = scrollSelectors.split(',');
|
2208
|
+
for (const selector of selectors) {
|
2209
|
+
const el = DomHandler.findSingle(parent, selector);
|
2210
|
+
if (el && overflowCheck(el)) {
|
2211
|
+
scrollableParents.push(el);
|
2212
|
+
}
|
2213
|
+
}
|
2214
|
+
}
|
2215
|
+
if (parent.nodeType !== 9 && overflowCheck(parent)) {
|
2216
|
+
scrollableParents.push(parent);
|
2217
|
+
}
|
2218
|
+
}
|
2219
|
+
}
|
2220
|
+
return scrollableParents;
|
2221
|
+
};
|
2222
|
+
};
|
2223
|
+
|
2224
|
+
configurePrimengShadowDOM();
|
3033
2225
|
class FlowModule {
|
3034
2226
|
}
|
3035
|
-
FlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
3036
|
-
FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2227
|
+
FlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2228
|
+
FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, declarations: [FlowComponent], imports: [CommonModule,
|
3037
2229
|
LetDirectiveModule,
|
3038
2230
|
FlowRoutingModule,
|
3039
2231
|
ApiModule,
|
3040
2232
|
LauncherModule,
|
3041
2233
|
LoaderModule,
|
3042
|
-
|
2234
|
+
FlowNewHeaderModule,
|
3043
2235
|
FlowDialogModule,
|
3044
2236
|
SdkCoreModule,
|
3045
2237
|
DocGenModule,
|
3046
2238
|
GuidedSellingModule] });
|
3047
|
-
FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2239
|
+
FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowDocGenService, FlowGuidedSellingService], imports: [CommonModule,
|
3048
2240
|
LetDirectiveModule,
|
3049
2241
|
FlowRoutingModule,
|
3050
2242
|
ApiModule,
|
3051
2243
|
LauncherModule,
|
3052
2244
|
LoaderModule,
|
3053
|
-
|
2245
|
+
FlowNewHeaderModule,
|
3054
2246
|
FlowDialogModule,
|
3055
2247
|
SdkCoreModule,
|
3056
2248
|
DocGenModule,
|
3057
2249
|
GuidedSellingModule] });
|
3058
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2250
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, decorators: [{
|
3059
2251
|
type: NgModule,
|
3060
2252
|
args: [{
|
3061
2253
|
declarations: [FlowComponent],
|
@@ -3066,7 +2258,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
3066
2258
|
ApiModule,
|
3067
2259
|
LauncherModule,
|
3068
2260
|
LoaderModule,
|
3069
|
-
|
2261
|
+
FlowNewHeaderModule,
|
3070
2262
|
FlowDialogModule,
|
3071
2263
|
SdkCoreModule,
|
3072
2264
|
DocGenModule,
|
@@ -3080,5 +2272,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
3080
2272
|
* Generated bundle index. Do not edit.
|
3081
2273
|
*/
|
3082
2274
|
|
3083
|
-
export { ContextGuard,
|
2275
|
+
export { ContextGuard, FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
|
3084
2276
|
//# sourceMappingURL=veloceapps-sdk.mjs.map
|