@veloceapps/sdk 7.0.0-9 → 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,4415 +0,0 @@
|
|
1
|
-
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@veloceapps/core'), require('@veloceapps/sdk/core'), require('rxjs'), require('lodash'), require('rxjs/operators'), require('@veloceapps/components'), require('@veloceapps/api'), require('primeng/dynamicdialog'), require('primeng/api'), require('@angular/cdk-experimental/scrolling'), require('@angular/cdk/scrolling'), require('@angular/common'), require('@angular/compiler'), require('@veloceapps/elements'), require('ngx-bootstrap/popover'), require('@angular/cdk/portal'), require('@angular/cdk/overlay'), require('moment'), require('@angular/common/http')) :
|
3
|
-
typeof define === 'function' && define.amd ? define('@veloceapps/sdk/runtime', ['exports', '@angular/core', '@angular/forms', '@veloceapps/core', '@veloceapps/sdk/core', 'rxjs', 'lodash', 'rxjs/operators', '@veloceapps/components', '@veloceapps/api', 'primeng/dynamicdialog', 'primeng/api', '@angular/cdk-experimental/scrolling', '@angular/cdk/scrolling', '@angular/common', '@angular/compiler', '@veloceapps/elements', 'ngx-bootstrap/popover', '@angular/cdk/portal', '@angular/cdk/overlay', 'moment', '@angular/common/http'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloceapps = global.veloceapps || {}, global.veloceapps.sdk = global.veloceapps.sdk || {}, global.veloceapps.sdk.runtime = {}), global.ng.core, global.ng.forms, global["@veloceapps/core"], global.veloceapps.sdk.core, global.rxjs, global.lodash, global.rxjs.operators, global["@veloceapps/components"], global["@veloceapps/api"], global["primeng/dynamicdialog"], global["primeng/api"], global.ng.cdkExperimental.scrolling, global.ng.cdk.scrolling, global.ng.common, global.ng.compiler, global["@veloceapps/elements"], global["ngx-bootstrap/popover"], global.ng.cdk.portal, global.ng.cdk.overlay, global.moment, global.ng.common.http));
|
5
|
-
})(this, (function (exports, i0, i4, i7, i2, rxjs, _, rxjsOperators, i8, i1, i3, i3$1, scrolling$1, scrolling, i5, compiler, elements, i5$1, portal, i1$1, moment, http) { '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 i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
26
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
27
|
-
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
28
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
29
|
-
var rxjs__namespace = /*#__PURE__*/_interopNamespace(rxjs);
|
30
|
-
var ___namespace = /*#__PURE__*/_interopNamespace(_);
|
31
|
-
var rxjsOperators__namespace = /*#__PURE__*/_interopNamespace(rxjsOperators);
|
32
|
-
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
33
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
34
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
35
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
36
|
-
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
37
|
-
var i5__namespace$1 = /*#__PURE__*/_interopNamespace(i5$1);
|
38
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
39
|
-
var moment__namespace = /*#__PURE__*/_interopNamespace(moment);
|
40
|
-
|
41
|
-
var CollapsibleStateService = /** @class */ (function () {
|
42
|
-
function CollapsibleStateService() {
|
43
|
-
this._collapsedSections = {}; // By Line Item Id
|
44
|
-
this.collapseSectionSubject = new rxjs.Subject();
|
45
|
-
this.collapseSectionEvent = this.collapseSectionSubject.asObservable();
|
46
|
-
}
|
47
|
-
CollapsibleStateService.prototype.toggleCollapse = function (sectionId, silently) {
|
48
|
-
this._collapsedSections[sectionId] = !this.isCollapsedSection(sectionId);
|
49
|
-
if (!silently) {
|
50
|
-
this.collapseSectionSubject.next([sectionId, this._collapsedSections[sectionId]]);
|
51
|
-
}
|
52
|
-
};
|
53
|
-
CollapsibleStateService.prototype.collapse = function (sectionId) {
|
54
|
-
this._collapsedSections[sectionId] = true;
|
55
|
-
};
|
56
|
-
CollapsibleStateService.prototype.expand = function (sectionId) {
|
57
|
-
this._collapsedSections[sectionId] = false;
|
58
|
-
};
|
59
|
-
CollapsibleStateService.prototype.clearState = function (sectionId) {
|
60
|
-
delete this._collapsedSections[sectionId];
|
61
|
-
};
|
62
|
-
CollapsibleStateService.prototype.isCollapsedSection = function (sectionId) {
|
63
|
-
return this._collapsedSections[sectionId];
|
64
|
-
};
|
65
|
-
return CollapsibleStateService;
|
66
|
-
}());
|
67
|
-
CollapsibleStateService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CollapsibleStateService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
68
|
-
CollapsibleStateService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CollapsibleStateService });
|
69
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CollapsibleStateService, decorators: [{
|
70
|
-
type: i0.Injectable
|
71
|
-
}], ctorParameters: function () { return []; } });
|
72
|
-
|
73
|
-
var ScriptRegistry = /** @class */ (function () {
|
74
|
-
function ScriptRegistry() {
|
75
|
-
this.store = new Map();
|
76
|
-
this.scope = new Map();
|
77
|
-
}
|
78
|
-
ScriptRegistry.prototype.exists = function (scriptId) {
|
79
|
-
var sectionIds = this.store.get(scriptId);
|
80
|
-
return !i7.EntityUtil.isEmpty(sectionIds);
|
81
|
-
};
|
82
|
-
ScriptRegistry.prototype.isRegistered = function (scriptId, sectionId) {
|
83
|
-
var sectionIds = this.store.get(scriptId);
|
84
|
-
return !i7.EntityUtil.isEmpty(sectionIds) && (sectionIds === null || sectionIds === void 0 ? void 0 : sectionIds.findIndex(function (entryId) { return entryId === sectionId; })) !== -1;
|
85
|
-
};
|
86
|
-
ScriptRegistry.prototype.doRegister = function (scriptId, sectionId) {
|
87
|
-
var sectionIds = this.store.get(scriptId);
|
88
|
-
if (!i7.EntityUtil.isPresent(sectionIds)) {
|
89
|
-
this.store.set(scriptId, [sectionId]);
|
90
|
-
}
|
91
|
-
else if ((sectionIds === null || sectionIds === void 0 ? void 0 : sectionIds.findIndex(function (entryId) { return entryId === sectionId; })) === -1) {
|
92
|
-
sectionIds.push(sectionId);
|
93
|
-
}
|
94
|
-
};
|
95
|
-
ScriptRegistry.prototype.unRegister = function (scriptId, sectionId) {
|
96
|
-
var sectionIds = this.store.get(scriptId);
|
97
|
-
if (!sectionIds) {
|
98
|
-
return;
|
99
|
-
}
|
100
|
-
var index = sectionIds === null || sectionIds === void 0 ? void 0 : sectionIds.findIndex(function (entryId) { return entryId === sectionId; });
|
101
|
-
if (index !== -1) {
|
102
|
-
sectionIds.splice(index, 1);
|
103
|
-
// Remove orphan
|
104
|
-
if (sectionIds.length < 1) {
|
105
|
-
this.store.delete(scriptId);
|
106
|
-
}
|
107
|
-
}
|
108
|
-
};
|
109
|
-
ScriptRegistry.prototype.hasGlobalForScript = function (globalId) {
|
110
|
-
return this.scope.has(globalId);
|
111
|
-
};
|
112
|
-
ScriptRegistry.prototype.getGlobalForScript = function (globalId) {
|
113
|
-
return this.scope.get(globalId);
|
114
|
-
};
|
115
|
-
ScriptRegistry.prototype.setGlobalForScript = function (globalId, globalVariable) {
|
116
|
-
this.scope.set(globalId, globalVariable);
|
117
|
-
};
|
118
|
-
ScriptRegistry.prototype.removeGlobalForScript = function (globalId) {
|
119
|
-
this.scope.delete(globalId);
|
120
|
-
};
|
121
|
-
return ScriptRegistry;
|
122
|
-
}());
|
123
|
-
|
124
|
-
// TODO ALE RENAME TO SESSION SCOPE
|
125
|
-
var FormScopeService = /** @class */ (function () {
|
126
|
-
function FormScopeService() {
|
127
|
-
this.scriptRegistry = new ScriptRegistry();
|
128
|
-
this.scriptSessionScope = {};
|
129
|
-
this.formSubmitSubject = new rxjs.Subject();
|
130
|
-
this._form = new i4.FormGroup({});
|
131
|
-
this.formSubmitEvent = this.formSubmitSubject.asObservable();
|
132
|
-
}
|
133
|
-
Object.defineProperty(FormScopeService.prototype, "form", {
|
134
|
-
get: function () {
|
135
|
-
return this._form;
|
136
|
-
},
|
137
|
-
set: function (value) {
|
138
|
-
this._form = value;
|
139
|
-
},
|
140
|
-
enumerable: false,
|
141
|
-
configurable: true
|
142
|
-
});
|
143
|
-
FormScopeService.prototype.publishFormUpdate = function (value) {
|
144
|
-
this.formSubmitSubject.next(value);
|
145
|
-
};
|
146
|
-
return FormScopeService;
|
147
|
-
}());
|
148
|
-
FormScopeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FormScopeService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
149
|
-
FormScopeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FormScopeService });
|
150
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FormScopeService, decorators: [{
|
151
|
-
type: i0.Injectable
|
152
|
-
}], ctorParameters: function () { return []; } });
|
153
|
-
|
154
|
-
var BoundDataType;
|
155
|
-
(function (BoundDataType) {
|
156
|
-
BoundDataType[BoundDataType["TYPE"] = 0] = "TYPE";
|
157
|
-
BoundDataType[BoundDataType["ATTRIBUTE"] = 1] = "ATTRIBUTE";
|
158
|
-
BoundDataType[BoundDataType["PORT"] = 2] = "PORT";
|
159
|
-
})(BoundDataType || (BoundDataType = {}));
|
160
|
-
|
161
|
-
/******************************************************************************
|
162
|
-
Copyright (c) Microsoft Corporation.
|
163
|
-
|
164
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
165
|
-
purpose with or without fee is hereby granted.
|
166
|
-
|
167
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
168
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
169
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
170
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
171
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
172
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
173
|
-
PERFORMANCE OF THIS SOFTWARE.
|
174
|
-
***************************************************************************** */
|
175
|
-
/* global Reflect, Promise */
|
176
|
-
var extendStatics = function (d, b) {
|
177
|
-
extendStatics = Object.setPrototypeOf ||
|
178
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
179
|
-
function (d, b) { for (var p in b)
|
180
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
181
|
-
d[p] = b[p]; };
|
182
|
-
return extendStatics(d, b);
|
183
|
-
};
|
184
|
-
function __extends(d, b) {
|
185
|
-
if (typeof b !== "function" && b !== null)
|
186
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
187
|
-
extendStatics(d, b);
|
188
|
-
function __() { this.constructor = d; }
|
189
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
190
|
-
}
|
191
|
-
var __assign = function () {
|
192
|
-
__assign = Object.assign || function __assign(t) {
|
193
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
194
|
-
s = arguments[i];
|
195
|
-
for (var p in s)
|
196
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
197
|
-
t[p] = s[p];
|
198
|
-
}
|
199
|
-
return t;
|
200
|
-
};
|
201
|
-
return __assign.apply(this, arguments);
|
202
|
-
};
|
203
|
-
function __rest(s, e) {
|
204
|
-
var t = {};
|
205
|
-
for (var p in s)
|
206
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
207
|
-
t[p] = s[p];
|
208
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
209
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
210
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
211
|
-
t[p[i]] = s[p[i]];
|
212
|
-
}
|
213
|
-
return t;
|
214
|
-
}
|
215
|
-
function __decorate(decorators, target, key, desc) {
|
216
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
217
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
218
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
219
|
-
else
|
220
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
221
|
-
if (d = decorators[i])
|
222
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
223
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
224
|
-
}
|
225
|
-
function __param(paramIndex, decorator) {
|
226
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
227
|
-
}
|
228
|
-
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
229
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
230
|
-
throw new TypeError("Function expected"); return f; }
|
231
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
232
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
233
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
234
|
-
var _, done = false;
|
235
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
236
|
-
var context = {};
|
237
|
-
for (var p in contextIn)
|
238
|
-
context[p] = p === "access" ? {} : contextIn[p];
|
239
|
-
for (var p in contextIn.access)
|
240
|
-
context.access[p] = contextIn.access[p];
|
241
|
-
context.addInitializer = function (f) { if (done)
|
242
|
-
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
243
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
244
|
-
if (kind === "accessor") {
|
245
|
-
if (result === void 0)
|
246
|
-
continue;
|
247
|
-
if (result === null || typeof result !== "object")
|
248
|
-
throw new TypeError("Object expected");
|
249
|
-
if (_ = accept(result.get))
|
250
|
-
descriptor.get = _;
|
251
|
-
if (_ = accept(result.set))
|
252
|
-
descriptor.set = _;
|
253
|
-
if (_ = accept(result.init))
|
254
|
-
initializers.push(_);
|
255
|
-
}
|
256
|
-
else if (_ = accept(result)) {
|
257
|
-
if (kind === "field")
|
258
|
-
initializers.push(_);
|
259
|
-
else
|
260
|
-
descriptor[key] = _;
|
261
|
-
}
|
262
|
-
}
|
263
|
-
if (target)
|
264
|
-
Object.defineProperty(target, contextIn.name, descriptor);
|
265
|
-
done = true;
|
266
|
-
}
|
267
|
-
;
|
268
|
-
function __runInitializers(thisArg, initializers, value) {
|
269
|
-
var useValue = arguments.length > 2;
|
270
|
-
for (var i = 0; i < initializers.length; i++) {
|
271
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
272
|
-
}
|
273
|
-
return useValue ? value : void 0;
|
274
|
-
}
|
275
|
-
;
|
276
|
-
function __propKey(x) {
|
277
|
-
return typeof x === "symbol" ? x : "".concat(x);
|
278
|
-
}
|
279
|
-
;
|
280
|
-
function __setFunctionName(f, name, prefix) {
|
281
|
-
if (typeof name === "symbol")
|
282
|
-
name = name.description ? "[".concat(name.description, "]") : "";
|
283
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
284
|
-
}
|
285
|
-
;
|
286
|
-
function __metadata(metadataKey, metadataValue) {
|
287
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
288
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
289
|
-
}
|
290
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
291
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
292
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
293
|
-
function fulfilled(value) { try {
|
294
|
-
step(generator.next(value));
|
295
|
-
}
|
296
|
-
catch (e) {
|
297
|
-
reject(e);
|
298
|
-
} }
|
299
|
-
function rejected(value) { try {
|
300
|
-
step(generator["throw"](value));
|
301
|
-
}
|
302
|
-
catch (e) {
|
303
|
-
reject(e);
|
304
|
-
} }
|
305
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
306
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
307
|
-
});
|
308
|
-
}
|
309
|
-
function __generator(thisArg, body) {
|
310
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
311
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
312
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
313
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
314
|
-
function step(op) {
|
315
|
-
if (f)
|
316
|
-
throw new TypeError("Generator is already executing.");
|
317
|
-
while (g && (g = 0, op[0] && (_ = 0)), _)
|
318
|
-
try {
|
319
|
-
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)
|
320
|
-
return t;
|
321
|
-
if (y = 0, t)
|
322
|
-
op = [op[0] & 2, t.value];
|
323
|
-
switch (op[0]) {
|
324
|
-
case 0:
|
325
|
-
case 1:
|
326
|
-
t = op;
|
327
|
-
break;
|
328
|
-
case 4:
|
329
|
-
_.label++;
|
330
|
-
return { value: op[1], done: false };
|
331
|
-
case 5:
|
332
|
-
_.label++;
|
333
|
-
y = op[1];
|
334
|
-
op = [0];
|
335
|
-
continue;
|
336
|
-
case 7:
|
337
|
-
op = _.ops.pop();
|
338
|
-
_.trys.pop();
|
339
|
-
continue;
|
340
|
-
default:
|
341
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
342
|
-
_ = 0;
|
343
|
-
continue;
|
344
|
-
}
|
345
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
346
|
-
_.label = op[1];
|
347
|
-
break;
|
348
|
-
}
|
349
|
-
if (op[0] === 6 && _.label < t[1]) {
|
350
|
-
_.label = t[1];
|
351
|
-
t = op;
|
352
|
-
break;
|
353
|
-
}
|
354
|
-
if (t && _.label < t[2]) {
|
355
|
-
_.label = t[2];
|
356
|
-
_.ops.push(op);
|
357
|
-
break;
|
358
|
-
}
|
359
|
-
if (t[2])
|
360
|
-
_.ops.pop();
|
361
|
-
_.trys.pop();
|
362
|
-
continue;
|
363
|
-
}
|
364
|
-
op = body.call(thisArg, _);
|
365
|
-
}
|
366
|
-
catch (e) {
|
367
|
-
op = [6, e];
|
368
|
-
y = 0;
|
369
|
-
}
|
370
|
-
finally {
|
371
|
-
f = t = 0;
|
372
|
-
}
|
373
|
-
if (op[0] & 5)
|
374
|
-
throw op[1];
|
375
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
376
|
-
}
|
377
|
-
}
|
378
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
379
|
-
if (k2 === undefined)
|
380
|
-
k2 = k;
|
381
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
382
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
383
|
-
desc = { enumerable: true, get: function () { return m[k]; } };
|
384
|
-
}
|
385
|
-
Object.defineProperty(o, k2, desc);
|
386
|
-
}) : (function (o, m, k, k2) {
|
387
|
-
if (k2 === undefined)
|
388
|
-
k2 = k;
|
389
|
-
o[k2] = m[k];
|
390
|
-
});
|
391
|
-
function __exportStar(m, o) {
|
392
|
-
for (var p in m)
|
393
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
394
|
-
__createBinding(o, m, p);
|
395
|
-
}
|
396
|
-
function __values(o) {
|
397
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
398
|
-
if (m)
|
399
|
-
return m.call(o);
|
400
|
-
if (o && typeof o.length === "number")
|
401
|
-
return {
|
402
|
-
next: function () {
|
403
|
-
if (o && i >= o.length)
|
404
|
-
o = void 0;
|
405
|
-
return { value: o && o[i++], done: !o };
|
406
|
-
}
|
407
|
-
};
|
408
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
409
|
-
}
|
410
|
-
function __read(o, n) {
|
411
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
412
|
-
if (!m)
|
413
|
-
return o;
|
414
|
-
var i = m.call(o), r, ar = [], e;
|
415
|
-
try {
|
416
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
417
|
-
ar.push(r.value);
|
418
|
-
}
|
419
|
-
catch (error) {
|
420
|
-
e = { error: error };
|
421
|
-
}
|
422
|
-
finally {
|
423
|
-
try {
|
424
|
-
if (r && !r.done && (m = i["return"]))
|
425
|
-
m.call(i);
|
426
|
-
}
|
427
|
-
finally {
|
428
|
-
if (e)
|
429
|
-
throw e.error;
|
430
|
-
}
|
431
|
-
}
|
432
|
-
return ar;
|
433
|
-
}
|
434
|
-
/** @deprecated */
|
435
|
-
function __spread() {
|
436
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
437
|
-
ar = ar.concat(__read(arguments[i]));
|
438
|
-
return ar;
|
439
|
-
}
|
440
|
-
/** @deprecated */
|
441
|
-
function __spreadArrays() {
|
442
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
443
|
-
s += arguments[i].length;
|
444
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
445
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
446
|
-
r[k] = a[j];
|
447
|
-
return r;
|
448
|
-
}
|
449
|
-
function __spreadArray(to, from, pack) {
|
450
|
-
if (pack || arguments.length === 2)
|
451
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
452
|
-
if (ar || !(i in from)) {
|
453
|
-
if (!ar)
|
454
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
455
|
-
ar[i] = from[i];
|
456
|
-
}
|
457
|
-
}
|
458
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
459
|
-
}
|
460
|
-
function __await(v) {
|
461
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
462
|
-
}
|
463
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
464
|
-
if (!Symbol.asyncIterator)
|
465
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
466
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
467
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
468
|
-
function verb(n) { if (g[n])
|
469
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
470
|
-
function resume(n, v) { try {
|
471
|
-
step(g[n](v));
|
472
|
-
}
|
473
|
-
catch (e) {
|
474
|
-
settle(q[0][3], e);
|
475
|
-
} }
|
476
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
477
|
-
function fulfill(value) { resume("next", value); }
|
478
|
-
function reject(value) { resume("throw", value); }
|
479
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
480
|
-
resume(q[0][0], q[0][1]); }
|
481
|
-
}
|
482
|
-
function __asyncDelegator(o) {
|
483
|
-
var i, p;
|
484
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
485
|
-
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; }
|
486
|
-
}
|
487
|
-
function __asyncValues(o) {
|
488
|
-
if (!Symbol.asyncIterator)
|
489
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
490
|
-
var m = o[Symbol.asyncIterator], i;
|
491
|
-
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);
|
492
|
-
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); }); }; }
|
493
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
494
|
-
}
|
495
|
-
function __makeTemplateObject(cooked, raw) {
|
496
|
-
if (Object.defineProperty) {
|
497
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
498
|
-
}
|
499
|
-
else {
|
500
|
-
cooked.raw = raw;
|
501
|
-
}
|
502
|
-
return cooked;
|
503
|
-
}
|
504
|
-
;
|
505
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
506
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
507
|
-
}) : function (o, v) {
|
508
|
-
o["default"] = v;
|
509
|
-
};
|
510
|
-
function __importStar(mod) {
|
511
|
-
if (mod && mod.__esModule)
|
512
|
-
return mod;
|
513
|
-
var result = {};
|
514
|
-
if (mod != null)
|
515
|
-
for (var k in mod)
|
516
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
517
|
-
__createBinding(result, mod, k);
|
518
|
-
__setModuleDefault(result, mod);
|
519
|
-
return result;
|
520
|
-
}
|
521
|
-
function __importDefault(mod) {
|
522
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
523
|
-
}
|
524
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
525
|
-
if (kind === "a" && !f)
|
526
|
-
throw new TypeError("Private accessor was defined without a getter");
|
527
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
528
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
529
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
530
|
-
}
|
531
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
532
|
-
if (kind === "m")
|
533
|
-
throw new TypeError("Private method is not writable");
|
534
|
-
if (kind === "a" && !f)
|
535
|
-
throw new TypeError("Private accessor was defined without a setter");
|
536
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
537
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
538
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
539
|
-
}
|
540
|
-
function __classPrivateFieldIn(state, receiver) {
|
541
|
-
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
542
|
-
throw new TypeError("Cannot use 'in' operator on non-object");
|
543
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
544
|
-
}
|
545
|
-
|
546
|
-
var LineItemPath = /** @class */ (function () {
|
547
|
-
function LineItemPath(path) {
|
548
|
-
this._relativePath = '';
|
549
|
-
this._relativeAbstractPath = '';
|
550
|
-
this._abstractPath = '';
|
551
|
-
this.path = path.toLowerCase();
|
552
|
-
}
|
553
|
-
Object.defineProperty(LineItemPath.prototype, "relativePath", {
|
554
|
-
get: function () {
|
555
|
-
return this._relativePath;
|
556
|
-
},
|
557
|
-
set: function (relativePath) {
|
558
|
-
this._relativePath = relativePath.toLowerCase();
|
559
|
-
},
|
560
|
-
enumerable: false,
|
561
|
-
configurable: true
|
562
|
-
});
|
563
|
-
Object.defineProperty(LineItemPath.prototype, "abstractPath", {
|
564
|
-
get: function () {
|
565
|
-
return this._abstractPath || this.path;
|
566
|
-
},
|
567
|
-
set: function (abstractPath) {
|
568
|
-
this._abstractPath = abstractPath.toLowerCase();
|
569
|
-
},
|
570
|
-
enumerable: false,
|
571
|
-
configurable: true
|
572
|
-
});
|
573
|
-
Object.defineProperty(LineItemPath.prototype, "relativeAbstractPath", {
|
574
|
-
set: function (relativeAbstractPath) {
|
575
|
-
this._relativeAbstractPath = relativeAbstractPath.toLowerCase();
|
576
|
-
},
|
577
|
-
enumerable: false,
|
578
|
-
configurable: true
|
579
|
-
});
|
580
|
-
LineItemPath.prototype.isEqualTo = function (sectionPath) {
|
581
|
-
if (!sectionPath || !this.path || !sectionPath.path) {
|
582
|
-
return false;
|
583
|
-
}
|
584
|
-
var otherPath = sectionPath.path.toLowerCase();
|
585
|
-
var isEqual = this.path === otherPath || this._relativePath === otherPath || this._relativeAbstractPath === otherPath;
|
586
|
-
//TODO ALE SORT OUT SEARCH
|
587
|
-
if (!isEqual) {
|
588
|
-
var abstractPathMatch = this._abstractPath === sectionPath.abstractPath.toLowerCase();
|
589
|
-
var relativePathMatch = this._relativePath
|
590
|
-
? this._relativePath === sectionPath.relativePath.toLowerCase()
|
591
|
-
: false;
|
592
|
-
var relativeAbstractPathMatch = this._relativeAbstractPath && sectionPath.relativeAbstractPath
|
593
|
-
? sectionPath.relativeAbstractPath.toLowerCase() === sectionPath.relativePath.toLowerCase() &&
|
594
|
-
this._relativeAbstractPath === sectionPath.relativePath.toLowerCase()
|
595
|
-
: false;
|
596
|
-
return abstractPathMatch && (relativePathMatch || relativeAbstractPathMatch);
|
597
|
-
}
|
598
|
-
return isEqual;
|
599
|
-
};
|
600
|
-
return LineItemPath;
|
601
|
-
}());
|
602
|
-
var LineItemUtil = /** @class */ (function () {
|
603
|
-
function LineItemUtil() {
|
604
|
-
}
|
605
|
-
LineItemUtil.removeDeletedItems = function (original) {
|
606
|
-
var _a;
|
607
|
-
var root = i7.EntityUtil.clone(original);
|
608
|
-
if (root) {
|
609
|
-
var items = [root];
|
610
|
-
for (var i = 0; i < items.length; i++) {
|
611
|
-
var item = items[i];
|
612
|
-
item.lineItems = ((_a = item.lineItems) !== null && _a !== void 0 ? _a : []).filter(function (l) { return l.actionCode !== 'DELETE'; });
|
613
|
-
items = items.concat(item.lineItems);
|
614
|
-
}
|
615
|
-
}
|
616
|
-
return root;
|
617
|
-
};
|
618
|
-
LineItemUtil.replaceLineItemKeys = function (rootLineItem) {
|
619
|
-
var replaceFn = function (item) {
|
620
|
-
item.id = item.id ? 'DUMMY-' + item.id : item.id;
|
621
|
-
item.rootId = item.rootId ? 'DUMMY-' + item.rootId : item.rootId;
|
622
|
-
item.parentId = item.parentId ? 'DUMMY-' + item.parentId : item.parentId;
|
623
|
-
item.offeringInstanceId = item.offeringInstanceId ? 'DUMMY-' + item.offeringInstanceId : void 0;
|
624
|
-
item.offeringItemId = item.offeringItemId ? 'DUMMY-' + item.offeringItemId : void 0;
|
625
|
-
item.rampInstanceId = item.rampInstanceId ? 'DUMMY-' + item.rampInstanceId : void 0;
|
626
|
-
};
|
627
|
-
var traverseFn = function (lineItem, callbackFn) {
|
628
|
-
if (lineItem.lineItems && lineItem.lineItems.length > 0) {
|
629
|
-
lineItem.lineItems.forEach(function (childLineItem) {
|
630
|
-
callbackFn.apply(null, [childLineItem]);
|
631
|
-
traverseFn.apply(null, [childLineItem, callbackFn]);
|
632
|
-
});
|
633
|
-
}
|
634
|
-
};
|
635
|
-
replaceFn.apply(null, [rootLineItem]);
|
636
|
-
// rootLineItem.rootId = rootLineItem.id;
|
637
|
-
traverseFn.apply(null, [rootLineItem, replaceFn]);
|
638
|
-
};
|
639
|
-
LineItemUtil.enrichPricingInfo = function (source, pricingDto) {
|
640
|
-
var _a;
|
641
|
-
var result = Object.assign({}, source);
|
642
|
-
if (pricingDto) {
|
643
|
-
result.productName = ((_a = pricingDto.properties) === null || _a === void 0 ? void 0 : _a.displayName) || pricingDto.productName;
|
644
|
-
result.type = pricingDto.type;
|
645
|
-
result.rootId = pricingDto.rootId;
|
646
|
-
result.assetId = pricingDto.assetId;
|
647
|
-
result.openOrderLineItemId = pricingDto.openOrderLineItemId;
|
648
|
-
result.activated = pricingDto.activated;
|
649
|
-
result.actionCode = pricingDto.actionCode;
|
650
|
-
result.serviceStartDate = pricingDto.serviceStartDate;
|
651
|
-
result.effectiveDate = pricingDto.effectiveDate;
|
652
|
-
result.startDate = pricingDto.startDate;
|
653
|
-
result.endDate = pricingDto.endDate;
|
654
|
-
result.offeringId = pricingDto.offeringId;
|
655
|
-
result.offeringItemId = pricingDto.offeringItemId;
|
656
|
-
result.offeringInstanceId = pricingDto.offeringInstanceId;
|
657
|
-
result.rampInstanceId = pricingDto.rampInstanceId;
|
658
|
-
result.planId = pricingDto.planId;
|
659
|
-
if (!result.chargeItems) {
|
660
|
-
result.chargeItems = pricingDto.chargeItems;
|
661
|
-
}
|
662
|
-
result.chargeGroupItems = [];
|
663
|
-
}
|
664
|
-
if (source.lineItems && source.lineItems.length > 0) {
|
665
|
-
result.lineItems = [];
|
666
|
-
source.lineItems.forEach(function (childSource) {
|
667
|
-
var childDto = pricingDto && pricingDto.lineItems && pricingDto.lineItems.find(function (c) { return childSource.id === c.id; });
|
668
|
-
var childItem = LineItemUtil.enrichPricingInfo(childSource, childDto);
|
669
|
-
result.lineItems.push(childItem);
|
670
|
-
});
|
671
|
-
}
|
672
|
-
return result;
|
673
|
-
};
|
674
|
-
LineItemUtil.getLineItemPath = function (lineItem, rootLineItem) {
|
675
|
-
var path;
|
676
|
-
if (!lineItem.parentId) {
|
677
|
-
path = new LineItemPath('/' + lineItem.type);
|
678
|
-
path.abstractPath = path.path;
|
679
|
-
path.relativePath = path.path;
|
680
|
-
path.relativeAbstractPath = path.path;
|
681
|
-
}
|
682
|
-
else {
|
683
|
-
//TOODO ALE SORT OUT PATENT ITEM
|
684
|
-
var parentItem = i7.EntityUtil.findByFieldHierarchically('id', lineItem.parentId, [rootLineItem], 'lineItems');
|
685
|
-
var portType = lineItem.port && (parentItem === null || parentItem === void 0 ? void 0 : parentItem.portDomains[lineItem.port].type);
|
686
|
-
var parentPath = parentItem && LineItemUtil.getLineItemPath(parentItem, rootLineItem);
|
687
|
-
if (parentPath) {
|
688
|
-
path = new LineItemPath(parentPath.path + '/ports/' + lineItem.port + '/' + lineItem.type);
|
689
|
-
path.abstractPath = parentPath.abstractPath + '/ports/' + (lineItem.port + '/' + portType);
|
690
|
-
path.relativePath = '/' + lineItem.type;
|
691
|
-
path.relativeAbstractPath = '/' + portType;
|
692
|
-
}
|
693
|
-
else {
|
694
|
-
throw 'Could not construct line item path';
|
695
|
-
}
|
696
|
-
}
|
697
|
-
return path;
|
698
|
-
};
|
699
|
-
LineItemUtil.findById = function (parentId, lineItems) {
|
700
|
-
return i7.EntityUtil.findByFieldHierarchically('id', parentId, lineItems, 'lineItems');
|
701
|
-
};
|
702
|
-
LineItemUtil.countAttributeValues = function (scale, attributeDomain) {
|
703
|
-
var precision = LineItemUtil.precision(scale);
|
704
|
-
var count = 0;
|
705
|
-
attributeDomain.forEach(function (d) { return (count += d.max - d.min + precision); });
|
706
|
-
return count;
|
707
|
-
};
|
708
|
-
LineItemUtil.precision = function (scale) {
|
709
|
-
if (!scale) {
|
710
|
-
return 1;
|
711
|
-
}
|
712
|
-
var s = '1';
|
713
|
-
while (s.length < scale) {
|
714
|
-
s = '0' + s;
|
715
|
-
}
|
716
|
-
return Number('0.' + s);
|
717
|
-
};
|
718
|
-
LineItemUtil.splitDomainToValues = function (scale, attributeDomain) {
|
719
|
-
var precision = this.precision(scale);
|
720
|
-
var values = [];
|
721
|
-
attributeDomain.forEach(function (interval) { return (values = values.concat(LineItemUtil.splitIntervalToValues(precision, interval))); });
|
722
|
-
return values;
|
723
|
-
};
|
724
|
-
LineItemUtil.splitIntervalToValues = function (precision, interval) {
|
725
|
-
var values = [];
|
726
|
-
for (var i = interval.min; i <= interval.max; i += precision) {
|
727
|
-
values.push(i);
|
728
|
-
}
|
729
|
-
return values;
|
730
|
-
};
|
731
|
-
LineItemUtil.findLineItemsByPath = function (runtimeModel, lineItem, path) {
|
732
|
-
if (!runtimeModel.isEquals(lineItem.type, path.types[0])) {
|
733
|
-
return [];
|
734
|
-
}
|
735
|
-
var lineItems = [lineItem];
|
736
|
-
for (var i = 1; i < path.types.length; i++) {
|
737
|
-
var portName = path.ports[i - 1];
|
738
|
-
var typeName = path.types[i];
|
739
|
-
lineItems = LineItemUtil.findLineItemChildren(runtimeModel, lineItems, portName, typeName);
|
740
|
-
}
|
741
|
-
return lineItems;
|
742
|
-
};
|
743
|
-
LineItemUtil.findLineItemChildren = function (runtimeModel, lineItems, portName, typeName) {
|
744
|
-
var e_1, _c, e_2, _d;
|
745
|
-
var _a;
|
746
|
-
var result = [];
|
747
|
-
try {
|
748
|
-
for (var lineItems_1 = __values(lineItems), lineItems_1_1 = lineItems_1.next(); !lineItems_1_1.done; lineItems_1_1 = lineItems_1.next()) {
|
749
|
-
var lineItem = lineItems_1_1.value;
|
750
|
-
try {
|
751
|
-
for (var _e = (e_2 = void 0, __values(lineItem.lineItems)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
752
|
-
var childItem = _f.value;
|
753
|
-
if (((_a = childItem.port) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === portName.toLowerCase() &&
|
754
|
-
runtimeModel.isEquals(childItem.type, typeName)) {
|
755
|
-
result.push(childItem);
|
756
|
-
}
|
757
|
-
}
|
758
|
-
}
|
759
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
760
|
-
finally {
|
761
|
-
try {
|
762
|
-
if (_f && !_f.done && (_d = _e.return)) _d.call(_e);
|
763
|
-
}
|
764
|
-
finally { if (e_2) throw e_2.error; }
|
765
|
-
}
|
766
|
-
}
|
767
|
-
}
|
768
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
769
|
-
finally {
|
770
|
-
try {
|
771
|
-
if (lineItems_1_1 && !lineItems_1_1.done && (_c = lineItems_1.return)) _c.call(lineItems_1);
|
772
|
-
}
|
773
|
-
finally { if (e_1) throw e_1.error; }
|
774
|
-
}
|
775
|
-
return result;
|
776
|
-
};
|
777
|
-
LineItemUtil.findLineItemsByType = function (runtimeModel, lineItem, typeName) {
|
778
|
-
var result = [];
|
779
|
-
var lineItems = [lineItem];
|
780
|
-
for (var i = 0; i < lineItems.length; i++) {
|
781
|
-
var lineItem_1 = lineItems[i];
|
782
|
-
if (runtimeModel.isEquals(lineItem_1.type, typeName)) {
|
783
|
-
result.push(lineItem_1);
|
784
|
-
}
|
785
|
-
lineItems = lineItems.concat(lineItem_1.lineItems);
|
786
|
-
}
|
787
|
-
return result;
|
788
|
-
};
|
789
|
-
LineItemUtil.findLineItemForValue = function (model, valueOption) {
|
790
|
-
if (!i7.EntityUtil.isPresent(model) || !i7.EntityUtil.isPresent(model.lineItems)) {
|
791
|
-
return;
|
792
|
-
}
|
793
|
-
return model.lineItems.find(function (li) { return li.type && li.type.toLowerCase() === valueOption.toLowerCase(); });
|
794
|
-
};
|
795
|
-
// TODO: add Product typings
|
796
|
-
LineItemUtil.create = function (product, qty) {
|
797
|
-
var _a;
|
798
|
-
return {
|
799
|
-
id: i7.UUID.UUID(),
|
800
|
-
type: product.typeName,
|
801
|
-
name: ((_a = product.properties) === null || _a === void 0 ? void 0 : _a.displayName) || product.name,
|
802
|
-
productName: product.name,
|
803
|
-
productId: product.id,
|
804
|
-
cfgStatus: 'User',
|
805
|
-
actionCode: 'ADD',
|
806
|
-
qty: qty || 1,
|
807
|
-
};
|
808
|
-
};
|
809
|
-
LineItemUtil.upsert = function (value, collection) {
|
810
|
-
var index = collection.findIndex(function (item) { return item.id === value.id; });
|
811
|
-
if (index > -1) {
|
812
|
-
collection[index] = value;
|
813
|
-
}
|
814
|
-
else {
|
815
|
-
collection.push(value);
|
816
|
-
}
|
817
|
-
};
|
818
|
-
LineItemUtil.compareSortOrder = function (a, b) {
|
819
|
-
var orderA = Number(a.properties['SortOrder']);
|
820
|
-
var orderB = Number(b.properties['SortOrder']);
|
821
|
-
if (!orderA && !orderB) {
|
822
|
-
return LineItemUtil.compareProductName(a, b);
|
823
|
-
}
|
824
|
-
if (!orderA) {
|
825
|
-
return 1;
|
826
|
-
}
|
827
|
-
else if (!orderB) {
|
828
|
-
return -1;
|
829
|
-
}
|
830
|
-
var result = orderA - orderB;
|
831
|
-
if (result === 0) {
|
832
|
-
return LineItemUtil.compareProductName(a, b);
|
833
|
-
}
|
834
|
-
return result;
|
835
|
-
};
|
836
|
-
LineItemUtil.sort = function (lineItems) {
|
837
|
-
if (lineItems) {
|
838
|
-
lineItems.sort(function (a, b) { return LineItemUtil.compareSortOrder(a, b); });
|
839
|
-
lineItems.forEach(function (i) { return LineItemUtil.sort(i.lineItems); });
|
840
|
-
}
|
841
|
-
};
|
842
|
-
LineItemUtil.compareProductName = function (a, b) {
|
843
|
-
var _a, _b;
|
844
|
-
if (a.productName) {
|
845
|
-
return ((_a = a.productName) !== null && _a !== void 0 ? _a : '').localeCompare((_b = b.productName) !== null && _b !== void 0 ? _b : '');
|
846
|
-
}
|
847
|
-
else if (b.productName) {
|
848
|
-
return 1;
|
849
|
-
}
|
850
|
-
return 0;
|
851
|
-
};
|
852
|
-
return LineItemUtil;
|
853
|
-
}());
|
854
|
-
|
855
|
-
var SectionsBinderHelper = /** @class */ (function () {
|
856
|
-
function SectionsBinderHelper() {
|
857
|
-
}
|
858
|
-
SectionsBinderHelper.setLineItemsPath = function (runtimeModel, rootLineItem, sections, sourceSections, filterFn, pricingEnabled) {
|
859
|
-
var filtered = sections.filter(filterFn);
|
860
|
-
filtered.forEach(function (section) {
|
861
|
-
var path = section.boundData.path;
|
862
|
-
var foundLineItems;
|
863
|
-
if (path.relative) {
|
864
|
-
foundLineItems = LineItemUtil.findLineItemsByType(runtimeModel, rootLineItem, path.types[0]);
|
865
|
-
}
|
866
|
-
else {
|
867
|
-
var remainder = rootLineItem.path ? i7.SectionPathUtil.cut(runtimeModel, path, rootLineItem.path) : undefined;
|
868
|
-
if (!remainder) {
|
869
|
-
return [];
|
870
|
-
}
|
871
|
-
foundLineItems = LineItemUtil.findLineItemsByPath(runtimeModel, rootLineItem, remainder);
|
872
|
-
}
|
873
|
-
if (section.boundData.entityType === BoundDataType[BoundDataType.TYPE]) {
|
874
|
-
SectionsBinderHelper.bindMatchingLineItems(runtimeModel, foundLineItems, section, sections, sourceSections, pricingEnabled);
|
875
|
-
}
|
876
|
-
else if (section.boundData.entityType === BoundDataType[BoundDataType.ATTRIBUTE]) {
|
877
|
-
foundLineItems = foundLineItems.filter(function (item) { return item.attributes &&
|
878
|
-
item.attributes.findIndex(function (a) { return a.name.toLowerCase() === section.boundData.name.toLowerCase(); }) !== -1; });
|
879
|
-
foundLineItems.forEach(function (lineItem) {
|
880
|
-
SectionsBinderHelper.bindLineItem(section, sections, sourceSections, lineItem, pricingEnabled);
|
881
|
-
});
|
882
|
-
}
|
883
|
-
else if (section.boundData.entityType === BoundDataType[BoundDataType.PORT]) {
|
884
|
-
foundLineItems = foundLineItems.filter(function (item) { return item.portDomains && item.portDomains[section.boundData.name]; });
|
885
|
-
SectionsBinderHelper.bindMatchingLineItems(runtimeModel, foundLineItems, section, sections, sourceSections, pricingEnabled);
|
886
|
-
}
|
887
|
-
return;
|
888
|
-
});
|
889
|
-
return sections;
|
890
|
-
};
|
891
|
-
SectionsBinderHelper.isAddAllowed = function (model, portName, quantityToAdd) {
|
892
|
-
if (quantityToAdd === void 0) { quantityToAdd = 1; }
|
893
|
-
var quantity = this.getQuantity(model, portName);
|
894
|
-
return quantity + quantityToAdd <= +this.getPortMax(model, portName);
|
895
|
-
};
|
896
|
-
SectionsBinderHelper.isRemoveAllowed = function (model, portName, quantityToRemove) {
|
897
|
-
if (quantityToRemove === void 0) { quantityToRemove = 1; }
|
898
|
-
var quantity = this.getQuantity(model, portName);
|
899
|
-
return quantity - quantityToRemove >= +this.getPortMin(model, portName);
|
900
|
-
};
|
901
|
-
SectionsBinderHelper.getMaxAllowed = function (lineItem, portName) {
|
902
|
-
return +this.getPortMax(lineItem, portName) - this.getQuantity(lineItem, portName);
|
903
|
-
};
|
904
|
-
SectionsBinderHelper.getQuantityGroupByValue = function (model, portName) {
|
905
|
-
var quantities = {};
|
906
|
-
if (model && portName) {
|
907
|
-
model.lineItems
|
908
|
-
.filter(function (li) { return li.port === portName; })
|
909
|
-
.forEach(function (li) {
|
910
|
-
var quantity = (i7.EntityUtil.isPresent(li.qty) && li.qty) || 1;
|
911
|
-
if (i7.EntityUtil.isPresent(quantities[li.type])) {
|
912
|
-
quantity += quantities[li.type];
|
913
|
-
}
|
914
|
-
quantities[li.type] = quantity;
|
915
|
-
});
|
916
|
-
}
|
917
|
-
return quantities;
|
918
|
-
};
|
919
|
-
SectionsBinderHelper.bindMatchingLineItems = function (runtimeModel, foundLineItems, section, sections, sourceSections, pricingEnabled) {
|
920
|
-
foundLineItems.forEach(function (lineItem) {
|
921
|
-
var boundSection = SectionsBinderHelper.bindLineItem(section, sections, sourceSections, lineItem, pricingEnabled);
|
922
|
-
SectionsBinderHelper.setLineItemsPath(runtimeModel, lineItem, sections, sourceSections, function (sec) {
|
923
|
-
return sec.boundData && sec.parentId === boundSection.id;
|
924
|
-
}, pricingEnabled);
|
925
|
-
});
|
926
|
-
};
|
927
|
-
SectionsBinderHelper.bindLineItem = function (section, sections, sourceSections, lineItem, pricingEnabled) {
|
928
|
-
var boundSection = section.model ? SectionsBinderHelper.doClone(section, sections, sourceSections) : section;
|
929
|
-
boundSection.model = lineItem;
|
930
|
-
boundSection.pricingEnabled = pricingEnabled;
|
931
|
-
return boundSection;
|
932
|
-
};
|
933
|
-
SectionsBinderHelper.doClone = function (source, sections, sourceSections, parent) {
|
934
|
-
var sourceClass = sourceSections.find(function (s) { return s.classId === source.classId; });
|
935
|
-
var clone = i7.EntityUtil.clone(sourceClass);
|
936
|
-
clone.id = i7.UUID.UUID();
|
937
|
-
clone.parentId = parent ? parent.id : source.parentId;
|
938
|
-
sections.splice(sections.findIndex(function (s) { return s.id === source.id; }) + 1, 0, clone);
|
939
|
-
sourceSections
|
940
|
-
.filter(function (s) { return s.parentId === sourceClass.id; })
|
941
|
-
.forEach(function (s) { return SectionsBinderHelper.doClone(s, sections, sourceSections, clone); });
|
942
|
-
return clone;
|
943
|
-
};
|
944
|
-
SectionsBinderHelper.getQuantity = function (model, portName) {
|
945
|
-
var quantity = 0;
|
946
|
-
model.lineItems
|
947
|
-
.filter(function (li) { return li.port === portName; })
|
948
|
-
.forEach(function (li) {
|
949
|
-
quantity += li.qty;
|
950
|
-
});
|
951
|
-
return quantity;
|
952
|
-
};
|
953
|
-
SectionsBinderHelper.getPortMax = function (model, portName) {
|
954
|
-
return model.portDomains[portName].maxCard;
|
955
|
-
};
|
956
|
-
SectionsBinderHelper.getPortMin = function (model, portName) {
|
957
|
-
return model.portDomains[portName].minCard;
|
958
|
-
};
|
959
|
-
return SectionsBinderHelper;
|
960
|
-
}());
|
961
|
-
|
962
|
-
var RuntimeFormService = /** @class */ (function () {
|
963
|
-
function RuntimeFormService() {
|
964
|
-
this.sections = [];
|
965
|
-
}
|
966
|
-
RuntimeFormService.prototype.initForm = function (sections, solutionLineItem) {
|
967
|
-
var _this = this;
|
968
|
-
this.sections = sections;
|
969
|
-
this.solutionLineItem = solutionLineItem;
|
970
|
-
var form = new i4.FormGroup({});
|
971
|
-
sections
|
972
|
-
.filter(function (section) { return section.model && section.template && section.boundData; })
|
973
|
-
.forEach(function (section) {
|
974
|
-
_this.populateSectionValue(section);
|
975
|
-
_this.populateSectionPrice(section);
|
976
|
-
_this.populateFormControls(section, form);
|
977
|
-
});
|
978
|
-
return form;
|
979
|
-
};
|
980
|
-
RuntimeFormService.prototype.populateSectionValue = function (section) {
|
981
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
982
|
-
var value;
|
983
|
-
var valueOptions = [];
|
984
|
-
var displayValues = {};
|
985
|
-
var properties = {};
|
986
|
-
if (FormServiceUtils.isPortSection(section)) {
|
987
|
-
var portDomain = (_a = section.model) === null || _a === void 0 ? void 0 : _a.portDomains[section.boundData.name];
|
988
|
-
valueOptions = (_b = portDomain === null || portDomain === void 0 ? void 0 : portDomain.domainTypes.map(function (dt) { return dt.name; })) !== null && _b !== void 0 ? _b : [];
|
989
|
-
properties =
|
990
|
-
(_c = portDomain === null || portDomain === void 0 ? void 0 : portDomain.domainTypes.reduce(function (map, dt) {
|
991
|
-
map[dt.name] = dt.properties;
|
992
|
-
return map;
|
993
|
-
}, {})) !== null && _c !== void 0 ? _c : {};
|
994
|
-
displayValues =
|
995
|
-
(_d = portDomain === null || portDomain === void 0 ? void 0 : portDomain.domainTypes.reduce(function (map, dt) {
|
996
|
-
map[dt.name] = dt.displayName;
|
997
|
-
return map;
|
998
|
-
}, {})) !== null && _d !== void 0 ? _d : {};
|
999
|
-
value = (_e = section.model) === null || _e === void 0 ? void 0 : _e.lineItems.map(function (li) { return li.type; });
|
1000
|
-
}
|
1001
|
-
if (FormServiceUtils.isAttributeSection(section)) {
|
1002
|
-
var attribute = (_f = section.model) === null || _f === void 0 ? void 0 : _f.attributes.find(function (attr) { return attr.name.toLowerCase() === section.boundData.name.toLowerCase(); });
|
1003
|
-
if (attribute) {
|
1004
|
-
value = attribute.value;
|
1005
|
-
}
|
1006
|
-
var attributeDomain = (_g = section.model) === null || _g === void 0 ? void 0 : _g.attributeDomains[section.boundData.name];
|
1007
|
-
if (!(attribute === null || attribute === void 0 ? void 0 : attribute.type.match('GENERIC|BOOLEAN')) && attributeDomain) {
|
1008
|
-
var count = attribute && attribute.scale != null
|
1009
|
-
? LineItemUtil.countAttributeValues(attribute.scale, attributeDomain)
|
1010
|
-
: undefined;
|
1011
|
-
if (attribute && attribute.scale != null && count && count <= 100) {
|
1012
|
-
valueOptions = LineItemUtil.splitDomainToValues(attribute.scale, attributeDomain);
|
1013
|
-
}
|
1014
|
-
else {
|
1015
|
-
valueOptions = attributeDomain;
|
1016
|
-
}
|
1017
|
-
}
|
1018
|
-
else if (attributeDomain) {
|
1019
|
-
valueOptions = attributeDomain;
|
1020
|
-
}
|
1021
|
-
}
|
1022
|
-
if (!i7.EntityUtil.isPresent(value)) {
|
1023
|
-
value = '';
|
1024
|
-
}
|
1025
|
-
section.sectionValue = {
|
1026
|
-
value: value,
|
1027
|
-
valueOptions: valueOptions,
|
1028
|
-
displayValues: displayValues,
|
1029
|
-
properties: properties,
|
1030
|
-
};
|
1031
|
-
};
|
1032
|
-
RuntimeFormService.prototype.populateSectionPrice = function (section) {
|
1033
|
-
var _a;
|
1034
|
-
var priceValue = { priceOptions: {} };
|
1035
|
-
if (FormServiceUtils.isPortSection(section)) {
|
1036
|
-
var portDomain = (_a = section.model) === null || _a === void 0 ? void 0 : _a.portDomains[section.boundData.name];
|
1037
|
-
if (portDomain) {
|
1038
|
-
portDomain.domainTypes.forEach(function (dt) {
|
1039
|
-
if (dt.recommendedPrices && dt.recommendedPrices.length > 0) {
|
1040
|
-
priceValue.priceOptions[dt.name] = dt.recommendedPrices;
|
1041
|
-
}
|
1042
|
-
else {
|
1043
|
-
delete priceValue.priceOptions[dt.name];
|
1044
|
-
}
|
1045
|
-
});
|
1046
|
-
}
|
1047
|
-
}
|
1048
|
-
section.priceValue = priceValue;
|
1049
|
-
};
|
1050
|
-
RuntimeFormService.prototype.populateFormControls = function (section, form) {
|
1051
|
-
form.controls[section.id] = this.createFormControl(section);
|
1052
|
-
if (FormServiceUtils.isPortSection(section) || FormServiceUtils.isTypeSection(section)) {
|
1053
|
-
form.controls[section.id.concat('qty')] = this.createQtyControl(section);
|
1054
|
-
}
|
1055
|
-
};
|
1056
|
-
RuntimeFormService.prototype.createFormControl = function (section) {
|
1057
|
-
var _a;
|
1058
|
-
var value = FormServiceUtils.isPortSection(section) ? void 0 : (_a = section.sectionValue) === null || _a === void 0 ? void 0 : _a.value;
|
1059
|
-
return new i4.FormControl(value, this.getFormControlValidators(section));
|
1060
|
-
};
|
1061
|
-
RuntimeFormService.prototype.createQtyControl = function (section) {
|
1062
|
-
var _a, _b, _c;
|
1063
|
-
var isTypeSection = FormServiceUtils.isTypeSection(section);
|
1064
|
-
var validators = [];
|
1065
|
-
var maxAllowed = this.getMaxAllowed(section);
|
1066
|
-
//TODO TEMPORARY SOLUTION (WILL BE DISABLED ONCE RADIO CONTROLS IMPLEMENTED)
|
1067
|
-
if (maxAllowed > 0) {
|
1068
|
-
validators.push(this.getQuantityValidator(maxAllowed, isTypeSection ? (_b = (_a = section.model) === null || _a === void 0 ? void 0 : _a.qty) !== null && _b !== void 0 ? _b : 0 : 0));
|
1069
|
-
}
|
1070
|
-
var qtyValue = isTypeSection ? (_c = section.model) === null || _c === void 0 ? void 0 : _c.qty : 1;
|
1071
|
-
return new i4.FormControl(qtyValue, validators);
|
1072
|
-
};
|
1073
|
-
RuntimeFormService.prototype.getMaxAllowed = function (section) {
|
1074
|
-
var lineItem = section.model;
|
1075
|
-
var portName = section.boundData.name;
|
1076
|
-
if (FormServiceUtils.isTypeSection(section)) {
|
1077
|
-
if (section.model && i7.EntityUtil.isPresent(section.model.parentId) && this.solutionLineItem) {
|
1078
|
-
if (section.model.parentId) {
|
1079
|
-
lineItem = LineItemUtil.findById(section.model.parentId, [this.solutionLineItem]);
|
1080
|
-
}
|
1081
|
-
portName = section.model.port;
|
1082
|
-
}
|
1083
|
-
else {
|
1084
|
-
return 0;
|
1085
|
-
}
|
1086
|
-
}
|
1087
|
-
if (!lineItem) {
|
1088
|
-
return 0;
|
1089
|
-
}
|
1090
|
-
return SectionsBinderHelper.getMaxAllowed(lineItem, portName);
|
1091
|
-
};
|
1092
|
-
//TODO ALE TO SUPPORT EMPTY VALUES FOR INTERVAL ATTRIBUTES OUT OF DOMAIN
|
1093
|
-
RuntimeFormService.prototype.getFormControlValidators = function (section) {
|
1094
|
-
if (!FormServiceUtils.isAttributeSection(section)) {
|
1095
|
-
return null;
|
1096
|
-
}
|
1097
|
-
var validators = [];
|
1098
|
-
var parentLineItem = section.model && this.solutionLineItem && FormServiceUtils.findParent(section.model.id, [this.solutionLineItem]);
|
1099
|
-
var attribute = parentLineItem &&
|
1100
|
-
parentLineItem.attributes.find(function (attr) { return attr.name.toLowerCase() === section.boundData.name.toLowerCase(); });
|
1101
|
-
if (!attribute || !attribute.type) {
|
1102
|
-
return null;
|
1103
|
-
}
|
1104
|
-
var primitiveTypesValidators = {
|
1105
|
-
INT: i7.TypeValidators.integerValidator(),
|
1106
|
-
'DOUBLE|DECIMAL': i7.TypeValidators.decimalValidator(10),
|
1107
|
-
};
|
1108
|
-
_.keys(primitiveTypesValidators).forEach(function (types) {
|
1109
|
-
if (types.match(attribute.type)) {
|
1110
|
-
var validator = primitiveTypesValidators[types];
|
1111
|
-
validators.push(validator);
|
1112
|
-
}
|
1113
|
-
});
|
1114
|
-
if (!attribute.type.match('GENERIC|BOOLEAN|MULTIPLE')) {
|
1115
|
-
var sectionLabel_1 = section.label;
|
1116
|
-
var intervalValidator = function (control) {
|
1117
|
-
var _a;
|
1118
|
-
if (_.isUndefined(control.value) || _.isNull(control.value) || isNaN(+control.value)) {
|
1119
|
-
return { interval: { message: sectionLabel_1 + ' is not in domain' } };
|
1120
|
-
}
|
1121
|
-
if (!_.isUndefined(control.value) && _.isString(control.value) && control.value.length === 0) {
|
1122
|
-
return null;
|
1123
|
-
}
|
1124
|
-
var attributeDomain = (_a = section.model) === null || _a === void 0 ? void 0 : _a.attributeDomains[section.boundData.name];
|
1125
|
-
var valid = attributeDomain === null || attributeDomain === void 0 ? void 0 : attributeDomain.some(function (valueOption) {
|
1126
|
-
var min = +valueOption.min;
|
1127
|
-
var max = +valueOption.max;
|
1128
|
-
return +control.value <= max && +control.value >= min;
|
1129
|
-
});
|
1130
|
-
if (!valid) {
|
1131
|
-
return { interval: { message: sectionLabel_1 + ' is not in domain' } };
|
1132
|
-
}
|
1133
|
-
return null;
|
1134
|
-
};
|
1135
|
-
validators.push(intervalValidator);
|
1136
|
-
}
|
1137
|
-
if (section.required) {
|
1138
|
-
validators.push(i7.TypeValidators.requiredValidator(section.label + ' is required '));
|
1139
|
-
}
|
1140
|
-
return validators.length !== 0 ? validators : null;
|
1141
|
-
};
|
1142
|
-
RuntimeFormService.prototype.getQuantityValidator = function (max, originalQty) {
|
1143
|
-
return function (control) {
|
1144
|
-
if (!control.value) {
|
1145
|
-
return { quantity: { message: 'Required' } };
|
1146
|
-
}
|
1147
|
-
else if (isNaN(+control.value) || +control.value < 1) {
|
1148
|
-
return { quantity: { message: 'Invalid value' } };
|
1149
|
-
}
|
1150
|
-
else if (+control.value > max + originalQty) {
|
1151
|
-
return { quantity: { message: 'Max quantity ' + (max + originalQty) } };
|
1152
|
-
}
|
1153
|
-
else {
|
1154
|
-
return null;
|
1155
|
-
}
|
1156
|
-
};
|
1157
|
-
};
|
1158
|
-
return RuntimeFormService;
|
1159
|
-
}());
|
1160
|
-
RuntimeFormService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeFormService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1161
|
-
RuntimeFormService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeFormService });
|
1162
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeFormService, decorators: [{
|
1163
|
-
type: i0.Injectable
|
1164
|
-
}] });
|
1165
|
-
var FormServiceUtils = /** @class */ (function () {
|
1166
|
-
function FormServiceUtils() {
|
1167
|
-
}
|
1168
|
-
FormServiceUtils.isPortSection = function (section) {
|
1169
|
-
return section && section.boundData && section.boundData.entityType === BoundDataType[BoundDataType.PORT];
|
1170
|
-
};
|
1171
|
-
FormServiceUtils.isTypeSection = function (section) {
|
1172
|
-
return section && section.boundData && section.boundData.entityType === BoundDataType[BoundDataType.TYPE];
|
1173
|
-
};
|
1174
|
-
FormServiceUtils.isAttributeSection = function (section) {
|
1175
|
-
return section && section.boundData && section.boundData.entityType === BoundDataType[BoundDataType.ATTRIBUTE];
|
1176
|
-
};
|
1177
|
-
FormServiceUtils.findParent = function (parentId, lineItems) {
|
1178
|
-
return i7.EntityUtil.findByFieldHierarchically('id', parentId, lineItems, 'lineItems');
|
1179
|
-
};
|
1180
|
-
return FormServiceUtils;
|
1181
|
-
}());
|
1182
|
-
|
1183
|
-
var ConfigurationService = /** @class */ (function () {
|
1184
|
-
function ConfigurationService(configurationApiService, contextService, dialogService) {
|
1185
|
-
this.configurationApiService = configurationApiService;
|
1186
|
-
this.contextService = contextService;
|
1187
|
-
this.dialogService = dialogService;
|
1188
|
-
}
|
1189
|
-
ConfigurationService.prototype.configure = function (runtimeContext, states, resolve) {
|
1190
|
-
var _this = this;
|
1191
|
-
var _a;
|
1192
|
-
var lineItem = (states && states.configurableRamp) || this.getDefaultLineItem(runtimeContext);
|
1193
|
-
var configurationMode = resolve ? i7.ConfigurationMode.RESOLVE : i7.ConfigurationMode.SEARCH;
|
1194
|
-
var configurationRequest = this.createRequest(lineItem, runtimeContext, configurationMode);
|
1195
|
-
configurationRequest.lineItems = states.currentState || [];
|
1196
|
-
configurationRequest.asset = states.asset;
|
1197
|
-
var runtimeModel = runtimeContext.runtimeModel;
|
1198
|
-
var pricingEnabled = (_a = runtimeContext.uiDefinition) === null || _a === void 0 ? void 0 : _a.pricingEnabled;
|
1199
|
-
return this.configurationApiService
|
1200
|
-
.configureLineItem({
|
1201
|
-
configurationRequest: configurationRequest,
|
1202
|
-
runtimeModel: runtimeModel,
|
1203
|
-
pricingEnabled: pricingEnabled,
|
1204
|
-
})
|
1205
|
-
.pipe(rxjsOperators.map(function (_f) {
|
1206
|
-
var lineItem = _f.lineItem, context = _f.context, deletedLineItems = _f.deletedLineItems;
|
1207
|
-
if (context) {
|
1208
|
-
_this.contextService.update({ properties: context.properties });
|
1209
|
-
}
|
1210
|
-
if (deletedLineItems === null || deletedLineItems === void 0 ? void 0 : deletedLineItems.length) {
|
1211
|
-
_this.showInactiveProductsConfirmation();
|
1212
|
-
}
|
1213
|
-
return lineItem;
|
1214
|
-
}));
|
1215
|
-
};
|
1216
|
-
ConfigurationService.prototype.createRequest = function (lineItem, runtimeContext, configurationMode) {
|
1217
|
-
var _a, _b, _c, _d, _e;
|
1218
|
-
if (runtimeContext.runtimeMode === i2.RuntimeMode.TEST) {
|
1219
|
-
var properties = Object.assign(Object.assign({}, runtimeContext.properties), { ModelId: runtimeContext.modelId, RuntimeMode: 'TEST', PricingEnabled: String((_a = runtimeContext.uiDefinition) === null || _a === void 0 ? void 0 : _a.pricingEnabled), StartDate: (_c = (_b = runtimeContext.properties) === null || _b === void 0 ? void 0 : _b.StartDate) !== null && _c !== void 0 ? _c : new Date().toISOString().substring(0, 10), PriceListId: (_d = runtimeContext.uiDefinition) === null || _d === void 0 ? void 0 : _d.priceList });
|
1220
|
-
this.contextService.update({ properties: properties });
|
1221
|
-
}
|
1222
|
-
else {
|
1223
|
-
var context = this.contextService.resolve();
|
1224
|
-
if (context.properties && ((_e = runtimeContext.properties) === null || _e === void 0 ? void 0 : _e.StartDate)) {
|
1225
|
-
this.contextService.update({
|
1226
|
-
properties: Object.assign(Object.assign({}, context.properties), runtimeContext.properties),
|
1227
|
-
});
|
1228
|
-
}
|
1229
|
-
}
|
1230
|
-
return {
|
1231
|
-
lineItem: lineItem,
|
1232
|
-
mode: configurationMode,
|
1233
|
-
step: runtimeContext.invocationContext && runtimeContext.invocationContext.runtimeStep,
|
1234
|
-
attributeDomainMode: 'ALL',
|
1235
|
-
context: this.contextService.resolve(),
|
1236
|
-
};
|
1237
|
-
};
|
1238
|
-
ConfigurationService.prototype.getDefaultLineItem = function (context) {
|
1239
|
-
var _a, _b, _c, _d;
|
1240
|
-
var id = i7.UUID.UUID();
|
1241
|
-
var lineItem = Object.assign({ id: id, type: (_b = (_a = context.uiDefinition) === null || _a === void 0 ? void 0 : _a.rootType) !== null && _b !== void 0 ? _b : '', cfgStatus: 'Default', qty: 1, productName: ((_c = context.properties) === null || _c === void 0 ? void 0 : _c.displayName) || context.productName, productId: (_d = context.productId) !== null && _d !== void 0 ? _d : '', offeringId: context.offeringId }, (context.offeringId
|
1242
|
-
? { offeringId: context.offeringId, offeringInstanceId: context.offeringInstanceId || id }
|
1243
|
-
: {}));
|
1244
|
-
return lineItem;
|
1245
|
-
};
|
1246
|
-
ConfigurationService.prototype.showInactiveProductsConfirmation = function () {
|
1247
|
-
var _this = this;
|
1248
|
-
var confirmationConfig = {
|
1249
|
-
title: ' ',
|
1250
|
-
description: 'This quote contains inactive products. Do you want to remove them?',
|
1251
|
-
primaryButtonLabel: 'Remove products',
|
1252
|
-
secondaryButtonLabel: 'Back to Quote',
|
1253
|
-
};
|
1254
|
-
this.dialogService
|
1255
|
-
.open(i8.ConfirmationComponent, {
|
1256
|
-
dismissableMask: false,
|
1257
|
-
closeOnEscape: false,
|
1258
|
-
closable: false,
|
1259
|
-
showHeader: true,
|
1260
|
-
header: "Inactive Products in Quote",
|
1261
|
-
width: '440px',
|
1262
|
-
data: { confirmationConfig: confirmationConfig },
|
1263
|
-
})
|
1264
|
-
.onClose.subscribe(function (result) {
|
1265
|
-
if (!result) {
|
1266
|
-
var context = _this.contextService.resolve();
|
1267
|
-
window['VELO_BACK_FN'].apply(null, [context.headerId]);
|
1268
|
-
}
|
1269
|
-
});
|
1270
|
-
};
|
1271
|
-
return ConfigurationService;
|
1272
|
-
}());
|
1273
|
-
ConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationService, deps: [{ token: i1__namespace.ConfigurationApiService }, { token: i2__namespace.ContextService }, { token: i3__namespace.DialogService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1274
|
-
ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationService });
|
1275
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
|
1276
|
-
type: i0.Injectable
|
1277
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.ContextService }, { type: i3__namespace.DialogService }]; } });
|
1278
|
-
|
1279
|
-
var RuntimeService = /** @class */ (function () {
|
1280
|
-
function RuntimeService(configurationService, contextService, messageService) {
|
1281
|
-
this.configurationService = configurationService;
|
1282
|
-
this.contextService = contextService;
|
1283
|
-
this.messageService = messageService;
|
1284
|
-
this.solutionReadySubject = new rxjs.Subject();
|
1285
|
-
this.onSolutionReadyEvent = this.solutionReadySubject.asObservable();
|
1286
|
-
this.solutionUpdateStartedSubject = new rxjs.Subject();
|
1287
|
-
this.onSolutionUpdateStartedEvent = this.solutionUpdateStartedSubject.asObservable();
|
1288
|
-
this.solutionUpdatedSubject = new rxjs.Subject();
|
1289
|
-
this.onSolutionUpdatedEvent = this.solutionUpdatedSubject.asObservable();
|
1290
|
-
this.solutionProcessedSubject = new rxjs.Subject();
|
1291
|
-
this.onSolutionProcessed = this.solutionProcessedSubject.asObservable();
|
1292
|
-
this.solutionStopSubject = new rxjs.Subject();
|
1293
|
-
this.onSolutionStopEvent = this.solutionStopSubject.asObservable();
|
1294
|
-
this.solutionCancelSubject = new rxjs.Subject();
|
1295
|
-
this.onSolutionCancelEvent = this.solutionCancelSubject.asObservable();
|
1296
|
-
this.uiRefreshSubject = new rxjs.Subject();
|
1297
|
-
this.onUIRefreshEvent = this.uiRefreshSubject.asObservable();
|
1298
|
-
}
|
1299
|
-
RuntimeService.prototype.displayErrorMessage = function (error) {
|
1300
|
-
var _a;
|
1301
|
-
this.messageService.add({
|
1302
|
-
severity: 'error',
|
1303
|
-
summary: ((_a = error.error) === null || _a === void 0 ? void 0 : _a.message) || error.message || JSON.stringify(error),
|
1304
|
-
});
|
1305
|
-
};
|
1306
|
-
RuntimeService.prototype.startRuntime = function (context, states, resolve) {
|
1307
|
-
var _this = this;
|
1308
|
-
this.setRuntimeContext(context);
|
1309
|
-
this.setRuntimeStep(i2.RuntimeStep.START);
|
1310
|
-
this.configurationService
|
1311
|
-
.configure(context, states, resolve)
|
1312
|
-
.pipe(rxjsOperators.take(1))
|
1313
|
-
.subscribe(function (lineItem) {
|
1314
|
-
_this.solutionReadySubject.next(lineItem);
|
1315
|
-
}, function (error) {
|
1316
|
-
_this.displayErrorMessage(error);
|
1317
|
-
_this.solutionUpdatedSubject.next(error);
|
1318
|
-
});
|
1319
|
-
};
|
1320
|
-
RuntimeService.prototype.updateRuntime = function (states, configurationContextProperties) {
|
1321
|
-
var _this = this;
|
1322
|
-
if (!this.runtimeContext) {
|
1323
|
-
return;
|
1324
|
-
}
|
1325
|
-
this.solutionUpdateStartedSubject.next();
|
1326
|
-
this.setRuntimeStep(i2.RuntimeStep.UPDATE);
|
1327
|
-
this.updateRuntimeContext(configurationContextProperties);
|
1328
|
-
this.configurationService
|
1329
|
-
.configure(this.runtimeContext, states)
|
1330
|
-
.pipe(rxjsOperators.take(1))
|
1331
|
-
.subscribe(function (lineItem) {
|
1332
|
-
var context = _this.contextService.resolve();
|
1333
|
-
_this.updateRuntimeContext(context.properties);
|
1334
|
-
_this.solutionUpdatedSubject.next(lineItem);
|
1335
|
-
}, function (error) {
|
1336
|
-
_this.displayErrorMessage(error);
|
1337
|
-
_this.solutionUpdatedSubject.next(error);
|
1338
|
-
});
|
1339
|
-
};
|
1340
|
-
RuntimeService.prototype.stopRuntime = function (solutionLineItem) {
|
1341
|
-
this.solutionStopSubject.next(solutionLineItem);
|
1342
|
-
};
|
1343
|
-
RuntimeService.prototype.cancelRuntime = function () {
|
1344
|
-
this.solutionCancelSubject.next();
|
1345
|
-
};
|
1346
|
-
RuntimeService.prototype.setRuntimeContext = function (runtimeContext) {
|
1347
|
-
this.runtimeContext = runtimeContext;
|
1348
|
-
};
|
1349
|
-
RuntimeService.prototype.getRuntimeContext = function () {
|
1350
|
-
return this.runtimeContext;
|
1351
|
-
};
|
1352
|
-
RuntimeService.prototype.solutionProcessed = function (lineItem) {
|
1353
|
-
this.solutionProcessedSubject.next(lineItem);
|
1354
|
-
};
|
1355
|
-
RuntimeService.prototype.refreshUI = function (uiDefinition) {
|
1356
|
-
if (!this.runtimeContext) {
|
1357
|
-
return;
|
1358
|
-
}
|
1359
|
-
this.runtimeContext = Object.assign(Object.assign({}, this.runtimeContext), { uiDefinition: uiDefinition });
|
1360
|
-
this.uiRefreshSubject.next();
|
1361
|
-
};
|
1362
|
-
RuntimeService.prototype.updateRuntimeContext = function (configurationContextProperties) {
|
1363
|
-
if (!this.runtimeContext || !configurationContextProperties) {
|
1364
|
-
return;
|
1365
|
-
}
|
1366
|
-
this.runtimeContext = Object.assign(Object.assign({}, this.runtimeContext), { properties: configurationContextProperties });
|
1367
|
-
};
|
1368
|
-
RuntimeService.prototype.setRuntimeStep = function (runtimeStep) {
|
1369
|
-
if (!this.runtimeContext) {
|
1370
|
-
return;
|
1371
|
-
}
|
1372
|
-
this.runtimeContext.invocationContext = Object.assign(Object.assign({}, this.runtimeContext.invocationContext), { runtimeStep: runtimeStep });
|
1373
|
-
};
|
1374
|
-
return RuntimeService;
|
1375
|
-
}());
|
1376
|
-
RuntimeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeService, deps: [{ token: ConfigurationService }, { token: i2__namespace.ContextService }, { token: i3__namespace$1.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1377
|
-
RuntimeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeService });
|
1378
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeService, decorators: [{
|
1379
|
-
type: i0.Injectable
|
1380
|
-
}], ctorParameters: function () { return [{ type: ConfigurationService }, { type: i2__namespace.ContextService }, { type: i3__namespace$1.MessageService }]; } });
|
1381
|
-
|
1382
|
-
var ShoppingCartService = /** @class */ (function () {
|
1383
|
-
function ShoppingCartService(priceApiService, contextService, quoteService) {
|
1384
|
-
this.priceApiService = priceApiService;
|
1385
|
-
this.contextService = contextService;
|
1386
|
-
this.quoteService = quoteService;
|
1387
|
-
}
|
1388
|
-
ShoppingCartService.prototype.setCartExternally = function (currentState) {
|
1389
|
-
var _this = this;
|
1390
|
-
var context = this.contextService.resolve();
|
1391
|
-
return this.priceApiService.calculate({ context: context, currentState: currentState }).pipe(rxjsOperators.take(1), rxjsOperators.tap(function (_a) {
|
1392
|
-
var lineItems = _a.lineItems;
|
1393
|
-
_this.quoteService.setCurrentLineItemState(lineItems);
|
1394
|
-
}));
|
1395
|
-
};
|
1396
|
-
ShoppingCartService.prototype.getCurrentState = function () {
|
1397
|
-
return this.quoteService.currentState;
|
1398
|
-
};
|
1399
|
-
return ShoppingCartService;
|
1400
|
-
}());
|
1401
|
-
ShoppingCartService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartService, deps: [{ token: i1__namespace.PriceApiService }, { token: i2__namespace.ContextService }, { token: i2__namespace.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1402
|
-
ShoppingCartService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartService });
|
1403
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ShoppingCartService, decorators: [{
|
1404
|
-
type: i0.Injectable
|
1405
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.PriceApiService }, { type: i2__namespace.ContextService }, { type: i2__namespace.QuoteDraftService }]; } });
|
1406
|
-
|
1407
|
-
var CurrentStateService = /** @class */ (function () {
|
1408
|
-
function CurrentStateService() {
|
1409
|
-
this.currentState = [];
|
1410
|
-
}
|
1411
|
-
CurrentStateService.prototype.update = function (state) {
|
1412
|
-
this.currentState = state;
|
1413
|
-
};
|
1414
|
-
return CurrentStateService;
|
1415
|
-
}());
|
1416
|
-
CurrentStateService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CurrentStateService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1417
|
-
CurrentStateService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CurrentStateService, providedIn: 'root' });
|
1418
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: CurrentStateService, decorators: [{
|
1419
|
-
type: i0.Injectable,
|
1420
|
-
args: [{ providedIn: 'root' }]
|
1421
|
-
}] });
|
1422
|
-
|
1423
|
-
var ProductModelCacheService = /** @class */ (function () {
|
1424
|
-
function ProductModelCacheService(productModelApiService) {
|
1425
|
-
this.productModelApiService = productModelApiService;
|
1426
|
-
this.cachedModel = new Map();
|
1427
|
-
}
|
1428
|
-
ProductModelCacheService.prototype.getProductModel = function (currentModelId, version) {
|
1429
|
-
if (!this.cachedModel.has(currentModelId) || version) {
|
1430
|
-
this.clearCache();
|
1431
|
-
this.cachedModel.set(currentModelId, this.productModelApiService.load(currentModelId, version).pipe(rxjsOperators.shareReplay(1)));
|
1432
|
-
}
|
1433
|
-
return this.cachedModel.get(currentModelId);
|
1434
|
-
};
|
1435
|
-
ProductModelCacheService.prototype.getCachedModel = function () {
|
1436
|
-
var ids = Array.from(this.cachedModel.keys());
|
1437
|
-
return this.cachedModel.get(ids[0]);
|
1438
|
-
};
|
1439
|
-
ProductModelCacheService.prototype.clearCache = function () {
|
1440
|
-
this.cachedModel.clear();
|
1441
|
-
};
|
1442
|
-
return ProductModelCacheService;
|
1443
|
-
}());
|
1444
|
-
ProductModelCacheService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModelCacheService, deps: [{ token: i1__namespace.ProductModelApiService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1445
|
-
ProductModelCacheService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModelCacheService });
|
1446
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ProductModelCacheService, decorators: [{
|
1447
|
-
type: i0.Injectable
|
1448
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.ProductModelApiService }]; } });
|
1449
|
-
|
1450
|
-
var RuntimeContextService = /** @class */ (function () {
|
1451
|
-
function RuntimeContextService(configurationApiService, messageService, contextService) {
|
1452
|
-
this.configurationApiService = configurationApiService;
|
1453
|
-
this.messageService = messageService;
|
1454
|
-
this.contextService = contextService;
|
1455
|
-
}
|
1456
|
-
RuntimeContextService.prototype.getRuntimeContext = function (productId, offeringId) {
|
1457
|
-
var _this = this;
|
1458
|
-
return this.configurationApiService.getRuntimeDataByProductId(productId, offeringId).pipe(rxjsOperators.map(function (runtimeData) {
|
1459
|
-
var _a;
|
1460
|
-
var uiDefinition = _this.getUIDefinition(runtimeData.uiDefinitions);
|
1461
|
-
var runtimeModel = i7.RuntimeModel.create(runtimeData.types, runtimeData.products);
|
1462
|
-
var _b = (_a = Array.from(runtimeModel.components.values()).find(function (c) { return c.productId === productId; })) !== null && _a !== void 0 ? _a : {}, productName = _b.productName, properties = _b.properties;
|
1463
|
-
return {
|
1464
|
-
modelId: runtimeData.modelId,
|
1465
|
-
uiDefinition: uiDefinition,
|
1466
|
-
runtimeModel: runtimeModel,
|
1467
|
-
runtimeMode: i2.RuntimeMode.PROD,
|
1468
|
-
productId: productId,
|
1469
|
-
productType: (properties === null || properties === void 0 ? void 0 : properties.displayName) || productName,
|
1470
|
-
offeringId: offeringId,
|
1471
|
-
properties: {
|
1472
|
-
PricingEnabled: uiDefinition.pricingEnabled ? 'true' : 'false',
|
1473
|
-
},
|
1474
|
-
};
|
1475
|
-
}));
|
1476
|
-
};
|
1477
|
-
RuntimeContextService.prototype.getUIDefinition = function (uiDefinitions) {
|
1478
|
-
if (uiDefinitions === void 0) { uiDefinitions = []; }
|
1479
|
-
var uiDefinitionId = this.contextService.resolve().uiDefinitionId;
|
1480
|
-
var findByFn = function (uiDef) { return (uiDefinitionId ? uiDefinitionId === uiDef.id : uiDef.primary); };
|
1481
|
-
var uiDefinition = uiDefinitions.find(findByFn) || (uiDefinitions.length === 1 && Object.assign({}, uiDefinitions[0]));
|
1482
|
-
if (!uiDefinition) {
|
1483
|
-
var errMsg = "Unable to find " + (uiDefinitionId ? uiDefinitionId : 'Default') + " UI";
|
1484
|
-
this.messageService.add({
|
1485
|
-
severity: 'error',
|
1486
|
-
summary: 'ERROR',
|
1487
|
-
});
|
1488
|
-
throw new Error(errMsg);
|
1489
|
-
}
|
1490
|
-
i7.SectionPathUtil.updateSectionsPath(uiDefinition.sections);
|
1491
|
-
return uiDefinition;
|
1492
|
-
};
|
1493
|
-
return RuntimeContextService;
|
1494
|
-
}());
|
1495
|
-
RuntimeContextService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeContextService, deps: [{ token: i1__namespace.ConfigurationApiService }, { token: i3__namespace$1.MessageService }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1496
|
-
RuntimeContextService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeContextService });
|
1497
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeContextService, decorators: [{
|
1498
|
-
type: i0.Injectable
|
1499
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.ConfigurationApiService }, { type: i3__namespace$1.MessageService }, { type: i2__namespace.ContextService }]; } });
|
1500
|
-
|
1501
|
-
var SectionStoreService = /** @class */ (function () {
|
1502
|
-
function SectionStoreService() {
|
1503
|
-
this._componentFactories = [];
|
1504
|
-
}
|
1505
|
-
Object.defineProperty(SectionStoreService.prototype, "componentFactories", {
|
1506
|
-
get: function () {
|
1507
|
-
return this._componentFactories;
|
1508
|
-
},
|
1509
|
-
set: function (data) {
|
1510
|
-
this._componentFactories = data;
|
1511
|
-
},
|
1512
|
-
enumerable: false,
|
1513
|
-
configurable: true
|
1514
|
-
});
|
1515
|
-
SectionStoreService.prototype.getComponentFactory = function (section) {
|
1516
|
-
return this.componentFactories.find(function (f) { return f.selector === section.dynamicSelector; });
|
1517
|
-
};
|
1518
|
-
return SectionStoreService;
|
1519
|
-
}());
|
1520
|
-
SectionStoreService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionStoreService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1521
|
-
SectionStoreService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionStoreService });
|
1522
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionStoreService, decorators: [{
|
1523
|
-
type: i0.Injectable
|
1524
|
-
}] });
|
1525
|
-
|
1526
|
-
var SectionScopeService = /** @class */ (function () {
|
1527
|
-
function SectionScopeService() {
|
1528
|
-
this.indent = 1;
|
1529
|
-
this.templates = new rxjs.BehaviorSubject([]);
|
1530
|
-
}
|
1531
|
-
Object.defineProperty(SectionScopeService.prototype, "section", {
|
1532
|
-
get: function () {
|
1533
|
-
return this._section;
|
1534
|
-
},
|
1535
|
-
set: function (value) {
|
1536
|
-
this._section = value;
|
1537
|
-
this.indent = this.getIndent(value);
|
1538
|
-
},
|
1539
|
-
enumerable: false,
|
1540
|
-
configurable: true
|
1541
|
-
});
|
1542
|
-
SectionScopeService.prototype.getIndent = function (section) {
|
1543
|
-
if (!section || !section.parentId) {
|
1544
|
-
return 1;
|
1545
|
-
}
|
1546
|
-
else {
|
1547
|
-
var current = section;
|
1548
|
-
var indent = 1;
|
1549
|
-
while (current && current.parent) {
|
1550
|
-
current = current.parent;
|
1551
|
-
indent++;
|
1552
|
-
}
|
1553
|
-
return indent;
|
1554
|
-
}
|
1555
|
-
};
|
1556
|
-
return SectionScopeService;
|
1557
|
-
}());
|
1558
|
-
SectionScopeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionScopeService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
1559
|
-
SectionScopeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionScopeService });
|
1560
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionScopeService, decorators: [{
|
1561
|
-
type: i0.Injectable
|
1562
|
-
}] });
|
1563
|
-
|
1564
|
-
var ExecutionSectionRendererComponent = /** @class */ (function () {
|
1565
|
-
function ExecutionSectionRendererComponent(_injector, _m, sectionScope, sectionStore) {
|
1566
|
-
this._injector = _injector;
|
1567
|
-
this._m = _m;
|
1568
|
-
this.sectionScope = sectionScope;
|
1569
|
-
this.sectionStore = sectionStore;
|
1570
|
-
this.componentRef = null;
|
1571
|
-
}
|
1572
|
-
Object.defineProperty(ExecutionSectionRendererComponent.prototype, "section", {
|
1573
|
-
get: function () {
|
1574
|
-
return this._section;
|
1575
|
-
},
|
1576
|
-
set: function (value) {
|
1577
|
-
this._section = value;
|
1578
|
-
this.sectionScope.section = value;
|
1579
|
-
},
|
1580
|
-
enumerable: false,
|
1581
|
-
configurable: true
|
1582
|
-
});
|
1583
|
-
ExecutionSectionRendererComponent.prototype.ngOnInit = function () {
|
1584
|
-
this.renderSection();
|
1585
|
-
};
|
1586
|
-
ExecutionSectionRendererComponent.prototype.ngAfterViewInit = function () {
|
1587
|
-
var _a, _b;
|
1588
|
-
if (this.componentRef) {
|
1589
|
-
this.sectionScope.templates.next((_b = (_a = this.componentRef.instance['templates']) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : []);
|
1590
|
-
}
|
1591
|
-
};
|
1592
|
-
ExecutionSectionRendererComponent.prototype.ngOnDestroy = function () {
|
1593
|
-
if (this.componentRef) {
|
1594
|
-
this.componentRef.destroy();
|
1595
|
-
this.componentRef = null;
|
1596
|
-
}
|
1597
|
-
};
|
1598
|
-
ExecutionSectionRendererComponent.prototype.renderSection = function () {
|
1599
|
-
var _a;
|
1600
|
-
if (this.componentRef) {
|
1601
|
-
this.componentRef.destroy();
|
1602
|
-
this.componentRef = null;
|
1603
|
-
}
|
1604
|
-
var componentFactory = this.sectionStore.getComponentFactory(this._section);
|
1605
|
-
if (!componentFactory) {
|
1606
|
-
return;
|
1607
|
-
}
|
1608
|
-
this.componentRef = componentFactory.create(this._injector, [], null, this._m);
|
1609
|
-
this.componentRef.location.nativeElement.setAttribute('sectionId', "" + ((_a = this._section.model) === null || _a === void 0 ? void 0 : _a.id) + this._section.label);
|
1610
|
-
this.componentRef.instance['form'] = this.form;
|
1611
|
-
this.componentRef.instance['section'] = this.section;
|
1612
|
-
this.container.insert(this.componentRef.hostView);
|
1613
|
-
};
|
1614
|
-
return ExecutionSectionRendererComponent;
|
1615
|
-
}());
|
1616
|
-
ExecutionSectionRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExecutionSectionRendererComponent, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.NgModuleRef }, { token: SectionScopeService }, { token: SectionStoreService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
1617
|
-
ExecutionSectionRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ExecutionSectionRendererComponent, selector: "section-renderer", inputs: { section: "section", form: "form" }, providers: [SectionScopeService], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: "<ng-template #container></ng-template>", styles: [":host{display:contents}\n"] });
|
1618
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExecutionSectionRendererComponent, decorators: [{
|
1619
|
-
type: i0.Component,
|
1620
|
-
args: [{
|
1621
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
1622
|
-
selector: 'section-renderer',
|
1623
|
-
templateUrl: 'execution-section-renderer.component.html',
|
1624
|
-
styleUrls: ['execution-section-renderer.component.scss'],
|
1625
|
-
providers: [SectionScopeService],
|
1626
|
-
}]
|
1627
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i0__namespace.NgModuleRef }, { type: SectionScopeService }, { type: SectionStoreService }]; }, propDecorators: { section: [{
|
1628
|
-
type: i0.Input
|
1629
|
-
}], form: [{
|
1630
|
-
type: i0.Input
|
1631
|
-
}], container: [{
|
1632
|
-
type: i0.ViewChild,
|
1633
|
-
args: ['container', { read: i0.ViewContainerRef, static: true }]
|
1634
|
-
}] } });
|
1635
|
-
|
1636
|
-
var ChildrenPlaceholderComponent = /** @class */ (function () {
|
1637
|
-
function ChildrenPlaceholderComponent(sectionScope, formScope, collapsibleState) {
|
1638
|
-
this.sectionScope = sectionScope;
|
1639
|
-
this.formScope = formScope;
|
1640
|
-
this.collapsibleState = collapsibleState;
|
1641
|
-
this._children = [];
|
1642
|
-
this.collapsed = false;
|
1643
|
-
}
|
1644
|
-
ChildrenPlaceholderComponent.prototype.ngOnInit = function () {
|
1645
|
-
var _this = this;
|
1646
|
-
this.section = this.sectionScope.section;
|
1647
|
-
this.form = this.formScope.form;
|
1648
|
-
this.collapsed = this.section.model ? this.collapsibleState.isCollapsedSection(this.section.model.id) : true;
|
1649
|
-
this.sub = this.collapsibleState.collapseSectionEvent.subscribe(function (e) {
|
1650
|
-
var _a;
|
1651
|
-
var lineItemId = e[0];
|
1652
|
-
if (((_a = _this.section.model) === null || _a === void 0 ? void 0 : _a.id) === lineItemId) {
|
1653
|
-
_this.collapsed = e[1];
|
1654
|
-
}
|
1655
|
-
});
|
1656
|
-
this.setChildren();
|
1657
|
-
};
|
1658
|
-
ChildrenPlaceholderComponent.prototype.ngOnChanges = function (changes) {
|
1659
|
-
var _a, _b;
|
1660
|
-
if (!this.children || ((_a = changes.children) === null || _a === void 0 ? void 0 : _a.currentValue) !== ((_b = changes.children) === null || _b === void 0 ? void 0 : _b.previousValue)) {
|
1661
|
-
this.setChildren();
|
1662
|
-
}
|
1663
|
-
};
|
1664
|
-
ChildrenPlaceholderComponent.prototype.setChildren = function () {
|
1665
|
-
this._children = this.children ? this.children : this.section.children;
|
1666
|
-
};
|
1667
|
-
ChildrenPlaceholderComponent.prototype.ngOnDestroy = function () {
|
1668
|
-
this.sub.unsubscribe();
|
1669
|
-
};
|
1670
|
-
return ChildrenPlaceholderComponent;
|
1671
|
-
}());
|
1672
|
-
ChildrenPlaceholderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ChildrenPlaceholderComponent, deps: [{ token: SectionScopeService }, { token: FormScopeService }, { token: CollapsibleStateService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
1673
|
-
ChildrenPlaceholderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ChildrenPlaceholderComponent, selector: "children-placeholder", inputs: { children: "children" }, providers: [i7.OrderByPipe], usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!collapsed\">\n <ng-container *ngFor=\"let child of _children\">\n <section-renderer [section]=\"child\" [form]=\"form\" *ngIf=\"!child.hidden\"></section-renderer>\n </ng-container>\n</ng-container>\n", components: [{ type: ExecutionSectionRendererComponent, selector: "section-renderer", inputs: ["section", "form"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
1674
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ChildrenPlaceholderComponent, decorators: [{
|
1675
|
-
type: i0.Component,
|
1676
|
-
args: [{
|
1677
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
1678
|
-
selector: 'children-placeholder',
|
1679
|
-
templateUrl: 'children-placeholder.component.html',
|
1680
|
-
providers: [i7.OrderByPipe],
|
1681
|
-
}]
|
1682
|
-
}], ctorParameters: function () { return [{ type: SectionScopeService }, { type: FormScopeService }, { type: CollapsibleStateService }]; }, propDecorators: { children: [{
|
1683
|
-
type: i0.Input
|
1684
|
-
}] } });
|
1685
|
-
var TemplateComponent = /** @class */ (function (_super) {
|
1686
|
-
__extends(TemplateComponent, _super);
|
1687
|
-
function TemplateComponent() {
|
1688
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
1689
|
-
}
|
1690
|
-
return TemplateComponent;
|
1691
|
-
}(ChildrenPlaceholderComponent));
|
1692
|
-
TemplateComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TemplateComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
|
1693
|
-
TemplateComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TemplateComponent, selector: "template-component", usesInheritance: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"!collapsed\">\n <ng-container *ngFor=\"let child of _children\">\n <section-renderer [section]=\"child\" [form]=\"form\" *ngIf=\"!child.hidden\"></section-renderer>\n </ng-container>\n</ng-container>\n", components: [{ type: ExecutionSectionRendererComponent, selector: "section-renderer", inputs: ["section", "form"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
1694
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TemplateComponent, decorators: [{
|
1695
|
-
type: i0.Component,
|
1696
|
-
args: [{
|
1697
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
1698
|
-
selector: 'template-component',
|
1699
|
-
templateUrl: 'children-placeholder.component.html',
|
1700
|
-
}]
|
1701
|
-
}] });
|
1702
|
-
|
1703
|
-
var ContextProviderComponent = /** @class */ (function () {
|
1704
|
-
function ContextProviderComponent(runtimeService) {
|
1705
|
-
this.runtimeService = runtimeService;
|
1706
|
-
this.types = [];
|
1707
|
-
this.products = {};
|
1708
|
-
}
|
1709
|
-
ContextProviderComponent.prototype.ngOnInit = function () {
|
1710
|
-
var context = this.runtimeService.getRuntimeContext();
|
1711
|
-
if (!context) {
|
1712
|
-
return;
|
1713
|
-
}
|
1714
|
-
this.runtimeService.setRuntimeContext(Object.assign(Object.assign({}, context), { runtimeModel: i7.RuntimeModel.create(this.types, this.products) }));
|
1715
|
-
};
|
1716
|
-
return ContextProviderComponent;
|
1717
|
-
}());
|
1718
|
-
ContextProviderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ContextProviderComponent, deps: [{ token: RuntimeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
1719
|
-
ContextProviderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ContextProviderComponent, selector: "vl-context-provider", inputs: { types: "types", products: "products" }, ngImport: i0__namespace, template: '', isInline: true });
|
1720
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ContextProviderComponent, decorators: [{
|
1721
|
-
type: i0.Component,
|
1722
|
-
args: [{
|
1723
|
-
selector: 'vl-context-provider',
|
1724
|
-
template: '',
|
1725
|
-
}]
|
1726
|
-
}], ctorParameters: function () {
|
1727
|
-
return [{ type: RuntimeService, decorators: [{
|
1728
|
-
type: i0.Inject,
|
1729
|
-
args: [RuntimeService]
|
1730
|
-
}] }];
|
1731
|
-
}, propDecorators: { types: [{
|
1732
|
-
type: i0.Input
|
1733
|
-
}], products: [{
|
1734
|
-
type: i0.Input
|
1735
|
-
}] } });
|
1736
|
-
|
1737
|
-
var moduleMap = {};
|
1738
|
-
function loadRemoteEntry(remoteEntry) {
|
1739
|
-
return new Promise(function (resolve, reject) {
|
1740
|
-
if (moduleMap[remoteEntry]) {
|
1741
|
-
resolve();
|
1742
|
-
return;
|
1743
|
-
}
|
1744
|
-
var script = document.createElement('script');
|
1745
|
-
script.src = remoteEntry;
|
1746
|
-
script.onerror = reject;
|
1747
|
-
script.onload = function () {
|
1748
|
-
moduleMap[remoteEntry] = true;
|
1749
|
-
resolve(); // window is the global namespace
|
1750
|
-
};
|
1751
|
-
document.body.append(script);
|
1752
|
-
});
|
1753
|
-
}
|
1754
|
-
function lookupExposedModule(remoteName, exposedModule) {
|
1755
|
-
return __awaiter(this, void 0, void 0, function () {
|
1756
|
-
var container, factory, Module;
|
1757
|
-
return __generator(this, function (_a) {
|
1758
|
-
switch (_a.label) {
|
1759
|
-
case 0:
|
1760
|
-
// Initializes the share scope. This fills it with known provided modules from this build and all remotes
|
1761
|
-
return [4 /*yield*/, __webpack_init_sharing__('default')];
|
1762
|
-
case 1:
|
1763
|
-
// Initializes the share scope. This fills it with known provided modules from this build and all remotes
|
1764
|
-
_a.sent();
|
1765
|
-
container = window[remoteName];
|
1766
|
-
// Initialize the container, it may provide shared modules
|
1767
|
-
return [4 /*yield*/, container.init(__webpack_share_scopes__.default)];
|
1768
|
-
case 2:
|
1769
|
-
// Initialize the container, it may provide shared modules
|
1770
|
-
_a.sent();
|
1771
|
-
return [4 /*yield*/, container.get(exposedModule)];
|
1772
|
-
case 3:
|
1773
|
-
factory = _a.sent();
|
1774
|
-
Module = factory();
|
1775
|
-
return [2 /*return*/, Module];
|
1776
|
-
}
|
1777
|
-
});
|
1778
|
-
});
|
1779
|
-
}
|
1780
|
-
function loadRemoteModule(options) {
|
1781
|
-
return __awaiter(this, void 0, void 0, function () {
|
1782
|
-
return __generator(this, function (_a) {
|
1783
|
-
switch (_a.label) {
|
1784
|
-
case 0: return [4 /*yield*/, loadRemoteEntry(options.remoteEntry)];
|
1785
|
-
case 1:
|
1786
|
-
_a.sent();
|
1787
|
-
return [4 /*yield*/, lookupExposedModule(options.remoteName, options.exposedModule)];
|
1788
|
-
case 2: return [2 /*return*/, _a.sent()];
|
1789
|
-
}
|
1790
|
-
});
|
1791
|
-
});
|
1792
|
-
}
|
1793
|
-
|
1794
|
-
var IntegrationEvent;
|
1795
|
-
(function (IntegrationEvent) {
|
1796
|
-
IntegrationEvent["Init"] = "Init";
|
1797
|
-
})(IntegrationEvent || (IntegrationEvent = {}));
|
1798
|
-
var FederatedComponent = /** @class */ (function () {
|
1799
|
-
function FederatedComponent(injector, compiler, appRef, renderer) {
|
1800
|
-
this.injector = injector;
|
1801
|
-
this.compiler = compiler;
|
1802
|
-
this.appRef = appRef;
|
1803
|
-
this.renderer = renderer;
|
1804
|
-
this.integrationEvent = new i0.EventEmitter();
|
1805
|
-
this.moduleReady = false;
|
1806
|
-
}
|
1807
|
-
FederatedComponent.prototype.ngAfterViewInit = function () {
|
1808
|
-
var _this = this;
|
1809
|
-
if (!this.remoteEntry || !this.remoteName || !this.exposedModule) {
|
1810
|
-
return;
|
1811
|
-
}
|
1812
|
-
loadRemoteModule({
|
1813
|
-
remoteEntry: this.remoteEntry,
|
1814
|
-
remoteName: this.remoteName,
|
1815
|
-
exposedModule: this.exposedModule,
|
1816
|
-
}).then(function (federated) {
|
1817
|
-
_this.compiler.compileModuleAsync(federated[_this.exposedModule]).then(function (moduleFactory) {
|
1818
|
-
var _a;
|
1819
|
-
var rootModuleRef = moduleFactory.create(_this.injector);
|
1820
|
-
var rootComponentFactory = rootModuleRef.componentFactoryResolver.resolveComponentFactory(federated[_this.exposedModule].rootComponent);
|
1821
|
-
var node = document.createElement('div');
|
1822
|
-
var _b = rootComponentFactory.create(_this.injector, [], node), instance = _b.instance, hostView = _b.hostView;
|
1823
|
-
_this.instance = instance;
|
1824
|
-
_this.instance.data = _this.data;
|
1825
|
-
_this.instance.eventData = _this.eventData;
|
1826
|
-
_this.instance.integrationEvent = _this.integrationEvent;
|
1827
|
-
_this.renderer.appendChild((_a = _this.moduleHostRef) === null || _a === void 0 ? void 0 : _a.nativeElement, node);
|
1828
|
-
_this.appRef.attachView(hostView);
|
1829
|
-
});
|
1830
|
-
});
|
1831
|
-
};
|
1832
|
-
FederatedComponent.prototype.ngOnChanges = function (changes) {
|
1833
|
-
if (!this.instance) {
|
1834
|
-
return;
|
1835
|
-
}
|
1836
|
-
this.instance.ngOnChanges(changes);
|
1837
|
-
};
|
1838
|
-
return FederatedComponent;
|
1839
|
-
}());
|
1840
|
-
FederatedComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FederatedComponent, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.Compiler }, { token: i0__namespace.ApplicationRef }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
1841
|
-
FederatedComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FederatedComponent, selector: "veloce-host-federated", inputs: { remoteEntry: "remoteEntry", remoteName: "remoteName", exposedModule: "exposedModule", data: "data", eventData: "eventData" }, outputs: { integrationEvent: "integrationEvent" }, viewQueries: [{ propertyName: "federatedComponent", first: true, predicate: ["federatedComponent"], descendants: true, read: i0.ViewContainerRef }, { propertyName: "foo", first: true, predicate: ["foo"], descendants: true, read: i0.TemplateRef }, { propertyName: "moduleHostRef", first: true, predicate: ["moduleHost"], descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div #moduleHost></div>\n", styles: [":host{display:block}div{height:100%}\n"], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
1842
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FederatedComponent, decorators: [{
|
1843
|
-
type: i0.Component,
|
1844
|
-
args: [{
|
1845
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
1846
|
-
selector: 'veloce-host-federated',
|
1847
|
-
templateUrl: './federated.component.html',
|
1848
|
-
styleUrls: ['./federated.component.scss'],
|
1849
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
1850
|
-
}]
|
1851
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i0__namespace.Compiler }, { type: i0__namespace.ApplicationRef }, { type: i0__namespace.Renderer2 }]; }, propDecorators: { federatedComponent: [{
|
1852
|
-
type: i0.ViewChild,
|
1853
|
-
args: ['federatedComponent', { read: i0.ViewContainerRef }]
|
1854
|
-
}], foo: [{
|
1855
|
-
type: i0.ViewChild,
|
1856
|
-
args: ['foo', { read: i0.TemplateRef }]
|
1857
|
-
}], moduleHostRef: [{
|
1858
|
-
type: i0.ViewChild,
|
1859
|
-
args: ['moduleHost', { static: false }]
|
1860
|
-
}], remoteEntry: [{
|
1861
|
-
type: i0.Input
|
1862
|
-
}], remoteName: [{
|
1863
|
-
type: i0.Input
|
1864
|
-
}], exposedModule: [{
|
1865
|
-
type: i0.Input
|
1866
|
-
}], data: [{
|
1867
|
-
type: i0.Input
|
1868
|
-
}], eventData: [{
|
1869
|
-
type: i0.Input
|
1870
|
-
}], integrationEvent: [{
|
1871
|
-
type: i0.Output
|
1872
|
-
}] } });
|
1873
|
-
|
1874
|
-
//TODO ALE WE ARE EXTENDING COMPONENT HERE IN PORTS WE ARE EXTENDING DEDICATED CLASS!! TYPES HANDLER IS NO IMPLEMENTED YET
|
1875
|
-
var VeloAttributeDirective = /** @class */ (function () {
|
1876
|
-
function VeloAttributeDirective(formScope, sectionScope) {
|
1877
|
-
this.formScope = formScope;
|
1878
|
-
this.sectionScope = sectionScope;
|
1879
|
-
this.valueQuantities = {};
|
1880
|
-
this.form = this.formScope.form;
|
1881
|
-
this.section = this.sectionScope.section;
|
1882
|
-
}
|
1883
|
-
VeloAttributeDirective.prototype.ngOnInit = function () {
|
1884
|
-
this.initQuantity();
|
1885
|
-
};
|
1886
|
-
VeloAttributeDirective.prototype.handleChange = function (valueOption) {
|
1887
|
-
var updateData = {
|
1888
|
-
id: this.section.id,
|
1889
|
-
action: 'update',
|
1890
|
-
valueOption: valueOption,
|
1891
|
-
};
|
1892
|
-
this.formScope.publishFormUpdate(updateData);
|
1893
|
-
};
|
1894
|
-
VeloAttributeDirective.prototype.handleChangDate = function (valueOption) {
|
1895
|
-
var oldValue = this.form.controls[this.section.id].value || '';
|
1896
|
-
var newValue = _.isDate(valueOption) ? valueOption.toLocaleDateString('en-us') : '';
|
1897
|
-
if (oldValue !== newValue) {
|
1898
|
-
this.handleChange(newValue);
|
1899
|
-
}
|
1900
|
-
};
|
1901
|
-
VeloAttributeDirective.prototype.handleRemove = function () {
|
1902
|
-
var updateData = {
|
1903
|
-
id: this.section.id,
|
1904
|
-
action: 'remove',
|
1905
|
-
};
|
1906
|
-
this.formScope.publishFormUpdate(updateData);
|
1907
|
-
};
|
1908
|
-
// TODO ALE THIS IS SPECIFIC STEPPER FUNCTIONS
|
1909
|
-
VeloAttributeDirective.prototype.nextVal = function () {
|
1910
|
-
var currentIndex = this.getCurrentValueIndex();
|
1911
|
-
var nextValIndex = currentIndex + 1;
|
1912
|
-
if (currentIndex != -1 &&
|
1913
|
-
this.section.sectionValue &&
|
1914
|
-
this.section.sectionValue.valueOptions.length >= nextValIndex) {
|
1915
|
-
this.handleChange(this.section.sectionValue.valueOptions[nextValIndex]);
|
1916
|
-
}
|
1917
|
-
};
|
1918
|
-
VeloAttributeDirective.prototype.prevVal = function () {
|
1919
|
-
var currentIndex = this.getCurrentValueIndex();
|
1920
|
-
var prevValIndex = currentIndex - 1;
|
1921
|
-
if (currentIndex != -1 &&
|
1922
|
-
this.section.sectionValue &&
|
1923
|
-
this.section.sectionValue.valueOptions.length >= prevValIndex) {
|
1924
|
-
this.handleChange(this.section.sectionValue.valueOptions[prevValIndex]);
|
1925
|
-
}
|
1926
|
-
};
|
1927
|
-
VeloAttributeDirective.prototype.initQuantity = function () {
|
1928
|
-
this.valueQuantities = this.section.model
|
1929
|
-
? SectionsBinderHelper.getQuantityGroupByValue(this.section.model, this.section.boundData.name)
|
1930
|
-
: {};
|
1931
|
-
};
|
1932
|
-
VeloAttributeDirective.prototype.getCurrentValueIndex = function () {
|
1933
|
-
var index = -1;
|
1934
|
-
var valueOptions = this.section.sectionValue && this.section.sectionValue.valueOptions;
|
1935
|
-
var currentValue = this.form.controls[this.section.id].value;
|
1936
|
-
if (valueOptions && i7.EntityUtil.isPresent(currentValue)) {
|
1937
|
-
return valueOptions.findIndex(function (valueOption) { return currentValue === valueOption; });
|
1938
|
-
}
|
1939
|
-
return index;
|
1940
|
-
};
|
1941
|
-
return VeloAttributeDirective;
|
1942
|
-
}());
|
1943
|
-
VeloAttributeDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloAttributeDirective, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
1944
|
-
VeloAttributeDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: VeloAttributeDirective, selector: "velo-attribute-directive", exportAs: ["attributeApi"], ngImport: i0__namespace });
|
1945
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloAttributeDirective, decorators: [{
|
1946
|
-
type: i0.Directive,
|
1947
|
-
args: [{
|
1948
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
1949
|
-
selector: 'velo-attribute-directive',
|
1950
|
-
exportAs: 'attributeApi',
|
1951
|
-
}]
|
1952
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
1953
|
-
|
1954
|
-
var MultiselectComponent = /** @class */ (function () {
|
1955
|
-
function MultiselectComponent(elRef, viewContainerRef, overlay) {
|
1956
|
-
this.elRef = elRef;
|
1957
|
-
this.viewContainerRef = viewContainerRef;
|
1958
|
-
this.overlay = overlay;
|
1959
|
-
this.selectionChange = new i0.EventEmitter();
|
1960
|
-
this.selected = [];
|
1961
|
-
this.displayValue = '';
|
1962
|
-
this.touched = false;
|
1963
|
-
this.disabled = false;
|
1964
|
-
this.opened = false;
|
1965
|
-
this.onChange = function () {
|
1966
|
-
return;
|
1967
|
-
};
|
1968
|
-
this.onTouched = function () {
|
1969
|
-
return;
|
1970
|
-
};
|
1971
|
-
}
|
1972
|
-
MultiselectComponent.prototype.ngOnDestroy = function () {
|
1973
|
-
this.destroyDropdown();
|
1974
|
-
};
|
1975
|
-
MultiselectComponent.prototype.writeValue = function (selected) {
|
1976
|
-
this.selected = selected;
|
1977
|
-
this.getDisplayValue();
|
1978
|
-
};
|
1979
|
-
MultiselectComponent.prototype.registerOnChange = function (onChange) {
|
1980
|
-
this.onChange = onChange;
|
1981
|
-
};
|
1982
|
-
MultiselectComponent.prototype.registerOnTouched = function (onTouched) {
|
1983
|
-
this.onTouched = onTouched;
|
1984
|
-
};
|
1985
|
-
MultiselectComponent.prototype.setDisabledState = function (disabled) {
|
1986
|
-
this.disabled = disabled;
|
1987
|
-
};
|
1988
|
-
MultiselectComponent.prototype.handleSelection = function (value) {
|
1989
|
-
var selectedItem = this.selected.find(function (item) { return item === value; });
|
1990
|
-
if (selectedItem) {
|
1991
|
-
this.selected = this.selected.filter(function (item) { return item !== value; });
|
1992
|
-
}
|
1993
|
-
else {
|
1994
|
-
this.selected = __spreadArray(__spreadArray([], __read(this.selected)), [value]);
|
1995
|
-
}
|
1996
|
-
this.getDisplayValue();
|
1997
|
-
this.selectionChange.emit(this.selected);
|
1998
|
-
this.onChange(this.selected);
|
1999
|
-
};
|
2000
|
-
MultiselectComponent.prototype.toggleOpened = function () {
|
2001
|
-
this.opened ? this.destroyDropdown() : this.openDropdown();
|
2002
|
-
};
|
2003
|
-
MultiselectComponent.prototype.getDisplayValue = function () {
|
2004
|
-
var joinedValue = this.selected.join(', ');
|
2005
|
-
this.displayValue = joinedValue.length > 24 ? this.selected.length + " options selected" : joinedValue;
|
2006
|
-
};
|
2007
|
-
MultiselectComponent.prototype.openDropdown = function () {
|
2008
|
-
var _this = this;
|
2009
|
-
this.opened = true;
|
2010
|
-
this.overlayRef = this.overlay.create({
|
2011
|
-
hasBackdrop: true,
|
2012
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
2013
|
-
scrollStrategy: this.overlay.scrollStrategies.close(),
|
2014
|
-
positionStrategy: this.overlay
|
2015
|
-
.position()
|
2016
|
-
.flexibleConnectedTo(this.elRef)
|
2017
|
-
.withPositions([
|
2018
|
-
{
|
2019
|
-
originX: 'end',
|
2020
|
-
originY: 'bottom',
|
2021
|
-
overlayX: 'end',
|
2022
|
-
overlayY: 'top',
|
2023
|
-
offsetY: 8,
|
2024
|
-
},
|
2025
|
-
]),
|
2026
|
-
});
|
2027
|
-
var templatePortal = new portal.TemplatePortal(this.overlayTemplate, this.viewContainerRef);
|
2028
|
-
this.overlayRef.attach(templatePortal);
|
2029
|
-
this.dropdownClosingActionsSub = this.dropdownClosingActions().subscribe(function () { return _this.destroyDropdown(); });
|
2030
|
-
};
|
2031
|
-
MultiselectComponent.prototype.dropdownClosingActions = function () {
|
2032
|
-
if (!this.overlayRef) {
|
2033
|
-
return rxjs.of();
|
2034
|
-
}
|
2035
|
-
var backdropClick$ = this.overlayRef.backdropClick();
|
2036
|
-
var detachment$ = this.overlayRef.detachments();
|
2037
|
-
return rxjs.merge(backdropClick$, detachment$);
|
2038
|
-
};
|
2039
|
-
MultiselectComponent.prototype.destroyDropdown = function () {
|
2040
|
-
var _a;
|
2041
|
-
if (!this.overlayRef || !this.opened) {
|
2042
|
-
return;
|
2043
|
-
}
|
2044
|
-
(_a = this.dropdownClosingActionsSub) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
2045
|
-
this.opened = false;
|
2046
|
-
this.overlayRef.detach();
|
2047
|
-
};
|
2048
|
-
return MultiselectComponent;
|
2049
|
-
}());
|
2050
|
-
MultiselectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MultiselectComponent, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.ViewContainerRef }, { token: i1__namespace$1.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2051
|
-
MultiselectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: MultiselectComponent, selector: "velo-multiselect", inputs: { options: "options" }, outputs: { selectionChange: "selectionChange" }, host: { properties: { "class.opened": "this.opened" } }, providers: [
|
2052
|
-
{
|
2053
|
-
provide: i4.NG_VALUE_ACCESSOR,
|
2054
|
-
multi: true,
|
2055
|
-
useExisting: MultiselectComponent,
|
2056
|
-
},
|
2057
|
-
], viewQueries: [{ propertyName: "overlayTemplate", first: true, predicate: ["overlayTemplate"], descendants: true }], ngImport: i0__namespace, template: "<div class=\"value-wrapper\" (click)=\"toggleOpened()\">\n <span class=\"value\">{{ displayValue }}</span>\n <i class=\"fa fa-chevron-down\"></i>\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"dropdown\">\n <div class=\"checkbox-select\" *ngFor=\"let option of options\">\n <label>\n <input\n type=\"checkbox\"\n [checked]=\"selected.includes(option)\"\n (change)=\"handleSelection(option)\"\n [value]=\"option\"\n />\n\n <i class=\"input-helper\"></i>\n {{ option }}\n </label>\n </div>\n </div>\n</ng-template>\n", styles: [":host{display:block;width:172px}:host[disabled] .value-wrapper{pointer-events:none;background:rgba(0,0,0,.06);border-color:#0003}:host.opened .value-wrapper{border-color:#0e8fff}:host.opened i{transform:rotate(180deg)}:host .value-wrapper{cursor:pointer;display:flex;align-items:center;justify-content:space-between;height:34px;padding:0 10px;border:1px solid #ddd;border-radius:3px;background:#fff}:host .value-wrapper .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dropdown{width:172px;max-height:200px;background:#fff;border:1px solid #ddd;border-radius:3px;overflow:auto}.dropdown .checkbox-select{padding:0 10px;width:100%}.dropdown .checkbox-select label{width:100%;height:36px;line-height:36px}.dropdown .checkbox-select .input-helper:before{top:10px}.dropdown .checkbox-select .input-helper:after{top:12px}.dropdown .checkbox-select:hover{background:#d5dddf}\n"], directives: [{ type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
2058
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: MultiselectComponent, decorators: [{
|
2059
|
-
type: i0.Component,
|
2060
|
-
args: [{
|
2061
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2062
|
-
selector: 'velo-multiselect',
|
2063
|
-
templateUrl: 'velo-multiselect.component.html',
|
2064
|
-
styleUrls: ['./velo-multiselect.component.scss'],
|
2065
|
-
providers: [
|
2066
|
-
{
|
2067
|
-
provide: i4.NG_VALUE_ACCESSOR,
|
2068
|
-
multi: true,
|
2069
|
-
useExisting: MultiselectComponent,
|
2070
|
-
},
|
2071
|
-
],
|
2072
|
-
}]
|
2073
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ViewContainerRef }, { type: i1__namespace$1.Overlay }]; }, propDecorators: { options: [{
|
2074
|
-
type: i0.Input
|
2075
|
-
}], selectionChange: [{
|
2076
|
-
type: i0.Output
|
2077
|
-
}], overlayTemplate: [{
|
2078
|
-
type: i0.ViewChild,
|
2079
|
-
args: ['overlayTemplate']
|
2080
|
-
}], opened: [{
|
2081
|
-
type: i0.HostBinding,
|
2082
|
-
args: ['class.opened']
|
2083
|
-
}] } });
|
2084
|
-
|
2085
|
-
var VeloAttributeComponent = /** @class */ (function (_super) {
|
2086
|
-
__extends(VeloAttributeComponent, _super);
|
2087
|
-
function VeloAttributeComponent(formScope, sectionScope) {
|
2088
|
-
var _this = this;
|
2089
|
-
var _a, _b;
|
2090
|
-
_this = _super.call(this, formScope, sectionScope) || this;
|
2091
|
-
_this.controlName = _this.section.id;
|
2092
|
-
_this.displayName = _this.getDisplayName();
|
2093
|
-
_this.isMultiselect =
|
2094
|
-
((_b = (_a = _this.section.model) === null || _a === void 0 ? void 0 : _a.attributes.find(function (attr) { return attr.name === _this.section.boundData.entity.name; })) === null || _b === void 0 ? void 0 : _b.type) ===
|
2095
|
-
'MULTIPLE';
|
2096
|
-
return _this;
|
2097
|
-
}
|
2098
|
-
VeloAttributeComponent.prototype.getValueOptions = function (valueOptions) {
|
2099
|
-
return this.isBooleanType(valueOptions) ? [0, 1] : valueOptions;
|
2100
|
-
};
|
2101
|
-
VeloAttributeComponent.prototype.getValueText = function (valueOptions, value) {
|
2102
|
-
if (this.isBooleanType(valueOptions)) {
|
2103
|
-
return value === 0 ? 'False' : 'True';
|
2104
|
-
}
|
2105
|
-
return value;
|
2106
|
-
};
|
2107
|
-
VeloAttributeComponent.prototype.handleMultiselectChange = function (value) {
|
2108
|
-
var _a;
|
2109
|
-
var formControl = this.form.get(this.controlName);
|
2110
|
-
if (!formControl) {
|
2111
|
-
return;
|
2112
|
-
}
|
2113
|
-
var currentValue = (_a = formControl.value) !== null && _a !== void 0 ? _a : [];
|
2114
|
-
var newValue = currentValue.includes(value) ? currentValue.filter(function (v) { return v !== value; }) : __spreadArray(__spreadArray([], __read(currentValue)), [value]);
|
2115
|
-
formControl.setValue(newValue);
|
2116
|
-
_super.prototype.handleChange.call(this);
|
2117
|
-
};
|
2118
|
-
VeloAttributeComponent.prototype.handleMultipleDropdownChange = function (event) {
|
2119
|
-
var formControl = this.form.get(this.controlName);
|
2120
|
-
if (!formControl) {
|
2121
|
-
return;
|
2122
|
-
}
|
2123
|
-
formControl.setValue(event);
|
2124
|
-
_super.prototype.handleChange.call(this);
|
2125
|
-
};
|
2126
|
-
VeloAttributeComponent.prototype.isBooleanType = function (value) {
|
2127
|
-
return Array.isArray(value) && value.length === 1 && value[0].min === 0 && value[0].max === 1;
|
2128
|
-
};
|
2129
|
-
VeloAttributeComponent.prototype.getDisplayName = function () {
|
2130
|
-
var _a, _b;
|
2131
|
-
return ((((_a = this.section.model) === null || _a === void 0 ? void 0 : _a.properties) && this.section.model.properties['displayName']) || ((_b = this.section.model) === null || _b === void 0 ? void 0 : _b.type) || '');
|
2132
|
-
};
|
2133
|
-
return VeloAttributeComponent;
|
2134
|
-
}(VeloAttributeDirective));
|
2135
|
-
VeloAttributeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloAttributeComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2136
|
-
VeloAttributeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VeloAttributeComponent, selector: "velo-attribute", usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"form-group div-inline\" [formGroup]=\"form\">\n <div class=\"input-form-input div-inline\" [class.input-form-input--required]=\"section.required\">\n <label>\n <ng-container *ngIf=\"section.required\"> * </ng-container>\n\n {{ section.label }}\n </label>\n <div [ngSwitch]=\"section.controlType\" class=\"form-control-wrapper\">\n <div *ngSwitchCase=\"'DROPDOWN'\">\n <select\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n class=\"form-control\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <option\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions) || []\"\n [ngValue]=\"valueOption\"\n >\n {{ getValueText(section.sectionValue?.valueOptions, valueOption) }}\n </option>\n </select>\n </div>\n\n <div *ngSwitchCase=\"'MULTISELECT'\">\n <velo-multiselect\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [options]=\"getValueOptions(section.sectionValue?.valueOptions)\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n (selectionChange)=\"handleMultipleDropdownChange($event)\"\n ></velo-multiselect>\n </div>\n\n <div *ngSwitchCase=\"'RADIO'\">\n <div\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions)\"\n class=\"radio-button\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <label>\n <input\n type=\"radio\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [value]=\"valueOption\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n <i class=\"input-helper\"></i>\n {{ getValueText(section.sectionValue?.valueOptions, valueOption) }}\n </label>\n </div>\n </div>\n\n <div *ngSwitchCase=\"'CHECKBOX'\">\n <ng-container *ngIf=\"!isMultiselect; else multiselect\">\n <div class=\"checkbox-select\" [attr.disabled]=\"section.readOnly ? true : null\">\n <label>\n <input\n type=\"checkbox\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [checked]=\"section.sectionValue?.value === 1\"\n (change)=\"handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n\n <i class=\"input-helper\"></i>\n \n </label>\n </div>\n </ng-container>\n\n <ng-template #multiselect>\n <div\n *ngFor=\"let valueOption of getValueOptions(section.sectionValue?.valueOptions)\"\n class=\"checkbox-select\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n >\n <label>\n <input\n type=\"checkbox\"\n [id]=\"controlName\"\n [checked]=\"section.sectionValue?.value.includes(valueOption)\"\n (change)=\"handleMultiselectChange(valueOption)\"\n [value]=\"valueOption\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n\n <i class=\"input-helper\"></i>\n {{ valueOption }}\n </label>\n </div>\n </ng-template>\n </div>\n\n <div *ngSwitchCase=\"'DATE'\">\n <input\n type=\"text\"\n class=\"form-control\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n (bsValueChange)=\"handleChangDate($event)\"\n bsDatepicker\n />\n </div>\n\n <div *ngSwitchDefault>\n <input\n type=\"text\"\n class=\"form-control\"\n [id]=\"controlName\"\n [formControlName]=\"controlName\"\n (blur)=\"form.controls[controlName].dirty && handleChange()\"\n [attr.disabled]=\"section.readOnly ? true : null\"\n />\n </div>\n\n <!-- Add validation messages -->\n <!-- <div validation-messages [form]=\"form\" [controlId]=\"controlName\" [showForPristine]=\"true\"></div> -->\n </div>\n </div>\n</div>\n", components: [{ type: MultiselectComponent, selector: "velo-multiselect", inputs: ["options"], outputs: ["selectionChange"] }], directives: [{ type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i5__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i4__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4__namespace.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i4__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: i4__namespace.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i5__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }] });
|
2137
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloAttributeComponent, decorators: [{
|
2138
|
-
type: i0.Component,
|
2139
|
-
args: [{
|
2140
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2141
|
-
selector: 'velo-attribute',
|
2142
|
-
templateUrl: 'velo-attribute.component.html',
|
2143
|
-
}]
|
2144
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
2145
|
-
|
2146
|
-
var VeloPortCheckBoxComponent = /** @class */ (function () {
|
2147
|
-
function VeloPortCheckBoxComponent(formScope, sectionScope) {
|
2148
|
-
var _this = this;
|
2149
|
-
var _a;
|
2150
|
-
this.formScope = formScope;
|
2151
|
-
this.sectionScope = sectionScope;
|
2152
|
-
this.showSelectAll = false;
|
2153
|
-
this.form = this.formScope.form;
|
2154
|
-
this.section = this.sectionScope.section;
|
2155
|
-
this.controlName = this.section.id;
|
2156
|
-
(_a = this.section.sectionValue) === null || _a === void 0 ? void 0 : _a.valueOptions.forEach(function (item) {
|
2157
|
-
if (_this.hasValueFor(item)) {
|
2158
|
-
_this.form.controls[_this.controlName].setValue(item);
|
2159
|
-
}
|
2160
|
-
});
|
2161
|
-
}
|
2162
|
-
VeloPortCheckBoxComponent.prototype.handleChange = function (valueOption) {
|
2163
|
-
var updateData = {
|
2164
|
-
id: this.section.id,
|
2165
|
-
action: this.hasValueFor(valueOption)
|
2166
|
-
? 'remove'
|
2167
|
-
: this.section.model && SectionsBinderHelper.isAddAllowed(this.section.model, this.section.boundData.name)
|
2168
|
-
? 'create'
|
2169
|
-
: 'update',
|
2170
|
-
valueOption: valueOption,
|
2171
|
-
};
|
2172
|
-
this.formScope.publishFormUpdate(updateData);
|
2173
|
-
};
|
2174
|
-
VeloPortCheckBoxComponent.prototype.hasValueFor = function (valueOption) {
|
2175
|
-
return !!this.findLineItemForValue(valueOption);
|
2176
|
-
};
|
2177
|
-
VeloPortCheckBoxComponent.prototype.selectAllChange = function () {
|
2178
|
-
var _a;
|
2179
|
-
var portDomain = (_a = this.section.model) === null || _a === void 0 ? void 0 : _a.portDomains[this.section.boundData.name];
|
2180
|
-
var updateData = {
|
2181
|
-
id: this.section.id,
|
2182
|
-
action: 'upsert',
|
2183
|
-
selectedValueOptions: this.isAllSelected() ? [] : portDomain ? portDomain.domainTypes.map(function (t) { return t.name; }) : [],
|
2184
|
-
};
|
2185
|
-
this.formScope.publishFormUpdate(updateData);
|
2186
|
-
};
|
2187
|
-
VeloPortCheckBoxComponent.prototype.isAllSelected = function () {
|
2188
|
-
var _this = this;
|
2189
|
-
var _a, _b;
|
2190
|
-
var selected = (_a = this.section.model) === null || _a === void 0 ? void 0 : _a.lineItems.filter(function (li) { return li.port && li.port === _this.section.boundData.name; });
|
2191
|
-
var portDomain = (_b = this.section.model) === null || _b === void 0 ? void 0 : _b.portDomains[this.section.boundData.name];
|
2192
|
-
return portDomain ? portDomain.domainTypes.length === (selected === null || selected === void 0 ? void 0 : selected.length) : false;
|
2193
|
-
};
|
2194
|
-
VeloPortCheckBoxComponent.prototype.getMessages = function (valueOption) {
|
2195
|
-
var _a, _b, _c;
|
2196
|
-
if ((_a = this.section.model) === null || _a === void 0 ? void 0 : _a.lineItems) {
|
2197
|
-
return (_c = (_b = this.findLineItemForValue(valueOption)) === null || _b === void 0 ? void 0 : _b.messages) !== null && _c !== void 0 ? _c : [];
|
2198
|
-
}
|
2199
|
-
return [];
|
2200
|
-
};
|
2201
|
-
VeloPortCheckBoxComponent.prototype.findLineItemForValue = function (valueOption) {
|
2202
|
-
var _a;
|
2203
|
-
return (((_a = this.section.model) === null || _a === void 0 ? void 0 : _a.lineItems) &&
|
2204
|
-
this.section.model.lineItems.find(function (li) { return li.type && li.type.toLowerCase() === valueOption.toLowerCase(); }));
|
2205
|
-
};
|
2206
|
-
return VeloPortCheckBoxComponent;
|
2207
|
-
}());
|
2208
|
-
VeloPortCheckBoxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloPortCheckBoxComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2209
|
-
VeloPortCheckBoxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VeloPortCheckBoxComponent, selector: "velo-port-checkbox", inputs: { showSelectAll: "showSelectAll" }, ngImport: i0__namespace, template: "<div [formGroup]=\"form\">\n <!--TODO ALE replace divs with ng-templates-->\n <div *ngIf=\"showSelectAll\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-checkbox collapsed\">\n <div class=\"box-title\">\n <div class=\"header clearfix\">\n <div class=\"checkbox-select\">\n <label>\n <input type=\"checkbox\" (change)=\"selectAllChange()\" [checked]=\"isAllSelected()\" />\n\n <i class=\"input-helper\"></i>\n Select All\n </label>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngFor=\"let valueOption of section.sectionValue?.valueOptions\">\n <div class=\"unchecked\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-checkbox collapsed\">\n <div class=\"box-title\" (click)=\"handleChange(valueOption)\">\n <div class=\"header clearfix\">\n <div class=\"checkbox-select\">\n <label>\n <input\n type=\"checkbox\"\n [class.checkbox--checked]=\"valueOption === form.controls[controlName].value\"\n />\n\n <i class=\"input-helper\"></i>\n {{section.sectionValue?.displayValues?.[valueOption] || valueOption}}\n </label>\n </div>\n </div>\n\n <div class=\"box-actions\" *ngIf=\"hasValueFor(valueOption)\">\n <ng-template #msgTemplate>\n <div class=\"runtime-info-message\">\n <ul class=\"message-text\">\n <li *ngFor=\"let message of getMessages(valueOption)\">{{ message }}</li>\n </ul>\n </div>\n </ng-template>\n <div\n class=\"box-action-button\"\n *ngIf=\"getMessages(valueOption).length > 0\"\n [popover]=\"msgTemplate\"\n placement=\"left\"\n container=\"body\"\n [isOpen]=\"true\"\n >\n <a href=\"javascript:void(0);\">\n <i class=\"fa fa-info check-icon\"></i>\n </a>\n </div>\n </div>\n </div>\n <div class=\"box-content-wrapper\">\n <div class=\"box-content\"> </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n<ng-content></ng-content>\n", directives: [{ type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$1.PopoverDirective, selector: "[popover]", inputs: ["outsideClick", "containerClass", "isOpen", "adaptivePosition", "popover", "popoverContext", "popoverTitle", "placement", "triggers", "container", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }] });
|
2210
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloPortCheckBoxComponent, decorators: [{
|
2211
|
-
type: i0.Component,
|
2212
|
-
args: [{
|
2213
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2214
|
-
selector: 'velo-port-checkbox',
|
2215
|
-
templateUrl: 'velo-port-checkbox.component.html',
|
2216
|
-
}]
|
2217
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; }, propDecorators: { showSelectAll: [{
|
2218
|
-
type: i0.Input
|
2219
|
-
}] } });
|
2220
|
-
|
2221
|
-
var VeloPortDropdownComponent = /** @class */ (function () {
|
2222
|
-
function VeloPortDropdownComponent(formScope, sectionScope) {
|
2223
|
-
var _this = this;
|
2224
|
-
var _a;
|
2225
|
-
this.formScope = formScope;
|
2226
|
-
this.sectionScope = sectionScope;
|
2227
|
-
this.prices = {};
|
2228
|
-
this.form = this.formScope.form;
|
2229
|
-
this.section = this.sectionScope.section;
|
2230
|
-
this.controlName = this.section.id;
|
2231
|
-
this.qtyControlName = this.section.id + 'qty';
|
2232
|
-
if (this.section.pricingEnabled) {
|
2233
|
-
(_a = this.section.sectionValue) === null || _a === void 0 ? void 0 : _a.valueOptions.forEach(function (valueOption) {
|
2234
|
-
_this.prices[valueOption] = _this.findPriceItemsForValue(valueOption);
|
2235
|
-
});
|
2236
|
-
}
|
2237
|
-
}
|
2238
|
-
VeloPortDropdownComponent.prototype.isAddAllowed = function () {
|
2239
|
-
if (!i7.EntityUtil.isPresent(this.form.controls[this.controlName].value)) {
|
2240
|
-
return false;
|
2241
|
-
}
|
2242
|
-
return this.section.model
|
2243
|
-
? SectionsBinderHelper.isAddAllowed(this.section.model, this.section.boundData.name)
|
2244
|
-
: false;
|
2245
|
-
};
|
2246
|
-
VeloPortDropdownComponent.prototype.handleCreate = function () {
|
2247
|
-
if (this.form.invalid || !this.isAddAllowed()) {
|
2248
|
-
return;
|
2249
|
-
}
|
2250
|
-
var updateData = {
|
2251
|
-
id: this.section.id,
|
2252
|
-
action: 'create',
|
2253
|
-
};
|
2254
|
-
this.formScope.publishFormUpdate(updateData);
|
2255
|
-
};
|
2256
|
-
VeloPortDropdownComponent.prototype.findPriceItemsForValue = function (valueOption) {
|
2257
|
-
var _this = this;
|
2258
|
-
var _a;
|
2259
|
-
var prices = [];
|
2260
|
-
if (valueOption) {
|
2261
|
-
var portDomain = (_a = this.section.model) === null || _a === void 0 ? void 0 : _a.portDomains[this.section.boundData.name];
|
2262
|
-
var domainType = portDomain === null || portDomain === void 0 ? void 0 : portDomain.domainTypes.find(function (d) { return d.name.toLowerCase() === valueOption.toLowerCase(); });
|
2263
|
-
if (domainType && domainType.recommendedPrices) {
|
2264
|
-
prices = domainType.recommendedPrices;
|
2265
|
-
}
|
2266
|
-
}
|
2267
|
-
var oneTime = {
|
2268
|
-
chargeMethod: 'ONE_TIME',
|
2269
|
-
netPrice: 0,
|
2270
|
-
listPrice: 0,
|
2271
|
-
chargeType: '',
|
2272
|
-
};
|
2273
|
-
var recurring = {
|
2274
|
-
chargeMethod: 'RECURRING',
|
2275
|
-
netPrice: 0,
|
2276
|
-
listPrice: 0,
|
2277
|
-
chargeType: '',
|
2278
|
-
};
|
2279
|
-
prices.forEach(function (p) {
|
2280
|
-
if (p.chargeMethod === oneTime.chargeMethod) {
|
2281
|
-
_this.add(oneTime, p);
|
2282
|
-
}
|
2283
|
-
if (p.chargeMethod === recurring.chargeMethod) {
|
2284
|
-
_this.add(recurring, p);
|
2285
|
-
}
|
2286
|
-
});
|
2287
|
-
var result = [];
|
2288
|
-
if (oneTime.listPrice > 0) {
|
2289
|
-
result.push(oneTime);
|
2290
|
-
}
|
2291
|
-
if (recurring.listPrice > 0) {
|
2292
|
-
result.push(recurring);
|
2293
|
-
}
|
2294
|
-
return result;
|
2295
|
-
};
|
2296
|
-
VeloPortDropdownComponent.prototype.add = function (target, src) {
|
2297
|
-
target.netPrice = target.netPrice + src.netPrice;
|
2298
|
-
target.listPrice = target.listPrice + src.listPrice;
|
2299
|
-
if (src.explanation) {
|
2300
|
-
target.explanation = src.explanation;
|
2301
|
-
}
|
2302
|
-
};
|
2303
|
-
return VeloPortDropdownComponent;
|
2304
|
-
}());
|
2305
|
-
VeloPortDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloPortDropdownComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2306
|
-
VeloPortDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VeloPortDropdownComponent, selector: "velo-port-dropdown", ngImport: i0__namespace, template: "<div class=\"form-group col-md-12\" [formGroup]=\"form\">\n <div class=\"input-form-input div-inline\">\n <label [for]=\"controlName\">{{ section.label }}</label>\n <div class=\"form-control-wrapper\">\n <select [id]=\"controlName\" [formControlName]=\"controlName\" class=\"form-control\">\n <option *ngFor=\"let valueOption of section.sectionValue?.valueOptions\" [ngValue]=\"valueOption\">\n {{section.sectionValue?.displayValues?.[valueOption] || valueOption}}\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <span>${{ prices[valueOption][0].netPrice }}</span>\n <span *ngIf=\"prices[valueOption].length > 1\">\n <span>, </span>\n <span>${{ prices[valueOption][1].netPrice }}</span>\n </span>\n </span>\n </option>\n </select>\n </div>\n </div>\n <div class=\"input-form-input div-inline quantity-form-input\">\n <label [for]=\"qtyControlName\"> Quantity </label>\n <div class=\"form-control-wrapper\">\n <input [id]=\"qtyControlName\" [formControlName]=\"qtyControlName\" type=\"text\" class=\"form-control\" size=\"3\" />\n\n <div\n class=\"validation-message\"\n [hidden]=\"form.controls[qtyControlName].valid || form.controls[qtyControlName].pristine\"\n >\n <div *ngFor=\"let key of form.controls[qtyControlName].errors | values\">\n <span> {{form.controls[qtyControlName]?.errors?.[key].message}}</span>\n </div>\n </div>\n\n <a href=\"javascript:void(0);\" (click)=\"handleCreate()\">\n <div class=\"add-config-control\" [attr.disabled]=\"form.valid && isAddAllowed() ? null : true\">\n <i class=\"fa fa-plus plus-icon\"></i>\n </div>\n </a>\n </div>\n </div>\n</div>\n<ng-content></ng-content>\n", directives: [{ type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__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]" }], pipes: { "values": i7__namespace.ValuesPipe } });
|
2307
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloPortDropdownComponent, decorators: [{
|
2308
|
-
type: i0.Component,
|
2309
|
-
args: [{
|
2310
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2311
|
-
selector: 'velo-port-dropdown',
|
2312
|
-
templateUrl: 'velo-port-dropdown.component.html',
|
2313
|
-
}]
|
2314
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
2315
|
-
|
2316
|
-
var VeloPortRadioComponent = /** @class */ (function () {
|
2317
|
-
function VeloPortRadioComponent(formScope, sectionScope) {
|
2318
|
-
this.formScope = formScope;
|
2319
|
-
this.sectionScope = sectionScope;
|
2320
|
-
this.prices = {};
|
2321
|
-
this.form = this.formScope.form;
|
2322
|
-
this.section = this.sectionScope.section;
|
2323
|
-
this.controlName = this.section.id;
|
2324
|
-
}
|
2325
|
-
VeloPortRadioComponent.prototype.ngOnInit = function () {
|
2326
|
-
var _this = this;
|
2327
|
-
var _a;
|
2328
|
-
this.initPriceItems();
|
2329
|
-
(_a = this.section.sectionValue) === null || _a === void 0 ? void 0 : _a.valueOptions.forEach(function (item) {
|
2330
|
-
if (_this.hasValueFor(item)) {
|
2331
|
-
_this.form.controls[_this.controlName].setValue(item);
|
2332
|
-
}
|
2333
|
-
});
|
2334
|
-
};
|
2335
|
-
VeloPortRadioComponent.prototype.handleChange = function (event, valueOption) {
|
2336
|
-
event.preventDefault();
|
2337
|
-
event.stopPropagation();
|
2338
|
-
var updateData = {
|
2339
|
-
id: this.section.id,
|
2340
|
-
action: this.hasPreviousValue() ? 'update' : 'create',
|
2341
|
-
valueOption: valueOption,
|
2342
|
-
};
|
2343
|
-
this.form.controls[this.controlName].setValue(valueOption);
|
2344
|
-
this.form.controls[this.controlName].markAsDirty();
|
2345
|
-
this.formScope.publishFormUpdate(updateData);
|
2346
|
-
};
|
2347
|
-
VeloPortRadioComponent.prototype.hasValueFor = function (valueOption) {
|
2348
|
-
return !!this.findLineItemForValue(valueOption);
|
2349
|
-
};
|
2350
|
-
VeloPortRadioComponent.prototype.getMessages = function (valueOption) {
|
2351
|
-
var _a;
|
2352
|
-
var lineItem = this.findLineItemForValue(valueOption);
|
2353
|
-
if (((_a = this.section.model) === null || _a === void 0 ? void 0 : _a.lineItems) && lineItem) {
|
2354
|
-
return lineItem.messages;
|
2355
|
-
}
|
2356
|
-
return [];
|
2357
|
-
};
|
2358
|
-
VeloPortRadioComponent.prototype.toString = function (price) {
|
2359
|
-
var result = '';
|
2360
|
-
if (price.listPrice > price.netPrice) {
|
2361
|
-
result += '<strike>' + price.listPrice + '</strike>';
|
2362
|
-
}
|
2363
|
-
result += price.netPrice;
|
2364
|
-
if (price.explanation) {
|
2365
|
-
result += '(' + price.explanation + ')';
|
2366
|
-
}
|
2367
|
-
return result;
|
2368
|
-
};
|
2369
|
-
VeloPortRadioComponent.prototype.hasPreviousValue = function () {
|
2370
|
-
var _this = this;
|
2371
|
-
var _a;
|
2372
|
-
var previous = (_a = this.section.model) === null || _a === void 0 ? void 0 : _a.lineItems.filter(function (li) { return li.port && li.port === _this.section.boundData.name; });
|
2373
|
-
return previous ? previous.length > 0 : false;
|
2374
|
-
};
|
2375
|
-
VeloPortRadioComponent.prototype.findLineItemForValue = function (valueOption) {
|
2376
|
-
return this.section.model ? LineItemUtil.findLineItemForValue(this.section.model, valueOption) : undefined;
|
2377
|
-
};
|
2378
|
-
VeloPortRadioComponent.prototype.initPriceItems = function () {
|
2379
|
-
var _this = this;
|
2380
|
-
var _a;
|
2381
|
-
this.prices = {};
|
2382
|
-
if (this.section.pricingEnabled) {
|
2383
|
-
(_a = this.section.sectionValue) === null || _a === void 0 ? void 0 : _a.valueOptions.forEach(function (valueOption) {
|
2384
|
-
_this.prices[valueOption] = _this.findPriceItemsForValue(valueOption);
|
2385
|
-
});
|
2386
|
-
}
|
2387
|
-
};
|
2388
|
-
VeloPortRadioComponent.prototype.findPriceItemsForValue = function (valueOption) {
|
2389
|
-
var _this = this;
|
2390
|
-
var _a, _b;
|
2391
|
-
var prices = [];
|
2392
|
-
if (valueOption) {
|
2393
|
-
var lineItem = ((_a = this.section.model) === null || _a === void 0 ? void 0 : _a.lineItems) &&
|
2394
|
-
this.section.model.lineItems.find(function (li) { return li.type && li.type.toLowerCase() === valueOption.toLowerCase(); });
|
2395
|
-
if (lineItem && lineItem.chargeItems) {
|
2396
|
-
prices = lineItem.chargeItems.map(function (pi) {
|
2397
|
-
var price = {
|
2398
|
-
listPrice: pi.listPrice,
|
2399
|
-
netPrice: pi.netPrice,
|
2400
|
-
chargeMethod: pi.chargeMethod,
|
2401
|
-
chargeType: pi.chargeType,
|
2402
|
-
};
|
2403
|
-
return price;
|
2404
|
-
});
|
2405
|
-
}
|
2406
|
-
else {
|
2407
|
-
var portDomain = (_b = this.section.model) === null || _b === void 0 ? void 0 : _b.portDomains[this.section.boundData.name];
|
2408
|
-
var domainType = portDomain === null || portDomain === void 0 ? void 0 : portDomain.domainTypes.find(function (d) { return d.name.toLowerCase() === valueOption.toLowerCase(); });
|
2409
|
-
if (domainType && domainType.recommendedPrices) {
|
2410
|
-
prices = domainType.recommendedPrices;
|
2411
|
-
}
|
2412
|
-
}
|
2413
|
-
}
|
2414
|
-
var oneTime = {
|
2415
|
-
chargeMethod: 'ONE_TIME',
|
2416
|
-
netPrice: 0,
|
2417
|
-
listPrice: 0,
|
2418
|
-
chargeType: '',
|
2419
|
-
};
|
2420
|
-
var recurring = {
|
2421
|
-
chargeMethod: 'RECURRING',
|
2422
|
-
netPrice: 0,
|
2423
|
-
listPrice: 0,
|
2424
|
-
chargeType: '',
|
2425
|
-
};
|
2426
|
-
prices.forEach(function (p) {
|
2427
|
-
if (p.chargeMethod === oneTime.chargeMethod) {
|
2428
|
-
_this.add(oneTime, p);
|
2429
|
-
}
|
2430
|
-
if (p.chargeMethod === recurring.chargeMethod) {
|
2431
|
-
_this.add(recurring, p);
|
2432
|
-
}
|
2433
|
-
});
|
2434
|
-
var result = [];
|
2435
|
-
if (oneTime.listPrice > 0) {
|
2436
|
-
result.push(oneTime);
|
2437
|
-
}
|
2438
|
-
if (recurring.listPrice > 0) {
|
2439
|
-
result.push(recurring);
|
2440
|
-
}
|
2441
|
-
return result;
|
2442
|
-
};
|
2443
|
-
VeloPortRadioComponent.prototype.add = function (target, src) {
|
2444
|
-
target.netPrice = target.netPrice + src.netPrice;
|
2445
|
-
target.listPrice = target.listPrice + src.listPrice;
|
2446
|
-
if (src.explanation) {
|
2447
|
-
target.explanation = src.explanation;
|
2448
|
-
}
|
2449
|
-
};
|
2450
|
-
return VeloPortRadioComponent;
|
2451
|
-
}());
|
2452
|
-
VeloPortRadioComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloPortRadioComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2453
|
-
VeloPortRadioComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VeloPortRadioComponent, selector: "velo-port-radio", ngImport: i0__namespace, template: "<div [formGroup]=\"form\">\n <!--TODO ALE replace divs with ng-templates-->\n <ng-container *ngFor=\"let valueOption of section.sectionValue?.valueOptions\">\n <div class=\"unchecked\">\n <div class=\"row no-gutter clearfix\">\n <div class=\"col-md-12\">\n <div class=\"content\">\n <div class=\"container-box container-box-bordered container-box-radio\">\n <div class=\"box-title\" (click)=\"handleChange($event, valueOption)\">\n <div class=\"header clearfix\">\n <div class=\"radio-button\">\n <label>\n <input type=\"radio\" [id]=\"controlName\" [value]=\"valueOption\" [formControlName]=\"controlName\" />\n\n <i class=\"input-helper\"></i>\n\n {{ section.sectionValue?.displayValues?.[valueOption] || valueOption }}\n\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <span>${{ prices[valueOption][0].netPrice }}</span>\n\n <span *ngIf=\"prices[valueOption].length > 1\">\n <span>, </span>\n\n <span>${{ prices[valueOption][1].netPrice }}</span>\n </span>\n </span>\n </label>\n <span *ngIf=\"prices[valueOption] && prices[valueOption].length > 0\">\n <div>{{ prices[valueOption][0].explanation }}</div>\n\n <span *ngIf=\"prices[valueOption].length > 1 && prices[valueOption][1].explanation\">\n <div>{{ prices[valueOption][1].explanation }}</div>\n </span>\n </span>\n </div>\n </div>\n </div>\n </div>\n\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n<ng-content></ng-content>\n", directives: [{ type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i4__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: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
2454
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloPortRadioComponent, decorators: [{
|
2455
|
-
type: i0.Component,
|
2456
|
-
args: [{
|
2457
|
-
// tslint:disable-next-line:component-selector
|
2458
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2459
|
-
selector: 'velo-port-radio',
|
2460
|
-
templateUrl: 'velo-port-radio.component.html',
|
2461
|
-
}]
|
2462
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
2463
|
-
|
2464
|
-
var VeloTypeComponent = /** @class */ (function () {
|
2465
|
-
function VeloTypeComponent(formScope, collapsibleState, sectionScope, messageService) {
|
2466
|
-
var _a, _b;
|
2467
|
-
this.formScope = formScope;
|
2468
|
-
this.collapsibleState = collapsibleState;
|
2469
|
-
this.sectionScope = sectionScope;
|
2470
|
-
this.messageService = messageService;
|
2471
|
-
this.messageBucketId = 'ui-runtime';
|
2472
|
-
this.indent = 1;
|
2473
|
-
this.prices = [];
|
2474
|
-
this.form = this.formScope.form;
|
2475
|
-
this.section = this.sectionScope.section;
|
2476
|
-
this.indent = this.sectionScope.indent;
|
2477
|
-
this.controlName = this.section.id;
|
2478
|
-
this.qtyControlName = this.section.id + 'qty';
|
2479
|
-
this.displayName =
|
2480
|
-
(((_a = this.section.model) === null || _a === void 0 ? void 0 : _a.properties) && this.section.model.properties.displayName) || ((_b = this.section.model) === null || _b === void 0 ? void 0 : _b.type) || '';
|
2481
|
-
}
|
2482
|
-
VeloTypeComponent.prototype.ngOnInit = function () {
|
2483
|
-
var _this = this;
|
2484
|
-
var _a, _b;
|
2485
|
-
if (this.section.pricingEnabled) {
|
2486
|
-
this.prices = this.getPrices();
|
2487
|
-
}
|
2488
|
-
if (this.section.controlType === 'MESSAGE') {
|
2489
|
-
this.messageService.clear(this.messageBucketId);
|
2490
|
-
(_b = (_a = this.section.model) === null || _a === void 0 ? void 0 : _a.messages) === null || _b === void 0 ? void 0 : _b.forEach(function (message) {
|
2491
|
-
_this.messageService.add({ key: _this.messageBucketId, summary: message });
|
2492
|
-
});
|
2493
|
-
}
|
2494
|
-
};
|
2495
|
-
VeloTypeComponent.prototype.handleRemove = function () {
|
2496
|
-
var updateData = {
|
2497
|
-
id: this.section.id,
|
2498
|
-
action: 'remove',
|
2499
|
-
};
|
2500
|
-
this.formScope.publishFormUpdate(updateData);
|
2501
|
-
};
|
2502
|
-
VeloTypeComponent.prototype.handleQuantityUpdate = function () {
|
2503
|
-
var updateData = {
|
2504
|
-
id: this.section.id,
|
2505
|
-
action: 'qtyUpdate',
|
2506
|
-
};
|
2507
|
-
this.formScope.publishFormUpdate(updateData);
|
2508
|
-
};
|
2509
|
-
VeloTypeComponent.prototype.toggleCollapse = function () {
|
2510
|
-
if (this.section.model) {
|
2511
|
-
this.collapsibleState.toggleCollapse(this.section.model.id);
|
2512
|
-
}
|
2513
|
-
};
|
2514
|
-
VeloTypeComponent.prototype.getPrices = function () {
|
2515
|
-
var _this = this;
|
2516
|
-
var _a;
|
2517
|
-
var prices = [];
|
2518
|
-
if ((_a = this.section.model) === null || _a === void 0 ? void 0 : _a.chargeItems) {
|
2519
|
-
prices = this.section.model.chargeItems.map(function (pi) {
|
2520
|
-
var price = {
|
2521
|
-
listPrice: pi.listPrice,
|
2522
|
-
netPrice: pi.netPrice,
|
2523
|
-
chargeMethod: pi.chargeMethod,
|
2524
|
-
chargeType: pi.chargeType,
|
2525
|
-
};
|
2526
|
-
return price;
|
2527
|
-
});
|
2528
|
-
}
|
2529
|
-
var oneTime = {
|
2530
|
-
chargeMethod: 'ONE_TIME',
|
2531
|
-
netPrice: 0,
|
2532
|
-
listPrice: 0,
|
2533
|
-
chargeType: '',
|
2534
|
-
};
|
2535
|
-
var recurring = {
|
2536
|
-
chargeMethod: 'RECURRING',
|
2537
|
-
netPrice: 0,
|
2538
|
-
listPrice: 0,
|
2539
|
-
chargeType: '',
|
2540
|
-
};
|
2541
|
-
prices.forEach(function (p) {
|
2542
|
-
if (p.chargeMethod === oneTime.chargeMethod) {
|
2543
|
-
_this.add(oneTime, p);
|
2544
|
-
}
|
2545
|
-
if (p.chargeMethod === recurring.chargeMethod) {
|
2546
|
-
_this.add(recurring, p);
|
2547
|
-
}
|
2548
|
-
});
|
2549
|
-
var result = [];
|
2550
|
-
if (oneTime.listPrice > 0) {
|
2551
|
-
result.push(oneTime);
|
2552
|
-
}
|
2553
|
-
if (recurring.listPrice > 0) {
|
2554
|
-
result.push(recurring);
|
2555
|
-
}
|
2556
|
-
return result;
|
2557
|
-
};
|
2558
|
-
VeloTypeComponent.prototype.add = function (target, src) {
|
2559
|
-
target.netPrice = target.netPrice + src.netPrice;
|
2560
|
-
target.listPrice = target.listPrice + src.listPrice;
|
2561
|
-
if (src.explanation) {
|
2562
|
-
target.explanation = src.explanation;
|
2563
|
-
}
|
2564
|
-
};
|
2565
|
-
return VeloTypeComponent;
|
2566
|
-
}());
|
2567
|
-
VeloTypeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloTypeComponent, deps: [{ token: FormScopeService }, { token: CollapsibleStateService }, { token: SectionScopeService }, { token: i3__namespace$1.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2568
|
-
VeloTypeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VeloTypeComponent, selector: "velo-type", ngImport: i0__namespace, template: "<div class=\"container-box div-block collapsed container-box-bordered\" [formGroup]=\"form\">\n <div class=\"box-title\">\n <div class=\"header clearfix\">\n <div>\n <div class=\"header-label div-inline\">\n {{ displayName }}\n <span *ngIf=\"prices.length > 0\">\n <span>${{ prices[0].netPrice }}</span>\n <span *ngIf=\"prices.length > 1\">\n <span>, </span>\n <span>${{ prices[1].netPrice }}</span>\n </span>\n </span>\n </div>\n\n <div class=\"header-qty-container input-form-input\">\n <input\n [id]=\"qtyControlName\"\n [formControlName]=\"qtyControlName\"\n (blur)=\"form.controls[qtyControlName].valid && handleQuantityUpdate()\"\n type=\"text\"\n class=\"form-control\"\n size=\"3\"\n />\n <div class=\"validation-message\">\n <div *ngFor=\"let key of form.controls[qtyControlName].errors | values\">\n <span>\n {{ form.controls[qtyControlName]?.errors?.[key].message }}\n </span>\n </div>\n <span *ngIf=\"form.controls[qtyControlName].valid\"> </span>\n </div>\n <span *ngIf=\"prices.length > 0\">\n <div>{{ prices[0].explanation }}</div>\n <span *ngIf=\"prices.length > 1 && prices[1].explanation\">\n <div>{{ prices[1].explanation }}</div>\n </span>\n </span>\n </div>\n </div>\n </div>\n\n <div class=\"box-actions\">\n <ng-container *ngIf=\"section.controlType !== 'MESSAGE'\">\n <ng-template #msgTemplate>\n <div class=\"runtime-info-message\">\n <ul class=\"message-text\">\n <li *ngFor=\"let message of section.model?.messages\">{{ message }}</li>\n </ul>\n </div>\n </ng-template>\n\n <div\n class=\"box-action-button\"\n *ngIf=\"(section.model?.messages?.length ?? 0) > 0\"\n [popover]=\"msgTemplate\"\n placement=\"left\"\n container=\"body\"\n [isOpen]=\"true\"\n >\n <a href=\"javascript:void(0);\">\n <i class=\"fa fa-info check-icon\"></i>\n </a>\n </div>\n </ng-container>\n\n <div\n class=\"box-action-button\"\n (click)=\"toggleCollapse()\"\n [hidden]=\"!section.children || section.children.length < 1\"\n >\n <a><i class=\"fa fa-chevron-down check-icon\"></i></a>\n </div>\n\n <div class=\"box-action-button\" (click)=\"handleRemove()\">\n <a><i class=\"fa fa-trash-o check-icon\"></i></a>\n </div>\n </div>\n </div>\n\n <ng-content></ng-content>\n</div>\n", directives: [{ type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4__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: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5__namespace$1.PopoverDirective, selector: "[popover]", inputs: ["outsideClick", "containerClass", "isOpen", "adaptivePosition", "popover", "popoverContext", "popoverTitle", "placement", "triggers", "container", "delay"], outputs: ["onShown", "onHidden"], exportAs: ["bs-popover"] }], pipes: { "values": i7__namespace.ValuesPipe } });
|
2569
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloTypeComponent, decorators: [{
|
2570
|
-
type: i0.Component,
|
2571
|
-
args: [{
|
2572
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2573
|
-
selector: 'velo-type',
|
2574
|
-
templateUrl: 'velo-type.component.html',
|
2575
|
-
}]
|
2576
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: CollapsibleStateService }, { type: SectionScopeService }, { type: i3__namespace$1.MessageService }]; } });
|
2577
|
-
|
2578
|
-
var SfQueryDirective = /** @class */ (function () {
|
2579
|
-
function SfQueryDirective(apiService) {
|
2580
|
-
this.apiService = apiService;
|
2581
|
-
}
|
2582
|
-
SfQueryDirective.prototype.query = function (searchRequest, objectName) {
|
2583
|
-
return this.apiService.query(searchRequest, objectName).toPromise();
|
2584
|
-
};
|
2585
|
-
SfQueryDirective.prototype.describe = function (objectName, fieldName) {
|
2586
|
-
return this.apiService.describe(objectName, fieldName).toPromise();
|
2587
|
-
};
|
2588
|
-
SfQueryDirective.prototype.describe2 = function (objectName, fieldsNames) {
|
2589
|
-
return this.apiService.describe2(objectName, fieldsNames).toPromise();
|
2590
|
-
};
|
2591
|
-
SfQueryDirective.prototype.apexGetRequest = function (path, params) {
|
2592
|
-
return this.apiService.apexGetRequest(path, params).toPromise();
|
2593
|
-
};
|
2594
|
-
SfQueryDirective.prototype.apexPostRequest = function (path, body) {
|
2595
|
-
return this.apiService.apexPostRequest(path, body).toPromise();
|
2596
|
-
};
|
2597
|
-
return SfQueryDirective;
|
2598
|
-
}());
|
2599
|
-
SfQueryDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfQueryDirective, deps: [{ token: i1__namespace.SalesforceApiService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
2600
|
-
SfQueryDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: SfQueryDirective, selector: "sf-query", exportAs: ["sfApi"], ngImport: i0__namespace });
|
2601
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SfQueryDirective, decorators: [{
|
2602
|
-
type: i0.Directive,
|
2603
|
-
args: [{
|
2604
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
2605
|
-
selector: 'sf-query',
|
2606
|
-
exportAs: 'sfApi',
|
2607
|
-
}]
|
2608
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.SalesforceApiService }]; } });
|
2609
|
-
|
2610
|
-
var SectionHelperService = /** @class */ (function () {
|
2611
|
-
function SectionHelperService() {
|
2612
|
-
}
|
2613
|
-
SectionHelperService.findSectionForValue = function (section, valueOption) {
|
2614
|
-
if (!i7.EntityUtil.isPresent(section) || !i7.EntityUtil.isPresent(section.children) || i7.EntityUtil.isBlank(valueOption)) {
|
2615
|
-
return;
|
2616
|
-
}
|
2617
|
-
var found = i7.EntityUtil.filterHierarchically(section.children, 'children', function (_a) {
|
2618
|
-
var model = _a.model;
|
2619
|
-
return model && model.type.toLowerCase() === valueOption.toLowerCase();
|
2620
|
-
});
|
2621
|
-
return found && found.pop();
|
2622
|
-
};
|
2623
|
-
SectionHelperService.prototype.getTotalPrices = function (section) {
|
2624
|
-
if (!section || !section.model || !section.model.chargeGroupItems) {
|
2625
|
-
return new Map();
|
2626
|
-
}
|
2627
|
-
return i7.PricingUtils.sumPriceByProperty(section.model.chargeGroupItems, 'netPrice', [
|
2628
|
-
'chargeMethod',
|
2629
|
-
'sellingFrequency',
|
2630
|
-
]);
|
2631
|
-
};
|
2632
|
-
return SectionHelperService;
|
2633
|
-
}());
|
2634
|
-
SectionHelperService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionHelperService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
2635
|
-
SectionHelperService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionHelperService });
|
2636
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionHelperService, decorators: [{
|
2637
|
-
type: i0.Injectable
|
2638
|
-
}] });
|
2639
|
-
|
2640
|
-
var SectionContextAware = /** @class */ (function () {
|
2641
|
-
function SectionContextAware(formScope, sectionScope) {
|
2642
|
-
this.formScope = formScope;
|
2643
|
-
this.sectionScope = sectionScope;
|
2644
|
-
}
|
2645
|
-
SectionContextAware.prototype.ngOnInit = function () {
|
2646
|
-
this.form = this.formScope.form;
|
2647
|
-
this.section = this.sectionScope.section;
|
2648
|
-
this.initControlNames();
|
2649
|
-
};
|
2650
|
-
SectionContextAware.prototype.initControlNames = function () {
|
2651
|
-
this.controlName = this.section.id;
|
2652
|
-
this.qtyControlName = this.section.id + 'qty';
|
2653
|
-
};
|
2654
|
-
//TODO ALE CONSIDER STORE INSTEAD OF CALCULATE EVERY TIME
|
2655
|
-
SectionContextAware.prototype.isAddAllowed = function (quantityToAdd) {
|
2656
|
-
if (quantityToAdd === void 0) { quantityToAdd = 1; }
|
2657
|
-
return this.section.model
|
2658
|
-
? SectionsBinderHelper.isAddAllowed(this.section.model, this.section.boundData.name, quantityToAdd)
|
2659
|
-
: false;
|
2660
|
-
};
|
2661
|
-
SectionContextAware.prototype.isRemoveAllowed = function (quantityToRemove) {
|
2662
|
-
if (quantityToRemove === void 0) { quantityToRemove = 1; }
|
2663
|
-
return this.section.model
|
2664
|
-
? SectionsBinderHelper.isRemoveAllowed(this.section.model, this.section.boundData.name, quantityToRemove)
|
2665
|
-
: false;
|
2666
|
-
};
|
2667
|
-
SectionContextAware.prototype.handleCreate = function (valueOption) {
|
2668
|
-
if (!this.isAddAllowed()) {
|
2669
|
-
return;
|
2670
|
-
}
|
2671
|
-
var updateData = {
|
2672
|
-
id: this.section.id,
|
2673
|
-
action: 'create',
|
2674
|
-
valueOption: i7.EntityUtil.isPresent(valueOption) ? valueOption : void 0,
|
2675
|
-
};
|
2676
|
-
this.formScope.publishFormUpdate(updateData);
|
2677
|
-
};
|
2678
|
-
SectionContextAware.prototype.handleChange = function (valueOption) {
|
2679
|
-
var updateData = {
|
2680
|
-
id: this.section.id,
|
2681
|
-
action: 'update',
|
2682
|
-
valueOption: i7.EntityUtil.isPresent(valueOption) ? valueOption : void 0,
|
2683
|
-
};
|
2684
|
-
this.formScope.publishFormUpdate(updateData);
|
2685
|
-
};
|
2686
|
-
SectionContextAware.prototype.handleQtyChange = function (valueOption) {
|
2687
|
-
var updateData = {
|
2688
|
-
id: this.section.id,
|
2689
|
-
action: 'qtyUpdate',
|
2690
|
-
valueOption: valueOption,
|
2691
|
-
};
|
2692
|
-
this.formScope.publishFormUpdate(updateData);
|
2693
|
-
};
|
2694
|
-
SectionContextAware.prototype.handleRemove = function (valueOption) {
|
2695
|
-
var updateData = {
|
2696
|
-
id: this.section.id,
|
2697
|
-
action: 'remove',
|
2698
|
-
valueOption: valueOption,
|
2699
|
-
};
|
2700
|
-
this.formScope.publishFormUpdate(updateData);
|
2701
|
-
};
|
2702
|
-
SectionContextAware.prototype.handleCopy = function (valueOption) {
|
2703
|
-
var updateData = {
|
2704
|
-
id: this.section.id,
|
2705
|
-
action: 'copy',
|
2706
|
-
valueOption: valueOption,
|
2707
|
-
};
|
2708
|
-
this.formScope.publishFormUpdate(updateData);
|
2709
|
-
};
|
2710
|
-
return SectionContextAware;
|
2711
|
-
}());
|
2712
|
-
SectionContextAware.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionContextAware, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
2713
|
-
SectionContextAware.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: SectionContextAware, ngImport: i0__namespace });
|
2714
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionContextAware, decorators: [{
|
2715
|
-
type: i0.Directive
|
2716
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
2717
|
-
var LineItemDirective = /** @class */ (function () {
|
2718
|
-
function LineItemDirective(formScope, sectionScope, configurationService) {
|
2719
|
-
this.formScope = formScope;
|
2720
|
-
this.sectionScope = sectionScope;
|
2721
|
-
this.configurationService = configurationService;
|
2722
|
-
}
|
2723
|
-
LineItemDirective.prototype.ngOnInit = function () {
|
2724
|
-
this.section = this.sectionScope.section;
|
2725
|
-
this.lineItem = this.section.model;
|
2726
|
-
};
|
2727
|
-
LineItemDirective.prototype.handlePatch = function (rootLineItem) {
|
2728
|
-
var updateData = {
|
2729
|
-
id: this.sectionScope.section.id,
|
2730
|
-
action: 'patch',
|
2731
|
-
valueOption: rootLineItem,
|
2732
|
-
};
|
2733
|
-
this.formScope.publishFormUpdate(updateData);
|
2734
|
-
};
|
2735
|
-
LineItemDirective.prototype.configure = function (runtimeContext, configurableRamp) {
|
2736
|
-
return this.configurationService
|
2737
|
-
.configure(runtimeContext, { configurableRamp: configurableRamp })
|
2738
|
-
.pipe(rxjsOperators.take(1))
|
2739
|
-
.toPromise();
|
2740
|
-
};
|
2741
|
-
return LineItemDirective;
|
2742
|
-
}());
|
2743
|
-
LineItemDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LineItemDirective, deps: [{ token: FormScopeService }, { token: SectionScopeService }, { token: ConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
2744
|
-
LineItemDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: LineItemDirective, selector: "line-item", exportAs: ["liApi"], ngImport: i0__namespace });
|
2745
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: LineItemDirective, decorators: [{
|
2746
|
-
type: i0.Directive,
|
2747
|
-
args: [{
|
2748
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
2749
|
-
selector: 'line-item',
|
2750
|
-
exportAs: 'liApi',
|
2751
|
-
}]
|
2752
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }, { type: ConfigurationService }]; } });
|
2753
|
-
var VeloPortDirective = /** @class */ (function (_super) {
|
2754
|
-
__extends(VeloPortDirective, _super);
|
2755
|
-
function VeloPortDirective(formScope, sectionScope) {
|
2756
|
-
var _this = _super.call(this, formScope, sectionScope) || this;
|
2757
|
-
_this.valueQuantities = {};
|
2758
|
-
return _this;
|
2759
|
-
}
|
2760
|
-
VeloPortDirective.prototype.handlePriceAdjustment = function (action, valueOption, amount) {
|
2761
|
-
var updateData = {
|
2762
|
-
id: this.section.id,
|
2763
|
-
action: action,
|
2764
|
-
valueOption: valueOption,
|
2765
|
-
options: { amount: amount },
|
2766
|
-
};
|
2767
|
-
this.formScope.publishFormUpdate(updateData);
|
2768
|
-
};
|
2769
|
-
VeloPortDirective.prototype.ngOnInit = function () {
|
2770
|
-
_super.prototype.ngOnInit.call(this);
|
2771
|
-
this.initQuantity();
|
2772
|
-
};
|
2773
|
-
VeloPortDirective.prototype.handleUpsert = function (valueOption, event) {
|
2774
|
-
if (i7.EntityUtil.isPresent(this.valueQuantities[valueOption]) && i7.EntityUtil.isPresent(event)) {
|
2775
|
-
event === null || event === void 0 ? void 0 : event.preventDefault();
|
2776
|
-
return;
|
2777
|
-
}
|
2778
|
-
else if (Object.keys(this.valueQuantities).length > 0) {
|
2779
|
-
this.handleChange(valueOption);
|
2780
|
-
}
|
2781
|
-
else {
|
2782
|
-
this.handleCreate(valueOption);
|
2783
|
-
}
|
2784
|
-
};
|
2785
|
-
VeloPortDirective.prototype.isActive = function (valueOption) {
|
2786
|
-
return i7.EntityUtil.isPresent(this.valueQuantities[valueOption]);
|
2787
|
-
};
|
2788
|
-
VeloPortDirective.prototype.initQuantity = function () {
|
2789
|
-
this.valueQuantities = this.section.model
|
2790
|
-
? SectionsBinderHelper.getQuantityGroupByValue(this.section.model, this.section.boundData.name)
|
2791
|
-
: {};
|
2792
|
-
};
|
2793
|
-
//Quantity Stepper Functions
|
2794
|
-
VeloPortDirective.prototype.handleNextVal = function (valueOption) {
|
2795
|
-
var initQty = this.valueQuantities[valueOption] || 0;
|
2796
|
-
if (this.isAddAllowed()) {
|
2797
|
-
if (initQty > 0) {
|
2798
|
-
var typeSection = SectionHelperService.findSectionForValue(this.section, valueOption);
|
2799
|
-
if (typeSection) {
|
2800
|
-
this.form.controls[typeSection.id + 'qty'].setValue(++initQty);
|
2801
|
-
this.handleQtyChange(valueOption);
|
2802
|
-
}
|
2803
|
-
}
|
2804
|
-
else {
|
2805
|
-
this.handleCreate(valueOption);
|
2806
|
-
}
|
2807
|
-
}
|
2808
|
-
};
|
2809
|
-
VeloPortDirective.prototype.handlePrevVal = function (valueOption) {
|
2810
|
-
var initQty = this.valueQuantities[valueOption] || 0;
|
2811
|
-
if (this.isRemoveAllowed()) {
|
2812
|
-
if (initQty < 2) {
|
2813
|
-
this.handleRemove(valueOption);
|
2814
|
-
}
|
2815
|
-
else {
|
2816
|
-
var typeSection = SectionHelperService.findSectionForValue(this.section, valueOption);
|
2817
|
-
if (typeSection) {
|
2818
|
-
this.form.controls[typeSection.id + 'qty'].setValue(--initQty);
|
2819
|
-
this.handleQtyChange(valueOption);
|
2820
|
-
}
|
2821
|
-
}
|
2822
|
-
}
|
2823
|
-
};
|
2824
|
-
VeloPortDirective.prototype.handleManualQtyChange = function (valueOption, qtyVal) {
|
2825
|
-
var initQty = this.valueQuantities[valueOption] || 0;
|
2826
|
-
if (isNaN(+qtyVal) || +qtyVal < 0 || initQty === +qtyVal) {
|
2827
|
-
return;
|
2828
|
-
}
|
2829
|
-
var newQty = +qtyVal;
|
2830
|
-
if (initQty === 0) {
|
2831
|
-
if (this.isAddAllowed(newQty)) {
|
2832
|
-
this.form.controls[this.qtyControlName].setValue(newQty);
|
2833
|
-
this.handleCreate(valueOption);
|
2834
|
-
}
|
2835
|
-
}
|
2836
|
-
else if (newQty === 0) {
|
2837
|
-
if (this.isRemoveAllowed()) {
|
2838
|
-
this.handleRemove(valueOption);
|
2839
|
-
}
|
2840
|
-
}
|
2841
|
-
else {
|
2842
|
-
var typeSection = SectionHelperService.findSectionForValue(this.section, valueOption);
|
2843
|
-
if (typeSection) {
|
2844
|
-
var dif = newQty - initQty;
|
2845
|
-
var isAllowed = dif > 0 ? this.isAddAllowed(dif) : this.isRemoveAllowed(dif * -1);
|
2846
|
-
if (isAllowed) {
|
2847
|
-
this.form.controls[typeSection.id + 'qty'].setValue(newQty);
|
2848
|
-
this.handleQtyChange(valueOption);
|
2849
|
-
}
|
2850
|
-
}
|
2851
|
-
}
|
2852
|
-
};
|
2853
|
-
VeloPortDirective.prototype.handleNetPriceAdjustment = function (valueOption, amount) {
|
2854
|
-
this.handlePriceAdjustment('adjustNetPrice', valueOption, amount);
|
2855
|
-
};
|
2856
|
-
VeloPortDirective.prototype.handleListPriceAdjustment = function (valueOption, amount) {
|
2857
|
-
this.handlePriceAdjustment('adjustListPrice', valueOption, amount);
|
2858
|
-
};
|
2859
|
-
return VeloPortDirective;
|
2860
|
-
}(SectionContextAware));
|
2861
|
-
VeloPortDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloPortDirective, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
2862
|
-
VeloPortDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: VeloPortDirective, selector: "velo-port", exportAs: ["portApi"], usesInheritance: true, ngImport: i0__namespace });
|
2863
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloPortDirective, decorators: [{
|
2864
|
-
type: i0.Directive,
|
2865
|
-
args: [{
|
2866
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
2867
|
-
selector: 'velo-port',
|
2868
|
-
exportAs: 'portApi',
|
2869
|
-
}]
|
2870
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
2871
|
-
var VeloDropdownComponent = /** @class */ (function (_super) {
|
2872
|
-
__extends(VeloDropdownComponent, _super);
|
2873
|
-
function VeloDropdownComponent(formScope, sectionScope) {
|
2874
|
-
return _super.call(this, formScope, sectionScope) || this;
|
2875
|
-
}
|
2876
|
-
return VeloDropdownComponent;
|
2877
|
-
}(SectionContextAware));
|
2878
|
-
VeloDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloDropdownComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2879
|
-
VeloDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VeloDropdownComponent, selector: "velo-dropdown", usesInheritance: true, ngImport: i0__namespace, template: "\n <div class=\"input-form-input div-inline\" [formGroup]=\"form\">\n <label [for]=\"controlName\">{{ section.label }}</label>\n <div class=\"form-control-wrapper\">\n <select [id]=\"controlName\" [formControlName]=\"controlName\" class=\"form-control\">\n <option *ngFor=\"let valueOption of section.sectionValue?.valueOptions\" [ngValue]=\"valueOption\">\n {{ section.sectionValue?.displayValues?.[valueOption] || valueOption }}\n </option>\n </select>\n </div>\n </div>\n ", isInline: true, directives: [{ type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i4__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }] });
|
2880
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloDropdownComponent, decorators: [{
|
2881
|
-
type: i0.Component,
|
2882
|
-
args: [{
|
2883
|
-
moduleId: module.id,
|
2884
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2885
|
-
selector: 'velo-dropdown',
|
2886
|
-
template: "\n <div class=\"input-form-input div-inline\" [formGroup]=\"form\">\n <label [for]=\"controlName\">{{ section.label }}</label>\n <div class=\"form-control-wrapper\">\n <select [id]=\"controlName\" [formControlName]=\"controlName\" class=\"form-control\">\n <option *ngFor=\"let valueOption of section.sectionValue?.valueOptions\" [ngValue]=\"valueOption\">\n {{ section.sectionValue?.displayValues?.[valueOption] || valueOption }}\n </option>\n </select>\n </div>\n </div>\n ",
|
2887
|
-
}]
|
2888
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
2889
|
-
var VeloQuantityComponent = /** @class */ (function (_super) {
|
2890
|
-
__extends(VeloQuantityComponent, _super);
|
2891
|
-
function VeloQuantityComponent(formScope, sectionScope) {
|
2892
|
-
return _super.call(this, formScope, sectionScope) || this;
|
2893
|
-
}
|
2894
|
-
return VeloQuantityComponent;
|
2895
|
-
}(SectionContextAware));
|
2896
|
-
VeloQuantityComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloQuantityComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2897
|
-
VeloQuantityComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VeloQuantityComponent, selector: "velo-quantity", usesInheritance: true, ngImport: i0__namespace, template: "\n <div class=\"input-form-input div-inline quantity-form-input\" [formGroup]=\"form\">\n <label [for]=\"qtyControlName\"> Quantity </label>\n <div class=\"form-control-wrapper\">\n <input\n [id]=\"controlName\"\n [formControlName]=\"qtyControlName\"\n [attr.disabled]=\"isAddAllowed() === true ? null : true\"\n type=\"text\"\n class=\"form-control\"\n size=\"3\"\n />\n\n <div\n class=\"validation-message\"\n [hidden]=\"form.controls[qtyControlName].valid || form.controls[qtyControlName].pristine\"\n >\n <div *ngFor=\"let key of form.controls[qtyControlName].errors | values\">\n <span> {{ form.controls[qtyControlName].errors?.[key].message }}</span>\n </div>\n </div>\n </div>\n </div>\n ", isInline: true, directives: [{ type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i4__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: i4__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "values": i7__namespace.ValuesPipe } });
|
2898
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloQuantityComponent, decorators: [{
|
2899
|
-
type: i0.Component,
|
2900
|
-
args: [{
|
2901
|
-
moduleId: module.id,
|
2902
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2903
|
-
selector: 'velo-quantity',
|
2904
|
-
template: "\n <div class=\"input-form-input div-inline quantity-form-input\" [formGroup]=\"form\">\n <label [for]=\"qtyControlName\"> Quantity </label>\n <div class=\"form-control-wrapper\">\n <input\n [id]=\"controlName\"\n [formControlName]=\"qtyControlName\"\n [attr.disabled]=\"isAddAllowed() === true ? null : true\"\n type=\"text\"\n class=\"form-control\"\n size=\"3\"\n />\n\n <div\n class=\"validation-message\"\n [hidden]=\"form.controls[qtyControlName].valid || form.controls[qtyControlName].pristine\"\n >\n <div *ngFor=\"let key of form.controls[qtyControlName].errors | values\">\n <span> {{ form.controls[qtyControlName].errors?.[key].message }}</span>\n </div>\n </div>\n </div>\n </div>\n ",
|
2905
|
-
}]
|
2906
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
2907
|
-
var VeloQuantityButtonComponent = /** @class */ (function (_super) {
|
2908
|
-
__extends(VeloQuantityButtonComponent, _super);
|
2909
|
-
function VeloQuantityButtonComponent(formScope, sectionScope) {
|
2910
|
-
return _super.call(this, formScope, sectionScope) || this;
|
2911
|
-
}
|
2912
|
-
return VeloQuantityButtonComponent;
|
2913
|
-
}(SectionContextAware));
|
2914
|
-
VeloQuantityButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloQuantityButtonComponent, deps: [{ token: FormScopeService }, { token: SectionScopeService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
2915
|
-
VeloQuantityButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VeloQuantityButtonComponent, selector: "velo-quantity-button", usesInheritance: true, ngImport: i0__namespace, template: "\n <div class=\"input-form-input div-inline quantity-form-input\">\n <div class=\"form-control-wrapper\">\n <a href=\"javascript:void(0);\" (click)=\"handleCreate()\">\n <div class=\"add-config-control\" [attr.disabled]=\"isAddAllowed() === true ? null : true\">\n <i class=\"fa fa-plus plus-icon\"></i>\n </div>\n </a>\n </div>\n </div>\n ", isInline: true });
|
2916
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VeloQuantityButtonComponent, decorators: [{
|
2917
|
-
type: i0.Component,
|
2918
|
-
args: [{
|
2919
|
-
moduleId: module.id,
|
2920
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
2921
|
-
selector: 'velo-quantity-button',
|
2922
|
-
template: "\n <div class=\"input-form-input div-inline quantity-form-input\">\n <div class=\"form-control-wrapper\">\n <a href=\"javascript:void(0);\" (click)=\"handleCreate()\">\n <div class=\"add-config-control\" [attr.disabled]=\"isAddAllowed() === true ? null : true\">\n <i class=\"fa fa-plus plus-icon\"></i>\n </div>\n </a>\n </div>\n </div>\n ",
|
2923
|
-
}]
|
2924
|
-
}], ctorParameters: function () { return [{ type: FormScopeService }, { type: SectionScopeService }]; } });
|
2925
|
-
|
2926
|
-
var VlApprovalDirective = /** @class */ (function () {
|
2927
|
-
function VlApprovalDirective(repo) {
|
2928
|
-
this.repo = repo;
|
2929
|
-
}
|
2930
|
-
VlApprovalDirective.prototype.submitQuote = function (quoteDraft) {
|
2931
|
-
return this.repo.submitQuote(quoteDraft).toPromise();
|
2932
|
-
};
|
2933
|
-
return VlApprovalDirective;
|
2934
|
-
}());
|
2935
|
-
VlApprovalDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlApprovalDirective, deps: [{ token: i1__namespace.QuoteApiService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
2936
|
-
VlApprovalDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: VlApprovalDirective, selector: "vl-approval", exportAs: ["approvalApi"], ngImport: i0__namespace });
|
2937
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlApprovalDirective, decorators: [{
|
2938
|
-
type: i0.Directive,
|
2939
|
-
args: [{
|
2940
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
2941
|
-
selector: 'vl-approval',
|
2942
|
-
exportAs: 'approvalApi',
|
2943
|
-
}]
|
2944
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.QuoteApiService }]; } });
|
2945
|
-
|
2946
|
-
var VlDocumentAttachmentsDirective = /** @class */ (function () {
|
2947
|
-
function VlDocumentAttachmentsDirective(service) {
|
2948
|
-
this.service = service;
|
2949
|
-
}
|
2950
|
-
VlDocumentAttachmentsDirective.prototype.getAttachments = function (searchRequest) {
|
2951
|
-
return this.service.getAttachments(searchRequest).toPromise();
|
2952
|
-
};
|
2953
|
-
VlDocumentAttachmentsDirective.prototype.createAttachment = function (attachment, file, reportProgress) {
|
2954
|
-
var observable = this.service.createAttachment(attachment, file, reportProgress);
|
2955
|
-
return reportProgress ? observable : observable.toPromise();
|
2956
|
-
};
|
2957
|
-
VlDocumentAttachmentsDirective.prototype.updateAttachment = function (id, attachment) {
|
2958
|
-
return this.service.updateAttachment(id, attachment).toPromise();
|
2959
|
-
};
|
2960
|
-
VlDocumentAttachmentsDirective.prototype.getAttachmentFile = function (id, isPreventDownload) {
|
2961
|
-
return this.service.getAttachmentFile(id, isPreventDownload).toPromise();
|
2962
|
-
};
|
2963
|
-
VlDocumentAttachmentsDirective.prototype.removeAttachment = function (id) {
|
2964
|
-
return this.service.removeAttachment(id).toPromise();
|
2965
|
-
};
|
2966
|
-
return VlDocumentAttachmentsDirective;
|
2967
|
-
}());
|
2968
|
-
VlDocumentAttachmentsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlDocumentAttachmentsDirective, deps: [{ token: i1__namespace.DocumentAttachmentApiService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
2969
|
-
VlDocumentAttachmentsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: VlDocumentAttachmentsDirective, selector: "vl-document-attachments", exportAs: ["documentAttachmentsApi"], ngImport: i0__namespace });
|
2970
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlDocumentAttachmentsDirective, decorators: [{
|
2971
|
-
type: i0.Directive,
|
2972
|
-
args: [{
|
2973
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
2974
|
-
selector: 'vl-document-attachments',
|
2975
|
-
exportAs: 'documentAttachmentsApi',
|
2976
|
-
}]
|
2977
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.DocumentAttachmentApiService }]; } });
|
2978
|
-
|
2979
|
-
var VlDocumentTemplatesDirective = /** @class */ (function () {
|
2980
|
-
function VlDocumentTemplatesDirective(documentTemplatesApiService) {
|
2981
|
-
this.documentTemplatesApiService = documentTemplatesApiService;
|
2982
|
-
/**
|
2983
|
-
* @deprecated Use `generateDocument` instead
|
2984
|
-
*/
|
2985
|
-
// eslint-disable-next-line @typescript-eslint/member-ordering
|
2986
|
-
this.generateDocumentNew = this.generateDocument;
|
2987
|
-
}
|
2988
|
-
VlDocumentTemplatesDirective.prototype.getTemplates = function (tag) {
|
2989
|
-
return this.documentTemplatesApiService.getTemplates(tag).toPromise();
|
2990
|
-
};
|
2991
|
-
VlDocumentTemplatesDirective.prototype.upsertTemplate = function (template, templateFile) {
|
2992
|
-
return this.documentTemplatesApiService
|
2993
|
-
.upsertTemplate(template, templateFile)
|
2994
|
-
.toPromise();
|
2995
|
-
};
|
2996
|
-
VlDocumentTemplatesDirective.prototype.removeTemplate = function (id) {
|
2997
|
-
return this.documentTemplatesApiService.removeTemplate(id).toPromise();
|
2998
|
-
};
|
2999
|
-
VlDocumentTemplatesDirective.prototype.cloneTemplate = function (id) {
|
3000
|
-
return this.documentTemplatesApiService.cloneTemplate(id).toPromise();
|
3001
|
-
};
|
3002
|
-
VlDocumentTemplatesDirective.prototype.downloadTemplate = function (id) {
|
3003
|
-
return this.documentTemplatesApiService.downloadTemplateFile(id).toPromise();
|
3004
|
-
};
|
3005
|
-
VlDocumentTemplatesDirective.prototype.generateDocument = function (template, quoteDraft, params) {
|
3006
|
-
return this.documentTemplatesApiService.generateDocument(template, quoteDraft, params).pipe(rxjsOperators.take(1));
|
3007
|
-
};
|
3008
|
-
VlDocumentTemplatesDirective.prototype.generateDocumentData = function (template, quoteDraft, params) {
|
3009
|
-
return this.documentTemplatesApiService.generateDocumentData(template, quoteDraft, params).pipe(rxjsOperators.take(1));
|
3010
|
-
};
|
3011
|
-
VlDocumentTemplatesDirective.prototype.getAttachments = function (searchRequest) {
|
3012
|
-
return this.documentTemplatesApiService.getAttachments(searchRequest).toPromise();
|
3013
|
-
};
|
3014
|
-
VlDocumentTemplatesDirective.prototype.getAttachmentFile = function (id) {
|
3015
|
-
return this.documentTemplatesApiService.getAttachmentFile(id).toPromise();
|
3016
|
-
};
|
3017
|
-
VlDocumentTemplatesDirective.prototype.createAttachment = function (attachment, file) {
|
3018
|
-
return this.documentTemplatesApiService.createAttachment(attachment, file).toPromise();
|
3019
|
-
};
|
3020
|
-
VlDocumentTemplatesDirective.prototype.removeAttachment = function (id) {
|
3021
|
-
return this.documentTemplatesApiService.removeAttachment(id).toPromise();
|
3022
|
-
};
|
3023
|
-
return VlDocumentTemplatesDirective;
|
3024
|
-
}());
|
3025
|
-
VlDocumentTemplatesDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlDocumentTemplatesDirective, deps: [{ token: i1__namespace.DocumentTemplatesApiService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
3026
|
-
VlDocumentTemplatesDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: VlDocumentTemplatesDirective, selector: "[vlQuoteTemplates]", exportAs: ["quoteTemplateApi"], ngImport: i0__namespace });
|
3027
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlDocumentTemplatesDirective, decorators: [{
|
3028
|
-
type: i0.Directive,
|
3029
|
-
args: [{
|
3030
|
-
selector: '[vlQuoteTemplates]',
|
3031
|
-
exportAs: 'quoteTemplateApi',
|
3032
|
-
}]
|
3033
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.DocumentTemplatesApiService }]; } });
|
3034
|
-
|
3035
|
-
var VlQuoteDirective = /** @class */ (function () {
|
3036
|
-
function VlQuoteDirective(quoteApiService, runtimeService) {
|
3037
|
-
this.quoteApiService = quoteApiService;
|
3038
|
-
this.runtimeService = runtimeService;
|
3039
|
-
}
|
3040
|
-
VlQuoteDirective.prototype.getQuote = function (quoteId) {
|
3041
|
-
return this.quoteApiService.getQuoteDraft(quoteId).toPromise();
|
3042
|
-
};
|
3043
|
-
VlQuoteDirective.prototype.upsertQuote = function (quoteDraft) {
|
3044
|
-
return this.quoteApiService.upsertQuote(quoteDraft).toPromise();
|
3045
|
-
};
|
3046
|
-
VlQuoteDirective.prototype.configureQuote = function (quoteDraft, rootLineItemId) {
|
3047
|
-
var _a;
|
3048
|
-
var rootLineItem = i7.EntityUtil.findById(rootLineItemId, quoteDraft.currentState);
|
3049
|
-
var asset = (_a = quoteDraft.initialState) === null || _a === void 0 ? void 0 : _a.find(function (a) { return a.id === rootLineItem.assetId; });
|
3050
|
-
var context = quoteDraft.context;
|
3051
|
-
var states = {
|
3052
|
-
configurableRamp: LineItemUtil.removeDeletedItems(rootLineItem),
|
3053
|
-
currentState: quoteDraft.currentState,
|
3054
|
-
asset: asset,
|
3055
|
-
};
|
3056
|
-
this.runtimeService.updateRuntime(states, context.properties);
|
3057
|
-
};
|
3058
|
-
return VlQuoteDirective;
|
3059
|
-
}());
|
3060
|
-
VlQuoteDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlQuoteDirective, deps: [{ token: i1__namespace.QuoteApiService }, { token: RuntimeService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
3061
|
-
VlQuoteDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: VlQuoteDirective, selector: "vl-quote", exportAs: ["quoteApi"], ngImport: i0__namespace });
|
3062
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlQuoteDirective, decorators: [{
|
3063
|
-
type: i0.Directive,
|
3064
|
-
args: [{
|
3065
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
3066
|
-
selector: 'vl-quote',
|
3067
|
-
exportAs: 'quoteApi',
|
3068
|
-
}]
|
3069
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.QuoteApiService }, { type: RuntimeService }]; } });
|
3070
|
-
|
3071
|
-
var VlRampDirective = /** @class */ (function () {
|
3072
|
-
function VlRampDirective(contextService, rampApiService, priceApiService) {
|
3073
|
-
this.contextService = contextService;
|
3074
|
-
this.rampApiService = rampApiService;
|
3075
|
-
this.priceApiService = priceApiService;
|
3076
|
-
}
|
3077
|
-
VlRampDirective.prototype.createRamp = function (sourceItems, currentRamps, term) {
|
3078
|
-
var _this = this;
|
3079
|
-
var context = this.contextService.resolve();
|
3080
|
-
return this.rampApiService
|
3081
|
-
.next({
|
3082
|
-
context: context,
|
3083
|
-
sourceItems: sourceItems,
|
3084
|
-
currentItems: currentRamps || [],
|
3085
|
-
term: term,
|
3086
|
-
})
|
3087
|
-
.pipe(rxjsOperators.tap(function (data) {
|
3088
|
-
if (data.context) {
|
3089
|
-
_this.contextService.update({
|
3090
|
-
properties: Object.assign({}, data.context.properties),
|
3091
|
-
});
|
3092
|
-
}
|
3093
|
-
}))
|
3094
|
-
.toPromise();
|
3095
|
-
};
|
3096
|
-
VlRampDirective.prototype.calculateRampTermByEndDate = function (lineItem, endDate) {
|
3097
|
-
return this.priceApiService
|
3098
|
-
.getSellingTermByEndDate(lineItem.planId, lineItem.offeringId, lineItem.startDate, endDate, lineItem.sellingFrequencyUnit, lineItem.sellingFrequencyDuration)
|
3099
|
-
.toPromise();
|
3100
|
-
};
|
3101
|
-
VlRampDirective.prototype.calculateRampTermByTerm = function (lineItem, term) {
|
3102
|
-
return this.priceApiService
|
3103
|
-
.getSellingTermByTerm(lineItem.planId, lineItem.offeringId, lineItem.startDate, term, lineItem.sellingFrequencyUnit, lineItem.sellingFrequencyDuration)
|
3104
|
-
.toPromise();
|
3105
|
-
};
|
3106
|
-
return VlRampDirective;
|
3107
|
-
}());
|
3108
|
-
VlRampDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlRampDirective, deps: [{ token: i2__namespace.ContextService }, { token: i1__namespace.RampApiService }, { token: i1__namespace.PriceApiService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
3109
|
-
VlRampDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: VlRampDirective, selector: "vl-ramp", exportAs: ["rampApi"], ngImport: i0__namespace });
|
3110
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VlRampDirective, decorators: [{
|
3111
|
-
type: i0.Directive,
|
3112
|
-
args: [{
|
3113
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
3114
|
-
selector: 'vl-ramp',
|
3115
|
-
exportAs: 'rampApi',
|
3116
|
-
}]
|
3117
|
-
}], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i1__namespace.RampApiService }, { type: i1__namespace.PriceApiService }]; } });
|
3118
|
-
|
3119
|
-
var SHA1$1 = i7.UUID.SHA1();
|
3120
|
-
var SCRIPT_GLOBAL_NAME = "$velo";
|
3121
|
-
var SectionScriptDirective = /** @class */ (function () {
|
3122
|
-
function SectionScriptDirective(_document, sfQueryDirective, lineItemDirective, quoteDirective, documentTemplatesDirective, rampDirective, approvalDirective, documentAttachmentsDirective, formScope, sectionScope, renderer, formBuilder, runtimeService, cdr, cartService, contextService, currentStateService, quoteService) {
|
3123
|
-
this._document = _document;
|
3124
|
-
this.sfQueryDirective = sfQueryDirective;
|
3125
|
-
this.lineItemDirective = lineItemDirective;
|
3126
|
-
this.quoteDirective = quoteDirective;
|
3127
|
-
this.documentTemplatesDirective = documentTemplatesDirective;
|
3128
|
-
this.rampDirective = rampDirective;
|
3129
|
-
this.approvalDirective = approvalDirective;
|
3130
|
-
this.documentAttachmentsDirective = documentAttachmentsDirective;
|
3131
|
-
this.formScope = formScope;
|
3132
|
-
this.sectionScope = sectionScope;
|
3133
|
-
this.renderer = renderer;
|
3134
|
-
this.formBuilder = formBuilder;
|
3135
|
-
this.runtimeService = runtimeService;
|
3136
|
-
this.cdr = cdr;
|
3137
|
-
this.cartService = cartService;
|
3138
|
-
this.contextService = contextService;
|
3139
|
-
this.currentStateService = currentStateService;
|
3140
|
-
this.quoteService = quoteService;
|
3141
|
-
this.scriptId = '';
|
3142
|
-
this.sessionScope = {};
|
3143
|
-
}
|
3144
|
-
SectionScriptDirective.prototype.ngOnInit = function () {
|
3145
|
-
if (!this.scriptExists()) {
|
3146
|
-
return;
|
3147
|
-
}
|
3148
|
-
this.scriptId = this.generateScriptId();
|
3149
|
-
this.registry = this.getScriptRegistry();
|
3150
|
-
this.sessionScope = this.getSessionScope();
|
3151
|
-
if (!this.registry.exists(this.scriptId)) {
|
3152
|
-
this.appendScriptElementToDom();
|
3153
|
-
}
|
3154
|
-
this.initScript();
|
3155
|
-
this.registry.doRegister(this.scriptId, this.sectionScope.section.id);
|
3156
|
-
};
|
3157
|
-
SectionScriptDirective.prototype.ngAfterViewInit = function () {
|
3158
|
-
var _a;
|
3159
|
-
var sharedScriptGlobal = (_a = this.registry) === null || _a === void 0 ? void 0 : _a.getGlobalForScript(this.sectionScope.section.id);
|
3160
|
-
if (sharedScriptGlobal) {
|
3161
|
-
this.methodApply('afterViewInit', sharedScriptGlobal);
|
3162
|
-
}
|
3163
|
-
};
|
3164
|
-
SectionScriptDirective.prototype.ngOnDestroy = function () {
|
3165
|
-
if (!this.scriptId) {
|
3166
|
-
return;
|
3167
|
-
}
|
3168
|
-
this.registry.unRegister(this.scriptId, this.sectionScope.section.id);
|
3169
|
-
if (!this.registry.exists(this.scriptId)) {
|
3170
|
-
this.removeScript();
|
3171
|
-
this.registry.removeGlobalForScript(this.scriptId);
|
3172
|
-
}
|
3173
|
-
};
|
3174
|
-
Object.defineProperty(SectionScriptDirective.prototype, "scope", {
|
3175
|
-
get: function () {
|
3176
|
-
if (!this.scriptId || !this.sectionScope.section) {
|
3177
|
-
return {};
|
3178
|
-
}
|
3179
|
-
return Object.assign({}, this.registry.getGlobalForScript(this.sectionScope.section.id) || {}, this.sessionScope);
|
3180
|
-
},
|
3181
|
-
enumerable: false,
|
3182
|
-
configurable: true
|
3183
|
-
});
|
3184
|
-
SectionScriptDirective.prototype.scriptExists = function () {
|
3185
|
-
var _a, _b, _c, _d;
|
3186
|
-
return ((_d = (_c = (_b = (_a = this.sectionScope) === null || _a === void 0 ? void 0 : _a.section) === null || _b === void 0 ? void 0 : _b.script) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0;
|
3187
|
-
};
|
3188
|
-
SectionScriptDirective.prototype.encodeScriptBody = function () {
|
3189
|
-
return this.sectionScope.section.script ? atob(this.sectionScope.section.script) : '';
|
3190
|
-
};
|
3191
|
-
SectionScriptDirective.prototype.generateScriptId = function () {
|
3192
|
-
return '_' + SHA1$1.hex(this.encodeScriptBody());
|
3193
|
-
};
|
3194
|
-
SectionScriptDirective.prototype.getScriptRegistry = function () {
|
3195
|
-
return this.formScope.scriptRegistry;
|
3196
|
-
};
|
3197
|
-
SectionScriptDirective.prototype.getSessionScope = function () {
|
3198
|
-
return this.formScope.scriptSessionScope;
|
3199
|
-
};
|
3200
|
-
SectionScriptDirective.prototype.initScript = function () {
|
3201
|
-
var sharedScriptGlobal = this.registry.getGlobalForScript(this.sectionScope.section.id);
|
3202
|
-
if (!i7.EntityUtil.isPresent(sharedScriptGlobal)) {
|
3203
|
-
sharedScriptGlobal = {};
|
3204
|
-
this.registry.setGlobalForScript(this.sectionScope.section.id, sharedScriptGlobal);
|
3205
|
-
}
|
3206
|
-
this.methodApply('init', sharedScriptGlobal);
|
3207
|
-
};
|
3208
|
-
SectionScriptDirective.prototype.removeScript = function () {
|
3209
|
-
var sharedScriptGlobal = this.registry.getGlobalForScript(this.sectionScope.section.id);
|
3210
|
-
this.methodApply('destroy', sharedScriptGlobal);
|
3211
|
-
this.removeScriptElementFromDom();
|
3212
|
-
};
|
3213
|
-
SectionScriptDirective.prototype.appendScriptElementToDom = function () {
|
3214
|
-
var script = this.scriptFromTemplate(this.encodeScriptBody(), this.scriptId, this.sectionScope.section);
|
3215
|
-
this.scriptElement = this.renderer.createElement('script');
|
3216
|
-
this.scriptElement.type = "text/javascript";
|
3217
|
-
this.scriptElement.text = script;
|
3218
|
-
this.scriptElement.setAttribute('id', this.scriptId);
|
3219
|
-
this.renderer.appendChild(this._document.body, this.scriptElement);
|
3220
|
-
};
|
3221
|
-
SectionScriptDirective.prototype.removeScriptElementFromDom = function () {
|
3222
|
-
if (!this.scriptElement) {
|
3223
|
-
this.scriptElement = this._document.getElementById(this.scriptId);
|
3224
|
-
}
|
3225
|
-
this.scriptElement.remove();
|
3226
|
-
};
|
3227
|
-
SectionScriptDirective.prototype.scriptFromTemplate = function (scriptBody, scriptId, section) {
|
3228
|
-
return "var " + scriptId + " = (function (" + SCRIPT_GLOBAL_NAME + ", form, { section, templates }, sessionScope, formBuilder, runtimeContext, cdr, apis) {\n " + SCRIPT_GLOBAL_NAME + "[\"form\"] = form;\n " + SCRIPT_GLOBAL_NAME + "[\"section\"] = section;\n " + SCRIPT_GLOBAL_NAME + "[\"templates\"] = templates;\n " + SCRIPT_GLOBAL_NAME + "[\"sessionScope\"] = sessionScope;\n " + SCRIPT_GLOBAL_NAME + "[\"formBuilder\"] = formBuilder;\n " + SCRIPT_GLOBAL_NAME + "[\"runtimeContext\"] = runtimeContext;\n " + SCRIPT_GLOBAL_NAME + "[\"cdr\"] = cdr;\n " + SCRIPT_GLOBAL_NAME + "[\"apis\"] = apis;\n\n " + scriptBody + "\n return " + SCRIPT_GLOBAL_NAME + ";\n });\n\n //# sourceURL=" + ___namespace.kebabCase(section.label) + ".js";
|
3229
|
-
};
|
3230
|
-
SectionScriptDirective.prototype.methodApply = function (methodName, sharedScriptGlobal) {
|
3231
|
-
var args = [
|
3232
|
-
sharedScriptGlobal,
|
3233
|
-
this.formScope.form,
|
3234
|
-
this.sectionScope,
|
3235
|
-
this.sessionScope,
|
3236
|
-
this.formBuilder,
|
3237
|
-
this.runtimeService.getRuntimeContext(),
|
3238
|
-
this.cdr,
|
3239
|
-
this.getExposedApis(),
|
3240
|
-
];
|
3241
|
-
var fnInit = window["" + this.scriptId].apply(window, __spreadArray([], __read(args)));
|
3242
|
-
fnInit && fnInit[methodName] && fnInit[methodName].apply();
|
3243
|
-
};
|
3244
|
-
SectionScriptDirective.prototype.getExposedApis = function () {
|
3245
|
-
return {
|
3246
|
-
'sf-query': this.sfQueryDirective,
|
3247
|
-
'line-item': this.lineItemDirective,
|
3248
|
-
'quote-directive': this.quoteDirective,
|
3249
|
-
'templates-directive': this.documentTemplatesDirective,
|
3250
|
-
'attachments-directive': this.documentAttachmentsDirective,
|
3251
|
-
'ramp-directive': this.rampDirective,
|
3252
|
-
'approval-directive': this.approvalDirective,
|
3253
|
-
entityUtil: i7.EntityUtil,
|
3254
|
-
moment: moment__namespace,
|
3255
|
-
lodash: ___namespace,
|
3256
|
-
rxjs: Object.assign(Object.assign({}, rxjsOperators__namespace), rxjs__namespace),
|
3257
|
-
PagedEntity: i7.PagedEntity,
|
3258
|
-
pipes: {
|
3259
|
-
currency: i5.CurrencyPipe,
|
3260
|
-
},
|
3261
|
-
solutionUpdateStarted: this.runtimeService.onSolutionUpdateStartedEvent,
|
3262
|
-
solutionUpdated: this.runtimeService.onSolutionProcessed,
|
3263
|
-
cartService: this.cartService,
|
3264
|
-
configurationContextService: this.contextService,
|
3265
|
-
quoteDraft: this.quoteService.quoteDraft,
|
3266
|
-
currentStateService: this.currentStateService,
|
3267
|
-
};
|
3268
|
-
};
|
3269
|
-
return SectionScriptDirective;
|
3270
|
-
}());
|
3271
|
-
SectionScriptDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionScriptDirective, deps: [{ token: i5.DOCUMENT }, { token: SfQueryDirective }, { token: LineItemDirective }, { token: VlQuoteDirective }, { token: VlDocumentTemplatesDirective }, { token: VlRampDirective }, { token: VlApprovalDirective }, { token: VlDocumentAttachmentsDirective }, { token: FormScopeService }, { token: SectionScopeService }, { token: i0__namespace.Renderer2 }, { token: i4__namespace.FormBuilder }, { token: RuntimeService }, { token: i0__namespace.ChangeDetectorRef }, { token: ShoppingCartService }, { token: i2__namespace.ContextService }, { token: CurrentStateService }, { token: i2__namespace.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
3272
|
-
SectionScriptDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: SectionScriptDirective, selector: "section-script", providers: [
|
3273
|
-
SfQueryDirective,
|
3274
|
-
LineItemDirective,
|
3275
|
-
VlQuoteDirective,
|
3276
|
-
VlDocumentTemplatesDirective,
|
3277
|
-
VlRampDirective,
|
3278
|
-
VlApprovalDirective,
|
3279
|
-
VlDocumentAttachmentsDirective,
|
3280
|
-
], exportAs: ["scriptApi"], ngImport: i0__namespace });
|
3281
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionScriptDirective, decorators: [{
|
3282
|
-
type: i0.Directive,
|
3283
|
-
args: [{
|
3284
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
3285
|
-
selector: 'section-script',
|
3286
|
-
exportAs: 'scriptApi',
|
3287
|
-
providers: [
|
3288
|
-
SfQueryDirective,
|
3289
|
-
LineItemDirective,
|
3290
|
-
VlQuoteDirective,
|
3291
|
-
VlDocumentTemplatesDirective,
|
3292
|
-
VlRampDirective,
|
3293
|
-
VlApprovalDirective,
|
3294
|
-
VlDocumentAttachmentsDirective,
|
3295
|
-
],
|
3296
|
-
}]
|
3297
|
-
}], ctorParameters: function () {
|
3298
|
-
return [{ type: Document, decorators: [{
|
3299
|
-
type: i0.Inject,
|
3300
|
-
args: [i5.DOCUMENT]
|
3301
|
-
}] }, { type: SfQueryDirective, decorators: [{
|
3302
|
-
type: i0.Inject,
|
3303
|
-
args: [SfQueryDirective]
|
3304
|
-
}] }, { type: LineItemDirective, decorators: [{
|
3305
|
-
type: i0.Inject,
|
3306
|
-
args: [LineItemDirective]
|
3307
|
-
}] }, { type: VlQuoteDirective, decorators: [{
|
3308
|
-
type: i0.Inject,
|
3309
|
-
args: [VlQuoteDirective]
|
3310
|
-
}] }, { type: VlDocumentTemplatesDirective, decorators: [{
|
3311
|
-
type: i0.Inject,
|
3312
|
-
args: [VlDocumentTemplatesDirective]
|
3313
|
-
}] }, { type: VlRampDirective, decorators: [{
|
3314
|
-
type: i0.Inject,
|
3315
|
-
args: [VlRampDirective]
|
3316
|
-
}] }, { type: VlApprovalDirective, decorators: [{
|
3317
|
-
type: i0.Inject,
|
3318
|
-
args: [VlApprovalDirective]
|
3319
|
-
}] }, { type: VlDocumentAttachmentsDirective, decorators: [{
|
3320
|
-
type: i0.Inject,
|
3321
|
-
args: [VlDocumentAttachmentsDirective]
|
3322
|
-
}] }, { type: FormScopeService }, { type: SectionScopeService }, { type: i0__namespace.Renderer2 }, { type: i4__namespace.FormBuilder }, { type: RuntimeService }, { type: i0__namespace.ChangeDetectorRef }, { type: ShoppingCartService }, { type: i2__namespace.ContextService }, { type: CurrentStateService }, { type: i2__namespace.QuoteDraftService }];
|
3323
|
-
} });
|
3324
|
-
|
3325
|
-
var RuntimeExecutionModule = /** @class */ (function () {
|
3326
|
-
function RuntimeExecutionModule() {
|
3327
|
-
}
|
3328
|
-
return RuntimeExecutionModule;
|
3329
|
-
}());
|
3330
|
-
RuntimeExecutionModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeExecutionModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
3331
|
-
RuntimeExecutionModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeExecutionModule, declarations: [ExecutionSectionRendererComponent,
|
3332
|
-
ChildrenPlaceholderComponent,
|
3333
|
-
SectionScriptDirective,
|
3334
|
-
VeloPortDirective,
|
3335
|
-
LineItemDirective,
|
3336
|
-
VeloDropdownComponent,
|
3337
|
-
VeloQuantityButtonComponent,
|
3338
|
-
VeloQuantityComponent,
|
3339
|
-
VeloAttributeDirective,
|
3340
|
-
MultiselectComponent,
|
3341
|
-
VeloAttributeComponent,
|
3342
|
-
VeloPortRadioComponent,
|
3343
|
-
VeloTypeComponent,
|
3344
|
-
VeloPortDropdownComponent,
|
3345
|
-
VeloPortCheckBoxComponent,
|
3346
|
-
FederatedComponent,
|
3347
|
-
TemplateComponent,
|
3348
|
-
ContextProviderComponent], imports: [i5.CommonModule,
|
3349
|
-
i4.FormsModule,
|
3350
|
-
i4.ReactiveFormsModule,
|
3351
|
-
i7.CoreModule,
|
3352
|
-
i1.ApiModule,
|
3353
|
-
elements.VeloceElementsModule,
|
3354
|
-
i5$1.PopoverModule,
|
3355
|
-
i8.LoaderModule,
|
3356
|
-
i2.SdkCoreModule], exports: [i4.FormsModule,
|
3357
|
-
i4.ReactiveFormsModule,
|
3358
|
-
ChildrenPlaceholderComponent,
|
3359
|
-
SectionScriptDirective,
|
3360
|
-
LineItemDirective,
|
3361
|
-
VeloPortDirective,
|
3362
|
-
VeloAttributeDirective,
|
3363
|
-
MultiselectComponent,
|
3364
|
-
VeloAttributeComponent,
|
3365
|
-
VeloPortRadioComponent,
|
3366
|
-
VeloTypeComponent,
|
3367
|
-
VeloPortDropdownComponent,
|
3368
|
-
VeloPortCheckBoxComponent,
|
3369
|
-
FederatedComponent,
|
3370
|
-
TemplateComponent,
|
3371
|
-
ContextProviderComponent] });
|
3372
|
-
RuntimeExecutionModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeExecutionModule, providers: [
|
3373
|
-
ShoppingCartService,
|
3374
|
-
RuntimeService,
|
3375
|
-
ConfigurationService,
|
3376
|
-
RuntimeContextService,
|
3377
|
-
RuntimeFormService,
|
3378
|
-
CurrentStateService,
|
3379
|
-
ProductModelCacheService,
|
3380
|
-
i5.DatePipe,
|
3381
|
-
SectionStoreService,
|
3382
|
-
], imports: [[
|
3383
|
-
i5.CommonModule,
|
3384
|
-
i4.FormsModule,
|
3385
|
-
i4.ReactiveFormsModule,
|
3386
|
-
i7.CoreModule,
|
3387
|
-
i1.ApiModule,
|
3388
|
-
elements.VeloceElementsModule,
|
3389
|
-
i5$1.PopoverModule,
|
3390
|
-
i8.LoaderModule,
|
3391
|
-
i2.SdkCoreModule,
|
3392
|
-
], i4.FormsModule,
|
3393
|
-
i4.ReactiveFormsModule] });
|
3394
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeExecutionModule, decorators: [{
|
3395
|
-
type: i0.NgModule,
|
3396
|
-
args: [{
|
3397
|
-
declarations: [
|
3398
|
-
ExecutionSectionRendererComponent,
|
3399
|
-
ChildrenPlaceholderComponent,
|
3400
|
-
SectionScriptDirective,
|
3401
|
-
VeloPortDirective,
|
3402
|
-
LineItemDirective,
|
3403
|
-
VeloDropdownComponent,
|
3404
|
-
VeloQuantityButtonComponent,
|
3405
|
-
VeloQuantityComponent,
|
3406
|
-
VeloAttributeDirective,
|
3407
|
-
MultiselectComponent,
|
3408
|
-
VeloAttributeComponent,
|
3409
|
-
VeloPortRadioComponent,
|
3410
|
-
VeloTypeComponent,
|
3411
|
-
VeloPortDropdownComponent,
|
3412
|
-
VeloPortCheckBoxComponent,
|
3413
|
-
FederatedComponent,
|
3414
|
-
TemplateComponent,
|
3415
|
-
ContextProviderComponent,
|
3416
|
-
],
|
3417
|
-
providers: [
|
3418
|
-
ShoppingCartService,
|
3419
|
-
RuntimeService,
|
3420
|
-
ConfigurationService,
|
3421
|
-
RuntimeContextService,
|
3422
|
-
RuntimeFormService,
|
3423
|
-
CurrentStateService,
|
3424
|
-
ProductModelCacheService,
|
3425
|
-
i5.DatePipe,
|
3426
|
-
SectionStoreService,
|
3427
|
-
],
|
3428
|
-
imports: [
|
3429
|
-
i5.CommonModule,
|
3430
|
-
i4.FormsModule,
|
3431
|
-
i4.ReactiveFormsModule,
|
3432
|
-
i7.CoreModule,
|
3433
|
-
i1.ApiModule,
|
3434
|
-
elements.VeloceElementsModule,
|
3435
|
-
i5$1.PopoverModule,
|
3436
|
-
i8.LoaderModule,
|
3437
|
-
i2.SdkCoreModule,
|
3438
|
-
],
|
3439
|
-
exports: [
|
3440
|
-
i4.FormsModule,
|
3441
|
-
i4.ReactiveFormsModule,
|
3442
|
-
ChildrenPlaceholderComponent,
|
3443
|
-
SectionScriptDirective,
|
3444
|
-
LineItemDirective,
|
3445
|
-
VeloPortDirective,
|
3446
|
-
VeloAttributeDirective,
|
3447
|
-
MultiselectComponent,
|
3448
|
-
VeloAttributeComponent,
|
3449
|
-
VeloPortRadioComponent,
|
3450
|
-
VeloTypeComponent,
|
3451
|
-
VeloPortDropdownComponent,
|
3452
|
-
VeloPortCheckBoxComponent,
|
3453
|
-
FederatedComponent,
|
3454
|
-
TemplateComponent,
|
3455
|
-
ContextProviderComponent,
|
3456
|
-
],
|
3457
|
-
}]
|
3458
|
-
}] });
|
3459
|
-
|
3460
|
-
var SHA1 = i7.UUID.SHA1();
|
3461
|
-
var BaseSectionComponent = /** @class */ (function () {
|
3462
|
-
function BaseSectionComponent() {
|
3463
|
-
}
|
3464
|
-
return BaseSectionComponent;
|
3465
|
-
}());
|
3466
|
-
BaseSectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseSectionComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
3467
|
-
BaseSectionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: BaseSectionComponent, selector: "ng-component", inputs: { form: "form", section: "section" }, viewQueries: [{ propertyName: "templates", predicate: ["customTemplate"], descendants: true }], ngImport: i0__namespace, template: '', isInline: true });
|
3468
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BaseSectionComponent, decorators: [{
|
3469
|
-
type: i0.Component,
|
3470
|
-
args: [{ template: '' }]
|
3471
|
-
}], propDecorators: { form: [{
|
3472
|
-
type: i0.Input
|
3473
|
-
}], section: [{
|
3474
|
-
type: i0.Input
|
3475
|
-
}], templates: [{
|
3476
|
-
type: i0.ViewChildren,
|
3477
|
-
args: ['customTemplate']
|
3478
|
-
}] } });
|
3479
|
-
var SectionsService = /** @class */ (function () {
|
3480
|
-
function SectionsService(compiler, m, sectionStore) {
|
3481
|
-
this.compiler = compiler;
|
3482
|
-
this.m = m;
|
3483
|
-
this.sectionStore = sectionStore;
|
3484
|
-
this.moduleType = null;
|
3485
|
-
this.moduleInstance = null;
|
3486
|
-
}
|
3487
|
-
SectionsService.prototype.compileModule = function (sections, isViewEncapsulated) {
|
3488
|
-
var uniqueSections = this.getUniqueSections(sections);
|
3489
|
-
this.moduleType = this.getModuleType(uniqueSections, isViewEncapsulated);
|
3490
|
-
this.moduleInstance = this.compiler.compileModuleAndAllComponentsSync(this.moduleType);
|
3491
|
-
this.sectionStore.componentFactories = this.moduleInstance.componentFactories;
|
3492
|
-
};
|
3493
|
-
SectionsService.prototype.destroy = function () {
|
3494
|
-
if (this.moduleInstance) {
|
3495
|
-
this.sectionStore.componentFactories = [];
|
3496
|
-
this.moduleInstance = null;
|
3497
|
-
}
|
3498
|
-
if (this.moduleType) {
|
3499
|
-
this.compiler.clearCacheFor(this.moduleType);
|
3500
|
-
this.moduleType = null;
|
3501
|
-
}
|
3502
|
-
};
|
3503
|
-
SectionsService.prototype.getDecoratedComponents = function (sections, isViewEncapsulated) {
|
3504
|
-
var _this = this;
|
3505
|
-
if (isViewEncapsulated === void 0) { isViewEncapsulated = false; }
|
3506
|
-
var result = [];
|
3507
|
-
sections.forEach(function (section) {
|
3508
|
-
var _a;
|
3509
|
-
var transpiledTemplate = _this.getTranspiledTemplate(section);
|
3510
|
-
var DynamicComponent = i0.Component({
|
3511
|
-
selector: section.dynamicSelector,
|
3512
|
-
template: transpiledTemplate,
|
3513
|
-
styles: [atob(section.styles || '')],
|
3514
|
-
providers: [SectionHelperService],
|
3515
|
-
encapsulation: isViewEncapsulated ? i0.ViewEncapsulation.ShadowDom : i0.ViewEncapsulation.Emulated,
|
3516
|
-
jit: true,
|
3517
|
-
})(/** @class */ (function (_super) {
|
3518
|
-
__extends(C, _super);
|
3519
|
-
function C() {
|
3520
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
3521
|
-
}
|
3522
|
-
return C;
|
3523
|
-
}(BaseSectionComponent)));
|
3524
|
-
_this.applySelectorField(DynamicComponent, (_a = section.dynamicSelector) !== null && _a !== void 0 ? _a : '');
|
3525
|
-
result.push(DynamicComponent);
|
3526
|
-
});
|
3527
|
-
return result;
|
3528
|
-
};
|
3529
|
-
SectionsService.prototype.getModuleType = function (sections, isViewEncapsulated) {
|
3530
|
-
var decoratedComponents = this.getDecoratedComponents(sections, isViewEncapsulated);
|
3531
|
-
var DynamicModule = /** @class */ (function () {
|
3532
|
-
function DynamicModule() {
|
3533
|
-
}
|
3534
|
-
return DynamicModule;
|
3535
|
-
}());
|
3536
|
-
DynamicModule = __decorate([
|
3537
|
-
i0.NgModule({
|
3538
|
-
imports: [
|
3539
|
-
i5.CommonModule,
|
3540
|
-
RuntimeExecutionModule,
|
3541
|
-
i7.CoreModule,
|
3542
|
-
elements.VeloceElementsModule,
|
3543
|
-
scrolling.ScrollingModule,
|
3544
|
-
scrolling$1.ScrollingModule,
|
3545
|
-
],
|
3546
|
-
declarations: [decoratedComponents],
|
3547
|
-
jit: true,
|
3548
|
-
})
|
3549
|
-
], DynamicModule);
|
3550
|
-
return DynamicModule;
|
3551
|
-
};
|
3552
|
-
SectionsService.prototype.applySelectorField = function (target, dynamicSelector) {
|
3553
|
-
_.set(target, '$$dynamicSelector', dynamicSelector);
|
3554
|
-
};
|
3555
|
-
SectionsService.prototype.getUniqueSections = function (sections) {
|
3556
|
-
var uniqueSections = {};
|
3557
|
-
sections.forEach(function (section) {
|
3558
|
-
section.hash = SHA1.hex(section.template);
|
3559
|
-
var existingSection = section.hash ? uniqueSections[section.hash] : undefined;
|
3560
|
-
if (existingSection && existingSection.template === section.template) {
|
3561
|
-
section.dynamicSelector = existingSection.dynamicSelector;
|
3562
|
-
}
|
3563
|
-
else if (section.hash) {
|
3564
|
-
section.dynamicSelector = "section-" + section.id;
|
3565
|
-
uniqueSections[section.hash] = section;
|
3566
|
-
}
|
3567
|
-
});
|
3568
|
-
return _.values(uniqueSections);
|
3569
|
-
};
|
3570
|
-
SectionsService.prototype.getTranspiledTemplate = function (section) {
|
3571
|
-
var template = section.template ? atob(section.template) : '';
|
3572
|
-
if (!i7.EntityUtil.isEmpty(section.script) && template.indexOf('<section-script') === -1) {
|
3573
|
-
template = "<section-script></section-script>".concat(template);
|
3574
|
-
}
|
3575
|
-
return template;
|
3576
|
-
};
|
3577
|
-
return SectionsService;
|
3578
|
-
}());
|
3579
|
-
SectionsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionsService, deps: [{ token: i0__namespace.Compiler }, { token: i0__namespace.NgModuleRef }, { token: SectionStoreService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
3580
|
-
SectionsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionsService });
|
3581
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionsService, decorators: [{
|
3582
|
-
type: i0.Injectable
|
3583
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Compiler }, { type: i0__namespace.NgModuleRef }, { type: SectionStoreService }]; } });
|
3584
|
-
|
3585
|
-
var SectionRendererComponent = /** @class */ (function () {
|
3586
|
-
function SectionRendererComponent(_injector, _m, sectionScope, sectionStore) {
|
3587
|
-
this._injector = _injector;
|
3588
|
-
this._m = _m;
|
3589
|
-
this.sectionScope = sectionScope;
|
3590
|
-
this.sectionStore = sectionStore;
|
3591
|
-
this.componentRef = null;
|
3592
|
-
}
|
3593
|
-
Object.defineProperty(SectionRendererComponent.prototype, "section", {
|
3594
|
-
get: function () {
|
3595
|
-
return this._section;
|
3596
|
-
},
|
3597
|
-
set: function (value) {
|
3598
|
-
this._section = value;
|
3599
|
-
this.sectionScope.section = value;
|
3600
|
-
},
|
3601
|
-
enumerable: false,
|
3602
|
-
configurable: true
|
3603
|
-
});
|
3604
|
-
SectionRendererComponent.prototype.ngOnInit = function () {
|
3605
|
-
this.renderSection();
|
3606
|
-
};
|
3607
|
-
SectionRendererComponent.prototype.ngAfterViewInit = function () {
|
3608
|
-
var _a, _b;
|
3609
|
-
if (this.componentRef) {
|
3610
|
-
this.sectionScope.templates.next((_b = (_a = this.componentRef.instance['templates']) === null || _a === void 0 ? void 0 : _a.toArray()) !== null && _b !== void 0 ? _b : []);
|
3611
|
-
}
|
3612
|
-
};
|
3613
|
-
SectionRendererComponent.prototype.ngOnDestroy = function () {
|
3614
|
-
if (this.componentRef) {
|
3615
|
-
this.componentRef.destroy();
|
3616
|
-
this.componentRef = null;
|
3617
|
-
}
|
3618
|
-
};
|
3619
|
-
SectionRendererComponent.prototype.renderSection = function () {
|
3620
|
-
var _a;
|
3621
|
-
if (this.componentRef) {
|
3622
|
-
this.componentRef.destroy();
|
3623
|
-
this.componentRef = null;
|
3624
|
-
}
|
3625
|
-
var componentFactory = this.sectionStore.getComponentFactory(this._section);
|
3626
|
-
if (!componentFactory) {
|
3627
|
-
return;
|
3628
|
-
}
|
3629
|
-
this.componentRef = componentFactory.create(this._injector, [], null, this._m);
|
3630
|
-
this.componentRef.location.nativeElement.setAttribute('sectionId', "" + ((_a = this._section.model) === null || _a === void 0 ? void 0 : _a.id) + this._section.label);
|
3631
|
-
this.componentRef.instance['form'] = this.form;
|
3632
|
-
this.componentRef.instance['section'] = this.section;
|
3633
|
-
this.container.insert(this.componentRef.hostView);
|
3634
|
-
};
|
3635
|
-
return SectionRendererComponent;
|
3636
|
-
}());
|
3637
|
-
SectionRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionRendererComponent, deps: [{ token: i0__namespace.Injector }, { token: i0__namespace.NgModuleRef }, { token: SectionScopeService }, { token: SectionStoreService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
3638
|
-
SectionRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SectionRendererComponent, selector: "vl-section-renderer", inputs: { section: "section", form: "form" }, providers: [SectionScopeService], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: "<ng-template #container></ng-template>", styles: [":host{display:contents}\n"] });
|
3639
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SectionRendererComponent, decorators: [{
|
3640
|
-
type: i0.Component,
|
3641
|
-
args: [{
|
3642
|
-
selector: 'vl-section-renderer',
|
3643
|
-
templateUrl: 'section-renderer.component.html',
|
3644
|
-
styleUrls: ['section-renderer.component.scss'],
|
3645
|
-
providers: [SectionScopeService],
|
3646
|
-
}]
|
3647
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i0__namespace.NgModuleRef }, { type: SectionScopeService }, { type: SectionStoreService }]; }, propDecorators: { section: [{
|
3648
|
-
type: i0.Input
|
3649
|
-
}], form: [{
|
3650
|
-
type: i0.Input
|
3651
|
-
}], container: [{
|
3652
|
-
type: i0.ViewChild,
|
3653
|
-
args: ['container', { read: i0.ViewContainerRef, static: true }]
|
3654
|
-
}] } });
|
3655
|
-
|
3656
|
-
var defaultTemplate = btoa('<template-component></template-component>');
|
3657
|
-
var ComponentPreviewComponent = /** @class */ (function () {
|
3658
|
-
function ComponentPreviewComponent(sectionsService, runtimeFormService, formScope, runtimeService, cdr) {
|
3659
|
-
this.sectionsService = sectionsService;
|
3660
|
-
this.runtimeFormService = runtimeFormService;
|
3661
|
-
this.formScope = formScope;
|
3662
|
-
this.runtimeService = runtimeService;
|
3663
|
-
this.cdr = cdr;
|
3664
|
-
this.form = new i4.FormGroup({});
|
3665
|
-
this.showPreview = false;
|
3666
|
-
this.isNoPreviewAvailable = false;
|
3667
|
-
this.isPreviewFailed = false;
|
3668
|
-
}
|
3669
|
-
ComponentPreviewComponent.prototype.ngOnChanges = function (changes) {
|
3670
|
-
var _this = this;
|
3671
|
-
if (changes.data) {
|
3672
|
-
this.sectionsService.destroy();
|
3673
|
-
this.showPreview = false;
|
3674
|
-
this.isNoPreviewAvailable = false;
|
3675
|
-
this.isPreviewFailed = false;
|
3676
|
-
setTimeout(function () {
|
3677
|
-
var _a, _b;
|
3678
|
-
try {
|
3679
|
-
_this.runPreview(_this.data);
|
3680
|
-
_this.cdr.detectChanges();
|
3681
|
-
}
|
3682
|
-
catch (e) {
|
3683
|
-
console.error((_b = (_a = e === null || e === void 0 ? void 0 : e.stack) !== null && _a !== void 0 ? _a : e === null || e === void 0 ? void 0 : e.error) !== null && _b !== void 0 ? _b : 'Error occured');
|
3684
|
-
_this.showPreview = false;
|
3685
|
-
_this.isPreviewFailed = true;
|
3686
|
-
_this.cdr.detectChanges();
|
3687
|
-
}
|
3688
|
-
});
|
3689
|
-
}
|
3690
|
-
};
|
3691
|
-
ComponentPreviewComponent.prototype.runPreview = function (data) {
|
3692
|
-
var _a;
|
3693
|
-
var section = data.section && JSON.parse(data.section);
|
3694
|
-
if (!section) {
|
3695
|
-
this.isNoPreviewAvailable = true;
|
3696
|
-
return;
|
3697
|
-
}
|
3698
|
-
var model = Object.assign(Object.assign({}, ((_a = section === null || section === void 0 ? void 0 : section.model) !== null && _a !== void 0 ? _a : {
|
3699
|
-
attributes: [],
|
3700
|
-
lineItems: [],
|
3701
|
-
})), { id: i7.UUID.UUID() });
|
3702
|
-
var componentSection = Object.assign(Object.assign({}, section), { script: data.componentScript ? btoa(data.componentScript) : '', styles: data.componentStyles ? btoa(data.componentStyles) : '', template: data.componentTemplate ? btoa(data.componentTemplate) : '', properties: data.componentProperties ? JSON.stringify(data.componentProperties) : {}, id: i7.UUID.UUID(), model: model });
|
3703
|
-
var storySection = {
|
3704
|
-
id: i7.UUID.UUID(),
|
3705
|
-
template: data.template ? btoa(data.template) : defaultTemplate,
|
3706
|
-
styles: data.styles ? btoa(data.styles) : '',
|
3707
|
-
script: data.script ? btoa(data.script) : '',
|
3708
|
-
children: [componentSection],
|
3709
|
-
model: model,
|
3710
|
-
};
|
3711
|
-
var sections = [storySection, componentSection];
|
3712
|
-
this.form = this.formScope.form = this.runtimeFormService.initForm(sections, model);
|
3713
|
-
this.createRuntimeContext(componentSection);
|
3714
|
-
this.sectionsService.compileModule(sections);
|
3715
|
-
this.section = storySection;
|
3716
|
-
this.showPreview = true;
|
3717
|
-
};
|
3718
|
-
ComponentPreviewComponent.prototype.createRuntimeContext = function (section) {
|
3719
|
-
var runtimeModel = i7.RuntimeModel.create([], {});
|
3720
|
-
var rootType = Array.from(runtimeModel.components.values()).find(function (c) {
|
3721
|
-
var _a;
|
3722
|
-
return ((_a = section.model) === null || _a === void 0 ? void 0 : _a.type) &&
|
3723
|
-
runtimeModel.isEquals(c.typeName, section.model.type) &&
|
3724
|
-
i7.EntityUtil.isPresent(c.productId);
|
3725
|
-
});
|
3726
|
-
var contextProductId = rootType ? rootType.productId : undefined;
|
3727
|
-
var context = {
|
3728
|
-
modelId: '',
|
3729
|
-
runtimeModel: runtimeModel,
|
3730
|
-
runtimeMode: i2.RuntimeMode.TEST,
|
3731
|
-
productId: contextProductId,
|
3732
|
-
properties: {},
|
3733
|
-
};
|
3734
|
-
this.runtimeService.setRuntimeContext(context);
|
3735
|
-
};
|
3736
|
-
return ComponentPreviewComponent;
|
3737
|
-
}());
|
3738
|
-
ComponentPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ComponentPreviewComponent, deps: [{ token: SectionsService }, { token: RuntimeFormService }, { token: FormScopeService }, { token: RuntimeService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
3739
|
-
ComponentPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ComponentPreviewComponent, selector: "vl-component-preview", inputs: { data: "data" }, providers: [
|
3740
|
-
SectionsService,
|
3741
|
-
FormScopeService,
|
3742
|
-
CollapsibleStateService,
|
3743
|
-
RuntimeFormService,
|
3744
|
-
FormScopeService,
|
3745
|
-
RuntimeService,
|
3746
|
-
], usesOnChanges: true, ngImport: i0__namespace, template: "<ng-container *ngIf=\"showPreview\">\n <vl-section-renderer [section]=\"section!\" [form]=\"form\"></vl-section-renderer>\n</ng-container>\n\n<span class=\"info\" *ngIf=\"isNoPreviewAvailable\">No preview available</span>\n<span class=\"info error\" *ngIf=\"isPreviewFailed\">Preview has failed</span>\n", styles: ["@charset \"UTF-8\";body.veloce-apex-index,body.veloce-index,body.sfdcBody{overflow:hidden;margin:0;padding:0}:host ::ng-deep .velo-app .modal.in .modal-dialog.runtime-modal{margin-left:5%;margin-right:5%;padding:0;position:relative;width:auto}:host ::ng-deep .modal-body.runtime-modal.main-container{height:100%;margin:0;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .content-wrapper{display:flex;flex-direction:column;height:100%}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper{display:flex;flex-direction:column;flex-grow:1;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid{height:100%;margin:0;padding:0;overflow:auto}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal .form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid section-script>:first-child{height:100%}:host ::ng-deep .runtime-modal .modal-content,:host ::ng-deep .gu-mirror .modal-content{background-color:--vl-input-background}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a{color:#333333b3;font-weight:600;text-transform:uppercase;letter-spacing:.85px;font-size:10px}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active{color:#333}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.disabled,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.disabled{color:#33333380}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active:after,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active:after{background-color:#f36;bottom:-1px;content:\"\";height:1px;left:0;position:absolute;width:100%}:host ::ng-deep .runtime-modal .modal-content .modal-header,:host ::ng-deep .gu-mirror .modal-content .modal-header{background:transparent;color:#fff}:host ::ng-deep .runtime-modal .runtime-group-divider,:host ::ng-deep .gu-mirror .runtime-group-divider{border-bottom:1px solid #e5e5e5}:host ::ng-deep .runtime-modal .input-form-input,:host ::ng-deep .gu-mirror .input-form-input{position:relative;padding-left:0;padding-top:0}:host ::ng-deep .runtime-modal .input-form-input--required>label,:host ::ng-deep .gu-mirror .input-form-input--required>label{color:#ff4233;font-weight:bold}:host ::ng-deep .form-control-wrapper{position:relative}:host ::ng-deep .add-config-control:hover{background-color:#e96099;color:#fff;border:1px solid transparent}:host ::ng-deep .remove-config-control:hover{background-color:#828c9e;color:#fff}:host ::ng-deep .add-config-control[disabled],:host ::ng-deep .remove-config-control[disabled]{background-color:transparent;color:#ccc;border:1px dashed #ccc}:host ::ng-deep .add-config-control[disabled]:hover,:host ::ng-deep .remove-config-control[disabled]:hover{cursor:default}:host ::ng-deep .add-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;border-radius:50%;float:left;position:absolute;top:0;right:-57px;z-index:500;background-color:#e3337c;color:#fff;border:1px solid #e3337c;transition:all .5s ease 0s}:host ::ng-deep .add-config-control .plus-icon{line-height:36px}:host ::ng-deep .remove-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;margin-right:25px;border-radius:50%;float:left;position:absolute;top:33px;right:51px;z-index:500;background-color:transparent;color:#687285;border:1px solid transparent;transition:all .5s ease 0s}:host ::ng-deep .remove-config-control .plus-icon{line-height:36px}:host ::ng-deep .sidebar .new-wrapper{min-height:96px;margin-bottom:25px}:host ::ng-deep .sidebar .new-wrapper .add-container .add-card{left:0;margin-left:15px}:host ::ng-deep .ui-settings{height:100%;display:flex;flex-direction:column}:host ::ng-deep .runtime-modal .form-horizontal form,:host ::ng-deep .gu-mirror form{margin:0}:host ::ng-deep .runtime-modal .form-horizontal .form-group,:host ::ng-deep .gu-mirror .form-group{margin:0;padding:0}:host ::ng-deep .runtime-modal .form-horizontal .control.form-group,:host ::ng-deep .gu-mirror .control.form-group{margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .form-control-wrapper,:host ::ng-deep .gu-mirror .form-control-wrapper{min-width:172px;margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper{min-width:50px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper .form-control,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper .form-control{width:50px}:host ::ng-deep .runtime-left-side{height:calc(100% - 97px);background:#fff;padding:48px 56px 0}:host ::ng-deep .ui-controls-group{margin-left:-8px;margin-right:-8px}:host ::ng-deep .ui-controls-group .ui-control-type:hover{border-color:#3384ff}:host ::ng-deep .ui-controls-group .ui-control-type{position:relative;min-width:140px;float:left;border-radius:3px;border:1px solid #c4c4c4;background-color:#fff;width:calc(50% - 16px);padding:12px 13px;margin-bottom:16px;margin-right:8px;margin-left:8px;cursor:pointer}:host ::ng-deep .ui-controls-group .ui-control-type span{padding-left:3px}:host ::ng-deep .sidebar-header{letter-spacing:-.5px;padding-bottom:24px;padding-top:0;line-height:32px;font-size:24px;font-weight:700;color:#333}:host ::ng-deep .sidebar-header small{display:block;color:#333;font-size:11px;font-weight:300;line-height:20px;margin:0}:host ::ng-deep .sidebar-menu-list{color:#333333b3;margin:0;width:100%;list-style:none;font-size:12px}:host ::ng-deep .sidebar-menu-list li.active a,:host ::ng-deep .sidebar-menu-list li.active i{color:#005ee3}:host ::ng-deep .sidebar-menu-list li:hover{cursor:pointer}:host ::ng-deep .sidebar-menu-list li{text-align:right;padding-left:16px}:host ::ng-deep .sidebar-menu-list li a{padding:0 8px;margin-left:-8px;cursor:pointer;white-space:nowrap;color:inherit;font-weight:700;display:inline-block;line-height:32px}:host ::ng-deep .sidebar-menu-list li i{display:none;padding-right:5px}:host ::ng-deep .runtime-builder-content{min-height:100%}:host ::ng-deep .runtime-builder-content .input-form{margin:0;padding:18px 11px 0}:host ::ng-deep .runtime-builder-content .input-form .form-group{border:3px dashed transparent}:host ::ng-deep .runtime-builder-content .input-form .form-group:hover{border:3px dashed #dedede}:host ::ng-deep .runtime-right-side{background:#fff}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background:#fff;position:relative;display:inline-block;padding-right:16px;text-transform:uppercase;font-size:10px;letter-spacing:.2px}:host ::ng-deep .sidebar-section:before{content:\" \";position:absolute;top:50%;left:0;right:0;border-top:1px solid #e6e6e6}:host ::ng-deep .sidebar-section{position:relative;margin-top:16px;margin-bottom:16px}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background-color:var(--vl-input-background);position:relative;display:inline-block;padding-right:16px;padding-left:8px;text-transform:uppercase;font-size:6px;letter-spacing:.2px}:host ::ng-deep .section-wrapper{top:-21px;position:absolute;right:0;left:12px}:host ::ng-deep .container-box.container-box-bordered{border:1px solid rgba(0,0,0,.2);margin-bottom:25px;padding-left:25px}:host ::ng-deep .container-box.container-box-radio{margin-left:0}:host ::ng-deep .container-box.container-box-radio:hover,:host ::ng-deep .container-box.container-box-checkbox:hover{cursor:pointer}:host ::ng-deep .container-box{position:relative;overflow:auto;border:1px solid transparent;background:var(--vl-input-background)}:host ::ng-deep .container-box .container-box{border:1px solid rgba(0,0,0,.2);margin-left:25px;margin-right:25px;margin-bottom:25px}:host ::ng-deep .container-box .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box .box-title .header .header-label{color:#333;margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-label small{padding-left:21px;color:#757575;font-weight:400;font-size:10px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-qty-container,:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{display:table-cell;vertical-align:middle;height:75px;padding-left:21px}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control,:host ::ng-deep .container-box .box-title .header .radio-button .form-control,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control{height:auto;color:#333;width:50px;border:1px solid #dddddd}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control:focus,:host ::ng-deep .container-box .box-title .header .radio-button .form-control:focus,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control:focus{border:1px solid #c4c4c4}:host ::ng-deep .container-box .box-title .header .header-qty-container .validation-message,:host ::ng-deep .container-box .box-title .header .radio-button .validation-message,:host ::ng-deep .container-box .box-title .header .checkbox-select .validation-message{position:absolute;margin-top:3px}:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{padding-left:0;vertical-align:middle}:host ::ng-deep .container-box .box-content{padding:25px 0 25px 33px}:host ::ng-deep .container-box .timeline-item{clear:both;display:block;width:100%;position:relative}:host ::ng-deep .container-box .timeline-item:before{display:block!important;content:\"\";position:absolute;left:25px;top:-25px;bottom:25px;width:1px;border-left:1px dashed rgba(0,0,0,.2)}:host ::ng-deep .container-box .timeline-item .icon{background:#90c7ec;width:35px;height:35px;border-radius:50%;position:absolute;left:24px;top:4px}:host ::ng-deep .container-box .timeline-item .icon .fa.fa-upload{left:11px;top:10px}:host ::ng-deep .container-box .timeline-item .icon .fa{color:#fff;position:absolute}:host ::ng-deep .container-box .timeline-item .message .content{float:left;width:80%}:host ::ng-deep .container-box .container-group-control{background:transparent;text-transform:uppercase}:host ::ng-deep .container-box-custom{margin-bottom:25px}:host ::ng-deep .unchecked .container-box{border-color:#0003}:host ::ng-deep .unchecked .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .unchecked.timeline-item .icon-circle{background-color:#6e6e6e}:host ::ng-deep .collapsed .box-content-wrapper{opacity:0;display:none;transition:max-height .3s .1s}:host ::ng-deep .box-content-wrapper{transition:opacity .5s .1s;display:block;opacity:1}:host ::ng-deep .box-actions{position:absolute;right:25px;z-index:2;top:21px;opacity:1;transition:height .3s ease-out,opacity .5s .1s}:host ::ng-deep .box-action-button{height:32px;width:32px;line-height:32px;font-size:12px;text-align:center;float:left;margin-left:5px;border-radius:50%;transition:all .25s ease 0s}:host ::ng-deep .box-action-button a{color:#0000008a}:host ::ng-deep .box-action-button .check-icon{line-height:32px}:host ::ng-deep .box-actions-group{top:18px;right:45px}:host ::ng-deep .box-action-button:hover,:host ::ng-deep .box-action-button:focus{background-color:#0000001a;cursor:pointer;outline:none}:host ::ng-deep .box-action-button:active{background-color:#0003;cursor:pointer}:host ::ng-deep .box-action-button.active{background-color:#0000001a}:host ::ng-deep .div-block{clear:both;display:block}:host ::ng-deep .div-inline{float:left}:host ::ng-deep .checkbox-select{position:relative;display:block}:host ::ng-deep .checkbox-select label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .checkbox-select input[type=checkbox]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .checkbox-select .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:2px;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .checkbox-select .input-helper:after{font-weight:100;line-height:12px;font-size:10px;color:#fff;font-family:FontAwesome;position:absolute;content:\"\\f00c\";width:12px;height:12px;background:#0065ff;border-radius:0;top:1px;left:2px;transform:scale(0);transition:all;transition-duration:.15s}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:before,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:after,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button{position:relative;display:block}:host ::ng-deep .radio-button label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .radio-button input[type=radio]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .radio-button .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:50%;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button .input-helper:after{position:absolute;content:\"\";width:6px;height:6px;background:var(--vl-primary-color);border-radius:50%;top:4px;left:5px;transform:scale(0);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .form-control-wrapper .checkbox-select,:host ::ng-deep .form-control-wrapper .radio-button{padding-top:10px}:host ::ng-deep .shopping-bag-sidebar.open{transform:translate(-100%)}:host ::ng-deep .shopping-bag-sidebar{position:fixed;top:0;bottom:0;z-index:1051;width:420px;right:-420px;background-color:#2a2b30;transition:.3s transform}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart{color:#abacae;position:absolute;top:20%;width:50px;height:50px;line-height:50px;text-align:center;right:100%;left:auto;background:#2a2b30;border-radius:3px 0 0 3px;display:block}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:before{font-family:FontAwesome;content:\"\\f291\"}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:hover{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:active,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:focus,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:visited{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .cart-count{font-size:9px;font-weight:bold;line-height:15px;position:absolute;top:50%;right:8px;width:15px;height:15px;margin:-16px 0 0;text-align:center;color:#fff;border-radius:50%;background:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-container{overflow:auto;display:block;height:100%;padding:0 25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item{color:#abacae;background-color:#000;position:relative;overflow:auto;margin-bottom:10px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title{position:relative;padding-right:25px;padding-left:25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .header{float:left;color:#abacae;margin:0;line-height:48px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-actions{height:48px;float:right;top:0}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-action-button{height:32px;width:32px;line-height:32px;font-size:10px;font-weight:700;margin-top:8px;text-align:center;transition:all .25s ease 0s;color:#fff;background-color:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-title{color:#cecece;font-size:11px;text-transform:uppercase;line-height:64px;font-weight:600;padding-top:0;margin-top:25px;margin-bottom:25px;text-align:right}:host ::ng-deep .container-box.hovered:before,:host ::ng-deep .box-title.hovered:before,:host ::ng-deep .container-box.selected:before,:host ::ng-deep .box-title.selected:before{top:0;right:0;left:0;bottom:0}:host ::ng-deep .selectable{position:relative;cursor:pointer}:host ::ng-deep .container-box.hovered:before{border-color:transparent}:host ::ng-deep .container-box.hovered{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box.selected:before{border-color:transparent}:host ::ng-deep .container-box.selected{border-color:var(--vl-primary-color)}:host ::ng-deep .hovered:before{display:block!important;position:absolute;content:\" \";top:-15px;bottom:15px;left:-15px;right:15px;border:1px solid var(--vl-primary-color)}:host ::ng-deep .hovered .box-action-button{opacity:1!important}:host ::ng-deep .opacity-1{opacity:1!important}:host ::ng-deep .overflow-y--auto{overflow-y:auto}:host ::ng-deep .gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80)}:host ::ng-deep .gu-hide{display:none!important}:host ::ng-deep .gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}:host ::ng-deep .gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}:host ::ng-deep .top-nav-msg{margin-top:-30px}:host ::ng-deep .runtime-info-message ul{margin-bottom:0;list-style:none}:host ::ng-deep .runtime-info-message ul li{margin-bottom:10px}:host ::ng-deep .runtime-info-message ul li:last-child{margin-bottom:0}:host ::ng-deep .runtime-info-message .message-text{font-family:\"Open Sans\",Tahoma,sans-serif!important;overflow:hidden;padding:0;font-size:11px}:host ::ng-deep .runtime-attributes-popover .popover-arrow{display:none}:host ::ng-deep .runtime-attributes-popover .popover-content{padding:0}:host ::ng-deep .runtime-attributes-popover .runtime-content-wrapper{padding:0}:host ::ng-deep .runtime-attributes-popover .container-box-custom{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form{margin:0;padding:0}:host ::ng-deep .runtime-attributes-popover .input-form form{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form form .div-inline{display:block;float:none}:host ::ng-deep .runtime-attributes-popover .input-form form .form-group{padding:0;margin:0}:host ::ng-deep .runtime-attributes-popover .container-box .box-content{padding:0}:host ::ng-deep .v-custom-title,:host ::ng-deep .v-custom-description,:host ::ng-deep .v-custom-image{display:none}:host ::ng-deep .dropdown{position:relative}:host ::ng-deep .dropdown-toggle:focus{outline:0}:host ::ng-deep .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d}:host ::ng-deep .dropdown-menu.pull-right{right:0;left:auto}:host ::ng-deep .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}:host ::ng-deep .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}:host ::ng-deep .dropdown-menu>li>a:hover,:host ::ng-deep .dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}:host ::ng-deep .dropdown-menu>.active>a,:host ::ng-deep .dropdown-menu>.active>a:hover,:host ::ng-deep .dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}:host ::ng-deep .dropdown-menu>.disabled>a,:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{color:#777}:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}:host ::ng-deep .open>.dropdown-menu{display:block}:host ::ng-deep .open>a{outline:0}:host ::ng-deep .dropdown-menu-right{right:0;left:auto}:host ::ng-deep .dropdown-menu-left{right:auto;left:0}:host ::ng-deep .dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}:host ::ng-deep .dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}\n", ".info{color:var(--vl-text-color-secondary);font-weight:300;font-size:13px;line-height:20px}.info.error{color:var(--vl-error-color)}\n"], components: [{ type: SectionRendererComponent, selector: "vl-section-renderer", inputs: ["section", "form"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
3747
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ComponentPreviewComponent, decorators: [{
|
3748
|
-
type: i0.Component,
|
3749
|
-
args: [{
|
3750
|
-
selector: 'vl-component-preview',
|
3751
|
-
templateUrl: './component-preview.component.html',
|
3752
|
-
styleUrls: ['../ui-runtime/runtime-legacy-styles.scss', './component-preview.component.scss'],
|
3753
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
3754
|
-
providers: [
|
3755
|
-
SectionsService,
|
3756
|
-
FormScopeService,
|
3757
|
-
CollapsibleStateService,
|
3758
|
-
RuntimeFormService,
|
3759
|
-
FormScopeService,
|
3760
|
-
RuntimeService,
|
3761
|
-
],
|
3762
|
-
}]
|
3763
|
-
}], ctorParameters: function () { return [{ type: SectionsService }, { type: RuntimeFormService }, { type: FormScopeService }, { type: RuntimeService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { data: [{
|
3764
|
-
type: i0.Input
|
3765
|
-
}] } });
|
3766
|
-
|
3767
|
-
var getSectionTree = function (src) {
|
3768
|
-
var sections = i7.EntityUtil.clone(src);
|
3769
|
-
var sectionIdMap = new Map();
|
3770
|
-
sections.forEach(function (section) { return sectionIdMap.set(section.id, section); });
|
3771
|
-
var sectionTree = [];
|
3772
|
-
sections.forEach(function (section) {
|
3773
|
-
if (section.parentId) {
|
3774
|
-
var parentSection = sectionIdMap.get(section.parentId);
|
3775
|
-
if (parentSection) {
|
3776
|
-
var sectionFromMap = sectionIdMap.get(section.id);
|
3777
|
-
if (sectionFromMap) {
|
3778
|
-
parentSection.addChild(sectionFromMap);
|
3779
|
-
}
|
3780
|
-
}
|
3781
|
-
}
|
3782
|
-
else {
|
3783
|
-
var s = sectionIdMap.get(section.id);
|
3784
|
-
if (s) {
|
3785
|
-
sectionTree.push(s);
|
3786
|
-
}
|
3787
|
-
}
|
3788
|
-
});
|
3789
|
-
return sectionTree;
|
3790
|
-
};
|
3791
|
-
|
3792
|
-
var RuntimeComponent = /** @class */ (function () {
|
3793
|
-
function RuntimeComponent(sectionsService, formScope, collapsibleState, formService, runtimeService, messageService, contextService, orderByPipe, searchFilterPipe, cdr) {
|
3794
|
-
this.sectionsService = sectionsService;
|
3795
|
-
this.formScope = formScope;
|
3796
|
-
this.collapsibleState = collapsibleState;
|
3797
|
-
this.formService = formService;
|
3798
|
-
this.runtimeService = runtimeService;
|
3799
|
-
this.messageService = messageService;
|
3800
|
-
this.contextService = contextService;
|
3801
|
-
this.orderByPipe = orderByPipe;
|
3802
|
-
this.searchFilterPipe = searchFilterPipe;
|
3803
|
-
this.cdr = cdr;
|
3804
|
-
this.messageBucketId = 'ui.runtime';
|
3805
|
-
this.sortedSections = [];
|
3806
|
-
this.staticSections = [];
|
3807
|
-
this.form = new i4.FormGroup({});
|
3808
|
-
this.solutionIsReady = false;
|
3809
|
-
this.unsubscribe = new rxjs.Subject();
|
3810
|
-
this.solutionUpdated = new i0.EventEmitter();
|
3811
|
-
}
|
3812
|
-
RuntimeComponent.prototype.adjustPrice = function (valueOption, section, solutionLineItem, patch) {
|
3813
|
-
var parentLineItem = section.model && LineItemUtil.findById(section.model.id, [solutionLineItem]);
|
3814
|
-
if (!parentLineItem) {
|
3815
|
-
return;
|
3816
|
-
}
|
3817
|
-
parentLineItem.lineItems = parentLineItem.lineItems.map(function (lineItem) {
|
3818
|
-
var productId = lineItem.productId, chargeItems = lineItem.chargeItems;
|
3819
|
-
if (productId !== valueOption) {
|
3820
|
-
return lineItem;
|
3821
|
-
}
|
3822
|
-
var chargeItem = chargeItems.shift();
|
3823
|
-
var updatedChargeItem = Object.assign(Object.assign({}, chargeItem), patch);
|
3824
|
-
return Object.assign(Object.assign({}, lineItem), { chargeItems: __spreadArray([updatedChargeItem], __read(chargeItems)) });
|
3825
|
-
});
|
3826
|
-
this.updateRuntime(solutionLineItem);
|
3827
|
-
};
|
3828
|
-
RuntimeComponent.prototype.ngOnInit = function () {
|
3829
|
-
var _this = this;
|
3830
|
-
this.formScope.formSubmitEvent.pipe(rxjsOperators.takeUntil(this.unsubscribe)).subscribe(function (e) {
|
3831
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
3832
|
-
try {
|
3833
|
-
_this.form.updateValueAndValidity();
|
3834
|
-
var solutionLineItem = i7.EntityUtil.clone(_this.solutionLineItem);
|
3835
|
-
var section_1 = _this.findSection(e.id);
|
3836
|
-
if (!section_1) {
|
3837
|
-
throw 'Section not found';
|
3838
|
-
}
|
3839
|
-
var entityType = section_1.boundData.entityType;
|
3840
|
-
if (entityType === BoundDataType[BoundDataType.PORT] || entityType === BoundDataType[BoundDataType.TYPE]) {
|
3841
|
-
if (e.action === 'patch' && i7.EntityUtil.isPresent(e.valueOption)) {
|
3842
|
-
var valueOption = e['valueOption'];
|
3843
|
-
if (!((_a = section_1.model) === null || _a === void 0 ? void 0 : _a.parentId)) {
|
3844
|
-
_this.collapsibleState.clearState(section_1.id);
|
3845
|
-
_this.updateRuntime(valueOption);
|
3846
|
-
}
|
3847
|
-
else {
|
3848
|
-
var parentLineItem = LineItemUtil.findById(section_1.model.parentId, [solutionLineItem]);
|
3849
|
-
if (parentLineItem) {
|
3850
|
-
var indx = parentLineItem.lineItems.findIndex(function (item) { var _a; return item.id === ((_a = section_1.model) === null || _a === void 0 ? void 0 : _a.id); });
|
3851
|
-
parentLineItem.lineItems.splice(indx, 1, valueOption);
|
3852
|
-
_this.collapsibleState.clearState(section_1.id);
|
3853
|
-
_this.updateRuntime(solutionLineItem);
|
3854
|
-
}
|
3855
|
-
}
|
3856
|
-
}
|
3857
|
-
}
|
3858
|
-
if (entityType === BoundDataType[BoundDataType.PORT]) {
|
3859
|
-
if (e.action === 'upsert') {
|
3860
|
-
var parentLineItem_1 = section_1.model && LineItemUtil.findById(section_1.model.id, [solutionLineItem]);
|
3861
|
-
if (parentLineItem_1) {
|
3862
|
-
parentLineItem_1.lineItems.forEach(function (i) {
|
3863
|
-
if (e.selectedValueOptions &&
|
3864
|
-
e.selectedValueOptions.findIndex(function (v) { return v.toLowerCase() === i.type.toLowerCase(); }) < 0) {
|
3865
|
-
_this.updateCardinalityVariable(parentLineItem_1, i, 0);
|
3866
|
-
}
|
3867
|
-
});
|
3868
|
-
var lineItems_1 = parentLineItem_1 === null || parentLineItem_1 === void 0 ? void 0 : parentLineItem_1.lineItems.filter(function (i) { return e.selectedValueOptions &&
|
3869
|
-
e.selectedValueOptions.findIndex(function (v) { return v.toLowerCase() === i.type.toLowerCase(); }) > -1; });
|
3870
|
-
(_b = e.selectedValueOptions) === null || _b === void 0 ? void 0 : _b.forEach(function (v) {
|
3871
|
-
if ((lineItems_1 === null || lineItems_1 === void 0 ? void 0 : lineItems_1.findIndex(function (item) { return item.type.toLowerCase() === v.toLowerCase(); })) === -1) {
|
3872
|
-
var lineItem = _this.createLineItem(section_1, v, parentLineItem_1);
|
3873
|
-
_this.updateCardinalityVariable(parentLineItem_1, lineItem);
|
3874
|
-
lineItems_1.push(lineItem);
|
3875
|
-
}
|
3876
|
-
});
|
3877
|
-
_this.updateRuntime(solutionLineItem);
|
3878
|
-
}
|
3879
|
-
}
|
3880
|
-
if (e.action === 'create') {
|
3881
|
-
var parentLineItem = section_1.model && LineItemUtil.findById(section_1.model.id, [solutionLineItem]);
|
3882
|
-
if (parentLineItem) {
|
3883
|
-
var valueOption = e.valueOption;
|
3884
|
-
var lineItem = _this.createLineItem(section_1, valueOption, parentLineItem);
|
3885
|
-
parentLineItem.lineItems.push(lineItem);
|
3886
|
-
_this.updateCardinalityVariable(parentLineItem, lineItem);
|
3887
|
-
_this.updateRuntime(solutionLineItem);
|
3888
|
-
}
|
3889
|
-
}
|
3890
|
-
if (e.action === 'copy') {
|
3891
|
-
var parentLineItem = section_1.model && LineItemUtil.findById(section_1.model.id, [solutionLineItem]);
|
3892
|
-
if (parentLineItem) {
|
3893
|
-
var valueOption_1 = e.valueOption;
|
3894
|
-
var lineItemToCopy = parentLineItem.lineItems.find(function (li) { return li.id === valueOption_1; });
|
3895
|
-
if (lineItemToCopy) {
|
3896
|
-
var lineItem = Object.assign(Object.assign({}, lineItemToCopy), { id: '' });
|
3897
|
-
parentLineItem.lineItems.push(lineItem);
|
3898
|
-
_this.updateCardinalityVariable(parentLineItem, lineItem);
|
3899
|
-
_this.updateRuntime(solutionLineItem);
|
3900
|
-
}
|
3901
|
-
}
|
3902
|
-
}
|
3903
|
-
if (e.action === 'update') {
|
3904
|
-
var parentLineItem = section_1.model && LineItemUtil.findById(section_1.model.id, [solutionLineItem]);
|
3905
|
-
if (parentLineItem) {
|
3906
|
-
//Assuming that radio control is the only control, that 'updates' values
|
3907
|
-
var previous_1 = (_c = section_1.model) === null || _c === void 0 ? void 0 : _c.lineItems.filter(function (li) { return li.port && li.port === section_1.boundData.name; })[0];
|
3908
|
-
if (previous_1) {
|
3909
|
-
_this.updateCardinalityVariable(parentLineItem, previous_1, 0);
|
3910
|
-
}
|
3911
|
-
var index = parentLineItem.lineItems.findIndex(function (li) { return li.id === (previous_1 === null || previous_1 === void 0 ? void 0 : previous_1.id); });
|
3912
|
-
var lineItem = {
|
3913
|
-
id: i7.UUID.UUID(),
|
3914
|
-
qty: previous_1 === null || previous_1 === void 0 ? void 0 : previous_1.qty,
|
3915
|
-
port: previous_1 === null || previous_1 === void 0 ? void 0 : previous_1.port,
|
3916
|
-
type: i7.EntityUtil.isPresent(e.valueOption) ? e.valueOption : _this.form.controls[e.id].value,
|
3917
|
-
cfgStatus: 'New',
|
3918
|
-
parentId: previous_1 === null || previous_1 === void 0 ? void 0 : previous_1.parentId,
|
3919
|
-
};
|
3920
|
-
_this.updateCardinalityVariable(parentLineItem, lineItem);
|
3921
|
-
parentLineItem.lineItems[index] = lineItem;
|
3922
|
-
_this.updateRuntime(solutionLineItem);
|
3923
|
-
}
|
3924
|
-
}
|
3925
|
-
if (e.action === 'remove') {
|
3926
|
-
var parentLineItem = section_1.model && LineItemUtil.findById(section_1.model.id, [solutionLineItem]);
|
3927
|
-
if (parentLineItem &&
|
3928
|
-
SectionsBinderHelper.isRemoveAllowed(parentLineItem, section_1.boundData.name, (_d = section_1.model) === null || _d === void 0 ? void 0 : _d.qty)) {
|
3929
|
-
var index = parentLineItem.lineItems.findIndex(function (item) { var _a; return item.type.toLowerCase() === ((_a = e.valueOption) === null || _a === void 0 ? void 0 : _a.toLowerCase()); });
|
3930
|
-
if (index > -1) {
|
3931
|
-
var removed = parentLineItem.lineItems.splice(index, 1)[0];
|
3932
|
-
_this.updateCardinalityVariable(parentLineItem, removed, 0);
|
3933
|
-
_this.updateRuntime(solutionLineItem);
|
3934
|
-
}
|
3935
|
-
}
|
3936
|
-
}
|
3937
|
-
if (e.action === 'qtyUpdate') {
|
3938
|
-
var typeSection = e.valueOption
|
3939
|
-
? SectionHelperService.findSectionForValue(section_1, e.valueOption)
|
3940
|
-
: undefined;
|
3941
|
-
var typeLineItem = (typeSection === null || typeSection === void 0 ? void 0 : typeSection.model) && LineItemUtil.findById(typeSection.model.id, [solutionLineItem]);
|
3942
|
-
if (typeSection && typeLineItem) {
|
3943
|
-
typeLineItem.qty = +_this.form.controls[typeSection.id + 'qty'].value;
|
3944
|
-
typeLineItem.cfgStatus = 'User';
|
3945
|
-
_this.updateRuntime(solutionLineItem);
|
3946
|
-
}
|
3947
|
-
}
|
3948
|
-
if (e.action === 'adjustNetPrice') {
|
3949
|
-
var valueOption = e.valueOption, options = e.options;
|
3950
|
-
var amount = (options !== null && options !== void 0 ? options : {}).amount;
|
3951
|
-
var priceAdjustment = {
|
3952
|
-
type: 'OVERRIDE_AMOUNT',
|
3953
|
-
explanation: 'Manual net price adjustment',
|
3954
|
-
formula: '',
|
3955
|
-
amount: amount,
|
3956
|
-
};
|
3957
|
-
_this.adjustPrice(valueOption, section_1, solutionLineItem, { priceAdjustment: priceAdjustment });
|
3958
|
-
}
|
3959
|
-
if (e.action === 'adjustListPrice') {
|
3960
|
-
var valueOption = e.valueOption, options = e.options;
|
3961
|
-
var amount = (options !== null && options !== void 0 ? options : {}).amount;
|
3962
|
-
var listPriceAdjustment = {
|
3963
|
-
type: 'OVERRIDE_AMOUNT',
|
3964
|
-
explanation: 'Manual list price adjustment',
|
3965
|
-
formula: '',
|
3966
|
-
amount: amount,
|
3967
|
-
};
|
3968
|
-
_this.adjustPrice(valueOption, section_1, solutionLineItem, { listPriceAdjustment: listPriceAdjustment });
|
3969
|
-
}
|
3970
|
-
}
|
3971
|
-
if (entityType === BoundDataType[BoundDataType.TYPE]) {
|
3972
|
-
if (e.action === 'remove') {
|
3973
|
-
var parentLineItem = ((_e = section_1.model) === null || _e === void 0 ? void 0 : _e.parentId) && LineItemUtil.findById(section_1.model.parentId, [solutionLineItem]);
|
3974
|
-
if (parentLineItem &&
|
3975
|
-
section_1.model &&
|
3976
|
-
section_1.model.port &&
|
3977
|
-
SectionsBinderHelper.isRemoveAllowed(parentLineItem, section_1.model.port, (_f = section_1.model) === null || _f === void 0 ? void 0 : _f.qty)) {
|
3978
|
-
var index = parentLineItem.lineItems.findIndex(function (item) { var _a; return item.id === ((_a = section_1.model) === null || _a === void 0 ? void 0 : _a.id); });
|
3979
|
-
if (index > -1) {
|
3980
|
-
var removed = parentLineItem.lineItems.splice(index, 1)[0];
|
3981
|
-
_this.updateCardinalityVariable(parentLineItem, removed, 0);
|
3982
|
-
_this.collapsibleState.clearState(section_1.id);
|
3983
|
-
_this.updateRuntime(solutionLineItem);
|
3984
|
-
}
|
3985
|
-
}
|
3986
|
-
}
|
3987
|
-
if (e.action === 'qtyUpdate') {
|
3988
|
-
var typeLineItem = section_1.model && LineItemUtil.findById(section_1.model.id, [solutionLineItem]);
|
3989
|
-
if (typeLineItem) {
|
3990
|
-
var qty = +_this.form.controls[e.id + 'qty'].value;
|
3991
|
-
if (typeLineItem.parentId) {
|
3992
|
-
var parentLineItem = LineItemUtil.findById(typeLineItem.parentId, [solutionLineItem]);
|
3993
|
-
if (parentLineItem) {
|
3994
|
-
_this.updateCardinalityVariable(parentLineItem, typeLineItem, qty);
|
3995
|
-
}
|
3996
|
-
}
|
3997
|
-
typeLineItem.qty = qty;
|
3998
|
-
typeLineItem.cfgStatus = 'User';
|
3999
|
-
_this.updateRuntime(solutionLineItem);
|
4000
|
-
}
|
4001
|
-
}
|
4002
|
-
}
|
4003
|
-
if (entityType === BoundDataType[BoundDataType.ATTRIBUTE]) {
|
4004
|
-
if (e.action === 'update') {
|
4005
|
-
var parentLineItem = section_1.model && LineItemUtil.findById(section_1.model.id, [solutionLineItem]);
|
4006
|
-
var attribute = parentLineItem === null || parentLineItem === void 0 ? void 0 : parentLineItem.attributes.find(function (attr) { return attr.name.toLowerCase() === section_1.boundData.name.toLowerCase(); });
|
4007
|
-
if (attribute) {
|
4008
|
-
//Explicitly set value always win
|
4009
|
-
var value = typeof e.valueOption !== 'undefined' ? e.valueOption : _this.form.controls[e.id].value;
|
4010
|
-
if (attribute.type === 'BOOLEAN') {
|
4011
|
-
value = value ? 1 : 0;
|
4012
|
-
}
|
4013
|
-
attribute.value = value;
|
4014
|
-
attribute.cfgStatus = 'User';
|
4015
|
-
_this.updateRuntime(solutionLineItem);
|
4016
|
-
}
|
4017
|
-
}
|
4018
|
-
}
|
4019
|
-
}
|
4020
|
-
catch (e) {
|
4021
|
-
console.log(e);
|
4022
|
-
_this.messageService.add({ key: _this.messageBucketId, summary: "Configuration failed " + ((_g = e) === null || _g === void 0 ? void 0 : _g.message) });
|
4023
|
-
}
|
4024
|
-
});
|
4025
|
-
this.runtimeService.onSolutionReadyEvent
|
4026
|
-
.pipe(rxjsOperators.takeUntil(this.unsubscribe))
|
4027
|
-
.subscribe(function (lineItem) { return _this.onSolutionReady(lineItem); });
|
4028
|
-
this.runtimeService.onSolutionUpdatedEvent
|
4029
|
-
.pipe(rxjsOperators.takeUntil(this.unsubscribe))
|
4030
|
-
.subscribe(function (data) {
|
4031
|
-
if (!(data instanceof http.HttpErrorResponse)) {
|
4032
|
-
return _this.handleSolutionUpdate(data);
|
4033
|
-
}
|
4034
|
-
_this.handleSolutionFailedUpdate(data);
|
4035
|
-
});
|
4036
|
-
this.runtimeService.onUIRefreshEvent.pipe(rxjsOperators.takeUntil(this.unsubscribe)).subscribe(function () {
|
4037
|
-
var _a;
|
4038
|
-
var uiDefinition = ((_a = _this.runtimeService.getRuntimeContext()) !== null && _a !== void 0 ? _a : {}).uiDefinition;
|
4039
|
-
_this.runtimeContext.uiDefinition = uiDefinition;
|
4040
|
-
_this.formScope.scriptSessionScope = {};
|
4041
|
-
_this.startRuntime();
|
4042
|
-
});
|
4043
|
-
};
|
4044
|
-
RuntimeComponent.prototype.onSolutionReady = function (lineItem) {
|
4045
|
-
var _a;
|
4046
|
-
var context = this.runtimeService.getRuntimeContext();
|
4047
|
-
var configurationContext = this.contextService.resolve();
|
4048
|
-
var mergeContext = Object.assign(Object.assign({}, context), { properties: Object.assign(Object.assign({}, context.properties), configurationContext.properties) });
|
4049
|
-
var accountId = (_a = mergeContext.properties) === null || _a === void 0 ? void 0 : _a.AccountId;
|
4050
|
-
if (accountId && accountId.length === 15) {
|
4051
|
-
this.runtimeContext = Object.assign(Object.assign({}, mergeContext), { properties: Object.assign(Object.assign({}, mergeContext.properties), { AccountId: i7.SalesforceIdUtils.generateId18FromId15(accountId) }) });
|
4052
|
-
}
|
4053
|
-
else {
|
4054
|
-
this.runtimeContext = mergeContext;
|
4055
|
-
}
|
4056
|
-
this.solutionLineItem = lineItem;
|
4057
|
-
this.runtimeService.setRuntimeContext(this.runtimeContext);
|
4058
|
-
this.startRuntime();
|
4059
|
-
};
|
4060
|
-
RuntimeComponent.prototype.handleSolutionUpdate = function (updatedLineItem) {
|
4061
|
-
this.solutionLineItem = updatedLineItem;
|
4062
|
-
this.processSolution(true);
|
4063
|
-
this.runtimeService.solutionProcessed(this.solutionLineItem);
|
4064
|
-
this.cdr.detectChanges();
|
4065
|
-
};
|
4066
|
-
RuntimeComponent.prototype.handleSolutionFailedUpdate = function (error) {
|
4067
|
-
var _a;
|
4068
|
-
var hasErrorMessage = i7.EntityUtil.isPresent(error.error) && i7.EntityUtil.isPresent(error.error.message);
|
4069
|
-
var message = hasErrorMessage ? error.error.message : 'Configuration failed';
|
4070
|
-
var isHandlingConfigurationErrors = ((_a = this.runtimeContext.uiDefinition) !== null && _a !== void 0 ? _a : {}).isHandlingConfigurationErrors;
|
4071
|
-
if (isHandlingConfigurationErrors) {
|
4072
|
-
this.messageService.add({ key: this.messageBucketId, summary: message });
|
4073
|
-
}
|
4074
|
-
this.solutionLineItem = Object.assign(Object.assign({}, this.solutionLineItem), { messages: __spreadArray(__spreadArray([], __read(this.solutionLineItem.messages)), ["E:" + message]) });
|
4075
|
-
this.processSolution(true, true);
|
4076
|
-
this.runtimeService.solutionProcessed(this.solutionLineItem);
|
4077
|
-
this.cdr.detectChanges();
|
4078
|
-
};
|
4079
|
-
RuntimeComponent.prototype.updateCardinalityVariable = function (parent, updated, newQuantity) {
|
4080
|
-
var _a;
|
4081
|
-
var portDomain = updated.port ? parent.portDomains[updated.port] : undefined;
|
4082
|
-
var domainType = portDomain === null || portDomain === void 0 ? void 0 : portDomain.domainTypes.find(function (t) { return t.name === updated.type; });
|
4083
|
-
var cardinality = (_a = domainType === null || domainType === void 0 ? void 0 : domainType.cardinality) !== null && _a !== void 0 ? _a : 0;
|
4084
|
-
var qty;
|
4085
|
-
if (!Number.isFinite(domainType === null || domainType === void 0 ? void 0 : domainType.cardinality)) {
|
4086
|
-
qty = Number.isFinite(newQuantity) ? newQuantity : updated.qty;
|
4087
|
-
}
|
4088
|
-
else {
|
4089
|
-
qty = i7.EntityUtil.isPresent(newQuantity)
|
4090
|
-
? cardinality - updated.qty + newQuantity
|
4091
|
-
: cardinality + updated.qty;
|
4092
|
-
}
|
4093
|
-
var cardinalityName = '#CV-' + updated.type + '@' + updated.port;
|
4094
|
-
var cardinalityVariable = parent.attributes.find(function (a) { return a.name === cardinalityName; });
|
4095
|
-
if (!cardinalityVariable) {
|
4096
|
-
cardinalityVariable = {
|
4097
|
-
id: i7.UUID.UUID(),
|
4098
|
-
name: cardinalityName,
|
4099
|
-
};
|
4100
|
-
parent.attributes.push(cardinalityVariable);
|
4101
|
-
}
|
4102
|
-
cardinalityVariable.value = qty;
|
4103
|
-
cardinalityVariable.cfgStatus = 'User';
|
4104
|
-
};
|
4105
|
-
RuntimeComponent.prototype.createLineItem = function (section, valueOption, parentLineItem) {
|
4106
|
-
return {
|
4107
|
-
qty: +this.form.controls[section.id + 'qty'].value,
|
4108
|
-
port: section.boundData.name,
|
4109
|
-
type: i7.EntityUtil.isPresent(valueOption) ? valueOption : this.form.controls[section.id].value,
|
4110
|
-
cfgStatus: 'New',
|
4111
|
-
parentId: parentLineItem === null || parentLineItem === void 0 ? void 0 : parentLineItem.id,
|
4112
|
-
};
|
4113
|
-
};
|
4114
|
-
RuntimeComponent.prototype.ngOnDestroy = function () {
|
4115
|
-
this.unsubscribe.next();
|
4116
|
-
this.sectionsService.destroy();
|
4117
|
-
};
|
4118
|
-
RuntimeComponent.prototype.startRuntime = function () {
|
4119
|
-
var _a, _b, _c;
|
4120
|
-
var uiDefinition = this.runtimeContext.uiDefinition;
|
4121
|
-
var defaultTab = (_a = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.tabs) === null || _a === void 0 ? void 0 : _a.find(function (tab) { return tab.isDefault; });
|
4122
|
-
this.activeUITab = i7.EntityUtil.isPresent(defaultTab) ? defaultTab : (_b = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.tabs) === null || _b === void 0 ? void 0 : _b[0];
|
4123
|
-
this.sectionsService.compileModule((_c = uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.sections) !== null && _c !== void 0 ? _c : [], uiDefinition === null || uiDefinition === void 0 ? void 0 : uiDefinition.isViewEncapsulated);
|
4124
|
-
this.processSolution();
|
4125
|
-
this.solutionIsReady = true;
|
4126
|
-
this.cdr.detectChanges();
|
4127
|
-
};
|
4128
|
-
RuntimeComponent.prototype.updateRuntime = function (lineItem) {
|
4129
|
-
this.solutionUpdated.emit(lineItem);
|
4130
|
-
};
|
4131
|
-
RuntimeComponent.prototype.addToCart = function () {
|
4132
|
-
var lineItem = i7.EntityUtil.clone(this.solutionLineItem);
|
4133
|
-
this.runtimeService.stopRuntime(lineItem);
|
4134
|
-
};
|
4135
|
-
RuntimeComponent.prototype.processSolution = function (isUpdate, isError) {
|
4136
|
-
var _a, _b, _c, _d, _e, _f;
|
4137
|
-
//1. Bind sections to solution
|
4138
|
-
var sections = (_b = i7.EntityUtil.clone((_a = this.runtimeContext.uiDefinition) === null || _a === void 0 ? void 0 : _a.sections)) !== null && _b !== void 0 ? _b : [];
|
4139
|
-
var sourceSections = (_d = i7.EntityUtil.clone((_c = this.runtimeContext.uiDefinition) === null || _c === void 0 ? void 0 : _c.sections)) !== null && _d !== void 0 ? _d : [];
|
4140
|
-
this.updateLineItemsSectionPath(this.solutionLineItem);
|
4141
|
-
SectionsBinderHelper.setLineItemsPath(this.runtimeContext.runtimeModel, this.solutionLineItem, sections, sourceSections, function (sec) { return !sec.parentId && sec.boundData; }, (_f = (_e = this.runtimeContext.uiDefinition) === null || _e === void 0 ? void 0 : _e.pricingEnabled) !== null && _f !== void 0 ? _f : false);
|
4142
|
-
sections = sections.filter(function (s) { return s.model && s.template; });
|
4143
|
-
//2. Init form
|
4144
|
-
this.form = this.formService.initForm(sections, this.solutionLineItem);
|
4145
|
-
this.formScope.form = this.form;
|
4146
|
-
this.sortedSections = this.filterAndSort(getSectionTree(sections.filter(function (s) { return !s.isStatic; })));
|
4147
|
-
if (!isUpdate) {
|
4148
|
-
this.staticSections = this.filterAndSort(getSectionTree(sections.filter(function (s) { return s.isStatic; })));
|
4149
|
-
}
|
4150
|
-
if (!isError) {
|
4151
|
-
this.messageService.clear(this.messageBucketId);
|
4152
|
-
}
|
4153
|
-
};
|
4154
|
-
RuntimeComponent.prototype.hideModal = function () {
|
4155
|
-
this.runtimeService.cancelRuntime();
|
4156
|
-
};
|
4157
|
-
RuntimeComponent.prototype.updateLineItemsSectionPath = function (lineItem, parent) {
|
4158
|
-
var e_1, _h;
|
4159
|
-
var path = {
|
4160
|
-
types: parent ? parent.types.concat([lineItem.type]) : [lineItem.type],
|
4161
|
-
ports: parent ? parent.ports.concat(lineItem.port ? [lineItem.port] : []) : [],
|
4162
|
-
};
|
4163
|
-
lineItem.path = path;
|
4164
|
-
try {
|
4165
|
-
for (var _j = __values(lineItem.lineItems), _k = _j.next(); !_k.done; _k = _j.next()) {
|
4166
|
-
var child = _k.value;
|
4167
|
-
this.updateLineItemsSectionPath(child, lineItem.path);
|
4168
|
-
}
|
4169
|
-
}
|
4170
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
4171
|
-
finally {
|
4172
|
-
try {
|
4173
|
-
if (_k && !_k.done && (_h = _j.return)) _h.call(_j);
|
4174
|
-
}
|
4175
|
-
finally { if (e_1) throw e_1.error; }
|
4176
|
-
}
|
4177
|
-
};
|
4178
|
-
RuntimeComponent.prototype.filterAndSort = function (sections) {
|
4179
|
-
var _a;
|
4180
|
-
var filtered = this.searchFilterPipe.transform(sections, (_a = this.activeUITab) === null || _a === void 0 ? void 0 : _a.id, 'page');
|
4181
|
-
var ordered = this.orderByPipe.transform(filtered, 'order', 'asc');
|
4182
|
-
return ordered;
|
4183
|
-
};
|
4184
|
-
RuntimeComponent.prototype.findSection = function (id) {
|
4185
|
-
return i7.EntityUtil.findByFieldHierarchically('id', id, __spreadArray(__spreadArray([], __read(this.sortedSections)), __read(this.staticSections)), 'children');
|
4186
|
-
};
|
4187
|
-
return RuntimeComponent;
|
4188
|
-
}());
|
4189
|
-
RuntimeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeComponent, deps: [{ token: SectionsService }, { token: FormScopeService }, { token: CollapsibleStateService }, { token: RuntimeFormService }, { token: RuntimeService }, { token: i3$1.MessageService }, { token: i2__namespace.ContextService }, { token: i7__namespace.OrderByPipe }, { token: i7__namespace.SearchFilterPipe }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
4190
|
-
RuntimeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RuntimeComponent, selector: "vl-runtime", outputs: { solutionUpdated: "solutionUpdated" }, providers: [FormScopeService, CollapsibleStateService, i7.OrderByPipe, i7.SearchFilterPipe], ngImport: i0__namespace, template: "<vl-loader label=\"Loading UI\" *ngIf=\"!solutionIsReady; else content\"></vl-loader>\n\n<ng-template #content>\n <div\n class=\"sidebar-tabs\"\n [ngClass]=\"{ hidden: !runtimeContext?.uiDefinition?.defaultPanels }\"\n #uiTabs=\"sidebarTabs\"\n sidebarTabs=\"{{ activeUITab?.id }}\"\n id=\"vl-default-sidebar-tabs\"\n >\n <ul>\n <li\n *ngFor=\"let tab of runtimeContext?.uiDefinition?.tabs | orderBy: 'order':'asc'\"\n [ngClass]=\"{ active: uiTabs.activeTab === tab.id }\"\n (click)=\"uiTabs.switchTab(tab.id)\"\n >\n <a href=\"javascript:void(0);\">{{ tab.name }}</a>\n </li>\n </ul>\n </div>\n\n <div class=\"sections-wrapper\">\n <form role=\"form\" name=\"form\" class=\"form-horizontal\" [formGroup]=\"form\" novalidate autocomplete=\"off\">\n <ng-container *ngFor=\"let section of staticSections; let i = index\">\n <ng-container *ngIf=\"section.model && section.template && !section.hidden\">\n <vl-section-renderer [section]=\"section\" [form]=\"form\"></vl-section-renderer>\n </ng-container>\n </ng-container>\n\n <ng-container *ngFor=\"let section of sortedSections; let i = index\">\n <ng-container *ngIf=\"section.model && section.template && !section.hidden\">\n <vl-section-renderer [section]=\"section\" [form]=\"form\"></vl-section-renderer>\n </ng-container>\n </ng-container>\n </form>\n\n <div\n class=\"modal-footer\"\n *ngIf=\"runtimeContext?.runtimeMode === 1\"\n id=\"vl-runtime-default-footer\"\n [ngClass]=\"{ hidden: !runtimeContext?.uiDefinition?.defaultPanels }\"\n >\n <div class=\"col-md-12 input-form-input\">\n <a href=\"javascript:void(0);\" class=\"btn btn-default\" (click)=\"form.valid && addToCart()\" id=\"add-to-cart-btn\"\n >Add to cart</a\n >\n <a href=\"javascript:void(0);\" class=\"btn btn-link\" (click)=\"hideModal()\" id=\"cancel-btn\">Cancel</a>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: ["@charset \"UTF-8\";body.veloce-apex-index,body.veloce-index,body.sfdcBody{overflow:hidden;margin:0;padding:0}:host ::ng-deep .velo-app .modal.in .modal-dialog.runtime-modal{margin-left:5%;margin-right:5%;padding:0;position:relative;width:auto}:host ::ng-deep .modal-body.runtime-modal.main-container{height:100%;margin:0;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .content-wrapper{display:flex;flex-direction:column;height:100%}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper{display:flex;flex-direction:column;flex-grow:1;padding:0}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid{height:100%;margin:0;padding:0;overflow:auto}:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid .input-form.form-horizontal .form-horizontal,:host ::ng-deep .modal-body.runtime-modal.main-container .sections-wrapper .modal-body.runtime-modal.container-fluid section-script>:first-child{height:100%}:host ::ng-deep .runtime-modal .modal-content,:host ::ng-deep .gu-mirror .modal-content{background-color:--vl-input-background}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a{color:#333333b3;font-weight:600;text-transform:uppercase;letter-spacing:.85px;font-size:10px}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active{color:#333}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.disabled,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.disabled{color:#33333380}:host ::ng-deep .runtime-modal .modal-content .modal-header-menu ul li a.active:after,:host ::ng-deep .gu-mirror .modal-content .modal-header-menu ul li a.active:after{background-color:#f36;bottom:-1px;content:\"\";height:1px;left:0;position:absolute;width:100%}:host ::ng-deep .runtime-modal .modal-content .modal-header,:host ::ng-deep .gu-mirror .modal-content .modal-header{background:transparent;color:#fff}:host ::ng-deep .runtime-modal .runtime-group-divider,:host ::ng-deep .gu-mirror .runtime-group-divider{border-bottom:1px solid #e5e5e5}:host ::ng-deep .runtime-modal .input-form-input,:host ::ng-deep .gu-mirror .input-form-input{position:relative;padding-left:0;padding-top:0}:host ::ng-deep .runtime-modal .input-form-input--required>label,:host ::ng-deep .gu-mirror .input-form-input--required>label{color:#ff4233;font-weight:bold}:host ::ng-deep .form-control-wrapper{position:relative}:host ::ng-deep .add-config-control:hover{background-color:#e96099;color:#fff;border:1px solid transparent}:host ::ng-deep .remove-config-control:hover{background-color:#828c9e;color:#fff}:host ::ng-deep .add-config-control[disabled],:host ::ng-deep .remove-config-control[disabled]{background-color:transparent;color:#ccc;border:1px dashed #ccc}:host ::ng-deep .add-config-control[disabled]:hover,:host ::ng-deep .remove-config-control[disabled]:hover{cursor:default}:host ::ng-deep .add-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;border-radius:50%;float:left;position:absolute;top:0;right:-57px;z-index:500;background-color:#e3337c;color:#fff;border:1px solid #e3337c;transition:all .5s ease 0s}:host ::ng-deep .add-config-control .plus-icon{line-height:36px}:host ::ng-deep .remove-config-control{height:36px;width:36px;line-height:36px;font-size:14px;text-align:center;margin-right:25px;border-radius:50%;float:left;position:absolute;top:33px;right:51px;z-index:500;background-color:transparent;color:#687285;border:1px solid transparent;transition:all .5s ease 0s}:host ::ng-deep .remove-config-control .plus-icon{line-height:36px}:host ::ng-deep .sidebar .new-wrapper{min-height:96px;margin-bottom:25px}:host ::ng-deep .sidebar .new-wrapper .add-container .add-card{left:0;margin-left:15px}:host ::ng-deep .ui-settings{height:100%;display:flex;flex-direction:column}:host ::ng-deep .runtime-modal .form-horizontal form,:host ::ng-deep .gu-mirror form{margin:0}:host ::ng-deep .runtime-modal .form-horizontal .form-group,:host ::ng-deep .gu-mirror .form-group{margin:0;padding:0}:host ::ng-deep .runtime-modal .form-horizontal .control.form-group,:host ::ng-deep .gu-mirror .control.form-group{margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .form-control-wrapper,:host ::ng-deep .gu-mirror .form-control-wrapper{min-width:172px;margin-bottom:25px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper{min-width:50px}:host ::ng-deep .runtime-modal .form-horizontal .quantity-form-input .form-control-wrapper .form-control,:host ::ng-deep .gu-mirror .quantity-form-input .form-control-wrapper .form-control{width:50px}:host ::ng-deep .runtime-left-side{height:calc(100% - 97px);background:#fff;padding:48px 56px 0}:host ::ng-deep .ui-controls-group{margin-left:-8px;margin-right:-8px}:host ::ng-deep .ui-controls-group .ui-control-type:hover{border-color:#3384ff}:host ::ng-deep .ui-controls-group .ui-control-type{position:relative;min-width:140px;float:left;border-radius:3px;border:1px solid #c4c4c4;background-color:#fff;width:calc(50% - 16px);padding:12px 13px;margin-bottom:16px;margin-right:8px;margin-left:8px;cursor:pointer}:host ::ng-deep .ui-controls-group .ui-control-type span{padding-left:3px}:host ::ng-deep .sidebar-header{letter-spacing:-.5px;padding-bottom:24px;padding-top:0;line-height:32px;font-size:24px;font-weight:700;color:#333}:host ::ng-deep .sidebar-header small{display:block;color:#333;font-size:11px;font-weight:300;line-height:20px;margin:0}:host ::ng-deep .sidebar-menu-list{color:#333333b3;margin:0;width:100%;list-style:none;font-size:12px}:host ::ng-deep .sidebar-menu-list li.active a,:host ::ng-deep .sidebar-menu-list li.active i{color:#005ee3}:host ::ng-deep .sidebar-menu-list li:hover{cursor:pointer}:host ::ng-deep .sidebar-menu-list li{text-align:right;padding-left:16px}:host ::ng-deep .sidebar-menu-list li a{padding:0 8px;margin-left:-8px;cursor:pointer;white-space:nowrap;color:inherit;font-weight:700;display:inline-block;line-height:32px}:host ::ng-deep .sidebar-menu-list li i{display:none;padding-right:5px}:host ::ng-deep .runtime-builder-content{min-height:100%}:host ::ng-deep .runtime-builder-content .input-form{margin:0;padding:18px 11px 0}:host ::ng-deep .runtime-builder-content .input-form .form-group{border:3px dashed transparent}:host ::ng-deep .runtime-builder-content .input-form .form-group:hover{border:3px dashed #dedede}:host ::ng-deep .runtime-right-side{background:#fff}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background:#fff;position:relative;display:inline-block;padding-right:16px;text-transform:uppercase;font-size:10px;letter-spacing:.2px}:host ::ng-deep .sidebar-section:before{content:\" \";position:absolute;top:50%;left:0;right:0;border-top:1px solid #e6e6e6}:host ::ng-deep .sidebar-section{position:relative;margin-top:16px;margin-bottom:16px}:host ::ng-deep .sidebar-section .section-title{color:#a1a1a1;background-color:var(--vl-input-background);position:relative;display:inline-block;padding-right:16px;padding-left:8px;text-transform:uppercase;font-size:6px;letter-spacing:.2px}:host ::ng-deep .section-wrapper{top:-21px;position:absolute;right:0;left:12px}:host ::ng-deep .container-box.container-box-bordered{border:1px solid rgba(0,0,0,.2);margin-bottom:25px;padding-left:25px}:host ::ng-deep .container-box.container-box-radio{margin-left:0}:host ::ng-deep .container-box.container-box-radio:hover,:host ::ng-deep .container-box.container-box-checkbox:hover{cursor:pointer}:host ::ng-deep .container-box{position:relative;overflow:auto;border:1px solid transparent;background:var(--vl-input-background)}:host ::ng-deep .container-box .container-box{border:1px solid rgba(0,0,0,.2);margin-left:25px;margin-right:25px;margin-bottom:25px}:host ::ng-deep .container-box .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box .box-title .header .header-label{color:#333;margin:0;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-label small{padding-left:21px;color:#757575;font-weight:400;font-size:10px;line-height:75px}:host ::ng-deep .container-box .box-title .header .header-qty-container,:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{display:table-cell;vertical-align:middle;height:75px;padding-left:21px}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control,:host ::ng-deep .container-box .box-title .header .radio-button .form-control,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control{height:auto;color:#333;width:50px;border:1px solid #dddddd}:host ::ng-deep .container-box .box-title .header .header-qty-container .form-control:focus,:host ::ng-deep .container-box .box-title .header .radio-button .form-control:focus,:host ::ng-deep .container-box .box-title .header .checkbox-select .form-control:focus{border:1px solid #c4c4c4}:host ::ng-deep .container-box .box-title .header .header-qty-container .validation-message,:host ::ng-deep .container-box .box-title .header .radio-button .validation-message,:host ::ng-deep .container-box .box-title .header .checkbox-select .validation-message{position:absolute;margin-top:3px}:host ::ng-deep .container-box .box-title .header .radio-button,:host ::ng-deep .container-box .box-title .header .checkbox-select{padding-left:0;vertical-align:middle}:host ::ng-deep .container-box .box-content{padding:25px 0 25px 33px}:host ::ng-deep .container-box .timeline-item{clear:both;display:block;width:100%;position:relative}:host ::ng-deep .container-box .timeline-item:before{display:block!important;content:\"\";position:absolute;left:25px;top:-25px;bottom:25px;width:1px;border-left:1px dashed rgba(0,0,0,.2)}:host ::ng-deep .container-box .timeline-item .icon{background:#90c7ec;width:35px;height:35px;border-radius:50%;position:absolute;left:24px;top:4px}:host ::ng-deep .container-box .timeline-item .icon .fa.fa-upload{left:11px;top:10px}:host ::ng-deep .container-box .timeline-item .icon .fa{color:#fff;position:absolute}:host ::ng-deep .container-box .timeline-item .message .content{float:left;width:80%}:host ::ng-deep .container-box .container-group-control{background:transparent;text-transform:uppercase}:host ::ng-deep .container-box-custom{margin-bottom:25px}:host ::ng-deep .unchecked .container-box{border-color:#0003}:host ::ng-deep .unchecked .container-box:hover{border-color:var(--vl-primary-color)}:host ::ng-deep .unchecked.timeline-item .icon-circle{background-color:#6e6e6e}:host ::ng-deep .collapsed .box-content-wrapper{opacity:0;display:none;transition:max-height .3s .1s}:host ::ng-deep .box-content-wrapper{transition:opacity .5s .1s;display:block;opacity:1}:host ::ng-deep .box-actions{position:absolute;right:25px;z-index:2;top:21px;opacity:1;transition:height .3s ease-out,opacity .5s .1s}:host ::ng-deep .box-action-button{height:32px;width:32px;line-height:32px;font-size:12px;text-align:center;float:left;margin-left:5px;border-radius:50%;transition:all .25s ease 0s}:host ::ng-deep .box-action-button a{color:#0000008a}:host ::ng-deep .box-action-button .check-icon{line-height:32px}:host ::ng-deep .box-actions-group{top:18px;right:45px}:host ::ng-deep .box-action-button:hover,:host ::ng-deep .box-action-button:focus{background-color:#0000001a;cursor:pointer;outline:none}:host ::ng-deep .box-action-button:active{background-color:#0003;cursor:pointer}:host ::ng-deep .box-action-button.active{background-color:#0000001a}:host ::ng-deep .div-block{clear:both;display:block}:host ::ng-deep .div-inline{float:left}:host ::ng-deep .checkbox-select{position:relative;display:block}:host ::ng-deep .checkbox-select label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .checkbox-select input[type=checkbox]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .checkbox-select .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:2px;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .checkbox-select .input-helper:after{font-weight:100;line-height:12px;font-size:10px;color:#fff;font-family:FontAwesome;position:absolute;content:\"\\f00c\";width:12px;height:12px;background:#0065ff;border-radius:0;top:1px;left:2px;transform:scale(0);transition:all;transition-duration:.15s}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:before,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .checkbox-select input[type=checkbox]:checked+.input-helper:after,:host ::ng-deep .checkbox-select input[type=checkbox].checkbox--checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button{position:relative;display:block}:host ::ng-deep .radio-button label{color:#333;margin:0;line-height:16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px;padding-left:25px;position:relative;min-height:16px;cursor:pointer}:host ::ng-deep .radio-button input[type=radio]{position:absolute;width:16px;height:16px;top:0;left:0;z-index:1;cursor:pointer;opacity:0;filter:alpha(opacity=0);margin:0;line-height:normal}:host ::ng-deep .radio-button .input-helper:before{position:absolute;content:\"\";top:-1px;width:12px;height:12px;border-radius:50%;left:0;border:2px solid rgba(0,0,0,.54);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button .input-helper:after{position:absolute;content:\"\";width:6px;height:6px;background:var(--vl-primary-color);border-radius:50%;top:4px;left:5px;transform:scale(0);transition:all;transition-duration:.25s}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:before{border-color:var(--vl-primary-color)}:host ::ng-deep .radio-button input[type=radio]:checked+.input-helper:after{transform:scale(1)}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:before,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:before{border-color:#0003}:host ::ng-deep .radio-button[disabled] input[type=radio]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=radio]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .radio-button[disabled] input[type=checkbox]+.input-helper:after,:host ::ng-deep .checkbox-select[disabled] input[type=checkbox]+.input-helper:after{background:rgba(0,0,0,.2)}:host ::ng-deep .form-control-wrapper .checkbox-select,:host ::ng-deep .form-control-wrapper .radio-button{padding-top:10px}:host ::ng-deep .shopping-bag-sidebar.open{transform:translate(-100%)}:host ::ng-deep .shopping-bag-sidebar{position:fixed;top:0;bottom:0;z-index:1051;width:420px;right:-420px;background-color:#2a2b30;transition:.3s transform}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart{color:#abacae;position:absolute;top:20%;width:50px;height:50px;line-height:50px;text-align:center;right:100%;left:auto;background:#2a2b30;border-radius:3px 0 0 3px;display:block}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:before{font-family:FontAwesome;content:\"\\f291\"}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:hover{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:active,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:focus,:host ::ng-deep .shopping-bag-sidebar .close-shopping-cart:visited{text-decoration:none;color:#abacae}:host ::ng-deep .shopping-bag-sidebar .cart-count{font-size:9px;font-weight:bold;line-height:15px;position:absolute;top:50%;right:8px;width:15px;height:15px;margin:-16px 0 0;text-align:center;color:#fff;border-radius:50%;background:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-container{overflow:auto;display:block;height:100%;padding:0 25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item{color:#abacae;background-color:#000;position:relative;overflow:auto;margin-bottom:10px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title{position:relative;padding-right:25px;padding-left:25px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .header{float:left;color:#abacae;margin:0;line-height:48px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.2px}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-actions{height:48px;float:right;top:0}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-item .item-title .box-action-button{height:32px;width:32px;line-height:32px;font-size:10px;font-weight:700;margin-top:8px;text-align:center;transition:all .25s ease 0s;color:#fff;background-color:var(--vl-primary-color)}:host ::ng-deep .shopping-bag-sidebar .shopping-bag-title{color:#cecece;font-size:11px;text-transform:uppercase;line-height:64px;font-weight:600;padding-top:0;margin-top:25px;margin-bottom:25px;text-align:right}:host ::ng-deep .container-box.hovered:before,:host ::ng-deep .box-title.hovered:before,:host ::ng-deep .container-box.selected:before,:host ::ng-deep .box-title.selected:before{top:0;right:0;left:0;bottom:0}:host ::ng-deep .selectable{position:relative;cursor:pointer}:host ::ng-deep .container-box.hovered:before{border-color:transparent}:host ::ng-deep .container-box.hovered{border-color:var(--vl-primary-color)}:host ::ng-deep .container-box.selected:before{border-color:transparent}:host ::ng-deep .container-box.selected{border-color:var(--vl-primary-color)}:host ::ng-deep .hovered:before{display:block!important;position:absolute;content:\" \";top:-15px;bottom:15px;left:-15px;right:15px;border:1px solid var(--vl-primary-color)}:host ::ng-deep .hovered .box-action-button{opacity:1!important}:host ::ng-deep .opacity-1{opacity:1!important}:host ::ng-deep .overflow-y--auto{overflow-y:auto}:host ::ng-deep .gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)\";filter:alpha(opacity=80)}:host ::ng-deep .gu-hide{display:none!important}:host ::ng-deep .gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;user-select:none!important}:host ::ng-deep .gu-transit{opacity:.2;-ms-filter:\"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)\";filter:alpha(opacity=20)}:host ::ng-deep .top-nav-msg{margin-top:-30px}:host ::ng-deep .runtime-info-message ul{margin-bottom:0;list-style:none}:host ::ng-deep .runtime-info-message ul li{margin-bottom:10px}:host ::ng-deep .runtime-info-message ul li:last-child{margin-bottom:0}:host ::ng-deep .runtime-info-message .message-text{font-family:\"Open Sans\",Tahoma,sans-serif!important;overflow:hidden;padding:0;font-size:11px}:host ::ng-deep .runtime-attributes-popover .popover-arrow{display:none}:host ::ng-deep .runtime-attributes-popover .popover-content{padding:0}:host ::ng-deep .runtime-attributes-popover .runtime-content-wrapper{padding:0}:host ::ng-deep .runtime-attributes-popover .container-box-custom{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form{margin:0;padding:0}:host ::ng-deep .runtime-attributes-popover .input-form form{margin-bottom:0}:host ::ng-deep .runtime-attributes-popover .input-form form .div-inline{display:block;float:none}:host ::ng-deep .runtime-attributes-popover .input-form form .form-group{padding:0;margin:0}:host ::ng-deep .runtime-attributes-popover .container-box .box-content{padding:0}:host ::ng-deep .v-custom-title,:host ::ng-deep .v-custom-description,:host ::ng-deep .v-custom-image{display:none}:host ::ng-deep .dropdown{position:relative}:host ::ng-deep .dropdown-toggle:focus{outline:0}:host ::ng-deep .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px #0000002d}:host ::ng-deep .dropdown-menu.pull-right{right:0;left:auto}:host ::ng-deep .dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}:host ::ng-deep .dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}:host ::ng-deep .dropdown-menu>li>a:hover,:host ::ng-deep .dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}:host ::ng-deep .dropdown-menu>.active>a,:host ::ng-deep .dropdown-menu>.active>a:hover,:host ::ng-deep .dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}:host ::ng-deep .dropdown-menu>.disabled>a,:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{color:#777}:host ::ng-deep .dropdown-menu>.disabled>a:hover,:host ::ng-deep .dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}:host ::ng-deep .open>.dropdown-menu{display:block}:host ::ng-deep .open>a{outline:0}:host ::ng-deep .dropdown-menu-right{right:0;left:auto}:host ::ng-deep .dropdown-menu-left{right:auto;left:0}:host ::ng-deep .dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}:host ::ng-deep .dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}\n", ":host{height:100%;display:flex;flex-direction:column}.sections-wrapper{flex-grow:1;display:flex;flex-direction:column}form{flex-grow:1;display:flex;flex-direction:column}.hidden{display:none}\n"], components: [{ type: i8__namespace.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: SectionRendererComponent, selector: "vl-section-renderer", inputs: ["section", "form"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i7__namespace.SidebarTabsDirective, selector: "[sidebarTabs]", inputs: ["sidebarTabs"], exportAs: ["sidebarTabs"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i4__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i4__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], pipes: { "orderBy": i7__namespace.OrderByPipe } });
|
4191
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeComponent, decorators: [{
|
4192
|
-
type: i0.Component,
|
4193
|
-
args: [{
|
4194
|
-
selector: 'vl-runtime',
|
4195
|
-
moduleId: module.id,
|
4196
|
-
templateUrl: 'runtime.component.html',
|
4197
|
-
styleUrls: ['./runtime-legacy-styles.scss', 'runtime.component.scss'],
|
4198
|
-
providers: [FormScopeService, CollapsibleStateService, i7.OrderByPipe, i7.SearchFilterPipe],
|
4199
|
-
}]
|
4200
|
-
}], ctorParameters: function () {
|
4201
|
-
return [{ type: SectionsService }, { type: FormScopeService }, { type: CollapsibleStateService }, { type: RuntimeFormService }, { type: RuntimeService }, { type: i3__namespace$1.MessageService, decorators: [{
|
4202
|
-
type: i0.Inject,
|
4203
|
-
args: [i3$1.MessageService]
|
4204
|
-
}] }, { type: i2__namespace.ContextService }, { type: i7__namespace.OrderByPipe }, { type: i7__namespace.SearchFilterPipe }, { type: i0__namespace.ChangeDetectorRef }];
|
4205
|
-
}, propDecorators: { solutionUpdated: [{
|
4206
|
-
type: i0.Output
|
4207
|
-
}] } });
|
4208
|
-
|
4209
|
-
var RuntimePreviewComponent = /** @class */ (function () {
|
4210
|
-
function RuntimePreviewComponent(runtimeService, modelCacheService, configurationApiService, contextService) {
|
4211
|
-
this.runtimeService = runtimeService;
|
4212
|
-
this.modelCacheService = modelCacheService;
|
4213
|
-
this.configurationApiService = configurationApiService;
|
4214
|
-
this.contextService = contextService;
|
4215
|
-
this.destroy$ = new rxjs.Subject();
|
4216
|
-
}
|
4217
|
-
Object.defineProperty(RuntimePreviewComponent.prototype, "uiDefinition", {
|
4218
|
-
set: function (value) {
|
4219
|
-
this._uiDefinition = value;
|
4220
|
-
this.initDefinition(value);
|
4221
|
-
},
|
4222
|
-
enumerable: false,
|
4223
|
-
configurable: true
|
4224
|
-
});
|
4225
|
-
RuntimePreviewComponent.prototype.ngOnInit = function () {
|
4226
|
-
var _this = this;
|
4227
|
-
if (!this.modelId) {
|
4228
|
-
return;
|
4229
|
-
}
|
4230
|
-
this.modelCacheService
|
4231
|
-
.getProductModel(this.modelId)
|
4232
|
-
.pipe(rxjsOperators.takeUntil(this.destroy$))
|
4233
|
-
.subscribe(function (container) {
|
4234
|
-
_this.productModelContainer = container;
|
4235
|
-
if (_this._uiDefinition) {
|
4236
|
-
_this.initDefinition(_this._uiDefinition);
|
4237
|
-
}
|
4238
|
-
});
|
4239
|
-
};
|
4240
|
-
RuntimePreviewComponent.prototype.ngOnDestroy = function () {
|
4241
|
-
this.destroy$.next();
|
4242
|
-
this.destroy$.complete();
|
4243
|
-
};
|
4244
|
-
RuntimePreviewComponent.prototype.initDefinition = function (uiDefinition) {
|
4245
|
-
if (!this.productModelContainer) {
|
4246
|
-
return;
|
4247
|
-
}
|
4248
|
-
var initialisedUiDefinition = i7.EntityUtil.clone(uiDefinition);
|
4249
|
-
var externals = this.productModelContainer.main.externals;
|
4250
|
-
if (externals) {
|
4251
|
-
initialisedUiDefinition.externals = externals.reduce(function (trunk, variable) {
|
4252
|
-
var _c;
|
4253
|
-
var _a, _b;
|
4254
|
-
return Object.assign(Object.assign({}, trunk), (_c = {}, _c[variable.name] = (_b = (_a = initialisedUiDefinition.externals) === null || _a === void 0 ? void 0 : _a[variable.name]) !== null && _b !== void 0 ? _b : '', _c));
|
4255
|
-
}, {});
|
4256
|
-
}
|
4257
|
-
else {
|
4258
|
-
delete initialisedUiDefinition.externals;
|
4259
|
-
}
|
4260
|
-
this.initialisedUiDefinition = initialisedUiDefinition;
|
4261
|
-
this.launchRuntime();
|
4262
|
-
};
|
4263
|
-
RuntimePreviewComponent.prototype.onSolutionUpdated = function (lineItem) {
|
4264
|
-
this.runtimeService.updateRuntime({ configurableRamp: lineItem });
|
4265
|
-
};
|
4266
|
-
RuntimePreviewComponent.prototype.launchRuntime = function () {
|
4267
|
-
var _this = this;
|
4268
|
-
if (!this.modelId || !this.initialisedUiDefinition) {
|
4269
|
-
return;
|
4270
|
-
}
|
4271
|
-
i7.SectionPathUtil.updateSectionsPath(this.initialisedUiDefinition.sections);
|
4272
|
-
var uiDefinition = i7.EntityUtil.clone(this.initialisedUiDefinition);
|
4273
|
-
rxjs.combineLatest([
|
4274
|
-
this.configurationApiService.getRuntimeDataByModelId(this.modelId),
|
4275
|
-
this.contextService.create('TestId', i7.ConfigurationContextMode.TEST),
|
4276
|
-
]).subscribe(function (_c) {
|
4277
|
-
var _d = __read(_c, 1), runtimeData = _d[0];
|
4278
|
-
var _a;
|
4279
|
-
var runtimeModel = i7.RuntimeModel.create(runtimeData.types, runtimeData.products);
|
4280
|
-
var rootType = Array.from(runtimeModel.components.values()).find(function (c) { return uiDefinition.rootType &&
|
4281
|
-
runtimeModel.isEquals(c.typeName, uiDefinition.rootType) &&
|
4282
|
-
i7.EntityUtil.isPresent(c.productId); });
|
4283
|
-
if (rootType === null || rootType === void 0 ? void 0 : rootType.typeName) {
|
4284
|
-
uiDefinition.rootType = rootType.typeName;
|
4285
|
-
}
|
4286
|
-
var contextProductId = rootType ? rootType.productId : undefined;
|
4287
|
-
var context = {
|
4288
|
-
modelId: (_a = _this.modelId) !== null && _a !== void 0 ? _a : '',
|
4289
|
-
uiDefinition: uiDefinition,
|
4290
|
-
runtimeModel: runtimeModel,
|
4291
|
-
runtimeMode: i2.RuntimeMode.TEST,
|
4292
|
-
productId: contextProductId,
|
4293
|
-
properties: uiDefinition.externals,
|
4294
|
-
};
|
4295
|
-
_this.runtimeService.startRuntime(context, {});
|
4296
|
-
});
|
4297
|
-
};
|
4298
|
-
return RuntimePreviewComponent;
|
4299
|
-
}());
|
4300
|
-
RuntimePreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimePreviewComponent, deps: [{ token: RuntimeService }, { token: ProductModelCacheService }, { token: i1__namespace.ConfigurationApiService }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
4301
|
-
RuntimePreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: RuntimePreviewComponent, selector: "vl-runtime-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition" }, ngImport: i0__namespace, template: "<vl-runtime (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{flex-grow:1}\n"], components: [{ type: RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
4302
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimePreviewComponent, decorators: [{
|
4303
|
-
type: i0.Component,
|
4304
|
-
args: [{
|
4305
|
-
selector: 'vl-runtime-preview',
|
4306
|
-
templateUrl: 'runtime-preview.component.html',
|
4307
|
-
styleUrls: ['runtime-preview.component.scss'],
|
4308
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
4309
|
-
}]
|
4310
|
-
}], ctorParameters: function () { return [{ type: RuntimeService }, { type: ProductModelCacheService }, { type: i1__namespace.ConfigurationApiService }, { type: i2__namespace.ContextService }]; }, propDecorators: { modelId: [{
|
4311
|
-
type: i0.Input
|
4312
|
-
}], uiDefinition: [{
|
4313
|
-
type: i0.Input
|
4314
|
-
}] } });
|
4315
|
-
|
4316
|
-
var RuntimeModule = /** @class */ (function () {
|
4317
|
-
function RuntimeModule() {
|
4318
|
-
}
|
4319
|
-
return RuntimeModule;
|
4320
|
-
}());
|
4321
|
-
RuntimeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
4322
|
-
RuntimeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeModule, declarations: [RuntimeComponent, RuntimePreviewComponent, SectionRendererComponent, ComponentPreviewComponent], imports: [i5.CommonModule,
|
4323
|
-
i4.FormsModule,
|
4324
|
-
i4.ReactiveFormsModule,
|
4325
|
-
i7.CoreModule,
|
4326
|
-
i1.ApiModule,
|
4327
|
-
elements.VeloceElementsModule,
|
4328
|
-
i5$1.PopoverModule,
|
4329
|
-
i8.LoaderModule,
|
4330
|
-
i2.SdkCoreModule], exports: [i4.FormsModule,
|
4331
|
-
i4.ReactiveFormsModule,
|
4332
|
-
RuntimeComponent,
|
4333
|
-
RuntimePreviewComponent,
|
4334
|
-
SectionRendererComponent,
|
4335
|
-
ComponentPreviewComponent] });
|
4336
|
-
RuntimeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeModule, providers: [
|
4337
|
-
ShoppingCartService,
|
4338
|
-
RuntimeService,
|
4339
|
-
ConfigurationService,
|
4340
|
-
RuntimeContextService,
|
4341
|
-
RuntimeFormService,
|
4342
|
-
CurrentStateService,
|
4343
|
-
ProductModelCacheService,
|
4344
|
-
i5.DatePipe,
|
4345
|
-
SectionsService,
|
4346
|
-
SectionStoreService,
|
4347
|
-
i3.DialogService,
|
4348
|
-
], imports: [[
|
4349
|
-
i5.CommonModule,
|
4350
|
-
i4.FormsModule,
|
4351
|
-
i4.ReactiveFormsModule,
|
4352
|
-
i7.CoreModule,
|
4353
|
-
i1.ApiModule,
|
4354
|
-
elements.VeloceElementsModule,
|
4355
|
-
i5$1.PopoverModule,
|
4356
|
-
i8.LoaderModule,
|
4357
|
-
i2.SdkCoreModule,
|
4358
|
-
], i4.FormsModule,
|
4359
|
-
i4.ReactiveFormsModule] });
|
4360
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: RuntimeModule, decorators: [{
|
4361
|
-
type: i0.NgModule,
|
4362
|
-
args: [{
|
4363
|
-
declarations: [RuntimeComponent, RuntimePreviewComponent, SectionRendererComponent, ComponentPreviewComponent],
|
4364
|
-
providers: [
|
4365
|
-
ShoppingCartService,
|
4366
|
-
RuntimeService,
|
4367
|
-
ConfigurationService,
|
4368
|
-
RuntimeContextService,
|
4369
|
-
RuntimeFormService,
|
4370
|
-
CurrentStateService,
|
4371
|
-
ProductModelCacheService,
|
4372
|
-
i5.DatePipe,
|
4373
|
-
SectionsService,
|
4374
|
-
SectionStoreService,
|
4375
|
-
i3.DialogService,
|
4376
|
-
],
|
4377
|
-
imports: [
|
4378
|
-
i5.CommonModule,
|
4379
|
-
i4.FormsModule,
|
4380
|
-
i4.ReactiveFormsModule,
|
4381
|
-
i7.CoreModule,
|
4382
|
-
i1.ApiModule,
|
4383
|
-
elements.VeloceElementsModule,
|
4384
|
-
i5$1.PopoverModule,
|
4385
|
-
i8.LoaderModule,
|
4386
|
-
i2.SdkCoreModule,
|
4387
|
-
],
|
4388
|
-
exports: [
|
4389
|
-
i4.FormsModule,
|
4390
|
-
i4.ReactiveFormsModule,
|
4391
|
-
RuntimeComponent,
|
4392
|
-
RuntimePreviewComponent,
|
4393
|
-
SectionRendererComponent,
|
4394
|
-
ComponentPreviewComponent,
|
4395
|
-
],
|
4396
|
-
}]
|
4397
|
-
}] });
|
4398
|
-
|
4399
|
-
/**
|
4400
|
-
* Generated bundle index. Do not edit.
|
4401
|
-
*/
|
4402
|
-
|
4403
|
-
exports.ComponentPreviewComponent = ComponentPreviewComponent;
|
4404
|
-
exports.CurrentStateService = CurrentStateService;
|
4405
|
-
exports.RuntimeComponent = RuntimeComponent;
|
4406
|
-
exports.RuntimeContextService = RuntimeContextService;
|
4407
|
-
exports.RuntimeModule = RuntimeModule;
|
4408
|
-
exports.RuntimePreviewComponent = RuntimePreviewComponent;
|
4409
|
-
exports.RuntimeService = RuntimeService;
|
4410
|
-
exports.SectionRendererComponent = SectionRendererComponent;
|
4411
|
-
|
4412
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4413
|
-
|
4414
|
-
}));
|
4415
|
-
//# sourceMappingURL=veloceapps-sdk-runtime.umd.js.map
|