@roomle/embedding-lib 4.33.0 → 4.36.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.
Files changed (54) hide show
  1. package/docs/api/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +1 -1
  2. package/docs/api/classes/exposed_api.ExposedApi.md +11 -11
  3. package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +7 -7
  4. package/docs/api/classes/roomle_configurator_api.default.md +9 -9
  5. package/docs/api/enums/types.UI_BUTTON.md +62 -18
  6. package/docs/api/interfaces/exposed_callbacks.Labels.md +2 -2
  7. package/docs/api/interfaces/exposed_callbacks.Price.md +2 -2
  8. package/docs/api/interfaces/roomle_configurator_api.RoomleEmbeddingApiKeys.md +4 -4
  9. package/docs/api/interfaces/types.ConfiguratorSettings.md +5 -5
  10. package/docs/api/interfaces/types.EmbeddingSkin.md +5 -5
  11. package/docs/api/interfaces/types.UiInitData.md +37 -71
  12. package/docs/api/modules/roomle_configurator_api.md +3 -3
  13. package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +12 -24
  14. package/package.json +2 -2
  15. package/roomle-configurator-api.cjs.js +33 -76
  16. package/roomle-configurator-api.cjs.min.js +1 -1
  17. package/roomle-configurator-api.es.js +33 -76
  18. package/roomle-configurator-api.es.min.js +1 -1
  19. package/roomle-configurator-api.js +33 -76
  20. package/types/index.d.ts +368 -280
  21. package/types/src/common/business-logic/event-bus.d.ts +5 -0
  22. package/types/src/{configurator → common}/components/collection-view/-utils/types.d.ts +3 -3
  23. package/types/src/common/store/collection-view-state.d.ts +3 -2
  24. package/types/src/common/store/index.d.ts +16 -5
  25. package/types/src/common/utils/helper.d.ts +0 -20
  26. package/types/src/common/utils/merge.d.ts +16 -0
  27. package/types/src/common/utils/parameters.d.ts +2 -2
  28. package/types/src/common/utils/share.d.ts +1 -0
  29. package/types/src/common/utils/touch-drag.d.ts +8 -9
  30. package/types/src/common/utils/types.d.ts +2 -0
  31. package/types/src/common/utils/variants.d.ts +3 -0
  32. package/types/src/configurator/components/grid-view/-utils/GridViewHelper.d.ts +3 -3
  33. package/types/src/configurator/embedding/roomle-configurator-api.d.ts +6 -6
  34. package/types/src/configurator/embedding/types.d.ts +8 -1
  35. package/types/src/configurator/store/ui-state.d.ts +14 -6
  36. package/types/src/planner/business-logic/pre-defined-rooms.d.ts +2 -0
  37. package/types/src/planner/business-logic/rooms.d.ts +12 -0
  38. package/types/src/planner/store/planner-core-data.d.ts +21 -0
  39. package/types/src/planner/store/planner-ui-state.d.ts +22 -7
  40. package/types/src/planner/utils/planner-sidebar.d.ts +21 -0
  41. package/types/tests/helpers/data/items.d.ts +90 -0
  42. package/types/tests/helpers/data/plan.d.ts +224 -0
  43. package/types/tests/helpers/mocks/store.d.ts +2 -1
  44. package/types/tests/integration/{configurator/components/overlays/part-list/PartListPrint.spec.d.ts → common/components/BottomButtons.spec.d.ts} +0 -0
  45. package/types/tests/integration/{configurator/components/overlays/part-list/PartListRow.spec.d.ts → common/components/IconButton.spec.d.ts} +0 -0
  46. package/types/tests/integration/common/components/part-list/part-list/PartListPrint.spec.d.ts +1 -0
  47. package/types/tests/integration/common/components/part-list/part-list/PartListRow.spec.d.ts +1 -0
  48. package/types/tests/integration/configurator/components/overlays/PartList.spec.d.ts +1 -0
  49. package/types/tests/integration/planner/components/CatalogTrigger.spec.d.ts +1 -0
  50. package/types/tests/integration/planner/components/ProductListButton.spec.d.ts +1 -0
  51. package/types/tests/integration/planner/components/SampleRooms.spec.d.ts +1 -0
  52. package/types/tests/integration/planner/components/SelectionPreview.spec.d.ts +1 -0
  53. package/types/tests/integration/planner/components/overlays/product-list/ProductListEntry.spec.d.ts +1 -0
  54. package/types/tests/unit/common/business-logic/event-bus.spec.d.ts +1 -0
@@ -0,0 +1,5 @@
1
+ export declare class EventBus<ListenerType> {
2
+ listeners: ListenerType[];
3
+ addListener(listener: ListenerType): void;
4
+ removeListener(listener: ListenerType): void;
5
+ }
@@ -1,10 +1,10 @@
1
1
  import { Nullable } from '@/common/utils/types';
2
2
  import { UiPossibleChildTag, UiKernelParameter } from '@roomle/web-sdk/lib/definitions/typings/kernel';
