@roomle/embedding-lib 5.13.0 → 5.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/docs/md/web/embedding/CHANGELOG.md +42 -2
  2. package/{drag-in-Do47zdKL.mjs → drag-in-C6gLvrDx.mjs} +2 -2
  3. package/{drag-in-CYmR1HFI.mjs → drag-in-w_TrusdP.mjs} +1 -1
  4. package/{from-custom-view-DYkvyOw3.mjs → from-custom-view-BEcgFlAL.mjs} +1 -1
  5. package/{from-custom-view-BVWf7SQ7.mjs → from-custom-view-jmf3K6AT.mjs} +1 -1
  6. package/from-website-Ckh5GB2h.mjs +4 -0
  7. package/{from-website-DDMDPp-F.mjs → from-website-VCMg3teu.mjs} +2 -1
  8. package/package.json +2 -2
  9. package/packages/common/src/utils/init-data.d.ts +1 -0
  10. package/packages/embedding-lib/src/connector.d.ts +1 -1
  11. package/packages/embedding-lib/src/embedding-lib.d.ts +1 -1
  12. package/roomle-embedding-lib.es.js +9 -8
  13. package/roomle-embedding-lib.es.min.js +1 -1
  14. package/roomle-embedding-lib.umd.js +2 -2
  15. package/roomle-embedding-lib.umd.min.js +3 -3
  16. package/src/common/business-logic/event-emitter.d.ts +4 -1
  17. package/src/common/components/collection-view/-utils/collection-view-dynamic-components.d.ts +86 -965
  18. package/src/common/components/overlays/PartList.vue.d.ts +3 -4
  19. package/src/common/components/overlays/bottom-bar/CloseView.vue.d.ts +105 -60
  20. package/src/common/components/overlays/part-list/partlist-setup.d.ts +3 -4
  21. package/src/common/composables/use-configurator-api.d.ts +2 -2
  22. package/src/common/composables/use-core-instances.d.ts +2 -2
  23. package/src/common/composables/use-event-emitter-listener.d.ts +9 -1
  24. package/src/common/composables/use-open-close-anim.d.ts +9 -0
  25. package/src/common/composables/use-static-item-parameters.d.ts +2 -2
  26. package/src/common/utils/helper.d.ts +6 -7
  27. package/src/common/utils/parameters.d.ts +2 -2
  28. package/src/common/utils/types.d.ts +9 -1
  29. package/src/common/utils/ui-actions.d.ts +2 -3
  30. package/src/configurator/business-logic/roomle-sdk-wrapper.d.ts +3 -4
  31. package/src/configurator/business-logic/sdk-connector-configurator.d.ts +3 -4
  32. package/src/configurator/business-logic/sdk-connector.d.ts +7 -8
  33. package/src/configurator/components/Overlays.vue.d.ts +614 -356
  34. package/src/configurator/components/grid-view/-utils/ExpandedView.vue.d.ts +2 -2
  35. package/src/configurator/components/grid-view/-utils/GridViewHelper.d.ts +2 -2
  36. package/src/configurator/components/grid-view/GridView.vue.d.ts +25 -319
  37. package/src/configurator/components/overlays/DeleteWarning.vue.d.ts +102 -59
  38. package/src/configurator/components/overlays/ElementDisabled.vue.d.ts +102 -59
  39. package/src/configurator/components/overlays/GenericError.vue.d.ts +102 -59
  40. package/src/configurator/components/overlays/NoDocking.vue.d.ts +102 -59
  41. package/src/configurator/components/overlays/VariantWarning.vue.d.ts +102 -59
  42. package/src/configurator/components/overlays/ar/OpenAR.vue.d.ts +2 -2
  43. package/src/configurator/components/parameters/types/MaterialParameter.vue.d.ts +27 -320
  44. package/src/configurator/components/parameters/types/ProductVariant.vue.d.ts +27 -320
  45. package/src/configurator/components/parameters/types/ThumbnailsParameter.vue.d.ts +27 -320
  46. package/src/configurator/components/utils/PopUp.vue.d.ts +42 -72
  47. package/src/configurator/embedding/exposed-api.d.ts +7 -4
  48. package/src/configurator/embedding/exposed-callbacks.d.ts +4 -1
  49. package/src/configurator/embedding/helper.d.ts +4 -3
  50. package/src/configurator/embedding/types.d.ts +5 -0
  51. package/src/planner/business-logic/sdk-connector-planner.d.ts +5 -5
  52. package/src/planner/components/ObjectList.vue.d.ts +4 -2
  53. package/src/planner/components/measurements/MeasurementDisplayComponent.vue.d.ts +4 -0
  54. package/src/planner/components/measurements/ShowWallAtticMeasurements.vue.d.ts +8 -0
  55. package/src/planner/components/measurements/utils/AtticLabel.vue.d.ts +24 -0
  56. package/src/planner/components/measurements/utils/AtticLine.vue.d.ts +26 -0
  57. package/src/planner/components/overlays/ProductList.vue.d.ts +2 -2
  58. package/src/planner/components/overlays/ProductSettings.vue.d.ts +3 -4
  59. package/src/planner/components/overlays/product-list/ProductListEntry.vue.d.ts +2 -2
  60. package/src/planner/components/overlays/product-list/ProductListType.vue.d.ts +2 -2
  61. package/src/planner/components/overlays/product-settings/ProductPositions.vue.d.ts +3 -3
  62. package/src/planner/components/overlays/product-settings/ProductRotation.vue.d.ts +3 -3
  63. package/src/planner/components/overlays/product-settings/ProductSettingsInfos.vue.d.ts +3 -3
  64. package/src/planner/components/overlays/product-settings/ProductSize.vue.d.ts +3 -3
  65. package/src/planner/components/overlays/product-settings/ProductXYZChanger.vue.d.ts +3 -3
  66. package/src/planner/components/overlays/rooms/ConstructionVariants.vue.d.ts +28 -321
  67. package/src/planner/components/overlays/rooms/DoorParametersSetting.vue.d.ts +33 -326
  68. package/src/planner/components/overlays/rooms/ElementLengthScaling.vue.d.ts +2 -2
  69. package/src/planner/components/overlays/rooms/FloorColor.vue.d.ts +2 -2
  70. package/src/planner/components/overlays/rooms/RoomGeneralSettings.vue.d.ts +2 -2
  71. package/src/planner/components/overlays/rooms/RoomsList.vue.d.ts +2 -2
  72. package/src/planner/components/overlays/rooms/SlopingRoof.vue.d.ts +2 -2
  73. package/src/planner/components/overlays/rooms/SlopingRoofDirection.vue.d.ts +2 -2
  74. package/src/planner/components/overlays/rooms/SlopingRoofDirectionTooltip.vue.d.ts +2 -0
  75. package/src/planner/components/overlays/rooms/SlopingRoofTooltip.vue.d.ts +2 -0
  76. package/src/planner/components/overlays/rooms/WallGeneralSettings.vue.d.ts +2 -2
  77. package/src/planner/components/overlays/rooms/WindowParametersSetting.vue.d.ts +3 -4
  78. package/src/planner/components/utils/AssureConfiguratorHandlers.vue.d.ts +1 -1
  79. package/src/planner/components/utils/AssureSdkHandlers.vue.d.ts +1 -1
  80. package/src/planner/utils/planner-sidebar.d.ts +2 -2
  81. package/from-website-Dx2SUftr.mjs +0 -4
