@roomle/embedding-lib 4.33.0 → 4.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/api/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +1 -1
- package/docs/api/classes/exposed_api.ExposedApi.md +11 -11
- package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +7 -7
- package/docs/api/classes/roomle_configurator_api.default.md +9 -9
- package/docs/api/enums/types.UI_BUTTON.md +62 -18
- package/docs/api/interfaces/exposed_callbacks.Labels.md +2 -2
- package/docs/api/interfaces/exposed_callbacks.Price.md +2 -2
- package/docs/api/interfaces/roomle_configurator_api.RoomleEmbeddingApiKeys.md +4 -4
- package/docs/api/interfaces/types.ConfiguratorSettings.md +5 -5
- package/docs/api/interfaces/types.EmbeddingSkin.md +5 -5
- package/docs/api/interfaces/types.UiInitData.md +37 -71
- package/docs/api/modules/roomle_configurator_api.md +3 -3
- package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +12 -24
- package/package.json +2 -2
- package/roomle-configurator-api.cjs.js +33 -76
- package/roomle-configurator-api.cjs.min.js +1 -1
- package/roomle-configurator-api.es.js +33 -76
- package/roomle-configurator-api.es.min.js +1 -1
- package/roomle-configurator-api.js +33 -76
- package/types/index.d.ts +368 -280
- package/types/src/common/business-logic/event-bus.d.ts +5 -0
- package/types/src/{configurator → common}/components/collection-view/-utils/types.d.ts +3 -3
- package/types/src/common/store/collection-view-state.d.ts +3 -2
- package/types/src/common/store/index.d.ts +16 -5
- package/types/src/common/utils/helper.d.ts +0 -20
- package/types/src/common/utils/merge.d.ts +16 -0
- package/types/src/common/utils/parameters.d.ts +2 -2
- package/types/src/common/utils/share.d.ts +1 -0
- package/types/src/common/utils/touch-drag.d.ts +8 -9
- package/types/src/common/utils/types.d.ts +2 -0
- package/types/src/common/utils/variants.d.ts +3 -0
- package/types/src/configurator/components/grid-view/-utils/GridViewHelper.d.ts +3 -3
- package/types/src/configurator/embedding/roomle-configurator-api.d.ts +6 -6
- package/types/src/configurator/embedding/types.d.ts +8 -1
- package/types/src/configurator/store/ui-state.d.ts +14 -6
- package/types/src/planner/business-logic/pre-defined-rooms.d.ts +2 -0
- package/types/src/planner/business-logic/rooms.d.ts +12 -0
- package/types/src/planner/store/planner-core-data.d.ts +21 -0
- package/types/src/planner/store/planner-ui-state.d.ts +22 -7
- package/types/src/planner/utils/planner-sidebar.d.ts +21 -0
- package/types/tests/helpers/data/items.d.ts +90 -0
- package/types/tests/helpers/data/plan.d.ts +224 -0
- package/types/tests/helpers/mocks/store.d.ts +2 -1
- package/types/tests/integration/{configurator/components/overlays/part-list/PartListPrint.spec.d.ts → common/components/BottomButtons.spec.d.ts} +0 -0
- package/types/tests/integration/{configurator/components/overlays/part-list/PartListRow.spec.d.ts → common/components/IconButton.spec.d.ts} +0 -0
- package/types/tests/integration/common/components/part-list/part-list/PartListPrint.spec.d.ts +1 -0
- package/types/tests/integration/common/components/part-list/part-list/PartListRow.spec.d.ts +1 -0
- package/types/tests/integration/configurator/components/overlays/PartList.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/CatalogTrigger.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/ProductListButton.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/SampleRooms.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/SelectionPreview.spec.d.ts +1 -0
- package/types/tests/integration/planner/components/overlays/product-list/ProductListEntry.spec.d.ts +1 -0
- package/types/tests/unit/common/business-logic/event-bus.spec.d.ts +1 -0
package/types/index.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ declare module "common/utils/types" {
|
|
|
12
12
|
SHARE_AR = 301,
|
|
13
13
|
SAVE_DRAFT = 302
|
|
14
14
|
}
|
|
15
|
+
export type ToggleCallback = (isExpanded: boolean) => void;
|
|
16
|
+
export type CloseReason = 'toggle';
|
|
15
17
|
}
|
|
16
18
|
declare module "configurator/embedding/message-handler" {
|
|
17
19
|
import { Nullable } from "common/utils/types";
|
|
@@ -66,7 +68,11 @@ declare module "configurator/embedding/types" {
|
|
|
66
68
|
ROTATE = "rotate",
|
|
67
69
|
SNAPPING = "snapping",
|
|
68
70
|
UNDO = "undo",
|
|
69
|
-
REDO = "redo"
|
|
71
|
+
REDO = "redo",
|
|
72
|
+
PARTLIST_PLANNER = "partlist_planner",
|
|
73
|
+
PRODUCTLIST = "productlist",
|
|
74
|
+
TWO_D_VIEW = "2dview",
|
|
75
|
+
ADD_ROOM = "add_room"
|
|
70
76
|
}
|
|
71
77
|
interface FeatureFlags {
|
|
72
78
|
realPartList?: boolean;
|
|
@@ -93,6 +99,9 @@ declare module "configurator/embedding/types" {
|
|
|
93
99
|
[UI_BUTTON.SNAPPING]?: boolean;
|
|
94
100
|
[UI_BUTTON.UNDO]?: boolean;
|
|
95
101
|
[UI_BUTTON.REDO]?: boolean;
|
|
102
|
+
[UI_BUTTON.TWO_D_VIEW]?: boolean;
|
|
103
|
+
[UI_BUTTON.PARTLIST_PLANNER]?: boolean;
|
|
104
|
+
[UI_BUTTON.ADD_ROOM]?: boolean;
|
|
96
105
|
};
|
|
97
106
|
skin?: EmbeddingSkin;
|
|
98
107
|
zIndex?: number;
|
|
@@ -261,209 +270,9 @@ declare module "common/utils/iframe" {
|
|
|
261
270
|
export const useEmbeddingApi: () => boolean;
|
|
262
271
|
export const sameOrigin: () => boolean;
|
|
263
272
|
}
|
|
264
|
-
declare module "configurator/embedding/utils" {
|
|
265
|
-
import { RoomleEmbeddingApiKeys } from "configurator/embedding/roomle-configurator-api";
|
|
266
|
-
import { ConfiguratorSettings, UiInitData } from "configurator/embedding/types";
|
|
267
|
-
export const NAMESPACE: {
|
|
268
|
-
[key: string]: keyof RoomleEmbeddingApiKeys | 'callbacks';
|
|
269
|
-
};
|
|
270
|
-
export const NAMESPACE_SEPARATOR = ".";
|
|
271
|
-
export const SDK_CALLBACK: string;
|
|
272
|
-
export const HANDSHAKE_MESSAGES: {
|
|
273
|
-
REQUEST_BOOT: string;
|
|
274
|
-
SETUP: string;
|
|
275
|
-
WEBSITE_READY: string;
|
|
276
|
-
};
|
|
277
|
-
export const isExposable: (name: string) => boolean;
|
|
278
|
-
export const getMethodNames: (proto: any, namespace: string, isCallback?: boolean) => string[];
|
|
279
|
-
export const getConfiguratorSettings: (configuratorId: string, initData: UiInitData) => Promise<ConfiguratorSettings>;
|
|
280
|
-
}
|
|
281
|
-
declare module "common/utils/browser" {
|
|
282
|
-
import { Nullable } from "common/utils/types";
|
|
283
|
-
export const BROWSER_LANGUAGE_PROPERTY_KEYS_KNOWN: string[];
|
|
284
|
-
export const getLanguage: (lang?: Nullable<string>) => any;
|
|
285
|
-
}
|
|
286
|
-
declare module "configurator/business-logic/roomle-sdk-wrapper" {
|
|
287
|
-
import RapiAccess from '@roomle/web-sdk/lib/definitions/common-core/src/rapi-access';
|
|
288
|
-
import { GlbViewer } from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/glb-viewer';
|
|
289
|
-
import { Configurator } from '@roomle/web-sdk/lib/definitions/configurator-core/src/configurator';
|
|
290
|
-
import { Nullable } from "common/utils/types";
|
|
291
|
-
import { UiInitData } from "configurator/embedding/types";
|
|
292
|
-
import { GlobalInitDataDefinition } from '@roomle/web-sdk/lib/definitions/common-core/src/utils/shims';
|
|
293
|
-
import { Planner } from '@roomle/web-sdk/lib/definitions/planner-core/src/planner';
|
|
294
|
-
import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
295
|
-
/**
|
|
296
|
-
* We use this class in a plugin so we
|
|
297
|
-
* can rely on DI to change it during testing
|
|
298
|
-
*/
|
|
299
|
-
export class RoomleSdkWrapper {
|
|
300
|
-
private _configuratorInstance;
|
|
301
|
-
private _viewerInstance;
|
|
302
|
-
private _plannerInstance;
|
|
303
|
-
private _currentInstance;
|
|
304
|
-
get hasPlanner(): boolean;
|
|
305
|
-
getConfigurator(element: HTMLElement, initData?: UiInitData): Promise<Configurator>;
|
|
306
|
-
getGlbViewer(element: HTMLElement, initData?: UiInitData): Promise<GlbViewer>;
|
|
307
|
-
getPlanner(element: HTMLElement, initData?: UiInitData): Promise<Planner>;
|
|
308
|
-
getRapiAccess(): Promise<RapiAccess>;
|
|
309
|
-
getGlobalCallback(): Promise<GlobalCallback>;
|
|
310
|
-
setGlobalInitData(initData: Nullable<GlobalInitDataDefinition>): void;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
declare module "common/utils/init-data" {
|
|
314
|
-
import { ConfiguratorSettings, UiInitData } from "configurator/embedding/types";
|
|
315
|
-
import RapiAccess from '@roomle/web-sdk/lib/definitions/common-core/src/rapi-access';
|
|
316
|
-
import { Nullable } from "common/utils/types";
|
|
317
|
-
import type { MessageHandler } from "configurator/embedding/message-handler";
|
|
318
|
-
import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
|
|
319
|
-
export const CONFIGURATOR_IDLE = "(idle)";
|
|
320
|
-
export const getInitData: (useFallbackId?: boolean) => UiInitData;
|
|
321
|
-
export const castAndFixInitData: (initData: UiInitData) => UiInitData;
|
|
322
|
-
export const castInitData: (obj: {
|
|
323
|
-
[key: string]: any;
|
|
324
|
-
}) => void;
|
|
325
|
-
export const mergeInitData: (configuratorSettings: ConfiguratorSettings | {
|
|
326
|
-
id: string;
|
|
327
|
-
settings: UiInitData;
|
|
328
|
-
}, currentInitData: UiInitData) => UiInitData;
|
|
329
|
-
export const getEmbeddingInitData: (messageHandler: MessageHandler) => Promise<UiInitData>;
|
|
330
|
-
export const getRemoteInitData: (rapiAccess: RapiAccess, configuratorId: string) => Promise<UiInitData>;
|
|
331
|
-
export const getFallbackInitData: () => UiInitData;
|
|
332
|
-
export const LEGACY_SHARE_PLACEHOLDER = "<CONF_ID>";
|
|
333
|
-
export const SHARE_PLACEHOLDER = "#CONFIGURATIONID#";
|
|
334
|
-
/**
|
|
335
|
-
* combines init data in this order: query params > embedding > remote > fallback
|
|
336
|
-
*
|
|
337
|
-
* some exceptions to consider:
|
|
338
|
-
* - tenant: when do we need the tenant and where do we get it from?
|
|
339
|
-
*
|
|
340
|
-
* @param messageHandler
|
|
341
|
-
* @param sdkWrapper
|
|
342
|
-
* @param fallbackInitData
|
|
343
|
-
*/
|
|
344
|
-
export const combineInitData: (messageHandler: Nullable<MessageHandler>, sdkWrapper: RoomleSdkWrapper, queryParamsInitData: UiInitData) => Promise<UiInitData>;
|
|
345
|
-
export const setProperty: (o: {
|
|
346
|
-
[key: string]: any;
|
|
347
|
-
}, path: string, value: any) => void;
|
|
348
|
-
}
|
|
349
|
-
declare module "common/utils/user-agent" {
|
|
350
|
-
import { Nullable } from "common/utils/types";
|
|
351
|
-
export const isIOs: () => boolean;
|
|
352
|
-
export const hasARQuicklook: () => Nullable<boolean>;
|
|
353
|
-
export const isInAppBrowser: () => Nullable<boolean>;
|
|
354
|
-
export const isAndroid: () => boolean;
|
|
355
|
-
export const deviceSupportsAR: () => boolean;
|
|
356
|
-
}
|
|
357
|
-
declare module "common/utils/dom" {
|
|
358
|
-
import { Nullable } from "common/utils/types";
|
|
359
|
-
export const isScrolledToRightEnd: (element: Nullable<HTMLElement>, threshold?: number) => boolean;
|
|
360
|
-
export const hasVerticalOverflow: (element: HTMLElement) => boolean;
|
|
361
|
-
export const hasHorizontalOverflow: (element: HTMLElement) => boolean;
|
|
362
|
-
export const lastVisibleElement: (container: HTMLElement, threshold?: number) => Element;
|
|
363
|
-
export const cssVariableToNumber: (cssVariable: string) => number;
|
|
364
|
-
export const remToPixel: (remValue: string, remBase: number) => number;
|
|
365
|
-
export const percentInStringToFloat: (percentInString: string) => number;
|
|
366
|
-
export const animationDurationInMsToFloat: (animationDuration: string) => number;
|
|
367
|
-
export const calcIsDesktop: () => boolean;
|
|
368
|
-
export const removeLoadingScreen: () => Promise<void>;
|
|
369
|
-
export const showLoadingScreen: () => Promise<void>;
|
|
370
|
-
export const copyToClipboard: (text: string) => void;
|
|
371
|
-
export const setLoadingProgress: (percent: number) => void;
|
|
372
|
-
export const hideLoadingCircle: () => void;
|
|
373
|
-
}
|
|
374
|
-
declare module "common/utils/script-loader" {
|
|
375
|
-
export default class ScriptLoader {
|
|
376
|
-
static fetch(url: string, options: {
|
|
377
|
-
id: string;
|
|
378
|
-
}): Promise<void>;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
declare module "common/utils/google-analytics" {
|
|
382
|
-
import { Nullable } from "common/utils/types";
|
|
383
|
-
export const GA_DIMENSIONS: {
|
|
384
|
-
[key: string]: string;
|
|
385
|
-
};
|
|
386
|
-
export const GA_METRICS: {
|
|
387
|
-
RESPONSE_END_TIME: string;
|
|
388
|
-
DOM_LOAD_TIME: string;
|
|
389
|
-
WINDOW_LOAD_TIME: string;
|
|
390
|
-
TIME_TO_FIRST_BTYE: string;
|
|
391
|
-
KERNEL_IS_READY: string;
|
|
392
|
-
INIT_LOADING_SCREEN_CLOSE: string;
|
|
393
|
-
};
|
|
394
|
-
enum GA_ACTION_TYPE {
|
|
395
|
-
EXCEPTION = "exception",
|
|
396
|
-
TIMING = "timing_complete"
|
|
397
|
-
}
|
|
398
|
-
enum CUSTOM_ACTION_TYPE {
|
|
399
|
-
TRACK_TIMING = "track_timing"
|
|
400
|
-
}
|
|
401
|
-
export const GA_NULL_VALUE = "(not set)";
|
|
402
|
-
export enum GA_CATEGORY {
|
|
403
|
-
ERROR = "Error",
|
|
404
|
-
NAVIGATION_TIMING = "Navigation Timing",
|
|
405
|
-
TIMING = "Timing",
|
|
406
|
-
INTERACTION = "Interaction",
|
|
407
|
-
TRACKING = "Tracking",
|
|
408
|
-
DEPRECATION = "Deprecation"
|
|
409
|
-
}
|
|
410
|
-
export type GoogleAnalyticsCallback = (...args: any[]) => void;
|
|
411
|
-
export const MAX_QUEUE_LENGTH = 1500;
|
|
412
|
-
export default class GoogleAnalytics {
|
|
413
|
-
history: IArguments[];
|
|
414
|
-
private _settings;
|
|
415
|
-
private _queue;
|
|
416
|
-
private _trackingId;
|
|
417
|
-
private _useTracking;
|
|
418
|
-
private _callbacks;
|
|
419
|
-
private _gaReady;
|
|
420
|
-
private get _gtag();
|
|
421
|
-
constructor(configuratorId: string, useTracking?: boolean);
|
|
422
|
-
giveConsent(): void;
|
|
423
|
-
trackEvent(action: CUSTOM_ACTION_TYPE | GA_ACTION_TYPE | string, category: GA_CATEGORY, label: string, value?: Nullable<number>, fieldsObject?: object): void;
|
|
424
|
-
trackTiming(category: GA_CATEGORY, label: any, value: number, fieldsObject?: object): void;
|
|
425
|
-
setDimension(dimension: string, value: any): void;
|
|
426
|
-
setDimensions(dimensions: {
|
|
427
|
-
[key: string]: any;
|
|
428
|
-
}): void;
|
|
429
|
-
trackError(message: string, specialErrorName?: Nullable<string>): void;
|
|
430
|
-
trackContentError(message: string): void;
|
|
431
|
-
addCallback(listener: GoogleAnalyticsCallback): void;
|
|
432
|
-
removeUiCallback(listener: GoogleAnalyticsCallback): void;
|
|
433
|
-
cleanUpHistory(): void;
|
|
434
|
-
trackWrongDomain(): void;
|
|
435
|
-
trackNoActivePackage(): void;
|
|
436
|
-
private _execCommand;
|
|
437
|
-
private _loadLibScript;
|
|
438
|
-
private _send;
|
|
439
|
-
private _flushQueue;
|
|
440
|
-
private _setObjectProperties;
|
|
441
|
-
private _trackException;
|
|
442
|
-
private _trackErrors;
|
|
443
|
-
private _trackErrorEvent;
|
|
444
|
-
private _setSettings;
|
|
445
|
-
private _findDimension;
|
|
446
|
-
private _sendNavigationTimingMetrics;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
declare module "common/plugins/analytics" {
|
|
450
|
-
import GoogleAnalytics from "common/utils/google-analytics";
|
|
451
|
-
export interface Analytics {
|
|
452
|
-
ga: GoogleAnalytics;
|
|
453
|
-
}
|
|
454
|
-
const AnalyticsPlugin: {
|
|
455
|
-
install(Vue: any, { configuratorId, useTracking }: {
|
|
456
|
-
configuratorId: string;
|
|
457
|
-
useTracking: boolean;
|
|
458
|
-
}): void;
|
|
459
|
-
};
|
|
460
|
-
export default AnalyticsPlugin;
|
|
461
|
-
}
|
|
462
273
|
declare module "common/utils/helper" {
|
|
463
274
|
import { Nullable } from "common/utils/types";
|
|
464
275
|
import { RapiConfiguration, RapiItem, RapiTenant } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
465
|
-
import { Analytics } from "common/plugins/analytics";
|
|
466
|
-
import { SdkConnector } from "configurator/business-logic/sdk-connector";
|
|
467
276
|
export const throttle: <T extends (...args: any[]) => any>(func: T, delay?: number) => (...funcArgs: Parameters<T>) => void;
|
|
468
277
|
export const round: (float: number, precision: number) => number;
|
|
469
278
|
export const isIdAnItem: (id: string) => boolean;
|
|
@@ -492,22 +301,6 @@ declare module "common/utils/helper" {
|
|
|
492
301
|
export const deepCopy: <T>(o: T) => T;
|
|
493
302
|
export const toBoolean: (value: boolean | undefined, defaultValue?: boolean) => boolean;
|
|
494
303
|
export const wait: (delayInMs: number) => Promise<void>;
|
|
495
|
-
/**
|
|
496
|
-
* Recursively merge properties of two objects.
|
|
497
|
-
* If a property exists in both it, property of obj2 is used.
|
|
498
|
-
* Returns a new object (copy)
|
|
499
|
-
* @param obj1
|
|
500
|
-
* @param obj2
|
|
501
|
-
*/
|
|
502
|
-
export const deepMergeCopy: (obj1: any, obj2: any) => any;
|
|
503
|
-
/**
|
|
504
|
-
* Recursively merge properties of two objects.
|
|
505
|
-
* If a property exists in both it, property of obj2 is used.
|
|
506
|
-
* Warning: This returns obj1 and not a copy!
|
|
507
|
-
* @param obj1
|
|
508
|
-
* @param obj2
|
|
509
|
-
*/
|
|
510
|
-
export const deepMerge: (obj1: any, obj2: any) => any;
|
|
511
304
|
export const NAMES_FOR_LOCALHOST: string[];
|
|
512
305
|
export const getHostname: () => string | null;
|
|
513
306
|
export const isDemoHostname: (hostname: string) => boolean;
|
|
@@ -520,9 +313,7 @@ declare module "common/utils/helper" {
|
|
|
520
313
|
export const checkForActivePackage: (tenant: RapiTenant) => boolean;
|
|
521
314
|
export const oneTimeInterval: (callback: () => void, delay: number) => number;
|
|
522
315
|
export const runOnIdle: any;
|
|
523
|
-
export const createShareLinkFromUrl: (url: string) => string;
|
|
524
316
|
export const isLocationJestTest: () => boolean;
|
|
525
|
-
export const loadVariant: (id: string, applyCurrentGlobalParameters: boolean, sdkConnector: SdkConnector, analytics?: Analytics) => Promise<void>;
|
|
526
317
|
}
|
|
527
318
|
declare module "configurator/store/core-data" {
|
|
528
319
|
import { Module } from 'vuex';
|
|
@@ -560,22 +351,22 @@ declare module "configurator/store/core-data" {
|
|
|
560
351
|
}
|
|
561
352
|
export const coreData: Module<CoreData, StoreState>;
|
|
562
353
|
}
|
|
563
|
-
declare module "
|
|
354
|
+
declare module "common/components/collection-view/-utils/types" {
|
|
564
355
|
import { Nullable } from "common/utils/types";
|
|
565
356
|
import { UiPossibleChildTag, UiKernelParameter } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
566
357
|
import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
567
|
-
export type CollectionViewElementType = 'addon' | 'parameter' | 'variant' | 'object';
|
|
568
|
-
export interface CollectionViewElement {
|
|
358
|
+
export type CollectionViewElementType = 'addon' | 'parameter' | 'variant' | 'object' | 'room';
|
|
359
|
+
export interface CollectionViewElement<T = (UiPossibleChildTag | UiKernelParameter | RapiTagForUi)> {
|
|
569
360
|
label: Nullable<string>;
|
|
570
361
|
key: string;
|
|
571
|
-
payload:
|
|
362
|
+
payload: T;
|
|
572
363
|
type: CollectionViewElementType;
|
|
573
364
|
}
|
|
574
365
|
}
|
|
575
366
|
declare module "common/utils/parameters" {
|
|
576
|
-
import { RapiMaterial, RapiMaterialGroup,
|
|
367
|
+
import { RapiMaterial, RapiMaterialGroup, RapiTagForUi, RapiTexture } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
577
368
|
import { KernelPartListParameter, UiPossibleChildTag } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
578
|
-
import { CollectionViewElement } from "
|
|
369
|
+
import { CollectionViewElement } from "common/components/collection-view/-utils/types";
|
|
579
370
|
import { VariantsMap } from "configurator/embedding/types";
|
|
580
371
|
import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
581
372
|
export interface RapiMaterialEmbeddedTextures extends RapiMaterial {
|
|
@@ -655,10 +446,87 @@ declare module "common/store/common-ui-state" {
|
|
|
655
446
|
}
|
|
656
447
|
export const commonUiState: Module<CommonUiState, StoreState>;
|
|
657
448
|
}
|
|
449
|
+
declare module "planner/utils/planner-sidebar" {
|
|
450
|
+
import { KernelPartList, UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
451
|
+
import { Store } from 'vuex';
|
|
452
|
+
import { StoreState } from "common/store/index";
|
|
453
|
+
import { SdkConnector } from "configurator/business-logic/sdk-connector";
|
|
454
|
+
import { RapiConfiguration, RapiItem } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
455
|
+
export interface PlannerSidebarState {
|
|
456
|
+
welcome: boolean;
|
|
457
|
+
catalog: boolean;
|
|
458
|
+
productList: boolean;
|
|
459
|
+
partList: boolean;
|
|
460
|
+
sampleRooms: boolean;
|
|
461
|
+
selectionDetail: boolean;
|
|
462
|
+
mobileExpanded: boolean;
|
|
463
|
+
[key: string]: boolean;
|
|
464
|
+
}
|
|
465
|
+
export interface ProductListItem extends UiPlanObject {
|
|
466
|
+
quantity: number;
|
|
467
|
+
}
|
|
468
|
+
export const initialPlannerSidebarState: PlannerSidebarState;
|
|
469
|
+
export const matchProductListAndQuantity: (productList: UiPlanObject[]) => ProductListItem[];
|
|
470
|
+
export const fillPartList: (data: RapiItem | RapiConfiguration, partList: KernelPartList, hash: string, sdkConnector: SdkConnector, store: Store<StoreState>) => Promise<void>;
|
|
471
|
+
}
|
|
472
|
+
declare module "planner/store/planner-ui-state" {
|
|
473
|
+
import { Module } from 'vuex';
|
|
474
|
+
import { SharedUiState, StoreState } from "common/store/index";
|
|
475
|
+
import { Nullable } from "common/utils/types";
|
|
476
|
+
import { SelectionPayload } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner-ui-callback';
|
|
477
|
+
import { BUTTON_ACTIONS } from "configurator/store/ui-state";
|
|
478
|
+
import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
479
|
+
import { PlannerSidebarState } from "planner/utils/planner-sidebar";
|
|
480
|
+
import { KernelWall } from '@roomle/web-sdk/lib/definitions/typings/planner';
|
|
481
|
+
type SelectionType = 'static' | 'configuration';
|
|
482
|
+
export interface PlannerUiState extends SharedUiState {
|
|
483
|
+
selection: Nullable<SelectionType>;
|
|
484
|
+
selectionPayload: Nullable<SelectionPayload>;
|
|
485
|
+
isDrag: boolean;
|
|
486
|
+
catalogTags: Nullable<RapiTagForUi[]>;
|
|
487
|
+
actionMenuExpanded: boolean;
|
|
488
|
+
selectedActions: BUTTON_ACTIONS[];
|
|
489
|
+
stackViewStack: PlannerSidebarState[];
|
|
490
|
+
lastWalls: KernelWall[];
|
|
491
|
+
}
|
|
492
|
+
export enum PLANNER_UI_STATE_MUTATIONS {
|
|
493
|
+
SET_SELECTION_PAYLOAD = "PLANNER_UI_STATE_setSelectionPayload",
|
|
494
|
+
SET_SELECTION = "PLANNER_UI_STATE_setSelection",
|
|
495
|
+
SET_IS_LANDSCAPE = "PLANNER_UI_STATE_setIsLandscape",
|
|
496
|
+
SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_setInteractionsExpanded",
|
|
497
|
+
SET_IS_FULLSCREEN = "PLANNER_UI_STATE_setIsFullscreen",
|
|
498
|
+
SET_IS_DESKTOP = "PLANNER_UI_STATE_setIsDesktop",
|
|
499
|
+
SET_LAST_REGULAR_VIEW_MODE = "PLANNER_UI_STATE_SET_LAST_REGULAR_VIEW_MODE",
|
|
500
|
+
SET_CATALOG_ROOT_TAG = "PLANNER_UI_STATE_SET_CATALOG_ROOT_TAG",
|
|
501
|
+
SET_IS_DRAG = "SET_IS_DRAG",
|
|
502
|
+
SET_ACTION_SELECTED = "SET_ACTION_SELECTED",
|
|
503
|
+
SET_ACTION_DESELECTED = "SET_ACTION_DESELECTED",
|
|
504
|
+
SET_ACTION_MENU_EXPANDED = "SET_ACTION_MENU_EXPANDED",
|
|
505
|
+
SET_TOPBAR_ACTION_SELECTED = "SET_TOPBAR_ACTION_SELECTED",
|
|
506
|
+
SET_TOPBAR_ACTION_DESELECTED = "SET_TOPBAR_ACTION_DESELECTED",
|
|
507
|
+
PUSH_SIDEBAR_VIEW = "PUSH_SIDEBAR_VIEW",
|
|
508
|
+
POP_SIDEBAR_VIEW = "POP_SIDEBAR_VIEW",
|
|
509
|
+
CLEAR_SIDEBAR = "CLEAR_SIDEBAR",
|
|
510
|
+
SET_LAST_WALLS = "SET_LAST_WALLS"
|
|
511
|
+
}
|
|
512
|
+
export enum PLANNER_UI_STATE_ACTIONS {
|
|
513
|
+
SELECT_VIEW_MODE = "PLANNER_UI_STATE_SELECT_VIEW_MODE",
|
|
514
|
+
SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_SET_INTERACTIONS_EXPANDED",
|
|
515
|
+
DESELECT_SIDEBAR_ACTION_BUTTONS = "DESELECT_SIDEBAR_ACTION_BUTTONS"
|
|
516
|
+
}
|
|
517
|
+
export enum PLANNER_UI_STATE_GETTERS {
|
|
518
|
+
CATALOG_ROOT_TAG = "PLANNER_UI_STATE_CATALOG_ROOT_TAG",
|
|
519
|
+
SELECTED_ITEM_PAYLOAD = "PLANNER_UI_STATE_SELECTED_ITEM_PAYLOAD",
|
|
520
|
+
PART_LIST_PLANNER_SHOWN = "PART_LIST_PLANNER_SHOWN",
|
|
521
|
+
PRODUCT_LIST_SHOWN = "PRODUCT_LIST_SHOWN",
|
|
522
|
+
LAST_OF_STACK_VIEW_STACK = "LAST_OF_STACK_VIEW_STACK"
|
|
523
|
+
}
|
|
524
|
+
export const plannerUiState: Module<PlannerUiState, StoreState>;
|
|
525
|
+
}
|
|
658
526
|
declare module "common/store/collection-view-state" {
|
|
659
527
|
import { Module } from 'vuex';
|
|
660
528
|
import { Nullable } from "common/utils/types";
|
|
661
|
-
import { CollectionViewElement } from "
|
|
529
|
+
import { CollectionViewElement } from "common/components/collection-view/-utils/types";
|
|
662
530
|
import { StoreState } from "common/store/index";
|
|
663
531
|
export interface GridViewUiState {
|
|
664
532
|
filter: string[];
|
|
@@ -674,7 +542,8 @@ declare module "common/store/collection-view-state" {
|
|
|
674
542
|
export const getInitialCollectionViewState: () => CollectionViewUiState;
|
|
675
543
|
export enum COLLECTION_VIEW_STATE_MUTATIONS {
|
|
676
544
|
ELEMENT_EXPANDED = "CV_ELEMENT_EXPANDED",
|
|
677
|
-
SET_SELECTED_ELEMENT = "CV_SET_SELECTED_ELEMENT"
|
|
545
|
+
SET_SELECTED_ELEMENT = "CV_SET_SELECTED_ELEMENT",
|
|
546
|
+
RESET_COLLECTION_VIEW = "RESET_COLLECTION_VIEW"
|
|
678
547
|
}
|
|
679
548
|
export enum GRID_VIEW_STATE_MUTATIONS {
|
|
680
549
|
SET_SEARCH = "GV_SET_SEARCH",
|
|
@@ -694,9 +563,9 @@ declare module "configurator/components/grid-view/-utils/GridViewHelper" {
|
|
|
694
563
|
import { RapiItem, RapiMaterial } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
|
|
695
564
|
import { KernelValue, UiPossibleChild } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
696
565
|
import { Nullable } from "common/utils/types";
|
|
697
|
-
export interface GridViewElement {
|
|
566
|
+
export interface GridViewElement<T = (RapiMaterial | KernelValue | UiPossibleChild | RapiItem)> {
|
|
698
567
|
key: string;
|
|
699
|
-
payload:
|
|
568
|
+
payload: T;
|
|
700
569
|
}
|
|
701
570
|
export interface GridViewVariantElement extends GridViewElement {
|
|
702
571
|
hash: string;
|
|
@@ -706,7 +575,7 @@ declare module "configurator/components/grid-view/-utils/GridViewHelper" {
|
|
|
706
575
|
label: Nullable<string>;
|
|
707
576
|
elements: GridViewElement[];
|
|
708
577
|
}
|
|
709
|
-
export const toGridViewElements:
|
|
578
|
+
export const toGridViewElements: <T = RapiItem | RapiMaterial | UiPossibleChild | KernelValue>(elements: T[], key: string) => GridViewElement<T>[];
|
|
710
579
|
}
|
|
711
580
|
declare module "configurator/store/ui-state" {
|
|
712
581
|
import { Module } from 'vuex';
|
|
@@ -729,7 +598,11 @@ declare module "configurator/store/ui-state" {
|
|
|
729
598
|
ROTATE = 7,
|
|
730
599
|
SNAPPING = 8,
|
|
731
600
|
UNDO = 9,
|
|
732
|
-
REDO = 10
|
|
601
|
+
REDO = 10,
|
|
602
|
+
PARTLIST_PLANNER = 11,
|
|
603
|
+
PRODUCTLIST = 12,
|
|
604
|
+
TWO_D_VIEW = 13,
|
|
605
|
+
ADD_ROOM = 14
|
|
733
606
|
}
|
|
734
607
|
export interface SceneSelection {
|
|
735
608
|
selectionMode: string;
|
|
@@ -762,8 +635,6 @@ declare module "configurator/store/ui-state" {
|
|
|
762
635
|
export enum UI_STATE_MUTATIONS {
|
|
763
636
|
SET_SELECTED_GROUP = "setSelectedGroup",
|
|
764
637
|
SET_IS_DESKTOP = "setIsDesktop",
|
|
765
|
-
SET_ACTION_SELECTED = "setActionSelected",
|
|
766
|
-
SET_ACTION_DESELECTED = "setActionDeselected",
|
|
767
638
|
SET_INTERACTIONS_EXPANDED = "setInteractionsExpanded",
|
|
768
639
|
SET_IS_LANDSCAPE = "setIsLandscape",
|
|
769
640
|
SET_IS_PART_LIST_SHOWN = "SET_IS_PART_LIST_SHOWN",
|
|
@@ -786,7 +657,9 @@ declare module "configurator/store/ui-state" {
|
|
|
786
657
|
SET_UNDO = "SET_UNDO",
|
|
787
658
|
SET_REDO = "SET_REDO",
|
|
788
659
|
SET_UNDO_PLANNER = "SET_UNDO_PLANNER",
|
|
789
|
-
SET_REDO_PLANNER = "SET_REDO_PLANNER"
|
|
660
|
+
SET_REDO_PLANNER = "SET_REDO_PLANNER",
|
|
661
|
+
SET_TOPBAR_ACTION_SELECTED = "SET_TOPBAR_ACTION_SELECTED",
|
|
662
|
+
SET_TOPBAR_ACTION_DESELECTED = "SET_TOPBAR_ACTION_DESELECTED"
|
|
790
663
|
}
|
|
791
664
|
export enum UI_STATE_ACTIONS {
|
|
792
665
|
SELECT_GROUP = "SELECT_GROUP",
|
|
@@ -799,7 +672,8 @@ declare module "configurator/store/ui-state" {
|
|
|
799
672
|
USE_VIEWER = "USE_VIEWER",
|
|
800
673
|
USE_PLANNER = "USE_PLANNER",
|
|
801
674
|
USE_CONFIGURATOR = "USE_CONFIGURATOR",
|
|
802
|
-
SHOW_PARAMS = "SHOW_PARAMS"
|
|
675
|
+
SHOW_PARAMS = "SHOW_PARAMS",
|
|
676
|
+
SHOW_ROOMS = "SHOW_ROOMS"
|
|
803
677
|
}
|
|
804
678
|
export enum UI_STATE_GETTERS {
|
|
805
679
|
USE_REGULAR_LAYOUT = "USE_REGULAR_LAYOUT",
|
|
@@ -807,58 +681,46 @@ declare module "configurator/store/ui-state" {
|
|
|
807
681
|
COLLECTION_VIEW_ELEMENTS = "COLLECTION_VIEW_ELEMENTS",
|
|
808
682
|
COLLECTION_VIEW_ADDON_ELEMENTS = "COLLECTION_VIEW_ADDON_ELEMENTS",
|
|
809
683
|
COLLECTION_VIEW_VARIANTS = "COLLECTION_VIEW_VARIANTS",
|
|
810
|
-
SHOW_BACK_TO_WEBSITE = "SHOW_BACK_TO_WEBSITE"
|
|
684
|
+
SHOW_BACK_TO_WEBSITE = "SHOW_BACK_TO_WEBSITE",
|
|
685
|
+
PART_LIST_PLANNER_SHOWN = "PART_LIST_PLANNER_SHOWN",
|
|
686
|
+
PRODUCT_LIST_SHOWN = "PRODUCT_LIST_SHOWN",
|
|
687
|
+
SAMPLE_ROOMS_SHOWN = "SAMPLE_ROOMS_SHOWN"
|
|
811
688
|
}
|
|
812
689
|
export const initialState: UiState;
|
|
813
690
|
export const uiState: Module<UiState, StoreState>;
|
|
814
691
|
}
|
|
815
|
-
declare module "planner/store/planner-
|
|
816
|
-
import {
|
|
817
|
-
import { SharedUiState, StoreState } from "common/store/index";
|
|
692
|
+
declare module "planner/store/planner-core-data" {
|
|
693
|
+
import { StoreState } from "common/store/index";
|
|
818
694
|
import { Nullable } from "common/utils/types";
|
|
819
|
-
import {
|
|
820
|
-
import {
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
showCatalog: boolean;
|
|
826
|
-
isDrag: boolean;
|
|
827
|
-
catalogTags: Nullable<RapiTagForUi[]>;
|
|
828
|
-
actionMenuExpanded: boolean;
|
|
695
|
+
import { Module } from 'vuex';
|
|
696
|
+
import { ProductListItem } from "planner/utils/planner-sidebar";
|
|
697
|
+
export interface PlannerCoreData {
|
|
698
|
+
productList: ProductListItem[];
|
|
699
|
+
currencySymbol: string;
|
|
700
|
+
price: Nullable<number>;
|
|
829
701
|
}
|
|
830
|
-
export enum
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_setInteractionsExpanded",
|
|
835
|
-
SET_IS_FULLSCREEN = "PLANNER_UI_STATE_setIsFullscreen",
|
|
836
|
-
SET_IS_DESKTOP = "PLANNER_UI_STATE_setIsDesktop",
|
|
837
|
-
SET_LAST_REGULAR_VIEW_MODE = "PLANNER_UI_STATE_SET_LAST_REGULAR_VIEW_MODE",
|
|
838
|
-
SET_SHOW_CATALOG = "PLANNER_UI_STATE_SET_SHOW_CATALOG",
|
|
839
|
-
SET_CATALOG_ROOT_TAG = "PLANNER_UI_STATE_SET_CATALOG_ROOT_TAG",
|
|
840
|
-
SET_IS_DRAG = "SET_IS_DRAG",
|
|
841
|
-
SET_ACTION_SELECTED = "setActionSelected",
|
|
842
|
-
SET_ACTION_DESELECTED = "setActionDeselected",
|
|
843
|
-
SET_ACTION_MENU_EXPANDED = "setSelectionMenuExpanded"
|
|
702
|
+
export enum PLANNER_CORE_DATA_MUTATIONS {
|
|
703
|
+
UPDATE_PRODUCT_LIST = "UPDATE_PRODUCT_LIST",
|
|
704
|
+
UPDATE_PRICE_VALUE = "UPDATE_PRICE_VALUE",
|
|
705
|
+
UPDATE_CURRENCY_SYMBOL = "UPDATE_CURRENCY_SYMBOL"
|
|
844
706
|
}
|
|
845
|
-
export enum
|
|
846
|
-
|
|
847
|
-
SET_INTERACTIONS_EXPANDED = "PLANNER_UI_STATE_SET_INTERACTIONS_EXPANDED"
|
|
707
|
+
export enum PLANNER_CORE_DATA_ACTIONS {
|
|
708
|
+
UPDATE_PRICE = "UPDATE_PRICE"
|
|
848
709
|
}
|
|
849
|
-
export enum
|
|
850
|
-
|
|
710
|
+
export enum PLANNER_CORE_DATA_GETTERS {
|
|
711
|
+
CURRENT_PRICE = "CURRENT_PRICE"
|
|
851
712
|
}
|
|
852
|
-
export const
|
|
713
|
+
export const plannerCoreData: Module<PlannerCoreData, StoreState>;
|
|
853
714
|
}
|
|
854
715
|
declare module "common/store/index" {
|
|
855
716
|
import { CORE_STATE_ACTIONS, CORE_STATE_MUTATIONS, CoreState } from "configurator/store/core-state";
|
|
856
|
-
import {
|
|
717
|
+
import { CORE_DATA_MUTATIONS, CoreData } from "configurator/store/core-data";
|
|
857
718
|
import { BUTTON_ACTIONS, UI_STATE_ACTIONS, UI_STATE_MUTATIONS, UiState } from "configurator/store/ui-state";
|
|
858
719
|
import { PLANNER_UI_STATE_MUTATIONS, PlannerUiState } from "planner/store/planner-ui-state";
|
|
859
720
|
import { COMMON_UI_STATE_MUTATIONS, CommonUiState } from "common/store/common-ui-state";
|
|
860
721
|
import { COLLECTION_VIEW_STATE_MUTATIONS, CollectionViewUiState } from "common/store/collection-view-state";
|
|
861
722
|
import { Nullable } from "common/utils/types";
|
|
723
|
+
import { PLANNER_CORE_DATA_ACTIONS, PLANNER_CORE_DATA_MUTATIONS, PlannerCoreData } from "planner/store/planner-core-data";
|
|
862
724
|
export interface SharedUiState {
|
|
863
725
|
interactionsExpanded: boolean;
|
|
864
726
|
isFullscreen: boolean;
|
|
@@ -867,11 +729,15 @@ declare module "common/store/index" {
|
|
|
867
729
|
lastRegularViewMode: Nullable<boolean>;
|
|
868
730
|
wasDesktopBefore: boolean;
|
|
869
731
|
sidebar: CollectionViewUiState;
|
|
870
|
-
|
|
732
|
+
topBarSelectedActions: BUTTON_ACTIONS[];
|
|
871
733
|
}
|
|
872
734
|
export const MUTATIONS: {
|
|
735
|
+
UPDATE_PRODUCT_LIST: PLANNER_CORE_DATA_MUTATIONS.UPDATE_PRODUCT_LIST;
|
|
736
|
+
UPDATE_PRICE_VALUE: PLANNER_CORE_DATA_MUTATIONS.UPDATE_PRICE_VALUE;
|
|
737
|
+
UPDATE_CURRENCY_SYMBOL: PLANNER_CORE_DATA_MUTATIONS.UPDATE_CURRENCY_SYMBOL;
|
|
873
738
|
ELEMENT_EXPANDED: COLLECTION_VIEW_STATE_MUTATIONS.ELEMENT_EXPANDED;
|
|
874
739
|
SET_SELECTED_ELEMENT: COLLECTION_VIEW_STATE_MUTATIONS.SET_SELECTED_ELEMENT;
|
|
740
|
+
RESET_COLLECTION_VIEW: COLLECTION_VIEW_STATE_MUTATIONS.RESET_COLLECTION_VIEW;
|
|
875
741
|
SET_IS_IN_IFRAME: COMMON_UI_STATE_MUTATIONS.SET_IS_IN_IFRAME;
|
|
876
742
|
SET_IS_VIEW_ONLY: COMMON_UI_STATE_MUTATIONS.SET_IS_VIEW_ONLY;
|
|
877
743
|
SET_LAST_REQUESTED_ID: COMMON_UI_STATE_MUTATIONS.SET_LAST_REQUESTED_ID;
|
|
@@ -882,12 +748,17 @@ declare module "common/store/index" {
|
|
|
882
748
|
SET_IS_FULLSCREEN: PLANNER_UI_STATE_MUTATIONS.SET_IS_FULLSCREEN;
|
|
883
749
|
SET_IS_DESKTOP: PLANNER_UI_STATE_MUTATIONS.SET_IS_DESKTOP;
|
|
884
750
|
SET_LAST_REGULAR_VIEW_MODE: PLANNER_UI_STATE_MUTATIONS.SET_LAST_REGULAR_VIEW_MODE;
|
|
885
|
-
SET_SHOW_CATALOG: PLANNER_UI_STATE_MUTATIONS.SET_SHOW_CATALOG;
|
|
886
751
|
SET_CATALOG_ROOT_TAG: PLANNER_UI_STATE_MUTATIONS.SET_CATALOG_ROOT_TAG;
|
|
887
752
|
SET_IS_DRAG: PLANNER_UI_STATE_MUTATIONS.SET_IS_DRAG;
|
|
888
753
|
SET_ACTION_SELECTED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_SELECTED;
|
|
889
754
|
SET_ACTION_DESELECTED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_DESELECTED;
|
|
890
755
|
SET_ACTION_MENU_EXPANDED: PLANNER_UI_STATE_MUTATIONS.SET_ACTION_MENU_EXPANDED;
|
|
756
|
+
SET_TOPBAR_ACTION_SELECTED: PLANNER_UI_STATE_MUTATIONS.SET_TOPBAR_ACTION_SELECTED;
|
|
757
|
+
SET_TOPBAR_ACTION_DESELECTED: PLANNER_UI_STATE_MUTATIONS.SET_TOPBAR_ACTION_DESELECTED;
|
|
758
|
+
PUSH_SIDEBAR_VIEW: PLANNER_UI_STATE_MUTATIONS.PUSH_SIDEBAR_VIEW;
|
|
759
|
+
POP_SIDEBAR_VIEW: PLANNER_UI_STATE_MUTATIONS.POP_SIDEBAR_VIEW;
|
|
760
|
+
CLEAR_SIDEBAR: PLANNER_UI_STATE_MUTATIONS.CLEAR_SIDEBAR;
|
|
761
|
+
SET_LAST_WALLS: PLANNER_UI_STATE_MUTATIONS.SET_LAST_WALLS;
|
|
891
762
|
SET_SELECTED_GROUP: UI_STATE_MUTATIONS.SET_SELECTED_GROUP;
|
|
892
763
|
SET_IS_PART_LIST_SHOWN: UI_STATE_MUTATIONS.SET_IS_PART_LIST_SHOWN;
|
|
893
764
|
SHOW_ONLY_ADDONS: UI_STATE_MUTATIONS.SHOW_ONLY_ADDONS;
|
|
@@ -914,7 +785,6 @@ declare module "common/store/index" {
|
|
|
914
785
|
UPDATE_PART_LIST: CORE_DATA_MUTATIONS.UPDATE_PART_LIST;
|
|
915
786
|
UPDATE_BOUNDS: CORE_DATA_MUTATIONS.UPDATE_BOUNDS;
|
|
916
787
|
UPDATE_CURRENCY: CORE_DATA_MUTATIONS.UPDATE_CURRENCY;
|
|
917
|
-
UPDATE_PRICE_VALUE: CORE_DATA_MUTATIONS.UPDATE_PRICE_VALUE;
|
|
918
788
|
SET_LABEL: CORE_STATE_MUTATIONS.SET_LABEL;
|
|
919
789
|
SET_COMPONENT_HAS_CHILDREN: CORE_STATE_MUTATIONS.SET_COMPONENT_HAS_CHILDREN;
|
|
920
790
|
SET_CATALOG_LABEL: CORE_STATE_MUTATIONS.SET_CATALOG_LABEL;
|
|
@@ -922,6 +792,7 @@ declare module "common/store/index" {
|
|
|
922
792
|
SET_CURRENT_HASH: CORE_STATE_MUTATIONS.SET_CURRENT_HASH;
|
|
923
793
|
};
|
|
924
794
|
export const ACTIONS: {
|
|
795
|
+
UPDATE_PRICE: PLANNER_CORE_DATA_ACTIONS.UPDATE_PRICE;
|
|
925
796
|
SELECT_GROUP: UI_STATE_ACTIONS.SELECT_GROUP;
|
|
926
797
|
SELECT_VIEW_MODE: UI_STATE_ACTIONS.SELECT_VIEW_MODE;
|
|
927
798
|
SET_INTERACTIONS_EXPANDED: UI_STATE_ACTIONS.SET_INTERACTIONS_EXPANDED;
|
|
@@ -933,7 +804,7 @@ declare module "common/store/index" {
|
|
|
933
804
|
USE_PLANNER: UI_STATE_ACTIONS.USE_PLANNER;
|
|
934
805
|
USE_CONFIGURATOR: UI_STATE_ACTIONS.USE_CONFIGURATOR;
|
|
935
806
|
SHOW_PARAMS: UI_STATE_ACTIONS.SHOW_PARAMS;
|
|
936
|
-
|
|
807
|
+
SHOW_ROOMS: UI_STATE_ACTIONS.SHOW_ROOMS;
|
|
937
808
|
SET_LABEL: CORE_STATE_ACTIONS.SET_LABEL;
|
|
938
809
|
SET_COMPONENT_HAS_CHILDREN: CORE_STATE_ACTIONS.SET_COMPONENT_HAS_CHILDREN;
|
|
939
810
|
UPDATE_HASH: CORE_STATE_ACTIONS.UPDATE_HASH;
|
|
@@ -943,15 +814,173 @@ declare module "common/store/index" {
|
|
|
943
814
|
coreData: CoreData;
|
|
944
815
|
uiState: UiState;
|
|
945
816
|
plannerUiState: PlannerUiState;
|
|
817
|
+
plannerCoreData: PlannerCoreData;
|
|
946
818
|
commonUiState: CommonUiState;
|
|
947
819
|
}
|
|
948
820
|
const _default: import("vuex").Store<StoreState>;
|
|
949
821
|
export default _default;
|
|
950
822
|
}
|
|
823
|
+
declare module "common/utils/user-agent" {
|
|
824
|
+
import { Nullable } from "common/utils/types";
|
|
825
|
+
export const isIOs: () => boolean;
|
|
826
|
+
export const hasARQuicklook: () => Nullable<boolean>;
|
|
827
|
+
export const isInAppBrowser: () => Nullable<boolean>;
|
|
828
|
+
export const isAndroid: () => boolean;
|
|
829
|
+
export const deviceSupportsAR: () => boolean;
|
|
830
|
+
}
|
|
831
|
+
declare module "common/utils/dom" {
|
|
832
|
+
import { Nullable } from "common/utils/types";
|
|
833
|
+
export const isScrolledToRightEnd: (element: Nullable<HTMLElement>, threshold?: number) => boolean;
|
|
834
|
+
export const hasVerticalOverflow: (element: HTMLElement) => boolean;
|
|
835
|
+
export const hasHorizontalOverflow: (element: HTMLElement) => boolean;
|
|
836
|
+
export const lastVisibleElement: (container: HTMLElement, threshold?: number) => Element;
|
|
837
|
+
export const cssVariableToNumber: (cssVariable: string) => number;
|
|
838
|
+
export const remToPixel: (remValue: string, remBase: number) => number;
|
|
839
|
+
export const percentInStringToFloat: (percentInString: string) => number;
|
|
840
|
+
export const animationDurationInMsToFloat: (animationDuration: string) => number;
|
|
841
|
+
export const calcIsDesktop: () => boolean;
|
|
842
|
+
export const removeLoadingScreen: () => Promise<void>;
|
|
843
|
+
export const showLoadingScreen: () => Promise<void>;
|
|
844
|
+
export const copyToClipboard: (text: string) => void;
|
|
845
|
+
export const setLoadingProgress: (percent: number) => void;
|
|
846
|
+
export const hideLoadingCircle: () => void;
|
|
847
|
+
}
|
|
848
|
+
declare module "common/utils/script-loader" {
|
|
849
|
+
export default class ScriptLoader {
|
|
850
|
+
static fetch(url: string, options: {
|
|
851
|
+
id: string;
|
|
852
|
+
}): Promise<void>;
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
declare module "common/utils/google-analytics" {
|
|
856
|
+
import { Nullable } from "common/utils/types";
|
|
857
|
+
export const GA_DIMENSIONS: {
|
|
858
|
+
[key: string]: string;
|
|
859
|
+
};
|
|
860
|
+
export const GA_METRICS: {
|
|
861
|
+
RESPONSE_END_TIME: string;
|
|
862
|
+
DOM_LOAD_TIME: string;
|
|
863
|
+
WINDOW_LOAD_TIME: string;
|
|
864
|
+
TIME_TO_FIRST_BTYE: string;
|
|
865
|
+
KERNEL_IS_READY: string;
|
|
866
|
+
INIT_LOADING_SCREEN_CLOSE: string;
|
|
867
|
+
};
|
|
868
|
+
enum GA_ACTION_TYPE {
|
|
869
|
+
EXCEPTION = "exception",
|
|
870
|
+
TIMING = "timing_complete"
|
|
871
|
+
}
|
|
872
|
+
enum CUSTOM_ACTION_TYPE {
|
|
873
|
+
TRACK_TIMING = "track_timing"
|
|
874
|
+
}
|
|
875
|
+
export const GA_NULL_VALUE = "(not set)";
|
|
876
|
+
export enum GA_CATEGORY {
|
|
877
|
+
ERROR = "Error",
|
|
878
|
+
NAVIGATION_TIMING = "Navigation Timing",
|
|
879
|
+
TIMING = "Timing",
|
|
880
|
+
INTERACTION = "Interaction",
|
|
881
|
+
TRACKING = "Tracking",
|
|
882
|
+
DEPRECATION = "Deprecation"
|
|
883
|
+
}
|
|
884
|
+
export type GoogleAnalyticsCallback = (...args: any[]) => void;
|
|
885
|
+
export const MAX_QUEUE_LENGTH = 1500;
|
|
886
|
+
export default class GoogleAnalytics {
|
|
887
|
+
history: IArguments[];
|
|
888
|
+
private _settings;
|
|
889
|
+
private _queue;
|
|
890
|
+
private _trackingId;
|
|
891
|
+
private _useTracking;
|
|
892
|
+
private _callbacks;
|
|
893
|
+
private _gaReady;
|
|
894
|
+
private get _gtag();
|
|
895
|
+
constructor(configuratorId: string, useTracking?: boolean);
|
|
896
|
+
giveConsent(): void;
|
|
897
|
+
trackEvent(action: CUSTOM_ACTION_TYPE | GA_ACTION_TYPE | string, category: GA_CATEGORY, label: string, value?: Nullable<number>, fieldsObject?: object): void;
|
|
898
|
+
trackTiming(category: GA_CATEGORY, label: any, value: number, fieldsObject?: object): void;
|
|
899
|
+
setDimension(dimension: string, value: any): void;
|
|
900
|
+
setDimensions(dimensions: {
|
|
901
|
+
[key: string]: any;
|
|
902
|
+
}): void;
|
|
903
|
+
trackError(message: string, specialErrorName?: Nullable<string>): void;
|
|
904
|
+
trackContentError(message: string): void;
|
|
905
|
+
addCallback(listener: GoogleAnalyticsCallback): void;
|
|
906
|
+
removeUiCallback(listener: GoogleAnalyticsCallback): void;
|
|
907
|
+
cleanUpHistory(): void;
|
|
908
|
+
trackWrongDomain(): void;
|
|
909
|
+
trackNoActivePackage(): void;
|
|
910
|
+
private _execCommand;
|
|
911
|
+
private _loadLibScript;
|
|
912
|
+
private _send;
|
|
913
|
+
private _flushQueue;
|
|
914
|
+
private _setObjectProperties;
|
|
915
|
+
private _trackException;
|
|
916
|
+
private _trackErrors;
|
|
917
|
+
private _trackErrorEvent;
|
|
918
|
+
private _setSettings;
|
|
919
|
+
private _findDimension;
|
|
920
|
+
private _sendNavigationTimingMetrics;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
declare module "common/plugins/analytics" {
|
|
924
|
+
import GoogleAnalytics from "common/utils/google-analytics";
|
|
925
|
+
export interface Analytics {
|
|
926
|
+
ga: GoogleAnalytics;
|
|
927
|
+
}
|
|
928
|
+
const AnalyticsPlugin: {
|
|
929
|
+
install(Vue: any, { configuratorId, useTracking }: {
|
|
930
|
+
configuratorId: string;
|
|
931
|
+
useTracking: boolean;
|
|
932
|
+
}): void;
|
|
933
|
+
};
|
|
934
|
+
export default AnalyticsPlugin;
|
|
935
|
+
}
|
|
936
|
+
declare module "configurator/business-logic/roomle-sdk-wrapper" {
|
|
937
|
+
import RapiAccess from '@roomle/web-sdk/lib/definitions/common-core/src/rapi-access';
|
|
938
|
+
import { GlbViewer } from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/glb-viewer';
|
|
939
|
+
import { Configurator } from '@roomle/web-sdk/lib/definitions/configurator-core/src/configurator';
|
|
940
|
+
import { Nullable } from "common/utils/types";
|
|
941
|
+
import { UiInitData } from "configurator/embedding/types";
|
|
942
|
+
import { GlobalInitDataDefinition } from '@roomle/web-sdk/lib/definitions/common-core/src/utils/shims';
|
|
943
|
+
import { Planner } from '@roomle/web-sdk/lib/definitions/planner-core/src/planner';
|
|
944
|
+
import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
945
|
+
/**
|
|
946
|
+
* We use this class in a plugin so we
|
|
947
|
+
* can rely on DI to change it during testing
|
|
948
|
+
*/
|
|
949
|
+
export class RoomleSdkWrapper {
|
|
950
|
+
private _configuratorInstance;
|
|
951
|
+
private _viewerInstance;
|
|
952
|
+
private _plannerInstance;
|
|
953
|
+
private _currentInstance;
|
|
954
|
+
get hasPlanner(): boolean;
|
|
955
|
+
getConfigurator(element: HTMLElement, initData?: UiInitData): Promise<Configurator>;
|
|
956
|
+
getGlbViewer(element: HTMLElement, initData?: UiInitData): Promise<GlbViewer>;
|
|
957
|
+
getPlanner(element: HTMLElement, initData?: UiInitData): Promise<Planner>;
|
|
958
|
+
getRapiAccess(): Promise<RapiAccess>;
|
|
959
|
+
getGlobalCallback(): Promise<GlobalCallback>;
|
|
960
|
+
setGlobalInitData(initData: Nullable<GlobalInitDataDefinition>): void;
|
|
961
|
+
}
|
|
962
|
+
}
|
|
951
963
|
declare module "common/utils/performance" {
|
|
952
964
|
export const addLoadMark: () => void;
|
|
953
965
|
export const calcTiming: () => void;
|
|
954
966
|
}
|
|
967
|
+
declare module "configurator/embedding/utils" {
|
|
968
|
+
import { RoomleEmbeddingApiKeys } from "configurator/embedding/roomle-configurator-api";
|
|
969
|
+
import { ConfiguratorSettings, UiInitData } from "configurator/embedding/types";
|
|
970
|
+
export const NAMESPACE: {
|
|
971
|
+
[key: string]: keyof RoomleEmbeddingApiKeys | 'callbacks';
|
|
972
|
+
};
|
|
973
|
+
export const NAMESPACE_SEPARATOR = ".";
|
|
974
|
+
export const SDK_CALLBACK: string;
|
|
975
|
+
export const HANDSHAKE_MESSAGES: {
|
|
976
|
+
REQUEST_BOOT: string;
|
|
977
|
+
SETUP: string;
|
|
978
|
+
WEBSITE_READY: string;
|
|
979
|
+
};
|
|
980
|
+
export const isExposable: (name: string) => boolean;
|
|
981
|
+
export const getMethodNames: (proto: any, namespace: string, isCallback?: boolean) => string[];
|
|
982
|
+
export const getConfiguratorSettings: (configuratorId: string, initData: UiInitData) => Promise<ConfiguratorSettings>;
|
|
983
|
+
}
|
|
955
984
|
declare module "configurator/business-logic/ui-callback" {
|
|
956
985
|
import { KernelComponent } from '@roomle/web-sdk/lib/definitions/typings/kernel';
|
|
957
986
|
export class UiCallbacks {
|
|
@@ -1287,15 +1316,74 @@ declare module "configurator/embedding/exposed-api" {
|
|
|
1287
1316
|
private _forwardSdkCallbacks;
|
|
1288
1317
|
}
|
|
1289
1318
|
}
|
|
1319
|
+
declare module "common/utils/merge" {
|
|
1320
|
+
/**
|
|
1321
|
+
* Recursively merge properties of two objects.
|
|
1322
|
+
* If a property exists in both it, property of obj2 is used.
|
|
1323
|
+
* Returns a new object (copy)
|
|
1324
|
+
* @param obj1
|
|
1325
|
+
* @param obj2
|
|
1326
|
+
*/
|
|
1327
|
+
export const deepMergeCopy: (obj1: any, obj2: any) => any;
|
|
1328
|
+
/**
|
|
1329
|
+
* Recursively merge properties of two objects.
|
|
1330
|
+
* If a property exists in both it, property of obj2 is used.
|
|
1331
|
+
* Warning: This returns obj1 and not a copy!
|
|
1332
|
+
* @param obj1
|
|
1333
|
+
* @param obj2
|
|
1334
|
+
*/
|
|
1335
|
+
export const deepMerge: (obj1: any, obj2: any) => any;
|
|
1336
|
+
}
|
|
1337
|
+
declare module "common/utils/browser" {
|
|
1338
|
+
import { Nullable } from "common/utils/types";
|
|
1339
|
+
export const BROWSER_LANGUAGE_PROPERTY_KEYS_KNOWN: string[];
|
|
1340
|
+
export const getLanguage: (lang?: Nullable<string>) => any;
|
|
1341
|
+
}
|
|
1342
|
+
declare module "common/utils/init-data" {
|
|
1343
|
+
import { ConfiguratorSettings, UiInitData } from "configurator/embedding/types";
|
|
1344
|
+
import RapiAccess from '@roomle/web-sdk/lib/definitions/common-core/src/rapi-access';
|
|
1345
|
+
import { Nullable } from "common/utils/types";
|
|
1346
|
+
import type { MessageHandler } from "configurator/embedding/message-handler";
|
|
1347
|
+
import { RoomleSdkWrapper } from "configurator/business-logic/roomle-sdk-wrapper";
|
|
1348
|
+
export const CONFIGURATOR_IDLE = "(idle)";
|
|
1349
|
+
export const getInitData: (useFallbackId?: boolean) => UiInitData;
|
|
1350
|
+
export const castAndFixInitData: (initData: UiInitData) => UiInitData;
|
|
1351
|
+
export const castInitData: (obj: {
|
|
1352
|
+
[key: string]: any;
|
|
1353
|
+
}) => void;
|
|
1354
|
+
export const mergeInitData: (configuratorSettings: ConfiguratorSettings | {
|
|
1355
|
+
id: string;
|
|
1356
|
+
settings: UiInitData;
|
|
1357
|
+
}, currentInitData: UiInitData) => UiInitData;
|
|
1358
|
+
export const getEmbeddingInitData: (messageHandler: MessageHandler) => Promise<UiInitData>;
|
|
1359
|
+
export const getRemoteInitData: (rapiAccess: RapiAccess, configuratorId: string) => Promise<UiInitData>;
|
|
1360
|
+
export const getFallbackInitData: () => UiInitData;
|
|
1361
|
+
export const LEGACY_SHARE_PLACEHOLDER = "<CONF_ID>";
|
|
1362
|
+
export const SHARE_PLACEHOLDER = "#CONFIGURATIONID#";
|
|
1363
|
+
/**
|
|
1364
|
+
* combines init data in this order: query params > embedding > remote > fallback
|
|
1365
|
+
*
|
|
1366
|
+
* some exceptions to consider:
|
|
1367
|
+
* - tenant: when do we need the tenant and where do we get it from?
|
|
1368
|
+
*
|
|
1369
|
+
* @param messageHandler
|
|
1370
|
+
* @param sdkWrapper
|
|
1371
|
+
* @param fallbackInitData
|
|
1372
|
+
*/
|
|
1373
|
+
export const combineInitData: (messageHandler: Nullable<MessageHandler>, sdkWrapper: RoomleSdkWrapper, queryParamsInitData: UiInitData) => Promise<UiInitData>;
|
|
1374
|
+
export const setProperty: (o: {
|
|
1375
|
+
[key: string]: any;
|
|
1376
|
+
}, path: string, value: any) => void;
|
|
1377
|
+
}
|
|
1290
1378
|
declare module "configurator/embedding/roomle-configurator-api" {
|
|
1291
1379
|
import type { ExposedApi } from "configurator/embedding/exposed-api";
|
|
1292
1380
|
import type { UiInitData } from "configurator/embedding/types";
|
|
1293
|
-
import ConfiguratorUiCallbacks from '@roomle/web-sdk/lib/definitions/configurator-core/src/services/configurator-ui-callback';
|
|
1294
|
-
import RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
1295
|
-
import { ExposedAnalyticsCallbacks } from "configurator/embedding/exposed-analytics-callbacks";
|
|
1296
|
-
import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
|
|
1297
|
-
import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
1298
|
-
import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
1381
|
+
import type ConfiguratorUiCallbacks from '@roomle/web-sdk/lib/definitions/configurator-core/src/services/configurator-ui-callback';
|
|
1382
|
+
import type RoomleConfigurator from '@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator';
|
|
1383
|
+
import type { ExposedAnalyticsCallbacks } from "configurator/embedding/exposed-analytics-callbacks";
|
|
1384
|
+
import type RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
|
|
1385
|
+
import type RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
|
|
1386
|
+
import type { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
|
|
1299
1387
|
export interface RoomleEmbeddingApiKeys {
|
|
1300
1388
|
extended: any;
|
|
1301
1389
|
ui: any;
|