@veloceapps/sdk 3.0.16 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/veloce-sdk-cms.umd.js +74 -836
- package/bundles/veloce-sdk-cms.umd.js.map +1 -1
- package/bundles/veloce-sdk-core.umd.js +1269 -0
- package/bundles/veloce-sdk-core.umd.js.map +1 -0
- package/bundles/veloce-sdk-runtime.umd.js +53 -166
- package/bundles/veloce-sdk-runtime.umd.js.map +1 -1
- package/bundles/veloce-sdk.umd.js +500 -164
- package/bundles/veloce-sdk.umd.js.map +1 -1
- package/cms/cms.default.d.ts +1 -1
- package/cms/components/element-renderer/element-renderer.component.d.ts +1 -1
- package/cms/components/preview/preview.component.d.ts +1 -3
- package/cms/decorators/element.decorator.d.ts +2 -2
- package/cms/index.d.ts +1 -1
- package/cms/injection-tokens.d.ts +1 -1
- package/cms/launcher.module.d.ts +2 -3
- package/cms/plugins/script.plugin.d.ts +1 -0
- package/cms/services/launcher.service.d.ts +1 -1
- package/cms/types/common.types.d.ts +4 -9
- package/cms/types/configuration.types.d.ts +0 -5
- package/cms/types/index.d.ts +1 -2
- package/cms/types/path.types.d.ts +11 -0
- package/cms/utils/element.utils.d.ts +6 -5
- package/cms/utils/elements-resolver.d.ts +2 -1
- package/cms/utils/index.d.ts +3 -1
- package/cms/utils/path.utils.d.ts +2 -1
- package/cms/vendor-map.d.ts +677 -2
- package/core/core.module.d.ts +8 -0
- package/core/index.d.ts +6 -0
- package/{cms → core}/modules/configuration/configuration.module.d.ts +0 -0
- package/{cms → core}/modules/configuration/helpers.d.ts +1 -2
- package/{cms → core}/modules/configuration/index.d.ts +0 -1
- package/{cms → core}/modules/configuration/services/configuration-runtime.service.d.ts +2 -3
- package/{cms → core}/modules/configuration/services/configuration.service.d.ts +2 -2
- package/{cms → core}/modules/configuration/services/runtime-context.service.d.ts +1 -1
- package/{cms → core}/modules/configuration/types/configuration-runtime.types.d.ts +0 -0
- package/{cms → core}/modules/flow-configuration/flow-configuration.module.d.ts +0 -0
- package/{cms → core}/modules/flow-configuration/index.d.ts +0 -0
- package/{cms → core}/modules/flow-configuration/services/flow-configuration.service.d.ts +7 -4
- package/{cms → core}/modules/flow-configuration/services/flow-update.service.d.ts +0 -0
- package/{cms → core}/modules/flow-configuration/types/update.types.d.ts +0 -0
- package/{cms → core}/modules/index.d.ts +0 -0
- package/core/package.json +10 -0
- package/{runtime → core}/services/context.service.d.ts +0 -0
- package/core/services/index.d.ts +2 -0
- package/{runtime/services/quote.service.d.ts → core/services/quote-draft.service.d.ts} +11 -6
- package/core/types/index.d.ts +3 -0
- package/core/types/quote-states.types.d.ts +6 -0
- package/{runtime/types/runtime-context.types.d.ts → core/types/runtime.types.d.ts} +4 -5
- package/{cms → core}/types/ui-definition.types.d.ts +0 -4
- package/core/utils/index.d.ts +2 -0
- package/{cms → core}/utils/line-item.utils.d.ts +0 -2
- package/{cms/types/line-item.types.d.ts → core/utils/line-item.worker.d.ts} +0 -0
- package/core/veloce-sdk-core.d.ts +5 -0
- package/esm2015/cms/cms.default.js +1 -1
- package/esm2015/cms/components/element-renderer/element-renderer.component.js +3 -3
- package/esm2015/cms/components/preview/preview.component.js +9 -10
- package/esm2015/cms/decorators/element.decorator.js +1 -1
- package/esm2015/cms/index.js +1 -2
- package/esm2015/cms/injection-tokens.js +1 -1
- package/esm2015/cms/launcher.module.js +5 -6
- package/esm2015/cms/plugins/configuration.plugin.js +3 -4
- package/esm2015/cms/plugins/script.plugin.js +27 -14
- package/esm2015/cms/services/launcher.service.js +1 -1
- package/esm2015/cms/types/common.types.js +1 -1
- package/esm2015/cms/types/configuration.types.js +1 -1
- package/esm2015/cms/types/index.js +2 -3
- package/esm2015/cms/types/path.types.js +2 -0
- package/esm2015/cms/utils/element.utils.js +1 -1
- package/esm2015/cms/utils/elements-resolver.js +1 -1
- package/esm2015/cms/utils/index.js +4 -2
- package/esm2015/cms/utils/path.utils.js +11 -1
- package/esm2015/cms/vendor-map.js +6 -5
- package/esm2015/core/core.module.js +18 -0
- package/esm2015/core/index.js +7 -0
- package/esm2015/core/modules/configuration/configuration.module.js +34 -0
- package/esm2015/core/modules/configuration/helpers.js +10 -0
- package/esm2015/core/modules/configuration/index.js +5 -0
- package/esm2015/core/modules/configuration/services/configuration-runtime.service.js +93 -0
- package/esm2015/core/modules/configuration/services/configuration.service.js +147 -0
- package/esm2015/core/modules/configuration/services/runtime-context.service.js +61 -0
- package/esm2015/core/modules/configuration/types/configuration-runtime.types.js +2 -0
- package/esm2015/core/modules/flow-configuration/flow-configuration.module.js +18 -0
- package/esm2015/core/modules/flow-configuration/index.js +5 -0
- package/esm2015/core/modules/flow-configuration/services/flow-configuration.service.js +90 -0
- package/esm2015/core/modules/flow-configuration/services/flow-update.service.js +114 -0
- package/esm2015/core/modules/flow-configuration/types/update.types.js +2 -0
- package/esm2015/core/modules/index.js +3 -0
- package/esm2015/core/services/context.service.js +41 -0
- package/esm2015/core/services/index.js +3 -0
- package/esm2015/core/services/quote-draft.service.js +67 -0
- package/esm2015/core/types/index.js +4 -0
- package/esm2015/core/types/quote-states.types.js +2 -0
- package/esm2015/core/types/runtime.types.js +16 -0
- package/esm2015/core/types/ui-definition.types.js +2 -0
- package/esm2015/core/utils/index.js +3 -0
- package/esm2015/core/utils/line-item.utils.js +98 -0
- package/esm2015/core/utils/line-item.worker.js +19 -0
- package/esm2015/core/veloce-sdk-core.js +5 -0
- package/esm2015/runtime/components/component-preview/component-preview.component.js +2 -2
- package/esm2015/runtime/components/ui-runtime/runtime.component.js +10 -9
- package/esm2015/runtime/components/ui-runtime-preview/runtime-preview.component.js +3 -3
- package/esm2015/runtime/execution/directives/section-script.directive.js +19 -20
- package/esm2015/runtime/execution/directives/velo-port.directive.js +1 -1
- package/esm2015/runtime/execution/directives/vl-quote.directive.js +1 -1
- package/esm2015/runtime/execution/directives/vl-ramp.directive.js +2 -2
- package/esm2015/runtime/execution/runtime-execution.module.js +6 -8
- package/esm2015/runtime/runtime.module.js +7 -9
- package/esm2015/runtime/services/cart.service.js +5 -6
- package/esm2015/runtime/services/configuration.service.js +9 -9
- package/esm2015/runtime/services/index.js +1 -3
- package/esm2015/runtime/services/runtime-context.service.js +4 -4
- package/esm2015/runtime/services/runtime.service.js +3 -3
- package/esm2015/runtime/types/index.js +1 -2
- package/esm2015/runtime/types/runtime.types.js +1 -1
- package/esm2015/src/components/dialog/dialog.component.js +30 -0
- package/esm2015/src/components/dialog/dialog.module.js +19 -0
- package/esm2015/src/components/dialog/dialog.types.js +2 -0
- package/esm2015/src/components/header/cart-overlay/cart-overlay.component.js +2 -2
- package/esm2015/src/components/header/header.component.js +55 -11
- package/esm2015/src/flow-routing.module.js +15 -5
- package/esm2015/src/flow.component.js +2 -2
- package/esm2015/src/flow.module.js +33 -6
- package/esm2015/src/pages/catalog/catalog.component.js +117 -0
- package/esm2015/src/pages/catalog/catalog.module.js +20 -0
- package/esm2015/src/pages/debug/debug.component.js +14 -16
- package/esm2015/src/pages/legacy-product/legacy-product.component.js +12 -11
- package/esm2015/src/pages/product/product.component.js +12 -12
- package/esm2015/src/pages/shopping-cart/shopping-cart.component.js +40 -21
- package/esm2015/src/pages/shopping-cart/shopping-cart.module.js +20 -0
- package/esm2015/src/resolvers/context.resolver.js +2 -2
- package/esm2015/src/resolvers/quote.resolver.js +9 -16
- package/esm2015/src/services/flow-router.service.js +11 -2
- package/esm2015/src/services/flow.service.js +1 -1
- package/esm2015/src/services/fow-dialog.service.js +58 -0
- package/esm2015/src/types/flow-customization.types.js +1 -1
- package/esm2015/src/utils/flow.utils.js +11 -1
- package/fesm2015/veloce-sdk-cms.js +64 -714
- package/fesm2015/veloce-sdk-cms.js.map +1 -1
- package/fesm2015/veloce-sdk-core.js +785 -0
- package/fesm2015/veloce-sdk-core.js.map +1 -0
- package/fesm2015/veloce-sdk-runtime.js +48 -144
- package/fesm2015/veloce-sdk-runtime.js.map +1 -1
- package/fesm2015/veloce-sdk.js +438 -118
- package/fesm2015/veloce-sdk.js.map +1 -1
- package/package.json +2 -2
- package/runtime/components/ui-runtime/runtime.component.d.ts +3 -3
- package/runtime/components/ui-runtime-preview/runtime-preview.component.d.ts +1 -1
- package/runtime/execution/directives/section-script.directive.d.ts +2 -3
- package/runtime/execution/directives/velo-port.directive.d.ts +2 -2
- package/runtime/execution/directives/vl-ramp.directive.d.ts +1 -1
- package/runtime/execution/runtime-execution.module.d.ts +2 -1
- package/runtime/runtime.module.d.ts +2 -1
- package/runtime/services/cart.service.d.ts +2 -3
- package/runtime/services/configuration.service.d.ts +4 -5
- package/runtime/services/index.d.ts +0 -2
- package/runtime/services/runtime-context.service.d.ts +3 -3
- package/runtime/services/runtime.service.d.ts +5 -6
- package/runtime/types/index.d.ts +0 -1
- package/runtime/types/runtime.types.d.ts +5 -6
- package/src/components/dialog/dialog.component.d.ts +13 -0
- package/src/components/dialog/dialog.module.d.ts +9 -0
- package/src/components/dialog/dialog.types.d.ts +6 -0
- package/src/components/header/cart-overlay/cart-overlay.component.d.ts +1 -1
- package/src/components/header/header.component.d.ts +12 -5
- package/src/flow-routing.module.d.ts +3 -2
- package/src/flow.component.d.ts +1 -1
- package/src/flow.module.d.ts +3 -1
- package/src/pages/catalog/catalog.component.d.ts +32 -0
- package/src/pages/catalog/catalog.module.d.ts +10 -0
- package/src/pages/debug/debug.component.d.ts +3 -4
- package/src/pages/legacy-product/legacy-product.component.d.ts +4 -3
- package/src/pages/product/product.component.d.ts +3 -4
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +6 -3
- package/src/pages/shopping-cart/{product.module.d.ts → shopping-cart.module.d.ts} +0 -0
- package/src/resolvers/context.resolver.d.ts +1 -1
- package/src/resolvers/quote.resolver.d.ts +3 -4
- package/src/services/flow-router.service.d.ts +3 -1
- package/src/services/flow.service.d.ts +1 -1
- package/src/services/fow-dialog.service.d.ts +17 -0
- package/src/types/flow-customization.types.d.ts +3 -2
- package/src/utils/flow.utils.d.ts +2 -0
- package/cms/modules/configuration/types/configuration.types.d.ts +0 -15
- package/esm2015/cms/modules/configuration/configuration.module.js +0 -37
- package/esm2015/cms/modules/configuration/helpers.js +0 -10
- package/esm2015/cms/modules/configuration/index.js +0 -6
- package/esm2015/cms/modules/configuration/services/configuration-runtime.service.js +0 -93
- package/esm2015/cms/modules/configuration/services/configuration.service.js +0 -147
- package/esm2015/cms/modules/configuration/services/runtime-context.service.js +0 -61
- package/esm2015/cms/modules/configuration/types/configuration-runtime.types.js +0 -2
- package/esm2015/cms/modules/configuration/types/configuration.types.js +0 -2
- package/esm2015/cms/modules/flow-configuration/flow-configuration.module.js +0 -18
- package/esm2015/cms/modules/flow-configuration/index.js +0 -5
- package/esm2015/cms/modules/flow-configuration/services/flow-configuration.service.js +0 -83
- package/esm2015/cms/modules/flow-configuration/services/flow-update.service.js +0 -114
- package/esm2015/cms/modules/flow-configuration/types/update.types.js +0 -2
- package/esm2015/cms/modules/index.js +0 -3
- package/esm2015/cms/types/line-item.types.js +0 -19
- package/esm2015/cms/types/ui-definition.types.js +0 -2
- package/esm2015/cms/utils/line-item.utils.js +0 -107
- package/esm2015/runtime/services/context.service.js +0 -41
- package/esm2015/runtime/services/quote.service.js +0 -53
- package/esm2015/runtime/types/runtime-context.types.js +0 -16
- package/esm2015/src/pages/shopping-cart/product.module.js +0 -20
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloce/api'), require('@veloce/components'), require('@veloce/sdk/cms'), require('@veloce/sdk/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = {}), global.ng.common, global.ng.core, global["@veloce/api"], global["@veloce/components"], global.veloce.sdk.cms, global.veloce.sdk.
|
|
5
|
-
})(this, (function (exports, i9, i0, i1$
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@veloce/api'), require('@veloce/components'), require('@veloce/sdk/cms'), require('@veloce/sdk/core'), require('primeng/button'), require('primeng/dynamicdialog'), require('primeng/overlaypanel'), require('primeng/tooltip'), require('@angular/forms'), require('primeng/inputnumber'), require('rxjs'), require('@veloce/core'), require('@angular/router'), require('primeng/api'), require('primeng/dropdown'), require('primeng/inputtext'), require('primeng/radiobutton'), require('rxjs/operators'), require('@veloce/sdk/runtime'), require('ngx-bootstrap/tooltip'), require('@angular/common/http')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@veloce/sdk', ['exports', '@angular/common', '@angular/core', '@veloce/api', '@veloce/components', '@veloce/sdk/cms', '@veloce/sdk/core', 'primeng/button', 'primeng/dynamicdialog', 'primeng/overlaypanel', 'primeng/tooltip', '@angular/forms', 'primeng/inputnumber', 'rxjs', '@veloce/core', '@angular/router', 'primeng/api', 'primeng/dropdown', 'primeng/inputtext', 'primeng/radiobutton', 'rxjs/operators', '@veloce/sdk/runtime', 'ngx-bootstrap/tooltip', '@angular/common/http'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloce = global.veloce || {}, global.veloce.sdk = {}), global.ng.common, global.ng.core, global["@veloce/api"], global["@veloce/components"], global.veloce.sdk.cms, global.veloce.sdk.core, global["primeng/button"], global["primeng/dynamicdialog"], global["primeng/overlaypanel"], global["primeng/tooltip"], global.ng.forms, global["primeng/inputnumber"], global.rxjs, global["@veloce/core"], global.ng.router, global["primeng/api"], global["primeng/dropdown"], global["primeng/inputtext"], global["primeng/radiobutton"], global.rxjs.operators, global.veloce.sdk.runtime, global["ngx-bootstrap/tooltip"], global.ng.common.http));
|
|
5
|
+
})(this, (function (exports, i9, i0, i1$3, i3$1, i1$4, i2, i5, i1, i4, i10, i7, i6, rxjs, i1$2, i1$1, i3, i4$1, i8, i6$1, operators, i4$2, i1$5, http) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -24,25 +24,70 @@
|
|
|
24
24
|
|
|
25
25
|
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
26
26
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
-
var i1__namespace$
|
|
28
|
-
var
|
|
29
|
-
var
|
|
27
|
+
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
28
|
+
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
29
|
+
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
30
30
|
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
31
|
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
32
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
32
33
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
33
34
|
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
34
|
-
var
|
|
35
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
35
36
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
37
|
+
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
36
38
|
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
37
|
-
var
|
|
39
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
38
40
|
var i4__namespace$1 = /*#__PURE__*/_interopNamespace(i4$1);
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var i1__namespace$
|
|
41
|
+
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
42
|
+
var i6__namespace$1 = /*#__PURE__*/_interopNamespace(i6$1);
|
|
43
|
+
var i4__namespace$2 = /*#__PURE__*/_interopNamespace(i4$2);
|
|
44
|
+
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
43
45
|
|
|
44
46
|
var VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
|
|
45
47
|
|
|
48
|
+
var FlowDialogComponent = /** @class */ (function () {
|
|
49
|
+
function FlowDialogComponent(dialogConfig, ref) {
|
|
50
|
+
this.dialogConfig = dialogConfig;
|
|
51
|
+
this.ref = ref;
|
|
52
|
+
this.config = this.dialogConfig.data.config;
|
|
53
|
+
}
|
|
54
|
+
FlowDialogComponent.prototype.cancelHandler = function () {
|
|
55
|
+
this.ref.close();
|
|
56
|
+
};
|
|
57
|
+
FlowDialogComponent.prototype.confirmHandler = function () {
|
|
58
|
+
this.ref.close(true);
|
|
59
|
+
};
|
|
60
|
+
return FlowDialogComponent;
|
|
61
|
+
}());
|
|
62
|
+
FlowDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogComponent, deps: [{ token: i1__namespace.DynamicDialogConfig }, { token: i1__namespace.DynamicDialogRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
63
|
+
FlowDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowDialogComponent, selector: "vl-flow-dialog", ngImport: i0__namespace, template: "<div *ngIf=\"config.description\" class=\"description\">\n {{ config.description }}\n</div>\n\n<div class=\"form-actions\">\n <p-button\n *ngIf=\"config.secondaryButton\"\n styleClass=\"p-button-outlined button-text-bold\"\n [label]=\"config.secondaryButton!\"\n (onClick)=\"cancelHandler()\"\n ></p-button>\n <p-button\n styleClass=\"p-button p-button-filled\"\n [label]=\"config.primaryButton\"\n (onClick)=\"confirmHandler()\"\n ></p-button>\n</div>\n", styles: [":host{display:flex;flex-direction:column;width:100%}:host .description{flex:1;padding:0 24px 24px;font-weight:400;font-size:12px;line-height:16px;color:var(--vl-text-color-deep-accent)}:host .form-actions{border-top:1px solid var(--vl-border-color);padding:1.5rem 2.2rem;display:flex;justify-content:flex-end;width:100%;grid-gap:10px;gap:10px}\n"], components: [{ type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
64
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogComponent, decorators: [{
|
|
65
|
+
type: i0.Component,
|
|
66
|
+
args: [{
|
|
67
|
+
selector: 'vl-flow-dialog',
|
|
68
|
+
templateUrl: './dialog.component.html',
|
|
69
|
+
styleUrls: ['./dialog.component.scss'],
|
|
70
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
71
|
+
}]
|
|
72
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.DynamicDialogConfig }, { type: i1__namespace.DynamicDialogRef }]; } });
|
|
73
|
+
|
|
74
|
+
var FlowDialogModule = /** @class */ (function () {
|
|
75
|
+
function FlowDialogModule() {
|
|
76
|
+
}
|
|
77
|
+
return FlowDialogModule;
|
|
78
|
+
}());
|
|
79
|
+
FlowDialogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
80
|
+
FlowDialogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogModule, declarations: [FlowDialogComponent], imports: [i9.CommonModule, i5.ButtonModule], exports: [FlowDialogComponent] });
|
|
81
|
+
FlowDialogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogModule, imports: [[i9.CommonModule, i5.ButtonModule]] });
|
|
82
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogModule, decorators: [{
|
|
83
|
+
type: i0.NgModule,
|
|
84
|
+
args: [{
|
|
85
|
+
declarations: [FlowDialogComponent],
|
|
86
|
+
imports: [i9.CommonModule, i5.ButtonModule],
|
|
87
|
+
exports: [FlowDialogComponent],
|
|
88
|
+
}]
|
|
89
|
+
}] });
|
|
90
|
+
|
|
46
91
|
/*! *****************************************************************************
|
|
47
92
|
Copyright (c) Microsoft Corporation.
|
|
48
93
|
|
|
@@ -395,13 +440,13 @@
|
|
|
395
440
|
return url.replace(flowRootUrl, '');
|
|
396
441
|
}));
|
|
397
442
|
};
|
|
398
|
-
this.routeChange$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationEnd; }), rxjs.shareReplay());
|
|
443
|
+
this.routeChange$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$1.NavigationEnd; }), rxjs.shareReplay());
|
|
399
444
|
this.lastChildParams$ = this.watchLastChildParams$(this.route).pipe(rxjs.startWith(this.getLastChildParams(this.route.snapshot)), rxjs.shareReplay());
|
|
400
445
|
this.lastChildRoute$ = this.watchLastChildRoute$(this.route).pipe(rxjs.startWith(this.getLastChildRouteSnapshot(this.route.snapshot)), rxjs.shareReplay());
|
|
401
|
-
this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1.NavigationStart ||
|
|
402
|
-
e instanceof i1.NavigationCancel ||
|
|
403
|
-
e instanceof i1.NavigationEnd ||
|
|
404
|
-
e instanceof i1.NavigationError; }), rxjs.map(function (e) { return e instanceof i1.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
|
|
446
|
+
this.loading$ = this.router.events.pipe(rxjs.filter(function (e) { return e instanceof i1$1.NavigationStart ||
|
|
447
|
+
e instanceof i1$1.NavigationCancel ||
|
|
448
|
+
e instanceof i1$1.NavigationEnd ||
|
|
449
|
+
e instanceof i1$1.NavigationError; }), rxjs.map(function (e) { return e instanceof i1$1.NavigationStart; }), rxjs.startWith(false), rxjs.distinctUntilChanged());
|
|
405
450
|
}
|
|
406
451
|
FlowRouterService.prototype.getFlowRootRoute = function (route) {
|
|
407
452
|
var _a;
|
|
@@ -448,6 +493,9 @@
|
|
|
448
493
|
FlowRouterService.prototype.isCartRoute$ = function () {
|
|
449
494
|
return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('cart'); }));
|
|
450
495
|
};
|
|
496
|
+
FlowRouterService.prototype.isCatalogRoute$ = function () {
|
|
497
|
+
return this.getFlowSubpath$().pipe(rxjs.map(function (url) { return url.startsWith('catalog'); }));
|
|
498
|
+
};
|
|
451
499
|
FlowRouterService.prototype.navigateToProductConfiguration = function (productId) {
|
|
452
500
|
this.contextService.update({ properties: { productId: productId } });
|
|
453
501
|
var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
|
@@ -462,21 +510,27 @@
|
|
|
462
510
|
var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
|
463
511
|
this.router.navigate([flowRouteUrl, 'cart'], { queryParams: routeSnapshot.queryParams });
|
|
464
512
|
};
|
|
513
|
+
FlowRouterService.prototype.navigateToCatalog = function () {
|
|
514
|
+
this.contextService.update({ properties: { productId: undefined } });
|
|
515
|
+
var routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
|
516
|
+
var flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
|
517
|
+
this.router.navigate([flowRouteUrl, 'catalog'], { queryParams: routeSnapshot.queryParams });
|
|
518
|
+
};
|
|
465
519
|
return FlowRouterService;
|
|
466
520
|
}());
|
|
467
|
-
FlowRouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, deps: [{ token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
521
|
+
FlowRouterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
468
522
|
FlowRouterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, providedIn: 'root' });
|
|
469
523
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRouterService, decorators: [{
|
|
470
524
|
type: i0.Injectable,
|
|
471
525
|
args: [{ providedIn: 'root' }]
|
|
472
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }, { type: i2__namespace.ContextService }]; } });
|
|
526
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace.ContextService }]; } });
|
|
473
527
|
|
|
474
528
|
var HeaderCartOverlayComponent = /** @class */ (function () {
|
|
475
529
|
function HeaderCartOverlayComponent(baseHttpService, flowConfiguration, routerService) {
|
|
476
530
|
this.baseHttpService = baseHttpService;
|
|
477
531
|
this.flowConfiguration = flowConfiguration;
|
|
478
532
|
this.routerService = routerService;
|
|
479
|
-
this.form = new
|
|
533
|
+
this.form = new i7.FormGroup({});
|
|
480
534
|
this.shouldUpdate$ = new rxjs.BehaviorSubject(true);
|
|
481
535
|
this.imagesMap$ = new rxjs.BehaviorSubject({});
|
|
482
536
|
this.destroyed$ = new rxjs.Subject();
|
|
@@ -567,7 +621,7 @@
|
|
|
567
621
|
}
|
|
568
622
|
ids.push(item.id);
|
|
569
623
|
if (!_this.form.controls[item.id]) {
|
|
570
|
-
_this.form.addControl(item.id, new
|
|
624
|
+
_this.form.addControl(item.id, new i7.FormControl(item.qty, []));
|
|
571
625
|
}
|
|
572
626
|
else {
|
|
573
627
|
(_a = _this.form.controls[item.id]) === null || _a === void 0 ? void 0 : _a.setValue(item.qty);
|
|
@@ -584,8 +638,8 @@
|
|
|
584
638
|
};
|
|
585
639
|
return HeaderCartOverlayComponent;
|
|
586
640
|
}());
|
|
587
|
-
HeaderCartOverlayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, deps: [{ token: i1__namespace$
|
|
588
|
-
HeaderCartOverlayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i4.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">$0.00</span>\n <span class=\"text-right pt-3\">$0.00</span>\n </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"readonlyProductId\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: [".flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.empty-state{color:var(--vl-text-color-deep-accent)}.scrollable-wrapper{overflow:auto}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px 0}.product:not(.header){border-bottom:1px solid var(--vl-border-color)}.product.header{color:var(--vl-text-color-deep-accent)}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;width:100%}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type:
|
|
641
|
+
HeaderCartOverlayComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, deps: [{ token: i1__namespace$2.BaseHttpService }, { token: i2__namespace.FlowConfigurationService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
642
|
+
HeaderCartOverlayComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: { products: "products" }, viewQueries: [{ propertyName: "overlayPanel", first: true, predicate: i4.OverlayPanel, descendants: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<p-overlayPanel\n styleClass=\"navigation-settings-overlay flow-header-overlay center\"\n showTransitionOptions=\"0ms\"\n hideTransitionOptions=\"0ms\"\n>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\" *vlLet=\"readonlyProductId$ | async as readonlyProductId\">\n <ng-container *ngIf=\"products.length > 0; else empty\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Products ({{ products.length }})</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <div class=\"product header\">\n <span>Product</span>\n <span class=\"text-right\">Qty</span>\n <span class=\"text-right\">MRR</span>\n <span class=\"text-right\">NRR</span>\n </div>\n\n <div class=\"scrollable-wrapper\">\n <div class=\"product\" *ngFor=\"let product of products\">\n <div class=\"product__info\">\n <div class=\"product__image-wrapper\">\n <div\n *ngIf=\"getImageUrl(product.productId) | async as imageUrl; else noImage\"\n class=\"product__image\"\n [ngStyle]=\"{ 'background-image': 'url(' + imageUrl + ')' }\"\n ></div>\n </div>\n <div class=\"flex flex-column justify-content-center\">\n <div class=\"word-break\">{{ product.name }}</div>\n <div>\n <p-button\n label=\"Configure\"\n [disabled]=\"!product.configurable || readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm pl-0\"\n (onClick)=\"navigateToProductConfiguration(product.productId)\"\n ></p-button>\n <p-button\n label=\"Delete\"\n [disabled]=\"readonlyProductId === product.productId\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n (onClick)=\"deleteHandler(product)\"\n ></p-button>\n </div>\n </div>\n </div>\n\n <span>\n <p-inputNumber\n *ngIf=\"form.controls[product.id] as control\"\n class=\"qty-control\"\n [formControl]=\"$any(control)\"\n [min]=\"1\"\n [required]=\"true\"\n (onBlur)=\"controlBlurHandler(product)\"\n ></p-inputNumber>\n </span>\n <span class=\"text-right pt-3\">$0.00</span>\n <span class=\"text-right pt-3\">$0.00</span>\n </div>\n\n <ng-template #noImage>\n <i class=\"vl-icon vl-icon-no-image no-image-icon\"></i>\n </ng-template>\n </div>\n\n <div class=\"flex justify-content-end mt-3\">\n <p-button\n label=\"Clear cart\"\n styleClass=\"p-button-link p-button-sm p-button-danger pl-0 pr-0\"\n [disabled]=\"readonlyProductId\"\n (onClick)=\"deleteAllHandler()\"\n ></p-button>\n </div>\n </ng-container>\n\n <ng-template #empty>\n <h2 class=\"flow-header-overlay__title\">\n <span>Empty Cart</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"overlayPanel.hide()\"></i>\n </h2>\n\n <span class=\"empty-state\">There are no products added to the Shopping Cart yet.</span>\n </ng-template>\n </div>\n </ng-template>\n</p-overlayPanel>\n", styles: [".flow-header-overlay__wrapper{display:flex;flex-direction:column;width:460px;max-height:600px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}.empty-state{color:var(--vl-text-color-deep-accent)}.scrollable-wrapper{overflow:auto}.product{display:grid;grid-template-columns:auto 60px 80px 80px;padding:16px 0}.product:not(.header){border-bottom:1px solid var(--vl-border-color)}.product.header{color:var(--vl-text-color-deep-accent)}.product__info{display:flex;grid-gap:16px;gap:16px}.product__image-wrapper{flex-shrink:0;height:64px;width:64px;display:flex;justify-content:center;align-items:center;background:var(--vl-primary-nav-overlay-bg);border-radius:4px}.product__image{background-size:contain;background-repeat:no-repeat;background-position:center;height:calc(100% - 12px);width:calc(100% - 12px)}.product .qty-control ::ng-deep .p-inputnumber-input{align-self:flex-start;text-align:right;width:100%}.word-break{word-break:break-word}.no-image-icon{color:#b4d1ef;height:18px;width:18px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i3__namespace.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i3__namespace$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i9__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlDirective, selector: "[formControl]", inputs: ["disabled", "formControl", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i7__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
589
643
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayComponent, decorators: [{
|
|
590
644
|
type: i0.Component,
|
|
591
645
|
args: [{
|
|
@@ -594,7 +648,7 @@
|
|
|
594
648
|
styleUrls: ['./cart-overlay.component.scss'],
|
|
595
649
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
596
650
|
}]
|
|
597
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$
|
|
651
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$2.BaseHttpService }, { type: i2__namespace.FlowConfigurationService }, { type: FlowRouterService }]; }, propDecorators: { overlayPanel: [{
|
|
598
652
|
type: i0.ViewChild,
|
|
599
653
|
args: [i4.OverlayPanel]
|
|
600
654
|
}], products: [{
|
|
@@ -607,35 +661,115 @@
|
|
|
607
661
|
return HeaderCartOverlayModule;
|
|
608
662
|
}());
|
|
609
663
|
HeaderCartOverlayModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
610
|
-
HeaderCartOverlayModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, declarations: [HeaderCartOverlayComponent], imports: [i9.CommonModule,
|
|
611
|
-
HeaderCartOverlayModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, imports: [[i9.CommonModule,
|
|
664
|
+
HeaderCartOverlayModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, declarations: [HeaderCartOverlayComponent], imports: [i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i6.InputNumberModule], exports: [HeaderCartOverlayComponent] });
|
|
665
|
+
HeaderCartOverlayModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, imports: [[i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i6.InputNumberModule]] });
|
|
612
666
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: HeaderCartOverlayModule, decorators: [{
|
|
613
667
|
type: i0.NgModule,
|
|
614
668
|
args: [{
|
|
615
669
|
declarations: [HeaderCartOverlayComponent],
|
|
616
|
-
imports: [i9.CommonModule,
|
|
670
|
+
imports: [i9.CommonModule, i7.ReactiveFormsModule, i5.ButtonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i6.InputNumberModule],
|
|
617
671
|
exports: [HeaderCartOverlayComponent],
|
|
618
672
|
}]
|
|
619
673
|
}] });
|
|
620
674
|
|
|
675
|
+
var getFlowObjectIdPropertyName = function (objectName) {
|
|
676
|
+
switch (objectName) {
|
|
677
|
+
case 'Account':
|
|
678
|
+
return 'accountId';
|
|
679
|
+
case 'Order':
|
|
680
|
+
return 'orderId';
|
|
681
|
+
case 'Quote':
|
|
682
|
+
default:
|
|
683
|
+
return 'quoteId';
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
var getIsEditMode = function (context) {
|
|
687
|
+
if (context.mode === i1$2.ConfigurationContextMode.QUOTE) {
|
|
688
|
+
return context.properties.Status === 'Draft';
|
|
689
|
+
}
|
|
690
|
+
else if (context.mode === i1$2.ConfigurationContextMode.ACCOUNT) {
|
|
691
|
+
return true;
|
|
692
|
+
}
|
|
693
|
+
return false;
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
var FlowDialogService = /** @class */ (function () {
|
|
697
|
+
function FlowDialogService(dialogService, contextService) {
|
|
698
|
+
this.dialogService = dialogService;
|
|
699
|
+
this.contextService = contextService;
|
|
700
|
+
}
|
|
701
|
+
FlowDialogService.prototype.show = function (config) {
|
|
702
|
+
return this.dialogService.open(FlowDialogComponent, {
|
|
703
|
+
dismissableMask: true,
|
|
704
|
+
closeOnEscape: true,
|
|
705
|
+
closable: true,
|
|
706
|
+
showHeader: true,
|
|
707
|
+
header: config.title,
|
|
708
|
+
width: '440px',
|
|
709
|
+
data: { config: config },
|
|
710
|
+
}).onClose;
|
|
711
|
+
};
|
|
712
|
+
FlowDialogService.prototype.showEmptyCartDialog = function () {
|
|
713
|
+
return this.show({
|
|
714
|
+
title: 'No Products in Quote',
|
|
715
|
+
description: 'There are no products in your Quote. To save a Quote, add at least one product.',
|
|
716
|
+
primaryButton: 'OK',
|
|
717
|
+
});
|
|
718
|
+
};
|
|
719
|
+
FlowDialogService.prototype.showReadonlyModeDialog = function () {
|
|
720
|
+
var ctx = this.contextService.resolve();
|
|
721
|
+
var objectName = (ctx === null || ctx === void 0 ? void 0 : ctx.mode) ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
|
|
722
|
+
return this.show({
|
|
723
|
+
title: 'Error',
|
|
724
|
+
description: objectName + " Cannot be Saved",
|
|
725
|
+
primaryButton: 'OK',
|
|
726
|
+
});
|
|
727
|
+
};
|
|
728
|
+
FlowDialogService.prototype.showQuoteReadonlyModeDialog = function () {
|
|
729
|
+
return this.show({
|
|
730
|
+
title: 'Quote Cannot be Saved',
|
|
731
|
+
description: 'It is only possible to save quotes with the “Draft” status. Please create a new quote to make and save changes.',
|
|
732
|
+
primaryButton: 'OK',
|
|
733
|
+
});
|
|
734
|
+
};
|
|
735
|
+
FlowDialogService.prototype.showAccountNoChangesDialog = function () {
|
|
736
|
+
return this.show({
|
|
737
|
+
title: 'No Changes to Save',
|
|
738
|
+
description: 'There are no changes since the last update. Please make changes to proceed.',
|
|
739
|
+
primaryButton: 'OK',
|
|
740
|
+
});
|
|
741
|
+
};
|
|
742
|
+
return FlowDialogService;
|
|
743
|
+
}());
|
|
744
|
+
FlowDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService, deps: [{ token: i1__namespace.DialogService }, { token: i2__namespace.ContextService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
745
|
+
FlowDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService });
|
|
746
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowDialogService, decorators: [{
|
|
747
|
+
type: i0.Injectable
|
|
748
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.DialogService }, { type: i2__namespace.ContextService }]; } });
|
|
749
|
+
|
|
621
750
|
var FlowHeaderComponent = /** @class */ (function () {
|
|
622
|
-
function FlowHeaderComponent(context,
|
|
751
|
+
function FlowHeaderComponent(context, quoteDraftService, quoteApiService, sfApiService, flowConfiguration, routerService, dialogService) {
|
|
623
752
|
var _this = this;
|
|
624
753
|
var _a, _b, _c;
|
|
625
754
|
this.context = context;
|
|
626
|
-
this.
|
|
755
|
+
this.quoteDraftService = quoteDraftService;
|
|
756
|
+
this.quoteApiService = quoteApiService;
|
|
627
757
|
this.sfApiService = sfApiService;
|
|
628
758
|
this.flowConfiguration = flowConfiguration;
|
|
629
759
|
this.routerService = routerService;
|
|
760
|
+
this.dialogService = dialogService;
|
|
630
761
|
this.objectDetails$ = new rxjs.BehaviorSubject({});
|
|
762
|
+
this.isSaveInProgress$ = new rxjs.BehaviorSubject(false);
|
|
631
763
|
this.destroyed$ = new rxjs.Subject();
|
|
632
764
|
var ctx = this.context.resolve();
|
|
633
765
|
this.mode = ctx === null || ctx === void 0 ? void 0 : ctx.mode;
|
|
634
766
|
this.objectName = (_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.mode) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : '';
|
|
635
767
|
this.contextProperties = (_c = ctx === null || ctx === void 0 ? void 0 : ctx.properties) !== null && _c !== void 0 ? _c : {};
|
|
768
|
+
this.isEditMode = ctx ? getIsEditMode(ctx) : false;
|
|
636
769
|
this.products$ = this.flowConfiguration.get().pipe(rxjs.map(function (lineItems) { return _this.generateProducts(lineItems); }));
|
|
637
770
|
this.isConfigurationRoute$ = this.routerService.isConfigurationRoute$();
|
|
638
771
|
this.isCartRoute$ = this.routerService.isCartRoute$();
|
|
772
|
+
this.isCatalogRoute$ = this.routerService.isCatalogRoute$();
|
|
639
773
|
}
|
|
640
774
|
FlowHeaderComponent.prototype.ngOnInit = function () {
|
|
641
775
|
this.populateObjectDetails();
|
|
@@ -646,14 +780,14 @@
|
|
|
646
780
|
};
|
|
647
781
|
Object.defineProperty(FlowHeaderComponent.prototype, "isAccountMode", {
|
|
648
782
|
get: function () {
|
|
649
|
-
return this.mode === i1$
|
|
783
|
+
return this.mode === i1$2.ConfigurationContextMode.ACCOUNT;
|
|
650
784
|
},
|
|
651
785
|
enumerable: false,
|
|
652
786
|
configurable: true
|
|
653
787
|
});
|
|
654
788
|
Object.defineProperty(FlowHeaderComponent.prototype, "isQuoteMode", {
|
|
655
789
|
get: function () {
|
|
656
|
-
return this.mode === i1$
|
|
790
|
+
return this.mode === i1$2.ConfigurationContextMode.QUOTE;
|
|
657
791
|
},
|
|
658
792
|
enumerable: false,
|
|
659
793
|
configurable: true
|
|
@@ -674,6 +808,45 @@
|
|
|
674
808
|
FlowHeaderComponent.prototype.navigateToShoppingCart = function () {
|
|
675
809
|
this.routerService.navigateToShoppingCart();
|
|
676
810
|
};
|
|
811
|
+
FlowHeaderComponent.prototype.navigateToCatalog = function () {
|
|
812
|
+
this.routerService.navigateToCatalog();
|
|
813
|
+
};
|
|
814
|
+
FlowHeaderComponent.prototype.saveButtonClickHandler = function () {
|
|
815
|
+
var _this = this;
|
|
816
|
+
if (!this.isEditMode) {
|
|
817
|
+
if (this.mode === i1$2.ConfigurationContextMode.QUOTE) {
|
|
818
|
+
this.dialogService.showQuoteReadonlyModeDialog().subscribe();
|
|
819
|
+
}
|
|
820
|
+
else {
|
|
821
|
+
this.dialogService.showReadonlyModeDialog().subscribe();
|
|
822
|
+
}
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
if (this.mode === i1$2.ConfigurationContextMode.ACCOUNT && !this.quoteDraftService.hasUnsavedChanges) {
|
|
826
|
+
this.dialogService.showAccountNoChangesDialog().subscribe();
|
|
827
|
+
return;
|
|
828
|
+
}
|
|
829
|
+
var lineItems = this.flowConfiguration.getSnapshot();
|
|
830
|
+
if (!lineItems.length) {
|
|
831
|
+
this.dialogService.showEmptyCartDialog().subscribe();
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
var quoteDraft = this.quoteDraftService.quoteSnapshot;
|
|
835
|
+
var context = this.context.resolve();
|
|
836
|
+
if (!quoteDraft || !context) {
|
|
837
|
+
return;
|
|
838
|
+
}
|
|
839
|
+
this.isSaveInProgress$.next(true);
|
|
840
|
+
this.quoteApiService
|
|
841
|
+
.upsertQuote(Object.assign(Object.assign({}, quoteDraft), { context: context, currentState: lineItems }))
|
|
842
|
+
.pipe(rxjs.tap(function () {
|
|
843
|
+
// navigate back to quote on successful save
|
|
844
|
+
if (_this.mode === i1$2.ConfigurationContextMode.QUOTE) {
|
|
845
|
+
_this.back();
|
|
846
|
+
}
|
|
847
|
+
}), rxjs.finalize(function () { return _this.isSaveInProgress$.next(false); }))
|
|
848
|
+
.subscribe();
|
|
849
|
+
};
|
|
677
850
|
FlowHeaderComponent.prototype.queryName$ = function (objectName, id) {
|
|
678
851
|
if (!id) {
|
|
679
852
|
return rxjs.of('');
|
|
@@ -693,7 +866,7 @@
|
|
|
693
866
|
var quoteId = this.isQuoteMode ? this.contextProperties.Id : undefined;
|
|
694
867
|
var quoteName = this.isQuoteMode ? this.contextProperties.Name : undefined;
|
|
695
868
|
var quoteNumber = this.isQuoteMode ? (_a = this.contextProperties.QuoteNumber) === null || _a === void 0 ? void 0 : _a.replace(/^0+/, '') : undefined;
|
|
696
|
-
var priceListName = (_b = this.
|
|
869
|
+
var priceListName = (_b = this.quoteDraftService.quotePriceList) === null || _b === void 0 ? void 0 : _b.name;
|
|
697
870
|
this.objectDetails$.next(Object.assign(Object.assign({}, this.objectDetails$.value), { accountId: accountId, opportunityId: opportunityId, quoteId: quoteId, quoteName: quoteName, quoteNumber: quoteNumber, priceListName: priceListName }));
|
|
698
871
|
this.queryName$('Account', accountId).subscribe(function (accountName) { return _this.objectDetails$.next(Object.assign(Object.assign({}, _this.objectDetails$.value), { accountName: accountName })); });
|
|
699
872
|
this.queryName$('Opportunity', opportunityId).subscribe(function (opportunityName) { return _this.objectDetails$.next(Object.assign(Object.assign({}, _this.objectDetails$.value), { opportunityName: opportunityName })); });
|
|
@@ -730,8 +903,8 @@
|
|
|
730
903
|
};
|
|
731
904
|
return FlowHeaderComponent;
|
|
732
905
|
}());
|
|
733
|
-
FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace.
|
|
734
|
-
FlowHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0__namespace, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\"> To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ contextProperties.Status }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">{{ details.accountName }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">{{\n details.opportunityName\n }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">{{ details.quoteName }}</a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item
|
|
906
|
+
FlowHeaderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace.QuoteDraftService }, { token: i1__namespace$3.QuoteApiService }, { token: i1__namespace$3.SalesforceApiService }, { token: i2__namespace.FlowConfigurationService }, { token: FlowRouterService }, { token: FlowDialogService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
907
|
+
FlowHeaderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowHeaderComponent, selector: "vl-flow-header", ngImport: i0__namespace, template: "<div class=\"flow-info\" *vlLet=\"objectDetails$ | async as details\">\n <nav class=\"nav-item nav-back\" (click)=\"back()\">\n <i class=\"nav-icon vl-icon vl-icon-arrow-left\"></i>\n\n <span> Back </span>\n <span *ngIf=\"objectName\" class=\"object-name\"> To {{ objectName }}</span>\n </nav>\n\n <ng-container *ngIf=\"isAccountMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Account name</span>\n\n <nav class=\"account-name\" [pTooltip]=\"contextProperties.Name ?? ''\" tooltipPosition=\"bottom\" [showDelay]=\"1000\">\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(contextProperties.Id)\">{{ contextProperties.Name }}</a>\n </nav>\n </ng-container>\n\n <ng-container *ngIf=\"isQuoteMode\">\n <span class=\"dot-separator\"></span>\n\n <span>Quote #{{ details.quoteNumber }}</span>\n\n <span class=\"dot-separator\"></span>\n\n <nav class=\"nav-item\" (click)=\"quoteDetails.toggle($event)\">\n <span>{{ contextProperties.Status }}</span>\n\n <i *ngIf=\"!quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"quoteDetails.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <p-overlayPanel styleClass=\"navigation-settings-overlay flow-header-overlay center\" #quoteDetails>\n <ng-template pTemplate>\n <div class=\"flow-header-overlay__wrapper\">\n <h2 class=\"flow-header-overlay__title\">\n <span>Quote Information</span>\n <i class=\"vl-icon vl-icon-close close-icon\" (click)=\"quoteDetails.hide()\"></i>\n </h2>\n\n <ul class=\"info-list\">\n <li class=\"info-list__row\">\n <span>Account Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.accountId)\">{{ details.accountName }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Opportunity Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.opportunityId)\">{{\n details.opportunityName\n }}</a>\n </li>\n <li class=\"info-list__row\">\n <span>Quote Name:</span>\n <a target=\"_blank\" [href]=\"getSalesforceObjectLink(details.quoteId)\">{{ details.quoteName }}</a>\n </li>\n </ul>\n </div>\n </ng-template>\n </p-overlayPanel>\n </ng-container>\n</div>\n\n<div class=\"flow-navigation\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCatalogRoute$ | async }\" (click)=\"navigateToCatalog()\">Catalog</nav>\n <nav class=\"nav-item disabled\" [ngClass]=\"{ active: isConfigurationRoute$ | async }\">Configurator</nav>\n <ng-container *vlLet=\"products$ | async as products\">\n <nav class=\"nav-item\" [ngClass]=\"{ active: isCartRoute$ | async }\" (click)=\"navigateToShoppingCart()\">\n Shopping Cart ({{ products.length }})\n </nav>\n\n <nav class=\"nav-popover-toggle active\" (click)=\"cart?.overlayPanel?.toggle($event)\">\n <i *ngIf=\"!cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-down icon-with-margin\"></i>\n <i *ngIf=\"cart?.overlayPanel?.overlayVisible\" class=\"vl-icon vl-icon-chevron-up icon-with-margin\"></i>\n </nav>\n\n <vl-header-cart-overlay #cart [products]=\"products\"></vl-header-cart-overlay>\n </ng-container>\n</div>\n\n<div class=\"flow-controls\" *vlLet=\"objectDetails$ | async as details\">\n <ng-container *ngIf=\"isQuoteMode\">\n <span *ngIf=\"details.priceListName\">{{ details.priceListName }}</span>\n <span *ngIf=\"contextProperties.StartDate\">{{ contextProperties.StartDate | date: 'MM.dd.yyyy' }}</span>\n\n <span class=\"slash-separator\"></span>\n\n <span>MRR: <span class=\"font-semibold\">$0.00</span></span>\n <span>NRR: <span class=\"font-semibold\">$0.00</span></span>\n </ng-container>\n\n <p-button label=\"Generate Doc\" styleClass=\"p-button-outlined\"></p-button>\n <p-button\n label=\"Save\"\n styleClass=\"p-button-outlined\"\n (onClick)=\"saveButtonClickHandler()\"\n [loading]=\"(isSaveInProgress$ | async) === true\"\n ></p-button>\n <p-button label=\"Submit For Approval\" styleClass=\"p-button\"></p-button>\n</div>\n", styles: [":host{display:flex;align-items:center;height:48px;width:100%;background-color:var(--vl-primary-color);color:#fff;padding:0 32px;flex-shrink:0}::ng-deep .p-overlaypanel.flow-header-overlay .p-overlaypanel-content{background-color:#fff;padding:16px}::ng-deep .p-overlaypanel.flow-header-overlay.left:before{left:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.right:before{right:6px!important}::ng-deep .p-overlaypanel.flow-header-overlay.left .p-overlaypanel-content{margin-left:-16px}::ng-deep .p-overlaypanel.flow-header-overlay.right .p-overlaypanel-content{margin-right:-16px}::ng-deep .p-overlaypanel.flow-header-overlay:before{background-color:#fff}:host ::ng-deep .p-button{padding:5px 15px;font-size:12px}:host ::ng-deep .p-button{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button:enabled:hover{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined{background-color:var(--vl-primary-color);color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-outlined:enabled:hover{color:var(--vl-primary-color);background-color:#fff;border-color:#fff}:host ::ng-deep .p-button.p-button-loading .p-button-loading-icon{position:absolute;left:calc(50% - 5px)}:host ::ng-deep .p-button.p-button-loading .p-button-label{opacity:0;margin:0}.vl-icon{display:inline-block}.flow-info{flex-shrink:0;display:flex;grid-gap:8px;gap:8px;align-items:center}.flow-info .nav-popover-toggle{margin-left:-8px}.flow-info .object-name{text-transform:capitalize}.flow-info .nav-back{font-weight:bold}.flow-info .nav-item:not(.disabled):hover,.flow-info .nav-popover-toggle:not(.disabled):hover{opacity:.6}nav{display:flex;align-items:center;cursor:pointer;padding:4px 0}nav.disabled{opacity:.6;cursor:default}nav .nav-icon{margin-right:10px}nav .icon-with-margin{margin:0 4px}nav a{color:#fff}nav.account-name{margin-left:4px;display:block;max-width:200px;overflow:hidden;text-overflow:ellipsis}nav.nav-popover-toggle{width:24px;display:flex;justify-content:center}nav.nav-popover-toggle i{pointer-events:none;margin:0}nav i{pointer-events:none}.dot-separator:after{content:\"\";display:block;width:4px;height:4px;border-radius:50%;background:#fff}.slash-separator:after{content:\"\";display:block;background:#fff;width:1px;height:16px}.flow-header-overlay__wrapper{width:360px}.flow-header-overlay__wrapper .close-icon{cursor:pointer}.flow-header-overlay__wrapper .info-list{list-style:none;padding:0;font-size:12px}.flow-header-overlay__wrapper .info-list__row{padding:8px 0;display:flex;justify-content:space-between}.flow-header-overlay__title{display:flex;justify-content:space-between;align-items:center;margin:0 0 24px}.flow-navigation{flex-grow:1;display:flex;grid-gap:16px;gap:16px;justify-content:center;font-weight:600}.flow-navigation .cart-nav-container{display:flex}.flow-navigation .nav-popover-toggle{margin-left:-14px}.flow-navigation .nav-item,.flow-navigation .nav-popover-toggle{opacity:.6}.flow-navigation .nav-item.active,.flow-navigation .nav-item:not(.disabled):hover,.flow-navigation .nav-popover-toggle.active,.flow-navigation .nav-popover-toggle:not(.disabled):hover{opacity:1}.flow-controls{flex-shrink:0;display:flex;align-items:center;grid-gap:8px;gap:8px}\n"], components: [{ type: i4__namespace.OverlayPanel, selector: "p-overlayPanel", inputs: ["dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { type: HeaderCartOverlayComponent, selector: "vl-header-cart-overlay", inputs: ["products"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3__namespace$1.LetDirective, selector: "[vlLet]", inputs: ["vlLet"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10__namespace.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "pTooltip", "tooltipDisabled", "tooltipOptions"] }, { type: i3__namespace.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i9__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i9__namespace.AsyncPipe, "date": i9__namespace.DatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
735
908
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderComponent, decorators: [{
|
|
736
909
|
type: i0.Component,
|
|
737
910
|
args: [{
|
|
@@ -740,7 +913,7 @@
|
|
|
740
913
|
styleUrls: ['./header.component.scss'],
|
|
741
914
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
742
915
|
}]
|
|
743
|
-
}], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i2__namespace.
|
|
916
|
+
}], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i2__namespace.QuoteDraftService }, { type: i1__namespace$3.QuoteApiService }, { type: i1__namespace$3.SalesforceApiService }, { type: i2__namespace.FlowConfigurationService }, { type: FlowRouterService }, { type: FlowDialogService }]; } });
|
|
744
917
|
|
|
745
918
|
var FlowHeaderModule = /** @class */ (function () {
|
|
746
919
|
function FlowHeaderModule() {
|
|
@@ -748,13 +921,13 @@
|
|
|
748
921
|
return FlowHeaderModule;
|
|
749
922
|
}());
|
|
750
923
|
FlowHeaderModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
751
|
-
FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i9.CommonModule, i4.OverlayPanelModule,
|
|
752
|
-
FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i9.CommonModule, i4.OverlayPanelModule,
|
|
924
|
+
FlowHeaderModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, declarations: [FlowHeaderComponent], imports: [i9.CommonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule], exports: [FlowHeaderComponent] });
|
|
925
|
+
FlowHeaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, imports: [[i9.CommonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule]] });
|
|
753
926
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowHeaderModule, decorators: [{
|
|
754
927
|
type: i0.NgModule,
|
|
755
928
|
args: [{
|
|
756
929
|
declarations: [FlowHeaderComponent],
|
|
757
|
-
imports: [i9.CommonModule, i4.OverlayPanelModule,
|
|
930
|
+
imports: [i9.CommonModule, i4.OverlayPanelModule, i3$1.LetDirectiveModule, i10.TooltipModule, i5.ButtonModule, HeaderCartOverlayModule],
|
|
758
931
|
exports: [FlowHeaderComponent],
|
|
759
932
|
}]
|
|
760
933
|
}] });
|
|
@@ -782,11 +955,11 @@
|
|
|
782
955
|
};
|
|
783
956
|
return FlowService;
|
|
784
957
|
}());
|
|
785
|
-
FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token:
|
|
958
|
+
FlowService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, deps: [{ token: i1__namespace$4.IntegrationState }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
786
959
|
FlowService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService });
|
|
787
960
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowService, decorators: [{
|
|
788
961
|
type: i0.Injectable
|
|
789
|
-
}], ctorParameters: function () { return [{ type:
|
|
962
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$4.IntegrationState }, { type: FlowRouterService }]; } });
|
|
790
963
|
|
|
791
964
|
var FlowComponent = /** @class */ (function () {
|
|
792
965
|
function FlowComponent(routerService, context, flowService) {
|
|
@@ -804,7 +977,7 @@
|
|
|
804
977
|
return FlowComponent;
|
|
805
978
|
}());
|
|
806
979
|
FlowComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: i2__namespace.ContextService }, { token: FlowService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
807
|
-
FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type:
|
|
980
|
+
FlowComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: FlowComponent, selector: "vl-flow", ngImport: i0__namespace, template: "<vl-flow-header *ngIf=\"showHeader$ | async\"></vl-flow-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n</div>\n", styles: [":host{display:flex;flex-direction:column;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;left:0;right:0;top:0;bottom:0;background-color:#ffffff80;z-index:4}\n"], components: [{ type: FlowHeaderComponent, selector: "vl-flow-header" }, { type: i3__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.RouterOutlet, selector: "router-outlet", outputs: ["activate", "deactivate"], exportAs: ["outlet"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
808
981
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowComponent, decorators: [{
|
|
809
982
|
type: i0.Component,
|
|
810
983
|
args: [{
|
|
@@ -822,16 +995,16 @@
|
|
|
822
995
|
}
|
|
823
996
|
ContextGuard.prototype.getConfigurationContextMode = function (accountId, quoteId, orderId, rpcMessage) {
|
|
824
997
|
if (accountId) {
|
|
825
|
-
return i1$
|
|
998
|
+
return i1$2.ConfigurationContextMode.ACCOUNT;
|
|
826
999
|
}
|
|
827
1000
|
if (quoteId) {
|
|
828
|
-
return i1$
|
|
1001
|
+
return i1$2.ConfigurationContextMode.QUOTE;
|
|
829
1002
|
}
|
|
830
1003
|
if (orderId) {
|
|
831
|
-
return i1$
|
|
1004
|
+
return i1$2.ConfigurationContextMode.ORDER;
|
|
832
1005
|
}
|
|
833
1006
|
if (rpcMessage) {
|
|
834
|
-
return i1$
|
|
1007
|
+
return i1$2.ConfigurationContextMode.REMOTE;
|
|
835
1008
|
}
|
|
836
1009
|
return;
|
|
837
1010
|
};
|
|
@@ -868,11 +1041,11 @@
|
|
|
868
1041
|
};
|
|
869
1042
|
return ContextGuard;
|
|
870
1043
|
}());
|
|
871
|
-
ContextGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, deps: [{ token: i1__namespace.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1044
|
+
ContextGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, deps: [{ token: i1__namespace$1.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
872
1045
|
ContextGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard });
|
|
873
1046
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextGuard, decorators: [{
|
|
874
1047
|
type: i0.Injectable
|
|
875
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: FlowRouterService }]; } });
|
|
1048
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
|
|
876
1049
|
|
|
877
1050
|
var RootGuard = /** @class */ (function () {
|
|
878
1051
|
function RootGuard(router, routerService) {
|
|
@@ -906,37 +1079,156 @@
|
|
|
906
1079
|
};
|
|
907
1080
|
return RootGuard;
|
|
908
1081
|
}());
|
|
909
|
-
RootGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, deps: [{ token: i1__namespace.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1082
|
+
RootGuard.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, deps: [{ token: i1__namespace$1.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
910
1083
|
RootGuard.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, providedIn: 'root' });
|
|
911
1084
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RootGuard, decorators: [{
|
|
912
1085
|
type: i0.Injectable,
|
|
913
1086
|
args: [{ providedIn: 'root' }]
|
|
914
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: FlowRouterService }]; } });
|
|
1087
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
|
|
915
1088
|
|
|
916
|
-
var
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1089
|
+
var FLOW_CUSTOMIZATION = new i0.InjectionToken('FLOW_CUSTOMIZATION');
|
|
1090
|
+
|
|
1091
|
+
var CatalogComponent = /** @class */ (function () {
|
|
1092
|
+
function CatalogComponent(templatesApi, contextService, cdr, toastService, customizationService) {
|
|
1093
|
+
var _a, _b, _c;
|
|
1094
|
+
this.templatesApi = templatesApi;
|
|
1095
|
+
this.contextService = contextService;
|
|
1096
|
+
this.cdr = cdr;
|
|
1097
|
+
this.toastService = toastService;
|
|
1098
|
+
this.customizationService = customizationService;
|
|
1099
|
+
this.uiDefinition = undefined;
|
|
1100
|
+
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
|
1101
|
+
this.templateApiName = '';
|
|
1102
|
+
this.destroyed$ = new rxjs.Subject();
|
|
1103
|
+
this.templateApiName = (_c = (_b = (_a = this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.catalogTemplateApiName) !== null && _c !== void 0 ? _c : '';
|
|
925
1104
|
}
|
|
926
|
-
|
|
1105
|
+
CatalogComponent.prototype.ngOnInit = function () {
|
|
1106
|
+
var _this = this;
|
|
1107
|
+
this.generateUIDefinition$()
|
|
1108
|
+
.pipe(rxjs.tap(function (uiDef) {
|
|
1109
|
+
if (!uiDef) {
|
|
1110
|
+
throw new Error("Component with name '" + _this.templateApiName + "' not found.");
|
|
1111
|
+
}
|
|
1112
|
+
_this.uiDefinition = uiDef;
|
|
1113
|
+
_this.state$.next({ loading: false, failure: false });
|
|
1114
|
+
}), rxjs.catchError(function (err) {
|
|
1115
|
+
var _a;
|
|
1116
|
+
var message = 'Failed to resolve Catalog component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
|
1117
|
+
_this.toastService.add({ severity: i3$1.ToastType.error, summary: message, sticky: true });
|
|
1118
|
+
_this.uiDefinition = undefined;
|
|
1119
|
+
_this.state$.next({ loading: false, failure: true });
|
|
1120
|
+
return rxjs.of();
|
|
1121
|
+
}), rxjs.takeUntil(this.destroyed$))
|
|
1122
|
+
.subscribe(function () { return _this.cdr.detectChanges(); });
|
|
1123
|
+
};
|
|
1124
|
+
CatalogComponent.prototype.ngOnDestroy = function () {
|
|
1125
|
+
this.destroyed$.next();
|
|
1126
|
+
this.destroyed$.complete();
|
|
1127
|
+
};
|
|
1128
|
+
CatalogComponent.prototype.getTemplateRootComponent$ = function (template) {
|
|
1129
|
+
return this.templatesApi
|
|
1130
|
+
.fetchComponents$(template.id)
|
|
1131
|
+
.pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$2.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
|
|
1132
|
+
};
|
|
1133
|
+
CatalogComponent.prototype.getLocalCatalogComponentMeta$ = function () {
|
|
1134
|
+
var _a, _b;
|
|
1135
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getCatalogComponent)) {
|
|
1136
|
+
return rxjs.of(undefined);
|
|
1137
|
+
}
|
|
1138
|
+
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getCatalogComponent(this.templateApiName).pipe(rxjs.map(function (component) {
|
|
1139
|
+
if (!component) {
|
|
1140
|
+
return;
|
|
1141
|
+
}
|
|
1142
|
+
return {
|
|
1143
|
+
html: component.html,
|
|
1144
|
+
css: component.css,
|
|
1145
|
+
js: component.js,
|
|
1146
|
+
json: component.json,
|
|
1147
|
+
};
|
|
1148
|
+
}));
|
|
1149
|
+
};
|
|
1150
|
+
CatalogComponent.prototype.getCatalogComponentMeta$ = function () {
|
|
1151
|
+
var _this = this;
|
|
1152
|
+
return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.type === i1$2.UITemplateType.CATALOG && template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
|
|
1153
|
+
};
|
|
1154
|
+
CatalogComponent.prototype.generateUIDefinition$ = function () {
|
|
1155
|
+
var _this = this;
|
|
1156
|
+
return rxjs.of(undefined).pipe(rxjs.tap(function () {
|
|
1157
|
+
if (!_this.templateApiName) {
|
|
1158
|
+
throw new Error("Flow Query parameter 'catalogTemplateApiName' is missing.");
|
|
1159
|
+
}
|
|
1160
|
+
}), rxjs.switchMap(function () { return _this.getLocalCatalogComponentMeta$(); }), rxjs.switchMap(function (meta) { return (meta ? rxjs.of(meta) : _this.getCatalogComponentMeta$()); }), rxjs.map(function (meta) {
|
|
1161
|
+
if (!meta) {
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
var uiDef = {
|
|
1165
|
+
name: '',
|
|
1166
|
+
createdTimestamp: 0,
|
|
1167
|
+
primary: true,
|
|
1168
|
+
type: 'DEFAULT',
|
|
1169
|
+
version: 2,
|
|
1170
|
+
children: [
|
|
1171
|
+
{
|
|
1172
|
+
children: [],
|
|
1173
|
+
template: meta.html && btoa(meta.html),
|
|
1174
|
+
script: meta.js && btoa(meta.js),
|
|
1175
|
+
styles: meta.css && btoa(meta.css),
|
|
1176
|
+
},
|
|
1177
|
+
],
|
|
1178
|
+
};
|
|
1179
|
+
return uiDef;
|
|
1180
|
+
}));
|
|
1181
|
+
};
|
|
1182
|
+
return CatalogComponent;
|
|
1183
|
+
}());
|
|
1184
|
+
CatalogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogComponent, deps: [{ token: i1__namespace$3.UITemplatesApiService }, { token: i2__namespace.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1185
|
+
CatalogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1186
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogComponent, decorators: [{
|
|
1187
|
+
type: i0.Component,
|
|
1188
|
+
args: [{
|
|
1189
|
+
selector: 'vl-flow-catalog',
|
|
1190
|
+
templateUrl: './catalog.component.html',
|
|
1191
|
+
styleUrls: ['./catalog.component.scss'],
|
|
1192
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1193
|
+
}]
|
|
1194
|
+
}], ctorParameters: function () {
|
|
1195
|
+
return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$1.ToastService }, { type: undefined, decorators: [{
|
|
1196
|
+
type: i0.Optional
|
|
1197
|
+
}, {
|
|
1198
|
+
type: i0.Inject,
|
|
1199
|
+
args: [FLOW_CUSTOMIZATION]
|
|
1200
|
+
}] }];
|
|
1201
|
+
} });
|
|
1202
|
+
|
|
1203
|
+
var CatalogModule = /** @class */ (function () {
|
|
1204
|
+
function CatalogModule() {
|
|
1205
|
+
}
|
|
1206
|
+
return CatalogModule;
|
|
1207
|
+
}());
|
|
1208
|
+
CatalogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1209
|
+
CatalogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, declarations: [CatalogComponent], imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule], exports: [CatalogComponent] });
|
|
1210
|
+
CatalogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, imports: [[i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule]] });
|
|
1211
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: CatalogModule, decorators: [{
|
|
1212
|
+
type: i0.NgModule,
|
|
1213
|
+
args: [{
|
|
1214
|
+
declarations: [CatalogComponent],
|
|
1215
|
+
imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
|
|
1216
|
+
exports: [CatalogComponent],
|
|
1217
|
+
}]
|
|
1218
|
+
}] });
|
|
927
1219
|
|
|
928
1220
|
var DebugComponent = /** @class */ (function () {
|
|
929
|
-
function DebugComponent(flowsApiService, router, activatedRoute, context, flowConfiguration,
|
|
1221
|
+
function DebugComponent(flowsApiService, router, activatedRoute, context, flowConfiguration, quoteDraftService) {
|
|
930
1222
|
this.flowsApiService = flowsApiService;
|
|
931
1223
|
this.router = router;
|
|
932
1224
|
this.activatedRoute = activatedRoute;
|
|
933
1225
|
this.context = context;
|
|
934
1226
|
this.flowConfiguration = flowConfiguration;
|
|
935
|
-
this.
|
|
1227
|
+
this.quoteDraftService = quoteDraftService;
|
|
936
1228
|
this.objectNames = ['Account', 'Quote', 'Order'];
|
|
937
|
-
this.form = new
|
|
938
|
-
id: new
|
|
939
|
-
name: new
|
|
1229
|
+
this.form = new i7.FormGroup({
|
|
1230
|
+
id: new i7.FormControl(''),
|
|
1231
|
+
name: new i7.FormControl('Quote'),
|
|
940
1232
|
});
|
|
941
1233
|
this.flows$ = this.flowsApiService.fetchFlows().pipe(rxjs.map(function (flows) { return flows.map(function (flow) {
|
|
942
1234
|
var _a, _b, _c;
|
|
@@ -958,8 +1250,7 @@
|
|
|
958
1250
|
}
|
|
959
1251
|
// Delete context before starting a new flow
|
|
960
1252
|
this.context.delete();
|
|
961
|
-
this.
|
|
962
|
-
this.quoteService.reset();
|
|
1253
|
+
this.quoteDraftService.reset();
|
|
963
1254
|
this.router.navigate(['..', 'flows'], {
|
|
964
1255
|
queryParams: Object.assign((_d = { flowId: this.selectedFlow.id }, _d[objectPropertyName] = id, _d), this.selectedFlow.queryParams),
|
|
965
1256
|
relativeTo: this.activatedRoute,
|
|
@@ -967,8 +1258,8 @@
|
|
|
967
1258
|
};
|
|
968
1259
|
return DebugComponent;
|
|
969
1260
|
}());
|
|
970
|
-
DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i1__namespace$
|
|
971
|
-
DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type:
|
|
1261
|
+
DebugComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, deps: [{ token: i1__namespace$3.FlowsApiService }, { token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace.ContextService }, { token: i2__namespace.FlowConfigurationService }, { token: i2__namespace.QuoteDraftService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1262
|
+
DebugComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0__namespace, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n\n <div class=\"field\">\n <label>SF Object Name</label>\n <p-dropdown\n appendTo=\"body\"\n formControlName=\"name\"\n [autoDisplayFirst]=\"false\"\n [options]=\"objectNames\"\n ></p-dropdown>\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.entryPath }}</td>\n <td>{{ flow.queryParamsStr }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;grid-gap:24px;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse}tr{cursor:pointer}tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px}\n"], components: [{ type: i4__namespace$1.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i5__namespace.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { type: i6__namespace$1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i7__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i7__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i7__namespace.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7__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: i7__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i7__namespace.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }, { type: i8__namespace.InputText, selector: "[pInputText]" }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
972
1263
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugComponent, decorators: [{
|
|
973
1264
|
type: i0.Component,
|
|
974
1265
|
args: [{
|
|
@@ -977,7 +1268,7 @@
|
|
|
977
1268
|
styleUrls: ['./debug.component.scss'],
|
|
978
1269
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
979
1270
|
}]
|
|
980
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$
|
|
1271
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$3.FlowsApiService }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace.ContextService }, { type: i2__namespace.FlowConfigurationService }, { type: i2__namespace.QuoteDraftService }]; } });
|
|
981
1272
|
|
|
982
1273
|
var routes$1 = [{ path: '', component: DebugComponent }];
|
|
983
1274
|
var DebugModule = /** @class */ (function () {
|
|
@@ -987,20 +1278,20 @@
|
|
|
987
1278
|
}());
|
|
988
1279
|
DebugModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
989
1280
|
DebugModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, declarations: [DebugComponent], imports: [i9.CommonModule,
|
|
990
|
-
|
|
991
|
-
|
|
1281
|
+
i7.FormsModule,
|
|
1282
|
+
i7.ReactiveFormsModule, i1__namespace$1.RouterModule, i6$1.RadioButtonModule,
|
|
992
1283
|
i5.ButtonModule,
|
|
993
|
-
|
|
994
|
-
|
|
1284
|
+
i8.InputTextModule,
|
|
1285
|
+
i4$1.DropdownModule] });
|
|
995
1286
|
DebugModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, imports: [[
|
|
996
1287
|
i9.CommonModule,
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
i1.RouterModule.forChild(routes$1),
|
|
1000
|
-
|
|
1288
|
+
i7.FormsModule,
|
|
1289
|
+
i7.ReactiveFormsModule,
|
|
1290
|
+
i1$1.RouterModule.forChild(routes$1),
|
|
1291
|
+
i6$1.RadioButtonModule,
|
|
1001
1292
|
i5.ButtonModule,
|
|
1002
|
-
|
|
1003
|
-
|
|
1293
|
+
i8.InputTextModule,
|
|
1294
|
+
i4$1.DropdownModule,
|
|
1004
1295
|
]] });
|
|
1005
1296
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: DebugModule, decorators: [{
|
|
1006
1297
|
type: i0.NgModule,
|
|
@@ -1008,23 +1299,21 @@
|
|
|
1008
1299
|
declarations: [DebugComponent],
|
|
1009
1300
|
imports: [
|
|
1010
1301
|
i9.CommonModule,
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
i1.RouterModule.forChild(routes$1),
|
|
1014
|
-
|
|
1302
|
+
i7.FormsModule,
|
|
1303
|
+
i7.ReactiveFormsModule,
|
|
1304
|
+
i1$1.RouterModule.forChild(routes$1),
|
|
1305
|
+
i6$1.RadioButtonModule,
|
|
1015
1306
|
i5.ButtonModule,
|
|
1016
|
-
|
|
1017
|
-
|
|
1307
|
+
i8.InputTextModule,
|
|
1308
|
+
i4$1.DropdownModule,
|
|
1018
1309
|
],
|
|
1019
1310
|
}]
|
|
1020
1311
|
}] });
|
|
1021
1312
|
|
|
1022
|
-
var FLOW_CUSTOMIZATION = new i0.InjectionToken('FLOW_CUSTOMIZATION');
|
|
1023
|
-
|
|
1024
1313
|
var LegacyProductComponent = /** @class */ (function () {
|
|
1025
|
-
function LegacyProductComponent(route,
|
|
1314
|
+
function LegacyProductComponent(route, quoteDraftService, quoteApiService, contextService, runtimeContextService, runtimeService, currentStateService, customizationService) {
|
|
1026
1315
|
this.route = route;
|
|
1027
|
-
this.
|
|
1316
|
+
this.quoteDraftService = quoteDraftService;
|
|
1028
1317
|
this.quoteApiService = quoteApiService;
|
|
1029
1318
|
this.contextService = contextService;
|
|
1030
1319
|
this.runtimeContextService = runtimeContextService;
|
|
@@ -1035,7 +1324,7 @@
|
|
|
1035
1324
|
}
|
|
1036
1325
|
LegacyProductComponent.prototype.ngOnInit = function () {
|
|
1037
1326
|
var _this = this;
|
|
1038
|
-
this.
|
|
1327
|
+
this.quoteDraftService.quote$
|
|
1039
1328
|
.pipe(operators.first(), operators.takeUntil(this.destroyed$))
|
|
1040
1329
|
.subscribe(function (quote) { return _this.init(quote, _this.route.snapshot.queryParams); });
|
|
1041
1330
|
this.runtimeService.onSolutionStopEvent.pipe(operators.take(1)).subscribe(function (lineItem) { return _this.onSolutionStop(lineItem); });
|
|
@@ -1051,7 +1340,7 @@
|
|
|
1051
1340
|
lineItem.actionCode = (_a = lineItem.actionCode) !== null && _a !== void 0 ? _a : 'ADD';
|
|
1052
1341
|
};
|
|
1053
1342
|
LegacyProductComponent.prototype.onSolutionCancel = function () {
|
|
1054
|
-
this.
|
|
1343
|
+
this.quoteDraftService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
|
|
1055
1344
|
window['VELO_BACK_FN'].apply(null, [quote.quoteId]);
|
|
1056
1345
|
});
|
|
1057
1346
|
};
|
|
@@ -1065,7 +1354,7 @@
|
|
|
1065
1354
|
};
|
|
1066
1355
|
LegacyProductComponent.prototype.onSolutionStop = function (lineItem) {
|
|
1067
1356
|
var _this = this;
|
|
1068
|
-
this.
|
|
1357
|
+
this.quoteDraftService.quote$.pipe(operators.first(), operators.takeUntil(this.destroyed$)).subscribe(function (quote) {
|
|
1069
1358
|
var quoteToUpsert = Object.assign(Object.assign({}, quote), { context: _this.contextService.resolve(), currentState: __spreadArray(__spreadArray([], __read((_this.currentStateService.currentState || []).filter(function (li) { return li.id !== lineItem.id; }))), [lineItem]) });
|
|
1070
1359
|
_this.quoteApiService
|
|
1071
1360
|
.upsertQuote(quoteToUpsert)
|
|
@@ -1082,7 +1371,7 @@
|
|
|
1082
1371
|
lineItemId && quote.currentState ? this.reConfigure(lineItemId, quote.currentState) : this.configure(productId);
|
|
1083
1372
|
};
|
|
1084
1373
|
LegacyProductComponent.prototype.getLineItemId = function (quote, queryParams) {
|
|
1085
|
-
if (i1$
|
|
1374
|
+
if (i1$2.EntityUtil.isPresent(queryParams['lineItemId'])) {
|
|
1086
1375
|
return queryParams['lineItemId'];
|
|
1087
1376
|
}
|
|
1088
1377
|
return quote.currentState
|
|
@@ -1095,7 +1384,7 @@
|
|
|
1095
1384
|
this.startRuntime({}, runtimeContext);
|
|
1096
1385
|
};
|
|
1097
1386
|
LegacyProductComponent.prototype.reConfigure = function (lineItemId, currentState) {
|
|
1098
|
-
var currentStateItem = i1$
|
|
1387
|
+
var currentStateItem = i1$2.EntityUtil.findById(lineItemId, currentState);
|
|
1099
1388
|
var runtimeContext = this.getRuntimeContext(currentStateItem.productId, currentStateItem.offeringId, i2.RuntimeOperation.UPDATE);
|
|
1100
1389
|
var states = {
|
|
1101
1390
|
configurableRamp: currentStateItem,
|
|
@@ -1132,8 +1421,8 @@
|
|
|
1132
1421
|
};
|
|
1133
1422
|
return LegacyProductComponent;
|
|
1134
1423
|
}());
|
|
1135
|
-
LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace.ActivatedRoute }, { token: i2__namespace.
|
|
1136
|
-
LegacyProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0__namespace, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type:
|
|
1424
|
+
LegacyProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, deps: [{ token: i1__namespace$1.ActivatedRoute }, { token: i2__namespace.QuoteDraftService }, { token: i1__namespace$3.QuoteApiService }, { token: i2__namespace.ContextService }, { token: i4__namespace$2.RuntimeContextService }, { token: i4__namespace$2.RuntimeService }, { token: i4__namespace$2.CurrentStateService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1425
|
+
LegacyProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: LegacyProductComponent, selector: "ng-component", ngImport: i0__namespace, template: "<vl-runtime #runtimeView (solutionUpdated)=\"onSolutionUpdated($event)\"></vl-runtime>\n", styles: [":host{display:block;height:100%}\n"], components: [{ type: i4__namespace$2.RuntimeComponent, selector: "vl-runtime", outputs: ["solutionUpdated"] }] });
|
|
1137
1426
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductComponent, decorators: [{
|
|
1138
1427
|
type: i0.Component,
|
|
1139
1428
|
args: [{
|
|
@@ -1141,7 +1430,7 @@
|
|
|
1141
1430
|
styleUrls: ['./legacy-product.component.scss'],
|
|
1142
1431
|
}]
|
|
1143
1432
|
}], ctorParameters: function () {
|
|
1144
|
-
return [{ type: i1__namespace.ActivatedRoute }, { type: i2__namespace.
|
|
1433
|
+
return [{ type: i1__namespace$1.ActivatedRoute }, { type: i2__namespace.QuoteDraftService }, { type: i1__namespace$3.QuoteApiService }, { type: i2__namespace.ContextService }, { type: i4__namespace$2.RuntimeContextService }, { type: i4__namespace$2.RuntimeService }, { type: i4__namespace$2.CurrentStateService }, { type: undefined, decorators: [{
|
|
1145
1434
|
type: i0.Optional
|
|
1146
1435
|
}, {
|
|
1147
1436
|
type: i0.Inject,
|
|
@@ -1155,24 +1444,24 @@
|
|
|
1155
1444
|
return LegacyProductModule;
|
|
1156
1445
|
}());
|
|
1157
1446
|
LegacyProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1158
|
-
LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i9.CommonModule,
|
|
1159
|
-
LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i9.CommonModule,
|
|
1447
|
+
LegacyProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, declarations: [LegacyProductComponent], imports: [i9.CommonModule, i4$2.RuntimeModule, i1__namespace$5.TooltipModule], exports: [LegacyProductComponent] });
|
|
1448
|
+
LegacyProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, imports: [[i9.CommonModule, i4$2.RuntimeModule, i1$5.TooltipModule.forRoot()]] });
|
|
1160
1449
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: LegacyProductModule, decorators: [{
|
|
1161
1450
|
type: i0.NgModule,
|
|
1162
1451
|
args: [{
|
|
1163
1452
|
declarations: [LegacyProductComponent],
|
|
1164
|
-
imports: [i9.CommonModule,
|
|
1453
|
+
imports: [i9.CommonModule, i4$2.RuntimeModule, i1$5.TooltipModule.forRoot()],
|
|
1165
1454
|
exports: [LegacyProductComponent],
|
|
1166
1455
|
}]
|
|
1167
1456
|
}] });
|
|
1168
1457
|
|
|
1169
1458
|
var ProductComponent = /** @class */ (function () {
|
|
1170
|
-
function ProductComponent(contextService, runtimeService, conigurationService, flowConfigurationService,
|
|
1459
|
+
function ProductComponent(contextService, runtimeService, conigurationService, flowConfigurationService, quoteDraftService, route, messageService, customizationService) {
|
|
1171
1460
|
this.contextService = contextService;
|
|
1172
1461
|
this.runtimeService = runtimeService;
|
|
1173
1462
|
this.conigurationService = conigurationService;
|
|
1174
1463
|
this.flowConfigurationService = flowConfigurationService;
|
|
1175
|
-
this.
|
|
1464
|
+
this.quoteDraftService = quoteDraftService;
|
|
1176
1465
|
this.route = route;
|
|
1177
1466
|
this.messageService = messageService;
|
|
1178
1467
|
this.customizationService = customizationService;
|
|
@@ -1181,7 +1470,7 @@
|
|
|
1181
1470
|
}
|
|
1182
1471
|
ProductComponent.prototype.ngOnInit = function () {
|
|
1183
1472
|
var _this = this;
|
|
1184
|
-
this.
|
|
1473
|
+
this.quoteDraftService.quote$
|
|
1185
1474
|
.pipe(rxjs.first(), rxjs.map(function (quote) {
|
|
1186
1475
|
var _a, _b;
|
|
1187
1476
|
var contextProperties = (_b = (_a = _this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties) !== null && _b !== void 0 ? _b : {};
|
|
@@ -1218,7 +1507,7 @@
|
|
|
1218
1507
|
var _this = this;
|
|
1219
1508
|
var _a;
|
|
1220
1509
|
var lineItemId = this.getLineItemId(quote, queryParams);
|
|
1221
|
-
var currentStateItem = i1$
|
|
1510
|
+
var currentStateItem = i1$2.EntityUtil.findById(lineItemId, quote.currentState);
|
|
1222
1511
|
var productId = (_a = currentStateItem === null || currentStateItem === void 0 ? void 0 : currentStateItem.productId) !== null && _a !== void 0 ? _a : queryParams['productId'];
|
|
1223
1512
|
var offeringId = (currentStateItem !== null && currentStateItem !== void 0 ? currentStateItem : {}).offeringId;
|
|
1224
1513
|
if (currentStateItem) {
|
|
@@ -1240,7 +1529,7 @@
|
|
|
1240
1529
|
.subscribe();
|
|
1241
1530
|
};
|
|
1242
1531
|
ProductComponent.prototype.getLineItemId = function (quote, queryParams) {
|
|
1243
|
-
if (i1$
|
|
1532
|
+
if (i1$2.EntityUtil.isPresent(queryParams['lineItemId'])) {
|
|
1244
1533
|
return queryParams['lineItemId'];
|
|
1245
1534
|
}
|
|
1246
1535
|
return quote.currentState
|
|
@@ -1250,8 +1539,8 @@
|
|
|
1250
1539
|
};
|
|
1251
1540
|
return ProductComponent;
|
|
1252
1541
|
}());
|
|
1253
|
-
ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace
|
|
1254
|
-
ProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type:
|
|
1542
|
+
ProductComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, deps: [{ token: i2__namespace.ContextService }, { token: i2__namespace.ConfigurationRuntimeService }, { token: i2__namespace.ConfigurationService }, { token: i2__namespace.FlowConfigurationService }, { token: i2__namespace.QuoteDraftService }, { token: i1__namespace$1.ActivatedRoute }, { token: i3__namespace.MessageService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1543
|
+
ProductComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ProductComponent, selector: "vl-flow-product", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1255
1544
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductComponent, decorators: [{
|
|
1256
1545
|
type: i0.Component,
|
|
1257
1546
|
args: [{
|
|
@@ -1261,7 +1550,7 @@
|
|
|
1261
1550
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1262
1551
|
}]
|
|
1263
1552
|
}], ctorParameters: function () {
|
|
1264
|
-
return [{ type: i2__namespace.ContextService }, { type: i2__namespace
|
|
1553
|
+
return [{ type: i2__namespace.ContextService }, { type: i2__namespace.ConfigurationRuntimeService }, { type: i2__namespace.ConfigurationService }, { type: i2__namespace.FlowConfigurationService }, { type: i2__namespace.QuoteDraftService }, { type: i1__namespace$1.ActivatedRoute }, { type: i3__namespace.MessageService }, { type: undefined, decorators: [{
|
|
1265
1554
|
type: i0.Optional
|
|
1266
1555
|
}, {
|
|
1267
1556
|
type: i0.Inject,
|
|
@@ -1275,13 +1564,13 @@
|
|
|
1275
1564
|
return ProductModule;
|
|
1276
1565
|
}());
|
|
1277
1566
|
ProductModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1278
|
-
ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i9.CommonModule,
|
|
1279
|
-
ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i9.CommonModule,
|
|
1567
|
+
ProductModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, declarations: [ProductComponent], imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule], exports: [ProductComponent] });
|
|
1568
|
+
ProductModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, imports: [[i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule]] });
|
|
1280
1569
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ProductModule, decorators: [{
|
|
1281
1570
|
type: i0.NgModule,
|
|
1282
1571
|
args: [{
|
|
1283
1572
|
declarations: [ProductComponent],
|
|
1284
|
-
imports: [i9.CommonModule,
|
|
1573
|
+
imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
|
|
1285
1574
|
exports: [ProductComponent],
|
|
1286
1575
|
}]
|
|
1287
1576
|
}] });
|
|
@@ -1300,7 +1589,7 @@
|
|
|
1300
1589
|
}
|
|
1301
1590
|
return RecordNotFoundComponent;
|
|
1302
1591
|
}());
|
|
1303
|
-
RecordNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, deps: [{ token: i1__namespace.Router }, { token: i1__namespace.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1592
|
+
RecordNotFoundComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$1.ActivatedRoute }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1304
1593
|
RecordNotFoundComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0__namespace, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div class=\"msg\">\n <div *ngIf=\"message; else defaultMessage\" class=\"message-title\">\n <p>{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"message-title\">{{ subMessage }}</p>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}\n"], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1305
1594
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundComponent, decorators: [{
|
|
1306
1595
|
type: i0.Component,
|
|
@@ -1310,7 +1599,7 @@
|
|
|
1310
1599
|
styleUrls: ['./record-not-found.component.scss'],
|
|
1311
1600
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1312
1601
|
}]
|
|
1313
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace.ActivatedRoute }]; } });
|
|
1602
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }]; } });
|
|
1314
1603
|
|
|
1315
1604
|
var routes = [{ path: '', component: RecordNotFoundComponent }];
|
|
1316
1605
|
var RecordNotFoundModule = /** @class */ (function () {
|
|
@@ -1319,40 +1608,46 @@
|
|
|
1319
1608
|
return RecordNotFoundModule;
|
|
1320
1609
|
}());
|
|
1321
1610
|
RecordNotFoundModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1322
|
-
RecordNotFoundModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [i9.CommonModule, i1__namespace.RouterModule] });
|
|
1323
|
-
RecordNotFoundModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, imports: [[i9.CommonModule, i1.RouterModule.forChild(routes)]] });
|
|
1611
|
+
RecordNotFoundModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [i9.CommonModule, i1__namespace$1.RouterModule] });
|
|
1612
|
+
RecordNotFoundModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, imports: [[i9.CommonModule, i1$1.RouterModule.forChild(routes)]] });
|
|
1324
1613
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: RecordNotFoundModule, decorators: [{
|
|
1325
1614
|
type: i0.NgModule,
|
|
1326
1615
|
args: [{
|
|
1327
1616
|
declarations: [RecordNotFoundComponent],
|
|
1328
|
-
imports: [i9.CommonModule, i1.RouterModule.forChild(routes)],
|
|
1617
|
+
imports: [i9.CommonModule, i1$1.RouterModule.forChild(routes)],
|
|
1329
1618
|
}]
|
|
1330
1619
|
}] });
|
|
1331
1620
|
|
|
1332
1621
|
var ShoppingCartComponent = /** @class */ (function () {
|
|
1333
|
-
function ShoppingCartComponent(templatesApi, cdr, toastService, customizationService) {
|
|
1622
|
+
function ShoppingCartComponent(templatesApi, contextService, cdr, toastService, customizationService) {
|
|
1623
|
+
var _a, _b;
|
|
1334
1624
|
this.templatesApi = templatesApi;
|
|
1625
|
+
this.contextService = contextService;
|
|
1335
1626
|
this.cdr = cdr;
|
|
1336
1627
|
this.toastService = toastService;
|
|
1337
1628
|
this.customizationService = customizationService;
|
|
1338
1629
|
this.uiDefinition = undefined;
|
|
1339
1630
|
this.state$ = new rxjs.BehaviorSubject({ loading: true, failure: false });
|
|
1631
|
+
this.templateApiName = '';
|
|
1340
1632
|
this.destroyed$ = new rxjs.Subject();
|
|
1633
|
+
this.templateApiName = (_b = (_a = this.contextService.resolve()) === null || _a === void 0 ? void 0 : _a.properties.cartTemplateApiName) !== null && _b !== void 0 ? _b : '';
|
|
1341
1634
|
}
|
|
1342
1635
|
ShoppingCartComponent.prototype.ngOnInit = function () {
|
|
1343
1636
|
var _this = this;
|
|
1344
1637
|
this.generateUIDefinition$()
|
|
1345
1638
|
.pipe(rxjs.tap(function (uiDef) {
|
|
1346
1639
|
if (!uiDef) {
|
|
1347
|
-
throw '
|
|
1640
|
+
throw new Error("Component with name '" + _this.templateApiName + "' not found.");
|
|
1348
1641
|
}
|
|
1349
1642
|
_this.uiDefinition = uiDef;
|
|
1350
1643
|
_this.state$.next({ loading: false, failure: false });
|
|
1351
1644
|
}), rxjs.catchError(function (err) {
|
|
1645
|
+
var _a;
|
|
1646
|
+
var message = 'Failed to resolve Shopping cart component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
|
1647
|
+
_this.toastService.add({ severity: i3$1.ToastType.error, summary: message, sticky: true });
|
|
1352
1648
|
_this.uiDefinition = undefined;
|
|
1353
|
-
_this.toastService.add({ severity: i2$2.ToastType.error, summary: 'Failed to resolve Shopping Cart component' });
|
|
1354
1649
|
_this.state$.next({ loading: false, failure: true });
|
|
1355
|
-
|
|
1650
|
+
return rxjs.of();
|
|
1356
1651
|
}), rxjs.takeUntil(this.destroyed$))
|
|
1357
1652
|
.subscribe(function () { return _this.cdr.detectChanges(); });
|
|
1358
1653
|
};
|
|
@@ -1363,23 +1658,36 @@
|
|
|
1363
1658
|
ShoppingCartComponent.prototype.getTemplateRootComponent$ = function (template) {
|
|
1364
1659
|
return this.templatesApi
|
|
1365
1660
|
.fetchComponents$(template.id)
|
|
1366
|
-
.pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$
|
|
1661
|
+
.pipe(rxjs.map(function (components) { var _a; return (_a = components.find(function (c) { return c.type === i1$2.UITemplateComponentType.ROOT; })) !== null && _a !== void 0 ? _a : undefined; }));
|
|
1367
1662
|
};
|
|
1368
|
-
ShoppingCartComponent.prototype.
|
|
1369
|
-
var _this = this;
|
|
1663
|
+
ShoppingCartComponent.prototype.getLocalShoppingCartComponentMeta$ = function () {
|
|
1370
1664
|
var _a, _b;
|
|
1371
|
-
if ((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getShoppingCartComponent) {
|
|
1372
|
-
return
|
|
1373
|
-
html: component === null || component === void 0 ? void 0 : component.html,
|
|
1374
|
-
css: component === null || component === void 0 ? void 0 : component.css,
|
|
1375
|
-
js: component === null || component === void 0 ? void 0 : component.js,
|
|
1376
|
-
json: component === null || component === void 0 ? void 0 : component.json,
|
|
1377
|
-
}); }));
|
|
1665
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getShoppingCartComponent)) {
|
|
1666
|
+
return rxjs.of(undefined);
|
|
1378
1667
|
}
|
|
1379
|
-
return
|
|
1668
|
+
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getShoppingCartComponent(this.templateApiName).pipe(rxjs.map(function (component) {
|
|
1669
|
+
if (!component) {
|
|
1670
|
+
return;
|
|
1671
|
+
}
|
|
1672
|
+
return {
|
|
1673
|
+
html: component.html,
|
|
1674
|
+
css: component.css,
|
|
1675
|
+
js: component.js,
|
|
1676
|
+
json: component.json,
|
|
1677
|
+
};
|
|
1678
|
+
}));
|
|
1679
|
+
};
|
|
1680
|
+
ShoppingCartComponent.prototype.getShoppingCartComponentMeta$ = function () {
|
|
1681
|
+
var _this = this;
|
|
1682
|
+
return this.templatesApi.fetchTemplates$().pipe(rxjs.map(function (templates) { return templates.find(function (template) { return template.type === i1$2.UITemplateType.SHOPPING_CART && template.name === _this.templateApiName; }); }), rxjs.switchMap(function (template) { return (template ? _this.getTemplateRootComponent$(template) : rxjs.of(undefined)); }), rxjs.switchMap(function (component) { return component ? _this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component) : rxjs.of(undefined); }));
|
|
1380
1683
|
};
|
|
1381
1684
|
ShoppingCartComponent.prototype.generateUIDefinition$ = function () {
|
|
1382
|
-
|
|
1685
|
+
var _this = this;
|
|
1686
|
+
return rxjs.of(undefined).pipe(rxjs.tap(function () {
|
|
1687
|
+
if (!_this.templateApiName) {
|
|
1688
|
+
throw new Error("Flow Query parameter 'cartTemplateApiName' is missing.");
|
|
1689
|
+
}
|
|
1690
|
+
}), rxjs.switchMap(function () { return _this.getLocalShoppingCartComponentMeta$(); }), rxjs.switchMap(function (meta) { return (meta ? rxjs.of(meta) : _this.getShoppingCartComponentMeta$()); }), rxjs.map(function (meta) {
|
|
1383
1691
|
if (!meta) {
|
|
1384
1692
|
return;
|
|
1385
1693
|
}
|
|
@@ -1403,8 +1711,8 @@
|
|
|
1403
1711
|
};
|
|
1404
1712
|
return ShoppingCartComponent;
|
|
1405
1713
|
}());
|
|
1406
|
-
ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$
|
|
1407
|
-
ShoppingCartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type:
|
|
1714
|
+
ShoppingCartComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, deps: [{ token: i1__namespace$3.UITemplatesApiService }, { token: i2__namespace.ContextService }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1715
|
+
ShoppingCartComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0__namespace, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], components: [{ type: i3__namespace$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: i1__namespace$4.PreviewComponent, selector: "vl-cms-preview", inputs: ["modelId", "uiDefinition", "clearState"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i9__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1408
1716
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartComponent, decorators: [{
|
|
1409
1717
|
type: i0.Component,
|
|
1410
1718
|
args: [{
|
|
@@ -1414,7 +1722,7 @@
|
|
|
1414
1722
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1415
1723
|
}]
|
|
1416
1724
|
}], ctorParameters: function () {
|
|
1417
|
-
return [{ type: i1__namespace$
|
|
1725
|
+
return [{ type: i1__namespace$3.UITemplatesApiService }, { type: i2__namespace.ContextService }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$1.ToastService }, { type: undefined, decorators: [{
|
|
1418
1726
|
type: i0.Optional
|
|
1419
1727
|
}, {
|
|
1420
1728
|
type: i0.Inject,
|
|
@@ -1428,13 +1736,13 @@
|
|
|
1428
1736
|
return ShoppingCartModule;
|
|
1429
1737
|
}());
|
|
1430
1738
|
ShoppingCartModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1431
|
-
ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i9.CommonModule,
|
|
1432
|
-
ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i9.CommonModule,
|
|
1739
|
+
ShoppingCartModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, declarations: [ShoppingCartComponent], imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule], exports: [ShoppingCartComponent] });
|
|
1740
|
+
ShoppingCartModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, imports: [[i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule]] });
|
|
1433
1741
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ShoppingCartModule, decorators: [{
|
|
1434
1742
|
type: i0.NgModule,
|
|
1435
1743
|
args: [{
|
|
1436
1744
|
declarations: [ShoppingCartComponent],
|
|
1437
|
-
imports: [i9.CommonModule,
|
|
1745
|
+
imports: [i9.CommonModule, i1$4.PreviewModule, i3$1.LoaderModule],
|
|
1438
1746
|
exports: [ShoppingCartComponent],
|
|
1439
1747
|
}]
|
|
1440
1748
|
}] });
|
|
@@ -1469,11 +1777,11 @@
|
|
|
1469
1777
|
};
|
|
1470
1778
|
return ContextResolver;
|
|
1471
1779
|
}());
|
|
1472
|
-
ContextResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, deps: [{ token: i2__namespace.ContextService }, { token: i1__namespace.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1780
|
+
ContextResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, deps: [{ token: i2__namespace.ContextService }, { token: i1__namespace$1.Router }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1473
1781
|
ContextResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver });
|
|
1474
1782
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: ContextResolver, decorators: [{
|
|
1475
1783
|
type: i0.Injectable
|
|
1476
|
-
}], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i1__namespace.Router }, { type: FlowRouterService }]; } });
|
|
1784
|
+
}], ctorParameters: function () { return [{ type: i2__namespace.ContextService }, { type: i1__namespace$1.Router }, { type: FlowRouterService }]; } });
|
|
1477
1785
|
|
|
1478
1786
|
var FlowResolver = /** @class */ (function () {
|
|
1479
1787
|
function FlowResolver(router, flowsApiService, routerService) {
|
|
@@ -1522,16 +1830,16 @@
|
|
|
1522
1830
|
};
|
|
1523
1831
|
return FlowResolver;
|
|
1524
1832
|
}());
|
|
1525
|
-
FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace.Router }, { token: i1__namespace$
|
|
1833
|
+
FlowResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, deps: [{ token: i1__namespace$1.Router }, { token: i1__namespace$3.FlowsApiService }, { token: FlowRouterService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1526
1834
|
FlowResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver });
|
|
1527
1835
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowResolver, decorators: [{
|
|
1528
1836
|
type: i0.Injectable
|
|
1529
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i1__namespace$
|
|
1837
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i1__namespace$3.FlowsApiService }, { type: FlowRouterService }]; } });
|
|
1530
1838
|
|
|
1531
1839
|
var QuoteResolver = /** @class */ (function () {
|
|
1532
|
-
function QuoteResolver(router,
|
|
1840
|
+
function QuoteResolver(router, quoteDraftService, routerService, contextService, flowConfiguration) {
|
|
1533
1841
|
this.router = router;
|
|
1534
|
-
this.
|
|
1842
|
+
this.quoteDraftService = quoteDraftService;
|
|
1535
1843
|
this.routerService = routerService;
|
|
1536
1844
|
this.contextService = contextService;
|
|
1537
1845
|
this.flowConfiguration = flowConfiguration;
|
|
@@ -1544,34 +1852,28 @@
|
|
|
1544
1852
|
if (this.contextService.isStandalone) {
|
|
1545
1853
|
return rxjs.of(undefined);
|
|
1546
1854
|
}
|
|
1547
|
-
|
|
1548
|
-
if (quoteDraft) {
|
|
1549
|
-
return this.flowConfiguration.calculate$(quoteDraft.currentState);
|
|
1550
|
-
}
|
|
1551
|
-
else {
|
|
1552
|
-
return rxjs.of(undefined);
|
|
1553
|
-
}
|
|
1855
|
+
return this.flowConfiguration.initialize$();
|
|
1554
1856
|
};
|
|
1555
1857
|
QuoteResolver.prototype.resolve = function (route) {
|
|
1556
1858
|
var _this = this;
|
|
1557
1859
|
var headerId = route.data.headerId;
|
|
1558
|
-
var quote = this.
|
|
1860
|
+
var quote = this.quoteDraftService.quoteSnapshot;
|
|
1559
1861
|
if (quote && quote.quoteId === headerId) {
|
|
1560
1862
|
return rxjs.of(true);
|
|
1561
1863
|
}
|
|
1562
1864
|
var queryParams = route.queryParams;
|
|
1563
|
-
return this.
|
|
1865
|
+
return this.quoteDraftService.init(headerId, queryParams).pipe(rxjs.switchMap(function () { return _this.initFlow$(); }), rxjs.catchError(function (e) {
|
|
1564
1866
|
var message = e instanceof http.HttpErrorResponse ? e.error.message : e;
|
|
1565
1867
|
return _this.handleError(route, message);
|
|
1566
1868
|
}));
|
|
1567
1869
|
};
|
|
1568
1870
|
return QuoteResolver;
|
|
1569
1871
|
}());
|
|
1570
|
-
QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace.Router }, { token: i2__namespace.
|
|
1872
|
+
QuoteResolver.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, deps: [{ token: i1__namespace$1.Router }, { token: i2__namespace.QuoteDraftService }, { token: FlowRouterService }, { token: i2__namespace.ContextService }, { token: i2__namespace.FlowConfigurationService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
1571
1873
|
QuoteResolver.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver });
|
|
1572
1874
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: QuoteResolver, decorators: [{
|
|
1573
1875
|
type: i0.Injectable
|
|
1574
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.Router }, { type: i2__namespace.
|
|
1876
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i2__namespace.QuoteDraftService }, { type: FlowRouterService }, { type: i2__namespace.ContextService }, { type: i2__namespace.FlowConfigurationService }]; } });
|
|
1575
1877
|
|
|
1576
1878
|
var rootRoute = {
|
|
1577
1879
|
id: VELOCE_FLOW_ROOT_ROUTE,
|
|
@@ -1615,6 +1917,14 @@
|
|
|
1615
1917
|
canActivate: [ContextGuard],
|
|
1616
1918
|
data: { showHeader: true },
|
|
1617
1919
|
},
|
|
1920
|
+
{
|
|
1921
|
+
path: 'catalog',
|
|
1922
|
+
component: CatalogComponent,
|
|
1923
|
+
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
|
1924
|
+
resolve: { context: ContextResolver, quote: QuoteResolver },
|
|
1925
|
+
canActivate: [ContextGuard],
|
|
1926
|
+
data: { showHeader: true },
|
|
1927
|
+
},
|
|
1618
1928
|
{
|
|
1619
1929
|
path: 'debug',
|
|
1620
1930
|
loadChildren: function () { return DebugModule; },
|
|
@@ -1631,13 +1941,13 @@
|
|
|
1631
1941
|
return FlowRoutingModule;
|
|
1632
1942
|
}());
|
|
1633
1943
|
FlowRoutingModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1634
|
-
FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule], exports: [i1.RouterModule] });
|
|
1635
|
-
FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver], imports: [[i1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule], i1.RouterModule] });
|
|
1944
|
+
FlowRoutingModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, imports: [i1__namespace$1.RouterModule, ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], exports: [i1$1.RouterModule] });
|
|
1945
|
+
FlowRoutingModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver], imports: [[i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule], i1$1.RouterModule] });
|
|
1636
1946
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowRoutingModule, decorators: [{
|
|
1637
1947
|
type: i0.NgModule,
|
|
1638
1948
|
args: [{
|
|
1639
|
-
imports: [i1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule],
|
|
1640
|
-
exports: [i1.RouterModule],
|
|
1949
|
+
imports: [i1$1.RouterModule.forChild([rootRoute]), ProductModule, LegacyProductModule, ShoppingCartModule, CatalogModule],
|
|
1950
|
+
exports: [i1$1.RouterModule],
|
|
1641
1951
|
providers: [FlowRouterService, RootGuard, ContextGuard, ContextResolver, FlowResolver, QuoteResolver],
|
|
1642
1952
|
}]
|
|
1643
1953
|
}] });
|
|
@@ -1648,14 +1958,39 @@
|
|
|
1648
1958
|
return FlowModule;
|
|
1649
1959
|
}());
|
|
1650
1960
|
FlowModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1651
|
-
FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i9.CommonModule,
|
|
1652
|
-
|
|
1961
|
+
FlowModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, declarations: [FlowComponent], imports: [i9.CommonModule,
|
|
1962
|
+
FlowRoutingModule,
|
|
1963
|
+
i1$3.ApiModule,
|
|
1964
|
+
i1$4.LauncherModule,
|
|
1965
|
+
i3$1.LoaderModule,
|
|
1966
|
+
FlowHeaderModule,
|
|
1967
|
+
FlowDialogModule,
|
|
1968
|
+
i2.SdkCoreModule] });
|
|
1969
|
+
FlowModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, providers: [FlowService, FlowDialogService], imports: [[
|
|
1970
|
+
i9.CommonModule,
|
|
1971
|
+
FlowRoutingModule,
|
|
1972
|
+
i1$3.ApiModule,
|
|
1973
|
+
i1$4.LauncherModule,
|
|
1974
|
+
i3$1.LoaderModule,
|
|
1975
|
+
FlowHeaderModule,
|
|
1976
|
+
FlowDialogModule,
|
|
1977
|
+
i2.SdkCoreModule,
|
|
1978
|
+
]] });
|
|
1653
1979
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: FlowModule, decorators: [{
|
|
1654
1980
|
type: i0.NgModule,
|
|
1655
1981
|
args: [{
|
|
1656
1982
|
declarations: [FlowComponent],
|
|
1657
|
-
imports: [
|
|
1658
|
-
|
|
1983
|
+
imports: [
|
|
1984
|
+
i9.CommonModule,
|
|
1985
|
+
FlowRoutingModule,
|
|
1986
|
+
i1$3.ApiModule,
|
|
1987
|
+
i1$4.LauncherModule,
|
|
1988
|
+
i3$1.LoaderModule,
|
|
1989
|
+
FlowHeaderModule,
|
|
1990
|
+
FlowDialogModule,
|
|
1991
|
+
i2.SdkCoreModule,
|
|
1992
|
+
],
|
|
1993
|
+
providers: [FlowService, FlowDialogService],
|
|
1659
1994
|
}]
|
|
1660
1995
|
}] });
|
|
1661
1996
|
|
|
@@ -1669,6 +2004,7 @@
|
|
|
1669
2004
|
exports.FlowService = FlowService;
|
|
1670
2005
|
exports.VELOCE_FLOW_ROOT_ROUTE = VELOCE_FLOW_ROOT_ROUTE;
|
|
1671
2006
|
exports.getFlowObjectIdPropertyName = getFlowObjectIdPropertyName;
|
|
2007
|
+
exports.getIsEditMode = getIsEditMode;
|
|
1672
2008
|
|
|
1673
2009
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1674
2010
|
|