@@ -1,5 +1,5 @@
1
1
  import { PropType } from 'vue';
2
- import { default as RoomlePlanner } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
2
+ import { RoomlePlannerWithExtObjs } from '../../../../common/utils/types';
3
3
  import { PlanInteractionHandler } from '@roomle/web-sdk/lib/definitions/typings/planner';
4
4
  import { GridViewElement } from '../../../../configurator/components/grid-view/-utils/GridViewHelper';
5
5
  import { default as PlanElementViewModel } from '@roomle/web-sdk/lib/definitions/common-core/src/view-model/plan-element-view-model';
@@ -12,7 +12,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
12
12
  required: true;
13
13
  };
14
14
  api: {
15
- type: PropType<RoomlePlanner>;
15
+ type: PropType<RoomlePlannerWithExtObjs>;
16
16
  required: true;
17
17
  };
18
18
  interactionHandler: {
@@ -2265,7 +2265,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2265
2265
  required: true;
2266
2266
  };
2267
2267
  api: {
2268
- type: PropType<RoomlePlanner>;
2268
+ type: PropType<RoomlePlannerWithExtObjs>;
2269
2269
  required: true;
2270
2270
  };
2271
2271
  interactionHandler: {
@@ -2743,7 +2743,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
2743
2743
  required: true;
2744
2744
  };
2745
2745
  }>, {
2746
- api: import('vue').ShallowRef<RoomlePlanner>;
2746
+ api: import('vue').ShallowRef<RoomlePlannerWithExtObjs>;
2747
2747
  }, {
2748
2748
  scalingDirection: number;
2749
2749
  }, {}, {
@@ -5111,7 +5111,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
5111
5111
  };
5112
5112
  isDesktop: BooleanConstructor;
5113
5113
  api: {
5114
- type: PropType<RoomlePlanner>;
5114
+ type: PropType<RoomlePlannerWithExtObjs>;
5115
5115
  required: true;
5116
5116
  };
5117
5117
  }>, {
@@ -5139,340 +5139,47 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
5139
5139
  };
5140
5140
  isDesktop: BooleanConstructor;
5141
5141
  api: {
5142
- type: PropType<RoomlePlanner>;
5142
+ type: PropType<RoomlePlannerWithExtObjs>;
5143
5143
  required: true;
5144
5144
  };
