@veloceapps/sdk 11.0.0-0 → 11.0.0-1
Sign up to get free protection for your applications and to get access to all the features.
- package/cms/cms.actions.d.ts +0 -12
- package/cms/vendor-map.d.ts +1 -4
- package/esm2020/cms/cms.actions.mjs +1 -17
- package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
- package/esm2020/cms/vendor-map.mjs +2 -3
- package/esm2020/core/services/flow-info.service.mjs +1 -3
- package/esm2020/src/flow.component.mjs +4 -5
- package/esm2020/src/flow.module.mjs +5 -10
- package/esm2020/src/services/flow-dialog.service.mjs +1 -30
- package/fesm2015/veloceapps-sdk-cms.mjs +4 -23
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +0 -2
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +57 -248
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +4 -23
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +0 -2
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +57 -248
- 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 { UITemplateType, SalesforceIdUtils, mapShoppingCartSettings, getMaxRenewalTermsValue, 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;
|
@@ -98,7 +97,7 @@ class DocGenComponent {
|
|
98
97
|
}
|
99
98
|
initialize() {
|
100
99
|
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.
|
100
|
+
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 : '';
|
102
101
|
if (this.flowInfo.isLegacy && !this.templateApiName) {
|
103
102
|
return;
|
104
103
|
}
|
@@ -110,7 +109,7 @@ class DocGenComponent {
|
|
110
109
|
this.uiDefinition$.next(uiDef);
|
111
110
|
}), catchError(err => {
|
112
111
|
var _a;
|
113
|
-
const message = 'Failed to resolve
|
112
|
+
const message = 'Failed to resolve Flow Header component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
114
113
|
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
115
114
|
return of();
|
116
115
|
}), takeUntil(this.destroy$))
|
@@ -134,7 +133,7 @@ class DocGenComponent {
|
|
134
133
|
}));
|
135
134
|
}
|
136
135
|
getOrgMeta$() {
|
137
|
-
const template = this.flowInfo.templates.
|
136
|
+
const template = this.flowInfo.templates.FLOW_HEADER;
|
138
137
|
if (!template) {
|
139
138
|
return of(undefined);
|
140
139
|
}
|
@@ -143,48 +142,36 @@ class DocGenComponent {
|
|
143
142
|
generateUIDefinition$() {
|
144
143
|
return of(undefined).pipe(tap(() => {
|
145
144
|
if (!this.templateApiName) {
|
146
|
-
throw new Error("Flow '
|
145
|
+
throw new Error("Flow 'flowHeader' template is not defined.");
|
147
146
|
}
|
148
147
|
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
149
|
-
var _a;
|
150
148
|
if (!metaList) {
|
151
149
|
return;
|
152
150
|
}
|
153
|
-
const headerId = (_a = this.contextService.resolve().properties.Id) !== null && _a !== void 0 ? _a : null;
|
154
|
-
const patchedMetaList = metaList.map(component => {
|
155
|
-
if (!component.js) {
|
156
|
-
return component;
|
157
|
-
}
|
158
|
-
const metadata = extractElementMetadata(component.js);
|
159
|
-
const script = extendElementMetadata(component.js, {
|
160
|
-
inputs: Object.assign(Object.assign({}, metadata.inputs), { Id: headerId ? `"${headerId}"` : null }),
|
161
|
-
});
|
162
|
-
return Object.assign(Object.assign({}, component), { js: script });
|
163
|
-
});
|
164
151
|
const uiDef = {
|
165
152
|
name: '',
|
166
153
|
createdTimestamp: 0,
|
167
154
|
primary: true,
|
168
155
|
type: 'DEFAULT',
|
169
156
|
version: 2,
|
170
|
-
children:
|
157
|
+
children: metaList.map(meta => ({
|
171
158
|
children: [],
|
172
|
-
template:
|
173
|
-
script:
|
174
|
-
styles:
|
159
|
+
template: meta.html && btoaSafe(meta.html),
|
160
|
+
script: meta.js && btoaSafe(meta.js),
|
161
|
+
styles: meta.css && btoaSafe(meta.css),
|
175
162
|
})),
|
176
163
|
};
|
177
164
|
return uiDef;
|
178
165
|
}));
|
179
166
|
}
|
180
167
|
}
|
181
|
-
|
182
|
-
|
183
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
168
|
+
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 });
|
169
|
+
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 });
|
170
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
184
171
|
type: Component,
|
185
|
-
args: [{ selector: 'vl-flow-
|
172
|
+
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"] }]
|
186
173
|
}], ctorParameters: function () {
|
187
|
-
return [{ type: i1$1.UITemplatesApiService }, { type: i2.
|
174
|
+
return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
188
175
|
type: Optional
|
189
176
|
}, {
|
190
177
|
type: Inject,
|
@@ -192,17 +179,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
192
179
|
}] }];
|
193
180
|
} });
|
194
181
|
|
195
|
-
class
|
182
|
+
class FlowNewHeaderModule {
|
196
183
|
}
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type:
|
184
|
+
FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
185
|
+
FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
|
186
|
+
FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
|
201
188
|
type: NgModule,
|
202
189
|
args: [{
|
203
|
-
declarations: [
|
190
|
+
declarations: [FlowHeaderComponent],
|
204
191
|
imports: [CommonModule, PreviewModule],
|
205
|
-
exports: [
|
192
|
+
exports: [FlowHeaderComponent],
|
206
193
|
}]
|
207
194
|
}] });
|
208
195
|
|
@@ -324,123 +311,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
324
311
|
}]
|
325
312
|
}] });
|
326
313
|
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
this.generateUIDefinition$()
|
354
|
-
.pipe(tap(uiDef => {
|
355
|
-
if (!uiDef) {
|
356
|
-
throw new Error(`Component with name '${this.templateApiName}' not found.`);
|
357
|
-
}
|
358
|
-
this.uiDefinition$.next(uiDef);
|
359
|
-
}), catchError(err => {
|
360
|
-
var _a;
|
361
|
-
const message = 'Failed to resolve Flow Header component. ' + ((_a = err.message) !== null && _a !== void 0 ? _a : '');
|
362
|
-
this.toastService.add({ severity: ToastType.error, summary: message, sticky: true });
|
363
|
-
return of();
|
364
|
-
}), takeUntil(this.destroy$))
|
365
|
-
.subscribe();
|
366
|
-
}
|
367
|
-
getLocalMeta$() {
|
368
|
-
var _a, _b;
|
369
|
-
if (!((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getTemplateComponents)) {
|
370
|
-
return of(undefined);
|
371
|
-
}
|
372
|
-
return (_b = this.customizationService) === null || _b === void 0 ? void 0 : _b.getTemplateComponents(this.templateApiName).pipe(map(components => {
|
373
|
-
if (!components) {
|
374
|
-
return;
|
314
|
+
const configurePrimengShadowDOM = () => {
|
315
|
+
DomHandler.getScrollableParents = (element) => {
|
316
|
+
const scrollableParents = [];
|
317
|
+
if (element) {
|
318
|
+
const parents = DomHandler.getParents(element).filter((item) => !(item instanceof ShadowRoot));
|
319
|
+
const overflowRegex = /(auto|scroll)/;
|
320
|
+
const overflowCheck = (node) => {
|
321
|
+
const styleDeclaration = window['getComputedStyle'](node, null);
|
322
|
+
return (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) ||
|
323
|
+
overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) ||
|
324
|
+
overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
|
325
|
+
};
|
326
|
+
for (const parent of parents) {
|
327
|
+
const scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
|
328
|
+
if (scrollSelectors) {
|
329
|
+
const selectors = scrollSelectors.split(',');
|
330
|
+
for (const selector of selectors) {
|
331
|
+
const el = DomHandler.findSingle(parent, selector);
|
332
|
+
if (el && overflowCheck(el)) {
|
333
|
+
scrollableParents.push(el);
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}
|
337
|
+
if (parent.nodeType !== 9 && overflowCheck(parent)) {
|
338
|
+
scrollableParents.push(parent);
|
339
|
+
}
|
375
340
|
}
|
376
|
-
return components.map(component => ({
|
377
|
-
html: component.html,
|
378
|
-
css: component.css,
|
379
|
-
js: component.js,
|
380
|
-
json: component.json,
|
381
|
-
}));
|
382
|
-
}));
|
383
|
-
}
|
384
|
-
getOrgMeta$() {
|
385
|
-
const template = this.flowInfo.templates.FLOW_HEADER;
|
386
|
-
if (!template) {
|
387
|
-
return of(undefined);
|
388
341
|
}
|
389
|
-
return
|
390
|
-
}
|
391
|
-
|
392
|
-
return of(undefined).pipe(tap(() => {
|
393
|
-
if (!this.templateApiName) {
|
394
|
-
throw new Error("Flow 'flowHeader' template is not defined.");
|
395
|
-
}
|
396
|
-
}), switchMap(() => this.getLocalMeta$()), switchMap(metaList => (metaList ? of(metaList) : this.getOrgMeta$())), map(metaList => {
|
397
|
-
if (!metaList) {
|
398
|
-
return;
|
399
|
-
}
|
400
|
-
const uiDef = {
|
401
|
-
name: '',
|
402
|
-
createdTimestamp: 0,
|
403
|
-
primary: true,
|
404
|
-
type: 'DEFAULT',
|
405
|
-
version: 2,
|
406
|
-
children: metaList.map(meta => ({
|
407
|
-
children: [],
|
408
|
-
template: meta.html && btoaSafe(meta.html),
|
409
|
-
script: meta.js && btoaSafe(meta.js),
|
410
|
-
styles: meta.css && btoaSafe(meta.css),
|
411
|
-
})),
|
412
|
-
};
|
413
|
-
return uiDef;
|
414
|
-
}));
|
415
|
-
}
|
416
|
-
}
|
417
|
-
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 });
|
418
|
-
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 });
|
419
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowHeaderComponent, decorators: [{
|
420
|
-
type: Component,
|
421
|
-
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"] }]
|
422
|
-
}], ctorParameters: function () {
|
423
|
-
return [{ type: i1$1.UITemplatesApiService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
|
424
|
-
type: Optional
|
425
|
-
}, {
|
426
|
-
type: Inject,
|
427
|
-
args: [FLOW_CUSTOMIZATION]
|
428
|
-
}] }];
|
429
|
-
} });
|
430
|
-
|
431
|
-
class FlowNewHeaderModule {
|
432
|
-
}
|
433
|
-
FlowNewHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
434
|
-
FlowNewHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, declarations: [FlowHeaderComponent], imports: [CommonModule, PreviewModule], exports: [FlowHeaderComponent] });
|
435
|
-
FlowNewHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, imports: [CommonModule, PreviewModule] });
|
436
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowNewHeaderModule, decorators: [{
|
437
|
-
type: NgModule,
|
438
|
-
args: [{
|
439
|
-
declarations: [FlowHeaderComponent],
|
440
|
-
imports: [CommonModule, PreviewModule],
|
441
|
-
exports: [FlowHeaderComponent],
|
442
|
-
}]
|
443
|
-
}] });
|
342
|
+
return scrollableParents;
|
343
|
+
};
|
344
|
+
};
|
444
345
|
|
445
346
|
class FlowRouterService {
|
446
347
|
constructor(router, route, contextService, integrationState, flowInfoService, flowStateService) {
|
@@ -708,35 +609,6 @@ class FlowDialogService {
|
|
708
609
|
primaryButton: 'Ok',
|
709
610
|
});
|
710
611
|
}
|
711
|
-
showDocgenAccountUnsavedChangesDialog() {
|
712
|
-
return this.show({
|
713
|
-
title: 'Save Quote',
|
714
|
-
description: 'To generate a document, save the quote first, and then generate the document from the Shopping Cart.',
|
715
|
-
primaryButton: 'Ok',
|
716
|
-
});
|
717
|
-
}
|
718
|
-
showDocgenReadonlyDialog() {
|
719
|
-
return this.show({
|
720
|
-
title: 'Document Generation is not Available',
|
721
|
-
description: 'It is only possible to generate documents for quotes with the “Draft” status. Please create a new quote to generate a document.',
|
722
|
-
primaryButton: 'Ok',
|
723
|
-
});
|
724
|
-
}
|
725
|
-
showDocgenOutsideShoppingCartDialog() {
|
726
|
-
return this.show({
|
727
|
-
title: 'Document Generation is not Available',
|
728
|
-
description: 'It is only possible to generate documents for quotes from the Shopping Cart. To proceed, go to the Shopping Cart.',
|
729
|
-
primaryButton: 'Ok',
|
730
|
-
});
|
731
|
-
}
|
732
|
-
showDocgenUnsavedChangesDialog() {
|
733
|
-
return this.show({
|
734
|
-
title: 'Unsaved Changes',
|
735
|
-
description: 'To generate a document, save the quote first.',
|
736
|
-
primaryButton: 'Save and proceed',
|
737
|
-
secondaryButton: 'Cancel',
|
738
|
-
});
|
739
|
-
}
|
740
612
|
showTermsLimitReachedDialog() {
|
741
613
|
const shoppingCartSettings = mapShoppingCartSettings(this.runtimeSettings.getShoppingCartSettings() || []);
|
742
614
|
const maxRenewalTerms = getMaxRenewalTermsValue(shoppingCartSettings);
|
@@ -931,10 +803,10 @@ class FlowComponent {
|
|
931
803
|
}
|
932
804
|
}
|
933
805
|
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 });
|
934
|
-
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
|
806
|
+
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 });
|
935
807
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowComponent, decorators: [{
|
936
808
|
type: Component,
|
937
|
-
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
|
809
|
+
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"] }]
|
938
810
|
}], ctorParameters: function () { return [{ type: FlowRouterService }, { type: FlowService }, { type: i2.FlowInfoService }, { type: FlowGuidedSellingService }]; } });
|
939
811
|
|
940
812
|
const getFlowObjectIdPropertyName = (id) => {
|
@@ -2269,66 +2141,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2269
2141
|
}]
|
2270
2142
|
}] });
|
2271
2143
|
|
2272
|
-
class FlowDocGenService {
|
2273
|
-
constructor(integrationState) {
|
2274
|
-
this.integrationState = integrationState;
|
2275
|
-
this.cleanup$ = new Subject();
|
2276
|
-
this.isVisibleSubj$ = new BehaviorSubject(false);
|
2277
|
-
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
2278
|
-
this.initSubscriptions();
|
2279
|
-
}
|
2280
|
-
cleanup() {
|
2281
|
-
this.cleanup$.next();
|
2282
|
-
}
|
2283
|
-
initSubscriptions() {
|
2284
|
-
this.integrationState
|
2285
|
-
.listen$(FlowAction.FLOW_OPEN_DOC_GEN)
|
2286
|
-
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
2287
|
-
.subscribe();
|
2288
|
-
this.integrationState
|
2289
|
-
.listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
|
2290
|
-
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
2291
|
-
.subscribe();
|
2292
|
-
}
|
2293
|
-
}
|
2294
|
-
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, deps: [{ token: i2.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
2295
|
-
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService });
|
2296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowDocGenService, decorators: [{
|
2297
|
-
type: Injectable
|
2298
|
-
}], ctorParameters: function () { return [{ type: i2.IntegrationState }]; } });
|
2299
|
-
|
2300
|
-
const configurePrimengShadowDOM = () => {
|
2301
|
-
DomHandler.getScrollableParents = (element) => {
|
2302
|
-
const scrollableParents = [];
|
2303
|
-
if (element) {
|
2304
|
-
const parents = DomHandler.getParents(element).filter((item) => !(item instanceof ShadowRoot));
|
2305
|
-
const overflowRegex = /(auto|scroll)/;
|
2306
|
-
const overflowCheck = (node) => {
|
2307
|
-
const styleDeclaration = window['getComputedStyle'](node, null);
|
2308
|
-
return (overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) ||
|
2309
|
-
overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) ||
|
2310
|
-
overflowRegex.test(styleDeclaration.getPropertyValue('overflowY')));
|
2311
|
-
};
|
2312
|
-
for (const parent of parents) {
|
2313
|
-
const scrollSelectors = parent.nodeType === 1 && parent.dataset['scrollselectors'];
|
2314
|
-
if (scrollSelectors) {
|
2315
|
-
const selectors = scrollSelectors.split(',');
|
2316
|
-
for (const selector of selectors) {
|
2317
|
-
const el = DomHandler.findSingle(parent, selector);
|
2318
|
-
if (el && overflowCheck(el)) {
|
2319
|
-
scrollableParents.push(el);
|
2320
|
-
}
|
2321
|
-
}
|
2322
|
-
}
|
2323
|
-
if (parent.nodeType !== 9 && overflowCheck(parent)) {
|
2324
|
-
scrollableParents.push(parent);
|
2325
|
-
}
|
2326
|
-
}
|
2327
|
-
}
|
2328
|
-
return scrollableParents;
|
2329
|
-
};
|
2330
|
-
};
|
2331
|
-
|
2332
2144
|
configurePrimengShadowDOM();
|
2333
2145
|
class FlowModule {
|
2334
2146
|
}
|
@@ -2342,9 +2154,8 @@ FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15
|
|
2342
2154
|
FlowNewHeaderModule,
|
2343
2155
|
FlowDialogModule,
|
2344
2156
|
SdkCoreModule,
|
2345
|
-
DocGenModule,
|
2346
2157
|
GuidedSellingModule] });
|
2347
|
-
FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService,
|
2158
|
+
FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowGuidedSellingService], imports: [CommonModule,
|
2348
2159
|
LetDirectiveModule,
|
2349
2160
|
FlowRoutingModule,
|
2350
2161
|
ApiModule,
|
@@ -2353,7 +2164,6 @@ FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15
|
|
2353
2164
|
FlowNewHeaderModule,
|
2354
2165
|
FlowDialogModule,
|
2355
2166
|
SdkCoreModule,
|
2356
|
-
DocGenModule,
|
2357
2167
|
GuidedSellingModule] });
|
2358
2168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, decorators: [{
|
2359
2169
|
type: NgModule,
|
@@ -2369,10 +2179,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
2369
2179
|
FlowNewHeaderModule,
|
2370
2180
|
FlowDialogModule,
|
2371
2181
|
SdkCoreModule,
|
2372
|
-
DocGenModule,
|
2373
2182
|
GuidedSellingModule,
|
2374
2183
|
],
|
2375
|
-
providers: [FlowService, FlowDialogService,
|
2184
|
+
providers: [FlowService, FlowDialogService, FlowGuidedSellingService],
|
2376
2185
|
}]
|
2377
2186
|
}] });
|
2378
2187
|
|