@roomle/embedding-lib 4.24.1-alpha.2 → 4.25.0-alpha.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 (37) hide show
  1. package/docs/api/README.md +1 -1
  2. package/docs/api/classes/exposed_analytics_callbacks.ExposedAnalyticsCallbacks.md +1 -1
  3. package/docs/api/classes/exposed_api.ExposedApi.md +38 -10
  4. package/docs/api/classes/exposed_callbacks.ExposedCallbacks.md +7 -7
  5. package/docs/api/classes/roomle_configurator_api.default.md +9 -9
  6. package/docs/api/enums/types.UI_BUTTON.md +48 -15
  7. package/docs/api/interfaces/exposed_callbacks.Labels.md +2 -2
  8. package/docs/api/interfaces/exposed_callbacks.Price.md +2 -2
  9. package/docs/api/interfaces/roomle_configurator_api.RoomleEmbeddingApiKeys.md +4 -4
  10. package/docs/api/interfaces/types.ConfiguratorSettings.md +5 -5
  11. package/docs/api/interfaces/types.EmbeddingSkin.md +5 -5
  12. package/docs/api/interfaces/types.UiInitData.md +58 -37
  13. package/docs/api/modules/roomle_configurator_api.md +3 -3
  14. package/docs/index.md +31 -0
  15. package/docs/md/web/ui/EMBEDDING-CHANGELOG.md +65 -9
  16. package/package.json +28 -1
  17. package/roomle-configurator-api.cjs.js +48 -4
  18. package/roomle-configurator-api.cjs.min.js +1 -1
  19. package/roomle-configurator-api.es.js +48 -4
  20. package/roomle-configurator-api.es.min.js +1 -1
  21. package/roomle-configurator-api.js +48 -4
  22. package/types/index.d.ts +190 -129
  23. package/types/src/common/store/collection-view-state.d.ts +2 -2
  24. package/types/src/common/store/index.d.ts +6 -0
  25. package/types/src/common/utils/helper.d.ts +3 -0
  26. package/types/src/common/utils/types.d.ts +3 -2
  27. package/types/src/configurator/business-logic/sdk-connector.d.ts +1 -0
  28. package/types/src/configurator/components/-utils/overlays.d.ts +8 -8
  29. package/types/src/configurator/components/grid-view/-utils/GridViewHelper.d.ts +3 -0
  30. package/types/src/configurator/embedding/exposed-api.d.ts +10 -0
  31. package/types/src/configurator/embedding/types.d.ts +7 -1
  32. package/types/src/configurator/store/ui-state.d.ts +19 -3
  33. package/types/tests/helpers/data/variants.d.ts +60 -0
  34. package/types/tests/helpers/mocks/sdk-connector-planner.d.ts +13 -0
  35. package/types/tests/helpers/mocks/sdk-connector.d.ts +5 -0
  36. package/types/tests/integration/configurator/components/{overlays/PartList.spec.d.ts → parameters/types/ProductVariant.spec.d.ts} +0 -0
  37. package/types/tests/integration/planner/components/BottomBar.spec.d.ts +1 -0