5145
5145
  }>> & Readonly<{}>, {
5146
5146
  isDesktop: boolean;
5147
5147
  isExpanded: boolean;
5148
5148
  }, {}, {
5149
- GridView: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5150
- isExpanded: BooleanConstructor;
5151
- onExpand: {
5152
- type: FunctionConstructor;
5153
- required: true;
5154
- };
5155
- onSelect: {
5156
- type: PropType<((..._args: any[]) => void) | ((..._args: any[]) => void)[]>;
5157
- required: true;
5158
- };
5159
- onDragStart: FunctionConstructor;
5160
- onDragEnd: FunctionConstructor;
5161
- elements: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[]>;
5162
- selectedElement: {
5163
- type: PropType<import('@roomle/web-sdk/lib/definitions/typings/kernel').UiPossibleChild | import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewVariantElement | GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>>;
5164
- default: any;
5165
- };
5166
- groups: {
5167
- type: PropType<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewGroup<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[]>;
5168
- required: true;
5169
- };
5170
- onCollapse: {
5171
- type: PropType<(_payload: MouseEvent) => void>;
5172
- };
5173
- state: {
5174
- type: PropType<import('../../../../common/store/collection-view-state').GridViewUiState>;
5175
- };
5176
- isDesktop: BooleanConstructor;
5177
- }>, {
5178
- onSelectWrapped: (...args: any) => void;
5149
+ GridView: import('vue').DefineComponent<{
5150
+ isExpanded?: boolean;
5151
+ onExpand: (event: MouseEvent) => void;
5152
+ onSelect: (possibleChild: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>) => Promise<void>;
5153
+ onDragStart?: (gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: DragEvent | TouchEvent) => Promise<void>;
5154
+ onDragEnd?: (gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: DragEvent | TouchEvent) => void;
5155
+ elements: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[];
5156
+ selectedElement?: import('@roomle/web-sdk/lib/definitions/typings/kernel').UiPossibleChild | import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewVariantElement | GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>;
5157
+ groups: import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewGroup<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[];
5158
+ onCollapse?: (mouseEvent: MouseEvent) => void;
5159
+ state?: import('../../../../common/store/collection-view-state').GridViewUiState;
5160
+ isDesktop?: boolean;
5179
5161
  }, {
5180
5162
  currentTouch: import('../../../../../packages/common/src/utils/touch-drag').TouchDrag<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>>;
5181
- }, {
5182
- selectedElementWrapped(): GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>;
5183
- isDraggable(): boolean;
5184
- stateWrapped(): import('../../../../common/store/collection-view-state').GridViewUiState;
5185
- }, {
5186
- dragStart(gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent | DragEvent): Promise<void>;
5187
- dragEnd(gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent | DragEvent): void;
5188
- touchStart(gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent): void;
5189
- touchMove(_gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent): void;
5190
- touchEnd(gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent): void;
5191
- }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
5192
- isExpanded: BooleanConstructor;
5193
- onExpand: {
5194
- type: FunctionConstructor;
5195
- required: true;
5196
- };
5197
- onSelect: {
5198
- type: PropType<((..._args: any[]) => void) | ((..._args: any[]) => void)[]>;
5199
- required: true;
5200
- };
5201
- onDragStart: FunctionConstructor;
5202
- onDragEnd: FunctionConstructor;
5203
- elements: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[]>;
5204
- selectedElement: {
5205
- type: PropType<import('@roomle/web-sdk/lib/definitions/typings/kernel').UiPossibleChild | import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewVariantElement | GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>>;
5206
- default: any;
5207
- };
5208
- groups: {
5209
- type: PropType<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewGroup<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[]>;
5210
- required: true;
5211
- };
5212
- onCollapse: {
5213
- type: PropType<(_payload: MouseEvent) => void>;
5214
- };
5215
- state: {
5216
- type: PropType<import('../../../../common/store/collection-view-state').GridViewUiState>;
5217
- };
5218
- isDesktop: BooleanConstructor;
5219
- }>> & Readonly<{}>, {
5220
- isDesktop: boolean;
5221
- isExpanded: boolean;
5222
- selectedElement: import('@roomle/web-sdk/lib/definitions/typings/kernel').UiPossibleChild | import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewVariantElement | GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>;
5223
- }, {}, {
5224
- ExpandedView: import('vue').DefineComponent<{
5225
- groups: import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewGroup<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[];
5226
- selectedElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>;
5227
- onSelect: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>) => void;
5228
- onDragStart: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: DragEvent) => void;
5229
- onDragEnd: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: DragEvent) => void;
5230
- onTouchStart: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent) => void;
5231
- onTouchEnd: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent) => void;
5232
- onTouchMove: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent) => void;
5233
- onCollapse?: (_payload: MouseEvent) => void;
5234
- state: import('../../../../common/store/collection-view-state').GridViewUiState;
5235
- isDesktop?: boolean;
5236
- isDraggable?: boolean;
5237
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
5238
- groups: import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewGroup<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[];
5239
- selectedElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>;
5240
- onSelect: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>) => void;
5241
- onDragStart: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: DragEvent) => void;
5242
- onDragEnd: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: DragEvent) => void;
5243
- onTouchStart: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent) => void;
5244
- onTouchEnd: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent) => void;
5245
- onTouchMove: (element: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: TouchEvent) => void;
5246
- onCollapse?: (_payload: MouseEvent) => void;
5247
- state: import('../../../../common/store/collection-view-state').GridViewUiState;
5248
- isDesktop?: boolean;
5249
- isDraggable?: boolean;
5250
- }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5251
- CollapsedView: {
5252
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
5253
- elements: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[]>;
5254
- selectedElement: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>>;
5255
- onExpand: FunctionConstructor;
5256
- onSelect: {
5257
- type: FunctionConstructor;
5258
- default: () => any;
5259
- };
5260
- onDragStart: {
5261
- type: FunctionConstructor;
5262
- default: () => any;
5263
- };
5264
- onDragEnd: {
5265
- type: FunctionConstructor;
5266
- default: () => any;
5267
- };
5268
- onTouchStart: {
5269
- type: FunctionConstructor;
5270
- default: () => any;
5271
- };
5272
- onTouchEnd: {
5273
- type: FunctionConstructor;
5274
- default: () => any;
5275
- };
5276
- onTouchMove: {
5277
- type: FunctionConstructor;
5278
- default: () => any;
5279
- };
5280
- showAllElements: BooleanConstructor;
5281
- isDesktop: BooleanConstructor;
5282
- isDraggable: BooleanConstructor;
5283
- isScrolling: BooleanConstructor;
5284
- state: {
5285
- type: PropType<import('../../../../common/store/collection-view-state').GridViewUiState>;
5286
- default: () => {
5287
- filter: any[];
5288
- search: any;
5289
- userInitiatedSearch: boolean;
5290
- viewType: import('../../../../common/store/collection-view-state').ViewTypeState;
5291
- };
5292
- };
5293
- }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
5294
- elements: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[]>;
5295
- selectedElement: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>>;
5296
- onExpand: FunctionConstructor;
5297
- onSelect: {
5298
- type: FunctionConstructor;
5299
- default: () => any;
5300
- };
5301
- onDragStart: {
5302
- type: FunctionConstructor;
5303
- default: () => any;
5304
- };
5305
- onDragEnd: {
5306
- type: FunctionConstructor;
5307
- default: () => any;
5308
- };
5309
- onTouchStart: {
5310
- type: FunctionConstructor;
5311
- default: () => any;
5312
- };
5313
- onTouchEnd: {
5314
- type: FunctionConstructor;
5315
- default: () => any;
5316
- };
5317
- onTouchMove: {
5318
- type: FunctionConstructor;
5319
- default: () => any;
5320
- };
5321
- showAllElements: BooleanConstructor;
5322
- isDesktop: BooleanConstructor;
5323
- isDraggable: BooleanConstructor;
5324
- isScrolling: BooleanConstructor;
5325
- state: {
5326
- type: PropType<import('../../../../common/store/collection-view-state').GridViewUiState>;
5327
- default: () => {
5328
- filter: any[];
5329
- search: any;
5330
- userInitiatedSearch: boolean;
5331
- viewType: import('../../../../common/store/collection-view-state').ViewTypeState;
5332
- };
5333
- };
5334
- }>> & Readonly<{}>, {
5335
- state: import('../../../../common/store/collection-view-state').GridViewUiState;
5336
- isDesktop: boolean;
5337
- onSelect: Function;
5338
- onDragStart: Function;
5339
- onDragEnd: Function;
5340
- onTouchStart: Function;
5341
- onTouchEnd: Function;
5342
- onTouchMove: Function;
5343
- isDraggable: boolean;
5344
- showAllElements: boolean;
5345
- isScrolling: boolean;
5346
- }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
5347
- P: {};
5348
- B: {};
5349
- D: {};
5350
- C: {};
5351
- M: {};
5352
- Defaults: {};
5353
- }, Readonly<import('vue').ExtractPropTypes<{
5354
- elements: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[]>;
5355
- selectedElement: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>>;
5356
- onExpand: FunctionConstructor;
5357
- onSelect: {
5358
- type: FunctionConstructor;
5359
- default: () => any;
5360
- };
5361
- onDragStart: {
5362
- type: FunctionConstructor;
5363
- default: () => any;
5364
- };
5365
- onDragEnd: {
5366
- type: FunctionConstructor;
5367
- default: () => any;
5368
- };
5369
- onTouchStart: {
5370
- type: FunctionConstructor;
5371
- default: () => any;
5372
- };
5373
- onTouchEnd: {
5374
- type: FunctionConstructor;
5375
- default: () => any;
5376
- };
5377
- onTouchMove: {
5378
- type: FunctionConstructor;
5379
- default: () => any;
5380
- };
5381
- showAllElements: BooleanConstructor;
5382
- isDesktop: BooleanConstructor;
5383
- isDraggable: BooleanConstructor;
5384
- isScrolling: BooleanConstructor;
5385
- state: {
5386
- type: PropType<import('../../../../common/store/collection-view-state').GridViewUiState>;
5387
- default: () => {
5388
- filter: any[];
5389
- search: any;
5390
- userInitiatedSearch: boolean;
5391
- viewType: import('../../../../common/store/collection-view-state').ViewTypeState;
5392
- };
5393
- };
5394
- }>> & Readonly<{}>, {}, {}, {}, {}, {
5395
- state: import('../../../../common/store/collection-view-state').GridViewUiState;
5396
- isDesktop: boolean;
5397
- onSelect: Function;
5398
- onDragStart: Function;
5399
- onDragEnd: Function;
5400
- onTouchStart: Function;
5401
- onTouchEnd: Function;
5402
- onTouchMove: Function;
5403
- isDraggable: boolean;
5404
- showAllElements: boolean;
5405
- isScrolling: boolean;
5406
- }>;
5407
- __isFragment?: never;
5408
- __isTeleport?: never;
5409
- __isSuspense?: never;
5410
- } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
5411
- elements: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[]>;
5412
- selectedElement: PropType<GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>>;
5413
- onExpand: FunctionConstructor;
5414
- onSelect: {
5415
- type: FunctionConstructor;
5416
- default: () => any;
5417
- };
5418
- onDragStart: {
5419
- type: FunctionConstructor;
5420
- default: () => any;
5421
- };
5422
- onDragEnd: {
5423
- type: FunctionConstructor;
5424
- default: () => any;
5425
- };
5426
- onTouchStart: {
5427
- type: FunctionConstructor;
5428
- default: () => any;
5429
- };
5430
- onTouchEnd: {
5431
- type: FunctionConstructor;
5432
- default: () => any;
5433
- };
5434
- onTouchMove: {
5435
- type: FunctionConstructor;
5436
- default: () => any;
5437
- };
5438
- showAllElements: BooleanConstructor;
5439
- isDesktop: BooleanConstructor;
5440
- isDraggable: BooleanConstructor;
5441
- isScrolling: BooleanConstructor;
5442
- state: {
5443
- type: PropType<import('../../../../common/store/collection-view-state').GridViewUiState>;
5444
- default: () => {
5445
- filter: any[];
5446
- search: any;
5447
- userInitiatedSearch: boolean;
5448
- viewType: import('../../../../common/store/collection-view-state').ViewTypeState;
5449
- };
5450
- };
5451
- }>> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
5452
- state: import('../../../../common/store/collection-view-state').GridViewUiState;
5453
- isDesktop: boolean;
5454
- onSelect: Function;
5455
- onDragStart: Function;
5456
- onDragEnd: Function;
5457
- onTouchStart: Function;
5458
- onTouchEnd: Function;
5459
- onTouchMove: Function;
5460
- isDraggable: boolean;
5461
- showAllElements: boolean;
5462
- isScrolling: boolean;
5463
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
5464
- $slots: {
5465
- aux?(_: {}): any;
5466
- };
5467
- });
5468
- }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
5163
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
5164
+ isExpanded?: boolean;
5165
+ onExpand: (event: MouseEvent) => void;
5166
+ onSelect: (possibleChild: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>) => Promise<void>;
5167
+ onDragStart?: (gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: DragEvent | TouchEvent) => Promise<void>;
5168
+ onDragEnd?: (gridViewElement: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>, event: DragEvent | TouchEvent) => void;
5169
+ elements: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[];
5170
+ selectedElement?: import('@roomle/web-sdk/lib/definitions/typings/kernel').UiPossibleChild | import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewVariantElement | GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>;
5171
+ groups: import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewGroup<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>[];
5172
+ onCollapse?: (mouseEvent: MouseEvent) => void;
5173
+ state?: import('../../../../common/store/collection-view-state').GridViewUiState;
5174
+ isDesktop?: boolean;
5175
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5469
5176
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
5470
5177
  LoadingSpinner: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
