@threekit-tools/treble 0.0.92 → 0.0.93
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/dist/Treble/Treble.d.ts +1 -1
- package/dist/Treble/Treble.js +4 -3
- package/dist/Treble/snapshots.d.ts +2 -2
- package/dist/Treble/snapshots.js +1 -1
- package/dist/Treble/wishlist.d.ts +1 -1
- package/dist/Treble/wishlist.js +1 -1
- package/dist/api/assets.d.ts +1 -0
- package/dist/api/{products.js → assets.js} +12 -33
- package/dist/api/catalog.js +1 -1
- package/dist/api/configurations.d.ts +1 -0
- package/dist/api/configurations.js +10 -3
- package/dist/api/datatables.js +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +2 -2
- package/dist/api/orders.js +1 -1
- package/dist/api/price.js +1 -1
- package/dist/components/AttributeTitle/index.d.ts +2 -2
- package/dist/components/AttributeValue/index.d.ts +2 -2
- package/dist/components/BreatheAnimation/index.js +1 -1
- package/dist/components/Button/index.d.ts +3 -3
- package/dist/components/Cards/index.d.ts +3 -3
- package/dist/components/DevTools/index.d.ts +2 -2
- package/dist/components/DraggableHint/draggableIndicator.styles.d.ts +1 -1
- package/dist/components/DraggableHint/index.d.ts +2 -2
- package/dist/components/Dropdown/index.d.ts +3 -3
- package/dist/components/FlatForm/index.d.ts +2 -2
- package/dist/components/FormComponentDescription/index.d.ts +1 -1
- package/dist/components/FormComponentTitle/index.d.ts +1 -1
- package/dist/components/Player/index.d.ts +9 -9
- package/dist/components/PlayerLoadingCircular/index.d.ts +2 -2
- package/dist/components/PlayerLoadingSpinner/index.d.ts +2 -2
- package/dist/components/PlayerLoadingSpinner/playerLoadingSpinner.styles.d.ts +1 -1
- package/dist/components/ProductDescription/index.d.ts +3 -3
- package/dist/components/ProductName/index.d.ts +3 -3
- package/dist/components/Share/index.d.ts +2 -2
- package/dist/components/Share/index.js +1 -1
- package/dist/components/Share/share.styles.d.ts +1 -1
- package/dist/components/Snapshots/index.d.ts +2 -2
- package/dist/components/Strips/index.d.ts +3 -3
- package/dist/components/Swatch/index.d.ts +3 -3
- package/dist/components/Switch/index.d.ts +3 -3
- package/dist/components/TextInput/index.d.ts +3 -3
- package/dist/components/ThreekitProvider/index.d.ts +6 -3
- package/dist/components/ThreekitProvider/index.js +27 -2
- package/dist/components/Tiles/index.d.ts +3 -3
- package/dist/components/TilesGroup/index.d.ts +3 -3
- package/dist/components/TotalPrice/index.d.ts +3 -3
- package/dist/components/TrebleApp/index.d.ts +3 -3
- package/dist/components/TurntableAnimation/index.js +1 -1
- package/dist/components/Upload/index.d.ts +3 -3
- package/dist/components/Upload/index.js +1 -1
- package/dist/components/UploadArea/index.d.ts +3 -3
- package/dist/components/UploadArea/index.js +1 -1
- package/dist/components/Wishlist/WishlistItem.d.ts +2 -2
- package/dist/components/Wishlist/index.d.ts +4 -4
- package/dist/components/Wishlist/index.js +1 -1
- package/dist/components/Zoom/index.d.ts +6 -6
- package/dist/components/containers/formInputContainer.d.ts +2 -2
- package/dist/components/formComponents.d.ts +6 -6
- package/dist/components/message/index.d.ts +1 -1
- package/dist/constants.d.ts +6 -6
- package/dist/hooks/useAttribute/index.d.ts +4 -4
- package/dist/hooks/useAttribute/index.js +3 -3
- package/dist/hooks/useConfigurationLoader/index.js +1 -1
- package/dist/hooks/useConfigurator/index.d.ts +3 -3
- package/dist/hooks/useConfigurator/index.js +3 -5
- package/dist/hooks/useDevTools/index.d.ts +1 -1
- package/dist/hooks/useNestedConfigurator/index.d.ts +2 -2
- package/dist/hooks/useNestedConfigurator/index.js +3 -3
- package/dist/hooks/usePlayer/index.d.ts +1 -1
- package/dist/hooks/usePlayerPortal/index.d.ts +1 -1
- package/dist/hooks/useProductCache/index.js +1 -1
- package/dist/hooks/useResetProduct/index.d.ts +1 -1
- package/dist/hooks/useResetProduct/index.js +1 -1
- package/dist/hooks/useRoomBuilder/RoomBuilderState.js +1 -1
- package/dist/hooks/useRoomBuilder/constants.js +2 -2
- package/dist/hooks/useRoomBuilder/themes.js +1 -1
- package/dist/hooks/useRoomBuilder/types.d.ts +7 -7
- package/dist/hooks/useRoomBuilder/types.js +5 -5
- package/dist/hooks/useRoomBuilder/validators.d.ts +1 -1
- package/dist/hooks/useShare/index.d.ts +1 -1
- package/dist/hooks/useShare/index.js +4 -2
- package/dist/hooks/useSingleAnimation/index.js +1 -1
- package/dist/hooks/useSnapshot/index.d.ts +1 -1
- package/dist/hooks/useWishlist/index.d.ts +1 -1
- package/dist/hooks/useZoom/index.d.ts +1 -1
- package/dist/http/assets.d.ts +2 -0
- package/dist/http/assets.js +16 -0
- package/dist/http/index.d.ts +2 -2
- package/dist/http/index.js +2 -2
- package/dist/http/orders.d.ts +1 -1
- package/dist/icons/Spinner.d.ts +2 -2
- package/dist/icons/types.d.ts +1 -1
- package/dist/store/attributes.d.ts +4 -4
- package/dist/store/attributes.js +2 -4
- package/dist/store/index.d.ts +6 -6
- package/dist/store/price.d.ts +1 -1
- package/dist/store/price.js +1 -1
- package/dist/store/product.d.ts +2 -2
- package/dist/store/product.js +1 -1
- package/dist/store/translations.d.ts +10 -8
- package/dist/store/translations.js +39 -19
- package/dist/store/treble.d.ts +1 -1
- package/dist/store/treble.js +1 -1
- package/dist/store/wishlist.d.ts +2 -2
- package/dist/store/wishlist.js +1 -1
- package/dist/types.d.ts +18 -17
- package/dist/types.js +9 -9
- package/dist/utils.d.ts +2 -6
- package/dist/utils.js +5 -12
- package/package.json +1 -2
- package/dist/Treble/snapshot.d.ts +0 -22
- package/dist/Treble/snapshot.js +0 -247
- package/dist/api/products.d.ts +0 -4
- package/dist/hooks/useSpaces/SpacesLayout.d.ts +0 -11
- package/dist/hooks/useSpaces/SpacesLayout.js +0 -74
- package/dist/hooks/useSpaces/SpacesState.d.ts +0 -164
- package/dist/hooks/useSpaces/SpacesState.js +0 -1751
- package/dist/hooks/useSpaces/constants.d.ts +0 -64
- package/dist/hooks/useSpaces/constants.js +0 -109
- package/dist/hooks/useSpaces/dataHandlers.d.ts +0 -20
- package/dist/hooks/useSpaces/dataHandlers.js +0 -254
- package/dist/hooks/useSpaces/draw/clearCanvas.d.ts +0 -2
- package/dist/hooks/useSpaces/draw/clearCanvas.js +0 -9
- package/dist/hooks/useSpaces/draw/drawBackground.d.ts +0 -2
- package/dist/hooks/useSpaces/draw/drawBackground.js +0 -12
- package/dist/hooks/useSpaces/draw/drawDimensions.d.ts +0 -3
- package/dist/hooks/useSpaces/draw/drawDimensions.js +0 -53
- package/dist/hooks/useSpaces/draw/drawDoors.d.ts +0 -9
- package/dist/hooks/useSpaces/draw/drawDoors.js +0 -99
- package/dist/hooks/useSpaces/draw/drawFloor.d.ts +0 -3
- package/dist/hooks/useSpaces/draw/drawFloor.js +0 -36
- package/dist/hooks/useSpaces/draw/drawGrid.d.ts +0 -3
- package/dist/hooks/useSpaces/draw/drawGrid.js +0 -33
- package/dist/hooks/useSpaces/draw/drawGuides.d.ts +0 -3
- package/dist/hooks/useSpaces/draw/drawGuides.js +0 -23
- package/dist/hooks/useSpaces/draw/drawOpenings.d.ts +0 -9
- package/dist/hooks/useSpaces/draw/drawOpenings.js +0 -72
- package/dist/hooks/useSpaces/draw/drawVertices.d.ts +0 -8
- package/dist/hooks/useSpaces/draw/drawVertices.js +0 -61
- package/dist/hooks/useSpaces/draw/drawWalls.d.ts +0 -10
- package/dist/hooks/useSpaces/draw/drawWalls.js +0 -88
- package/dist/hooks/useSpaces/draw/drawWindows.d.ts +0 -9
- package/dist/hooks/useSpaces/draw/drawWindows.js +0 -82
- package/dist/hooks/useSpaces/draw/index.d.ts +0 -11
- package/dist/hooks/useSpaces/draw/index.js +0 -129
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.js +0 -13
- package/dist/hooks/useSpaces/geometry/areLinesEqual.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/areLinesEqual.js +0 -17
- package/dist/hooks/useSpaces/geometry/arePointsEqual.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/arePointsEqual.js +0 -8
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.js +0 -11
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.js +0 -13
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.d.ts +0 -2
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.js +0 -16
- package/dist/hooks/useSpaces/geometry/euclideanMod.d.ts +0 -2
- package/dist/hooks/useSpaces/geometry/euclideanMod.js +0 -6
- package/dist/hooks/useSpaces/geometry/findLoops.d.ts +0 -6
- package/dist/hooks/useSpaces/geometry/findLoops.js +0 -117
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.d.ts +0 -6
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.js +0 -23
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.js +0 -7
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.js +0 -17
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.js +0 -10
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.js +0 -7
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.js +0 -17
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.js +0 -11
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.js +0 -43
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.js +0 -9
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.js +0 -20
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.js +0 -11
- package/dist/hooks/useSpaces/geometry/getPolygonArea.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getPolygonArea.js +0 -15
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.js +0 -16
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.d.ts +0 -6
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.js +0 -17
- package/dist/hooks/useSpaces/geometry/getTriangleArea.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getTriangleArea.js +0 -9
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.js +0 -12
- package/dist/hooks/useSpaces/geometry/index.d.ts +0 -30
- package/dist/hooks/useSpaces/geometry/index.js +0 -64
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.js +0 -21
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.js +0 -25
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.js +0 -11
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.js +0 -12
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.js +0 -9
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.d.ts +0 -3
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.js +0 -28
- package/dist/hooks/useSpaces/index.d.ts +0 -82
- package/dist/hooks/useSpaces/index.js +0 -482
- package/dist/hooks/useSpaces/themes/blueprint.d.ts +0 -3
- package/dist/hooks/useSpaces/themes/blueprint.js +0 -96
- package/dist/hooks/useSpaces/themes/default.d.ts +0 -3
- package/dist/hooks/useSpaces/themes/default.js +0 -96
- package/dist/hooks/useSpaces/themes/index.d.ts +0 -11
- package/dist/hooks/useSpaces/themes/index.js +0 -21
- package/dist/hooks/useSpaces/themes/light.d.ts +0 -3
- package/dist/hooks/useSpaces/themes/light.js +0 -96
- package/dist/hooks/useSpaces/types.d.ts +0 -339
- package/dist/hooks/useSpaces/types.js +0 -54
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.js +0 -61
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.js +0 -42
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.js +0 -52
- package/dist/hooks/useSpaces/validators/areWallsTooShort.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/areWallsTooShort.js +0 -37
- package/dist/hooks/useSpaces/validators/index.d.ts +0 -15
- package/dist/hooks/useSpaces/validators/index.js +0 -40
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.js +0 -31
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.js +0 -19
- package/dist/hooks/useSpaces/validators/isLineTooShort.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isLineTooShort.js +0 -26
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.d.ts +0 -4
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.js +0 -19
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.js +0 -19
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.js +0 -41
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.js +0 -54
- package/dist/hooks/useSpaces/validators/isWallTooShort.d.ts +0 -3
- package/dist/hooks/useSpaces/validators/isWallTooShort.js +0 -10
- package/dist/hooks/useSpaces/validators/messaging.d.ts +0 -8
- package/dist/hooks/useSpaces/validators/messaging.js +0 -18
- package/dist/http/products.d.ts +0 -1
- package/dist/http/products.js +0 -12
- package/dist/icons/AngleSnapping.d.ts +0 -3
- package/dist/icons/AngleSnapping.js +0 -28
- package/dist/icons/Center.d.ts +0 -3
- package/dist/icons/Center.js +0 -24
- package/dist/icons/GridSnapping.d.ts +0 -3
- package/dist/icons/GridSnapping.js +0 -28
- package/dist/icons/LayoutAlt.d.ts +0 -3
- package/dist/icons/LayoutAlt.js +0 -21
- package/dist/icons/Magnet.d.ts +0 -3
- package/dist/icons/Magnet.js +0 -27
- package/dist/icons/Player3D.d.ts +0 -3
- package/dist/icons/Player3D.js +0 -21
- package/dist/icons/Ruler copy.d.ts +0 -3
- package/dist/icons/Ruler copy.js +0 -22
- package/dist/icons/RulerBlank.d.ts +0 -3
- package/dist/icons/RulerBlank.js +0 -25
- package/dist/icons/RulerDetailed copy.d.ts +0 -3
- package/dist/icons/RulerDetailed copy.js +0 -27
- package/dist/icons/RulerDetailed.d.ts +0 -3
- package/dist/icons/RulerDetailed.js +0 -27
- package/dist/icons/Save.d.ts +0 -3
- package/dist/icons/Save.js +0 -21
- package/dist/icons/UnitCm.d.ts +0 -3
- package/dist/icons/UnitCm.js +0 -22
- package/dist/icons/UnitFeet.d.ts +0 -3
- package/dist/icons/UnitFeet.js +0 -22
- package/dist/icons/UnitInch.d.ts +0 -3
- package/dist/icons/UnitInch.js +0 -22
- package/dist/icons/UnitMeter.d.ts +0 -3
- package/dist/icons/UnitMeter.js +0 -21
- package/dist/store/spaces.d.ts +0 -47
- package/dist/store/spaces.js +0 -197
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type ICoordinate2D = [x: number, y: number];
|
|
2
|
+
export type ICoordinate3D = [x: number, y: number, z: number];
|
|
3
|
+
export type ICoordinatesLine = [
|
|
4
4
|
startPoint: ICoordinate2D,
|
|
5
5
|
endPoint: ICoordinate2D
|
|
6
6
|
];
|
|
7
|
-
export
|
|
7
|
+
export type ICoordinatesQuadrilateral = [
|
|
8
8
|
point1: ICoordinate2D,
|
|
9
9
|
point2: ICoordinate2D,
|
|
10
10
|
point3: ICoordinate2D,
|
|
@@ -18,8 +18,8 @@ export declare enum IElements {
|
|
|
18
18
|
DOOR = "doors",
|
|
19
19
|
OPENING = "openings"
|
|
20
20
|
}
|
|
21
|
-
export
|
|
22
|
-
export
|
|
21
|
+
export type IFeatureName = IElements.WINDOW | IElements.DOOR | IElements.OPENING;
|
|
22
|
+
export type IElementName = IElements.WALL | IElements.VERTEX | IFeatureName;
|
|
23
23
|
export interface IWall {
|
|
24
24
|
assetId: string;
|
|
25
25
|
line: ICoordinatesLine;
|
|
@@ -179,7 +179,7 @@ export interface ISnapPointFeature extends ISnapPointShared<IFeatureName> {
|
|
|
179
179
|
}
|
|
180
180
|
export interface ISnapPointAngle extends Omit<ISnapPointShared<'Angle'>, 'index'> {
|
|
181
181
|
}
|
|
182
|
-
export
|
|
182
|
+
export type ISnapPoint = ISnapPointVertex | ISnapPointWall | ISnapPointFeature | ISnapPointAngle;
|
|
183
183
|
export interface IActiveElement extends IElementAddress {
|
|
184
184
|
snapPoint?: ISnapPoint;
|
|
185
185
|
}
|
|
@@ -9,28 +9,28 @@ var IElements;
|
|
|
9
9
|
IElements["WINDOW"] = "windows";
|
|
10
10
|
IElements["DOOR"] = "doors";
|
|
11
11
|
IElements["OPENING"] = "openings";
|
|
12
|
-
})(IElements
|
|
12
|
+
})(IElements || (exports.IElements = IElements = {}));
|
|
13
13
|
var IElementStyleModes;
|
|
14
14
|
(function (IElementStyleModes) {
|
|
15
15
|
IElementStyleModes["HIGHLIGHT"] = "highlight";
|
|
16
16
|
IElementStyleModes["ACTIVE"] = "active";
|
|
17
17
|
IElementStyleModes["ERROR"] = "error";
|
|
18
|
-
})(IElementStyleModes
|
|
18
|
+
})(IElementStyleModes || (exports.IElementStyleModes = IElementStyleModes = {}));
|
|
19
19
|
var IErrorTypes;
|
|
20
20
|
(function (IErrorTypes) {
|
|
21
21
|
IErrorTypes["HARD"] = "hard";
|
|
22
22
|
IErrorTypes["SOFT"] = "soft";
|
|
23
23
|
IErrorTypes["WARN"] = "warning";
|
|
24
|
-
})(IErrorTypes
|
|
24
|
+
})(IErrorTypes || (exports.IErrorTypes = IErrorTypes = {}));
|
|
25
25
|
var IModes;
|
|
26
26
|
(function (IModes) {
|
|
27
27
|
IModes["SELECT"] = "select";
|
|
28
28
|
IModes["DRAW"] = "draw";
|
|
29
|
-
})(IModes
|
|
29
|
+
})(IModes || (exports.IModes = IModes = {}));
|
|
30
30
|
var IUnits;
|
|
31
31
|
(function (IUnits) {
|
|
32
32
|
IUnits["FEET"] = "feet";
|
|
33
33
|
IUnits["METER"] = "meter";
|
|
34
34
|
IUnits["INCH"] = "inch";
|
|
35
35
|
IUnits["CM"] = "cm";
|
|
36
|
-
})(IUnits
|
|
36
|
+
})(IUnits || (exports.IUnits = IUnits = {}));
|
|
@@ -20,7 +20,7 @@ export interface IMoveVertexValidatorInput {
|
|
|
20
20
|
vertex: IVertex;
|
|
21
21
|
features: IFeatures;
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
type IValidatorFunction<T> = (input: T) => false | IErrorElement;
|
|
24
24
|
export declare function isWallTooShort(input: IAddWallValidatorInput): false | IErrorElement;
|
|
25
25
|
export declare function isWallIntersectingFeature(input: IAddWallValidatorInput): false | IErrorElement;
|
|
26
26
|
export declare function isWallOverlappingExisitingWalls(input: IAddWallValidatorInput): false | IErrorElement;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -53,7 +53,9 @@ var useShare = function () {
|
|
|
53
53
|
var configuration;
|
|
54
54
|
return __generator(this, function (_a) {
|
|
55
55
|
switch (_a.label) {
|
|
56
|
-
case 0: return [4, window.threekit.treble.saveConfiguration(
|
|
56
|
+
case 0: return [4, window.threekit.treble.saveConfiguration({
|
|
57
|
+
creator: 'threekit share button',
|
|
58
|
+
})];
|
|
57
59
|
case 1:
|
|
58
60
|
configuration = _a.sent();
|
|
59
61
|
if (!configuration)
|
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ISnapshotsCameras, ITakeSnapshotsConfig } from '../../Treble';
|
|
2
|
-
declare const useSnapshot: (cameras: ISnapshotsCameras, config: ITakeSnapshotsConfig) => (() => Promise<void | string[] |
|
|
2
|
+
declare const useSnapshot: (cameras: ISnapshotsCameras, config: ITakeSnapshotsConfig) => (() => Promise<void | string[] | File[] | Blob[] | null>) | undefined;
|
|
3
3
|
export default useSnapshot;
|
|
@@ -5,7 +5,7 @@ interface HydratedWishlistItem extends IConfigurationResponse {
|
|
|
5
5
|
handleRemove: () => void;
|
|
6
6
|
handleShare: () => void;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
type UseWishlistHook = [
|
|
9
9
|
Array<HydratedWishlistItem>,
|
|
10
10
|
(config?: Omit<ISaveConfiguration, 'configuration'>) => void,
|
|
11
11
|
() => void
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getTranslationsForLocale = void 0;
|
|
7
|
+
var request_1 = __importDefault(require("./request"));
|
|
8
|
+
var ASSETS_API_ROUTE = "/api/assets";
|
|
9
|
+
var getTranslationsForLocale = function (locale) {
|
|
10
|
+
return request_1.default.get({
|
|
11
|
+
url: "".concat(ASSETS_API_ROUTE, "/translations"),
|
|
12
|
+
params: { locale: locale },
|
|
13
|
+
includeOrgId: true,
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
exports.getTranslationsForLocale = getTranslationsForLocale;
|
package/dist/http/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import * as assets from './assets';
|
|
1
2
|
import * as orders from './orders';
|
|
2
|
-
import * as products from './products';
|
|
3
3
|
import * as configurations from './configurations';
|
|
4
4
|
import * as pricebook from './pricebook';
|
|
5
5
|
import * as catalog from './catalog';
|
|
6
6
|
import * as datatables from './datatables';
|
|
7
7
|
import * as server from './server';
|
|
8
8
|
declare const _default: {
|
|
9
|
+
assets: typeof assets;
|
|
9
10
|
orders: typeof orders;
|
|
10
|
-
products: typeof products;
|
|
11
11
|
configurations: typeof configurations;
|
|
12
12
|
pricebook: typeof pricebook;
|
|
13
13
|
catalog: typeof catalog;
|
package/dist/http/index.js
CHANGED
|
@@ -23,16 +23,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
var assets = __importStar(require("./assets"));
|
|
26
27
|
var orders = __importStar(require("./orders"));
|
|
27
|
-
var products = __importStar(require("./products"));
|
|
28
28
|
var configurations = __importStar(require("./configurations"));
|
|
29
29
|
var pricebook = __importStar(require("./pricebook"));
|
|
30
30
|
var catalog = __importStar(require("./catalog"));
|
|
31
31
|
var datatables = __importStar(require("./datatables"));
|
|
32
32
|
var server = __importStar(require("./server"));
|
|
33
33
|
exports.default = {
|
|
34
|
+
assets: assets,
|
|
34
35
|
orders: orders,
|
|
35
|
-
products: products,
|
|
36
36
|
configurations: configurations,
|
|
37
37
|
pricebook: pricebook,
|
|
38
38
|
catalog: catalog,
|
package/dist/http/orders.d.ts
CHANGED
package/dist/icons/Spinner.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface ISpinnerProps {
|
|
3
3
|
size?: string;
|
|
4
4
|
thickness?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function Spinner(props: ISpinnerProps): JSX.Element;
|
|
6
|
+
declare function Spinner(props: ISpinnerProps): React.JSX.Element;
|
|
7
7
|
declare namespace Spinner {
|
|
8
8
|
var iconName: string;
|
|
9
9
|
}
|
package/dist/icons/types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
2
|
import { ISetConfiguration, IThreekitDisplayAttribute } from '../types';
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
3
|
+
import { ITranslationsMap } from '../http/assets';
|
|
4
|
+
export type AttributesState = Record<string, IThreekitDisplayAttribute>;
|
|
5
5
|
export declare const setAttributes: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[attributes: IThreekitDisplayAttribute[]], Record<string, IThreekitDisplayAttribute>, "treble/attributes/set-attributes", never, never>;
|
|
6
|
-
declare const reducer: import("redux").Reducer<AttributesState
|
|
6
|
+
declare const reducer: import("redux").Reducer<AttributesState>;
|
|
7
7
|
export declare const getAttributes: (state: RootState) => AttributesState;
|
|
8
8
|
export declare const getHydrationData: ((state: {
|
|
9
9
|
treble: import("./treble").TrebleState;
|
|
@@ -12,7 +12,7 @@ export declare const getHydrationData: ((state: {
|
|
|
12
12
|
translations: import("./translations").TranslationsState;
|
|
13
13
|
wishlist: import("../Treble").WishlistArray;
|
|
14
14
|
price: import("./price").PriceState;
|
|
15
|
-
}) => [Record<string, IThreekitDisplayAttribute>,
|
|
15
|
+
}) => readonly [Record<string, IThreekitDisplayAttribute>, ITranslationsMap]) & import("reselect").OutputSelectorFields<(args_0: AttributesState, args_1: ITranslationsMap) => readonly [Record<string, IThreekitDisplayAttribute>, ITranslationsMap], {
|
|
16
16
|
clearCache: () => void;
|
|
17
17
|
}> & {
|
|
18
18
|
clearCache: () => void;
|
package/dist/store/attributes.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -67,9 +67,7 @@ var reducer = (0, toolkit_1.createSlice)({
|
|
|
67
67
|
}).reducer;
|
|
68
68
|
var getAttributes = function (state) { return state.attributes; };
|
|
69
69
|
exports.getAttributes = getAttributes;
|
|
70
|
-
exports.getHydrationData = (0, toolkit_1.createSelector)(exports.getAttributes, translations_1.
|
|
71
|
-
return [attributes, translations_1.TRANSLATIONS, language];
|
|
72
|
-
});
|
|
70
|
+
exports.getHydrationData = (0, toolkit_1.createSelector)(exports.getAttributes, translations_1.getTranslations, function (attributes, translations) { return [attributes, translations]; });
|
|
73
71
|
var setConfiguration = function (config) { return function (dispatch) { return __awaiter(void 0, void 0, void 0, function () {
|
|
74
72
|
return __generator(this, function (_a) {
|
|
75
73
|
switch (_a.label) {
|
package/dist/store/index.d.ts
CHANGED
|
@@ -14,14 +14,14 @@ declare const store: import("@reduxjs/toolkit/dist/configureStore").ToolkitStore
|
|
|
14
14
|
translations: import("./translations").TranslationsState;
|
|
15
15
|
wishlist: import("../Treble").WishlistArray;
|
|
16
16
|
price: import("./price").PriceState;
|
|
17
|
-
}, import("redux").AnyAction
|
|
17
|
+
}, import("redux").AnyAction>]> | import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
18
18
|
treble: import("./treble").TrebleState;
|
|
19
19
|
product: import("./product").ProductState;
|
|
20
20
|
attributes: import("./attributes").AttributesState;
|
|
21
21
|
translations: import("./translations").TranslationsState;
|
|
22
22
|
wishlist: import("../Treble").WishlistArray;
|
|
23
23
|
price: import("./price").PriceState;
|
|
24
|
-
}, import("redux").AnyAction
|
|
24
|
+
}, import("redux").AnyAction>, import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>]>>;
|
|
25
25
|
export declare const createStore: (reducer?: Record<string, Reducer>) => import("@reduxjs/toolkit/dist/configureStore").ToolkitStore<{
|
|
26
26
|
treble: import("./treble").TrebleState;
|
|
27
27
|
product: import("./product").ProductState;
|
|
@@ -36,16 +36,16 @@ export declare const createStore: (reducer?: Record<string, Reducer>) => import(
|
|
|
36
36
|
translations: import("./translations").TranslationsState;
|
|
37
37
|
wishlist: import("../Treble").WishlistArray;
|
|
38
38
|
price: import("./price").PriceState;
|
|
39
|
-
}, import("redux").AnyAction
|
|
39
|
+
}, import("redux").AnyAction>]> | import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<{
|
|
40
40
|
treble: import("./treble").TrebleState;
|
|
41
41
|
product: import("./product").ProductState;
|
|
42
42
|
attributes: import("./attributes").AttributesState;
|
|
43
43
|
translations: import("./translations").TranslationsState;
|
|
44
44
|
wishlist: import("../Treble").WishlistArray;
|
|
45
45
|
price: import("./price").PriceState;
|
|
46
|
-
}, import("redux").AnyAction
|
|
47
|
-
export
|
|
48
|
-
export
|
|
46
|
+
}, import("redux").AnyAction>, import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>]>>;
|
|
47
|
+
export type RootState = ReturnType<typeof store.getState>;
|
|
48
|
+
export type ThreekitDispatch = typeof store.dispatch;
|
|
49
49
|
export declare const useThreekitDispatch: () => import("@reduxjs/toolkit").ThunkDispatch<{
|
|
50
50
|
treble: import("./treble").TrebleState;
|
|
51
51
|
product: import("./product").ProductState;
|
package/dist/store/price.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface PriceState {
|
|
|
15
15
|
export declare const setPriceConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<IPriceConfig, string>;
|
|
16
16
|
export declare const setPrice: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>;
|
|
17
17
|
export declare const initPrice: () => (dispatch: ThreekitDispatch) => Promise<void>;
|
|
18
|
-
declare const reducer: import("redux").Reducer<PriceState
|
|
18
|
+
declare const reducer: import("redux").Reducer<PriceState>;
|
|
19
19
|
export declare const getPrice: (state: RootState) => undefined | IPrice;
|
|
20
20
|
export declare const getPriceConfig: (state: RootState) => undefined | IPriceConfig;
|
|
21
21
|
export declare const updatePrice: () => (dispatch: ThreekitDispatch, getState: () => RootState) => void;
|
package/dist/store/price.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/store/product.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface LoadProductConfig {
|
|
|
16
16
|
export interface CachedProductState extends Pick<CachedProduct, 'id' | 'name' | 'label' | 'thumbnail'> {
|
|
17
17
|
data: string;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
type IEnvConfig = Record<string, Partial<IProduct>>;
|
|
20
20
|
export interface IHydratedProducts extends Record<string, IEnvConfig> {
|
|
21
21
|
}
|
|
22
22
|
export interface ProductState {
|
|
@@ -36,7 +36,7 @@ export declare const removeFromCache: import("@reduxjs/toolkit").ActionCreatorWi
|
|
|
36
36
|
export declare const setActiveCacheIdx: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>;
|
|
37
37
|
export declare const incrementActiveCacheIdx: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<undefined, string>;
|
|
38
38
|
export declare const decrementActiveCacheIdx: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<undefined, string>;
|
|
39
|
-
declare const reducer: import("redux").Reducer<ProductState
|
|
39
|
+
declare const reducer: import("redux").Reducer<ProductState>;
|
|
40
40
|
export declare const getProductId: (state: RootState) => undefined | string;
|
|
41
41
|
export declare const getName: (state: RootState) => undefined | string;
|
|
42
42
|
export declare const getMetadata: (state: RootState) => undefined | IMetadata;
|
package/dist/store/product.js
CHANGED
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
|
-
import {
|
|
2
|
+
import { ITranslationsMap } from '../http/assets';
|
|
3
3
|
export interface TranslationsState {
|
|
4
|
-
|
|
4
|
+
locale: string | undefined;
|
|
5
|
+
translationsMap: ITranslationsMap;
|
|
5
6
|
}
|
|
6
|
-
export declare
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const initTranslations: (
|
|
9
|
-
declare const reducer: import("redux").Reducer<TranslationsState
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
7
|
+
export declare const setLocale: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, string>;
|
|
8
|
+
export declare const setTranslationsMap: import("@reduxjs/toolkit").ActionCreatorWithPayload<ITranslationsMap, string>;
|
|
9
|
+
export declare const initTranslations: (locale?: string) => (dispatch: ThreekitDispatch) => Promise<void>;
|
|
10
|
+
declare const reducer: import("redux").Reducer<TranslationsState>;
|
|
11
|
+
export declare const getLocale: (state: RootState) => undefined | string;
|
|
12
|
+
export declare const getTranslations: (state: RootState) => ITranslationsMap;
|
|
13
|
+
export declare const setTranslationForLocale: (locale: string | null) => (dispatch: ThreekitDispatch, getState: () => RootState) => void;
|
|
12
14
|
export default reducer;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -39,44 +39,64 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.
|
|
42
|
+
exports.setTranslationForLocale = exports.getTranslations = exports.getLocale = exports.initTranslations = exports.setTranslationsMap = exports.setLocale = void 0;
|
|
43
43
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
44
44
|
var api_1 = __importDefault(require("../api"));
|
|
45
|
-
exports.
|
|
46
|
-
|
|
45
|
+
exports.setLocale = (0, toolkit_1.createAction)('treble/translations/set-locale');
|
|
46
|
+
exports.setTranslationsMap = (0, toolkit_1.createAction)('treble/translations/set-translations-map');
|
|
47
|
+
var initTranslations = function (locale) { return function (dispatch) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
+
var translations;
|
|
47
49
|
return __generator(this, function (_a) {
|
|
48
50
|
switch (_a.label) {
|
|
49
|
-
case 0:
|
|
51
|
+
case 0:
|
|
52
|
+
if (!locale)
|
|
53
|
+
return [2];
|
|
54
|
+
return [4, api_1.default.assets.fetchTranslations(locale)];
|
|
50
55
|
case 1:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
translations = _a.sent();
|
|
57
|
+
dispatch((0, exports.setLocale)(locale));
|
|
58
|
+
dispatch((0, exports.setTranslationsMap)(translations));
|
|
54
59
|
return [2];
|
|
55
60
|
}
|
|
56
61
|
});
|
|
57
62
|
}); }; };
|
|
58
63
|
exports.initTranslations = initTranslations;
|
|
59
64
|
var initialState = {
|
|
60
|
-
|
|
65
|
+
locale: undefined,
|
|
66
|
+
translationsMap: {},
|
|
61
67
|
};
|
|
62
68
|
var reducer = (0, toolkit_1.createSlice)({
|
|
63
69
|
name: 'translations',
|
|
64
70
|
initialState: initialState,
|
|
65
71
|
extraReducers: function (builder) {
|
|
66
|
-
builder
|
|
67
|
-
|
|
72
|
+
builder
|
|
73
|
+
.addCase(exports.setLocale, function (state, action) {
|
|
74
|
+
state.locale = action.payload;
|
|
75
|
+
})
|
|
76
|
+
.addCase(exports.setTranslationsMap, function (state, action) {
|
|
77
|
+
state.translationsMap = action.payload;
|
|
68
78
|
});
|
|
69
79
|
},
|
|
70
80
|
reducers: {},
|
|
71
81
|
}).reducer;
|
|
72
|
-
var
|
|
73
|
-
return state.translations.
|
|
82
|
+
var getLocale = function (state) {
|
|
83
|
+
return state.translations.locale;
|
|
74
84
|
};
|
|
75
|
-
exports.
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
return [];
|
|
79
|
-
return Object.keys(Object.values(exports.TRANSLATIONS)[0]);
|
|
85
|
+
exports.getLocale = getLocale;
|
|
86
|
+
var getTranslations = function (state) {
|
|
87
|
+
return state.translations.translationsMap;
|
|
80
88
|
};
|
|
81
|
-
exports.
|
|
89
|
+
exports.getTranslations = getTranslations;
|
|
90
|
+
var setTranslationForLocale = function (locale) {
|
|
91
|
+
return function (dispatch, getState) {
|
|
92
|
+
if (!locale) {
|
|
93
|
+
dispatch((0, exports.setLocale)(undefined));
|
|
94
|
+
dispatch((0, exports.setTranslationsMap)({}));
|
|
95
|
+
}
|
|
96
|
+
if (locale === getState().translations.locale)
|
|
97
|
+
return;
|
|
98
|
+
dispatch((0, exports.initTranslations)(locale !== null && locale !== void 0 ? locale : undefined));
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
exports.setTranslationForLocale = setTranslationForLocale;
|
|
82
102
|
exports.default = reducer;
|
package/dist/store/treble.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export declare const setPlayerElement: import("@reduxjs/toolkit").ActionCreatorW
|
|
|
56
56
|
export declare const reloadTreble: import("@reduxjs/toolkit").ActionCreatorWithPayload<Partial<TrebleState>, string>;
|
|
57
57
|
export declare const updateLoadingProgress: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, string>;
|
|
58
58
|
export declare const setPlayerInteraction: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, string>;
|
|
59
|
-
declare const reducer: import("redux").Reducer<TrebleState
|
|
59
|
+
declare const reducer: import("redux").Reducer<TrebleState>;
|
|
60
60
|
export declare const getThreekitEnv: (state: RootState) => string;
|
|
61
61
|
export declare const isThreekitInitialized: (state: RootState) => boolean;
|
|
62
62
|
export declare const isFirstRenderComplete: (state: RootState) => boolean;
|
package/dist/store/treble.js
CHANGED
|
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
25
25
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
26
|
function step(op) {
|
|
27
27
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (_) try {
|
|
28
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
29
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
30
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
31
|
switch (op[0]) {
|
package/dist/store/wishlist.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
2
|
import { WishlistArray } from '../Treble';
|
|
3
3
|
import { ISaveConfiguration } from '../api/configurations';
|
|
4
|
-
export
|
|
4
|
+
export type WishlistState = WishlistArray;
|
|
5
5
|
export declare const refreshWishlist: import("@reduxjs/toolkit").AsyncThunk<import("../http/configurations").IConfigurationResponse[], void, {
|
|
6
6
|
state?: unknown;
|
|
7
7
|
dispatch?: import("redux").Dispatch<import("redux").AnyAction> | undefined;
|
|
@@ -24,7 +24,7 @@ export declare const addToWishlist: import("@reduxjs/toolkit").AsyncThunk<import
|
|
|
24
24
|
}>;
|
|
25
25
|
export declare const clearWishlist: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], import("../http/configurations").IConfigurationResponse[], "treble/wishlist/clear", never, never>;
|
|
26
26
|
export declare const removeFromWishlist: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[idx: number], import("../http/configurations").IConfigurationResponse[], "treble/wishlist/remove-item", never, never>;
|
|
27
|
-
declare const reducer: import("redux").Reducer<WishlistArray
|
|
27
|
+
declare const reducer: import("redux").Reducer<WishlistArray>;
|
|
28
28
|
export declare const getWishlist: (state: RootState) => WishlistArray;
|
|
29
29
|
export declare const resumeFromWishlist: (idx: number) => (_: ThreekitDispatch, getState: () => RootState) => void;
|
|
30
30
|
export default reducer;
|
package/dist/store/wishlist.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/dist/types.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare enum SNAPSHOT_OUTPUTS {
|
|
|
46
46
|
BLOB = "blob",
|
|
47
47
|
FILE = "file"
|
|
48
48
|
}
|
|
49
|
-
export
|
|
49
|
+
export type IMetadata = Record<string, string | number | null>;
|
|
50
50
|
export interface ISceneQueryShared {
|
|
51
51
|
all?: boolean;
|
|
52
52
|
id?: string;
|
|
@@ -79,7 +79,7 @@ export interface ISceneQueryTransform extends ISceneQueryShared {
|
|
|
79
79
|
plug: PLUG_TYPES.TRANSFORM;
|
|
80
80
|
property: TRANSFORM_PROPERTY_TYPES;
|
|
81
81
|
}
|
|
82
|
-
export
|
|
82
|
+
export type ISceneQuery = ISceneQueryNode | ISceneQueryTransform | string;
|
|
83
83
|
export interface ISceneResult {
|
|
84
84
|
id: string;
|
|
85
85
|
name: string;
|
|
@@ -97,9 +97,9 @@ export interface IConfigurationColor {
|
|
|
97
97
|
g: number;
|
|
98
98
|
b: number;
|
|
99
99
|
}
|
|
100
|
-
export
|
|
101
|
-
export
|
|
102
|
-
export
|
|
100
|
+
export type IConfigurationAttribute = IConfigurationAsset | IConfigurationArray | IConfigurationColor | string | number | boolean | undefined;
|
|
101
|
+
export type IConfiguration = Record<string, IConfigurationAttribute>;
|
|
102
|
+
export type ISetConfiguration = Record<string, IConfigurationAttribute>;
|
|
103
103
|
interface IDisplayAttributeConfig {
|
|
104
104
|
includeHidden?: boolean;
|
|
105
105
|
}
|
|
@@ -135,9 +135,9 @@ export interface IAttributeAssetBase<V> extends IAttributeBase<ATTRIBUTE_TYPES.A
|
|
|
135
135
|
disabledValues?: Array<string>;
|
|
136
136
|
values: Array<V>;
|
|
137
137
|
}
|
|
138
|
-
export
|
|
139
|
-
export
|
|
140
|
-
export
|
|
138
|
+
export type IDisplayAttributeAsset = IAttributeAssetBase<IDisplayAttributeAssetValue>;
|
|
139
|
+
export type IHydratedAttributeAsset = IAttributeAssetBase<IHydratedAttributeAssetValue>;
|
|
140
|
+
export type IAttributeAsset = IAttributeAssetBase<IConfigurationAssetValue>;
|
|
141
141
|
export interface IConfigurationArrayValue {
|
|
142
142
|
assetId: string;
|
|
143
143
|
name: string;
|
|
@@ -167,9 +167,9 @@ export interface IAttributeArrayBase<V> extends IAttributeBase<ATTRIBUTE_TYPES.A
|
|
|
167
167
|
assetType: ASSET_TYPES;
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
export
|
|
171
|
-
export
|
|
172
|
-
export
|
|
170
|
+
export type IDisplayAttributeArray = IAttributeArrayBase<IDisplayAttributeArrayValue>;
|
|
171
|
+
export type IHydratedAttributeArray = IAttributeArrayBase<IHydratedAttributeArrayValue>;
|
|
172
|
+
export type IAttributeArray = IAttributeArrayBase<Pick<IConfigurationArrayValue, 'assetId'>>;
|
|
173
173
|
export interface IDisplayAttributeStringValue {
|
|
174
174
|
label: string;
|
|
175
175
|
value: string;
|
|
@@ -185,9 +185,9 @@ export interface IAttributeStringBase<V> extends IAttributeBase<ATTRIBUTE_TYPES.
|
|
|
185
185
|
disabledValues?: Array<string>;
|
|
186
186
|
values: Array<V>;
|
|
187
187
|
}
|
|
188
|
-
export
|
|
189
|
-
export
|
|
190
|
-
export
|
|
188
|
+
export type IDisplayAttributeString = IAttributeStringBase<IDisplayAttributeStringValue>;
|
|
189
|
+
export type IHydratedAttributeString = IAttributeStringBase<IHydratedAttributeStringValue>;
|
|
190
|
+
export type IAttributeString = IAttributeStringBase<string>;
|
|
191
191
|
export interface IAttributeColor extends IAttributeBase<ATTRIBUTE_TYPES.COLOR, IConfigurationColor> {
|
|
192
192
|
defaultValue: IConfigurationColor;
|
|
193
193
|
}
|
|
@@ -201,9 +201,9 @@ export interface IAttributeNumber extends IAttributeBase<ATTRIBUTE_TYPES.NUMBER,
|
|
|
201
201
|
export interface IAttributeBoolean extends IAttributeBase<ATTRIBUTE_TYPES.BOOLEAN, boolean> {
|
|
202
202
|
defaultValue: boolean;
|
|
203
203
|
}
|
|
204
|
-
export
|
|
205
|
-
export
|
|
206
|
-
export
|
|
204
|
+
export type IThreekitAttribute = IAttributeAsset | IAttributeArray | IAttributeColor | IAttributeString | IAttributeNumber | IAttributeBoolean;
|
|
205
|
+
export type IThreekitDisplayAttribute = IDisplayAttributeAsset | IDisplayAttributeArray | IDisplayAttributeString | IAttributeColor | IAttributeNumber | IAttributeBoolean;
|
|
206
|
+
export type IHydratedAttribute = IHydratedAttributeAsset | IHydratedAttributeArray | IHydratedAttributeString | IAttributeColor | IAttributeNumber | IAttributeBoolean;
|
|
207
207
|
export interface ICoordinates {
|
|
208
208
|
x: number;
|
|
209
209
|
y: number;
|
|
@@ -327,6 +327,7 @@ export interface IThreekitPlayer {
|
|
|
327
327
|
unload: () => Promise<string>;
|
|
328
328
|
uploadImage: (image: File) => Promise<string>;
|
|
329
329
|
cacheParameters: ICacheParameters;
|
|
330
|
+
sessionId: string;
|
|
330
331
|
}
|
|
331
332
|
export interface IThreekitPrivateConfigurator extends IThreekitConfigurator {
|
|
332
333
|
name: string;
|