@veloceapps/sdk 11.0.0-0 → 11.0.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/cms/cms.actions.d.ts +0 -52
  2. package/cms/vendor-map.d.ts +1 -16
  3. package/core/modules/configuration/services/configuration-state.service.d.ts +0 -4
  4. package/core/types/flow-customization.types.d.ts +0 -12
  5. package/esm2020/cms/cms.actions.mjs +1 -52
  6. package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
  7. package/esm2020/cms/vendor-map.mjs +2 -3
  8. package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +2 -3
  9. package/esm2020/core/services/flow-info.service.mjs +1 -3
  10. package/esm2020/core/types/flow-customization.types.mjs +1 -1
  11. package/esm2020/src/flow.component.mjs +4 -5
  12. package/esm2020/src/flow.module.mjs +5 -10
  13. package/esm2020/src/services/flow-dialog.service.mjs +1 -30
  14. package/fesm2015/veloceapps-sdk-cms.mjs +5 -66
  15. package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
  16. package/fesm2015/veloceapps-sdk-core.mjs +1 -4
  17. package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
  18. package/fesm2015/veloceapps-sdk.mjs +57 -248
  19. package/fesm2015/veloceapps-sdk.mjs.map +1 -1
  20. package/fesm2020/veloceapps-sdk-cms.mjs +5 -66
  21. package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
  22. package/fesm2020/veloceapps-sdk-core.mjs +1 -4
  23. package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
  24. package/fesm2020/veloceapps-sdk.mjs +57 -248
  25. package/fesm2020/veloceapps-sdk.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/src/flow.module.d.ts +2 -3
  28. package/src/services/flow-dialog.service.d.ts +0 -4
  29. package/esm2020/src/components/doc-gen/doc-gen.component.mjs +0 -129
  30. package/esm2020/src/components/doc-gen/doc-gen.module.mjs +0 -19
  31. package/esm2020/src/services/doc-gen.service.mjs +0 -34
  32. package/src/components/doc-gen/doc-gen.component.d.ts +0 -26
  33. package/src/components/doc-gen/doc-gen.module.d.ts +0 -9
  34. 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 { extractElementMetadata, extendElementMetadata, btoaSafe, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
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 DocGenComponent {
79
- constructor(templatesApi, contextService, flowStateService, flowInfo, toastService, customizationService) {
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?.docGen ?? '';
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 DocGen component. ' + (err.message ?? '');
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.DOCGEN;
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 'docGen' template is not defined.");
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: patchedMetaList.map(child => ({
154
+ children: metaList.map(meta => ({
173
155
  children: [],
174
- template: child.html && btoaSafe(child.html),
175
- script: child.js && btoaSafe(child.js),
176
- styles: child.css && btoaSafe(child.css),
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
- 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 });
184
- 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 });
185
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenComponent, decorators: [{
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-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"] }]
188
- }], ctorParameters: function () { return [{ type: i1$1.UITemplatesApiService }, { type: i2.ContextService }, { type: i2.FlowStateService }, { type: i2.FlowInfoService }, { type: i2$1.ToastService }, { type: undefined, decorators: [{
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 DocGenModule {
177
+ class FlowNewHeaderModule {
196
178
  }
197
- DocGenModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
198
- DocGenModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, declarations: [DocGenComponent], imports: [CommonModule, PreviewModule], exports: [DocGenComponent] });
199
- DocGenModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, imports: [CommonModule, PreviewModule] });
200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DocGenModule, decorators: [{
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: [DocGenComponent],
185
+ declarations: [FlowHeaderComponent],
204
186
  imports: [CommonModule, PreviewModule],
205
- exports: [DocGenComponent],
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
- class FlowHeaderComponent {
323
- constructor(templatesApi, flowStateService, flowInfo, toastService, customizationService) {
324
- this.templatesApi = templatesApi;
325
- this.flowStateService = flowStateService;
326
- this.flowInfo = flowInfo;
327
- this.toastService = toastService;
328
- this.customizationService = customizationService;
329
- this.uiDefinition$ = new BehaviorSubject(null);
330
- this.templateApiName = '';
331
- this.destroy$ = new Subject();
332
- // wait until flow is initialized
333
- this.flowStateService
334
- .isInitialized$()
335
- .pipe(filter(Boolean), first(), tap(() => this.initialize()), takeUntil(this.destroy$))
336
- .subscribe();
337
- }
338
- ngOnDestroy() {
339
- this.destroy$.next();
340
- this.destroy$.complete();
341
- }
342
- initialize() {
343
- this.templateApiName = this.flowInfo.flow?.properties.templates?.flowHeader ?? '';
344
- if (this.flowInfo.isLegacy && !this.templateApiName) {
345
- return;
346
- }
347
- this.generateUIDefinition$()
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 this.templatesApi.fetchComponentsAttachments$(template.id);
382
- }
383
- generateUIDefinition$() {
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\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 });
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\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"] }]
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) => {
@@ -2243,66 +2115,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2243
2115
  }]
2244
2116
  }] });
2245
2117
 
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
2118
  configurePrimengShadowDOM();
2307
2119
  class FlowModule {
2308
2120
  }
@@ -2316,9 +2128,8 @@ FlowModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15
2316
2128
  FlowNewHeaderModule,
2317
2129
  FlowDialogModule,
2318
2130
  SdkCoreModule,
2319
- DocGenModule,
2320
2131
  GuidedSellingModule] });
2321
- FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowDocGenService, FlowGuidedSellingService], imports: [CommonModule,
2132
+ FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, providers: [FlowService, FlowDialogService, FlowGuidedSellingService], imports: [CommonModule,
2322
2133
  LetDirectiveModule,
2323
2134
  FlowRoutingModule,
2324
2135
  ApiModule,
@@ -2327,7 +2138,6 @@ FlowModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15
2327
2138
  FlowNewHeaderModule,
2328
2139
  FlowDialogModule,
2329
2140
  SdkCoreModule,
2330
- DocGenModule,
2331
2141
  GuidedSellingModule] });
2332
2142
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: FlowModule, decorators: [{
2333
2143
  type: NgModule,
@@ -2343,10 +2153,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
2343
2153
  FlowNewHeaderModule,
2344
2154
  FlowDialogModule,
2345
2155
  SdkCoreModule,
2346
- DocGenModule,
2347
2156
  GuidedSellingModule,
2348
2157
  ],
2349
- providers: [FlowService, FlowDialogService, FlowDocGenService, FlowGuidedSellingService],
2158
+ providers: [FlowService, FlowDialogService, FlowGuidedSellingService],
2350
2159
  }]
2351
2160
  }] });
2352
2161