@veloceapps/sdk 11.0.0-0 → 11.0.0-10
Sign up to get free protection for your applications and to get access to all the features.
- package/cms/cms.actions.d.ts +0 -52
- package/cms/vendor-map.d.ts +11 -25
- package/core/modules/configuration/services/configuration-state.service.d.ts +0 -4
- package/core/modules/configuration/services/configuration.service.d.ts +5 -1
- package/core/modules/configuration/services/runtime-context.service.d.ts +1 -1
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +2 -0
- package/core/types/flow-customization.types.d.ts +0 -12
- package/esm2020/cms/cms.actions.mjs +1 -52
- package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
- package/esm2020/cms/vendor-map.mjs +5 -11
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +4 -2
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +2 -3
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +29 -10
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +5 -3
- package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +1 -1
- package/esm2020/core/services/flow-info.service.mjs +1 -3
- package/esm2020/core/types/flow-customization.types.mjs +1 -1
- package/esm2020/src/flow.component.mjs +4 -5
- package/esm2020/src/flow.module.mjs +5 -10
- package/esm2020/src/pages/product/product.component.mjs +9 -2
- package/esm2020/src/services/flow-dialog.service.mjs +1 -30
- package/fesm2015/veloceapps-sdk-cms.mjs +16 -72
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +32 -16
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +66 -250
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +8 -74
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +34 -16
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +65 -249
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/flow.module.d.ts +2 -3
- package/src/services/flow-dialog.service.d.ts +0 -4
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +0 -129
- package/esm2020/src/components/doc-gen/doc-gen.module.mjs +0 -19
- package/esm2020/src/services/doc-gen.service.mjs +0 -34
- package/src/components/doc-gen/doc-gen.component.d.ts +0 -26
- package/src/components/doc-gen/doc-gen.module.d.ts +0 -9
- package/src/services/doc-gen.service.d.ts +0 -13
@@ -7,13 +7,14 @@ import { ApiModule } from '@veloceapps/api';
|
|
7
7
|
import * as i2$1 from '@veloceapps/components';
|
8
8
|
import { ToastType, LoaderModule, LetDirectiveModule } from '@veloceapps/components';
|
9
9
|
import * as i5 from '@veloceapps/sdk/cms';
|
10
|
-
import {
|
10
|
+
import { btoaSafe, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
|
11
11
|
import * as i2 from '@veloceapps/sdk/core';
|
12
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
16
|
import { BehaviorSubject, Subject, filter, first, tap, takeUntil, catchError, of, map, switchMap, shareReplay, startWith, distinctUntilChanged, from, take, combineLatest, forkJoin, throwError } from 'rxjs';
|
17
|
+
import { DomHandler } from 'primeng/dom';
|
17
18
|
import * as i1$2 from '@angular/router';
|
18
19
|
import { NavigationEnd, NavigationStart, NavigationCancel, NavigationError, RouterModule } from '@angular/router';
|
19
20
|
import { mapShoppingCartSettings, getMaxRenewalTermsValue, UITemplateType, SalesforceIdUtils, ConfigurationContextMode, isVeloceError, extractErrorDetails, UUID } from '@veloceapps/core';
|
@@ -27,7 +28,6 @@ import * as i6 from 'primeng/radiobutton';
|
|
27
28
|
import { RadioButtonModule } from 'primeng/radiobutton';
|
28
29
|
import * as i2$2 from 'primeng/api';
|
29
30
|
import { catchError as catchError$1 } from 'rxjs/operators';
|
30
|
-
import { DomHandler } from 'primeng/dom';
|
31
31
|
|
32
32
|
const VELOCE_FLOW_ROOT_ROUTE = 'VELOCE_FLOW_ROOT_ROUTE';
|
33
33
|
|
@@ -75,10 +75,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
75
75
|
}]
|
76
76
|
}] });
|
77
77
|
|
78
|
-
class
|
79
|
-
constructor(templatesApi,
|
78
|
+
class FlowHeaderComponent {
|
79
|
+
constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
|
80
80
|
this.templatesApi = templatesApi;
|
81
|
-
this.contextService = contextService;
|
82
81
|
this.flowStateService = flowStateService;
|
83
82
|
this.flowInfo = flowInfo;
|
84
83
|
this.toastService = toastService;
|
@@ -97,7 +96,7 @@ class DocGenComponent {
|
|
97
96
|
this.destroy$.complete();
|
98
97
|
}
|
99
98
|
initialize() {
|
100
|
-
this.templateApiName = this.flowInfo.flow?.properties.templates?.
|
99
|
+
this.templateApiName = this.flowInfo.flow?.properties.templates?.flowHeader ?? '';
|
101
100
|
if (this.flowInfo.isLegacy && !this.templateApiName) {
|
102
101
|
return;
|
103
102
|
}
|
@@ -108,7 +107,7 @@ class DocGenComponent {
|
|
108
107
|
}
|
109
108
|
this.uiDefinition$.next(uiDef);
|
110
109
|
}), catchError(err => {
|
111
|
-
const message = 'Failed to resolve
|
110
|
+
const message = 'Failed to resolve Flow Header component. ' + (err.message ?? '');
|
112
111
|
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
113
112
|
return of();
|
114
113
|
}), takeUntil(this.destroy$))
|
@@ -131,7 +130,7 @@ class DocGenComponent {
|
|
131
130
|
}));
|
132
131
|
}
|
133
132
|
getOrgMeta$() {
|
134
|
-
const template = this.flowInfo.templates.
|
133
|
+
const template = this.flowInfo.templates.FLOW_HEADER;
|
135
134
|
if (!template) {
|
136
135
|
return of(undefined);
|
137
136
|
}
|
@@ -140,69 +139,52 @@ class DocGenComponent {
|
|
140
139
|
generateUIDefinition$() {
|
141
140
|
return of(undefined).pipe(tap(() => {
|
142
141
|
if (!this.templateApiName) {
|
143
|
-
throw new Error("Flow '
|
142
|
+
throw new Error("Flow 'flowHeader' template is not defined.");
|
144
143
|
}
|
145
144
|
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
146
145
|
if (!metaList) {
|
147
146
|
return;
|
148
147
|
}
|
149
|
-
const headerId = this.contextService.resolve().properties.Id ?? null;
|
150
|
-
const patchedMetaList = metaList.map(component => {
|
151
|
-
if (!component.js) {
|
152
|
-
return component;
|
153
|
-
}
|
154
|
-
const metadata = extractElementMetadata(component.js);
|
155
|
-
const script = extendElementMetadata(component.js, {
|
156
|
-
inputs: {
|
157
|
-
...metadata.inputs,
|
158
|
-
Id: headerId ? `"${headerId}"` : null,
|
159
|
-
},
|
160
|
-
});
|
161
|
-
return {
|
162
|
-
...component,
|
163
|
-
js: script,
|
164
|
-
};
|
165
|
-
});
|
166
148
|
const uiDef = {
|
167
149
|
name: '',
|
168
150
|
createdTimestamp: 0,
|
169
151
|
primary: true,
|
170
152
|
type: 'DEFAULT',
|
171
153
|
version: 2,
|
172
|
-
children:
|
154
|
+
children: metaList.map(meta => ({
|
173
155
|
children: [],
|
174
|
-
template:
|
175
|
-
script:
|
176
|
-
styles:
|
156
|
+
template: meta.html && btoaSafe(meta.html),
|
157
|
+
script: meta.js && btoaSafe(meta.js),
|
158
|
+
styles: meta.css && btoaSafe(meta.css),
|
177
159
|
})),
|
178
160
|
};
|
179
161
|
return uiDef;
|
180
162
|
}));
|
181
163
|
}
|
182
164
|
}
|
183
|
-
|
184
|
-
|
185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
165
|
+
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 });
|
166
|
+
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 });
|
167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
186
168
|
type: Component,
|
187
|
-
args: [{ selector: 'vl-flow-
|
188
|
-
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.
|
169
|
+
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"] }]
|
170
|
+
}], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
189
171
|
type: Optional
|
190
172
|
}, {
|
191
173
|
type: Inject,
|
192
174
|
args: [FLOW_CUSTOMIZATION]
|
193
175
|
}] }]; } });
|
194
176
|
|
195
|
-
class
|
177
|
+
class FlowNewHeaderModule {
|
196
178
|
}
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
179
|
+
FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
180
|
+
FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
|
181
|
+
FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
|
201
183
|
type: NgModule,
|
202
184
|
args: [{
|
203
|
-
declarations: [
|
185
|
+
declarations: [FlowHeaderComponent],
|
204
186
|
imports: [CommonModule, PreviewModule],
|
205
|
-
exports: [
|
187
|
+
exports: [FlowHeaderComponent],
|
206
188
|
}]
|
207
189
|
}] });
|
208
190
|
|
@@ -319,118 +301,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
319
301
|
}]
|
320
302
|
}] });
|
321
303
|
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
.pipe(tap(uiDef => {
|
349
|
-
if (!uiDef) {
|
350
|
-
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
351
|
-
}
|
352
|
-
this.uiDefinition$.next(uiDef);
|
353
|
-
}), catchError(err => {
|
354
|
-
const message = 'Failed to resolve Flow Header component. ' + (err.message ?? '');
|
355
|
-
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
356
|
-
return of();
|
357
|
-
}), takeUntil(this.destroy$))
|
358
|
-
.subscribe();
|
359
|
-
}
|
360
|
-
getLocalMeta$() {
|
361
|
-
if (!this.customizationService?.getTemplateComponents) {
|
362
|
-
return of(undefined);
|
363
|
-
}
|
364
|
-
return this.customizationService?.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
365
|
-
if (!components) {
|
366
|
-
return;
|
304
|
+
const configurePrimengShadowDOM = () => {
|
305
|
+
DomHandler.getScrollableParents = (element) => {
|
306
|
+
const scrollableParents = [];
|
307
|
+
if (element) {
|
308
|
+
const parents = DomHandler.getParents(element).filter((item) => !(item instanceof ShadowRoot));
|
309
|
+
const overflowRegex = /(auto|scroll)/;
|
310
|
+
const overflowCheck = (node) => {
|
311
|
+
const styleDeclaration = window['getComputedStyle'](node, null);
|
312
|
+
return (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) ||
|
313
|
+
overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) ||
|
314
|
+
overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
|
315
|
+
};
|
316
|
+
for (const parent of parents) {
|
317
|
+
const scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
|
318
|
+
if (scrollSelectors) {
|
319
|
+
const selectors = scrollSelectors.split(',');
|
320
|
+
for (const selector of selectors) {
|
321
|
+
const el = DomHandler.findSingle(parent, selector);
|
322
|
+
if (el && overflowCheck(el)) {
|
323
|
+
scrollableParents.push(el);
|
324
|
+
}
|
325
|
+
}
|
326
|
+
}
|
327
|
+
if (parent.nodeType !== 9 && overflowCheck(parent)) {
|
328
|
+
scrollableParents.push(parent);
|
329
|
+
}
|
367
330
|
}
|
368
|
-
return components.map(component => ({
|
369
|
-
html: component.html,
|
370
|
-
css: component.css,
|
371
|
-
js: component.js,
|
372
|
-
json: component.json,
|
373
|
-
}));
|
374
|
-
}));
|
375
|
-
}
|
376
|
-
getOrgMeta$() {
|
377
|
-
const template = this.flowInfo.templates.FLOW_HEADER;
|
378
|
-
if (!template) {
|
379
|
-
return of(undefined);
|
380
331
|
}
|
381
|
-
return
|
382
|
-
}
|
383
|
-
|
384
|
-
return of(undefined).pipe(tap(() => {
|
385
|
-
if (!this.templateApiName) {
|
386
|
-
throw new Error("Flow 'flowHeader' template is not defined.");
|
387
|
-
}
|
388
|
-
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
389
|
-
if (!metaList) {
|
390
|
-
return;
|
391
|
-
}
|
392
|
-
const uiDef = {
|
393
|
-
name: '',
|
394
|
-
createdTimestamp: 0,
|
395
|
-
primary: true,
|
396
|
-
type: 'DEFAULT',
|
397
|
-
version: 2,
|
398
|
-
children: metaList.map(meta => ({
|
399
|
-
children: [],
|
400
|
-
template: meta.html && btoaSafe(meta.html),
|
401
|
-
script: meta.js && btoaSafe(meta.js),
|
402
|
-
styles: meta.css && btoaSafe(meta.css),
|
403
|
-
})),
|
404
|
-
};
|
405
|
-
return uiDef;
|
406
|
-
}));
|
407
|
-
}
|
408
|
-
}
|
409
|
-
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 });
|
410
|
-
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 });
|
411
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
412
|
-
type: Component,
|
413
|
-
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"] }]
|
414
|
-
}], ctorParameters: function () { 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
|
-
class FlowNewHeaderModule {
|
422
|
-
}
|
423
|
-
FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
424
|
-
FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
|
425
|
-
FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
|
426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
|
427
|
-
type: NgModule,
|
428
|
-
args: [{
|
429
|
-
declarations: [FlowHeaderComponent],
|
430
|
-
imports: [CommonModule, PreviewModule],
|
431
|
-
exports: [FlowHeaderComponent],
|
432
|
-
}]
|
433
|
-
}] });
|
332
|
+
return scrollableParents;
|
333
|
+
};
|
334
|
+
};
|
434
335
|
|
435
336
|
class FlowDialogService {
|
436
337
|
constructor(dialogService, contextService, runtimeSettings) {
|
@@ -516,35 +417,6 @@ class FlowDialogService {
|
|
516
417
|
primaryButton: 'Ok',
|
517
418
|
});
|
518
419
|
}
|
519
|
-
showDocgenAccountUnsavedChangesDialog() {
|
520
|
-
return this.show({
|
521
|
-
title: 'Save Quote',
|
522
|
-
description: 'To generate a document, save the quote first, and then generate the document from the Shopping Cart.',
|
523
|
-
primaryButton: 'Ok',
|
524
|
-
});
|
525
|
-
}
|
526
|
-
showDocgenReadonlyDialog() {
|
527
|
-
return this.show({
|
528
|
-
title: 'Document Generation is not Available',
|
529
|
-
description: 'It is only possible to generate documents for quotes with the “Draft” status. Please create a new quote to generate a document.',
|
530
|
-
primaryButton: 'Ok',
|
531
|
-
});
|
532
|
-
}
|
533
|
-
showDocgenOutsideShoppingCartDialog() {
|
534
|
-
return this.show({
|
535
|
-
title: 'Document Generation is not Available',
|
536
|
-
description: 'It is only possible to generate documents for quotes from the Shopping Cart. To proceed, go to the Shopping Cart.',
|
537
|
-
primaryButton: 'Ok',
|
538
|
-
});
|
539
|
-
}
|
540
|
-
showDocgenUnsavedChangesDialog() {
|
541
|
-
return this.show({
|
542
|
-
title: 'Unsaved Changes',
|
543
|
-
description: 'To generate a document, save the quote first.',
|
544
|
-
primaryButton: 'Save and proceed',
|
545
|
-
secondaryButton: 'Cancel',
|
546
|
-
});
|
547
|
-
}
|
548
420
|
showTermsLimitReachedDialog() {
|
549
421
|
const shoppingCartSettings = mapShoppingCartSettings(this.runtimeSettings.getShoppingCartSettings() || []);
|
550
422
|
const maxRenewalTerms = getMaxRenewalTermsValue(shoppingCartSettings);
|
@@ -919,10 +791,10 @@ class FlowComponent {
|
|
919
791
|
}
|
920
792
|
}
|
921
793
|
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
|
794
|
+
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", 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: GuidedSellingComponent, selector: "vl-flow-guided-selling" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
923
795
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
|
924
796
|
type: Component,
|
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
|
797
|
+
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", 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
798
|
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
|
927
799
|
|
928
800
|
const getFlowObjectIdPropertyName = (id) => {
|
@@ -1470,6 +1342,8 @@ class ProductComponent {
|
|
1470
1342
|
return quoteDraft$.pipe(first(), switchMap(quote => {
|
1471
1343
|
const contextProperties = this.contextService.resolve().properties;
|
1472
1344
|
const productId = contextProperties.productId ?? this.flowInfoService.flow?.properties.queryParams['productId'];
|
1345
|
+
const defaultUIDefinitionId = this.flowInfoService.flow?.properties.queryParams['defaultUIDefinitionId'];
|
1346
|
+
const requiredUIDefinitionId = this.flowInfoService.flow?.properties.queryParams['requiredUIDefinitionId'];
|
1473
1347
|
if (!productId) {
|
1474
1348
|
throw new Error(`Unable to start configuration for 'productId == null'`);
|
1475
1349
|
}
|
@@ -1482,7 +1356,12 @@ class ProductComponent {
|
|
1482
1356
|
this.configurationService.setConfigurableRamp(lineItem);
|
1483
1357
|
}
|
1484
1358
|
const { offeringId } = lineItem ?? {};
|
1485
|
-
return this.configurationRuntimeService.init({
|
1359
|
+
return this.configurationRuntimeService.init({
|
1360
|
+
productId,
|
1361
|
+
offeringId,
|
1362
|
+
defaultUIDefinitionId,
|
1363
|
+
requiredUIDefinitionId,
|
1364
|
+
});
|
1486
1365
|
}), switchMap(() => this.customizeUI$()), tap(() => {
|
1487
1366
|
const uiDefinition = this.configurationRuntimeService.runtimeContext?.uiDefinitionContainer?.source;
|
1488
1367
|
if (uiDefinition) {
|
@@ -2243,66 +2122,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2243
2122
|
}]
|
2244
2123
|
}] });
|
2245
2124
|
|
2246
|
-
class FlowDocGenService {
|
2247
|
-
constructor(integrationState) {
|
2248
|
-
this.integrationState = integrationState;
|
2249
|
-
this.cleanup$ = new Subject();
|
2250
|
-
this.isVisibleSubj$ = new BehaviorSubject(false);
|
2251
|
-
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
2252
|
-
this.initSubscriptions();
|
2253
|
-
}
|
2254
|
-
cleanup() {
|
2255
|
-
this.cleanup$.next();
|
2256
|
-
}
|
2257
|
-
initSubscriptions() {
|
2258
|
-
this.integrationState
|
2259
|
-
.listen$(FlowAction.FLOW_OPEN_DOC_GEN)
|
2260
|
-
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
2261
|
-
.subscribe();
|
2262
|
-
this.integrationState
|
2263
|
-
.listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
|
2264
|
-
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
2265
|
-
.subscribe();
|
2266
|
-
}
|
2267
|
-
}
|
2268
|
-
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
2269
|
-
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
|
2270
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
|
2271
|
-
type: Injectable
|
2272
|
-
}], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
|
2273
|
-
|
2274
|
-
const configurePrimengShadowDOM = () => {
|
2275
|
-
DomHandler.getScrollableParents = (element) => {
|
2276
|
-
const scrollableParents = [];
|
2277
|
-
if (element) {
|
2278
|
-
const parents = DomHandler.getParents(element).filter((item) => !(item instanceof ShadowRoot));
|
2279
|
-
const overflowRegex = /(auto|scroll)/;
|
2280
|
-
const overflowCheck = (node) => {
|
2281
|
-
const styleDeclaration = window['getComputedStyle'](node, null);
|
2282
|
-
return (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) ||
|
2283
|
-
overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) ||
|
2284
|
-
overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
|
2285
|
-
};
|
2286
|
-
for (const parent of parents) {
|
2287
|
-
const scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
|
2288
|
-
if (scrollSelectors) {
|
2289
|
-
const selectors = scrollSelectors.split(',');
|
2290
|
-
for (const selector of selectors) {
|
2291
|
-
const el = DomHandler.findSingle(parent, selector);
|
2292
|
-
if (el && overflowCheck(el)) {
|
2293
|
-
scrollableParents.push(el);
|
2294
|
-
}
|
2295
|
-
}
|
2296
|
-
}
|
2297
|
-
if (parent.nodeType !== 9 && overflowCheck(parent)) {
|
2298
|
-
scrollableParents.push(parent);
|
2299
|
-
}
|
2300
|
-
}
|
2301
|
-
}
|
2302
|
-
return scrollableParents;
|
2303
|
-
};
|
2304
|
-
};
|
2305
|
-
|
2306
2125
|
configurePrimengShadowDOM();
|
2307
2126
|
class FlowModule {
|
2308
2127
|
}
|
@@ -2316,9 +2135,8 @@ FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15
|
|
2316
2135
|
FlowNewHeaderModule,
|
2317
2136
|
FlowDialogModule,
|
2318
2137
|
SdkCoreModule,
|
2319
|
-
DocGenModule,
|
2320
2138
|
GuidedSellingModule] });
|
2321
|
-
FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService,
|
2139
|
+
FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowGuidedSellingService], imports: [CommonModule,
|
2322
2140
|
LetDirectiveModule,
|
2323
2141
|
FlowRoutingModule,
|
2324
2142
|
ApiModule,
|
@@ -2327,7 +2145,6 @@ FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15
|
|
2327
2145
|
FlowNewHeaderModule,
|
2328
2146
|
FlowDialogModule,
|
2329
2147
|
SdkCoreModule,
|
2330
|
-
DocGenModule,
|
2331
2148
|
GuidedSellingModule] });
|
2332
2149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, decorators: [{
|
2333
2150
|
type: NgModule,
|
@@ -2343,10 +2160,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2343
2160
|
FlowNewHeaderModule,
|
2344
2161
|
FlowDialogModule,
|
2345
2162
|
SdkCoreModule,
|
2346
|
-
DocGenModule,
|
2347
2163
|
GuidedSellingModule,
|
2348
2164
|
],
|
2349
|
-
providers: [FlowService, FlowDialogService,
|
2165
|
+
providers: [FlowService, FlowDialogService, FlowGuidedSellingService],
|
2350
2166
|
}]
|
2351
2167
|
}] });
|
2352
2168
|
|