@roomle/embedding-lib 4.37.0 → 4.40.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 (44) hide show
  1. package/docs/__sidebar__.json +14 -0
  2. package/docs/api/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +1 -1
  3. package/docs/api/classes/exposed_api.ExposedApi.md +11 -11
  4. package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +31 -7
  5. package/docs/api/classes/roomle_configurator_api.default.md +9 -9
  6. package/docs/api/enums/types.UI_BUTTON.md +33 -22
  7. package/docs/api/interfaces/exposed_callbacks.Labels.md +2 -2
  8. package/docs/api/interfaces/exposed_callbacks.Price.md +2 -2
  9. package/docs/api/interfaces/roomle_configurator_api.RoomleEmbeddingApiKeys.md +4 -4
  10. package/docs/api/interfaces/types.ConfiguratorSettings.md +5 -5
  11. package/docs/api/interfaces/types.EmbeddingSkin.md +5 -5
  12. package/docs/api/interfaces/types.UiInitData.md +31 -16
  13. package/docs/api/modules/roomle_configurator_api.md +3 -3
  14. package/docs/examples/11_light_settings.html +90 -62
  15. package/docs/examples/roomle-configurator-api.es.min.js +254 -58
  16. package/docs/hsp.md +61 -0
  17. package/docs/integration.md +1101 -0
  18. package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +14 -2
  19. package/docs/migration-guides/v2-to-v3.md +2 -2
  20. package/docs/moc/index.md +86 -0
  21. package/docs/simple.md +1 -1
  22. package/package.json +2 -2
  23. package/types/index.d.ts +53 -28
  24. package/types/src/common/business-logic/connector.d.ts +8 -0
  25. package/types/src/common/store/collection-view-state.d.ts +8 -3
  26. package/types/src/common/store/common-ui-state.d.ts +1 -1
  27. package/types/src/common/store/index.d.ts +0 -1
  28. package/types/src/common/utils/touch-drag.d.ts +6 -1
  29. package/types/src/configurator/business-logic/roomle-sdk-wrapper.d.ts +2 -0
  30. package/types/src/configurator/business-logic/sdk-connector-configurator.d.ts +3 -5
  31. package/types/src/configurator/business-logic/sdk-connector.d.ts +4 -7
  32. package/types/src/configurator/embedding/exposed-api.d.ts +1 -1
  33. package/types/src/configurator/embedding/exposed-callbacks.d.ts +7 -1
  34. package/types/src/configurator/embedding/types.d.ts +8 -1
  35. package/types/src/configurator/store/ui-state.d.ts +1 -0
  36. package/types/src/planner/business-logic/sdk-connector-planner.d.ts +3 -3
  37. package/types/src/planner/store/planner-ui-state.d.ts +3 -2
  38. package/types/src/planner/utils/planner-sidebar.d.ts +0 -1
  39. package/types/src/viewer/business-logic/sdk-connector-viewer.d.ts +2 -2
  40. package/types/tests/helpers/data/part-list.d.ts +16 -0
  41. package/types/tests/helpers/mocks/sdk-connector.d.ts +1 -0
  42. package/types/tests/integration/{configurator → common}/components/BottomBar.spec.d.ts +0 -0
  43. package/types/tests/integration/planner/components/{BottomBar.spec.d.ts → PlannerSidebar.spec.d.ts} +0 -0
  44. package/docs/index.md +0 -846
