@roomle/embedding-lib 4.36.0 → 4.39.0
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/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +1 -1
- package/docs/api/classes/exposed_api.ExposedApi.md +11 -11
- package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +31 -7
- package/docs/api/classes/roomle_configurator_api.default.md +9 -9
- package/docs/api/enums/types.UI_BUTTON.md +22 -22
- 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 +16 -16
- package/docs/api/modules/roomle_configurator_api.md +3 -3
- package/docs/examples/11_light_settings.html +90 -62
- package/docs/examples/roomle-configurator-api.es.min.js +254 -58
- package/docs/index.md +2 -1
- package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +21 -12
- package/package.json +2 -2
- package/types/index.d.ts +43 -26
- package/types/src/common/business-logic/connector.d.ts +8 -0
- package/types/src/common/store/collection-view-state.d.ts +7 -3
- package/types/src/common/store/index.d.ts +0 -1
- package/types/src/common/utils/touch-drag.d.ts +6 -1
- package/types/src/configurator/business-logic/roomle-sdk-wrapper.d.ts +2 -0
- package/types/src/configurator/business-logic/sdk-connector-configurator.d.ts +3 -5
- package/types/src/configurator/business-logic/sdk-connector.d.ts +4 -7
- package/types/src/configurator/embedding/exposed-api.d.ts +2 -1
- package/types/src/configurator/embedding/exposed-callbacks.d.ts +7 -1
- package/types/src/planner/business-logic/sdk-connector-planner.d.ts +3 -3
- package/types/src/planner/store/planner-ui-state.d.ts +3 -2
- package/types/src/planner/utils/planner-sidebar.d.ts +0 -1
- package/types/src/viewer/business-logic/sdk-connector-viewer.d.ts +2 -2
- package/types/tests/helpers/data/part-list.d.ts +16 -0
- package/types/tests/helpers/mocks/sdk-connector.d.ts +1 -0
- /package/types/tests/integration/{configurator → common}/components/BottomBar.spec.d.ts +0 -0
- /package/types/tests/integration/planner/components/{BottomBar.spec.d.ts → PlannerSidebar.spec.d.ts} +0 -0
package/types/index.d.ts
CHANGED
|
@@ -197,7 +197,7 @@ declare module "configurator/embedding/types" {
|
|
|
197
197
|
}
|
|
198
198
|
declare module "configurator/embedding/exposed-callbacks" {
|
|
199
199
|
import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
200
|
-
import { KernelPartList } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
200
|
+
import { KernelPartList, UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
201
201
|
import { RapiConfigurationEnhanced } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
202
202
|
import { UI_BUTTON } from "configurator/embedding/types";
|
|
203
203
|
import { Nullable } from "common/utils/types";
|
|
@@ -235,6 +235,12 @@ declare module "configurator/embedding/exposed-callbacks" {
|
|
|
235
235
|
*/
|
|
236
236
|
onButtonClicked: (name: UI_BUTTON) => Promise<boolean> | boolean | void;
|
|
237
237
|
onRequestPlan: (planId: string, image: Base64Image, items: any[]) => void;
|
|
238
|
+
/**
|
|
239
|
+
* Gets called if a plan object gets added, changed or removed
|
|
240
|
+
* Only the move of plan object does NOT trigger this function
|
|
241
|
+
* @param objects
|
|
242
|
+
*/
|
|
243
|
+
onPlanUpdate: (objects: UiPlanObject[]) => void;
|
|
238
244
|
}
|
|
239
245
|
}
|
|
240
246
|
declare module "configurator/store/core-state" {
|
|
@@ -453,7 +459,6 @@ declare module "planner/utils/planner-sidebar" {
|
|
|
453
459
|
import { SdkConnector } from "configurator/business-logic/sdk-connector";
|
|
454
460
|
import { RapiConfiguration, RapiItem } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
455
461
|
export interface PlannerSidebarState {
|
|
456
|
-
welcome: boolean;
|
|
457
462
|
catalog: boolean;
|
|
458
463
|
productList: boolean;
|
|
459
464
|
partList: boolean;
|
|
@@ -490,7 +495,6 @@ declare module "planner/store/planner-ui-state" {
|
|
|
490
495
|
lastWalls: KernelWall[];
|
|
491
496
|
}
|
|
492
497
|
export enum PLANNER_UI_STATE_MUTATIONS {
|
|
493
|
-
SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload",
|
|
494
498
|
SET_SELECTION = "PLANNER_UI_STATE_setSelection",
|
|
495
499
|
SET_IS_LANDSCAPE = "PLANNER_UI_STATE_setIsLandscape",
|
|
496
500
|
SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_setInteractionsExpanded",
|
|
@@ -512,7 +516,9 @@ declare module "planner/store/planner-ui-state" {
|
|
|
512
516
|
export enum PLANNER_UI_STATE_ACTIONS {
|
|
513
517
|
SELECT_VIEW_MODE = "PLANNER_UI_STATE_SELECT_VIEW_MODE",
|
|
514
518
|
SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_SET_INTERACTIONS_EXPANDED",
|
|
515
|
-
DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS"
|
|
519
|
+
DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS",
|
|
520
|
+
CLEAR_AND_CLOSE_SIDEBAR = "CLEAR_AND_CLOSE_SIDEBAR",
|
|
521
|
+
SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload"
|
|
516
522
|
}
|
|
517
523
|
export enum PLANNER_UI_STATE_GETTERS {
|
|
518
524
|
CATALOG_ROOT_TAG = "PLANNER_UI_STATE_CATALOG_ROOT_TAG",
|
|
@@ -528,11 +534,13 @@ declare module "common/store/collection-view-state" {
|
|
|
528
534
|
import { Nullable } from "common/utils/types";
|
|
529
535
|
import { CollectionViewElement } from "common/components/collection-view/-utils/types";
|
|
530
536
|
import { StoreState } from "common/store/index";
|
|
537
|
+
export type ViewTypeState = 'listView' | 'gridViewSmall' | 'gridViewBig';
|
|
531
538
|
export interface GridViewUiState {
|
|
532
539
|
filter: string[];
|
|
533
|
-
showAllAsList: boolean;
|
|
534
540
|
search: Nullable<string>;
|
|
535
541
|
userInitiatedSearch: boolean;
|
|
542
|
+
viewType: ViewTypeState;
|
|
543
|
+
hasGroupLabel: boolean;
|
|
536
544
|
}
|
|
537
545
|
export interface CollectionViewUiState {
|
|
538
546
|
selected: Nullable<CollectionViewElement>;
|
|
@@ -540,6 +548,7 @@ declare module "common/store/collection-view-state" {
|
|
|
540
548
|
gridView: GridViewUiState;
|
|
541
549
|
}
|
|
542
550
|
export const getInitialCollectionViewState: () => CollectionViewUiState;
|
|
551
|
+
export const getInitialViewType: () => ViewTypeState;
|
|
543
552
|
export enum COLLECTION_VIEW_STATE_MUTATIONS {
|
|
544
553
|
ELEMENT_EXPANDED = "CV_ELEMENT_EXPANDED",
|
|
545
554
|
SET_SELECTED_ELEMENT = "CV_SET_SELECTED_ELEMENT",
|
|
@@ -547,9 +556,10 @@ declare module "common/store/collection-view-state" {
|
|
|
547
556
|
}
|
|
548
557
|
export enum GRID_VIEW_STATE_MUTATIONS {
|
|
549
558
|
SET_SEARCH = "GV_SET_SEARCH",
|
|
550
|
-
TOGGLE_LIST_DISPLAY_TYPE = "GV_TOGGLE_LIST_DISPLAY_TYPE",
|
|
551
559
|
TOGGLE_FILTER = "GV_TOGGLE_FILTER",
|
|
552
|
-
SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH"
|
|
560
|
+
SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH",
|
|
561
|
+
SET_VIEW_TYPE = "SET_VIEW_TYPE",
|
|
562
|
+
SET_HAS_GROUP_LABEL = "SET_HAS_GROUP_LABEL"
|
|
553
563
|
}
|
|
554
564
|
interface MuationPayload<T, V> {
|
|
555
565
|
state: T;
|
|
@@ -741,7 +751,6 @@ declare module "common/store/index" {
|
|
|
741
751
|
SET_IS_IN_IFRAME: COMMON_UI_STATE_MUTATIONS.SET_IS_IN_IFRAME;
|
|
742
752
|
SET_IS_VIEW_ONLY: COMMON_UI_STATE_MUTATIONS.SET_IS_VIEW_ONLY;
|
|
743
753
|
SET_LAST_REQUESTED_ID: COMMON_UI_STATE_MUTATIONS.SET_LAST_REQUESTED_ID;
|
|
744
|
-
SET_SELECTION_PAYLOAD: PLANNER_UI_STATE_MUTATIONS.SET_SELECTION_PAYLOAD;
|
|
745
754
|
SET_SELECTION: PLANNER_UI_STATE_MUTATIONS.SET_SELECTION;
|
|
746
755
|
SET_IS_LANDSCAPE: PLANNER_UI_STATE_MUTATIONS.SET_IS_LANDSCAPE;
|
|
747
756
|
SET_INTERACTIONS_EXPANDED: PLANNER_UI_STATE_MUTATIONS.SET_INTERACTIONS_EXPANDED;
|
|
@@ -942,6 +951,7 @@ declare module "configurator/business-logic/roomle-sdk-wrapper" {
|
|
|
942
951
|
import { GlobalInitDataDefinition } from '@roomle/web-sdk/lib/definitions/common-core/src/utils/shims';
|
|
943
952
|
import { Planner } from '@roomle/web-sdk/lib/definitions/planner-core/src/planner';
|
|
944
953
|
import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
954
|
+
import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
945
955
|
/**
|
|
946
956
|
* We use this class in a plugin so we
|
|
947
957
|
* can rely on DI to change it during testing
|
|
@@ -953,6 +963,7 @@ declare module "configurator/business-logic/roomle-sdk-wrapper" {
|
|
|
953
963
|
private _currentInstance;
|
|
954
964
|
get hasPlanner(): boolean;
|
|
955
965
|
getConfigurator(element: HTMLElement, initData?: UiInitData): Promise<Configurator>;
|
|
966
|
+
getConfiguratorApi(element: HTMLElement, initData?: UiInitData): Promise<RoomleConfigurator>;
|
|
956
967
|
getGlbViewer(element: HTMLElement, initData?: UiInitData): Promise<GlbViewer>;
|
|
957
968
|
getPlanner(element: HTMLElement, initData?: UiInitData): Promise<Planner>;
|
|
958
969
|
getRapiAccess(): Promise<RapiAccess>;
|
|
@@ -988,19 +999,28 @@ declare module "configurator/business-logic/ui-callback" {
|
|
|
988
999
|
onSelectionCancel: () => any;
|
|
989
1000
|
}
|
|
990
1001
|
}
|
|
1002
|
+
declare module "common/business-logic/connector" {
|
|
1003
|
+
import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
|
|
1004
|
+
import { UiInitData } from "configurator/embedding/types";
|
|
1005
|
+
import { CallbackApi } from "configurator/business-logic/sdk-connector";
|
|
1006
|
+
export abstract class Connector {
|
|
1007
|
+
abstract readonly api: Promise<any>;
|
|
1008
|
+
abstract init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
|
|
1009
|
+
addCallback<K extends keyof CallbackApi>(key: K, fun: CallbackApi[K], allowMultiple?: boolean): Promise<void>;
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
991
1012
|
declare module "configurator/business-logic/sdk-connector-configurator" {
|
|
992
1013
|
import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
993
1014
|
import { Nullable } from "common/utils/types";
|
|
994
|
-
import { Connector } from "configurator/business-logic/sdk-connector";
|
|
995
1015
|
import { UiInitData } from "configurator/embedding/types";
|
|
996
1016
|
import { StoreState } from "common/store/index";
|
|
997
1017
|
import { KernelParameter } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
998
|
-
import ConfiguratorUiCallbacks from '@roomle/web-sdk/lib/definitions/configurator-core/src/services/configurator-ui-callback';
|
|
999
1018
|
import { Store } from 'vuex';
|
|
1000
1019
|
import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
|
|
1001
1020
|
import { Analytics } from "common/plugins/analytics";
|
|
1002
1021
|
import { UiCallbacks } from "configurator/business-logic/ui-callback";
|
|
1003
|
-
|
|
1022
|
+
import { Connector } from "common/business-logic/connector";
|
|
1023
|
+
export class SdkConnectorConfigurator extends Connector {
|
|
1004
1024
|
private _configurator;
|
|
1005
1025
|
private _initWaiters;
|
|
1006
1026
|
private _store;
|
|
@@ -1009,8 +1029,7 @@ declare module "configurator/business-logic/sdk-connector-configurator" {
|
|
|
1009
1029
|
constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
|
|
1010
1030
|
get api(): Promise<RoomleConfigurator>;
|
|
1011
1031
|
init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
|
|
1012
|
-
initConfigurator(configurator: RoomleConfigurator): void
|
|
1013
|
-
addCallback<K extends keyof ConfiguratorUiCallbacks>(key: K, fun: ConfiguratorUiCallbacks[K], allowMultiple?: boolean): void;
|
|
1032
|
+
initConfigurator(configurator: RoomleConfigurator): Promise<void>;
|
|
1014
1033
|
setParameter(parameter: KernelParameter, value: string, isRaw?: boolean): Promise<void>;
|
|
1015
1034
|
setPrice(currencySymbol: string, price: number): void;
|
|
1016
1035
|
addUiCallback(listener: UiCallbacks): void;
|
|
@@ -1022,7 +1041,6 @@ declare module "configurator/business-logic/sdk-connector-configurator" {
|
|
|
1022
1041
|
}
|
|
1023
1042
|
}
|
|
1024
1043
|
declare module "viewer/business-logic/sdk-connector-viewer" {
|
|
1025
|
-
import { Connector } from "configurator/business-logic/sdk-connector";
|
|
1026
1044
|
import { Nullable } from "common/utils/types";
|
|
1027
1045
|
import { Store } from 'vuex';
|
|
1028
1046
|
import { StoreState } from "common/store/index";
|
|
@@ -1030,7 +1048,8 @@ declare module "viewer/business-logic/sdk-connector-viewer" {
|
|
|
1030
1048
|
import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
|
|
1031
1049
|
import { UiInitData } from "configurator/embedding/types";
|
|
1032
1050
|
import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
|
|
1033
|
-
|
|
1051
|
+
import { Connector } from "common/business-logic/connector";
|
|
1052
|
+
export class SdkConnectorViewer extends Connector {
|
|
1034
1053
|
private _viewer;
|
|
1035
1054
|
private _initWaiters;
|
|
1036
1055
|
private _store;
|
|
@@ -1050,7 +1069,6 @@ declare module "common/utils/plan" {
|
|
|
1050
1069
|
export const EMPTY_PLAN = "<plan version=\"2\"><walls><nodes/><edges/></walls><planobjects/><texters/><measures/><floors/><transparency><layers/></transparency></plan>";
|
|
1051
1070
|
}
|
|
1052
1071
|
declare module "planner/business-logic/sdk-connector-planner" {
|
|
1053
|
-
import { Connector } from "configurator/business-logic/sdk-connector";
|
|
1054
1072
|
import { Nullable } from "common/utils/types";
|
|
1055
1073
|
import { Store } from 'vuex';
|
|
1056
1074
|
import { StoreState } from "common/store/index";
|
|
@@ -1060,7 +1078,8 @@ declare module "planner/business-logic/sdk-connector-planner" {
|
|
|
1060
1078
|
import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
1061
1079
|
import { RapiId, RapiPlan } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
1062
1080
|
import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
1063
|
-
|
|
1081
|
+
import { Connector } from "common/business-logic/connector";
|
|
1082
|
+
export class SdkConnectorPlanner extends Connector {
|
|
1064
1083
|
private _planner;
|
|
1065
1084
|
private _initWaiters;
|
|
1066
1085
|
private _store;
|
|
@@ -1071,7 +1090,7 @@ declare module "planner/business-logic/sdk-connector-planner" {
|
|
|
1071
1090
|
constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
|
|
1072
1091
|
get api(): Promise<RoomlePlanner>;
|
|
1073
1092
|
init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
|
|
1074
|
-
initPlanner(planner: RoomlePlanner): void
|
|
1093
|
+
initPlanner(planner: RoomlePlanner): Promise<void>;
|
|
1075
1094
|
loadPlan(id: RapiId): Promise<void>;
|
|
1076
1095
|
loadPlanBasedOnObjectId(id: RapiId): Promise<void>;
|
|
1077
1096
|
onSelectionCancel(): void;
|
|
@@ -1100,6 +1119,7 @@ declare module "configurator/business-logic/sdk-connector" {
|
|
|
1100
1119
|
import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
1101
1120
|
import { UiCallbacks } from "configurator/business-logic/ui-callback";
|
|
1102
1121
|
import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
1122
|
+
import RoomlePlannerUiCallback from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
|
|
1103
1123
|
export enum SDK_MODULES {
|
|
1104
1124
|
VIEWER = 0,
|
|
1105
1125
|
CONFIGURATOR = 1,
|
|
@@ -1116,11 +1136,8 @@ declare module "configurator/business-logic/sdk-connector" {
|
|
|
1116
1136
|
partList: KernelPartList;
|
|
1117
1137
|
}
|
|
1118
1138
|
export const getSelectableEntry: (selected: Selectable, data: Selectable[]) => Nullable<Selectable>;
|
|
1119
|
-
export const REGISTERED_CALLBACKS: Map<keyof
|
|
1120
|
-
export
|
|
1121
|
-
readonly api: any;
|
|
1122
|
-
init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
|
|
1123
|
-
}
|
|
1139
|
+
export const REGISTERED_CALLBACKS: Map<keyof CallbackApi, boolean>;
|
|
1140
|
+
export type CallbackApi = ConfiguratorUiCallbacks & RoomlePlannerUiCallback;
|
|
1124
1141
|
export class SdkConnector {
|
|
1125
1142
|
protected loadInProgress: boolean;
|
|
1126
1143
|
protected someLoadDone: boolean;
|
|
@@ -1180,8 +1197,7 @@ declare module "configurator/business-logic/sdk-connector" {
|
|
|
1180
1197
|
}): Promise<null>;
|
|
1181
1198
|
loadConfiguration(configurationId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
|
|
1182
1199
|
loadComponent(componentId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
|
|
1183
|
-
loadSelectedPlanObject(): Promise<
|
|
1184
|
-
loadPlanObjectId(configurationId: string, planObjectId: number): Promise<Nullable<LoadResponse>>;
|
|
1200
|
+
loadSelectedPlanObject(): Promise<void>;
|
|
1185
1201
|
loadConfigurationString(configurationString: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
|
|
1186
1202
|
loadConfigurableItem(configurableItemId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
|
|
1187
1203
|
isIdAGlb(id: string): Promise<boolean>;
|
|
@@ -1234,9 +1250,9 @@ declare module "configurator/embedding/exposed-api" {
|
|
|
1234
1250
|
import { Nullable } from "common/utils/types";
|
|
1235
1251
|
import { Analytics } from "common/plugins/analytics";
|
|
1236
1252
|
import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
|
|
1237
|
-
import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
1238
1253
|
import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
1239
1254
|
import { Position3 } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
1255
|
+
import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
1240
1256
|
export class ExposedApi {
|
|
1241
1257
|
private _sdk;
|
|
1242
1258
|
private _exposedCallbacks;
|
|
@@ -1314,6 +1330,7 @@ declare module "configurator/embedding/exposed-api" {
|
|
|
1314
1330
|
private _websiteReady;
|
|
1315
1331
|
private _handleMessage;
|
|
1316
1332
|
private _forwardSdkCallbacks;
|
|
1333
|
+
private _instanceOfRoomlePlanner;
|
|
1317
1334
|
}
|
|
1318
1335
|
}
|
|
1319
1336
|
declare module "common/utils/merge" {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RoomleSdkWrapper } from '@/configurator/business-logic/roomle-sdk-wrapper';
|
|
2
|
+
import { UiInitData } from '@/configurator/embedding/types';
|
|
3
|
+
import { CallbackApi } from '@/configurator/business-logic/sdk-connector';
|
|
4
|
+
export declare abstract class Connector {
|
|
5
|
+
abstract readonly api: Promise<any>;
|
|
6
|
+
abstract init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
|
|
7
|
+
addCallback<K extends keyof CallbackApi>(key: K, fun: CallbackApi[K], allowMultiple?: boolean): Promise<void>;
|
|
8
|
+
}
|
|
@@ -2,11 +2,13 @@ import { Module } from 'vuex';
|
|
|
2
2
|
import { Nullable } from '@/common/utils/types';
|
|
3
3
|
import { CollectionViewElement } from '@/common/components/collection-view/-utils/types';
|
|
4
4
|
import { StoreState } from '@/common/store';
|
|
5
|
+
export declare type ViewTypeState = 'listView' | 'gridViewSmall' | 'gridViewBig';
|
|
5
6
|
export interface GridViewUiState {
|
|
6
7
|
filter: string[];
|
|
7
|
-
showAllAsList: boolean;
|
|
8
8
|
search: Nullable<string>;
|
|
9
9
|
userInitiatedSearch: boolean;
|
|
10
|
+
viewType: ViewTypeState;
|
|
11
|
+
hasGroupLabel: boolean;
|
|
10
12
|
}
|
|
11
13
|
export interface CollectionViewUiState {
|
|
12
14
|
selected: Nullable<CollectionViewElement>;
|
|
@@ -14,6 +16,7 @@ export interface CollectionViewUiState {
|
|
|
14
16
|
gridView: GridViewUiState;
|
|
15
17
|
}
|
|
16
18
|
export declare const getInitialCollectionViewState: () => CollectionViewUiState;
|
|
19
|
+
export declare const getInitialViewType: () => ViewTypeState;
|
|
17
20
|
export declare enum COLLECTION_VIEW_STATE_MUTATIONS {
|
|
18
21
|
ELEMENT_EXPANDED = "CV_ELEMENT_EXPANDED",
|
|
19
22
|
SET_SELECTED_ELEMENT = "CV_SET_SELECTED_ELEMENT",
|
|
@@ -21,9 +24,10 @@ export declare enum COLLECTION_VIEW_STATE_MUTATIONS {
|
|
|
21
24
|
}
|
|
22
25
|
export declare enum GRID_VIEW_STATE_MUTATIONS {
|
|
23
26
|
SET_SEARCH = "GV_SET_SEARCH",
|
|
24
|
-
TOGGLE_LIST_DISPLAY_TYPE = "GV_TOGGLE_LIST_DISPLAY_TYPE",
|
|
25
27
|
TOGGLE_FILTER = "GV_TOGGLE_FILTER",
|
|
26
|
-
SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH"
|
|
28
|
+
SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH",
|
|
29
|
+
SET_VIEW_TYPE = "SET_VIEW_TYPE",
|
|
30
|
+
SET_HAS_GROUP_LABEL = "SET_HAS_GROUP_LABEL"
|
|
27
31
|
}
|
|
28
32
|
interface MuationPayload<T, V> {
|
|
29
33
|
state: T;
|
|
@@ -26,7 +26,6 @@ export declare const MUTATIONS: {
|
|
|
26
26
|
SET_IS_IN_IFRAME: COMMON_UI_STATE_MUTATIONS.SET_IS_IN_IFRAME;
|
|
27
27
|
SET_IS_VIEW_ONLY: COMMON_UI_STATE_MUTATIONS.SET_IS_VIEW_ONLY;
|
|
28
28
|
SET_LAST_REQUESTED_ID: COMMON_UI_STATE_MUTATIONS.SET_LAST_REQUESTED_ID;
|
|
29
|
-
SET_SELECTION_PAYLOAD: PLANNER_UI_STATE_MUTATIONS.SET_SELECTION_PAYLOAD;
|
|
30
29
|
SET_SELECTION: PLANNER_UI_STATE_MUTATIONS.SET_SELECTION;
|
|
31
30
|
SET_IS_LANDSCAPE: PLANNER_UI_STATE_MUTATIONS.SET_IS_LANDSCAPE;
|
|
32
31
|
SET_INTERACTIONS_EXPANDED: PLANNER_UI_STATE_MUTATIONS.SET_INTERACTIONS_EXPANDED;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Nullable } from '@/common/utils/types';
|
|
2
2
|
export declare const TOUCH_DRAG_TIMEOUT = 500;
|
|
3
|
+
export declare const TOUCH_DRAG_DELAY = 75;
|
|
4
|
+
export declare const TOUCH_DRAG_EPSILON = 10;
|
|
3
5
|
export interface TouchDragCallbacks {
|
|
4
6
|
onTouchDragStart: (payload: Nullable<any>, event: TouchEvent) => void;
|
|
5
7
|
}
|
|
@@ -8,12 +10,15 @@ export declare class TouchDrag<Payload> {
|
|
|
8
10
|
private _onTouchDragStart;
|
|
9
11
|
private _payload;
|
|
10
12
|
private _delay;
|
|
13
|
+
private _firstTouch;
|
|
14
|
+
private _lastTouch;
|
|
11
15
|
constructor(payload: Payload, { onTouchDragStart }: TouchDragCallbacks, options?: {
|
|
12
16
|
delay?: number;
|
|
13
17
|
});
|
|
14
18
|
onTouchStart(event: TouchEvent): void;
|
|
15
19
|
onTouchEnd(): void;
|
|
16
|
-
onTouchMove(
|
|
20
|
+
onTouchMove(event: TouchEvent): void;
|
|
17
21
|
private _clearTimeout;
|
|
18
22
|
private _resetTouches;
|
|
23
|
+
private _checkXDistance;
|
|
19
24
|
}
|
|
@@ -6,6 +6,7 @@ import { UiInitData } from '@/configurator/embedding/types';
|
|
|
6
6
|
import { GlobalInitDataDefinition } from '@roomle/web-sdk/lib/definitions/common-core/src/utils/shims';
|
|
7
7
|
import { Planner } from '@roomle/web-sdk/lib/definitions/planner-core/src/planner';
|
|
8
8
|
import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
9
|
+
import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
9
10
|
/**
|
|
10
11
|
* We use this class in a plugin so we
|
|
11
12
|
* can rely on DI to change it during testing
|
|
@@ -17,6 +18,7 @@ export declare class RoomleSdkWrapper {
|
|
|
17
18
|
private _currentInstance;
|
|
18
19
|
get hasPlanner(): boolean;
|
|
19
20
|
getConfigurator(element: HTMLElement, initData?: UiInitData): Promise<Configurator>;
|
|
21
|
+
getConfiguratorApi(element: HTMLElement, initData?: UiInitData): Promise<RoomleConfigurator>;
|
|
20
22
|
getGlbViewer(element: HTMLElement, initData?: UiInitData): Promise<GlbViewer>;
|
|
21
23
|
getPlanner(element: HTMLElement, initData?: UiInitData): Promise<Planner>;
|
|
22
24
|
getRapiAccess(): Promise<RapiAccess>;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
2
2
|
import { Nullable } from '@/common/utils/types';
|
|
3
|
-
import { Connector } from '@/configurator/business-logic/sdk-connector';
|
|
4
3
|
import { UiInitData } from '@/configurator/embedding/types';
|
|
5
4
|
import { StoreState } from '@/common/store';
|
|
6
5
|
import { KernelParameter } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
7
|
-
import ConfiguratorUiCallbacks from '@roomle/web-sdk/lib/definitions/configurator-core/src/services/configurator-ui-callback';
|
|
8
6
|
import { Store } from 'vuex';
|
|
9
7
|
import { RoomleSdkWrapper } from '@/configurator/business-logic/roomle-sdk-wrapper';
|
|
10
8
|
import { Analytics } from '@/common/plugins/analytics';
|
|
11
9
|
import { UiCallbacks } from '@/configurator/business-logic/ui-callback';
|
|
12
|
-
|
|
10
|
+
import { Connector } from '@/common/business-logic/connector';
|
|
11
|
+
export declare class SdkConnectorConfigurator extends Connector {
|
|
13
12
|
private _configurator;
|
|
14
13
|
private _initWaiters;
|
|
15
14
|
private _store;
|
|
@@ -18,8 +17,7 @@ export declare class SdkConnectorConfigurator implements Connector {
|
|
|
18
17
|
constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
|
|
19
18
|
get api(): Promise<RoomleConfigurator>;
|
|
20
19
|
init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
|
|
21
|
-
initConfigurator(configurator: RoomleConfigurator): void
|
|
22
|
-
addCallback<K extends keyof ConfiguratorUiCallbacks>(key: K, fun: ConfiguratorUiCallbacks[K], allowMultiple?: boolean): void;
|
|
20
|
+
initConfigurator(configurator: RoomleConfigurator): Promise<void>;
|
|
23
21
|
setParameter(parameter: KernelParameter, value: string, isRaw?: boolean): Promise<void>;
|
|
24
22
|
setPrice(currencySymbol: string, price: number): void;
|
|
25
23
|
addUiCallback(listener: UiCallbacks): void;
|
|
@@ -18,6 +18,7 @@ import { RapiConfigurationEnhanced, RapiPlan } from '@roomle/web-sdk/lib/definit
|
|
|
18
18
|
import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
19
19
|
import { UiCallbacks } from '@/configurator/business-logic/ui-callback';
|
|
20
20
|
import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
21
|
+
import RoomlePlannerUiCallback from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
|
|
21
22
|
export declare enum SDK_MODULES {
|
|
22
23
|
VIEWER = 0,
|
|
23
24
|
CONFIGURATOR = 1,
|
|
@@ -34,11 +35,8 @@ export interface PartlistResponse {
|
|
|
34
35
|
partList: KernelPartList;
|
|
35
36
|
}
|
|
36
37
|
export declare const getSelectableEntry: (selected: Selectable, data: Selectable[]) => Nullable<Selectable>;
|
|
37
|
-
export declare const REGISTERED_CALLBACKS: Map<keyof
|
|
38
|
-
export
|
|
39
|
-
readonly api: any;
|
|
40
|
-
init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
|
|
41
|
-
}
|
|
38
|
+
export declare const REGISTERED_CALLBACKS: Map<keyof CallbackApi, boolean>;
|
|
39
|
+
export declare type CallbackApi = ConfiguratorUiCallbacks & RoomlePlannerUiCallback;
|
|
42
40
|
export declare class SdkConnector {
|
|
43
41
|
protected loadInProgress: boolean;
|
|
44
42
|
protected someLoadDone: boolean;
|
|
@@ -98,8 +96,7 @@ export declare class SdkConnector {
|
|
|
98
96
|
}): Promise<null>;
|
|
99
97
|
loadConfiguration(configurationId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
|
|
100
98
|
loadComponent(componentId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
|
|
101
|
-
loadSelectedPlanObject(): Promise<
|
|
102
|
-
loadPlanObjectId(configurationId: string, planObjectId: number): Promise<Nullable<LoadResponse>>;
|
|
99
|
+
loadSelectedPlanObject(): Promise<void>;
|
|
103
100
|
loadConfigurationString(configurationString: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
|
|
104
101
|
loadConfigurableItem(configurableItemId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
|
|
105
102
|
isIdAGlb(id: string): Promise<boolean>;
|
|
@@ -7,9 +7,9 @@ import { StoreState } from '@/common/store';
|
|
|
7
7
|
import { Nullable } from '@/common/utils/types';
|
|
8
8
|
import { Analytics } from '@/common/plugins/analytics';
|
|
9
9
|
import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
|
|
10
|
-
import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
11
10
|
import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
12
11
|
import { Position3 } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
12
|
+
import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
13
13
|
export declare class ExposedApi {
|
|
14
14
|
private _sdk;
|
|
15
15
|
private _exposedCallbacks;
|
|
@@ -87,4 +87,5 @@ export declare class ExposedApi {
|
|
|
87
87
|
private _websiteReady;
|
|
88
88
|
private _handleMessage;
|
|
89
89
|
private _forwardSdkCallbacks;
|
|
90
|
+
private _instanceOfRoomlePlanner;
|
|
90
91
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
2
|
-
import { KernelPartList } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
2
|
+
import { KernelPartList, UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
3
3
|
import { RapiConfigurationEnhanced } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
4
4
|
import { UI_BUTTON } from '@/configurator/embedding/types';
|
|
5
5
|
import { Nullable } from '@/common/utils/types';
|
|
@@ -37,4 +37,10 @@ export declare class ExposedCallbacks {
|
|
|
37
37
|
*/
|
|
38
38
|
onButtonClicked: (name: UI_BUTTON) => Promise<boolean> | boolean | void;
|
|
39
39
|
onRequestPlan: (planId: string, image: Base64Image, items: any[]) => void;
|
|
40
|
+
/**
|
|
41
|
+
* Gets called if a plan object gets added, changed or removed
|
|
42
|
+
* Only the move of plan object does NOT trigger this function
|
|
43
|
+
* @param objects
|
|
44
|
+
*/
|
|
45
|
+
onPlanUpdate: (objects: UiPlanObject[]) => void;
|
|
40
46
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Connector } from '@/configurator/business-logic/sdk-connector';
|
|
2
1
|
import { Nullable } from '@/common/utils/types';
|
|
3
2
|
import { Store } from 'vuex';
|
|
4
3
|
import { StoreState } from '@/common/store';
|
|
@@ -8,7 +7,8 @@ import { UiInitData } from '@/configurator/embedding/types';
|
|
|
8
7
|
import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
9
8
|
import { RapiId, RapiPlan } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
10
9
|
import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
|
|
11
|
-
|
|
10
|
+
import { Connector } from '@/common/business-logic/connector';
|
|
11
|
+
export declare class SdkConnectorPlanner extends Connector {
|
|
12
12
|
private _planner;
|
|
13
13
|
private _initWaiters;
|
|
14
14
|
private _store;
|
|
@@ -19,7 +19,7 @@ export declare class SdkConnectorPlanner implements Connector {
|
|
|
19
19
|
constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
|
|
20
20
|
get api(): Promise<RoomlePlanner>;
|
|
21
21
|
init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
|
|
22
|
-
initPlanner(planner: RoomlePlanner): void
|
|
22
|
+
initPlanner(planner: RoomlePlanner): Promise<void>;
|
|
23
23
|
loadPlan(id: RapiId): Promise<void>;
|
|
24
24
|
loadPlanBasedOnObjectId(id: RapiId): Promise<void>;
|
|
25
25
|
onSelectionCancel(): void;
|
|
@@ -18,7 +18,6 @@ export interface PlannerUiState extends SharedUiState {
|
|
|
18
18
|
lastWalls: KernelWall[];
|
|
19
19
|
}
|
|
20
20
|
export declare enum PLANNER_UI_STATE_MUTATIONS {
|
|
21
|
-
SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload",
|
|
22
21
|
SET_SELECTION = "PLANNER_UI_STATE_setSelection",
|
|
23
22
|
SET_IS_LANDSCAPE = "PLANNER_UI_STATE_setIsLandscape",
|
|
24
23
|
SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_setInteractionsExpanded",
|
|
@@ -40,7 +39,9 @@ export declare enum PLANNER_UI_STATE_MUTATIONS {
|
|
|
40
39
|
export declare enum PLANNER_UI_STATE_ACTIONS {
|
|
41
40
|
SELECT_VIEW_MODE = "PLANNER_UI_STATE_SELECT_VIEW_MODE",
|
|
42
41
|
SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_SET_INTERACTIONS_EXPANDED",
|
|
43
|
-
DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS"
|
|
42
|
+
DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS",
|
|
43
|
+
CLEAR_AND_CLOSE_SIDEBAR = "CLEAR_AND_CLOSE_SIDEBAR",
|
|
44
|
+
SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload"
|
|
44
45
|
}
|
|
45
46
|
export declare enum PLANNER_UI_STATE_GETTERS {
|
|
46
47
|
CATALOG_ROOT_TAG = "PLANNER_UI_STATE_CATALOG_ROOT_TAG",
|
|
@@ -4,7 +4,6 @@ import { StoreState } from '@/common/store';
|
|
|
4
4
|
import { SdkConnector } from '@/configurator/business-logic/sdk-connector';
|
|
5
5
|
import { RapiConfiguration, RapiItem } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
6
6
|
export interface PlannerSidebarState {
|
|
7
|
-
welcome: boolean;
|
|
8
7
|
catalog: boolean;
|
|
9
8
|
productList: boolean;
|
|
10
9
|
partList: boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Connector } from '@/configurator/business-logic/sdk-connector';
|
|
2
1
|
import { Nullable } from '@/common/utils/types';
|
|
3
2
|
import { Store } from 'vuex';
|
|
4
3
|
import { StoreState } from '@/common/store';
|
|
@@ -6,7 +5,8 @@ import { Analytics } from '@/common/plugins/analytics';
|
|
|
6
5
|
import { RoomleSdkWrapper } from '@/configurator/business-logic/roomle-sdk-wrapper';
|
|
7
6
|
import { UiInitData } from '@/configurator/embedding/types';
|
|
8
7
|
import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
|
|
9
|
-
|
|
8
|
+
import { Connector } from '@/common/business-logic/connector';
|
|
9
|
+
export declare class SdkConnectorViewer extends Connector {
|
|
10
10
|
private _viewer;
|
|
11
11
|
private _initWaiters;
|
|
12
12
|
private _store;
|
|
@@ -108,3 +108,19 @@ export declare const USM_PART_LIST: ({
|
|
|
108
108
|
currencySymbol: null;
|
|
109
109
|
parameters: never[];
|
|
110
110
|
})[];
|
|
111
|
+
export declare const PART_LABEL_TESTING: {
|
|
112
|
+
id: string;
|
|
113
|
+
parameters: {
|
|
114
|
+
key: string;
|
|
115
|
+
label: string;
|
|
116
|
+
type: string;
|
|
117
|
+
enabled: boolean;
|
|
118
|
+
visible: boolean;
|
|
119
|
+
visibleInPartList: boolean;
|
|
120
|
+
value: string;
|
|
121
|
+
valueLabel: string;
|
|
122
|
+
valueObjects: {
|
|
123
|
+
value: boolean;
|
|
124
|
+
}[];
|
|
125
|
+
}[];
|
|
126
|
+
};
|
|
File without changes
|
/package/types/tests/integration/planner/components/{BottomBar.spec.d.ts → PlannerSidebar.spec.d.ts}
RENAMED
|
File without changes
|