@roomle/embedding-lib 4.44.0 → 5.1.0-debug.1

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 (234) hide show
  1. package/.releaserc.json +4 -7
  2. package/README.md +5 -6
  3. package/docs/md/web/embedding/CHANGELOG.md +6 -0
  4. package/drag-in-C2fEQF9W.mjs +7 -0
  5. package/drag-in-CAakt8yw.mjs +250 -0
  6. package/index.d.ts +102 -0
  7. package/package.json +27 -13
  8. package/roomle-embedding-lib.es.js +453 -0
  9. package/roomle-embedding-lib.es.min.js +8 -0
  10. package/roomle-embedding-lib.umd.js +14 -0
  11. package/roomle-embedding-lib.umd.min.js +14 -0
  12. package/docs/__sidebar__.json +0 -14
  13. package/docs/api/.nojekyll +0 -1
  14. package/docs/api/README.md +0 -9
  15. package/docs/api/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +0 -47
  16. package/docs/api/classes/exposed_api.ExposedApi.md +0 -255
  17. package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +0 -195
  18. package/docs/api/classes/roomle_configurator_api.default.md +0 -211
  19. package/docs/api/enums/types.UI_BUTTON.md +0 -263
  20. package/docs/api/interfaces/exposed_callbacks.Labels.md +0 -32
  21. package/docs/api/interfaces/exposed_callbacks.Price.md +0 -32
  22. package/docs/api/interfaces/roomle_configurator_api.RoomleEmbeddingApiKeys.md +0 -58
  23. package/docs/api/interfaces/types.ConfiguratorSettings.md +0 -150
  24. package/docs/api/interfaces/types.EmbeddingSkin.md +0 -65
  25. package/docs/api/interfaces/types.UiInitData.md +0 -1199
  26. package/docs/api/interfaces/types.VariantsMap.md +0 -9
  27. package/docs/api/modules/exposed_analytics_callbacks.md +0 -9
  28. package/docs/api/modules/exposed_api.md +0 -9
  29. package/docs/api/modules/exposed_callbacks.md +0 -14
  30. package/docs/api/modules/roomle_configurator_api.md +0 -49
  31. package/docs/api/modules/types.md +0 -16
  32. package/docs/api/modules.md +0 -13
  33. package/docs/examples/00_init.html +0 -38
  34. package/docs/examples/01_small_screen.html +0 -37
  35. package/docs/examples/02_resize_callback.html +0 -46
  36. package/docs/examples/03_instant_start.html +0 -38
  37. package/docs/examples/04_price.html +0 -48
  38. package/docs/examples/05_analytics.html +0 -38
  39. package/docs/examples/06_skinning.html +0 -39
  40. package/docs/examples/07_request_product.html +0 -41
  41. package/docs/examples/08_variants.html +0 -36
  42. package/docs/examples/09_different_products.html +0 -63
  43. package/docs/examples/10_landing_page.html +0 -38
  44. package/docs/examples/11_light_settings.html +0 -126
  45. package/docs/examples/12_email.html +0 -36
  46. package/docs/examples/13_parameters.html +0 -67
  47. package/docs/examples/14_ga_consent.html +0 -39
  48. package/docs/examples/roomle-configurator-api.es.min.js +0 -586
  49. package/docs/hsp.md +0 -61
  50. package/docs/images/parts.png +0 -0
  51. package/docs/images/usm-frames.png +0 -0
  52. package/docs/integration.md +0 -1101
  53. package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +0 -17
  54. package/docs/migration-guides/v2-to-v3.md +0 -135
  55. package/docs/moc/index.md +0 -86
  56. package/docs/simple.md +0 -25
  57. package/roomle-configurator-api.cjs.js +0 -585
  58. package/roomle-configurator-api.cjs.min.js +0 -1
  59. package/roomle-configurator-api.es.js +0 -583
  60. package/roomle-configurator-api.es.min.js +0 -1
  61. package/roomle-configurator-api.js +0 -583
  62. package/types/index.d.ts +0 -1504
  63. package/types/src/common/business-logic/connector.d.ts +0 -8
  64. package/types/src/common/business-logic/event-bus.d.ts +0 -5
  65. package/types/src/common/components/collection-view/-utils/types.d.ts +0 -10
  66. package/types/src/common/plugins/analytics.d.ts +0 -11
  67. package/types/src/common/plugins/localize.d.ts +0 -8
  68. package/types/src/common/store/collection-view-state.d.ts +0 -40
  69. package/types/src/common/store/common-ui-state.d.ts +0 -16
  70. package/types/src/common/store/index.d.ts +0 -111
  71. package/types/src/common/translations/local-translation-source.d.ts +0 -8
  72. package/types/src/common/utils/access-restriction.d.ts +0 -7
  73. package/types/src/common/utils/ar-service.d.ts +0 -14
  74. package/types/src/common/utils/bezier.d.ts +0 -2
  75. package/types/src/common/utils/browser.d.ts +0 -3
  76. package/types/src/common/utils/color.d.ts +0 -2
  77. package/types/src/common/utils/compatibility.d.ts +0 -3
  78. package/types/src/common/utils/dom.d.ts +0 -15
  79. package/types/src/common/utils/font-size-detector.d.ts +0 -1
  80. package/types/src/common/utils/google-analytics.d.ts +0 -67
  81. package/types/src/common/utils/helper.d.ts +0 -43
  82. package/types/src/common/utils/iframe.d.ts +0 -3
  83. package/types/src/common/utils/init-data.d.ts +0 -34
  84. package/types/src/common/utils/merge.d.ts +0 -16
  85. package/types/src/common/utils/parameters.d.ts +0 -18
  86. package/types/src/common/utils/performance.d.ts +0 -2
  87. package/types/src/common/utils/plan.d.ts +0 -1
  88. package/types/src/common/utils/script-loader.d.ts +0 -5
  89. package/types/src/common/utils/share.d.ts +0 -1
  90. package/types/src/common/utils/touch-drag.d.ts +0 -24
  91. package/types/src/common/utils/types.d.ts +0 -19
  92. package/types/src/common/utils/user-agent.d.ts +0 -6
  93. package/types/src/common/utils/variants.d.ts +0 -3
  94. package/types/src/configurator/ar/main.d.ts +0 -1
  95. package/types/src/configurator/business-logic/roomle-sdk-wrapper.d.ts +0 -27
  96. package/types/src/configurator/business-logic/sdk-connector-configurator.d.ts +0 -29
  97. package/types/src/configurator/business-logic/sdk-connector.d.ts +0 -119
  98. package/types/src/configurator/business-logic/ui-callback.d.ts +0 -5
  99. package/types/src/configurator/components/-utils/overlays.d.ts +0 -43
  100. package/types/src/configurator/components/grid-view/-utils/GridViewHelper.d.ts +0 -16
  101. package/types/src/configurator/components/utils/-utils/SceneOffsetResizer.d.ts +0 -23
  102. package/types/src/configurator/embedding/example/main.d.ts +0 -1
  103. package/types/src/configurator/embedding/exposed-analytics-callbacks.d.ts +0 -10
  104. package/types/src/configurator/embedding/exposed-api.d.ts +0 -90
  105. package/types/src/configurator/embedding/exposed-callbacks.d.ts +0 -46
  106. package/types/src/configurator/embedding/helper.d.ts +0 -8
  107. package/types/src/configurator/embedding/message-handler.d.ts +0 -31
  108. package/types/src/configurator/embedding/roomle-configurator-api.d.ts +0 -64
  109. package/types/src/configurator/embedding/types.d.ts +0 -159
  110. package/types/src/configurator/embedding/utils.d.ts +0 -15
  111. package/types/src/configurator/plugins/embedding-callbacks-plugin.d.ts +0 -4
  112. package/types/src/configurator/plugins/libs-plugin.d.ts +0 -11
  113. package/types/src/configurator/plugins/sdk-connector-plugin.d.ts +0 -14
  114. package/types/src/configurator/store/core-data.d.ts +0 -34
  115. package/types/src/configurator/store/core-state.d.ts +0 -26
  116. package/types/src/configurator/store/ui-state.d.ts +0 -118
  117. package/types/src/main.d.ts +0 -14
  118. package/types/src/planner/business-logic/general-room-parameters.d.ts +0 -17
  119. package/types/src/planner/business-logic/pre-defined-rooms.d.ts +0 -2
  120. package/types/src/planner/business-logic/rooms.d.ts +0 -37
  121. package/types/src/planner/business-logic/sdk-connector-planner.d.ts +0 -28
  122. package/types/src/planner/store/planner-core-data.d.ts +0 -21
  123. package/types/src/planner/store/planner-ui-state.d.ts +0 -65
  124. package/types/src/planner/utils/interaction.d.ts +0 -3
  125. package/types/src/planner/utils/planner-sidebar.d.ts +0 -19
  126. package/types/src/viewer/business-logic/sdk-connector-viewer.d.ts +0 -18
  127. package/types/tests/helpers/data/base-64-images.d.ts +0 -1
  128. package/types/tests/helpers/data/configurator.d.ts +0 -7
  129. package/types/tests/helpers/data/items.d.ts +0 -208
  130. package/types/tests/helpers/data/materials.d.ts +0 -32
  131. package/types/tests/helpers/data/parameter-groups.d.ts +0 -242
  132. package/types/tests/helpers/data/parameters.d.ts +0 -399
  133. package/types/tests/helpers/data/part-list.d.ts +0 -126
  134. package/types/tests/helpers/data/plan.d.ts +0 -224
  135. package/types/tests/helpers/data/planObject.d.ts +0 -134
  136. package/types/tests/helpers/data/possible-children-tags.d.ts +0 -208
  137. package/types/tests/helpers/data/variants.d.ts +0 -60
  138. package/types/tests/helpers/data/wall-dimensions.d.ts +0 -41
  139. package/types/tests/helpers/dom.d.ts +0 -1
  140. package/types/tests/helpers/mocks/analytics.d.ts +0 -7
  141. package/types/tests/helpers/mocks/data/biohort-parameter.d.ts +0 -32
  142. package/types/tests/helpers/mocks/data/koinor-formia.d.ts +0 -289
  143. package/types/tests/helpers/mocks/embedding-callbacks.d.ts +0 -4
  144. package/types/tests/helpers/mocks/icon.d.ts +0 -3
  145. package/types/tests/helpers/mocks/localize.d.ts +0 -8
  146. package/types/tests/helpers/mocks/message.d.ts +0 -11
  147. package/types/tests/helpers/mocks/parameters.d.ts +0 -47
  148. package/types/tests/helpers/mocks/possible-children.d.ts +0 -596
  149. package/types/tests/helpers/mocks/roomle-sdk-wrapper.d.ts +0 -177
  150. package/types/tests/helpers/mocks/sdk-connector-configurator.d.ts +0 -13
  151. package/types/tests/helpers/mocks/sdk-connector-planner.d.ts +0 -13
  152. package/types/tests/helpers/mocks/sdk-connector.d.ts +0 -35
  153. package/types/tests/helpers/mocks/store.d.ts +0 -11
  154. package/types/tests/helpers/mocks/tag.d.ts +0 -148
  155. package/types/tests/helpers/utils.d.ts +0 -13
  156. package/types/tests/integration/common/components/ActionButtons.spec.d.ts +0 -1
  157. package/types/tests/integration/common/components/BottomBar.spec.d.ts +0 -1
  158. package/types/tests/integration/common/components/BottomButtons.spec.d.ts +0 -1
  159. package/types/tests/integration/common/components/IconButton.spec.d.ts +0 -1
  160. package/types/tests/integration/common/components/SelectionButtons.spec.d.ts +0 -1
  161. package/types/tests/integration/common/components/part-list/part-list/PartListPrint.spec.d.ts +0 -1
  162. package/types/tests/integration/common/components/part-list/part-list/PartListRow.spec.d.ts +0 -1
  163. package/types/tests/integration/configurator/App.spec.d.ts +0 -1
  164. package/types/tests/integration/configurator/components/ARButton.spec.d.ts +0 -1
  165. package/types/tests/integration/configurator/components/ConfiguratorMain.spec.d.ts +0 -9
  166. package/types/tests/integration/configurator/components/CookieBanner.spec.d.ts +0 -1
  167. package/types/tests/integration/configurator/components/Overlays.spec.d.ts +0 -1
  168. package/types/tests/integration/configurator/components/TopBar.spec.d.ts +0 -1
  169. package/types/tests/integration/configurator/components/ViewerMain.spec.d.ts +0 -1
  170. package/types/tests/integration/configurator/components/addons/AddonsTrigger.spec.d.ts +0 -1
  171. package/types/tests/integration/configurator/components/addons/PossibleChildren.spec.d.ts +0 -1
  172. package/types/tests/integration/configurator/components/collection-view/-utils/TabbedNav.spec.d.ts +0 -1
  173. package/types/tests/integration/configurator/components/collection-view/CollectionView.spec.d.ts +0 -1
  174. package/types/tests/integration/configurator/components/grid-view/-utils/CollapsedView.spec.d.ts +0 -1
  175. package/types/tests/integration/configurator/components/grid-view/-utils/ExpandedView.spec.d.ts +0 -1
  176. package/types/tests/integration/configurator/components/grid-view/-utils/GridViewElement.spec.d.ts +0 -1
  177. package/types/tests/integration/configurator/components/grid-view/-utils/GridViewHelper.spec.d.ts +0 -1
  178. package/types/tests/integration/configurator/components/grid-view/GridView.spec.d.ts +0 -1
  179. package/types/tests/integration/configurator/components/overlays/Export3D.spec.d.ts +0 -1
  180. package/types/tests/integration/configurator/components/overlays/NoDocking.spec.d.ts +0 -1
  181. package/types/tests/integration/configurator/components/overlays/PartList.spec.d.ts +0 -1
  182. package/types/tests/integration/configurator/components/overlays/SaveDraft.spec.d.ts +0 -1
  183. package/types/tests/integration/configurator/components/overlays/VariantWarning.spec.d.ts +0 -1
  184. package/types/tests/integration/configurator/components/overlays/ar/OpenARView.spec.d.ts +0 -1
  185. package/types/tests/integration/configurator/components/parameters/BackParameterGroupButton.spec.d.ts +0 -1
  186. package/types/tests/integration/configurator/components/parameters/NextParameterGroupButton.spec.d.ts +0 -1
  187. package/types/tests/integration/configurator/components/parameters/ParameterGroupButton.spec.d.ts +0 -1
  188. package/types/tests/integration/configurator/components/parameters/ParameterGroups.spec.d.ts +0 -1
  189. package/types/tests/integration/configurator/components/parameters/types/MaterialParameter.spec.d.ts +0 -1
  190. package/types/tests/integration/configurator/components/parameters/types/OptionsParameter.spec.d.ts +0 -1
  191. package/types/tests/integration/configurator/components/parameters/types/OptionsParameterValue.spec.d.ts +0 -1
  192. package/types/tests/integration/configurator/components/parameters/types/ProductVariant.spec.d.ts +0 -1
  193. package/types/tests/integration/configurator/components/parameters/types/RangeParameter.spec.d.ts +0 -1
  194. package/types/tests/integration/configurator/components/parameters/types/ThumbnailsParameter.spec.d.ts +0 -1
  195. package/types/tests/integration/configurator/components/utils/BackToWebsite.spec.d.ts +0 -1
  196. package/types/tests/integration/configurator/components/utils/CheckBox.spec.d.ts +0 -1
  197. package/types/tests/integration/configurator/components/utils/FullscreenContainer.spec.d.ts +0 -1
  198. package/types/tests/integration/configurator/components/utils/GdprEmailInput.spec.d.ts +0 -1
  199. package/types/tests/integration/configurator/components/utils/HeightToggle.spec.d.ts +0 -1
  200. package/types/tests/integration/configurator/components/utils/ImageWithFallback.spec.d.ts +0 -1
  201. package/types/tests/integration/configurator/components/utils/InteractionContainer.spec.d.ts +0 -1
  202. package/types/tests/integration/configurator/components/utils/PopUp.spec.d.ts +0 -1
  203. package/types/tests/integration/configurator/components/utils/ScrollHint.spec.d.ts +0 -1
  204. package/types/tests/integration/helper.spec.d.ts +0 -1
  205. package/types/tests/integration/planner/components/CatalogTrigger.spec.d.ts +0 -1
  206. package/types/tests/integration/planner/components/PlannerMain.spec.d.ts +0 -1
  207. package/types/tests/integration/planner/components/PlannerSidebar.spec.d.ts +0 -1
  208. package/types/tests/integration/planner/components/ProductListButton.spec.d.ts +0 -1
  209. package/types/tests/integration/planner/components/SampleRooms.spec.d.ts +0 -1
  210. package/types/tests/integration/planner/components/ShowWallMeasurements.spec.d.ts +0 -1
  211. package/types/tests/integration/planner/components/overlays/product-list/ProductListEntry.spec.d.ts +0 -1
  212. package/types/tests/integration/planner/components/overlays/rooms/RoomGeneralSettings.spec.d.ts +0 -1
  213. package/types/tests/integration/planner/components/overlays/rooms/RoomRangeParameter.spec.d.ts +0 -1
  214. package/types/tests/integration/planner/components/utils/InteractionHeader.spec.d.ts +0 -1
  215. package/types/tests/integration/planner/components/utils/sidebar-nav/SidebarNav.spec.d.ts +0 -1
  216. package/types/tests/unit/common/business-logic/event-bus.spec.d.ts +0 -1
  217. package/types/tests/unit/common/helper.spec.d.ts +0 -1
  218. package/types/tests/unit/common/translations/local-translation-source.spec.d.ts +0 -1
  219. package/types/tests/unit/common/utils/ar-service.spec.d.ts +0 -1
  220. package/types/tests/unit/common/utils/bezier.spec.d.ts +0 -1
  221. package/types/tests/unit/common/utils/color.spec.d.ts +0 -1
  222. package/types/tests/unit/common/utils/dom.spec.d.ts +0 -1
  223. package/types/tests/unit/common/utils/helper.spec.d.ts +0 -1
  224. package/types/tests/unit/common/utils/init-data.spec.d.ts +0 -1
  225. package/types/tests/unit/common/utils/parameters.spec.d.ts +0 -1
  226. package/types/tests/unit/common/utils/touch-drag.spec.d.ts +0 -1
  227. package/types/tests/unit/configurator/business-logic/sdk-connector-configurator.spec.d.ts +0 -1
  228. package/types/tests/unit/configurator/business-logic/sdk-connector.spec.d.ts +0 -1
  229. package/types/tests/unit/configurator/components/utils/-utils/ConfiguratorResizer.spec.d.ts +0 -1
  230. package/types/tests/unit/configurator/components/utils/WordWrap.spec.d.ts +0 -1
  231. package/types/tests/unit/configurator/embedding/exposed-api.spec.d.ts +0 -1
  232. package/types/tests/unit/configurator/embedding/utils.spec.d.ts +0 -1
  233. package/types/tests/unit/configurator/store/index.spec.d.ts +0 -1
  234. package/types/tests/unit/planner/business-logic/sdk-connector-planner.spec.d.ts +0 -1