5471
5178
  ProductPositions: import('vue').DefineComponent<{
5472
- api: RoomlePlanner;
5179
+ api: RoomlePlannerWithExtObjs;
5473
5180
  isConstructionElement?: boolean;
5474
5181
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
5475
- api: RoomlePlanner;
5182
+ api: RoomlePlannerWithExtObjs;
5476
5183
  isConstructionElement?: boolean;
5477
5184
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
5478
5185
  }, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,5 +1,5 @@
1
1
  import { PropType, ShallowRef } from 'vue';
2
- import { default as RoomlePlanner } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
2
+ import { RoomlePlannerWithExtObjs } from '../../../../common/utils/types';
3
3
  import { CoreBoundValue } from '../../../../common/composables/use-core-bound-value';
4
4
 
5
5
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
@@ -20,7 +20,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
20
20
  required: true;
21
21
  };
22
22
  }>, {
23
- api: ShallowRef<RoomlePlanner>;
23
+ api: ShallowRef<RoomlePlannerWithExtObjs>;
24
24
  }, {
25
25
  scalingDirection: number;
26
26
  }, {}, {
@@ -15,7 +15,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
15
15
  required: true;
16
16
  };
17
17
  api: {
18
- type: PropType<RoomlePlanner>;
18
+ type: PropType<RoomlePlanner<readonly []>>;
19
19
  required: true;
20
20
  };
