@veloceapps/sdk 8.0.0-99 → 9.0.0-0
Sign up to get free protection for your applications and to get access to all the features.
- package/cms/README.md +0 -20
- package/cms/cms.actions.d.ts +9 -1
- package/cms/components/preview/preview.component.d.ts +2 -3
- package/cms/components/preview/preview.types.d.ts +4 -0
- package/cms/index.d.ts +1 -0
- package/cms/modules/runtime/services/runtime.service.d.ts +1 -1
- package/cms/services/index.d.ts +0 -1
- package/cms/services/resources.service.d.ts +2 -0
- package/cms/types/index.d.ts +0 -1
- package/cms/utils/element-metadata-worker.d.ts +11 -0
- package/cms/utils/elements-resolver.d.ts +0 -2
- package/cms/utils/index.d.ts +3 -0
- package/cms/utils/transpilation-worker.d.ts +13 -0
- package/cms/vendor-map.d.ts +21 -18
- package/core/README.md +20 -0
- package/core/modules/configuration/configuration.module.d.ts +2 -1
- package/core/modules/configuration/helpers.d.ts +2 -1
- package/core/modules/configuration/index.d.ts +1 -1
- package/core/modules/configuration/services/configuration-state.service.d.ts +54 -0
- package/core/modules/configuration/services/configuration.service.d.ts +6 -6
- package/core/modules/configuration/types/configuration.types.d.ts +4 -0
- package/core/modules/flow-configuration/flow-configuration.module.d.ts +2 -1
- package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +5 -0
- package/core/services/context.service.d.ts +2 -0
- package/core/services/flow-info.service.d.ts +29 -0
- package/core/services/flow-state-configuration.service.d.ts +19 -0
- package/core/services/flow-state.service.d.ts +80 -0
- package/core/services/index.d.ts +4 -1
- package/core/services/quote-draft.service.d.ts +12 -28
- package/core/types/flow-customization.types.d.ts +22 -0
- package/core/types/flow-state.types.d.ts +11 -0
- package/core/types/index.d.ts +3 -1
- package/{cms → core}/types/integration.types.d.ts +0 -1
- package/core/utils/line-item.utils.d.ts +1 -3
- package/esm2020/cms/cms.actions.mjs +11 -1
- package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +3 -3
- package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
- package/esm2020/cms/components/preview/preview.component.mjs +10 -10
- package/esm2020/cms/components/preview/preview.module.mjs +2 -2
- package/esm2020/cms/components/preview/preview.types.mjs +1 -1
- package/esm2020/cms/index.mjs +2 -1
- package/esm2020/cms/launcher.module.mjs +4 -4
- package/esm2020/cms/modules/migrations/migrations.mjs +2 -2
- package/esm2020/cms/modules/migrations/services/migrations.service.mjs +6 -2
- package/esm2020/cms/modules/runtime/services/compilation.service.mjs +8 -8
- package/esm2020/cms/modules/runtime/services/runtime.service.mjs +4 -4
- package/esm2020/cms/plugins/configuration.plugin.mjs +8 -4
- package/esm2020/cms/services/index.mjs +1 -2
- package/esm2020/cms/services/io-provider.service.mjs +10 -9
- package/esm2020/cms/services/resources.service.mjs +10 -6
- package/esm2020/cms/services/templates.service.mjs +10 -9
- package/esm2020/cms/types/index.mjs +1 -2
- package/esm2020/cms/utils/element-metadata-worker.mjs +31 -0
- package/esm2020/cms/utils/elements-resolver.mjs +13 -27
- package/esm2020/cms/utils/encoding.utils.mjs +3 -2
- package/esm2020/cms/utils/index.mjs +4 -1
- package/esm2020/cms/utils/path.utils.mjs +3 -3
- package/esm2020/cms/utils/script.utils.mjs +19 -15
- package/esm2020/cms/utils/transpilation-worker.mjs +52 -0
- package/esm2020/cms/vendor-map.mjs +10 -5
- package/esm2020/core/core.module.mjs +19 -3
- package/esm2020/core/modules/configuration/configuration.module.mjs +7 -23
- package/esm2020/core/modules/configuration/helpers.mjs +21 -1
- package/esm2020/core/modules/configuration/index.mjs +2 -2
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +335 -0
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +56 -50
- package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
- package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +6 -6
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +12 -9
- package/esm2020/core/services/context.service.mjs +17 -5
- package/esm2020/core/services/flow-info.service.mjs +99 -0
- package/esm2020/core/services/flow-state-configuration.service.mjs +53 -0
- package/esm2020/core/services/flow-state.service.mjs +512 -0
- package/esm2020/core/services/index.mjs +5 -2
- package/esm2020/core/services/integration.state.mjs +36 -0
- package/esm2020/core/services/product-images.service.mjs +4 -5
- package/esm2020/core/services/quote-draft.service.mjs +39 -91
- package/esm2020/core/services/runtime-settings.service.mjs +7 -5
- package/esm2020/core/types/flow-customization.types.mjs +3 -0
- package/esm2020/core/types/flow-state.types.mjs +2 -0
- package/esm2020/core/types/index.mjs +4 -2
- package/esm2020/core/types/integration.types.mjs +2 -0
- package/esm2020/core/utils/line-item.utils.mjs +33 -32
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +44 -51
- package/esm2020/src/components/flow-header/flow-header.component.mjs +36 -47
- package/esm2020/src/components/guided-selling/guided-selling.component.mjs +35 -46
- package/esm2020/src/flow-routing.module.mjs +5 -18
- package/esm2020/src/flow.component.mjs +22 -37
- package/esm2020/src/guards/context.guard.mjs +6 -11
- package/esm2020/src/guards/flow.guard.mjs +23 -9
- package/esm2020/src/pages/assets/assets.component.mjs +30 -34
- package/esm2020/src/pages/catalog/catalog.component.mjs +30 -34
- package/esm2020/src/pages/debug/debug.component.mjs +2 -2
- package/esm2020/src/pages/product/product.component.mjs +34 -20
- package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +6 -3
- package/esm2020/src/pages/remote/remote.component.mjs +15 -14
- package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +31 -35
- package/esm2020/src/resolvers/flow.resolver.mjs +37 -55
- package/esm2020/src/resolvers/quote.resolver.mjs +55 -67
- package/esm2020/src/services/doc-gen.service.mjs +4 -3
- package/esm2020/src/services/flow-dialog.service.mjs +17 -6
- package/esm2020/src/services/flow-router.service.mjs +42 -15
- package/esm2020/src/services/flow.service.mjs +67 -52
- package/esm2020/src/services/guided-selling.service.mjs +5 -4
- package/esm2020/src/types/index.mjs +1 -2
- package/fesm2015/veloceapps-sdk-cms.mjs +270 -191
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +1195 -427
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +776 -826
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +275 -206
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +1176 -454
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +899 -945
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +8 -7
- package/src/components/doc-gen/doc-gen.component.d.ts +7 -10
- package/src/components/flow-header/flow-header.component.d.ts +6 -9
- package/src/components/guided-selling/guided-selling.component.d.ts +6 -9
- package/src/flow-routing.module.d.ts +1 -2
- package/src/flow.component.d.ts +7 -12
- package/src/guards/context.guard.d.ts +0 -1
- package/src/guards/flow.guard.d.ts +1 -1
- package/src/pages/assets/assets.component.d.ts +5 -7
- package/src/pages/catalog/catalog.component.d.ts +5 -7
- package/src/pages/product/product.component.d.ts +8 -7
- package/src/pages/record-not-found/record-not-found.component.d.ts +2 -0
- package/src/pages/remote/remote.component.d.ts +2 -3
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +5 -7
- package/src/resolvers/flow.resolver.d.ts +6 -9
- package/src/resolvers/quote.resolver.d.ts +7 -14
- package/src/services/doc-gen.service.d.ts +1 -1
- package/src/services/flow-dialog.service.d.ts +4 -2
- package/src/services/flow-router.service.d.ts +6 -3
- package/src/services/flow.service.d.ts +10 -14
- package/src/services/guided-selling.service.d.ts +1 -1
- package/src/types/index.d.ts +0 -1
- package/core/modules/configuration/services/configuration.state.d.ts +0 -30
- package/core/services/metric-calculation/metric-calculation.service.d.ts +0 -25
- package/core/services/metric-calculation/metric-calculation.types.d.ts +0 -1
- package/core/services/metric-calculation/metric-calculation.utils.d.ts +0 -5
- package/esm2020/cms/services/integration.state.mjs +0 -37
- package/esm2020/cms/types/integration.types.mjs +0 -2
- package/esm2020/core/modules/configuration/services/configuration.state.mjs +0 -142
- package/esm2020/core/services/metric-calculation/metric-calculation.service.mjs +0 -85
- package/esm2020/core/services/metric-calculation/metric-calculation.types.mjs +0 -2
- package/esm2020/core/services/metric-calculation/metric-calculation.utils.mjs +0 -42
- package/esm2020/src/pages/empty-account/empty-account.component.mjs +0 -12
- package/esm2020/src/pages/empty-account/empty-account.module.mjs +0 -20
- package/esm2020/src/types/flow-customization.types.mjs +0 -3
- package/src/pages/empty-account/empty-account.component.d.ts +0 -5
- package/src/pages/empty-account/empty-account.module.d.ts +0 -10
- package/src/types/flow-customization.types.d.ts +0 -12
- /package/{cms → core}/services/integration.state.d.ts +0 -0
@@ -1,32 +1,32 @@
|
|
1
1
|
import * as i4 from '@angular/common';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Component, ChangeDetectionStrategy, NgModule,
|
5
|
-
import * as i1$
|
4
|
+
import { Component, ChangeDetectionStrategy, NgModule, Optional, Inject, Injectable, inject } from '@angular/core';
|
5
|
+
import * as i1$1 from '@veloceapps/api';
|
6
6
|
import { ApiModule } from '@veloceapps/api';
|
7
|
-
import * as i2 from '@veloceapps/components';
|
8
|
-
import { ToastType, LoaderModule,
|
9
|
-
import * as
|
10
|
-
import {
|
11
|
-
import * as
|
12
|
-
import { ContextService, QuoteDraftService, ConfigurationService,
|
7
|
+
import * as i2$1 from '@veloceapps/components';
|
8
|
+
import { ToastType, LoaderModule, LetDirectiveModule } from '@veloceapps/components';
|
9
|
+
import * as i5 from '@veloceapps/sdk/cms';
|
10
|
+
import { extractElementMetadata, extendElementMetadata, btoaSafe, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
|
11
|
+
import * as i2 from '@veloceapps/sdk/core';
|
12
|
+
import { FLOW_CUSTOMIZATION, ContextService, FlowStateService, FlowInfoService, QuoteDraftService, ConfigurationService, IntegrationState, SdkCoreModule } from '@veloceapps/sdk/core';
|
13
13
|
import * as i3 from 'primeng/button';
|
14
14
|
import { ButtonModule } from 'primeng/button';
|
15
15
|
import * as i1 from 'primeng/dynamicdialog';
|
16
|
-
import {
|
17
|
-
import
|
18
|
-
import * as i1$1 from '@angular/router';
|
16
|
+
import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, forkJoin, throwError } from 'rxjs';
|
17
|
+
import * as i1$2 from '@angular/router';
|
19
18
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
19
|
+
import { UITemplateType, SalesforceIdUtils, mapShoppingCartSettings, getMaxRenewalTermsValue, ConfigurationContextMode, isVeloceError, extractErrorDetails, UUID } from '@veloceapps/core';
|
20
20
|
import { HttpErrorResponse, HttpParams } from '@angular/common/http';
|
21
|
-
import * as i5 from '@angular/forms';
|
21
|
+
import * as i5$1 from '@angular/forms';
|
22
22
|
import { FormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
23
23
|
import { DropdownModule } from 'primeng/dropdown';
|
24
24
|
import * as i8 from 'primeng/inputtext';
|
25
25
|
import { InputTextModule } from 'primeng/inputtext';
|
26
26
|
import * as i6 from 'primeng/radiobutton';
|
27
27
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
28
|
-
import * as i2$
|
29
|
-
import {
|
28
|
+
import * as i2$2 from 'primeng/api';
|
29
|
+
import { catchError as catchError$1 } from 'rxjs/operators';
|
30
30
|
import { DomHandler } from 'primeng/dom';
|
31
31
|
|
32
32
|
const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
|
@@ -75,42 +75,372 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
75
75
|
}]
|
76
76
|
}] });
|
77
77
|
|
78
|
-
|
78
|
+
class DocGenComponent {
|
79
|
+
constructor(templatesApi, contextService, flowStateService, flowInfo, toastService, customizationService) {
|
80
|
+
this.templatesApi = templatesApi;
|
81
|
+
this.contextService = contextService;
|
82
|
+
this.flowStateService = flowStateService;
|
83
|
+
this.flowInfo = flowInfo;
|
84
|
+
this.toastService = toastService;
|
85
|
+
this.customizationService = customizationService;
|
86
|
+
this.uiDefinition$ = new BehaviorSubject(null);
|
87
|
+
this.templateApiName = '';
|
88
|
+
this.destroy$ = new Subject();
|
89
|
+
// wait until flow is initialized
|
90
|
+
this.flowStateService
|
91
|
+
.isInitialized$()
|
92
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
93
|
+
.subscribe();
|
94
|
+
}
|
95
|
+
ngOnDestroy() {
|
96
|
+
this.destroy$.next();
|
97
|
+
this.destroy$.complete();
|
98
|
+
}
|
99
|
+
initialize() {
|
100
|
+
var _a, _b, _c;
|
101
|
+
this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.docGen) !== null && _c !== void 0 ? _c : '';
|
102
|
+
this.generateUIDefinition$()
|
103
|
+
.pipe(tap(uiDef => {
|
104
|
+
if (!uiDef) {
|
105
|
+
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
106
|
+
}
|
107
|
+
this.uiDefinition$.next(uiDef);
|
108
|
+
}), catchError(err => {
|
109
|
+
var _a;
|
110
|
+
const message = 'Failed to resolve DocGen component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
111
|
+
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
112
|
+
return of();
|
113
|
+
}), takeUntil(this.destroy$))
|
114
|
+
.subscribe();
|
115
|
+
}
|
116
|
+
getLocalMeta$() {
|
117
|
+
var _a, _b;
|
118
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
|
119
|
+
return of(undefined);
|
120
|
+
}
|
121
|
+
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
122
|
+
if (!components) {
|
123
|
+
return;
|
124
|
+
}
|
125
|
+
return components.map(component => ({
|
126
|
+
html: component.html,
|
127
|
+
css: component.css,
|
128
|
+
js: component.js,
|
129
|
+
json: component.json,
|
130
|
+
}));
|
131
|
+
}));
|
132
|
+
}
|
133
|
+
getOrgMeta$() {
|
134
|
+
const template = this.flowInfo.templates.DOCGEN;
|
135
|
+
if (!template) {
|
136
|
+
return of(undefined);
|
137
|
+
}
|
138
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
139
|
+
}
|
140
|
+
generateUIDefinition$() {
|
141
|
+
return of(undefined).pipe(tap(() => {
|
142
|
+
if (!this.templateApiName) {
|
143
|
+
throw new Error("Flow 'docGen' template is not defined.");
|
144
|
+
}
|
145
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
146
|
+
var _a;
|
147
|
+
if (!metaList) {
|
148
|
+
return;
|
149
|
+
}
|
150
|
+
const headerId = (_a = this.contextService.resolve().properties.Id) !== null && _a !== void 0 ? _a : null;
|
151
|
+
const patchedMetaList = metaList.map(component => {
|
152
|
+
if (!component.js) {
|
153
|
+
return component;
|
154
|
+
}
|
155
|
+
const metadata = extractElementMetadata(component.js);
|
156
|
+
const script = extendElementMetadata(component.js, {
|
157
|
+
inputs: Object.assign(Object.assign({}, metadata.inputs), { Id: headerId ? `"${headerId}"` : null }),
|
158
|
+
});
|
159
|
+
return Object.assign(Object.assign({}, component), { js: script });
|
160
|
+
});
|
161
|
+
const uiDef = {
|
162
|
+
name: '',
|
163
|
+
createdTimestamp: 0,
|
164
|
+
primary: true,
|
165
|
+
type: 'DEFAULT',
|
166
|
+
version: 2,
|
167
|
+
children: patchedMetaList.map(child => ({
|
168
|
+
children: [],
|
169
|
+
template: child.html && btoaSafe(child.html),
|
170
|
+
script: child.js && btoaSafe(child.js),
|
171
|
+
styles: child.css && btoaSafe(child.css),
|
172
|
+
})),
|
173
|
+
};
|
174
|
+
return uiDef;
|
175
|
+
}));
|
176
|
+
}
|
177
|
+
}
|
178
|
+
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.ContextService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
179
|
+
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
|
181
|
+
type: Component,
|
182
|
+
args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
183
|
+
}], ctorParameters: function () {
|
184
|
+
return [{ type: i1$1.UITemplatesApiService }, { type: i2.ContextService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
185
|
+
type: Optional
|
186
|
+
}, {
|
187
|
+
type: Inject,
|
188
|
+
args: [FLOW_CUSTOMIZATION]
|
189
|
+
}] }];
|
190
|
+
} });
|
79
191
|
|
80
|
-
|
81
|
-
|
82
|
-
|
192
|
+
class DocGenModule {
|
193
|
+
}
|
194
|
+
DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
195
|
+
DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
|
196
|
+
DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
|
197
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, decorators: [{
|
198
|
+
type: NgModule,
|
199
|
+
args: [{
|
200
|
+
declarations: [DocGenComponent],
|
201
|
+
imports: [CommonModule, PreviewModule],
|
202
|
+
exports: [DocGenComponent],
|
203
|
+
}]
|
204
|
+
}] });
|
205
|
+
|
206
|
+
class GuidedSellingComponent {
|
207
|
+
constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
|
208
|
+
this.templatesApi = templatesApi;
|
209
|
+
this.flowStateService = flowStateService;
|
210
|
+
this.flowInfo = flowInfo;
|
211
|
+
this.toastService = toastService;
|
212
|
+
this.customizationService = customizationService;
|
213
|
+
this.uiDefinition$ = new BehaviorSubject(null);
|
214
|
+
this.templateApiName = '';
|
215
|
+
this.destroy$ = new Subject();
|
216
|
+
// wait until flow is initialized
|
217
|
+
this.flowStateService
|
218
|
+
.isInitialized$()
|
219
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
220
|
+
.subscribe();
|
221
|
+
}
|
222
|
+
ngOnDestroy() {
|
223
|
+
this.destroy$.next();
|
224
|
+
this.destroy$.complete();
|
83
225
|
}
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
226
|
+
initialize() {
|
227
|
+
var _a, _b, _c;
|
228
|
+
this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.guidedSelling) !== null && _c !== void 0 ? _c : '';
|
229
|
+
this.generateUIDefinition$()
|
230
|
+
.pipe(tap(uiDef => {
|
231
|
+
if (!uiDef) {
|
232
|
+
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
233
|
+
}
|
234
|
+
this.uiDefinition$.next(uiDef);
|
235
|
+
}), catchError(err => {
|
236
|
+
var _a;
|
237
|
+
const message = 'Failed to resolve Guided Selling component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
238
|
+
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
239
|
+
return of();
|
240
|
+
}), takeUntil(this.destroy$))
|
241
|
+
.subscribe();
|
88
242
|
}
|
89
|
-
|
90
|
-
|
243
|
+
getLocalMeta$() {
|
244
|
+
var _a, _b;
|
245
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
|
246
|
+
return of(undefined);
|
247
|
+
}
|
248
|
+
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
249
|
+
if (!components) {
|
250
|
+
return;
|
251
|
+
}
|
252
|
+
return components.map(component => ({
|
253
|
+
html: component.html,
|
254
|
+
css: component.css,
|
255
|
+
js: component.js,
|
256
|
+
json: component.json,
|
257
|
+
}));
|
258
|
+
}));
|
259
|
+
}
|
260
|
+
getOrgMeta$() {
|
261
|
+
const template = this.flowInfo.templates.GUIDED_SELLING;
|
262
|
+
if (!template) {
|
263
|
+
return of(undefined);
|
264
|
+
}
|
265
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
266
|
+
}
|
267
|
+
generateUIDefinition$() {
|
268
|
+
return of(undefined).pipe(tap(() => {
|
269
|
+
if (!this.templateApiName) {
|
270
|
+
throw new Error("Flow 'guidedSelling' template is not defined.");
|
271
|
+
}
|
272
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
273
|
+
if (!metaList) {
|
274
|
+
return;
|
275
|
+
}
|
276
|
+
const uiDef = {
|
277
|
+
name: '',
|
278
|
+
createdTimestamp: 0,
|
279
|
+
primary: true,
|
280
|
+
type: 'DEFAULT',
|
281
|
+
version: 2,
|
282
|
+
children: metaList.map(meta => ({
|
283
|
+
children: [],
|
284
|
+
template: meta.html && btoaSafe(meta.html),
|
285
|
+
script: meta.js && btoaSafe(meta.js),
|
286
|
+
styles: meta.css && btoaSafe(meta.css),
|
287
|
+
})),
|
288
|
+
};
|
289
|
+
return uiDef;
|
290
|
+
}));
|
91
291
|
}
|
92
292
|
}
|
93
|
-
|
94
|
-
|
95
|
-
|
293
|
+
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
294
|
+
GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: GuidedSellingComponent, selector: "vl-flow-guided-selling", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
|
296
|
+
type: Component,
|
297
|
+
args: [{ selector: 'vl-flow-guided-selling', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
298
|
+
}], ctorParameters: function () {
|
299
|
+
return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
300
|
+
type: Optional
|
301
|
+
}, {
|
302
|
+
type: Inject,
|
303
|
+
args: [FLOW_CUSTOMIZATION]
|
304
|
+
}] }];
|
305
|
+
} });
|
306
|
+
|
307
|
+
class GuidedSellingModule {
|
308
|
+
}
|
309
|
+
GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
310
|
+
GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, declarations: [GuidedSellingComponent], imports: [CommonModule, PreviewModule], exports: [GuidedSellingComponent] });
|
311
|
+
GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, imports: [CommonModule, PreviewModule] });
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, decorators: [{
|
313
|
+
type: NgModule,
|
314
|
+
args: [{
|
315
|
+
declarations: [GuidedSellingComponent],
|
316
|
+
imports: [CommonModule, PreviewModule],
|
317
|
+
exports: [GuidedSellingComponent],
|
318
|
+
}]
|
319
|
+
}] });
|
320
|
+
|
321
|
+
class FlowHeaderComponent {
|
322
|
+
constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
|
323
|
+
this.templatesApi = templatesApi;
|
324
|
+
this.flowStateService = flowStateService;
|
325
|
+
this.flowInfo = flowInfo;
|
326
|
+
this.toastService = toastService;
|
327
|
+
this.customizationService = customizationService;
|
328
|
+
this.uiDefinition$ = new BehaviorSubject(null);
|
329
|
+
this.templateApiName = '';
|
330
|
+
this.destroy$ = new Subject();
|
331
|
+
// wait until flow is initialized
|
332
|
+
this.flowStateService
|
333
|
+
.isInitialized$()
|
334
|
+
.pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
335
|
+
.subscribe();
|
336
|
+
}
|
337
|
+
ngOnDestroy() {
|
338
|
+
this.destroy$.next();
|
339
|
+
this.destroy$.complete();
|
340
|
+
}
|
341
|
+
initialize() {
|
342
|
+
var _a, _b, _c;
|
343
|
+
this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.flowHeader) !== null && _c !== void 0 ? _c : '';
|
344
|
+
this.generateUIDefinition$()
|
345
|
+
.pipe(tap(uiDef => {
|
346
|
+
if (!uiDef) {
|
347
|
+
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
348
|
+
}
|
349
|
+
this.uiDefinition$.next(uiDef);
|
350
|
+
}), catchError(err => {
|
351
|
+
var _a;
|
352
|
+
const message = 'Failed to resolve Flow Header component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
353
|
+
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
354
|
+
return of();
|
355
|
+
}), takeUntil(this.destroy$))
|
356
|
+
.subscribe();
|
357
|
+
}
|
358
|
+
getLocalMeta$() {
|
359
|
+
var _a, _b;
|
360
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
|
361
|
+
return of(undefined);
|
362
|
+
}
|
363
|
+
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
364
|
+
if (!components) {
|
365
|
+
return;
|
366
|
+
}
|
367
|
+
return components.map(component => ({
|
368
|
+
html: component.html,
|
369
|
+
css: component.css,
|
370
|
+
js: component.js,
|
371
|
+
json: component.json,
|
372
|
+
}));
|
373
|
+
}));
|
96
374
|
}
|
97
|
-
|
98
|
-
const
|
99
|
-
|
100
|
-
|
101
|
-
|
375
|
+
getOrgMeta$() {
|
376
|
+
const template = this.flowInfo.templates.FLOW_HEADER;
|
377
|
+
if (!template) {
|
378
|
+
return of(undefined);
|
379
|
+
}
|
380
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
102
381
|
}
|
103
|
-
|
104
|
-
return
|
382
|
+
generateUIDefinition$() {
|
383
|
+
return of(undefined).pipe(tap(() => {
|
384
|
+
if (!this.templateApiName) {
|
385
|
+
throw new Error("Flow 'flowHeader' template is not defined.");
|
386
|
+
}
|
387
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
388
|
+
if (!metaList) {
|
389
|
+
return;
|
390
|
+
}
|
391
|
+
const uiDef = {
|
392
|
+
name: '',
|
393
|
+
createdTimestamp: 0,
|
394
|
+
primary: true,
|
395
|
+
type: 'DEFAULT',
|
396
|
+
version: 2,
|
397
|
+
children: metaList.map(meta => ({
|
398
|
+
children: [],
|
399
|
+
template: meta.html && btoaSafe(meta.html),
|
400
|
+
script: meta.js && btoaSafe(meta.js),
|
401
|
+
styles: meta.css && btoaSafe(meta.css),
|
402
|
+
})),
|
403
|
+
};
|
404
|
+
return uiDef;
|
405
|
+
}));
|
105
406
|
}
|
106
407
|
}
|
408
|
+
FlowHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i2.FlowStateService }, { token: i2.FlowInfoService }, { token: i2$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
409
|
+
FlowHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowHeaderComponent, selector: "vl-flow-new-header", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
411
|
+
type: Component,
|
412
|
+
args: [{ selector: 'vl-flow-new-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
413
|
+
}], ctorParameters: function () {
|
414
|
+
return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
415
|
+
type: Optional
|
416
|
+
}, {
|
417
|
+
type: Inject,
|
418
|
+
args: [FLOW_CUSTOMIZATION]
|
419
|
+
}] }];
|
420
|
+
} });
|
421
|
+
|
422
|
+
class FlowNewHeaderModule {
|
423
|
+
}
|
424
|
+
FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
425
|
+
FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
|
426
|
+
FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
|
427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
|
428
|
+
type: NgModule,
|
429
|
+
args: [{
|
430
|
+
declarations: [FlowHeaderComponent],
|
431
|
+
imports: [CommonModule, PreviewModule],
|
432
|
+
exports: [FlowHeaderComponent],
|
433
|
+
}]
|
434
|
+
}] });
|
107
435
|
|
108
436
|
class FlowRouterService {
|
109
|
-
constructor(router, route, contextService, integrationState) {
|
437
|
+
constructor(router, route, contextService, integrationState, flowInfoService, flowStateService) {
|
110
438
|
this.router = router;
|
111
439
|
this.route = route;
|
112
440
|
this.contextService = contextService;
|
113
441
|
this.integrationState = integrationState;
|
442
|
+
this.flowInfoService = flowInfoService;
|
443
|
+
this.flowStateService = flowStateService;
|
114
444
|
this.urlHistory = [];
|
115
445
|
this.getLastChildRoute = (route) => {
|
116
446
|
return route.firstChild ? this.getLastChildRoute(route.firstChild) : route;
|
@@ -184,6 +514,9 @@ class FlowRouterService {
|
|
184
514
|
get params$() {
|
185
515
|
return this.lastChildParams$;
|
186
516
|
}
|
517
|
+
get params() {
|
518
|
+
return this.getLastChildParams(this.route.snapshot);
|
519
|
+
}
|
187
520
|
isConfigurationRoute$() {
|
188
521
|
return this.getFlowSubpath$().pipe(map(url => url.startsWith('product')));
|
189
522
|
}
|
@@ -217,12 +550,27 @@ class FlowRouterService {
|
|
217
550
|
}
|
218
551
|
}
|
219
552
|
navigateToProductConfiguration(productId, lineItemId) {
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
}
|
553
|
+
let updateContext$;
|
554
|
+
if (this.flowInfoService.isLegacy) {
|
555
|
+
updateContext$ = of(undefined).pipe(tap(() => {
|
556
|
+
this.contextService.update({ properties: { productId, lineItemId: lineItemId !== null && lineItemId !== void 0 ? lineItemId : '' } });
|
557
|
+
}));
|
558
|
+
}
|
559
|
+
else {
|
560
|
+
updateContext$ = this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_CONTEXT_PROPERTIES', {
|
561
|
+
productId,
|
562
|
+
lineItemId: lineItemId !== null && lineItemId !== void 0 ? lineItemId : '',
|
563
|
+
});
|
564
|
+
}
|
565
|
+
updateContext$
|
566
|
+
.pipe(tap(() => {
|
567
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
568
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
569
|
+
this.router.navigate([flowRouteUrl, 'product'], {
|
570
|
+
queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), { productId }),
|
571
|
+
});
|
572
|
+
}))
|
573
|
+
.subscribe();
|
226
574
|
}
|
227
575
|
navigateToShoppingCart() {
|
228
576
|
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
@@ -237,7 +585,15 @@ class FlowRouterService {
|
|
237
585
|
navigateToAssets() {
|
238
586
|
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
239
587
|
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
240
|
-
this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
|
588
|
+
this.router.navigate([flowRouteUrl, 'assets'], { queryParams: routeSnapshot.queryParams });
|
589
|
+
}
|
590
|
+
showErrorPage$(message, details) {
|
591
|
+
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
592
|
+
const flowRouteUrl = this.getFlowRootPath(routeSnapshot);
|
593
|
+
return from(this.router.navigate([flowRouteUrl, '404'], {
|
594
|
+
state: Object.assign({ message, type: 'error' }, (details && { details })),
|
595
|
+
replaceUrl: true,
|
596
|
+
})).pipe(map(() => false));
|
241
597
|
}
|
242
598
|
switchObject(id) {
|
243
599
|
const routeSnapshot = this.getLastChildRouteSnapshot(this.route.snapshot);
|
@@ -251,17 +607,18 @@ class FlowRouterService {
|
|
251
607
|
this.router.navigate([], { relativeTo: route, queryParams: Object.assign(Object.assign({}, routeSnapshot.queryParams), queryParams) });
|
252
608
|
}
|
253
609
|
}
|
254
|
-
FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$
|
610
|
+
FlowRouterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2.ContextService }, { token: i2.IntegrationState }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
255
611
|
FlowRouterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, providedIn: 'root' });
|
256
612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRouterService, decorators: [{
|
257
613
|
type: Injectable,
|
258
614
|
args: [{ providedIn: 'root' }]
|
259
|
-
}], ctorParameters: function () { return [{ type: i1$
|
615
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.IntegrationState }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
|
260
616
|
|
261
617
|
class FlowDialogService {
|
262
|
-
constructor(dialogService, contextService) {
|
618
|
+
constructor(dialogService, contextService, runtimeSettings) {
|
263
619
|
this.dialogService = dialogService;
|
264
620
|
this.contextService = contextService;
|
621
|
+
this.runtimeSettings = runtimeSettings;
|
265
622
|
}
|
266
623
|
show(config) {
|
267
624
|
return this.dialogService.open(FlowDialogComponent, {
|
@@ -282,8 +639,9 @@ class FlowDialogService {
|
|
282
639
|
});
|
283
640
|
}
|
284
641
|
showReadonlyModeDialog() {
|
642
|
+
var _a;
|
285
643
|
const ctx = this.contextService.resolve();
|
286
|
-
const objectName = ctx.mode ? ctx.mode[0].toUpperCase() + ctx.mode.substring(1).toLowerCase() : 'Object';
|
644
|
+
const objectName = ctx.mode ? ((_a = ctx.mode[0]) === null || _a === void 0 ? void 0 : _a.toUpperCase()) + ctx.mode.substring(1).toLowerCase() : 'Object';
|
287
645
|
return this.show({
|
288
646
|
title: 'Error',
|
289
647
|
description: `${objectName} Cannot be Saved`,
|
@@ -370,51 +728,55 @@ class FlowDialogService {
|
|
370
728
|
secondaryButton: 'Cancel',
|
371
729
|
});
|
372
730
|
}
|
731
|
+
showTermsLimitReachedDialog() {
|
732
|
+
const shoppingCartSettings = mapShoppingCartSettings(this.runtimeSettings.getShoppingCartSettings() || []);
|
733
|
+
const maxRenewalTerms = getMaxRenewalTermsValue(shoppingCartSettings);
|
734
|
+
return this.show({
|
735
|
+
title: 'Terms Limit Reached',
|
736
|
+
description: `You have reached the term quantity limit: ${maxRenewalTerms}. You can increase the limit in the Shopping Cart Settings.`,
|
737
|
+
primaryButton: 'Ok',
|
738
|
+
});
|
739
|
+
}
|
373
740
|
showDialog(dialog) {
|
374
741
|
const dialogFunction = this[dialog].bind(this);
|
375
742
|
return dialogFunction(dialog);
|
376
743
|
}
|
377
744
|
}
|
378
|
-
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token:
|
745
|
+
FlowDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, deps: [{ token: i1.DialogService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
379
746
|
FlowDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService });
|
380
747
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDialogService, decorators: [{
|
381
748
|
type: Injectable
|
382
|
-
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type:
|
749
|
+
}], ctorParameters: function () { return [{ type: i1.DialogService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
|
383
750
|
|
384
751
|
class FlowService {
|
385
|
-
|
386
|
-
return this.flowSubj$.value;
|
387
|
-
}
|
388
|
-
constructor(integrationState, flowRouterService, quoteDraftService, configurationService, flowConfigurationService, flowsApiService, flowDialogService) {
|
752
|
+
constructor(integrationState, flowRouterService, quoteDraftService, configurationService, configurationStateService, flowDialogService, flowConfigurationService, flowInfoService, flowStateService) {
|
389
753
|
this.integrationState = integrationState;
|
390
754
|
this.flowRouterService = flowRouterService;
|
391
755
|
this.quoteDraftService = quoteDraftService;
|
392
756
|
this.configurationService = configurationService;
|
393
|
-
this.
|
394
|
-
this.flowsApiService = flowsApiService;
|
757
|
+
this.configurationStateService = configurationStateService;
|
395
758
|
this.flowDialogService = flowDialogService;
|
396
|
-
this.
|
397
|
-
this.
|
759
|
+
this.flowConfigurationService = flowConfigurationService;
|
760
|
+
this.flowInfoService = flowInfoService;
|
761
|
+
this.flowStateService = flowStateService;
|
398
762
|
this.cleanup$ = new Subject();
|
399
763
|
}
|
400
764
|
cleanup() {
|
401
765
|
this.cleanup$.next();
|
402
|
-
this.flowSubj$.next(null);
|
403
|
-
}
|
404
|
-
setFlow(flow) {
|
405
|
-
this.flowSubj$.next(flow !== null && flow !== void 0 ? flow : null);
|
406
|
-
}
|
407
|
-
setFlowById$(flowId) {
|
408
|
-
return this.flowsApiService.getFlow(flowId).pipe(tap(flow => this.flowSubj$.next(flow !== null && flow !== void 0 ? flow : null)), map(flow => Boolean(flow)));
|
409
766
|
}
|
410
767
|
initSubscriptions() {
|
411
768
|
this.integrationState
|
412
769
|
.listen$(FlowAction.FLOW_CONFIGURE_PRODUCT)
|
413
|
-
.pipe(
|
770
|
+
.pipe(switchMap(payload => {
|
414
771
|
var _a, _b;
|
415
|
-
|
416
|
-
|
417
|
-
|
772
|
+
if (this.flowInfoService.isLegacy) {
|
773
|
+
const productId = (_a = payload.productId) !== null && _a !== void 0 ? _a : (_b = this.quoteDraftService.currentState.find(li => li.id === payload.lineItemId)) === null || _b === void 0 ? void 0 : _b.productId;
|
774
|
+
return of(Object.assign(Object.assign({}, payload), { productId }));
|
775
|
+
}
|
776
|
+
return this.prepareConfiguration$(payload.lineItemId).pipe(map(() => payload));
|
777
|
+
}), tap(payload => {
|
778
|
+
if (payload.productId) {
|
779
|
+
this.flowRouterService.navigateToProductConfiguration(payload.productId, payload.lineItemId);
|
418
780
|
}
|
419
781
|
else {
|
420
782
|
console.warn("Parameter 'productId' is needed to start configuration");
|
@@ -429,450 +791,93 @@ class FlowService {
|
|
429
791
|
.subscribe();
|
430
792
|
this.integrationState
|
431
793
|
.listen$(FlowAction.FLOW_NAVIGATE_BACK)
|
432
|
-
.pipe(tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
|
794
|
+
.pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), tap(() => this.flowRouterService.navigateBack()), takeUntil(this.cleanup$))
|
433
795
|
.subscribe();
|
434
796
|
this.integrationState
|
435
797
|
.listen$(FlowAction.FLOW_NAVIGATE_TO)
|
436
|
-
.pipe(
|
437
|
-
.
|
438
|
-
|
439
|
-
.listen$(FlowAction.OPEN_DIALOG)
|
440
|
-
.pipe(switchMap(payload => this.flowDialogService.showDialog(payload.dialog).pipe(take(1))), takeUntil(this.cleanup$))
|
441
|
-
.subscribe(dialogResult => {
|
442
|
-
this.integrationState.patchState({ dialogResult });
|
443
|
-
});
|
444
|
-
this.integrationState
|
445
|
-
.listen$(FlowAction.FLOW_NAVIGATE_TO_CATALOG)
|
446
|
-
.pipe(tap(() => this.flowRouterService.navigateToCatalog()), takeUntil(this.cleanup$))
|
447
|
-
.subscribe();
|
448
|
-
this.integrationState
|
449
|
-
.listen$(FlowAction.FLOW_NAVIGATE_TO_SHOPPING_CART)
|
450
|
-
.pipe(tap(() => this.flowRouterService.navigateToShoppingCart()), takeUntil(this.cleanup$))
|
451
|
-
.subscribe();
|
452
|
-
this.integrationState
|
453
|
-
.listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
|
454
|
-
.pipe(switchMap(() => {
|
455
|
-
const quoteDraft = this.quoteDraftService.quoteDraft;
|
456
|
-
const lineItem = this.configurationService.getSnapshot();
|
457
|
-
if (!quoteDraft || !lineItem) {
|
458
|
-
return of(undefined);
|
459
|
-
}
|
460
|
-
const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
|
461
|
-
const assetId = lineItem.assetId || lineItem.openOrderLineItemId;
|
462
|
-
let updatedState;
|
463
|
-
if (isNewLineItem) {
|
464
|
-
updatedState = [...quoteDraft.currentState, lineItem];
|
798
|
+
.pipe(switchMap(payload => this.configurationStateService.cancelConfiguration().pipe(map(() => payload))), tap(payload => {
|
799
|
+
if (payload.path === 'product') {
|
800
|
+
this.integrationState.dispatch(FlowAction.ConfigureProductAction(payload));
|
465
801
|
}
|
466
802
|
else {
|
467
|
-
|
468
|
-
}
|
469
|
-
|
470
|
-
var _a;
|
471
|
-
if (assetId) {
|
472
|
-
const modifiedAssets = (_a = this.integrationState.state.modifiedAssets) !== null && _a !== void 0 ? _a : {};
|
473
|
-
this.integrationState.patchState({
|
474
|
-
modifiedAssets: Object.assign(Object.assign({}, modifiedAssets), { [assetId]: true }),
|
475
|
-
});
|
476
|
-
}
|
477
|
-
}));
|
478
|
-
}), tap(() => {
|
479
|
-
this.configurationService.hasUnsavedChanges = false;
|
480
|
-
this.flowRouterService.navigateToShoppingCart();
|
481
|
-
}), takeUntil(this.cleanup$))
|
482
|
-
.subscribe();
|
483
|
-
this.updateFlowPath();
|
484
|
-
}
|
485
|
-
updateFlowPath() {
|
486
|
-
this.flowRouterService
|
487
|
-
.getFlowSubpath$()
|
488
|
-
.pipe(map(path => { var _a; return (_a = path.split('/')) === null || _a === void 0 ? void 0 : _a[0]; }), takeUntil(this.cleanup$))
|
489
|
-
.subscribe(flowPath => this.integrationState.patchState({ flowPath }));
|
490
|
-
}
|
491
|
-
}
|
492
|
-
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i1$3.IntegrationState }, { token: FlowRouterService }, { token: i1$2.QuoteDraftService }, { token: i1$2.ConfigurationService }, { token: i1$2.FlowConfigurationService }, { token: i1$4.FlowsApiService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
493
|
-
FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
|
494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
|
495
|
-
type: Injectable
|
496
|
-
}], ctorParameters: function () { return [{ type: i1$3.IntegrationState }, { type: FlowRouterService }, { type: i1$2.QuoteDraftService }, { type: i1$2.ConfigurationService }, { type: i1$2.FlowConfigurationService }, { type: i1$4.FlowsApiService }, { type: FlowDialogService }]; } });
|
497
|
-
|
498
|
-
class DocGenComponent {
|
499
|
-
constructor(quoteDraftService, contextService, templatesApi, toastService, flowService, customizationService) {
|
500
|
-
this.quoteDraftService = quoteDraftService;
|
501
|
-
this.contextService = contextService;
|
502
|
-
this.templatesApi = templatesApi;
|
503
|
-
this.toastService = toastService;
|
504
|
-
this.flowService = flowService;
|
505
|
-
this.customizationService = customizationService;
|
506
|
-
this.uiDefinition$ = new BehaviorSubject(null);
|
507
|
-
this.templateApiName = '';
|
508
|
-
this.destroy$ = new Subject();
|
509
|
-
// initialize when quote draft requested
|
510
|
-
this.quoteDraftService.quoteDraft$
|
511
|
-
.pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
512
|
-
.subscribe();
|
513
|
-
}
|
514
|
-
ngOnDestroy() {
|
515
|
-
this.destroy$.next();
|
516
|
-
this.destroy$.complete();
|
517
|
-
}
|
518
|
-
initialize() {
|
519
|
-
var _a, _b;
|
520
|
-
this.templateApiName = (_b = (_a = this.flowService.flow) === null || _a === void 0 ? void 0 : _a.properties.templates.docGen) !== null && _b !== void 0 ? _b : '';
|
521
|
-
this.generateUIDefinition$()
|
522
|
-
.pipe(tap(uiDef => {
|
523
|
-
if (!uiDef) {
|
524
|
-
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
525
|
-
}
|
526
|
-
this.uiDefinition$.next(uiDef);
|
527
|
-
}), catchError(err => {
|
528
|
-
var _a;
|
529
|
-
const message = 'Failed to resolve DocGen component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
530
|
-
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
531
|
-
return of();
|
532
|
-
}), takeUntil(this.destroy$))
|
533
|
-
.subscribe();
|
534
|
-
}
|
535
|
-
getTemplateRootComponent$(template) {
|
536
|
-
return this.templatesApi.fetchComponents$(template.id);
|
537
|
-
}
|
538
|
-
getLocalTemplateComponentMeta$() {
|
539
|
-
var _a, _b;
|
540
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponent)) {
|
541
|
-
return of(undefined);
|
542
|
-
}
|
543
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponent(this.templateApiName).pipe(map(components => {
|
544
|
-
if (!components) {
|
545
|
-
return;
|
546
|
-
}
|
547
|
-
return components.map(component => ({
|
548
|
-
html: component.html,
|
549
|
-
css: component.css,
|
550
|
-
js: component.js,
|
551
|
-
json: component.json,
|
552
|
-
}));
|
553
|
-
}));
|
554
|
-
}
|
555
|
-
getDocGenComponentMeta$() {
|
556
|
-
return this.templatesApi.fetchTemplates$().pipe(map(templates => {
|
557
|
-
const template = templates.find(template => template.type === UITemplateType.DOCGEN && template.name === this.templateApiName);
|
558
|
-
return template !== null && template !== void 0 ? template : templates[0];
|
559
|
-
}), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(components => components
|
560
|
-
? forkJoin([
|
561
|
-
...components.map(component => {
|
562
|
-
return this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component);
|
563
|
-
}),
|
564
|
-
])
|
565
|
-
: of(undefined)));
|
566
|
-
}
|
567
|
-
generateUIDefinition$() {
|
568
|
-
return of(undefined).pipe(tap(() => {
|
569
|
-
if (!this.templateApiName) {
|
570
|
-
throw new Error("Flow Query parameter 'docGenTemplateApiName' is missing.");
|
571
|
-
}
|
572
|
-
}), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(children => (children ? of(children) : this.getDocGenComponentMeta$())), map(children => {
|
573
|
-
var _a, _b;
|
574
|
-
if (!children) {
|
575
|
-
return;
|
576
|
-
}
|
577
|
-
const meta = (_a = children === null || children === void 0 ? void 0 : children[0]) !== null && _a !== void 0 ? _a : children;
|
578
|
-
const headerId = (_b = this.contextService.resolve().properties.Id) !== null && _b !== void 0 ? _b : null;
|
579
|
-
let script = meta.js;
|
580
|
-
if (script) {
|
581
|
-
const metadata = extractElementMetadata(script);
|
582
|
-
script = extendElementMetadata(script, {
|
583
|
-
inputs: Object.assign(Object.assign({}, metadata.inputs), { Id: headerId ? `"${headerId}"` : null }),
|
584
|
-
});
|
585
|
-
}
|
586
|
-
const uiDef = {
|
587
|
-
name: '',
|
588
|
-
createdTimestamp: 0,
|
589
|
-
primary: true,
|
590
|
-
type: 'DEFAULT',
|
591
|
-
version: 2,
|
592
|
-
children: children.map(child => ({
|
593
|
-
children: [],
|
594
|
-
template: child.html && btoaSafe(child.html),
|
595
|
-
script: child.js && btoaSafe(child.js),
|
596
|
-
styles: child.css && btoaSafe(child.css),
|
597
|
-
})),
|
598
|
-
};
|
599
|
-
return uiDef;
|
600
|
-
}));
|
601
|
-
}
|
602
|
-
}
|
603
|
-
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$2.QuoteDraftService }, { token: i1$2.ContextService }, { token: i1$4.UITemplatesApiService }, { token: i2.ToastService }, { token: FlowService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
604
|
-
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
|
606
|
-
type: Component,
|
607
|
-
args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
608
|
-
}], ctorParameters: function () {
|
609
|
-
return [{ type: i1$2.QuoteDraftService }, { type: i1$2.ContextService }, { type: i1$4.UITemplatesApiService }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
|
610
|
-
type: Optional
|
611
|
-
}, {
|
612
|
-
type: Inject,
|
613
|
-
args: [FLOW_CUSTOMIZATION]
|
614
|
-
}] }];
|
615
|
-
} });
|
616
|
-
|
617
|
-
class DocGenModule {
|
618
|
-
}
|
619
|
-
DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
620
|
-
DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
|
621
|
-
DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
|
622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, decorators: [{
|
623
|
-
type: NgModule,
|
624
|
-
args: [{
|
625
|
-
declarations: [DocGenComponent],
|
626
|
-
imports: [CommonModule, PreviewModule],
|
627
|
-
exports: [DocGenComponent],
|
628
|
-
}]
|
629
|
-
}] });
|
630
|
-
|
631
|
-
class GuidedSellingComponent {
|
632
|
-
constructor(quoteDraftService, templatesApi, toastService, flowService, customizationService) {
|
633
|
-
this.quoteDraftService = quoteDraftService;
|
634
|
-
this.templatesApi = templatesApi;
|
635
|
-
this.toastService = toastService;
|
636
|
-
this.flowService = flowService;
|
637
|
-
this.customizationService = customizationService;
|
638
|
-
this.uiDefinition$ = new BehaviorSubject(null);
|
639
|
-
this.templateApiName = '';
|
640
|
-
this.destroy$ = new Subject();
|
641
|
-
// initialize when quote draft requested
|
642
|
-
this.quoteDraftService.quoteDraft$
|
643
|
-
.pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
644
|
-
.subscribe();
|
645
|
-
}
|
646
|
-
ngOnDestroy() {
|
647
|
-
this.destroy$.next();
|
648
|
-
this.destroy$.complete();
|
649
|
-
}
|
650
|
-
initialize() {
|
651
|
-
var _a, _b;
|
652
|
-
this.templateApiName = (_b = (_a = this.flowService.flow) === null || _a === void 0 ? void 0 : _a.properties.templates.guidedSelling) !== null && _b !== void 0 ? _b : '';
|
653
|
-
this.generateUIDefinition$()
|
654
|
-
.pipe(tap(uiDef => {
|
655
|
-
if (!uiDef) {
|
656
|
-
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
657
|
-
}
|
658
|
-
this.uiDefinition$.next(uiDef);
|
659
|
-
}), catchError(err => {
|
660
|
-
var _a;
|
661
|
-
const message = 'Failed to resolve Guided Selling component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
662
|
-
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
663
|
-
return of();
|
664
|
-
}), takeUntil(this.destroy$))
|
665
|
-
.subscribe();
|
666
|
-
}
|
667
|
-
getTemplateRootComponent$(template) {
|
668
|
-
return this.templatesApi.fetchComponents$(template.id);
|
669
|
-
}
|
670
|
-
getLocalTemplateComponentMeta$() {
|
671
|
-
var _a, _b;
|
672
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponent)) {
|
673
|
-
return of(undefined);
|
674
|
-
}
|
675
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponent(this.templateApiName).pipe(map(components => {
|
676
|
-
if (!components) {
|
677
|
-
return;
|
678
|
-
}
|
679
|
-
return components.map(component => ({
|
680
|
-
html: component.html,
|
681
|
-
css: component.css,
|
682
|
-
js: component.js,
|
683
|
-
json: component.json,
|
684
|
-
}));
|
685
|
-
}));
|
686
|
-
}
|
687
|
-
getGuidedSellingComponentMeta$() {
|
688
|
-
return this.templatesApi.fetchTemplates$().pipe(map(templates => {
|
689
|
-
const template = templates.find(template => template.type === UITemplateType.GUIDED_SELLING && template.name === this.templateApiName);
|
690
|
-
return template !== null && template !== void 0 ? template : templates[0];
|
691
|
-
}), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(components => components
|
692
|
-
? forkJoin([
|
693
|
-
...components.map(component => {
|
694
|
-
return this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component);
|
695
|
-
}),
|
696
|
-
])
|
697
|
-
: of(undefined)));
|
698
|
-
}
|
699
|
-
generateUIDefinition$() {
|
700
|
-
return of(undefined).pipe(tap(() => {
|
701
|
-
if (!this.templateApiName) {
|
702
|
-
throw new Error("Flow Query parameter 'guidedSellingTemplateApiName' is missing.");
|
703
|
-
}
|
704
|
-
}), switchMap(() => this.getLocalTemplateComponentMeta$()), switchMap(children => (children ? of(children) : this.getGuidedSellingComponentMeta$())), map(children => {
|
705
|
-
if (!children) {
|
706
|
-
return;
|
707
|
-
}
|
708
|
-
const uiDef = {
|
709
|
-
name: '',
|
710
|
-
createdTimestamp: 0,
|
711
|
-
primary: true,
|
712
|
-
type: 'DEFAULT',
|
713
|
-
version: 2,
|
714
|
-
children: children.map(child => ({
|
715
|
-
children: [],
|
716
|
-
template: child.html && btoaSafe(child.html),
|
717
|
-
script: child.js && btoaSafe(child.js),
|
718
|
-
styles: child.css && btoaSafe(child.css),
|
719
|
-
})),
|
720
|
-
};
|
721
|
-
return uiDef;
|
722
|
-
}));
|
723
|
-
}
|
724
|
-
}
|
725
|
-
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$2.QuoteDraftService }, { token: i1$4.UITemplatesApiService }, { token: i2.ToastService }, { token: FlowService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
726
|
-
GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: GuidedSellingComponent, selector: "vl-flow-guided-selling", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
727
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingComponent, decorators: [{
|
728
|
-
type: Component,
|
729
|
-
args: [{ selector: 'vl-flow-guided-selling', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
730
|
-
}], ctorParameters: function () {
|
731
|
-
return [{ type: i1$2.QuoteDraftService }, { type: i1$4.UITemplatesApiService }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
|
732
|
-
type: Optional
|
733
|
-
}, {
|
734
|
-
type: Inject,
|
735
|
-
args: [FLOW_CUSTOMIZATION]
|
736
|
-
}] }];
|
737
|
-
} });
|
738
|
-
|
739
|
-
class GuidedSellingModule {
|
740
|
-
}
|
741
|
-
GuidedSellingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
742
|
-
GuidedSellingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, declarations: [GuidedSellingComponent], imports: [CommonModule, PreviewModule], exports: [GuidedSellingComponent] });
|
743
|
-
GuidedSellingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, imports: [CommonModule, PreviewModule] });
|
744
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: GuidedSellingModule, decorators: [{
|
745
|
-
type: NgModule,
|
746
|
-
args: [{
|
747
|
-
declarations: [GuidedSellingComponent],
|
748
|
-
imports: [CommonModule, PreviewModule],
|
749
|
-
exports: [GuidedSellingComponent],
|
750
|
-
}]
|
751
|
-
}] });
|
752
|
-
|
753
|
-
class FlowHeaderComponent {
|
754
|
-
constructor(quoteDraftService, templatesApi, toastService, flowService, customizationService) {
|
755
|
-
this.quoteDraftService = quoteDraftService;
|
756
|
-
this.templatesApi = templatesApi;
|
757
|
-
this.toastService = toastService;
|
758
|
-
this.flowService = flowService;
|
759
|
-
this.customizationService = customizationService;
|
760
|
-
this.uiDefinition$ = new BehaviorSubject(null);
|
761
|
-
this.templateApiName = '';
|
762
|
-
this.destroy$ = new Subject();
|
763
|
-
// initialize when quote draft requested
|
764
|
-
this.quoteDraftService.quoteDraft$
|
765
|
-
.pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
803
|
+
this.flowRouterService.navigateTo(payload.path, payload.productId, payload.lineItemId);
|
804
|
+
}
|
805
|
+
}), takeUntil(this.cleanup$))
|
766
806
|
.subscribe();
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
.
|
777
|
-
|
778
|
-
|
807
|
+
this.integrationState
|
808
|
+
.listen$(FlowAction.OPEN_DIALOG)
|
809
|
+
.pipe(switchMap(payload => this.flowDialogService.showDialog(payload.dialog).pipe(take(1))), takeUntil(this.cleanup$))
|
810
|
+
.subscribe(dialogResult => {
|
811
|
+
this.integrationState.patchState({ dialogResult });
|
812
|
+
});
|
813
|
+
this.integrationState
|
814
|
+
.listen$(FlowAction.FLOW_NAVIGATE_TO_CATALOG)
|
815
|
+
.pipe(tap(() => this.flowRouterService.navigateToCatalog()), takeUntil(this.cleanup$))
|
816
|
+
.subscribe();
|
817
|
+
this.integrationState
|
818
|
+
.listen$(FlowAction.FLOW_NAVIGATE_TO_SHOPPING_CART)
|
819
|
+
.pipe(tap(() => this.flowRouterService.navigateToShoppingCart()), takeUntil(this.cleanup$))
|
820
|
+
.subscribe();
|
821
|
+
this.integrationState
|
822
|
+
.listen$(FlowAction.FLOW_APPLY_PRODUCT_CONFIGURATION)
|
823
|
+
.pipe(switchMap(() => {
|
824
|
+
if (this.flowInfoService.isLegacy) {
|
825
|
+
return this.legacyApplyConfiguration();
|
779
826
|
}
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
}),
|
827
|
+
else {
|
828
|
+
return this.configurationStateService.saveConfiguration('', true).pipe(switchMap(() => this.configurationStateService.cancelConfiguration()), switchMap(() => this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'MODIFY_ASSETS', {
|
829
|
+
addConfiguringAssetId: true,
|
830
|
+
enable: true,
|
831
|
+
})));
|
832
|
+
}
|
833
|
+
}), tap(() => {
|
834
|
+
this.configurationService.hasUnsavedChanges = false;
|
835
|
+
this.flowRouterService.navigateToShoppingCart();
|
836
|
+
}), takeUntil(this.cleanup$))
|
787
837
|
.subscribe();
|
838
|
+
this.updateFlowParams();
|
788
839
|
}
|
789
|
-
|
790
|
-
|
840
|
+
updateFlowParams() {
|
841
|
+
this.flowRouterService
|
842
|
+
.getFlowSubpath$()
|
843
|
+
.pipe(map(path => { var _a; return (_a = path.split('/')) === null || _a === void 0 ? void 0 : _a[0]; }), takeUntil(this.cleanup$))
|
844
|
+
.subscribe(flowPath => this.integrationState.patchState({ flowPath }));
|
845
|
+
this.flowRouterService.route$
|
846
|
+
.pipe(map(path => path.queryParams['productId']), takeUntil(this.cleanup$))
|
847
|
+
.subscribe(productId => this.integrationState.patchState({ productId }));
|
791
848
|
}
|
792
|
-
|
793
|
-
|
794
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponent)) {
|
849
|
+
prepareConfiguration$(lineItemId) {
|
850
|
+
if (!lineItemId) {
|
795
851
|
return of(undefined);
|
796
852
|
}
|
797
|
-
return
|
798
|
-
|
799
|
-
|
800
|
-
}
|
801
|
-
return components.map(component => ({
|
802
|
-
html: component.html,
|
803
|
-
css: component.css,
|
804
|
-
js: component.js,
|
805
|
-
json: component.json,
|
806
|
-
}));
|
807
|
-
}));
|
808
|
-
}
|
809
|
-
getFlowHeaderComponentMeta$() {
|
810
|
-
return this.templatesApi.fetchTemplates$().pipe(map(templates => {
|
811
|
-
const template = templates.find(template => template.type === UITemplateType.FLOW_HEADER && template.name === this.templateApiName);
|
812
|
-
return template !== null && template !== void 0 ? template : templates[0];
|
813
|
-
}), switchMap(template => (template ? this.getTemplateRootComponent$(template) : of(undefined))), switchMap(components => components
|
814
|
-
? forkJoin([
|
815
|
-
...components.map(component => {
|
816
|
-
return this.templatesApi.fetchComponentAttachments$(component.uiTemplateId, component);
|
817
|
-
}),
|
818
|
-
])
|
819
|
-
: of(undefined)));
|
853
|
+
return this.flowStateService.dispatch$(UITemplateType.FLOW_ENGINE, 'UPDATE_PRICE_LIST', {
|
854
|
+
lineItemId,
|
855
|
+
});
|
820
856
|
}
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
}
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
children: children.map(child => ({
|
837
|
-
children: [],
|
838
|
-
template: child.html && btoaSafe(child.html),
|
839
|
-
script: child.js && btoaSafe(child.js),
|
840
|
-
styles: child.css && btoaSafe(child.css),
|
841
|
-
})),
|
842
|
-
};
|
843
|
-
return uiDef;
|
844
|
-
}));
|
857
|
+
legacyApplyConfiguration() {
|
858
|
+
const quoteDraft = this.quoteDraftService.quoteDraft;
|
859
|
+
const lineItem = this.configurationService.getSnapshot();
|
860
|
+
if (!quoteDraft || !lineItem) {
|
861
|
+
return of(undefined);
|
862
|
+
}
|
863
|
+
const isNewLineItem = quoteDraft.currentState.every(li => li.id !== lineItem.id);
|
864
|
+
let updatedState;
|
865
|
+
if (isNewLineItem) {
|
866
|
+
updatedState = [...quoteDraft.currentState, lineItem];
|
867
|
+
}
|
868
|
+
else {
|
869
|
+
updatedState = quoteDraft.currentState.map(li => (li.id === lineItem.id ? lineItem : li));
|
870
|
+
}
|
871
|
+
return this.flowConfigurationService.calculate$(Object.assign(Object.assign({}, quoteDraft), { currentState: updatedState }));
|
845
872
|
}
|
846
873
|
}
|
847
|
-
|
848
|
-
|
849
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
850
|
-
type:
|
851
|
-
|
852
|
-
}], ctorParameters: function () {
|
853
|
-
return [{ type: i1$2.QuoteDraftService }, { type: i1$4.UITemplatesApiService }, { type: i2.ToastService }, { type: FlowService }, { type: undefined, decorators: [{
|
854
|
-
type: Optional
|
855
|
-
}, {
|
856
|
-
type: Inject,
|
857
|
-
args: [FLOW_CUSTOMIZATION]
|
858
|
-
}] }];
|
859
|
-
} });
|
860
|
-
|
861
|
-
class FlowNewHeaderModule {
|
862
|
-
}
|
863
|
-
FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
864
|
-
FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
|
865
|
-
FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
|
866
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
|
867
|
-
type: NgModule,
|
868
|
-
args: [{
|
869
|
-
declarations: [FlowHeaderComponent],
|
870
|
-
imports: [CommonModule, PreviewModule],
|
871
|
-
exports: [FlowHeaderComponent],
|
872
|
-
}]
|
873
|
-
}] });
|
874
|
+
FlowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, deps: [{ token: i5.IntegrationState }, { token: FlowRouterService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: FlowDialogService }, { token: i2.FlowConfigurationService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
875
|
+
FlowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService });
|
876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowService, decorators: [{
|
877
|
+
type: Injectable
|
878
|
+
}], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: FlowDialogService }, { type: i2.FlowConfigurationService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
|
874
879
|
|
875
|
-
class
|
880
|
+
class FlowGuidedSellingService {
|
876
881
|
constructor(integrationState) {
|
877
882
|
this.integrationState = integrationState;
|
878
883
|
this.cleanup$ = new Subject();
|
@@ -885,53 +890,40 @@ class FlowDocGenService {
|
|
885
890
|
}
|
886
891
|
initSubscriptions() {
|
887
892
|
this.integrationState
|
888
|
-
.listen$(FlowAction.
|
893
|
+
.listen$(FlowAction.OPEN_GUIDED_SELLING)
|
889
894
|
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
890
895
|
.subscribe();
|
891
896
|
this.integrationState
|
892
|
-
.listen$(FlowAction.
|
897
|
+
.listen$(FlowAction.CLOSE_GUIDED_SELLING)
|
893
898
|
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
894
899
|
.subscribe();
|
895
900
|
}
|
896
901
|
}
|
897
|
-
|
898
|
-
|
899
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
902
|
+
FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
903
|
+
FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService });
|
904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
|
900
905
|
type: Injectable
|
901
|
-
}], ctorParameters: function () { return [{ type:
|
906
|
+
}], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
|
902
907
|
|
903
908
|
class FlowComponent {
|
904
|
-
constructor(routerService,
|
909
|
+
constructor(routerService, flowService, flowInfo, guidedSellingService) {
|
905
910
|
this.routerService = routerService;
|
906
|
-
this.quoteDraftService = quoteDraftService;
|
907
911
|
this.flowService = flowService;
|
908
|
-
this.
|
909
|
-
this.
|
910
|
-
this.contextService = contextService;
|
912
|
+
this.flowInfo = flowInfo;
|
913
|
+
this.guidedSellingService = guidedSellingService;
|
911
914
|
this.isLoading$ = this.routerService.loading$;
|
912
|
-
this.showHeader$ = combineLatest([
|
913
|
-
|
914
|
-
|
915
|
-
this.contextService.isInitialized$,
|
916
|
-
]).pipe(map(([route, isStandalone, isContextInited]) => !!isContextInited && this.quoteDraftService.isInitialized && route.data['showHeader'] && !isStandalone));
|
917
|
-
this.isStandalone$ = this.quoteDraftService.isStandalone$;
|
915
|
+
this.showHeader$ = combineLatest([this.routerService.route$, this.flowInfo.flow$]).pipe(map(([route, flow]) => route.data['showHeader'] && !(flow === null || flow === void 0 ? void 0 : flow.properties.standalone)));
|
916
|
+
this.isStandalone$ = this.flowInfo.flow$.pipe(map(flow => Boolean(flow === null || flow === void 0 ? void 0 : flow.properties.standalone)));
|
917
|
+
this.guidedSellingVisible$ = this.guidedSellingService.isVisible$;
|
918
918
|
this.flowService.initSubscriptions();
|
919
919
|
}
|
920
|
-
ngOnInit() {
|
921
|
-
this.integrationState.clear();
|
922
|
-
}
|
923
|
-
ngOnDestroy() {
|
924
|
-
this.flowService.cleanup();
|
925
|
-
this.docGenService.cleanup();
|
926
|
-
this.contextService.delete();
|
927
|
-
}
|
928
920
|
}
|
929
|
-
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token:
|
930
|
-
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$
|
921
|
+
FlowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, deps: [{ token: FlowRouterService }, { token: FlowService }, { token: i2.FlowInfoService }, { token: FlowGuidedSellingService }], target: i0.ɵɵFactoryTarget.Component });
|
922
|
+
FlowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: FlowComponent, selector: "vl-flow", ngImport: i0, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "component", type: FlowHeaderComponent, selector: "vl-flow-new-header" }, { kind: "component", type: DocGenComponent, selector: "vl-flow-doc-gen" }, { kind: "component", type: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
931
923
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
|
932
924
|
type: Component,
|
933
|
-
args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}\n"] }]
|
934
|
-
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type:
|
925
|
+
args: [{ selector: 'vl-flow', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-flow-new-header *ngIf=\"showHeader$ | async\"></vl-flow-new-header>\n\n<div class=\"flow-content\">\n <div class=\"loading-overlay\" *ngIf=\"isLoading$ | async\">\n <vl-loader label=\"LOADING\"></vl-loader>\n </div>\n\n <router-outlet></router-outlet>\n\n <div class=\"guided-selling\" [ngClass]=\"{ hidden: (guidedSellingVisible$ | async) === false }\">\n <vl-flow-guided-selling *ngIf=\"(isStandalone$ | async) !== true\"></vl-flow-guided-selling>\n </div>\n</div>\n\n<ng-container *ngIf=\"(isStandalone$ | async) !== true\">\n <vl-flow-doc-gen></vl-flow-doc-gen>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:100%;height:100%}.flow-content{flex-grow:1;position:relative;overflow:hidden}.loading-overlay{position:absolute;height:100%;width:100%;inset:0;background-color:#fff;z-index:999}.guided-selling{position:absolute;top:0;width:100%;height:100%;z-index:100}.hidden{display:none}\n"] }]
|
926
|
+
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
|
935
927
|
|
936
928
|
const getFlowObjectIdPropertyName = (id) => {
|
937
929
|
const objectName = SalesforceIdUtils.getSfObjectNameById(id);
|
@@ -972,7 +964,7 @@ class ContextGuard {
|
|
972
964
|
const mode = this.getConfigurationContextMode(accountId, quoteId, orderId, rpcMessage);
|
973
965
|
// Restrict if mode is not defined
|
974
966
|
if (mode == null) {
|
975
|
-
return this.
|
967
|
+
return this.routerService.showErrorPage$('Mode is undefined');
|
976
968
|
}
|
977
969
|
const headerId = accountId || quoteId || orderId || this.rpcMessageId || 'empty-for-test-mode';
|
978
970
|
// Allow if context is already initialized with the same headerId
|
@@ -984,13 +976,13 @@ class ContextGuard {
|
|
984
976
|
}
|
985
977
|
// Initialize context and runtime settings
|
986
978
|
return forkJoin([this.contextService.create(headerId, mode), this.runtimeSettingsService.create()]).pipe(tap(([context]) => {
|
987
|
-
// Update context with queryParams
|
988
979
|
this.contextService.update(Object.assign(Object.assign({}, context), { properties: Object.assign(Object.assign(Object.assign({}, context.properties), (queryParams !== null && queryParams !== void 0 ? queryParams : {})), getDefaultProperties({ mode })) }));
|
989
980
|
// Init currency settings
|
990
981
|
this.runtimeSettingsService.initCurrency(context.properties['CurrencyIsoCode']);
|
991
982
|
}), map(() => true), catchError(e => {
|
992
983
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
993
|
-
|
984
|
+
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
985
|
+
return this.routerService.showErrorPage$(message, errorDetails);
|
994
986
|
}));
|
995
987
|
}
|
996
988
|
canActivate(route) {
|
@@ -1024,36 +1016,42 @@ class ContextGuard {
|
|
1024
1016
|
}
|
1025
1017
|
return;
|
1026
1018
|
}
|
1027
|
-
handleError(route, message) {
|
1028
|
-
this.contextService.delete();
|
1029
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
1030
|
-
return from(this.router.navigate([parentUrl, '404'], { state: { message } })).pipe(map(() => false));
|
1031
|
-
}
|
1032
1019
|
}
|
1033
|
-
ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, deps: [{ token: i1$
|
1020
|
+
ContextGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.RuntimeSettingsService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1034
1021
|
ContextGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard });
|
1035
1022
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ContextGuard, decorators: [{
|
1036
1023
|
type: Injectable
|
1037
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1024
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.RuntimeSettingsService }]; } });
|
1038
1025
|
|
1039
|
-
const
|
1026
|
+
const keepFlowInitialized = (route) => {
|
1040
1027
|
const contextService = inject(ContextService);
|
1041
|
-
const
|
1028
|
+
const flowState = inject(FlowStateService);
|
1029
|
+
const flowInfoService = inject(FlowInfoService);
|
1030
|
+
const routerService = inject(FlowRouterService);
|
1042
1031
|
const quoteDraft = inject(QuoteDraftService);
|
1043
1032
|
const configurationService = inject(ConfigurationService);
|
1033
|
+
const integrationState = inject(IntegrationState);
|
1044
1034
|
const { flowId } = route.queryParams;
|
1045
|
-
const flow =
|
1035
|
+
const flow = flowInfoService.flow;
|
1046
1036
|
if (flow && (flow === null || flow === void 0 ? void 0 : flow.id) === flowId) {
|
1047
1037
|
return true;
|
1048
1038
|
}
|
1049
1039
|
// Cleanup
|
1050
|
-
|
1051
|
-
configurationService.reset();
|
1040
|
+
flowState.cleanup();
|
1052
1041
|
quoteDraft.reset();
|
1042
|
+
configurationService.reset();
|
1043
|
+
integrationState.clear();
|
1044
|
+
flowInfoService.cleanup();
|
1045
|
+
contextService.delete();
|
1053
1046
|
if (!flowId) {
|
1054
1047
|
return true;
|
1055
1048
|
}
|
1056
|
-
|
1049
|
+
const params = Object.assign(Object.assign({}, route.queryParams), flow === null || flow === void 0 ? void 0 : flow.properties.queryParams);
|
1050
|
+
return flowInfoService.init$(flowId, params).pipe(map(() => true), catchError(e => {
|
1051
|
+
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
1052
|
+
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
1053
|
+
return routerService.showErrorPage$(message, errorDetails);
|
1054
|
+
}));
|
1057
1055
|
};
|
1058
1056
|
|
1059
1057
|
class ProductUnloadGuard {
|
@@ -1090,11 +1088,11 @@ class ProductUnloadGuard {
|
|
1090
1088
|
}));
|
1091
1089
|
}
|
1092
1090
|
}
|
1093
|
-
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$
|
1091
|
+
ProductUnloadGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, deps: [{ token: i1$2.Router }, { token: i2.ContextService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationService }, { token: FlowDialogService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1094
1092
|
ProductUnloadGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard });
|
1095
1093
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductUnloadGuard, decorators: [{
|
1096
1094
|
type: Injectable
|
1097
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1095
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationService }, { type: FlowDialogService }]; } });
|
1098
1096
|
|
1099
1097
|
class RootGuard {
|
1100
1098
|
constructor(router, routerService) {
|
@@ -1129,26 +1127,26 @@ class RootGuard {
|
|
1129
1127
|
return true;
|
1130
1128
|
}
|
1131
1129
|
}
|
1132
|
-
RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, deps: [{ token: i1$
|
1130
|
+
RootGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, deps: [{ token: i1$2.Router }, { token: FlowRouterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
1133
1131
|
RootGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, providedIn: 'root' });
|
1134
1132
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RootGuard, decorators: [{
|
1135
1133
|
type: Injectable,
|
1136
1134
|
args: [{ providedIn: 'root' }]
|
1137
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1135
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }]; } });
|
1138
1136
|
|
1139
1137
|
class AssetsComponent {
|
1140
|
-
constructor(templatesApi, cdr, toastService,
|
1141
|
-
var _a, _b;
|
1138
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
1139
|
+
var _a, _b, _c;
|
1142
1140
|
this.templatesApi = templatesApi;
|
1143
1141
|
this.cdr = cdr;
|
1144
1142
|
this.toastService = toastService;
|
1145
|
-
this.
|
1143
|
+
this.flowInfo = flowInfo;
|
1146
1144
|
this.customizationService = customizationService;
|
1147
1145
|
this.uiDefinition = undefined;
|
1148
1146
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
1149
1147
|
this.templateApiName = '';
|
1150
1148
|
this.destroyed$ = new Subject();
|
1151
|
-
this.templateApiName = (_b = (_a = this.
|
1149
|
+
this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.assets) !== null && _c !== void 0 ? _c : '';
|
1152
1150
|
}
|
1153
1151
|
ngOnInit() {
|
1154
1152
|
this.generateUIDefinition$()
|
@@ -1172,38 +1170,37 @@ class AssetsComponent {
|
|
1172
1170
|
this.destroyed$.next();
|
1173
1171
|
this.destroyed$.complete();
|
1174
1172
|
}
|
1175
|
-
|
1176
|
-
return this.templatesApi
|
1177
|
-
.fetchComponents$(template.id)
|
1178
|
-
.pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
|
1179
|
-
}
|
1180
|
-
getLocalAssetsComponentMeta$() {
|
1173
|
+
getLocalMeta$() {
|
1181
1174
|
var _a, _b;
|
1182
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.
|
1175
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
|
1183
1176
|
return of(undefined);
|
1184
1177
|
}
|
1185
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.
|
1186
|
-
if (!
|
1178
|
+
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1179
|
+
if (!components) {
|
1187
1180
|
return;
|
1188
1181
|
}
|
1189
|
-
return {
|
1182
|
+
return components.map(component => ({
|
1190
1183
|
html: component.html,
|
1191
1184
|
css: component.css,
|
1192
1185
|
js: component.js,
|
1193
1186
|
json: component.json,
|
1194
|
-
};
|
1187
|
+
}));
|
1195
1188
|
}));
|
1196
1189
|
}
|
1197
|
-
|
1198
|
-
|
1190
|
+
getOrgMeta$() {
|
1191
|
+
const template = this.flowInfo.templates.SHOPPING_CART;
|
1192
|
+
if (!template) {
|
1193
|
+
return of(undefined);
|
1194
|
+
}
|
1195
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
1199
1196
|
}
|
1200
1197
|
generateUIDefinition$() {
|
1201
1198
|
return of(undefined).pipe(tap(() => {
|
1202
1199
|
if (!this.templateApiName) {
|
1203
|
-
throw new Error("Flow
|
1200
|
+
throw new Error("Flow 'assets' template is not defined.");
|
1204
1201
|
}
|
1205
|
-
}), switchMap(() => this.
|
1206
|
-
if (!
|
1202
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
1203
|
+
if (!metaList) {
|
1207
1204
|
return;
|
1208
1205
|
}
|
1209
1206
|
const uiDef = {
|
@@ -1212,26 +1209,24 @@ class AssetsComponent {
|
|
1212
1209
|
primary: true,
|
1213
1210
|
type: 'DEFAULT',
|
1214
1211
|
version: 2,
|
1215
|
-
children:
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
},
|
1222
|
-
],
|
1212
|
+
children: metaList.map(meta => ({
|
1213
|
+
children: [],
|
1214
|
+
template: meta.html && btoaSafe(meta.html),
|
1215
|
+
script: meta.js && btoaSafe(meta.js),
|
1216
|
+
styles: meta.css && btoaSafe(meta.css),
|
1217
|
+
})),
|
1223
1218
|
};
|
1224
1219
|
return uiDef;
|
1225
1220
|
}));
|
1226
1221
|
}
|
1227
1222
|
}
|
1228
|
-
AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$
|
1229
|
-
AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
1223
|
+
AssetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1224
|
+
AssetsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AssetsComponent, selector: "vl-flow-assets", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1230
1225
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AssetsComponent, decorators: [{
|
1231
1226
|
type: Component,
|
1232
1227
|
args: [{ selector: 'vl-flow-assets', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
|
1233
1228
|
}], ctorParameters: function () {
|
1234
|
-
return [{ type: i1$
|
1229
|
+
return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
1235
1230
|
type: Optional
|
1236
1231
|
}, {
|
1237
1232
|
type: Inject,
|
@@ -1254,18 +1249,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1254
1249
|
}] });
|
1255
1250
|
|
1256
1251
|
class CatalogComponent {
|
1257
|
-
constructor(templatesApi, cdr, toastService,
|
1258
|
-
var _a, _b;
|
1252
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
1253
|
+
var _a, _b, _c;
|
1259
1254
|
this.templatesApi = templatesApi;
|
1260
1255
|
this.cdr = cdr;
|
1261
1256
|
this.toastService = toastService;
|
1262
|
-
this.
|
1257
|
+
this.flowInfo = flowInfo;
|
1263
1258
|
this.customizationService = customizationService;
|
1264
1259
|
this.uiDefinition = undefined;
|
1265
1260
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
1266
1261
|
this.templateApiName = '';
|
1267
1262
|
this.destroyed$ = new Subject();
|
1268
|
-
this.templateApiName = (_b = (_a = this.
|
1263
|
+
this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.catalog) !== null && _c !== void 0 ? _c : '';
|
1269
1264
|
}
|
1270
1265
|
ngOnInit() {
|
1271
1266
|
this.generateUIDefinition$()
|
@@ -1289,38 +1284,37 @@ class CatalogComponent {
|
|
1289
1284
|
this.destroyed$.next();
|
1290
1285
|
this.destroyed$.complete();
|
1291
1286
|
}
|
1292
|
-
|
1293
|
-
return this.templatesApi
|
1294
|
-
.fetchComponents$(template.id)
|
1295
|
-
.pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
|
1296
|
-
}
|
1297
|
-
getLocalCatalogComponentMeta$() {
|
1287
|
+
getLocalMeta$() {
|
1298
1288
|
var _a, _b;
|
1299
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.
|
1289
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
|
1300
1290
|
return of(undefined);
|
1301
1291
|
}
|
1302
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.
|
1303
|
-
if (!
|
1292
|
+
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1293
|
+
if (!components) {
|
1304
1294
|
return;
|
1305
1295
|
}
|
1306
|
-
return {
|
1296
|
+
return components.map(component => ({
|
1307
1297
|
html: component.html,
|
1308
1298
|
css: component.css,
|
1309
1299
|
js: component.js,
|
1310
1300
|
json: component.json,
|
1311
|
-
};
|
1301
|
+
}));
|
1312
1302
|
}));
|
1313
1303
|
}
|
1314
|
-
|
1315
|
-
|
1304
|
+
getOrgMeta$() {
|
1305
|
+
const template = this.flowInfo.templates.CATALOG;
|
1306
|
+
if (!template) {
|
1307
|
+
return of(undefined);
|
1308
|
+
}
|
1309
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
1316
1310
|
}
|
1317
1311
|
generateUIDefinition$() {
|
1318
1312
|
return of(undefined).pipe(tap(() => {
|
1319
1313
|
if (!this.templateApiName) {
|
1320
|
-
throw new Error("Flow
|
1314
|
+
throw new Error("Flow 'catalog' template is not defined.");
|
1321
1315
|
}
|
1322
|
-
}), switchMap(() => this.
|
1323
|
-
if (!
|
1316
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
1317
|
+
if (!metaList) {
|
1324
1318
|
return;
|
1325
1319
|
}
|
1326
1320
|
const uiDef = {
|
@@ -1329,26 +1323,24 @@ class CatalogComponent {
|
|
1329
1323
|
primary: true,
|
1330
1324
|
type: 'DEFAULT',
|
1331
1325
|
version: 2,
|
1332
|
-
children:
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
},
|
1339
|
-
],
|
1326
|
+
children: metaList.map(meta => ({
|
1327
|
+
children: [],
|
1328
|
+
template: meta.html && btoaSafe(meta.html),
|
1329
|
+
script: meta.js && btoaSafe(meta.js),
|
1330
|
+
styles: meta.css && btoaSafe(meta.css),
|
1331
|
+
})),
|
1340
1332
|
};
|
1341
1333
|
return uiDef;
|
1342
1334
|
}));
|
1343
1335
|
}
|
1344
1336
|
}
|
1345
|
-
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$
|
1346
|
-
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
1337
|
+
CatalogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1338
|
+
CatalogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CatalogComponent, selector: "vl-flow-catalog", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1347
1339
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CatalogComponent, decorators: [{
|
1348
1340
|
type: Component,
|
1349
1341
|
args: [{ selector: 'vl-flow-catalog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
|
1350
1342
|
}], ctorParameters: function () {
|
1351
|
-
return [{ type: i1$
|
1343
|
+
return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
1352
1344
|
type: Optional
|
1353
1345
|
}, {
|
1354
1346
|
type: Inject,
|
@@ -1400,12 +1392,12 @@ class DebugComponent {
|
|
1400
1392
|
return new HttpParams({ fromObject: params }).toString();
|
1401
1393
|
}
|
1402
1394
|
}
|
1403
|
-
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i1$
|
1404
|
-
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}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;line-height:18px}.cell-query-params{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1395
|
+
DebugComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, deps: [{ token: i1$1.FlowsApiService }, { token: i1$2.Router }, { token: i1$2.ActivatedRoute }, { token: i2.ContextService }, { token: i2.QuoteDraftService }], target: i0.ɵɵFactoryTarget.Component });
|
1396
|
+
DebugComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DebugComponent, selector: "vl-flow-debug", ngImport: i0, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}tbody>tr{cursor:pointer}tbody>tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px;line-height:18px}.cell-query-params{word-break:break-all}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i6.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "style", "styleClass", "badgeClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "directive", type: i8.InputText, selector: "[pInputText]" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1405
1397
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugComponent, decorators: [{
|
1406
1398
|
type: Component,
|
1407
|
-
args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}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;line-height:18px}.cell-query-params{word-break:break-all}\n"] }]
|
1408
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1399
|
+
args: [{ selector: 'vl-flow-debug', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"form\">\n <div class=\"fields-container\">\n <div class=\"field\">\n <label>SF Object ID</label>\n <input formControlName=\"id\" pInputText type=\"text\" />\n </div>\n </div>\n\n <p-button\n styleClass=\"p-button-primary\"\n label=\"Run Flow\"\n [disabled]=\"!form.value.id || !selectedFlow\"\n (onClick)=\"runFlow()\"\n ></p-button>\n</form>\n\n<table>\n <thead>\n <tr>\n <th [width]=\"30\"></th>\n <th [width]=\"160\">ID</th>\n <th [width]=\"160\">Entry Path</th>\n <th>QueryParams</th>\n <th [width]=\"100\">Standalone</th>\n <th [width]=\"100\">Stateful</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let flow of flows$ | async\" (click)=\"selectedFlow = flow\">\n <td><p-radioButton [inputId]=\"flow.id\" name=\"flow\" [value]=\"flow\" [(ngModel)]=\"selectedFlow\"></p-radioButton></td>\n <td>{{ flow.id }}</td>\n <td>{{ flow.properties.entryPath }}</td>\n <td class=\"cell-query-params\">{{ getQueryParamsString(flow.properties.queryParams) }}</td>\n <td>{{ flow.properties.standalone }}</td>\n <td>{{ flow.properties.stateful }}</td>\n </tr>\n </tbody>\n</table>\n", styles: [":host{display:block;padding:24px 54px}form{display:flex;align-items:center;justify-content:space-between}.fields-container{display:flex;gap:24px}.field{display:flex;flex-direction:column;width:200px;flex-shrink:0}:host ::ng-deep .p-dropdown{width:100%}table{width:100%;border-collapse:collapse;table-layout:fixed}tbody>tr{cursor:pointer}tbody>tr:hover{background-color:#f0f5fa}th{text-align:left;font-weight:600}th,td{padding:0 10px;height:30px;border-bottom:1px solid var(--vl-border-color);margin-right:16px;line-height:18px}.cell-query-params{word-break:break-all}\n"] }]
|
1400
|
+
}], ctorParameters: function () { return [{ type: i1$1.FlowsApiService }, { type: i1$2.Router }, { type: i1$2.ActivatedRoute }, { type: i2.ContextService }, { type: i2.QuoteDraftService }]; } });
|
1409
1401
|
|
1410
1402
|
const routes$1 = [{ path: '', component: DebugComponent }];
|
1411
1403
|
class DebugModule {
|
@@ -1413,7 +1405,7 @@ class DebugModule {
|
|
1413
1405
|
DebugModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1414
1406
|
DebugModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DebugModule, declarations: [DebugComponent], imports: [CommonModule,
|
1415
1407
|
FormsModule,
|
1416
|
-
ReactiveFormsModule, i1$
|
1408
|
+
ReactiveFormsModule, i1$2.RouterModule, RadioButtonModule,
|
1417
1409
|
ButtonModule,
|
1418
1410
|
InputTextModule,
|
1419
1411
|
DropdownModule] });
|
@@ -1442,36 +1434,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1442
1434
|
}]
|
1443
1435
|
}] });
|
1444
1436
|
|
1445
|
-
class EmptyAccountComponent {
|
1446
|
-
}
|
1447
|
-
EmptyAccountComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
1448
|
-
EmptyAccountComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EmptyAccountComponent, selector: "vl-empty-account", ngImport: i0, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"], dependencies: [{ kind: "component", type: i2.EmptyStateComponent, selector: "vl-empty-state", inputs: ["primaryText", "secondaryText", "buttonLabel", "icon", "disabled"], outputs: ["buttonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountComponent, decorators: [{
|
1450
|
-
type: Component,
|
1451
|
-
args: [{ selector: 'vl-empty-account', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-empty-state\n primaryText=\"No Orders in your Account\"\n secondaryText=\"To proceed, go to the Shopping Cart from a Quote.\"\n>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"281\" viewBox=\"0 0 400 281\" fill=\"none\">\n <path d=\"M264.214 26.9277H70.8805V128.186H264.214V26.9277Z\" fill=\"#0466C8\" />\n <path\n d=\"M143 56.5H136.217C128.166 64.4791 120.051 72.5209 112 80.5H118.783C126.834 72.5209 134.949 64.5419 143 56.5Z\"\n fill=\"white\"\n />\n <path\n d=\"M242.932 57.5681V79.4319H128.575L133.724 74.2801L150.429 57.5681H242.932ZM244 56.5H149.989C142.014 64.4791 133.976 72.5209 126 80.5H244V56.5Z\"\n fill=\"white\"\n />\n <path d=\"M129 56.5H81V80.5H104.969C112.958 72.5209 120.948 64.5419 129 56.5Z\" fill=\"white\" />\n <path\n d=\"M82.3 23.2016C82.2366 23.2016 82.1732 23.2644 82.1098 23.2644C81.3494 23.5785 80.5889 23.5785 79.8918 23.2644C79.765 23.2016 79.6383 23.1387 79.4482 23.0759C78.9412 22.7618 78.561 22.322 78.3075 21.7565C77.6104 20.2487 78.1173 18.6151 79.6383 17.8612C81.1592 17.1073 82.9971 17.547 83.6942 19.0549C84.3913 20.6256 83.8843 22.3848 82.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M92.2716 23.2016C92.2086 23.2016 92.1457 23.2644 92.0827 23.2644C91.3273 23.5785 90.5718 23.5785 89.8793 23.2644C89.7534 23.2016 89.6275 23.1387 89.4386 23.0759C88.935 22.7618 88.5573 22.322 88.3054 21.7565C87.6129 20.2487 88.1166 18.6151 89.6275 17.8612C91.1384 17.1073 92.9641 17.547 93.6566 19.0549C94.412 20.6256 93.9084 22.3848 92.2716 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M102.3 23.2016C102.237 23.2016 102.173 23.2644 102.11 23.2644C101.349 23.5785 100.589 23.5785 99.8918 23.2644C99.765 23.2016 99.6383 23.1387 99.4482 23.0759C98.9412 22.7618 98.561 22.322 98.3075 21.7565C97.6104 20.2487 98.1174 18.6151 99.6383 17.8612C101.159 17.1073 102.997 17.547 103.694 19.0549C104.391 20.6256 103.884 22.3848 102.3 23.2016Z\"\n fill=\"#B4D1EF\"\n />\n <path\n d=\"M210.126 91.0156H130.44C129.748 91.0156 129.748 92.0848 130.44 92.0848H210.126C210.818 92.0848 210.818 91.0156 210.126 91.0156Z\"\n fill=\"white\"\n />\n <path\n d=\"M197.484 97.5566H142.013C141.321 97.5566 141.321 98.6258 142.013 98.6258H197.484C198.176 98.6258 198.176 97.5566 197.484 97.5566Z\"\n fill=\"white\"\n />\n <path\n d=\"M229.436 35.5H61.5553C60.8149 35.5 60.8149 36.5 61.5553 36.5H229.503C230.176 36.5 230.176 35.5 229.436 35.5Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M270.44 35.3555H256.226C256.163 35.3555 256.163 36.4246 256.226 36.4246H270.44C270.503 36.4246 270.503 35.3555 270.44 35.3555Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.704 212.022C332.642 212.022 332.579 212.022 332.516 211.959L280.566 191.582C280.377 191.519 280.252 191.33 280.252 191.141C280.252 190.953 280.314 190.764 280.44 190.638C292.83 181.33 333.333 150.953 335.346 150.953C335.472 150.953 335.66 151.016 335.723 151.141C335.849 151.267 335.849 151.393 335.849 151.519L333.208 211.456C333.208 211.644 333.082 211.77 332.956 211.896C332.893 211.959 332.767 212.022 332.704 212.022ZM281.824 190.953L332.138 210.701L334.717 152.336C329.811 155.166 301.321 176.299 281.824 190.953Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M366.289 231.015C366.226 231.015 366.226 231.015 366.164 231.015L349.371 227.053C349.182 226.99 349.057 226.927 348.994 226.739C348.931 226.613 348.931 226.424 348.994 226.236L357.736 211.141C357.862 210.953 358.05 210.89 358.239 210.89C358.428 210.89 358.616 211.015 358.679 211.204C366.918 229.758 366.792 230.324 366.792 230.512C366.792 230.638 366.667 230.764 366.541 230.89C366.478 230.953 366.415 231.015 366.289 231.015ZM350.314 226.173L365.472 229.758C364.465 227.116 360.755 218.626 358.113 212.651L350.314 226.173Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M199.686 248.751C192.516 229.38 177.799 213.909 159.497 205.67V205.607C159.748 193.343 154.528 181.141 144.654 173.657C133.396 165.104 118.365 162.902 104.591 164.034C78.1132 166.236 53.0189 181.456 38.805 203.846C36.9811 206.739 35.3459 209.758 33.8365 212.839C33.522 213.468 34.4654 214.034 34.7799 213.405C45.4088 191.015 66.1635 174.16 90 167.682C113.711 161.267 146.981 164.726 156.226 191.519C157.736 195.921 158.491 200.575 158.428 205.229C150.943 201.959 142.893 199.946 134.465 199.254C121.447 198.248 103.522 199.506 95.283 211.204C91.761 216.236 90.8805 222.525 93.5849 228.122C96.2893 233.72 101.761 237.745 107.421 239.946C118.868 244.475 132.39 242.462 142.642 235.858C152.642 229.38 158.679 218.688 159.371 206.865C177.17 215.041 191.572 230.072 198.616 249.066C198.931 249.695 199.937 249.443 199.686 248.751ZM152.075 225.481C145.094 235.355 133.019 241.141 121.006 241.267C109.434 241.393 92.7044 234.6 93.0189 220.701C93.2076 213.217 98.9937 207.305 105.346 204.286C112.013 201.141 119.748 200.198 127.044 200.072C137.987 199.883 148.616 202.148 158.302 206.361C158.113 213.154 156.038 219.883 152.075 225.481Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M341.447 271.204H322.767C322.075 271.204 322.075 272.273 322.767 272.273H341.447C342.138 272.336 342.138 271.204 341.447 271.204Z\"\n fill=\"#E5ECF4\"\n />\n <path\n d=\"M233.522 75.4814C230.881 89.3179 229.245 103.154 224.025 110.576C213.962 124.915 185.975 137.117 178.428 143.972C170.881 150.764 171.95 151.142 173.019 152.588C173.648 153.469 177.862 151.771 181.132 150.261C177.421 152.211 172.579 155.23 173.711 157.242C174.654 159.003 178.679 157.808 182.201 156.362C178.994 158.123 175.786 160.387 176.981 161.959C178.365 163.783 183.585 161.897 187.107 160.387C184.088 162.022 180.314 164.475 181.635 166.299C183.774 169.192 235.849 149.758 245.157 120.702C248.805 109.318 250.881 94.6009 252.013 80.8274C245.786 79.3808 239.623 77.494 233.522 75.4814Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M182.327 148.437C179.497 150.576 176.226 151.645 172.704 151.582C172.013 151.582 172.013 152.651 172.704 152.651C176.415 152.714 179.937 151.582 182.893 149.318C183.396 148.941 182.893 147.997 182.327 148.437Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M184.906 154.852C183.27 155.607 181.635 156.173 179.937 156.676C178.302 157.117 175.723 158.06 174.151 157.117C173.522 156.802 173.019 157.683 173.585 158.06C175.157 158.94 176.918 158.5 178.553 158.123C180.943 157.62 183.145 156.802 185.346 155.796C186.101 155.481 185.535 154.538 184.906 154.852Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M186.163 158.185C184.277 159.946 180.189 163.217 177.421 161.833C176.792 161.519 176.226 162.462 176.855 162.777C180.252 164.412 184.528 161.141 186.855 158.94C187.421 158.437 186.667 157.682 186.163 158.185Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M253.522 46.0474C253.522 47.1166 253.522 48.3115 253.522 49.6323C253.459 57.3052 253.145 69.1291 252.013 81.6449C251.95 82.148 251.95 82.6512 251.887 83.1543C245.472 82.148 236.981 79.2549 230.629 78.1857C232.893 65.7958 237.736 54.2864 244.151 45.4185C245.157 44.0348 246.226 42.7769 247.421 41.6449L253.522 40.5757C253.522 40.5757 253.522 41.3933 253.585 42.8398C253.522 43.6574 253.522 44.7266 253.522 46.0474Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M184.687 136.932C179.875 137.121 175.253 138.637 170.631 139.837C165.565 141.101 160.5 142.174 155.371 143.122C134.602 146.975 113.264 148.238 92.1786 146.849C74.7659 145.712 55.3904 142.238 43.2332 128.531C32.469 116.403 28.9865 98.1477 34.9384 82.9879C40.7638 68.0807 55.3271 57.6583 70.9668 55.5738V54.5C58.6197 56.0792 46.969 62.7748 39.4341 72.755C29.9996 85.325 28.6066 102.317 34.6218 116.719C41.0804 132.257 55.2004 141.227 71.1568 145.017C80.2747 147.165 89.6458 147.923 98.9537 148.302C109.718 148.744 120.545 148.428 131.246 147.544C143.087 146.533 154.801 144.638 166.388 142.048C172.403 140.658 178.545 138.321 184.687 138.132C190.576 137.942 197.604 140.974 197.921 147.607C197.984 148.302 199.061 148.302 198.997 147.607C198.617 140.216 191.209 136.679 184.687 136.932Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M190 164.091V172.909C190 173.697 191 173.697 191 172.909V164.091C191 163.303 190 163.303 190 164.091Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M199 164.037V172.963C199 173.679 200 173.679 200 172.963V164.037C200 163.321 199 163.321 199 164.037Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M182 166.5V155.275C182 148.205 187.792 142.5 194.969 142.5C202.145 142.5 207.937 148.205 207.937 155.275L208 166.5H182Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M209.483 165.5H180.517C179.828 165.5 179.828 166.5 180.517 166.5H209.483C210.172 166.5 210.172 165.5 209.483 165.5Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M203.711 151.519V161.582C203.711 162.274 204.78 162.274 204.78 161.582V151.519C204.843 150.827 203.711 150.827 203.711 151.519Z\"\n fill=\"white\"\n />\n <path\n d=\"M196.73 134.601C187.421 142.148 183.648 152.274 187.233 153.343C190.818 154.412 203.208 135.67 203.208 135.67L196.73 134.601Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M199.748 139.632C196.855 144.098 193.396 148.374 189.182 151.708L188.239 152.399C187.358 152.84 186.352 152.148 186.478 150.953C186.541 150.45 187.233 149.066 187.421 148.689C187.925 147.557 188.491 146.425 189.057 145.292C190.377 142.777 191.824 140.387 193.459 138.06C193.836 137.494 192.893 136.928 192.516 137.494C191.195 139.443 181.824 152.399 186.855 153.594C189.245 154.16 191.824 150.827 193.27 149.381C196.038 146.55 198.491 143.469 200.692 140.135C201.069 139.569 200.126 139.066 199.748 139.632Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M211.132 135.984C207.736 139.003 203.648 140.89 199.057 141.33C198.365 141.393 198.365 142.462 199.057 142.399C203.899 141.896 208.239 139.947 211.887 136.739C212.39 136.299 211.635 135.544 211.132 135.984Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M238.176 254.224C250.692 253.783 263.208 255.607 275.723 255.796C275.157 254.475 274.654 253.217 274.088 251.897C273.774 251.205 273.459 250.513 273.145 249.821C270.377 243.658 267.484 237.809 264.717 232.274C254.906 235.859 245.031 239.129 234.843 241.331C237.547 246.928 239.12 251.393 238.176 254.224Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M273.899 253.595C276.101 253.783 278.365 253.783 280.566 253.72C284.717 253.658 288.805 253.72 292.956 253.72C299.12 253.783 305.283 253.532 311.384 253.091C307.17 244.161 302.767 235.796 298.553 228.06C289.057 230.639 279.56 232.966 269.937 235.104C273.145 242.525 275.031 249.003 273.899 253.595Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M274.214 250.828C273.836 255.104 271.069 257.997 267.107 259.57C256.352 263.909 259.937 272.84 259.937 272.84H319.874C316.918 265.167 313.648 257.809 310.314 250.765H274.214V250.828Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M307.296 229.758C293.459 203.783 276.289 186.299 281.447 173.72C297.233 135.419 300.818 107.997 291.887 84.3494L267.484 80.0098C267.484 80.0098 269.623 91.5192 268.553 112.337C267.484 133.154 252.201 152.022 250.252 182.337C249.182 199.129 259.937 225.985 266.415 241.582C275.912 238.437 297.547 232.085 307.296 229.758Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M265.786 234.475C252.516 207.934 240.063 187.683 246.415 172.714C263.145 133.406 281.069 109.884 272.075 86.1733C272.075 86.1733 254.843 72.5255 253.774 93.3431C252.704 114.161 218.05 153.846 214.088 183.972C211.321 204.915 223.962 230.513 230.252 245.356C240.252 242.337 256.352 238.815 265.786 234.475Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M282.201 272.84H222.264C222.264 272.84 222.264 260.45 234.654 257.243C237.17 256.614 238.302 255.104 238.491 252.966H274.591C277.296 259.255 279.874 265.922 282.201 272.84Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M274.088 251.896C274.025 252.274 273.962 252.588 273.836 252.966C273.082 255.67 271.195 258.123 268.428 259.444C264.151 261.519 259.119 261.456 256.289 265.922C254.969 268.06 254.402 270.45 254.34 272.84H253.333C253.522 268.311 254.906 264.098 259.182 261.708C262.704 259.758 267.233 259.821 270.252 256.991C271.447 255.922 272.264 254.475 272.704 252.966C273.019 251.959 273.145 250.89 273.082 249.884C273.459 250.513 273.774 251.205 274.088 251.896Z\"\n fill=\"white\"\n />\n <path\n d=\"M281.195 256.739C279.497 255.67 277.799 254.601 276.101 253.532C275.535 253.154 274.969 254.098 275.535 254.475C277.233 255.544 278.931 256.614 280.629 257.683C281.258 258.06 281.761 257.117 281.195 256.739Z\"\n fill=\"white\"\n />\n <path\n d=\"M244.717 257.809C242.893 257.242 241.132 256.739 239.308 256.173C238.616 255.985 238.365 256.991 238.994 257.243C240.818 257.809 242.579 258.312 244.403 258.878C245.094 259.066 245.346 258.06 244.717 257.809Z\"\n fill=\"white\"\n />\n <path\n d=\"M262.516 231.267C261.069 227.682 259.623 224.098 258.239 220.513C257.987 219.884 256.918 220.135 257.17 220.827C258.616 224.412 260.063 227.997 261.447 231.582C261.698 232.211 262.767 231.959 262.516 231.267Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.394C265.786 121.645 263.208 131.897 260.692 142.148C260.503 142.84 259.497 142.526 259.623 141.834C262.264 131.331 264.843 120.765 267.484 110.262C267.61 109.821 267.736 109.381 267.799 108.878C268.05 109.318 268.365 109.696 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M268.616 110.073C268.491 110.513 268.365 110.953 268.302 111.393C268.05 111.016 267.736 110.639 267.484 110.261C266.478 108.878 265.409 107.494 264.402 106.11C263.962 105.544 264.906 105.041 265.346 105.544C266.163 106.676 266.981 107.808 267.862 108.878C268.05 109.318 268.365 109.695 268.616 110.073Z\"\n fill=\"white\"\n />\n <path\n d=\"M251.698 43.0913C238.994 45.7328 251.509 69.5693 253.836 93.3429L291.887 84.3492C291.887 84.3492 276.415 37.997 251.698 43.0913Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M251.384 79.8839C249.308 73.6574 247.296 67.4939 245.22 61.2675C245.031 60.6386 243.962 60.8901 244.151 61.582C246.226 67.8084 248.239 73.9719 250.314 80.1983C250.566 80.8273 251.572 80.5128 251.384 79.8839Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M332.075 57.431C322.39 48.3744 311.447 43.5945 299.811 41.2046C297.673 46.9908 295.723 52.9027 293.962 58.8147C295.66 59.3807 297.359 60.0096 298.994 60.6386C323.396 69.6323 326.667 87.1794 330.566 97.6197C334.528 108.06 322.642 122.777 326.604 124.538C330.566 126.362 336.289 113.028 336.289 113.028C336.289 113.028 334.843 135.481 337.736 136.173C340.377 136.865 341.698 131.016 342.264 126.488C342.076 130.764 342.327 136.047 344.906 135.859C347.17 135.67 347.862 131.456 347.987 127.494C348.365 130.764 349.245 133.909 351.384 134.098C354.088 134.349 353.962 128.626 353.522 124.349C354.277 128.123 355.66 132.777 358.05 131.896C362.075 130.513 353.962 77.8713 332.075 57.431Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M302.453 41.7707C300.314 47.7455 296.667 58.8147 295.157 64.9782C287.61 60.6386 279.245 57.1795 273.082 53.6575C265.723 49.5065 258.742 47.5569 254.717 46.3619C254.277 46.2361 253.836 46.1103 253.459 46.0474C251.572 45.5443 250.566 45.2298 250.566 45.2298L251.95 43.0286L253.459 40.5757C254.717 40.4499 255.912 40.3871 257.17 40.2613C272.704 38.9405 288.176 38.3745 302.453 41.7707Z\"\n fill=\"#F2F7FC\"\n />\n <path\n d=\"M341.761 123.846C341.384 127.117 341.887 134.853 337.673 135.67C336.981 135.796 337.296 136.865 337.987 136.739C339.874 136.362 341.069 134.915 341.572 133.154C342.453 130.261 342.453 126.928 342.83 123.909C342.956 123.154 341.824 123.154 341.761 123.846Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M346.981 122.966C346.918 124.852 346.855 126.739 346.73 128.626C346.667 129.884 347.107 135.544 344.78 135.041C344.088 134.915 343.837 135.922 344.466 136.11C346.352 136.488 347.296 135.104 347.61 133.406C348.176 130.073 347.925 126.362 348.05 122.966C348.113 122.274 347.044 122.274 346.981 122.966Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M353.648 122.022C353.648 121.33 352.579 121.33 352.579 122.022C352.642 124.035 353.774 132.337 351.132 133.029C350.44 133.217 350.755 134.224 351.447 134.098C353.019 133.657 353.648 132.525 353.774 130.953C354.088 128.06 353.711 124.978 353.648 122.022Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M358.868 119.129C358.805 118.437 357.736 118.5 357.799 119.192C357.987 120.953 360.126 130.639 357.547 131.142C356.855 131.267 357.17 132.274 357.862 132.148C359.56 131.834 360 130.387 360 128.815C359.937 125.67 359.245 122.337 358.868 119.129Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M275.346 54.3493C274.088 53.8462 272.83 53.4059 271.635 52.9028C271.006 52.6512 270.692 53.7204 271.321 53.972C272.579 54.4751 273.836 54.9154 275.031 55.4185C275.723 55.6701 276.038 54.6009 275.346 54.3493Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M256.164 41.9592C254.277 37.4938 251.509 31.2045 251.132 31.1416L241.006 33.28C241.006 33.28 245.849 42.9655 248.113 47.5567C250.629 45.4812 253.333 43.6573 256.164 41.9592Z\"\n fill=\"#D4E8F7\"\n />\n <path\n d=\"M252.704 28.4372C252.704 28.7517 252.642 29.0661 252.579 29.3806C252.516 29.6951 252.453 30.0095 252.39 30.2611C252.39 30.324 252.327 30.3869 252.327 30.4498C252.264 30.7013 252.201 30.9529 252.138 31.2045C250.943 35.041 247.862 38.0598 243.082 38.1856C233.899 38.3743 230.252 30.7013 231.384 24.412C232.138 20.1982 235.094 16.5504 239.937 16.173C240.126 16.173 240.377 16.1102 240.566 16.1102C245.031 16.0473 248.176 17.6825 250.189 20.0724C250.503 20.5127 250.818 20.9529 251.132 21.3932C251.321 21.7076 251.447 22.0221 251.635 22.3366C251.887 22.8397 252.075 23.3429 252.201 23.846C252.641 25.3554 252.83 26.9278 252.704 28.4372Z\"\n fill=\"#D4E8F7\"\n />\n <path d=\"M236.478 29.3179L238.679 34.9782L234.528 35.2298L236.478 29.3179Z\" fill=\"#002957\" />\n <path\n d=\"M239.182 28.0601L239.434 28.8148C239.686 29.4438 238.616 29.6953 238.365 29.0664L238.113 28.3117C237.924 27.6827 238.994 27.4312 239.182 28.0601Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M233.27 28.9406L233.522 29.6954C233.774 30.3243 232.704 30.5759 232.453 29.9469L232.201 29.1922C232.013 28.5004 233.082 28.2488 233.27 28.9406Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M247.044 27.1166C246.918 27.6827 246.855 28.3116 246.73 28.8776C246.604 29.5695 247.673 29.8839 247.736 29.1921C247.862 28.6261 247.924 27.9971 248.05 27.4311C248.176 26.7393 247.17 26.4877 247.044 27.1166Z\"\n fill=\"#0466C8\"\n />\n <path\n d=\"M252.201 23.8461C252.013 23.343 251.824 22.8399 251.635 22.3367C251.509 22.0222 251.321 21.7078 251.132 21.3933C250.88 20.9531 250.566 20.5128 250.189 20.0726C248.176 17.6197 245.031 15.9845 240.566 16.1103C240.377 16.1103 240.126 16.1103 239.937 16.1732C238.491 16.299 234.465 16.9279 232.956 18.8147C228.616 20.1355 225.157 23.909 229.308 25.4814C232.453 26.8021 238.176 25.7958 240.88 24.4751C241.132 25.6072 242.83 28.7518 244.151 28.626C245.723 28.4373 245.472 26.6763 244.969 25.6072C244.906 25.4814 244.843 25.3556 244.78 25.2298C245.094 25.0411 245.409 24.8524 245.786 24.7267C247.925 23.7204 250.818 24.6638 251.509 27.1166C251.824 28.3744 251.698 29.7581 250.943 30.7015C250.88 30.8273 251.824 31.2046 252.138 31.2675C252.201 31.016 252.264 30.7644 252.327 30.5128C252.327 30.4499 252.327 30.387 252.39 30.3241C252.453 30.0097 252.516 29.7581 252.579 29.4436C252.642 29.1292 252.641 28.8147 252.704 28.5002C252.767 26.9279 252.641 25.3556 252.201 23.8461Z\"\n fill=\"#002957\"\n />\n <path\n d=\"M257.17 40.2612L256.226 42.7141L254.78 46.3619L253.522 49.5694L251.635 54.4122L246.478 48.1858L244.151 45.4185C245.157 44.0348 246.226 42.777 247.421 41.6449L253.522 40.5757C254.717 40.4499 255.912 40.3241 257.17 40.2612Z\"\n fill=\"#D4E8F7\"\n />\n </svg>\n</vl-empty-state>\n", styles: [":host{display:flex;height:100%}\n"] }]
|
1452
|
-
}] });
|
1453
|
-
|
1454
|
-
class EmptyAccountModule {
|
1455
|
-
}
|
1456
|
-
EmptyAccountModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1457
|
-
EmptyAccountModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, declarations: [EmptyAccountComponent], imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule], exports: [EmptyAccountComponent] });
|
1458
|
-
EmptyAccountModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule] });
|
1459
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EmptyAccountModule, decorators: [{
|
1460
|
-
type: NgModule,
|
1461
|
-
args: [{
|
1462
|
-
declarations: [EmptyAccountComponent],
|
1463
|
-
imports: [CommonModule, PreviewModule, LoaderModule, EmptyStateModule],
|
1464
|
-
exports: [EmptyAccountComponent],
|
1465
|
-
}]
|
1466
|
-
}] });
|
1467
|
-
|
1468
1437
|
class ProductComponent {
|
1469
|
-
constructor(contextService, configurationRuntimeService, configurationService,
|
1438
|
+
constructor(contextService, configurationRuntimeService, configurationService, configurationStateService, quoteDraftService, flowInfoService, flowStateService, integrationState, customizationService) {
|
1470
1439
|
this.contextService = contextService;
|
1471
1440
|
this.configurationRuntimeService = configurationRuntimeService;
|
1472
1441
|
this.configurationService = configurationService;
|
1473
|
-
this.
|
1442
|
+
this.configurationStateService = configurationStateService;
|
1474
1443
|
this.quoteDraftService = quoteDraftService;
|
1444
|
+
this.flowInfoService = flowInfoService;
|
1445
|
+
this.flowStateService = flowStateService;
|
1475
1446
|
this.integrationState = integrationState;
|
1476
1447
|
this.customizationService = customizationService;
|
1477
1448
|
this.uiDefinition$ = new BehaviorSubject(undefined);
|
@@ -1492,18 +1463,28 @@ class ProductComponent {
|
|
1492
1463
|
}));
|
1493
1464
|
}
|
1494
1465
|
init$() {
|
1495
|
-
|
1466
|
+
let quoteDraft$;
|
1467
|
+
if (this.flowInfoService.isLegacy || !this.flowInfoService.isStateful) {
|
1468
|
+
quoteDraft$ = this.quoteDraftService.quoteDraft$;
|
1469
|
+
}
|
1470
|
+
else {
|
1471
|
+
quoteDraft$ = of(undefined);
|
1472
|
+
}
|
1473
|
+
return quoteDraft$.pipe(first(), switchMap(quote => {
|
1496
1474
|
const contextProperties = this.contextService.resolve().properties;
|
1497
1475
|
const productId = contextProperties.productId;
|
1498
1476
|
if (!productId) {
|
1499
1477
|
throw new Error(`Unable to start configuration for 'productId == null'`);
|
1500
1478
|
}
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1479
|
+
if (!quote) {
|
1480
|
+
const offeringId = contextProperties.offeringId;
|
1481
|
+
return this.configurationRuntimeService.init({ productId, offeringId });
|
1482
|
+
}
|
1483
|
+
const lineItem = this.getLineItem(quote, productId, contextProperties.lineItemId);
|
1484
|
+
if (lineItem) {
|
1485
|
+
this.configurationService.setConfigurableRamp(lineItem);
|
1505
1486
|
}
|
1506
|
-
const { offeringId } =
|
1487
|
+
const { offeringId } = lineItem !== null && lineItem !== void 0 ? lineItem : {};
|
1507
1488
|
return this.configurationRuntimeService.init({ productId, offeringId });
|
1508
1489
|
}), switchMap(() => this.customizeUI$()), tap(() => {
|
1509
1490
|
var _a, _b;
|
@@ -1519,25 +1500,29 @@ class ProductComponent {
|
|
1519
1500
|
this.configurationRuntimeService.initializationProps.attributesMap =
|
1520
1501
|
this.integrationState.state.guidedSelling;
|
1521
1502
|
}
|
1522
|
-
}), switchMap(() => this.
|
1503
|
+
}), switchMap(() => this.configurationStateService.init$()));
|
1523
1504
|
}
|
1524
|
-
|
1525
|
-
var _a
|
1505
|
+
getLineItem(quote, productId, lineItemId) {
|
1506
|
+
var _a;
|
1526
1507
|
// search by lineItemId first
|
1527
|
-
let
|
1528
|
-
if (!
|
1529
|
-
|
1508
|
+
let li = quote.currentState.find(li => li.id === lineItemId);
|
1509
|
+
if (!li && this.quoteDraftService.isStandalone) {
|
1510
|
+
li = quote.currentState.find(li => li.productId === productId);
|
1530
1511
|
}
|
1531
|
-
|
1512
|
+
// If still not found, is could be an asset
|
1513
|
+
if (!li) {
|
1514
|
+
li = (_a = this.quoteDraftService.assetsState) === null || _a === void 0 ? void 0 : _a.currentState.find(li => li.id === lineItemId);
|
1515
|
+
}
|
1516
|
+
return li;
|
1532
1517
|
}
|
1533
1518
|
}
|
1534
|
-
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token:
|
1535
|
-
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n", styles: [""], dependencies: [{ kind: "component", type:
|
1519
|
+
ProductComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, deps: [{ token: i2.ContextService }, { token: i2.ConfigurationRuntimeService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: i2.QuoteDraftService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }, { token: i2.IntegrationState }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
1520
|
+
ProductComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProductComponent, selector: "vl-flow-product", ngImport: i0, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n", styles: [""], dependencies: [{ kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1536
1521
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProductComponent, decorators: [{
|
1537
1522
|
type: Component,
|
1538
1523
|
args: [{ selector: 'vl-flow-product', changeDetection: ChangeDetectionStrategy.OnPush, template: "<vl-cms-preview [uiDefinition]=\"$any(uiDefinition$ | async)\" [config]=\"config\"></vl-cms-preview>\n" }]
|
1539
1524
|
}], ctorParameters: function () {
|
1540
|
-
return [{ type:
|
1525
|
+
return [{ type: i2.ContextService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: i2.QuoteDraftService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }, { type: i2.IntegrationState }, { type: undefined, decorators: [{
|
1541
1526
|
type: Optional
|
1542
1527
|
}, {
|
1543
1528
|
type: Inject,
|
@@ -1564,26 +1549,29 @@ class RecordNotFoundComponent {
|
|
1564
1549
|
this.router = router;
|
1565
1550
|
this.route = route;
|
1566
1551
|
this.subMessage = '';
|
1552
|
+
this.type = '';
|
1567
1553
|
const navigation = this.router.getCurrentNavigation();
|
1568
1554
|
const { state } = (navigation === null || navigation === void 0 ? void 0 : navigation.extras) || {};
|
1569
1555
|
this.message = state === null || state === void 0 ? void 0 : state['message'];
|
1556
|
+
this.type = (state === null || state === void 0 ? void 0 : state['type']) || '';
|
1557
|
+
this.details = state === null || state === void 0 ? void 0 : state['details'];
|
1570
1558
|
if (typeof this.message === 'string') {
|
1571
1559
|
this.subMessage = this.message.includes('/describe') ? 'A potential problem with permissions' : '';
|
1572
1560
|
}
|
1573
1561
|
}
|
1574
1562
|
}
|
1575
|
-
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$
|
1576
|
-
RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div
|
1563
|
+
RecordNotFoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, deps: [{ token: i1$2.Router }, { token: i1$2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
1564
|
+
RecordNotFoundComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RecordNotFoundComponent, selector: "vl-flow-record-not-found", ngImport: i0, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1577
1565
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundComponent, decorators: [{
|
1578
1566
|
type: Component,
|
1579
|
-
args: [{ selector: 'vl-flow-record-not-found', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div
|
1580
|
-
}], ctorParameters: function () { return [{ type: i1$
|
1567
|
+
args: [{ selector: 'vl-flow-record-not-found', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"row\">\n <div class=\"col-md-12\">\n <div class=\"message-wrapper\">\n <div *ngIf=\"message; else defaultMessage\">\n <p class=\"text message-text\" [class]=\"type\">{{ message }}</p>\n\n <p *ngIf=\"subMessage\" class=\"text\">{{ subMessage }}</p>\n\n <div *ngIf=\"details && details.length > 0\">\n <div *ngFor=\"let detail of details\" class=\"text\">{{ detail }}</div>\n </div>\n </div>\n\n <ng-template #defaultMessage>Record not found</ng-template>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;padding:24px 54px}:host .text{white-space:pre-line;word-break:break-word}:host .message-text.error{color:var(--vl-error-text-color)}\n"] }]
|
1568
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i1$2.ActivatedRoute }]; } });
|
1581
1569
|
|
1582
1570
|
const routes = [{ path: '', component: RecordNotFoundComponent }];
|
1583
1571
|
class RecordNotFoundModule {
|
1584
1572
|
}
|
1585
1573
|
RecordNotFoundModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1586
|
-
RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$
|
1574
|
+
RecordNotFoundModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, declarations: [RecordNotFoundComponent], imports: [CommonModule, i1$2.RouterModule] });
|
1587
1575
|
RecordNotFoundModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, imports: [CommonModule, RouterModule.forChild(routes)] });
|
1588
1576
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RecordNotFoundModule, decorators: [{
|
1589
1577
|
type: NgModule,
|
@@ -1700,7 +1688,7 @@ class RemoteComponent {
|
|
1700
1688
|
let items = [lineItem];
|
1701
1689
|
for (let i = 0; i < items.length; i++) {
|
1702
1690
|
const item = items[i];
|
1703
|
-
const children = options.get(item.id);
|
1691
|
+
const children = item && options.get(item.id);
|
1704
1692
|
if (children) {
|
1705
1693
|
item.lineItems = children;
|
1706
1694
|
items = items.concat(children);
|
@@ -1772,17 +1760,17 @@ class RemoteComponent {
|
|
1772
1760
|
const optionConfigurations = this.getOptionConfigurations(this.rpcMessage.product);
|
1773
1761
|
const rootProductOptions = this.rpcMessage.options.filter(po => po.configuredProductId === lineItem.productId);
|
1774
1762
|
childItems.forEach(lineItem => {
|
1775
|
-
var _a, _b, _c;
|
1763
|
+
var _a, _b, _c, _d;
|
1776
1764
|
const rootOption = rootProductOptions.find(po => po.optionalProductId === lineItem.productId);
|
1777
1765
|
if (rootOption) {
|
1778
1766
|
const featureOptions = (_a = optionConfigurations[rootOption.featureName]) !== null && _a !== void 0 ? _a : (optionConfigurations[rootOption.featureName] = []);
|
1779
1767
|
const originOption = !rootOption.hasChildren
|
1780
|
-
? optionConfigurations[rootOption.featureName].find(({ optionId }) => optionId === rootOption.optionId)
|
1768
|
+
? (_b = optionConfigurations[rootOption.featureName]) === null || _b === void 0 ? void 0 : _b.find(({ optionId }) => optionId === rootOption.optionId)
|
1781
1769
|
: undefined;
|
1782
1770
|
const option = originOption !== null && originOption !== void 0 ? originOption : {};
|
1783
|
-
option.optionId = (
|
1771
|
+
option.optionId = (_c = option.optionId) !== null && _c !== void 0 ? _c : rootOption.optionId;
|
1784
1772
|
this.updateContentData(option, lineItem);
|
1785
|
-
option.index = (
|
1773
|
+
option.index = (_d = option.index) !== null && _d !== void 0 ? _d : featureOptions.length;
|
1786
1774
|
option.selected = true;
|
1787
1775
|
if (!originOption) {
|
1788
1776
|
featureOptions.push(option);
|
@@ -1829,8 +1817,9 @@ class RemoteComponent {
|
|
1829
1817
|
}
|
1830
1818
|
}
|
1831
1819
|
for (const option of notBundleOptions) {
|
1832
|
-
|
1833
|
-
|
1820
|
+
const bundleOption = bundleOptionsByOptionId[option.configuredProductId];
|
1821
|
+
if (bundleOption) {
|
1822
|
+
bundleOption.hasChildren = true;
|
1834
1823
|
}
|
1835
1824
|
}
|
1836
1825
|
}
|
@@ -1839,7 +1828,7 @@ class RemoteComponent {
|
|
1839
1828
|
let items = (_a = lineItem.lineItems) !== null && _a !== void 0 ? _a : [];
|
1840
1829
|
for (let i = 0; i < items.length; i++) {
|
1841
1830
|
const item = items[i];
|
1842
|
-
if (item.lineItems) {
|
1831
|
+
if (item === null || item === void 0 ? void 0 : item.lineItems) {
|
1843
1832
|
items = items.concat(item.lineItems.map(li => (Object.assign(Object.assign({}, li), { parentLineItem: item }))));
|
1844
1833
|
}
|
1845
1834
|
}
|
@@ -1901,9 +1890,10 @@ class RemoteComponent {
|
|
1901
1890
|
component.attributes
|
1902
1891
|
.filter(a => a.properties && a.properties[propertyName])
|
1903
1892
|
.forEach(mapping => {
|
1893
|
+
var _a;
|
1904
1894
|
const attribute = lineItem.attributes.find(a => a.name === mapping.name);
|
1905
1895
|
if (attribute) {
|
1906
|
-
new Set(mapping.properties[propertyName].split(',')).forEach(k => (result[k] = attribute.value));
|
1896
|
+
new Set((_a = mapping.properties[propertyName]) === null || _a === void 0 ? void 0 : _a.split(',')).forEach(k => (result[k] = attribute.value));
|
1907
1897
|
}
|
1908
1898
|
});
|
1909
1899
|
return result;
|
@@ -1921,12 +1911,12 @@ class RemoteComponent {
|
|
1921
1911
|
return optionConfigurations;
|
1922
1912
|
}
|
1923
1913
|
}
|
1924
|
-
RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, deps: [{ token:
|
1925
|
-
RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RemoteComponent, selector: "vl-flow-remote", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
1914
|
+
RemoteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, deps: [{ token: i2.ContextService }, { token: i2.QuoteDraftService }, { token: i2.ConfigurationRuntimeService }, { token: i2.ConfigurationService }, { token: i2.ConfigurationStateService }, { token: i2$2.MessageService }, { token: i2.IntegrationState }, { token: i4.Location }], target: i0.ɵɵFactoryTarget.Component });
|
1915
|
+
RemoteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: RemoteComponent, selector: "vl-flow-remote", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
1926
1916
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: RemoteComponent, decorators: [{
|
1927
1917
|
type: Component,
|
1928
1918
|
args: [{ selector: 'vl-flow-remote', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
|
1929
|
-
}], ctorParameters: function () { return [{ type:
|
1919
|
+
}], ctorParameters: function () { return [{ type: i2.ContextService }, { type: i2.QuoteDraftService }, { type: i2.ConfigurationRuntimeService }, { type: i2.ConfigurationService }, { type: i2.ConfigurationStateService }, { type: i2$2.MessageService }, { type: i2.IntegrationState }, { type: i4.Location }]; } });
|
1930
1920
|
|
1931
1921
|
class RemoteModule {
|
1932
1922
|
}
|
@@ -1943,18 +1933,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
1943
1933
|
}] });
|
1944
1934
|
|
1945
1935
|
class ShoppingCartComponent {
|
1946
|
-
constructor(templatesApi, cdr, toastService,
|
1947
|
-
var _a, _b;
|
1936
|
+
constructor(templatesApi, cdr, toastService, flowInfo, customizationService) {
|
1937
|
+
var _a, _b, _c;
|
1948
1938
|
this.templatesApi = templatesApi;
|
1949
1939
|
this.cdr = cdr;
|
1950
1940
|
this.toastService = toastService;
|
1951
|
-
this.
|
1941
|
+
this.flowInfo = flowInfo;
|
1952
1942
|
this.customizationService = customizationService;
|
1953
1943
|
this.uiDefinition = undefined;
|
1954
1944
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
1955
1945
|
this.templateApiName = '';
|
1956
1946
|
this.destroyed$ = new Subject();
|
1957
|
-
this.templateApiName = (_b = (_a = this.
|
1947
|
+
this.templateApiName = (_c = (_b = (_a = this.flowInfo.flow) === null || _a === void 0 ? void 0 : _a.properties.templates) === null || _b === void 0 ? void 0 : _b.shoppingCart) !== null && _c !== void 0 ? _c : '';
|
1958
1948
|
}
|
1959
1949
|
ngOnInit() {
|
1960
1950
|
this.generateUIDefinition$()
|
@@ -1966,7 +1956,7 @@ class ShoppingCartComponent {
|
|
1966
1956
|
this.state$.next({ loading: false, failure: false });
|
1967
1957
|
}), catchError(err => {
|
1968
1958
|
var _a;
|
1969
|
-
const message = 'Failed to resolve Shopping
|
1959
|
+
const message = 'Failed to resolve Shopping Cart component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
1970
1960
|
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
1971
1961
|
this.uiDefinition = undefined;
|
1972
1962
|
this.state$.next({ loading: false, failure: true });
|
@@ -1978,38 +1968,37 @@ class ShoppingCartComponent {
|
|
1978
1968
|
this.destroyed$.next();
|
1979
1969
|
this.destroyed$.complete();
|
1980
1970
|
}
|
1981
|
-
|
1982
|
-
return this.templatesApi
|
1983
|
-
.fetchComponents$(template.id)
|
1984
|
-
.pipe(map(components => { var _a; return (_a = components.find(c => c.type === UITemplateComponentType.ROOT)) !== null && _a !== void 0 ? _a : undefined; }));
|
1985
|
-
}
|
1986
|
-
getLocalShoppingCartComponentMeta$() {
|
1971
|
+
getLocalMeta$() {
|
1987
1972
|
var _a, _b;
|
1988
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.
|
1973
|
+
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
|
1989
1974
|
return of(undefined);
|
1990
1975
|
}
|
1991
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.
|
1992
|
-
if (!
|
1976
|
+
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
1977
|
+
if (!components) {
|
1993
1978
|
return;
|
1994
1979
|
}
|
1995
|
-
return {
|
1980
|
+
return components.map(component => ({
|
1996
1981
|
html: component.html,
|
1997
1982
|
css: component.css,
|
1998
1983
|
js: component.js,
|
1999
1984
|
json: component.json,
|
2000
|
-
};
|
1985
|
+
}));
|
2001
1986
|
}));
|
2002
1987
|
}
|
2003
|
-
|
2004
|
-
|
1988
|
+
getOrgMeta$() {
|
1989
|
+
const template = this.flowInfo.templates.SHOPPING_CART;
|
1990
|
+
if (!template) {
|
1991
|
+
return of(undefined);
|
1992
|
+
}
|
1993
|
+
return this.templatesApi.fetchComponentsAttachments$(template.id);
|
2005
1994
|
}
|
2006
1995
|
generateUIDefinition$() {
|
2007
1996
|
return of(undefined).pipe(tap(() => {
|
2008
1997
|
if (!this.templateApiName) {
|
2009
|
-
throw new Error("Flow
|
1998
|
+
throw new Error("Flow 'shoppingCart' template is not defined.");
|
2010
1999
|
}
|
2011
|
-
}), switchMap(() => this.
|
2012
|
-
if (!
|
2000
|
+
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
2001
|
+
if (!metaList) {
|
2013
2002
|
return;
|
2014
2003
|
}
|
2015
2004
|
const uiDef = {
|
@@ -2018,26 +2007,24 @@ class ShoppingCartComponent {
|
|
2018
2007
|
primary: true,
|
2019
2008
|
type: 'DEFAULT',
|
2020
2009
|
version: 2,
|
2021
|
-
children:
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
},
|
2028
|
-
],
|
2010
|
+
children: metaList.map(meta => ({
|
2011
|
+
children: [],
|
2012
|
+
template: meta.html && btoaSafe(meta.html),
|
2013
|
+
script: meta.js && btoaSafe(meta.js),
|
2014
|
+
styles: meta.css && btoaSafe(meta.css),
|
2015
|
+
})),
|
2029
2016
|
};
|
2030
2017
|
return uiDef;
|
2031
2018
|
}));
|
2032
2019
|
}
|
2033
2020
|
}
|
2034
|
-
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$
|
2035
|
-
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type:
|
2021
|
+
ShoppingCartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, deps: [{ token: i1$1.UITemplatesApiService }, { token: i0.ChangeDetectorRef }, { token: i2$1.ToastService }, { token: i2.FlowInfoService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
2022
|
+
ShoppingCartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ShoppingCartComponent, selector: "vl-flow-shopping-cart", ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "component", type: i2$1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
2036
2023
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ShoppingCartComponent, decorators: [{
|
2037
2024
|
type: Component,
|
2038
2025
|
args: [{ selector: 'vl-flow-shopping-cart', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n </ng-container>\n </ng-template>\n</ng-container>\n" }]
|
2039
2026
|
}], ctorParameters: function () {
|
2040
|
-
return [{ type: i1$
|
2027
|
+
return [{ type: i1$1.UITemplatesApiService }, { type: i0.ChangeDetectorRef }, { type: i2$1.ToastService }, { type: i2.FlowInfoService }, { type: undefined, decorators: [{
|
2041
2028
|
type: Optional
|
2042
2029
|
}, {
|
2043
2030
|
type: Inject,
|
@@ -2060,140 +2047,114 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2060
2047
|
}] });
|
2061
2048
|
|
2062
2049
|
class FlowResolver {
|
2063
|
-
constructor(router,
|
2050
|
+
constructor(router, routerService, contextService, flowInfo) {
|
2064
2051
|
this.router = router;
|
2065
|
-
this.flowsApiService = flowsApiService;
|
2066
2052
|
this.routerService = routerService;
|
2067
2053
|
this.contextService = contextService;
|
2068
|
-
this.
|
2069
|
-
}
|
2070
|
-
handleError(route, message, queryParams) {
|
2071
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
2072
|
-
return this.router.navigate([parentUrl, '404'], {
|
2073
|
-
queryParams,
|
2074
|
-
state: {
|
2075
|
-
message: message,
|
2076
|
-
},
|
2077
|
-
});
|
2054
|
+
this.flowInfo = flowInfo;
|
2078
2055
|
}
|
2079
2056
|
resolve(route) {
|
2080
2057
|
const { queryParams } = route;
|
2081
|
-
const
|
2082
|
-
if (!
|
2083
|
-
return
|
2058
|
+
const flow = this.flowInfo.flow;
|
2059
|
+
if (!flow) {
|
2060
|
+
return of(false);
|
2084
2061
|
}
|
2085
|
-
|
2086
|
-
|
2087
|
-
|
2088
|
-
|
2089
|
-
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
replaceUrl: true,
|
2103
|
-
})
|
2104
|
-
.catch(e => {
|
2105
|
-
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2106
|
-
return this.handleError(route, message, mergedQueryParams);
|
2107
|
-
});
|
2062
|
+
const { properties } = flow;
|
2063
|
+
const { queryParams: flowQueryParams, entryPath } = properties;
|
2064
|
+
const mergedQueryParams = Object.assign(Object.assign({}, queryParams), flowQueryParams);
|
2065
|
+
const contextProperties = Object.entries(Object.assign(Object.assign({}, mergedQueryParams), getDefaultProperties({ flowParams: properties }))).reduce((trunk, [key, value]) => (Object.assign(Object.assign({}, trunk), { [key]: String(value) })), {});
|
2066
|
+
this.contextService.update({ properties: contextProperties });
|
2067
|
+
this.flowInfo.flow = flow;
|
2068
|
+
const parentUrl = this.routerService.getFlowRootPath(route);
|
2069
|
+
const entryUrl = String(entryPath !== null && entryPath !== void 0 ? entryPath : '')
|
2070
|
+
.split('/')
|
2071
|
+
.filter(Boolean);
|
2072
|
+
return from(this.router.navigate([parentUrl, ...entryUrl], {
|
2073
|
+
queryParams: mergedQueryParams,
|
2074
|
+
replaceUrl: true,
|
2075
|
+
})).pipe(catchError$1(e => {
|
2076
|
+
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2077
|
+
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
2078
|
+
return this.routerService.showErrorPage$(message, errorDetails);
|
2108
2079
|
}));
|
2109
2080
|
}
|
2110
2081
|
}
|
2111
|
-
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$
|
2082
|
+
FlowResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, deps: [{ token: i1$2.Router }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2112
2083
|
FlowResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver });
|
2113
2084
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowResolver, decorators: [{
|
2114
2085
|
type: Injectable
|
2115
|
-
}], ctorParameters: function () { return [{ type: i1$
|
2086
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }]; } });
|
2116
2087
|
|
2117
2088
|
class QuoteResolver {
|
2118
|
-
constructor(router, quoteDraftService, routerService, contextService,
|
2089
|
+
constructor(router, quoteDraftService, routerService, contextService, flowInfo, flowStateService) {
|
2119
2090
|
this.router = router;
|
2120
2091
|
this.quoteDraftService = quoteDraftService;
|
2121
2092
|
this.routerService = routerService;
|
2122
2093
|
this.contextService = contextService;
|
2123
|
-
this.
|
2124
|
-
this.
|
2125
|
-
this.flowService = flowService;
|
2126
|
-
}
|
2127
|
-
handleError(route, message) {
|
2128
|
-
const parentUrl = this.routerService.getFlowRootPath(route);
|
2129
|
-
return from(this.router.navigate([parentUrl, '404'], { state: { message } }));
|
2130
|
-
}
|
2131
|
-
calculate$() {
|
2132
|
-
const quoteDraft = this.quoteDraftService.quoteDraft;
|
2133
|
-
if (!this.quoteDraftService.isStandalone && quoteDraft && !this.accountHasNotAssets()) {
|
2134
|
-
return this.flowConfiguration.calculate$(quoteDraft);
|
2135
|
-
}
|
2136
|
-
return of(undefined);
|
2094
|
+
this.flowInfo = flowInfo;
|
2095
|
+
this.flowStateService = flowStateService;
|
2137
2096
|
}
|
2138
2097
|
resolve(route) {
|
2139
|
-
const
|
2140
|
-
|
2141
|
-
|
2098
|
+
const flow = this.flowInfo.flow;
|
2099
|
+
if (!flow) {
|
2100
|
+
return of(false);
|
2101
|
+
}
|
2102
|
+
if (this.flowStateService.isInitialized()) {
|
2142
2103
|
return of(true);
|
2143
2104
|
}
|
2144
|
-
|
2145
|
-
return this.quoteDraftService.init(headerId, queryParams).pipe(switchMap(() => this.calculate$()), tap(() => {
|
2146
|
-
var _a;
|
2147
|
-
const canNavigate = !((_a = this.flowService.flow) === null || _a === void 0 ? void 0 : _a.properties.suppressInitialNavigation);
|
2148
|
-
if (!this.quoteDraftService.isStandalone && canNavigate) {
|
2149
|
-
if (this.shouldNavigateToAssets()) {
|
2150
|
-
this.changeNavigation('/assets', route);
|
2151
|
-
}
|
2152
|
-
else if (!this.quoteDraftService.isInitialized && this.quoteDraftService.hasProducts) {
|
2153
|
-
this.changeNavigation('/cart', route);
|
2154
|
-
}
|
2155
|
-
}
|
2156
|
-
this.initializeModifiedAssetsMap();
|
2157
|
-
this.quoteDraftService.isInitialized = true;
|
2158
|
-
this.quoteDraftService.hasUnsavedChanges = false;
|
2159
|
-
}), catchError(e => {
|
2105
|
+
return this.flowStateService.init$().pipe(switchMap(() => this.checkDynamicNavigation$(route)), catchError(e => {
|
2160
2106
|
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2161
|
-
|
2107
|
+
const errorDetails = isVeloceError(e.error) ? extractErrorDetails(e.error) : [];
|
2108
|
+
return this.routerService.showErrorPage$(message, errorDetails);
|
2162
2109
|
}));
|
2163
2110
|
}
|
2164
|
-
|
2165
|
-
const
|
2166
|
-
|
2167
|
-
|
2168
|
-
queryParams: route.queryParams,
|
2169
|
-
replaceUrl: true,
|
2170
|
-
})
|
2171
|
-
.catch(e => {
|
2172
|
-
const message = e instanceof HttpErrorResponse ? e.error.message : e;
|
2173
|
-
return this.handleError(route, message);
|
2174
|
-
});
|
2175
|
-
}
|
2176
|
-
shouldNavigateToAssets() {
|
2177
|
-
var _a, _b;
|
2178
|
-
if (this.contextService.mode === ConfigurationContextMode.ACCOUNT) {
|
2179
|
-
return true;
|
2111
|
+
checkDynamicNavigation$(route) {
|
2112
|
+
const flow = this.flowInfo.flow;
|
2113
|
+
if (!flow) {
|
2114
|
+
return of(true);
|
2180
2115
|
}
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
return this.
|
2116
|
+
if (flow.properties.suppressInitialNavigation || flow.properties.standalone) {
|
2117
|
+
return of(true);
|
2118
|
+
}
|
2119
|
+
return this.getNavigateTo().pipe(switchMap(navigateTo => {
|
2120
|
+
if (!navigateTo) {
|
2121
|
+
return of(true);
|
2122
|
+
}
|
2123
|
+
const parentUrl = this.routerService.getFlowRootPath(route);
|
2124
|
+
return from(this.router.navigate([parentUrl + navigateTo], {
|
2125
|
+
queryParams: route.queryParams,
|
2126
|
+
replaceUrl: true,
|
2127
|
+
}));
|
2128
|
+
}));
|
2185
2129
|
}
|
2186
|
-
|
2187
|
-
this.
|
2188
|
-
|
2189
|
-
|
2130
|
+
getNavigateTo() {
|
2131
|
+
const flow = this.flowInfo.flow;
|
2132
|
+
let navigateTo;
|
2133
|
+
if (flow === null || flow === void 0 ? void 0 : flow.properties.stateful) {
|
2134
|
+
return this.flowStateService.select$(UITemplateType.FLOW_ENGINE, 'NAVIGATE_TO').pipe(map(r => {
|
2135
|
+
if (r.success) {
|
2136
|
+
return r.result;
|
2137
|
+
}
|
2138
|
+
return '';
|
2139
|
+
}));
|
2140
|
+
}
|
2141
|
+
else {
|
2142
|
+
const isAccountMode = this.contextService.mode === ConfigurationContextMode.ACCOUNT;
|
2143
|
+
if (isAccountMode || this.quoteDraftService.hasAssets) {
|
2144
|
+
navigateTo = '/assets';
|
2145
|
+
}
|
2146
|
+
else if (this.quoteDraftService.hasProducts) {
|
2147
|
+
navigateTo = '/cart';
|
2148
|
+
}
|
2149
|
+
}
|
2150
|
+
return of(navigateTo);
|
2190
2151
|
}
|
2191
2152
|
}
|
2192
|
-
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$
|
2153
|
+
QuoteResolver.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, deps: [{ token: i1$2.Router }, { token: i2.QuoteDraftService }, { token: FlowRouterService }, { token: i2.ContextService }, { token: i2.FlowInfoService }, { token: i2.FlowStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
2193
2154
|
QuoteResolver.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver });
|
2194
2155
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteResolver, decorators: [{
|
2195
2156
|
type: Injectable
|
2196
|
-
}], ctorParameters: function () { return [{ type: i1$
|
2157
|
+
}], ctorParameters: function () { return [{ type: i1$2.Router }, { type: i2.QuoteDraftService }, { type: FlowRouterService }, { type: i2.ContextService }, { type: i2.FlowInfoService }, { type: i2.FlowStateService }]; } });
|
2197
2158
|
|
2198
2159
|
const rootRoute = {
|
2199
2160
|
id: VELOCE_FLOW_ROOT_ROUTE,
|
@@ -2204,7 +2165,7 @@ const rootRoute = {
|
|
2204
2165
|
children: [
|
2205
2166
|
{
|
2206
2167
|
path: '',
|
2207
|
-
canActivate: [
|
2168
|
+
canActivate: [keepFlowInitialized],
|
2208
2169
|
runGuardsAndResolvers: 'always',
|
2209
2170
|
children: [
|
2210
2171
|
{
|
@@ -2247,14 +2208,6 @@ const rootRoute = {
|
|
2247
2208
|
canActivate: [ContextGuard],
|
2248
2209
|
data: { showHeader: true },
|
2249
2210
|
},
|
2250
|
-
{
|
2251
|
-
path: 'empty',
|
2252
|
-
component: EmptyAccountComponent,
|
2253
|
-
runGuardsAndResolvers: 'paramsOrQueryParamsChange',
|
2254
|
-
resolve: { quote: QuoteResolver },
|
2255
|
-
canActivate: [ContextGuard],
|
2256
|
-
data: { showHeader: true },
|
2257
|
-
},
|
2258
2211
|
{
|
2259
2212
|
path: 'remote',
|
2260
2213
|
component: RemoteComponent,
|
@@ -2277,19 +2230,17 @@ const rootRoute = {
|
|
2277
2230
|
class FlowRoutingModule {
|
2278
2231
|
}
|
2279
2232
|
FlowRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
2280
|
-
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$
|
2233
|
+
FlowRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, imports: [i1$2.RouterModule, ProductModule,
|
2281
2234
|
ShoppingCartModule,
|
2282
2235
|
CatalogModule,
|
2283
2236
|
AssetsModule,
|
2284
|
-
RemoteModule,
|
2285
|
-
EmptyAccountModule], exports: [RouterModule] });
|
2237
|
+
RemoteModule], exports: [RouterModule] });
|
2286
2238
|
FlowRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver], imports: [RouterModule.forChild([rootRoute]),
|
2287
2239
|
ProductModule,
|
2288
2240
|
ShoppingCartModule,
|
2289
2241
|
CatalogModule,
|
2290
2242
|
AssetsModule,
|
2291
|
-
RemoteModule,
|
2292
|
-
EmptyAccountModule, RouterModule] });
|
2243
|
+
RemoteModule, RouterModule] });
|
2293
2244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowRoutingModule, decorators: [{
|
2294
2245
|
type: NgModule,
|
2295
2246
|
args: [{
|
@@ -2300,18 +2251,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2300
2251
|
CatalogModule,
|
2301
2252
|
AssetsModule,
|
2302
2253
|
RemoteModule,
|
2303
|
-
EmptyAccountModule,
|
2304
2254
|
],
|
2305
2255
|
exports: [RouterModule],
|
2306
2256
|
providers: [FlowRouterService, RootGuard, ContextGuard, ProductUnloadGuard, FlowResolver, QuoteResolver],
|
2307
2257
|
}]
|
2308
2258
|
}] });
|
2309
2259
|
|
2310
|
-
class
|
2260
|
+
class FlowDocGenService {
|
2311
2261
|
constructor(integrationState) {
|
2312
2262
|
this.integrationState = integrationState;
|
2313
2263
|
this.cleanup$ = new Subject();
|
2314
|
-
this.isVisibleSubj$ = new BehaviorSubject(
|
2264
|
+
this.isVisibleSubj$ = new BehaviorSubject(false);
|
2315
2265
|
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
2316
2266
|
this.initSubscriptions();
|
2317
2267
|
}
|
@@ -2320,20 +2270,20 @@ class FlowGuidedSellingService {
|
|
2320
2270
|
}
|
2321
2271
|
initSubscriptions() {
|
2322
2272
|
this.integrationState
|
2323
|
-
.listen$(FlowAction.
|
2273
|
+
.listen$(FlowAction.FLOW_OPEN_DOC_GEN)
|
2324
2274
|
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
2325
2275
|
.subscribe();
|
2326
2276
|
this.integrationState
|
2327
|
-
.listen$(FlowAction.
|
2277
|
+
.listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
|
2328
2278
|
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
2329
2279
|
.subscribe();
|
2330
2280
|
}
|
2331
2281
|
}
|
2332
|
-
|
2333
|
-
|
2334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
2282
|
+
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
2283
|
+
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
|
2284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
|
2335
2285
|
type: Injectable
|
2336
|
-
}], ctorParameters: function () { return [{ type:
|
2286
|
+
}], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
|
2337
2287
|
|
2338
2288
|
const configurePrimengShadowDOM = () => {
|
2339
2289
|
DomHandler.getScrollableParents = (element) => {
|
@@ -2418,5 +2368,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2418
2368
|
* Generated bundle index. Do not edit.
|
2419
2369
|
*/
|
2420
2370
|
|
2421
|
-
export { ContextGuard,
|
2371
|
+
export { ContextGuard, FlowDialogService, FlowModule, FlowRouterService, FlowService, VELOCE_FLOW_ROOT_ROUTE, getDefaultProperties, getFlowObjectIdPropertyName };
|
2422
2372
|
//# sourceMappingURL=veloceapps-sdk.mjs.map
|