package/types/index.d.ts DELETED
@@ -1,1504 +0,0 @@
1
- declare module "common/utils/types" {
2
- export type Nullable<T> = T | null;
3
- export type AnyFunction<T = void> = (...args: any[]) => T;
4
- export interface CssHash {
5
- [key: string]: string;
6
- }
7
- export const enum USER_ACTION_MODULE {
8
- CONFIGURATOR = 3
9
- }
10
- export enum USER_ACTION {
11
- CONVERSION = 11,
12
- SHARE_AR = 301,
13
- SAVE_DRAFT = 302
14
- }
15
- export type ToggleCallback = (isExpanded: boolean) => void;
16
- export type CloseReason = 'toggle';
17
- export enum MEASUREMENT_UNIT {
18
- CM = "cm",
19
- INCH = "inchfeet"
20
- }
21
- }
22
- declare module "configurator/embedding/message-handler" {
23
- import { Nullable } from "common/utils/types";
24
- interface IncomingMessageBus {
25
- addEventListener(type: 'message', listener: (this: Window, ev: WindowEventMap['message']) => any, options?: boolean | AddEventListenerOptions): void;
26
- }
27
- interface OutgoingMessageBus {
28
- postMessage: (message: any, targetOrigin: string, transfer?: Transferable[]) => void;
29
- }
30
- type CommunicationSide = 'iframe' | 'website';
31
- export type MessageExecutionResult = Promise<EmbeddingResponse> | undefined;
32
- type MessageExecution = (message: EmbeddingCommand, event: MessageEvent) => MessageExecutionResult;
33
- export interface EmbeddingResponse {
34
- result?: any;
35
- error?: string;
36
- }
37
- export interface EmbeddingCommand {
38
- message: string;
39
- args: any[];
40
- }
41
- export class MessageHandler {
42
- private _side;
43
- private _incomingMessageBus;
44
- private _outgoingMessageBus;
45
- private _execMessage;
46
- constructor(side: CommunicationSide, incomingMessageBus: IncomingMessageBus, outgoingMessageBus: Nullable<OutgoingMessageBus>, messageExecution: Nullable<MessageExecution>);
47
- setOutgoingMessageBus(outgoingMessageBus: OutgoingMessageBus): void;
48
- setMessageExecution(fun: MessageExecution): void;
49
- sendMessage(message: string, args?: any[]): Promise<any>;
50
- private _handleMessage;
51
- private _prepareError;
52
- }
53
- }
54
- declare module "configurator/embedding/types" {
55
- import { GlobalInitDataDefinition, InitDataDefinition } from '@roomle/web-sdk/lib/definitions/common-core/src/utils/shims';
56
- import { RapiConfiguratorSettings, RapiId } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
57
- export enum UI_BUTTON {
58
- AR = "ar",
59
- PARTLIST = "partlist",
60
- MULTISELECT = "multiselect",
61
- DIMENSIONS = "dimensions",
62
- FULLSCREEN = "fullscreen",
63
- RESETCAMERA = "resetcamera",
64
- RENDERIMAGE = "renderimage",
65
- ADDONS = "addons",
66
- REQUESTPRODUCT = "requestproduct",
67
- REQUESTPLAN = "requestplan",
68
- SAVEDRAFT = "savedraft",
69
- STARTCONFIGURE = "startconfigure",
70
- PAUSECONFIGURE = "pauseconfigure",
71
- EXPORT_3D = "export3d",
72
- ROTATE = "rotate",
73
- SNAPPING = "snapping",
74
- UNDO = "undo",
75
- REDO = "redo",
76
- PARTLIST_PLANNER = "partlist_planner",
77
- PRODUCTLIST = "productlist",
78
- TWO_D_VIEW = "2dview",
79
- ADD_ROOM = "add_room",
80
- STARTPLANNER = "startPlanner"
81
- }
82
- interface FeatureFlags {
83
- realPartList?: boolean;
84
- globalCallbacks?: boolean;
85
- }
86
- export interface VariantsMap {
87
- [key: string]: RapiId;
88
- }
89
- export interface UiInitData extends InitDataDefinition, GlobalInitDataDefinition {
90
- buttons?: {
91
- [UI_BUTTON.AR]?: boolean;
92
- [UI_BUTTON.PARTLIST]?: boolean;
93
- [UI_BUTTON.MULTISELECT]?: boolean;
94
- [UI_BUTTON.DIMENSIONS]?: boolean;
95
- [UI_BUTTON.FULLSCREEN]?: boolean;
96
- [UI_BUTTON.RESETCAMERA]?: boolean;
97
- [UI_BUTTON.RENDERIMAGE]?: boolean;
98
- [UI_BUTTON.ADDONS]?: boolean;
99
- [UI_BUTTON.REQUESTPRODUCT]?: boolean;
100
- [UI_BUTTON.SAVEDRAFT]?: boolean;
101
- [UI_BUTTON.STARTCONFIGURE]?: boolean;
102
- [UI_BUTTON.PAUSECONFIGURE]?: boolean;
103
- [UI_BUTTON.EXPORT_3D]?: boolean;
104
- [UI_BUTTON.SNAPPING]?: boolean;
105
- [UI_BUTTON.UNDO]?: boolean;
106
- [UI_BUTTON.REDO]?: boolean;
107
- [UI_BUTTON.TWO_D_VIEW]?: boolean;
108
- [UI_BUTTON.PARTLIST_PLANNER]?: boolean;
109
- [UI_BUTTON.ADD_ROOM]?: boolean;
110
- [UI_BUTTON.STARTPLANNER]?: boolean;
111
- };
112
- skin?: EmbeddingSkin;
113
- zIndex?: number;
114
- useLocalRoomle?: boolean;
115
- overrideServerUrl?: string;
116
- /**
117
- * @deprecated
118
- * for details see deeplink, the only change is that the placeholder is <CONF_ID> here instead of #CONFIGURATIONID#
119
- */
120
- shareUrl?: string;
121
- /**
122
- * Set this parameter to use your custom share url.
123
- * The provided url has to contain a configuration id parameter (`#CONFIGURATIONID#`) which will be replaced with the real
124
- * configuration id.
125
- * default: not set -> use Roomle short url service (linking to roomle.com domain)
126
- * usage: http://www.example.com/configurator?id=#CONFIGURATIONID#
127
- */
128
- deeplink?: string;
129
- /**
130
- * Define to which variants you can switch from which root component id. This is a simple JS object which is
131
- * used like a map, e.g.: { "usm:frame": "DB_Start_ohne_Element" } now if a configuration with root component
132
- * usm:frame is loaded all the items from the tag "DB_Start_ohne_Element" are now shown as variants
133
- */
134
- variants?: VariantsMap;
135
- /**
136
- * if set to true you can load the configurator in an iframe.src but without any embedding lib
137
- * This is needed if you do not want to interact with the configurator and only want to use it
138
- * to view 3d content. Imagine it then as a <img> tag for 3d content
139
- */
140
- api?: boolean;
141
- /**
142
- * if this is set to true the "save draft" will be done by sending
143
- * an e-mail
144
- */
145
- emails?: boolean;
146
- /**
147
- * set this flag to true if you want to configure on small devices in landscape as well
148
- * this is relevant for things like Rubens Admin, where the configurator is embedded into a very
149
- * small div
150
- */
151
- mobileLandscape?: boolean;
152
- /**
153
- * set this flag to true if you want to group the part list by main components
154
- */
155
- groupPartList?: boolean;
156
- /**
157
- * @internal
158
- * this is an object which is for Roomle internal usage, we can set feature flags
159
- * so that we can ensure a smooth transition between different versions of our configurator
160
- */
161
- featureFlags?: FeatureFlags;
162
- /**
163
- * set this flag to false if the user did not give the consent to Analytics
164
- */
165
- gaConsent?: boolean;
166
- /**
167
- * override translations to change labels for some or all languages.
168
- * Example:
169
- *
170
- * ```
171
- * "translations": {
172
- * "en": {
173
- * "params": {
174
- * "request-product": "Add to cart",
175
- * }
176
- * }
177
- * }
178
- * ```
179
- *
180
- * You can find all labels here: [Base.json](../../../ui/base.json)
181
- */
182
- translations?: any;
183
- /**
184
- * set this flag to false and global parameters are not applied when switching variants
185
- * default: true
186
- */
187
- applyCurrentGlobalParameters?: boolean;
188
- /**
189
- * set this flag to true if you want that a user can select more than one material category at once
190
- * default: false
191
- */
192
- materialMultiSelect?: boolean;
193
- /**
194
- * set this flag to true if you want to start the moc in configuring mode if there is only one object in the scene
195
- * default: true
196
- */
197
- initMocInConfiguringMode?: boolean;
198
- }
199
- export interface EmbeddingSkin {
200
- 'primary-color'?: string;
201
- 'primary-color-in-rgb'?: string;
202
- 'color-on-primary'?: string;
203
- 'cta-color'?: string;
204
- 'color-on-cta'?: string;
205
- }
206
- export interface ConfiguratorSettings extends RapiConfiguratorSettings {
207
- id: string;
208
- allowedHost: string;
209
- tenant: number;
210
- url: string;
211
- settings: UiInitData;
212
- }
213
- }
214
- declare module "configurator/embedding/exposed-callbacks" {
215
- import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
216
- import { KernelPartList, UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
217
- import { RapiConfigurationEnhanced } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
218
- import { UI_BUTTON } from "configurator/embedding/types";
219
- import { Nullable } from "common/utils/types";
220
- export interface Price {
221
- currencySymbol: Nullable<string>;
222
- price: Nullable<number>;
223
- }
224
- export interface Labels {
225
- catalogLabel: Nullable<string>;
226
- label: Nullable<string>;
227
- }
228
- export class ExposedCallbacks {
229
- /**
230
- * Returns all necessary params when 'Request Product'/'Checkout' button has pressed
231
- * @param configurationId id of the current configuration
232
- * @param image image of the current configuration
233
- * @param partList the part list with all details, grouped, etc
234
- * @param price price of the current configuration, either set via setPrice or from Roomle price service
235
- * @param labels the label of the catalog and the furniture system
236
- * @param configuration the data returned from the Roomle backend
237
- */
238
- onRequestProduct: (configurationId: string, image: Base64Image, partList: KernelPartList, price: Price, labels: Labels, configuration: RapiConfigurationEnhanced) => void;
239
- /**
240
- * fullList fullList (needed for price calculation) of the current configuration
241
- * @param partList the part list with all details, grouped, etc
242
- */
243
- onPartListUpdate: (partList: KernelPartList, hash: string) => void;
244
- onResize: (isDesktop: boolean) => void;
245
- onUseFullPage: () => void;
246
- onBackToWebsite: () => void;
247
- /**
248
- * Gets called when a button in the UI is clicked
249
- * @param name
250
- * @return overrideEventBehaviour true if the event has been consumed and it should not trigger default behaviour, undefined or false otherwise
251
- */
252
- onButtonClicked: (name: UI_BUTTON) => Promise<boolean> | boolean | void;
253
- onRequestPlan: (planId: string, image: Base64Image, items: any[]) => void;
254
- /**
255
- * Gets called if a plan object gets added, changed or removed
256
- * Only the move of plan object does NOT trigger this function
257
- * @param objects
258
- */
259
- onPlanUpdate: (objects: UiPlanObject[]) => void;
260
- }
261
- }
262
- declare module "configurator/store/core-state" {
263
- import { Module } from 'vuex';
264
- import { StoreState } from "common/store/index";
265
- import { Nullable } from "common/utils/types";
266
- export interface CoreState {
267
- label: string;
268
- componentHasChildren: boolean;
269
- catalogLabel: Nullable<string>;
270
- initialHash: Nullable<string>;
271
- currentHash: Nullable<string>;
272
- }
273
- export enum CORE_STATE_MUTATIONS {
274
- SET_LABEL = "setLabel",
275
- SET_COMPONENT_HAS_CHILDREN = "setComponentHasChildren",
276
- SET_CATALOG_LABEL = "SET_CATALOG_LABEL",
277
- SET_INITIAL_HASH = "SET_INITIAL_HASH",
278
- SET_CURRENT_HASH = "SET_CURRENT_HASH"
279
- }
280
- export enum CORE_STATE_ACTIONS {
281
- SET_LABEL = "setLabel",
282
- SET_COMPONENT_HAS_CHILDREN = "setComponentHasChildren",
283
- UPDATE_HASH = "UPDATE_HASH"
284
- }
285
- export enum CORE_STATE_GETTERS {
286
- HAS_CONFIGURATION_CHANGE = "HAS_CONFIGURATION_CHANGE"
287
- }
288
- export const coreState: Module<CoreState, StoreState>;
289
- }
290
- declare module "common/utils/iframe" {
291
- export const isInIframe: () => boolean;
292
- export const useEmbeddingApi: () => boolean;
293
- export const sameOrigin: () => boolean;
294
- }
295
- declare module "common/utils/helper" {
296
- import { Nullable } from "common/utils/types";
297
- import { RapiConfiguration, RapiItem, RapiTenant } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
298
- export const throttle: <T extends (...args: any[]) => any>(func: T, delay?: number) => (...funcArgs: Parameters<T>) => void;
299
- export const round: (float: number, precision: number) => number;
300
- export const isIdAnItem: (id: string) => boolean;
301
- export const isIdAPlan: (id: string) => boolean;
302
- export const isIdAComponent: (id: string) => boolean;
303
- /**
304
- * Get cloudinary (cdn) url for given parameters
305
- * @param url
306
- * @param format
307
- * @param size
308
- * @param step
309
- */
310
- export const getImageURL: (url: string, size?: number, step?: number) => string;
311
- export interface KeyValuePair {
312
- key: string;
313
- value: string;
314
- }
315
- export const addMetaHeaderTag: (id: string, attributes: KeyValuePair[]) => void;
316
- export const uuid: (a?: Nullable<string>) => string;
317
- export const snakeCase: (str: string) => string;
318
- export interface KernelBoundsFormatted {
319
- width: string;
320
- height: string;
321
- depth: string;
322
- }
323
- export const deepCopy: <T>(o: T) => T;
324
- export const toBoolean: (value: boolean | undefined, defaultValue?: boolean) => boolean;
325
- export const wait: (delayInMs: number) => Promise<void>;
326
- export const NAMES_FOR_LOCALHOST: string[];
327
- export const getHostname: () => string | null;
328
- export const isDemoHostname: (hostname: string) => boolean;
329
- export const scriptInfo: (...args: any[]) => void;
330
- export const getGlbAssetUrl: (obj: RapiItem | RapiConfiguration) => Nullable<string>;
331
- export const getUsdzAssetUrl: (obj: RapiItem | RapiConfiguration) => Nullable<string>;
332
- export const hasArAssets: (item: RapiItem) => boolean;
333
- export const formatPrice: (currencySymbol: Nullable<string>, price: Nullable<number>) => Nullable<string>;
334
- export const normalizeFloatingNumber: (num: number, decimals?: number) => number;
335
- export const checkForActivePackage: (tenant: RapiTenant) => boolean;
336
- export const oneTimeInterval: (callback: () => void, delay: number) => number;
337
- export const runOnIdle: any;
338
- export const isLocationJestTest: () => boolean;
339
- }
340
- declare module "configurator/store/core-data" {
341
- import { Module } from 'vuex';
342
- import { StoreState } from "common/store/index";
343
- import { KernelParameterGroup, KernelPartList, UiKernelParameter, UiPossibleChildTag } from '@roomle/web-sdk/lib/definitions/typings/kernel';
344
- import { Nullable } from "common/utils/types";
345
- import { KernelBoundsFormatted } from "common/utils/helper";
346
- export interface ParameterGroup extends KernelParameterGroup {
347
- parameters: UiKernelParameter[];
348
- }
349
- export interface CoreData {
350
- groups: ParameterGroup[];
351
- parameters: UiKernelParameter[];
352
- addons: UiPossibleChildTag[];
353
- partList: KernelPartList;
354
- bounds: Nullable<KernelBoundsFormatted>;
355
- currencySymbol: string;
356
- price: Nullable<number>;
357
- }
358
- export enum CORE_DATA_MUTATIONS {
359
- UPDATE_GROUPS = "updateGroups",
360
- UPDATE_PARAMETERS = "updateParameters",
361
- UPDATE_ADDONS = "updateAddons",
362
- UPDATE_PART_LIST = "UPDATE_PART_LIST",
363
- UPDATE_BOUNDS = "UPDATE_BOUNDS",
364
- UPDATE_CURRENCY = "UPDATE_CURRENCY",
365
- UPDATE_PRICE_VALUE = "UPDATE_PRICE_VALUE"
366
- }
367
- export enum CORE_DATA_ACTIONS {
368
- UPDATE_PRICE = "UPDATE_PRICE"
369
- }
370
- export enum CORE_DATA_GETTERS {
371
- HAS_NON_GROUP_ADDONS = "hasNonGroupAddons",
372
- CURRENT_PRICE = "currentPrice"
373
- }
374
- export const coreData: Module<CoreData, StoreState>;
375
- }
376
- declare module "common/components/collection-view/-utils/types" {
377
- import { Nullable } from "common/utils/types";
378
- import { UiKernelParameter, UiPossibleChildTag } from '@roomle/web-sdk/lib/definitions/typings/kernel';
379
- import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
380
- export type CollectionViewElementType = 'addon' | 'parameter' | 'variant' | 'object' | 'room' | 'generalRoomSetting' | 'unitSwitch';
381
- export interface CollectionViewElement<T = (UiPossibleChildTag | UiKernelParameter | RapiTagForUi)> {
382
- label: Nullable<string>;
383
- key: string;
384
- payload: T;
385
- type: CollectionViewElementType;
386
- }
387
- }
388
- declare module "common/utils/parameters" {
389
- import { RapiMaterial, RapiMaterialGroup, RapiTagForUi, RapiTexture } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
390
- import { KernelPartListParameter, UiPossibleChildTag } from '@roomle/web-sdk/lib/definitions/typings/kernel';
391
- import { CollectionViewElement } from "common/components/collection-view/-utils/types";
392
- import { VariantsMap } from "configurator/embedding/types";
393
- import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
394
- export interface RapiMaterialEmbeddedTextures extends RapiMaterial {
395
- embeddedTextures?: RapiTexture[];
396
- [key: string]: any;
397
- }
398
- export const getAllMaterials: (groups?: RapiMaterialGroup[]) => RapiMaterialEmbeddedTextures[];
399
- export const mapAddons: (addons: UiPossibleChildTag[]) => CollectionViewElement[];
400
- export const mapVariants: (tag: RapiTagForUi) => CollectionViewElement[];
401
- export const mapCatalogRootTag: (tags: RapiTagForUi[]) => CollectionViewElement[];
402
- export const filterAndMapAddons: (addons: UiPossibleChildTag[], selectedGroup: string | undefined) => CollectionViewElement[];
403
- export const addonsHaveGroups: (addons: UiPossibleChildTag[]) => boolean;
404
- export const extractRootComponentId: (id: string) => string;
405
- export const getCurrentVariants: (api: RoomleConfigurator, id: string, variantChangeMap?: VariantsMap) => Promise<RapiTagForUi>;
406
- export const prepareParametersForUi: (parameters: KernelPartListParameter[]) => KernelPartListParameter[];
407
- }
408
- declare module "configurator/components/-utils/overlays" {
409
- export enum OVERLAYS {
410
- NO_DOCKING = 0,
411
- SAVE_DRAFT = 1,
412
- VARIANT_WARNING = 2,
413
- OPEN_AR = 3,
414
- EXPORT_3D = 4,
415
- ELEMENT_DISABLED = 5,
416
- DELETE_WARNING = 6,
417
- GENERIC_ERROR = 7
418
- }
419
- export interface OverlayState {
420
- open: boolean;
421
- payload?: any;
422
- }
423
- export type OverlaysOpenState = {
424
- [key in OVERLAYS]: OverlayState;
425
- };
426
- export const initialOverlaysState: {
427
- 0: {
428
- open: boolean;
429
- };
430
- 1: {
431
- open: boolean;
432
- };
433
- 2: {
434
- open: boolean;
435
- };
436
- 3: {
437
- open: boolean;
438
- };
439
- 4: {
440
- open: boolean;
441
- };
442
- 5: {
443
- open: boolean;
444
- };
445
- 6: {
446
- open: boolean;
447
- };
448
- 7: {
449
- open: boolean;
450
- };
451
- };
452
- }
453
- declare module "common/store/common-ui-state" {
454
- import { Module } from 'vuex';
455
- import { StoreState } from "common/store/index";
456
- import { Nullable } from "common/utils/types";
457
- import { RapiId } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
458
- export interface CommonUiState {
459
- isInIframe: boolean;
460
- isViewOnly: Nullable<boolean>;
461
- lastRequestedId: Nullable<RapiId>;
462
- }
463
- export const initialState: CommonUiState;
464
- export enum COMMON_UI_STATE_MUTATIONS {
465
- SET_IS_IN_IFRAME = "SET_IS_IN_IFRAME",
466
- SET_IS_VIEW_ONLY = "SET_IS_VIEW_ONLY",
467
- SET_LAST_REQUESTED_ID = "SET_LAST_REQUESTED_ID"
468
- }
469
- export const commonUiState: Module<CommonUiState, StoreState>;
470
- }
471
- declare module "planner/utils/planner-sidebar" {
472
- import { KernelPartList, UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
473
- import { Store } from 'vuex';
474
- import { StoreState } from "common/store/index";
475
- import { SdkConnector } from "configurator/business-logic/sdk-connector";
476
- import { RapiConfiguration, RapiItem } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
477
- export interface PlannerSidebarState {
478
- catalog: boolean;
479
- productList: boolean;
480
- partList: boolean;
481
- roomSidebar: boolean;
482
- mobileExpanded: boolean;
483
- [key: string]: boolean;
484
- }
485
- export interface ProductListItem extends UiPlanObject {
486
- quantity: number;
487
- }
488
- export const initialPlannerSidebarState: PlannerSidebarState;
489
- export const matchProductListAndQuantity: (productList: UiPlanObject[]) => ProductListItem[];
490
- export const fillPartList: (data: RapiItem | RapiConfiguration, partList: KernelPartList, hash: string, sdkConnector: SdkConnector, store: Store<StoreState>) => Promise<void>;
491
- }
492
- declare module "planner/store/planner-ui-state" {
493
- import { Module } from 'vuex';
494
- import { SharedUiState, StoreState } from "common/store/index";
495
- import { MEASUREMENT_UNIT, Nullable } from "common/utils/types";
496
- import { SelectionPayload } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
497
- import { BUTTON_ACTIONS } from "configurator/store/ui-state";
498
- import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
499
- import { PlannerSidebarState } from "planner/utils/planner-sidebar";
500
- import { KernelWall } from '@roomle/web-sdk/lib/definitions/typings/planner';
501
- type SelectionType = 'static' | 'configuration';
502
- export interface PlannerUiState extends SharedUiState {
503
- selection: Nullable<SelectionType>;
504
- selectionPayload: Nullable<SelectionPayload>;
505
- isDrag: boolean;
506
- catalogTags: Nullable<RapiTagForUi[]>;
507
- actionMenuExpanded: boolean;
508
- selectedActions: BUTTON_ACTIONS[];
509
- stackViewStack: PlannerSidebarState[];
510
- lastWalls: KernelWall[];
511
- measurementUnit: MEASUREMENT_UNIT;
512
- isDrawing: boolean;
513
- hasWalls: boolean;
514
- secondSidebarLevelActive: boolean;
515
- }
516
- export enum PLANNER_UI_STATE_MUTATIONS {
517
- SET_SELECTION = "PLANNER_UI_STATE_setSelection",
518
- SET_IS_LANDSCAPE = "PLANNER_UI_STATE_setIsLandscape",
519
- SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_setInteractionsExpanded",
520
- SET_IS_FULLSCREEN = "PLANNER_UI_STATE_setIsFullscreen",
521
- SET_IS_DESKTOP = "PLANNER_UI_STATE_setIsDesktop",
522
- SET_LAST_REGULAR_VIEW_MODE = "PLANNER_UI_STATE_SET_LAST_REGULAR_VIEW_MODE",
523
- SET_CATALOG_ROOT_TAG = "PLANNER_UI_STATE_SET_CATALOG_ROOT_TAG",
524
- SET_IS_DRAG = "SET_IS_DRAG",
525
- SET_ACTION_SELECTED = "SET_ACTION_SELECTED",
526
- SET_ACTION_DESELECTED = "SET_ACTION_DESELECTED",
527
- SET_ACTION_MENU_EXPANDED = "SET_ACTION_MENU_EXPANDED",
528
- SET_TOPBAR_ACTION_SELECTED = "SET_TOPBAR_ACTION_SELECTED",
529
- SET_TOPBAR_ACTION_DESELECTED = "SET_TOPBAR_ACTION_DESELECTED",
530
- PUSH_SIDEBAR_VIEW = "PUSH_SIDEBAR_VIEW",
531
- POP_SIDEBAR_VIEW = "POP_SIDEBAR_VIEW",
532
- SET_LAST_WALLS = "SET_LAST_WALLS",
533
- SET_MEASUREMENT_UNIT = "SET_MEASUREMENT_UNIT",
534
- SET_IS_DRAWING = "SET_IS_DRAWING",
535
- SET_HAS_WALLS = "SET_HAS_WALLS",
536
- SET_SECOND_SIDEBAR_LEVEL_ACTIVE = "SET_SECOND_SIDEBAR_LEVEL_ACTIVE"
537
- }
538
- export enum PLANNER_UI_STATE_ACTIONS {
539
- SELECT_VIEW_MODE = "PLANNER_UI_STATE_SELECT_VIEW_MODE",
540
- SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_SET_INTERACTIONS_EXPANDED",
541
- DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS",
542
- CLEAR_AND_CLOSE_SIDEBAR = "CLEAR_AND_CLOSE_SIDEBAR",
543
- SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload",
544
- ADD_SIDEBAR_VIEW = "ADD_SIDEBAR_VIEW",
545
- REMOVE_SIDEBAR_VIEW = "REMOVE_SIDEBAR_VIEW",
546
- CLEAR_SIDEBAR = "CLEAR_SIDEBAR"
547
- }
548
- export enum PLANNER_UI_STATE_GETTERS {
549
- CATALOG_ROOT_TAG = "PLANNER_UI_STATE_CATALOG_ROOT_TAG",
550
- SELECTED_ITEM_PAYLOAD = "PLANNER_UI_STATE_SELECTED_ITEM_PAYLOAD",
551
- PART_LIST_PLANNER_SHOWN = "PART_LIST_PLANNER_SHOWN",
552
- PRODUCT_LIST_SHOWN = "PRODUCT_LIST_SHOWN",
553
- LAST_OF_STACK_VIEW_STACK = "LAST_OF_STACK_VIEW_STACK"
554
- }
555
- export const initialState: PlannerUiState;
556
- export const plannerUiState: Module<PlannerUiState, StoreState>;
557
- }
558
- declare module "common/store/collection-view-state" {
559
- import { Module } from 'vuex';
560
- import { Nullable } from "common/utils/types";
561
- import { CollectionViewElement } from "common/components/collection-view/-utils/types";
562
- import { StoreState } from "common/store/index";
563
- export type ViewTypeState = 'listView' | 'gridViewSmall' | 'gridViewBig';
564
- export interface GridViewUiState {
565
- filter: string[];
566
- search: Nullable<string>;
567
- userInitiatedSearch: boolean;
568
- viewType: ViewTypeState;
569
- hasGroupLabel: boolean;
570
- }
571
- export interface CollectionViewUiState {
572
- selected: Nullable<CollectionViewElement>;
573
- showsDetails: boolean;
574
- gridView: GridViewUiState;
575
- }
576
- export const getInitialCollectionViewState: () => CollectionViewUiState;
577
- export const getInitialViewType: () => ViewTypeState;
578
- export enum COLLECTION_VIEW_STATE_MUTATIONS {
579
- ELEMENT_EXPANDED = "CV_ELEMENT_EXPANDED",
580
- SET_SELECTED_ELEMENT = "CV_SET_SELECTED_ELEMENT",
581
- RESET_COLLECTION_VIEW = "RESET_COLLECTION_VIEW"
582
- }
583
- export enum GRID_VIEW_STATE_MUTATIONS {
584
- SET_SEARCH = "GV_SET_SEARCH",
585
- TOGGLE_FILTER = "GV_TOGGLE_FILTER",
586
- SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH",
587
- SET_VIEW_TYPE = "SET_VIEW_TYPE",
588
- SET_HAS_GROUP_LABEL = "SET_HAS_GROUP_LABEL",
589
- RESET_FILTER = "RESET_FILTER"
590
- }
591
- interface MuationPayload<T, V> {
592
- state: T;
593
- value: V;
594
- }
595
- export type GridViewMutationPayload<T> = MuationPayload<GridViewUiState, T>;
596
- export type CollectionViewMutationPayload<T> = MuationPayload<CollectionViewUiState, T>;
597
- export const collectionViewUiStateHelper: Module<CollectionViewUiState, StoreState>;
598
- }
599
- declare module "configurator/components/grid-view/-utils/GridViewHelper" {
600
- import { RapiItem, RapiMaterial } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
601
- import { KernelValue, UiPossibleChild } from '@roomle/web-sdk/lib/definitions/typings/kernel';
602
- import { Nullable } from "common/utils/types";
603
- export interface GridViewElement<T = (RapiMaterial | KernelValue | UiPossibleChild | RapiItem)> {
604
- key: string;
605
- payload: T;
606
- }
607
- export interface GridViewVariantElement extends GridViewElement {
608
- hash: string;
609
- }
610
- export interface GridViewGroup {
611
- id: string;
612
- label: Nullable<string>;
613
- elements: GridViewElement[];
614
- }
615
- export const toGridViewElements: <T = RapiItem | RapiMaterial | UiPossibleChild | KernelValue>(elements: T[], key: string) => GridViewElement<T>[];
616
- }
617
- declare module "configurator/store/ui-state" {
618
- import { Module } from 'vuex';
619
- import { SharedUiState, StoreState } from "common/store/index";
620
- import { Nullable } from "common/utils/types";
621
- import { ParameterGroup } from "configurator/store/core-data";
622
- import { KernelComponent, UiPossibleChild } from '@roomle/web-sdk/lib/definitions/typings/kernel';
623
- import { OverlaysOpenState } from "configurator/components/-utils/overlays";
624
- import { UiInitData } from "configurator/embedding/types";
625
- import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
626
- import { GridViewVariantElement } from "configurator/components/grid-view/-utils/GridViewHelper";
627
- import { WallDimension } from '@roomle/web-sdk/lib/definitions/planner-core/src/view-model/wall-plan-element-view-model';
628
- export enum BUTTON_ACTIONS {
629
- AR = 0,
630
- PARTLIST = 1,
631
- MULTISELECT = 2,
632
- DIMENSIONS = 3,
633
- FULLSCREEN = 4,
634
- RESET_CAMERA = 5,
635
- RENDER_IMAGE = 6,
636
- ROTATE = 7,
637
- SNAPPING = 8,
638
- UNDO = 9,
639
- REDO = 10,
640
- PARTLIST_PLANNER = 11,
641
- PRODUCTLIST = 12,
642
- TWO_D_VIEW = 13,
643
- ADD_ROOM = 14
644
- }
645
- export interface SceneSelection {
646
- selectionMode: string;
647
- hasChildren: boolean;
648
- isRoot: boolean;
649
- components: KernelComponent[];
650
- }
651
- export interface UiState extends SharedUiState {
652
- selectedGroup: Nullable<ParameterGroup>;
653
- overlays: OverlaysOpenState;
654
- lastRegularViewMode: Nullable<boolean>;
655
- onlyShowAddons: boolean;
656
- activeAddon: Nullable<UiPossibleChild>;
657
- currentSelection: Nullable<SceneSelection>;
658
- initData: Nullable<UiInitData>;
659
- isExpandedForConfigure: boolean;
660
- isLoadingInProgress: boolean;
661
- currentVariants: Nullable<RapiTagForUi>;
662
- showVariants: boolean;
663
- isViewer: boolean;
664
- isConfigurator: boolean;
665
- isPlanner: boolean;
666
- email: Nullable<string>;
667
- lastSelectedVariant: Nullable<GridViewVariantElement>;
668
- undoEnabled: boolean;
669
- redoEnabled: boolean;
670
- undoEnabledPlanner: boolean;
671
- redoEnabledPlanner: boolean;
672
- materialMultiSelect: boolean;
673
- wallsDimensions: WallDimension[];
674
- objPosOnPlanner: any[];
675
- initPlannerWithObjID: boolean;
676
- }
677
- export enum UI_STATE_MUTATIONS {
678
- SET_SELECTED_GROUP = "setSelectedGroup",
679
- SET_IS_DESKTOP = "setIsDesktop",
680
- SET_INTERACTIONS_EXPANDED = "setInteractionsExpanded",
681
- SET_IS_LANDSCAPE = "setIsLandscape",
682
- SET_IS_PART_LIST_SHOWN = "SET_IS_PART_LIST_SHOWN",
683
- SET_LAST_REGULAR_VIEW_MODE = "SET_LAST_REGULAR_VIEW_MODE",
684
- SET_IS_FULLSCREEN = "setIsFullscreen",
685
- SHOW_ONLY_ADDONS = "SHOW_ONLY_ADDONS",
686
- SHOW_ALL_COLLECTION_VIEW_ELEMENTS = "SHOW_ALL_COLLECTION_VIEW_ELEMENTS",
687
- SET_ACTIVE_ADDON = "SET_ACTIVE_ADDON",
688
- SET_CURRENT_SELECTION = "SET_CURRENT_SELECTION",
689
- SET_OVERLAY_STATE = "SET_OVERLAY_STATE",
690
- CLOSE_ALL_OVERLAYS = "CLOSE_ALL_OVERLAYS",
691
- SET_INIT_DATA = "SET_INIT_DATA",
692
- SET_IS_EXPANDED_FOR_CONFIGURE = "SET_IS_EXPANDED_FOR_CONFIGURE",
693
- SET_IS_LOADING_IN_PROGRESS = "SET_IS_LOADING_IN_PROGRESS",
694
- SET_CURRENT_VARIANTS = "SET_CURRENT_VARIANTS",
695
- SET_SHOW_VARIANTS = "SET_SHOW_VARIANTS",
696
- SET_EMAIL = "SET_EMAIL",
697
- RESET_UI = "RESET_UI",
698
- SET_LAST_SELECTED_VARIANT = "SET_LAST_SELECTED_VARIANT",
699
- SET_UNDO = "SET_UNDO",
700
- SET_REDO = "SET_REDO",
701
- SET_UNDO_PLANNER = "SET_UNDO_PLANNER",
702
- SET_REDO_PLANNER = "SET_REDO_PLANNER",
703
- SET_TOPBAR_ACTION_SELECTED = "SET_TOPBAR_ACTION_SELECTED",
704
- SET_TOPBAR_ACTION_DESELECTED = "SET_TOPBAR_ACTION_DESELECTED",
705
- SET_WALLS_DIMENSIONS = "SET_WALLS_DIMENSIONS",
706
- SET_PLANNER_OBJ_POS = "SET_PLANNER_OBJ_POS",
707
- SET_PLANNER_INIT_WITH_OBJ_ID = "SET_PLANNER_INIT_WITH_OBJ_ID"
708
- }
709
- export enum UI_STATE_ACTIONS {
710
- SELECT_GROUP = "SELECT_GROUP",
711
- SELECT_VIEW_MODE = "SELECT_VIEW_MODE",
712
- SET_INTERACTIONS_EXPANDED = "SET_INTERACTIONS_EXPANDED",
713
- SELECTION_CHANGE = "SELECTION_CHANGE",
714
- RESET_COLLECTION_VIEW = "RESET_COLLECTION_VIEW",
715
- START_CONFIGURING = "START_CONFIGURING",
716
- PAUSE_CONFIGURING = "PAUSE_CONFIGURING",
717
- USE_VIEWER = "USE_VIEWER",
718
- USE_PLANNER = "USE_PLANNER",
719
- USE_CONFIGURATOR = "USE_CONFIGURATOR",
720
- SHOW_PARAMS = "SHOW_PARAMS",
721
- SHOW_ROOMS = "SHOW_ROOMS"
722
- }
723
- export enum UI_STATE_GETTERS {
724
- USE_REGULAR_LAYOUT = "USE_REGULAR_LAYOUT",
725
- PART_LIST_SHOWN = "PART_LIST_SHOWN",
726
- COLLECTION_VIEW_ELEMENTS = "COLLECTION_VIEW_ELEMENTS",
727
- COLLECTION_VIEW_ADDON_ELEMENTS = "COLLECTION_VIEW_ADDON_ELEMENTS",
728
- COLLECTION_VIEW_VARIANTS = "COLLECTION_VIEW_VARIANTS",
729
- SHOW_BACK_TO_WEBSITE = "SHOW_BACK_TO_WEBSITE",
730
- PART_LIST_PLANNER_SHOWN = "PART_LIST_PLANNER_SHOWN",
731
- PRODUCT_LIST_SHOWN = "PRODUCT_LIST_SHOWN",
732
- SAMPLE_ROOMS_SHOWN = "SAMPLE_ROOMS_SHOWN"
733
- }
734
- export const initialState: UiState;
735
- export const uiState: Module<UiState, StoreState>;
736
- }
737
- declare module "planner/store/planner-core-data" {
738
- import { StoreState } from "common/store/index";
739
- import { Nullable } from "common/utils/types";
740
- import { Module } from 'vuex';
741
- import { UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
742
- export interface PlannerCoreData {
743
- productList: UiPlanObject[];
744
- currencySymbol: string;
745
- price: Nullable<number>;
746
- }
747
- export enum PLANNER_CORE_DATA_MUTATIONS {
748
- UPDATE_PRODUCT_LIST = "UPDATE_PRODUCT_LIST",
749
- UPDATE_PRICE_VALUE = "UPDATE_PRICE_VALUE",
750
- UPDATE_CURRENCY_SYMBOL = "UPDATE_CURRENCY_SYMBOL"
751
- }
752
- export enum PLANNER_CORE_DATA_ACTIONS {
753
- UPDATE_PRICE = "UPDATE_PRICE"
754
- }
755
- export enum PLANNER_CORE_DATA_GETTERS {
756
- CURRENT_PRICE = "CURRENT_PRICE"
757
- }
758
- export const plannerCoreData: Module<PlannerCoreData, StoreState>;
759
- }
760
- declare module "common/store/index" {
761
- import { CORE_STATE_ACTIONS, CORE_STATE_MUTATIONS, CoreState } from "configurator/store/core-state";
762
- import { CORE_DATA_MUTATIONS, CoreData } from "configurator/store/core-data";
763
- import { BUTTON_ACTIONS, UI_STATE_ACTIONS, UI_STATE_MUTATIONS, UiState } from "configurator/store/ui-state";
764
- import { PLANNER_UI_STATE_MUTATIONS, PlannerUiState } from "planner/store/planner-ui-state";
765
- import { COMMON_UI_STATE_MUTATIONS, CommonUiState } from "common/store/common-ui-state";
766
- import { COLLECTION_VIEW_STATE_MUTATIONS, CollectionViewUiState } from "common/store/collection-view-state";
767
- import { Nullable } from "common/utils/types";
768
- import { PLANNER_CORE_DATA_ACTIONS, PLANNER_CORE_DATA_MUTATIONS, PlannerCoreData } from "planner/store/planner-core-data";
769
- export interface SharedUiState {
770
- interactionsExpanded: boolean;
771
- isFullscreen: boolean;
772
- isDesktop: boolean;
773
- isLandscape: boolean;
774
- lastRegularViewMode: Nullable<boolean>;
775
- wasDesktopBefore: boolean;
776
- sidebar: CollectionViewUiState;
777
- topBarSelectedActions: BUTTON_ACTIONS[];
778
- }
779
- export const MUTATIONS: {
780
- UPDATE_PRODUCT_LIST: PLANNER_CORE_DATA_MUTATIONS.UPDATE_PRODUCT_LIST;
781
- UPDATE_PRICE_VALUE: PLANNER_CORE_DATA_MUTATIONS.UPDATE_PRICE_VALUE;
782
- UPDATE_CURRENCY_SYMBOL: PLANNER_CORE_DATA_MUTATIONS.UPDATE_CURRENCY_SYMBOL;
783
- ELEMENT_EXPANDED: COLLECTION_VIEW_STATE_MUTATIONS.ELEMENT_EXPANDED;
784
- SET_SELECTED_ELEMENT: COLLECTION_VIEW_STATE_MUTATIONS.SET_SELECTED_ELEMENT;
785
- RESET_COLLECTION_VIEW: COLLECTION_VIEW_STATE_MUTATIONS.RESET_COLLECTION_VIEW;
786
- SET_IS_IN_IFRAME: COMMON_UI_STATE_MUTATIONS.SET_IS_IN_IFRAME;
787
- SET_IS_VIEW_ONLY: COMMON_UI_STATE_MUTATIONS.SET_IS_VIEW_ONLY;
788
- SET_LAST_REQUESTED_ID: COMMON_UI_STATE_MUTATIONS.SET_LAST_REQUESTED_ID;
789
- SET_SELECTION: PLANNER_UI_STATE_MUTATIONS.SET_SELECTION;
790
- SET_IS_LANDSCAPE: PLANNER_UI_STATE_MUTATIONS.SET_IS_LANDSCAPE;
791
- SET_INTERACTIONS_EXPANDED: PLANNER_UI_STATE_MUTATIONS.SET_INTERACTIONS_EXPANDED;
792
- SET_IS_FULLSCREEN: PLANNER_UI_STATE_MUTATIONS.SET_IS_FULLSCREEN;
793
- SET_IS_DESKTOP: PLANNER_UI_STATE_MUTATIONS.SET_IS_DESKTOP;
794
- SET_LAST_REGULAR_VIEW_MODE: PLANNER_UI_STATE_MUTATIONS.SET_LAST_REGULAR_VIEW_MODE;
795
- SET_CATALOG_ROOT_TAG: PLANNER_UI_STATE_MUTATIONS.SET_CATALOG_ROOT_TAG;
796
- SET_IS_DRAG: PLANNER_UI_STATE_MUTATIONS.SET_IS_DRAG;
797
- SET_ACTION_SELECTED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_SELECTED;
798
- SET_ACTION_DESELECTED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_DESELECTED;
799
- SET_ACTION_MENU_EXPANDED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_MENU_EXPANDED;
800
- SET_TOPBAR_ACTION_SELECTED: PLANNER_UI_STATE_MUTATIONS.SET_TOPBAR_ACTION_SELECTED;
801
- SET_TOPBAR_ACTION_DESELECTED: PLANNER_UI_STATE_MUTATIONS.SET_TOPBAR_ACTION_DESELECTED;
802
- PUSH_SIDEBAR_VIEW: PLANNER_UI_STATE_MUTATIONS.PUSH_SIDEBAR_VIEW;
803
- POP_SIDEBAR_VIEW: PLANNER_UI_STATE_MUTATIONS.POP_SIDEBAR_VIEW;
804
- SET_LAST_WALLS: PLANNER_UI_STATE_MUTATIONS.SET_LAST_WALLS;
805
- SET_MEASUREMENT_UNIT: PLANNER_UI_STATE_MUTATIONS.SET_MEASUREMENT_UNIT;
806
- SET_IS_DRAWING: PLANNER_UI_STATE_MUTATIONS.SET_IS_DRAWING;
807
- SET_HAS_WALLS: PLANNER_UI_STATE_MUTATIONS.SET_HAS_WALLS;
808
- SET_SECOND_SIDEBAR_LEVEL_ACTIVE: PLANNER_UI_STATE_MUTATIONS.SET_SECOND_SIDEBAR_LEVEL_ACTIVE;
809
- SET_SELECTED_GROUP: UI_STATE_MUTATIONS.SET_SELECTED_GROUP;
810
- SET_IS_PART_LIST_SHOWN: UI_STATE_MUTATIONS.SET_IS_PART_LIST_SHOWN;
811
- SHOW_ONLY_ADDONS: UI_STATE_MUTATIONS.SHOW_ONLY_ADDONS;
812
- SHOW_ALL_COLLECTION_VIEW_ELEMENTS: UI_STATE_MUTATIONS.SHOW_ALL_COLLECTION_VIEW_ELEMENTS;
813
- SET_ACTIVE_ADDON: UI_STATE_MUTATIONS.SET_ACTIVE_ADDON;
814
- SET_CURRENT_SELECTION: UI_STATE_MUTATIONS.SET_CURRENT_SELECTION;
815
- SET_OVERLAY_STATE: UI_STATE_MUTATIONS.SET_OVERLAY_STATE;
816
- CLOSE_ALL_OVERLAYS: UI_STATE_MUTATIONS.CLOSE_ALL_OVERLAYS;
817
- SET_INIT_DATA: UI_STATE_MUTATIONS.SET_INIT_DATA;
818
- SET_IS_EXPANDED_FOR_CONFIGURE: UI_STATE_MUTATIONS.SET_IS_EXPANDED_FOR_CONFIGURE;
819
- SET_IS_LOADING_IN_PROGRESS: UI_STATE_MUTATIONS.SET_IS_LOADING_IN_PROGRESS;
820
- SET_CURRENT_VARIANTS: UI_STATE_MUTATIONS.SET_CURRENT_VARIANTS;
821
- SET_SHOW_VARIANTS: UI_STATE_MUTATIONS.SET_SHOW_VARIANTS;
822
- SET_EMAIL: UI_STATE_MUTATIONS.SET_EMAIL;
823
- RESET_UI: UI_STATE_MUTATIONS.RESET_UI;
824
- SET_LAST_SELECTED_VARIANT: UI_STATE_MUTATIONS.SET_LAST_SELECTED_VARIANT;
825
- SET_UNDO: UI_STATE_MUTATIONS.SET_UNDO;
826
- SET_REDO: UI_STATE_MUTATIONS.SET_REDO;
827
- SET_UNDO_PLANNER: UI_STATE_MUTATIONS.SET_UNDO_PLANNER;
828
- SET_REDO_PLANNER: UI_STATE_MUTATIONS.SET_REDO_PLANNER;
829
- SET_WALLS_DIMENSIONS: UI_STATE_MUTATIONS.SET_WALLS_DIMENSIONS;
830
- SET_PLANNER_OBJ_POS: UI_STATE_MUTATIONS.SET_PLANNER_OBJ_POS;
831
- SET_PLANNER_INIT_WITH_OBJ_ID: UI_STATE_MUTATIONS.SET_PLANNER_INIT_WITH_OBJ_ID;
832
- UPDATE_GROUPS: CORE_DATA_MUTATIONS.UPDATE_GROUPS;
833
- UPDATE_PARAMETERS: CORE_DATA_MUTATIONS.UPDATE_PARAMETERS;
834
- UPDATE_ADDONS: CORE_DATA_MUTATIONS.UPDATE_ADDONS;
835
- UPDATE_PART_LIST: CORE_DATA_MUTATIONS.UPDATE_PART_LIST;
836
- UPDATE_BOUNDS: CORE_DATA_MUTATIONS.UPDATE_BOUNDS;
837
- UPDATE_CURRENCY: CORE_DATA_MUTATIONS.UPDATE_CURRENCY;
838
- SET_LABEL: CORE_STATE_MUTATIONS.SET_LABEL;
839
- SET_COMPONENT_HAS_CHILDREN: CORE_STATE_MUTATIONS.SET_COMPONENT_HAS_CHILDREN;
840
- SET_CATALOG_LABEL: CORE_STATE_MUTATIONS.SET_CATALOG_LABEL;
841
- SET_INITIAL_HASH: CORE_STATE_MUTATIONS.SET_INITIAL_HASH;
842
- SET_CURRENT_HASH: CORE_STATE_MUTATIONS.SET_CURRENT_HASH;
843
- };
844
- export const ACTIONS: {
845
- UPDATE_PRICE: PLANNER_CORE_DATA_ACTIONS.UPDATE_PRICE;
846
- SELECT_GROUP: UI_STATE_ACTIONS.SELECT_GROUP;
847
- SELECT_VIEW_MODE: UI_STATE_ACTIONS.SELECT_VIEW_MODE;
848
- SET_INTERACTIONS_EXPANDED: UI_STATE_ACTIONS.SET_INTERACTIONS_EXPANDED;
849
- SELECTION_CHANGE: UI_STATE_ACTIONS.SELECTION_CHANGE;
850
- RESET_COLLECTION_VIEW: UI_STATE_ACTIONS.RESET_COLLECTION_VIEW;
851
- START_CONFIGURING: UI_STATE_ACTIONS.START_CONFIGURING;
852
- PAUSE_CONFIGURING: UI_STATE_ACTIONS.PAUSE_CONFIGURING;
853
- USE_VIEWER: UI_STATE_ACTIONS.USE_VIEWER;
854
- USE_PLANNER: UI_STATE_ACTIONS.USE_PLANNER;
855
- USE_CONFIGURATOR: UI_STATE_ACTIONS.USE_CONFIGURATOR;
856
- SHOW_PARAMS: UI_STATE_ACTIONS.SHOW_PARAMS;
857
- SHOW_ROOMS: UI_STATE_ACTIONS.SHOW_ROOMS;
858
- SET_LABEL: CORE_STATE_ACTIONS.SET_LABEL;
859
- SET_COMPONENT_HAS_CHILDREN: CORE_STATE_ACTIONS.SET_COMPONENT_HAS_CHILDREN;
860
- UPDATE_HASH: CORE_STATE_ACTIONS.UPDATE_HASH;
861
- };
862
- export interface StoreState {
863
- coreState: CoreState;
864
- coreData: CoreData;
865
- uiState: UiState;
866
- plannerUiState: PlannerUiState;
867
- plannerCoreData: PlannerCoreData;
868
- commonUiState: CommonUiState;
869
- }
870
- const _default: import("vuex").Store<StoreState>;
871
- export default _default;
872
- }
873
- declare module "common/utils/user-agent" {
874
- import { Nullable } from "common/utils/types";
875
- export const isIOs: () => boolean;
876
- export const hasARQuicklook: () => Nullable<boolean>;
877
- export const isInAppBrowser: () => Nullable<boolean>;
878
- export const isAndroid: () => boolean;
879
- export const deviceSupportsAR: () => boolean;
880
- }
881
- declare module "common/utils/dom" {
882
- import { Nullable } from "common/utils/types";
883
- export const isScrolledToRightEnd: (element: Nullable<HTMLElement>, threshold?: number) => boolean;
884
- export const hasVerticalOverflow: (element: HTMLElement) => boolean;
885
- export const hasHorizontalOverflow: (element: HTMLElement) => boolean;
886
- export const lastVisibleElement: (container: HTMLElement, threshold?: number) => Element;
887
- export const cssVariableToNumber: (cssVariable: string) => number;
888
- export const remToPixel: (remValue: string, remBase: number) => number;
889
- export const percentInStringToFloat: (percentInString: string) => number;
890
- export const animationDurationInMsToFloat: (animationDuration: string) => number;
891
- export const calcIsDesktop: () => boolean;
892
- export const removeLoadingScreen: () => Promise<void>;
893
- export const showLoadingScreen: () => Promise<void>;
894
- export const copyToClipboard: (text: string) => void;
895
- export const setLoadingProgress: (percent: number) => void;
896
- export const hideLoadingCircle: () => void;
897
- }
898
- declare module "common/utils/script-loader" {
899
- export default class ScriptLoader {
900
- static fetch(url: string, options: {
901
- id: string;
902
- }): Promise<void>;
903
- }
904
- }
905
- declare module "common/utils/google-analytics" {
906
- import { Nullable } from "common/utils/types";
907
- export const GA_DIMENSIONS: {
908
- [key: string]: string;
909
- };
910
- export const GA_METRICS: {
911
- RESPONSE_END_TIME: string;
912
- DOM_LOAD_TIME: string;
913
- WINDOW_LOAD_TIME: string;
914
- TIME_TO_FIRST_BTYE: string;
915
- KERNEL_IS_READY: string;
916
- INIT_LOADING_SCREEN_CLOSE: string;
917
- };
918
- enum GA_ACTION_TYPE {
919
- EXCEPTION = "exception",
920
- TIMING = "timing_complete"
921
- }
922
- enum CUSTOM_ACTION_TYPE {
923
- TRACK_TIMING = "track_timing"
924
- }
925
- export const GA_NULL_VALUE = "(not set)";
926
- export enum GA_CATEGORY {
927
- ERROR = "Error",
928
- NAVIGATION_TIMING = "Navigation Timing",
929
- TIMING = "Timing",
930
- INTERACTION = "Interaction",
931
- TRACKING = "Tracking",
932
- DEPRECATION = "Deprecation"
933
- }
934
- export type GoogleAnalyticsCallback = (...args: any[]) => void;
935
- export const MAX_QUEUE_LENGTH = 1500;
936
- export default class GoogleAnalytics {
937
- history: IArguments[];
938
- private _settings;
939
- private _queue;
940
- private _trackingId;
941
- private _useTracking;
942
- private _callbacks;
943
- private _gaReady;
944
- private get _gtag();
945
- constructor(configuratorId: string, useTracking?: boolean);
946
- giveConsent(): void;
947
- trackEvent(action: CUSTOM_ACTION_TYPE | GA_ACTION_TYPE | string, category: GA_CATEGORY, label: string, value?: Nullable<number>, fieldsObject?: object): void;
948
- trackTiming(category: GA_CATEGORY, label: any, value: number, fieldsObject?: object): void;
949
- setDimension(dimension: string, value: any): void;
950
- setDimensions(dimensions: {
951
- [key: string]: any;
952
- }): void;
953
- trackError(message: string, specialErrorName?: Nullable<string>): void;
954
- trackContentError(message: string): void;
955
- addCallback(listener: GoogleAnalyticsCallback): void;
956
- removeUiCallback(listener: GoogleAnalyticsCallback): void;
957
- cleanUpHistory(): void;
958
- trackWrongDomain(): void;
959
- trackNoActivePackage(): void;
960
- private _execCommand;
961
- private _loadLibScript;
962
- private _send;
963
- private _flushQueue;
964
- private _setObjectProperties;
965
- private _trackException;
966
- private _trackErrors;
967
- private _trackErrorEvent;
968
- private _setSettings;
969
- private _findDimension;
970
- private _sendNavigationTimingMetrics;
971
- }
972
- }
973
- declare module "common/plugins/analytics" {
974
- import GoogleAnalytics from "common/utils/google-analytics";
975
- export interface Analytics {
976
- ga: GoogleAnalytics;
977
- }
978
- const AnalyticsPlugin: {
979
- install(Vue: any, { configuratorId, useTracking }: {
980
- configuratorId: string;
981
- useTracking: boolean;
982
- }): void;
983
- };
984
- export default AnalyticsPlugin;
985
- }
986
- declare module "configurator/business-logic/roomle-sdk-wrapper" {
987
- import RapiAccess from '@roomle/web-sdk/lib/definitions/common-core/src/rapi-access';
988
- import { GlbViewer } from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/glb-viewer';
989
- import { Configurator } from '@roomle/web-sdk/lib/definitions/configurator-core/src/configurator';
990
- import { Nullable } from "common/utils/types";
991
- import { UiInitData } from "configurator/embedding/types";
992
- import { GlobalInitDataDefinition } from '@roomle/web-sdk/lib/definitions/common-core/src/utils/shims';
993
- import { Planner } from '@roomle/web-sdk/lib/definitions/planner-core/src/planner';
994
- import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
995
- import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
996
- /**
997
- * We use this class in a plugin so we
998
- * can rely on DI to change it during testing
999
- */
1000
- export class RoomleSdkWrapper {
1001
- private _configuratorInstance;
1002
- private _viewerInstance;
1003
- private _plannerInstance;
1004
- private _currentInstance;
1005
- get hasPlanner(): boolean;
1006
- getConfigurator(element: HTMLElement, initData?: UiInitData): Promise<Configurator>;
1007
- getConfiguratorApi(element: HTMLElement, initData?: UiInitData): Promise<RoomleConfigurator>;
1008
- getGlbViewer(element: HTMLElement, initData?: UiInitData): Promise<GlbViewer>;
1009
- getPlanner(element: HTMLElement, initData?: UiInitData): Promise<Planner>;
1010
- getRapiAccess(): Promise<RapiAccess>;
1011
- getGlobalCallback(): Promise<GlobalCallback>;
1012
- setGlobalInitData(initData: Nullable<GlobalInitDataDefinition>): void;
1013
- }
1014
- }
1015
- declare module "common/utils/performance" {
1016
- export const addLoadMark: () => void;
1017
- export const calcTiming: () => void;
1018
- }
1019
- declare module "configurator/embedding/utils" {
1020
- import { RoomleEmbeddingApiKeys } from "configurator/embedding/roomle-configurator-api";
1021
- import { ConfiguratorSettings, UiInitData } from "configurator/embedding/types";
1022
- export const NAMESPACE: {
1023
- [key: string]: keyof RoomleEmbeddingApiKeys | 'callbacks';
1024
- };
1025
- export const NAMESPACE_SEPARATOR = ".";
1026
- export const SDK_CALLBACK: string;
1027
- export const HANDSHAKE_MESSAGES: {
1028
- REQUEST_BOOT: string;
1029
- SETUP: string;
1030
- WEBSITE_READY: string;
1031
- };
1032
- export const isExposable: (name: string) => boolean;
1033
- export const getMethodNames: (proto: any, namespace: string, isCallback?: boolean) => string[];
1034
- export const getConfiguratorSettings: (configuratorId: string, initData: UiInitData) => Promise<ConfiguratorSettings>;
1035
- }
1036
- declare module "configurator/business-logic/ui-callback" {
1037
- import { KernelComponent } from '@roomle/web-sdk/lib/definitions/typings/kernel';
1038
- export class UiCallbacks {
1039
- onSelectionChange: (_selectionMode: string, _isRoot: boolean, _hasChildren: boolean, _components: KernelComponent[]) => any;
1040
- onSelectionCancel: () => any;
1041
- }
1042
- }
1043
- declare module "common/business-logic/connector" {
1044
- import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1045
- import { UiInitData } from "configurator/embedding/types";
1046
- import { CallbackApi } from "configurator/business-logic/sdk-connector";
1047
- export abstract class Connector {
1048
- abstract readonly api: Promise<any>;
1049
- abstract init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
1050
- addCallback<K extends keyof CallbackApi>(key: K, fun: CallbackApi[K], allowMultiple?: boolean): Promise<void>;
1051
- }
1052
- }
1053
- declare module "configurator/business-logic/sdk-connector-configurator" {
1054
- import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
1055
- import { Nullable } from "common/utils/types";
1056
- import { UiInitData } from "configurator/embedding/types";
1057
- import { StoreState } from "common/store/index";
1058
- import { KernelParameter } from '@roomle/web-sdk/lib/definitions/typings/kernel';
1059
- import { Store } from 'vuex';
1060
- import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1061
- import { Analytics } from "common/plugins/analytics";
1062
- import { UiCallbacks } from "configurator/business-logic/ui-callback";
1063
- import { Connector } from "common/business-logic/connector";
1064
- export class SdkConnectorConfigurator extends Connector {
1065
- private _configurator;
1066
- private _initWaiters;
1067
- private _store;
1068
- private _analytics;
1069
- private _uiCallbacks;
1070
- constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
1071
- get api(): Promise<RoomleConfigurator>;
1072
- init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
1073
- initConfigurator(configurator: RoomleConfigurator): Promise<void>;
1074
- setParameter(parameter: KernelParameter, value: string, isRaw?: boolean): Promise<void>;
1075
- setPrice(currencySymbol: string, price: number): void;
1076
- addUiCallback(listener: UiCallbacks): void;
1077
- removeUiCallback(listener: UiCallbacks): void;
1078
- private _updateParameters;
1079
- private _updateParameterGroups;
1080
- private _updateAddons;
1081
- private _checkParameterGroups;
1082
- }
1083
- }
1084
- declare module "viewer/business-logic/sdk-connector-viewer" {
1085
- import { Nullable } from "common/utils/types";
1086
- import { Store } from 'vuex';
1087
- import { StoreState } from "common/store/index";
1088
- import { Analytics } from "common/plugins/analytics";
1089
- import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1090
- import { UiInitData } from "configurator/embedding/types";
1091
- import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
1092
- import { Connector } from "common/business-logic/connector";
1093
- export class SdkConnectorViewer extends Connector {
1094
- private _viewer;
1095
- private _initWaiters;
1096
- private _store;
1097
- private _analytics;
1098
- constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
1099
- get api(): Promise<RoomleGLBViewer>;
1100
- init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
1101
- initViewer(viewer: RoomleGLBViewer): void;
1102
- }
1103
- }
1104
- declare module "planner/utils/interaction" {
1105
- import { Nullable } from "common/utils/types";
1106
- import { SelectionPayload } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
1107
- export const isCorrectSelectionPayload: (currentlySelected: Nullable<SelectionPayload>, asyncSelectionData: SelectionPayload) => boolean;
1108
- }
1109
- declare module "common/utils/plan" {
1110
- export const EMPTY_PLAN = "<plan version=\"2\"><walls><nodes/><edges/></walls><planobjects/><texters/><measures/><floors/><transparency><layers/></transparency></plan>";
1111
- }
1112
- declare module "planner/business-logic/sdk-connector-planner" {
1113
- import { Nullable } from "common/utils/types";
1114
- import { Store } from 'vuex';
1115
- import { StoreState } from "common/store/index";
1116
- import { Analytics } from "common/plugins/analytics";
1117
- import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1118
- import { UiInitData } from "configurator/embedding/types";
1119
- import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
1120
- import { RapiId, RapiPlan } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
1121
- import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
1122
- import { Connector } from "common/business-logic/connector";
1123
- export class SdkConnectorPlanner extends Connector {
1124
- private _planner;
1125
- private _initWaiters;
1126
- private _store;
1127
- private _sdkWrapper;
1128
- private _analytics;
1129
- private _currentPlan;
1130
- private _lastPlanId;
1131
- constructor(store: Store<StoreState>, analytics?: Nullable<Analytics>);
1132
- get api(): Promise<RoomlePlanner>;
1133
- init(sdkWrapper: RoomleSdkWrapper, element: HTMLElement, initData: UiInitData): Promise<void>;
1134
- initPlanner(planner: RoomlePlanner): Promise<void>;
1135
- loadPlan(id: RapiId): Promise<void>;
1136
- loadPlanBasedOnObjectId(id: RapiId): Promise<void>;
1137
- onSelectionCancel(): void;
1138
- saveCurrentPlan(image?: Base64Image): Promise<RapiPlan>;
1139
- private _getCurrentPlanXML;
1140
- }
1141
- }
1142
- declare module "configurator/business-logic/sdk-connector" {
1143
- import { Store } from 'vuex';
1144
- import { StoreState } from "common/store/index";
1145
- import { Nullable } from "common/utils/types";
1146
- import { KernelParameter, KernelPartList, UiPossibleChildTag } from '@roomle/web-sdk/lib/definitions/typings/kernel';
1147
- import ConfiguratorUiCallbacks from '@roomle/web-sdk/lib/definitions/configurator-core/src/services/configurator-ui-callback';
1148
- import { Analytics } from "common/plugins/analytics";
1149
- import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1150
- import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
1151
- import RapiAccess from '@roomle/web-sdk/lib/definitions/common-core/src/rapi-access';
1152
- import type { MessageHandler } from "configurator/embedding/message-handler";
1153
- import type { ExposedCallbacks } from "configurator/embedding/exposed-callbacks";
1154
- import { UiInitData } from "configurator/embedding/types";
1155
- import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
1156
- import { SdkConnectorConfigurator } from "configurator/business-logic/sdk-connector-configurator";
1157
- import { SdkConnectorViewer } from "viewer/business-logic/sdk-connector-viewer";
1158
- import { SdkConnectorPlanner } from "planner/business-logic/sdk-connector-planner";
1159
- import { RapiConfigurationEnhanced, RapiPlan } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
1160
- import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
1161
- import { UiCallbacks } from "configurator/business-logic/ui-callback";
1162
- import { Base64Image } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
1163
- import RoomlePlannerUiCallback from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
1164
- export enum SDK_MODULES {
1165
- VIEWER = 0,
1166
- CONFIGURATOR = 1,
1167
- PLANNER = 2
1168
- }
1169
- export interface Selectable {
1170
- key: string;
1171
- }
1172
- export interface UiPossibleChildTagWithKey extends UiPossibleChildTag {
1173
- key: string;
1174
- }
1175
- export type LoadResponse = PartlistResponse | void;
1176
- export interface PartlistResponse {
1177
- partList: KernelPartList;
1178
- }
1179
- export const getSelectableEntry: (selected: Selectable, data: Selectable[]) => Nullable<Selectable>;
1180
- export const REGISTERED_CALLBACKS: Map<keyof CallbackApi, boolean>;
1181
- export type CallbackApi = ConfiguratorUiCallbacks & RoomlePlannerUiCallback;
1182
- export class SdkConnector {
1183
- protected loadInProgress: boolean;
1184
- protected someLoadDone: boolean;
1185
- private _store;
1186
- private _loadWaiters;
1187
- private _analytics;
1188
- private _sdkWrapper;
1189
- private _messageHandler;
1190
- private _embeddingCallbacks;
1191
- private _initWaitersConfiguratorConnector;
1192
- private _initWaitersViewerConnector;
1193
- private _initWaitersPlannerConnector;
1194
- private _waitForCanvasElementCallback;
1195
- private _canvasElement;
1196
- private _configuratorSettingsCache;
1197
- private _connectorConfigurator;
1198
- private _connectorViewer;
1199
- private _connectorPlanner;
1200
- get configuratorConnector(): Promise<SdkConnectorConfigurator>;
1201
- get viewerConnector(): Promise<SdkConnectorViewer>;
1202
- get plannerConnector(): Promise<SdkConnectorPlanner>;
1203
- get configuratorApi(): Promise<RoomleConfigurator>;
1204
- get plannerApi(): Promise<RoomlePlanner>;
1205
- get viewerApi(): Promise<RoomleGLBViewer>;
1206
- constructor(sdkWrapper: RoomleSdkWrapper, store: Store<StoreState>, analytics?: Nullable<Analytics>, embeddingCallbacks?: Nullable<ExposedCallbacks>);
1207
- setMessageHandler(messageHandler: MessageHandler): void;
1208
- createExposedApi(module: SDK_MODULES): Promise<void>;
1209
- getRapiAccess(): Promise<RapiAccess>;
1210
- waitForLoad(): Promise<Nullable<LoadResponse>>;
1211
- goBack(): Promise<void>;
1212
- /**
1213
- * @deprecated use .configuratorConnector.then((connector) => connector.addUiCallback(listener))
1214
- * @param listener
1215
- */
1216
- addUiCallback(listener: UiCallbacks): void;
1217
- /**
1218
- * @deprecated use configuratorConnector.then((connector) => connector.removeUiCallback(listener))
1219
- * @param listener
1220
- */
1221
- removeUiCallback(listener: UiCallbacks): void;
1222
- setParameter(parameter: KernelParameter, value: string, isRaw?: boolean): Promise<void>;
1223
- hasActivePackage(): Promise<boolean>;
1224
- isCorrectConfiguratorDomain(configuratorId: string): Promise<boolean>;
1225
- /**
1226
- * Load a object which can be one of the following:
1227
- * - Component (use your component id and prefix it with 'component:', e.g. component:demoCatalogId:externalMeshes)
1228
- * - Plan
1229
- * - Static item (e.g. GLB)
1230
- * - Configurable Item
1231
- * - Configuration
1232
- * @param id
1233
- */
1234
- loadObject(id: string): Promise<Nullable<LoadResponse>>;
1235
- loadStaticItem(id: Nullable<string>): Promise<null>;
1236
- loadPlan(id: Nullable<string>, options?: {
1237
- isObjectId?: boolean;
1238
- }): Promise<null>;
1239
- loadConfiguration(configurationId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
1240
- loadComponent(componentId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
1241
- loadSelectedPlanObject(): Promise<void>;
1242
- loadConfigurationString(configurationString: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
1243
- loadConfigurableItem(configurableItemId: string, initData?: UiInitData | undefined): Promise<Nullable<LoadResponse>>;
1244
- isIdAGlb(id: string): Promise<boolean>;
1245
- canvasElementReady(element: HTMLElement): void;
1246
- initCanvasElement(module: SDK_MODULES): Promise<void>;
1247
- getTenant(): Promise<import("@roomle/web-sdk/lib/definitions/typings/rapi-types").RapiTenant>;
1248
- saveCurrentConfiguration(): Promise<RapiConfigurationEnhanced>;
1249
- giveGaConsent(): void;
1250
- get hasPlanner(): boolean;
1251
- saveCurrentObject(): Promise<RapiPlan | RapiConfigurationEnhanced>;
1252
- preparePerspectiveImage(): Promise<Base64Image>;
1253
- finishLoading(kernelParts: Nullable<LoadResponse>): void;
1254
- private _waitForCanvasElement;
1255
- private _needsInit;
1256
- private _fetchVariants;
1257
- private _execLoadingConfiguratorProcess;
1258
- private _startLoading;
1259
- private _showGenericError;
1260
- private _selectFirstObjAndStartConfiguring;
1261
- }
1262
- }
1263
- declare module "configurator/embedding/helper" {
1264
- import { ExposedCallbacks } from "configurator/embedding/exposed-callbacks";
1265
- import { Store } from 'vuex';
1266
- import { StoreState } from "common/store/index";
1267
- import { SdkConnector } from "configurator/business-logic/sdk-connector";
1268
- import { Analytics } from "common/plugins/analytics";
1269
- export const startConfiguring: (store: Store<StoreState>, exposedCallbacks: ExposedCallbacks) => void;
1270
- export const triggerRequestProduct: (embeddingCallbacks: ExposedCallbacks, sdkConnector: SdkConnector, store: Store<StoreState>, analytics: Analytics) => Promise<void>;
1271
- export const triggerRequestPlan: (embeddingCallbacks: ExposedCallbacks, sdkConnector: SdkConnector, store: Store<StoreState>, analytics: Analytics) => Promise<void>;
1272
- }
1273
- declare module "configurator/embedding/exposed-analytics-callbacks" {
1274
- export class ExposedAnalyticsCallbacks {
1275
- /**
1276
- * Is called whenever something is sent to google analytics
1277
- * Possible parameters are everything which is possible in gtag.js
1278
- * If you need further details about gtag.js: https://developers.google.com/gtagjs
1279
- * Currently we use Google Analytics in combination with gtag.js so
1280
- * you can intercept events and send them to your own analytics tool
1281
- */
1282
- onGATracking: (..._args: any[]) => void;
1283
- }
1284
- }
1285
- declare module "configurator/embedding/exposed-api" {
1286
- import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
1287
- import { ExposedCallbacks } from "configurator/embedding/exposed-callbacks";
1288
- import { LoadResponse, SdkConnector } from "configurator/business-logic/sdk-connector";
1289
- import { MessageHandler } from "configurator/embedding/message-handler";
1290
- import { Store } from 'vuex';
1291
- import { StoreState } from "common/store/index";
1292
- import { Nullable } from "common/utils/types";
1293
- import { Analytics } from "common/plugins/analytics";
1294
- import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
1295
- import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
1296
- import { Position3 } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
1297
- import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
1298
- export class ExposedApi {
1299
- private _sdk;
1300
- private _exposedCallbacks;
1301
- private _sdkConnector;
1302
- private _store;
1303
- private _analytics;
1304
- private _exposedAnalyticsCallbacks;
1305
- private _isWebsiteReady;
1306
- constructor(sdkConnector: SdkConnector, messageHandler: MessageHandler | null, sdk: RoomleConfigurator | RoomleGLBViewer | RoomlePlanner, exposedCallbacks: ExposedCallbacks, store: Store<StoreState>, analytics: Analytics, globalCallback: GlobalCallback);
1307
- get callbacks(): ExposedCallbacks;
1308
- /**
1309
- * call this method to load the object you want into the 3d Scene
1310
- * @param id database ID of the object you want to load
1311
- */
1312
- loadObject(id: string): Promise<Nullable<LoadResponse>>;
1313
- /**
1314
- * call this method to load the configuration string you want into the 3d Scene
1315
- * @param configurationString string of the configuration, starts with `{` and ends with `}`
1316
- * @returns null if configuration can not be loaded
1317
- */
1318
- loadConfigurationString(configurationString: string): Promise<Nullable<LoadResponse>>;
1319
- /**
1320
- * set the price for the UI to show
1321
- * most likely needed when implementing your own price service
1322
- *
1323
- * @param currencySymbol
1324
- * @param price
1325
- */
1326
- setPrice(currencySymbol: string, price: number): void;
1327
- /**
1328
- * This method can be used to start configuration when
1329
- * 3d scene is only initialized as viewer first, the
1330
- * configurator is automatically instantiated as viewer
1331
- * if the container where the configurator is placed is
1332
- * smaller than 1024px (this breakpoint could change in future)
1333
- * so do not rely on this exact pixel setting
1334
- */
1335
- startConfiguring(): void;
1336
- /**
1337
- * This method can be used to pause configuration
1338
- * If the configurator was called in view-only mode
1339
- * this method triggers the onBackToWebsite callback.
1340
- * To know when the view-only mode is activated see the
1341
- * description of the startConfiguring method
1342
- */
1343
- pauseConfiguring(): void;
1344
- /**
1345
- * call this method to trigger the onRequestProduct event from
1346
- * outside of the iframe. When this method is called the same
1347
- * process is kicked off as if the user would have clicked on
1348
- * request product. Therefore you can just use the same callback
1349
- * to react on the response
1350
- */
1351
- triggerRequestProduct(): Promise<void>;
1352
- /**
1353
- * call this method to trigger the onRequestPlan event from
1354
- * outside of the iframe. When this method is called the same
1355
- * process is kicked off as if the user would have clicked on
1356
- * request plan. Therefore you can just use the same callback
1357
- * to react on the response
1358
- */
1359
- triggerRequestPlan(): Promise<void>;
1360
- /**
1361
- * call this method if consent of Google Analytics is given later and not already in init-data on boot
1362
- */
1363
- giveGaConsent(): void;
1364
- /**
1365
- * Insert an object into the current MOC/planner scene
1366
- * If no position or rotation is set then it will be placed automatically (without overlapping other objects) with rotation 0
1367
- * @param id
1368
- * @param position as x (left/right), y (up/down) and z (front/back)
1369
- * @param rotation in radians
1370
- */
1371
- insertObject(id: string, position?: Position3, rotation?: number): Promise<void>;
1372
- private _websiteReady;
1373
- private _handleMessage;
1374
- private _forwardSdkCallbacks;
1375
- }
1376
- }
1377
- declare module "common/utils/merge" {
1378
- /**
1379
- * Recursively merge properties of two objects.
1380
- * If a property exists in both it, property of obj2 is used.
1381
- * Returns a new object (copy)
1382
- * @param obj1
1383
- * @param obj2
1384
- */
1385
- export const deepMergeCopy: (obj1: any, obj2: any) => any;
1386
- /**
1387
- * Recursively merge properties of two objects.
1388
- * If a property exists in both it, property of obj2 is used.
1389
- * Warning: This returns obj1 and not a copy!
1390
- * @param obj1
1391
- * @param obj2
1392
- */
1393
- export const deepMerge: (obj1: any, obj2: any) => any;
1394
- }
1395
- declare module "common/utils/browser" {
1396
- import { Nullable } from "common/utils/types";
1397
- export const BROWSER_LANGUAGE_PROPERTY_KEYS_KNOWN: string[];
1398
- export const getLanguage: (lang?: Nullable<string>) => any;
1399
- }
1400
- declare module "common/utils/init-data" {
1401
- import { ConfiguratorSettings, UiInitData } from "configurator/embedding/types";
1402
- import RapiAccess from '@roomle/web-sdk/lib/definitions/common-core/src/rapi-access';
1403
- import { Nullable } from "common/utils/types";
1404
- import type { MessageHandler } from "configurator/embedding/message-handler";
1405
- import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
1406
- export const CONFIGURATOR_IDLE = "(idle)";
1407
- export const getInitData: (useFallbackId?: boolean) => UiInitData;
1408
- export const castAndFixInitData: (initData: UiInitData) => UiInitData;
1409
- export const castInitData: (obj: {
1410
- [key: string]: any;
1411
- }) => void;
1412
- export const mergeInitData: (configuratorSettings: ConfiguratorSettings | {
1413
- id: string;
1414
- settings: UiInitData;
1415
- }, currentInitData: UiInitData) => UiInitData;
1416
- export const getEmbeddingInitData: (messageHandler: MessageHandler) => Promise<UiInitData>;
1417
- export const getRemoteInitData: (rapiAccess: RapiAccess, configuratorId: string) => Promise<UiInitData>;
1418
- export const getFallbackInitData: () => UiInitData;
1419
- export const LEGACY_SHARE_PLACEHOLDER = "<CONF_ID>";
1420
- export const SHARE_PLACEHOLDER = "#CONFIGURATIONID#";
1421
- /**
1422
- * combines init data in this order: query params > embedding > remote > fallback
1423
- *
1424
- * some exceptions to consider:
1425
- * - tenant: when do we need the tenant and where do we get it from?
1426
- *
1427
- * @param messageHandler
1428
- * @param sdkWrapper
1429
- * @param fallbackInitData
1430
- */
1431
- export const combineInitData: (messageHandler: Nullable<MessageHandler>, sdkWrapper: RoomleSdkWrapper, queryParamsInitData: UiInitData) => Promise<UiInitData>;
1432
- export const setProperty: (o: {
1433
- [key: string]: any;
1434
- }, path: string, value: any) => void;
1435
- }
1436
- declare module "configurator/embedding/roomle-configurator-api" {
1437
- import type { ExposedApi } from "configurator/embedding/exposed-api";
1438
- import type { UiInitData } from "configurator/embedding/types";
1439
- import type ConfiguratorUiCallbacks from '@roomle/web-sdk/lib/definitions/configurator-core/src/services/configurator-ui-callback';
1440
- import type RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
1441
- import type { ExposedAnalyticsCallbacks } from "configurator/embedding/exposed-analytics-callbacks";
1442
- import type RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
1443
- import type RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
1444
- import type { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
1445
- export interface RoomleEmbeddingApiKeys {
1446
- extended: any;
1447
- ui: any;
1448
- analytics: any;
1449
- global: any;
1450
- }
1451
- export type RoomleConfiguratorApi = RoomleEmbeddingApi<RoomleConfigurator, ConfiguratorUiCallbacks>;
1452
- export type RoomleViewerApi = RoomleEmbeddingApi<RoomleGLBViewer, ConfiguratorUiCallbacks>;
1453
- export type RoomlePlannerApi = RoomleEmbeddingApi<RoomlePlanner, ConfiguratorUiCallbacks>;
1454
- export default class RoomleEmbeddingApi<SdkType, SdkCallbacks> implements RoomleEmbeddingApiKeys {
1455
- static createPlanner(configuratorId: string, container: HTMLElement, initData: UiInitData): Promise<RoomlePlannerApi>;
1456
- /**
1457
- * Method to create a new instance of a Roomle Configurator
1458
- * @param configuratorId the id which identifies your configurator, you will get this ID from your Roomle Contact Person
1459
- * @param container DOM container in which the configurator should be placed
1460
- * @param initData settings with which the configurator should be started
1461
- */
1462
- static createConfigurator(configuratorId: string, container: HTMLElement, initData: UiInitData): Promise<RoomleConfiguratorApi>;
1463
- /**
1464
- * Method to create a new instance of a Roomle Configurator
1465
- * @deprecated please use "createConfigurator"
1466
- * @param configuratorId the id which identifies your configurator, you will get this ID from your Roomle Contact Person
1467
- * @param container DOM container in which the configurator should be placed
1468
- * @param initData settings with which the configurator should be started
1469
- */
1470
- static create(configuratorId: string, container: HTMLElement, initData: UiInitData): Promise<RoomleConfiguratorApi>;
1471
- /**
1472
- * Method to create a new instance of a Roomle Viewer
1473
- * @param configuratorId the id which identifies your configurator, you will get this ID from your Roomle Contact Person
1474
- * @param container DOM container in which the configurator should be placed
1475
- * @param initData settings with which the configurator should be started
1476
- */
1477
- static createViewer(configuratorId: string, container: HTMLElement, initData: UiInitData): Promise<RoomleViewerApi>;
1478
- private static _create;
1479
- ui: ExposedApi;
1480
- extended: SdkType;
1481
- analytics: {
1482
- callbacks: ExposedAnalyticsCallbacks;
1483
- };
1484
- global: {
1485
- callbacks: GlobalCallback;
1486
- };
1487
- private _waitForIframe;
1488
- private _container;
1489
- private _messageHandler;
1490
- private _configuratorSettings;
1491
- private _initData;
1492
- private _iframe;
1493
- private constructor();
1494
- teardown(): void;
1495
- private _createIframe;
1496
- private _onResize;
1497
- private _onUseFullPage;
1498
- private _onBackToWebsite;
1499
- private _executeMessage;
1500
- }
1501
- }
1502
-
1503
- import X from "configurator/embedding/roomle-configurator-api"
1504
- export default X;