21
21
  }>, {
@@ -1142,7 +1142,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
1142
1142
  required: true;
1143
1143
  };
1144
1144
  api: {
1145
- type: PropType<RoomlePlanner>;
1145
+ type: PropType<RoomlePlanner<readonly []>>;
1146
1146
  required: true;
1147
1147
  };
1148
1148
  }>> & Readonly<{}>, {}, {}, {
@@ -7,11 +7,11 @@ declare const _default: import('vue').DefineComponent<{
7
7
  onClose: (_buttonAction: BUTTON_ACTIONS, _reason: CloseReason) => Promise<void>;
8
8
  onToggleExpand?: () => void;
9
9
  interactionHandler: PlanInteractionHandler;
10
- api: RoomlePlanner;
10
+ api: RoomlePlanner<readonly []>;
11
11
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
12
12
  onClose: (_buttonAction: BUTTON_ACTIONS, _reason: CloseReason) => Promise<void>;
13
13
  onToggleExpand?: () => void;
14
14
  interactionHandler: PlanInteractionHandler;
15
- api: RoomlePlanner;
15
+ api: RoomlePlanner<readonly []>;
16
16
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
17
  export default _default;
@@ -7,7 +7,7 @@ declare const _default: import('vue').DefineComponent<{
7
7
  isExpanded?: boolean;
8
8
  onExpand: () => void;
9
9
  onCollapse?: (_payload: MouseEvent) => void;
10
- onSelect: (_sampleRoom: GridViewElement<SampleRoom>) => void;
10
+ onSelect: (_sampleRoom: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>) => Promise<void>;
11
11
  state: CollectionViewUiState;
12
12
  isDesktop?: boolean;
13
13
  selectedElement: GridViewElement<SampleRoom>;
@@ -16,7 +16,7 @@ declare const _default: import('vue').DefineComponent<{
16
16
  isExpanded?: boolean;
17
17
  onExpand: () => void;
18
18
  onCollapse?: (_payload: MouseEvent) => void;
19
- onSelect: (_sampleRoom: GridViewElement<SampleRoom>) => void;
19
+ onSelect: (_sampleRoom: GridViewElement<import('../../../../configurator/components/grid-view/-utils/GridViewHelper').GridViewElementPossiblePayload>) => Promise<void>;
20
20
  state: CollectionViewUiState;
21
21
  isDesktop?: boolean;
22
22
  selectedElement: GridViewElement<SampleRoom>;
@@ -1,11 +1,11 @@
1
1
  import { default as RoomlePlanner } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
2
2
 
3
3
  declare const _default: import('vue').DefineComponent<{
4
- api: RoomlePlanner;
4
+ api: RoomlePlanner<readonly []>;
5
5
  hideInputs?: boolean;
6
6
  hideDirection?: boolean;
7
7
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
8
- api: RoomlePlanner;
8
+ api: RoomlePlanner<readonly []>;
9
9
  hideInputs?: boolean;
10
10
  hideDirection?: boolean;
11
11
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -4,12 +4,12 @@ import { default as RoomlePlanner } from '@roomle/web-sdk/lib/definitions/planne
4
4
  declare const _default: import('vue').DefineComponent<{
5
5
  isActive: boolean;
6
6
  attachedAttic: KernelAttic;
7
- api: RoomlePlanner;
7
+ api: RoomlePlanner<readonly []>;
8
8
  }, {
9
9
  direction: import('vue').Ref<"left" | "right", "left" | "right">;
10
10
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
11
11
  isActive: boolean;
12
12
  attachedAttic: KernelAttic;
13
- api: RoomlePlanner;
13
+ api: RoomlePlanner<readonly []>;
14
14
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
15
  export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -5,12 +5,12 @@ import { PlanInteractionHandler } from '@roomle/web-sdk/lib/definitions/typings/
5
5
  declare const _default: import('vue').DefineComponent<{
6
6
  onClose: (action: BUTTON_ACTIONS) => void;
7
7
  onToggleExpand: () => void;
8
- api: RoomlePlanner;
8
+ api: RoomlePlanner<readonly []>;
9
9
  interactionHandler: PlanInteractionHandler;
10
10
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
11
11
  onClose: (action: BUTTON_ACTIONS) => void;
12
12
  onToggleExpand: () => void;
13
- api: RoomlePlanner;
13
+ api: RoomlePlanner<readonly []>;
14
14
  interactionHandler: PlanInteractionHandler;
15
15
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
16
  export default _default;
@@ -1,5 +1,4 @@
1
- import { CloseReason } from '../../../../common/utils/types';
2
- import { default as RoomlePlanner } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
1
+ import { CloseReason, RoomlePlannerWithExtObjs } from '../../../../common/utils/types';
3
2
  import { BUTTON_ACTIONS } from '../../../../configurator/store/ui-state';
4
3
  import { PlanInteractionHandler } from '@roomle/web-sdk/lib/definitions/typings/planner';
5
4
 
@@ -7,11 +6,11 @@ declare const _default: import('vue').DefineComponent<{
7
6
  onClose: (_buttonAction: BUTTON_ACTIONS, _reason: CloseReason) => Promise<void>;
8
7
  onToggleExpand?: () => void;
9
8
  interactionHandler: PlanInteractionHandler;
10
- api: RoomlePlanner;
9
+ api: RoomlePlannerWithExtObjs;
11
10
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
12
11
  onClose: (_buttonAction: BUTTON_ACTIONS, _reason: CloseReason) => Promise<void>;
13
12
  onToggleExpand?: () => void;
14
13
  interactionHandler: PlanInteractionHandler;
15
- api: RoomlePlanner;
14
+ api: RoomlePlannerWithExtObjs;
16
15
  }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
16
  export default _default;
@@ -1,5 +1,5 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {
2
- configuratorApi: import('vue').ShallowRef<import('@roomle/web-sdk/lib/definitions/configurator-core/src/roomle-configurator').default>;
2
+ configuratorApi: import('vue').ShallowRef<import('../../../common/utils/types').RoomleConfiguratorType>;
3
3
  }, {}, {
4
4
  isLoaded(): boolean;
5
5
  }, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -1,5 +1,5 @@
1
1
  declare const _default: import('vue').DefineComponent<{}, {
2
- api: import('vue').ShallowRef<import('@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner').default>;
2
+ api: import('vue').ShallowRef<import('../../../common/utils/types').RoomlePlannerWithExtObjs>;
3
3
  planInteractionHandler: import('vue').ShallowRef<import('@roomle/web-sdk/lib/definitions/typings/planner').PlanInteractionHandler>;
4
4
  }, {}, {
5
5
  isLoaded(): boolean;
@@ -1,7 +1,7 @@
1
1
  import { KernelPartList, UiPlanObject } from '@roomle/web-sdk/lib/definitions/typings/kernel';
2
2
  import { StoreState } from '../../common/store';
3
3
  import { RapiConfiguration, RapiItem } from '@roomle/web-sdk/lib/definitions/typings/rapi-types';
4
- import { default as RoomlePlanner } from '@roomle/web-sdk/lib/definitions/planner-core/src/roomle-planner';
4
+ import { RoomlePlannerWithExtObjs } from '../../common/utils/types';
5
5
 
6
6
  export interface XYZCoords {
7
7
  x: number;
@@ -13,4 +13,4 @@ export interface ProductListItem extends UiPlanObject {
13
13
  runtimeIds?: number[];
14
14
  }
15
15
  export declare const matchProductListAndQuantity: (productList: UiPlanObject[]) => ProductListItem[];
16
- export declare const fillPartList: (data: RapiItem | RapiConfiguration, partList: KernelPartList, hash: string, plannerApi: RoomlePlanner, store: Store<StoreState>) => Promise<void>;
16
+ export declare const fillPartList: (data: RapiItem | RapiConfiguration, partList: KernelPartList, hash: string, plannerApi: RoomlePlannerWithExtObjs, store: Store<StoreState>) => Promise<void>;
@@ -1,4 +0,0 @@
1
- var P=Object.defineProperty,R=(r,e,t)=>e in r?P(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,g=(r,e,t)=>R(r,typeof e!="symbol"?e+"":e,t);import{g as B,e as D,a as x,i as C,T as M}from"./touch-drag-C1SsZtt4.mjs";import{R as _,a as I,b as O,c as L,d as N,e as E,f as b,g as F,h as G,i as v,j as A,k as Y}from"./drag-in-CYmR1HFI.mjs";const w=(r,e,t=0,i=0)=>{const s=e.x+e.width+t,o=e.x-t,l=e.y+e.height+i,a=e.y-i,{x:h,y:n}=r;return h>=o&&h<=s&&n>=a&&n<=l},T=(r,e,t,i=0,s=0)=>{if(!(!t||!t.hiddenIn&&!t.visibleIn))return t.visibleIn?w({x:r,y:e},t.visibleIn,i,s):t.hiddenIn?!w({x:r,y:e},t.hiddenIn,-i,-s):!1},k=()=>{if(!document.getElementById(I)){const r=document.createElement("style");r.type="text/css",r.id=I,r.innerHTML=`
2
- ${O}
3
- ${L}
4
- `,document.head.appendChild(r)}},U=({x:r,y:e},t)=>{var i,s,o,l,a,h;let n=document.getElementById(_);if(!n){if(n=document.createElement("div"),(i=t.ghost)!=null&&i.element)n.appendChild(t.ghost.element);else{const d=document.createElement("img");d.src=((s=t.ghost)==null?void 0:s.url)||N,d.width=((o=t.ghost)==null?void 0:o.width)||E,d.height=((l=t.ghost)==null?void 0:l.height)||b,n.appendChild(d)}n.id=_,n.style.position="fixed",n.style.top="0",n.style.left="0",n.style.willChange="transform",n.style.transform="translate3d(0, 0, 0)",n.style.zIndex="9999",n.style.opacity="0.5",T(r,e,t.ghost||{},(a=t.settings)==null?void 0:a.dragInOverlapX,(h=t.settings)==null?void 0:h.dragInOverlapY)||(n.style.display="none"),n.style.pointerEvents="none",document.body.appendChild(n)}},X=({x:r,y:e},t)=>{var i,s,o,l;const a=document.getElementById(_);if(!a)return;let h=(i=t.ghost)==null?void 0:i.width,n=(s=t.ghost)==null?void 0:s.height;typeof h>"u"&&(h=a.getBoundingClientRect().width||E),typeof n>"u"&&(n=a.getBoundingClientRect().height||b);const d=r-h/2,c=e-n/2;a.style.transform=`translate3d(${d}px, ${c}px, 0)`,t.ghost&&(T(r,e,t.ghost,(o=t.settings)==null?void 0:o.dragInOverlapX,(l=t.settings)==null?void 0:l.dragInOverlapY)?a.style.animation!=F&&(a.style.animation=F):a.style.animation!=G&&(a.style.animation=G))};class ${constructor(e=null){g(this,"_dragGhostAnimationFrameId",null),g(this,"_dragGhostRemoveAnimationFrameId",null),g(this,"_dragGhostElement",null),this._dragGhostElement=e}updateDragGhost(e,t,i){var s;this._dragGhostRemoveAnimationFrameId&&(cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId),this._dragGhostRemoveAnimationFrameId=null),!((s=i.ghost)!=null&&s.external)&&i.ghost&&(this._dragGhostAnimationFrameId||(this._dragGhostAnimationFrameId=requestAnimationFrame(()=>{k();const o={x:e,y:t};!i.ghost&&this._dragGhostElement&&(i.ghost={}),i.ghost&&!i.ghost.element&&this._dragGhostElement&&(i.ghost.element=this._dragGhostElement),U(o,i),X(o,i),this._dragGhostAnimationFrameId=null})))}removeDragGhost(){this._dragGhostAnimationFrameId&&(cancelAnimationFrame(this._dragGhostAnimationFrameId),this._dragGhostAnimationFrameId=null),this._dragGhostRemoveAnimationFrameId||(this._dragGhostRemoveAnimationFrameId=requestAnimationFrame(()=>{const e=document.getElementById(_);e&&document.body.removeChild(e),this._dragGhostRemoveAnimationFrameId=null}))}}class q{constructor(e,t,i){g(this,"_options",{}),g(this,"_instance"),g(this,"_mainDomElement"),g(this,"_currentDrag",{}),g(this,"_currentTouch",null),g(this,"_firefoxDragPosition",{x:0,y:0}),g(this,"_onBeforeUpdateDrag",()=>({})),g(this,"isDragging",!1),g(this,"_firefoxFallback",s=>{if(!this._currentDrag.event)return;const o=s||window.event;this._firefoxDragPosition.x=o.pageX||0,this._firefoxDragPosition.y=o.pageY||0}),this._instance=e,this._mainDomElement=t,this._options=i||{},this._firefoxFallback=this._firefoxFallback.bind(this),document.addEventListener("dragover",this._firefoxFallback)}beforeUpdateGhost(e){this._onBeforeUpdateDrag=e}dragStart(e,t,i="rml_id"){const s=this._mainDomElement.parentNode;if(B(s).position!=="relative"){console.warn("Parent of iframe should have position relative, otherwise drag-in can not detect the x/y coordinates correctly");return}this._mainDomElement.style.pointerEvents="none";let o=s.querySelector("."+v);o||(o=document.createElement("div"),o.classList.add(v),s.appendChild(o)),o.classList.remove(A.DISPLAY_NONE),t.target.getAttribute("draggable")||console.warn(`Draggable not detected correctly! Did you add draggable="true" to the element? In Sarafi only 'draggable' is too less`);const l=s.querySelector("."+Y);this._currentDrag.event=t;const a=t.target,h=a.cloneNode(),n=a.getBoundingClientRect();h.style.width=`${n.width}px`,h.style.height=`${n.height}px`,this._currentDrag.ghost=new $(h),this._currentDrag.offset||(this._currentDrag.offset={x:0,y:0});const{clientX:d,clientY:c}=D(t,this._firefoxDragPosition);this._currentDrag.offset.x=d-n.left,this._currentDrag.offset.y=c-n.top,t instanceof DragEvent&&t.dataTransfer&&t.dataTransfer.setDragImage&&t.dataTransfer.setDragImage(l,0,0);const{x:f,y:m}=x(s,this._currentDrag.event||t,this._firefoxDragPosition),p=Math.max(1,f),y=Math.max(1,m);this.isDragging=!0,this._instance.dragInObject(e,p,y,i)}dragUpdate(e){var t;const i=this._mainDomElement.parentNode,{x:s,y:o}=x(i,e,this._firefoxDragPosition);if(s===0&&o===0)return;const l=Math.max(1,s),a=Math.max(1,o);if(l===1&&a===1)return;let h=l,n=a;if(C(e)){const u=((t=this._options.settings)==null?void 0:t.fingerSize)||0;h=Math.max(2,l+u),n=Math.max(2,a-u)}const{x:d,y:c,options:f}=this._onBeforeUpdateDrag(h,n,{}),m=f||{settings:{},ghost:{}};m.ghost||(m.ghost={}),m.ghost.visibleIn&&m.ghost.hiddenIn||(m.ghost.hiddenIn=this._mainDomElement.getBoundingClientRect());const p=typeof d=="number"?d:h,y=typeof c=="number"?c:n;if(this._currentDrag.ghost){const{clientX:u,clientY:S}=D(e,this._firefoxDragPosition);this._currentDrag.ghost.updateDragGhost(u,S,m)}this._instance.updateDrag(p,y,{})}dragEnd(){this._mainDomElement.style.pointerEvents="all";const e=this._mainDomElement.parentNode;this.isDragging=!1,this._instance.dragInObjectEnd(),this._currentDrag.ghost&&(this._currentDrag.ghost.removeDragGhost(),this._currentDrag.ghost=null),this._currentDrag={},this._firefoxDragPosition={x:0,y:0};const t=e.querySelector("."+v);t&&t.classList.add(A.DISPLAY_NONE)}touchStart(e,t,i="rml_id"){var s,o,l,a;t.preventDefault();const h=(d,c)=>{this.dragStart(e,c,i)},n={};typeof((o=(s=this._options)==null?void 0:s.settings)==null?void 0:o.touchDragDelay)=="number"&&(n.delay=this._options.settings.touchDragDelay),(a=(l=this._options)==null?void 0:l.settings)!=null&&a.touchDragEpsilon&&(n.epsilon=this._options.settings.touchDragEpsilon),this._currentTouch=new M(void 0,{onTouchDragStart:h},n),this._currentTouch.onStart(t)}touchMove(e){this._currentTouch&&this._currentTouch.onMove(e),this._currentDrag.event&&this.dragUpdate(e)}touchEnd(){this._currentTouch&&this._currentTouch.onEnd(),this._currentTouch=null,this.dragEnd()}dispose(){document.removeEventListener("dragover",this._firefoxFallback)}releaseInput(e){}}export{q as DragInFromWebsiteStrategy};