@veloceapps/sdk 11.0.0-8 → 11.0.0-81
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.
- package/cms/cms.actions.d.ts +92 -29
- package/cms/components/element-renderer/element-renderer.component.d.ts +3 -10
- package/cms/components/preview/preview.component.d.ts +5 -6
- package/cms/components/preview/preview.types.d.ts +0 -4
- package/cms/services/element-context.service.d.ts +0 -1
- package/cms/types/common.types.d.ts +2 -0
- package/cms/types/index.d.ts +0 -1
- package/cms/utils/path.utils.d.ts +1 -2
- package/cms/vendor-map.d.ts +17 -40
- package/core/index.d.ts +1 -1
- package/core/modules/configuration/index.d.ts +3 -4
- package/core/modules/configuration/services/configuration-runtime.service.d.ts +8 -19
- package/core/modules/configuration/services/configuration-state.service.d.ts +8 -8
- package/core/modules/configuration/services/configuration.service.d.ts +23 -47
- package/core/modules/configuration/services/test-mode-configuration.service.d.ts +23 -0
- package/core/modules/configuration/types/configuration-runtime.types.d.ts +0 -5
- package/core/modules/configuration/types/configuration.types.d.ts +4 -2
- package/core/modules/configuration/types/index.d.ts +2 -0
- package/core/modules/flow-configuration/index.d.ts +0 -3
- package/core/modules/flow-configuration/services/flow-configuration.service.d.ts +11 -38
- package/core/operators/filter-successful-execute.operator.d.ts +3 -0
- package/core/operators/index.d.ts +1 -0
- package/core/services/catalog-products.service.d.ts +11 -0
- package/core/services/flow-info.service.d.ts +27 -12
- package/core/services/flow-state-configuration.service.d.ts +2 -8
- package/core/services/flow-state.service.d.ts +12 -24
- package/core/services/index.d.ts +3 -3
- package/core/services/integration.state.d.ts +1 -1
- package/core/services/product-images.service.d.ts +3 -3
- package/core/services/runtime-settings.service.d.ts +1 -1
- package/core/services/sales-transaction.service.d.ts +27 -0
- package/core/types/flow-customization.types.d.ts +2 -2
- package/core/types/flow-state.types.d.ts +2 -2
- package/core/types/index.d.ts +0 -1
- package/core/utils/index.d.ts +2 -2
- package/core/utils/transaction-item.utils.d.ts +7 -0
- package/core/utils/transaction-item.worker.d.ts +8 -0
- package/esm2020/cms/cms.actions.mjs +93 -71
- package/esm2020/cms/cms.default.mjs +2 -3
- package/esm2020/cms/components/element-renderer/element-renderer.component.mjs +7 -64
- package/esm2020/cms/components/element-tools-panel/element-tools-panel.component.mjs +3 -3
- package/esm2020/cms/components/preview/preview.component.mjs +19 -28
- package/esm2020/cms/components/preview/preview.types.mjs +1 -1
- package/esm2020/cms/services/element-context.service.mjs +1 -1
- package/esm2020/cms/types/common.types.mjs +1 -1
- package/esm2020/cms/types/index.mjs +1 -2
- package/esm2020/cms/utils/element.utils.mjs +3 -3
- package/esm2020/cms/utils/elements-resolver.mjs +16 -5
- package/esm2020/cms/utils/path.utils.mjs +1 -10
- package/esm2020/cms/vendor-map.mjs +17 -18
- package/esm2020/core/core.module.mjs +7 -7
- package/esm2020/core/index.mjs +2 -2
- package/esm2020/core/modules/configuration/configuration.module.mjs +14 -4
- package/esm2020/core/modules/configuration/index.mjs +4 -5
- package/esm2020/core/modules/configuration/services/configuration-runtime.service.mjs +16 -101
- package/esm2020/core/modules/configuration/services/configuration-state.service.mjs +69 -77
- package/esm2020/core/modules/configuration/services/configuration.service.mjs +109 -223
- package/esm2020/core/modules/configuration/services/test-mode-configuration.service.mjs +74 -0
- package/esm2020/core/modules/configuration/types/configuration-runtime.types.mjs +1 -1
- package/esm2020/core/modules/configuration/types/configuration.types.mjs +1 -1
- package/esm2020/core/modules/configuration/types/index.mjs +3 -0
- package/esm2020/core/modules/flow-configuration/flow-configuration.module.mjs +3 -4
- package/esm2020/core/modules/flow-configuration/index.mjs +1 -4
- package/esm2020/core/modules/flow-configuration/services/flow-configuration.service.mjs +44 -128
- package/esm2020/core/operators/filter-successful-execute.operator.mjs +5 -0
- package/esm2020/core/operators/index.mjs +2 -0
- package/esm2020/core/services/catalog-products.service.mjs +25 -0
- package/esm2020/core/services/flow-info.service.mjs +82 -31
- package/esm2020/core/services/flow-state-configuration.service.mjs +10 -25
- package/esm2020/core/services/flow-state.service.mjs +58 -180
- package/esm2020/core/services/index.mjs +4 -4
- package/esm2020/core/services/integration.state.mjs +2 -2
- package/esm2020/core/services/product-images.service.mjs +8 -8
- package/esm2020/core/services/runtime-settings.service.mjs +3 -3
- package/esm2020/core/services/sales-transaction.service.mjs +62 -0
- package/esm2020/core/types/flow-customization.types.mjs +1 -1
- package/esm2020/core/types/flow-state.types.mjs +1 -1
- package/esm2020/core/types/index.mjs +1 -2
- package/esm2020/core/utils/index.mjs +3 -3
- package/esm2020/core/utils/transaction-item.utils.mjs +60 -0
- package/esm2020/core/utils/transaction-item.worker.mjs +16 -0
- package/esm2020/src/components/flow-header/flow-header.component.mjs +8 -12
- package/esm2020/src/components/guided-selling/guided-selling.component.mjs +8 -12
- package/esm2020/src/flow-routing.module.mjs +12 -41
- package/esm2020/src/flow.component.mjs +5 -5
- package/esm2020/src/guards/flow.guard.mjs +13 -14
- package/esm2020/src/guards/product-unload.guard.mjs +7 -9
- package/esm2020/src/index.mjs +1 -3
- package/esm2020/src/pages/assets/assets.component.mjs +8 -9
- package/esm2020/src/pages/catalog/catalog.component.mjs +8 -9
- package/esm2020/src/pages/debug/debug.component.mjs +14 -23
- package/esm2020/src/pages/product/product.component.mjs +12 -89
- package/esm2020/src/pages/product/product.module.mjs +5 -5
- package/esm2020/src/pages/record-not-found/record-not-found.component.mjs +5 -6
- package/esm2020/src/pages/shopping-cart/shopping-cart.component.mjs +8 -9
- package/esm2020/src/resolvers/flow.resolver.mjs +10 -18
- package/esm2020/src/resolvers/pcm-model.resolver.mjs +12 -0
- package/esm2020/src/resolvers/sales-transaction.resolver.mjs +64 -0
- package/esm2020/src/resolvers/ui-definition.resolver.mjs +42 -0
- package/esm2020/src/services/flow-dialog.service.mjs +8 -8
- package/esm2020/src/services/flow-router.service.mjs +16 -33
- package/esm2020/src/services/flow.service.mjs +13 -54
- package/esm2020/src/types/index.mjs +2 -3
- package/esm2020/src/types/route.types.mjs +1 -1
- package/fesm2015/veloceapps-sdk-cms.mjs +162 -309
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +812 -1663
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +188 -801
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +158 -300
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +860 -1732
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +188 -795
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/flow-header/flow-header.component.d.ts +3 -3
- package/src/components/guided-selling/guided-selling.component.d.ts +3 -3
- package/src/flow-routing.module.d.ts +1 -2
- package/src/flow.component.d.ts +2 -2
- package/src/guards/product-unload.guard.d.ts +5 -6
- package/src/index.d.ts +0 -2
- package/src/pages/assets/assets.component.d.ts +3 -3
- package/src/pages/catalog/catalog.component.d.ts +3 -3
- package/src/pages/debug/debug.component.d.ts +2 -5
- package/src/pages/product/product.component.d.ts +5 -14
- package/src/pages/product/product.module.d.ts +1 -1
- package/src/pages/record-not-found/record-not-found.component.d.ts +2 -3
- package/src/pages/shopping-cart/shopping-cart.component.d.ts +3 -3
- package/src/resolvers/flow.resolver.d.ts +5 -6
- package/src/resolvers/pcm-model.resolver.d.ts +3 -0
- package/src/resolvers/sales-transaction.resolver.d.ts +18 -0
- package/src/resolvers/ui-definition.resolver.d.ts +3 -0
- package/src/services/flow-dialog.service.d.ts +5 -4
- package/src/services/flow-router.service.d.ts +4 -6
- package/src/services/flow.service.d.ts +2 -7
- package/src/types/index.d.ts +1 -2
- package/src/types/route.types.d.ts +0 -5
- package/cms/plugins/configuration.plugin.d.ts +0 -23
- package/cms/types/configuration.types.d.ts +0 -21
- package/core/modules/configuration/helpers.d.ts +0 -6
- package/core/modules/configuration/services/runtime-context.service.d.ts +0 -12
- package/core/modules/flow-configuration/services/flow-update.service.d.ts +0 -13
- package/core/modules/flow-configuration/types/update.types.d.ts +0 -12
- package/core/services/context.service.d.ts +0 -23
- package/core/services/quote-draft.service.d.ts +0 -50
- package/core/types/runtime.types.d.ts +0 -30
- package/core/utils/line-item.utils.d.ts +0 -25
- package/core/utils/line-item.worker.d.ts +0 -9
- package/esm2020/cms/plugins/configuration.plugin.mjs +0 -109
- package/esm2020/cms/types/configuration.types.mjs +0 -2
- package/esm2020/core/modules/configuration/helpers.mjs +0 -73
- package/esm2020/core/modules/configuration/services/runtime-context.service.mjs +0 -45
- package/esm2020/core/modules/flow-configuration/services/flow-update.service.mjs +0 -138
- package/esm2020/core/modules/flow-configuration/types/update.types.mjs +0 -2
- package/esm2020/core/services/context.service.mjs +0 -91
- package/esm2020/core/services/quote-draft.service.mjs +0 -192
- package/esm2020/core/types/runtime.types.mjs +0 -16
- package/esm2020/core/utils/line-item.utils.mjs +0 -187
- package/esm2020/core/utils/line-item.worker.mjs +0 -19
- package/esm2020/src/guards/context.guard.mjs +0 -91
- package/esm2020/src/guards/index.mjs +0 -2
- package/esm2020/src/pages/remote/remote.component.mjs +0 -342
- package/esm2020/src/pages/remote/remote.module.mjs +0 -20
- package/esm2020/src/pages/remote/remote.types.mjs +0 -2
- package/esm2020/src/resolvers/quote.resolver.mjs +0 -82
- package/esm2020/src/types/context-route.types.mjs +0 -2
- package/esm2020/src/types/metrics.types.mjs +0 -2
- package/esm2020/src/utils/flow.utils.mjs +0 -25
- package/esm2020/src/utils/index.mjs +0 -2
- package/src/guards/context.guard.d.ts +0 -19
- package/src/guards/index.d.ts +0 -1
- package/src/pages/remote/remote.component.d.ts +0 -46
- package/src/pages/remote/remote.module.d.ts +0 -10
- package/src/pages/remote/remote.types.d.ts +0 -4
- package/src/resolvers/quote.resolver.d.ts +0 -19
- package/src/types/context-route.types.d.ts +0 -5
- package/src/types/metrics.types.d.ts +0 -5
- package/src/utils/flow.utils.d.ts +0 -8
- package/src/utils/index.d.ts +0 -1
@@ -1,50 +1,23 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { Dictionary } from 'lodash';
|
1
|
+
import { OrchestrationsApiService } from '@veloceapps/api/v2';
|
2
|
+
import { TransactionContext } from '@veloceapps/core';
|
4
3
|
import { Observable } from 'rxjs';
|
5
|
-
import { ContextService } from '../../../services/context.service';
|
6
|
-
import { QuoteDraftService } from '../../../services/quote-draft.service';
|
7
|
-
import { ExternalConfigurationProps } from '../../configuration';
|
8
|
-
import { ConfigurationService } from '../../configuration/services/configuration.service';
|
9
|
-
import { FlowUpdateParams } from '../types/update.types';
|
10
|
-
import { FlowUpdateService } from './flow-update.service';
|
11
4
|
import { FlowInfoService } from '../../../services';
|
5
|
+
import { SalesTransactionService } from '../../../services/sales-transaction.service';
|
12
6
|
import * as i0 from "@angular/core";
|
13
7
|
export declare class FlowConfigurationService {
|
14
|
-
private
|
15
|
-
private
|
16
|
-
private quoteDraftService;
|
17
|
-
private updateService;
|
18
|
-
private configurationService;
|
8
|
+
private orchestrationsApiService;
|
9
|
+
private salesTransactionService;
|
19
10
|
private flowInfoService;
|
20
|
-
/**
|
21
|
-
* An event being fired when QuoteDraft was updated
|
22
|
-
*/
|
23
11
|
updated$: Observable<void>;
|
24
12
|
private updatedSubj$;
|
25
|
-
constructor(
|
26
|
-
calculate$(
|
27
|
-
calculate(
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
revert(lineItemId: string): void;
|
32
|
-
delete$(ids: string[]): Observable<QuoteDraft | null>;
|
13
|
+
constructor(orchestrationsApiService: OrchestrationsApiService, salesTransactionService: SalesTransactionService, flowInfoService: FlowInfoService);
|
14
|
+
calculate$(state: TransactionContext): Observable<void>;
|
15
|
+
calculate(state: TransactionContext): void;
|
16
|
+
revert$(transactionItemId: string): Observable<TransactionContext | null>;
|
17
|
+
revert(transactionItemId: string): void;
|
18
|
+
delete$(ids: string[]): Observable<TransactionContext | null>;
|
33
19
|
delete(ids: string[]): void;
|
34
|
-
addTerm$(term: LineItem): Observable<QuoteDraft | null>;
|
35
|
-
addToCart$(props: ExternalConfigurationProps): Observable<QuoteDraft | null>;
|
36
|
-
get(): Observable<LineItem[]>;
|
37
|
-
getSnapshot(): LineItem[];
|
38
|
-
get charges$(): Observable<Dictionary<Charge>>;
|
39
|
-
get pricePlans$(): Observable<Dictionary<CompiledPricePlan>>;
|
40
|
-
get activeMetrics$(): Observable<MetricRule[]>;
|
41
|
-
get chargesSnapshot(): Dictionary<Charge>;
|
42
|
-
get pricePlansSnapshot(): Dictionary<CompiledPricePlan>;
|
43
|
-
get activeMetricsSnapshot(): MetricRule[];
|
44
|
-
get contextSnapshot(): ConfigurationContext;
|
45
|
-
get context$(): Observable<ConfigurationContext>;
|
46
20
|
private handleErrorAndBounceBack;
|
47
|
-
private extendedApply$;
|
48
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowConfigurationService, never>;
|
49
22
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowConfigurationService>;
|
50
23
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './filter-successful-execute.operator';
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { CatalogProducts } from '@veloceapps/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class CatalogProductsService {
|
4
|
+
private stateSubj$;
|
5
|
+
state$: import("rxjs").Observable<CatalogProducts>;
|
6
|
+
get state(): CatalogProducts | null;
|
7
|
+
reset(): void;
|
8
|
+
setState(state: CatalogProducts): void;
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CatalogProductsService, never>;
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CatalogProductsService>;
|
11
|
+
}
|
@@ -1,29 +1,44 @@
|
|
1
1
|
import { Params } from '@angular/router';
|
2
|
-
import {
|
3
|
-
import { Flow, UITemplate, UITemplateType } from '@veloceapps/core';
|
2
|
+
import { UITemplatesAdminApiService } from '@veloceapps/api/v2';
|
3
|
+
import { Flow, FlowContext, UITemplate, UITemplateType } from '@veloceapps/core';
|
4
4
|
import { Observable } from 'rxjs';
|
5
|
-
import { FlowCustomization } from '../types';
|
5
|
+
import { FlowCustomization } from '../types/flow-customization.types';
|
6
|
+
import { RuntimeSettingsService } from './runtime-settings.service';
|
6
7
|
import * as i0 from "@angular/core";
|
7
8
|
export declare class FlowInfoService {
|
8
|
-
private
|
9
|
-
private
|
9
|
+
private runtimeSettingsService;
|
10
|
+
private templatesAdminApiService;
|
10
11
|
private customizationService?;
|
11
12
|
flow$: Observable<Flow | null>;
|
12
|
-
|
13
|
-
templates: {
|
13
|
+
templates$: Observable<{
|
14
14
|
[key in UITemplateType]?: UITemplate;
|
15
|
+
}>;
|
16
|
+
get flow(): Flow;
|
17
|
+
get isFlowInitialized(): boolean;
|
18
|
+
get context(): FlowContext;
|
19
|
+
get context$(): Observable<FlowContext>;
|
20
|
+
get templates(): {
|
21
|
+
SHOPPING_CART?: UITemplate | undefined;
|
22
|
+
CONFIGURATION_UI?: UITemplate | undefined;
|
23
|
+
CATALOG?: UITemplate | undefined;
|
24
|
+
GUIDED_SELLING?: UITemplate | undefined;
|
25
|
+
FLOW_ENGINE?: UITemplate | undefined;
|
26
|
+
FLOW_HEADER?: UITemplate | undefined;
|
15
27
|
};
|
16
|
-
get
|
17
|
-
set flow(value: Flow | null);
|
18
|
-
get isLegacy(): boolean;
|
28
|
+
get isFlowEngineInitialized$(): Observable<boolean>;
|
19
29
|
get isStateful(): boolean;
|
20
30
|
private readonly defaultTemplates;
|
21
31
|
private flowSubj$;
|
22
|
-
|
32
|
+
private templatesSubj$;
|
33
|
+
private contextSubj$;
|
34
|
+
constructor(runtimeSettingsService: RuntimeSettingsService, templatesAdminApiService: UITemplatesAdminApiService, customizationService?: FlowCustomization | undefined);
|
35
|
+
reset(): void;
|
23
36
|
init$(flowId: string, routeQueryParams: Params): Observable<void>;
|
24
|
-
|
37
|
+
updateContext(update: Partial<FlowContext>): void;
|
38
|
+
private initFlow$;
|
25
39
|
private initFlowTemplates$;
|
26
40
|
private remapTemplateName;
|
41
|
+
private getFlowContextMode;
|
27
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowInfoService, [null, null, { optional: true; }]>;
|
28
43
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowInfoService>;
|
29
44
|
}
|
@@ -1,18 +1,12 @@
|
|
1
|
-
import { FlowStateApiService } from '@veloceapps/api';
|
2
1
|
import { Observable } from 'rxjs';
|
3
|
-
import { NewConfigurationProps } from '../modules/configuration';
|
4
|
-
import { FlowConfigurationService } from '../modules/flow-configuration';
|
2
|
+
import { NewConfigurationProps } from '../modules/configuration/types/configuration.types';
|
5
3
|
import { FlowInfoService } from './flow-info.service';
|
6
4
|
import { FlowStateService } from './flow-state.service';
|
7
5
|
import * as i0 from "@angular/core";
|
8
6
|
export declare class FlowStateConfigurationService {
|
9
7
|
private flowInfoService;
|
10
|
-
private flowConfigurationService;
|
11
|
-
private flowStateApiService;
|
12
8
|
private flowStateService;
|
13
|
-
|
14
|
-
constructor(flowInfoService: FlowInfoService, flowConfigurationService: FlowConfigurationService, flowStateApiService: FlowStateApiService, flowStateService: FlowStateService);
|
15
|
-
get configurationStateId(): string | null;
|
9
|
+
constructor(flowInfoService: FlowInfoService, flowStateService: FlowStateService);
|
16
10
|
addToCart$(props: NewConfigurationProps): Observable<void>;
|
17
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowStateConfigurationService, never>;
|
18
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowStateConfigurationService>;
|
@@ -1,29 +1,23 @@
|
|
1
|
-
import {
|
1
|
+
import { FlowStateApiService } from '@veloceapps/api';
|
2
|
+
import { ConfigurationProcessorsApiService, SalesTransactionApiService } from '@veloceapps/api/v2';
|
2
3
|
import { ToastService } from '@veloceapps/components';
|
3
|
-
import {
|
4
|
-
import { Dictionary } from 'lodash';
|
4
|
+
import { FlowStateExecutionRequest, FlowStateExecutionRequestDTO, FlowStateExecutionResult, FlowStateSelectorResponse, UITemplateType } from '@veloceapps/core';
|
5
5
|
import { Observable } from 'rxjs';
|
6
6
|
import { FlowConfigurationService } from '../modules';
|
7
7
|
import { FlowCustomization } from '../types/flow-customization.types';
|
8
8
|
import { FlowStateSubscriptionOptions } from '../types/flow-state.types';
|
9
|
-
import { ContextService } from './context.service';
|
10
9
|
import { FlowInfoService } from './flow-info.service';
|
11
|
-
import {
|
10
|
+
import { SalesTransactionService } from './sales-transaction.service';
|
12
11
|
import * as i0 from "@angular/core";
|
13
12
|
export declare class FlowStateService {
|
14
|
-
private contextService;
|
15
|
-
private quoteDraftService;
|
16
|
-
private flowInfoService;
|
17
13
|
private flowConfiguration;
|
18
|
-
private
|
14
|
+
private flowInfoService;
|
19
15
|
private flowStateApiService;
|
20
|
-
private
|
16
|
+
private processorsApiService;
|
17
|
+
private salesTransactionApiService;
|
18
|
+
private salesTransactionService;
|
21
19
|
private toastService;
|
22
20
|
private customizationService?;
|
23
|
-
charges$: Observable<Dictionary<Charge>>;
|
24
|
-
pricePlans$: Observable<Dictionary<CompiledPricePlan>>;
|
25
|
-
activeMetrics$: Observable<MetricRule[]>;
|
26
|
-
isPriceListLocked$: Observable<boolean>;
|
27
21
|
private readonly NOT_INITIALIZED;
|
28
22
|
private readonly EXECUTION_BUFFER_TIME;
|
29
23
|
private executedFunctions;
|
@@ -37,9 +31,9 @@ export declare class FlowStateService {
|
|
37
31
|
private statefulRequestStream$;
|
38
32
|
private statefulExecutionRequest$;
|
39
33
|
private cleanup$;
|
40
|
-
constructor(
|
34
|
+
constructor(flowConfiguration: FlowConfigurationService, flowInfoService: FlowInfoService, flowStateApiService: FlowStateApiService, processorsApiService: ConfigurationProcessorsApiService, salesTransactionApiService: SalesTransactionApiService, salesTransactionService: SalesTransactionService, toastService: ToastService, customizationService?: FlowCustomization | undefined);
|
41
35
|
init$(): Observable<void>;
|
42
|
-
|
36
|
+
reset(): void;
|
43
37
|
get hasUnsavedChanges(): boolean;
|
44
38
|
get stateId(): string | null;
|
45
39
|
get isExecutionInProgress$(): Observable<boolean>;
|
@@ -50,10 +44,7 @@ export declare class FlowStateService {
|
|
50
44
|
select$<Response = unknown>(scope: UITemplateType, selectorName: string, inputData?: unknown): Observable<FlowStateSelectorResponse<Response>>;
|
51
45
|
subscribe$<Response = unknown>(scope: UITemplateType, selectorName: string, inputData?: unknown, options?: FlowStateSubscriptionOptions): Observable<FlowStateSelectorResponse<Response>>;
|
52
46
|
save$(): Observable<{
|
53
|
-
|
54
|
-
}>;
|
55
|
-
submit$(): Observable<{
|
56
|
-
quoteId: string;
|
47
|
+
id: string;
|
57
48
|
}>;
|
58
49
|
getFlowStore(): Record<string, unknown>;
|
59
50
|
private getOwnerIdByScope;
|
@@ -65,18 +56,15 @@ export declare class FlowStateService {
|
|
65
56
|
private initBufferedRequest$;
|
66
57
|
private executeStateful$;
|
67
58
|
private initStateless$;
|
68
|
-
private calculate$;
|
69
59
|
private executeStateless$;
|
70
60
|
private executeStatelessActions;
|
71
61
|
private executeStatelessSelectors;
|
72
|
-
private getFlowSafe;
|
73
62
|
private initProcessors$;
|
74
63
|
private executeActionScript;
|
75
64
|
private executeSelectorScript;
|
76
65
|
private executeProcessorScript;
|
77
66
|
private generateRequestId;
|
78
|
-
private getDefaultExecutionRequestDTO;
|
79
67
|
private checkStatefulChanges;
|
80
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FlowStateService, [null, null, null, null, null, null, null,
|
68
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FlowStateService, [null, null, null, null, null, null, null, { optional: true; }]>;
|
81
69
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowStateService>;
|
82
70
|
}
|
package/core/services/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
export * from './context.service';
|
2
1
|
export * from './flow-info.service';
|
3
|
-
export * from './flow-state.service';
|
4
2
|
export * from './flow-state-configuration.service';
|
3
|
+
export * from './flow-state.service';
|
5
4
|
export * from './integration.state';
|
6
5
|
export * from './product-images.service';
|
7
|
-
export * from './quote-draft.service';
|
8
6
|
export * from './runtime-settings.service';
|
7
|
+
export * from './sales-transaction.service';
|
8
|
+
export * from './catalog-products.service';
|
@@ -10,7 +10,7 @@ export declare class IntegrationState<S = IntegrationStateModel> {
|
|
10
10
|
dispatch(action: IntegrationAction): void;
|
11
11
|
listen$<P = any>(actionType: string): Observable<P>;
|
12
12
|
listenAll$<T extends IntegrationAction>(): Observable<T>;
|
13
|
-
|
13
|
+
reset(): void;
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<IntegrationState<any>, never>;
|
15
15
|
static ɵprov: i0.ɵɵInjectableDeclaration<IntegrationState<any>>;
|
16
16
|
}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import {
|
1
|
+
import { ProductsAdminApiService } from '@veloceapps/api/v2';
|
2
2
|
import { Observable } from 'rxjs';
|
3
3
|
import * as i0 from "@angular/core";
|
4
4
|
export declare class ProductImagesService {
|
5
|
-
private
|
5
|
+
private productsAdminApiService;
|
6
6
|
private imagesMap$;
|
7
|
-
constructor(
|
7
|
+
constructor(productsAdminApiService: ProductsAdminApiService);
|
8
8
|
getImageUrl$(productId: string): Observable<string | null>;
|
9
9
|
private fetchProductImage;
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<ProductImagesService, never>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ConfigurationSettingsApiService } from '@veloceapps/api';
|
1
|
+
import { ConfigurationSettingsApiService } from '@veloceapps/api/v2';
|
2
2
|
import { RuntimeConfigurationSettings, RuntimeCurrencySettings, ShoppingCartSetting } from '@veloceapps/core';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
import { FormattingSettings } from '../types';
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { SalesTransactionApiService } from '@veloceapps/api/v2';
|
2
|
+
import { SalesTransactionItem, TransactionContext } from '@veloceapps/core';
|
3
|
+
import { Observable } from 'rxjs';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class SalesTransactionService {
|
6
|
+
private salesTransactionApiService;
|
7
|
+
private stateSubj$;
|
8
|
+
private isInitializedSubj$;
|
9
|
+
private hasUnsavedChangesSubj$;
|
10
|
+
private initialState;
|
11
|
+
hasUnsavedChanges$: Observable<boolean>;
|
12
|
+
state$: Observable<TransactionContext>;
|
13
|
+
get isInitialized$(): Observable<boolean>;
|
14
|
+
get isInitialized(): boolean;
|
15
|
+
set hasUnsavedChanges(value: boolean);
|
16
|
+
get hasUnsavedChanges(): boolean;
|
17
|
+
get state(): TransactionContext | null;
|
18
|
+
get hasProducts(): boolean;
|
19
|
+
constructor(salesTransactionApiService: SalesTransactionApiService);
|
20
|
+
init(headerId: string, params: Record<string, string>): Observable<TransactionContext>;
|
21
|
+
finalizeInit(): void;
|
22
|
+
reset(): void;
|
23
|
+
getInitialState(): SalesTransactionItem[];
|
24
|
+
setState(state: TransactionContext): void;
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SalesTransactionService, never>;
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SalesTransactionService>;
|
27
|
+
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
2
|
-
import { ConfigurationProcessor, TemplateComponentWithAttachments, UIDefinitionContainer, UITemplate } from '@veloceapps/core';
|
2
|
+
import { ConfigurationProcessor, FlowContext, TemplateComponentWithAttachments, UIDefinitionContainer, UITemplate } from '@veloceapps/core';
|
3
3
|
import { Observable } from 'rxjs';
|
4
4
|
export declare const FLOW_CUSTOMIZATION: InjectionToken<FlowCustomization>;
|
5
5
|
export interface FlowCustomization {
|
6
|
-
getUiDefinition?(
|
6
|
+
getUiDefinition?(flowContext: FlowContext): Observable<UIDefinitionContainer | null>;
|
7
7
|
getTemplates?(): Observable<UITemplate[]>;
|
8
8
|
getTemplateComponents?(templateName: string): Observable<TemplateComponentWithAttachments[] | null>;
|
9
9
|
getTemplateConfigurationProcessors?(templateName: string): Observable<ConfigurationProcessor[] | null>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { SalesTransactionItem } from '@veloceapps/core';
|
2
2
|
export interface FlowStateSubscriptionOptions {
|
3
3
|
/**
|
4
4
|
* When 'true', don't execute action to retrieve current value
|
@@ -7,6 +7,6 @@ export interface FlowStateSubscriptionOptions {
|
|
7
7
|
trackedChanges?: boolean;
|
8
8
|
}
|
9
9
|
export interface FlowStore {
|
10
|
-
assets?:
|
10
|
+
assets?: SalesTransactionItem[];
|
11
11
|
[key: string]: unknown;
|
12
12
|
}
|
package/core/types/index.d.ts
CHANGED
package/core/utils/index.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './
|
2
|
-
export * from './
|
1
|
+
export * from './transaction-item.utils';
|
2
|
+
export * from './transaction-item.worker';
|
3
3
|
export * from './ui-definition.utils';
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { SalesTransactionItem } from '@veloceapps/core';
|
2
|
+
export declare const findTransactionItem: (id: string, items: SalesTransactionItem[]) => SalesTransactionItem | undefined;
|
3
|
+
export declare const findTransactionItemWithComparator: (items: SalesTransactionItem[], comparator: (ti: SalesTransactionItem) => boolean) => SalesTransactionItem | undefined;
|
4
|
+
export declare const insertTransactionItem: (item: SalesTransactionItem, parentId: string, toInsert: SalesTransactionItem) => SalesTransactionItem;
|
5
|
+
export declare const removeTransactionItem: (item: SalesTransactionItem, idToRemove: string) => SalesTransactionItem;
|
6
|
+
export declare const replaceTransactionItem: (item: SalesTransactionItem, replaceTo: SalesTransactionItem) => SalesTransactionItem;
|
7
|
+
export declare const generateTransactionItem: (productId: string) => SalesTransactionItem;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { SalesTransactionItem } from '@veloceapps/core';
|
2
|
+
export declare class TransactionItemWorker {
|
3
|
+
ti: SalesTransactionItem;
|
4
|
+
constructor(src: SalesTransactionItem);
|
5
|
+
insert(parentId: string, toInsert: SalesTransactionItem): TransactionItemWorker;
|
6
|
+
remove(id: string): TransactionItemWorker;
|
7
|
+
replace(toReplace: SalesTransactionItem): TransactionItemWorker;
|
8
|
+
}
|