@@ -1,6 +1,18 @@
1
- ## [4.37.0](https://gitlab.com/roomle/web/roomle-ui/compare/embedding-v4.36.0...embedding-v4.37.0) (2022-06-09)
1
+ ## [4.40.0](https://gitlab.com/roomle/web/roomle-ui/compare/embedding-v4.39.0...embedding-v4.40.0) (2022-08-02)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * upgrade SDK to 2.34.0 ([c222dce](https://gitlab.com/roomle/web/roomle-ui/commit/c222dce6720fe07d7ded3eee3fe5ea23eaf246c0))
6
+ * add new structure for embedding docu ([8e3a563](https://gitlab.com/roomle/web/roomle-ui/commit/8e3a56324c345d2d45d6202415109e5629477224))
7
+ * add setting for multi select materials ([15cbc21](https://gitlab.com/roomle/web/roomle-ui/commit/15cbc21af7a123ceb90bf7f2f7b6c94e89d13664))
8
+ * **SDK:** upgrade to version 2.36.0-alpha.4 ([2317abf](https://gitlab.com/roomle/web/roomle-ui/commit/2317abf9349aff15705e13fcaf97ce9a0555ef53))
9
+ * **SDK:** upgrade to version 2.36.0-alpha.5 ([10a31d2](https://gitlab.com/roomle/web/roomle-ui/commit/10a31d262362ed6523d62fedd43a18f2aa34568d))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * add margin to height header on desktop ([8065114](https://gitlab.com/roomle/web/roomle-ui/commit/80651140541044ec1236ad8f08a5dc10d8a13e03))
15
+ * embedding moc should display start planner button instead of action and bottom buttons ([831cd91](https://gitlab.com/roomle/web/roomle-ui/commit/831cd91f016f06b26131da82583b48393d976836))
16
+ * extended callbacks should be added in planner and configurator ([6bcb1e5](https://gitlab.com/roomle/web/roomle-ui/commit/6bcb1e50133717dd073f587ea2a82cac998dc9da))
17
+ * try to remove the Conflicting order in the UI project build in gitlab ([7ce8d42](https://gitlab.com/roomle/web/roomle-ui/commit/7ce8d428514d0202afc205b3944494aa57c79434))
18
+ * tslint error ([54fa29e](https://gitlab.com/roomle/web/roomle-ui/commit/54fa29eb2d0dac0df702693914c7b3880ebc1c26))
@@ -17,7 +17,7 @@ This has some implications:
17
17
 
18
18
  * to create this overlay, the Roomle Configurator has to be in control of all the DOM elements which are needed to expand over the whole page. Therefore things like the footer are now within the iframe and not custom made by the website or webshop. This makes embedding the Roomle Configurator easier because you do not have to wire up all the events and callbacks to create user interface elements like the footer. On the other hand, this also means that old parts of the embedding need to be removed from your website or webshop and re-thought.
19
19
  * also it is important to note that there shouldn't be elements with a higher z-index as the Roomle Configurator because the correct z-indices are needed for the full-page mode.
20
- * there is a back button which closes the full-page mode. If you need to listen to the event when the user clicks the back button this is possible and described in the section [react on button clicks](../index.md#react-on-button-clicks) in the docu.
20
+ * there is a back button which closes the full-page mode. If you need to listen to the event when the user clicks the back button this is possible and described in the section [react on button clicks](../integration.md#react-on-button-clicks) in the docu.
21
21
 
22
22
  With the new version, it is essential that you use the correct `configurator id`. You should get the configurator id from your Roomle contact person. This is important because of two reasons:
23
23
 
@@ -132,4 +132,4 @@ To make the embedding easier we slimmed down the API surface of the configurator
132
132
 
133
133
  We especially simplified the skinning options because we think that the current user interface is very "neutral" and should fit with slight adjustments to most of the websites and webshops out there. If there is a strong demand for huge user interface adjustments and changes we can offer the Roomle Web SDK or forking of the UI repo. If this is really needed please speak with your Roomle contact person.
134
134
 
135
- Because the user interface changed completely it's also a good time to rethink how the Roomle Configurator is embedded into your website or webshop. Therefore we recommend to read through the new docu and explore the new possibilities which the new configurator gives you. You can find the [new docu here](../index.md)
135
+ Because the user interface changed completely it's also a good time to rethink how the Roomle Configurator is embedded into your website or webshop. Therefore we recommend to read through the new docu and explore the new possibilities which the new configurator gives you. You can find the [new docu here](../integration.md)
@@ -0,0 +1,86 @@
1
+ ---
2
+ hide_title: true
3
+ title: "Multi-object Configurator"
4
+ ---
5
+
6
+ # Multi-object Configurator
7
+
8
+ The Multi-object Configurator allows you to configure not only one object but several objects in relation to each other.
9
+
10
+ ## Enable multi-object configuration
11
+
12
+ To enable MoC:
13
+
14
+ - To enable multi-object configuration, you need to add and set the `moc` flag in the `Rubens settings` to true
15
+ ([see Rubens Admin documentation](https://docs.roomle.com/web/datamanagement/administration.html#rubens-settings)).
16
+ When this flag is set, all configurators in the tenant are automatically multi-object configurators.
17
+
18
+ ## Setup the catalog structure
19
+
20
+ To offer a set of products in the MoC they must be stored in a catalog and tagged accordingly.
21
+ To display the products and divide them into categories, the tags must be structured correctly.
22
+
23
+ Each tag can be used as root tag for the MoC.
24
+ A sub-tag must be created for each category and each product that corresponds to this category must be tagged with it.
25
+ The tag structure could then look like this:
26
+
27
+ 1 moc_catalog (root-tag)
28
+ 2 |
29
+ 3 ├── Fences (sub-tag 1)
30
+ 4 |
31
+ 5 ├── Couch Tables (sub-tag 2)
32
+ 6 |
33
+ 7 ├── Outdoor Tables (sub-tag 3)
34
+ 8 |
35
+ 9 └── Sofas (sub-tag 4)
36
+
37
+ Also see Tags documentation: <https://docs.roomle.com/web/datamanagement/catalogs.html#tags>
38
+
39
+ By tagging the products in the catalog, you can add them to the scene by clicking the "Add Product" button.
40
+
41
+ ## Integration
42
+
43
+ To embed or integrate the MoC, the following parameters must be included in the URL
44
+
45
+ - configuratorId: The configurator ID of the tenant where you enabled the MoC
46
+ - catalogRootTag: The tag of the catalog where you stored the products you want to show in the MoC, Alternatively you
47
+ could also set the root-tag ID as catalogRootTag in your Rubens settings.
48
+ - moc: Enable the MoC feature in the Rubens settings or via integration.
49
+
50
+ Also see integration documentation: <https://docs.roomle.com/web/embedding/#embedding-integration>
51
+
52
+ ### Embedding:
53
+
54
+ If you are using the embedding lib you have to call `createPlanner` instead of `create` or `createConfigurator` to load
55
+ a MoC scene.
56
+
57
+ ## Recipes
58
+
59
+ ### Adding items to the scene
60
+
61
+ It’s possible to add additional products/items/configurations to the scene using the `insertObject` API:
62
+
63
+ ```typescript
64
+ await interface.ui.insertObject('usm:frame');
65
+ ```
66
+
67
+ By default the object is placed somewhere where it does not overlap with other items in the scene. You can also supply a
68
+ position and a rotation for the object in the scene:
69
+
70
+ ```typescript
71
+ await interface.ui.insertObject('usm:frame', {x: -3, y: 0, z: 3}, Math.PI);
72
+ ```
73
+
74
+ Position (2nd parameter) is in meters and the rotation (3rd parameter) is in radians.
75
+
76
+ ### Gets called when something is changed in the plan
77
+
78
+ It is possible to implement a behavior which gets called when there is something changed in the plan. It gets all
79
+ objects of the plan as parameter.
80
+
81
+ ```typescript
82
+ interface
83
+
84
+ .
85
+ ui.callbacks.onPlanUpdate = (objects) => doSomething;
86
+ ```
package/docs/simple.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Embedding
2
2
 
3
- To embed Roomle Rubens as an iframe in your website or webshop it is enough to create a link and use this link as a `src` in an iframe. It is important to note that we recommend this typ of integration for static items or very simple use cases. This is due to the fact that this simplistic iframe integration does not communicate anything to your website or webshop. This could become problematic when you want to hand over customized products to the shopping cart. If you need deeper integration you can use our [embedding integration](./index) or even [the Web Sdk](../guides/getting-started/preface) (in case you want to heavily modify our user interface).
3
+ To embed Roomle Rubens as an iframe in your website or webshop it is enough to create a link and use this link as a `src` in an iframe. It is important to note that we recommend this typ of integration for static items or very simple use cases. This is due to the fact that this simplistic iframe integration does not communicate anything to your website or webshop. This could become problematic when you want to hand over customized products to the shopping cart. If you need deeper integration you can use our [embedding integration](./integration) or even [the Web Sdk](../guides/sdk/preface) (in case you want to heavily modify our user interface).
4
4
 
5
5
  ## Questions
6
6
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@roomle/embedding-lib",
3
- "version": "4.37.0",
3
+ "version": "4.40.0",
4
4
  "main": "roomle-configurator-api.es.min.js",
5
5
  "types": "types/index.d.ts",
6
6
  "author": "Roomle Development",
7
7
  "dependencies": {
8
- "@roomle/web-sdk": "2.34.0"
8
+ "@roomle/web-sdk": "2.36.0-alpha.5"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@semantic-release/changelog": "^5.0.1",
package/types/index.d.ts CHANGED
@@ -72,7 +72,8 @@ declare module "configurator/embedding/types" {
72
72
  PARTLIST_PLANNER = "partlist_planner",
73
73
  PRODUCTLIST = "productlist",
74
74
  TWO_D_VIEW = "2dview",
75
- ADD_ROOM = "add_room"
75
+ ADD_ROOM = "add_room",
76
+ STARTPLANNER = "startPlanner"
76
77
  }
77
78
  interface FeatureFlags {
78
79
  realPartList?: boolean;
@@ -102,6 +103,7 @@ declare module "configurator/embedding/types" {
102
103
  [UI_BUTTON.TWO_D_VIEW]?: boolean;
103
104
  [UI_BUTTON.PARTLIST_PLANNER]?: boolean;
104
105
  [UI_BUTTON.ADD_ROOM]?: boolean;
106
+ [UI_BUTTON.STARTPLANNER]?: boolean;
105
107
  };
106
108
  skin?: EmbeddingSkin;
107
109
  zIndex?: number;
@@ -179,6 +181,11 @@ declare module "configurator/embedding/types" {
179
181
  * default: true
180
182
  */
181
183
  applyCurrentGlobalParameters?: boolean;
184
+ /**
185
+ * set this flag to true if you want that a user can select more than one material category at once
186
+ * default: false
187
+ */
188
+ materialMultiSelect?: boolean;
182
189
  }
183
190
  export interface EmbeddingSkin {
184
191
  'primary-color'?: string;
@@ -197,7 +204,7 @@ declare module "configurator/embedding/types" {
197
204
  }
198
205
  declare module "configurator/embedding/exposed-callbacks" {
199
206
  import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
200
- import { KernelPartList } from '@roomle/web-sdk/lib/definitions/typings/kernel';
207
+ import { KernelPartList, UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
201
208
  import { RapiConfigurationEnhanced } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
202
209
  import { UI_BUTTON } from "configurator/embedding/types";
203
210
  import { Nullable } from "common/utils/types";
@@ -235,6 +242,12 @@ declare module "configurator/embedding/exposed-callbacks" {
235
242
  */
236
243
  onButtonClicked: (name: UI_BUTTON) => Promise<boolean> | boolean | void;
237
244
  onRequestPlan: (planId: string, image: Base64Image, items: any[]) => void;
245
+ /**
246
+ * Gets called if a plan object gets added, changed or removed
247
+ * Only the move of plan object does NOT trigger this function
248
+ * @param objects
249
+ */
250
+ onPlanUpdate: (objects: UiPlanObject[]) => void;
238
251
  }
239
252
  }
240
253
  declare module "configurator/store/core-state" {
@@ -435,7 +448,7 @@ declare module "common/store/common-ui-state" {
435
448
  import { RapiId } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
436
449
  export interface CommonUiState {
437
450
  isInIframe: boolean;
438
- isViewOnly: boolean;
451
+ isViewOnly: Nullable<boolean>;
439
452
  lastRequestedId: Nullable<RapiId>;
440
453
  }
441
454
  export const initialState: CommonUiState;
@@ -453,7 +466,6 @@ declare module "planner/utils/planner-sidebar" {
453
466
  import { SdkConnector } from "configurator/business-logic/sdk-connector";
454
467
  import { RapiConfiguration, RapiItem } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
455
468
  export interface PlannerSidebarState {
456
- welcome: boolean;
457
469
  catalog: boolean;
458
470
  productList: boolean;
459
471
  partList: boolean;
@@ -490,7 +502,6 @@ declare module "planner/store/planner-ui-state" {
490
502
  lastWalls: KernelWall[];
491
503
  }
492
504
  export enum PLANNER_UI_STATE_MUTATIONS {
493
- SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload",
494
505
  SET_SELECTION = "PLANNER_UI_STATE_setSelection",
495
506
  SET_IS_LANDSCAPE = "PLANNER_UI_STATE_setIsLandscape",
496
507
  SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_setInteractionsExpanded",
@@ -512,7 +523,9 @@ declare module "planner/store/planner-ui-state" {
512
523
  export enum PLANNER_UI_STATE_ACTIONS {
513
524
  SELECT_VIEW_MODE = "PLANNER_UI_STATE_SELECT_VIEW_MODE",
514
525
  SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_SET_INTERACTIONS_EXPANDED",
515
- DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS"
526
+ DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS",
527
+ CLEAR_AND_CLOSE_SIDEBAR = "CLEAR_AND_CLOSE_SIDEBAR",
528
+ SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload"
516
529
  }
517
530
  export enum PLANNER_UI_STATE_GETTERS {
518
531
  CATALOG_ROOT_TAG = "PLANNER_UI_STATE_CATALOG_ROOT_TAG",
@@ -528,11 +541,13 @@ declare module "common/store/collection-view-state" {
528
541
  import { Nullable } from "common/utils/types";
529
542
  import { CollectionViewElement } from "common/components/collection-view/-utils/types";
530
543
  import { StoreState } from "common/store/index";
544
+ export type ViewTypeState = 'listView' | 'gridViewSmall' | 'gridViewBig';
531
545
  export interface GridViewUiState {
532
546
  filter: string[];
533
- showAllAsList: boolean;
534
547
  search: Nullable<string>;
535
548
  userInitiatedSearch: boolean;
549
+ viewType: ViewTypeState;
550
+ hasGroupLabel: boolean;
536
551
  }
537
552
  export interface CollectionViewUiState {
538
553
  selected: Nullable<CollectionViewElement>;
@@ -540,6 +555,7 @@ declare module "common/store/collection-view-state" {
540
555
  gridView: GridViewUiState;
541
556
  }
542
557
  export const getInitialCollectionViewState: () => CollectionViewUiState;
558
+ export const getInitialViewType: () => ViewTypeState;
543
559
  export enum COLLECTION_VIEW_STATE_MUTATIONS {
544
560
  ELEMENT_EXPANDED = "CV_ELEMENT_EXPANDED",
545
561
  SET_SELECTED_ELEMENT = "CV_SET_SELECTED_ELEMENT",
@@ -547,9 +563,11 @@ declare module "common/store/collection-view-state" {
547
563
  }
548
564
  export enum GRID_VIEW_STATE_MUTATIONS {
549
565
  SET_SEARCH = "GV_SET_SEARCH",
550
- TOGGLE_LIST_DISPLAY_TYPE = "GV_TOGGLE_LIST_DISPLAY_TYPE",
551
566
  TOGGLE_FILTER = "GV_TOGGLE_FILTER",
552
- SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH"
567
+ SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH",
568
+ SET_VIEW_TYPE = "SET_VIEW_TYPE",
569
+ SET_HAS_GROUP_LABEL = "SET_HAS_GROUP_LABEL",
570
+ RESET_FILTER = "RESET_FILTER"
553
571
  }
554
572
  interface MuationPayload<T, V> {
555
573
  state: T;
@@ -631,6 +649,7 @@ declare module "configurator/store/ui-state" {
631
649
  redoEnabled: boolean;
632
650
  undoEnabledPlanner: boolean;
633
651
  redoEnabledPlanner: boolean;
652
+ materialMultiSelect: boolean;
634
653
  }
635
654
  export enum UI_STATE_MUTATIONS {
636
655
  SET_SELECTED_GROUP = "setSelectedGroup",
@@ -741,7 +760,6 @@ declare module "common/store/index" {
741
760
  SET_IS_IN_IFRAME: COMMON_UI_STATE_MUTATIONS.SET_IS_IN_IFRAME;
742
761
  SET_IS_VIEW_ONLY: COMMON_UI_STATE_MUTATIONS.SET_IS_VIEW_ONLY;
743
762
  SET_LAST_REQUESTED_ID: COMMON_UI_STATE_MUTATIONS.SET_LAST_REQUESTED_ID;
744
- SET_SELECTION_PAYLOAD: PLANNER_UI_STATE_MUTATIONS.SET_SELECTION_PAYLOAD;
745
763
  SET_SELECTION: PLANNER_UI_STATE_MUTATIONS.SET_SELECTION;
746
764
  SET_IS_LANDSCAPE: PLANNER_UI_STATE_MUTATIONS.SET_IS_LANDSCAPE;
747
765
  SET_INTERACTIONS_EXPANDED: PLANNER_UI_STATE_MUTATIONS.SET_INTERACTIONS_EXPANDED;
@@ -942,6 +960,7 @@ declare module "configurator/business-logic/roomle-sdk-wrapper" {
942
960
  import { GlobalInitDataDefinition } from '@roomle/web-sdk/lib/definitions/common-core/src/utils/shims';
943
961
  import { Planner } from '@roomle/web-sdk/lib/definitions/planner-core/src/planner';
944
962
  import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
963
+ import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
945
964
  /**
946
965
  * We use this class in a plugin so we
947
966
  * can rely on DI to change it during testing
@@ -953,6 +972,7 @@ declare module "configurator/business-logic/roomle-sdk-wrapper" {
953
972
  private _currentInstance;
954
973
  get hasPlanner(): boolean;
955
974
  getConfigurator(element: HTMLElement, initData?: UiInitData): Promise<Configurator>;
975
+ getConfiguratorApi(element: HTMLElement, initData?: UiInitData): Promise<RoomleConfigurator>;
956
976
  getGlbViewer(element: HTMLElement, initData?: UiInitData): Promise<GlbViewer>;
957
977
  getPlanner(element: HTMLElement, initData?: UiInitData): Promise<Planner>;
958
978
  getRapiAccess(): Promise<RapiAccess>;
@@ -988,19 +1008,28 @@ declare module "configurator/business-logic/ui-callback" {
988
1008
  onSelectionCancel: () => any;
989
1009
  }
990
1010
  }
1011
+ declare module "common/business-logic/connector" {
1012
+ import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1013
+ import { UiInitData } from "configurator/embedding/types";
1014
+ import { CallbackApi } from "configurator/business-logic/sdk-connector";
1015
+ export abstract class Connector {
1016
+ abstract readonly api: Promise<any>;
1017
+ abstract init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
1018
+ addCallback<K extends keyof CallbackApi>(key: K, fun: CallbackApi[K], allowMultiple?: boolean): Promise<void>;
1019
+ }
1020
+ }
991
1021
  declare module "configurator/business-logic/sdk-connector-configurator" {
992
1022
  import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
993
1023
  import { Nullable } from "common/utils/types";
994
- import { Connector } from "configurator/business-logic/sdk-connector";
995
1024
  import { UiInitData } from "configurator/embedding/types";
996
1025
  import { StoreState } from "common/store/index";
997
1026
  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
1027
  import { Store } from 'vuex';
1000
1028
  import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1001
1029
  import { Analytics } from "common/plugins/analytics";
1002
1030
  import { UiCallbacks } from "configurator/business-logic/ui-callback";
1003
- export class SdkConnectorConfigurator implements Connector {
1031
+ import { Connector } from "common/business-logic/connector";
1032
+ export class SdkConnectorConfigurator extends Connector {
1004
1033
  private _configurator;
1005
1034
  private _initWaiters;
1006
1035
  private _store;
@@ -1009,8 +1038,7 @@ declare module "configurator/business-logic/sdk-connector-configurator" {
1009
1038
  constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
1010
1039
  get api(): Promise<RoomleConfigurator>;
1011
1040
  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;
1041
+ initConfigurator(configurator: RoomleConfigurator): Promise<void>;
1014
1042
  setParameter(parameter: KernelParameter, value: string, isRaw?: boolean): Promise<void>;
1015
1043
  setPrice(currencySymbol: string, price: number): void;
1016
1044
  addUiCallback(listener: UiCallbacks): void;
@@ -1022,7 +1050,6 @@ declare module "configurator/business-logic/sdk-connector-configurator" {
1022
1050
  }
1023
1051
  }
1024
1052
  declare module "viewer/business-logic/sdk-connector-viewer" {
1025
- import { Connector } from "configurator/business-logic/sdk-connector";
1026
1053
  import { Nullable } from "common/utils/types";
1027
1054
  import { Store } from 'vuex';
1028
1055
  import { StoreState } from "common/store/index";
@@ -1030,7 +1057,8 @@ declare module "viewer/business-logic/sdk-connector-viewer" {
1030
1057
  import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1031
1058
  import { UiInitData } from "configurator/embedding/types";
1032
1059
  import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
1033
- export class SdkConnectorViewer implements Connector {
1060
+ import { Connector } from "common/business-logic/connector";
1061
+ export class SdkConnectorViewer extends Connector {
1034
1062
  private _viewer;
1035
1063
  private _initWaiters;
1036
1064
  private _store;
@@ -1050,7 +1078,6 @@ declare module "common/utils/plan" {
1050
1078
  export const EMPTY_PLAN = "<plan version=\"2\"><walls><nodes/><edges/></walls><planobjects/><texters/><measures/><floors/><transparency><layers/></transparency></plan>";
1051
1079
  }
1052
1080
  declare module "planner/business-logic/sdk-connector-planner" {
1053
- import { Connector } from "configurator/business-logic/sdk-connector";
1054
1081
  import { Nullable } from "common/utils/types";
1055
1082
  import { Store } from 'vuex';
1056
1083
  import { StoreState } from "common/store/index";
@@ -1060,7 +1087,8 @@ declare module "planner/business-logic/sdk-connector-planner" {
1060
1087
  import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
1061
1088
  import { RapiId, RapiPlan } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
1062
1089
  import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
1063
- export class SdkConnectorPlanner implements Connector {
1090
+ import { Connector } from "common/business-logic/connector";
1091
+ export class SdkConnectorPlanner extends Connector {
1064
1092
  private _planner;
1065
1093
  private _initWaiters;
1066
1094
  private _store;
@@ -1071,7 +1099,7 @@ declare module "planner/business-logic/sdk-connector-planner" {
1071
1099
  constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
1072
1100
  get api(): Promise<RoomlePlanner>;
1073
1101
  init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
1074
- initPlanner(planner: RoomlePlanner): void;
1102
+ initPlanner(planner: RoomlePlanner): Promise<void>;
1075
1103
  loadPlan(id: RapiId): Promise<void>;
1076
1104
  loadPlanBasedOnObjectId(id: RapiId): Promise<void>;
1077
1105
  onSelectionCancel(): void;
@@ -1100,6 +1128,7 @@ declare module "configurator/business-logic/sdk-connector" {
1100
1128
  import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
1101
1129
  import { UiCallbacks } from "configurator/business-logic/ui-callback";
1102
1130
  import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
1131
+ import RoomlePlannerUiCallback from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
1103
1132
  export enum SDK_MODULES {
1104
1133
  VIEWER = 0,
1105
1134
  CONFIGURATOR = 1,
@@ -1116,11 +1145,8 @@ declare module "configurator/business-logic/sdk-connector" {
1116
1145
  partList: KernelPartList;
1117
1146
  }
1118
1147
  export const getSelectableEntry: (selected: Selectable, data: Selectable[]) => Nullable<Selectable>;
1119
- export const REGISTERED_CALLBACKS: Map<keyof ConfiguratorUiCallbacks, boolean>;
1120
- export interface Connector {
1121
- readonly api: any;
1122
- init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
1123
- }
1148
+ export const REGISTERED_CALLBACKS: Map<keyof CallbackApi, boolean>;
1149
+ export type CallbackApi = ConfiguratorUiCallbacks & RoomlePlannerUiCallback;
1124
1150
  export class SdkConnector {
1125
1151
  protected loadInProgress: boolean;
1126
1152
  protected someLoadDone: boolean;
@@ -1180,8 +1206,7 @@ declare module "configurator/business-logic/sdk-connector" {
1180
1206
  }): Promise<null>;
1181
1207
  loadConfiguration(configurationId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
1182
1208
  loadComponent(componentId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
1183
- loadSelectedPlanObject(): Promise<LoadResponse>;
1184
- loadPlanObjectId(configurationId: string, planObjectId: number): Promise<Nullable<LoadResponse>>;
1209
+ loadSelectedPlanObject(): Promise<void>;
1185
1210
  loadConfigurationString(configurationString: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
1186
1211
  loadConfigurableItem(configurableItemId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
1187
1212
  isIdAGlb(id: string): Promise<boolean>;
@@ -1234,9 +1259,9 @@ declare module "configurator/embedding/exposed-api" {
1234
1259
  import { Nullable } from "common/utils/types";
1235
1260
  import { Analytics } from "common/plugins/analytics";
1236
1261
  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
1262
  import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
1239
1263
  import { Position3 } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
1264
+ import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
1240
1265
  export class ExposedApi {
1241
1266
  private _sdk;
1242
1267
  private _exposedCallbacks;
@@ -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,11 @@ 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",
31
+ RESET_FILTER = "RESET_FILTER"
27
32
  }
28
33
  interface MuationPayload<T, V> {
29
34
  state: T;
@@ -4,7 +4,7 @@ import { Nullable } from '@/common/utils/types';
4
4
  import { RapiId } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
5
5
  export interface CommonUiState {
6
6
  isInIframe: boolean;
7
- isViewOnly: boolean;
7
+ isViewOnly: Nullable<boolean>;
8
8
  lastRequestedId: Nullable<RapiId>;
9
9
  }
10
10
  export declare const initialState: CommonUiState;
@@ -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(_event: TouchEvent): void;
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
- export declare class SdkConnectorConfigurator implements Connector {
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 ConfiguratorUiCallbacks, boolean>;
38
- export interface Connector {
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<Nullable<LoadResponse>>;
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;
@@ -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
  }