@veloceapps/sdk 9.0.0-17 → 9.0.0-18
Sign up to get free protection for your applications and to get access to all the features.
- package/core/services/quote-draft.service.d.ts +3 -1
- package/esm2020/core/services/quote-draft.service.mjs +13 -8
- package/fesm2015/veloceapps-sdk-core.mjs +10 -6
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +9 -6
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/package.json +1 -1
@@ -317,8 +317,9 @@ class QuoteDraftService {
|
|
317
317
|
get assetsState() {
|
318
318
|
return this.assetsSubj$.value;
|
319
319
|
}
|
320
|
-
constructor(context, accountApiService, quoteApiService) {
|
320
|
+
constructor(context, flowInfoService, accountApiService, quoteApiService) {
|
321
321
|
this.context = context;
|
322
|
+
this.flowInfoService = flowInfoService;
|
322
323
|
this.accountApiService = accountApiService;
|
323
324
|
this.quoteApiService = quoteApiService;
|
324
325
|
this.quoteSubj$ = new BehaviorSubject(null);
|
@@ -343,7 +344,9 @@ class QuoteDraftService {
|
|
343
344
|
const ctx = this.context.resolve();
|
344
345
|
const isAccountMode = this.context.mode === ConfigurationContextMode.ACCOUNT;
|
345
346
|
const accountId = isAccountMode ? headerId : ctx.properties.AccountId;
|
346
|
-
return zip(accountId ? this.accountApiService.getAssetsState(accountId, params) : of(null), isAccountMode
|
347
|
+
return zip(accountId ? this.accountApiService.getAssetsState(accountId, params) : of(null), isAccountMode
|
348
|
+
? of(QuoteDraft.emptyQuote(ConfigurationContextMode.ACCOUNT))
|
349
|
+
: this.quoteApiService.getQuoteState(headerId, params)).pipe(tap(([assets, quote]) => {
|
347
350
|
if (assets) {
|
348
351
|
this.assetsSubj$.next(assets);
|
349
352
|
}
|
@@ -422,10 +425,10 @@ class QuoteDraftService {
|
|
422
425
|
return this.quoteDraft?.currentState ?? [];
|
423
426
|
}
|
424
427
|
get isStandalone() {
|
425
|
-
return this.
|
428
|
+
return this.flowInfoService.flow?.properties.standalone ?? false;
|
426
429
|
}
|
427
430
|
get isStandalone$() {
|
428
|
-
return this.
|
431
|
+
return this.flowInfoService.flow$.pipe(map(() => this.isStandalone));
|
429
432
|
}
|
430
433
|
getInitialCurrentState() {
|
431
434
|
return this.initialCurrentState;
|
@@ -452,11 +455,11 @@ class QuoteDraftService {
|
|
452
455
|
}
|
453
456
|
}
|
454
457
|
}
|
455
|
-
QuoteDraftService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, deps: [{ token: ContextService }, { token: i1.AccountApiService }, { token: i1.QuoteApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
458
|
+
QuoteDraftService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, deps: [{ token: ContextService }, { token: FlowInfoService }, { token: i1.AccountApiService }, { token: i1.QuoteApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
456
459
|
QuoteDraftService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService });
|
457
460
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: QuoteDraftService, decorators: [{
|
458
461
|
type: Injectable
|
459
|
-
}], ctorParameters: function () { return [{ type: ContextService }, { type: i1.AccountApiService }, { type: i1.QuoteApiService }]; } });
|
462
|
+
}], ctorParameters: function () { return [{ type: ContextService }, { type: FlowInfoService }, { type: i1.AccountApiService }, { type: i1.QuoteApiService }]; } });
|
460
463
|
|
461
464
|
class FlowStateService {
|
462
465
|
constructor(contextService, quoteDraftService, flowInfoService, flowConfiguration, processorsApiService, flowStateApiService, quoteApiService, toastService, customizationService) {
|