@veloceapps/sdk 8.0.0-17 → 8.0.0-171
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 +2 -3
- 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/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 +26 -15
- package/core/README.md +20 -0
- package/core/modules/configuration/configuration.module.d.ts +2 -1
- package/core/modules/configuration/helpers.d.ts +4 -3
- package/core/modules/configuration/index.d.ts +1 -1
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +1 -1
- package/core/modules/configuration/services/configuration-state.service.d.ts +51 -0
- package/core/modules/configuration/services/configuration.service.d.ts +10 -5
- package/core/modules/configuration/types/configuration.types.d.ts +4 -0
- package/core/modules/flow-configuration/flow-configuration.module.d.ts +2 -1
- package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +5 -0
- 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 +4 -0
- package/core/services/flow-info.service.d.ts +29 -0
- package/core/services/flow-state-configuration.service.d.ts +19 -0
- package/core/services/flow-state.service.d.ts +79 -0
- package/core/services/index.d.ts +4 -1
- 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/core/utils/line-item.utils.d.ts +0 -1
- 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 +6 -6
- 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.mjs +2 -2
- package/esm2020/cms/modules/migrations/migrations.module.mjs +4 -4
- package/esm2020/cms/modules/migrations/services/migrations.service.mjs +9 -5
- package/esm2020/cms/modules/runtime/runtime.module.mjs +4 -4
- package/esm2020/cms/modules/runtime/services/compilation.service.mjs +14 -10
- 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 +11 -7
- package/esm2020/cms/plugins/element-hover.plugin.mjs +3 -3
- package/esm2020/cms/plugins/io.plugin.mjs +3 -3
- 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 +13 -12
- package/esm2020/cms/services/resources.service.mjs +3 -3
- package/esm2020/cms/services/templates.service.mjs +13 -12
- package/esm2020/cms/types/index.mjs +1 -2
- package/esm2020/cms/utils/element-metadata-worker.mjs +31 -0
- package/esm2020/cms/utils/elements-resolver.mjs +14 -28
- package/esm2020/cms/utils/index.mjs +4 -1
- package/esm2020/cms/utils/path.utils.mjs +3 -3
- package/esm2020/cms/utils/transpilation-worker.mjs +52 -0
- package/esm2020/cms/vendor-map.mjs +18 -6
- package/esm2020/core/core.module.mjs +16 -9
- 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 +9 -25
- package/esm2020/core/modules/configuration/helpers.mjs +28 -3
- package/esm2020/core/modules/configuration/index.mjs +2 -2
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +11 -14
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +299 -0
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +70 -47
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +9 -9
- package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
- package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +8 -8
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +13 -10
- 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 +34 -7
- package/esm2020/core/services/flow-info.service.mjs +99 -0
- package/esm2020/core/services/flow-state-configuration.service.mjs +53 -0
- package/esm2020/core/services/flow-state.service.mjs +502 -0
- package/esm2020/core/services/index.mjs +5 -2
- package/esm2020/core/services/integration.state.mjs +36 -0
- package/esm2020/core/services/product-images.service.mjs +6 -7
- package/esm2020/core/services/quote-draft.service.mjs +33 -9
- package/esm2020/core/services/runtime-settings.service.mjs +21 -7
- 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/core/utils/line-item.utils.mjs +30 -15
- 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 +51 -51
- 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 +39 -45
- 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 +24 -33
- package/esm2020/src/flow.module.mjs +11 -9
- package/esm2020/src/guards/context.guard.mjs +9 -14
- package/esm2020/src/guards/flow.guard.mjs +37 -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 +24 -14
- package/esm2020/src/pages/product/product.module.mjs +4 -4
- package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +8 -5
- package/esm2020/src/pages/record-not-found/record-not-found.module.mjs +4 -4
- package/esm2020/src/pages/remote/remote.component.mjs +20 -20
- 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 +39 -51
- package/esm2020/src/resolvers/quote.resolver.mjs +57 -65
- package/esm2020/src/services/doc-gen.service.mjs +7 -6
- package/esm2020/src/services/flow-dialog.service.mjs +23 -8
- package/esm2020/src/services/flow-router.service.mjs +59 -18
- package/esm2020/src/services/flow.service.mjs +72 -25
- package/esm2020/src/services/guided-selling.service.mjs +8 -7
- 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 +355 -271
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +1639 -781
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +828 -1541
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +357 -283
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +1780 -958
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +888 -1599
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +7 -14
- package/src/components/doc-gen/doc-gen.component.d.ts +8 -9
- 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 +6 -8
- package/src/configure-primeng.d.ts +1 -0
- package/src/flow-routing.module.d.ts +6 -7
- package/src/flow.component.d.ts +7 -11
- 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 +7 -6
- package/src/pages/record-not-found/record-not-found.component.d.ts +2 -0
- package/src/pages/remote/remote.component.d.ts +2 -3
- 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 +7 -12
- package/src/services/doc-gen.service.d.ts +1 -1
- package/src/services/flow-dialog.service.d.ts +5 -2
- package/src/services/flow-router.service.d.ts +7 -3
- package/src/services/flow.service.d.ts +10 -4
- 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/core/modules/configuration/services/configuration.state.d.ts +0 -30
- package/core/services/metric-calculation/metric-calculation.service.d.ts +0 -25
- package/core/services/metric-calculation/metric-calculation.types.d.ts +0 -1
- package/core/services/metric-calculation/metric-calculation.utils.d.ts +0 -5
- package/esm2020/cms/services/integration.state.mjs +0 -37
- package/esm2020/cms/types/integration.types.mjs +0 -2
- package/esm2020/core/modules/configuration/services/configuration.state.mjs +0 -142
- package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +0 -85
- package/esm2020/core/services/metric-calculation/metric-calculation.types.mjs +0 -2
- package/esm2020/core/services/metric-calculation/metric-calculation.utils.mjs +0 -42
- 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 { extractElementMetadata, extendElementMetadata, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
|
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 { BehaviorSubject, Subject, first, tap, takeUntil, 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 { mapShoppingCartSettings, getMaxRenewalTermsValue, UITemplateType, SalesforceIdUtils, ConfigurationContextMode, isVeloceError, extractErrorDetails, 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,21 +75,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
93
75
|
}]
|
94
76
|
}] });
|
95
77
|
|
96
|
-
const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
|
97
|
-
|
98
78
|
class DocGenComponent {
|
99
|
-
constructor(
|
100
|
-
this.quoteDraftService = quoteDraftService;
|
101
|
-
this.contextService = contextService;
|
79
|
+
constructor(templatesApi, contextService, flowStateService, flowInfo, toastService, customizationService) {
|
102
80
|
this.templatesApi = templatesApi;
|
81
|
+
this.contextService = contextService;
|
82
|
+
this.flowStateService = flowStateService;
|
83
|
+
this.flowInfo = flowInfo;
|
103
84
|
this.toastService = toastService;
|
104
85
|
this.customizationService = customizationService;
|
105
86
|
this.uiDefinition$ = new BehaviorSubject(null);
|
106
87
|
this.templateApiName = '';
|
107
88
|
this.destroy$ = new Subject();
|
108
|
-
//
|
109
|
-
this.
|
110
|
-
.
|
89
|
+
// wait until flow is initialized
|
90
|
+
this.flowStateService
|
91
|
+
.isInitialized$()
|
92
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
111
93
|
.subscribe();
|
112
94
|
}
|
113
95
|
ngOnDestroy() {
|
@@ -115,7 +97,7 @@ class DocGenComponent {
|
|
115
97
|
this.destroy$.complete();
|
116
98
|
}
|
117
99
|
initialize() {
|
118
|
-
this.templateApiName = this.
|
100
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates?.docGen ?? '';
|
119
101
|
this.generateUIDefinition$()
|
120
102
|
.pipe(tap(uiDef => {
|
121
103
|
if (!uiDef) {
|
@@ -129,78 +111,78 @@ class DocGenComponent {
|
|
129
111
|
}), takeUntil(this.destroy$))
|
130
112
|
.subscribe();
|
131
113
|
}
|
132
|
-
|
133
|
-
|
134
|
-
.fetchComponents$(template.id)
|
135
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
136
|
-
}
|
137
|
-
getLocalTemplateComponentMeta$() {
|
138
|
-
if (!this.customizationService?.getTemplateComponent) {
|
114
|
+
getLocalMeta$() {
|
115
|
+
if (!this.customizationService?.getTemplateComponents) {
|
139
116
|
return of(undefined);
|
140
117
|
}
|
141
|
-
return this.customizationService?.
|
142
|
-
if (!
|
118
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
119
|
+
if (!components) {
|
143
120
|
return;
|
144
121
|
}
|
145
|
-
return {
|
122
|
+
return components.map(component => ({
|
146
123
|
html: component.html,
|
147
124
|
css: component.css,
|
148
125
|
js: component.js,
|
149
126
|
json: component.json,
|
150
|
-
};
|
127
|
+
}));
|
151
128
|
}));
|
152
129
|
}
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
return
|
157
|
-
}
|
130
|
+
getOrgMeta$() {
|
131
|
+
const template = this.flowInfo.templates.DOCGEN;
|
132
|
+
if (!template) {
|
133
|
+
return of(undefined);
|
134
|
+
}
|
135
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
158
136
|
}
|
159
137
|
generateUIDefinition$() {
|
160
138
|
return of(undefined).pipe(tap(() => {
|
161
139
|
if (!this.templateApiName) {
|
162
|
-
throw new Error("Flow
|
140
|
+
throw new Error("Flow 'docGen' template is not defined.");
|
163
141
|
}
|
164
|
-
}), switchMap(() => this.
|
165
|
-
if (!
|
142
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
143
|
+
if (!metaList) {
|
166
144
|
return;
|
167
145
|
}
|
168
146
|
const headerId = this.contextService.resolve().properties.Id ?? null;
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
147
|
+
const patchedMetaList = metaList.map(component => {
|
148
|
+
if (!component.js) {
|
149
|
+
return component;
|
150
|
+
}
|
151
|
+
const metadata = extractElementMetadata(component.js);
|
152
|
+
const script = extendElementMetadata(component.js, {
|
173
153
|
inputs: {
|
174
154
|
...metadata.inputs,
|
175
155
|
Id: headerId ? `"${headerId}"` : null,
|
176
156
|
},
|
177
157
|
});
|
178
|
-
|
158
|
+
return {
|
159
|
+
...component,
|
160
|
+
js: script,
|
161
|
+
};
|
162
|
+
});
|
179
163
|
const uiDef = {
|
180
164
|
name: '',
|
181
165
|
createdTimestamp: 0,
|
182
166
|
primary: true,
|
183
167
|
type: 'DEFAULT',
|
184
168
|
version: 2,
|
185
|
-
children:
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
},
|
192
|
-
],
|
169
|
+
children: patchedMetaList.map(child => ({
|
170
|
+
children: [],
|
171
|
+
template: child.html && btoaSafe(child.html),
|
172
|
+
script: child.js && btoaSafe(child.js),
|
173
|
+
styles: child.css && btoaSafe(child.css),
|
174
|
+
})),
|
193
175
|
};
|
194
176
|
return uiDef;
|
195
177
|
}));
|
196
178
|
}
|
197
179
|
}
|
198
|
-
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
199
|
-
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
180
|
+
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 });
|
181
|
+
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 });
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
|
201
183
|
type: Component,
|
202
184
|
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"] }]
|
203
|
-
}], ctorParameters: function () { return [{ type: i1$1.
|
185
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.ContextService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
204
186
|
type: Optional
|
205
187
|
}, {
|
206
188
|
type: Inject,
|
@@ -209,10 +191,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
209
191
|
|
210
192
|
class DocGenModule {
|
211
193
|
}
|
212
|
-
DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
213
|
-
DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
214
|
-
DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
194
|
+
DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
195
|
+
DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
|
196
|
+
DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, decorators: [{
|
216
198
|
type: NgModule,
|
217
199
|
args: [{
|
218
200
|
declarations: [DocGenComponent],
|
@@ -222,18 +204,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
222
204
|
}] });
|
223
205
|
|
224
206
|
class GuidedSellingComponent {
|
225
|
-
constructor(
|
226
|
-
this.quoteDraftService = quoteDraftService;
|
227
|
-
this.contextService = contextService;
|
207
|
+
constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
|
228
208
|
this.templatesApi = templatesApi;
|
209
|
+
this.flowStateService = flowStateService;
|
210
|
+
this.flowInfo = flowInfo;
|
229
211
|
this.toastService = toastService;
|
230
212
|
this.customizationService = customizationService;
|
231
213
|
this.uiDefinition$ = new BehaviorSubject(null);
|
232
214
|
this.templateApiName = '';
|
233
215
|
this.destroy$ = new Subject();
|
234
|
-
//
|
235
|
-
this.
|
236
|
-
.
|
216
|
+
// wait until flow is initialized
|
217
|
+
this.flowStateService
|
218
|
+
.isInitialized$()
|
219
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
237
220
|
.subscribe();
|
238
221
|
}
|
239
222
|
ngOnDestroy() {
|
@@ -241,7 +224,7 @@ class GuidedSellingComponent {
|
|
241
224
|
this.destroy$.complete();
|
242
225
|
}
|
243
226
|
initialize() {
|
244
|
-
this.templateApiName = this.
|
227
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates?.guidedSelling ?? '';
|
245
228
|
this.generateUIDefinition$()
|
246
229
|
.pipe(tap(uiDef => {
|
247
230
|
if (!uiDef) {
|
@@ -255,40 +238,36 @@ class GuidedSellingComponent {
|
|
255
238
|
}), takeUntil(this.destroy$))
|
256
239
|
.subscribe();
|
257
240
|
}
|
258
|
-
|
259
|
-
|
260
|
-
.fetchComponents$(template.id)
|
261
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
262
|
-
}
|
263
|
-
getLocalTemplateComponentMeta$() {
|
264
|
-
if (!this.customizationService?.getTemplateComponent) {
|
241
|
+
getLocalMeta$() {
|
242
|
+
if (!this.customizationService?.getTemplateComponents) {
|
265
243
|
return of(undefined);
|
266
244
|
}
|
267
|
-
return this.customizationService?.
|
268
|
-
if (!
|
245
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
246
|
+
if (!components) {
|
269
247
|
return;
|
270
248
|
}
|
271
|
-
return {
|
249
|
+
return components.map(component => ({
|
272
250
|
html: component.html,
|
273
251
|
css: component.css,
|
274
252
|
js: component.js,
|
275
253
|
json: component.json,
|
276
|
-
};
|
254
|
+
}));
|
277
255
|
}));
|
278
256
|
}
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
return
|
283
|
-
}
|
257
|
+
getOrgMeta$() {
|
258
|
+
const template = this.flowInfo.templates.GUIDED_SELLING;
|
259
|
+
if (!template) {
|
260
|
+
return of(undefined);
|
261
|
+
}
|
262
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
284
263
|
}
|
285
264
|
generateUIDefinition$() {
|
286
265
|
return of(undefined).pipe(tap(() => {
|
287
266
|
if (!this.templateApiName) {
|
288
|
-
throw new Error("Flow
|
267
|
+
throw new Error("Flow 'guidedSelling' template is not defined.");
|
289
268
|
}
|
290
|
-
}), switchMap(() => this.
|
291
|
-
if (!
|
269
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
270
|
+
if (!metaList) {
|
292
271
|
return;
|
293
272
|
}
|
294
273
|
const uiDef = {
|
@@ -297,25 +276,23 @@ class GuidedSellingComponent {
|
|
297
276
|
primary: true,
|
298
277
|
type: 'DEFAULT',
|
299
278
|
version: 2,
|
300
|
-
children:
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
},
|
307
|
-
],
|
279
|
+
children: metaList.map(meta => ({
|
280
|
+
children: [],
|
281
|
+
template: meta.html && btoaSafe(meta.html),
|
282
|
+
script: meta.js && btoaSafe(meta.js),
|
283
|
+
styles: meta.css && btoaSafe(meta.css),
|
284
|
+
})),
|
308
285
|
};
|
309
286
|
return uiDef;
|
310
287
|
}));
|
311
288
|
}
|
312
289
|
}
|
313
|
-
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
314
|
-
GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
290
|
+
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 });
|
291
|
+
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 });
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
|
316
293
|
type: Component,
|
317
294
|
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"] }]
|
318
|
-
}], ctorParameters: function () { return [{ type: i1$1.
|
295
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
319
296
|
type: Optional
|
320
297
|
}, {
|
321
298
|
type: Inject,
|
@@ -324,10 +301,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
324
301
|
|
325
302
|
class GuidedSellingModule {
|
326
303
|
}
|
327
|
-
GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
328
|
-
GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
329
|
-
GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
330
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
304
|
+
GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
305
|
+
GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, declarations: [GuidedSellingComponent], imports: [CommonModule, PreviewModule], exports: [GuidedSellingComponent] });
|
306
|
+
GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, imports: [CommonModule, PreviewModule] });
|
307
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, decorators: [{
|
331
308
|
type: NgModule,
|
332
309
|
args: [{
|
333
310
|
declarations: [GuidedSellingComponent],
|
@@ -336,288 +313,121 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
336
313
|
}]
|
337
314
|
}] });
|
338
315
|
|
339
|
-
class
|
340
|
-
constructor(
|
341
|
-
this.
|
342
|
-
this.
|
343
|
-
this.
|
344
|
-
this.
|
345
|
-
this.
|
346
|
-
this.
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
};
|
355
|
-
this.getLastChildRouteSnapshot = (route) => {
|
356
|
-
return route.firstChild ? this.getLastChildRouteSnapshot(route.firstChild) : route;
|
357
|
-
};
|
358
|
-
this.watchLastChildRoute$ = (route) => {
|
359
|
-
return this.routeChange$.pipe(map(() => this.getLastChildRouteSnapshot(route.snapshot)));
|
360
|
-
};
|
361
|
-
this.getLastChildParams = (route) => {
|
362
|
-
return route.firstChild ? this.getLastChildParams(route.firstChild) : route.params;
|
363
|
-
};
|
364
|
-
this.watchLastChildParams$ = (route) => {
|
365
|
-
return this.routeChange$.pipe(map(() => this.getLastChildParams(route.snapshot)));
|
366
|
-
};
|
367
|
-
this.getFlowSubpath$ = () => {
|
368
|
-
return this.route$.pipe(map(route => {
|
369
|
-
const url = route.url.join('/');
|
370
|
-
const flowRootUrl = this.getFlowRootPath(route);
|
371
|
-
return url.replace(flowRootUrl, '');
|
372
|
-
}));
|
373
|
-
};
|
374
|
-
this.routeChange$ = this.router.events.pipe(filter(e => e instanceof NavigationEnd), shareReplay());
|
375
|
-
this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(startWith(this.getLastChildParams(this.route.snapshot)), shareReplay());
|
376
|
-
this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), shareReplay());
|
377
|
-
this.loading$ = this.router.events.pipe(filter(e => e instanceof NavigationStart ||
|
378
|
-
e instanceof NavigationCancel ||
|
379
|
-
e instanceof NavigationEnd ||
|
380
|
-
e instanceof NavigationError), map(e => e instanceof NavigationStart), startWith(false), distinctUntilChanged());
|
381
|
-
this.routeChange$.subscribe(() => {
|
382
|
-
this.urlHistory.push(this.router.url);
|
383
|
-
// Close Guided Selling when user navigates to another flow page
|
384
|
-
this.integrationState.dispatch(FlowAction.CloseGuidedSelling({ keepState: true }));
|
385
|
-
});
|
386
|
-
}
|
387
|
-
getFlowRootRoute(route) {
|
388
|
-
const path = [...route.pathFromRoot];
|
389
|
-
while (path.length) {
|
390
|
-
const parent = path.pop();
|
391
|
-
if (!parent) {
|
392
|
-
break;
|
393
|
-
}
|
394
|
-
if (parent.routeConfig?.id === VELOCE_FLOW_ROOT_ROUTE) {
|
395
|
-
return parent;
|
396
|
-
}
|
397
|
-
}
|
398
|
-
return;
|
399
|
-
}
|
400
|
-
getFlowRootPath(route) {
|
401
|
-
const rootRoute = this.getFlowRootRoute(route);
|
402
|
-
if (!rootRoute) {
|
403
|
-
return '';
|
404
|
-
}
|
405
|
-
const path = rootRoute.pathFromRoot
|
406
|
-
.map(r => r.routeConfig?.path)
|
407
|
-
.filter(Boolean)
|
408
|
-
.join('/');
|
409
|
-
return '/' + path;
|
410
|
-
}
|
411
|
-
get route$() {
|
412
|
-
return this.lastChildRoute$;
|
413
|
-
}
|
414
|
-
get params$() {
|
415
|
-
return this.lastChildParams$;
|
416
|
-
}
|
417
|
-
isConfigurationRoute$() {
|
418
|
-
return this.getFlowSubpath$().pipe(map(url => url.startsWith('product')));
|
419
|
-
}
|
420
|
-
isCartRoute$() {
|
421
|
-
return this.getFlowSubpath$().pipe(map(url => url.startsWith('cart')));
|
316
|
+
class FlowHeaderComponent {
|
317
|
+
constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
|
318
|
+
this.templatesApi = templatesApi;
|
319
|
+
this.flowStateService = flowStateService;
|
320
|
+
this.flowInfo = flowInfo;
|
321
|
+
this.toastService = toastService;
|
322
|
+
this.customizationService = customizationService;
|
323
|
+
this.uiDefinition$ = new BehaviorSubject(null);
|
324
|
+
this.templateApiName = '';
|
325
|
+
this.destroy$ = new Subject();
|
326
|
+
// wait until flow is initialized
|
327
|
+
this.flowStateService
|
328
|
+
.isInitialized$()
|
329
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
330
|
+
.subscribe();
|
422
331
|
}
|
423
|
-
|
424
|
-
|
332
|
+
ngOnDestroy() {
|
333
|
+
this.destroy$.next();
|
334
|
+
this.destroy$.complete();
|
425
335
|
}
|
426
|
-
|
427
|
-
|
336
|
+
initialize() {
|
337
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates?.flowHeader ?? '';
|
338
|
+
this.generateUIDefinition$()
|
339
|
+
.pipe(tap(uiDef => {
|
340
|
+
if (!uiDef) {
|
341
|
+
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
342
|
+
}
|
343
|
+
this.uiDefinition$.next(uiDef);
|
344
|
+
}), catchError(err => {
|
345
|
+
const message = 'Failed to resolve Flow Header component. ' + (err.message ?? '');
|
346
|
+
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
347
|
+
return of();
|
348
|
+
}), takeUntil(this.destroy$))
|
349
|
+
.subscribe();
|
428
350
|
}
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
this.router.navigateByUrl(prevUrl);
|
351
|
+
getLocalMeta$() {
|
352
|
+
if (!this.customizationService?.getTemplateComponents) {
|
353
|
+
return of(undefined);
|
433
354
|
}
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
438
|
-
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
439
|
-
this.router.navigate([flowRouteUrl, 'product'], {
|
440
|
-
queryParams: { ...routeSnapshot.queryParams, productId },
|
441
|
-
});
|
442
|
-
}
|
443
|
-
navigateToShoppingCart() {
|
444
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
445
|
-
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
446
|
-
this.router.navigate([flowRouteUrl, 'cart'], { queryParams: routeSnapshot.queryParams });
|
447
|
-
}
|
448
|
-
navigateToCatalog() {
|
449
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
450
|
-
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
451
|
-
this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
|
452
|
-
}
|
453
|
-
navigateToAssets() {
|
454
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
455
|
-
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
456
|
-
this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
|
457
|
-
}
|
458
|
-
switchObject(id) {
|
459
|
-
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
460
|
-
const route = this.getLastChildRoute(this.route);
|
461
|
-
const objName = SalesforceIdUtils.getSfObjectNameById(id);
|
462
|
-
const queryParams = {
|
463
|
-
quoteId: objName === 'Quote' ? id : undefined,
|
464
|
-
accountId: objName === 'Account' ? id : undefined,
|
465
|
-
orderId: objName === 'Order' ? id : undefined,
|
466
|
-
};
|
467
|
-
this.router.navigate([], { relativeTo: route, queryParams: { ...routeSnapshot.queryParams, ...queryParams } });
|
468
|
-
}
|
469
|
-
}
|
470
|
-
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 });
|
471
|
-
FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
|
472
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowRouterService, decorators: [{
|
473
|
-
type: Injectable,
|
474
|
-
args: [{ providedIn: 'root' }]
|
475
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i1$1.ContextService }, { type: i5.IntegrationState }]; } });
|
476
|
-
|
477
|
-
class CartPreviewComponent {
|
478
|
-
constructor(flowConfiguration, routerService, productImagesService, quoteDraftService) {
|
479
|
-
this.flowConfiguration = flowConfiguration;
|
480
|
-
this.routerService = routerService;
|
481
|
-
this.productImagesService = productImagesService;
|
482
|
-
this.quoteDraftService = quoteDraftService;
|
483
|
-
this.productRowHeight = 65;
|
484
|
-
this.form = new FormGroup({});
|
485
|
-
this.hasTermInProducts = false;
|
486
|
-
this.scrollHeight = 0;
|
487
|
-
this.shouldUpdate$ = new BehaviorSubject(true);
|
488
|
-
this.destroyed$ = new Subject();
|
489
|
-
this.lockedProductId$ = combineLatest([this.routerService.route$, this.routerService.isConfigurationRoute$()]).pipe(map(([route, isConfigurationRoute]) => {
|
490
|
-
if (!isConfigurationRoute) {
|
491
|
-
return null;
|
355
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
356
|
+
if (!components) {
|
357
|
+
return;
|
492
358
|
}
|
493
|
-
return
|
359
|
+
return components.map(component => ({
|
360
|
+
html: component.html,
|
361
|
+
css: component.css,
|
362
|
+
js: component.js,
|
363
|
+
json: component.json,
|
364
|
+
}));
|
494
365
|
}));
|
495
|
-
this.isEditMode$ = this.quoteDraftService.isEditMode$();
|
496
|
-
}
|
497
|
-
ngOnChanges(changes) {
|
498
|
-
const { products } = changes;
|
499
|
-
if (products) {
|
500
|
-
this.shouldUpdate$.next(true);
|
501
|
-
this.scrollHeight = Math.min(this.products.length * this.productRowHeight, 460);
|
502
|
-
}
|
503
|
-
}
|
504
|
-
ngAfterViewInit() {
|
505
|
-
combineLatest([this.lockedProductId$, this.isEditMode$, this.shouldUpdate$, this.overlayPanel.onShow])
|
506
|
-
.pipe(filter(() => this.overlayPanel.overlayVisible), takeUntil(this.destroyed$))
|
507
|
-
.subscribe(([lockedProductId, isEditMode]) => this.updateControls(this.products, isEditMode, lockedProductId));
|
508
|
-
}
|
509
|
-
ngOnDestroy() {
|
510
|
-
this.destroyed$.next();
|
511
|
-
this.destroyed$.complete();
|
512
|
-
}
|
513
|
-
getImageUrl(productId) {
|
514
|
-
return this.productImagesService.getImageUrl$(productId);
|
515
|
-
}
|
516
|
-
navigateToProductConfiguration(productId, lineItemId) {
|
517
|
-
this.overlayPanel.hide();
|
518
|
-
this.routerService.navigateToProductConfiguration(productId, lineItemId);
|
519
366
|
}
|
520
|
-
|
521
|
-
const
|
522
|
-
if (!
|
523
|
-
return;
|
367
|
+
getOrgMeta$() {
|
368
|
+
const template = this.flowInfo.templates.FLOW_HEADER;
|
369
|
+
if (!template) {
|
370
|
+
return of(undefined);
|
524
371
|
}
|
525
|
-
this.
|
526
|
-
{
|
527
|
-
dataType: 'LINEITEM',
|
528
|
-
attributeType: 'QTY',
|
529
|
-
id: product.id,
|
530
|
-
newValue: control.value,
|
531
|
-
},
|
532
|
-
]);
|
372
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
533
373
|
}
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
const productIds = this.products.map(product => product.id);
|
539
|
-
this.flowConfiguration.delete(productIds);
|
540
|
-
}
|
541
|
-
updateControls(products, isEditMode, lockedProductId) {
|
542
|
-
const ids = [];
|
543
|
-
products.forEach(item => {
|
544
|
-
if (!item.id) {
|
545
|
-
return;
|
546
|
-
}
|
547
|
-
ids.push(item.id);
|
548
|
-
let control = this.form.get(item.id);
|
549
|
-
if (!control) {
|
550
|
-
control = new FormControl(item.qty, []);
|
551
|
-
this.form.addControl(item.id, control);
|
552
|
-
}
|
553
|
-
else {
|
554
|
-
control.setValue(item.qty);
|
555
|
-
}
|
556
|
-
if (!isEditMode || item.deleted || item.productId === lockedProductId) {
|
557
|
-
control.disable();
|
374
|
+
generateUIDefinition$() {
|
375
|
+
return of(undefined).pipe(tap(() => {
|
376
|
+
if (!this.templateApiName) {
|
377
|
+
throw new Error("Flow 'flowHeader' template is not defined.");
|
558
378
|
}
|
559
|
-
|
560
|
-
|
379
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
380
|
+
if (!metaList) {
|
381
|
+
return;
|
561
382
|
}
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
383
|
+
const uiDef = {
|
384
|
+
name: '',
|
385
|
+
createdTimestamp: 0,
|
386
|
+
primary: true,
|
387
|
+
type: 'DEFAULT',
|
388
|
+
version: 2,
|
389
|
+
children: metaList.map(meta => ({
|
390
|
+
children: [],
|
391
|
+
template: meta.html && btoaSafe(meta.html),
|
392
|
+
script: meta.js && btoaSafe(meta.js),
|
393
|
+
styles: meta.css && btoaSafe(meta.css),
|
394
|
+
})),
|
395
|
+
};
|
396
|
+
return uiDef;
|
397
|
+
}));
|
566
398
|
}
|
567
399
|
}
|
568
|
-
|
569
|
-
|
570
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
400
|
+
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 });
|
401
|
+
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 });
|
402
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
571
403
|
type: Component,
|
572
|
-
args: [{ selector: 'vl-
|
573
|
-
}], ctorParameters: function () { return [{ type: i1$1.
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
404
|
+
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"] }]
|
405
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
406
|
+
type: Optional
|
407
|
+
}, {
|
408
|
+
type: Inject,
|
409
|
+
args: [FLOW_CUSTOMIZATION]
|
410
|
+
}] }]; } });
|
579
411
|
|
580
|
-
class
|
412
|
+
class FlowNewHeaderModule {
|
581
413
|
}
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
OverlayPanelModule,
|
587
|
-
LetDirectiveModule,
|
588
|
-
InputNumberModule,
|
589
|
-
VirtualScrollerModule,
|
590
|
-
QuantityControlModule], exports: [CartPreviewComponent] });
|
591
|
-
CartPreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, imports: [CommonModule,
|
592
|
-
ReactiveFormsModule,
|
593
|
-
ButtonModule,
|
594
|
-
OverlayPanelModule,
|
595
|
-
LetDirectiveModule,
|
596
|
-
InputNumberModule,
|
597
|
-
VirtualScrollerModule,
|
598
|
-
QuantityControlModule] });
|
599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: CartPreviewModule, decorators: [{
|
414
|
+
FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
415
|
+
FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
|
416
|
+
FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
|
417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
|
600
418
|
type: NgModule,
|
601
419
|
args: [{
|
602
|
-
declarations: [
|
603
|
-
imports: [
|
604
|
-
|
605
|
-
ReactiveFormsModule,
|
606
|
-
ButtonModule,
|
607
|
-
OverlayPanelModule,
|
608
|
-
LetDirectiveModule,
|
609
|
-
InputNumberModule,
|
610
|
-
VirtualScrollerModule,
|
611
|
-
QuantityControlModule,
|
612
|
-
],
|
613
|
-
exports: [CartPreviewComponent],
|
420
|
+
declarations: [FlowHeaderComponent],
|
421
|
+
imports: [CommonModule, PreviewModule],
|
422
|
+
exports: [FlowHeaderComponent],
|
614
423
|
}]
|
615
424
|
}] });
|
616
425
|
|
617
426
|
class FlowDialogService {
|
618
|
-
constructor(dialogService, contextService) {
|
427
|
+
constructor(dialogService, contextService, runtimeSettings) {
|
619
428
|
this.dialogService = dialogService;
|
620
429
|
this.contextService = contextService;
|
430
|
+
this.runtimeSettings = runtimeSettings;
|
621
431
|
}
|
622
432
|
show(config) {
|
623
433
|
return this.dialogService.open(FlowDialogComponent, {
|
@@ -639,7 +449,7 @@ class FlowDialogService {
|
|
639
449
|
}
|
640
450
|
showReadonlyModeDialog() {
|
641
451
|
const ctx = this.contextService.resolve();
|
642
|
-
const objectName = ctx.mode ? ctx.mode[0]
|
452
|
+
const objectName = ctx.mode ? ctx.mode[0]?.toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
|
643
453
|
return this.show({
|
644
454
|
title: 'Error',
|
645
455
|
description: `${objectName} Cannot be Saved`,
|
@@ -726,682 +536,222 @@ class FlowDialogService {
|
|
726
536
|
secondaryButton: 'Cancel',
|
727
537
|
});
|
728
538
|
}
|
539
|
+
showTermsLimitReachedDialog() {
|
540
|
+
const shoppingCartSettings = mapShoppingCartSettings(this.runtimeSettings.getShoppingCartSettings() || []);
|
541
|
+
const maxRenewalTerms = getMaxRenewalTermsValue(shoppingCartSettings);
|
542
|
+
return this.show({
|
543
|
+
title: 'Terms Limit Reached',
|
544
|
+
description: `You have reached the term quantity limit: ${maxRenewalTerms}. You can increase the limit in the Shopping Cart Settings.`,
|
545
|
+
primaryButton: 'Ok',
|
546
|
+
});
|
547
|
+
}
|
548
|
+
showDialog(dialog) {
|
549
|
+
const dialogFunction = this[dialog].bind(this);
|
550
|
+
return dialogFunction(dialog);
|
551
|
+
}
|
729
552
|
}
|
730
|
-
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
731
|
-
FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
732
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
553
|
+
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
554
|
+
FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
|
555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
|
733
556
|
type: Injectable
|
734
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type:
|
557
|
+
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
|
735
558
|
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
559
|
+
class FlowRouterService {
|
560
|
+
constructor(router, route, contextService, integrationState, flowInfoService, flowStateService) {
|
561
|
+
this.router = router;
|
562
|
+
this.route = route;
|
740
563
|
this.contextService = contextService;
|
741
|
-
this.
|
742
|
-
this.
|
743
|
-
this.
|
744
|
-
this.
|
745
|
-
this.
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
this.
|
755
|
-
|
756
|
-
|
757
|
-
this.
|
758
|
-
|
759
|
-
|
760
|
-
this.
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
this.
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
this.
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
this.
|
782
|
-
|
783
|
-
|
784
|
-
.subscribe(() => {
|
785
|
-
this.collectAvailableMetrics();
|
786
|
-
});
|
787
|
-
this.searchControl.valueChanges.pipe(takeUntil$1(this.destroyed$), startWith('')).subscribe(query => {
|
788
|
-
this.filteredMetrics = this.metrics.filter(({ name }) => {
|
789
|
-
return (name || '').toLowerCase().includes(query?.toLowerCase());
|
790
|
-
});
|
564
|
+
this.integrationState = integrationState;
|
565
|
+
this.flowInfoService = flowInfoService;
|
566
|
+
this.flowStateService = flowStateService;
|
567
|
+
this.urlHistory = [];
|
568
|
+
this.getLastChildRoute = (route) => {
|
569
|
+
return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;
|
570
|
+
};
|
571
|
+
this.getNthChildRoute = (route, index) => {
|
572
|
+
if (index <= 0) {
|
573
|
+
return route;
|
574
|
+
}
|
575
|
+
return route.firstChild ? this.getNthChildRoute(route.firstChild, index - 1) : route;
|
576
|
+
};
|
577
|
+
this.getLastChildRouteSnapshot = (route) => {
|
578
|
+
return route.firstChild ? this.getLastChildRouteSnapshot(route.firstChild) : route;
|
579
|
+
};
|
580
|
+
this.watchLastChildRoute$ = (route) => {
|
581
|
+
return this.routeChange$.pipe(map(() => this.getLastChildRouteSnapshot(route.snapshot)));
|
582
|
+
};
|
583
|
+
this.getLastChildParams = (route) => {
|
584
|
+
return route.firstChild ? this.getLastChildParams(route.firstChild) : route.params;
|
585
|
+
};
|
586
|
+
this.watchLastChildParams$ = (route) => {
|
587
|
+
return this.routeChange$.pipe(map(() => this.getLastChildParams(route.snapshot)));
|
588
|
+
};
|
589
|
+
this.getFlowSubpath$ = () => {
|
590
|
+
return this.route$.pipe(map(route => {
|
591
|
+
const url = route.url.join('/');
|
592
|
+
const flowRootUrl = this.getFlowRootPath(route);
|
593
|
+
return url.replace(flowRootUrl, '');
|
594
|
+
}));
|
595
|
+
};
|
596
|
+
this.routeChange$ = this.router.events.pipe(filter(e => e instanceof NavigationEnd), shareReplay());
|
597
|
+
this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(startWith(this.getLastChildParams(this.route.snapshot)), shareReplay());
|
598
|
+
this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), shareReplay());
|
599
|
+
this.loading$ = this.router.events.pipe(filter(e => e instanceof NavigationStart ||
|
600
|
+
e instanceof NavigationCancel ||
|
601
|
+
e instanceof NavigationEnd ||
|
602
|
+
e instanceof NavigationError), map(e => e instanceof NavigationStart), startWith(false), distinctUntilChanged());
|
603
|
+
this.routeChange$.subscribe(() => {
|
604
|
+
this.urlHistory.push(this.router.url);
|
605
|
+
// Close Guided Selling when user navigates to another flow page
|
606
|
+
this.integrationState.dispatch(FlowAction.CloseGuidedSelling({ keepState: true }));
|
791
607
|
});
|
792
|
-
this.metricsCalculationService.onMetricsUpdate$
|
793
|
-
.pipe(takeUntil$1(this.destroyed$))
|
794
|
-
.subscribe(() => this.cdr.detectChanges());
|
795
608
|
}
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
if (
|
804
|
-
|
609
|
+
getFlowRootRoute(route) {
|
610
|
+
const path = [...route.pathFromRoot];
|
611
|
+
while (path.length) {
|
612
|
+
const parent = path.pop();
|
613
|
+
if (!parent) {
|
614
|
+
break;
|
615
|
+
}
|
616
|
+
if (parent.routeConfig?.id === VELOCE_FLOW_ROOT_ROUTE) {
|
617
|
+
return parent;
|
805
618
|
}
|
806
|
-
overlay.toggle(event, target);
|
807
|
-
}
|
808
|
-
else {
|
809
|
-
this.openSidebar();
|
810
|
-
}
|
811
|
-
}
|
812
|
-
openSidebar() {
|
813
|
-
this.overlayPanel.hide();
|
814
|
-
this.sidebarVisible = true;
|
815
|
-
}
|
816
|
-
closeSidebar() {
|
817
|
-
this.sidebarVisible = false;
|
818
|
-
this.metrics = cloneDeep(this.lastSavedMetrics);
|
819
|
-
this.editingMetric = undefined;
|
820
|
-
this.searchControl.setValue('');
|
821
|
-
}
|
822
|
-
getMetricValue(key) {
|
823
|
-
const context = this.contextService.resolve();
|
824
|
-
if (key.startsWith('Effective_')) {
|
825
|
-
const correctKey = key.replace('Effective_', '');
|
826
|
-
return this.toNumber(context.properties[correctKey]) - this.toNumber(context.properties[`Previous${correctKey}`]);
|
827
|
-
}
|
828
|
-
else {
|
829
|
-
return this.metricsCalculationService.getMetricValue(key);
|
830
|
-
}
|
831
|
-
}
|
832
|
-
save() {
|
833
|
-
localStorage.setItem(METRICS_STORAGE_KEY, JSON.stringify(this.metrics));
|
834
|
-
this.setMetrics();
|
835
|
-
this.lastSavedMetrics = cloneDeep(this.metrics);
|
836
|
-
this.closeSidebar();
|
837
|
-
}
|
838
|
-
changeMetricOrder(event) {
|
839
|
-
moveItemInArray(this.metrics, event.previousIndex, event.currentIndex);
|
840
|
-
this.filteredMetrics = this.metrics;
|
841
|
-
}
|
842
|
-
editMetric(metric) {
|
843
|
-
if (this.editingMetric && this.nameControl.invalid) {
|
844
|
-
return;
|
845
619
|
}
|
846
|
-
|
847
|
-
this.nameControl.setValue(metric.name);
|
620
|
+
return;
|
848
621
|
}
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
if (this.editingMetric) {
|
854
|
-
this.editingMetric.name = this.nameControl.value?.trim();
|
622
|
+
getFlowRootPath(route) {
|
623
|
+
const rootRoute = this.getFlowRootRoute(route);
|
624
|
+
if (!rootRoute) {
|
625
|
+
return '';
|
855
626
|
}
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
resetToDefault() {
|
862
|
-
this.collectAvailableMetrics(true);
|
863
|
-
}
|
864
|
-
onFocus() {
|
865
|
-
this.isFocused = true;
|
866
|
-
}
|
867
|
-
onBlur() {
|
868
|
-
this.isFocused = false;
|
869
|
-
}
|
870
|
-
clearSearch(event) {
|
871
|
-
event.stopPropagation();
|
872
|
-
this.searchControl.setValue('');
|
873
|
-
}
|
874
|
-
collectMetricKeys(lineItems) {
|
875
|
-
const keys = [];
|
876
|
-
lineItems.forEach(lineItem => {
|
877
|
-
keys.push(...Object.keys(lineItem.totalMetrics || {}));
|
878
|
-
keys.push(...this.collectMetricKeys(lineItem.lineItems));
|
879
|
-
});
|
880
|
-
return uniq(keys);
|
881
|
-
}
|
882
|
-
setMetrics() {
|
883
|
-
const metrics = cloneDeep(this.metrics.filter(({ visible }) => visible));
|
884
|
-
this.visibleSelectedMetrics = metrics.slice(0, 4);
|
885
|
-
this.restSelectedMetrics = metrics.slice(4);
|
886
|
-
}
|
887
|
-
collectAvailableMetrics(resetToDefault = false) {
|
888
|
-
const storedMetrics = JSON.parse(localStorage.getItem(METRICS_STORAGE_KEY) || '[]');
|
889
|
-
const metricKeys = this.metricKeys.slice();
|
890
|
-
const isDefaultConfiguration = !storedMetrics.length || resetToDefault;
|
891
|
-
this.metrics = (isDefaultConfiguration ? this.activeMetricRuleNames : storedMetrics).reduce((result, metric) => {
|
892
|
-
const metricKeyIndex = metricKeys.findIndex(key => key === metric.key);
|
893
|
-
if (metricKeyIndex >= 0) {
|
894
|
-
metricKeys.splice(metricKeyIndex, 1);
|
895
|
-
}
|
896
|
-
if (isDefaultConfiguration && this.defaultMetricRuleNames.includes(metric.name)) {
|
897
|
-
metric.visible = true;
|
898
|
-
}
|
899
|
-
return [...result, metric];
|
900
|
-
}, []);
|
901
|
-
this.metrics = [
|
902
|
-
...this.metrics,
|
903
|
-
...metricKeys.map(metricKey => {
|
904
|
-
return { key: metricKey, name: this.getMetricName(metricKey), visible: false };
|
905
|
-
}),
|
906
|
-
];
|
907
|
-
// sort the metrics by the order of default metric rule names from the shopping cart settings
|
908
|
-
this.metrics = this.sortMetrics();
|
909
|
-
this.metrics = cloneDeep(this.metrics);
|
910
|
-
this.searchControl.setValue('');
|
911
|
-
if (!resetToDefault) {
|
912
|
-
this.lastSavedMetrics = cloneDeep(this.metrics);
|
913
|
-
this.setMetrics();
|
914
|
-
}
|
915
|
-
this.cdr.markForCheck();
|
916
|
-
}
|
917
|
-
getMetricName(key) {
|
918
|
-
return (this.activeMetricRules.find(metricRule => metricRule.metrics.find(metric => metric.totalName === key))?.title ||
|
919
|
-
key);
|
920
|
-
}
|
921
|
-
toNumber(value) {
|
922
|
-
return +(value || 0);
|
923
|
-
}
|
924
|
-
getActiveMetricRuleNames() {
|
925
|
-
return this.activeMetricRules.reduce((result, metricRule) => {
|
926
|
-
const name = metricRule.title;
|
927
|
-
const visible = this.defaultMetricRuleNames.includes(name);
|
928
|
-
metricRule.metrics.forEach(metric => {
|
929
|
-
result.push({
|
930
|
-
key: metric.totalName || metric.name,
|
931
|
-
name,
|
932
|
-
visible,
|
933
|
-
});
|
934
|
-
});
|
935
|
-
return result;
|
936
|
-
}, []);
|
937
|
-
}
|
938
|
-
/**
|
939
|
-
* Sorts the Metrics array by the order of the default metric rule names from the shopping cart settings.
|
940
|
-
* If a metric is included in the list of default metrics, it raises the metric to the top of the metrics array.
|
941
|
-
*/
|
942
|
-
sortMetrics() {
|
943
|
-
return this.metrics.slice().sort((a, b) => {
|
944
|
-
const indexA = this.defaultMetricRuleNames.indexOf(a.name);
|
945
|
-
const indexB = this.defaultMetricRuleNames.indexOf(b.name);
|
946
|
-
if (indexA === -1 && indexB === -1) {
|
947
|
-
return 0;
|
948
|
-
}
|
949
|
-
if (indexA === -1) {
|
950
|
-
return 1;
|
951
|
-
}
|
952
|
-
if (indexB === -1) {
|
953
|
-
return -1;
|
954
|
-
}
|
955
|
-
return indexA - indexB;
|
956
|
-
});
|
957
|
-
}
|
958
|
-
}
|
959
|
-
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 });
|
960
|
-
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 });
|
961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsComponent, decorators: [{
|
962
|
-
type: Component,
|
963
|
-
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"] }]
|
964
|
-
}], 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: [{
|
965
|
-
type: ViewChild,
|
966
|
-
args: [OverlayPanel]
|
967
|
-
}] } });
|
968
|
-
|
969
|
-
class FlowHeaderComponent {
|
970
|
-
constructor(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService, integrationState) {
|
971
|
-
this.contextService = contextService;
|
972
|
-
this.quoteDraftService = quoteDraftService;
|
973
|
-
this.quoteApiService = quoteApiService;
|
974
|
-
this.sfApiService = sfApiService;
|
975
|
-
this.flowConfiguration = flowConfiguration;
|
976
|
-
this.routerService = routerService;
|
977
|
-
this.dialogService = dialogService;
|
978
|
-
this.integrationState = integrationState;
|
979
|
-
this.isSaveInProgress$ = new BehaviorSubject(false);
|
980
|
-
this.isSubmitInProgress$ = new BehaviorSubject(false);
|
981
|
-
this.dateFormat = 'MM.dd.yyyy';
|
982
|
-
this.assetPriceLists$ = new BehaviorSubject([]);
|
983
|
-
this.mode$ = new BehaviorSubject(ConfigurationContextMode.TEST);
|
984
|
-
this.destroyed$ = new Subject();
|
985
|
-
this.contextProperties$ = this.contextService.resolve$().pipe(map(ctx => ctx.properties));
|
986
|
-
this.objectName$ = this.mode$.pipe(map(mode => mode?.toLocaleLowerCase() ?? ''));
|
987
|
-
this.activePriceList$ = this.quoteDraftService.activePriceList$;
|
988
|
-
this.isReadonlyMode$ = this.quoteDraftService.hasProducts$.pipe(map(() => this.isReadonlyMode()));
|
989
|
-
this.status$ = this.contextService.resolve$().pipe(map(context => context.properties.Status ?? ''));
|
990
|
-
this.isEditMode$ = this.quoteDraftService.isEditMode$();
|
991
|
-
this.assetsCount$ = this.getAssets$().pipe(map(lineItems => lineItems.length));
|
992
|
-
this.products$ = this.getDraftItems$().pipe(map(lineItems => this.generateProducts(lineItems)));
|
993
|
-
this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
|
994
|
-
this.isCartRoute$ = this.routerService.isCartRoute$();
|
995
|
-
this.isCatalogRoute$ = this.routerService.isCatalogRoute$();
|
996
|
-
this.isAssetsRoute$ = this.routerService.isAssetsRoute$();
|
997
|
-
this.objectDetails$ = this.getObjectDetails$();
|
627
|
+
const path = rootRoute.pathFromRoot
|
628
|
+
.map(r => r.url[0])
|
629
|
+
.filter(Boolean)
|
630
|
+
.join('/');
|
631
|
+
return '/' + path;
|
998
632
|
}
|
999
|
-
|
1000
|
-
this.
|
1001
|
-
.resolve$()
|
1002
|
-
.pipe(takeUntil(this.destroyed$))
|
1003
|
-
.subscribe(ctx => this.mode$.next(ctx.mode));
|
1004
|
-
// update assetPriceLists on quoteDraft change in ACCOUNT mode
|
1005
|
-
this.quoteDraftService.quoteDraft$
|
1006
|
-
.pipe(takeUntil(this.destroyed$), filter(() => this.isAccountMode))
|
1007
|
-
.subscribe(() => this.assetPriceLists$.next(this.quoteDraftService.assetPriceLists));
|
633
|
+
get route$() {
|
634
|
+
return this.lastChildRoute$;
|
1008
635
|
}
|
1009
|
-
|
1010
|
-
this.
|
1011
|
-
this.destroyed$.complete();
|
636
|
+
get params$() {
|
637
|
+
return this.lastChildParams$;
|
1012
638
|
}
|
1013
|
-
get
|
1014
|
-
return this.
|
639
|
+
get params() {
|
640
|
+
return this.getLastChildParams(this.route.snapshot);
|
1015
641
|
}
|
1016
|
-
|
1017
|
-
return this.
|
642
|
+
isConfigurationRoute$() {
|
643
|
+
return this.getFlowSubpath$().pipe(map(url => url.startsWith('product')));
|
1018
644
|
}
|
1019
|
-
|
1020
|
-
return this.
|
645
|
+
isCartRoute$() {
|
646
|
+
return this.getFlowSubpath$().pipe(map(url => url.startsWith('cart')));
|
1021
647
|
}
|
1022
|
-
|
1023
|
-
return this.
|
648
|
+
isCatalogRoute$() {
|
649
|
+
return this.getFlowSubpath$().pipe(map(url => url.startsWith('catalog')));
|
1024
650
|
}
|
1025
|
-
|
1026
|
-
return
|
1027
|
-
{
|
1028
|
-
label: 'Save to Quote',
|
1029
|
-
command: () => {
|
1030
|
-
this.saveButtonClickHandler(isCartRoute);
|
1031
|
-
},
|
1032
|
-
},
|
1033
|
-
{
|
1034
|
-
label: 'Quick Save',
|
1035
|
-
command: () => {
|
1036
|
-
this.saveButtonClickHandler(isCartRoute, true);
|
1037
|
-
},
|
1038
|
-
},
|
1039
|
-
{
|
1040
|
-
label: 'Generate Document',
|
1041
|
-
command: () => {
|
1042
|
-
this.docGenButtonClickHandler(isCartRoute);
|
1043
|
-
},
|
1044
|
-
},
|
1045
|
-
{
|
1046
|
-
label: 'Submit For Approval',
|
1047
|
-
command: () => {
|
1048
|
-
this.submitButtonClickHandler(isCartRoute);
|
1049
|
-
},
|
1050
|
-
},
|
1051
|
-
];
|
651
|
+
isAssetsRoute$() {
|
652
|
+
return this.getFlowSubpath$().pipe(map(url => url.startsWith('assets')));
|
1052
653
|
}
|
1053
|
-
|
1054
|
-
const
|
1055
|
-
if (
|
1056
|
-
|
654
|
+
navigateBack() {
|
655
|
+
const prevUrl = this.urlHistory[this.urlHistory.length - 2];
|
656
|
+
if (prevUrl) {
|
657
|
+
this.router.navigateByUrl(prevUrl);
|
1057
658
|
}
|
1058
659
|
}
|
1059
|
-
|
1060
|
-
if (
|
1061
|
-
|
660
|
+
navigateTo(path, productId, lineItemId) {
|
661
|
+
if (path === 'shopping-cart') {
|
662
|
+
this.navigateToShoppingCart();
|
1062
663
|
}
|
1063
|
-
|
1064
|
-
|
1065
|
-
navigateToShoppingCart() {
|
1066
|
-
if (!this.isReadonlyMode()) {
|
1067
|
-
this.routerService.navigateToShoppingCart();
|
664
|
+
else if (path === 'catalog') {
|
665
|
+
this.navigateToCatalog();
|
1068
666
|
}
|
1069
|
-
|
1070
|
-
|
1071
|
-
if (!this.isReadonlyMode()) {
|
1072
|
-
this.routerService.navigateToCatalog();
|
667
|
+
else if (path === 'assets') {
|
668
|
+
this.navigateToAssets();
|
1073
669
|
}
|
1074
|
-
|
1075
|
-
|
1076
|
-
if (!this.isReadonlyMode()) {
|
1077
|
-
this.routerService.navigateToAssets();
|
670
|
+
else if (path === 'product' && productId) {
|
671
|
+
this.navigateToProductConfiguration(productId, lineItemId);
|
1078
672
|
}
|
1079
673
|
}
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
else {
|
1086
|
-
this.dialogService.showDocgenAccountUnsavedChangesDialog().subscribe();
|
1087
|
-
}
|
1088
|
-
return;
|
1089
|
-
}
|
1090
|
-
if (!this.quoteDraftService.isEditMode()) {
|
1091
|
-
this.dialogService.showDocgenReadonlyDialog().subscribe();
|
1092
|
-
return;
|
1093
|
-
}
|
1094
|
-
if (!isCartRoute) {
|
1095
|
-
this.dialogService.showDocgenOutsideShoppingCartDialog().subscribe();
|
1096
|
-
return;
|
1097
|
-
}
|
1098
|
-
let shouldOpen$ = of(true);
|
1099
|
-
if (this.quoteDraftService.hasUnsavedChanges) {
|
1100
|
-
shouldOpen$ = this.dialogService.showDocgenUnsavedChangesDialog().pipe(switchMap(confirmed => {
|
1101
|
-
if (!confirmed) {
|
1102
|
-
return of(false);
|
1103
|
-
}
|
1104
|
-
return this.saveQuote$(true).pipe(map(() => true));
|
674
|
+
navigateToProductConfiguration(productId, lineItemId) {
|
675
|
+
let updateContext$;
|
676
|
+
if (this.flowInfoService.isLegacy) {
|
677
|
+
updateContext$ = of(undefined).pipe(tap(() => {
|
678
|
+
this.contextService.update({ properties: { productId, lineItemId: lineItemId ?? '' } });
|
1105
679
|
}));
|
1106
680
|
}
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
if (!this.quoteDraftService.isEditMode()) {
|
1113
|
-
if (this.isQuoteMode) {
|
1114
|
-
this.dialogService.showQuoteReadonlyModeDialog().subscribe();
|
1115
|
-
}
|
1116
|
-
else {
|
1117
|
-
this.dialogService.showReadonlyModeDialog().subscribe();
|
1118
|
-
}
|
1119
|
-
return;
|
1120
|
-
}
|
1121
|
-
if (this.isUpsellQuoteWithoutChanges()) {
|
1122
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1123
|
-
return;
|
1124
|
-
}
|
1125
|
-
if (this.isAccountMode && !this.quoteDraftService.hasUnsavedChanges) {
|
1126
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1127
|
-
return;
|
1128
|
-
}
|
1129
|
-
if (!isCartRoute) {
|
1130
|
-
this.dialogService.showQuoteOutsideShoppingCartDialog().subscribe();
|
1131
|
-
return;
|
1132
|
-
}
|
1133
|
-
const lineItems = this.flowConfiguration.getSnapshot();
|
1134
|
-
if (!lineItems.length) {
|
1135
|
-
this.dialogService.showEmptyCartDialog().subscribe();
|
1136
|
-
return;
|
1137
|
-
}
|
1138
|
-
this.saveQuote$(stayOnPage).subscribe();
|
1139
|
-
}
|
1140
|
-
submitButtonClickHandler(isCartRoute) {
|
1141
|
-
if (this.isQuoteMode && !this.quoteDraftService.isEditMode()) {
|
1142
|
-
this.dialogService.showReadonlyQuoteSubmitFailureDialog();
|
1143
|
-
return;
|
1144
|
-
}
|
1145
|
-
if (this.isUpsellQuoteWithoutChanges()) {
|
1146
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1147
|
-
return;
|
1148
|
-
}
|
1149
|
-
if (this.isAccountMode) {
|
1150
|
-
this.dialogService.showAccountSubmitFailureDialog();
|
1151
|
-
return;
|
1152
|
-
}
|
1153
|
-
if (!isCartRoute) {
|
1154
|
-
this.dialogService.showOutsideShoppingCartQuoteSubmitFailureDialog().subscribe();
|
1155
|
-
return;
|
1156
|
-
}
|
1157
|
-
const quoteDraft = this.quoteDraftService.quoteDraft;
|
1158
|
-
if (!quoteDraft) {
|
1159
|
-
return;
|
681
|
+
else {
|
682
|
+
updateContext$ = this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_CONTEXT_PROPERTIES', {
|
683
|
+
productId,
|
684
|
+
lineItemId: lineItemId ?? '',
|
685
|
+
});
|
1160
686
|
}
|
1161
|
-
|
1162
|
-
|
1163
|
-
.
|
1164
|
-
.
|
1165
|
-
this.
|
1166
|
-
|
1167
|
-
|
687
|
+
updateContext$
|
688
|
+
.pipe(tap(() => {
|
689
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
690
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
691
|
+
this.router.navigate([flowRouteUrl, 'product'], {
|
692
|
+
queryParams: { ...routeSnapshot.queryParams, productId },
|
693
|
+
});
|
694
|
+
}))
|
1168
695
|
.subscribe();
|
1169
696
|
}
|
1170
|
-
|
1171
|
-
this.
|
1172
|
-
|
1173
|
-
|
1174
|
-
event.stopPropagation();
|
1175
|
-
if (!this.isReadonlyMode()) {
|
1176
|
-
if (!cart.overlayPanel.overlayVisible) {
|
1177
|
-
document.dispatchEvent(new Event('click'));
|
1178
|
-
}
|
1179
|
-
cart?.overlayPanel.toggle(event);
|
1180
|
-
}
|
1181
|
-
}
|
1182
|
-
saveQuote$(stayOnPage = false) {
|
1183
|
-
const quoteDraft = this.quoteDraftService.quoteDraftForActivePriceList;
|
1184
|
-
if (!quoteDraft) {
|
1185
|
-
return of(undefined);
|
1186
|
-
}
|
1187
|
-
this.isSaveInProgress$.next(true);
|
1188
|
-
return this.quoteApiService.upsertQuote(quoteDraft).pipe(tap(({ quoteId }) => {
|
1189
|
-
this.quoteDraftService.hasUnsavedChanges = false;
|
1190
|
-
if (!stayOnPage) {
|
1191
|
-
this.back(quoteId);
|
1192
|
-
}
|
1193
|
-
}), finalize(() => this.isSaveInProgress$.next(false)), map(noop), takeUntil(this.destroyed$));
|
1194
|
-
}
|
1195
|
-
queryName$(objectName, id) {
|
1196
|
-
if (!id) {
|
1197
|
-
return of('');
|
1198
|
-
}
|
1199
|
-
const searchRequest = {
|
1200
|
-
count: 1,
|
1201
|
-
rawCondition: `Id = '${id}'`,
|
1202
|
-
fields: ['Name'],
|
1203
|
-
};
|
1204
|
-
return this.sfApiService.query(searchRequest, objectName).pipe(map(result => result[0]?.Name ?? ''), takeUntil(this.destroyed$));
|
1205
|
-
}
|
1206
|
-
getObjectDetails$() {
|
1207
|
-
return this.contextService.resolve$().pipe(distinctUntilChanged((prevCtx, currCtx) => prevCtx.properties.Id === currCtx.properties.Id), map(ctx => {
|
1208
|
-
const isAccountMode = ctx.mode === ConfigurationContextMode.ACCOUNT;
|
1209
|
-
const isQuoteMode = ctx.mode === ConfigurationContextMode.QUOTE;
|
1210
|
-
return {
|
1211
|
-
accountId: isAccountMode ? ctx.properties.Id : ctx.properties.AccountId,
|
1212
|
-
opportunityId: ctx.properties.OpportunityId,
|
1213
|
-
quoteId: isQuoteMode ? ctx.properties.Id : undefined,
|
1214
|
-
quoteName: isQuoteMode ? ctx.properties.Name : undefined,
|
1215
|
-
quoteNumber: isQuoteMode ? ctx.properties.QuoteNumber : undefined,
|
1216
|
-
};
|
1217
|
-
}), switchMap(details => combineLatest([
|
1218
|
-
of(details),
|
1219
|
-
this.queryName$('Account', details.accountId),
|
1220
|
-
this.queryName$('Opportunity', details.opportunityId),
|
1221
|
-
])), map(([details, accountName, opportunityName]) => ({ ...details, accountName, opportunityName })));
|
1222
|
-
}
|
1223
|
-
formatMetric(value) {
|
1224
|
-
return (value ? Number(value) : 0).toFixed(2);
|
1225
|
-
}
|
1226
|
-
getDraftItems$() {
|
1227
|
-
return combineLatest([
|
1228
|
-
this.flowConfiguration.get(),
|
1229
|
-
this.integrationState.state$.pipe(map(state => state.modifiedAssets), distinctUntilChanged()),
|
1230
|
-
]).pipe(map(([lineItems, modifiedAssets]) => {
|
1231
|
-
const currentTerms = lineItems.reduce((acc, li) => {
|
1232
|
-
const assetId = li.assetId || li.openOrderLineItemId;
|
1233
|
-
const isModified = isLineItemModified(li);
|
1234
|
-
const currentTerm = getOriginParent(lineItems, li) ?? li;
|
1235
|
-
if (isModified || (assetId && modifiedAssets?.[assetId])) {
|
1236
|
-
acc.push(currentTerm);
|
1237
|
-
}
|
1238
|
-
return acc;
|
1239
|
-
}, []);
|
1240
|
-
const uniqCurrentTerms = currentTerms.filter((value, index, array) => array.indexOf(value) === index);
|
1241
|
-
return uniqCurrentTerms;
|
1242
|
-
}));
|
697
|
+
navigateToShoppingCart() {
|
698
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
699
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
700
|
+
this.router.navigate([flowRouteUrl, 'cart'], { queryParams: routeSnapshot.queryParams });
|
1243
701
|
}
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
}
|
1249
|
-
generateProducts(lineItems) {
|
1250
|
-
const date = new Date();
|
1251
|
-
date.setHours(0, 0, 0, 0);
|
1252
|
-
const now = date.getTime();
|
1253
|
-
const termParentIds = lineItems.map(li => li.rampInstanceId).filter(Boolean);
|
1254
|
-
const lineItemsRampInstanceIdMap = lineItems.reduce((acc, li) => {
|
1255
|
-
acc[li.rampInstanceId ?? ''] = li;
|
1256
|
-
return acc;
|
1257
|
-
}, {});
|
1258
|
-
return lineItems.reduce((result, li) => {
|
1259
|
-
// find main term line item
|
1260
|
-
if (li.rampInstanceId) {
|
1261
|
-
return result;
|
1262
|
-
}
|
1263
|
-
// find current term line item
|
1264
|
-
let target = li;
|
1265
|
-
while (target && target.endDate && new Date(target.endDate).getTime() <= now) {
|
1266
|
-
target = lineItemsRampInstanceIdMap[li.id];
|
1267
|
-
}
|
1268
|
-
if (target && target.productId) {
|
1269
|
-
result.push({
|
1270
|
-
id: target.id,
|
1271
|
-
productId: target.productId,
|
1272
|
-
name: target.name,
|
1273
|
-
configurable: target.properties['#configurable'] === 'true',
|
1274
|
-
deleted: target.actionCode === 'DELETE',
|
1275
|
-
hasTerm: termParentIds.includes(target.id),
|
1276
|
-
qty: target.qty,
|
1277
|
-
mrr: this.formatMetric(target.properties.VDM_Total_MRR),
|
1278
|
-
nrr: this.formatMetric(target.properties.VDM_Total_NRR),
|
1279
|
-
});
|
1280
|
-
}
|
1281
|
-
return result;
|
1282
|
-
}, []);
|
702
|
+
navigateToCatalog() {
|
703
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
704
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
705
|
+
this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
|
1283
706
|
}
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
707
|
+
navigateToAssets() {
|
708
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
709
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
710
|
+
this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
|
1287
711
|
}
|
1288
|
-
|
1289
|
-
const
|
1290
|
-
const
|
1291
|
-
return
|
712
|
+
showErrorPage$(message, details) {
|
713
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
714
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
715
|
+
return from(this.router.navigate([flowRouteUrl, '404'], {
|
716
|
+
state: { message, type: 'error', ...(details && { details }) },
|
717
|
+
replaceUrl: true,
|
718
|
+
})).pipe(map(() => false));
|
1292
719
|
}
|
1293
|
-
|
1294
|
-
|
1295
|
-
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 });
|
1296
|
-
|
1297
|
-
|
1298
|
-
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"] }]
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
}
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
InputTextModule,
|
1312
|
-
CheckboxModule,
|
1313
|
-
LetDirectiveModule,
|
1314
|
-
VirtualScrollerModule,
|
1315
|
-
ErrorTooltipModule,
|
1316
|
-
HiddenTextTooltipModule,
|
1317
|
-
SdkPipesModule], exports: [MetricsComponent] });
|
1318
|
-
MetricsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, imports: [CommonModule,
|
1319
|
-
FormsModule,
|
1320
|
-
ReactiveFormsModule,
|
1321
|
-
DragDropModule,
|
1322
|
-
ButtonModule,
|
1323
|
-
OverlayPanelModule,
|
1324
|
-
SidebarModule,
|
1325
|
-
InputTextModule,
|
1326
|
-
CheckboxModule,
|
1327
|
-
LetDirectiveModule,
|
1328
|
-
VirtualScrollerModule,
|
1329
|
-
ErrorTooltipModule,
|
1330
|
-
HiddenTextTooltipModule,
|
1331
|
-
SdkPipesModule] });
|
1332
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: MetricsModule, decorators: [{
|
1333
|
-
type: NgModule,
|
1334
|
-
args: [{
|
1335
|
-
declarations: [MetricsComponent],
|
1336
|
-
imports: [
|
1337
|
-
CommonModule,
|
1338
|
-
FormsModule,
|
1339
|
-
ReactiveFormsModule,
|
1340
|
-
DragDropModule,
|
1341
|
-
ButtonModule,
|
1342
|
-
OverlayPanelModule,
|
1343
|
-
SidebarModule,
|
1344
|
-
InputTextModule,
|
1345
|
-
CheckboxModule,
|
1346
|
-
LetDirectiveModule,
|
1347
|
-
VirtualScrollerModule,
|
1348
|
-
ErrorTooltipModule,
|
1349
|
-
HiddenTextTooltipModule,
|
1350
|
-
SdkPipesModule,
|
1351
|
-
],
|
1352
|
-
exports: [MetricsComponent],
|
1353
|
-
}]
|
1354
|
-
}] });
|
1355
|
-
|
1356
|
-
class FlowHeaderModule {
|
1357
|
-
}
|
1358
|
-
FlowHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1359
|
-
FlowHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule,
|
1360
|
-
OverlayPanelModule,
|
1361
|
-
LetDirectiveModule,
|
1362
|
-
TooltipModule,
|
1363
|
-
ButtonModule,
|
1364
|
-
CartPreviewModule,
|
1365
|
-
SplitButtonModule,
|
1366
|
-
MetricsModule,
|
1367
|
-
SdkPipesModule], exports: [FlowHeaderComponent] });
|
1368
|
-
FlowHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, imports: [CommonModule,
|
1369
|
-
OverlayPanelModule,
|
1370
|
-
LetDirectiveModule,
|
1371
|
-
TooltipModule,
|
1372
|
-
ButtonModule,
|
1373
|
-
CartPreviewModule,
|
1374
|
-
SplitButtonModule,
|
1375
|
-
MetricsModule,
|
1376
|
-
SdkPipesModule] });
|
1377
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowHeaderModule, decorators: [{
|
1378
|
-
type: NgModule,
|
1379
|
-
args: [{
|
1380
|
-
declarations: [FlowHeaderComponent],
|
1381
|
-
imports: [
|
1382
|
-
CommonModule,
|
1383
|
-
OverlayPanelModule,
|
1384
|
-
LetDirectiveModule,
|
1385
|
-
TooltipModule,
|
1386
|
-
ButtonModule,
|
1387
|
-
CartPreviewModule,
|
1388
|
-
SplitButtonModule,
|
1389
|
-
MetricsModule,
|
1390
|
-
SdkPipesModule,
|
1391
|
-
],
|
1392
|
-
exports: [FlowHeaderComponent],
|
1393
|
-
}]
|
1394
|
-
}] });
|
720
|
+
switchObject(id) {
|
721
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
722
|
+
const route = this.getLastChildRoute(this.route);
|
723
|
+
const objName = SalesforceIdUtils.getSfObjectNameById(id);
|
724
|
+
const queryParams = {
|
725
|
+
quoteId: objName === 'Quote' ? id : undefined,
|
726
|
+
accountId: objName === 'Account' ? id : undefined,
|
727
|
+
orderId: objName === 'Order' ? id : undefined,
|
728
|
+
};
|
729
|
+
this.router.navigate([], { relativeTo: route, queryParams: { ...routeSnapshot.queryParams, ...queryParams } });
|
730
|
+
}
|
731
|
+
}
|
732
|
+
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 }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
733
|
+
FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
|
734
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, decorators: [{
|
735
|
+
type: Injectable,
|
736
|
+
args: [{ providedIn: 'root' }]
|
737
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.IntegrationState }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
|
1395
738
|
|
1396
739
|
class FlowService {
|
1397
|
-
constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService) {
|
740
|
+
constructor(integrationState, flowRouterService, quoteDraftService, configurationService, configurationStateService, flowDialogService, flowConfigurationService, flowInfoService, flowStateService) {
|
1398
741
|
this.integrationState = integrationState;
|
1399
742
|
this.flowRouterService = flowRouterService;
|
1400
743
|
this.quoteDraftService = quoteDraftService;
|
1401
744
|
this.configurationService = configurationService;
|
745
|
+
this.configurationStateService = configurationStateService;
|
746
|
+
this.flowDialogService = flowDialogService;
|
1402
747
|
this.flowConfigurationService = flowConfigurationService;
|
748
|
+
this.flowInfoService = flowInfoService;
|
749
|
+
this.flowStateService = flowStateService;
|
1403
750
|
this.cleanup$ = new Subject();
|
1404
751
|
}
|
752
|
+
cleanup() {
|
753
|
+
this.cleanup$.next();
|
754
|
+
}
|
1405
755
|
initSubscriptions() {
|
1406
756
|
this.integrationState
|
1407
757
|
.listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
|
@@ -1424,53 +774,90 @@ class FlowService {
|
|
1424
774
|
.subscribe();
|
1425
775
|
this.integrationState
|
1426
776
|
.listen$(FlowAction.FLOW_NAVIGATE_BACK)
|
1427
|
-
.pipe(tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
|
777
|
+
.pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
|
778
|
+
.subscribe();
|
779
|
+
this.integrationState
|
780
|
+
.listen$(FlowAction.FLOW_NAVIGATE_TO)
|
781
|
+
.pipe(switchMap(payload => this.configurationStateService.cancelConfiguration().pipe(map(() => payload))), tap(payload => {
|
782
|
+
if (payload.path === 'product') {
|
783
|
+
this.integrationState.dispatch(FlowAction.ConfigureProductAction(payload));
|
784
|
+
}
|
785
|
+
else {
|
786
|
+
this.flowRouterService.navigateTo(payload.path, payload.productId, payload.lineItemId);
|
787
|
+
}
|
788
|
+
}), takeUntil(this.cleanup$))
|
1428
789
|
.subscribe();
|
790
|
+
this.integrationState
|
791
|
+
.listen$(FlowAction.OPEN_DIALOG)
|
792
|
+
.pipe(switchMap(payload => this.flowDialogService.showDialog(payload.dialog).pipe(take(1))), takeUntil(this.cleanup$))
|
793
|
+
.subscribe(dialogResult => {
|
794
|
+
this.integrationState.patchState({ dialogResult });
|
795
|
+
});
|
1429
796
|
this.integrationState
|
1430
797
|
.listen$(FlowAction.FLOW_NAVIGATE_TO_CATALOG)
|
1431
798
|
.pipe(tap(() => this.flowRouterService.navigateToCatalog()), takeUntil(this.cleanup$))
|
1432
799
|
.subscribe();
|
800
|
+
this.integrationState
|
801
|
+
.listen$(FlowAction.FLOW_NAVIGATE_TO_SHOPPING_CART)
|
802
|
+
.pipe(tap(() => this.flowRouterService.navigateToShoppingCart()), takeUntil(this.cleanup$))
|
803
|
+
.subscribe();
|
1433
804
|
this.integrationState
|
1434
805
|
.listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
|
1435
806
|
.pipe(switchMap(() => {
|
1436
|
-
|
1437
|
-
|
1438
|
-
if (!quoteDraft || !lineItem) {
|
1439
|
-
return of(undefined);
|
1440
|
-
}
|
1441
|
-
const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
|
1442
|
-
let updatedState;
|
1443
|
-
if (isNewLineItem) {
|
1444
|
-
updatedState = [...quoteDraft.currentState, lineItem];
|
807
|
+
if (this.flowInfoService.isLegacy) {
|
808
|
+
return this.legacyApplyConfiguration();
|
1445
809
|
}
|
1446
810
|
else {
|
1447
|
-
|
811
|
+
return this.configurationStateService.saveConfiguration('', true).pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), switchMap(() => this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_ASSET_IDS')));
|
1448
812
|
}
|
1449
|
-
return this.flowConfigurationService.calculate$({ ...quoteDraft, currentState: updatedState });
|
1450
813
|
}), tap(() => {
|
1451
814
|
this.configurationService.hasUnsavedChanges = false;
|
1452
815
|
this.flowRouterService.navigateToShoppingCart();
|
1453
816
|
}), takeUntil(this.cleanup$))
|
1454
817
|
.subscribe();
|
1455
|
-
this.
|
1456
|
-
}
|
1457
|
-
cleanup() {
|
1458
|
-
this.cleanup$.next();
|
818
|
+
this.updateFlowParams();
|
1459
819
|
}
|
1460
|
-
|
820
|
+
updateFlowParams() {
|
1461
821
|
this.flowRouterService
|
1462
822
|
.getFlowSubpath$()
|
1463
823
|
.pipe(map(path => path.split('/')?.[0]), takeUntil(this.cleanup$))
|
1464
824
|
.subscribe(flowPath => this.integrationState.patchState({ flowPath }));
|
825
|
+
this.flowRouterService.route$
|
826
|
+
.pipe(map(path => path.queryParams['productId']), takeUntil(this.cleanup$))
|
827
|
+
.subscribe(productId => this.integrationState.patchState({ productId }));
|
828
|
+
}
|
829
|
+
legacyApplyConfiguration() {
|
830
|
+
const quoteDraft = this.quoteDraftService.quoteDraft;
|
831
|
+
const lineItem = this.configurationService.getSnapshot();
|
832
|
+
if (!quoteDraft || !lineItem) {
|
833
|
+
return of(undefined);
|
834
|
+
}
|
835
|
+
const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
|
836
|
+
const assetId = lineItem.assetId || lineItem.openOrderLineItemId;
|
837
|
+
let updatedState;
|
838
|
+
if (isNewLineItem) {
|
839
|
+
updatedState = [...quoteDraft.currentState, lineItem];
|
840
|
+
}
|
841
|
+
else {
|
842
|
+
updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
|
843
|
+
}
|
844
|
+
return this.flowConfigurationService.calculate$({ ...quoteDraft, currentState: updatedState }).pipe(tap(() => {
|
845
|
+
if (assetId) {
|
846
|
+
const modifiedAssets = this.integrationState.state.modifiedAssets ?? {};
|
847
|
+
this.integrationState.patchState({
|
848
|
+
modifiedAssets: { ...modifiedAssets, [assetId]: true },
|
849
|
+
});
|
850
|
+
}
|
851
|
+
}));
|
1465
852
|
}
|
1466
853
|
}
|
1467
|
-
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1468
|
-
FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1469
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
854
|
+
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.ConfigurationStateService }, { token: FlowDialogService }, { token: i2.FlowConfigurationService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
855
|
+
FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
|
856
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
|
1470
857
|
type: Injectable
|
1471
|
-
}], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type:
|
858
|
+
}], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: FlowDialogService }, { type: i2.FlowConfigurationService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
|
1472
859
|
|
1473
|
-
class
|
860
|
+
class FlowGuidedSellingService {
|
1474
861
|
constructor(integrationState) {
|
1475
862
|
this.integrationState = integrationState;
|
1476
863
|
this.cleanup$ = new Subject();
|
@@ -1483,47 +870,40 @@ class FlowDocGenService {
|
|
1483
870
|
}
|
1484
871
|
initSubscriptions() {
|
1485
872
|
this.integrationState
|
1486
|
-
.listen$(FlowAction.
|
873
|
+
.listen$(FlowAction.OPEN_GUIDED_SELLING)
|
1487
874
|
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
1488
875
|
.subscribe();
|
1489
876
|
this.integrationState
|
1490
|
-
.listen$(FlowAction.
|
877
|
+
.listen$(FlowAction.CLOSE_GUIDED_SELLING)
|
1491
878
|
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
1492
879
|
.subscribe();
|
1493
880
|
}
|
1494
881
|
}
|
1495
|
-
|
1496
|
-
|
1497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
882
|
+
FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
883
|
+
FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
|
884
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
|
1498
885
|
type: Injectable
|
1499
|
-
}], ctorParameters: function () { return [{ type:
|
886
|
+
}], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
|
1500
887
|
|
1501
888
|
class FlowComponent {
|
1502
|
-
constructor(routerService,
|
889
|
+
constructor(routerService, flowService, flowInfo, guidedSellingService) {
|
1503
890
|
this.routerService = routerService;
|
1504
|
-
this.quoteDraftService = quoteDraftService;
|
1505
891
|
this.flowService = flowService;
|
1506
|
-
this.
|
1507
|
-
this.
|
892
|
+
this.flowInfo = flowInfo;
|
893
|
+
this.guidedSellingService = guidedSellingService;
|
1508
894
|
this.isLoading$ = this.routerService.loading$;
|
1509
|
-
this.showHeader$ = this.routerService.route
|
1510
|
-
this.isStandalone$ = this.
|
895
|
+
this.showHeader$ = combineLatest([this.routerService.route$, this.flowInfo.flow$]).pipe(map(([route, flow]) => route.data['showHeader'] && !flow?.properties.standalone));
|
896
|
+
this.isStandalone$ = this.flowInfo.flow$.pipe(map(flow => Boolean(flow?.properties.standalone)));
|
897
|
+
this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
|
1511
898
|
this.flowService.initSubscriptions();
|
1512
899
|
}
|
1513
|
-
ngOnInit() {
|
1514
|
-
this.integrationState.clear();
|
1515
|
-
}
|
1516
|
-
ngOnDestroy() {
|
1517
|
-
this.flowService.cleanup();
|
1518
|
-
this.docGenService.cleanup();
|
1519
|
-
}
|
1520
900
|
}
|
1521
|
-
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1522
|
-
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
1523
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
901
|
+
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token: i2.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
|
902
|
+
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 });
|
903
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
|
1524
904
|
type: Component,
|
1525
|
-
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:#
|
1526
|
-
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type:
|
905
|
+
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"] }]
|
906
|
+
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
|
1527
907
|
|
1528
908
|
const getFlowObjectIdPropertyName = (id) => {
|
1529
909
|
const objectName = SalesforceIdUtils.getSfObjectNameById(id);
|
@@ -1539,8 +919,12 @@ const getFlowObjectIdPropertyName = (id) => {
|
|
1539
919
|
};
|
1540
920
|
const getDefaultProperties = (params) => {
|
1541
921
|
const properties = {};
|
922
|
+
let standalone = params.flowParams?.standalone;
|
1542
923
|
if (params.flowParams?.entryPath.includes('/product') || params.mode === ConfigurationContextMode.REMOTE) {
|
1543
|
-
|
924
|
+
standalone = standalone ?? true;
|
925
|
+
}
|
926
|
+
if (standalone != null) {
|
927
|
+
properties.standalone = standalone ? 'true' : 'false';
|
1544
928
|
}
|
1545
929
|
return properties;
|
1546
930
|
};
|
@@ -1559,7 +943,7 @@ class ContextGuard {
|
|
1559
943
|
const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
|
1560
944
|
// Restrict if mode is not defined
|
1561
945
|
if (mode == null) {
|
1562
|
-
return this.
|
946
|
+
return this.routerService.showErrorPage$('Mode is undefined');
|
1563
947
|
}
|
1564
948
|
const headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
|
1565
949
|
// Allow if context is already initialized with the same headerId
|
@@ -1571,7 +955,6 @@ class ContextGuard {
|
|
1571
955
|
}
|
1572
956
|
// Initialize context and runtime settings
|
1573
957
|
return forkJoin([this.contextService.create(headerId, mode), this.runtimeSettingsService.create()]).pipe(tap(([context]) => {
|
1574
|
-
// Update context with queryParams
|
1575
958
|
this.contextService.update({
|
1576
959
|
...context,
|
1577
960
|
properties: {
|
@@ -1584,7 +967,8 @@ class ContextGuard {
|
|
1584
967
|
this.runtimeSettingsService.initCurrency(context.properties['CurrencyIsoCode']);
|
1585
968
|
}), map(() => true), catchError(e => {
|
1586
969
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1587
|
-
|
970
|
+
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
971
|
+
return this.routerService.showErrorPage$(message, errorDetails);
|
1588
972
|
}));
|
1589
973
|
}
|
1590
974
|
canActivate(route) {
|
@@ -1617,17 +1001,43 @@ class ContextGuard {
|
|
1617
1001
|
}
|
1618
1002
|
return;
|
1619
1003
|
}
|
1620
|
-
handleError(route, message) {
|
1621
|
-
this.contextService.delete();
|
1622
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
1623
|
-
return from(this.router.navigate([parentUrl, '404'], { state: { message } })).pipe(map(() => false));
|
1624
|
-
}
|
1625
1004
|
}
|
1626
|
-
ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1627
|
-
ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1628
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1005
|
+
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 });
|
1006
|
+
ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard });
|
1007
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, decorators: [{
|
1629
1008
|
type: Injectable
|
1630
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type:
|
1009
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
|
1010
|
+
|
1011
|
+
const keepFlowInitialized = (route) => {
|
1012
|
+
const contextService = inject(ContextService);
|
1013
|
+
const flowState = inject(FlowStateService);
|
1014
|
+
const flowInfoService = inject(FlowInfoService);
|
1015
|
+
const routerService = inject(FlowRouterService);
|
1016
|
+
const quoteDraft = inject(QuoteDraftService);
|
1017
|
+
const configurationService = inject(ConfigurationService);
|
1018
|
+
const integrationState = inject(IntegrationState);
|
1019
|
+
const { flowId } = route.queryParams;
|
1020
|
+
const flow = flowInfoService.flow;
|
1021
|
+
if (flow && flow?.id === flowId) {
|
1022
|
+
return true;
|
1023
|
+
}
|
1024
|
+
// Cleanup
|
1025
|
+
flowState.cleanup();
|
1026
|
+
quoteDraft.reset();
|
1027
|
+
configurationService.reset();
|
1028
|
+
integrationState.clear();
|
1029
|
+
flowInfoService.cleanup();
|
1030
|
+
contextService.delete();
|
1031
|
+
if (!flowId) {
|
1032
|
+
return true;
|
1033
|
+
}
|
1034
|
+
const params = { ...route.queryParams, ...flow?.properties.queryParams };
|
1035
|
+
return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => {
|
1036
|
+
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1037
|
+
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
1038
|
+
return routerService.showErrorPage$(message, errorDetails);
|
1039
|
+
}));
|
1040
|
+
};
|
1631
1041
|
|
1632
1042
|
class ProductUnloadGuard {
|
1633
1043
|
constructor(router, contextService, quoteDraftService, configurationService, flowDialogService) {
|
@@ -1651,6 +1061,9 @@ class ProductUnloadGuard {
|
|
1651
1061
|
}
|
1652
1062
|
// clear obsolete queryParams
|
1653
1063
|
const urlTree = this.router.parseUrl(nextState.url);
|
1064
|
+
if (!urlTree.queryParams['productId']) {
|
1065
|
+
return true;
|
1066
|
+
}
|
1654
1067
|
delete urlTree.queryParams['productId'];
|
1655
1068
|
// replace url after deactivation has finished
|
1656
1069
|
setTimeout(() => this.router.navigateByUrl(urlTree.toString(), { replaceUrl: true }));
|
@@ -1660,32 +1073,36 @@ class ProductUnloadGuard {
|
|
1660
1073
|
}));
|
1661
1074
|
}
|
1662
1075
|
}
|
1663
|
-
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1664
|
-
ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1665
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1076
|
+
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 });
|
1077
|
+
ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard });
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, decorators: [{
|
1666
1079
|
type: Injectable
|
1667
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type:
|
1080
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: FlowDialogService }]; } });
|
1668
1081
|
|
1669
1082
|
class RootGuard {
|
1670
1083
|
constructor(router, routerService) {
|
1671
1084
|
this.router = router;
|
1672
1085
|
this.routerService = routerService;
|
1673
1086
|
this.initialized = false;
|
1674
|
-
this.navToRestore = null;
|
1675
1087
|
}
|
1676
1088
|
canActivate(route) {
|
1677
1089
|
// We always need to initialize root component first, and only then start checking guards/resolvers
|
1678
1090
|
if (!this.initialized) {
|
1679
1091
|
this.initialized = true;
|
1680
|
-
|
1092
|
+
const navToRestore = this.router.getCurrentNavigation();
|
1681
1093
|
const rootUrl = this.routerService.getFlowRootPath(route);
|
1682
|
-
this.router
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1094
|
+
this.router
|
1095
|
+
.navigate([rootUrl], {
|
1096
|
+
replaceUrl: !navToRestore?.previousNavigation,
|
1097
|
+
skipLocationChange: true,
|
1098
|
+
})
|
1099
|
+
.then(success => {
|
1100
|
+
if (!success || !navToRestore) {
|
1101
|
+
return;
|
1102
|
+
}
|
1103
|
+
setTimeout(() => {
|
1104
|
+
this.router.navigateByUrl(navToRestore.extractedUrl, navToRestore.extras);
|
1105
|
+
});
|
1689
1106
|
});
|
1690
1107
|
}
|
1691
1108
|
return true;
|
@@ -1695,25 +1112,25 @@ class RootGuard {
|
|
1695
1112
|
return true;
|
1696
1113
|
}
|
1697
1114
|
}
|
1698
|
-
RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1699
|
-
RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
1700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1115
|
+
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 });
|
1116
|
+
RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, providedIn: 'root' });
|
1117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, decorators: [{
|
1701
1118
|
type: Injectable,
|
1702
1119
|
args: [{ providedIn: 'root' }]
|
1703
1120
|
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
|
1704
1121
|
|
1705
1122
|
class AssetsComponent {
|
1706
|
-
constructor(templatesApi,
|
1123
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
1707
1124
|
this.templatesApi = templatesApi;
|
1708
|
-
this.contextService = contextService;
|
1709
1125
|
this.cdr = cdr;
|
1710
1126
|
this.toastService = toastService;
|
1127
|
+
this.flowInfo = flowInfo;
|
1711
1128
|
this.customizationService = customizationService;
|
1712
1129
|
this.uiDefinition = undefined;
|
1713
1130
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
1714
1131
|
this.templateApiName = '';
|
1715
1132
|
this.destroyed$ = new Subject();
|
1716
|
-
this.templateApiName = this.
|
1133
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates?.assets ?? '';
|
1717
1134
|
}
|
1718
1135
|
ngOnInit() {
|
1719
1136
|
this.generateUIDefinition$()
|
@@ -1736,37 +1153,36 @@ class AssetsComponent {
|
|
1736
1153
|
this.destroyed$.next();
|
1737
1154
|
this.destroyed$.complete();
|
1738
1155
|
}
|
1739
|
-
|
1740
|
-
|
1741
|
-
.fetchComponents$(template.id)
|
1742
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
1743
|
-
}
|
1744
|
-
getLocalAssetsComponentMeta$() {
|
1745
|
-
if (!this.customizationService?.getAssetsComponent) {
|
1156
|
+
getLocalMeta$() {
|
1157
|
+
if (!this.customizationService?.getTemplateComponents) {
|
1746
1158
|
return of(undefined);
|
1747
1159
|
}
|
1748
|
-
return this.customizationService?.
|
1749
|
-
if (!
|
1160
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1161
|
+
if (!components) {
|
1750
1162
|
return;
|
1751
1163
|
}
|
1752
|
-
return {
|
1164
|
+
return components.map(component => ({
|
1753
1165
|
html: component.html,
|
1754
1166
|
css: component.css,
|
1755
1167
|
js: component.js,
|
1756
1168
|
json: component.json,
|
1757
|
-
};
|
1169
|
+
}));
|
1758
1170
|
}));
|
1759
1171
|
}
|
1760
|
-
|
1761
|
-
|
1172
|
+
getOrgMeta$() {
|
1173
|
+
const template = this.flowInfo.templates.SHOPPING_CART;
|
1174
|
+
if (!template) {
|
1175
|
+
return of(undefined);
|
1176
|
+
}
|
1177
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
1762
1178
|
}
|
1763
1179
|
generateUIDefinition$() {
|
1764
1180
|
return of(undefined).pipe(tap(() => {
|
1765
1181
|
if (!this.templateApiName) {
|
1766
|
-
throw new Error("Flow
|
1182
|
+
throw new Error("Flow 'assets' template is not defined.");
|
1767
1183
|
}
|
1768
|
-
}), switchMap(() => this.
|
1769
|
-
if (!
|
1184
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
1185
|
+
if (!metaList) {
|
1770
1186
|
return;
|
1771
1187
|
}
|
1772
1188
|
const uiDef = {
|
@@ -1775,25 +1191,23 @@ class AssetsComponent {
|
|
1775
1191
|
primary: true,
|
1776
1192
|
type: 'DEFAULT',
|
1777
1193
|
version: 2,
|
1778
|
-
children:
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
},
|
1785
|
-
],
|
1194
|
+
children: metaList.map(meta => ({
|
1195
|
+
children: [],
|
1196
|
+
template: meta.html && btoaSafe(meta.html),
|
1197
|
+
script: meta.js && btoaSafe(meta.js),
|
1198
|
+
styles: meta.css && btoaSafe(meta.css),
|
1199
|
+
})),
|
1786
1200
|
};
|
1787
1201
|
return uiDef;
|
1788
1202
|
}));
|
1789
1203
|
}
|
1790
1204
|
}
|
1791
|
-
AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1792
|
-
AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
1793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1205
|
+
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 });
|
1206
|
+
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 });
|
1207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, decorators: [{
|
1794
1208
|
type: Component,
|
1795
1209
|
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" }]
|
1796
|
-
}], ctorParameters: function () { return [{ type:
|
1210
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
1797
1211
|
type: Optional
|
1798
1212
|
}, {
|
1799
1213
|
type: Inject,
|
@@ -1802,10 +1216,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
1802
1216
|
|
1803
1217
|
class AssetsModule {
|
1804
1218
|
}
|
1805
|
-
AssetsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1806
|
-
AssetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
1807
|
-
AssetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
1808
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1219
|
+
AssetsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1220
|
+
AssetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, declarations: [AssetsComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [AssetsComponent] });
|
1221
|
+
AssetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsModule, decorators: [{
|
1809
1223
|
type: NgModule,
|
1810
1224
|
args: [{
|
1811
1225
|
declarations: [AssetsComponent],
|
@@ -1815,17 +1229,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
1815
1229
|
}] });
|
1816
1230
|
|
1817
1231
|
class CatalogComponent {
|
1818
|
-
constructor(templatesApi,
|
1232
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
1819
1233
|
this.templatesApi = templatesApi;
|
1820
|
-
this.contextService = contextService;
|
1821
1234
|
this.cdr = cdr;
|
1822
1235
|
this.toastService = toastService;
|
1236
|
+
this.flowInfo = flowInfo;
|
1823
1237
|
this.customizationService = customizationService;
|
1824
1238
|
this.uiDefinition = undefined;
|
1825
1239
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
1826
1240
|
this.templateApiName = '';
|
1827
1241
|
this.destroyed$ = new Subject();
|
1828
|
-
this.templateApiName = this.
|
1242
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates?.catalog ?? '';
|
1829
1243
|
}
|
1830
1244
|
ngOnInit() {
|
1831
1245
|
this.generateUIDefinition$()
|
@@ -1848,37 +1262,36 @@ class CatalogComponent {
|
|
1848
1262
|
this.destroyed$.next();
|
1849
1263
|
this.destroyed$.complete();
|
1850
1264
|
}
|
1851
|
-
|
1852
|
-
|
1853
|
-
.fetchComponents$(template.id)
|
1854
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
1855
|
-
}
|
1856
|
-
getLocalCatalogComponentMeta$() {
|
1857
|
-
if (!this.customizationService?.getCatalogComponent) {
|
1265
|
+
getLocalMeta$() {
|
1266
|
+
if (!this.customizationService?.getTemplateComponents) {
|
1858
1267
|
return of(undefined);
|
1859
1268
|
}
|
1860
|
-
return this.customizationService?.
|
1861
|
-
if (!
|
1269
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1270
|
+
if (!components) {
|
1862
1271
|
return;
|
1863
1272
|
}
|
1864
|
-
return {
|
1273
|
+
return components.map(component => ({
|
1865
1274
|
html: component.html,
|
1866
1275
|
css: component.css,
|
1867
1276
|
js: component.js,
|
1868
1277
|
json: component.json,
|
1869
|
-
};
|
1278
|
+
}));
|
1870
1279
|
}));
|
1871
1280
|
}
|
1872
|
-
|
1873
|
-
|
1281
|
+
getOrgMeta$() {
|
1282
|
+
const template = this.flowInfo.templates.CATALOG;
|
1283
|
+
if (!template) {
|
1284
|
+
return of(undefined);
|
1285
|
+
}
|
1286
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
1874
1287
|
}
|
1875
1288
|
generateUIDefinition$() {
|
1876
1289
|
return of(undefined).pipe(tap(() => {
|
1877
1290
|
if (!this.templateApiName) {
|
1878
|
-
throw new Error("Flow
|
1291
|
+
throw new Error("Flow 'catalog' template is not defined.");
|
1879
1292
|
}
|
1880
|
-
}), switchMap(() => this.
|
1881
|
-
if (!
|
1293
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
1294
|
+
if (!metaList) {
|
1882
1295
|
return;
|
1883
1296
|
}
|
1884
1297
|
const uiDef = {
|
@@ -1887,25 +1300,23 @@ class CatalogComponent {
|
|
1887
1300
|
primary: true,
|
1888
1301
|
type: 'DEFAULT',
|
1889
1302
|
version: 2,
|
1890
|
-
children:
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
},
|
1897
|
-
],
|
1303
|
+
children: metaList.map(meta => ({
|
1304
|
+
children: [],
|
1305
|
+
template: meta.html && btoaSafe(meta.html),
|
1306
|
+
script: meta.js && btoaSafe(meta.js),
|
1307
|
+
styles: meta.css && btoaSafe(meta.css),
|
1308
|
+
})),
|
1898
1309
|
};
|
1899
1310
|
return uiDef;
|
1900
1311
|
}));
|
1901
1312
|
}
|
1902
1313
|
}
|
1903
|
-
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1904
|
-
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
1905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1314
|
+
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 });
|
1315
|
+
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 });
|
1316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, decorators: [{
|
1906
1317
|
type: Component,
|
1907
1318
|
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" }]
|
1908
|
-
}], ctorParameters: function () { return [{ type:
|
1319
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
1909
1320
|
type: Optional
|
1910
1321
|
}, {
|
1911
1322
|
type: Inject,
|
@@ -1914,10 +1325,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
1914
1325
|
|
1915
1326
|
class CatalogModule {
|
1916
1327
|
}
|
1917
|
-
CatalogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1918
|
-
CatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
1919
|
-
CatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
1920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1328
|
+
CatalogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1329
|
+
CatalogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, declarations: [CatalogComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [CatalogComponent] });
|
1330
|
+
CatalogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1331
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogModule, decorators: [{
|
1921
1332
|
type: NgModule,
|
1922
1333
|
args: [{
|
1923
1334
|
declarations: [CatalogComponent],
|
@@ -1936,15 +1347,7 @@ class DebugComponent {
|
|
1936
1347
|
this.form = new FormGroup({
|
1937
1348
|
id: new FormControl(''),
|
1938
1349
|
});
|
1939
|
-
this.flows$ = this.flowsApiService.fetchFlows().pipe(
|
1940
|
-
const queryParams = flow?.properties?.queryParams ?? {};
|
1941
|
-
return {
|
1942
|
-
id: flow.id,
|
1943
|
-
entryPath: flow?.properties?.entryPath,
|
1944
|
-
queryParams,
|
1945
|
-
queryParamsStr: JSON.stringify(queryParams),
|
1946
|
-
};
|
1947
|
-
})), shareReplay());
|
1350
|
+
this.flows$ = this.flowsApiService.fetchFlows().pipe(shareReplay());
|
1948
1351
|
}
|
1949
1352
|
runFlow() {
|
1950
1353
|
const { id } = this.form.value;
|
@@ -1959,30 +1362,33 @@ class DebugComponent {
|
|
1959
1362
|
queryParams: {
|
1960
1363
|
flowId: this.selectedFlow.id,
|
1961
1364
|
[objectPropertyName]: id,
|
1962
|
-
...this.selectedFlow.queryParams,
|
1365
|
+
...this.selectedFlow.properties.queryParams,
|
1963
1366
|
},
|
1964
1367
|
relativeTo: this.activatedRoute,
|
1965
1368
|
});
|
1966
1369
|
}
|
1370
|
+
getQueryParamsString(params) {
|
1371
|
+
return new HttpParams({ fromObject: params }).toString();
|
1372
|
+
}
|
1967
1373
|
}
|
1968
|
-
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1969
|
-
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
1970
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1374
|
+
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 });
|
1375
|
+
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 });
|
1376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, decorators: [{
|
1971
1377
|
type: Component,
|
1972
|
-
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.
|
1973
|
-
}], ctorParameters: function () { return [{ type:
|
1378
|
+
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"] }]
|
1379
|
+
}], ctorParameters: function () { return [{ type: i1$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.QuoteDraftService }]; } });
|
1974
1380
|
|
1975
1381
|
const routes$1 = [{ path: '', component: DebugComponent }];
|
1976
1382
|
class DebugModule {
|
1977
1383
|
}
|
1978
|
-
DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
1979
|
-
DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
1384
|
+
DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1385
|
+
DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, declarations: [DebugComponent], imports: [CommonModule,
|
1980
1386
|
FormsModule,
|
1981
1387
|
ReactiveFormsModule, i1$2.RouterModule, RadioButtonModule,
|
1982
1388
|
ButtonModule,
|
1983
1389
|
InputTextModule,
|
1984
1390
|
DropdownModule] });
|
1985
|
-
DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
1391
|
+
DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, imports: [CommonModule,
|
1986
1392
|
FormsModule,
|
1987
1393
|
ReactiveFormsModule,
|
1988
1394
|
RouterModule.forChild(routes$1),
|
@@ -1990,7 +1396,7 @@ DebugModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "1
|
|
1990
1396
|
ButtonModule,
|
1991
1397
|
InputTextModule,
|
1992
1398
|
DropdownModule] });
|
1993
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1399
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, decorators: [{
|
1994
1400
|
type: NgModule,
|
1995
1401
|
args: [{
|
1996
1402
|
declarations: [DebugComponent],
|
@@ -2009,19 +1415,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2009
1415
|
|
2010
1416
|
class EmptyAccountComponent {
|
2011
1417
|
}
|
2012
|
-
EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2013
|
-
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 });
|
2014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1418
|
+
EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1419
|
+
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 });
|
1420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, decorators: [{
|
2015
1421
|
type: Component,
|
2016
1422
|
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"] }]
|
2017
1423
|
}] });
|
2018
1424
|
|
2019
1425
|
class EmptyAccountModule {
|
2020
1426
|
}
|
2021
|
-
EmptyAccountModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2022
|
-
EmptyAccountModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2023
|
-
EmptyAccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2024
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1427
|
+
EmptyAccountModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1428
|
+
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] });
|
1429
|
+
EmptyAccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule] });
|
1430
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, decorators: [{
|
2025
1431
|
type: NgModule,
|
2026
1432
|
args: [{
|
2027
1433
|
declarations: [EmptyAccountComponent],
|
@@ -2030,150 +1436,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2030
1436
|
}]
|
2031
1437
|
}] });
|
2032
1438
|
|
2033
|
-
class LegacyProductComponent {
|
2034
|
-
constructor(route, quoteDraftService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
|
2035
|
-
this.route = route;
|
2036
|
-
this.quoteDraftService = quoteDraftService;
|
2037
|
-
this.quoteApiService = quoteApiService;
|
2038
|
-
this.contextService = contextService;
|
2039
|
-
this.runtimeContextService = runtimeContextService;
|
2040
|
-
this.runtimeService = runtimeService;
|
2041
|
-
this.currentStateService = currentStateService;
|
2042
|
-
this.customizationService = customizationService;
|
2043
|
-
this.destroyed$ = new Subject();
|
2044
|
-
}
|
2045
|
-
ngOnInit() {
|
2046
|
-
this.quoteDraftService.quoteDraft$
|
2047
|
-
.pipe(first$1(), takeUntil$1(this.destroyed$))
|
2048
|
-
.subscribe(quote => this.init(quote, this.route.snapshot.queryParams));
|
2049
|
-
this.runtimeService.onSolutionStopEvent.pipe(take(1)).subscribe(lineItem => this.onSolutionStop(lineItem));
|
2050
|
-
this.runtimeService.onSolutionReadyEvent.pipe(take(1)).subscribe(event => this.onSolutionReady(event));
|
2051
|
-
this.runtimeService.onSolutionCancelEvent.pipe(take(1)).subscribe(() => this.onSolutionCancel());
|
2052
|
-
}
|
2053
|
-
ngOnDestroy() {
|
2054
|
-
this.destroyed$.next();
|
2055
|
-
this.destroyed$.complete();
|
2056
|
-
}
|
2057
|
-
onSolutionReady(lineItem) {
|
2058
|
-
lineItem.actionCode = lineItem.actionCode ?? 'ADD';
|
2059
|
-
}
|
2060
|
-
onSolutionCancel() {
|
2061
|
-
this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
|
2062
|
-
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
2063
|
-
});
|
2064
|
-
}
|
2065
|
-
onSolutionUpdated(lineItem) {
|
2066
|
-
const states = {
|
2067
|
-
configurableRamp: lineItem,
|
2068
|
-
currentState: this.currentStateService.currentState,
|
2069
|
-
asset: this.getAsset(lineItem),
|
2070
|
-
};
|
2071
|
-
this.runtimeService.updateRuntime(states);
|
2072
|
-
}
|
2073
|
-
onSolutionStop(lineItem) {
|
2074
|
-
this.quoteDraftService.quoteDraft$.pipe(first$1(), takeUntil$1(this.destroyed$)).subscribe(quote => {
|
2075
|
-
const quoteToUpsert = {
|
2076
|
-
...quote,
|
2077
|
-
context: this.contextService.resolve(),
|
2078
|
-
currentState: [...(this.currentStateService.currentState || []).filter(li => li.id !== lineItem.id), lineItem],
|
2079
|
-
};
|
2080
|
-
this.quoteApiService
|
2081
|
-
.upsertQuote(quoteToUpsert)
|
2082
|
-
.pipe(take(1))
|
2083
|
-
.subscribe(quote => {
|
2084
|
-
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
2085
|
-
});
|
2086
|
-
});
|
2087
|
-
}
|
2088
|
-
init(quote, queryParams) {
|
2089
|
-
const productId = queryParams['productId'];
|
2090
|
-
const lineItemId = this.getLineItemId(quote, queryParams);
|
2091
|
-
this.assets = quote.initialState;
|
2092
|
-
lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
|
2093
|
-
}
|
2094
|
-
getLineItemId(quote, queryParams) {
|
2095
|
-
if (EntityUtil.isPresent(queryParams['lineItemId'])) {
|
2096
|
-
return queryParams['lineItemId'];
|
2097
|
-
}
|
2098
|
-
return quote.currentState
|
2099
|
-
.filter(lineItem => lineItem.productId === queryParams['productId'])
|
2100
|
-
.map(lineItem => lineItem.id)
|
2101
|
-
.find(id => id);
|
2102
|
-
}
|
2103
|
-
configure(productId) {
|
2104
|
-
const runtimeContext = this.getRuntimeContext(productId, '', RuntimeOperation.INIT);
|
2105
|
-
this.startRuntime({}, runtimeContext);
|
2106
|
-
}
|
2107
|
-
reConfigure(lineItemId, currentState) {
|
2108
|
-
const currentStateItem = EntityUtil.findById(lineItemId, currentState);
|
2109
|
-
const runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, RuntimeOperation.UPDATE);
|
2110
|
-
const states = {
|
2111
|
-
configurableRamp: currentStateItem,
|
2112
|
-
currentState,
|
2113
|
-
asset: this.getAsset(currentStateItem),
|
2114
|
-
};
|
2115
|
-
this.currentStateService.update(currentState);
|
2116
|
-
this.startRuntime(states, runtimeContext);
|
2117
|
-
}
|
2118
|
-
getAsset(lineItem) {
|
2119
|
-
return this.assets && this.assets.find(a => a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId);
|
2120
|
-
}
|
2121
|
-
startRuntime(states, runtimeContext$) {
|
2122
|
-
runtimeContext$
|
2123
|
-
.pipe(take(1), map$1(runtimeContext => {
|
2124
|
-
this.runtimeService.startRuntime(runtimeContext, states);
|
2125
|
-
}))
|
2126
|
-
.subscribe();
|
2127
|
-
}
|
2128
|
-
customizeContext(productId, context) {
|
2129
|
-
if (!this.customizationService?.getLegacyUiDefinition) {
|
2130
|
-
return of(context);
|
2131
|
-
}
|
2132
|
-
return this.customizationService.getLegacyUiDefinition(productId).pipe(map$1(uiDefinitionContainer => ({
|
2133
|
-
...context,
|
2134
|
-
uiDefinitionContainer: uiDefinitionContainer ?? undefined,
|
2135
|
-
})));
|
2136
|
-
}
|
2137
|
-
getRuntimeContext(productId, offeringId, runtimeOperation) {
|
2138
|
-
return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(map$1(runtimeContext => {
|
2139
|
-
runtimeContext.invocationContext = { runtimeOperation: RuntimeOperation[runtimeOperation] };
|
2140
|
-
return runtimeContext;
|
2141
|
-
}), switchMap$1(runtimeContext => this.customizeContext(productId, runtimeContext)));
|
2142
|
-
}
|
2143
|
-
}
|
2144
|
-
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 });
|
2145
|
-
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"] }] });
|
2146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductComponent, decorators: [{
|
2147
|
-
type: Component,
|
2148
|
-
args: [{ template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"] }]
|
2149
|
-
}], 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: [{
|
2150
|
-
type: Optional
|
2151
|
-
}, {
|
2152
|
-
type: Inject,
|
2153
|
-
args: [FLOW_CUSTOMIZATION]
|
2154
|
-
}] }]; } });
|
2155
|
-
|
2156
|
-
class LegacyProductModule {
|
2157
|
-
}
|
2158
|
-
LegacyProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2159
|
-
LegacyProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [CommonModule, RuntimeModule], exports: [LegacyProductComponent] });
|
2160
|
-
LegacyProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, imports: [CommonModule, RuntimeModule] });
|
2161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: LegacyProductModule, decorators: [{
|
2162
|
-
type: NgModule,
|
2163
|
-
args: [{
|
2164
|
-
declarations: [LegacyProductComponent],
|
2165
|
-
imports: [CommonModule, RuntimeModule],
|
2166
|
-
exports: [LegacyProductComponent],
|
2167
|
-
}]
|
2168
|
-
}] });
|
2169
|
-
|
2170
1439
|
class ProductComponent {
|
2171
|
-
constructor(contextService, configurationRuntimeService, configurationService,
|
1440
|
+
constructor(contextService, configurationRuntimeService, configurationService, configurationStateService, quoteDraftService, flowInfoService, flowStateService, integrationState, customizationService) {
|
2172
1441
|
this.contextService = contextService;
|
2173
1442
|
this.configurationRuntimeService = configurationRuntimeService;
|
2174
1443
|
this.configurationService = configurationService;
|
2175
|
-
this.
|
1444
|
+
this.configurationStateService = configurationStateService;
|
2176
1445
|
this.quoteDraftService = quoteDraftService;
|
1446
|
+
this.flowInfoService = flowInfoService;
|
1447
|
+
this.flowStateService = flowStateService;
|
2177
1448
|
this.integrationState = integrationState;
|
2178
1449
|
this.customizationService = customizationService;
|
2179
1450
|
this.uiDefinition$ = new BehaviorSubject(undefined);
|
@@ -2193,12 +1464,23 @@ class ProductComponent {
|
|
2193
1464
|
}));
|
2194
1465
|
}
|
2195
1466
|
init$() {
|
2196
|
-
|
1467
|
+
let quoteDraft$;
|
1468
|
+
if (this.flowInfoService.isLegacy || !this.flowInfoService.isStateful) {
|
1469
|
+
quoteDraft$ = this.quoteDraftService.quoteDraft$;
|
1470
|
+
}
|
1471
|
+
else {
|
1472
|
+
quoteDraft$ = of(undefined);
|
1473
|
+
}
|
1474
|
+
return quoteDraft$.pipe(first(), switchMap(quote => {
|
2197
1475
|
const contextProperties = this.contextService.resolve().properties;
|
2198
1476
|
const productId = contextProperties.productId;
|
2199
1477
|
if (!productId) {
|
2200
1478
|
throw new Error(`Unable to start configuration for 'productId == null'`);
|
2201
1479
|
}
|
1480
|
+
if (!quote) {
|
1481
|
+
const offeringId = contextProperties.offeringId;
|
1482
|
+
return this.configurationRuntimeService.init({ productId, offeringId });
|
1483
|
+
}
|
2202
1484
|
const lineItemId = this.getLineItemId(quote, productId, contextProperties.lineItemId);
|
2203
1485
|
const currentStateItem = quote.currentState.find(({ id }) => id === lineItemId);
|
2204
1486
|
if (currentStateItem) {
|
@@ -2208,7 +1490,7 @@ class ProductComponent {
|
|
2208
1490
|
return this.configurationRuntimeService.init({ productId, offeringId });
|
2209
1491
|
}), switchMap(() => this.customizeUI$()), tap(() => {
|
2210
1492
|
const uiDefinition = this.configurationRuntimeService.runtimeContext?.uiDefinitionContainer?.source;
|
2211
|
-
if (uiDefinition
|
1493
|
+
if (uiDefinition) {
|
2212
1494
|
this.uiDefinition$.next(uiDefinition);
|
2213
1495
|
}
|
2214
1496
|
else {
|
@@ -2219,7 +1501,7 @@ class ProductComponent {
|
|
2219
1501
|
this.configurationRuntimeService.initializationProps.attributesMap =
|
2220
1502
|
this.integrationState.state.guidedSelling;
|
2221
1503
|
}
|
2222
|
-
}), switchMap(() => this.
|
1504
|
+
}), switchMap(() => this.configurationStateService.init$()));
|
2223
1505
|
}
|
2224
1506
|
getLineItemId(quote, productId, lineItemId) {
|
2225
1507
|
// search by lineItemId first
|
@@ -2230,12 +1512,12 @@ class ProductComponent {
|
|
2230
1512
|
return id;
|
2231
1513
|
}
|
2232
1514
|
}
|
2233
|
-
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2234
|
-
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1515
|
+
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.ConfigurationStateService }, { token: i2.QuoteDraftService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }, { token: i2.IntegrationState }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1516
|
+
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 });
|
1517
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, decorators: [{
|
2236
1518
|
type: Component,
|
2237
1519
|
args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n" }]
|
2238
|
-
}], ctorParameters: function () { return [{ type:
|
1520
|
+
}], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: i2.QuoteDraftService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }, { type: i2.IntegrationState }, { type: undefined, decorators: [{
|
2239
1521
|
type: Optional
|
2240
1522
|
}, {
|
2241
1523
|
type: Inject,
|
@@ -2244,10 +1526,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2244
1526
|
|
2245
1527
|
class ProductModule {
|
2246
1528
|
}
|
2247
|
-
ProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2248
|
-
ProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2249
|
-
ProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2250
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1529
|
+
ProductModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1530
|
+
ProductModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, declarations: [ProductComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ProductComponent] });
|
1531
|
+
ProductModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductModule, decorators: [{
|
2251
1533
|
type: NgModule,
|
2252
1534
|
args: [{
|
2253
1535
|
declarations: [ProductComponent],
|
@@ -2261,28 +1543,31 @@ class RecordNotFoundComponent {
|
|
2261
1543
|
this.router = router;
|
2262
1544
|
this.route = route;
|
2263
1545
|
this.subMessage = '';
|
1546
|
+
this.type = '';
|
2264
1547
|
const navigation = this.router.getCurrentNavigation();
|
2265
1548
|
const { state } = navigation?.extras || {};
|
2266
1549
|
this.message = state?.['message'];
|
1550
|
+
this.type = state?.['type'] || '';
|
1551
|
+
this.details = state?.['details'];
|
2267
1552
|
if (typeof this.message === 'string') {
|
2268
1553
|
this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';
|
2269
1554
|
}
|
2270
1555
|
}
|
2271
1556
|
}
|
2272
|
-
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2273
|
-
RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1557
|
+
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 });
|
1558
|
+
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 *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
|
2275
1560
|
type: Component,
|
2276
|
-
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
|
1561
|
+
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 *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"] }]
|
2277
1562
|
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
|
2278
1563
|
|
2279
1564
|
const routes = [{ path: '', component: RecordNotFoundComponent }];
|
2280
1565
|
class RecordNotFoundModule {
|
2281
1566
|
}
|
2282
|
-
RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2283
|
-
RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2284
|
-
RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2285
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1567
|
+
RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1568
|
+
RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$2.RouterModule] });
|
1569
|
+
RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, imports: [CommonModule, RouterModule.forChild(routes)] });
|
1570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, decorators: [{
|
2286
1571
|
type: NgModule,
|
2287
1572
|
args: [{
|
2288
1573
|
declarations: [RecordNotFoundComponent],
|
@@ -2335,9 +1620,8 @@ class RemoteComponent {
|
|
2335
1620
|
this.runtimeService
|
2336
1621
|
.init({ productId })
|
2337
1622
|
.pipe(first(), tap(context => {
|
2338
|
-
const uiDefinitionProperties =
|
2339
|
-
|
2340
|
-
this.uiDefinition = uiDefinition && !isLegacyUIDefinition(uiDefinition) ? uiDefinition : undefined;
|
1623
|
+
const uiDefinitionProperties = context.uiDefinitionContainer?.source.properties ?? {};
|
1624
|
+
this.uiDefinition = context.uiDefinitionContainer?.source;
|
2341
1625
|
const pricingEnabled = uiDefinitionProperties.pricingEnabled ? 'true' : 'false';
|
2342
1626
|
const priceListId = uiDefinitionProperties.priceList;
|
2343
1627
|
const runtimeContextProperties = this.runtimeService.runtimeContext?.properties;
|
@@ -2395,7 +1679,7 @@ class RemoteComponent {
|
|
2395
1679
|
let items = [lineItem];
|
2396
1680
|
for (let i = 0; i < items.length; i++) {
|
2397
1681
|
const item = items[i];
|
2398
|
-
const children = options.get(item.id);
|
1682
|
+
const children = item && options.get(item.id);
|
2399
1683
|
if (children) {
|
2400
1684
|
item.lineItems = children;
|
2401
1685
|
items = items.concat(children);
|
@@ -2468,7 +1752,7 @@ class RemoteComponent {
|
|
2468
1752
|
if (rootOption) {
|
2469
1753
|
const featureOptions = optionConfigurations[rootOption.featureName] ?? (optionConfigurations[rootOption.featureName] = []);
|
2470
1754
|
const originOption = !rootOption.hasChildren
|
2471
|
-
? optionConfigurations[rootOption.featureName]
|
1755
|
+
? optionConfigurations[rootOption.featureName]?.find(({ optionId }) => optionId === rootOption.optionId)
|
2472
1756
|
: undefined;
|
2473
1757
|
const option = originOption ?? {};
|
2474
1758
|
option.optionId = option.optionId ?? rootOption.optionId;
|
@@ -2521,8 +1805,9 @@ class RemoteComponent {
|
|
2521
1805
|
}
|
2522
1806
|
}
|
2523
1807
|
for (const option of notBundleOptions) {
|
2524
|
-
|
2525
|
-
|
1808
|
+
const bundleOption = bundleOptionsByOptionId[option.configuredProductId];
|
1809
|
+
if (bundleOption) {
|
1810
|
+
bundleOption.hasChildren = true;
|
2526
1811
|
}
|
2527
1812
|
}
|
2528
1813
|
}
|
@@ -2530,7 +1815,7 @@ class RemoteComponent {
|
|
2530
1815
|
let items = lineItem.lineItems ?? [];
|
2531
1816
|
for (let i = 0; i < items.length; i++) {
|
2532
1817
|
const item = items[i];
|
2533
|
-
if (item
|
1818
|
+
if (item?.lineItems) {
|
2534
1819
|
items = items.concat(item.lineItems.map(li => ({ ...li, parentLineItem: item })));
|
2535
1820
|
}
|
2536
1821
|
}
|
@@ -2596,7 +1881,7 @@ class RemoteComponent {
|
|
2596
1881
|
.forEach(mapping => {
|
2597
1882
|
const attribute = lineItem.attributes.find(a => a.name === mapping.name);
|
2598
1883
|
if (attribute) {
|
2599
|
-
new Set(mapping.properties[propertyName]
|
1884
|
+
new Set(mapping.properties[propertyName]?.split(',')).forEach(k => (result[k] = attribute.value));
|
2600
1885
|
}
|
2601
1886
|
});
|
2602
1887
|
return result;
|
@@ -2612,19 +1897,19 @@ class RemoteComponent {
|
|
2612
1897
|
return optionConfigurations;
|
2613
1898
|
}
|
2614
1899
|
}
|
2615
|
-
RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2616
|
-
RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2617
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1900
|
+
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.ConfigurationStateService }, { token: i2$2.MessageService }, { token: i2.IntegrationState }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component });
|
1901
|
+
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 });
|
1902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, decorators: [{
|
2618
1903
|
type: Component,
|
2619
1904
|
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" }]
|
2620
|
-
}], ctorParameters: function () { return [{ type:
|
1905
|
+
}], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: i2$2.MessageService }, { type: i2.IntegrationState }, { type: i4.Location }]; } });
|
2621
1906
|
|
2622
1907
|
class RemoteModule {
|
2623
1908
|
}
|
2624
|
-
RemoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2625
|
-
RemoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2626
|
-
RemoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2627
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
1909
|
+
RemoteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1910
|
+
RemoteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, declarations: [RemoteComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [RemoteComponent] });
|
1911
|
+
RemoteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
1912
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteModule, decorators: [{
|
2628
1913
|
type: NgModule,
|
2629
1914
|
args: [{
|
2630
1915
|
declarations: [RemoteComponent],
|
@@ -2634,17 +1919,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2634
1919
|
}] });
|
2635
1920
|
|
2636
1921
|
class ShoppingCartComponent {
|
2637
|
-
constructor(templatesApi,
|
1922
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
2638
1923
|
this.templatesApi = templatesApi;
|
2639
|
-
this.contextService = contextService;
|
2640
1924
|
this.cdr = cdr;
|
2641
1925
|
this.toastService = toastService;
|
1926
|
+
this.flowInfo = flowInfo;
|
2642
1927
|
this.customizationService = customizationService;
|
2643
1928
|
this.uiDefinition = undefined;
|
2644
1929
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
2645
1930
|
this.templateApiName = '';
|
2646
1931
|
this.destroyed$ = new Subject();
|
2647
|
-
this.templateApiName = this.
|
1932
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates?.shoppingCart ?? '';
|
2648
1933
|
}
|
2649
1934
|
ngOnInit() {
|
2650
1935
|
this.generateUIDefinition$()
|
@@ -2655,7 +1940,7 @@ class ShoppingCartComponent {
|
|
2655
1940
|
this.uiDefinition = uiDef;
|
2656
1941
|
this.state$.next({ loading: false, failure: false });
|
2657
1942
|
}), catchError(err => {
|
2658
|
-
const message = 'Failed to resolve Shopping
|
1943
|
+
const message = 'Failed to resolve Shopping Cart component. ' + (err.message ?? '');
|
2659
1944
|
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
2660
1945
|
this.uiDefinition = undefined;
|
2661
1946
|
this.state$.next({ loading: false, failure: true });
|
@@ -2667,37 +1952,36 @@ class ShoppingCartComponent {
|
|
2667
1952
|
this.destroyed$.next();
|
2668
1953
|
this.destroyed$.complete();
|
2669
1954
|
}
|
2670
|
-
|
2671
|
-
|
2672
|
-
.fetchComponents$(template.id)
|
2673
|
-
.pipe(map(components => components.find(c => c.type === UITemplateComponentType.ROOT) ?? undefined));
|
2674
|
-
}
|
2675
|
-
getLocalShoppingCartComponentMeta$() {
|
2676
|
-
if (!this.customizationService?.getShoppingCartComponent) {
|
1955
|
+
getLocalMeta$() {
|
1956
|
+
if (!this.customizationService?.getTemplateComponents) {
|
2677
1957
|
return of(undefined);
|
2678
1958
|
}
|
2679
|
-
return this.customizationService?.
|
2680
|
-
if (!
|
1959
|
+
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1960
|
+
if (!components) {
|
2681
1961
|
return;
|
2682
1962
|
}
|
2683
|
-
return {
|
1963
|
+
return components.map(component => ({
|
2684
1964
|
html: component.html,
|
2685
1965
|
css: component.css,
|
2686
1966
|
js: component.js,
|
2687
1967
|
json: component.json,
|
2688
|
-
};
|
1968
|
+
}));
|
2689
1969
|
}));
|
2690
1970
|
}
|
2691
|
-
|
2692
|
-
|
1971
|
+
getOrgMeta$() {
|
1972
|
+
const template = this.flowInfo.templates.SHOPPING_CART;
|
1973
|
+
if (!template) {
|
1974
|
+
return of(undefined);
|
1975
|
+
}
|
1976
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
2693
1977
|
}
|
2694
1978
|
generateUIDefinition$() {
|
2695
1979
|
return of(undefined).pipe(tap(() => {
|
2696
1980
|
if (!this.templateApiName) {
|
2697
|
-
throw new Error("Flow
|
1981
|
+
throw new Error("Flow 'shoppingCart' template is not defined.");
|
2698
1982
|
}
|
2699
|
-
}), switchMap(() => this.
|
2700
|
-
if (!
|
1983
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
1984
|
+
if (!metaList) {
|
2701
1985
|
return;
|
2702
1986
|
}
|
2703
1987
|
const uiDef = {
|
@@ -2706,25 +1990,23 @@ class ShoppingCartComponent {
|
|
2706
1990
|
primary: true,
|
2707
1991
|
type: 'DEFAULT',
|
2708
1992
|
version: 2,
|
2709
|
-
children:
|
2710
|
-
|
2711
|
-
|
2712
|
-
|
2713
|
-
|
2714
|
-
|
2715
|
-
},
|
2716
|
-
],
|
1993
|
+
children: metaList.map(meta => ({
|
1994
|
+
children: [],
|
1995
|
+
template: meta.html && btoaSafe(meta.html),
|
1996
|
+
script: meta.js && btoaSafe(meta.js),
|
1997
|
+
styles: meta.css && btoaSafe(meta.css),
|
1998
|
+
})),
|
2717
1999
|
};
|
2718
2000
|
return uiDef;
|
2719
2001
|
}));
|
2720
2002
|
}
|
2721
2003
|
}
|
2722
|
-
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2723
|
-
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.
|
2724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2004
|
+
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 });
|
2005
|
+
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 });
|
2006
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, decorators: [{
|
2725
2007
|
type: Component,
|
2726
2008
|
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" }]
|
2727
|
-
}], ctorParameters: function () { return [{ type:
|
2009
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
2728
2010
|
type: Optional
|
2729
2011
|
}, {
|
2730
2012
|
type: Inject,
|
@@ -2733,10 +2015,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2733
2015
|
|
2734
2016
|
class ShoppingCartModule {
|
2735
2017
|
}
|
2736
|
-
ShoppingCartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2737
|
-
ShoppingCartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2738
|
-
ShoppingCartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2739
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2018
|
+
ShoppingCartModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2019
|
+
ShoppingCartModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [CommonModule, PreviewModule, LoaderModule], exports: [ShoppingCartComponent] });
|
2020
|
+
ShoppingCartModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, imports: [CommonModule, PreviewModule, LoaderModule] });
|
2021
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartModule, decorators: [{
|
2740
2022
|
type: NgModule,
|
2741
2023
|
args: [{
|
2742
2024
|
declarations: [ShoppingCartComponent],
|
@@ -2746,138 +2028,120 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2746
2028
|
}] });
|
2747
2029
|
|
2748
2030
|
class FlowResolver {
|
2749
|
-
constructor(router,
|
2031
|
+
constructor(router, routerService, contextService, flowInfo) {
|
2750
2032
|
this.router = router;
|
2751
|
-
this.flowsApiService = flowsApiService;
|
2752
2033
|
this.routerService = routerService;
|
2753
2034
|
this.contextService = contextService;
|
2754
|
-
|
2755
|
-
handleError(route, message, queryParams) {
|
2756
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
2757
|
-
return this.router.navigate([parentUrl, '404'], {
|
2758
|
-
queryParams,
|
2759
|
-
state: {
|
2760
|
-
message: message,
|
2761
|
-
},
|
2762
|
-
});
|
2035
|
+
this.flowInfo = flowInfo;
|
2763
2036
|
}
|
2764
2037
|
resolve(route) {
|
2765
2038
|
const { queryParams } = route;
|
2766
|
-
const
|
2767
|
-
if (!
|
2768
|
-
return
|
2769
|
-
}
|
2770
|
-
|
2771
|
-
|
2772
|
-
|
2773
|
-
|
2774
|
-
|
2775
|
-
|
2776
|
-
|
2777
|
-
|
2778
|
-
|
2779
|
-
|
2780
|
-
|
2781
|
-
|
2782
|
-
|
2783
|
-
|
2784
|
-
|
2785
|
-
|
2786
|
-
|
2787
|
-
|
2788
|
-
|
2789
|
-
|
2790
|
-
|
2791
|
-
|
2792
|
-
|
2793
|
-
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2794
|
-
return this.handleError(route, message, mergedParams);
|
2795
|
-
});
|
2039
|
+
const flow = this.flowInfo.flow;
|
2040
|
+
if (!flow) {
|
2041
|
+
return of(false);
|
2042
|
+
}
|
2043
|
+
const { properties } = flow;
|
2044
|
+
const { queryParams: flowQueryParams, entryPath } = properties;
|
2045
|
+
const mergedQueryParams = {
|
2046
|
+
...queryParams,
|
2047
|
+
...flowQueryParams,
|
2048
|
+
};
|
2049
|
+
const contextProperties = Object.entries({
|
2050
|
+
...mergedQueryParams,
|
2051
|
+
...getDefaultProperties({ flowParams: properties }),
|
2052
|
+
}).reduce((trunk, [key, value]) => ({ ...trunk, [key]: String(value) }), {});
|
2053
|
+
this.contextService.update({ properties: contextProperties });
|
2054
|
+
this.flowInfo.flow = flow;
|
2055
|
+
const parentUrl = this.routerService.getFlowRootPath(route);
|
2056
|
+
const entryUrl = String(entryPath ?? '')
|
2057
|
+
.split('/')
|
2058
|
+
.filter(Boolean);
|
2059
|
+
return from(this.router.navigate([parentUrl, ...entryUrl], {
|
2060
|
+
queryParams: mergedQueryParams,
|
2061
|
+
replaceUrl: true,
|
2062
|
+
})).pipe(catchError$1(e => {
|
2063
|
+
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2064
|
+
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
2065
|
+
return this.routerService.showErrorPage$(message, errorDetails);
|
2796
2066
|
}));
|
2797
2067
|
}
|
2798
2068
|
}
|
2799
|
-
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2800
|
-
FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2801
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2069
|
+
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 });
|
2070
|
+
FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver });
|
2071
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, decorators: [{
|
2802
2072
|
type: Injectable
|
2803
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type:
|
2073
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }]; } });
|
2804
2074
|
|
2805
2075
|
class QuoteResolver {
|
2806
|
-
constructor(router, quoteDraftService, routerService, contextService,
|
2076
|
+
constructor(router, quoteDraftService, routerService, contextService, flowInfo, flowStateService) {
|
2807
2077
|
this.router = router;
|
2808
2078
|
this.quoteDraftService = quoteDraftService;
|
2809
2079
|
this.routerService = routerService;
|
2810
2080
|
this.contextService = contextService;
|
2811
|
-
this.
|
2812
|
-
this.
|
2813
|
-
}
|
2814
|
-
handleError(route, message) {
|
2815
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
2816
|
-
return from(this.router.navigate([parentUrl, '404'], { state: { message } }));
|
2817
|
-
}
|
2818
|
-
calculate$() {
|
2819
|
-
const quoteDraft = this.quoteDraftService.quoteDraft;
|
2820
|
-
if (!this.quoteDraftService.isStandalone && quoteDraft && !this.accountHasNotAssets()) {
|
2821
|
-
return this.flowConfiguration.calculate$(quoteDraft);
|
2822
|
-
}
|
2823
|
-
return of(undefined);
|
2081
|
+
this.flowInfo = flowInfo;
|
2082
|
+
this.flowStateService = flowStateService;
|
2824
2083
|
}
|
2825
2084
|
resolve(route) {
|
2826
|
-
const
|
2827
|
-
|
2828
|
-
|
2085
|
+
const flow = this.flowInfo.flow;
|
2086
|
+
if (!flow) {
|
2087
|
+
return of(false);
|
2088
|
+
}
|
2089
|
+
if (this.flowStateService.isInitialized()) {
|
2829
2090
|
return of(true);
|
2830
2091
|
}
|
2831
|
-
|
2832
|
-
return this.quoteDraftService.init(headerId, queryParams).pipe(switchMap(() => this.calculate$()), tap(() => {
|
2833
|
-
if (!this.quoteDraftService.isStandalone && queryParams.suppressInitialNavigation !== 'true') {
|
2834
|
-
if (this.shouldNavigateToAssets()) {
|
2835
|
-
this.changeNavigation('/assets', route);
|
2836
|
-
}
|
2837
|
-
else if (!this.quoteDraftService.isInitialized && this.quoteDraftService.hasProducts) {
|
2838
|
-
this.changeNavigation('/cart', route);
|
2839
|
-
}
|
2840
|
-
}
|
2841
|
-
this.initializeModifiedAssetsMap();
|
2842
|
-
this.quoteDraftService.isInitialized = true;
|
2843
|
-
this.quoteDraftService.hasUnsavedChanges = false;
|
2844
|
-
}), catchError(e => {
|
2092
|
+
return this.flowStateService.init$().pipe(switchMap(() => this.checkDynamicNavigation$(route)), catchError(e => {
|
2845
2093
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2846
|
-
|
2094
|
+
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
2095
|
+
return this.routerService.showErrorPage$(message, errorDetails);
|
2847
2096
|
}));
|
2848
2097
|
}
|
2849
|
-
|
2850
|
-
const
|
2851
|
-
|
2852
|
-
|
2853
|
-
queryParams: route.queryParams,
|
2854
|
-
replaceUrl: true,
|
2855
|
-
})
|
2856
|
-
.catch(e => {
|
2857
|
-
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2858
|
-
return this.handleError(route, message);
|
2859
|
-
});
|
2860
|
-
}
|
2861
|
-
shouldNavigateToAssets() {
|
2862
|
-
if (this.contextService.mode === ConfigurationContextMode.ACCOUNT) {
|
2863
|
-
return true;
|
2098
|
+
checkDynamicNavigation$(route) {
|
2099
|
+
const flow = this.flowInfo.flow;
|
2100
|
+
if (!flow) {
|
2101
|
+
return of(true);
|
2864
2102
|
}
|
2865
|
-
|
2866
|
-
|
2867
|
-
|
2868
|
-
return this.
|
2103
|
+
if (flow.properties.suppressInitialNavigation || flow.properties.standalone) {
|
2104
|
+
return of(true);
|
2105
|
+
}
|
2106
|
+
return this.getNavigateTo().pipe(switchMap(navigateTo => {
|
2107
|
+
if (!navigateTo) {
|
2108
|
+
return of(true);
|
2109
|
+
}
|
2110
|
+
const parentUrl = this.routerService.getFlowRootPath(route);
|
2111
|
+
return from(this.router.navigate([parentUrl + navigateTo], {
|
2112
|
+
queryParams: route.queryParams,
|
2113
|
+
replaceUrl: true,
|
2114
|
+
}));
|
2115
|
+
}));
|
2869
2116
|
}
|
2870
|
-
|
2871
|
-
this.
|
2872
|
-
|
2873
|
-
|
2117
|
+
getNavigateTo() {
|
2118
|
+
const flow = this.flowInfo.flow;
|
2119
|
+
let navigateTo;
|
2120
|
+
if (flow?.properties.stateful) {
|
2121
|
+
return this.flowStateService.select$(UITemplateType.FLOW_ENGINE, 'NAVIGATE_TO').pipe(map(r => {
|
2122
|
+
if (r.success) {
|
2123
|
+
return r.result;
|
2124
|
+
}
|
2125
|
+
return '';
|
2126
|
+
}));
|
2127
|
+
}
|
2128
|
+
else {
|
2129
|
+
const isAccountMode = this.contextService.mode === ConfigurationContextMode.ACCOUNT;
|
2130
|
+
if (isAccountMode || this.quoteDraftService.hasAssets) {
|
2131
|
+
navigateTo = '/assets';
|
2132
|
+
}
|
2133
|
+
else if (this.quoteDraftService.hasProducts) {
|
2134
|
+
navigateTo = '/cart';
|
2135
|
+
}
|
2136
|
+
}
|
2137
|
+
return of(navigateTo);
|
2874
2138
|
}
|
2875
2139
|
}
|
2876
|
-
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2877
|
-
QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.
|
2878
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2140
|
+
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 });
|
2141
|
+
QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver });
|
2142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, decorators: [{
|
2879
2143
|
type: Injectable
|
2880
|
-
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type:
|
2144
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.QuoteDraftService }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
|
2881
2145
|
|
2882
2146
|
const rootRoute = {
|
2883
2147
|
id: VELOCE_FLOW_ROOT_ROUTE,
|
@@ -2887,107 +2151,99 @@ const rootRoute = {
|
|
2887
2151
|
canDeactivate: [RootGuard],
|
2888
2152
|
children: [
|
2889
2153
|
{
|
2890
|
-
path: '
|
2891
|
-
|
2892
|
-
|
2893
|
-
canActivate: [ContextGuard],
|
2894
|
-
children: [],
|
2895
|
-
},
|
2896
|
-
{
|
2897
|
-
path: 'legacy',
|
2154
|
+
path: '',
|
2155
|
+
canActivate: [keepFlowInitialized],
|
2156
|
+
runGuardsAndResolvers: 'always',
|
2898
2157
|
children: [
|
2158
|
+
{
|
2159
|
+
path: 'flows',
|
2160
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2161
|
+
resolve: { flow: FlowResolver },
|
2162
|
+
canActivate: [ContextGuard],
|
2163
|
+
children: [],
|
2164
|
+
},
|
2899
2165
|
{
|
2900
2166
|
path: 'product',
|
2901
|
-
component:
|
2167
|
+
component: ProductComponent,
|
2168
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2169
|
+
resolve: { quote: QuoteResolver },
|
2170
|
+
canActivate: [ContextGuard],
|
2171
|
+
canDeactivate: [ProductUnloadGuard],
|
2172
|
+
data: { showHeader: true },
|
2173
|
+
},
|
2174
|
+
{
|
2175
|
+
path: 'cart',
|
2176
|
+
component: ShoppingCartComponent,
|
2177
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2178
|
+
resolve: { quote: QuoteResolver },
|
2179
|
+
canActivate: [ContextGuard],
|
2180
|
+
data: { showHeader: true },
|
2181
|
+
},
|
2182
|
+
{
|
2183
|
+
path: 'catalog',
|
2184
|
+
component: CatalogComponent,
|
2185
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2186
|
+
resolve: { quote: QuoteResolver },
|
2187
|
+
canActivate: [ContextGuard],
|
2188
|
+
data: { showHeader: true },
|
2189
|
+
},
|
2190
|
+
{
|
2191
|
+
path: 'assets',
|
2192
|
+
component: AssetsComponent,
|
2193
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2194
|
+
resolve: { quote: QuoteResolver },
|
2195
|
+
canActivate: [ContextGuard],
|
2196
|
+
data: { showHeader: true },
|
2197
|
+
},
|
2198
|
+
{
|
2199
|
+
path: 'empty',
|
2200
|
+
component: EmptyAccountComponent,
|
2201
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2202
|
+
resolve: { quote: QuoteResolver },
|
2203
|
+
canActivate: [ContextGuard],
|
2204
|
+
data: { showHeader: true },
|
2205
|
+
},
|
2206
|
+
{
|
2207
|
+
path: 'remote',
|
2208
|
+
component: RemoteComponent,
|
2902
2209
|
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2903
2210
|
resolve: { quote: QuoteResolver },
|
2904
2211
|
canActivate: [ContextGuard],
|
2905
2212
|
},
|
2213
|
+
{
|
2214
|
+
path: 'debug',
|
2215
|
+
loadChildren: () => DebugModule,
|
2216
|
+
},
|
2217
|
+
{
|
2218
|
+
path: '404',
|
2219
|
+
loadChildren: () => RecordNotFoundModule,
|
2220
|
+
},
|
2906
2221
|
],
|
2907
2222
|
},
|
2908
|
-
{
|
2909
|
-
path: 'product',
|
2910
|
-
component: ProductComponent,
|
2911
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2912
|
-
resolve: { quote: QuoteResolver },
|
2913
|
-
canActivate: [ContextGuard],
|
2914
|
-
canDeactivate: [ProductUnloadGuard],
|
2915
|
-
data: { showHeader: true },
|
2916
|
-
},
|
2917
|
-
{
|
2918
|
-
path: 'cart',
|
2919
|
-
component: ShoppingCartComponent,
|
2920
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2921
|
-
resolve: { quote: QuoteResolver },
|
2922
|
-
canActivate: [ContextGuard],
|
2923
|
-
data: { showHeader: true },
|
2924
|
-
},
|
2925
|
-
{
|
2926
|
-
path: 'catalog',
|
2927
|
-
component: CatalogComponent,
|
2928
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2929
|
-
resolve: { quote: QuoteResolver },
|
2930
|
-
canActivate: [ContextGuard],
|
2931
|
-
data: { showHeader: true },
|
2932
|
-
},
|
2933
|
-
{
|
2934
|
-
path: 'assets',
|
2935
|
-
component: AssetsComponent,
|
2936
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2937
|
-
resolve: { quote: QuoteResolver },
|
2938
|
-
canActivate: [ContextGuard],
|
2939
|
-
data: { showHeader: true },
|
2940
|
-
},
|
2941
|
-
{
|
2942
|
-
path: 'empty',
|
2943
|
-
component: EmptyAccountComponent,
|
2944
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2945
|
-
resolve: { quote: QuoteResolver },
|
2946
|
-
canActivate: [ContextGuard],
|
2947
|
-
data: { showHeader: true },
|
2948
|
-
},
|
2949
|
-
{
|
2950
|
-
path: 'remote',
|
2951
|
-
component: RemoteComponent,
|
2952
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2953
|
-
resolve: { quote: QuoteResolver },
|
2954
|
-
canActivate: [ContextGuard],
|
2955
|
-
},
|
2956
|
-
{
|
2957
|
-
path: 'debug',
|
2958
|
-
loadChildren: () => DebugModule,
|
2959
|
-
},
|
2960
|
-
{
|
2961
|
-
path: '404',
|
2962
|
-
loadChildren: () => RecordNotFoundModule,
|
2963
|
-
},
|
2964
2223
|
],
|
2965
2224
|
};
|
2966
2225
|
class FlowRoutingModule {
|
2967
2226
|
}
|
2968
|
-
FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
2969
|
-
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2970
|
-
LegacyProductModule,
|
2227
|
+
FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2228
|
+
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
|
2971
2229
|
ShoppingCartModule,
|
2972
2230
|
CatalogModule,
|
2973
2231
|
AssetsModule,
|
2974
2232
|
RemoteModule,
|
2975
2233
|
EmptyAccountModule], exports: [RouterModule] });
|
2976
|
-
FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2234
|
+
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]),
|
2977
2235
|
ProductModule,
|
2978
|
-
LegacyProductModule,
|
2979
2236
|
ShoppingCartModule,
|
2980
2237
|
CatalogModule,
|
2981
2238
|
AssetsModule,
|
2982
2239
|
RemoteModule,
|
2983
2240
|
EmptyAccountModule, RouterModule] });
|
2984
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, decorators: [{
|
2985
2242
|
type: NgModule,
|
2986
2243
|
args: [{
|
2987
2244
|
imports: [
|
2988
2245
|
RouterModule.forChild([rootRoute]),
|
2989
2246
|
ProductModule,
|
2990
|
-
LegacyProductModule,
|
2991
2247
|
ShoppingCartModule,
|
2992
2248
|
CatalogModule,
|
2993
2249
|
AssetsModule,
|
@@ -2999,11 +2255,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
2999
2255
|
}]
|
3000
2256
|
}] });
|
3001
2257
|
|
3002
|
-
class
|
2258
|
+
class FlowDocGenService {
|
3003
2259
|
constructor(integrationState) {
|
3004
2260
|
this.integrationState = integrationState;
|
3005
2261
|
this.cleanup$ = new Subject();
|
3006
|
-
this.isVisibleSubj$ = new BehaviorSubject(
|
2262
|
+
this.isVisibleSubj$ = new BehaviorSubject(false);
|
3007
2263
|
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
3008
2264
|
this.initSubscriptions();
|
3009
2265
|
}
|
@@ -3012,47 +2268,80 @@ class FlowGuidedSellingService {
|
|
3012
2268
|
}
|
3013
2269
|
initSubscriptions() {
|
3014
2270
|
this.integrationState
|
3015
|
-
.listen$(FlowAction.
|
2271
|
+
.listen$(FlowAction.FLOW_OPEN_DOC_GEN)
|
3016
2272
|
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
3017
2273
|
.subscribe();
|
3018
2274
|
this.integrationState
|
3019
|
-
.listen$(FlowAction.
|
2275
|
+
.listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
|
3020
2276
|
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
3021
2277
|
.subscribe();
|
3022
2278
|
}
|
3023
2279
|
}
|
3024
|
-
|
3025
|
-
|
3026
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2280
|
+
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
2281
|
+
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
|
2282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
|
3027
2283
|
type: Injectable
|
3028
|
-
}], ctorParameters: function () { return [{ type:
|
2284
|
+
}], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
|
2285
|
+
|
2286
|
+
const configurePrimengShadowDOM = () => {
|
2287
|
+
DomHandler.getScrollableParents = (element) => {
|
2288
|
+
const scrollableParents = [];
|
2289
|
+
if (element) {
|
2290
|
+
const parents = DomHandler.getParents(element).filter((item) => !(item instanceof ShadowRoot));
|
2291
|
+
const overflowRegex = /(auto|scroll)/;
|
2292
|
+
const overflowCheck = (node) => {
|
2293
|
+
const styleDeclaration = window['getComputedStyle'](node, null);
|
2294
|
+
return (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) ||
|
2295
|
+
overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) ||
|
2296
|
+
overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
|
2297
|
+
};
|
2298
|
+
for (const parent of parents) {
|
2299
|
+
const scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
|
2300
|
+
if (scrollSelectors) {
|
2301
|
+
const selectors = scrollSelectors.split(',');
|
2302
|
+
for (const selector of selectors) {
|
2303
|
+
const el = DomHandler.findSingle(parent, selector);
|
2304
|
+
if (el && overflowCheck(el)) {
|
2305
|
+
scrollableParents.push(el);
|
2306
|
+
}
|
2307
|
+
}
|
2308
|
+
}
|
2309
|
+
if (parent.nodeType !== 9 && overflowCheck(parent)) {
|
2310
|
+
scrollableParents.push(parent);
|
2311
|
+
}
|
2312
|
+
}
|
2313
|
+
}
|
2314
|
+
return scrollableParents;
|
2315
|
+
};
|
2316
|
+
};
|
3029
2317
|
|
2318
|
+
configurePrimengShadowDOM();
|
3030
2319
|
class FlowModule {
|
3031
2320
|
}
|
3032
|
-
FlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.
|
3033
|
-
FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.
|
2321
|
+
FlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2322
|
+
FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, declarations: [FlowComponent], imports: [CommonModule,
|
3034
2323
|
LetDirectiveModule,
|
3035
2324
|
FlowRoutingModule,
|
3036
2325
|
ApiModule,
|
3037
2326
|
LauncherModule,
|
3038
2327
|
LoaderModule,
|
3039
|
-
|
2328
|
+
FlowNewHeaderModule,
|
3040
2329
|
FlowDialogModule,
|
3041
2330
|
SdkCoreModule,
|
3042
2331
|
DocGenModule,
|
3043
2332
|
GuidedSellingModule] });
|
3044
|
-
FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.
|
2333
|
+
FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowDocGenService, FlowGuidedSellingService], imports: [CommonModule,
|
3045
2334
|
LetDirectiveModule,
|
3046
2335
|
FlowRoutingModule,
|
3047
2336
|
ApiModule,
|
3048
2337
|
LauncherModule,
|
3049
2338
|
LoaderModule,
|
3050
|
-
|
2339
|
+
FlowNewHeaderModule,
|
3051
2340
|
FlowDialogModule,
|
3052
2341
|
SdkCoreModule,
|
3053
2342
|
DocGenModule,
|
3054
2343
|
GuidedSellingModule] });
|
3055
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.
|
2344
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, decorators: [{
|
3056
2345
|
type: NgModule,
|
3057
2346
|
args: [{
|
3058
2347
|
declarations: [FlowComponent],
|
@@ -3063,7 +2352,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
3063
2352
|
ApiModule,
|
3064
2353
|
LauncherModule,
|
3065
2354
|
LoaderModule,
|
3066
|
-
|
2355
|
+
FlowNewHeaderModule,
|
3067
2356
|
FlowDialogModule,
|
3068
2357
|
SdkCoreModule,
|
3069
2358
|
DocGenModule,
|
@@ -3077,5 +2366,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
3077
2366
|
* Generated bundle index. Do not edit.
|
3078
2367
|
*/
|
3079
2368
|
|
3080
|
-
export { ContextGuard,
|
2369
|
+
export { ContextGuard, FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
|
3081
2370
|
//# sourceMappingURL=veloceapps-sdk.mjs.map
|