@veloceapps/sdk 8.0.0-14 → 8.0.0-15
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2020/src/components/doc-gen/doc-gen.component.mjs +10 -14
- package/esm2020/src/components/guided-selling/guided-selling.component.mjs +9 -12
- package/fesm2015/veloceapps-sdk.mjs +67 -70
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +67 -70
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/doc-gen/doc-gen.component.d.ts +3 -6
- package/src/components/guided-selling/guided-selling.component.d.ts +2 -4
@@ -1,20 +1,20 @@
|
|
1
1
|
import * as i4 from '@angular/common';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Component, ChangeDetectionStrategy, NgModule,
|
4
|
+
import { Component, ChangeDetectionStrategy, NgModule, InjectionToken, Optional, Inject, Injectable, ViewChild, Input } from '@angular/core';
|
5
5
|
import * as i2 from '@veloceapps/api';
|
6
6
|
import { ApiModule } from '@veloceapps/api';
|
7
7
|
import * as i3$1 from '@veloceapps/components';
|
8
8
|
import { ToastType, LetDirectiveModule, QuantityControlModule, ErrorTooltipModule, HiddenTextTooltipModule, LoaderModule, EmptyStateModule } from '@veloceapps/components';
|
9
9
|
import * as i5 from '@veloceapps/sdk/cms';
|
10
|
-
import {
|
10
|
+
import { extractElementMetadata, extendElementMetadata, PreviewModule, FlowAction, LauncherModule } from '@veloceapps/sdk/cms';
|
11
11
|
import * as i1$1 from '@veloceapps/sdk/core';
|
12
12
|
import { isLineItemModified, getOriginParent, SdkPipesModule, RuntimeOperation, generateModifiedAssetsMap, 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 { UITemplateComponentType, UITemplateType, SalesforceIdUtils, ConfigurationContextMode, EntityUtil, isLegacyUIDefinition, getUIDefinitionProperties, UUID } from '@veloceapps/core';
|
17
|
-
import { Subject,
|
17
|
+
import { BehaviorSubject, Subject, first, tap, takeUntil, catchError, of, map, switchMap, filter, shareReplay, startWith, distinctUntilChanged, combineLatest, finalize, noop, forkJoin, from, throwError } from 'rxjs';
|
18
18
|
import * as i7 from 'primeng/overlaypanel';
|
19
19
|
import { OverlayPanel, OverlayPanelModule } from 'primeng/overlaypanel';
|
20
20
|
import * as i13 from 'primeng/splitbutton';
|
@@ -93,48 +93,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
93
93
|
}]
|
94
94
|
}] });
|
95
95
|
|
96
|
-
class FlowDocGenService {
|
97
|
-
constructor(integrationState) {
|
98
|
-
this.integrationState = integrationState;
|
99
|
-
this.cleanup$ = new Subject();
|
100
|
-
this.isVisibleSubj$ = new BehaviorSubject(false);
|
101
|
-
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
102
|
-
this.initSubscriptions();
|
103
|
-
}
|
104
|
-
cleanup() {
|
105
|
-
this.cleanup$.next();
|
106
|
-
}
|
107
|
-
initSubscriptions() {
|
108
|
-
this.integrationState
|
109
|
-
.listen$(FlowAction.FLOW_OPEN_DOC_GEN)
|
110
|
-
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
111
|
-
.subscribe();
|
112
|
-
this.integrationState
|
113
|
-
.listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
|
114
|
-
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
115
|
-
.subscribe();
|
116
|
-
}
|
117
|
-
}
|
118
|
-
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
119
|
-
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService });
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService, decorators: [{
|
121
|
-
type: Injectable
|
122
|
-
}], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
|
123
|
-
|
124
96
|
const FLOW_CUSTOMIZATION = new InjectionToken('FLOW_CUSTOMIZATION');
|
125
97
|
|
126
98
|
class DocGenComponent {
|
127
|
-
constructor(quoteDraftService, contextService, templatesApi,
|
99
|
+
constructor(quoteDraftService, contextService, templatesApi, toastService, customizationService) {
|
128
100
|
this.quoteDraftService = quoteDraftService;
|
129
101
|
this.contextService = contextService;
|
130
102
|
this.templatesApi = templatesApi;
|
131
|
-
this.docGenService = docGenService;
|
132
103
|
this.toastService = toastService;
|
133
104
|
this.customizationService = customizationService;
|
134
105
|
this.uiDefinition$ = new BehaviorSubject(null);
|
135
106
|
this.templateApiName = '';
|
136
107
|
this.destroy$ = new Subject();
|
137
|
-
this.isVisible$ = this.docGenService.isVisible$;
|
138
108
|
// initialize when quote draft requested
|
139
109
|
this.quoteDraftService.quoteDraft$
|
140
110
|
.pipe(first(), tap(() => this.initialize()), takeUntil(this.destroy$))
|
@@ -225,12 +195,12 @@ class DocGenComponent {
|
|
225
195
|
}));
|
226
196
|
}
|
227
197
|
}
|
228
|
-
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2.UITemplatesApiService }, { token:
|
229
|
-
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: DocGenComponent, selector: "vl-flow-doc-gen", ngImport: i0, template: "<ng-container *ngIf=\"
|
198
|
+
DocGenComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocGenComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2.UITemplatesApiService }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
199
|
+
DocGenComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", 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 });
|
230
200
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: DocGenComponent, decorators: [{
|
231
201
|
type: Component,
|
232
|
-
args: [{ selector: 'vl-flow-doc-gen', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"
|
233
|
-
}], ctorParameters: function () { return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2.UITemplatesApiService }, { type:
|
202
|
+
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"] }]
|
203
|
+
}], ctorParameters: function () { return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2.UITemplatesApiService }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
|
234
204
|
type: Optional
|
235
205
|
}, {
|
236
206
|
type: Inject,
|
@@ -251,40 +221,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
251
221
|
}]
|
252
222
|
}] });
|
253
223
|
|
254
|
-
class FlowGuidedSellingService {
|
255
|
-
constructor(integrationState) {
|
256
|
-
this.integrationState = integrationState;
|
257
|
-
this.cleanup$ = new Subject();
|
258
|
-
this.isVisibleSubj$ = new BehaviorSubject(true);
|
259
|
-
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
260
|
-
this.initSubscriptions();
|
261
|
-
}
|
262
|
-
cleanup() {
|
263
|
-
this.cleanup$.next();
|
264
|
-
}
|
265
|
-
initSubscriptions() {
|
266
|
-
this.integrationState
|
267
|
-
.listen$(FlowAction.OPEN_GUIDED_SELLING)
|
268
|
-
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
269
|
-
.subscribe();
|
270
|
-
this.integrationState
|
271
|
-
.listen$(FlowAction.CLOSE_GUIDED_SELLING)
|
272
|
-
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
273
|
-
.subscribe();
|
274
|
-
}
|
275
|
-
}
|
276
|
-
FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
277
|
-
FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService });
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
|
279
|
-
type: Injectable
|
280
|
-
}], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
|
281
|
-
|
282
224
|
class GuidedSellingComponent {
|
283
|
-
constructor(quoteDraftService, contextService, templatesApi,
|
225
|
+
constructor(quoteDraftService, contextService, templatesApi, toastService, customizationService) {
|
284
226
|
this.quoteDraftService = quoteDraftService;
|
285
227
|
this.contextService = contextService;
|
286
228
|
this.templatesApi = templatesApi;
|
287
|
-
this.guidedSellingService = guidedSellingService;
|
288
229
|
this.toastService = toastService;
|
289
230
|
this.customizationService = customizationService;
|
290
231
|
this.uiDefinition$ = new BehaviorSubject(null);
|
@@ -369,12 +310,12 @@ class GuidedSellingComponent {
|
|
369
310
|
}));
|
370
311
|
}
|
371
312
|
}
|
372
|
-
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2.UITemplatesApiService }, { token:
|
313
|
+
GuidedSellingComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingComponent, deps: [{ token: i1$1.QuoteDraftService }, { token: i1$1.ContextService }, { token: i2.UITemplatesApiService }, { token: i3$1.ToastService }, { token: FLOW_CUSTOMIZATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
373
314
|
GuidedSellingComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.8", type: GuidedSellingComponent, selector: "vl-flow-guided-selling", ngImport: i0, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"], dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i5.PreviewComponent, selector: "vl-cms-preview", inputs: ["uiDefinition", "config"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
374
315
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: GuidedSellingComponent, decorators: [{
|
375
316
|
type: Component,
|
376
317
|
args: [{ selector: 'vl-flow-guided-selling', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"uiDefinition$ | async as uiDefinition\">\n <vl-cms-preview [uiDefinition]=\"uiDefinition\"></vl-cms-preview>\n</ng-container>\n", styles: [":host,vl-cms-preview{display:contents}\n"] }]
|
377
|
-
}], ctorParameters: function () { return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2.UITemplatesApiService }, { type:
|
318
|
+
}], ctorParameters: function () { return [{ type: i1$1.QuoteDraftService }, { type: i1$1.ContextService }, { type: i2.UITemplatesApiService }, { type: i3$1.ToastService }, { type: undefined, decorators: [{
|
378
319
|
type: Optional
|
379
320
|
}, {
|
380
321
|
type: Inject,
|
@@ -1529,6 +1470,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
1529
1470
|
type: Injectable
|
1530
1471
|
}], ctorParameters: function () { return [{ type: i5.IntegrationState }, { type: FlowRouterService }, { type: i1$1.QuoteDraftService }, { type: i1$1.ConfigurationService }, { type: i1$1.FlowConfigurationService }]; } });
|
1531
1472
|
|
1473
|
+
class FlowDocGenService {
|
1474
|
+
constructor(integrationState) {
|
1475
|
+
this.integrationState = integrationState;
|
1476
|
+
this.cleanup$ = new Subject();
|
1477
|
+
this.isVisibleSubj$ = new BehaviorSubject(false);
|
1478
|
+
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
1479
|
+
this.initSubscriptions();
|
1480
|
+
}
|
1481
|
+
cleanup() {
|
1482
|
+
this.cleanup$.next();
|
1483
|
+
}
|
1484
|
+
initSubscriptions() {
|
1485
|
+
this.integrationState
|
1486
|
+
.listen$(FlowAction.FLOW_OPEN_DOC_GEN)
|
1487
|
+
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
1488
|
+
.subscribe();
|
1489
|
+
this.integrationState
|
1490
|
+
.listen$(FlowAction.FLOW_CLOSE_DOC_GEN)
|
1491
|
+
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
1492
|
+
.subscribe();
|
1493
|
+
}
|
1494
|
+
}
|
1495
|
+
FlowDocGenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
1496
|
+
FlowDocGenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService });
|
1497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowDocGenService, decorators: [{
|
1498
|
+
type: Injectable
|
1499
|
+
}], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
|
1500
|
+
|
1532
1501
|
class FlowComponent {
|
1533
1502
|
constructor(routerService, quoteDraftService, flowService, docGenService, integrationState) {
|
1534
1503
|
this.routerService = routerService;
|
@@ -3030,6 +2999,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImpor
|
|
3030
2999
|
}]
|
3031
3000
|
}] });
|
3032
3001
|
|
3002
|
+
class FlowGuidedSellingService {
|
3003
|
+
constructor(integrationState) {
|
3004
|
+
this.integrationState = integrationState;
|
3005
|
+
this.cleanup$ = new Subject();
|
3006
|
+
this.isVisibleSubj$ = new BehaviorSubject(true);
|
3007
|
+
this.isVisible$ = this.isVisibleSubj$.asObservable();
|
3008
|
+
this.initSubscriptions();
|
3009
|
+
}
|
3010
|
+
cleanup() {
|
3011
|
+
this.cleanup$.next();
|
3012
|
+
}
|
3013
|
+
initSubscriptions() {
|
3014
|
+
this.integrationState
|
3015
|
+
.listen$(FlowAction.OPEN_GUIDED_SELLING)
|
3016
|
+
.pipe(tap(() => this.isVisibleSubj$.next(true)), takeUntil(this.cleanup$))
|
3017
|
+
.subscribe();
|
3018
|
+
this.integrationState
|
3019
|
+
.listen$(FlowAction.CLOSE_GUIDED_SELLING)
|
3020
|
+
.pipe(tap(() => this.isVisibleSubj$.next(false)), takeUntil(this.cleanup$))
|
3021
|
+
.subscribe();
|
3022
|
+
}
|
3023
|
+
}
|
3024
|
+
FlowGuidedSellingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService, deps: [{ token: i5.IntegrationState }], target: i0.ɵɵFactoryTarget.Injectable });
|
3025
|
+
FlowGuidedSellingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService });
|
3026
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowGuidedSellingService, decorators: [{
|
3027
|
+
type: Injectable
|
3028
|
+
}], ctorParameters: function () { return [{ type: i5.IntegrationState }]; } });
|
3029
|
+
|
3033
3030
|
class FlowModule {
|
3034
3031
|
}
|
3035
3032
|
FlowModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.8", ngImport: i0, type: FlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|