package/types/index.d.ts CHANGED
@@ -7,9 +7,10 @@ declare module "common/utils/types" {
7
7
  export const enum USER_ACTION_MODULE {
8
8
  CONFIGURATOR = 3
9
9
  }
10
- export const enum USER_ACTION {
10
+ export enum USER_ACTION {
11
11
  CONVERSION = 11,
12
- SHARE_AR = 301
12
+ SHARE_AR = 301,
13
+ SAVE_DRAFT = 302
13
14
  }
14
15
  }
15
16
  declare module "configurator/embedding/message-handler" {
@@ -62,7 +63,10 @@ declare module "configurator/embedding/types" {
62
63
  STARTCONFIGURE = "startconfigure",
63
64
  PAUSECONFIGURE = "pauseconfigure",
64
65
  EXPORT_3D = "export3d",
65
- ROTATE = "rotate"
66
+ ROTATE = "rotate",
67
+ SNAPPING = "snapping",
68
+ UNDO = "undo",
69
+ REDO = "redo"
66
70
  }
67
71
  interface FeatureFlags {
68
72
  realPartList?: boolean;
@@ -86,6 +90,9 @@ declare module "configurator/embedding/types" {
86
90
  [UI_BUTTON.STARTCONFIGURE]?: boolean;
87
91
  [UI_BUTTON.PAUSECONFIGURE]?: boolean;
88
92
  [UI_BUTTON.EXPORT_3D]?: boolean;
93
+ [UI_BUTTON.SNAPPING]?: boolean;
94
+ [UI_BUTTON.UNDO]?: boolean;
95
+ [UI_BUTTON.REDO]?: boolean;
89
96
  };
90
97
  skin?: EmbeddingSkin;
91
98
  zIndex?: number;
@@ -339,9 +346,124 @@ declare module "common/utils/init-data" {
339
346
  [key: string]: any;
340
347
  }, path: string, value: any) => void;
341
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
+ }
342
462
  declare module "common/utils/helper" {
343
463
  import { Nullable } from "common/utils/types";
344
464
  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";
345
467
  export const throttle: <T extends (...args: any[]) => any>(func: T, delay?: number) => (...funcArgs: Parameters<T>) => void;
346
468
  export const round: (float: number, precision: number) => number;
347
469
  export const isIdAnItem: (id: string) => boolean;
@@ -400,6 +522,7 @@ declare module "common/utils/helper" {
400
522
  export const runOnIdle: any;
401
523
  export const createShareLinkFromUrl: (url: string) => string;
402
524
  export const isLocationJestTest: () => boolean;
525
+ export const loadVariant: (id: string, applyCurrentGlobalParameters: boolean, sdkConnector: SdkConnector, analytics?: Analytics) => Promise<void>;
403
526
  }
404
527
  declare module "configurator/store/core-data" {
405
528
  import { Module } from 'vuex';
@@ -471,14 +594,14 @@ declare module "common/utils/parameters" {
471
594
  }
472
595
  declare module "configurator/components/-utils/overlays" {
473
596
  export enum OVERLAYS {
474
- PART_LIST = 0,
475
- NO_DOCKING = 1,
476
- SAVE_DRAFT = 2,
477
- VARIANT_WARNING = 3,
478
- OPEN_AR = 4,
479
- EXPORT_3D = 5,
480
- ELEMENT_DISABLED = 6,
481
- DELETE_WARNING = 7
597
+ NO_DOCKING = 0,
598
+ SAVE_DRAFT = 1,
599
+ VARIANT_WARNING = 2,
600
+ OPEN_AR = 3,
601
+ EXPORT_3D = 4,
602
+ ELEMENT_DISABLED = 5,
603
+ DELETE_WARNING = 6,
604
+ GENERIC_ERROR = 7
482
605
  }
483
606
  export interface OverlayState {
484
607
  open: boolean;
@@ -538,7 +661,7 @@ declare module "common/store/collection-view-state" {
538
661
  import { CollectionViewElement } from "configurator/components/collection-view/-utils/types";
539
662
  import { StoreState } from "common/store/index";
540
663
  export interface GridViewUiState {
541
- filter: Nullable<string>;
664
+ filter: string[];
542
665
  showAllAsList: boolean;
543
666
  search: Nullable<string>;
544
667
  userInitiatedSearch: boolean;
@@ -556,7 +679,7 @@ declare module "common/store/collection-view-state" {
556
679
  export enum GRID_VIEW_STATE_MUTATIONS {
557
680
  SET_SEARCH = "GV_SET_SEARCH",
558
681
  TOGGLE_LIST_DISPLAY_TYPE = "GV_TOGGLE_LIST_DISPLAY_TYPE",
559
- SET_FILTER = "GV_SET_FILTER",
682
+ TOGGLE_FILTER = "GV_TOGGLE_FILTER",
560
683
  SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH"
561
684
  }
562
685
  interface MuationPayload<T, V> {
@@ -567,6 +690,24 @@ declare module "common/store/collection-view-state" {
567
690
  export type CollectionViewMutationPayload<T> = MuationPayload<CollectionViewUiState, T>;
568
691
  export const collectionViewUiStateHelper: Module<CollectionViewUiState, StoreState>;
569
692
  }
693
+ declare module "configurator/components/grid-view/-utils/GridViewHelper" {
694
+ import { RapiItem, RapiMaterial } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
695
+ import { KernelValue, UiPossibleChild } from '@roomle/web-sdk/lib/definitions/typings/kernel';
696
+ import { Nullable } from "common/utils/types";
697
+ export interface GridViewElement {
698
+ key: string;
699
+ payload: RapiMaterial | KernelValue | UiPossibleChild | RapiItem;
700
+ }
701
+ export interface GridViewVariantElement extends GridViewElement {
702
+ hash: string;
703
+ }
704
+ export interface GridViewGroup {
705
+ id: string;
706
+ label: Nullable<string>;
707
+ elements: GridViewElement[];
708
+ }
709
+ export const toGridViewElements: (elements: Array<RapiMaterial | KernelValue | UiPossibleChild | RapiItem>, key: string) => GridViewElement[];
710
+ }
570
711
  declare module "configurator/store/ui-state" {
571
712
  import { Module } from 'vuex';
572
713
  import { SharedUiState, StoreState } from "common/store/index";
@@ -576,6 +717,7 @@ declare module "configurator/store/ui-state" {
576
717
  import { OverlaysOpenState } from "configurator/components/-utils/overlays";
577
718
  import { UiInitData } from "configurator/embedding/types";
578
719
  import { RapiTagForUi } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
720
+ import { GridViewVariantElement } from "configurator/components/grid-view/-utils/GridViewHelper";
579
721
  export enum BUTTON_ACTIONS {
580
722
  AR = 0,
581
723
  PARTLIST = 1,
@@ -584,7 +726,10 @@ declare module "configurator/store/ui-state" {
584
726
  FULLSCREEN = 4,
585
727
  RESET_CAMERA = 5,
586
728
  RENDER_IMAGE = 6,
587
- ROTATE = 7
729
+ ROTATE = 7,
730
+ SNAPPING = 8,
731
+ UNDO = 9,
732
+ REDO = 10
588
733
  }
589
734
  export interface SceneSelection {
590
735
  selectionMode: string;
@@ -608,6 +753,11 @@ declare module "configurator/store/ui-state" {
608
753
  isConfigurator: boolean;
609
754
  isPlanner: boolean;
610
755
  email: Nullable<string>;
756
+ lastSelectedVariant: Nullable<GridViewVariantElement>;
757
+ undoEnabled: boolean;
758
+ redoEnabled: boolean;
759
+ undoEnabledPlanner: boolean;
760
+ redoEnabledPlanner: boolean;
611
761
  }
612
762
  export enum UI_STATE_MUTATIONS {
613
763
  SET_SELECTED_GROUP = "setSelectedGroup",
@@ -631,7 +781,12 @@ declare module "configurator/store/ui-state" {
631
781
  SET_CURRENT_VARIANTS = "SET_CURRENT_VARIANTS",
632
782
  SET_SHOW_VARIANTS = "SET_SHOW_VARIANTS",
633
783
  SET_EMAIL = "SET_EMAIL",
634
- RESET_UI = "RESET_UI"
784
+ RESET_UI = "RESET_UI",
785
+ SET_LAST_SELECTED_VARIANT = "SET_LAST_SELECTED_VARIANT",
786
+ SET_UNDO = "SET_UNDO",
787
+ SET_REDO = "SET_REDO",
788
+ SET_UNDO_PLANNER = "SET_UNDO_PLANNER",
789
+ SET_REDO_PLANNER = "SET_REDO_PLANNER"
635
790
  }
636
791
  export enum UI_STATE_ACTIONS {
637
792
  SELECT_GROUP = "SELECT_GROUP",
@@ -643,10 +798,12 @@ declare module "configurator/store/ui-state" {
643
798
  PAUSE_CONFIGURING = "PAUSE_CONFIGURING",
644
799
  USE_VIEWER = "USE_VIEWER",
645
800
  USE_PLANNER = "USE_PLANNER",
646
- USE_CONFIGURATOR = "USE_CONFIGURATOR"
801
+ USE_CONFIGURATOR = "USE_CONFIGURATOR",
802
+ SHOW_PARAMS = "SHOW_PARAMS"
647
803
  }
648
804
  export enum UI_STATE_GETTERS {
649
805
  USE_REGULAR_LAYOUT = "USE_REGULAR_LAYOUT",
806
+ PART_LIST_SHOWN = "PART_LIST_SHOWN",
650
807
  COLLECTION_VIEW_ELEMENTS = "COLLECTION_VIEW_ELEMENTS",
651
808
  COLLECTION_VIEW_ADDON_ELEMENTS = "COLLECTION_VIEW_ADDON_ELEMENTS",
652
809
  COLLECTION_VIEW_VARIANTS = "COLLECTION_VIEW_VARIANTS",
@@ -743,6 +900,11 @@ declare module "common/store/index" {
743
900
  SET_SHOW_VARIANTS: UI_STATE_MUTATIONS.SET_SHOW_VARIANTS;
744
901
  SET_EMAIL: UI_STATE_MUTATIONS.SET_EMAIL;
745
902
  RESET_UI: UI_STATE_MUTATIONS.RESET_UI;
903
+ SET_LAST_SELECTED_VARIANT: UI_STATE_MUTATIONS.SET_LAST_SELECTED_VARIANT;
904
+ SET_UNDO: UI_STATE_MUTATIONS.SET_UNDO;
905
+ SET_REDO: UI_STATE_MUTATIONS.SET_REDO;
906
+ SET_UNDO_PLANNER: UI_STATE_MUTATIONS.SET_UNDO_PLANNER;
907
+ SET_REDO_PLANNER: UI_STATE_MUTATIONS.SET_REDO_PLANNER;
746
908
  UPDATE_GROUPS: CORE_DATA_MUTATIONS.UPDATE_GROUPS;
747
909
  UPDATE_PARAMETERS: CORE_DATA_MUTATIONS.UPDATE_PARAMETERS;
748
910
  UPDATE_ADDONS: CORE_DATA_MUTATIONS.UPDATE_ADDONS;
@@ -767,6 +929,7 @@ declare module "common/store/index" {
767
929
  USE_VIEWER: UI_STATE_ACTIONS.USE_VIEWER;
768
930
  USE_PLANNER: UI_STATE_ACTIONS.USE_PLANNER;
769
931
  USE_CONFIGURATOR: UI_STATE_ACTIONS.USE_CONFIGURATOR;
932
+ SHOW_PARAMS: UI_STATE_ACTIONS.SHOW_PARAMS;
770
933
  UPDATE_PRICE: CORE_DATA_ACTIONS.UPDATE_PRICE;
771
934
  SET_LABEL: CORE_STATE_ACTIONS.SET_LABEL;
772
935
  SET_COMPONENT_HAS_CHILDREN: CORE_STATE_ACTIONS.SET_COMPONENT_HAS_CHILDREN;
@@ -782,119 +945,6 @@ declare module "common/store/index" {
782
945
  const _default: import("vuex").Store<StoreState>;
783
946
  export default _default;
784
947
  }
785
- declare module "common/utils/user-agent" {
786
- import { Nullable } from "common/utils/types";
787
- export const isIOs: () => boolean;
788
- export const hasARQuicklook: () => Nullable<boolean>;
789
- export const isInAppBrowser: () => Nullable<boolean>;
790
- export const isAndroid: () => boolean;
791
- export const deviceSupportsAR: () => boolean;
792
- }
793
- declare module "common/utils/dom" {
794
- import { Nullable } from "common/utils/types";
795
- export const isScrolledToRightEnd: (element: Nullable<HTMLElement>, threshold?: number) => boolean;
796
- export const hasVerticalOverflow: (element: HTMLElement) => boolean;
797
- export const hasHorizontalOverflow: (element: HTMLElement) => boolean;
798
- export const lastVisibleElement: (container: HTMLElement, threshold?: number) => Element;
799
- export const cssVariableToNumber: (cssVariable: string) => number;
800
- export const remToPixel: (remValue: string, remBase: number) => number;
801
- export const percentInStringToFloat: (percentInString: string) => number;
802
- export const animationDurationInMsToFloat: (animationDuration: string) => number;
803
- export const calcIsDesktop: () => boolean;
804
- export const removeLoadingScreen: () => Promise<void>;
805
- export const showLoadingScreen: () => Promise<void>;
806
- export const copyToClipboard: (text: string) => void;
807
- export const setLoadingProgress: (percent: number) => void;
808
- export const hideLoadingCircle: () => void;
809
- }
810
- declare module "common/utils/script-loader" {
811
- export default class ScriptLoader {
812
- static fetch(url: string, options: {
813
- id: string;
814
- }): Promise<void>;
815
- }
816
- }
817
- declare module "common/utils/google-analytics" {
818
- import { Nullable } from "common/utils/types";
819
- export const GA_DIMENSIONS: {
820
- [key: string]: string;
821
- };
822
- export const GA_METRICS: {
823
- RESPONSE_END_TIME: string;
824
- DOM_LOAD_TIME: string;
825
- WINDOW_LOAD_TIME: string;
826
- TIME_TO_FIRST_BTYE: string;
827
- KERNEL_IS_READY: string;
828
- INIT_LOADING_SCREEN_CLOSE: string;
829
- };
830
- enum GA_ACTION_TYPE {
831
- EXCEPTION = "exception",
832
- TIMING = "timing_complete"
833
- }
834
- enum CUSTOM_ACTION_TYPE {
835
- TRACK_TIMING = "track_timing"
836
- }
837
- export const GA_NULL_VALUE = "(not set)";
838
- export enum GA_CATEGORY {
839
- ERROR = "Error",
840
- NAVIGATION_TIMING = "Navigation Timing",
841
- TIMING = "Timing",
842
- INTERACTION = "Interaction",
843
- TRACKING = "Tracking",
844
- DEPRECATION = "Deprecation"
845
- }
846
- export type GoogleAnalyticsCallback = (...args: any[]) => void;
847
- export const MAX_QUEUE_LENGTH = 1500;
848
- export default class GoogleAnalytics {
849
- history: IArguments[];
850
- private _settings;
851
- private _queue;
852
- private _trackingId;
853
- private _useTracking;
854
- private _callbacks;
855
- private _gaReady;
856
- private get _gtag();
857
- constructor(configuratorId: string, useTracking?: boolean);
858
- giveConsent(): void;
859
- trackEvent(action: CUSTOM_ACTION_TYPE | GA_ACTION_TYPE | string, category: GA_CATEGORY, label: string, value?: Nullable<number>, fieldsObject?: object): void;
860
- trackTiming(category: GA_CATEGORY, label: any, value: number, fieldsObject?: object): void;
861
- setDimension(dimension: string, value: any): void;
862
- setDimensions(dimensions: {
863
- [key: string]: any;
864
- }): void;
865
- trackError(message: string, specialErrorName?: Nullable<string>): void;
866
- trackContentError(message: string): void;
867
- addCallback(listener: GoogleAnalyticsCallback): void;
868
- removeUiCallback(listener: GoogleAnalyticsCallback): void;
869
- cleanUpHistory(): void;
870
- trackWrongDomain(): void;
871
- trackNoActivePackage(): void;
872
- private _execCommand;
873
- private _loadLibScript;
874
- private _send;
875
- private _flushQueue;
876
- private _setObjectProperties;
877
- private _trackException;
878
- private _trackErrors;
879
- private _trackErrorEvent;
880
- private _setSettings;
881
- private _findDimension;
882
- private _sendNavigationTimingMetrics;
883
- }
884
- }
885
- declare module "common/plugins/analytics" {
886
- import GoogleAnalytics from "common/utils/google-analytics";
887
- export interface Analytics {
888
- ga: GoogleAnalytics;
889
- }
890
- const AnalyticsPlugin: {
891
- install(Vue: any, { configuratorId, useTracking }: {
892
- configuratorId: string;
893
- useTracking: boolean;
894
- }): void;
895
- };
896
- export default AnalyticsPlugin;
897
- }
898
948
  declare module "common/utils/performance" {
899
949
  export const addLoadMark: () => void;
900
950
  export const calcTiming: () => void;
@@ -1117,6 +1167,7 @@ declare module "configurator/business-logic/sdk-connector" {
1117
1167
  private _execLoadingConfiguratorProcess;
1118
1168
  private _startLoading;
1119
1169
  private _finishLoading;
1170
+ private _showGenericError;
1120
1171
  }
1121
1172
  }
1122
1173
  declare module "configurator/embedding/helper" {
@@ -1153,6 +1204,7 @@ declare module "configurator/embedding/exposed-api" {
1153
1204
  import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
1154
1205
  import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
1155
1206
  import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
1207
+ import { Position3 } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
1156
1208
  export class ExposedApi {
1157
1209
  private _sdk;
1158
1210
  private _exposedCallbacks;
@@ -1171,6 +1223,7 @@ declare module "configurator/embedding/exposed-api" {
1171
1223
  /**
1172
1224
  * call this method to load the configuration string you want into the 3d Scene
1173
1225
  * @param configurationString string of the configuration, starts with `{` and ends with `}`
1226
+ * @returns null if configuration can not be loaded
1174
1227
  */
1175
1228
  loadConfigurationString(configurationString: string): Promise<Nullable<LoadResponse>>;
1176
1229
  /**
@@ -1218,6 +1271,14 @@ declare module "configurator/embedding/exposed-api" {
1218
1271
  * call this method if consent of Google Analytics is given later and not already in init-data on boot
1219
1272
  */
1220
1273
  giveGaConsent(): void;
1274
+ /**
1275
+ * Insert an object into the current MOC/planner scene
1276
+ * If no position or rotation is set then it will be placed automatically (without overlapping other objects) with rotation 0
1277
+ * @param id
1278
+ * @param position as x (left/right), y (up/down) and z (front/back)
1279
+ * @param rotation in radians
1280
+ */
1281
+ insertObject(id: string, position?: Position3, rotation?: number): Promise<void>;
1221
1282
  private _websiteReady;
1222
1283
  private _handleMessage;
1223
1284
  private _forwardSdkCallbacks;
@@ -3,7 +3,7 @@ import { Nullable } from '@/common/utils/types';
3
3
  import { CollectionViewElement } from '@/configurator/components/collection-view/-utils/types';
4
4
  import { StoreState } from '@/common/store';
5
5
  export interface GridViewUiState {
6
- filter: Nullable<string>;
6
+ filter: string[];
7
7
  showAllAsList: boolean;
8
8
  search: Nullable<string>;
9
9
  userInitiatedSearch: boolean;
@@ -21,7 +21,7 @@ export declare enum COLLECTION_VIEW_STATE_MUTATIONS {
21
21
  export declare enum GRID_VIEW_STATE_MUTATIONS {
22
22
  SET_SEARCH = "GV_SET_SEARCH",
23
23
  TOGGLE_LIST_DISPLAY_TYPE = "GV_TOGGLE_LIST_DISPLAY_TYPE",
24
- SET_FILTER = "GV_SET_FILTER",
24
+ TOGGLE_FILTER = "GV_TOGGLE_FILTER",
25
25
  SET_USER_INITIATED_SEARCH = "GV_SET_USER_INITIATED_SEARCH"
26
26
  }
27
27
  interface MuationPayload<T, V> {
@@ -48,6 +48,11 @@ export declare const MUTATIONS: {
48
48
  SET_SHOW_VARIANTS: UI_STATE_MUTATIONS.SET_SHOW_VARIANTS;
49
49
  SET_EMAIL: UI_STATE_MUTATIONS.SET_EMAIL;
50
50
  RESET_UI: UI_STATE_MUTATIONS.RESET_UI;
51
+ SET_LAST_SELECTED_VARIANT: UI_STATE_MUTATIONS.SET_LAST_SELECTED_VARIANT;
52
+ SET_UNDO: UI_STATE_MUTATIONS.SET_UNDO;
53
+ SET_REDO: UI_STATE_MUTATIONS.SET_REDO;
54
+ SET_UNDO_PLANNER: UI_STATE_MUTATIONS.SET_UNDO_PLANNER;
55
+ SET_REDO_PLANNER: UI_STATE_MUTATIONS.SET_REDO_PLANNER;
51
56
  UPDATE_GROUPS: CORE_DATA_MUTATIONS.UPDATE_GROUPS;
52
57
  UPDATE_PARAMETERS: CORE_DATA_MUTATIONS.UPDATE_PARAMETERS;
53
58
  UPDATE_ADDONS: CORE_DATA_MUTATIONS.UPDATE_ADDONS;
@@ -72,6 +77,7 @@ export declare const ACTIONS: {
72
77
  USE_VIEWER: UI_STATE_ACTIONS.USE_VIEWER;
73
78
  USE_PLANNER: UI_STATE_ACTIONS.USE_PLANNER;
74
79
  USE_CONFIGURATOR: UI_STATE_ACTIONS.USE_CONFIGURATOR;
80
+ SHOW_PARAMS: UI_STATE_ACTIONS.SHOW_PARAMS;
75
81
  UPDATE_PRICE: CORE_DATA_ACTIONS.UPDATE_PRICE;
76
82
  SET_LABEL: CORE_STATE_ACTIONS.SET_LABEL;
77
83
  SET_COMPONENT_HAS_CHILDREN: CORE_STATE_ACTIONS.SET_COMPONENT_HAS_CHILDREN;
@@ -1,5 +1,7 @@
1
1
  import { Nullable } from '@/common/utils/types';
2
2
  import { RapiConfiguration, RapiItem, RapiTenant } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
3
+ import { Analytics } from '@/common/plugins/analytics';
4
+ import { SdkConnector } from '@/configurator/business-logic/sdk-connector';
3
5
  export declare const throttle: <T extends (...args: any[]) => any>(func: T, delay?: number) => (...funcArgs: Parameters<T>) => void;
4
6
  export declare const round: (float: number, precision: number) => number;
5
7
  export declare const isIdAnItem: (id: string) => boolean;
@@ -58,3 +60,4 @@ export declare const oneTimeInterval: (callback: () => void, delay: number) => n
58
60
  export declare const runOnIdle: any;
59
61
  export declare const createShareLinkFromUrl: (url: string) => string;
60
62
  export declare const isLocationJestTest: () => boolean;
63
+ export declare const loadVariant: (id: string, applyCurrentGlobalParameters: boolean, sdkConnector: SdkConnector, analytics?: Analytics | undefined) => Promise<void>;
@@ -6,7 +6,8 @@ export interface CssHash {
6
6
  export declare const enum USER_ACTION_MODULE {
7
7
  CONFIGURATOR = 3
8
8
  }
9
- export declare const enum USER_ACTION {
9
+ export declare enum USER_ACTION {
10
10
  CONVERSION = 11,
11
- SHARE_AR = 301
11
+ SHARE_AR = 301,
12
+ SAVE_DRAFT = 302
12
13
  }
@@ -117,4 +117,5 @@ export declare class SdkConnector {
117
117
  private _execLoadingConfiguratorProcess;
118
118
  private _startLoading;
119
119
  private _finishLoading;
120
+ private _showGenericError;
120
121
  }
@@ -1,12 +1,12 @@
1
1
  export declare enum OVERLAYS {
2
- PART_LIST = 0,
3
- NO_DOCKING = 1,
4
- SAVE_DRAFT = 2,
5
- VARIANT_WARNING = 3,
6
- OPEN_AR = 4,
7
- EXPORT_3D = 5,
8
- ELEMENT_DISABLED = 6,
9
- DELETE_WARNING = 7
2
+ NO_DOCKING = 0,
3
+ SAVE_DRAFT = 1,
4
+ VARIANT_WARNING = 2,
5
+ OPEN_AR = 3,
6
+ EXPORT_3D = 4,
7
+ ELEMENT_DISABLED = 5,
8
+ DELETE_WARNING = 6,
9
+ GENERIC_ERROR = 7
10
10
  }
11
11
  export interface OverlayState {
12
12
  open: boolean;
@@ -5,6 +5,9 @@ export interface GridViewElement {
5
5
  key: string;
6
6
  payload: RapiMaterial | KernelValue | UiPossibleChild | RapiItem;
7
7
  }
8
+ export interface GridViewVariantElement extends GridViewElement {
9
+ hash: string;
10
+ }
8
11
  export interface GridViewGroup {
9
12
  id: string;
10
13
  label: Nullable<string>;
@@ -9,6 +9,7 @@ import { Analytics } from '@/common/plugins/analytics';
9
9
  import RoomleGLBViewer from '@roomle/web-sdk/lib/definitions/glb-viewer-core/src/roomle-glb-viewer';
10
10
  import RoomlePlanner from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
11
11
  import { GlobalCallback } from '@roomle/web-sdk/lib/definitions/common-core/src/services/global-callback';
12
+ import { Position3 } from '@roomle/web-sdk/lib/definitions/common-core/src/common-interfaces';
12
13
  export declare class ExposedApi {
13
14
  private _sdk;
14
15
  private _exposedCallbacks;
@@ -27,6 +28,7 @@ export declare class ExposedApi {
27
28
  /**
28
29
  * call this method to load the configuration string you want into the 3d Scene
29
30
  * @param configurationString string of the configuration, starts with `{` and ends with `}`
31
+ * @returns null if configuration can not be loaded
30
32
  */
31
33
  loadConfigurationString(configurationString: string): Promise<Nullable<LoadResponse>>;
32
34
  /**
@@ -74,6 +76,14 @@ export declare class ExposedApi {
74
76
  * call this method if consent of Google Analytics is given later and not already in init-data on boot
75
77
  */
76
78
  giveGaConsent(): void;
79
+ /**
80
+ * Insert an object into the current MOC/planner scene
81
+ * If no position or rotation is set then it will be placed automatically (without overlapping other objects) with rotation 0
82
+ * @param id
83
+ * @param position as x (left/right), y (up/down) and z (front/back)
84
+ * @param rotation in radians
85
+ */
86
+ insertObject(id: string, position?: Position3, rotation?: number): Promise<void>;
77
87
  private _websiteReady;
78
88
  private _handleMessage;
79
89
  private _forwardSdkCallbacks;
@@ -15,7 +15,10 @@ export declare enum UI_BUTTON {
15
15
  STARTCONFIGURE = "startconfigure",
16
16
  PAUSECONFIGURE = "pauseconfigure",
17
17
  EXPORT_3D = "export3d",
18
- ROTATE = "rotate"
18
+ ROTATE = "rotate",
19
+ SNAPPING = "snapping",
20
+ UNDO = "undo",
21
+ REDO = "redo"
19
22
  }
20
23
  interface FeatureFlags {
21
24
  realPartList?: boolean;
@@ -39,6 +42,9 @@ export interface UiInitData extends InitDataDefinition, GlobalInitDataDefinition
39
42
  [UI_BUTTON.STARTCONFIGURE]?: boolean;
40
43
  [UI_BUTTON.PAUSECONFIGURE]?: boolean;
41
44
  [UI_BUTTON.EXPORT_3D]?: boolean;
45
+ [UI_BUTTON.SNAPPING]?: boolean;
46
+ [UI_BUTTON.UNDO]?: boolean;
47
+ [UI_BUTTON.REDO]?: boolean;
42
48
  };
43
49
  skin?: EmbeddingSkin;
44
50
  zIndex?: number;