@roomle/embedding-lib 5.27.0-alpha.1 → 5.27.0-alpha.3
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/md/web/embedding/CHANGELOG.md +3 -13
- package/package.json +1 -1
- package/packages/web-sdk/packages/configurator-core/src/roomle-configurator.d.ts +7 -0
- package/packages/web-sdk/packages/configurator-core/src/services/configurator-ui-callback.d.ts +2 -0
- package/packages/web-sdk/packages/configurator-core/src/utils/component-dimensioning-helper.d.ts +44 -2
- package/packages/web-sdk/packages/configurator-core/src/utils/component-raycast-helper.d.ts +6 -1
- package/packages/web-sdk/packages/configurator-core/src/utils/dimensioning-helper.d.ts +1 -0
- package/packages/web-sdk/packages/configurator-core/src/webgl/configurator-scene-manager.d.ts +8 -0
- package/packages/web-sdk/packages/planner-core/src/roomle-planner.d.ts +3 -3
- package/packages/web-sdk/packages/planner-core/src/services/planner-kernel-access.d.ts +1 -0
- package/packages/web-sdk/packages/planner-core/src/utils/measurements.d.ts +38 -0
- package/packages/web-sdk/packages/planner-core/src/webgl/planner-scene-manager.d.ts +0 -2
- package/src/configurator/components/DimensionLabels.vue.d.ts +2 -0
- package/src/configurator/components/parameters/ParameterGroupButton.vue.d.ts +1 -1
- package/src/configurator/store/ui-state.d.ts +2 -0
- package/src/planner/components/overlays/product-settings/ProductRangeControl.vue.d.ts +1 -1
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
## [5.27.0-alpha.
|
|
1
|
+
## [5.27.0-alpha.3](https://github.com/roomle-dev/roomle-ui/compare/embedding-lib-v5.27.0-alpha.2...embedding-lib-v5.27.0-alpha.3) (2025-09-03)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
* core
|
|
8
|
-
* hi room information for order data ([3034df5](https://github.com/roomle-dev/roomle-ui/commit/3034df54a39680b5d58a66df06a60ca9a535f752))
|
|
9
|
-
* **core:** upgrade to version 2.58.1-alpha.1 ([1f144ee](https://github.com/roomle-dev/roomle-ui/commit/1f144ee761c1604a89abcd7f28b01df28656d288))
|
|
10
|
-
* **core:** upgrade to version 2.59.0-alpha.1 ([3021efa](https://github.com/roomle-dev/roomle-ui/commit/3021efabfa5aad20fef86c719b72f37faff5dd25))
|
|
11
|
-
* **core:** upgrade to version 2.59.0-alpha.2 ([327b2f2](https://github.com/roomle-dev/roomle-ui/commit/327b2f2f8430f7280b93345709e9e84b68350d61))
|
|
12
|
-
* **core:** upgrade to version 2.59.0-alpha.3 ([87d5a75](https://github.com/roomle-dev/roomle-ui/commit/87d5a75d9930face28c442598ed1ed506f52bc47))
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Bug Fixes
|
|
16
|
-
|
|
17
|
-
* update addons on "Add an element" ([a3768bc](https://github.com/roomle-dev/roomle-ui/commit/a3768bcf70d4b26ca11536179ae8642fbb0187f2))
|
|
6
|
+
* extend swap object to also take planElement id ([8959345](https://github.com/roomle-dev/roomle-ui/commit/89593451ce7225fdeadf319cc64e797f2c620ee8))
|
|
7
|
+
* **core:** upgrade to version 2.59.0-alpha.7 ([9b51309](https://github.com/roomle-dev/roomle-ui/commit/9b51309fe283b0f6f9adcdf25f3a30a9357bab14))
|
package/package.json
CHANGED
|
@@ -711,5 +711,12 @@ export default class RoomleConfigurator<P extends readonly PluginName[] = readon
|
|
|
711
711
|
* Resumes all input event listeners on the canvas.
|
|
712
712
|
*/
|
|
713
713
|
resumeInputListeners(): void;
|
|
714
|
+
/**
|
|
715
|
+
* Directly updates a component parameter.
|
|
716
|
+
* @param runtimeId - The runtime ID of the component to update.
|
|
717
|
+
* @param parameterKey - The key of the parameter to update.
|
|
718
|
+
* @param value - The new value to set for the parameter.
|
|
719
|
+
*/
|
|
720
|
+
updateComponentParameter(runtimeId: number, parameterKey: string, value: string): void;
|
|
714
721
|
}
|
|
715
722
|
export {};
|
package/packages/web-sdk/packages/configurator-core/src/services/configurator-ui-callback.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { RoomleComponent } from '../../../common-core/src/webgl/roomle-component
|
|
|
9
9
|
import { ConfiguratorDebugCallbacks } from '../configurator-debug-api';
|
|
10
10
|
import { CancelSelectionReasons } from '../../../typings/planner';
|
|
11
11
|
import { ExternalConfiguration } from '../../../typings/external-objects';
|
|
12
|
+
import { DimensionLabelsTransferable } from '../../../planner-core/src/utils/measurements';
|
|
12
13
|
|
|
13
14
|
export type ComponentAction = 'edit' | 'add';
|
|
14
15
|
export type ComponentType = 'preview' | 'component';
|
|
@@ -243,6 +244,7 @@ export default class ConfiguratorUiCallbacks extends UiCallback implements Confi
|
|
|
243
244
|
* @param rootComponentLabel
|
|
244
245
|
*/
|
|
245
246
|
onConfigurationLabelChange: (catalogName: string, rapiItemLabel: string, rootComponentLabel: string) => void;
|
|
247
|
+
onDimensionLabelsUpdated: (labels: DimensionLabelsTransferable | null) => void;
|
|
246
248
|
/**
|
|
247
249
|
* When kernel failed to load a mesh
|
|
248
250
|
*/
|
package/packages/web-sdk/packages/configurator-core/src/utils/component-dimensioning-helper.d.ts
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { RoomleComponent } from '../../../common-core/src/webgl/roomle-component-factory';
|
|
2
2
|
import { Context } from '../../../common-core/src/di/context';
|
|
3
|
-
import { PerspectiveCamera } from 'three';
|
|
3
|
+
import { OrthographicCamera, Vector3, PerspectiveCamera } from 'three';
|
|
4
|
+
import { Dimensioning, DimensioningAxis } from '../../../typings/kernel';
|
|
4
5
|
|
|
6
|
+
export interface DimensionLabelData {
|
|
7
|
+
id: string;
|
|
8
|
+
value: number;
|
|
9
|
+
level: number;
|
|
10
|
+
maxLevel: number;
|
|
11
|
+
dimensioning: Dimensioning;
|
|
12
|
+
axis: DimensioningAxis | undefined;
|
|
13
|
+
interactionKey?: string;
|
|
14
|
+
}
|
|
5
15
|
export default class ComponentDimensioningHelper implements Context {
|
|
6
16
|
_creator_: string;
|
|
7
17
|
private _plannerKernelAccess;
|
|
@@ -9,9 +19,28 @@ export default class ComponentDimensioningHelper implements Context {
|
|
|
9
19
|
private _camera;
|
|
10
20
|
private _activeComponents;
|
|
11
21
|
private _componentDimensioningsExist;
|
|
22
|
+
private _dimensionDataMap;
|
|
23
|
+
private _dimensionObjects;
|
|
24
|
+
private _lastCameraDirection;
|
|
25
|
+
private _regenerationThreshold;
|
|
12
26
|
constructor(creator: string);
|
|
27
|
+
regenerateDimensions(component: RoomleComponent, updateRenderer?: () => void): Promise<boolean>;
|
|
28
|
+
needsDimensionRegeneration(camera: PerspectiveCamera | OrthographicCamera): boolean;
|
|
13
29
|
setCamera(camera: PerspectiveCamera): void;
|
|
14
|
-
add(component: RoomleComponent, updateRenderer?: () => void): boolean
|
|
30
|
+
add(component: RoomleComponent, updateRenderer?: () => void): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Get dimension data for a component
|
|
33
|
+
*/
|
|
34
|
+
getDimensionData(componentId: number): DimensionLabelData[];
|
|
35
|
+
/**
|
|
36
|
+
* Extract label data from dimension objects
|
|
37
|
+
* This gets the actual calculated positions and values from the Three.js objects
|
|
38
|
+
*/
|
|
39
|
+
getLabelData(): DimensionLabelData[];
|
|
40
|
+
/**
|
|
41
|
+
* Get dimension objects to extract their current state
|
|
42
|
+
*/
|
|
43
|
+
getDimensionObjects(componentId: number): any[];
|
|
15
44
|
private _assembleDimensionings;
|
|
16
45
|
private _findAxis;
|
|
17
46
|
private _mapDimensioningToAxis;
|
|
@@ -22,4 +51,17 @@ export default class ComponentDimensioningHelper implements Context {
|
|
|
22
51
|
hasComponentDimensions(): boolean;
|
|
23
52
|
reset(): Promise<void>;
|
|
24
53
|
invalidateDimensioningsCache(componentRuntimeId?: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* Get all active components for iteration
|
|
56
|
+
*/
|
|
57
|
+
getActiveComponents(): RoomleComponent[];
|
|
58
|
+
updateDimensionVisibility(componentId: number): void;
|
|
59
|
+
/**
|
|
60
|
+
* Get the center of the main dimension line (not extension lines)
|
|
61
|
+
*/
|
|
62
|
+
getDimensionLineCenter(componentId: number, dimensionIndex: number): Vector3 | null;
|
|
63
|
+
/**
|
|
64
|
+
* Ensure dimension objects are ready
|
|
65
|
+
*/
|
|
66
|
+
ensureDimensionObjectsReady(componentId: number): void;
|
|
25
67
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RoomleComponent } from '../../../common-core/src/webgl/roomle-component-factory';
|
|
2
2
|
import { default as ConfiguratorSceneEventHandler } from '../webgl/configurator-scene-event-handler';
|
|
3
3
|
import { default as ConfiguratorViewModel } from '../../../common-core/src/view-model/configurator-view-model';
|
|
4
|
-
import { Object3D, PerspectiveCamera } from 'three';
|
|
4
|
+
import { Object3D, PerspectiveCamera, Vector3 } from 'three';
|
|
5
5
|
|
|
6
6
|
export default class ComponentRaycastHelper {
|
|
7
7
|
private _object;
|
|
@@ -20,4 +20,9 @@ export default class ComponentRaycastHelper {
|
|
|
20
20
|
areAllPreviewsVisible(configuratorViewModel: ConfiguratorViewModel): boolean;
|
|
21
21
|
areAllComponentsInFrustum(previews: RoomleComponent[]): boolean;
|
|
22
22
|
checkPreviewVisibility(configuratorViewModel: ConfiguratorViewModel): void;
|
|
23
|
+
isComponentMeasurementLabelOccluded(labelWorldPos: Vector3, component: RoomleComponent): boolean;
|
|
24
|
+
checkMultipleLabelOcclusion(labelPositions: Array<{
|
|
25
|
+
id: string;
|
|
26
|
+
worldPos: Vector3;
|
|
27
|
+
}>, component: RoomleComponent): Set<string>;
|
|
23
28
|
}
|
|
@@ -39,6 +39,7 @@ export default class DimensioningHelper {
|
|
|
39
39
|
removeFromObject(object: Object3D): void;
|
|
40
40
|
addToUiScene(uiScene: Scene): void;
|
|
41
41
|
removeFromUiScene(uiScene: Scene): void;
|
|
42
|
+
private _isCameraInsideOrTooClose;
|
|
42
43
|
private _getWidthEdge;
|
|
43
44
|
private _getDepthEdge;
|
|
44
45
|
private _getHeightEdge;
|
package/packages/web-sdk/packages/configurator-core/src/webgl/configurator-scene-manager.d.ts
CHANGED
|
@@ -22,12 +22,14 @@ import { default as CameraBehaviour3d } from '../../../common-core/src/cameracon
|
|
|
22
22
|
import { default as GlobalInitData } from '../../../common-core/src/utils/global-init-data';
|
|
23
23
|
import { CancelSelectionReasons } from '../../../typings/planner';
|
|
24
24
|
import { ExternalConfiguration } from '../../../typings/external-objects';
|
|
25
|
+
import { default as UnitFormatter } from '../services/unit-formatter';
|
|
25
26
|
|
|
26
27
|
export default class ConfiguratorSceneManager extends SceneManager implements ConfiguratorViewModelCallbackI {
|
|
27
28
|
_creator_: string;
|
|
28
29
|
private _configuratorInputManager;
|
|
29
30
|
private _configuratorMeshGenerator;
|
|
30
31
|
private _memoryManager;
|
|
32
|
+
protected _unitFormatter: UnitFormatter;
|
|
31
33
|
protected _configuratorContext: ConfiguratorContext;
|
|
32
34
|
private _componentDimensioningHelper;
|
|
33
35
|
private _configuratorHistory;
|
|
@@ -42,6 +44,7 @@ export default class ConfiguratorSceneManager extends SceneManager implements Co
|
|
|
42
44
|
private _sceneEventHandler;
|
|
43
45
|
private _currentComponent;
|
|
44
46
|
private _isComponentDimensionsVisible;
|
|
47
|
+
private _dimensionUpdateDebounced;
|
|
45
48
|
constructor(creator: string, offset: CanvasOffset, mode: Enumify<typeof CAMERA_TYPE>);
|
|
46
49
|
private _initOptionalModules;
|
|
47
50
|
protected _changeCameraBehaviour(cameraBehaviour: CameraBehaviour): void;
|
|
@@ -118,6 +121,11 @@ export default class ConfiguratorSceneManager extends SceneManager implements Co
|
|
|
118
121
|
showDimensions(): Promise<void>;
|
|
119
122
|
private _initDimensions;
|
|
120
123
|
hideDimensions(): void;
|
|
124
|
+
private _updateComponentDimensionLabels;
|
|
125
|
+
/**
|
|
126
|
+
* Resolve label collisions by hiding lower priority overlapping labels
|
|
127
|
+
*/
|
|
128
|
+
private _resolveCollisions;
|
|
121
129
|
loadSceneSettings(sceneSetting: SceneSettings): Promise<void>;
|
|
122
130
|
protected onCameraChanged(): void;
|
|
123
131
|
requestDockingsPreview(userInitiated: boolean, possibleChild?: UiPossibleChild, dragEvent?: DragEvent, dragIn?: boolean): void;
|
|
@@ -365,11 +365,11 @@ export default class RoomlePlanner<P extends readonly PluginName[] = readonly []
|
|
|
365
365
|
calcPartsPriceSum(partList: KernelPartList): Promise<KernelPartListPrice>;
|
|
366
366
|
/**
|
|
367
367
|
* Swap two plan objects in the scene in the same position for example swap two object variants
|
|
368
|
-
* @param old this is the current selected plan object
|
|
368
|
+
* @param old this is the current selected plan object (runtime ID number or PlanElementViewModel)
|
|
369
369
|
* @param idOfNew the RAPI id of the new plan object
|
|
370
|
-
* returns runtime ID of the new object
|
|
370
|
+
* @returns runtime ID of the new object
|
|
371
371
|
*/
|
|
372
|
-
swapObject(old: PlanElementViewModel, idOfNew: RapiId): Promise<number>;
|
|
372
|
+
swapObject(old: number | PlanElementViewModel, idOfNew: RapiId): Promise<number>;
|
|
373
373
|
exportImageFromCamera(filename?: string, shouldWaitForAssets?: boolean): Promise<void>;
|
|
374
374
|
exportCanvasScreenshot(quality?: number): Promise<string>;
|
|
375
375
|
/**
|
|
@@ -112,4 +112,5 @@ export default class PlannerKernelAccess extends ConfiguratorKernelAccess {
|
|
|
112
112
|
private _externalPlanComponentDeleted;
|
|
113
113
|
dockExternalObjectComponent(parentId: number, parentDockId: number, childId: number, childDockId: number): void;
|
|
114
114
|
configureExternalObjectApi(externalObjectSettings?: ExternalObjectApiConfiguration): Promise<void>;
|
|
115
|
+
setComponentParameter(componentId: number, interactionKey: string, newValue: any): void;
|
|
115
116
|
}
|
|
@@ -97,6 +97,30 @@ export interface DimensionDefinition<Vector2Type = Vector3 | Position2, Vector3T
|
|
|
97
97
|
isCurrentlyDrawn?: boolean;
|
|
98
98
|
attic?: AtticDimension<Vector2Type, Vector3Type>;
|
|
99
99
|
}
|
|
100
|
+
export interface DimensionLabelsTransferable {
|
|
101
|
+
labels: DimensionLabel[];
|
|
102
|
+
componentId: number;
|
|
103
|
+
}
|
|
104
|
+
export interface DimensionLabel {
|
|
105
|
+
id: string;
|
|
106
|
+
value: number;
|
|
107
|
+
formattedValue?: string;
|
|
108
|
+
position: {
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
};
|
|
112
|
+
level: number;
|
|
113
|
+
angle?: number;
|
|
114
|
+
maxLevel: number;
|
|
115
|
+
isVisible: boolean;
|
|
116
|
+
axisKey?: string;
|
|
117
|
+
interactionKey?: string | null;
|
|
118
|
+
direction?: {
|
|
119
|
+
x: number;
|
|
120
|
+
y: number;
|
|
121
|
+
z: number;
|
|
122
|
+
} | null;
|
|
123
|
+
}
|
|
100
124
|
export declare const transformMeasurement: (measurement: MeasurementBase<Vector3, Vector3>) => MeasurementBase<Position2, Position3>;
|
|
101
125
|
export declare const calculateWallPlanPoints: (planObject: WallPlanObject | ConstructionPlanObject, preferredSide: LeftOrRightWallSide) => {
|
|
102
126
|
from: Vector3;
|
|
@@ -118,3 +142,17 @@ export declare const getWallCenterPoints: (planViewModel: ConstructionPlanObject
|
|
|
118
142
|
wallFromCenterPoint: Vector3;
|
|
119
143
|
wallToCenterPoint: Vector3;
|
|
120
144
|
};
|
|
145
|
+
/**
|
|
146
|
+
* Check if two labels collide in screen space (Case of component dimensions labels)
|
|
147
|
+
*/
|
|
148
|
+
export declare const labelsCollide: (label1: {
|
|
149
|
+
position: {
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
};
|
|
153
|
+
}, label2: {
|
|
154
|
+
position: {
|
|
155
|
+
x: number;
|
|
156
|
+
y: number;
|
|
157
|
+
};
|
|
158
|
+
}, width: number, height: number, padding: number) => boolean;
|
|
@@ -13,7 +13,6 @@ import { CameraParameter } from '../../../common-core/src/cameracontrol/camera-c
|
|
|
13
13
|
import { default as PlanViewModel } from '../view-model/plan-view-model';
|
|
14
14
|
import { default as ConfiguratorSceneManager } from '../../../configurator-core/src/webgl/configurator-scene-manager';
|
|
15
15
|
import { default as WallPlanElementViewModel } from '../view-model/wall-plan-element-view-model';
|
|
16
|
-
import { default as UnitFormatter } from '../../../configurator-core/src/services/unit-formatter';
|
|
17
16
|
import { Enumify } from '../../../common-core/src/types';
|
|
18
17
|
import { Object3D, Box3 } from 'three';
|
|
19
18
|
import { CameraTarget, PrepareImageOptions } from '../../../common-core/src/webgl/image-renderer';
|
|
@@ -34,7 +33,6 @@ export default class PlannerSceneManager extends ConfiguratorSceneManager implem
|
|
|
34
33
|
private _plannerInputManager;
|
|
35
34
|
private _roomlePlannerUiCallback;
|
|
36
35
|
private _localStorageHelper;
|
|
37
|
-
protected _unitFormatter: UnitFormatter;
|
|
38
36
|
private _plannerSceneEventHandler;
|
|
39
37
|
private _roomlePlannerCallback;
|
|
40
38
|
private _itemsLoadingStatePromises;
|
|
@@ -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;
|
|
@@ -15,9 +15,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
15
15
|
adjustIcon?: boolean;
|
|
16
16
|
isSelected?: boolean;
|
|
17
17
|
}> & Readonly<{}>, {
|
|
18
|
+
isVisible: boolean;
|
|
18
19
|
onClick: () => void;
|
|
19
20
|
isSelected: boolean;
|
|
20
|
-
isVisible: boolean;
|
|
21
21
|
showText: boolean;
|
|
22
22
|
adjustIcon: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
|
|
@@ -9,6 +9,7 @@ import { RapiTagForUi } from '@roomle/web-sdk/typings/rapi-types';
|
|
|
9
9
|
import { GridViewVariantElement } from '../components/grid-view/-utils/GridViewHelper';
|
|
10
10
|
import { WallDimensionTransferable } from '@roomle/web-sdk/planner-core/src/view-model/wall-plan-element-view-model';
|
|
11
11
|
import { PlanObjectPosition } from '@roomle/web-sdk/typings/planner';
|
|
12
|
+
import { DimensionLabelsTransferable } from '@roomle/web-sdk/planner-core/src/utils/measurements';
|
|
12
13
|
|
|
13
14
|
export type EnsurePrefix<T extends string> = Record<string, `${T}${string}`>;
|
|
14
15
|
type UiStateIdentifier = EnsurePrefix<'UI_STATE_'>;
|
|
@@ -71,6 +72,7 @@ export interface UiState extends SharedUiState {
|
|
|
71
72
|
isInIframe: boolean;
|
|
72
73
|
firstTimeRoomView: boolean;
|
|
73
74
|
currentInteractionView: Enumify<typeof INTERACTION_VIEW_TYPE>;
|
|
75
|
+
dimensionLabels: Nullable<DimensionLabelsTransferable>;
|
|
74
76
|
}
|
|
75
77
|
export declare const UI_STATE_MUTATIONS: UiStateIdentifier;
|
|
76
78
|
export declare const UI_STATE_ACTIONS: UiStateIdentifier;
|
|
@@ -240,8 +240,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
240
240
|
isString: BooleanConstructor;
|
|
241
241
|
disabled: BooleanConstructor;
|
|
242
242
|
}>> & Readonly<{}>, {
|
|
243
|
-
disabled: boolean;
|
|
244
243
|
isString: boolean;
|
|
244
|
+
disabled: boolean;
|
|
245
245
|
}, {}, {
|
|
246
246
|
NumericInput: import('vue').DefineComponent<{
|
|
247
247
|
valueLabel: string;
|