@veloceapps/sdk 7.0.0-8 → 7.0.1-0
Sign up to get free protection for your applications and to get access to all the features.
- package/cms/README.md +45 -0
- package/cms/cms.actions.d.ts +10 -0
- package/cms/components/element-children/element-children.component.d.ts +1 -1
- package/cms/components/element-drop-handle/element-drop-handle.component.d.ts +1 -1
- package/cms/components/element-renderer/element-renderer.component.d.ts +1 -1
- package/cms/components/plugin.component.d.ts +2 -2
- package/cms/components/preview/preview.component.d.ts +4 -3
- package/cms/directives/custom-template.directive.d.ts +1 -1
- package/cms/modules/federated/federated-host.directive.d.ts +8 -0
- package/cms/modules/federated/federated.component.d.ts +5 -7
- package/cms/modules/federated/federated.module.d.ts +4 -3
- package/cms/modules/federated/federated.types.d.ts +1 -5
- package/cms/modules/migrations/types/migrations.types.d.ts +1 -1
- package/cms/plugins/configuration.plugin.d.ts +1 -1
- package/cms/plugins/io.plugin.d.ts +1 -1
- package/cms/plugins/region.plugin.d.ts +1 -1
- package/cms/plugins/script.plugin.d.ts +1 -1
- package/cms/services/templates.service.d.ts +1 -1
- package/cms/types/common.types.d.ts +2 -2
- package/cms/types/elements.types.d.ts +1 -1
- package/cms/types/integration.types.d.ts +1 -1
- package/cms/types/layouts.types.d.ts +1 -1
- package/cms/utils/element.utils.d.ts +2 -2
- package/cms/vendor-map.d.ts +2 -1
- package/core/README.md +5 -0
- package/core/modules/flow-configuration/types/update.types.d.ts +2 -2
- package/core/services/metric-calculation/metric-calculation.types.d.ts +1 -1
- package/core/types/ui-definition.types.d.ts +2 -2
- package/esm2020/cms/cms.actions.mjs +56 -0
- package/esm2020/cms/components/element-children/element-children.component.mjs +35 -0
- package/esm2020/cms/components/element-children/element-children.module.mjs +20 -0
- package/esm2020/cms/components/element-drop-handle/element-drop-handle.component.mjs +28 -0
- package/esm2020/cms/components/element-drop-handle/element-drop-handle.module.mjs +19 -0
- package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +160 -0
- package/{esm2015/cms/components/element-renderer/element-renderer.module.js → esm2020/cms/components/element-renderer/element-renderer.module.mjs} +5 -5
- package/esm2020/cms/components/element.component.mjs +45 -0
- package/esm2020/cms/components/plugin.component.mjs +17 -0
- package/esm2020/cms/components/preview/preview.component.mjs +103 -0
- package/esm2020/cms/components/preview/preview.module.mjs +24 -0
- package/esm2020/cms/directives/custom-template.directive.mjs +26 -0
- package/esm2020/cms/engine/models/entity.mjs +17 -0
- package/esm2020/cms/launcher.module.mjs +24 -0
- package/esm2020/cms/modules/federated/federated-host.directive.mjs +16 -0
- package/esm2020/cms/modules/federated/federated.component.mjs +64 -0
- package/esm2020/cms/modules/federated/federated.module.mjs +20 -0
- package/esm2020/cms/modules/federated/federated.types.mjs +2 -0
- package/esm2020/cms/modules/migrations/migrations.mjs +15 -0
- package/{esm2015/cms/modules/migrations/migrations.module.js → esm2020/cms/modules/migrations/migrations.module.mjs} +5 -5
- package/esm2020/cms/modules/migrations/services/migrations.service.mjs +43 -0
- package/{esm2015/cms/modules/runtime/runtime.module.js → esm2020/cms/modules/runtime/runtime.module.mjs} +6 -6
- package/esm2020/cms/modules/runtime/services/compilation.service.mjs +83 -0
- package/esm2020/cms/modules/runtime/services/runtime-editor.service.mjs +28 -0
- package/esm2020/cms/modules/runtime/services/runtime.service.mjs +74 -0
- package/esm2020/cms/plugins/configuration.plugin.mjs +105 -0
- package/esm2020/cms/plugins/io.plugin.mjs +36 -0
- package/esm2020/cms/plugins/region.plugin.mjs +58 -0
- package/esm2020/cms/plugins/script.plugin.mjs +65 -0
- package/{esm2015/cms/services/element-context.service.js → esm2020/cms/services/element-context.service.mjs} +4 -4
- package/esm2020/cms/services/integration.state.mjs +40 -0
- package/esm2020/cms/services/io-provider.service.mjs +50 -0
- package/esm2020/cms/services/resources.service.mjs +49 -0
- package/{esm2015/cms/services/templates.service.js → esm2020/cms/services/templates.service.mjs} +4 -4
- package/esm2020/cms/utils/element.utils.mjs +160 -0
- package/esm2020/cms/utils/elements-resolver.mjs +189 -0
- package/esm2020/cms/utils/path.utils.mjs +53 -0
- package/esm2020/cms/utils/ui-definition.utils.mjs +87 -0
- package/esm2020/cms/vendor-map.mjs +67 -0
- package/esm2020/core/core.module.mjs +18 -0
- package/{esm2015/core/modules/configuration/configuration.module.js → esm2020/core/modules/configuration/configuration.module.mjs} +6 -6
- package/esm2020/core/modules/configuration/helpers.mjs +18 -0
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +106 -0
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +183 -0
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +50 -0
- package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +18 -0
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +150 -0
- package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +129 -0
- package/esm2020/core/services/context.service.mjs +64 -0
- package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +85 -0
- package/esm2020/core/services/product-images.service.mjs +31 -0
- package/esm2020/core/services/quote-draft.service.mjs +232 -0
- package/esm2020/core/utils/line-item.utils.mjs +161 -0
- package/esm2020/core/utils/line-item.worker.mjs +19 -0
- package/esm2020/runtime/components/component-preview/component-preview.component.mjs +125 -0
- package/esm2020/runtime/components/section-renderer/section-renderer.component.mjs +67 -0
- package/esm2020/runtime/components/ui-runtime/runtime.component.mjs +440 -0
- package/esm2020/runtime/components/ui-runtime-preview/runtime-preview.component.mjs +108 -0
- package/esm2020/runtime/execution/components/children-placeholder/children-placeholder.component.mjs +60 -0
- package/esm2020/runtime/execution/components/context-provider/context-provider.component.mjs +39 -0
- package/esm2020/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.mjs +67 -0
- package/esm2020/runtime/execution/components/federated/federated.component.mjs +74 -0
- package/esm2020/runtime/execution/components/velo-attribute/velo-attribute.component.mjs +60 -0
- package/esm2020/runtime/execution/components/velo-multiselect/velo-multiselect.component.mjs +130 -0
- package/esm2020/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.mjs +72 -0
- package/esm2020/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.mjs +97 -0
- package/esm2020/runtime/execution/components/velo-port-radio/velo-port-radio.component.mjs +142 -0
- package/esm2020/runtime/execution/components/velo-type/velo-type.component.mjs +119 -0
- package/esm2020/runtime/execution/directives/section-script.directive.mjs +247 -0
- package/esm2020/runtime/execution/directives/sf-query.directive.mjs +35 -0
- package/esm2020/runtime/execution/directives/velo-attribute.directive.mjs +88 -0
- package/esm2020/runtime/execution/directives/velo-port.directive.mjs +376 -0
- package/esm2020/runtime/execution/directives/vl-approval.directive.mjs +23 -0
- package/esm2020/runtime/execution/directives/vl-document-attachments.directive.mjs +36 -0
- package/esm2020/runtime/execution/directives/vl-document-templates.directive.mjs +60 -0
- package/esm2020/runtime/execution/directives/vl-quote.directive.mjs +42 -0
- package/esm2020/runtime/execution/directives/vl-ramp.directive.mjs +55 -0
- package/esm2020/runtime/execution/runtime-execution.module.mjs +133 -0
- package/esm2020/runtime/execution/utils/federated.util.mjs +32 -0
- package/esm2020/runtime/runtime.module.mjs +74 -0
- package/esm2020/runtime/services/cart.service.mjs +29 -0
- package/{esm2015/runtime/services/collapsible-state.service.js → esm2020/runtime/services/collapsible-state.service.mjs} +4 -4
- package/esm2020/runtime/services/configuration.service.mjs +119 -0
- package/{esm2015/runtime/services/current-state.service.js → esm2020/runtime/services/current-state.service.mjs} +4 -4
- package/{esm2015/runtime/services/form-scope.service.js → esm2020/runtime/services/form-scope.service.mjs} +4 -4
- package/esm2020/runtime/services/product-model-cache.service.mjs +31 -0
- package/esm2020/runtime/services/runtime-context.service.mjs +57 -0
- package/esm2020/runtime/services/runtime-form.service.mjs +219 -0
- package/esm2020/runtime/services/runtime.service.mjs +115 -0
- package/{esm2015/runtime/services/section-helper.service.js → esm2020/runtime/services/section-helper.service.mjs} +4 -4
- package/{esm2015/runtime/services/section-scope.service.js → esm2020/runtime/services/section-scope.service.mjs} +4 -4
- package/{esm2015/runtime/services/section-store.service.js → esm2020/runtime/services/section-store.service.mjs} +4 -4
- package/esm2020/runtime/services/section.service.mjs +117 -0
- package/esm2020/runtime/types/script-registry.types.mjs +51 -0
- package/esm2020/runtime/utils/line-item.util.mjs +270 -0
- package/esm2020/src/components/dialog/dialog.component.mjs +36 -0
- package/esm2020/src/components/dialog/dialog.module.mjs +19 -0
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +107 -0
- package/esm2020/src/components/doc-gen/doc-gen.module.mjs +19 -0
- package/esm2020/src/components/header/cart-overlay/cart-preview.component.mjs +120 -0
- package/{esm2015/src/components/header/cart-overlay/cart-preview.module.js → esm2020/src/components/header/cart-overlay/cart-preview.module.mjs} +11 -13
- package/esm2020/src/components/header/header.component.mjs +333 -0
- package/{esm2015/src/components/header/header.module.js → esm2020/src/components/header/header.module.mjs} +12 -14
- package/esm2020/src/components/header/metrics/metrics.component.mjs +227 -0
- package/{esm2015/src/components/header/metrics/metrics.module.js → esm2020/src/components/header/metrics/metrics.module.mjs} +17 -19
- package/{esm2015/src/flow-routing.module.js → esm2020/src/flow-routing.module.mjs} +12 -14
- package/esm2020/src/flow.component.mjs +45 -0
- package/esm2020/src/flow.module.mjs +58 -0
- package/esm2020/src/guards/context.guard.mjs +93 -0
- package/esm2020/src/guards/product-unload.guard.mjs +46 -0
- package/esm2020/src/guards/root.guard.mjs +42 -0
- package/esm2020/src/pages/assets/assets.component.mjs +111 -0
- package/esm2020/src/pages/assets/assets.module.mjs +20 -0
- package/esm2020/src/pages/catalog/catalog.component.mjs +111 -0
- package/esm2020/src/pages/catalog/catalog.module.mjs +20 -0
- package/esm2020/src/pages/debug/debug.component.mjs +62 -0
- package/{esm2015/src/pages/debug/debug.module.js → esm2020/src/pages/debug/debug.module.mjs} +12 -14
- package/esm2020/src/pages/empty-account/empty-account.component.mjs +12 -0
- package/esm2020/src/pages/empty-account/empty-account.module.mjs +20 -0
- package/esm2020/src/pages/legacy-product/legacy-product.component.mjs +137 -0
- package/esm2020/src/pages/legacy-product/legacy-product.module.mjs +19 -0
- package/esm2020/src/pages/product/product.component.mjs +94 -0
- package/esm2020/src/pages/product/product.module.mjs +20 -0
- package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +25 -0
- package/esm2020/src/pages/record-not-found/record-not-found.module.mjs +20 -0
- package/esm2020/src/pages/remote/remote.component.mjs +342 -0
- package/esm2020/src/pages/remote/remote.module.mjs +20 -0
- package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +111 -0
- package/esm2020/src/pages/shopping-cart/shopping-cart.module.mjs +20 -0
- package/esm2020/src/resolvers/flow.resolver.mjs +70 -0
- package/esm2020/src/resolvers/quote.resolver.mjs +90 -0
- package/esm2020/src/services/doc-gen.service.mjs +33 -0
- package/esm2020/src/services/flow-dialog.service.mjs +126 -0
- package/esm2020/src/services/flow-router.service.mjs +144 -0
- package/esm2020/src/services/flow.service.mjs +86 -0
- package/esm2020/src/utils/flow.utils.mjs +21 -0
- package/fesm2015/{veloceapps-sdk-cms.js → veloceapps-sdk-cms.mjs} +178 -207
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -0
- package/fesm2015/{veloceapps-sdk-core.js → veloceapps-sdk-core.mjs} +76 -76
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -0
- package/fesm2015/{veloceapps-sdk-runtime.js → veloceapps-sdk-runtime.mjs} +242 -370
- package/fesm2015/veloceapps-sdk-runtime.mjs.map +1 -0
- package/fesm2015/veloceapps-sdk.mjs +2877 -0
- package/fesm2015/veloceapps-sdk.mjs.map +1 -0
- package/fesm2020/veloceapps-sdk-cms.mjs +2036 -0
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -0
- package/fesm2020/veloceapps-sdk-core.mjs +1289 -0
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -0
- package/fesm2020/veloceapps-sdk-runtime.mjs +3764 -0
- package/fesm2020/veloceapps-sdk-runtime.mjs.map +1 -0
- package/fesm2020/veloceapps-sdk.mjs +2857 -0
- package/fesm2020/veloceapps-sdk.mjs.map +1 -0
- package/package.json +59 -33
- package/runtime/README.md +5 -0
- package/runtime/components/component-preview/component-preview.component.d.ts +2 -2
- package/runtime/components/section-renderer/section-renderer.component.d.ts +1 -1
- package/runtime/components/ui-runtime/runtime.component.d.ts +1 -1
- package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +1 -1
- package/runtime/execution/components/children-placeholder/children-placeholder.component.d.ts +2 -2
- package/runtime/execution/components/context-provider/context-provider.component.d.ts +1 -1
- package/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.d.ts +1 -1
- package/runtime/execution/components/federated/federated.component.d.ts +1 -1
- package/runtime/execution/components/velo-attribute/velo-attribute.component.d.ts +1 -1
- package/runtime/execution/components/velo-multiselect/velo-multiselect.component.d.ts +1 -1
- package/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.d.ts +1 -1
- package/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.d.ts +1 -1
- package/runtime/execution/components/velo-port-radio/velo-port-radio.component.d.ts +1 -1
- package/runtime/execution/components/velo-type/velo-type.component.d.ts +1 -1
- package/runtime/execution/directives/section-script.directive.d.ts +1 -1
- package/runtime/execution/directives/sf-query.directive.d.ts +1 -1
- package/runtime/execution/directives/velo-attribute.directive.d.ts +1 -1
- package/runtime/execution/directives/velo-port.directive.d.ts +6 -6
- package/runtime/execution/directives/vl-approval.directive.d.ts +1 -1
- package/runtime/execution/directives/vl-document-attachments.directive.d.ts +1 -1
- package/runtime/execution/directives/vl-document-templates.directive.d.ts +1 -1
- package/runtime/execution/directives/vl-quote.directive.d.ts +1 -1
- package/runtime/execution/directives/vl-ramp.directive.d.ts +1 -1
- package/runtime/execution/runtime-execution.module.d.ts +3 -5
- package/runtime/execution/utils/federated.util.d.ts +1 -1
- package/runtime/runtime.module.d.ts +3 -5
- package/runtime/services/section.service.d.ts +1 -1
- package/src/components/dialog/dialog.component.d.ts +1 -1
- package/src/components/doc-gen/doc-gen.component.d.ts +1 -1
- package/src/components/header/cart-overlay/cart-preview.component.d.ts +2 -2
- package/src/components/header/header.component.d.ts +1 -1
- package/src/components/header/metrics/metrics.component.d.ts +1 -1
- package/src/flow.component.d.ts +1 -1
- package/src/pages/assets/assets.component.d.ts +1 -1
- package/src/pages/catalog/catalog.component.d.ts +1 -1
- package/src/pages/debug/debug.component.d.ts +5 -3
- package/src/pages/empty-account/empty-account.component.d.ts +1 -1
- package/src/pages/legacy-product/legacy-product.component.d.ts +1 -1
- package/src/pages/legacy-product/legacy-product.module.d.ts +1 -2
- package/src/pages/product/product.component.d.ts +1 -1
- package/src/pages/record-not-found/record-not-found.component.d.ts +1 -1
- package/src/pages/remote/remote.component.d.ts +1 -1
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +1 -1
- package/bundles/veloceapps-sdk-cms.umd.js +0 -2531
- package/bundles/veloceapps-sdk-cms.umd.js.map +0 -1
- package/bundles/veloceapps-sdk-core.umd.js +0 -1916
- package/bundles/veloceapps-sdk-core.umd.js.map +0 -1
- package/bundles/veloceapps-sdk-runtime.umd.js +0 -4415
- package/bundles/veloceapps-sdk-runtime.umd.js.map +0 -1
- package/bundles/veloceapps-sdk.umd.js +0 -3583
- package/bundles/veloceapps-sdk.umd.js.map +0 -1
- package/cms/modules/federated/federated.utils.d.ts +0 -1
- package/cms/package.json +0 -10
- package/cms/veloceapps-sdk-cms.d.ts +0 -5
- package/core/package.json +0 -10
- package/core/veloceapps-sdk-core.d.ts +0 -5
- package/esm2015/cms/cms.actions.js +0 -42
- package/esm2015/cms/components/element-children/element-children.component.js +0 -39
- package/esm2015/cms/components/element-children/element-children.module.js +0 -20
- package/esm2015/cms/components/element-drop-handle/element-drop-handle.component.js +0 -32
- package/esm2015/cms/components/element-drop-handle/element-drop-handle.module.js +0 -19
- package/esm2015/cms/components/element-renderer/element-renderer.component.js +0 -169
- package/esm2015/cms/components/element.component.js +0 -44
- package/esm2015/cms/components/plugin.component.js +0 -16
- package/esm2015/cms/components/preview/preview.component.js +0 -93
- package/esm2015/cms/components/preview/preview.module.js +0 -24
- package/esm2015/cms/directives/custom-template.directive.js +0 -25
- package/esm2015/cms/engine/models/entity.js +0 -18
- package/esm2015/cms/launcher.module.js +0 -24
- package/esm2015/cms/modules/federated/federated.component.js +0 -82
- package/esm2015/cms/modules/federated/federated.module.js +0 -19
- package/esm2015/cms/modules/federated/federated.types.js +0 -2
- package/esm2015/cms/modules/federated/federated.utils.js +0 -37
- package/esm2015/cms/modules/migrations/migrations.js +0 -11
- package/esm2015/cms/modules/migrations/services/migrations.service.js +0 -43
- package/esm2015/cms/modules/runtime/services/compilation.service.js +0 -84
- package/esm2015/cms/modules/runtime/services/runtime-editor.service.js +0 -27
- package/esm2015/cms/modules/runtime/services/runtime.service.js +0 -74
- package/esm2015/cms/plugins/configuration.plugin.js +0 -106
- package/esm2015/cms/plugins/io.plugin.js +0 -37
- package/esm2015/cms/plugins/region.plugin.js +0 -58
- package/esm2015/cms/plugins/script.plugin.js +0 -66
- package/esm2015/cms/services/integration.state.js +0 -40
- package/esm2015/cms/services/io-provider.service.js +0 -51
- package/esm2015/cms/services/resources.service.js +0 -50
- package/esm2015/cms/utils/element.utils.js +0 -157
- package/esm2015/cms/utils/elements-resolver.js +0 -163
- package/esm2015/cms/utils/path.utils.js +0 -56
- package/esm2015/cms/utils/ui-definition.utils.js +0 -82
- package/esm2015/cms/vendor-map.js +0 -51
- package/esm2015/core/core.module.js +0 -18
- package/esm2015/core/modules/configuration/helpers.js +0 -10
- package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +0 -87
- package/esm2015/core/modules/configuration/services/configuration.service.js +0 -177
- package/esm2015/core/modules/configuration/services/runtime-context.service.js +0 -51
- package/esm2015/core/modules/flow-configuration/flow-configuration.module.js +0 -18
- package/esm2015/core/modules/flow-configuration/services/flow-configuration.service.js +0 -150
- package/esm2015/core/modules/flow-configuration/services/flow-update.service.js +0 -129
- package/esm2015/core/services/context.service.js +0 -53
- package/esm2015/core/services/metric-calculation/metric-calculation.service.js +0 -83
- package/esm2015/core/services/product-images.service.js +0 -30
- package/esm2015/core/services/quote-draft.service.js +0 -217
- package/esm2015/core/utils/line-item.utils.js +0 -143
- package/esm2015/core/utils/line-item.worker.js +0 -19
- package/esm2015/runtime/components/component-preview/component-preview.component.js +0 -125
- package/esm2015/runtime/components/section-renderer/section-renderer.component.js +0 -71
- package/esm2015/runtime/components/ui-runtime/runtime.component.js +0 -429
- package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +0 -109
- package/esm2015/runtime/execution/components/children-placeholder/children-placeholder.component.js +0 -68
- package/esm2015/runtime/execution/components/context-provider/context-provider.component.js +0 -36
- package/esm2015/runtime/execution/components/execution-section-renderer/execution-section-renderer.component.js +0 -72
- package/esm2015/runtime/execution/components/federated/federated.component.js +0 -81
- package/esm2015/runtime/execution/components/velo-attribute/velo-attribute.component.js +0 -65
- package/esm2015/runtime/execution/components/velo-multiselect/velo-multiselect.component.js +0 -136
- package/esm2015/runtime/execution/components/velo-port-checkbox/velo-port-checkbox.component.js +0 -80
- package/esm2015/runtime/execution/components/velo-port-dropdown/velo-port-dropdown.component.js +0 -101
- package/esm2015/runtime/execution/components/velo-port-radio/velo-port-radio.component.js +0 -150
- package/esm2015/runtime/execution/components/velo-type/velo-type.component.js +0 -121
- package/esm2015/runtime/execution/directives/section-script.directive.js +0 -242
- package/esm2015/runtime/execution/directives/sf-query.directive.js +0 -34
- package/esm2015/runtime/execution/directives/velo-attribute.directive.js +0 -86
- package/esm2015/runtime/execution/directives/velo-port.directive.js +0 -373
- package/esm2015/runtime/execution/directives/vl-approval.directive.js +0 -22
- package/esm2015/runtime/execution/directives/vl-document-attachments.directive.js +0 -35
- package/esm2015/runtime/execution/directives/vl-document-templates.directive.js +0 -59
- package/esm2015/runtime/execution/directives/vl-quote.directive.js +0 -41
- package/esm2015/runtime/execution/directives/vl-ramp.directive.js +0 -51
- package/esm2015/runtime/execution/runtime-execution.module.js +0 -163
- package/esm2015/runtime/execution/utils/federated.util.js +0 -37
- package/esm2015/runtime/runtime.module.js +0 -104
- package/esm2015/runtime/services/cart.service.js +0 -27
- package/esm2015/runtime/services/configuration.service.js +0 -101
- package/esm2015/runtime/services/product-model-cache.service.js +0 -30
- package/esm2015/runtime/services/runtime-context.service.js +0 -56
- package/esm2015/runtime/services/runtime-form.service.js +0 -224
- package/esm2015/runtime/services/runtime.service.js +0 -108
- package/esm2015/runtime/services/section.service.js +0 -124
- package/esm2015/runtime/types/script-registry.types.js +0 -51
- package/esm2015/runtime/utils/line-item.util.js +0 -273
- package/esm2015/src/components/dialog/dialog.component.js +0 -40
- package/esm2015/src/components/dialog/dialog.module.js +0 -19
- package/esm2015/src/components/doc-gen/doc-gen.component.js +0 -109
- package/esm2015/src/components/doc-gen/doc-gen.module.js +0 -19
- package/esm2015/src/components/header/cart-overlay/cart-preview.component.js +0 -122
- package/esm2015/src/components/header/header.component.js +0 -336
- package/esm2015/src/components/header/metrics/metrics.component.js +0 -232
- package/esm2015/src/flow.component.js +0 -45
- package/esm2015/src/flow.module.js +0 -60
- package/esm2015/src/guards/context.guard.js +0 -84
- package/esm2015/src/guards/product-unload.guard.js +0 -43
- package/esm2015/src/guards/root.guard.js +0 -41
- package/esm2015/src/pages/assets/assets.component.js +0 -117
- package/esm2015/src/pages/assets/assets.module.js +0 -20
- package/esm2015/src/pages/catalog/catalog.component.js +0 -117
- package/esm2015/src/pages/catalog/catalog.module.js +0 -20
- package/esm2015/src/pages/debug/debug.component.js +0 -61
- package/esm2015/src/pages/empty-account/empty-account.component.js +0 -17
- package/esm2015/src/pages/empty-account/empty-account.module.js +0 -20
- package/esm2015/src/pages/legacy-product/legacy-product.component.js +0 -132
- package/esm2015/src/pages/legacy-product/legacy-product.module.js +0 -21
- package/esm2015/src/pages/product/product.component.js +0 -101
- package/esm2015/src/pages/product/product.module.js +0 -20
- package/esm2015/src/pages/record-not-found/record-not-found.component.js +0 -29
- package/esm2015/src/pages/record-not-found/record-not-found.module.js +0 -20
- package/esm2015/src/pages/remote/remote.component.js +0 -350
- package/esm2015/src/pages/remote/remote.module.js +0 -20
- package/esm2015/src/pages/shopping-cart/shopping-cart.component.js +0 -117
- package/esm2015/src/pages/shopping-cart/shopping-cart.module.js +0 -20
- package/esm2015/src/resolvers/flow.resolver.js +0 -62
- package/esm2015/src/resolvers/quote.resolver.js +0 -88
- package/esm2015/src/services/doc-gen.service.js +0 -33
- package/esm2015/src/services/flow-dialog.service.js +0 -124
- package/esm2015/src/services/flow-router.service.js +0 -144
- package/esm2015/src/services/flow.service.js +0 -84
- package/esm2015/src/utils/flow.utils.js +0 -22
- package/fesm2015/veloceapps-sdk-cms.js.map +0 -1
- package/fesm2015/veloceapps-sdk-core.js.map +0 -1
- package/fesm2015/veloceapps-sdk-runtime.js.map +0 -1
- package/fesm2015/veloceapps-sdk.js +0 -2953
- package/fesm2015/veloceapps-sdk.js.map +0 -1
- package/runtime/package.json +0 -10
- package/runtime/veloceapps-sdk-runtime.d.ts +0 -5
- package/veloceapps-sdk.d.ts +0 -5
- /package/{esm2015/cms/cms.default.js → esm2020/cms/cms.default.mjs} +0 -0
- /package/{esm2015/cms/cms.elements.js → esm2020/cms/cms.elements.mjs} +0 -0
- /package/{esm2015/cms/cms.layouts.js → esm2020/cms/cms.layouts.mjs} +0 -0
- /package/{esm2015/cms/components/index.js → esm2020/cms/components/index.mjs} +0 -0
- /package/{esm2015/cms/components/preview/index.js → esm2020/cms/components/preview/index.mjs} +0 -0
- /package/{esm2015/cms/components/preview/preview.types.js → esm2020/cms/components/preview/preview.types.mjs} +0 -0
- /package/{esm2015/cms/decorators/element.decorator.js → esm2020/cms/decorators/element.decorator.mjs} +0 -0
- /package/{esm2015/cms/decorators/index.js → esm2020/cms/decorators/index.mjs} +0 -0
- /package/{esm2015/cms/engine/models/plugin.js → esm2020/cms/engine/models/plugin.mjs} +0 -0
- /package/{esm2015/cms/index.js → esm2020/cms/index.mjs} +0 -0
- /package/{esm2015/cms/injection-tokens.js → esm2020/cms/injection-tokens.mjs} +0 -0
- /package/{esm2015/cms/modules/federated/default-options.js → esm2020/cms/modules/federated/default-options.mjs} +0 -0
- /package/{esm2015/cms/modules/federated/export.js → esm2020/cms/modules/federated/export.mjs} +0 -0
- /package/{esm2015/cms/modules/migrations/index.js → esm2020/cms/modules/migrations/index.mjs} +0 -0
- /package/{esm2015/cms/modules/migrations/types/migrations.types.js → esm2020/cms/modules/migrations/types/migrations.types.mjs} +0 -0
- /package/{esm2015/cms/modules/runtime/index.js → esm2020/cms/modules/runtime/index.mjs} +0 -0
- /package/{esm2015/cms/modules/runtime/tokens.js → esm2020/cms/modules/runtime/tokens.mjs} +0 -0
- /package/{esm2015/cms/modules/runtime/types/compilation.types.js → esm2020/cms/modules/runtime/types/compilation.types.mjs} +0 -0
- /package/{esm2015/cms/modules/runtime/types/runtime.actions.js → esm2020/cms/modules/runtime/types/runtime.actions.mjs} +0 -0
- /package/{esm2015/cms/services/index.js → esm2020/cms/services/index.mjs} +0 -0
- /package/{esm2015/cms/types/common.types.js → esm2020/cms/types/common.types.mjs} +0 -0
- /package/{esm2015/cms/types/configuration.types.js → esm2020/cms/types/configuration.types.mjs} +0 -0
- /package/{esm2015/cms/types/elements.types.js → esm2020/cms/types/elements.types.mjs} +0 -0
- /package/{esm2015/cms/types/index.js → esm2020/cms/types/index.mjs} +0 -0
- /package/{esm2015/cms/types/integration.types.js → esm2020/cms/types/integration.types.mjs} +0 -0
- /package/{esm2015/cms/types/layouts.types.js → esm2020/cms/types/layouts.types.mjs} +0 -0
- /package/{esm2015/cms/types/path.types.js → esm2020/cms/types/path.types.mjs} +0 -0
- /package/{esm2015/cms/utils/index.js → esm2020/cms/utils/index.mjs} +0 -0
- /package/{esm2015/cms/veloceapps-sdk-cms.js → esm2020/cms/veloceapps-sdk-cms.mjs} +0 -0
- /package/{esm2015/core/index.js → esm2020/core/index.mjs} +0 -0
- /package/{esm2015/core/modules/configuration/index.js → esm2020/core/modules/configuration/index.mjs} +0 -0
- /package/{esm2015/core/modules/configuration/types/configuration-runtime.types.js → esm2020/core/modules/configuration/types/configuration-runtime.types.mjs} +0 -0
- /package/{esm2015/core/modules/flow-configuration/index.js → esm2020/core/modules/flow-configuration/index.mjs} +0 -0
- /package/{esm2015/core/modules/flow-configuration/types/update.types.js → esm2020/core/modules/flow-configuration/types/update.types.mjs} +0 -0
- /package/{esm2015/core/modules/index.js → esm2020/core/modules/index.mjs} +0 -0
- /package/{esm2015/core/services/index.js → esm2020/core/services/index.mjs} +0 -0
- /package/{esm2015/core/services/metric-calculation/metric-calculation.types.js → esm2020/core/services/metric-calculation/metric-calculation.types.mjs} +0 -0
- /package/{esm2015/core/services/metric-calculation/metric-calculation.utils.js → esm2020/core/services/metric-calculation/metric-calculation.utils.mjs} +0 -0
- /package/{esm2015/core/types/index.js → esm2020/core/types/index.mjs} +0 -0
- /package/{esm2015/core/types/runtime.types.js → esm2020/core/types/runtime.types.mjs} +0 -0
- /package/{esm2015/core/types/ui-definition.types.js → esm2020/core/types/ui-definition.types.mjs} +0 -0
- /package/{esm2015/core/utils/index.js → esm2020/core/utils/index.mjs} +0 -0
- /package/{esm2015/core/utils/ui-definition.utils.js → esm2020/core/utils/ui-definition.utils.mjs} +0 -0
- /package/{esm2015/core/veloceapps-sdk-core.js → esm2020/core/veloceapps-sdk-core.mjs} +0 -0
- /package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- /package/{esm2015/runtime/components/index.js → esm2020/runtime/components/index.mjs} +0 -0
- /package/{esm2015/runtime/index.js → esm2020/runtime/index.mjs} +0 -0
- /package/{esm2015/runtime/services/index.js → esm2020/runtime/services/index.mjs} +0 -0
- /package/{esm2015/runtime/types/bound-data.types.js → esm2020/runtime/types/bound-data.types.mjs} +0 -0
- /package/{esm2015/runtime/types/index.js → esm2020/runtime/types/index.mjs} +0 -0
- /package/{esm2015/runtime/types/quote-states.types.js → esm2020/runtime/types/quote-states.types.mjs} +0 -0
- /package/{esm2015/runtime/types/runtime.types.js → esm2020/runtime/types/runtime.types.mjs} +0 -0
- /package/{esm2015/runtime/utils/section.utils.js → esm2020/runtime/utils/section.utils.mjs} +0 -0
- /package/{esm2015/runtime/utils/sections-binder.helper.js → esm2020/runtime/utils/sections-binder.helper.mjs} +0 -0
- /package/{esm2015/runtime/veloceapps-sdk-runtime.js → esm2020/runtime/veloceapps-sdk-runtime.mjs} +0 -0
- /package/{esm2015/src/components/dialog/dialog.types.js → esm2020/src/components/dialog/dialog.types.mjs} +0 -0
- /package/{esm2015/src/components/header/header.types.js → esm2020/src/components/header/header.types.mjs} +0 -0
- /package/{esm2015/src/components/header/metrics/index.js → esm2020/src/components/header/metrics/index.mjs} +0 -0
- /package/{esm2015/src/components/header/metrics/metrics.definitions.js → esm2020/src/components/header/metrics/metrics.definitions.mjs} +0 -0
- /package/{esm2015/src/constants.js → esm2020/src/constants.mjs} +0 -0
- /package/{esm2015/src/guards/index.js → esm2020/src/guards/index.mjs} +0 -0
- /package/{esm2015/src/index.js → esm2020/src/index.mjs} +0 -0
- /package/{esm2015/src/pages/remote/remote.types.js → esm2020/src/pages/remote/remote.types.mjs} +0 -0
- /package/{esm2015/src/services/index.js → esm2020/src/services/index.mjs} +0 -0
- /package/{esm2015/src/types/context-route.types.js → esm2020/src/types/context-route.types.mjs} +0 -0
- /package/{esm2015/src/types/flow-customization.types.js → esm2020/src/types/flow-customization.types.mjs} +0 -0
- /package/{esm2015/src/types/index.js → esm2020/src/types/index.mjs} +0 -0
- /package/{esm2015/src/types/metrics.types.js → esm2020/src/types/metrics.types.mjs} +0 -0
- /package/{esm2015/src/types/route.types.js → esm2020/src/types/route.types.mjs} +0 -0
- /package/{esm2015/src/utils/index.js → esm2020/src/utils/index.mjs} +0 -0
- /package/{esm2015/veloceapps-sdk.js → esm2020/veloceapps-sdk.mjs} +0 -0
@@ -1,3583 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloceapps/api'), require('@veloceapps/components'), require('@veloceapps/sdk/cms'), require('@veloceapps/sdk/core'), require('primeng/button'), require('primeng/dynamicdialog'), require('@veloceapps/core'), require('rxjs'), require('primeng/overlaypanel'), require('primeng/splitbutton'), require('primeng/tooltip'), require('@angular/forms'), require('primeng/inputnumber'), require('primeng/virtualscroller'), require('@angular/router'), require('primeng/api'), require('@angular/cdk/drag-drop'), require('@veloceapps/core/forms'), require('lodash'), require('rxjs/operators'), require('primeng/sidebar'), require('primeng/checkbox'), require('primeng/inputtext'), require('@angular/common/http'), require('primeng/dropdown'), require('primeng/radiobutton'), require('@veloceapps/sdk/runtime'), require('ngx-bootstrap/tooltip')) :
|
3
|
-
typeof define === 'function' && define.amd ? define('@veloceapps/sdk', ['exports', '@angular/common', '@angular/core', '@veloceapps/api', '@veloceapps/components', '@veloceapps/sdk/cms', '@veloceapps/sdk/core', 'primeng/button', 'primeng/dynamicdialog', '@veloceapps/core', 'rxjs', 'primeng/overlaypanel', 'primeng/splitbutton', 'primeng/tooltip', '@angular/forms', 'primeng/inputnumber', 'primeng/virtualscroller', '@angular/router', 'primeng/api', '@angular/cdk/drag-drop', '@veloceapps/core/forms', 'lodash', 'rxjs/operators', 'primeng/sidebar', 'primeng/checkbox', 'primeng/inputtext', '@angular/common/http', 'primeng/dropdown', 'primeng/radiobutton', '@veloceapps/sdk/runtime', 'ngx-bootstrap/tooltip'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloceapps = global.veloceapps || {}, global.veloceapps.sdk = {}), global.ng.common, global.ng.core, global["@veloceapps/api"], global["@veloceapps/components"], global.veloceapps.sdk.cms, global.veloceapps.sdk.core, global["primeng/button"], global["primeng/dynamicdialog"], global["@veloceapps/core"], global.rxjs, global["primeng/overlaypanel"], global["primeng/splitbutton"], global["primeng/tooltip"], global.ng.forms, global["primeng/inputnumber"], global["primeng/virtualscroller"], global.ng.router, global["primeng/api"], global.ng.cdk.dragDrop, global["@veloceapps/core/forms"], global.lodash, global.rxjs.operators, global["primeng/sidebar"], global["primeng/checkbox"], global["primeng/inputtext"], global.ng.common.http, global["primeng/dropdown"], global["primeng/radiobutton"], global.veloceapps.sdk.runtime, global["ngx-bootstrap/tooltip"]));
|
5
|
-
})(this, (function (exports, i5$1, i0, i2, i3, i4, i1$1, i5, i1, core, rxjs, i3$1, i10$1, i12$1, i10, i6, i4$1, i1$2, i2$1, i12, forms, lodash, operators, i4$2, i6$1, i11, http, dropdown, i5$2, i4$3, i1$3) { 'use strict';
|
6
|
-
|
7
|
-
function _interopNamespace(e) {
|
8
|
-
if (e && e.__esModule) return e;
|
9
|
-
var n = Object.create(null);
|
10
|
-
if (e) {
|
11
|
-
Object.keys(e).forEach(function (k) {
|
12
|
-
if (k !== 'default') {
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
15
|
-
enumerable: true,
|
16
|
-
get: function () { return e[k]; }
|
17
|
-
});
|
18
|
-
}
|
19
|
-
});
|
20
|
-
}
|
21
|
-
n["default"] = e;
|
22
|
-
return Object.freeze(n);
|
23
|
-
}
|
24
|
-
|
25
|
-
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
26
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
27
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
28
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
29
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
30
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
31
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
32
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
33
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
34
|
-
var i10__namespace$1 = /*#__PURE__*/_interopNamespace(i10$1);
|
35
|
-
var i12__namespace$1 = /*#__PURE__*/_interopNamespace(i12$1);
|
36
|
-
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
37
|
-
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
38
|
-
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
39
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
40
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
41
|
-
var i12__namespace = /*#__PURE__*/_interopNamespace(i12);
|
42
|
-
var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
|
43
|
-
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
44
|
-
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
45
|
-
var i5__namespace$2 = /*#__PURE__*/_interopNamespace(i5$2);
|
46
|
-
var i4__namespace$3 = /*#__PURE__*/_interopNamespace(i4$3);
|
47
|
-
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
|
48
|
-
|
49
|
-
var VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
|
50
|
-
|
51
|
-
var FlowDialogComponent = /** @class */ (function () {
|
52
|
-
function FlowDialogComponent(dialogConfig, ref) {
|
53
|
-
this.dialogConfig = dialogConfig;
|
54
|
-
this.ref = ref;
|
55
|
-
this.config = this.dialogConfig.data.config;
|
56
|
-
}
|
57
|
-
FlowDialogComponent.prototype.cancelHandler = function () {
|
58
|
-
if (this.config.oppositeButtonActions) {
|
59
|
-
this.ref.close(true);
|
60
|
-
}
|
61
|
-
else {
|
62
|
-
this.ref.close();
|
63
|
-
}
|
64
|
-
};
|
65
|
-
FlowDialogComponent.prototype.confirmHandler = function () {
|
66
|
-
if (this.config.oppositeButtonActions) {
|
67
|
-
this.ref.close();
|
68
|
-
}
|
69
|
-
else {
|
70
|
-
this.ref.close(true);
|
71
|
-
}
|
72
|
-
};
|
73
|
-
return FlowDialogComponent;
|
74
|
-
}());
|
75
|
-
FlowDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogComponent, deps: [{ token: i1__namespace.DynamicDialogConfig }, { token: i1__namespace.DynamicDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
76
|
-
FlowDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0__namespace, template: "<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 .description{flex:1;padding:0 24px 24px;font-weight:400;font-size:12px;line-height:16px;color:var(--vl-text-color-deep-accent)}:host .form-actions{border-top:1px solid var(--vl-border-color);padding:1.5rem 2.2rem;display:flex;justify-content:flex-end;width:100%;grid-gap:10px;gap:10px}\n"], components: [{ type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
77
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogComponent, decorators: [{
|
78
|
-
type: i0.Component,
|
79
|
-
args: [{
|
80
|
-
selector: 'vl-flow-dialog',
|
81
|
-
templateUrl: './dialog.component.html',
|
82
|
-
styleUrls: ['./dialog.component.scss'],
|
83
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
84
|
-
}]
|
85
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.DynamicDialogConfig }, { type: i1__namespace.DynamicDialogRef }]; } });
|
86
|
-
|
87
|
-
var FlowDialogModule = /** @class */ (function () {
|
88
|
-
function FlowDialogModule() {
|
89
|
-
}
|
90
|
-
return FlowDialogModule;
|
91
|
-
}());
|
92
|
-
FlowDialogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
93
|
-
FlowDialogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogModule, declarations: [FlowDialogComponent], imports: [i5$1.CommonModule, i5.ButtonModule], exports: [FlowDialogComponent] });
|
94
|
-
FlowDialogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogModule, imports: [[i5$1.CommonModule, i5.ButtonModule]] });
|
95
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogModule, decorators: [{
|
96
|
-
type: i0.NgModule,
|
97
|
-
args: [{
|
98
|
-
declarations: [FlowDialogComponent],
|
99
|
-
imports: [i5$1.CommonModule, i5.ButtonModule],
|
100
|
-
exports: [FlowDialogComponent],
|
101
|
-
}]
|
102
|
-
}] });
|
103
|
-
|
104
|
-
var FlowDocGenService = /** @class */ (function () {
|
105
|
-
function FlowDocGenService(integrationState) {
|
106
|
-
this.integrationState = integrationState;
|
107
|
-
this.cleanup$ = new rxjs.Subject();
|
108
|
-
this.isVisibleSubj$ = new rxjs.BehaviorSubject(false);
|
109
|
-
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
110
|
-
this.initSubscriptions();
|
111
|
-
}
|
112
|
-
FlowDocGenService.prototype.cleanup = function () {
|
113
|
-
this.cleanup$.next();
|
114
|
-
};
|
115
|
-
FlowDocGenService.prototype.initSubscriptions = function () {
|
116
|
-
var _this = this;
|
117
|
-
this.integrationState
|
118
|
-
.listen$(i4.FlowAction.FLOW_OPEN_DOC_GEN)
|
119
|
-
.pipe(rxjs.tap(function () { return _this.isVisibleSubj$.next(true); }), rxjs.takeUntil(this.cleanup$))
|
120
|
-
.subscribe();
|
121
|
-
this.integrationState
|
122
|
-
.listen$(i4.FlowAction.FLOW_CLOSE_DOC_GEN)
|
123
|
-
.pipe(rxjs.tap(function () { return _this.isVisibleSubj$.next(false); }), rxjs.takeUntil(this.cleanup$))
|
124
|
-
.subscribe();
|
125
|
-
};
|
126
|
-
return FlowDocGenService;
|
127
|
-
}());
|
128
|
-
FlowDocGenService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDocGenService, deps: [{ token: i4__namespace.IntegrationState }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
129
|
-
FlowDocGenService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDocGenService });
|
130
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDocGenService, decorators: [{
|
131
|
-
type: i0.Injectable
|
132
|
-
}], ctorParameters: function () { return [{ type: i4__namespace.IntegrationState }]; } });
|
133
|
-
|
134
|
-
var DocGenComponent = /** @class */ (function () {
|
135
|
-
function DocGenComponent(quoteDraftService, contextService, templatesApi, docGenService, toastService) {
|
136
|
-
var _this = this;
|
137
|
-
this.quoteDraftService = quoteDraftService;
|
138
|
-
this.contextService = contextService;
|
139
|
-
this.templatesApi = templatesApi;
|
140
|
-
this.docGenService = docGenService;
|
141
|
-
this.toastService = toastService;
|
142
|
-
this.uiDefinition$ = new rxjs.BehaviorSubject(null);
|
143
|
-
this.templateApiName = '';
|
144
|
-
this.destroy$ = new rxjs.Subject();
|
145
|
-
this.isVisible$ = this.docGenService.isVisible$;
|
146
|
-
// initialize when quote draft requested
|
147
|
-
this.quoteDraftService.quoteDraft$
|
148
|
-
.pipe(rxjs.first(), rxjs.tap(function () { return _this.initialize(); }), rxjs.takeUntil(this.destroy$))
|
149
|
-
.subscribe();
|
150
|
-
}
|
151
|
-
DocGenComponent.prototype.ngOnDestroy = function () {
|
152
|
-
this.destroy$.next();
|
153
|
-
this.destroy$.complete();
|
154
|
-
};
|
155
|
-
DocGenComponent.prototype.initialize = function () {
|
156
|
-
var _this = this;
|
157
|
-
var _a;
|
158
|
-
this.templateApiName = (_a = this.contextService.resolve().properties.docGenTemplateApiName) !== null && _a !== void 0 ? _a : '';
|
159
|
-
this.generateUIDefinition$()
|
160
|
-
.pipe(rxjs.tap(function (uiDef) {
|
161
|
-
if (!uiDef) {
|
162
|
-
throw new Error("Component with name '" + _this.templateApiName + "' not found.");
|
163
|
-
}
|
164
|
-
_this.uiDefinition$.next(uiDef);
|
165
|
-
}), rxjs.catchError(function (err) {
|
166
|
-
var _a;
|
167
|
-
var message = 'Failed to resolve DocGen component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
168
|
-
_this.toastService.add({ severity: i3.ToastType.error, summary: message, sticky: true });
|
169
|
-
return rxjs.of();
|
170
|
-
}), rxjs.takeUntil(this.destroy$))
|
171
|
-
.subscribe();
|
172
|
-
};
|
173
|
-
DocGenComponent.prototype.getTemplateRootComponent$ = function (template) {
|
174
|
-
return this.templatesApi
|
175
|
-
.fetchComponents$(template.id)
|
176
|
-
.pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === core.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
|
177
|
-
};
|
178
|
-
DocGenComponent.prototype.getDocGenComponentMeta$ = function () {
|
179
|
-
var _this = this;
|
180
|
-
return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) {
|
181
|
-
var template = templates.find(function (template) { return template.type === core.UITemplateType.DOCGEN && template.name === _this.templateApiName; });
|
182
|
-
return template !== null && template !== void 0 ? template : templates[0];
|
183
|
-
}), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
|
184
|
-
};
|
185
|
-
DocGenComponent.prototype.generateUIDefinition$ = function () {
|
186
|
-
var _this = this;
|
187
|
-
return rxjs.of(undefined).pipe(rxjs.tap(function () {
|
188
|
-
if (!_this.templateApiName) {
|
189
|
-
throw new Error("Flow Query parameter 'docGenTemplateApiName' is missing.");
|
190
|
-
}
|
191
|
-
}), rxjs.switchMap(function (meta) { return (meta ? rxjs.of(meta) : _this.getDocGenComponentMeta$()); }), rxjs.map(function (meta) {
|
192
|
-
var _a;
|
193
|
-
if (!meta) {
|
194
|
-
return;
|
195
|
-
}
|
196
|
-
var headerId = (_a = _this.contextService.resolve().properties.Id) !== null && _a !== void 0 ? _a : null;
|
197
|
-
var script = meta.js;
|
198
|
-
if (script) {
|
199
|
-
var metadata = i4.extractElementMetadata(script);
|
200
|
-
script = i4.extendElementMetadata(script, {
|
201
|
-
inputs: Object.assign(Object.assign({}, metadata.inputs), { Id: headerId ? "\"" + headerId + "\"" : null }),
|
202
|
-
});
|
203
|
-
}
|
204
|
-
var uiDef = {
|
205
|
-
name: '',
|
206
|
-
createdTimestamp: 0,
|
207
|
-
primary: true,
|
208
|
-
type: 'DEFAULT',
|
209
|
-
version: 2,
|
210
|
-
children: [
|
211
|
-
{
|
212
|
-
children: [],
|
213
|
-
template: meta.html && btoa(meta.html),
|
214
|
-
script: script && btoa(script),
|
215
|
-
styles: meta.css && btoa(meta.css),
|
216
|
-
},
|
217
|
-
],
|
218
|
-
};
|
219
|
-
return uiDef;
|
220
|
-
}));
|
221
|
-
};
|
222
|
-
return DocGenComponent;
|
223
|
-
}());
|
224
|
-
DocGenComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocGenComponent, deps: [{ token: i1__namespace$1.QuoteDraftService }, { token: i1__namespace$1.ContextService }, { token: i2__namespace.UITemplatesApiService }, { token: FlowDocGenService }, { token: i3__namespace.ToastService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
225
|
-
DocGenComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0__namespace, template: "<ng-container *ngIf=\"isVisible$ | async\">\n <ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], components: [{ type: i4__namespace.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "config"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
226
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocGenComponent, decorators: [{
|
227
|
-
type: i0.Component,
|
228
|
-
args: [{
|
229
|
-
selector: 'vl-flow-doc-gen',
|
230
|
-
templateUrl: './doc-gen.component.html',
|
231
|
-
styleUrls: ['./doc-gen.component.scss'],
|
232
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
233
|
-
}]
|
234
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.QuoteDraftService }, { type: i1__namespace$1.ContextService }, { type: i2__namespace.UITemplatesApiService }, { type: FlowDocGenService }, { type: i3__namespace.ToastService }]; } });
|
235
|
-
|
236
|
-
var DocGenModule = /** @class */ (function () {
|
237
|
-
function DocGenModule() {
|
238
|
-
}
|
239
|
-
return DocGenModule;
|
240
|
-
}());
|
241
|
-
DocGenModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocGenModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
242
|
-
DocGenModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocGenModule, declarations: [DocGenComponent], imports: [i5$1.CommonModule, i4.PreviewModule], exports: [DocGenComponent] });
|
243
|
-
DocGenModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocGenModule, imports: [[i5$1.CommonModule, i4.PreviewModule]] });
|
244
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DocGenModule, decorators: [{
|
245
|
-
type: i0.NgModule,
|
246
|
-
args: [{
|
247
|
-
declarations: [DocGenComponent],
|
248
|
-
imports: [i5$1.CommonModule, i4.PreviewModule],
|
249
|
-
exports: [DocGenComponent],
|
250
|
-
}]
|
251
|
-
}] });
|
252
|
-
|
253
|
-
/******************************************************************************
|
254
|
-
Copyright (c) Microsoft Corporation.
|
255
|
-
|
256
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
257
|
-
purpose with or without fee is hereby granted.
|
258
|
-
|
259
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
260
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
261
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
262
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
263
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
264
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
265
|
-
PERFORMANCE OF THIS SOFTWARE.
|
266
|
-
***************************************************************************** */
|
267
|
-
/* global Reflect, Promise */
|
268
|
-
var extendStatics = function (d, b) {
|
269
|
-
extendStatics = Object.setPrototypeOf ||
|
270
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
271
|
-
function (d, b) { for (var p in b)
|
272
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
273
|
-
d[p] = b[p]; };
|
274
|
-
return extendStatics(d, b);
|
275
|
-
};
|
276
|
-
function __extends(d, b) {
|
277
|
-
if (typeof b !== "function" && b !== null)
|
278
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
279
|
-
extendStatics(d, b);
|
280
|
-
function __() { this.constructor = d; }
|
281
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
282
|
-
}
|
283
|
-
var __assign = function () {
|
284
|
-
__assign = Object.assign || function __assign(t) {
|
285
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
286
|
-
s = arguments[i];
|
287
|
-
for (var p in s)
|
288
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
289
|
-
t[p] = s[p];
|
290
|
-
}
|
291
|
-
return t;
|
292
|
-
};
|
293
|
-
return __assign.apply(this, arguments);
|
294
|
-
};
|
295
|
-
function __rest(s, e) {
|
296
|
-
var t = {};
|
297
|
-
for (var p in s)
|
298
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
299
|
-
t[p] = s[p];
|
300
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
301
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
302
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
303
|
-
t[p[i]] = s[p[i]];
|
304
|
-
}
|
305
|
-
return t;
|
306
|
-
}
|
307
|
-
function __decorate(decorators, target, key, desc) {
|
308
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
309
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
310
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
311
|
-
else
|
312
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
313
|
-
if (d = decorators[i])
|
314
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
315
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
316
|
-
}
|
317
|
-
function __param(paramIndex, decorator) {
|
318
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
319
|
-
}
|
320
|
-
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
321
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
322
|
-
throw new TypeError("Function expected"); return f; }
|
323
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
324
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
325
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
326
|
-
var _, done = false;
|
327
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
328
|
-
var context = {};
|
329
|
-
for (var p in contextIn)
|
330
|
-
context[p] = p === "access" ? {} : contextIn[p];
|
331
|
-
for (var p in contextIn.access)
|
332
|
-
context.access[p] = contextIn.access[p];
|
333
|
-
context.addInitializer = function (f) { if (done)
|
334
|
-
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
335
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
336
|
-
if (kind === "accessor") {
|
337
|
-
if (result === void 0)
|
338
|
-
continue;
|
339
|
-
if (result === null || typeof result !== "object")
|
340
|
-
throw new TypeError("Object expected");
|
341
|
-
if (_ = accept(result.get))
|
342
|
-
descriptor.get = _;
|
343
|
-
if (_ = accept(result.set))
|
344
|
-
descriptor.set = _;
|
345
|
-
if (_ = accept(result.init))
|
346
|
-
initializers.push(_);
|
347
|
-
}
|
348
|
-
else if (_ = accept(result)) {
|
349
|
-
if (kind === "field")
|
350
|
-
initializers.push(_);
|
351
|
-
else
|
352
|
-
descriptor[key] = _;
|
353
|
-
}
|
354
|
-
}
|
355
|
-
if (target)
|
356
|
-
Object.defineProperty(target, contextIn.name, descriptor);
|
357
|
-
done = true;
|
358
|
-
}
|
359
|
-
;
|
360
|
-
function __runInitializers(thisArg, initializers, value) {
|
361
|
-
var useValue = arguments.length > 2;
|
362
|
-
for (var i = 0; i < initializers.length; i++) {
|
363
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
364
|
-
}
|
365
|
-
return useValue ? value : void 0;
|
366
|
-
}
|
367
|
-
;
|
368
|
-
function __propKey(x) {
|
369
|
-
return typeof x === "symbol" ? x : "".concat(x);
|
370
|
-
}
|
371
|
-
;
|
372
|
-
function __setFunctionName(f, name, prefix) {
|
373
|
-
if (typeof name === "symbol")
|
374
|
-
name = name.description ? "[".concat(name.description, "]") : "";
|
375
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
376
|
-
}
|
377
|
-
;
|
378
|
-
function __metadata(metadataKey, metadataValue) {
|
379
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
380
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
381
|
-
}
|
382
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
383
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
384
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
385
|
-
function fulfilled(value) { try {
|
386
|
-
step(generator.next(value));
|
387
|
-
}
|
388
|
-
catch (e) {
|
389
|
-
reject(e);
|
390
|
-
} }
|
391
|
-
function rejected(value) { try {
|
392
|
-
step(generator["throw"](value));
|
393
|
-
}
|
394
|
-
catch (e) {
|
395
|
-
reject(e);
|
396
|
-
} }
|
397
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
398
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
399
|
-
});
|
400
|
-
}
|
401
|
-
function __generator(thisArg, body) {
|
402
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
403
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
404
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
405
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
406
|
-
function step(op) {
|
407
|
-
if (f)
|
408
|
-
throw new TypeError("Generator is already executing.");
|
409
|
-
while (g && (g = 0, op[0] && (_ = 0)), _)
|
410
|
-
try {
|
411
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
412
|
-
return t;
|
413
|
-
if (y = 0, t)
|
414
|
-
op = [op[0] & 2, t.value];
|
415
|
-
switch (op[0]) {
|
416
|
-
case 0:
|
417
|
-
case 1:
|
418
|
-
t = op;
|
419
|
-
break;
|
420
|
-
case 4:
|
421
|
-
_.label++;
|
422
|
-
return { value: op[1], done: false };
|
423
|
-
case 5:
|
424
|
-
_.label++;
|
425
|
-
y = op[1];
|
426
|
-
op = [0];
|
427
|
-
continue;
|
428
|
-
case 7:
|
429
|
-
op = _.ops.pop();
|
430
|
-
_.trys.pop();
|
431
|
-
continue;
|
432
|
-
default:
|
433
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
434
|
-
_ = 0;
|
435
|
-
continue;
|
436
|
-
}
|
437
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
438
|
-
_.label = op[1];
|
439
|
-
break;
|
440
|
-
}
|
441
|
-
if (op[0] === 6 && _.label < t[1]) {
|
442
|
-
_.label = t[1];
|
443
|
-
t = op;
|
444
|
-
break;
|
445
|
-
}
|
446
|
-
if (t && _.label < t[2]) {
|
447
|
-
_.label = t[2];
|
448
|
-
_.ops.push(op);
|
449
|
-
break;
|
450
|
-
}
|
451
|
-
if (t[2])
|
452
|
-
_.ops.pop();
|
453
|
-
_.trys.pop();
|
454
|
-
continue;
|
455
|
-
}
|
456
|
-
op = body.call(thisArg, _);
|
457
|
-
}
|
458
|
-
catch (e) {
|
459
|
-
op = [6, e];
|
460
|
-
y = 0;
|
461
|
-
}
|
462
|
-
finally {
|
463
|
-
f = t = 0;
|
464
|
-
}
|
465
|
-
if (op[0] & 5)
|
466
|
-
throw op[1];
|
467
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
468
|
-
}
|
469
|
-
}
|
470
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
471
|
-
if (k2 === undefined)
|
472
|
-
k2 = k;
|
473
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
474
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
475
|
-
desc = { enumerable: true, get: function () { return m[k]; } };
|
476
|
-
}
|
477
|
-
Object.defineProperty(o, k2, desc);
|
478
|
-
}) : (function (o, m, k, k2) {
|
479
|
-
if (k2 === undefined)
|
480
|
-
k2 = k;
|
481
|
-
o[k2] = m[k];
|
482
|
-
});
|
483
|
-
function __exportStar(m, o) {
|
484
|
-
for (var p in m)
|
485
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
486
|
-
__createBinding(o, m, p);
|
487
|
-
}
|
488
|
-
function __values(o) {
|
489
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
490
|
-
if (m)
|
491
|
-
return m.call(o);
|
492
|
-
if (o && typeof o.length === "number")
|
493
|
-
return {
|
494
|
-
next: function () {
|
495
|
-
if (o && i >= o.length)
|
496
|
-
o = void 0;
|
497
|
-
return { value: o && o[i++], done: !o };
|
498
|
-
}
|
499
|
-
};
|
500
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
501
|
-
}
|
502
|
-
function __read(o, n) {
|
503
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
504
|
-
if (!m)
|
505
|
-
return o;
|
506
|
-
var i = m.call(o), r, ar = [], e;
|
507
|
-
try {
|
508
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
509
|
-
ar.push(r.value);
|
510
|
-
}
|
511
|
-
catch (error) {
|
512
|
-
e = { error: error };
|
513
|
-
}
|
514
|
-
finally {
|
515
|
-
try {
|
516
|
-
if (r && !r.done && (m = i["return"]))
|
517
|
-
m.call(i);
|
518
|
-
}
|
519
|
-
finally {
|
520
|
-
if (e)
|
521
|
-
throw e.error;
|
522
|
-
}
|
523
|
-
}
|
524
|
-
return ar;
|
525
|
-
}
|
526
|
-
/** @deprecated */
|
527
|
-
function __spread() {
|
528
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
529
|
-
ar = ar.concat(__read(arguments[i]));
|
530
|
-
return ar;
|
531
|
-
}
|
532
|
-
/** @deprecated */
|
533
|
-
function __spreadArrays() {
|
534
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
535
|
-
s += arguments[i].length;
|
536
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
537
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
538
|
-
r[k] = a[j];
|
539
|
-
return r;
|
540
|
-
}
|
541
|
-
function __spreadArray(to, from, pack) {
|
542
|
-
if (pack || arguments.length === 2)
|
543
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
544
|
-
if (ar || !(i in from)) {
|
545
|
-
if (!ar)
|
546
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
547
|
-
ar[i] = from[i];
|
548
|
-
}
|
549
|
-
}
|
550
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
551
|
-
}
|
552
|
-
function __await(v) {
|
553
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
554
|
-
}
|
555
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
556
|
-
if (!Symbol.asyncIterator)
|
557
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
558
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
559
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
560
|
-
function verb(n) { if (g[n])
|
561
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
562
|
-
function resume(n, v) { try {
|
563
|
-
step(g[n](v));
|
564
|
-
}
|
565
|
-
catch (e) {
|
566
|
-
settle(q[0][3], e);
|
567
|
-
} }
|
568
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
569
|
-
function fulfill(value) { resume("next", value); }
|
570
|
-
function reject(value) { resume("throw", value); }
|
571
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
572
|
-
resume(q[0][0], q[0][1]); }
|
573
|
-
}
|
574
|
-
function __asyncDelegator(o) {
|
575
|
-
var i, p;
|
576
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
577
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
578
|
-
}
|
579
|
-
function __asyncValues(o) {
|
580
|
-
if (!Symbol.asyncIterator)
|
581
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
582
|
-
var m = o[Symbol.asyncIterator], i;
|
583
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
584
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
585
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
586
|
-
}
|
587
|
-
function __makeTemplateObject(cooked, raw) {
|
588
|
-
if (Object.defineProperty) {
|
589
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
590
|
-
}
|
591
|
-
else {
|
592
|
-
cooked.raw = raw;
|
593
|
-
}
|
594
|
-
return cooked;
|
595
|
-
}
|
596
|
-
;
|
597
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
598
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
599
|
-
}) : function (o, v) {
|
600
|
-
o["default"] = v;
|
601
|
-
};
|
602
|
-
function __importStar(mod) {
|
603
|
-
if (mod && mod.__esModule)
|
604
|
-
return mod;
|
605
|
-
var result = {};
|
606
|
-
if (mod != null)
|
607
|
-
for (var k in mod)
|
608
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
609
|
-
__createBinding(result, mod, k);
|
610
|
-
__setModuleDefault(result, mod);
|
611
|
-
return result;
|
612
|
-
}
|
613
|
-
function __importDefault(mod) {
|
614
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
615
|
-
}
|
616
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
617
|
-
if (kind === "a" && !f)
|
618
|
-
throw new TypeError("Private accessor was defined without a getter");
|
619
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
620
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
621
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
622
|
-
}
|
623
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
624
|
-
if (kind === "m")
|
625
|
-
throw new TypeError("Private method is not writable");
|
626
|
-
if (kind === "a" && !f)
|
627
|
-
throw new TypeError("Private accessor was defined without a setter");
|
628
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
629
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
630
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
631
|
-
}
|
632
|
-
function __classPrivateFieldIn(state, receiver) {
|
633
|
-
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
634
|
-
throw new TypeError("Cannot use 'in' operator on non-object");
|
635
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
636
|
-
}
|
637
|
-
|
638
|
-
var FlowRouterService = /** @class */ (function () {
|
639
|
-
function FlowRouterService(router, route, contextService) {
|
640
|
-
var _this = this;
|
641
|
-
this.router = router;
|
642
|
-
this.route = route;
|
643
|
-
this.contextService = contextService;
|
644
|
-
this.urlHistory = [];
|
645
|
-
this.getLastChildRoute = function (route) {
|
646
|
-
return route.firstChild ? _this.getLastChildRoute(route.firstChild) : route;
|
647
|
-
};
|
648
|
-
this.getNthChildRoute = function (route, index) {
|
649
|
-
if (index <= 0) {
|
650
|
-
return route;
|
651
|
-
}
|
652
|
-
return route.firstChild ? _this.getNthChildRoute(route.firstChild, index - 1) : route;
|
653
|
-
};
|
654
|
-
this.getLastChildRouteSnapshot = function (route) {
|
655
|
-
return route.firstChild ? _this.getLastChildRouteSnapshot(route.firstChild) : route;
|
656
|
-
};
|
657
|
-
this.watchLastChildRoute$ = function (route) {
|
658
|
-
return _this.routeChange$.pipe(rxjs.map(function () { return _this.getLastChildRouteSnapshot(route.snapshot); }));
|
659
|
-
};
|
660
|
-
this.getLastChildParams = function (route) {
|
661
|
-
return route.firstChild ? _this.getLastChildParams(route.firstChild) : route.params;
|
662
|
-
};
|
663
|
-
this.watchLastChildParams$ = function (route) {
|
664
|
-
return _this.routeChange$.pipe(rxjs.map(function () { return _this.getLastChildParams(route.snapshot); }));
|
665
|
-
};
|
666
|
-
this.getFlowSubpath$ = function () {
|
667
|
-
return _this.route$.pipe(rxjs.map(function (route) {
|
668
|
-
var url = route.url.join('/');
|
669
|
-
var flowRootUrl = _this.getFlowRootPath(route);
|
670
|
-
return url.replace(flowRootUrl, '');
|
671
|
-
}));
|
672
|
-
};
|
673
|
-
this.routeChange$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$2.NavigationEnd; }), rxjs.shareReplay());
|
674
|
-
this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(rxjs.startWith(this.getLastChildParams(this.route.snapshot)), rxjs.shareReplay());
|
675
|
-
this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(rxjs.startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), rxjs.shareReplay());
|
676
|
-
this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$2.NavigationStart ||
|
677
|
-
e instanceof i1$2.NavigationCancel ||
|
678
|
-
e instanceof i1$2.NavigationEnd ||
|
679
|
-
e instanceof i1$2.NavigationError; }), rxjs.map(function (e) { return e instanceof i1$2.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
|
680
|
-
this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$2.NavigationEnd; })).subscribe(function () {
|
681
|
-
_this.urlHistory.push(_this.router.url);
|
682
|
-
});
|
683
|
-
}
|
684
|
-
FlowRouterService.prototype.getFlowRootRoute = function (route) {
|
685
|
-
var _a;
|
686
|
-
var path = __spreadArray([], __read(route.pathFromRoot));
|
687
|
-
while (path.length) {
|
688
|
-
var parent = path.pop();
|
689
|
-
if (!parent) {
|
690
|
-
break;
|
691
|
-
}
|
692
|
-
if (((_a = parent.routeConfig) === null || _a === void 0 ? void 0 : _a.id) === VELOCE_FLOW_ROOT_ROUTE) {
|
693
|
-
return parent;
|
694
|
-
}
|
695
|
-
}
|
696
|
-
return;
|
697
|
-
};
|
698
|
-
FlowRouterService.prototype.getFlowRootPath = function (route) {
|
699
|
-
var rootRoute = this.getFlowRootRoute(route);
|
700
|
-
if (!rootRoute) {
|
701
|
-
return '';
|
702
|
-
}
|
703
|
-
var path = rootRoute.pathFromRoot
|
704
|
-
.map(function (r) { var _a; return (_a = r.routeConfig) === null || _a === void 0 ? void 0 : _a.path; })
|
705
|
-
.filter(Boolean)
|
706
|
-
.join('/');
|
707
|
-
return '/' + path;
|
708
|
-
};
|
709
|
-
Object.defineProperty(FlowRouterService.prototype, "route$", {
|
710
|
-
get: function () {
|
711
|
-
return this.lastChildRoute$;
|
712
|
-
},
|
713
|
-
enumerable: false,
|
714
|
-
configurable: true
|
715
|
-
});
|
716
|
-
Object.defineProperty(FlowRouterService.prototype, "params$", {
|
717
|
-
get: function () {
|
718
|
-
return this.lastChildParams$;
|
719
|
-
},
|
720
|
-
enumerable: false,
|
721
|
-
configurable: true
|
722
|
-
});
|
723
|
-
FlowRouterService.prototype.isConfigurationRoute$ = function () {
|
724
|
-
return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('product'); }));
|
725
|
-
};
|
726
|
-
FlowRouterService.prototype.isCartRoute$ = function () {
|
727
|
-
return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('cart'); }));
|
728
|
-
};
|
729
|
-
FlowRouterService.prototype.isCatalogRoute$ = function () {
|
730
|
-
return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('catalog'); }));
|
731
|
-
};
|
732
|
-
FlowRouterService.prototype.isAssetsRoute$ = function () {
|
733
|
-
return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('assets'); }));
|
734
|
-
};
|
735
|
-
FlowRouterService.prototype.navigateBack = function () {
|
736
|
-
var prevUrl = this.urlHistory[this.urlHistory.length - 2];
|
737
|
-
if (prevUrl) {
|
738
|
-
this.router.navigateByUrl(prevUrl);
|
739
|
-
}
|
740
|
-
};
|
741
|
-
FlowRouterService.prototype.navigateToProductConfiguration = function (productId, lineItemId) {
|
742
|
-
this.contextService.update({ properties: { productId: productId, lineItemId: lineItemId } });
|
743
|
-
var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
744
|
-
var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
745
|
-
this.router.navigate([flowRouteUrl, 'product'], {
|
746
|
-
queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), { productId: productId }),
|
747
|
-
});
|
748
|
-
};
|
749
|
-
FlowRouterService.prototype.navigateToShoppingCart = function () {
|
750
|
-
var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
751
|
-
var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
752
|
-
this.router.navigate([flowRouteUrl, 'cart'], { queryParams: routeSnapshot.queryParams });
|
753
|
-
};
|
754
|
-
FlowRouterService.prototype.navigateToCatalog = function () {
|
755
|
-
var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
756
|
-
var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
757
|
-
this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
|
758
|
-
};
|
759
|
-
FlowRouterService.prototype.navigateToAssets = function () {
|
760
|
-
var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
761
|
-
var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
762
|
-
this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
|
763
|
-
};
|
764
|
-
FlowRouterService.prototype.switchObject = function (id) {
|
765
|
-
var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
766
|
-
var route = this.getLastChildRoute(this.route);
|
767
|
-
var objName = core.SalesforceIdUtils.getSfObjectNameById(id);
|
768
|
-
var queryParams = {
|
769
|
-
quoteId: objName === 'Quote' ? id : undefined,
|
770
|
-
accountId: objName === 'Account' ? id : undefined,
|
771
|
-
orderId: objName === 'Order' ? id : undefined,
|
772
|
-
};
|
773
|
-
this.router.navigate([], { relativeTo: route, queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), queryParams) });
|
774
|
-
};
|
775
|
-
return FlowRouterService;
|
776
|
-
}());
|
777
|
-
FlowRouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowRouterService, deps: [{ token: i1__namespace$2.Router }, { token: i1__namespace$2.ActivatedRoute }, { token: i1__namespace$1.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
778
|
-
FlowRouterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowRouterService, providedIn: 'root' });
|
779
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowRouterService, decorators: [{
|
780
|
-
type: i0.Injectable,
|
781
|
-
args: [{ providedIn: 'root' }]
|
782
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.Router }, { type: i1__namespace$2.ActivatedRoute }, { type: i1__namespace$1.ContextService }]; } });
|
783
|
-
|
784
|
-
var CartPreviewComponent = /** @class */ (function () {
|
785
|
-
function CartPreviewComponent(flowConfiguration, routerService, productImagesService, quoteDraftService) {
|
786
|
-
this.flowConfiguration = flowConfiguration;
|
787
|
-
this.routerService = routerService;
|
788
|
-
this.productImagesService = productImagesService;
|
789
|
-
this.quoteDraftService = quoteDraftService;
|
790
|
-
this.productRowHeight = 97;
|
791
|
-
this.form = new i10.FormGroup({});
|
792
|
-
this.hasTermInProducts = false;
|
793
|
-
this.scrollHeight = 0;
|
794
|
-
this.shouldUpdate$ = new rxjs.BehaviorSubject(true);
|
795
|
-
this.destroyed$ = new rxjs.Subject();
|
796
|
-
this.lockedProductId$ = rxjs.combineLatest([this.routerService.route$, this.routerService.isConfigurationRoute$()]).pipe(rxjs.map(function (_b) {
|
797
|
-
var _c = __read(_b, 2), route = _c[0], isConfigurationRoute = _c[1];
|
798
|
-
if (!isConfigurationRoute) {
|
799
|
-
return null;
|
800
|
-
}
|
801
|
-
return route.queryParams.productId;
|
802
|
-
}));
|
803
|
-
this.isEditMode$ = this.quoteDraftService.isEditMode$();
|
804
|
-
}
|
805
|
-
CartPreviewComponent.prototype.ngOnChanges = function (changes) {
|
806
|
-
var products = changes.products;
|
807
|
-
if (products) {
|
808
|
-
this.shouldUpdate$.next(true);
|
809
|
-
this.scrollHeight = Math.min(this.products.length * this.productRowHeight, 460);
|
810
|
-
}
|
811
|
-
};
|
812
|
-
CartPreviewComponent.prototype.ngAfterViewInit = function () {
|
813
|
-
var _this = this;
|
814
|
-
rxjs.combineLatest([this.lockedProductId$, this.isEditMode$, this.shouldUpdate$, this.overlayPanel.onShow])
|
815
|
-
.pipe(rxjs.filter(function () { return _this.overlayPanel.overlayVisible; }), rxjs.takeUntil(this.destroyed$))
|
816
|
-
.subscribe(function (_b) {
|
817
|
-
var _c = __read(_b, 2), lockedProductId = _c[0], isEditMode = _c[1];
|
818
|
-
return _this.updateControls(_this.products, isEditMode, lockedProductId);
|
819
|
-
});
|
820
|
-
};
|
821
|
-
CartPreviewComponent.prototype.ngOnDestroy = function () {
|
822
|
-
this.destroyed$.next();
|
823
|
-
this.destroyed$.complete();
|
824
|
-
};
|
825
|
-
CartPreviewComponent.prototype.getImageUrl = function (productId) {
|
826
|
-
return this.productImagesService.getImageUrl$(productId);
|
827
|
-
};
|
828
|
-
CartPreviewComponent.prototype.navigateToProductConfiguration = function (productId, lineItemId) {
|
829
|
-
this.overlayPanel.hide();
|
830
|
-
this.routerService.navigateToProductConfiguration(productId, lineItemId);
|
831
|
-
};
|
832
|
-
CartPreviewComponent.prototype.controlBlurHandler = function (product) {
|
833
|
-
var control = this.form.controls[product.id];
|
834
|
-
if (control.invalid) {
|
835
|
-
return;
|
836
|
-
}
|
837
|
-
this.flowConfiguration.update([
|
838
|
-
{
|
839
|
-
dataType: 'LINEITEM',
|
840
|
-
attributeType: 'QTY',
|
841
|
-
id: product.id,
|
842
|
-
newValue: control.value,
|
843
|
-
},
|
844
|
-
]);
|
845
|
-
};
|
846
|
-
CartPreviewComponent.prototype.deleteHandler = function (product) {
|
847
|
-
this.flowConfiguration.delete([product.id]);
|
848
|
-
};
|
849
|
-
CartPreviewComponent.prototype.deleteAllHandler = function () {
|
850
|
-
var productIds = this.products.map(function (product) { return product.id; });
|
851
|
-
this.flowConfiguration.delete(productIds);
|
852
|
-
};
|
853
|
-
CartPreviewComponent.prototype.updateControls = function (products, isEditMode, lockedProductId) {
|
854
|
-
var _this = this;
|
855
|
-
var ids = [];
|
856
|
-
products.forEach(function (item) {
|
857
|
-
var _a;
|
858
|
-
if (!item.id) {
|
859
|
-
return;
|
860
|
-
}
|
861
|
-
ids.push(item.id);
|
862
|
-
if (!_this.form.controls[item.id]) {
|
863
|
-
_this.form.addControl(item.id, new i10.FormControl(item.qty, []));
|
864
|
-
}
|
865
|
-
else {
|
866
|
-
(_a = _this.form.controls[item.id]) === null || _a === void 0 ? void 0 : _a.setValue(item.qty);
|
867
|
-
}
|
868
|
-
if (!isEditMode || item.deleted || item.productId === lockedProductId) {
|
869
|
-
_this.form.controls[item.id].disable();
|
870
|
-
}
|
871
|
-
else {
|
872
|
-
_this.form.controls[item.id].enable();
|
873
|
-
}
|
874
|
-
});
|
875
|
-
var removedIds = Object.keys(this.form.controls).filter(function (id) { return !ids.includes(id); });
|
876
|
-
removedIds.forEach(function (id) { return _this.form.removeControl(id); });
|
877
|
-
this.hasTermInProducts = products.some(function (item) { return item.hasTerm; });
|
878
|
-
};
|
879
|
-
return CartPreviewComponent;
|
880
|
-
}());
|
881
|
-
CartPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CartPreviewComponent, deps: [{ token: i1__namespace$1.FlowConfigurationService }, { token: FlowRouterService }, { token: i1__namespace$1.ProductImagesService }, { token: i1__namespace$1.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
882
|
-
CartPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CartPreviewComponent, selector: "vl-cart-preview", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i3$1.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center no-padding\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"lockedProductId$ | async as lockedProductId\">\n <ng-container *vlLet=\"isEditMode$ | async as isEditMode\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <p-virtualScroller [value]=\"products\" scrollHeight=\"{{ scrollHeight }}px\" [itemSize]=\"productRowHeight\">\n <ng-template pTemplate=\"header\">\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n </div>\n </ng-template>\n\n <ng-template pTemplate=\"item\" let-product>\n <div\n class=\"product item\"\n *vlLet=\"!isEditMode || product.deleted as isReadonlyProduct\"\n [class.readonly]=\"isReadonlyProduct\"\n [class.deleted]=\"product.deleted\"\n >\n <ng-container *vlLet=\"lockedProductId === product.productId as isLockedProduct\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\" [class.line-through]=\"product.deleted\">{{ product.name }}</div>\n <div *ngIf=\"!isReadonlyProduct\">\n <p-button\n label=\"Configure\"\n [disabled]=\"isLockedProduct || !product.configurable || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-2 pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId, product.id)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"isLockedProduct || product.hasTerm\"\n styleClass=\"p-button-link p-button-sm p-button-danger p-2 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"form.controls[product.id] as control\">\n <span class=\"pt-2\" *ngIf=\"!isReadonlyProduct; else readonlyQty\">\n <p-inputNumber\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <ng-template #readonlyQty\n ><span class=\"text-right\">{{ control.value }}</span></ng-template\n >\n </ng-container>\n </ng-container>\n </div>\n </ng-template>\n </p-virtualScroller>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n\n <div class=\"flex justify-content-end footer\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"!isEditMode || !!lockedProductId || hasTermInProducts\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: ["p-virtualscroller ::ng-deep .p-virtualscroller-header{background:none;padding:0;border:none;font-weight:unset}p-virtualscroller ::ng-deep cdk-virtual-scroll-viewport{overflow-y:scroll}.flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0;padding:16px}.empty-state{color:var(--vl-text-color-deep-accent);padding:0 16px 16px}.product{display:grid;grid-template-columns:auto 60px;padding:16px;border-bottom:1px solid var(--vl-border-color)}.product.readonly{align-items:center}.product.deleted{opacity:.5}.product.header{position:sticky;top:0;background-color:var(--surface-card);z-index:1;color:var(--vl-text-color-deep-accent);padding-bottom:0;border-bottom:none;overflow-y:scroll}.product .item{height:97px;overflow:hidden}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;height:24px;width:100%}.footer{padding:12px 16px}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}:host ::ng-deep .p-overlaypanel.navigation-settings-overlay{margin-top:20px}\n"], components: [{ type: i3__namespace$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i4__namespace$1.VirtualScroller, selector: "p-virtualScroller", inputs: ["value", "itemSize", "style", "styleClass", "scrollHeight", "lazy", "rows", "minBufferPx", "maxBufferPx", "delay", "trackBy", "totalRecords", "first", "cache"], outputs: ["onLazyLoad"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i2__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i10__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i10__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
883
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CartPreviewComponent, decorators: [{
|
884
|
-
type: i0.Component,
|
885
|
-
args: [{
|
886
|
-
selector: 'vl-cart-preview',
|
887
|
-
templateUrl: './cart-preview.component.html',
|
888
|
-
styleUrls: ['./cart-preview.component.scss'],
|
889
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
890
|
-
}]
|
891
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.FlowConfigurationService }, { type: FlowRouterService }, { type: i1__namespace$1.ProductImagesService }, { type: i1__namespace$1.QuoteDraftService }]; }, propDecorators: { overlayPanel: [{
|
892
|
-
type: i0.ViewChild,
|
893
|
-
args: [i3$1.OverlayPanel]
|
894
|
-
}], products: [{
|
895
|
-
type: i0.Input
|
896
|
-
}] } });
|
897
|
-
|
898
|
-
var CartPreviewModule = /** @class */ (function () {
|
899
|
-
function CartPreviewModule() {
|
900
|
-
}
|
901
|
-
return CartPreviewModule;
|
902
|
-
}());
|
903
|
-
CartPreviewModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CartPreviewModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
904
|
-
CartPreviewModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CartPreviewModule, declarations: [CartPreviewComponent], imports: [i5$1.CommonModule,
|
905
|
-
i10.ReactiveFormsModule,
|
906
|
-
i5.ButtonModule,
|
907
|
-
i3$1.OverlayPanelModule,
|
908
|
-
i3.LetDirectiveModule,
|
909
|
-
i6.InputNumberModule,
|
910
|
-
i4$1.VirtualScrollerModule], exports: [CartPreviewComponent] });
|
911
|
-
CartPreviewModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CartPreviewModule, imports: [[
|
912
|
-
i5$1.CommonModule,
|
913
|
-
i10.ReactiveFormsModule,
|
914
|
-
i5.ButtonModule,
|
915
|
-
i3$1.OverlayPanelModule,
|
916
|
-
i3.LetDirectiveModule,
|
917
|
-
i6.InputNumberModule,
|
918
|
-
i4$1.VirtualScrollerModule,
|
919
|
-
]] });
|
920
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CartPreviewModule, decorators: [{
|
921
|
-
type: i0.NgModule,
|
922
|
-
args: [{
|
923
|
-
declarations: [CartPreviewComponent],
|
924
|
-
imports: [
|
925
|
-
i5$1.CommonModule,
|
926
|
-
i10.ReactiveFormsModule,
|
927
|
-
i5.ButtonModule,
|
928
|
-
i3$1.OverlayPanelModule,
|
929
|
-
i3.LetDirectiveModule,
|
930
|
-
i6.InputNumberModule,
|
931
|
-
i4$1.VirtualScrollerModule,
|
932
|
-
],
|
933
|
-
exports: [CartPreviewComponent],
|
934
|
-
}]
|
935
|
-
}] });
|
936
|
-
|
937
|
-
var FlowDialogService = /** @class */ (function () {
|
938
|
-
function FlowDialogService(dialogService, contextService) {
|
939
|
-
this.dialogService = dialogService;
|
940
|
-
this.contextService = contextService;
|
941
|
-
}
|
942
|
-
FlowDialogService.prototype.show = function (config) {
|
943
|
-
return this.dialogService.open(FlowDialogComponent, {
|
944
|
-
dismissableMask: true,
|
945
|
-
closeOnEscape: true,
|
946
|
-
closable: true,
|
947
|
-
showHeader: true,
|
948
|
-
header: config.title,
|
949
|
-
width: '440px',
|
950
|
-
data: { config: config },
|
951
|
-
}).onClose;
|
952
|
-
};
|
953
|
-
FlowDialogService.prototype.showEmptyCartDialog = function () {
|
954
|
-
return this.show({
|
955
|
-
title: 'No Products in Quote',
|
956
|
-
description: 'There are no products in your Quote. To save a Quote, add at least one product.',
|
957
|
-
primaryButton: 'OK',
|
958
|
-
});
|
959
|
-
};
|
960
|
-
FlowDialogService.prototype.showReadonlyModeDialog = function () {
|
961
|
-
var ctx = this.contextService.resolve();
|
962
|
-
var objectName = ctx.mode ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
|
963
|
-
return this.show({
|
964
|
-
title: 'Error',
|
965
|
-
description: objectName + " Cannot be Saved",
|
966
|
-
primaryButton: 'OK',
|
967
|
-
});
|
968
|
-
};
|
969
|
-
FlowDialogService.prototype.showQuoteReadonlyModeDialog = function () {
|
970
|
-
return this.show({
|
971
|
-
title: 'Quote Cannot be Saved',
|
972
|
-
description: 'It is only possible to save quotes with the “Draft” status. Please create a new quote to make and save changes.',
|
973
|
-
primaryButton: 'OK',
|
974
|
-
});
|
975
|
-
};
|
976
|
-
FlowDialogService.prototype.showQuoteOutsideShoppingCartDialog = function () {
|
977
|
-
return this.show({
|
978
|
-
title: 'Quote Cannot be Saved',
|
979
|
-
description: 'It is only possible to save quotes from the Shopping Cart. To proceed, go to the Shopping Cart.',
|
980
|
-
primaryButton: 'OK',
|
981
|
-
});
|
982
|
-
};
|
983
|
-
FlowDialogService.prototype.showAccountNoChangesDialog = function () {
|
984
|
-
return this.show({
|
985
|
-
title: 'No Changes to Save',
|
986
|
-
description: 'There are no changes since the last update. Please make changes to proceed.',
|
987
|
-
primaryButton: 'OK',
|
988
|
-
});
|
989
|
-
};
|
990
|
-
FlowDialogService.prototype.showUnsavedChangesDialog = function () {
|
991
|
-
return this.show({
|
992
|
-
title: 'Unsaved Changes',
|
993
|
-
description: 'Are you sure you want to leave this page and discard your unsaved changes?',
|
994
|
-
primaryButton: 'Keep Editing',
|
995
|
-
secondaryButton: 'Discard Changes',
|
996
|
-
oppositeButtonActions: true,
|
997
|
-
});
|
998
|
-
};
|
999
|
-
FlowDialogService.prototype.showReadonlyQuoteSubmitFailureDialog = function () {
|
1000
|
-
return this.show({
|
1001
|
-
title: 'Cannot Submit for Approval',
|
1002
|
-
description: 'It is only possible to submit for approval quotes with the “Draft“ status. Please create a new quote to proceed.',
|
1003
|
-
primaryButton: 'OK',
|
1004
|
-
});
|
1005
|
-
};
|
1006
|
-
FlowDialogService.prototype.showOutsideShoppingCartQuoteSubmitFailureDialog = function () {
|
1007
|
-
return this.show({
|
1008
|
-
title: 'Cannot Submit for Approval',
|
1009
|
-
description: 'It is only possible to submit quotes for approval from the Shopping Cart. To proceed, go to the Shopping Cart.',
|
1010
|
-
primaryButton: 'OK',
|
1011
|
-
});
|
1012
|
-
};
|
1013
|
-
FlowDialogService.prototype.showAccountSubmitFailureDialog = function () {
|
1014
|
-
return this.show({
|
1015
|
-
title: 'Save Changes',
|
1016
|
-
description: 'To submit for approval, save the quote first, and then submit it for approval from the Shopping Cart.',
|
1017
|
-
primaryButton: 'OK',
|
1018
|
-
});
|
1019
|
-
};
|
1020
|
-
FlowDialogService.prototype.showDocgenAccountUnsavedChangesDialog = function () {
|
1021
|
-
return this.show({
|
1022
|
-
title: 'Save Quote',
|
1023
|
-
description: 'To generate a document, save the quote first, and then generate the document from the Shopping Cart.',
|
1024
|
-
primaryButton: 'OK',
|
1025
|
-
});
|
1026
|
-
};
|
1027
|
-
FlowDialogService.prototype.showDocgenReadonlyDialog = function () {
|
1028
|
-
return this.show({
|
1029
|
-
title: 'Document Generation is not Available',
|
1030
|
-
description: 'It is only possible to generate documents for quotes with the “Draft” status. Please create a new quote to generate a document.',
|
1031
|
-
primaryButton: 'OK',
|
1032
|
-
});
|
1033
|
-
};
|
1034
|
-
FlowDialogService.prototype.showDocgenOutsideShoppingCartDialog = function () {
|
1035
|
-
return this.show({
|
1036
|
-
title: 'Document Generation is not Available',
|
1037
|
-
description: 'It is only possible to generate documents for quotes from the Shopping Cart. To proceed, go to the Shopping Cart.',
|
1038
|
-
primaryButton: 'OK',
|
1039
|
-
});
|
1040
|
-
};
|
1041
|
-
FlowDialogService.prototype.showDocgenUnsavedChangesDialog = function () {
|
1042
|
-
return this.show({
|
1043
|
-
title: 'Unsaved Changes',
|
1044
|
-
description: 'To generate a document, save the quote first.',
|
1045
|
-
primaryButton: 'Save and proceed',
|
1046
|
-
secondaryButton: 'Cancel',
|
1047
|
-
});
|
1048
|
-
};
|
1049
|
-
return FlowDialogService;
|
1050
|
-
}());
|
1051
|
-
FlowDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogService, deps: [{ token: i1__namespace.DialogService }, { token: i1__namespace$1.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1052
|
-
FlowDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogService });
|
1053
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowDialogService, decorators: [{
|
1054
|
-
type: i0.Injectable
|
1055
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.DialogService }, { type: i1__namespace$1.ContextService }]; } });
|
1056
|
-
|
1057
|
-
var METRICS_STORAGE_KEY = 'vl-metrics';
|
1058
|
-
|
1059
|
-
var MetricsComponent = /** @class */ (function () {
|
1060
|
-
function MetricsComponent(contextService, quoteDraftService, cdr, metricsCalculationService, flowConfiguration, shoppingCartSettingsApiService) {
|
1061
|
-
this.contextService = contextService;
|
1062
|
-
this.quoteDraftService = quoteDraftService;
|
1063
|
-
this.cdr = cdr;
|
1064
|
-
this.metricsCalculationService = metricsCalculationService;
|
1065
|
-
this.flowConfiguration = flowConfiguration;
|
1066
|
-
this.shoppingCartSettingsApiService = shoppingCartSettingsApiService;
|
1067
|
-
this.emptyStateMetrics = [
|
1068
|
-
{ name: 'MRR', value: 0 },
|
1069
|
-
{ name: 'E.MRR', value: 0 },
|
1070
|
-
{ name: 'NRR', value: 0 },
|
1071
|
-
{ name: 'E.NRR', value: 0 },
|
1072
|
-
];
|
1073
|
-
this.visibleSelectedMetrics = [];
|
1074
|
-
this.restSelectedMetrics = [];
|
1075
|
-
this.metrics = [];
|
1076
|
-
this.filteredMetrics = [];
|
1077
|
-
this.sidebarVisible = false;
|
1078
|
-
this.searchControl = new i10.FormControl('');
|
1079
|
-
this.nameControl = new i10.FormControl('', [
|
1080
|
-
forms.requiredValidator,
|
1081
|
-
forms.invalidCharactersValidator(forms.standardCharSetWithSpaceRegExp),
|
1082
|
-
forms.reservedIdentifierValidator,
|
1083
|
-
i10.Validators.maxLength(80),
|
1084
|
-
]);
|
1085
|
-
this.activeMetricRules = [];
|
1086
|
-
this.activeMetricRuleNames = [];
|
1087
|
-
this.defaultMetricRuleNames = [];
|
1088
|
-
this.metricKeys = [];
|
1089
|
-
this.lastSavedMetrics = [];
|
1090
|
-
this.destroyed$ = new rxjs.Subject();
|
1091
|
-
}
|
1092
|
-
MetricsComponent.prototype.ngOnInit = function () {
|
1093
|
-
var _this = this;
|
1094
|
-
this.activeMetricRules = this.flowConfiguration.activeMetricsSnapshot.filter(function (metricRule) { return metricRule.metrics.some(function (metric) { return !!metric.totalName; }); });
|
1095
|
-
var activeMetricRuleNames = this.activeMetricRules.map(function (metricRule) { return metricRule.title; });
|
1096
|
-
this.shoppingCartSettingsApiService
|
1097
|
-
.getSettingsMap()
|
1098
|
-
.pipe(operators.withLatestFrom(this.quoteDraftService.currentState$), operators.tap(function (_b) {
|
1099
|
-
var _c = __read(_b, 2), settings = _c[0], lineItems = _c[1];
|
1100
|
-
_this.defaultMetricRuleNames = ((settings === null || settings === void 0 ? void 0 : settings.DEFAULT_HEADER_METRICS) || []).filter(function (ruleName) { return activeMetricRuleNames.includes(ruleName); });
|
1101
|
-
_this.metricKeys = _this.collectMetricKeys(lineItems);
|
1102
|
-
_this.activeMetricRuleNames = _this.getActiveMetricRuleNames();
|
1103
|
-
}), operators.takeUntil(this.destroyed$))
|
1104
|
-
.subscribe(function () {
|
1105
|
-
_this.collectAvailableMetrics();
|
1106
|
-
});
|
1107
|
-
this.searchControl.valueChanges.pipe(operators.takeUntil(this.destroyed$), rxjs.startWith('')).subscribe(function (query) {
|
1108
|
-
_this.filteredMetrics = _this.metrics.filter(function (_b) {
|
1109
|
-
var name = _b.name;
|
1110
|
-
return (name || '').toLowerCase().includes(query === null || query === void 0 ? void 0 : query.toLowerCase());
|
1111
|
-
});
|
1112
|
-
});
|
1113
|
-
this.metricsCalculationService.onMetricsUpdate$
|
1114
|
-
.pipe(operators.takeUntil(this.destroyed$))
|
1115
|
-
.subscribe(function () { return _this.cdr.detectChanges(); });
|
1116
|
-
};
|
1117
|
-
MetricsComponent.prototype.ngOnDestroy = function () {
|
1118
|
-
this.destroyed$.next();
|
1119
|
-
this.destroyed$.complete();
|
1120
|
-
};
|
1121
|
-
MetricsComponent.prototype.openSidebar = function () {
|
1122
|
-
this.overlayPanel.hide();
|
1123
|
-
this.sidebarVisible = true;
|
1124
|
-
};
|
1125
|
-
MetricsComponent.prototype.closeSidebar = function () {
|
1126
|
-
this.sidebarVisible = false;
|
1127
|
-
this.metrics = lodash.cloneDeep(this.lastSavedMetrics);
|
1128
|
-
this.editingMetric = undefined;
|
1129
|
-
this.searchControl.setValue('');
|
1130
|
-
};
|
1131
|
-
MetricsComponent.prototype.getMetricValue = function (key) {
|
1132
|
-
var context = this.contextService.resolve();
|
1133
|
-
if (key.startsWith('Effective_')) {
|
1134
|
-
var correctKey = key.replace('Effective_', '');
|
1135
|
-
return this.toNumber(context.properties[correctKey]) - this.toNumber(context.properties["Previous" + correctKey]);
|
1136
|
-
}
|
1137
|
-
else {
|
1138
|
-
return this.metricsCalculationService.getMetricValue(key);
|
1139
|
-
}
|
1140
|
-
};
|
1141
|
-
MetricsComponent.prototype.save = function () {
|
1142
|
-
localStorage.setItem(METRICS_STORAGE_KEY, JSON.stringify(this.metrics));
|
1143
|
-
this.setMetrics();
|
1144
|
-
this.lastSavedMetrics = lodash.cloneDeep(this.metrics);
|
1145
|
-
this.closeSidebar();
|
1146
|
-
};
|
1147
|
-
MetricsComponent.prototype.changeMetricOrder = function (event) {
|
1148
|
-
i12.moveItemInArray(this.metrics, event.previousIndex, event.currentIndex);
|
1149
|
-
this.filteredMetrics = this.metrics;
|
1150
|
-
};
|
1151
|
-
MetricsComponent.prototype.editMetric = function (metric) {
|
1152
|
-
if (this.editingMetric && this.nameControl.invalid) {
|
1153
|
-
return;
|
1154
|
-
}
|
1155
|
-
this.editingMetric = metric;
|
1156
|
-
this.nameControl.setValue(metric.name);
|
1157
|
-
};
|
1158
|
-
MetricsComponent.prototype.saveMetric = function () {
|
1159
|
-
var _a;
|
1160
|
-
if (this.nameControl.invalid) {
|
1161
|
-
return;
|
1162
|
-
}
|
1163
|
-
if (this.editingMetric) {
|
1164
|
-
this.editingMetric.name = (_a = this.nameControl.value) === null || _a === void 0 ? void 0 : _a.trim();
|
1165
|
-
}
|
1166
|
-
this.editingMetric = undefined;
|
1167
|
-
};
|
1168
|
-
MetricsComponent.prototype.resetToDefault = function () {
|
1169
|
-
this.collectAvailableMetrics(true);
|
1170
|
-
};
|
1171
|
-
MetricsComponent.prototype.collectMetricKeys = function (lineItems) {
|
1172
|
-
var _this = this;
|
1173
|
-
var keys = [];
|
1174
|
-
lineItems.forEach(function (lineItem) {
|
1175
|
-
keys.push.apply(keys, __spreadArray([], __read(Object.keys(lineItem.totalMetrics || {}))));
|
1176
|
-
keys.push.apply(keys, __spreadArray([], __read(_this.collectMetricKeys(lineItem.lineItems))));
|
1177
|
-
});
|
1178
|
-
return lodash.uniq(keys);
|
1179
|
-
};
|
1180
|
-
MetricsComponent.prototype.setMetrics = function () {
|
1181
|
-
var metrics = lodash.cloneDeep(this.metrics.filter(function (_b) {
|
1182
|
-
var visible = _b.visible;
|
1183
|
-
return visible;
|
1184
|
-
}));
|
1185
|
-
this.visibleSelectedMetrics = metrics.slice(0, 4);
|
1186
|
-
this.restSelectedMetrics = metrics.slice(4);
|
1187
|
-
};
|
1188
|
-
MetricsComponent.prototype.collectAvailableMetrics = function (resetToDefault) {
|
1189
|
-
var _this = this;
|
1190
|
-
if (resetToDefault === void 0) { resetToDefault = false; }
|
1191
|
-
var storedMetrics = JSON.parse(localStorage.getItem(METRICS_STORAGE_KEY) || '[]');
|
1192
|
-
var metricKeys = this.metricKeys.slice();
|
1193
|
-
var isDefaultConfiguration = !storedMetrics.length || resetToDefault;
|
1194
|
-
this.metrics = (isDefaultConfiguration ? this.activeMetricRuleNames : storedMetrics).reduce(function (result, metric) {
|
1195
|
-
var metricKeyIndex = metricKeys.findIndex(function (key) { return key === metric.key; });
|
1196
|
-
if (metricKeyIndex >= 0) {
|
1197
|
-
metricKeys.splice(metricKeyIndex, 1);
|
1198
|
-
}
|
1199
|
-
if (isDefaultConfiguration && _this.defaultMetricRuleNames.includes(metric.name)) {
|
1200
|
-
metric.visible = true;
|
1201
|
-
}
|
1202
|
-
return __spreadArray(__spreadArray([], __read(result)), [metric]);
|
1203
|
-
}, []);
|
1204
|
-
this.metrics = __spreadArray(__spreadArray([], __read(this.metrics)), __read(metricKeys.map(function (metricKey) {
|
1205
|
-
return { key: metricKey, name: _this.getMetricName(metricKey), visible: false };
|
1206
|
-
})));
|
1207
|
-
// sort the metrics by the order of default metric rule names from the shopping cart settings
|
1208
|
-
this.metrics = this.sortMetrics();
|
1209
|
-
this.metrics = lodash.cloneDeep(this.metrics);
|
1210
|
-
this.searchControl.setValue('');
|
1211
|
-
if (!resetToDefault) {
|
1212
|
-
this.lastSavedMetrics = lodash.cloneDeep(this.metrics);
|
1213
|
-
this.setMetrics();
|
1214
|
-
}
|
1215
|
-
this.cdr.markForCheck();
|
1216
|
-
};
|
1217
|
-
MetricsComponent.prototype.getMetricName = function (key) {
|
1218
|
-
var _a;
|
1219
|
-
return (((_a = this.activeMetricRules.find(function (metricRule) { return metricRule.metrics.find(function (metric) { return metric.totalName === key; }); })) === null || _a === void 0 ? void 0 : _a.title) ||
|
1220
|
-
key);
|
1221
|
-
};
|
1222
|
-
MetricsComponent.prototype.toNumber = function (value) {
|
1223
|
-
return +(value || 0);
|
1224
|
-
};
|
1225
|
-
MetricsComponent.prototype.getActiveMetricRuleNames = function () {
|
1226
|
-
var _this = this;
|
1227
|
-
return this.activeMetricRules.reduce(function (result, metricRule) {
|
1228
|
-
var name = metricRule.title;
|
1229
|
-
var visible = _this.defaultMetricRuleNames.includes(name);
|
1230
|
-
metricRule.metrics.forEach(function (metric) {
|
1231
|
-
result.push({
|
1232
|
-
key: metric.totalName || metric.name,
|
1233
|
-
name: name,
|
1234
|
-
visible: visible,
|
1235
|
-
});
|
1236
|
-
});
|
1237
|
-
return result;
|
1238
|
-
}, []);
|
1239
|
-
};
|
1240
|
-
/**
|
1241
|
-
* Sorts the Metrics array by the order of the default metric rule names from the shopping cart settings.
|
1242
|
-
* If a metric is included in the list of default metrics, it raises the metric to the top of the metrics array.
|
1243
|
-
*/
|
1244
|
-
MetricsComponent.prototype.sortMetrics = function () {
|
1245
|
-
var _this = this;
|
1246
|
-
return this.metrics.slice().sort(function (a, b) {
|
1247
|
-
var indexA = _this.defaultMetricRuleNames.indexOf(a.name);
|
1248
|
-
var indexB = _this.defaultMetricRuleNames.indexOf(b.name);
|
1249
|
-
if (indexA === -1 && indexB === -1) {
|
1250
|
-
return 0;
|
1251
|
-
}
|
1252
|
-
if (indexA === -1) {
|
1253
|
-
return 1;
|
1254
|
-
}
|
1255
|
-
if (indexB === -1) {
|
1256
|
-
return -1;
|
1257
|
-
}
|
1258
|
-
return indexA - indexB;
|
1259
|
-
});
|
1260
|
-
};
|
1261
|
-
return MetricsComponent;
|
1262
|
-
}());
|
1263
|
-
MetricsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MetricsComponent, deps: [{ token: i1__namespace$1.ContextService }, { token: i1__namespace$1.QuoteDraftService }, { token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace$1.MetricsCalculationService }, { token: i1__namespace$1.FlowConfigurationService }, { token: i2__namespace.ShoppingCartSettingsApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
1264
|
-
MetricsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MetricsComponent, selector: "vl-metrics", viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i3$1.OverlayPanel, descendants: true }], ngImport: i0__namespace, template: "<div class=\"header-metrics\" (click)=\"overlayPanel.toggle($event)\">\n <div *ngFor=\"let metric of visibleSelectedMetrics\" class=\"metric\">\n <span class=\"name\" [vlHiddenTextTooltip]=\"metric.name\" tooltipStyleClass=\"metric-tooltip\" tooltipPosition=\"bottom\">\n {{ metric.name }}\n </span>\n <span class=\"filler\"></span>\n <span\n class=\"value\"\n vlHiddenTextTooltip=\"${{ getMetricValue(metric.key) | number: '1.2-2' }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n ${{ getMetricValue(metric.key) | number: '1.2-2' }}\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 | number: '1.2-2' }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n ${{ metric.value | number: '1.2-2' }}\n </span>\n </div>\n </ng-container>\n</div>\n\n<p-overlayPanel\n styleClass=\"metrics-overlay-container center 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) | number: '1.2-2' }}\"\n tooltipStyleClass=\"metric-tooltip\"\n tooltipPosition=\"bottom\"\n >\n ${{ getMetricValue(metric.key) | number: '1.2-2' }}\n </span>\n </div>\n </div>\n <button class=\"config\" (click)=\"openSidebar()\">\n Metrics Config\n <i class=\"vl-icon vl-icon-chevron-down\"></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: '360px' }\"\n>\n <div class=\"container\">\n <div class=\"header\">\n Quote Metrics Config\n <i class=\"vl-icon vl-icon-close\" (click)=\"closeSidebar()\"></i>\n </div>\n\n <div class=\"search-container\">\n <input\n data-test-id=\"search\"\n [formControl]=\"searchControl\"\n pInputText\n placeholder=\"Search for metric\u2026\"\n class=\"w-full\"\n />\n </div>\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-icon-reorder\" 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-icon-checkmark\"\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 *ngIf=\"editingMetric?.key !== metric.key\" (click)=\"editMetric(metric)\" class=\"action edit\">\n <i class=\"vl-icon vl-icon-edit-sm\"></i>\n </div>\n <div *ngIf=\"editingMetric?.key === metric.key\" (click)=\"saveMetric()\" class=\"action save\">\n <i class=\"vl-icon vl-icon-checkmark\"></i>\n </div>\n</ng-template>\n", styles: [":host .header-metrics{cursor:pointer;min-width:130px;max-width:260px;display:flex;flex-wrap:wrap;justify-content:flex-start;grid-gap:0 16px;gap:0 16px;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{max-width:55px;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .header-metrics .metric .value{font-weight:600;overflow:hidden;text-overflow:ellipsis}:host .header-metrics .metric.empty-state-metric{filter:blur(1.5px)}:host ::ng-deep .p-sidebar-header{display:none}:host ::ng-deep .p-sidebar-content{padding:0 24px;height:100%}::ng-deep .metrics-overlay-container{max-width:300px}::ng-deep .metrics-overlay-container .p-overlaypanel-content{padding:0}::ng-deep .metrics-overlay-container .overlay-metrics{max-height:110px;overflow:auto}::ng-deep .metrics-overlay-container .metric{display:flex;padding:0 12px;font-size:12px;line-height:16px;letter-spacing:.3px;align-items:flex-end}::ng-deep .metrics-overlay-container .metric .name{max-width:50%;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}::ng-deep .metrics-overlay-container .metric .value{font-weight:600;overflow:hidden;text-overflow:ellipsis}::ng-deep .metrics-overlay-container .metric:not(:last-of-type){margin-bottom:4px}::ng-deep .metrics-overlay-container .metric:first-of-type{margin-top:12px}::ng-deep .metrics-overlay-container .metric:last-of-type{margin-bottom:12px}::ng-deep .metrics-overlay-container .config{display:flex;align-items:center;justify-content:space-between;padding:0 12px;cursor:pointer;background:var(--vl-color-light-blue);outline:none;border:none;width:100%;height:32px;font-size:12px;line-height:16px;letter-spacing:.3px}::ng-deep .metrics-overlay-container .config .vl-icon-chevron-down{color:var(--vl-text-color-accent-light);transform:rotate(-90deg)}.filler{flex:1;margin:0 4px 3px;min-width:5px}.filler:before{display:block;width:100%;height:2px;content:\"\";background-image:radial-gradient(circle at 1px 1px,var(--vl-text-color-accent-light) 1px,transparent 0);background-size:3px 2px}.container{display:flex;flex-direction:column;height:100%}.container .header{margin:15px 0 23px;flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;font-weight:600;font-size:18px;line-height:26px;letter-spacing:-.6px;color:var(--vl-accent-color)}.container .header i{cursor:pointer;font-size:15px}.container .search-container{margin-bottom:12px}.container .search-container input{width:100%}.container .content{display:flex;flex-direction:column;flex:1;overflow:hidden}.container .footer{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;height:60px;padding:0 20px;margin:0 -16px;border-top:1px solid var(--vl-border-color)}.container .footer p-button{flex:1}.container .footer p-button ::ng-deep button{width:100%}.container .footer p-button:not(:last-child){margin-right:16px}.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;flex:1;align-items:center;justify-content:center;color:var(--vl-text-color-deep-accent);font-size:12px;line-height:16px;letter-spacing:.3px}.sidebar-metric{display:flex;align-items:center;height:32px;position:relative;padding-left:8px;border-radius:2px}.sidebar-metric:hover:not(.edit){background:var(--vl-color-light-blue)}.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:#c5d1e2}.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;-moz-user-select:text;user-select:text;cursor:text;color:var(--vl-text-color-secondary)}.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{width:100%}.sidebar-metric .action{cursor:pointer;width:32px;height:32px;display:flex;align-items:center;justify-content:center}.sidebar-metric .edit{visibility:hidden}.sidebar-metric .edit i{color:var(--vl-text-color-deep-accent);width:12px;height:12px}.sidebar-metric .save{background:var(--vl-primary-color);border-radius:2px}.sidebar-metric .save i{color:#fff}.sidebar-metric ::ng-deep .p-checkbox{width:16px;height:16px}.sidebar-metric ::ng-deep .p-checkbox .p-checkbox-box{width:16px;height:16px}.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"], components: [{ type: i3__namespace$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i4__namespace$2.Sidebar, selector: "p-sidebar", inputs: ["appendTo", "blockScroll", "style", "styleClass", "ariaCloseLabel", "autoZIndex", "baseZIndex", "modal", "dismissible", "showCloseIcon", "closeOnEscape", "transitionOptions", "visible", "position", "fullScreen"], outputs: ["onShow", "onHide", "visibleChange"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace$1.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"] }, { type: i3__namespace.ErrorTooltipComponent, selector: "vl-error-tooltip", inputs: ["tooltip", "visible", "top"] }], directives: [{ type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.AppHiddenTextTooltipDirective, selector: "[vlHiddenTextTooltip]", inputs: ["vlHiddenTextTooltip"] }, { type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i10__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i11__namespace.InputText, selector: "[pInputText]" }, { type: i10__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i12__namespace.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "id", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListAutoScrollDisabled", "cdkDropListOrientation", "cdkDropListLockAxis", "cdkDropListData", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { type: i12__namespace.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragDisabled", "cdkDragStartDelay", "cdkDragLockAxis", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragBoundary", "cdkDragRootElement", "cdkDragPreviewContainer", "cdkDragData", "cdkDragFreeDragPosition"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i12__namespace.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { type: i5__namespace$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i10__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "number": i5__namespace$1.DecimalPipe, "error": i3__namespace.ErrorPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
1265
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MetricsComponent, decorators: [{
|
1266
|
-
type: i0.Component,
|
1267
|
-
args: [{
|
1268
|
-
selector: 'vl-metrics',
|
1269
|
-
templateUrl: './metrics.component.html',
|
1270
|
-
styleUrls: ['./metrics.component.scss'],
|
1271
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
1272
|
-
}]
|
1273
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.ContextService }, { type: i1__namespace$1.QuoteDraftService }, { type: i0__namespace.ChangeDetectorRef }, { type: i1__namespace$1.MetricsCalculationService }, { type: i1__namespace$1.FlowConfigurationService }, { type: i2__namespace.ShoppingCartSettingsApiService }]; }, propDecorators: { overlayPanel: [{
|
1274
|
-
type: i0.ViewChild,
|
1275
|
-
args: [i3$1.OverlayPanel]
|
1276
|
-
}] } });
|
1277
|
-
|
1278
|
-
var FlowHeaderComponent = /** @class */ (function () {
|
1279
|
-
function FlowHeaderComponent(contextService, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService, integrationState, shoppingCartSettingsApiService) {
|
1280
|
-
var _this = this;
|
1281
|
-
this.contextService = contextService;
|
1282
|
-
this.quoteDraftService = quoteDraftService;
|
1283
|
-
this.quoteApiService = quoteApiService;
|
1284
|
-
this.sfApiService = sfApiService;
|
1285
|
-
this.flowConfiguration = flowConfiguration;
|
1286
|
-
this.routerService = routerService;
|
1287
|
-
this.dialogService = dialogService;
|
1288
|
-
this.integrationState = integrationState;
|
1289
|
-
this.shoppingCartSettingsApiService = shoppingCartSettingsApiService;
|
1290
|
-
this.isSaveInProgress$ = new rxjs.BehaviorSubject(false);
|
1291
|
-
this.isSubmitInProgress$ = new rxjs.BehaviorSubject(false);
|
1292
|
-
this.dateFormat = 'MM.dd.yyyy';
|
1293
|
-
this.assetPriceLists$ = new rxjs.BehaviorSubject([]);
|
1294
|
-
this.mode$ = new rxjs.BehaviorSubject(core.ConfigurationContextMode.TEST);
|
1295
|
-
this.destroyed$ = new rxjs.Subject();
|
1296
|
-
this.contextProperties$ = this.contextService.resolve$().pipe(rxjs.map(function (ctx) { return ctx.properties; }));
|
1297
|
-
this.objectName$ = this.mode$.pipe(rxjs.map(function (mode) { var _a; return (_a = mode === null || mode === void 0 ? void 0 : mode.toLocaleLowerCase()) !== null && _a !== void 0 ? _a : ''; }));
|
1298
|
-
this.activePriceList$ = this.quoteDraftService.activePriceList$;
|
1299
|
-
this.isReadonlyMode$ = this.quoteDraftService.hasProducts$.pipe(rxjs.map(function () { return _this.isReadonlyMode(); }));
|
1300
|
-
this.status$ = this.contextService.resolve$().pipe(rxjs.map(function (context) { var _a; return (_a = context.properties.Status) !== null && _a !== void 0 ? _a : ''; }));
|
1301
|
-
this.isEditMode$ = this.quoteDraftService.isEditMode$();
|
1302
|
-
this.assetsCount$ = this.getAssets$().pipe(rxjs.map(function (lineItems) { return lineItems.length; }));
|
1303
|
-
this.products$ = this.getDraftItems$().pipe(rxjs.map(function (lineItems) { return _this.generateProducts(lineItems); }));
|
1304
|
-
this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
|
1305
|
-
this.isCartRoute$ = this.routerService.isCartRoute$();
|
1306
|
-
this.isCatalogRoute$ = this.routerService.isCatalogRoute$();
|
1307
|
-
this.isAssetsRoute$ = this.routerService.isAssetsRoute$();
|
1308
|
-
this.objectDetails$ = this.getObjectDetails$();
|
1309
|
-
this.shoppingCartSettingsApiService
|
1310
|
-
.getSettingsMap()
|
1311
|
-
.pipe(rxjs.take(1))
|
1312
|
-
.subscribe(function (settings) {
|
1313
|
-
var _a;
|
1314
|
-
_this.dateFormat = core.getSupportedDateFormats((_a = settings.DATE_FORMAT) !== null && _a !== void 0 ? _a : _this.dateFormat).datePipeFormat;
|
1315
|
-
});
|
1316
|
-
}
|
1317
|
-
FlowHeaderComponent.prototype.ngOnInit = function () {
|
1318
|
-
var _this = this;
|
1319
|
-
this.contextService
|
1320
|
-
.resolve$()
|
1321
|
-
.pipe(rxjs.takeUntil(this.destroyed$))
|
1322
|
-
.subscribe(function (ctx) { return _this.mode$.next(ctx.mode); });
|
1323
|
-
// update assetPriceLists on quoteDraft change in ACCOUNT mode
|
1324
|
-
this.quoteDraftService.quoteDraft$
|
1325
|
-
.pipe(rxjs.takeUntil(this.destroyed$), rxjs.filter(function () { return _this.isAccountMode; }))
|
1326
|
-
.subscribe(function () { return _this.assetPriceLists$.next(_this.quoteDraftService.assetPriceLists); });
|
1327
|
-
};
|
1328
|
-
FlowHeaderComponent.prototype.ngOnDestroy = function () {
|
1329
|
-
this.destroyed$.next();
|
1330
|
-
this.destroyed$.complete();
|
1331
|
-
};
|
1332
|
-
Object.defineProperty(FlowHeaderComponent.prototype, "isAccountMode", {
|
1333
|
-
get: function () {
|
1334
|
-
return this.mode$.value === core.ConfigurationContextMode.ACCOUNT;
|
1335
|
-
},
|
1336
|
-
enumerable: false,
|
1337
|
-
configurable: true
|
1338
|
-
});
|
1339
|
-
Object.defineProperty(FlowHeaderComponent.prototype, "isQuoteMode", {
|
1340
|
-
get: function () {
|
1341
|
-
return this.mode$.value === core.ConfigurationContextMode.QUOTE;
|
1342
|
-
},
|
1343
|
-
enumerable: false,
|
1344
|
-
configurable: true
|
1345
|
-
});
|
1346
|
-
Object.defineProperty(FlowHeaderComponent.prototype, "isAccountMode$", {
|
1347
|
-
get: function () {
|
1348
|
-
return this.mode$.pipe(rxjs.map(function (mode) { return mode === core.ConfigurationContextMode.ACCOUNT; }));
|
1349
|
-
},
|
1350
|
-
enumerable: false,
|
1351
|
-
configurable: true
|
1352
|
-
});
|
1353
|
-
Object.defineProperty(FlowHeaderComponent.prototype, "isQuoteMode$", {
|
1354
|
-
get: function () {
|
1355
|
-
return this.mode$.pipe(rxjs.map(function (mode) { return mode === core.ConfigurationContextMode.QUOTE; }));
|
1356
|
-
},
|
1357
|
-
enumerable: false,
|
1358
|
-
configurable: true
|
1359
|
-
});
|
1360
|
-
FlowHeaderComponent.prototype.getSplitButtonActions = function (isCartRoute) {
|
1361
|
-
var _this = this;
|
1362
|
-
return [
|
1363
|
-
{
|
1364
|
-
label: 'Save to Quote',
|
1365
|
-
command: function () {
|
1366
|
-
_this.saveButtonClickHandler(isCartRoute);
|
1367
|
-
},
|
1368
|
-
},
|
1369
|
-
{
|
1370
|
-
label: 'Submit For Approval',
|
1371
|
-
command: function () {
|
1372
|
-
_this.submitButtonClickHandler(isCartRoute);
|
1373
|
-
},
|
1374
|
-
},
|
1375
|
-
];
|
1376
|
-
};
|
1377
|
-
FlowHeaderComponent.prototype.back = function (objectId) {
|
1378
|
-
var targetId = objectId !== null && objectId !== void 0 ? objectId : this.contextService.resolve().properties.Id;
|
1379
|
-
if (targetId) {
|
1380
|
-
window.VELO_BACK_FN.apply(null, [targetId]);
|
1381
|
-
}
|
1382
|
-
};
|
1383
|
-
FlowHeaderComponent.prototype.getSalesforceObjectLink = function (objectId) {
|
1384
|
-
if (!objectId) {
|
1385
|
-
return '';
|
1386
|
-
}
|
1387
|
-
return window.location.origin + "/" + objectId;
|
1388
|
-
};
|
1389
|
-
FlowHeaderComponent.prototype.navigateToShoppingCart = function () {
|
1390
|
-
if (!this.isReadonlyMode()) {
|
1391
|
-
this.routerService.navigateToShoppingCart();
|
1392
|
-
}
|
1393
|
-
};
|
1394
|
-
FlowHeaderComponent.prototype.navigateToCatalog = function () {
|
1395
|
-
if (!this.isReadonlyMode()) {
|
1396
|
-
this.routerService.navigateToCatalog();
|
1397
|
-
}
|
1398
|
-
};
|
1399
|
-
FlowHeaderComponent.prototype.navigateToAssets = function () {
|
1400
|
-
if (!this.isReadonlyMode()) {
|
1401
|
-
this.routerService.navigateToAssets();
|
1402
|
-
}
|
1403
|
-
};
|
1404
|
-
FlowHeaderComponent.prototype.docGenButtonClickHandler = function (isCartRoute) {
|
1405
|
-
var _this = this;
|
1406
|
-
if (this.isAccountMode) {
|
1407
|
-
if (!this.quoteDraftService.hasUnsavedChanges) {
|
1408
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1409
|
-
}
|
1410
|
-
else {
|
1411
|
-
this.dialogService.showDocgenAccountUnsavedChangesDialog().subscribe();
|
1412
|
-
}
|
1413
|
-
return;
|
1414
|
-
}
|
1415
|
-
if (!this.quoteDraftService.isEditMode()) {
|
1416
|
-
this.dialogService.showDocgenReadonlyDialog().subscribe();
|
1417
|
-
return;
|
1418
|
-
}
|
1419
|
-
if (!isCartRoute) {
|
1420
|
-
this.dialogService.showDocgenOutsideShoppingCartDialog().subscribe();
|
1421
|
-
return;
|
1422
|
-
}
|
1423
|
-
var shouldOpen$ = rxjs.of(true);
|
1424
|
-
if (this.quoteDraftService.hasUnsavedChanges) {
|
1425
|
-
shouldOpen$ = this.dialogService.showDocgenUnsavedChangesDialog().pipe(rxjs.switchMap(function (confirmed) {
|
1426
|
-
if (!confirmed) {
|
1427
|
-
return rxjs.of(false);
|
1428
|
-
}
|
1429
|
-
return _this.saveQuote$(true).pipe(rxjs.map(function () { return true; }));
|
1430
|
-
}));
|
1431
|
-
}
|
1432
|
-
shouldOpen$
|
1433
|
-
.pipe(rxjs.first(), rxjs.tap(function (shouldOpen) { return shouldOpen && _this.integrationState.dispatch(i4.OpenDocGenAction()); }))
|
1434
|
-
.subscribe();
|
1435
|
-
};
|
1436
|
-
FlowHeaderComponent.prototype.saveButtonClickHandler = function (isCartRoute) {
|
1437
|
-
if (!this.quoteDraftService.isEditMode()) {
|
1438
|
-
if (this.isQuoteMode) {
|
1439
|
-
this.dialogService.showQuoteReadonlyModeDialog().subscribe();
|
1440
|
-
}
|
1441
|
-
else {
|
1442
|
-
this.dialogService.showReadonlyModeDialog().subscribe();
|
1443
|
-
}
|
1444
|
-
return;
|
1445
|
-
}
|
1446
|
-
if (this.isUpsellQuoteWithoutChanges()) {
|
1447
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1448
|
-
return;
|
1449
|
-
}
|
1450
|
-
if (this.isAccountMode && !this.quoteDraftService.hasUnsavedChanges) {
|
1451
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1452
|
-
return;
|
1453
|
-
}
|
1454
|
-
if (!isCartRoute) {
|
1455
|
-
this.dialogService.showQuoteOutsideShoppingCartDialog().subscribe();
|
1456
|
-
return;
|
1457
|
-
}
|
1458
|
-
var lineItems = this.flowConfiguration.getSnapshot();
|
1459
|
-
if (!lineItems.length) {
|
1460
|
-
this.dialogService.showEmptyCartDialog().subscribe();
|
1461
|
-
return;
|
1462
|
-
}
|
1463
|
-
this.saveQuote$().subscribe();
|
1464
|
-
};
|
1465
|
-
FlowHeaderComponent.prototype.submitButtonClickHandler = function (isCartRoute) {
|
1466
|
-
var _this = this;
|
1467
|
-
if (this.isQuoteMode && !this.quoteDraftService.isEditMode()) {
|
1468
|
-
this.dialogService.showReadonlyQuoteSubmitFailureDialog();
|
1469
|
-
return;
|
1470
|
-
}
|
1471
|
-
if (this.isUpsellQuoteWithoutChanges()) {
|
1472
|
-
this.dialogService.showAccountNoChangesDialog().subscribe();
|
1473
|
-
return;
|
1474
|
-
}
|
1475
|
-
if (this.isAccountMode) {
|
1476
|
-
this.dialogService.showAccountSubmitFailureDialog();
|
1477
|
-
return;
|
1478
|
-
}
|
1479
|
-
if (!isCartRoute) {
|
1480
|
-
this.dialogService.showOutsideShoppingCartQuoteSubmitFailureDialog().subscribe();
|
1481
|
-
return;
|
1482
|
-
}
|
1483
|
-
var quoteDraft = this.quoteDraftService.quoteDraft;
|
1484
|
-
if (!quoteDraft) {
|
1485
|
-
return;
|
1486
|
-
}
|
1487
|
-
this.isSubmitInProgress$.next(true);
|
1488
|
-
this.quoteApiService
|
1489
|
-
.submitQuote(quoteDraft)
|
1490
|
-
.pipe(rxjs.tap(function (_c) {
|
1491
|
-
var quoteId = _c.quoteId;
|
1492
|
-
_this.quoteDraftService.hasUnsavedChanges = false;
|
1493
|
-
_this.back(quoteId);
|
1494
|
-
}), rxjs.finalize(function () { return _this.isSubmitInProgress$.next(false); }), rxjs.takeUntil(this.destroyed$))
|
1495
|
-
.subscribe();
|
1496
|
-
};
|
1497
|
-
FlowHeaderComponent.prototype.selectPriceList = function (priceListId) {
|
1498
|
-
this.quoteDraftService.updateActivePriceList(priceListId);
|
1499
|
-
};
|
1500
|
-
FlowHeaderComponent.prototype.toggleCartOverlay = function (cart, event) {
|
1501
|
-
if (!this.isReadonlyMode()) {
|
1502
|
-
cart === null || cart === void 0 ? void 0 : cart.overlayPanel.toggle(event);
|
1503
|
-
}
|
1504
|
-
};
|
1505
|
-
FlowHeaderComponent.prototype.saveQuote$ = function (stayOnPage) {
|
1506
|
-
var _this = this;
|
1507
|
-
if (stayOnPage === void 0) { stayOnPage = false; }
|
1508
|
-
var quoteDraft = this.quoteDraftService.quoteDraftForActivePriceList;
|
1509
|
-
if (!quoteDraft) {
|
1510
|
-
return rxjs.of(undefined);
|
1511
|
-
}
|
1512
|
-
this.isSaveInProgress$.next(true);
|
1513
|
-
return this.quoteApiService.upsertQuote(quoteDraft).pipe(rxjs.tap(function (_c) {
|
1514
|
-
var quoteId = _c.quoteId;
|
1515
|
-
_this.quoteDraftService.hasUnsavedChanges = false;
|
1516
|
-
if (!stayOnPage) {
|
1517
|
-
_this.back(quoteId);
|
1518
|
-
}
|
1519
|
-
}), rxjs.finalize(function () { return _this.isSaveInProgress$.next(false); }), rxjs.map(rxjs.noop), rxjs.takeUntil(this.destroyed$));
|
1520
|
-
};
|
1521
|
-
FlowHeaderComponent.prototype.queryName$ = function (objectName, id) {
|
1522
|
-
if (!id) {
|
1523
|
-
return rxjs.of('');
|
1524
|
-
}
|
1525
|
-
var searchRequest = {
|
1526
|
-
count: 1,
|
1527
|
-
rawCondition: "Id = '" + id + "'",
|
1528
|
-
fields: ['Name'],
|
1529
|
-
};
|
1530
|
-
return this.sfApiService.query(searchRequest, objectName).pipe(rxjs.map(function (result) { var _a, _b; return (_b = (_a = result[0]) === null || _a === void 0 ? void 0 : _a.Name) !== null && _b !== void 0 ? _b : ''; }), rxjs.takeUntil(this.destroyed$));
|
1531
|
-
};
|
1532
|
-
FlowHeaderComponent.prototype.getObjectDetails$ = function () {
|
1533
|
-
var _this = this;
|
1534
|
-
return this.contextService.resolve$().pipe(rxjs.distinctUntilChanged(function (prevCtx, currCtx) { return prevCtx.properties.Id === currCtx.properties.Id; }), rxjs.map(function (ctx) {
|
1535
|
-
var isAccountMode = ctx.mode === core.ConfigurationContextMode.ACCOUNT;
|
1536
|
-
var isQuoteMode = ctx.mode === core.ConfigurationContextMode.QUOTE;
|
1537
|
-
return {
|
1538
|
-
accountId: isAccountMode ? ctx.properties.Id : ctx.properties.AccountId,
|
1539
|
-
opportunityId: ctx.properties.OpportunityId,
|
1540
|
-
quoteId: isQuoteMode ? ctx.properties.Id : undefined,
|
1541
|
-
quoteName: isQuoteMode ? ctx.properties.Name : undefined,
|
1542
|
-
quoteNumber: isQuoteMode ? ctx.properties.QuoteNumber : undefined,
|
1543
|
-
};
|
1544
|
-
}), rxjs.switchMap(function (details) { return rxjs.combineLatest([
|
1545
|
-
rxjs.of(details),
|
1546
|
-
_this.queryName$('Account', details.accountId),
|
1547
|
-
_this.queryName$('Opportunity', details.opportunityId),
|
1548
|
-
]); }), rxjs.map(function (_c) {
|
1549
|
-
var _d = __read(_c, 3), details = _d[0], accountName = _d[1], opportunityName = _d[2];
|
1550
|
-
return (Object.assign(Object.assign({}, details), { accountName: accountName, opportunityName: opportunityName }));
|
1551
|
-
}));
|
1552
|
-
};
|
1553
|
-
FlowHeaderComponent.prototype.formatMetric = function (value) {
|
1554
|
-
return (value ? Number(value) : 0).toFixed(2);
|
1555
|
-
};
|
1556
|
-
FlowHeaderComponent.prototype.getDraftItems$ = function () {
|
1557
|
-
return rxjs.combineLatest([
|
1558
|
-
this.flowConfiguration.get(),
|
1559
|
-
this.integrationState.state$.pipe(rxjs.map(function (state) { return state.modifiedAssets; }), rxjs.distinctUntilChanged()),
|
1560
|
-
]).pipe(rxjs.map(function (_c) {
|
1561
|
-
var _d = __read(_c, 2), lineItems = _d[0], modifiedAssets = _d[1];
|
1562
|
-
return lineItems.filter(function (li) { return li.status !== 'EXIST' || (li.assetId && (modifiedAssets === null || modifiedAssets === void 0 ? void 0 : modifiedAssets[li.assetId])); });
|
1563
|
-
}));
|
1564
|
-
};
|
1565
|
-
FlowHeaderComponent.prototype.getAssets$ = function () {
|
1566
|
-
return this.flowConfiguration
|
1567
|
-
.get()
|
1568
|
-
.pipe(rxjs.map(function (lineItems) { return lineItems.filter(function (li) { return (!!li.assetId || !!li.openOrderLineItemId) && !li.rampInstanceId; }); }));
|
1569
|
-
};
|
1570
|
-
FlowHeaderComponent.prototype.generateProducts = function (lineItems) {
|
1571
|
-
var _this = this;
|
1572
|
-
var date = new Date();
|
1573
|
-
date.setHours(0, 0, 0, 0);
|
1574
|
-
var now = date.getTime();
|
1575
|
-
var termParentIds = lineItems.map(function (li) { return li.rampInstanceId; }).filter(Boolean);
|
1576
|
-
return lineItems.reduce(function (result, li) {
|
1577
|
-
// find main term line item
|
1578
|
-
if (li.rampInstanceId) {
|
1579
|
-
return result;
|
1580
|
-
}
|
1581
|
-
// find current term line item
|
1582
|
-
var target = li;
|
1583
|
-
while (target && target.endDate && new Date(target.endDate).getTime() <= now) {
|
1584
|
-
target = lineItems.find(function (sub) { return sub.rampInstanceId === li.id; });
|
1585
|
-
}
|
1586
|
-
if (target && target.productId) {
|
1587
|
-
return __spreadArray(__spreadArray([], __read(result)), [
|
1588
|
-
{
|
1589
|
-
id: target.id,
|
1590
|
-
productId: target.productId,
|
1591
|
-
name: target.name,
|
1592
|
-
configurable: target.properties['#configurable'] === 'true',
|
1593
|
-
deleted: target.actionCode === 'DELETE',
|
1594
|
-
hasTerm: termParentIds.includes(target.id),
|
1595
|
-
qty: target.qty,
|
1596
|
-
mrr: _this.formatMetric(target.properties.VDM_Total_MRR),
|
1597
|
-
nrr: _this.formatMetric(target.properties.VDM_Total_NRR),
|
1598
|
-
},
|
1599
|
-
]);
|
1600
|
-
}
|
1601
|
-
return result;
|
1602
|
-
}, []);
|
1603
|
-
};
|
1604
|
-
FlowHeaderComponent.prototype.isReadonlyMode = function () {
|
1605
|
-
var _a;
|
1606
|
-
return (((_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.context.properties.mode) === core.ConfigurationContextMode.ACCOUNT &&
|
1607
|
-
!this.quoteDraftService.hasProducts);
|
1608
|
-
};
|
1609
|
-
FlowHeaderComponent.prototype.isUpsellQuoteWithoutChanges = function () {
|
1610
|
-
var noUpdates = this.quoteDraftService.activeCurrentState.every(function (lineItem) { return lineItem.actionCode === 'EXIST'; });
|
1611
|
-
var sameNumberOfProducts = this.quoteDraftService.getInitialCurrentState().length === this.quoteDraftService.activeCurrentState.length;
|
1612
|
-
return noUpdates && sameNumberOfProducts;
|
1613
|
-
};
|
1614
|
-
return FlowHeaderComponent;
|
1615
|
-
}());
|
1616
|
-
FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [{ token: i1__namespace$1.ContextService }, { token: i1__namespace$1.QuoteDraftService }, { token: i2__namespace.QuoteApiService }, { token: i2__namespace.SalesforceApiService }, { token: i1__namespace$1.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }, { token: i4__namespace.IntegrationState }, { token: i2__namespace.ShoppingCartSettingsApiService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
1617
|
-
FlowHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0__namespace, 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-arrow-left\"></i>\n\n <span> Back to {{ objectName$ | async | titlecase }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode$ | async\">\n <span class=\"dot-separator\"></span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\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=\"dot-separator\"></span>\n\n <span>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-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">\n <span>{{ details.accountName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">\n <span>{{ details.opportunityName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n <span>{{ details.quoteName }}</span>\n </a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Number:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">\n <span>{{ details.quoteNumber }}</span>\n </a>\n </li>\n </ul>\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 [ngClass]=\"{ active: (isAssetsRoute$ | async), disabled: isReadonlyMode }\"\n (click)=\"navigateToAssets()\"\n >\n Assets ({{ assetsCount$ | async }})\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 class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</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 ({{ products.length }})\n </nav>\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-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\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>\n <ng-container *vlLet=\"assetPriceLists$ | async as assetPriceLists\">\n <ng-container *ngIf=\"(isAccountMode$ | async) && assetPriceLists.length > 1; else singlePriceList\">\n <nav class=\"nav-item\" (click)=\"priceListsOverlay?.toggle($event)\">\n <span>{{ priceList?.name }}</span>\n <i\n *ngIf=\"!priceListsOverlay?.overlayVisible\"\n class=\"vl-icon vl-icon-chevron-down icon-with-margin\"\n ></i>\n <i *ngIf=\"priceListsOverlay?.overlayVisible\" class=\"vl-icon vl-icon-chevron-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 <p-button\n class=\"doc-gen-button\"\n icon=\"vl-icon vl-icon-doc-gen\"\n [disabled]=\"isReadonlyMode\"\n (onClick)=\"docGenButtonClickHandler(isCartRoute)\"\n pTooltip=\"Generate Document\"\n tooltipPosition=\"bottom\"\n tooltipStyleClass=\"vl-info-tooltip\"\n ></p-button>\n\n <ng-container *vlLet=\"isSaveInProgress$ | async as isSaveInProgress\">\n <ng-container *vlLet=\"isSubmitInProgress$ | async as isSubmitInProgress\">\n <p-splitButton\n *ngIf=\"!isSaveInProgress && !isSubmitInProgress\"\n label=\"Save to Quote\"\n (onClick)=\"saveButtonClickHandler(isCartRoute)\"\n [model]=\"getSplitButtonActions(isCartRoute)\"\n [disabled]=\"isReadonlyMode\"\n styleClass=\"p-button-outlined\"\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{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.no-padding .p-overlaypanel-content{padding:0}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}::ng-deep .p-overlaypanel.price-list-overlay .p-overlaypanel-content{border-radius:5px;border-color:var(--vl-border-color);padding:0;display:flex;flex-direction:column;max-height:140px;overflow:auto}:host ::ng-deep p-splitButton{height:32px;width:146px;display:flex}:host ::ng-deep p-splitButton .p-splitbutton{display:flex;font-size:12px;border-radius:2px;height:100%;width:100%;-webkit-backface-visibility:hidden}:host ::ng-deep p-splitButton .p-splitbutton .p-button:focus{box-shadow:none}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-defaultbutton{padding:7px 12px 7px 10px}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-defaultbutton:disabled{opacity:.2}:host ::ng-deep p-splitButton .p-splitbutton .p-splitbutton-menubutton:disabled{opacity:.3}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button{background-color:#fff;color:var(--vl-primary-color);border:1px solid #fff}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button:enabled:hover{background-color:var(--vl-secondary-nav-bg);color:var(--vl-primary-color);border:1px solid var(--vl-secondary-nav-bg);outline:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-menubutton{background-color:var(--vl-secondary-nav-bg);border-radius:0 2px 2px 0;border:1px solid var(--vl-secondary-nav-bg);border-left:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-menubutton:hover{background-color:var(--vl-secondary-nav-bg);border:1px solid var(--vl-secondary-nav-bg);border-left:none}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-defaultbutton{border-radius:2px 0 0 2px}:host ::ng-deep p-splitButton .p-splitbutton.p-button-outlined .p-button.p-splitbutton-defaultbutton .p-button-label{font-size:12px;line-height:16px;letter-spacing:.3px;white-space:nowrap}:host ::ng-deep p-splitButton .p-splitbutton .p-menu{display:flex;width:auto;margin-top:2px;border-radius:4px;border:1px solid var(--vl-border-color);box-shadow:0 4px 20px #2767c11a}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list{display:flex;flex-direction:column}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem{display:flex;width:100%;height:32px}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link{padding:8px;width:100%;height:100%}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link:not(.p-disabled):hover{background-color:var(--vl-secondary-nav-bg)}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link:not(.p-disabled):hover .p-menuitem-text{color:var(--vl-primary-color)}:host ::ng-deep p-splitButton .p-splitbutton .p-menu .p-menu-list .p-menuitem .p-menuitem-link .p-menuitem-text{line-height:16px;font-size:12px;letter-spacing:.3px;white-space:nowrap}:host ::ng-deep .doc-gen-button{height:32px;width:32px;display:inline-flex}:host ::ng-deep .doc-gen-button .p-button{border:1px solid #fff;border-radius:2px;width:100%;height:100%}:host ::ng-deep .doc-gen-button .p-button.p-component:disabled{opacity:.3}:host ::ng-deep .save-button,:host ::ng-deep .submit-button{height:32px;width:146px;display:flex}:host ::ng-deep .save-button .p-button,:host ::ng-deep .submit-button .p-button{border-radius:3px;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;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .nav-back{font-weight:bold}.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:14px}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}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:24px;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;grid-gap:2px;gap:2px}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__wrapper .info-list__row a{text-align:right}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.flow-navigation{flex-grow:1;display:flex;grid-gap:16px;gap:16px;justify-content:center;font-weight:600}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:-14px}.flow-navigation .nav-item,.flow-navigation .nav-popover-toggle{opacity:.6}.flow-navigation .nav-item.active,.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active,.flow-navigation .nav-popover-toggle:not(.disabled):hover{opacity:1}.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;grid-gap:16px;gap:16px;font-size:12px;line-height:16px}\n"], components: [{ type: i3__namespace$1.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: CartPreviewComponent, selector: "vl-cart-preview", inputs: ["products"] }, { type: MetricsComponent, selector: "vl-metrics" }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i10__namespace$1.SplitButton, selector: "p-splitButton", inputs: ["model", "icon", "iconPos", "label", "style", "styleClass", "menuStyle", "menuStyleClass", "disabled", "tabindex", "appendTo", "dir", "expandAriaLabel", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onClick", "onDropdownClick"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i12__namespace$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i2__namespace$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i5__namespace$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i5__namespace$1.AsyncPipe, "titlecase": i5__namespace$1.TitleCasePipe, "date": i5__namespace$1.DatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
1618
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowHeaderComponent, decorators: [{
|
1619
|
-
type: i0.Component,
|
1620
|
-
args: [{
|
1621
|
-
selector: 'vl-flow-header',
|
1622
|
-
templateUrl: './header.component.html',
|
1623
|
-
styleUrls: ['./header.component.scss'],
|
1624
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
1625
|
-
}]
|
1626
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.ContextService }, { type: i1__namespace$1.QuoteDraftService }, { type: i2__namespace.QuoteApiService }, { type: i2__namespace.SalesforceApiService }, { type: i1__namespace$1.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }, { type: i4__namespace.IntegrationState }, { type: i2__namespace.ShoppingCartSettingsApiService }]; } });
|
1627
|
-
|
1628
|
-
var MetricsModule = /** @class */ (function () {
|
1629
|
-
function MetricsModule() {
|
1630
|
-
}
|
1631
|
-
return MetricsModule;
|
1632
|
-
}());
|
1633
|
-
MetricsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MetricsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
1634
|
-
MetricsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MetricsModule, declarations: [MetricsComponent], imports: [i5$1.CommonModule,
|
1635
|
-
i10.FormsModule,
|
1636
|
-
i10.ReactiveFormsModule,
|
1637
|
-
i12.DragDropModule,
|
1638
|
-
i5.ButtonModule,
|
1639
|
-
i3$1.OverlayPanelModule,
|
1640
|
-
i4$2.SidebarModule,
|
1641
|
-
i11.InputTextModule,
|
1642
|
-
i6$1.CheckboxModule,
|
1643
|
-
i3.LetDirectiveModule,
|
1644
|
-
i4$1.VirtualScrollerModule,
|
1645
|
-
i3.ErrorTooltipModule,
|
1646
|
-
i3.HiddenTextTooltipModule], exports: [MetricsComponent] });
|
1647
|
-
MetricsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MetricsModule, imports: [[
|
1648
|
-
i5$1.CommonModule,
|
1649
|
-
i10.FormsModule,
|
1650
|
-
i10.ReactiveFormsModule,
|
1651
|
-
i12.DragDropModule,
|
1652
|
-
i5.ButtonModule,
|
1653
|
-
i3$1.OverlayPanelModule,
|
1654
|
-
i4$2.SidebarModule,
|
1655
|
-
i11.InputTextModule,
|
1656
|
-
i6$1.CheckboxModule,
|
1657
|
-
i3.LetDirectiveModule,
|
1658
|
-
i4$1.VirtualScrollerModule,
|
1659
|
-
i3.ErrorTooltipModule,
|
1660
|
-
i3.HiddenTextTooltipModule,
|
1661
|
-
]] });
|
1662
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MetricsModule, decorators: [{
|
1663
|
-
type: i0.NgModule,
|
1664
|
-
args: [{
|
1665
|
-
declarations: [MetricsComponent],
|
1666
|
-
imports: [
|
1667
|
-
i5$1.CommonModule,
|
1668
|
-
i10.FormsModule,
|
1669
|
-
i10.ReactiveFormsModule,
|
1670
|
-
i12.DragDropModule,
|
1671
|
-
i5.ButtonModule,
|
1672
|
-
i3$1.OverlayPanelModule,
|
1673
|
-
i4$2.SidebarModule,
|
1674
|
-
i11.InputTextModule,
|
1675
|
-
i6$1.CheckboxModule,
|
1676
|
-
i3.LetDirectiveModule,
|
1677
|
-
i4$1.VirtualScrollerModule,
|
1678
|
-
i3.ErrorTooltipModule,
|
1679
|
-
i3.HiddenTextTooltipModule,
|
1680
|
-
],
|
1681
|
-
exports: [MetricsComponent],
|
1682
|
-
}]
|
1683
|
-
}] });
|
1684
|
-
|
1685
|
-
var FlowHeaderModule = /** @class */ (function () {
|
1686
|
-
function FlowHeaderModule() {
|
1687
|
-
}
|
1688
|
-
return FlowHeaderModule;
|
1689
|
-
}());
|
1690
|
-
FlowHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
1691
|
-
FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i5$1.CommonModule,
|
1692
|
-
i3$1.OverlayPanelModule,
|
1693
|
-
i3.LetDirectiveModule,
|
1694
|
-
i12$1.TooltipModule,
|
1695
|
-
i5.ButtonModule,
|
1696
|
-
CartPreviewModule,
|
1697
|
-
i10$1.SplitButtonModule,
|
1698
|
-
MetricsModule], exports: [FlowHeaderComponent] });
|
1699
|
-
FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[
|
1700
|
-
i5$1.CommonModule,
|
1701
|
-
i3$1.OverlayPanelModule,
|
1702
|
-
i3.LetDirectiveModule,
|
1703
|
-
i12$1.TooltipModule,
|
1704
|
-
i5.ButtonModule,
|
1705
|
-
CartPreviewModule,
|
1706
|
-
i10$1.SplitButtonModule,
|
1707
|
-
MetricsModule,
|
1708
|
-
]] });
|
1709
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowHeaderModule, decorators: [{
|
1710
|
-
type: i0.NgModule,
|
1711
|
-
args: [{
|
1712
|
-
declarations: [FlowHeaderComponent],
|
1713
|
-
imports: [
|
1714
|
-
i5$1.CommonModule,
|
1715
|
-
i3$1.OverlayPanelModule,
|
1716
|
-
i3.LetDirectiveModule,
|
1717
|
-
i12$1.TooltipModule,
|
1718
|
-
i5.ButtonModule,
|
1719
|
-
CartPreviewModule,
|
1720
|
-
i10$1.SplitButtonModule,
|
1721
|
-
MetricsModule,
|
1722
|
-
],
|
1723
|
-
exports: [FlowHeaderComponent],
|
1724
|
-
}]
|
1725
|
-
}] });
|
1726
|
-
|
1727
|
-
var FlowService = /** @class */ (function () {
|
1728
|
-
function FlowService(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService) {
|
1729
|
-
this.integrationState = integrationState;
|
1730
|
-
this.flowRouterService = flowRouterService;
|
1731
|
-
this.quoteDraftService = quoteDraftService;
|
1732
|
-
this.configurationService = configurationService;
|
1733
|
-
this.flowConfigurationService = flowConfigurationService;
|
1734
|
-
this.cleanup$ = new rxjs.Subject();
|
1735
|
-
}
|
1736
|
-
FlowService.prototype.initSubscriptions = function () {
|
1737
|
-
var _this = this;
|
1738
|
-
this.integrationState
|
1739
|
-
.listen$(i4.FlowAction.FLOW_CONFIGURE_PRODUCT)
|
1740
|
-
.pipe(rxjs.tap(function (payload) {
|
1741
|
-
var _a, _b;
|
1742
|
-
var productId = (_a = payload.productId) !== null && _a !== void 0 ? _a : (_b = _this.quoteDraftService.currentState.find(function (li) { return li.id === payload.lineItemId; })) === null || _b === void 0 ? void 0 : _b.productId;
|
1743
|
-
if (productId) {
|
1744
|
-
_this.flowRouterService.navigateToProductConfiguration(productId, payload.lineItemId);
|
1745
|
-
}
|
1746
|
-
else {
|
1747
|
-
console.warn("Parameter 'productId' is needed to start configuration");
|
1748
|
-
}
|
1749
|
-
}), rxjs.takeUntil(this.cleanup$))
|
1750
|
-
.subscribe();
|
1751
|
-
this.integrationState
|
1752
|
-
.listen$(i4.FlowAction.FLOW_SWITCH_OBJECT)
|
1753
|
-
.pipe(rxjs.tap(function (payload) {
|
1754
|
-
_this.flowRouterService.switchObject(payload.id);
|
1755
|
-
}), rxjs.takeUntil(this.cleanup$))
|
1756
|
-
.subscribe();
|
1757
|
-
this.integrationState
|
1758
|
-
.listen$(i4.FlowAction.FLOW_NAVIGATE_BACK)
|
1759
|
-
.pipe(rxjs.tap(function () { return _this.flowRouterService.navigateBack(); }), rxjs.takeUntil(this.cleanup$))
|
1760
|
-
.subscribe();
|
1761
|
-
this.integrationState
|
1762
|
-
.listen$(i4.FlowAction.FLOW_NAVIGATE_TO_CATALOG)
|
1763
|
-
.pipe(rxjs.tap(function () { return _this.flowRouterService.navigateToCatalog(); }), rxjs.takeUntil(this.cleanup$))
|
1764
|
-
.subscribe();
|
1765
|
-
this.integrationState
|
1766
|
-
.listen$(i4.FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
|
1767
|
-
.pipe(rxjs.switchMap(function () {
|
1768
|
-
var quoteDraft = _this.quoteDraftService.quoteDraft;
|
1769
|
-
var lineItem = _this.configurationService.getSnapshot();
|
1770
|
-
if (!quoteDraft || !lineItem) {
|
1771
|
-
return rxjs.of(undefined);
|
1772
|
-
}
|
1773
|
-
var isNewLineItem = quoteDraft.currentState.every(function (li) { return li.id !== lineItem.id; });
|
1774
|
-
var updatedState;
|
1775
|
-
if (isNewLineItem) {
|
1776
|
-
updatedState = __spreadArray(__spreadArray([], __read(quoteDraft.currentState)), [lineItem]);
|
1777
|
-
}
|
1778
|
-
else {
|
1779
|
-
updatedState = quoteDraft.currentState.map(function (li) { return (li.id === lineItem.id ? lineItem : li); });
|
1780
|
-
}
|
1781
|
-
return _this.flowConfigurationService.calculate$(Object.assign(Object.assign({}, quoteDraft), { currentState: updatedState }));
|
1782
|
-
}), rxjs.tap(function () {
|
1783
|
-
_this.configurationService.hasUnsavedChanges = false;
|
1784
|
-
_this.flowRouterService.navigateToShoppingCart();
|
1785
|
-
}), rxjs.takeUntil(this.cleanup$))
|
1786
|
-
.subscribe();
|
1787
|
-
this.updateFlowPath();
|
1788
|
-
};
|
1789
|
-
FlowService.prototype.cleanup = function () {
|
1790
|
-
this.cleanup$.next();
|
1791
|
-
};
|
1792
|
-
FlowService.prototype.updateFlowPath = function () {
|
1793
|
-
var _this = this;
|
1794
|
-
this.flowRouterService
|
1795
|
-
.getFlowSubpath$()
|
1796
|
-
.pipe(rxjs.map(function (path) { var _a; return (_a = path.split('/')) === null || _a === void 0 ? void 0 : _a[0]; }), rxjs.takeUntil(this.cleanup$))
|
1797
|
-
.subscribe(function (flowPath) { return _this.integrationState.patchState({ flowPath: flowPath }); });
|
1798
|
-
};
|
1799
|
-
return FlowService;
|
1800
|
-
}());
|
1801
|
-
FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowService, deps: [{ token: i4__namespace.IntegrationState }, { token: FlowRouterService }, { token: i1__namespace$1.QuoteDraftService }, { token: i1__namespace$1.ConfigurationService }, { token: i1__namespace$1.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1802
|
-
FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowService });
|
1803
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowService, decorators: [{
|
1804
|
-
type: i0.Injectable
|
1805
|
-
}], ctorParameters: function () { return [{ type: i4__namespace.IntegrationState }, { type: FlowRouterService }, { type: i1__namespace$1.QuoteDraftService }, { type: i1__namespace$1.ConfigurationService }, { type: i1__namespace$1.FlowConfigurationService }]; } });
|
1806
|
-
|
1807
|
-
var FlowComponent = /** @class */ (function () {
|
1808
|
-
function FlowComponent(routerService, quoteDraftService, flowService, docGenService, integrationState) {
|
1809
|
-
var _this = this;
|
1810
|
-
this.routerService = routerService;
|
1811
|
-
this.quoteDraftService = quoteDraftService;
|
1812
|
-
this.flowService = flowService;
|
1813
|
-
this.docGenService = docGenService;
|
1814
|
-
this.integrationState = integrationState;
|
1815
|
-
this.isLoading$ = this.routerService.loading$;
|
1816
|
-
this.showHeader$ = this.routerService.route$.pipe(rxjs.map(function (route) { return route.data.showHeader && !_this.quoteDraftService.isStandalone; }));
|
1817
|
-
this.isStandalone$ = this.quoteDraftService.isStandalone$;
|
1818
|
-
this.flowService.initSubscriptions();
|
1819
|
-
}
|
1820
|
-
FlowComponent.prototype.ngOnInit = function () {
|
1821
|
-
this.integrationState.clear();
|
1822
|
-
};
|
1823
|
-
FlowComponent.prototype.ngOnDestroy = function () {
|
1824
|
-
this.flowService.cleanup();
|
1825
|
-
this.docGenService.cleanup();
|
1826
|
-
};
|
1827
|
-
return FlowComponent;
|
1828
|
-
}());
|
1829
|
-
FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i1__namespace$1.QuoteDraftService }, { token: FlowService }, { token: FlowDocGenService }, { token: i4__namespace.IntegrationState }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
1830
|
-
FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, 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</div>\n\n<ng-container *vlLet=\"isStandalone$ | async as isStandalone\">\n <vl-flow-doc-gen *ngIf=\"!isStandalone\"></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%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: DocGenComponent, selector: "vl-flow-doc-gen" }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$2.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }, { type: i3__namespace.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
1831
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowComponent, decorators: [{
|
1832
|
-
type: i0.Component,
|
1833
|
-
args: [{
|
1834
|
-
selector: 'vl-flow',
|
1835
|
-
templateUrl: './flow.component.html',
|
1836
|
-
styleUrls: ['./flow.component.scss'],
|
1837
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
1838
|
-
}]
|
1839
|
-
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: i1__namespace$1.QuoteDraftService }, { type: FlowService }, { type: FlowDocGenService }, { type: i4__namespace.IntegrationState }]; } });
|
1840
|
-
|
1841
|
-
var getFlowObjectIdPropertyName = function (id) {
|
1842
|
-
var objectName = core.SalesforceIdUtils.getSfObjectNameById(id);
|
1843
|
-
switch (objectName) {
|
1844
|
-
case 'Account':
|
1845
|
-
return 'accountId';
|
1846
|
-
case 'Order':
|
1847
|
-
return 'orderId';
|
1848
|
-
case 'Quote':
|
1849
|
-
default:
|
1850
|
-
return 'quoteId';
|
1851
|
-
}
|
1852
|
-
};
|
1853
|
-
var getDefaultProperties = function (params) {
|
1854
|
-
var _a, _b, _c, _d;
|
1855
|
-
var properties = {};
|
1856
|
-
if (((_a = params.flowParams) === null || _a === void 0 ? void 0 : _a.entryPath.includes('/product')) || params.mode === core.ConfigurationContextMode.REMOTE) {
|
1857
|
-
properties.standalone = (_d = (_c = (_b = params.flowParams) === null || _b === void 0 ? void 0 : _b.queryParams) === null || _c === void 0 ? void 0 : _c.standalone) !== null && _d !== void 0 ? _d : 'true';
|
1858
|
-
}
|
1859
|
-
return properties;
|
1860
|
-
};
|
1861
|
-
|
1862
|
-
var ContextGuard = /** @class */ (function () {
|
1863
|
-
function ContextGuard(router, routerService, contextService) {
|
1864
|
-
this.router = router;
|
1865
|
-
this.routerService = routerService;
|
1866
|
-
this.contextService = contextService;
|
1867
|
-
}
|
1868
|
-
ContextGuard.prototype.checkActivation = function (route) {
|
1869
|
-
var _this = this;
|
1870
|
-
var queryParams = route.queryParams;
|
1871
|
-
var accountId = queryParams.accountId, quoteId = queryParams.quoteId, orderId = queryParams.orderId;
|
1872
|
-
var rpcMessage = window.RPC_MESSAGE;
|
1873
|
-
var mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
|
1874
|
-
// Restrict if mode is not defined
|
1875
|
-
if (mode == null) {
|
1876
|
-
return this.handleError(route, 'Mode is undefined');
|
1877
|
-
}
|
1878
|
-
var headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
|
1879
|
-
// Allow if context is already initialized with the same headerId
|
1880
|
-
if (this.contextService.isInitialized) {
|
1881
|
-
var currentContext = this.contextService.resolve();
|
1882
|
-
if (headerId && currentContext.headerId === headerId) {
|
1883
|
-
return rxjs.of(true);
|
1884
|
-
}
|
1885
|
-
}
|
1886
|
-
// Initialize context
|
1887
|
-
return this.contextService.create(headerId, mode).pipe(rxjs.tap(function (context) {
|
1888
|
-
// Update context with queryParams
|
1889
|
-
_this.contextService.update(Object.assign(Object.assign({}, context), { properties: Object.assign(Object.assign(Object.assign({}, context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})), getDefaultProperties({ mode: mode })) }));
|
1890
|
-
}), rxjs.map(function () { return true; }), rxjs.catchError(function (e) {
|
1891
|
-
var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
|
1892
|
-
return _this.handleError(route, message);
|
1893
|
-
}));
|
1894
|
-
};
|
1895
|
-
ContextGuard.prototype.canActivate = function (route) {
|
1896
|
-
return this.checkActivation(route);
|
1897
|
-
};
|
1898
|
-
ContextGuard.prototype.canActivateChild = function (childRoute) {
|
1899
|
-
return this.checkActivation(childRoute);
|
1900
|
-
};
|
1901
|
-
Object.defineProperty(ContextGuard.prototype, "rpcMessageId", {
|
1902
|
-
get: function () {
|
1903
|
-
var _a, _b;
|
1904
|
-
if (!window.RPC_MESSAGE) {
|
1905
|
-
return;
|
1906
|
-
}
|
1907
|
-
var rpcMessage = JSON.parse(window.RPC_MESSAGE);
|
1908
|
-
var veloceReferenceId = (_a = rpcMessage.configuration) === null || _a === void 0 ? void 0 : _a.VeloceReferenceId;
|
1909
|
-
var quoteId = (_b = rpcMessage.quote) === null || _b === void 0 ? void 0 : _b.Id;
|
1910
|
-
return veloceReferenceId || quoteId;
|
1911
|
-
},
|
1912
|
-
enumerable: false,
|
1913
|
-
configurable: true
|
1914
|
-
});
|
1915
|
-
ContextGuard.prototype.getConfigurationContextMode = function (accountId, quoteId, orderId, rpcMessage) {
|
1916
|
-
if (accountId) {
|
1917
|
-
return core.ConfigurationContextMode.ACCOUNT;
|
1918
|
-
}
|
1919
|
-
if (quoteId) {
|
1920
|
-
return core.ConfigurationContextMode.QUOTE;
|
1921
|
-
}
|
1922
|
-
if (orderId) {
|
1923
|
-
return core.ConfigurationContextMode.ORDER;
|
1924
|
-
}
|
1925
|
-
if (rpcMessage) {
|
1926
|
-
return core.ConfigurationContextMode.REMOTE;
|
1927
|
-
}
|
1928
|
-
return;
|
1929
|
-
};
|
1930
|
-
ContextGuard.prototype.handleError = function (route, message) {
|
1931
|
-
this.contextService.delete();
|
1932
|
-
var parentUrl = this.routerService.getFlowRootPath(route);
|
1933
|
-
return rxjs.from(this.router.navigate([parentUrl, '404'], { state: { message: message } })).pipe(rxjs.map(function () { return false; }));
|
1934
|
-
};
|
1935
|
-
return ContextGuard;
|
1936
|
-
}());
|
1937
|
-
ContextGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ContextGuard, deps: [{ token: i1__namespace$2.Router }, { token: FlowRouterService }, { token: i1__namespace$1.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1938
|
-
ContextGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ContextGuard });
|
1939
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ContextGuard, decorators: [{
|
1940
|
-
type: i0.Injectable
|
1941
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.Router }, { type: FlowRouterService }, { type: i1__namespace$1.ContextService }]; } });
|
1942
|
-
|
1943
|
-
var ProductUnloadGuard = /** @class */ (function () {
|
1944
|
-
function ProductUnloadGuard(router, contextService, quoteDraftService, configurationService, flowDialogService) {
|
1945
|
-
this.router = router;
|
1946
|
-
this.contextService = contextService;
|
1947
|
-
this.quoteDraftService = quoteDraftService;
|
1948
|
-
this.configurationService = configurationService;
|
1949
|
-
this.flowDialogService = flowDialogService;
|
1950
|
-
}
|
1951
|
-
ProductUnloadGuard.prototype.canDeactivate = function (_, route, currentState, nextState) {
|
1952
|
-
var _this = this;
|
1953
|
-
var observable = rxjs.of(true);
|
1954
|
-
if (!this.quoteDraftService.isStandalone && this.configurationService.hasUnsavedChanges) {
|
1955
|
-
observable = this.flowDialogService.showUnsavedChangesDialog();
|
1956
|
-
}
|
1957
|
-
return observable.pipe(rxjs.map(function (unload) {
|
1958
|
-
if (unload) {
|
1959
|
-
_this.configurationService.reset();
|
1960
|
-
_this.contextService.update({ properties: { productId: undefined, lineItemId: undefined } });
|
1961
|
-
if (!nextState || currentState.url === nextState.url) {
|
1962
|
-
return true;
|
1963
|
-
}
|
1964
|
-
// clear obsolete queryParams
|
1965
|
-
var urlTree_1 = _this.router.parseUrl(nextState.url);
|
1966
|
-
delete urlTree_1.queryParams.productId;
|
1967
|
-
// replace url after deactivation has finished
|
1968
|
-
setTimeout(function () { return _this.router.navigateByUrl(urlTree_1.toString(), { replaceUrl: true }); });
|
1969
|
-
return true;
|
1970
|
-
}
|
1971
|
-
return false;
|
1972
|
-
}));
|
1973
|
-
};
|
1974
|
-
return ProductUnloadGuard;
|
1975
|
-
}());
|
1976
|
-
ProductUnloadGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductUnloadGuard, deps: [{ token: i1__namespace$2.Router }, { token: i1__namespace$1.ContextService }, { token: i1__namespace$1.QuoteDraftService }, { token: i1__namespace$1.ConfigurationService }, { token: FlowDialogService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1977
|
-
ProductUnloadGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductUnloadGuard });
|
1978
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductUnloadGuard, decorators: [{
|
1979
|
-
type: i0.Injectable
|
1980
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.Router }, { type: i1__namespace$1.ContextService }, { type: i1__namespace$1.QuoteDraftService }, { type: i1__namespace$1.ConfigurationService }, { type: FlowDialogService }]; } });
|
1981
|
-
|
1982
|
-
var RootGuard = /** @class */ (function () {
|
1983
|
-
function RootGuard(router, routerService) {
|
1984
|
-
this.router = router;
|
1985
|
-
this.routerService = routerService;
|
1986
|
-
this.initialized = false;
|
1987
|
-
this.navToRestore = null;
|
1988
|
-
}
|
1989
|
-
RootGuard.prototype.canActivate = function (route) {
|
1990
|
-
var _this = this;
|
1991
|
-
// We always need to initialize root component first, and only then start checking guards/resolvers
|
1992
|
-
var _a;
|
1993
|
-
if (!this.initialized) {
|
1994
|
-
this.initialized = true;
|
1995
|
-
this.navToRestore = this.router.getCurrentNavigation();
|
1996
|
-
var rootUrl = this.routerService.getFlowRootPath(route);
|
1997
|
-
this.router.navigate([rootUrl], { replaceUrl: !((_a = this.navToRestore) === null || _a === void 0 ? void 0 : _a.previousNavigation) });
|
1998
|
-
}
|
1999
|
-
else if (this.navToRestore) {
|
2000
|
-
var nav_1 = this.navToRestore;
|
2001
|
-
setTimeout(function () {
|
2002
|
-
_this.router.navigateByUrl(nav_1.extractedUrl, nav_1.extras);
|
2003
|
-
_this.navToRestore = null;
|
2004
|
-
});
|
2005
|
-
}
|
2006
|
-
return true;
|
2007
|
-
};
|
2008
|
-
RootGuard.prototype.canDeactivate = function () {
|
2009
|
-
this.initialized = false;
|
2010
|
-
return true;
|
2011
|
-
};
|
2012
|
-
return RootGuard;
|
2013
|
-
}());
|
2014
|
-
RootGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RootGuard, deps: [{ token: i1__namespace$2.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
2015
|
-
RootGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RootGuard, providedIn: 'root' });
|
2016
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RootGuard, decorators: [{
|
2017
|
-
type: i0.Injectable,
|
2018
|
-
args: [{ providedIn: 'root' }]
|
2019
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.Router }, { type: FlowRouterService }]; } });
|
2020
|
-
|
2021
|
-
var FLOW_CUSTOMIZATION = new i0.InjectionToken('FLOW_CUSTOMIZATION');
|
2022
|
-
|
2023
|
-
var AssetsComponent = /** @class */ (function () {
|
2024
|
-
function AssetsComponent(templatesApi, contextService, cdr, toastService, customizationService) {
|
2025
|
-
var _a;
|
2026
|
-
this.templatesApi = templatesApi;
|
2027
|
-
this.contextService = contextService;
|
2028
|
-
this.cdr = cdr;
|
2029
|
-
this.toastService = toastService;
|
2030
|
-
this.customizationService = customizationService;
|
2031
|
-
this.uiDefinition = undefined;
|
2032
|
-
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
2033
|
-
this.templateApiName = '';
|
2034
|
-
this.destroyed$ = new rxjs.Subject();
|
2035
|
-
this.templateApiName = (_a = this.contextService.resolve().properties.assetsTemplateApiName) !== null && _a !== void 0 ? _a : '';
|
2036
|
-
}
|
2037
|
-
AssetsComponent.prototype.ngOnInit = function () {
|
2038
|
-
var _this = this;
|
2039
|
-
this.generateUIDefinition$()
|
2040
|
-
.pipe(rxjs.tap(function (uiDef) {
|
2041
|
-
if (!uiDef) {
|
2042
|
-
throw new Error("Component with name '" + _this.templateApiName + "' not found.");
|
2043
|
-
}
|
2044
|
-
_this.uiDefinition = uiDef;
|
2045
|
-
_this.state$.next({ loading: false, failure: false });
|
2046
|
-
}), rxjs.catchError(function (err) {
|
2047
|
-
var _a;
|
2048
|
-
var message = 'Failed to resolve Assets component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
2049
|
-
_this.toastService.add({ severity: i3.ToastType.error, summary: message, sticky: true });
|
2050
|
-
_this.uiDefinition = undefined;
|
2051
|
-
_this.state$.next({ loading: false, failure: true });
|
2052
|
-
return rxjs.of();
|
2053
|
-
}), rxjs.takeUntil(this.destroyed$))
|
2054
|
-
.subscribe(function () { return _this.cdr.detectChanges(); });
|
2055
|
-
};
|
2056
|
-
AssetsComponent.prototype.ngOnDestroy = function () {
|
2057
|
-
this.destroyed$.next();
|
2058
|
-
this.destroyed$.complete();
|
2059
|
-
};
|
2060
|
-
AssetsComponent.prototype.getTemplateRootComponent$ = function (template) {
|
2061
|
-
return this.templatesApi
|
2062
|
-
.fetchComponents$(template.id)
|
2063
|
-
.pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === core.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
|
2064
|
-
};
|
2065
|
-
AssetsComponent.prototype.getLocalAssetsComponentMeta$ = function () {
|
2066
|
-
var _a, _b;
|
2067
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getAssetsComponent)) {
|
2068
|
-
return rxjs.of(undefined);
|
2069
|
-
}
|
2070
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getAssetsComponent(this.templateApiName).pipe(rxjs.map(function (component) {
|
2071
|
-
if (!component) {
|
2072
|
-
return;
|
2073
|
-
}
|
2074
|
-
return {
|
2075
|
-
html: component.html,
|
2076
|
-
css: component.css,
|
2077
|
-
js: component.js,
|
2078
|
-
json: component.json,
|
2079
|
-
};
|
2080
|
-
}));
|
2081
|
-
};
|
2082
|
-
AssetsComponent.prototype.getAssetsComponentMeta$ = function () {
|
2083
|
-
var _this = this;
|
2084
|
-
return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
|
2085
|
-
};
|
2086
|
-
AssetsComponent.prototype.generateUIDefinition$ = function () {
|
2087
|
-
var _this = this;
|
2088
|
-
return rxjs.of(undefined).pipe(rxjs.tap(function () {
|
2089
|
-
if (!_this.templateApiName) {
|
2090
|
-
throw new Error("Flow Query parameter 'assetsTemplateApiName' is missing.");
|
2091
|
-
}
|
2092
|
-
}), rxjs.switchMap(function () { return _this.getLocalAssetsComponentMeta$(); }), rxjs.switchMap(function (meta) { return (meta ? rxjs.of(meta) : _this.getAssetsComponentMeta$()); }), rxjs.map(function (meta) {
|
2093
|
-
if (!meta) {
|
2094
|
-
return;
|
2095
|
-
}
|
2096
|
-
var uiDef = {
|
2097
|
-
name: '',
|
2098
|
-
createdTimestamp: 0,
|
2099
|
-
primary: true,
|
2100
|
-
type: 'DEFAULT',
|
2101
|
-
version: 2,
|
2102
|
-
children: [
|
2103
|
-
{
|
2104
|
-
children: [],
|
2105
|
-
template: meta.html && btoa(meta.html),
|
2106
|
-
script: meta.js && btoa(meta.js),
|
2107
|
-
styles: meta.css && btoa(meta.css),
|
2108
|
-
},
|
2109
|
-
],
|
2110
|
-
};
|
2111
|
-
return uiDef;
|
2112
|
-
}));
|
2113
|
-
};
|
2114
|
-
return AssetsComponent;
|
2115
|
-
}());
|
2116
|
-
AssetsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AssetsComponent, deps: [{ token: i2__namespace.UITemplatesApiService }, { token: i1__namespace$1.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2117
|
-
AssetsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AssetsComponent, selector: "vl-flow-assets", ngImport: i0__namespace, 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: [""], components: [{ type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4__namespace.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "config"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
2118
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AssetsComponent, decorators: [{
|
2119
|
-
type: i0.Component,
|
2120
|
-
args: [{
|
2121
|
-
selector: 'vl-flow-assets',
|
2122
|
-
templateUrl: './assets.component.html',
|
2123
|
-
styleUrls: ['./assets.component.scss'],
|
2124
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
2125
|
-
}]
|
2126
|
-
}], ctorParameters: function () {
|
2127
|
-
return [{ type: i2__namespace.UITemplatesApiService }, { type: i1__namespace$1.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
|
2128
|
-
type: i0.Optional
|
2129
|
-
}, {
|
2130
|
-
type: i0.Inject,
|
2131
|
-
args: [FLOW_CUSTOMIZATION]
|
2132
|
-
}] }];
|
2133
|
-
} });
|
2134
|
-
|
2135
|
-
var AssetsModule = /** @class */ (function () {
|
2136
|
-
function AssetsModule() {
|
2137
|
-
}
|
2138
|
-
return AssetsModule;
|
2139
|
-
}());
|
2140
|
-
AssetsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AssetsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
2141
|
-
AssetsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AssetsModule, declarations: [AssetsComponent], imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule], exports: [AssetsComponent] });
|
2142
|
-
AssetsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AssetsModule, imports: [[i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule]] });
|
2143
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: AssetsModule, decorators: [{
|
2144
|
-
type: i0.NgModule,
|
2145
|
-
args: [{
|
2146
|
-
declarations: [AssetsComponent],
|
2147
|
-
imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule],
|
2148
|
-
exports: [AssetsComponent],
|
2149
|
-
}]
|
2150
|
-
}] });
|
2151
|
-
|
2152
|
-
var CatalogComponent = /** @class */ (function () {
|
2153
|
-
function CatalogComponent(templatesApi, contextService, cdr, toastService, customizationService) {
|
2154
|
-
var _a;
|
2155
|
-
this.templatesApi = templatesApi;
|
2156
|
-
this.contextService = contextService;
|
2157
|
-
this.cdr = cdr;
|
2158
|
-
this.toastService = toastService;
|
2159
|
-
this.customizationService = customizationService;
|
2160
|
-
this.uiDefinition = undefined;
|
2161
|
-
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
2162
|
-
this.templateApiName = '';
|
2163
|
-
this.destroyed$ = new rxjs.Subject();
|
2164
|
-
this.templateApiName = (_a = this.contextService.resolve().properties.catalogTemplateApiName) !== null && _a !== void 0 ? _a : '';
|
2165
|
-
}
|
2166
|
-
CatalogComponent.prototype.ngOnInit = function () {
|
2167
|
-
var _this = this;
|
2168
|
-
this.generateUIDefinition$()
|
2169
|
-
.pipe(rxjs.tap(function (uiDef) {
|
2170
|
-
if (!uiDef) {
|
2171
|
-
throw new Error("Component with name '" + _this.templateApiName + "' not found.");
|
2172
|
-
}
|
2173
|
-
_this.uiDefinition = uiDef;
|
2174
|
-
_this.state$.next({ loading: false, failure: false });
|
2175
|
-
}), rxjs.catchError(function (err) {
|
2176
|
-
var _a;
|
2177
|
-
var message = 'Failed to resolve Catalog component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
2178
|
-
_this.toastService.add({ severity: i3.ToastType.error, summary: message, sticky: true });
|
2179
|
-
_this.uiDefinition = undefined;
|
2180
|
-
_this.state$.next({ loading: false, failure: true });
|
2181
|
-
return rxjs.of();
|
2182
|
-
}), rxjs.takeUntil(this.destroyed$))
|
2183
|
-
.subscribe(function () { return _this.cdr.detectChanges(); });
|
2184
|
-
};
|
2185
|
-
CatalogComponent.prototype.ngOnDestroy = function () {
|
2186
|
-
this.destroyed$.next();
|
2187
|
-
this.destroyed$.complete();
|
2188
|
-
};
|
2189
|
-
CatalogComponent.prototype.getTemplateRootComponent$ = function (template) {
|
2190
|
-
return this.templatesApi
|
2191
|
-
.fetchComponents$(template.id)
|
2192
|
-
.pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === core.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
|
2193
|
-
};
|
2194
|
-
CatalogComponent.prototype.getLocalCatalogComponentMeta$ = function () {
|
2195
|
-
var _a, _b;
|
2196
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getCatalogComponent)) {
|
2197
|
-
return rxjs.of(undefined);
|
2198
|
-
}
|
2199
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getCatalogComponent(this.templateApiName).pipe(rxjs.map(function (component) {
|
2200
|
-
if (!component) {
|
2201
|
-
return;
|
2202
|
-
}
|
2203
|
-
return {
|
2204
|
-
html: component.html,
|
2205
|
-
css: component.css,
|
2206
|
-
js: component.js,
|
2207
|
-
json: component.json,
|
2208
|
-
};
|
2209
|
-
}));
|
2210
|
-
};
|
2211
|
-
CatalogComponent.prototype.getCatalogComponentMeta$ = function () {
|
2212
|
-
var _this = this;
|
2213
|
-
return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
|
2214
|
-
};
|
2215
|
-
CatalogComponent.prototype.generateUIDefinition$ = function () {
|
2216
|
-
var _this = this;
|
2217
|
-
return rxjs.of(undefined).pipe(rxjs.tap(function () {
|
2218
|
-
if (!_this.templateApiName) {
|
2219
|
-
throw new Error("Flow Query parameter 'catalogTemplateApiName' is missing.");
|
2220
|
-
}
|
2221
|
-
}), rxjs.switchMap(function () { return _this.getLocalCatalogComponentMeta$(); }), rxjs.switchMap(function (meta) { return (meta ? rxjs.of(meta) : _this.getCatalogComponentMeta$()); }), rxjs.map(function (meta) {
|
2222
|
-
if (!meta) {
|
2223
|
-
return;
|
2224
|
-
}
|
2225
|
-
var uiDef = {
|
2226
|
-
name: '',
|
2227
|
-
createdTimestamp: 0,
|
2228
|
-
primary: true,
|
2229
|
-
type: 'DEFAULT',
|
2230
|
-
version: 2,
|
2231
|
-
children: [
|
2232
|
-
{
|
2233
|
-
children: [],
|
2234
|
-
template: meta.html && btoa(meta.html),
|
2235
|
-
script: meta.js && btoa(meta.js),
|
2236
|
-
styles: meta.css && btoa(meta.css),
|
2237
|
-
},
|
2238
|
-
],
|
2239
|
-
};
|
2240
|
-
return uiDef;
|
2241
|
-
}));
|
2242
|
-
};
|
2243
|
-
return CatalogComponent;
|
2244
|
-
}());
|
2245
|
-
CatalogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogComponent, deps: [{ token: i2__namespace.UITemplatesApiService }, { token: i1__namespace$1.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2246
|
-
CatalogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0__namespace, 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: [""], components: [{ type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4__namespace.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "config"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
2247
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogComponent, decorators: [{
|
2248
|
-
type: i0.Component,
|
2249
|
-
args: [{
|
2250
|
-
selector: 'vl-flow-catalog',
|
2251
|
-
templateUrl: './catalog.component.html',
|
2252
|
-
styleUrls: ['./catalog.component.scss'],
|
2253
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
2254
|
-
}]
|
2255
|
-
}], ctorParameters: function () {
|
2256
|
-
return [{ type: i2__namespace.UITemplatesApiService }, { type: i1__namespace$1.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
|
2257
|
-
type: i0.Optional
|
2258
|
-
}, {
|
2259
|
-
type: i0.Inject,
|
2260
|
-
args: [FLOW_CUSTOMIZATION]
|
2261
|
-
}] }];
|
2262
|
-
} });
|
2263
|
-
|
2264
|
-
var CatalogModule = /** @class */ (function () {
|
2265
|
-
function CatalogModule() {
|
2266
|
-
}
|
2267
|
-
return CatalogModule;
|
2268
|
-
}());
|
2269
|
-
CatalogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
2270
|
-
CatalogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogModule, declarations: [CatalogComponent], imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule], exports: [CatalogComponent] });
|
2271
|
-
CatalogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogModule, imports: [[i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule]] });
|
2272
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CatalogModule, decorators: [{
|
2273
|
-
type: i0.NgModule,
|
2274
|
-
args: [{
|
2275
|
-
declarations: [CatalogComponent],
|
2276
|
-
imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule],
|
2277
|
-
exports: [CatalogComponent],
|
2278
|
-
}]
|
2279
|
-
}] });
|
2280
|
-
|
2281
|
-
var DebugComponent = /** @class */ (function () {
|
2282
|
-
function DebugComponent(flowsApiService, router, activatedRoute, context, quoteDraftService) {
|
2283
|
-
this.flowsApiService = flowsApiService;
|
2284
|
-
this.router = router;
|
2285
|
-
this.activatedRoute = activatedRoute;
|
2286
|
-
this.context = context;
|
2287
|
-
this.quoteDraftService = quoteDraftService;
|
2288
|
-
this.form = new i10.FormGroup({
|
2289
|
-
id: new i10.FormControl(''),
|
2290
|
-
});
|
2291
|
-
this.flows$ = this.flowsApiService.fetchFlows().pipe(rxjs.map(function (flows) { return flows.map(function (flow) {
|
2292
|
-
var _a, _b, _c;
|
2293
|
-
var queryParams = (_b = (_a = flow === null || flow === void 0 ? void 0 : flow.properties) === null || _a === void 0 ? void 0 : _a.queryParams) !== null && _b !== void 0 ? _b : {};
|
2294
|
-
return {
|
2295
|
-
id: flow.id,
|
2296
|
-
entryPath: (_c = flow === null || flow === void 0 ? void 0 : flow.properties) === null || _c === void 0 ? void 0 : _c.entryPath,
|
2297
|
-
queryParams: queryParams,
|
2298
|
-
queryParamsStr: JSON.stringify(queryParams),
|
2299
|
-
};
|
2300
|
-
}); }), rxjs.shareReplay());
|
2301
|
-
}
|
2302
|
-
DebugComponent.prototype.runFlow = function () {
|
2303
|
-
var _d;
|
2304
|
-
var id = this.form.value.id;
|
2305
|
-
var objectPropertyName = getFlowObjectIdPropertyName(id);
|
2306
|
-
if (!id || !this.selectedFlow) {
|
2307
|
-
return;
|
2308
|
-
}
|
2309
|
-
// Delete context before starting a new flow
|
2310
|
-
this.context.delete();
|
2311
|
-
this.quoteDraftService.reset();
|
2312
|
-
this.router.navigate(['..', 'flows'], {
|
2313
|
-
queryParams: Object.assign((_d = { flowId: this.selectedFlow.id }, _d[objectPropertyName] = id, _d), this.selectedFlow.queryParams),
|
2314
|
-
relativeTo: this.activatedRoute,
|
2315
|
-
});
|
2316
|
-
};
|
2317
|
-
return DebugComponent;
|
2318
|
-
}());
|
2319
|
-
DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i2__namespace.FlowsApiService }, { token: i1__namespace$2.Router }, { token: i1__namespace$2.ActivatedRoute }, { token: i1__namespace$1.ContextService }, { token: i1__namespace$1.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2320
|
-
DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, 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.queryParamsStr }}</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;grid-gap:24px;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}tr{cursor:pointer}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}\n"], components: [{ type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i5__namespace$2.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i10__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i10__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i10__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i10__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i10__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i10__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i11__namespace.InputText, selector: "[pInputText]" }, { type: i5__namespace$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
2321
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DebugComponent, decorators: [{
|
2322
|
-
type: i0.Component,
|
2323
|
-
args: [{
|
2324
|
-
selector: 'vl-flow-debug',
|
2325
|
-
templateUrl: './debug.component.html',
|
2326
|
-
styleUrls: ['./debug.component.scss'],
|
2327
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
2328
|
-
}]
|
2329
|
-
}], ctorParameters: function () { return [{ type: i2__namespace.FlowsApiService }, { type: i1__namespace$2.Router }, { type: i1__namespace$2.ActivatedRoute }, { type: i1__namespace$1.ContextService }, { type: i1__namespace$1.QuoteDraftService }]; } });
|
2330
|
-
|
2331
|
-
var routes$1 = [{ path: '', component: DebugComponent }];
|
2332
|
-
var DebugModule = /** @class */ (function () {
|
2333
|
-
function DebugModule() {
|
2334
|
-
}
|
2335
|
-
return DebugModule;
|
2336
|
-
}());
|
2337
|
-
DebugModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DebugModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
2338
|
-
DebugModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DebugModule, declarations: [DebugComponent], imports: [i5$1.CommonModule,
|
2339
|
-
i10.FormsModule,
|
2340
|
-
i10.ReactiveFormsModule, i1__namespace$2.RouterModule, i5$2.RadioButtonModule,
|
2341
|
-
i5.ButtonModule,
|
2342
|
-
i11.InputTextModule,
|
2343
|
-
dropdown.DropdownModule] });
|
2344
|
-
DebugModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DebugModule, imports: [[
|
2345
|
-
i5$1.CommonModule,
|
2346
|
-
i10.FormsModule,
|
2347
|
-
i10.ReactiveFormsModule,
|
2348
|
-
i1$2.RouterModule.forChild(routes$1),
|
2349
|
-
i5$2.RadioButtonModule,
|
2350
|
-
i5.ButtonModule,
|
2351
|
-
i11.InputTextModule,
|
2352
|
-
dropdown.DropdownModule,
|
2353
|
-
]] });
|
2354
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DebugModule, decorators: [{
|
2355
|
-
type: i0.NgModule,
|
2356
|
-
args: [{
|
2357
|
-
declarations: [DebugComponent],
|
2358
|
-
imports: [
|
2359
|
-
i5$1.CommonModule,
|
2360
|
-
i10.FormsModule,
|
2361
|
-
i10.ReactiveFormsModule,
|
2362
|
-
i1$2.RouterModule.forChild(routes$1),
|
2363
|
-
i5$2.RadioButtonModule,
|
2364
|
-
i5.ButtonModule,
|
2365
|
-
i11.InputTextModule,
|
2366
|
-
dropdown.DropdownModule,
|
2367
|
-
],
|
2368
|
-
}]
|
2369
|
-
}] });
|
2370
|
-
|
2371
|
-
var EmptyAccountComponent = /** @class */ (function () {
|
2372
|
-
function EmptyAccountComponent() {
|
2373
|
-
}
|
2374
|
-
return EmptyAccountComponent;
|
2375
|
-
}());
|
2376
|
-
EmptyAccountComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EmptyAccountComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2377
|
-
EmptyAccountComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: EmptyAccountComponent, selector: "vl-empty-account", ngImport: i0__namespace, 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"], components: [{ type: i3__namespace.EmptyStateComponent, selector: "vl-empty-state", inputs: ["primaryText", "secondaryText", "buttonLabel", "icon", "disabled"], outputs: ["buttonClick"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
2378
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EmptyAccountComponent, decorators: [{
|
2379
|
-
type: i0.Component,
|
2380
|
-
args: [{
|
2381
|
-
selector: 'vl-empty-account',
|
2382
|
-
templateUrl: './empty-account.component.html',
|
2383
|
-
styleUrls: ['./empty-account.component.scss'],
|
2384
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
2385
|
-
}]
|
2386
|
-
}] });
|
2387
|
-
|
2388
|
-
var EmptyAccountModule = /** @class */ (function () {
|
2389
|
-
function EmptyAccountModule() {
|
2390
|
-
}
|
2391
|
-
return EmptyAccountModule;
|
2392
|
-
}());
|
2393
|
-
EmptyAccountModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EmptyAccountModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
2394
|
-
EmptyAccountModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EmptyAccountModule, declarations: [EmptyAccountComponent], imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule, i3.EmptyStateModule], exports: [EmptyAccountComponent] });
|
2395
|
-
EmptyAccountModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EmptyAccountModule, imports: [[i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule, i3.EmptyStateModule]] });
|
2396
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: EmptyAccountModule, decorators: [{
|
2397
|
-
type: i0.NgModule,
|
2398
|
-
args: [{
|
2399
|
-
declarations: [EmptyAccountComponent],
|
2400
|
-
imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule, i3.EmptyStateModule],
|
2401
|
-
exports: [EmptyAccountComponent],
|
2402
|
-
}]
|
2403
|
-
}] });
|
2404
|
-
|
2405
|
-
var LegacyProductComponent = /** @class */ (function () {
|
2406
|
-
function LegacyProductComponent(route, quoteDraftService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
|
2407
|
-
this.route = route;
|
2408
|
-
this.quoteDraftService = quoteDraftService;
|
2409
|
-
this.quoteApiService = quoteApiService;
|
2410
|
-
this.contextService = contextService;
|
2411
|
-
this.runtimeContextService = runtimeContextService;
|
2412
|
-
this.runtimeService = runtimeService;
|
2413
|
-
this.currentStateService = currentStateService;
|
2414
|
-
this.customizationService = customizationService;
|
2415
|
-
this.destroyed$ = new rxjs.Subject();
|
2416
|
-
}
|
2417
|
-
LegacyProductComponent.prototype.ngOnInit = function () {
|
2418
|
-
var _this = this;
|
2419
|
-
this.quoteDraftService.quoteDraft$
|
2420
|
-
.pipe(operators.first(), operators.takeUntil(this.destroyed$))
|
2421
|
-
.subscribe(function (quote) { return _this.init(quote, _this.route.snapshot.queryParams); });
|
2422
|
-
this.runtimeService.onSolutionStopEvent.pipe(operators.take(1)).subscribe(function (lineItem) { return _this.onSolutionStop(lineItem); });
|
2423
|
-
this.runtimeService.onSolutionReadyEvent.pipe(operators.take(1)).subscribe(function (event) { return _this.onSolutionReady(event); });
|
2424
|
-
this.runtimeService.onSolutionCancelEvent.pipe(operators.take(1)).subscribe(function () { return _this.onSolutionCancel(); });
|
2425
|
-
};
|
2426
|
-
LegacyProductComponent.prototype.ngOnDestroy = function () {
|
2427
|
-
this.destroyed$.next();
|
2428
|
-
this.destroyed$.complete();
|
2429
|
-
};
|
2430
|
-
LegacyProductComponent.prototype.onSolutionReady = function (lineItem) {
|
2431
|
-
var _a;
|
2432
|
-
lineItem.actionCode = (_a = lineItem.actionCode) !== null && _a !== void 0 ? _a : 'ADD';
|
2433
|
-
};
|
2434
|
-
LegacyProductComponent.prototype.onSolutionCancel = function () {
|
2435
|
-
this.quoteDraftService.quoteDraft$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
|
2436
|
-
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
2437
|
-
});
|
2438
|
-
};
|
2439
|
-
LegacyProductComponent.prototype.onSolutionUpdated = function (lineItem) {
|
2440
|
-
var states = {
|
2441
|
-
configurableRamp: lineItem,
|
2442
|
-
currentState: this.currentStateService.currentState,
|
2443
|
-
asset: this.getAsset(lineItem),
|
2444
|
-
};
|
2445
|
-
this.runtimeService.updateRuntime(states);
|
2446
|
-
};
|
2447
|
-
LegacyProductComponent.prototype.onSolutionStop = function (lineItem) {
|
2448
|
-
var _this = this;
|
2449
|
-
this.quoteDraftService.quoteDraft$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
|
2450
|
-
var quoteToUpsert = Object.assign(Object.assign({}, quote), { context: _this.contextService.resolve(), currentState: __spreadArray(__spreadArray([], __read((_this.currentStateService.currentState || []).filter(function (li) { return li.id !== lineItem.id; }))), [lineItem]) });
|
2451
|
-
_this.quoteApiService
|
2452
|
-
.upsertQuote(quoteToUpsert)
|
2453
|
-
.pipe(operators.take(1))
|
2454
|
-
.subscribe(function (quote) {
|
2455
|
-
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
2456
|
-
});
|
2457
|
-
});
|
2458
|
-
};
|
2459
|
-
LegacyProductComponent.prototype.init = function (quote, queryParams) {
|
2460
|
-
var productId = queryParams['productId'];
|
2461
|
-
var lineItemId = this.getLineItemId(quote, queryParams);
|
2462
|
-
this.assets = quote.initialState;
|
2463
|
-
lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
|
2464
|
-
};
|
2465
|
-
LegacyProductComponent.prototype.getLineItemId = function (quote, queryParams) {
|
2466
|
-
if (core.EntityUtil.isPresent(queryParams['lineItemId'])) {
|
2467
|
-
return queryParams['lineItemId'];
|
2468
|
-
}
|
2469
|
-
return quote.currentState
|
2470
|
-
.filter(function (lineItem) { return lineItem.productId === queryParams['productId']; })
|
2471
|
-
.map(function (lineItem) { return lineItem.id; })
|
2472
|
-
.find(function (id) { return id; });
|
2473
|
-
};
|
2474
|
-
LegacyProductComponent.prototype.configure = function (productId) {
|
2475
|
-
var runtimeContext = this.getRuntimeContext(productId, '', i1$1.RuntimeOperation.INIT);
|
2476
|
-
this.startRuntime({}, runtimeContext);
|
2477
|
-
};
|
2478
|
-
LegacyProductComponent.prototype.reConfigure = function (lineItemId, currentState) {
|
2479
|
-
var currentStateItem = core.EntityUtil.findById(lineItemId, currentState);
|
2480
|
-
var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i1$1.RuntimeOperation.UPDATE);
|
2481
|
-
var states = {
|
2482
|
-
configurableRamp: currentStateItem,
|
2483
|
-
currentState: currentState,
|
2484
|
-
asset: this.getAsset(currentStateItem),
|
2485
|
-
};
|
2486
|
-
this.currentStateService.update(currentState);
|
2487
|
-
this.startRuntime(states, runtimeContext);
|
2488
|
-
};
|
2489
|
-
LegacyProductComponent.prototype.getAsset = function (lineItem) {
|
2490
|
-
return this.assets && this.assets.find(function (a) { return a.id === lineItem.openOrderLineItemId || a.id === lineItem.assetId; });
|
2491
|
-
};
|
2492
|
-
LegacyProductComponent.prototype.startRuntime = function (states, runtimeContext$) {
|
2493
|
-
var _this = this;
|
2494
|
-
runtimeContext$
|
2495
|
-
.pipe(operators.take(1), operators.map(function (runtimeContext) {
|
2496
|
-
_this.runtimeService.startRuntime(runtimeContext, states);
|
2497
|
-
}))
|
2498
|
-
.subscribe();
|
2499
|
-
};
|
2500
|
-
LegacyProductComponent.prototype.customizeContext = function (productId, context) {
|
2501
|
-
var _a;
|
2502
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getLegacyUiDefinition)) {
|
2503
|
-
return rxjs.of(context);
|
2504
|
-
}
|
2505
|
-
return this.customizationService.getLegacyUiDefinition(productId).pipe(operators.map(function (uiDef) { return (Object.assign(Object.assign({}, context), { uiDefinition: uiDef !== null && uiDef !== void 0 ? uiDef : context.uiDefinition })); }));
|
2506
|
-
};
|
2507
|
-
LegacyProductComponent.prototype.getRuntimeContext = function (productId, offeringId, runtimeOperation) {
|
2508
|
-
var _this = this;
|
2509
|
-
return this.runtimeContextService.getRuntimeContext(productId, offeringId).pipe(operators.map(function (runtimeContext) {
|
2510
|
-
runtimeContext.invocationContext = { runtimeOperation: i1$1.RuntimeOperation[runtimeOperation] };
|
2511
|
-
return runtimeContext;
|
2512
|
-
}), operators.switchMap(function (runtimeContext) { return _this.customizeContext(productId, runtimeContext); }));
|
2513
|
-
};
|
2514
|
-
return LegacyProductComponent;
|
2515
|
-
}());
|
2516
|
-
LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace$2.ActivatedRoute }, { token: i1__namespace$1.QuoteDraftService }, { token: i2__namespace.QuoteApiService }, { token: i1__namespace$1.ContextService }, { token: i4__namespace$3.RuntimeContextService }, { token: i4__namespace$3.RuntimeService }, { token: i4__namespace$3.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2517
|
-
LegacyProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: LegacyProductComponent, selector: "ng-component", ngImport: i0__namespace, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4__namespace$3.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
|
2518
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LegacyProductComponent, decorators: [{
|
2519
|
-
type: i0.Component,
|
2520
|
-
args: [{
|
2521
|
-
templateUrl: './legacy-product.component.html',
|
2522
|
-
styleUrls: ['./legacy-product.component.scss'],
|
2523
|
-
}]
|
2524
|
-
}], ctorParameters: function () {
|
2525
|
-
return [{ type: i1__namespace$2.ActivatedRoute }, { type: i1__namespace$1.QuoteDraftService }, { type: i2__namespace.QuoteApiService }, { type: i1__namespace$1.ContextService }, { type: i4__namespace$3.RuntimeContextService }, { type: i4__namespace$3.RuntimeService }, { type: i4__namespace$3.CurrentStateService }, { type: undefined, decorators: [{
|
2526
|
-
type: i0.Optional
|
2527
|
-
}, {
|
2528
|
-
type: i0.Inject,
|
2529
|
-
args: [FLOW_CUSTOMIZATION]
|
2530
|
-
}] }];
|
2531
|
-
} });
|
2532
|
-
|
2533
|
-
var LegacyProductModule = /** @class */ (function () {
|
2534
|
-
function LegacyProductModule() {
|
2535
|
-
}
|
2536
|
-
return LegacyProductModule;
|
2537
|
-
}());
|
2538
|
-
LegacyProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LegacyProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
2539
|
-
LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i5$1.CommonModule, i4$3.RuntimeModule, i1__namespace$3.TooltipModule], exports: [LegacyProductComponent] });
|
2540
|
-
LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i5$1.CommonModule, i4$3.RuntimeModule, i1$3.TooltipModule.forRoot()]] });
|
2541
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LegacyProductModule, decorators: [{
|
2542
|
-
type: i0.NgModule,
|
2543
|
-
args: [{
|
2544
|
-
declarations: [LegacyProductComponent],
|
2545
|
-
imports: [i5$1.CommonModule, i4$3.RuntimeModule, i1$3.TooltipModule.forRoot()],
|
2546
|
-
exports: [LegacyProductComponent],
|
2547
|
-
}]
|
2548
|
-
}] });
|
2549
|
-
|
2550
|
-
var ProductComponent = /** @class */ (function () {
|
2551
|
-
function ProductComponent(contextService, runtimeService, configurationService, quoteDraftService, messageService, customizationService) {
|
2552
|
-
this.contextService = contextService;
|
2553
|
-
this.runtimeService = runtimeService;
|
2554
|
-
this.configurationService = configurationService;
|
2555
|
-
this.quoteDraftService = quoteDraftService;
|
2556
|
-
this.messageService = messageService;
|
2557
|
-
this.customizationService = customizationService;
|
2558
|
-
this.destroy$ = new rxjs.Subject();
|
2559
|
-
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
2560
|
-
}
|
2561
|
-
ProductComponent.prototype.ngOnInit = function () {
|
2562
|
-
var _this = this;
|
2563
|
-
this.quoteDraftService.quoteDraft$.pipe(rxjs.first(), rxjs.takeUntil(this.destroy$)).subscribe(function (quote) { return _this.init(quote); });
|
2564
|
-
};
|
2565
|
-
ProductComponent.prototype.ngOnDestroy = function () {
|
2566
|
-
this.destroy$.next();
|
2567
|
-
this.destroy$.complete();
|
2568
|
-
};
|
2569
|
-
ProductComponent.prototype.customize = function (productId) {
|
2570
|
-
var _this = this;
|
2571
|
-
var _a;
|
2572
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getUiDefinition)) {
|
2573
|
-
return rxjs.of(null);
|
2574
|
-
}
|
2575
|
-
return this.customizationService.getUiDefinition(productId).pipe(rxjs.tap(function (uiDef) {
|
2576
|
-
var _a;
|
2577
|
-
if (uiDef) {
|
2578
|
-
_this.uiDefinition = uiDef;
|
2579
|
-
_this.runtimeService.uiDefinitionProperties = (_a = uiDef.properties) !== null && _a !== void 0 ? _a : {};
|
2580
|
-
}
|
2581
|
-
}));
|
2582
|
-
};
|
2583
|
-
ProductComponent.prototype.init = function (quote) {
|
2584
|
-
var _this = this;
|
2585
|
-
var contextProperties = this.contextService.resolve().properties;
|
2586
|
-
var productId = contextProperties.productId;
|
2587
|
-
if (!productId) {
|
2588
|
-
return;
|
2589
|
-
}
|
2590
|
-
var lineItemId = this.getLineItemId(quote, productId, contextProperties.lineItemId);
|
2591
|
-
var currentStateItem = quote.currentState.find(function (_c) {
|
2592
|
-
var id = _c.id;
|
2593
|
-
return id === lineItemId;
|
2594
|
-
});
|
2595
|
-
if (currentStateItem) {
|
2596
|
-
this.configurationService.setConfigurableRamp(currentStateItem);
|
2597
|
-
}
|
2598
|
-
var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
|
2599
|
-
this.runtimeService
|
2600
|
-
.init({ productId: productId, offeringId: offeringId })
|
2601
|
-
.pipe(rxjs.tap(function (context) { return (_this.uiDefinition = context === null || context === void 0 ? void 0 : context.uiDefinition); }), rxjs.switchMap(function () { return _this.customize(productId); }), this.throwIfNoUIDefinition(), rxjs.switchMap(function () { return _this.configurationService.configure(); }), rxjs.tap(function () { return _this.state$.next({ loading: false, failure: false }); }), rxjs.catchError(function (error) {
|
2602
|
-
var _a, _b;
|
2603
|
-
if (!((_b = (_a = _this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
|
2604
|
-
_this.messageService.add({ severity: 'error', summary: error });
|
2605
|
-
}
|
2606
|
-
_this.state$.next({ loading: false, failure: true });
|
2607
|
-
return rxjs.of();
|
2608
|
-
}), rxjs.takeUntil(this.destroy$))
|
2609
|
-
.subscribe();
|
2610
|
-
};
|
2611
|
-
ProductComponent.prototype.throwIfNoUIDefinition = function () {
|
2612
|
-
var _this = this;
|
2613
|
-
return function (source$) {
|
2614
|
-
return source$.pipe(rxjs.switchMap(function () {
|
2615
|
-
if (!_this.uiDefinition) {
|
2616
|
-
return rxjs.throwError(function () { return 'Product does not have Configuration UI'; });
|
2617
|
-
}
|
2618
|
-
return source$;
|
2619
|
-
}));
|
2620
|
-
};
|
2621
|
-
};
|
2622
|
-
ProductComponent.prototype.getLineItemId = function (quote, productId, lineItemId) {
|
2623
|
-
var _a, _b;
|
2624
|
-
// search by lineItemId first
|
2625
|
-
var id = (_a = quote.currentState.find(function (li) { return li.id === lineItemId; })) === null || _a === void 0 ? void 0 : _a.id;
|
2626
|
-
if (!id && this.quoteDraftService.isStandalone) {
|
2627
|
-
id = (_b = quote.currentState.find(function (li) { return li.productId === productId; })) === null || _b === void 0 ? void 0 : _b.id;
|
2628
|
-
}
|
2629
|
-
return id;
|
2630
|
-
};
|
2631
|
-
return ProductComponent;
|
2632
|
-
}());
|
2633
|
-
ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i1__namespace$1.ContextService }, { token: i1__namespace$1.ConfigurationRuntimeService }, { token: i1__namespace$1.ConfigurationService }, { token: i1__namespace$1.QuoteDraftService }, { token: i2__namespace$1.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2634
|
-
ProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ProductComponent, selector: "vl-flow-product", ngImport: i0__namespace, 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: [""], components: [{ type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4__namespace.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "config"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
2635
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductComponent, decorators: [{
|
2636
|
-
type: i0.Component,
|
2637
|
-
args: [{
|
2638
|
-
selector: 'vl-flow-product',
|
2639
|
-
templateUrl: './product.component.html',
|
2640
|
-
styleUrls: ['./product.component.scss'],
|
2641
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
2642
|
-
}]
|
2643
|
-
}], ctorParameters: function () {
|
2644
|
-
return [{ type: i1__namespace$1.ContextService }, { type: i1__namespace$1.ConfigurationRuntimeService }, { type: i1__namespace$1.ConfigurationService }, { type: i1__namespace$1.QuoteDraftService }, { type: i2__namespace$1.MessageService }, { type: undefined, decorators: [{
|
2645
|
-
type: i0.Optional
|
2646
|
-
}, {
|
2647
|
-
type: i0.Inject,
|
2648
|
-
args: [FLOW_CUSTOMIZATION]
|
2649
|
-
}] }];
|
2650
|
-
} });
|
2651
|
-
|
2652
|
-
var ProductModule = /** @class */ (function () {
|
2653
|
-
function ProductModule() {
|
2654
|
-
}
|
2655
|
-
return ProductModule;
|
2656
|
-
}());
|
2657
|
-
ProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
2658
|
-
ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule], exports: [ProductComponent] });
|
2659
|
-
ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModule, imports: [[i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule]] });
|
2660
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModule, decorators: [{
|
2661
|
-
type: i0.NgModule,
|
2662
|
-
args: [{
|
2663
|
-
declarations: [ProductComponent],
|
2664
|
-
imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule],
|
2665
|
-
exports: [ProductComponent],
|
2666
|
-
}]
|
2667
|
-
}] });
|
2668
|
-
|
2669
|
-
var RecordNotFoundComponent = /** @class */ (function () {
|
2670
|
-
function RecordNotFoundComponent(router, route) {
|
2671
|
-
this.router = router;
|
2672
|
-
this.route = route;
|
2673
|
-
this.subMessage = '';
|
2674
|
-
var navigation = this.router.getCurrentNavigation();
|
2675
|
-
var state = ((navigation === null || navigation === void 0 ? void 0 : navigation.extras) || {}).state;
|
2676
|
-
this.message = state === null || state === void 0 ? void 0 : state.message;
|
2677
|
-
if (typeof this.message === 'string') {
|
2678
|
-
this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';
|
2679
|
-
}
|
2680
|
-
}
|
2681
|
-
return RecordNotFoundComponent;
|
2682
|
-
}());
|
2683
|
-
RecordNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RecordNotFoundComponent, deps: [{ token: i1__namespace$2.Router }, { token: i1__namespace$2.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2684
|
-
RecordNotFoundComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0__namespace, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
2685
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RecordNotFoundComponent, decorators: [{
|
2686
|
-
type: i0.Component,
|
2687
|
-
args: [{
|
2688
|
-
selector: 'vl-flow-record-not-found',
|
2689
|
-
templateUrl: './record-not-found.component.html',
|
2690
|
-
styleUrls: ['./record-not-found.component.scss'],
|
2691
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
2692
|
-
}]
|
2693
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.Router }, { type: i1__namespace$2.ActivatedRoute }]; } });
|
2694
|
-
|
2695
|
-
var routes = [{ path: '', component: RecordNotFoundComponent }];
|
2696
|
-
var RecordNotFoundModule = /** @class */ (function () {
|
2697
|
-
function RecordNotFoundModule() {
|
2698
|
-
}
|
2699
|
-
return RecordNotFoundModule;
|
2700
|
-
}());
|
2701
|
-
RecordNotFoundModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RecordNotFoundModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
2702
|
-
RecordNotFoundModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [i5$1.CommonModule, i1__namespace$2.RouterModule] });
|
2703
|
-
RecordNotFoundModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RecordNotFoundModule, imports: [[i5$1.CommonModule, i1$2.RouterModule.forChild(routes)]] });
|
2704
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RecordNotFoundModule, decorators: [{
|
2705
|
-
type: i0.NgModule,
|
2706
|
-
args: [{
|
2707
|
-
declarations: [RecordNotFoundComponent],
|
2708
|
-
imports: [i5$1.CommonModule, i1$2.RouterModule.forChild(routes)],
|
2709
|
-
}]
|
2710
|
-
}] });
|
2711
|
-
|
2712
|
-
var RemoteComponent = /** @class */ (function () {
|
2713
|
-
function RemoteComponent(contextService, quoteDraftService, quoteApiService, runtimeService, configurationService, messageService, integrationState, location) {
|
2714
|
-
this.contextService = contextService;
|
2715
|
-
this.quoteDraftService = quoteDraftService;
|
2716
|
-
this.quoteApiService = quoteApiService;
|
2717
|
-
this.runtimeService = runtimeService;
|
2718
|
-
this.configurationService = configurationService;
|
2719
|
-
this.messageService = messageService;
|
2720
|
-
this.integrationState = integrationState;
|
2721
|
-
this.location = location;
|
2722
|
-
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
2723
|
-
this.DYNAMIC_OPTION_PRODUCTS_KEY = 'Dynamic';
|
2724
|
-
this.destroyed$ = new rxjs.Subject();
|
2725
|
-
this.rpcMessage = JSON.parse(window.RPC_MESSAGE);
|
2726
|
-
this.rpcMessage.options.sort(function (a, b) { var _a, _b; return ((_a = a.featureNumber) !== null && _a !== void 0 ? _a : 99999) - ((_b = b.featureNumber) !== null && _b !== void 0 ? _b : 99999); });
|
2727
|
-
this.updateHasChildrenFlag(this.rpcMessage.product.configuredProductId);
|
2728
|
-
// update context properties
|
2729
|
-
if (this.rpcMessage.quote) {
|
2730
|
-
var properties_1 = {};
|
2731
|
-
if (this.rpcMessage.quote.SBQQ__Opportunity2__c) {
|
2732
|
-
properties_1.OpportunityId = this.rpcMessage.quote.SBQQ__Opportunity2__c;
|
2733
|
-
}
|
2734
|
-
Object.entries(this.rpcMessage.quote).forEach(function (_f) {
|
2735
|
-
var _g = __read(_f, 2), key = _g[0], value = _g[1];
|
2736
|
-
if (value !== undefined && !(value instanceof Object)) {
|
2737
|
-
properties_1[key] = value;
|
2738
|
-
}
|
2739
|
-
});
|
2740
|
-
this.contextService.update({ properties: properties_1 });
|
2741
|
-
}
|
2742
|
-
this.initSubscriptions();
|
2743
|
-
this.initConfiguration();
|
2744
|
-
}
|
2745
|
-
RemoteComponent.prototype.ngOnDestroy = function () {
|
2746
|
-
this.destroyed$.next();
|
2747
|
-
this.destroyed$.complete();
|
2748
|
-
};
|
2749
|
-
RemoteComponent.prototype.initConfiguration = function () {
|
2750
|
-
var _this = this;
|
2751
|
-
var productId = this.rpcMessage.product.configuredProductId;
|
2752
|
-
var quote = this.quoteDraftService.quoteDraft;
|
2753
|
-
if (!productId || !quote) {
|
2754
|
-
return;
|
2755
|
-
}
|
2756
|
-
this.runtimeService
|
2757
|
-
.init({ productId: productId })
|
2758
|
-
.pipe(rxjs.first(), rxjs.tap(function (context) {
|
2759
|
-
var _a, _b, _c, _d, _e;
|
2760
|
-
var pricingEnabled = ((_b = (_a = context === null || context === void 0 ? void 0 : context.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.pricingEnabled) ? 'true' : 'false';
|
2761
|
-
var priceListId = (_d = (_c = context === null || context === void 0 ? void 0 : context.uiDefinition) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.priceList;
|
2762
|
-
var runtimeContextProperties = (_e = _this.runtimeService.runtimeContext) === null || _e === void 0 ? void 0 : _e.properties;
|
2763
|
-
if (runtimeContextProperties) {
|
2764
|
-
runtimeContextProperties.PriceListId = priceListId;
|
2765
|
-
runtimeContextProperties.PricingEnabled = pricingEnabled;
|
2766
|
-
}
|
2767
|
-
_this.contextService.update({
|
2768
|
-
properties: {
|
2769
|
-
ModelId: context === null || context === void 0 ? void 0 : context.modelId,
|
2770
|
-
RuntimeMode: 'TEST',
|
2771
|
-
PricingEnabled: pricingEnabled,
|
2772
|
-
PriceListId: priceListId,
|
2773
|
-
},
|
2774
|
-
});
|
2775
|
-
_this.uiDefinition = context === null || context === void 0 ? void 0 : context.uiDefinition;
|
2776
|
-
_this.configurationService.setConfigurableRamp(_this.createLineItem());
|
2777
|
-
}), this.throwIfNoUIDefinition(), rxjs.switchMap(function () { return _this.configurationService.configure(); }), rxjs.tap(function () { return _this.state$.next({ loading: false, failure: false }); }), rxjs.catchError(function (error) {
|
2778
|
-
var _a, _b;
|
2779
|
-
if (!((_b = (_a = _this.uiDefinition) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.suppressToastMessages)) {
|
2780
|
-
_this.messageService.add({ severity: 'error', summary: error });
|
2781
|
-
}
|
2782
|
-
_this.state$.next({ loading: false, failure: true });
|
2783
|
-
return rxjs.of();
|
2784
|
-
}), rxjs.takeUntil(this.destroyed$))
|
2785
|
-
.subscribe();
|
2786
|
-
};
|
2787
|
-
RemoteComponent.prototype.throwIfNoUIDefinition = function () {
|
2788
|
-
var _this = this;
|
2789
|
-
return function (source$) {
|
2790
|
-
return source$.pipe(rxjs.switchMap(function () {
|
2791
|
-
if (!_this.uiDefinition) {
|
2792
|
-
return rxjs.throwError(function () { return 'Product does not have Configuration UI'; });
|
2793
|
-
}
|
2794
|
-
return source$;
|
2795
|
-
}));
|
2796
|
-
};
|
2797
|
-
};
|
2798
|
-
RemoteComponent.prototype.initSubscriptions = function () {
|
2799
|
-
var _this = this;
|
2800
|
-
this.integrationState
|
2801
|
-
.listen$(i4.FlowAction.REMOTE_CANCEL)
|
2802
|
-
.pipe(rxjs.tap(function () { return _this.location.back(); }), rxjs.takeUntil(this.destroyed$))
|
2803
|
-
.subscribe();
|
2804
|
-
this.integrationState
|
2805
|
-
.listen$(i4.FlowAction.REMOTE_APPLY)
|
2806
|
-
.pipe(rxjs.tap(function () { return _this.saveRpcMessage(); }), rxjs.takeUntil(this.destroyed$))
|
2807
|
-
.subscribe();
|
2808
|
-
};
|
2809
|
-
RemoteComponent.prototype.createLineItem = function () {
|
2810
|
-
var _a, _b;
|
2811
|
-
var _f = __read((_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState) !== null && _b !== void 0 ? _b : [], 1), quoteDraftLineItem = _f[0];
|
2812
|
-
if (quoteDraftLineItem && (quoteDraftLineItem.attributes.length > 0 || quoteDraftLineItem.lineItems.length > 0)) {
|
2813
|
-
return quoteDraftLineItem;
|
2814
|
-
}
|
2815
|
-
var lineItem = this.createRootLineItem();
|
2816
|
-
var dynamicOptionProducts = this.rpcMessage.product.optionConfigurations[this.DYNAMIC_OPTION_PRODUCTS_KEY];
|
2817
|
-
if (dynamicOptionProducts) {
|
2818
|
-
var options = this.toParentChildMap(dynamicOptionProducts);
|
2819
|
-
var items = [lineItem];
|
2820
|
-
for (var i = 0; i < items.length; i++) {
|
2821
|
-
var item = items[i];
|
2822
|
-
var children = options.get(item.id);
|
2823
|
-
if (children) {
|
2824
|
-
item.lineItems = children;
|
2825
|
-
items = items.concat(children);
|
2826
|
-
}
|
2827
|
-
}
|
2828
|
-
}
|
2829
|
-
return lineItem;
|
2830
|
-
};
|
2831
|
-
RemoteComponent.prototype.createRootLineItem = function () {
|
2832
|
-
var _a, _b, _c, _d;
|
2833
|
-
var product = this.rpcMessage.product;
|
2834
|
-
var runtimeContext = this.runtimeService.runtimeContext;
|
2835
|
-
var veloceInstanceId = product.configurationAttributes.VeloceInstanceId__c;
|
2836
|
-
var quoteId = (_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState[0]) === null || _b === void 0 ? void 0 : _b.id;
|
2837
|
-
return {
|
2838
|
-
id: quoteId || veloceInstanceId || core.UUID.UUID(),
|
2839
|
-
type: (_c = runtimeContext.productType) !== null && _c !== void 0 ? _c : '',
|
2840
|
-
name: ((_d = runtimeContext.properties) === null || _d === void 0 ? void 0 : _d.displayName) || runtimeContext.productName,
|
2841
|
-
productName: runtimeContext.productName,
|
2842
|
-
productId: runtimeContext.productId,
|
2843
|
-
cfgStatus: 'Default',
|
2844
|
-
actionCode: 'ADD',
|
2845
|
-
qty: 1,
|
2846
|
-
};
|
2847
|
-
};
|
2848
|
-
RemoteComponent.prototype.toParentChildMap = function (remoteOptionProducts) {
|
2849
|
-
var e_1, _f;
|
2850
|
-
var _a;
|
2851
|
-
var result = new Map();
|
2852
|
-
try {
|
2853
|
-
for (var remoteOptionProducts_1 = __values(remoteOptionProducts), remoteOptionProducts_1_1 = remoteOptionProducts_1.next(); !remoteOptionProducts_1_1.done; remoteOptionProducts_1_1 = remoteOptionProducts_1.next()) {
|
2854
|
-
var option = remoteOptionProducts_1_1.value;
|
2855
|
-
var configurationData = (_a = option === null || option === void 0 ? void 0 : option.readOnly) === null || _a === void 0 ? void 0 : _a.line;
|
2856
|
-
var id = configurationData === null || configurationData === void 0 ? void 0 : configurationData.VeloceInstanceId__c;
|
2857
|
-
var parentId = configurationData === null || configurationData === void 0 ? void 0 : configurationData.VeloceParentInstanceId__c;
|
2858
|
-
if (!option.selected || !configurationData || !id || !parentId) {
|
2859
|
-
continue;
|
2860
|
-
}
|
2861
|
-
var productId = option.productId;
|
2862
|
-
var lineItem = {
|
2863
|
-
id: id,
|
2864
|
-
productId: productId,
|
2865
|
-
parentId: parentId,
|
2866
|
-
type: configurationData.ModelType__c,
|
2867
|
-
port: configurationData.ModelPort__c,
|
2868
|
-
cfgStatus: configurationData.ConfigurationStatus__c,
|
2869
|
-
actionCode: configurationData.ActionCode__c,
|
2870
|
-
qty: option.Quantity,
|
2871
|
-
};
|
2872
|
-
var siblings = result.get(productId);
|
2873
|
-
if (!siblings) {
|
2874
|
-
result.set(parentId, (siblings = []));
|
2875
|
-
}
|
2876
|
-
siblings.push(lineItem);
|
2877
|
-
}
|
2878
|
-
}
|
2879
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
2880
|
-
finally {
|
2881
|
-
try {
|
2882
|
-
if (remoteOptionProducts_1_1 && !remoteOptionProducts_1_1.done && (_f = remoteOptionProducts_1.return)) _f.call(remoteOptionProducts_1);
|
2883
|
-
}
|
2884
|
-
finally { if (e_1) throw e_1.error; }
|
2885
|
-
}
|
2886
|
-
return result;
|
2887
|
-
};
|
2888
|
-
RemoteComponent.prototype.saveRpcMessage = function () {
|
2889
|
-
var _this = this;
|
2890
|
-
var _a;
|
2891
|
-
var quote = this.quoteDraftService.quoteDraft;
|
2892
|
-
var lineItem = this.configurationService.getSnapshot();
|
2893
|
-
if (!quote || !lineItem) {
|
2894
|
-
return;
|
2895
|
-
}
|
2896
|
-
this.rpcMessage.VeloceReferenceId = quote.quoteId;
|
2897
|
-
this.rpcMessage.product.configurationData.VeloceInstanceId__c = lineItem.id;
|
2898
|
-
var childItems = this.flattenChildLineItems(lineItem);
|
2899
|
-
var savingMode = window.SavingMode;
|
2900
|
-
this.updateContentData(this.rpcMessage.product, lineItem);
|
2901
|
-
this.rpcMessage.quote = this.mapAttributesTo('Quote', lineItem);
|
2902
|
-
if (savingMode === 'ALL') {
|
2903
|
-
var optionConfigurations_1 = this.getOptionConfigurations(this.rpcMessage.product);
|
2904
|
-
var rootProductOptions_1 = this.rpcMessage.options.filter(function (po) { return po.configuredProductId === lineItem.productId; });
|
2905
|
-
childItems.forEach(function (lineItem) {
|
2906
|
-
var _a, _b, _c;
|
2907
|
-
var rootOption = rootProductOptions_1.find(function (po) { return po.optionalProductId === lineItem.productId; });
|
2908
|
-
if (rootOption) {
|
2909
|
-
var featureOptions = (_a = optionConfigurations_1[rootOption.featureName]) !== null && _a !== void 0 ? _a : (optionConfigurations_1[rootOption.featureName] = []);
|
2910
|
-
var originOption = !rootOption.hasChildren
|
2911
|
-
? optionConfigurations_1[rootOption.featureName].find(function (_f) {
|
2912
|
-
var optionId = _f.optionId;
|
2913
|
-
return optionId === rootOption.optionId;
|
2914
|
-
})
|
2915
|
-
: undefined;
|
2916
|
-
var option = originOption !== null && originOption !== void 0 ? originOption : {};
|
2917
|
-
option.optionId = (_b = option.optionId) !== null && _b !== void 0 ? _b : rootOption.optionId;
|
2918
|
-
_this.updateContentData(option, lineItem);
|
2919
|
-
option.index = (_c = option.index) !== null && _c !== void 0 ? _c : featureOptions.length;
|
2920
|
-
option.selected = true;
|
2921
|
-
if (!originOption) {
|
2922
|
-
featureOptions.push(option);
|
2923
|
-
}
|
2924
|
-
if (lineItem.parentLineItem) {
|
2925
|
-
var nestedProductOption = _this.rpcMessage.options.find(function (po) {
|
2926
|
-
var _a;
|
2927
|
-
return po.configuredProductId === ((_a = lineItem.parentLineItem) === null || _a === void 0 ? void 0 : _a.productId) &&
|
2928
|
-
po.optionalProductId === lineItem.productId;
|
2929
|
-
});
|
2930
|
-
if (nestedProductOption) {
|
2931
|
-
option.configurationData = Object.assign(Object.assign({}, option.configurationData), { VeloceParentInstanceId__c: lineItem.parentLineItem.id, VeloceNestedOptionId__c: nestedProductOption.optionId, VeloceNestedFeatureId__c: nestedProductOption.featureId });
|
2932
|
-
}
|
2933
|
-
}
|
2934
|
-
}
|
2935
|
-
else {
|
2936
|
-
_this.rpcMessage.dynamicFeatures.forEach(function (feature) {
|
2937
|
-
var _a, _b;
|
2938
|
-
var featureOptions = (_a = optionConfigurations_1[feature.name]) !== null && _a !== void 0 ? _a : (optionConfigurations_1[feature.name] = []);
|
2939
|
-
var originOption = featureOptions.find(function (_f) {
|
2940
|
-
var productId = _f.productId;
|
2941
|
-
return productId === lineItem.productId;
|
2942
|
-
});
|
2943
|
-
var option = originOption !== null && originOption !== void 0 ? originOption : {};
|
2944
|
-
_this.updateContentData(option, lineItem);
|
2945
|
-
option.index = (_b = option.index) !== null && _b !== void 0 ? _b : featureOptions.length;
|
2946
|
-
option.selected = true;
|
2947
|
-
if (!originOption) {
|
2948
|
-
featureOptions.push(option);
|
2949
|
-
}
|
2950
|
-
});
|
2951
|
-
}
|
2952
|
-
});
|
2953
|
-
this.rpcMessage.product = Object.assign(Object.assign({}, this.rpcMessage.product), { optionConfigurations: optionConfigurations_1 });
|
2954
|
-
}
|
2955
|
-
(_a = window.RPC_BROADCAST) === null || _a === void 0 ? void 0 : _a.apply(null, [this.rpcMessage]);
|
2956
|
-
};
|
2957
|
-
RemoteComponent.prototype.updateHasChildrenFlag = function (bundleProductId) {
|
2958
|
-
var e_2, _f, e_3, _g;
|
2959
|
-
var bundleOptionsByOptionId = {};
|
2960
|
-
var notBundleOptions = [];
|
2961
|
-
try {
|
2962
|
-
for (var _h = __values(this.rpcMessage.options), _j = _h.next(); !_j.done; _j = _h.next()) {
|
2963
|
-
var productOption = _j.value;
|
2964
|
-
if (productOption.configuredProductId === bundleProductId) {
|
2965
|
-
bundleOptionsByOptionId[productOption.optionalProductId] = productOption;
|
2966
|
-
}
|
2967
|
-
else {
|
2968
|
-
notBundleOptions.push(productOption);
|
2969
|
-
}
|
2970
|
-
}
|
2971
|
-
}
|
2972
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
2973
|
-
finally {
|
2974
|
-
try {
|
2975
|
-
if (_j && !_j.done && (_f = _h.return)) _f.call(_h);
|
2976
|
-
}
|
2977
|
-
finally { if (e_2) throw e_2.error; }
|
2978
|
-
}
|
2979
|
-
try {
|
2980
|
-
for (var notBundleOptions_1 = __values(notBundleOptions), notBundleOptions_1_1 = notBundleOptions_1.next(); !notBundleOptions_1_1.done; notBundleOptions_1_1 = notBundleOptions_1.next()) {
|
2981
|
-
var option = notBundleOptions_1_1.value;
|
2982
|
-
if (bundleOptionsByOptionId[option.configuredProductId]) {
|
2983
|
-
bundleOptionsByOptionId[option.configuredProductId].hasChildren = true;
|
2984
|
-
}
|
2985
|
-
}
|
2986
|
-
}
|
2987
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
2988
|
-
finally {
|
2989
|
-
try {
|
2990
|
-
if (notBundleOptions_1_1 && !notBundleOptions_1_1.done && (_g = notBundleOptions_1.return)) _g.call(notBundleOptions_1);
|
2991
|
-
}
|
2992
|
-
finally { if (e_3) throw e_3.error; }
|
2993
|
-
}
|
2994
|
-
};
|
2995
|
-
RemoteComponent.prototype.flattenChildLineItems = function (lineItem) {
|
2996
|
-
var _a;
|
2997
|
-
var items = (_a = lineItem.lineItems) !== null && _a !== void 0 ? _a : [];
|
2998
|
-
var _loop_1 = function (i) {
|
2999
|
-
var item = items[i];
|
3000
|
-
if (item.lineItems) {
|
3001
|
-
items = items.concat(item.lineItems.map(function (li) { return (Object.assign(Object.assign({}, li), { parentLineItem: item })); }));
|
3002
|
-
}
|
3003
|
-
};
|
3004
|
-
for (var i = 0; i < items.length; i++) {
|
3005
|
-
_loop_1(i);
|
3006
|
-
}
|
3007
|
-
return items;
|
3008
|
-
};
|
3009
|
-
RemoteComponent.prototype.updateContentData = function (entity, lineItem) {
|
3010
|
-
var _a, _b;
|
3011
|
-
if (lineItem.productId) {
|
3012
|
-
entity.productId = lineItem.productId;
|
3013
|
-
}
|
3014
|
-
var quantityAttribute = lineItem.properties.quantityAttribute;
|
3015
|
-
entity.Quantity = quantityAttribute
|
3016
|
-
? (_b = (_a = lineItem.attributes.find(function (attribute) { return attribute.name === quantityAttribute; })) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 1
|
3017
|
-
: lineItem.qty;
|
3018
|
-
var totalPrice = this.computeNetPrice(lineItem);
|
3019
|
-
var targetTotalPriceField = lineItem.properties.TargetTotalPriceField || 'TotalPrice__c';
|
3020
|
-
entity.configurationData[targetTotalPriceField] = entity.configurationData[targetTotalPriceField]
|
3021
|
-
? entity.configurationData[targetTotalPriceField] + totalPrice
|
3022
|
-
: totalPrice;
|
3023
|
-
var targetPriceField = lineItem.properties.TargetPriceField || 'SBQQ__ListPrice__c';
|
3024
|
-
var price = entity.Quantity != null ? entity.configurationData[targetTotalPriceField] / entity.Quantity || 0 : 0;
|
3025
|
-
var targetPriceValue = Number(entity.configurationData[targetPriceField]) || 0;
|
3026
|
-
entity.configurationData[targetPriceField] = targetPriceValue
|
3027
|
-
? (targetPriceValue + price).toFixed(2)
|
3028
|
-
: price.toFixed(2);
|
3029
|
-
entity.configurationAttributes = this.mapAttributesTo('Attribute', lineItem);
|
3030
|
-
entity.configurationData = Object.assign(Object.assign(Object.assign(Object.assign({}, entity.configurationData), this.mapAttributesTo('Field', lineItem)), this.mapAttributesTo('', lineItem)), { VeloceInstanceId__c: lineItem.id });
|
3031
|
-
};
|
3032
|
-
RemoteComponent.prototype.computeNetPrice = function (lineItem) {
|
3033
|
-
if (lineItem.properties.GroupCharges) {
|
3034
|
-
return this.sumNetPrice(lineItem.chargeGroupItems, this.getChargeNameSet(lineItem.properties.GroupCharges));
|
3035
|
-
}
|
3036
|
-
return this.sumNetPrice(lineItem.chargeItems, this.getChargeNameSet(lineItem.properties.Charges));
|
3037
|
-
};
|
3038
|
-
RemoteComponent.prototype.getChargeNameSet = function (property) {
|
3039
|
-
if (property && property.length > 0) {
|
3040
|
-
return new Set(property.split(','));
|
3041
|
-
}
|
3042
|
-
return new Set();
|
3043
|
-
};
|
3044
|
-
RemoteComponent.prototype.sumNetPrice = function (chargeItems, charges) {
|
3045
|
-
var e_4, _f;
|
3046
|
-
var _a;
|
3047
|
-
var netPrice = 0;
|
3048
|
-
try {
|
3049
|
-
for (var chargeItems_1 = __values(chargeItems), chargeItems_1_1 = chargeItems_1.next(); !chargeItems_1_1.done; chargeItems_1_1 = chargeItems_1.next()) {
|
3050
|
-
var chargeItem = chargeItems_1_1.value;
|
3051
|
-
if (!charges || charges.has(chargeItem.chargeType)) {
|
3052
|
-
netPrice += (_a = chargeItem.netPrice) !== null && _a !== void 0 ? _a : 0;
|
3053
|
-
}
|
3054
|
-
}
|
3055
|
-
}
|
3056
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
3057
|
-
finally {
|
3058
|
-
try {
|
3059
|
-
if (chargeItems_1_1 && !chargeItems_1_1.done && (_f = chargeItems_1.return)) _f.call(chargeItems_1);
|
3060
|
-
}
|
3061
|
-
finally { if (e_4) throw e_4.error; }
|
3062
|
-
}
|
3063
|
-
return netPrice;
|
3064
|
-
};
|
3065
|
-
RemoteComponent.prototype.mapAttributesTo = function (target, lineItem) {
|
3066
|
-
var _a;
|
3067
|
-
var result = {};
|
3068
|
-
var component = (_a = this.runtimeService.runtimeModel) === null || _a === void 0 ? void 0 : _a.components.get(lineItem.type);
|
3069
|
-
if (!component) {
|
3070
|
-
return result;
|
3071
|
-
}
|
3072
|
-
var propertyName = 'mapTo' + target;
|
3073
|
-
component.attributes
|
3074
|
-
.filter(function (a) { return a.properties && a.properties[propertyName]; })
|
3075
|
-
.forEach(function (mapping) {
|
3076
|
-
var attribute = lineItem.attributes.find(function (a) { return a.name === mapping.name; });
|
3077
|
-
if (attribute) {
|
3078
|
-
new Set(mapping.properties[propertyName].split(',')).forEach(function (k) { return (result[k] = attribute.value); });
|
3079
|
-
}
|
3080
|
-
});
|
3081
|
-
return result;
|
3082
|
-
};
|
3083
|
-
RemoteComponent.prototype.getOptionConfigurations = function (product) {
|
3084
|
-
var _a;
|
3085
|
-
var optionConfigurations = {};
|
3086
|
-
var requestOptionConfigurations = (_a = product.optionConfigurations) !== null && _a !== void 0 ? _a : {};
|
3087
|
-
Object.keys(requestOptionConfigurations).forEach(function (k) {
|
3088
|
-
var _a;
|
3089
|
-
optionConfigurations[k] = ((_a = requestOptionConfigurations[k]) !== null && _a !== void 0 ? _a : []).map(function (opt) {
|
3090
|
-
return Object.assign(Object.assign({}, opt), { selected: false });
|
3091
|
-
});
|
3092
|
-
});
|
3093
|
-
return optionConfigurations;
|
3094
|
-
};
|
3095
|
-
return RemoteComponent;
|
3096
|
-
}());
|
3097
|
-
RemoteComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RemoteComponent, deps: [{ token: i1__namespace$1.ContextService }, { token: i1__namespace$1.QuoteDraftService }, { token: i2__namespace.QuoteApiService }, { token: i1__namespace$1.ConfigurationRuntimeService }, { token: i1__namespace$1.ConfigurationService }, { token: i2__namespace$1.MessageService }, { token: i4__namespace.IntegrationState }, { token: i5__namespace$1.Location }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
3098
|
-
RemoteComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RemoteComponent, selector: "vl-flow-remote", ngImport: i0__namespace, 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: [""], components: [{ type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4__namespace.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "config"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
3099
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RemoteComponent, decorators: [{
|
3100
|
-
type: i0.Component,
|
3101
|
-
args: [{
|
3102
|
-
selector: 'vl-flow-remote',
|
3103
|
-
templateUrl: './remote.component.html',
|
3104
|
-
styleUrls: ['./remote.component.scss'],
|
3105
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
3106
|
-
}]
|
3107
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.ContextService }, { type: i1__namespace$1.QuoteDraftService }, { type: i2__namespace.QuoteApiService }, { type: i1__namespace$1.ConfigurationRuntimeService }, { type: i1__namespace$1.ConfigurationService }, { type: i2__namespace$1.MessageService }, { type: i4__namespace.IntegrationState }, { type: i5__namespace$1.Location }]; } });
|
3108
|
-
|
3109
|
-
var RemoteModule = /** @class */ (function () {
|
3110
|
-
function RemoteModule() {
|
3111
|
-
}
|
3112
|
-
return RemoteModule;
|
3113
|
-
}());
|
3114
|
-
RemoteModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RemoteModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
3115
|
-
RemoteModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RemoteModule, declarations: [RemoteComponent], imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule], exports: [RemoteComponent] });
|
3116
|
-
RemoteModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RemoteModule, imports: [[i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule]] });
|
3117
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RemoteModule, decorators: [{
|
3118
|
-
type: i0.NgModule,
|
3119
|
-
args: [{
|
3120
|
-
declarations: [RemoteComponent],
|
3121
|
-
imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule],
|
3122
|
-
exports: [RemoteComponent],
|
3123
|
-
}]
|
3124
|
-
}] });
|
3125
|
-
|
3126
|
-
var ShoppingCartComponent = /** @class */ (function () {
|
3127
|
-
function ShoppingCartComponent(templatesApi, contextService, cdr, toastService, customizationService) {
|
3128
|
-
var _a;
|
3129
|
-
this.templatesApi = templatesApi;
|
3130
|
-
this.contextService = contextService;
|
3131
|
-
this.cdr = cdr;
|
3132
|
-
this.toastService = toastService;
|
3133
|
-
this.customizationService = customizationService;
|
3134
|
-
this.uiDefinition = undefined;
|
3135
|
-
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
3136
|
-
this.templateApiName = '';
|
3137
|
-
this.destroyed$ = new rxjs.Subject();
|
3138
|
-
this.templateApiName = (_a = this.contextService.resolve().properties.cartTemplateApiName) !== null && _a !== void 0 ? _a : '';
|
3139
|
-
}
|
3140
|
-
ShoppingCartComponent.prototype.ngOnInit = function () {
|
3141
|
-
var _this = this;
|
3142
|
-
this.generateUIDefinition$()
|
3143
|
-
.pipe(rxjs.tap(function (uiDef) {
|
3144
|
-
if (!uiDef) {
|
3145
|
-
throw new Error("Component with name '" + _this.templateApiName + "' not found.");
|
3146
|
-
}
|
3147
|
-
_this.uiDefinition = uiDef;
|
3148
|
-
_this.state$.next({ loading: false, failure: false });
|
3149
|
-
}), rxjs.catchError(function (err) {
|
3150
|
-
var _a;
|
3151
|
-
var message = 'Failed to resolve Shopping cart component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
3152
|
-
_this.toastService.add({ severity: i3.ToastType.error, summary: message, sticky: true });
|
3153
|
-
_this.uiDefinition = undefined;
|
3154
|
-
_this.state$.next({ loading: false, failure: true });
|
3155
|
-
return rxjs.of();
|
3156
|
-
}), rxjs.takeUntil(this.destroyed$))
|
3157
|
-
.subscribe(function () { return _this.cdr.detectChanges(); });
|
3158
|
-
};
|
3159
|
-
ShoppingCartComponent.prototype.ngOnDestroy = function () {
|
3160
|
-
this.destroyed$.next();
|
3161
|
-
this.destroyed$.complete();
|
3162
|
-
};
|
3163
|
-
ShoppingCartComponent.prototype.getTemplateRootComponent$ = function (template) {
|
3164
|
-
return this.templatesApi
|
3165
|
-
.fetchComponents$(template.id)
|
3166
|
-
.pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === core.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
|
3167
|
-
};
|
3168
|
-
ShoppingCartComponent.prototype.getLocalShoppingCartComponentMeta$ = function () {
|
3169
|
-
var _a, _b;
|
3170
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getShoppingCartComponent)) {
|
3171
|
-
return rxjs.of(undefined);
|
3172
|
-
}
|
3173
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getShoppingCartComponent(this.templateApiName).pipe(rxjs.map(function (component) {
|
3174
|
-
if (!component) {
|
3175
|
-
return;
|
3176
|
-
}
|
3177
|
-
return {
|
3178
|
-
html: component.html,
|
3179
|
-
css: component.css,
|
3180
|
-
js: component.js,
|
3181
|
-
json: component.json,
|
3182
|
-
};
|
3183
|
-
}));
|
3184
|
-
};
|
3185
|
-
ShoppingCartComponent.prototype.getShoppingCartComponentMeta$ = function () {
|
3186
|
-
var _this = this;
|
3187
|
-
return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
|
3188
|
-
};
|
3189
|
-
ShoppingCartComponent.prototype.generateUIDefinition$ = function () {
|
3190
|
-
var _this = this;
|
3191
|
-
return rxjs.of(undefined).pipe(rxjs.tap(function () {
|
3192
|
-
if (!_this.templateApiName) {
|
3193
|
-
throw new Error("Flow Query parameter 'cartTemplateApiName' is missing.");
|
3194
|
-
}
|
3195
|
-
}), rxjs.switchMap(function () { return _this.getLocalShoppingCartComponentMeta$(); }), rxjs.switchMap(function (meta) { return (meta ? rxjs.of(meta) : _this.getShoppingCartComponentMeta$()); }), rxjs.map(function (meta) {
|
3196
|
-
if (!meta) {
|
3197
|
-
return;
|
3198
|
-
}
|
3199
|
-
var uiDef = {
|
3200
|
-
name: '',
|
3201
|
-
createdTimestamp: 0,
|
3202
|
-
primary: true,
|
3203
|
-
type: 'DEFAULT',
|
3204
|
-
version: 2,
|
3205
|
-
children: [
|
3206
|
-
{
|
3207
|
-
children: [],
|
3208
|
-
template: meta.html && btoa(meta.html),
|
3209
|
-
script: meta.js && btoa(meta.js),
|
3210
|
-
styles: meta.css && btoa(meta.css),
|
3211
|
-
},
|
3212
|
-
],
|
3213
|
-
};
|
3214
|
-
return uiDef;
|
3215
|
-
}));
|
3216
|
-
};
|
3217
|
-
return ShoppingCartComponent;
|
3218
|
-
}());
|
3219
|
-
ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i2__namespace.UITemplatesApiService }, { token: i1__namespace$1.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
3220
|
-
ShoppingCartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0__namespace, 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: [""], components: [{ type: i3__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i4__namespace.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "config"] }], directives: [{ type: i5__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace$1.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
3221
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartComponent, decorators: [{
|
3222
|
-
type: i0.Component,
|
3223
|
-
args: [{
|
3224
|
-
selector: 'vl-flow-shopping-cart',
|
3225
|
-
templateUrl: './shopping-cart.component.html',
|
3226
|
-
styleUrls: ['./shopping-cart.component.scss'],
|
3227
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
3228
|
-
}]
|
3229
|
-
}], ctorParameters: function () {
|
3230
|
-
return [{ type: i2__namespace.UITemplatesApiService }, { type: i1__namespace$1.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace.ToastService }, { type: undefined, decorators: [{
|
3231
|
-
type: i0.Optional
|
3232
|
-
}, {
|
3233
|
-
type: i0.Inject,
|
3234
|
-
args: [FLOW_CUSTOMIZATION]
|
3235
|
-
}] }];
|
3236
|
-
} });
|
3237
|
-
|
3238
|
-
var ShoppingCartModule = /** @class */ (function () {
|
3239
|
-
function ShoppingCartModule() {
|
3240
|
-
}
|
3241
|
-
return ShoppingCartModule;
|
3242
|
-
}());
|
3243
|
-
ShoppingCartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
3244
|
-
ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule], exports: [ShoppingCartComponent] });
|
3245
|
-
ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule]] });
|
3246
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartModule, decorators: [{
|
3247
|
-
type: i0.NgModule,
|
3248
|
-
args: [{
|
3249
|
-
declarations: [ShoppingCartComponent],
|
3250
|
-
imports: [i5$1.CommonModule, i4.PreviewModule, i3.LoaderModule],
|
3251
|
-
exports: [ShoppingCartComponent],
|
3252
|
-
}]
|
3253
|
-
}] });
|
3254
|
-
|
3255
|
-
var FlowResolver = /** @class */ (function () {
|
3256
|
-
function FlowResolver(router, flowsApiService, routerService, contextService) {
|
3257
|
-
this.router = router;
|
3258
|
-
this.flowsApiService = flowsApiService;
|
3259
|
-
this.routerService = routerService;
|
3260
|
-
this.contextService = contextService;
|
3261
|
-
}
|
3262
|
-
FlowResolver.prototype.handleError = function (route, message, queryParams) {
|
3263
|
-
var parentUrl = this.routerService.getFlowRootPath(route);
|
3264
|
-
return this.router.navigate([parentUrl, '404'], {
|
3265
|
-
queryParams: queryParams,
|
3266
|
-
state: {
|
3267
|
-
message: message,
|
3268
|
-
},
|
3269
|
-
});
|
3270
|
-
};
|
3271
|
-
FlowResolver.prototype.resolve = function (route) {
|
3272
|
-
var _this = this;
|
3273
|
-
var queryParams = route.queryParams;
|
3274
|
-
var flowId = queryParams.flowId;
|
3275
|
-
if (!flowId) {
|
3276
|
-
return this.handleError(route);
|
3277
|
-
}
|
3278
|
-
return this.flowsApiService.getFlow(flowId).pipe(operators.map(function (flow) {
|
3279
|
-
if (!flow) {
|
3280
|
-
return _this.handleError(route, "Flow with flowId=" + flowId + " is not defined");
|
3281
|
-
}
|
3282
|
-
var properties = flow.properties;
|
3283
|
-
var flowQueryParams = properties.queryParams, entryPath = properties.entryPath;
|
3284
|
-
var mergedParams = Object.assign(Object.assign(Object.assign({}, queryParams), flowQueryParams), getDefaultProperties({ flowParams: properties }));
|
3285
|
-
var contextProperties = Object.entries(mergedParams).reduce(function (trunk, _a) {
|
3286
|
-
var _b;
|
3287
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
3288
|
-
return (Object.assign(Object.assign({}, trunk), (_b = {}, _b[key] = String(value), _b)));
|
3289
|
-
}, {});
|
3290
|
-
_this.contextService.update({ properties: contextProperties });
|
3291
|
-
var parentUrl = _this.routerService.getFlowRootPath(route);
|
3292
|
-
var entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
|
3293
|
-
.split('/')
|
3294
|
-
.filter(Boolean);
|
3295
|
-
return _this.router
|
3296
|
-
.navigate(__spreadArray([parentUrl], __read(entryUrl)), {
|
3297
|
-
queryParams: mergedParams,
|
3298
|
-
replaceUrl: true,
|
3299
|
-
})
|
3300
|
-
.catch(function (e) {
|
3301
|
-
var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
|
3302
|
-
return _this.handleError(route, message, mergedParams);
|
3303
|
-
});
|
3304
|
-
}));
|
3305
|
-
};
|
3306
|
-
return FlowResolver;
|
3307
|
-
}());
|
3308
|
-
FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace$2.Router }, { token: i2__namespace.FlowsApiService }, { token: FlowRouterService }, { token: i1__namespace$1.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
3309
|
-
FlowResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowResolver });
|
3310
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowResolver, decorators: [{
|
3311
|
-
type: i0.Injectable
|
3312
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.Router }, { type: i2__namespace.FlowsApiService }, { type: FlowRouterService }, { type: i1__namespace$1.ContextService }]; } });
|
3313
|
-
|
3314
|
-
var QuoteResolver = /** @class */ (function () {
|
3315
|
-
function QuoteResolver(router, quoteDraftService, routerService, contextService, flowConfiguration, integrationState) {
|
3316
|
-
this.router = router;
|
3317
|
-
this.quoteDraftService = quoteDraftService;
|
3318
|
-
this.routerService = routerService;
|
3319
|
-
this.contextService = contextService;
|
3320
|
-
this.flowConfiguration = flowConfiguration;
|
3321
|
-
this.integrationState = integrationState;
|
3322
|
-
}
|
3323
|
-
QuoteResolver.prototype.handleError = function (route, message) {
|
3324
|
-
var parentUrl = this.routerService.getFlowRootPath(route);
|
3325
|
-
return rxjs.from(this.router.navigate([parentUrl, '404'], { state: { message: message } }));
|
3326
|
-
};
|
3327
|
-
QuoteResolver.prototype.calculate$ = function () {
|
3328
|
-
var quoteDraft = this.quoteDraftService.quoteDraft;
|
3329
|
-
if (!this.quoteDraftService.isStandalone && quoteDraft && !this.accountHasNotAssets()) {
|
3330
|
-
return this.flowConfiguration.calculate$(quoteDraft);
|
3331
|
-
}
|
3332
|
-
return rxjs.of(undefined);
|
3333
|
-
};
|
3334
|
-
QuoteResolver.prototype.resolve = function (route) {
|
3335
|
-
var _this = this;
|
3336
|
-
var headerId = this.contextService.resolve().headerId;
|
3337
|
-
var quote = this.quoteDraftService.quoteDraft;
|
3338
|
-
if (quote && quote.quoteId === headerId) {
|
3339
|
-
return rxjs.of(true);
|
3340
|
-
}
|
3341
|
-
var queryParams = route.queryParams;
|
3342
|
-
return this.quoteDraftService.init(headerId, queryParams).pipe(rxjs.switchMap(function () { return _this.calculate$(); }), rxjs.tap(function () {
|
3343
|
-
if (!_this.quoteDraftService.isStandalone && queryParams.suppressInitialNavigation !== 'true') {
|
3344
|
-
if (_this.shouldNavigateToAssets()) {
|
3345
|
-
_this.changeNavigation('/assets', route);
|
3346
|
-
}
|
3347
|
-
else if (!_this.quoteDraftService.isInitialized && _this.quoteDraftService.hasProducts) {
|
3348
|
-
_this.changeNavigation('/cart', route);
|
3349
|
-
}
|
3350
|
-
}
|
3351
|
-
_this.initializeModifiedAssetsMap();
|
3352
|
-
_this.quoteDraftService.isInitialized = true;
|
3353
|
-
_this.quoteDraftService.hasUnsavedChanges = false;
|
3354
|
-
}), rxjs.catchError(function (e) {
|
3355
|
-
var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
|
3356
|
-
return _this.handleError(route, message);
|
3357
|
-
}));
|
3358
|
-
};
|
3359
|
-
QuoteResolver.prototype.changeNavigation = function (path, route) {
|
3360
|
-
var _this = this;
|
3361
|
-
var parentUrl = this.routerService.getFlowRootPath(route);
|
3362
|
-
this.router
|
3363
|
-
.navigate([parentUrl + path], {
|
3364
|
-
queryParams: route.queryParams,
|
3365
|
-
replaceUrl: true,
|
3366
|
-
})
|
3367
|
-
.catch(function (e) {
|
3368
|
-
var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
|
3369
|
-
return _this.handleError(route, message);
|
3370
|
-
});
|
3371
|
-
};
|
3372
|
-
QuoteResolver.prototype.shouldNavigateToAssets = function () {
|
3373
|
-
var _a, _b;
|
3374
|
-
if (this.contextService.mode === core.ConfigurationContextMode.ACCOUNT) {
|
3375
|
-
return true;
|
3376
|
-
}
|
3377
|
-
return (_b = (_a = this.quoteDraftService.quoteDraft) === null || _a === void 0 ? void 0 : _a.currentState.some(function (li) { return !!li.assetId; })) !== null && _b !== void 0 ? _b : false;
|
3378
|
-
};
|
3379
|
-
QuoteResolver.prototype.accountHasNotAssets = function () {
|
3380
|
-
return this.contextService.mode === core.ConfigurationContextMode.ACCOUNT && !this.quoteDraftService.hasProducts;
|
3381
|
-
};
|
3382
|
-
QuoteResolver.prototype.initializeModifiedAssetsMap = function () {
|
3383
|
-
this.integrationState.patchState({
|
3384
|
-
modifiedAssets: i1$1.generateModifiedAssetsMap(this.quoteDraftService.currentState),
|
3385
|
-
});
|
3386
|
-
};
|
3387
|
-
return QuoteResolver;
|
3388
|
-
}());
|
3389
|
-
QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace$2.Router }, { token: i1__namespace$1.QuoteDraftService }, { token: FlowRouterService }, { token: i1__namespace$1.ContextService }, { token: i1__namespace$1.FlowConfigurationService }, { token: i4__namespace.IntegrationState }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
3390
|
-
QuoteResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: QuoteResolver });
|
3391
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: QuoteResolver, decorators: [{
|
3392
|
-
type: i0.Injectable
|
3393
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.Router }, { type: i1__namespace$1.QuoteDraftService }, { type: FlowRouterService }, { type: i1__namespace$1.ContextService }, { type: i1__namespace$1.FlowConfigurationService }, { type: i4__namespace.IntegrationState }]; } });
|
3394
|
-
|
3395
|
-
var rootRoute = {
|
3396
|
-
id: VELOCE_FLOW_ROOT_ROUTE,
|
3397
|
-
path: '',
|
3398
|
-
component: FlowComponent,
|
3399
|
-
canActivate: [RootGuard],
|
3400
|
-
canDeactivate: [RootGuard],
|
3401
|
-
children: [
|
3402
|
-
{
|
3403
|
-
path: 'flows',
|
3404
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
3405
|
-
resolve: { quote: FlowResolver },
|
3406
|
-
canActivate: [ContextGuard],
|
3407
|
-
children: [],
|
3408
|
-
},
|
3409
|
-
{
|
3410
|
-
path: 'legacy',
|
3411
|
-
children: [
|
3412
|
-
{
|
3413
|
-
path: 'product',
|
3414
|
-
component: LegacyProductComponent,
|
3415
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
3416
|
-
resolve: { quote: QuoteResolver },
|
3417
|
-
canActivate: [ContextGuard],
|
3418
|
-
},
|
3419
|
-
],
|
3420
|
-
},
|
3421
|
-
{
|
3422
|
-
path: 'product',
|
3423
|
-
component: ProductComponent,
|
3424
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
3425
|
-
resolve: { quote: QuoteResolver },
|
3426
|
-
canActivate: [ContextGuard],
|
3427
|
-
canDeactivate: [ProductUnloadGuard],
|
3428
|
-
data: { showHeader: true },
|
3429
|
-
},
|
3430
|
-
{
|
3431
|
-
path: 'cart',
|
3432
|
-
component: ShoppingCartComponent,
|
3433
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
3434
|
-
resolve: { quote: QuoteResolver },
|
3435
|
-
canActivate: [ContextGuard],
|
3436
|
-
data: { showHeader: true },
|
3437
|
-
},
|
3438
|
-
{
|
3439
|
-
path: 'catalog',
|
3440
|
-
component: CatalogComponent,
|
3441
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
3442
|
-
resolve: { quote: QuoteResolver },
|
3443
|
-
canActivate: [ContextGuard],
|
3444
|
-
data: { showHeader: true },
|
3445
|
-
},
|
3446
|
-
{
|
3447
|
-
path: 'assets',
|
3448
|
-
component: AssetsComponent,
|
3449
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
3450
|
-
resolve: { quote: QuoteResolver },
|
3451
|
-
canActivate: [ContextGuard],
|
3452
|
-
data: { showHeader: true },
|
3453
|
-
},
|
3454
|
-
{
|
3455
|
-
path: 'empty',
|
3456
|
-
component: EmptyAccountComponent,
|
3457
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
3458
|
-
resolve: { quote: QuoteResolver },
|
3459
|
-
canActivate: [ContextGuard],
|
3460
|
-
data: { showHeader: true },
|
3461
|
-
},
|
3462
|
-
{
|
3463
|
-
path: 'remote',
|
3464
|
-
component: RemoteComponent,
|
3465
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
3466
|
-
resolve: { quote: QuoteResolver },
|
3467
|
-
canActivate: [ContextGuard],
|
3468
|
-
},
|
3469
|
-
{
|
3470
|
-
path: 'debug',
|
3471
|
-
loadChildren: function () { return DebugModule; },
|
3472
|
-
},
|
3473
|
-
{
|
3474
|
-
path: '404',
|
3475
|
-
loadChildren: function () { return RecordNotFoundModule; },
|
3476
|
-
},
|
3477
|
-
],
|
3478
|
-
};
|
3479
|
-
var FlowRoutingModule = /** @class */ (function () {
|
3480
|
-
function FlowRoutingModule() {
|
3481
|
-
}
|
3482
|
-
return FlowRoutingModule;
|
3483
|
-
}());
|
3484
|
-
FlowRoutingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowRoutingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
3485
|
-
FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace$2.RouterModule, ProductModule,
|
3486
|
-
LegacyProductModule,
|
3487
|
-
ShoppingCartModule,
|
3488
|
-
CatalogModule,
|
3489
|
-
AssetsModule,
|
3490
|
-
RemoteModule,
|
3491
|
-
EmptyAccountModule], exports: [i1$2.RouterModule] });
|
3492
|
-
FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver], imports: [[
|
3493
|
-
i1$2.RouterModule.forChild([rootRoute]),
|
3494
|
-
ProductModule,
|
3495
|
-
LegacyProductModule,
|
3496
|
-
ShoppingCartModule,
|
3497
|
-
CatalogModule,
|
3498
|
-
AssetsModule,
|
3499
|
-
RemoteModule,
|
3500
|
-
EmptyAccountModule,
|
3501
|
-
], i1$2.RouterModule] });
|
3502
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowRoutingModule, decorators: [{
|
3503
|
-
type: i0.NgModule,
|
3504
|
-
args: [{
|
3505
|
-
imports: [
|
3506
|
-
i1$2.RouterModule.forChild([rootRoute]),
|
3507
|
-
ProductModule,
|
3508
|
-
LegacyProductModule,
|
3509
|
-
ShoppingCartModule,
|
3510
|
-
CatalogModule,
|
3511
|
-
AssetsModule,
|
3512
|
-
RemoteModule,
|
3513
|
-
EmptyAccountModule,
|
3514
|
-
],
|
3515
|
-
exports: [i1$2.RouterModule],
|
3516
|
-
providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver],
|
3517
|
-
}]
|
3518
|
-
}] });
|
3519
|
-
|
3520
|
-
var FlowModule = /** @class */ (function () {
|
3521
|
-
function FlowModule() {
|
3522
|
-
}
|
3523
|
-
return FlowModule;
|
3524
|
-
}());
|
3525
|
-
FlowModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
3526
|
-
FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i5$1.CommonModule,
|
3527
|
-
FlowRoutingModule,
|
3528
|
-
i2.ApiModule,
|
3529
|
-
i4.LauncherModule,
|
3530
|
-
i3.LoaderModule,
|
3531
|
-
FlowHeaderModule,
|
3532
|
-
FlowDialogModule,
|
3533
|
-
i1$1.SdkCoreModule,
|
3534
|
-
DocGenModule,
|
3535
|
-
i3.LetDirectiveModule] });
|
3536
|
-
FlowModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowModule, providers: [FlowService, FlowDialogService, FlowDocGenService], imports: [[
|
3537
|
-
i5$1.CommonModule,
|
3538
|
-
FlowRoutingModule,
|
3539
|
-
i2.ApiModule,
|
3540
|
-
i4.LauncherModule,
|
3541
|
-
i3.LoaderModule,
|
3542
|
-
FlowHeaderModule,
|
3543
|
-
FlowDialogModule,
|
3544
|
-
i1$1.SdkCoreModule,
|
3545
|
-
DocGenModule,
|
3546
|
-
i3.LetDirectiveModule,
|
3547
|
-
]] });
|
3548
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FlowModule, decorators: [{
|
3549
|
-
type: i0.NgModule,
|
3550
|
-
args: [{
|
3551
|
-
declarations: [FlowComponent],
|
3552
|
-
imports: [
|
3553
|
-
i5$1.CommonModule,
|
3554
|
-
FlowRoutingModule,
|
3555
|
-
i2.ApiModule,
|
3556
|
-
i4.LauncherModule,
|
3557
|
-
i3.LoaderModule,
|
3558
|
-
FlowHeaderModule,
|
3559
|
-
FlowDialogModule,
|
3560
|
-
i1$1.SdkCoreModule,
|
3561
|
-
DocGenModule,
|
3562
|
-
i3.LetDirectiveModule,
|
3563
|
-
],
|
3564
|
-
providers: [FlowService, FlowDialogService, FlowDocGenService],
|
3565
|
-
}]
|
3566
|
-
}] });
|
3567
|
-
|
3568
|
-
/**
|
3569
|
-
* Generated bundle index. Do not edit.
|
3570
|
-
*/
|
3571
|
-
|
3572
|
-
exports.ContextGuard = ContextGuard;
|
3573
|
-
exports.FLOW_CUSTOMIZATION = FLOW_CUSTOMIZATION;
|
3574
|
-
exports.FlowModule = FlowModule;
|
3575
|
-
exports.FlowService = FlowService;
|
3576
|
-
exports.VELOCE_FLOW_ROOT_ROUTE = VELOCE_FLOW_ROOT_ROUTE;
|
3577
|
-
exports.getDefaultProperties = getDefaultProperties;
|
3578
|
-
exports.getFlowObjectIdPropertyName = getFlowObjectIdPropertyName;
|
3579
|
-
|
3580
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
3581
|
-
|
3582
|
-
}));
|
3583
|
-
//# sourceMappingURL=veloceapps-sdk.umd.js.map
|