3
3
  import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
4
- export declare type CollectionViewElementType = 'addon' | 'parameter' | 'variant' | 'object';
5
- export interface CollectionViewElement {
4
+ export declare type CollectionViewElementType = 'addon' | 'parameter' | 'variant' | 'object' | 'room';
5
+ export interface CollectionViewElement<T = (UiPossibleChildTag | UiKernelParameter | RapiTagForUi)> {
6
6
  label: Nullable<string>;
7
7
  key: string;
8
- payload: UiPossibleChildTag | UiKernelParameter | RapiTagForUi;
8
+ payload: T;
9
9
  type: CollectionViewElementType;
10
10
  }
@@ -1,6 +1,6 @@
1
1
  import { Module } from 'vuex';
2
2
  import { Nullable } from '@/common/utils/types';
3
- import { CollectionViewElement } from '@/configurator/components/collection-view/-utils/types';
3
+ import { CollectionViewElement } from '@/common/components/collection-view/-utils/types';
4
4
  import { StoreState } from '@/common/store';
5
5
  export interface GridViewUiState {
6
6
  filter: string[];
@@ -16,7 +16,8 @@ export interface CollectionViewUiState {
16
16
  export declare const getInitialCollectionViewState: () => CollectionViewUiState;
17
17
  export declare enum COLLECTION_VIEW_STATE_MUTATIONS {
18
18
  ELEMENT_EXPANDED = "CV_ELEMENT_EXPANDED",
19
- SET_SELECTED_ELEMENT = "CV_SET_SELECTED_ELEMENT"
19
+ SET_SELECTED_ELEMENT = "CV_SET_SELECTED_ELEMENT",
20
+ RESET_COLLECTION_VIEW = "RESET_COLLECTION_VIEW"
20
21
  }
21
22
  export declare enum GRID_VIEW_STATE_MUTATIONS {
22
23
  SET_SEARCH = "GV_SET_SEARCH",
@@ -1,10 +1,11 @@
1
1
  import { CORE_STATE_ACTIONS, CORE_STATE_MUTATIONS, CoreState } from '@/configurator/store/core-state';
2
- import { CORE_DATA_ACTIONS, CORE_DATA_MUTATIONS, CoreData } from '@/configurator/store/core-data';
2
+ import { CORE_DATA_MUTATIONS, CoreData } from '@/configurator/store/core-data';
3
3
  import { BUTTON_ACTIONS, UI_STATE_ACTIONS, UI_STATE_MUTATIONS, UiState } from '@/configurator/store/ui-state';
4
4
  import { PLANNER_UI_STATE_MUTATIONS, PlannerUiState } from '@/planner/store/planner-ui-state';
5
5
  import { COMMON_UI_STATE_MUTATIONS, CommonUiState } from '@/common/store/common-ui-state';
6
6
  import { COLLECTION_VIEW_STATE_MUTATIONS, CollectionViewUiState } from '@/common/store/collection-view-state';
7
7
  import { Nullable } from '@/common/utils/types';
8
+ import { PLANNER_CORE_DATA_ACTIONS, PLANNER_CORE_DATA_MUTATIONS, PlannerCoreData } from '@/planner/store/planner-core-data';
8
9
  export interface SharedUiState {
9
10
  interactionsExpanded: boolean;
10
11
  isFullscreen: boolean;
@@ -13,11 +14,15 @@ export interface SharedUiState {
13
14
  lastRegularViewMode: Nullable<boolean>;
14
15
  wasDesktopBefore: boolean;
15
16
  sidebar: CollectionViewUiState;
16
- selectedActions: BUTTON_ACTIONS[];
17
+ topBarSelectedActions: BUTTON_ACTIONS[];
17
18
  }
18
19
  export declare const MUTATIONS: {
20
+ UPDATE_PRODUCT_LIST: PLANNER_CORE_DATA_MUTATIONS.UPDATE_PRODUCT_LIST;
21
+ UPDATE_PRICE_VALUE: PLANNER_CORE_DATA_MUTATIONS.UPDATE_PRICE_VALUE;
22
+ UPDATE_CURRENCY_SYMBOL: PLANNER_CORE_DATA_MUTATIONS.UPDATE_CURRENCY_SYMBOL;
19
23
  ELEMENT_EXPANDED: COLLECTION_VIEW_STATE_MUTATIONS.ELEMENT_EXPANDED;
20
24
  SET_SELECTED_ELEMENT: COLLECTION_VIEW_STATE_MUTATIONS.SET_SELECTED_ELEMENT;
25
+ RESET_COLLECTION_VIEW: COLLECTION_VIEW_STATE_MUTATIONS.RESET_COLLECTION_VIEW;
21
26
  SET_IS_IN_IFRAME: COMMON_UI_STATE_MUTATIONS.SET_IS_IN_IFRAME;
22
27
  SET_IS_VIEW_ONLY: COMMON_UI_STATE_MUTATIONS.SET_IS_VIEW_ONLY;
23
28
  SET_LAST_REQUESTED_ID: COMMON_UI_STATE_MUTATIONS.SET_LAST_REQUESTED_ID;
@@ -28,12 +33,17 @@ export declare const MUTATIONS: {
28
33
  SET_IS_FULLSCREEN: PLANNER_UI_STATE_MUTATIONS.SET_IS_FULLSCREEN;
29
34
  SET_IS_DESKTOP: PLANNER_UI_STATE_MUTATIONS.SET_IS_DESKTOP;
30
35
  SET_LAST_REGULAR_VIEW_MODE: PLANNER_UI_STATE_MUTATIONS.SET_LAST_REGULAR_VIEW_MODE;
31
- SET_SHOW_CATALOG: PLANNER_UI_STATE_MUTATIONS.SET_SHOW_CATALOG;
32
36
  SET_CATALOG_ROOT_TAG: PLANNER_UI_STATE_MUTATIONS.SET_CATALOG_ROOT_TAG;
33
37
  SET_IS_DRAG: PLANNER_UI_STATE_MUTATIONS.SET_IS_DRAG;
34
38
  SET_ACTION_SELECTED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_SELECTED;
35
39
  SET_ACTION_DESELECTED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_DESELECTED;
36
40
  SET_ACTION_MENU_EXPANDED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_MENU_EXPANDED;
41
+ SET_TOPBAR_ACTION_SELECTED: PLANNER_UI_STATE_MUTATIONS.SET_TOPBAR_ACTION_SELECTED;
42
+ SET_TOPBAR_ACTION_DESELECTED: PLANNER_UI_STATE_MUTATIONS.SET_TOPBAR_ACTION_DESELECTED;
43
+ PUSH_SIDEBAR_VIEW: PLANNER_UI_STATE_MUTATIONS.PUSH_SIDEBAR_VIEW;
44
+ POP_SIDEBAR_VIEW: PLANNER_UI_STATE_MUTATIONS.POP_SIDEBAR_VIEW;
45
+ CLEAR_SIDEBAR: PLANNER_UI_STATE_MUTATIONS.CLEAR_SIDEBAR;
46
+ SET_LAST_WALLS: PLANNER_UI_STATE_MUTATIONS.SET_LAST_WALLS;
37
47
  SET_SELECTED_GROUP: UI_STATE_MUTATIONS.SET_SELECTED_GROUP;
38
48
  SET_IS_PART_LIST_SHOWN: UI_STATE_MUTATIONS.SET_IS_PART_LIST_SHOWN;
39
49
  SHOW_ONLY_ADDONS: UI_STATE_MUTATIONS.SHOW_ONLY_ADDONS;
@@ -60,7 +70,6 @@ export declare const MUTATIONS: {
60
70
  UPDATE_PART_LIST: CORE_DATA_MUTATIONS.UPDATE_PART_LIST;
61
71
  UPDATE_BOUNDS: CORE_DATA_MUTATIONS.UPDATE_BOUNDS;
62
72
  UPDATE_CURRENCY: CORE_DATA_MUTATIONS.UPDATE_CURRENCY;
63
- UPDATE_PRICE_VALUE: CORE_DATA_MUTATIONS.UPDATE_PRICE_VALUE;
64
73
  SET_LABEL: CORE_STATE_MUTATIONS.SET_LABEL;
65
74
  SET_COMPONENT_HAS_CHILDREN: CORE_STATE_MUTATIONS.SET_COMPONENT_HAS_CHILDREN;
66
75
  SET_CATALOG_LABEL: CORE_STATE_MUTATIONS.SET_CATALOG_LABEL;
@@ -68,6 +77,7 @@ export declare const MUTATIONS: {
68
77
  SET_CURRENT_HASH: CORE_STATE_MUTATIONS.SET_CURRENT_HASH;
69
78
  };
70
79
  export declare const ACTIONS: {
80
+ UPDATE_PRICE: PLANNER_CORE_DATA_ACTIONS.UPDATE_PRICE;
71
81
  SELECT_GROUP: UI_STATE_ACTIONS.SELECT_GROUP;
72
82
  SELECT_VIEW_MODE: UI_STATE_ACTIONS.SELECT_VIEW_MODE;
73
83
  SET_INTERACTIONS_EXPANDED: UI_STATE_ACTIONS.SET_INTERACTIONS_EXPANDED;
@@ -79,7 +89,7 @@ export declare const ACTIONS: {
79
89
  USE_PLANNER: UI_STATE_ACTIONS.USE_PLANNER;
80
90
  USE_CONFIGURATOR: UI_STATE_ACTIONS.USE_CONFIGURATOR;
81
91
  SHOW_PARAMS: UI_STATE_ACTIONS.SHOW_PARAMS;
82
- UPDATE_PRICE: CORE_DATA_ACTIONS.UPDATE_PRICE;
92
+ SHOW_ROOMS: UI_STATE_ACTIONS.SHOW_ROOMS;
83
93
  SET_LABEL: CORE_STATE_ACTIONS.SET_LABEL;
84
94
  SET_COMPONENT_HAS_CHILDREN: CORE_STATE_ACTIONS.SET_COMPONENT_HAS_CHILDREN;
85
95
  UPDATE_HASH: CORE_STATE_ACTIONS.UPDATE_HASH;
@@ -89,6 +99,7 @@ export interface StoreState {
89
99
  coreData: CoreData;
90
100
  uiState: UiState;
91
101
  plannerUiState: PlannerUiState;
102
+ plannerCoreData: PlannerCoreData;
92
103
  commonUiState: CommonUiState;
93
104
  }
94
105
  declare const _default: import("vuex").Store<StoreState>;
@@ -1,7 +1,5 @@
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';
5
3
  export declare const throttle: <T extends (...args: any[]) => any>(func: T, delay?: number) => (...funcArgs: Parameters<T>) => void;
6
4
  export declare const round: (float: number, precision: number) => number;
7
5
  export declare const isIdAnItem: (id: string) => boolean;
@@ -30,22 +28,6 @@ export interface KernelBoundsFormatted {
30
28
  export declare const deepCopy: <T>(o: T) => T;
31
29
  export declare const toBoolean: (value: boolean | undefined, defaultValue?: boolean) => boolean;
32
30
  export declare const wait: (delayInMs: number) => Promise<void>;
33
- /**
34
- * Recursively merge properties of two objects.
35
- * If a property exists in both it, property of obj2 is used.
36
- * Returns a new object (copy)
37
- * @param obj1
38
- * @param obj2
39
- */
40
- export declare const deepMergeCopy: (obj1: any, obj2: any) => any;
41
- /**
42
- * Recursively merge properties of two objects.
43
- * If a property exists in both it, property of obj2 is used.
44
- * Warning: This returns obj1 and not a copy!
45
- * @param obj1
46
- * @param obj2
47
- */
48
- export declare const deepMerge: (obj1: any, obj2: any) => any;
49
31
  export declare const NAMES_FOR_LOCALHOST: string[];
50
32
  export declare const getHostname: () => string | null;
51
33
  export declare const isDemoHostname: (hostname: string) => boolean;
@@ -58,6 +40,4 @@ export declare const normalizeFloatingNumber: (num: number, decimals?: number) =
58
40
  export declare const checkForActivePackage: (tenant: RapiTenant) => boolean;
59
41
  export declare const oneTimeInterval: (callback: () => void, delay: number) => number;
60
42
  export declare const runOnIdle: any;
61
- export declare const createShareLinkFromUrl: (url: string) => string;
62
43
  export declare const isLocationJestTest: () => boolean;
63
- export declare const loadVariant: (id: string, applyCurrentGlobalParameters: boolean, sdkConnector: SdkConnector, analytics?: Analytics | undefined) => Promise<void>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Recursively merge properties of two objects.
3
+ * If a property exists in both it, property of obj2 is used.
4
+ * Returns a new object (copy)
5
+ * @param obj1
6
+ * @param obj2
7
+ */
8
+ export declare const deepMergeCopy: (obj1: any, obj2: any) => any;
9
+ /**
10
+ * Recursively merge properties of two objects.
11
+ * If a property exists in both it, property of obj2 is used.
12
+ * Warning: This returns obj1 and not a copy!
13
+ * @param obj1
14
+ * @param obj2
15
+ */
16
+ export declare const deepMerge: (obj1: any, obj2: any) => any;
@@ -1,6 +1,6 @@
1
- import { RapiMaterial, RapiMaterialGroup, RapiTexture, RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
1
+ import { RapiMaterial, RapiMaterialGroup, RapiTagForUi, RapiTexture } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
2
2
  import { KernelPartListParameter, UiPossibleChildTag } from '@roomle/web-sdk/lib/definitions/typings/kernel';
3
- import { CollectionViewElement } from '@/configurator/components/collection-view/-utils/types';
3
+ import { CollectionViewElement } from '@/common/components/collection-view/-utils/types';
4
4
  import { VariantsMap } from '@/configurator/embedding/types';
5
5
  import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
6
6
  export interface RapiMaterialEmbeddedTextures extends RapiMaterial {
@@ -0,0 +1 @@
1
+ export declare const createShareLinkFromUrl: (url: string) => string;
@@ -1,20 +1,19 @@
1
1
  import { Nullable } from '@/common/utils/types';
2
- export declare const TOUCH_DRAG_DELAY = 75;
3
- export declare const TOUCH_DRAG_EPSILON = 10;
2
+ export declare const TOUCH_DRAG_TIMEOUT = 500;
4
3
  export interface TouchDragCallbacks {
5
4
  onTouchDragStart: (payload: Nullable<any>, event: TouchEvent) => void;
6
5
  }
7
6
  export declare class TouchDrag<Payload> {
8
- private _detectTouchDragInterval;
9
- private _firstTouch;
10
- private _lastTouch;
7
+ private _touchDragTimeOut;
11
8
  private _onTouchDragStart;
12
9
  private _payload;
13
- constructor(payload: Payload, { onTouchDragStart }: TouchDragCallbacks);
10
+ private _delay;
11
+ constructor(payload: Payload, { onTouchDragStart }: TouchDragCallbacks, options?: {
12
+ delay?: number;
13
+ });
14
14
  onTouchStart(event: TouchEvent): void;
15
15
  onTouchEnd(): void;
16
- onTouchMove(event: TouchEvent): void;
17
- private _clearInterval;
16
+ onTouchMove(_event: TouchEvent): void;
17
+ private _clearTimeout;
18
18
  private _resetTouches;
19
- private _detectTouchDrag;
20
19
  }
@@ -11,3 +11,5 @@ export declare enum USER_ACTION {
11
11
  SHARE_AR = 301,
12
12
  SAVE_DRAFT = 302
13
13
  }
14
+ export declare type ToggleCallback = (isExpanded: boolean) => void;
15
+ export declare type CloseReason = 'toggle';
@@ -0,0 +1,3 @@
1
+ import { Analytics } from '@/common/plugins/analytics';
2
+ import { SdkConnector } from '@/configurator/business-logic/sdk-connector';
3
+ export declare const loadVariant: (id: string, applyCurrentGlobalParameters: boolean, sdkConnector: SdkConnector, analytics?: Analytics | undefined) => Promise<void>;
@@ -1,9 +1,9 @@
1
1
  import { RapiItem, RapiMaterial } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
2
2
  import { KernelValue, UiPossibleChild } from '@roomle/web-sdk/lib/definitions/typings/kernel';
3
3
  import { Nullable } from '@/common/utils/types';
4
- export interface GridViewElement {
4
+ export interface GridViewElement<T = (RapiMaterial | KernelValue | UiPossibleChild | RapiItem)> {
5
5
  key: string;
6
- payload: RapiMaterial | KernelValue | UiPossibleChild | RapiItem;
6
+ payload: T;
7
7
  }
8
8
  export interface GridViewVariantElement extends GridViewElement {
9
9
  hash: string;
@@ -13,4 +13,4 @@ export interface GridViewGroup {
13
13
  label: Nullable<string>;
14
14
  elements: GridViewElement[];
15
15
  }
16
- export declare const toGridViewElements: (elements: Array<RapiMaterial | KernelValue | UiPossibleChild | RapiItem>, key: string) => GridViewElement[];
16
+ export declare const toGridViewElements: <T = RapiItem | RapiMaterial | UiPossibleChild | KernelValue>(elements: T[], key: string) => GridViewElement<T>[];
@@ -1,11 +1,11 @@
1
1
  import type { ExposedApi } from '@/configurator/embedding/exposed-api';
2
2
  import type { UiInitData } from '@/configurator/embedding/types';
3
- import ConfiguratorUiCallbacks from '@roomle/web-sdk/lib/definitions/configurator-core/src/services/configurator-ui-callback';
4
- import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
5
- import { ExposedAnalyticsCallbacks } from '@/configurator/embedding/exposed-analytics-callbacks';
6
- import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
7
- import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
8
- import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
3
+ import type ConfiguratorUiCallbacks from '@roomle/web-sdk/lib/definitions/configurator-core/src/services/configurator-ui-callback';
4
+ import type RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
5
+ import type { ExposedAnalyticsCallbacks } from '@/configurator/embedding/exposed-analytics-callbacks';
6
+ import type RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
7
+ import type RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
8
+ import type { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
9
9
  export interface RoomleEmbeddingApiKeys {
10
10
  extended: any;
11
11
  ui: any;
@@ -18,7 +18,11 @@ export declare enum UI_BUTTON {
18
18
  ROTATE = "rotate",
19
19
  SNAPPING = "snapping",
20
20
  UNDO = "undo",
21
- REDO = "redo"
21
+ REDO = "redo",
22
+ PARTLIST_PLANNER = "partlist_planner",
23
+ PRODUCTLIST = "productlist",
24
+ TWO_D_VIEW = "2dview",
25
+ ADD_ROOM = "add_room"
22
26
  }
23
27
  interface FeatureFlags {
24
28
  realPartList?: boolean;
@@ -45,6 +49,9 @@ export interface UiInitData extends InitDataDefinition, GlobalInitDataDefinition
45
49
  [UI_BUTTON.SNAPPING]?: boolean;
46
50
  [UI_BUTTON.UNDO]?: boolean;
47
51
  [UI_BUTTON.REDO]?: boolean;
52
+ [UI_BUTTON.TWO_D_VIEW]?: boolean;
53
+ [UI_BUTTON.PARTLIST_PLANNER]?: boolean;
54
+ [UI_BUTTON.ADD_ROOM]?: boolean;
48
55
  };
49
56
  skin?: EmbeddingSkin;
50
57
  zIndex?: number;
@@ -18,7 +18,11 @@ export declare enum BUTTON_ACTIONS {
18
18
  ROTATE = 7,
19
19
  SNAPPING = 8,
20
20
  UNDO = 9,
21
- REDO = 10
21
+ REDO = 10,
22
+ PARTLIST_PLANNER = 11,
23
+ PRODUCTLIST = 12,
24
+ TWO_D_VIEW = 13,
25
+ ADD_ROOM = 14
22
26
  }
23
27
  export interface SceneSelection {
24
28
  selectionMode: string;
@@ -51,8 +55,6 @@ export interface UiState extends SharedUiState {
51
55
  export declare enum UI_STATE_MUTATIONS {
52
56
  SET_SELECTED_GROUP = "setSelectedGroup",
53
57
  SET_IS_DESKTOP = "setIsDesktop",
54
- SET_ACTION_SELECTED = "setActionSelected",
55
- SET_ACTION_DESELECTED = "setActionDeselected",
56
58
  SET_INTERACTIONS_EXPANDED = "setInteractionsExpanded",
57
59
  SET_IS_LANDSCAPE = "setIsLandscape",
58
60
  SET_IS_PART_LIST_SHOWN = "SET_IS_PART_LIST_SHOWN",
@@ -75,7 +77,9 @@ export declare enum UI_STATE_MUTATIONS {
75
77
  SET_UNDO = "SET_UNDO",
76
78
  SET_REDO = "SET_REDO",
77
79
  SET_UNDO_PLANNER = "SET_UNDO_PLANNER",
78
- SET_REDO_PLANNER = "SET_REDO_PLANNER"
80
+ SET_REDO_PLANNER = "SET_REDO_PLANNER",
81
+ SET_TOPBAR_ACTION_SELECTED = "SET_TOPBAR_ACTION_SELECTED",
82
+ SET_TOPBAR_ACTION_DESELECTED = "SET_TOPBAR_ACTION_DESELECTED"
79
83
  }
80
84
  export declare enum UI_STATE_ACTIONS {
81
85
  SELECT_GROUP = "SELECT_GROUP",
@@ -88,7 +92,8 @@ export declare enum UI_STATE_ACTIONS {
88
92
  USE_VIEWER = "USE_VIEWER",
89
93
  USE_PLANNER = "USE_PLANNER",
90
94
  USE_CONFIGURATOR = "USE_CONFIGURATOR",
91
- SHOW_PARAMS = "SHOW_PARAMS"
95
+ SHOW_PARAMS = "SHOW_PARAMS",
96
+ SHOW_ROOMS = "SHOW_ROOMS"
92
97
  }
93
98
  export declare enum UI_STATE_GETTERS {
94
99
  USE_REGULAR_LAYOUT = "USE_REGULAR_LAYOUT",
@@ -96,7 +101,10 @@ export declare enum UI_STATE_GETTERS {
96
101
  COLLECTION_VIEW_ELEMENTS = "COLLECTION_VIEW_ELEMENTS",
97
102
  COLLECTION_VIEW_ADDON_ELEMENTS = "COLLECTION_VIEW_ADDON_ELEMENTS",
98
103
  COLLECTION_VIEW_VARIANTS = "COLLECTION_VIEW_VARIANTS",
99
- SHOW_BACK_TO_WEBSITE = "SHOW_BACK_TO_WEBSITE"
104
+ SHOW_BACK_TO_WEBSITE = "SHOW_BACK_TO_WEBSITE",
105
+ PART_LIST_PLANNER_SHOWN = "PART_LIST_PLANNER_SHOWN",
106
+ PRODUCT_LIST_SHOWN = "PRODUCT_LIST_SHOWN",
107
+ SAMPLE_ROOMS_SHOWN = "SAMPLE_ROOMS_SHOWN"
100
108
  }
101
109
  export declare const initialState: UiState;
102
110
  export declare const uiState: Module<UiState, StoreState>;
@@ -0,0 +1,2 @@
1
+ import { SampleRoomsCollectionView } from '@/planner/business-logic/rooms';
2
+ export declare const getPreDefinedRooms: (translate: (key: string) => string) => SampleRoomsCollectionView;
@@ -0,0 +1,12 @@
1
+ import { CollectionViewElement } from '@/common/components/collection-view/-utils/types';
2
+ import { WallDefinition } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
3
+ import { PlanOverview } from '@roomle/web-sdk/lib/definitions/typings/planner';
4
+ export declare type RoomType = 'wall' | 'corner' | 'square' | 'L';
5
+ export interface SampleRoom {
6
+ id: string;
7
+ roomSketch: string;
8
+ label: string;
9
+ type: RoomType;
10
+ }
11
+ export declare type SampleRoomsCollectionView = Array<CollectionViewElement<SampleRoom[]>>;
12
+ export declare const getRoomDefinition: (type: RoomType, planOverview: PlanOverview) => WallDefinition[];
@@ -0,0 +1,21 @@
1
+ import { StoreState } from '@/common/store';
2
+ import { Nullable } from '@/common/utils/types';
3
+ import { Module } from 'vuex';
4
+ import { ProductListItem } from '@/planner/utils/planner-sidebar';
5
+ export interface PlannerCoreData {
6
+ productList: ProductListItem[];
7
+ currencySymbol: string;
8
+ price: Nullable<number>;
9
+ }
10
+ export declare enum PLANNER_CORE_DATA_MUTATIONS {
11
+ UPDATE_PRODUCT_LIST = "UPDATE_PRODUCT_LIST",
12
+ UPDATE_PRICE_VALUE = "UPDATE_PRICE_VALUE",
13
+ UPDATE_CURRENCY_SYMBOL = "UPDATE_CURRENCY_SYMBOL"
14
+ }
15
+ export declare enum PLANNER_CORE_DATA_ACTIONS {
16
+ UPDATE_PRICE = "UPDATE_PRICE"
17
+ }
18
+ export declare enum PLANNER_CORE_DATA_GETTERS {
19
+ CURRENT_PRICE = "CURRENT_PRICE"
20
+ }
21
+ export declare const plannerCoreData: Module<PlannerCoreData, StoreState>;
@@ -2,15 +2,20 @@ import { Module } from 'vuex';
2
2
  import { SharedUiState, StoreState } from '@/common/store';
3
3
  import { Nullable } from '@/common/utils/types';
4
4
  import { SelectionPayload } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
5
+ import { BUTTON_ACTIONS } from '@/configurator/store/ui-state';
5
6
  import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
7
+ import { PlannerSidebarState } from '@/planner/utils/planner-sidebar';
8
+ import { KernelWall } from '@roomle/web-sdk/lib/definitions/typings/planner';
6
9
  declare type SelectionType = 'static' | 'configuration';
7
10
  export interface PlannerUiState extends SharedUiState {
8
11
  selection: Nullable<SelectionType>;
9
12
  selectionPayload: Nullable<SelectionPayload>;
10
- showCatalog: boolean;
11
13
  isDrag: boolean;
12
14
  catalogTags: Nullable<RapiTagForUi[]>;
13
15
  actionMenuExpanded: boolean;
16
+ selectedActions: BUTTON_ACTIONS[];
17
+ stackViewStack: PlannerSidebarState[];
18
+ lastWalls: KernelWall[];
14
19
  }
15
20
  export declare enum PLANNER_UI_STATE_MUTATIONS {
16
21
  SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload",
@@ -20,19 +25,29 @@ export declare enum PLANNER_UI_STATE_MUTATIONS {
20
25
  SET_IS_FULLSCREEN = "PLANNER_UI_STATE_setIsFullscreen",
21
26
  SET_IS_DESKTOP = "PLANNER_UI_STATE_setIsDesktop",
22
27
  SET_LAST_REGULAR_VIEW_MODE = "PLANNER_UI_STATE_SET_LAST_REGULAR_VIEW_MODE",
23
- SET_SHOW_CATALOG = "PLANNER_UI_STATE_SET_SHOW_CATALOG",
24
28
  SET_CATALOG_ROOT_TAG = "PLANNER_UI_STATE_SET_CATALOG_ROOT_TAG",
25
29
  SET_IS_DRAG = "SET_IS_DRAG",
26
- SET_ACTION_SELECTED = "setActionSelected",
27
- SET_ACTION_DESELECTED = "setActionDeselected",
28
- SET_ACTION_MENU_EXPANDED = "setSelectionMenuExpanded"
30
+ SET_ACTION_SELECTED = "SET_ACTION_SELECTED",
31
+ SET_ACTION_DESELECTED = "SET_ACTION_DESELECTED",
32
+ SET_ACTION_MENU_EXPANDED = "SET_ACTION_MENU_EXPANDED",
33
+ SET_TOPBAR_ACTION_SELECTED = "SET_TOPBAR_ACTION_SELECTED",
34
+ SET_TOPBAR_ACTION_DESELECTED = "SET_TOPBAR_ACTION_DESELECTED",
35
+ PUSH_SIDEBAR_VIEW = "PUSH_SIDEBAR_VIEW",
36
+ POP_SIDEBAR_VIEW = "POP_SIDEBAR_VIEW",
37
+ CLEAR_SIDEBAR = "CLEAR_SIDEBAR",
38
+ SET_LAST_WALLS = "SET_LAST_WALLS"
29
39
  }
30
40
  export declare enum PLANNER_UI_STATE_ACTIONS {
31
41
  SELECT_VIEW_MODE = "PLANNER_UI_STATE_SELECT_VIEW_MODE",
32
- SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_SET_INTERACTIONS_EXPANDED"
42
+ SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_SET_INTERACTIONS_EXPANDED",
43
+ DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS"
33
44
  }
34
45
  export declare enum PLANNER_UI_STATE_GETTERS {
35
- CATALOG_ROOT_TAG = "PLANNER_UI_STATE_CATALOG_ROOT_TAG"
46
+ CATALOG_ROOT_TAG = "PLANNER_UI_STATE_CATALOG_ROOT_TAG",
47
+ SELECTED_ITEM_PAYLOAD = "PLANNER_UI_STATE_SELECTED_ITEM_PAYLOAD",
48
+ PART_LIST_PLANNER_SHOWN = "PART_LIST_PLANNER_SHOWN",
49
+ PRODUCT_LIST_SHOWN = "PRODUCT_LIST_SHOWN",
50
+ LAST_OF_STACK_VIEW_STACK = "LAST_OF_STACK_VIEW_STACK"
36
51
  }
37
52
  export declare const plannerUiState: Module<PlannerUiState, StoreState>;
38
53
  export {};
@@ -0,0 +1,21 @@
1
+ import { KernelPartList, UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
2
+ import { Store } from 'vuex';
3
+ import { StoreState } from '@/common/store';
4
+ import { SdkConnector } from '@/configurator/business-logic/sdk-connector';
5
+ import { RapiConfiguration, RapiItem } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
6
+ export interface PlannerSidebarState {
7
+ welcome: boolean;
8
+ catalog: boolean;
9
+ productList: boolean;
10
+ partList: boolean;
11
+ sampleRooms: boolean;
12
+ selectionDetail: boolean;
13
+ mobileExpanded: boolean;
14
+ [key: string]: boolean;
15
+ }
16
+ export interface ProductListItem extends UiPlanObject {
17
+ quantity: number;
18
+ }
19
+ export declare const initialPlannerSidebarState: PlannerSidebarState;
20
+ export declare const matchProductListAndQuantity: (productList: UiPlanObject[]) => ProductListItem[];
21
+ export declare const fillPartList: (data: RapiItem | RapiConfiguration, partList: KernelPartList, hash: string, sdkConnector: SdkConnector, store: Store<StoreState>) => Promise<void>;
@@ -87,6 +87,96 @@ export declare const MOCK_RAPI_ITEM: {
87
87
  version: number;
88
88
  };
89
89
  };
90
+ export declare const MOCK_RAPI_ITEM_CONFIGURATION: {
91
+ item: {
92
+ height: number;
93
+ width: number;
94
+ depth: number;
95
+ displayedHeight: number;
96
+ displayedWidth: number;
97
+ displayedDepth: number;
98
+ perspectiveImage: string;
99
+ perspectiveImageHD: string;
100
+ topImage: string;
101
+ threeDimensionalAssetWeb: string;
102
+ threeDimensionalAssetIOS: string;
103
+ threeDimensionalAsset: string;
104
+ configuration: string;
105
+ assets: {
106
+ 'unity-13-web': {
107
+ format: string;
108
+ url: string;
109
+ };
110
+ usdz: {
111
+ format: string;
112
+ url: string;
113
+ };
114
+ 'glb2_draft-ios': {
115
+ format: string;
116
+ url: string;
117
+ };
118
+ 'unity-13-mac': {
119
+ format: string;
120
+ url: string;
121
+ };
122
+ 'glb2_draft-and': {
123
+ format: string;
124
+ url: string;
125
+ };
126
+ src: {
127
+ format: string;
128
+ url: string;
129
+ };
130
+ 'unity-13-ios': {
131
+ format: string;
132
+ url: string;
133
+ };
134
+ blend: {
135
+ format: string;
136
+ url: string;
137
+ };
138
+ 'glb2_draft-web': {
139
+ format: string;
140
+ url: string;
141
+ };
142
+ 'unity-13-and': {
143
+ format: string;
144
+ url: string;
145
+ };
146
+ glb: {
147
+ format: string;
148
+ url: string;
149
+ };
150
+ };
151
+ externalIdentifier: string;
152
+ manufacturerSKU: string;
153
+ hidden: boolean;
154
+ visibilityStatus: number;
155
+ created: string;
156
+ updated: string;
157
+ flipable: boolean;
158
+ scaleable: boolean;
159
+ colorable: boolean;
160
+ layer: number;
161
+ sort: number;
162
+ basecolor: string;
163
+ orderable: boolean;
164
+ requestable: boolean;
165
+ retailPriceAllowed: boolean;
166
+ label: string;
167
+ language: string;
168
+ catalog: string;
169
+ id: string;
170
+ links: {
171
+ tags: string;
172
+ similarItems: string;
173
+ perfectFit: string;
174
+ additionalContents: string;
175
+ };
176
+ attributes: never[];
177
+ version: number;
178
+ };
179
+ };
90
180
  export declare const MOCK_RAPI_CONFIGURATION: {
91
181
  configuration: {
92
182
  assets: {