@roomle/embedding-lib 4.24.1-alpha.2 → 4.25.0-alpha.3
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/docs/api/README.md +1 -1
- package/docs/api/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +1 -1
- package/docs/api/classes/exposed_api.ExposedApi.md +38 -10
- package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +7 -7
- package/docs/api/classes/roomle_configurator_api.default.md +9 -9
- package/docs/api/enums/types.UI_BUTTON.md +48 -15
- package/docs/api/interfaces/exposed_callbacks.Labels.md +2 -2
- package/docs/api/interfaces/exposed_callbacks.Price.md +2 -2
- package/docs/api/interfaces/roomle_configurator_api.RoomleEmbeddingApiKeys.md +4 -4
- package/docs/api/interfaces/types.ConfiguratorSettings.md +5 -5
- package/docs/api/interfaces/types.EmbeddingSkin.md +5 -5
- package/docs/api/interfaces/types.UiInitData.md +58 -37
- package/docs/api/modules/roomle_configurator_api.md +3 -3
- package/docs/index.md +31 -0
- package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +6 -9
- package/package.json +28 -1
- package/roomle-configurator-api.cjs.js +48 -4
- package/roomle-configurator-api.cjs.min.js +1 -1
- package/roomle-configurator-api.es.js +48 -4
- package/roomle-configurator-api.es.min.js +1 -1
- package/roomle-configurator-api.js +48 -4
- package/types/index.d.ts +190 -129
- package/types/src/common/store/collection-view-state.d.ts +2 -2
- package/types/src/common/store/index.d.ts +6 -0
- package/types/src/common/utils/helper.d.ts +3 -0
- package/types/src/common/utils/types.d.ts +3 -2
- package/types/src/configurator/business-logic/sdk-connector.d.ts +1 -0
- package/types/src/configurator/components/-utils/overlays.d.ts +8 -8
- package/types/src/configurator/components/grid-view/-utils/GridViewHelper.d.ts +3 -0
- package/types/src/configurator/embedding/exposed-api.d.ts +10 -0
- package/types/src/configurator/embedding/types.d.ts +7 -1
- package/types/src/configurator/store/ui-state.d.ts +19 -3
- package/types/tests/helpers/data/variants.d.ts +60 -0
- package/types/tests/helpers/mocks/sdk-connector-planner.d.ts +13 -0
- package/types/tests/helpers/mocks/sdk-connector.d.ts +5 -0
- package/types/tests/integration/configurator/components/{overlays/PartList.spec.d.ts → parameters/types/ProductVariant.spec.d.ts} +0 -0
- package/types/tests/integration/planner/components/BottomBar.spec.d.ts +1 -0
|
@@ -3,7 +3,7 @@ import { Nullable } from '@/common/utils/types';
|
|
|
3
3
|
import { CollectionViewElement } from '@/configurator/components/collection-view/-utils/types';
|
|
4
4
|
import { StoreState } from '@/common/store';
|
|
5
5
|
export interface GridViewUiState {
|
|
6
|
-
filter:
|
|
6
|
+
filter: string[];
|
|
7
7
|
showAllAsList: boolean;
|
|
8
8
|
search: Nullable<string>;
|
|
9
9
|
userInitiatedSearch: boolean;
|
|
@@ -21,7 +21,7 @@ export declare enum COLLECTION_VIEW_STATE_MUTATIONS {
|
|
|
21
21
|
export declare enum GRID_VIEW_STATE_MUTATIONS {
|
|
22
22
|
SET_SEARCH = "GV_SET_SEARCH",
|
|
23
23
|
TOGGLE_LIST_DISPLAY_TYPE = "GV_TOGGLE_LIST_DISPLAY_TYPE",
|
|
24
|
-
|
|
24
|
+
TOGGLE_FILTER = "GV_TOGGLE_FILTER",
|
|
25
25
|
SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH"
|
|
26
26
|
}
|
|
27
27
|
interface MuationPayload<T, V> {
|
|
@@ -48,6 +48,11 @@ export declare const MUTATIONS: {
|
|
|
48
48
|
SET_SHOW_VARIANTS: UI_STATE_MUTATIONS.SET_SHOW_VARIANTS;
|
|
49
49
|
SET_EMAIL: UI_STATE_MUTATIONS.SET_EMAIL;
|
|
50
50
|
RESET_UI: UI_STATE_MUTATIONS.RESET_UI;
|
|
51
|
+
SET_LAST_SELECTED_VARIANT: UI_STATE_MUTATIONS.SET_LAST_SELECTED_VARIANT;
|
|
52
|
+
SET_UNDO: UI_STATE_MUTATIONS.SET_UNDO;
|
|
53
|
+
SET_REDO: UI_STATE_MUTATIONS.SET_REDO;
|
|
54
|
+
SET_UNDO_PLANNER: UI_STATE_MUTATIONS.SET_UNDO_PLANNER;
|
|
55
|
+
SET_REDO_PLANNER: UI_STATE_MUTATIONS.SET_REDO_PLANNER;
|
|
51
56
|
UPDATE_GROUPS: CORE_DATA_MUTATIONS.UPDATE_GROUPS;
|
|
52
57
|
UPDATE_PARAMETERS: CORE_DATA_MUTATIONS.UPDATE_PARAMETERS;
|
|
53
58
|
UPDATE_ADDONS: CORE_DATA_MUTATIONS.UPDATE_ADDONS;
|
|
@@ -72,6 +77,7 @@ export declare const ACTIONS: {
|
|
|
72
77
|
USE_VIEWER: UI_STATE_ACTIONS.USE_VIEWER;
|
|
73
78
|
USE_PLANNER: UI_STATE_ACTIONS.USE_PLANNER;
|
|
74
79
|
USE_CONFIGURATOR: UI_STATE_ACTIONS.USE_CONFIGURATOR;
|
|
80
|
+
SHOW_PARAMS: UI_STATE_ACTIONS.SHOW_PARAMS;
|
|
75
81
|
UPDATE_PRICE: CORE_DATA_ACTIONS.UPDATE_PRICE;
|
|
76
82
|
SET_LABEL: CORE_STATE_ACTIONS.SET_LABEL;
|
|
77
83
|
SET_COMPONENT_HAS_CHILDREN: CORE_STATE_ACTIONS.SET_COMPONENT_HAS_CHILDREN;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Nullable } from '@/common/utils/types';
|
|
2
2
|
import { RapiConfiguration, RapiItem, RapiTenant } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
3
|
+
import { Analytics } from '@/common/plugins/analytics';
|
|
4
|
+
import { SdkConnector } from '@/configurator/business-logic/sdk-connector';
|
|
3
5
|
export declare const throttle: <T extends (...args: any[]) => any>(func: T, delay?: number) => (...funcArgs: Parameters<T>) => void;
|
|
4
6
|
export declare const round: (float: number, precision: number) => number;
|
|
5
7
|
export declare const isIdAnItem: (id: string) => boolean;
|
|
@@ -58,3 +60,4 @@ export declare const oneTimeInterval: (callback: () => void, delay: number) => n
|
|
|
58
60
|
export declare const runOnIdle: any;
|
|
59
61
|
export declare const createShareLinkFromUrl: (url: string) => string;
|
|
60
62
|
export declare const isLocationJestTest: () => boolean;
|
|
63
|
+
export declare const loadVariant: (id: string, applyCurrentGlobalParameters: boolean, sdkConnector: SdkConnector, analytics?: Analytics | undefined) => Promise<void>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare enum OVERLAYS {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
NO_DOCKING = 0,
|
|
3
|
+
SAVE_DRAFT = 1,
|
|
4
|
+
VARIANT_WARNING = 2,
|
|
5
|
+
OPEN_AR = 3,
|
|
6
|
+
EXPORT_3D = 4,
|
|
7
|
+
ELEMENT_DISABLED = 5,
|
|
8
|
+
DELETE_WARNING = 6,
|
|
9
|
+
GENERIC_ERROR = 7
|
|
10
10
|
}
|
|
11
11
|
export interface OverlayState {
|
|
12
12
|
open: boolean;
|
|
@@ -5,6 +5,9 @@ export interface GridViewElement {
|
|
|
5
5
|
key: string;
|
|
6
6
|
payload: RapiMaterial | KernelValue | UiPossibleChild | RapiItem;
|
|
7
7
|
}
|
|
8
|
+
export interface GridViewVariantElement extends GridViewElement {
|
|
9
|
+
hash: string;
|
|
10
|
+
}
|
|
8
11
|
export interface GridViewGroup {
|
|
9
12
|
id: string;
|
|
10
13
|
label: Nullable<string>;
|
|
@@ -9,6 +9,7 @@ import { Analytics } from '@/common/plugins/analytics';
|
|
|
9
9
|
import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
|
|
10
10
|
import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
11
11
|
import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
12
|
+
import { Position3 } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
12
13
|
export declare class ExposedApi {
|
|
13
14
|
private _sdk;
|
|
14
15
|
private _exposedCallbacks;
|
|
@@ -27,6 +28,7 @@ export declare class ExposedApi {
|
|
|
27
28
|
/**
|
|
28
29
|
* call this method to load the configuration string you want into the 3d Scene
|
|
29
30
|
* @param configurationString string of the configuration, starts with `{` and ends with `}`
|
|
31
|
+
* @returns null if configuration can not be loaded
|
|
30
32
|
*/
|
|
31
33
|
loadConfigurationString(configurationString: string): Promise<Nullable<LoadResponse>>;
|
|
32
34
|
/**
|
|
@@ -74,6 +76,14 @@ export declare class ExposedApi {
|
|
|
74
76
|
* call this method if consent of Google Analytics is given later and not already in init-data on boot
|
|
75
77
|
*/
|
|
76
78
|
giveGaConsent(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Insert an object into the current MOC/planner scene
|
|
81
|
+
* If no position or rotation is set then it will be placed automatically (without overlapping other objects) with rotation 0
|
|
82
|
+
* @param id
|
|
83
|
+
* @param position as x (left/right), y (up/down) and z (front/back)
|
|
84
|
+
* @param rotation in radians
|
|
85
|
+
*/
|
|
86
|
+
insertObject(id: string, position?: Position3, rotation?: number): Promise<void>;
|
|
77
87
|
private _websiteReady;
|
|
78
88
|
private _handleMessage;
|
|
79
89
|
private _forwardSdkCallbacks;
|
|
@@ -15,7 +15,10 @@ export declare enum UI_BUTTON {
|
|
|
15
15
|
STARTCONFIGURE = "startconfigure",
|
|
16
16
|
PAUSECONFIGURE = "pauseconfigure",
|
|
17
17
|
EXPORT_3D = "export3d",
|
|
18
|
-
ROTATE = "rotate"
|
|
18
|
+
ROTATE = "rotate",
|
|
19
|
+
SNAPPING = "snapping",
|
|
20
|
+
UNDO = "undo",
|
|
21
|
+
REDO = "redo"
|
|
19
22
|
}
|
|
20
23
|
interface FeatureFlags {
|
|
21
24
|
realPartList?: boolean;
|
|
@@ -39,6 +42,9 @@ export interface UiInitData extends InitDataDefinition, GlobalInitDataDefinition
|
|
|
39
42
|
[UI_BUTTON.STARTCONFIGURE]?: boolean;
|
|
40
43
|
[UI_BUTTON.PAUSECONFIGURE]?: boolean;
|
|
41
44
|
[UI_BUTTON.EXPORT_3D]?: boolean;
|
|
45
|
+
[UI_BUTTON.SNAPPING]?: boolean;
|
|
46
|
+
[UI_BUTTON.UNDO]?: boolean;
|
|
47
|
+
[UI_BUTTON.REDO]?: boolean;
|
|
42
48
|
};
|
|
43
49
|
skin?: EmbeddingSkin;
|
|
44
50
|
zIndex?: number;
|
|
@@ -6,6 +6,7 @@ import { KernelComponent, UiPossibleChild } from '@roomle/web-sdk/lib/definition
|
|
|
6
6
|
import { OverlaysOpenState } from '@/configurator/components/-utils/overlays';
|
|
7
7
|
import { UiInitData } from '@/configurator/embedding/types';
|
|
8
8
|
import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
9
|
+
import { GridViewVariantElement } from '@/configurator/components/grid-view/-utils/GridViewHelper';
|
|
9
10
|
export declare enum BUTTON_ACTIONS {
|
|
10
11
|
AR = 0,
|
|
11
12
|
PARTLIST = 1,
|
|
@@ -14,7 +15,10 @@ export declare enum BUTTON_ACTIONS {
|
|
|
14
15
|
FULLSCREEN = 4,
|
|
15
16
|
RESET_CAMERA = 5,
|
|
16
17
|
RENDER_IMAGE = 6,
|
|
17
|
-
ROTATE = 7
|
|
18
|
+
ROTATE = 7,
|
|
19
|
+
SNAPPING = 8,
|
|
20
|
+
UNDO = 9,
|
|
21
|
+
REDO = 10
|
|
18
22
|
}
|
|
19
23
|
export interface SceneSelection {
|
|
20
24
|
selectionMode: string;
|
|
@@ -38,6 +42,11 @@ export interface UiState extends SharedUiState {
|
|
|
38
42
|
isConfigurator: boolean;
|
|
39
43
|
isPlanner: boolean;
|
|
40
44
|
email: Nullable<string>;
|
|
45
|
+
lastSelectedVariant: Nullable<GridViewVariantElement>;
|
|
46
|
+
undoEnabled: boolean;
|
|
47
|
+
redoEnabled: boolean;
|
|
48
|
+
undoEnabledPlanner: boolean;
|
|
49
|
+
redoEnabledPlanner: boolean;
|
|
41
50
|
}
|
|
42
51
|
export declare enum UI_STATE_MUTATIONS {
|
|
43
52
|
SET_SELECTED_GROUP = "setSelectedGroup",
|
|
@@ -61,7 +70,12 @@ export declare enum UI_STATE_MUTATIONS {
|
|
|
61
70
|
SET_CURRENT_VARIANTS = "SET_CURRENT_VARIANTS",
|
|
62
71
|
SET_SHOW_VARIANTS = "SET_SHOW_VARIANTS",
|
|
63
72
|
SET_EMAIL = "SET_EMAIL",
|
|
64
|
-
RESET_UI = "RESET_UI"
|
|
73
|
+
RESET_UI = "RESET_UI",
|
|
74
|
+
SET_LAST_SELECTED_VARIANT = "SET_LAST_SELECTED_VARIANT",
|
|
75
|
+
SET_UNDO = "SET_UNDO",
|
|
76
|
+
SET_REDO = "SET_REDO",
|
|
77
|
+
SET_UNDO_PLANNER = "SET_UNDO_PLANNER",
|
|
78
|
+
SET_REDO_PLANNER = "SET_REDO_PLANNER"
|
|
65
79
|
}
|
|
66
80
|
export declare enum UI_STATE_ACTIONS {
|
|
67
81
|
SELECT_GROUP = "SELECT_GROUP",
|
|
@@ -73,10 +87,12 @@ export declare enum UI_STATE_ACTIONS {
|
|
|
73
87
|
PAUSE_CONFIGURING = "PAUSE_CONFIGURING",
|
|
74
88
|
USE_VIEWER = "USE_VIEWER",
|
|
75
89
|
USE_PLANNER = "USE_PLANNER",
|
|
76
|
-
USE_CONFIGURATOR = "USE_CONFIGURATOR"
|
|
90
|
+
USE_CONFIGURATOR = "USE_CONFIGURATOR",
|
|
91
|
+
SHOW_PARAMS = "SHOW_PARAMS"
|
|
77
92
|
}
|
|
78
93
|
export declare enum UI_STATE_GETTERS {
|
|
79
94
|
USE_REGULAR_LAYOUT = "USE_REGULAR_LAYOUT",
|
|
95
|
+
PART_LIST_SHOWN = "PART_LIST_SHOWN",
|
|
80
96
|
COLLECTION_VIEW_ELEMENTS = "COLLECTION_VIEW_ELEMENTS",
|
|
81
97
|
COLLECTION_VIEW_ADDON_ELEMENTS = "COLLECTION_VIEW_ADDON_ELEMENTS",
|
|
82
98
|
COLLECTION_VIEW_VARIANTS = "COLLECTION_VIEW_VARIANTS",
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare const ROLF_BENZ_VARIANTS: {
|
|
2
|
+
id: string;
|
|
3
|
+
global: boolean;
|
|
4
|
+
created: string;
|
|
5
|
+
updated: string;
|
|
6
|
+
links: {
|
|
7
|
+
items: string;
|
|
8
|
+
materials: string;
|
|
9
|
+
};
|
|
10
|
+
catalog: string;
|
|
11
|
+
label: string;
|
|
12
|
+
language: string;
|
|
13
|
+
items: {
|
|
14
|
+
height: number;
|
|
15
|
+
width: number;
|
|
16
|
+
depth: number;
|
|
17
|
+
displayedHeight: number;
|
|
18
|
+
displayedWidth: number;
|
|
19
|
+
displayedDepth: number;
|
|
20
|
+
perspectiveImage: string;
|
|
21
|
+
topImage: string;
|
|
22
|
+
assets: {};
|
|
23
|
+
externalIdentifier: string;
|
|
24
|
+
manufacturerSKU: string;
|
|
25
|
+
configuration: string;
|
|
26
|
+
rootComponentId: string;
|
|
27
|
+
hidden: boolean;
|
|
28
|
+
visibilityStatus: number;
|
|
29
|
+
created: string;
|
|
30
|
+
updated: string;
|
|
31
|
+
flipable: boolean;
|
|
32
|
+
scaleable: boolean;
|
|
33
|
+
colorable: boolean;
|
|
34
|
+
layer: number;
|
|
35
|
+
sort: number;
|
|
36
|
+
basecolor: string;
|
|
37
|
+
orderable: boolean;
|
|
38
|
+
requestable: boolean;
|
|
39
|
+
retailPriceAllowed: boolean;
|
|
40
|
+
label: string;
|
|
41
|
+
language: string;
|
|
42
|
+
catalog: string;
|
|
43
|
+
id: string;
|
|
44
|
+
tags: string[];
|
|
45
|
+
links: {
|
|
46
|
+
tags: string;
|
|
47
|
+
similarItems: string;
|
|
48
|
+
perfectFit: string;
|
|
49
|
+
additionalContents: string;
|
|
50
|
+
};
|
|
51
|
+
attributes: never[];
|
|
52
|
+
version: number;
|
|
53
|
+
__rapi_path__: string;
|
|
54
|
+
sketch: string;
|
|
55
|
+
}[];
|
|
56
|
+
parents: string[];
|
|
57
|
+
hidden: boolean;
|
|
58
|
+
__rapi_path__: string;
|
|
59
|
+
materials: never[];
|
|
60
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SdkConnectorPlanner } from '@/planner/business-logic/sdk-connector-planner';
|
|
2
|
+
export interface MockSdkConnectorPlannerOverrides {
|
|
3
|
+
planner?: object;
|
|
4
|
+
api?: object;
|
|
5
|
+
store?: object;
|
|
6
|
+
analytics?: object;
|
|
7
|
+
}
|
|
8
|
+
export declare class MockSdkConnectorPlanner extends SdkConnectorPlanner {
|
|
9
|
+
overrides: MockSdkConnectorPlannerOverrides;
|
|
10
|
+
constructor(overrides?: MockSdkConnectorPlannerOverrides);
|
|
11
|
+
get api(): Promise<any>;
|
|
12
|
+
setParameter: () => Promise<void>;
|
|
13
|
+
}
|
|
@@ -2,7 +2,9 @@ import { SdkConnector } from '@/configurator/business-logic/sdk-connector';
|
|
|
2
2
|
import { RapiTenant } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
3
3
|
export interface MockSdkConnectorOverrides {
|
|
4
4
|
configurator?: object;
|
|
5
|
+
planner?: object;
|
|
5
6
|
configuratorConnector?: object;
|
|
7
|
+
plannerConnector?: object;
|
|
6
8
|
loadInProgress?: boolean;
|
|
7
9
|
someLoadDone?: boolean;
|
|
8
10
|
rapiAccess?: object;
|
|
@@ -23,7 +25,10 @@ export declare class MockSdkConnector extends SdkConnector {
|
|
|
23
25
|
constructor(overrides?: MockSdkConnectorOverrides);
|
|
24
26
|
getTenant(): Promise<RapiTenant>;
|
|
25
27
|
initConfigurator(): void;
|
|
28
|
+
initPlanner(): void;
|
|
26
29
|
get configuratorApi(): Promise<any>;
|
|
30
|
+
get plannerApi(): Promise<any>;
|
|
27
31
|
get configuratorConnector(): Promise<any>;
|
|
32
|
+
get plannerConnector(): Promise<any>;
|
|
28
33
|
setParameter: () => Promise<void>;
|
|
29
34
|
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|