@threekit-tools/treble 0.0.80 → 0.0.83
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/Snapshots.d.ts +2 -2
- package/dist/Treble/Snapshots.js +31 -32
- package/dist/Treble/Treble.d.ts +2 -2
- package/dist/Treble/Treble.js +4 -5
- package/dist/Treble/Wishlist.d.ts +2 -2
- package/dist/Treble/Wishlist.js +19 -21
- package/dist/Treble/index.js +5 -1
- package/dist/api/catalog.js +6 -6
- package/dist/api/configurations.js +3 -3
- package/dist/api/datatables.js +5 -5
- package/dist/api/index.js +5 -1
- package/dist/api/orders.js +12 -12
- package/dist/api/price.js +2 -2
- package/dist/api/products.js +2 -2
- package/dist/components/Accordion/index.js +6 -7
- package/dist/components/AttributeTitle/index.d.ts +0 -9
- package/dist/components/AttributeTitle/index.js +0 -9
- package/dist/components/AttributeValue/index.d.ts +0 -6
- package/dist/components/AttributeValue/index.js +0 -6
- package/dist/components/Button/index.d.ts +0 -27
- package/dist/components/Button/index.js +0 -27
- package/dist/components/Cards/index.d.ts +0 -54
- package/dist/components/Cards/index.js +0 -57
- package/dist/components/Drawer/index.js +7 -16
- package/dist/components/Dropdown/index.d.ts +0 -58
- package/dist/components/Dropdown/index.js +8 -69
- package/dist/components/FlatForm/index.d.ts +0 -21
- package/dist/components/FlatForm/index.js +5 -22
- package/dist/components/Modal/index.js +2 -15
- package/dist/components/Player/index.d.ts +0 -1
- package/dist/components/Player/index.js +4 -38
- package/dist/components/PortalToArOverlay/index.js +5 -1
- package/dist/components/PortalToElement/index.js +0 -8
- package/dist/components/ProductDescription/index.d.ts +0 -6
- package/dist/components/ProductDescription/index.js +0 -6
- package/dist/components/ProductName/index.d.ts +0 -9
- package/dist/components/ProductName/index.js +0 -9
- package/dist/components/Share/index.d.ts +0 -12
- package/dist/components/Share/index.js +2 -14
- package/dist/components/Snapshots/index.d.ts +0 -8
- package/dist/components/Snapshots/index.js +2 -10
- package/dist/components/Strips/index.d.ts +0 -54
- package/dist/components/Strips/index.js +0 -57
- package/dist/components/Swatch/index.d.ts +0 -63
- package/dist/components/Swatch/index.js +0 -66
- package/dist/components/Switch/index.d.ts +0 -33
- package/dist/components/Switch/index.js +0 -36
- package/dist/components/Tabs/index.js +5 -1
- package/dist/components/TextInput/index.js +0 -1
- package/dist/components/ThreekitProvider/index.js +7 -2
- package/dist/components/Tiles/index.d.ts +0 -28
- package/dist/components/Tiles/index.js +0 -30
- package/dist/components/TilesGroup/index.d.ts +0 -25
- package/dist/components/TilesGroup/index.js +0 -27
- package/dist/components/TotalPrice/index.d.ts +0 -6
- package/dist/components/TotalPrice/index.js +0 -6
- package/dist/components/TrebleApp/index.js +5 -1
- package/dist/components/Upload/index.js +19 -15
- package/dist/components/UploadArea/index.js +16 -13
- package/dist/components/Wishlist/index.d.ts +0 -3
- package/dist/components/Wishlist/index.js +12 -10
- package/dist/components/Zoom/index.d.ts +0 -17
- package/dist/components/Zoom/index.js +5 -21
- package/dist/components/formComponents.js +5 -3
- package/dist/components/message/index.d.ts +0 -9
- package/dist/components/message/index.js +4 -31
- package/dist/connection.js +2 -2
- package/dist/constants.d.ts +0 -27
- package/dist/constants.js +0 -36
- package/dist/hooks/useAttribute/index.d.ts +1 -1
- package/dist/hooks/useAttribute/index.js +6 -6
- package/dist/hooks/useConfigurationLoader/index.js +5 -5
- package/dist/hooks/useLoadingProgress/index.d.ts +2 -0
- package/dist/hooks/useLoadingProgress/index.js +9 -0
- package/dist/hooks/useNestedConfigurator/index.js +2 -2
- package/dist/hooks/usePlayer/index.d.ts +3 -0
- package/dist/hooks/usePlayer/index.js +38 -0
- package/dist/hooks/useShare/index.js +3 -3
- package/dist/hooks/useSingleAnimation/index.js +5 -11
- package/dist/hooks/useSnapshot/index.d.ts +1 -1
- package/dist/hooks/useWishlist/index.d.ts +1 -1
- package/dist/http/datatables.js +0 -1
- package/dist/http/index.js +5 -1
- package/dist/icons/Spinner.js +5 -1
- package/dist/icons/index.d.ts +0 -41
- package/dist/icons/index.js +0 -42
- package/dist/index.d.ts +44 -3
- package/dist/index.js +88 -26
- package/dist/store/attributes.d.ts +0 -12
- package/dist/store/attributes.js +2 -15
- package/dist/store/index.d.ts +1 -1
- package/dist/store/price.d.ts +0 -12
- package/dist/store/price.js +2 -16
- package/dist/store/product.d.ts +6 -21
- package/dist/store/product.js +23 -37
- package/dist/store/translations.d.ts +1 -13
- package/dist/store/translations.js +2 -12
- package/dist/store/treble.d.ts +4 -16
- package/dist/store/treble.js +47 -66
- package/dist/store/wishlist.d.ts +1 -13
- package/dist/store/wishlist.js +4 -17
- package/dist/types.d.ts +47 -41
- package/dist/utils.d.ts +8 -8
- package/dist/utils.js +3 -12
- package/package.json +16 -4
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var react_1 = require("react");
|
|
4
|
+
var react_redux_1 = require("react-redux");
|
|
5
|
+
var treble_1 = require("../../store/treble");
|
|
6
|
+
var constants_1 = require("../../constants");
|
|
7
|
+
var usePlayer = function () {
|
|
8
|
+
var playerElRef = (0, react_1.useRef)(null);
|
|
9
|
+
var playerLoaderRef = (0, react_1.useRef)(null);
|
|
10
|
+
var playerWrapperRef = (0, react_1.useRef)(null);
|
|
11
|
+
var playerElementId = (0, react_redux_1.useSelector)(treble_1.getPlayerElementId);
|
|
12
|
+
var playerRef = (0, react_1.useCallback)(function (node) {
|
|
13
|
+
var _a;
|
|
14
|
+
if (node !== null) {
|
|
15
|
+
playerWrapperRef.current = node;
|
|
16
|
+
if (!playerElementId)
|
|
17
|
+
return;
|
|
18
|
+
playerElRef.current = document.getElementById(playerElementId);
|
|
19
|
+
(_a = playerWrapperRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(playerElRef.current);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
}, [playerElementId]);
|
|
23
|
+
(0, react_1.useEffect)(function () { return function () {
|
|
24
|
+
if (!playerElRef.current)
|
|
25
|
+
return;
|
|
26
|
+
if (!playerLoaderRef.current)
|
|
27
|
+
playerLoaderRef.current = document.getElementById(constants_1.TK_PLAYER_LOADER_DIV);
|
|
28
|
+
if (!playerElRef.current)
|
|
29
|
+
throw new Error('Move from element not found');
|
|
30
|
+
if (!playerLoaderRef.current)
|
|
31
|
+
throw new Error('Player Loader element not found');
|
|
32
|
+
playerLoaderRef.current.appendChild(playerElRef.current);
|
|
33
|
+
}; }, []);
|
|
34
|
+
if (!playerElementId)
|
|
35
|
+
return [undefined];
|
|
36
|
+
return [playerRef];
|
|
37
|
+
};
|
|
38
|
+
exports.default = usePlayer;
|
|
@@ -53,15 +53,15 @@ var useShare = function () {
|
|
|
53
53
|
var configuration;
|
|
54
54
|
return __generator(this, function (_a) {
|
|
55
55
|
switch (_a.label) {
|
|
56
|
-
case 0: return [4
|
|
56
|
+
case 0: return [4, window.threekit.treble.saveConfiguration()];
|
|
57
57
|
case 1:
|
|
58
58
|
configuration = _a.sent();
|
|
59
59
|
if (!configuration)
|
|
60
|
-
return [2
|
|
60
|
+
return [2, Promise.resolve(undefined)];
|
|
61
61
|
(0, utils_1.copyToClipboard)(configuration.resumableUrl);
|
|
62
62
|
if (msg === null || msg === void 0 ? void 0 : msg.length)
|
|
63
63
|
message_1.default.info(msg);
|
|
64
|
-
return [2
|
|
64
|
+
return [2, Promise.resolve((configuration === null || configuration === void 0 ? void 0 : configuration.resumableUrl) || undefined)];
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
});
|
|
@@ -61,7 +61,7 @@ var prepAnimateConfig = function (config) {
|
|
|
61
61
|
case 0:
|
|
62
62
|
totalDuration = config.duration * 1000 || 0;
|
|
63
63
|
player = window.threekit.player.enableApi('player');
|
|
64
|
-
return [4
|
|
64
|
+
return [4, player.getAssetInstance(window.threekit.player.scene.find({
|
|
65
65
|
id: window.threekit.player.instanceId,
|
|
66
66
|
plug: 'Proxy',
|
|
67
67
|
property: 'asset',
|
|
@@ -129,7 +129,7 @@ var prepAnimateConfig = function (config) {
|
|
|
129
129
|
_b));
|
|
130
130
|
}, {});
|
|
131
131
|
resolve([assetId, totalDuration, nodes]);
|
|
132
|
-
return [2
|
|
132
|
+
return [2];
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
}); });
|
|
@@ -147,25 +147,19 @@ var useAnimation = function (animationConfig) {
|
|
|
147
147
|
if (!isLoaded)
|
|
148
148
|
return [undefined, undefined];
|
|
149
149
|
var animateFrame = function (timestamp) {
|
|
150
|
-
// if (startTime.current === undefined) startTime.current = timestamp;
|
|
151
|
-
// const elapsed = timestamp - startTime.current;
|
|
152
150
|
if (ref.current.startTime === undefined)
|
|
153
151
|
ref.current.startTime = timestamp;
|
|
154
152
|
var elapsed = timestamp - ref.current.startTime;
|
|
155
153
|
Object.values(ref.current.nodes).forEach(function (nodeConfig) {
|
|
156
154
|
if (!ref.current.isTransformed) {
|
|
157
|
-
// If its too early we don't animate
|
|
158
155
|
if (elapsed < nodeConfig.paddingStart)
|
|
159
156
|
return;
|
|
160
|
-
// If its too early we don't animate
|
|
161
157
|
if (elapsed > nodeConfig.duration + nodeConfig.paddingStart)
|
|
162
158
|
return;
|
|
163
159
|
}
|
|
164
160
|
else if (ref.current.isTransformed) {
|
|
165
|
-
// If its too early we don't animate
|
|
166
161
|
if (elapsed < nodeConfig.paddingEnd)
|
|
167
162
|
return;
|
|
168
|
-
// If its too early we don't animate
|
|
169
163
|
if (elapsed > nodeConfig.duration + nodeConfig.paddingEnd)
|
|
170
164
|
return;
|
|
171
165
|
}
|
|
@@ -246,8 +240,8 @@ var useAnimation = function (animationConfig) {
|
|
|
246
240
|
switch (_b.label) {
|
|
247
241
|
case 0:
|
|
248
242
|
ref.current.startTime = undefined;
|
|
249
|
-
if (!!ref.current.nodes) return [3
|
|
250
|
-
return [4
|
|
243
|
+
if (!!ref.current.nodes) return [3, 2];
|
|
244
|
+
return [4, prepAnimateConfig(animationConfig)];
|
|
251
245
|
case 1:
|
|
252
246
|
_a = _b.sent(), ref.current.assetId = _a[0], ref.current.totalDuration = _a[1], ref.current.nodes = _a[2];
|
|
253
247
|
ref.current.isTransformed = false;
|
|
@@ -255,7 +249,7 @@ var useAnimation = function (animationConfig) {
|
|
|
255
249
|
case 2:
|
|
256
250
|
setAnimationInProgress(true);
|
|
257
251
|
window.requestAnimationFrame(animateFrame);
|
|
258
|
-
return [2
|
|
252
|
+
return [2];
|
|
259
253
|
}
|
|
260
254
|
});
|
|
261
255
|
}); };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ISnapshotsCameras, ITakeSnapshotsConfig } from '../../Treble';
|
|
2
|
-
declare const useSnapshot: (cameras: ISnapshotsCameras, config: ITakeSnapshotsConfig) => (() => Promise<void | string[] | Blob[] | null>) | undefined;
|
|
2
|
+
declare const useSnapshot: (cameras: ISnapshotsCameras, config: ITakeSnapshotsConfig) => (() => Promise<void | string[] | File[] | Blob[] | null>) | undefined;
|
|
3
3
|
export default useSnapshot;
|
|
@@ -7,7 +7,7 @@ interface HydratedWishlistItem extends IConfigurationResponse {
|
|
|
7
7
|
}
|
|
8
8
|
declare type UseWishlistHook = [
|
|
9
9
|
Array<HydratedWishlistItem>,
|
|
10
|
-
(config?: Omit<ISaveConfiguration, '
|
|
10
|
+
(config?: Omit<ISaveConfiguration, 'configuration'>) => void,
|
|
11
11
|
() => void
|
|
12
12
|
] | [undefined, undefined, undefined];
|
|
13
13
|
declare const useWishlist: () => UseWishlistHook;
|
package/dist/http/datatables.js
CHANGED
|
@@ -16,7 +16,6 @@ var getDatatable = function (datatableId) {
|
|
|
16
16
|
error = 'Requires a datatableId';
|
|
17
17
|
if (error)
|
|
18
18
|
throw new Error(error);
|
|
19
|
-
// return threekitRequest.get<Array<IDatatable>>(
|
|
20
19
|
return request_1.default.get("".concat(DATATABLES_API_ROUTE, "/").concat(datatableId, "/download"));
|
|
21
20
|
};
|
|
22
21
|
exports.getDatatable = getDatatable;
|
package/dist/http/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/icons/Spinner.js
CHANGED
|
@@ -5,7 +5,11 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
};
|
|
6
6
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
7
|
if (k2 === undefined) k2 = k;
|
|
8
|
-
Object.
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
9
13
|
}) : (function(o, m, k, k2) {
|
|
10
14
|
if (k2 === undefined) k2 = k;
|
|
11
15
|
o[k2] = m[k];
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -1,49 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import AddIcon from './Add';
|
|
3
|
-
import ArrowLeftIcon from './ArrowLeft';
|
|
4
|
-
import ArrowRightIcon from './ArrowRight';
|
|
5
|
-
import CameraIcon from './Camera';
|
|
6
|
-
import CaretDownIcon from './CaretDown';
|
|
7
|
-
import CaretUpIcon from './CaretUp';
|
|
8
|
-
import CaretLeftIcon from './CaretLeft';
|
|
9
|
-
import CaretRightIcon from './CaretRight';
|
|
10
|
-
import CartIcon from './Cart';
|
|
11
|
-
import CheckmateIcon from './Checkmate';
|
|
12
|
-
import ClipboardIcon from './Clipboard';
|
|
13
|
-
import ColorPickerIcon from './ColorPicker';
|
|
14
|
-
import CopyIcon from './Copy';
|
|
15
|
-
import DeleteIcon from './Delete';
|
|
16
|
-
import DoubleCaretLeftIcon from './DoubleCaretLeft';
|
|
17
|
-
import DoubleCaretRightIcon from './DoubleCaretRight';
|
|
18
|
-
import DownloadIcon from './Download';
|
|
19
|
-
import DragIcon from './Drag';
|
|
20
|
-
import EditIcon from './Edit';
|
|
21
|
-
import HeartIcon from './Heart';
|
|
22
|
-
import ImageIcon from './Image';
|
|
23
|
-
import InfoIcon from './Info';
|
|
24
|
-
import MailIcon from './Mail';
|
|
25
|
-
import MenuIcon from './Menu';
|
|
26
|
-
import MoreIcon from './More';
|
|
27
|
-
import NewWindowIcon from './NewWindow';
|
|
28
|
-
import PauseIcon from './Pause';
|
|
29
|
-
import PlayIcon from './Play';
|
|
30
|
-
import RedoIcon from './Redo';
|
|
31
|
-
import RemoveIcon from './Remove';
|
|
32
|
-
import RulerIcon from './Ruler';
|
|
33
|
-
import SearchIcon from './Search';
|
|
34
|
-
import SettingsIcon from './Settings';
|
|
35
|
-
import ShareIcon from './Share';
|
|
36
|
-
import SwitchIcon from './Switch';
|
|
37
|
-
import TagIcon from './Tag';
|
|
38
|
-
import UndoIcon from './Undo';
|
|
39
|
-
import WishlistIcon from './Wishlist';
|
|
40
|
-
import ZoomInIcon from './ZoomIn';
|
|
41
|
-
import ZoomOutIcon from './ZoomOut';
|
|
42
2
|
import SpinnerIcon from './Spinner';
|
|
43
3
|
export interface IIcon extends React.FC {
|
|
44
4
|
iconName: string;
|
|
45
5
|
}
|
|
46
|
-
export { AddIcon, ArrowLeftIcon, ArrowRightIcon, CameraIcon, CaretDownIcon, CaretUpIcon, CaretLeftIcon, CaretRightIcon, CartIcon, CheckmateIcon, ClipboardIcon, ColorPickerIcon, CopyIcon, DeleteIcon, DoubleCaretLeftIcon, DoubleCaretRightIcon, DownloadIcon, DragIcon, EditIcon, HeartIcon, ImageIcon, InfoIcon, MailIcon, MenuIcon, MoreIcon, NewWindowIcon, PauseIcon, PlayIcon, RedoIcon, RemoveIcon, RulerIcon, SearchIcon, SettingsIcon, ShareIcon, SwitchIcon, TagIcon, UndoIcon, WishlistIcon, ZoomInIcon, ZoomOutIcon, SpinnerIcon, };
|
|
47
6
|
declare const _default: {
|
|
48
7
|
[x: string]: IIcon | typeof SpinnerIcon;
|
|
49
8
|
};
|
package/dist/icons/index.js
CHANGED
|
@@ -4,89 +4,47 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.SpinnerIcon = exports.ZoomOutIcon = exports.ZoomInIcon = exports.WishlistIcon = exports.UndoIcon = exports.TagIcon = exports.SwitchIcon = exports.ShareIcon = exports.SettingsIcon = exports.SearchIcon = exports.RulerIcon = exports.RemoveIcon = exports.RedoIcon = exports.PlayIcon = exports.PauseIcon = exports.NewWindowIcon = exports.MoreIcon = exports.MenuIcon = exports.MailIcon = exports.InfoIcon = exports.ImageIcon = exports.HeartIcon = exports.EditIcon = exports.DragIcon = exports.DownloadIcon = exports.DoubleCaretRightIcon = exports.DoubleCaretLeftIcon = exports.DeleteIcon = exports.CopyIcon = exports.ColorPickerIcon = exports.ClipboardIcon = exports.CheckmateIcon = exports.CartIcon = exports.CaretRightIcon = exports.CaretLeftIcon = exports.CaretUpIcon = exports.CaretDownIcon = exports.CameraIcon = exports.ArrowRightIcon = exports.ArrowLeftIcon = exports.AddIcon = void 0;
|
|
8
7
|
var Add_1 = __importDefault(require("./Add"));
|
|
9
|
-
exports.AddIcon = Add_1.default;
|
|
10
8
|
var ArrowLeft_1 = __importDefault(require("./ArrowLeft"));
|
|
11
|
-
exports.ArrowLeftIcon = ArrowLeft_1.default;
|
|
12
9
|
var ArrowRight_1 = __importDefault(require("./ArrowRight"));
|
|
13
|
-
exports.ArrowRightIcon = ArrowRight_1.default;
|
|
14
10
|
var Camera_1 = __importDefault(require("./Camera"));
|
|
15
|
-
exports.CameraIcon = Camera_1.default;
|
|
16
11
|
var CaretDown_1 = __importDefault(require("./CaretDown"));
|
|
17
|
-
exports.CaretDownIcon = CaretDown_1.default;
|
|
18
12
|
var CaretUp_1 = __importDefault(require("./CaretUp"));
|
|
19
|
-
exports.CaretUpIcon = CaretUp_1.default;
|
|
20
13
|
var CaretLeft_1 = __importDefault(require("./CaretLeft"));
|
|
21
|
-
exports.CaretLeftIcon = CaretLeft_1.default;
|
|
22
14
|
var CaretRight_1 = __importDefault(require("./CaretRight"));
|
|
23
|
-
exports.CaretRightIcon = CaretRight_1.default;
|
|
24
15
|
var Cart_1 = __importDefault(require("./Cart"));
|
|
25
|
-
exports.CartIcon = Cart_1.default;
|
|
26
16
|
var Checkmate_1 = __importDefault(require("./Checkmate"));
|
|
27
|
-
exports.CheckmateIcon = Checkmate_1.default;
|
|
28
17
|
var Clipboard_1 = __importDefault(require("./Clipboard"));
|
|
29
|
-
exports.ClipboardIcon = Clipboard_1.default;
|
|
30
18
|
var ColorPicker_1 = __importDefault(require("./ColorPicker"));
|
|
31
|
-
exports.ColorPickerIcon = ColorPicker_1.default;
|
|
32
19
|
var Copy_1 = __importDefault(require("./Copy"));
|
|
33
|
-
exports.CopyIcon = Copy_1.default;
|
|
34
20
|
var Delete_1 = __importDefault(require("./Delete"));
|
|
35
|
-
exports.DeleteIcon = Delete_1.default;
|
|
36
21
|
var DoubleCaretLeft_1 = __importDefault(require("./DoubleCaretLeft"));
|
|
37
|
-
exports.DoubleCaretLeftIcon = DoubleCaretLeft_1.default;
|
|
38
22
|
var DoubleCaretRight_1 = __importDefault(require("./DoubleCaretRight"));
|
|
39
|
-
exports.DoubleCaretRightIcon = DoubleCaretRight_1.default;
|
|
40
23
|
var Download_1 = __importDefault(require("./Download"));
|
|
41
|
-
exports.DownloadIcon = Download_1.default;
|
|
42
24
|
var Drag_1 = __importDefault(require("./Drag"));
|
|
43
|
-
exports.DragIcon = Drag_1.default;
|
|
44
25
|
var Edit_1 = __importDefault(require("./Edit"));
|
|
45
|
-
exports.EditIcon = Edit_1.default;
|
|
46
26
|
var Heart_1 = __importDefault(require("./Heart"));
|
|
47
|
-
exports.HeartIcon = Heart_1.default;
|
|
48
27
|
var Image_1 = __importDefault(require("./Image"));
|
|
49
|
-
exports.ImageIcon = Image_1.default;
|
|
50
28
|
var Info_1 = __importDefault(require("./Info"));
|
|
51
|
-
exports.InfoIcon = Info_1.default;
|
|
52
29
|
var Mail_1 = __importDefault(require("./Mail"));
|
|
53
|
-
exports.MailIcon = Mail_1.default;
|
|
54
30
|
var Menu_1 = __importDefault(require("./Menu"));
|
|
55
|
-
exports.MenuIcon = Menu_1.default;
|
|
56
31
|
var More_1 = __importDefault(require("./More"));
|
|
57
|
-
exports.MoreIcon = More_1.default;
|
|
58
32
|
var NewWindow_1 = __importDefault(require("./NewWindow"));
|
|
59
|
-
exports.NewWindowIcon = NewWindow_1.default;
|
|
60
33
|
var Pause_1 = __importDefault(require("./Pause"));
|
|
61
|
-
exports.PauseIcon = Pause_1.default;
|
|
62
34
|
var Play_1 = __importDefault(require("./Play"));
|
|
63
|
-
exports.PlayIcon = Play_1.default;
|
|
64
35
|
var Redo_1 = __importDefault(require("./Redo"));
|
|
65
|
-
exports.RedoIcon = Redo_1.default;
|
|
66
36
|
var Remove_1 = __importDefault(require("./Remove"));
|
|
67
|
-
exports.RemoveIcon = Remove_1.default;
|
|
68
37
|
var Ruler_1 = __importDefault(require("./Ruler"));
|
|
69
|
-
exports.RulerIcon = Ruler_1.default;
|
|
70
38
|
var Search_1 = __importDefault(require("./Search"));
|
|
71
|
-
exports.SearchIcon = Search_1.default;
|
|
72
39
|
var Settings_1 = __importDefault(require("./Settings"));
|
|
73
|
-
exports.SettingsIcon = Settings_1.default;
|
|
74
40
|
var Share_1 = __importDefault(require("./Share"));
|
|
75
|
-
exports.ShareIcon = Share_1.default;
|
|
76
41
|
var Switch_1 = __importDefault(require("./Switch"));
|
|
77
|
-
exports.SwitchIcon = Switch_1.default;
|
|
78
42
|
var Tag_1 = __importDefault(require("./Tag"));
|
|
79
|
-
exports.TagIcon = Tag_1.default;
|
|
80
43
|
var Undo_1 = __importDefault(require("./Undo"));
|
|
81
|
-
exports.UndoIcon = Undo_1.default;
|
|
82
44
|
var Wishlist_1 = __importDefault(require("./Wishlist"));
|
|
83
|
-
exports.WishlistIcon = Wishlist_1.default;
|
|
84
45
|
var ZoomIn_1 = __importDefault(require("./ZoomIn"));
|
|
85
|
-
exports.ZoomInIcon = ZoomIn_1.default;
|
|
86
46
|
var ZoomOut_1 = __importDefault(require("./ZoomOut"));
|
|
87
|
-
exports.ZoomOutIcon = ZoomOut_1.default;
|
|
88
47
|
var Spinner_1 = __importDefault(require("./Spinner"));
|
|
89
|
-
exports.SpinnerIcon = Spinner_1.default;
|
|
90
48
|
exports.default = (_a = {},
|
|
91
49
|
_a[Add_1.default.iconName] = Add_1.default,
|
|
92
50
|
_a[ArrowLeft_1.default.iconName] = ArrowLeft_1.default,
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ import useShare from './hooks/useShare';
|
|
|
13
13
|
import usePlayerPortal from './hooks/usePlayerPortal';
|
|
14
14
|
import useProductCache from './hooks/useProductCache';
|
|
15
15
|
import useNestedConfigurator from './hooks/useNestedConfigurator';
|
|
16
|
+
import useLoadingProgress from './hooks/useLoadingProgress';
|
|
17
|
+
import usePlayer from './hooks/usePlayer';
|
|
16
18
|
import ThreekitProvider from './components/ThreekitProvider';
|
|
17
19
|
import Player from './components/Player';
|
|
18
20
|
import Button from './components/Button';
|
|
@@ -42,8 +44,47 @@ import Zoom from './components/Zoom';
|
|
|
42
44
|
import Snapshots from './components/Snapshots';
|
|
43
45
|
import Wishlist from './components/Wishlist';
|
|
44
46
|
import Share from './components/Share';
|
|
45
|
-
import icons from './icons';
|
|
46
|
-
export * from './icons';
|
|
47
47
|
import TrebleApp from './components/TrebleApp';
|
|
48
48
|
import ProductLayout from './components/ProductLayout';
|
|
49
|
-
|
|
49
|
+
import AddIcon from './icons/Add';
|
|
50
|
+
import ArrowLeftIcon from './icons/ArrowLeft';
|
|
51
|
+
import ArrowRightIcon from './icons/ArrowRight';
|
|
52
|
+
import CameraIcon from './icons/Camera';
|
|
53
|
+
import CaretDownIcon from './icons/CaretDown';
|
|
54
|
+
import CaretUpIcon from './icons/CaretUp';
|
|
55
|
+
import CaretLeftIcon from './icons/CaretLeft';
|
|
56
|
+
import CaretRightIcon from './icons/CaretRight';
|
|
57
|
+
import CartIcon from './icons/Cart';
|
|
58
|
+
import CheckmateIcon from './icons/Checkmate';
|
|
59
|
+
import ClipboardIcon from './icons/Clipboard';
|
|
60
|
+
import ColorPickerIcon from './icons/ColorPicker';
|
|
61
|
+
import CopyIcon from './icons/Copy';
|
|
62
|
+
import DeleteIcon from './icons/Delete';
|
|
63
|
+
import DoubleCaretLeftIcon from './icons/DoubleCaretLeft';
|
|
64
|
+
import DoubleCaretRightIcon from './icons/DoubleCaretRight';
|
|
65
|
+
import DownloadIcon from './icons/Download';
|
|
66
|
+
import DragIcon from './icons/Drag';
|
|
67
|
+
import EditIcon from './icons/Edit';
|
|
68
|
+
import HeartIcon from './icons/Heart';
|
|
69
|
+
import ImageIcon from './icons/Image';
|
|
70
|
+
import InfoIcon from './icons/Info';
|
|
71
|
+
import MailIcon from './icons/Mail';
|
|
72
|
+
import MenuIcon from './icons/Menu';
|
|
73
|
+
import MoreIcon from './icons/More';
|
|
74
|
+
import NewWindowIcon from './icons/NewWindow';
|
|
75
|
+
import PauseIcon from './icons/Pause';
|
|
76
|
+
import PlayIcon from './icons/Play';
|
|
77
|
+
import RedoIcon from './icons/Redo';
|
|
78
|
+
import RemoveIcon from './icons/Remove';
|
|
79
|
+
import RulerIcon from './icons/Ruler';
|
|
80
|
+
import SearchIcon from './icons/Search';
|
|
81
|
+
import SettingsIcon from './icons/Settings';
|
|
82
|
+
import ShareIcon from './icons/Share';
|
|
83
|
+
import SwitchIcon from './icons/Switch';
|
|
84
|
+
import TagIcon from './icons/Tag';
|
|
85
|
+
import UndoIcon from './icons/Undo';
|
|
86
|
+
import WishlistIcon from './icons/Wishlist';
|
|
87
|
+
import ZoomInIcon from './icons/ZoomIn';
|
|
88
|
+
import ZoomOutIcon from './icons/ZoomOut';
|
|
89
|
+
import SpinnerIcon from './icons/Spinner';
|
|
90
|
+
export { useAttribute, useConfigurator, useConfigurationLoader, useMetadata, useName, usePlayerLoadingStatus, usePrice, useThreekitInitStatus, useZoom, useSnapshot, useWishlist, useShare, usePlayerPortal, useProductCache, useNestedConfigurator, useLoadingProgress, usePlayer, ThreekitProvider, Player, Button, Cards, Dropdown, Strips, Swatch, Tiles, TilesGroup, Upload, Switch, ProductName, ProductDescription, AttributeTitle, AttributeValue, TotalPrice, message, Modal, Drawer, Accordion, Tabs, PortalToArOverlay, PortalToElement, AwaitThreekitLoad, FlatForm, Zoom, Snapshots, Wishlist, Share, TrebleApp, ProductLayout, AddIcon, ArrowLeftIcon, ArrowRightIcon, CameraIcon, CaretDownIcon, CaretUpIcon, CaretLeftIcon, CaretRightIcon, CartIcon, CheckmateIcon, ClipboardIcon, ColorPickerIcon, CopyIcon, DeleteIcon, DoubleCaretLeftIcon, DoubleCaretRightIcon, DownloadIcon, DragIcon, EditIcon, HeartIcon, ImageIcon, InfoIcon, MailIcon, MenuIcon, MoreIcon, NewWindowIcon, PauseIcon, PlayIcon, RedoIcon, RemoveIcon, RulerIcon, SearchIcon, SettingsIcon, ShareIcon, SwitchIcon, TagIcon, UndoIcon, WishlistIcon, ZoomInIcon, ZoomOutIcon, SpinnerIcon, };
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
4
|
};
|
|
15
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
|
|
6
|
+
exports.ArrowLeftIcon = exports.AddIcon = exports.ProductLayout = exports.TrebleApp = exports.Share = exports.Wishlist = exports.Snapshots = exports.Zoom = exports.FlatForm = exports.AwaitThreekitLoad = exports.PortalToElement = exports.PortalToArOverlay = exports.Tabs = exports.Accordion = exports.Drawer = exports.Modal = exports.message = exports.TotalPrice = exports.AttributeValue = exports.AttributeTitle = exports.ProductDescription = exports.ProductName = exports.Switch = exports.Upload = exports.TilesGroup = exports.Tiles = exports.Swatch = exports.Strips = exports.Dropdown = exports.Cards = exports.Button = exports.Player = exports.ThreekitProvider = exports.usePlayer = exports.useLoadingProgress = exports.useNestedConfigurator = exports.useProductCache = exports.usePlayerPortal = exports.useShare = exports.useWishlist = exports.useSnapshot = exports.useZoom = exports.useThreekitInitStatus = exports.usePrice = exports.usePlayerLoadingStatus = exports.useName = exports.useMetadata = exports.useConfigurationLoader = exports.useConfigurator = exports.useAttribute = void 0;
|
|
7
|
+
exports.SpinnerIcon = exports.ZoomOutIcon = exports.ZoomInIcon = exports.WishlistIcon = exports.UndoIcon = exports.TagIcon = exports.SwitchIcon = exports.ShareIcon = exports.SettingsIcon = exports.SearchIcon = exports.RulerIcon = exports.RemoveIcon = exports.RedoIcon = exports.PlayIcon = exports.PauseIcon = exports.NewWindowIcon = exports.MoreIcon = exports.MenuIcon = exports.MailIcon = exports.InfoIcon = exports.ImageIcon = exports.HeartIcon = exports.EditIcon = exports.DragIcon = exports.DownloadIcon = exports.DoubleCaretRightIcon = exports.DoubleCaretLeftIcon = exports.DeleteIcon = exports.CopyIcon = exports.ColorPickerIcon = exports.ClipboardIcon = exports.CheckmateIcon = exports.CartIcon = exports.CaretRightIcon = exports.CaretLeftIcon = exports.CaretUpIcon = exports.CaretDownIcon = exports.CameraIcon = exports.ArrowRightIcon = void 0;
|
|
18
8
|
var useAttribute_1 = __importDefault(require("./hooks/useAttribute"));
|
|
19
9
|
exports.useAttribute = useAttribute_1.default;
|
|
20
10
|
var useConfigurator_1 = __importDefault(require("./hooks/useConfigurator"));
|
|
@@ -41,17 +31,18 @@ var useShare_1 = __importDefault(require("./hooks/useShare"));
|
|
|
41
31
|
exports.useShare = useShare_1.default;
|
|
42
32
|
var usePlayerPortal_1 = __importDefault(require("./hooks/usePlayerPortal"));
|
|
43
33
|
exports.usePlayerPortal = usePlayerPortal_1.default;
|
|
44
|
-
// import useSingleAnimation from './hooks/useSingleAnimation';
|
|
45
34
|
var useProductCache_1 = __importDefault(require("./hooks/useProductCache"));
|
|
46
35
|
exports.useProductCache = useProductCache_1.default;
|
|
47
36
|
var useNestedConfigurator_1 = __importDefault(require("./hooks/useNestedConfigurator"));
|
|
48
37
|
exports.useNestedConfigurator = useNestedConfigurator_1.default;
|
|
49
|
-
|
|
38
|
+
var useLoadingProgress_1 = __importDefault(require("./hooks/useLoadingProgress"));
|
|
39
|
+
exports.useLoadingProgress = useLoadingProgress_1.default;
|
|
40
|
+
var usePlayer_1 = __importDefault(require("./hooks/usePlayer"));
|
|
41
|
+
exports.usePlayer = usePlayer_1.default;
|
|
50
42
|
var ThreekitProvider_1 = __importDefault(require("./components/ThreekitProvider"));
|
|
51
43
|
exports.ThreekitProvider = ThreekitProvider_1.default;
|
|
52
44
|
var Player_1 = __importDefault(require("./components/Player"));
|
|
53
45
|
exports.Player = Player_1.default;
|
|
54
|
-
// Form Components
|
|
55
46
|
var Button_1 = __importDefault(require("./components/Button"));
|
|
56
47
|
exports.Button = Button_1.default;
|
|
57
48
|
var Cards_1 = __importDefault(require("./components/Cards"));
|
|
@@ -70,7 +61,6 @@ var Upload_1 = __importDefault(require("./components/Upload"));
|
|
|
70
61
|
exports.Upload = Upload_1.default;
|
|
71
62
|
var Switch_1 = __importDefault(require("./components/Switch"));
|
|
72
63
|
exports.Switch = Switch_1.default;
|
|
73
|
-
// Display
|
|
74
64
|
var ProductName_1 = __importDefault(require("./components/ProductName"));
|
|
75
65
|
exports.ProductName = ProductName_1.default;
|
|
76
66
|
var ProductDescription_1 = __importDefault(require("./components/ProductDescription"));
|
|
@@ -81,10 +71,8 @@ var AttributeValue_1 = __importDefault(require("./components/AttributeValue"));
|
|
|
81
71
|
exports.AttributeValue = AttributeValue_1.default;
|
|
82
72
|
var TotalPrice_1 = __importDefault(require("./components/TotalPrice"));
|
|
83
73
|
exports.TotalPrice = TotalPrice_1.default;
|
|
84
|
-
// Messaging
|
|
85
74
|
var message_1 = __importDefault(require("./components/message"));
|
|
86
75
|
exports.message = message_1.default;
|
|
87
|
-
// Layouts
|
|
88
76
|
var Modal_1 = __importDefault(require("./components/Modal"));
|
|
89
77
|
exports.Modal = Modal_1.default;
|
|
90
78
|
var Drawer_1 = __importDefault(require("./components/Drawer"));
|
|
@@ -93,17 +81,14 @@ var Accordion_1 = __importDefault(require("./components/Accordion"));
|
|
|
93
81
|
exports.Accordion = Accordion_1.default;
|
|
94
82
|
var Tabs_1 = __importDefault(require("./components/Tabs"));
|
|
95
83
|
exports.Tabs = Tabs_1.default;
|
|
96
|
-
// Wrappers
|
|
97
84
|
var PortalToArOverlay_1 = __importDefault(require("./components/PortalToArOverlay"));
|
|
98
85
|
exports.PortalToArOverlay = PortalToArOverlay_1.default;
|
|
99
86
|
var PortalToElement_1 = __importDefault(require("./components/PortalToElement"));
|
|
100
87
|
exports.PortalToElement = PortalToElement_1.default;
|
|
101
88
|
var AwaitThreekitLoad_1 = __importDefault(require("./components/AwaitThreekitLoad"));
|
|
102
89
|
exports.AwaitThreekitLoad = AwaitThreekitLoad_1.default;
|
|
103
|
-
// Forms
|
|
104
90
|
var FlatForm_1 = __importDefault(require("./components/FlatForm"));
|
|
105
91
|
exports.FlatForm = FlatForm_1.default;
|
|
106
|
-
// Widgets
|
|
107
92
|
var Zoom_1 = __importDefault(require("./components/Zoom"));
|
|
108
93
|
exports.Zoom = Zoom_1.default;
|
|
109
94
|
var Snapshots_1 = __importDefault(require("./components/Snapshots"));
|
|
@@ -112,12 +97,89 @@ var Wishlist_1 = __importDefault(require("./components/Wishlist"));
|
|
|
112
97
|
exports.Wishlist = Wishlist_1.default;
|
|
113
98
|
var Share_1 = __importDefault(require("./components/Share"));
|
|
114
99
|
exports.Share = Share_1.default;
|
|
115
|
-
// Icons
|
|
116
|
-
var icons_1 = __importDefault(require("./icons"));
|
|
117
|
-
exports.icons = icons_1.default;
|
|
118
|
-
__exportStar(require("./icons"), exports);
|
|
119
|
-
// Products - Multi-configurtors
|
|
120
100
|
var TrebleApp_1 = __importDefault(require("./components/TrebleApp"));
|
|
121
101
|
exports.TrebleApp = TrebleApp_1.default;
|
|
122
102
|
var ProductLayout_1 = __importDefault(require("./components/ProductLayout"));
|
|
123
103
|
exports.ProductLayout = ProductLayout_1.default;
|
|
104
|
+
var Add_1 = __importDefault(require("./icons/Add"));
|
|
105
|
+
exports.AddIcon = Add_1.default;
|
|
106
|
+
var ArrowLeft_1 = __importDefault(require("./icons/ArrowLeft"));
|
|
107
|
+
exports.ArrowLeftIcon = ArrowLeft_1.default;
|
|
108
|
+
var ArrowRight_1 = __importDefault(require("./icons/ArrowRight"));
|
|
109
|
+
exports.ArrowRightIcon = ArrowRight_1.default;
|
|
110
|
+
var Camera_1 = __importDefault(require("./icons/Camera"));
|
|
111
|
+
exports.CameraIcon = Camera_1.default;
|
|
112
|
+
var CaretDown_1 = __importDefault(require("./icons/CaretDown"));
|
|
113
|
+
exports.CaretDownIcon = CaretDown_1.default;
|
|
114
|
+
var CaretUp_1 = __importDefault(require("./icons/CaretUp"));
|
|
115
|
+
exports.CaretUpIcon = CaretUp_1.default;
|
|
116
|
+
var CaretLeft_1 = __importDefault(require("./icons/CaretLeft"));
|
|
117
|
+
exports.CaretLeftIcon = CaretLeft_1.default;
|
|
118
|
+
var CaretRight_1 = __importDefault(require("./icons/CaretRight"));
|
|
119
|
+
exports.CaretRightIcon = CaretRight_1.default;
|
|
120
|
+
var Cart_1 = __importDefault(require("./icons/Cart"));
|
|
121
|
+
exports.CartIcon = Cart_1.default;
|
|
122
|
+
var Checkmate_1 = __importDefault(require("./icons/Checkmate"));
|
|
123
|
+
exports.CheckmateIcon = Checkmate_1.default;
|
|
124
|
+
var Clipboard_1 = __importDefault(require("./icons/Clipboard"));
|
|
125
|
+
exports.ClipboardIcon = Clipboard_1.default;
|
|
126
|
+
var ColorPicker_1 = __importDefault(require("./icons/ColorPicker"));
|
|
127
|
+
exports.ColorPickerIcon = ColorPicker_1.default;
|
|
128
|
+
var Copy_1 = __importDefault(require("./icons/Copy"));
|
|
129
|
+
exports.CopyIcon = Copy_1.default;
|
|
130
|
+
var Delete_1 = __importDefault(require("./icons/Delete"));
|
|
131
|
+
exports.DeleteIcon = Delete_1.default;
|
|
132
|
+
var DoubleCaretLeft_1 = __importDefault(require("./icons/DoubleCaretLeft"));
|
|
133
|
+
exports.DoubleCaretLeftIcon = DoubleCaretLeft_1.default;
|
|
134
|
+
var DoubleCaretRight_1 = __importDefault(require("./icons/DoubleCaretRight"));
|
|
135
|
+
exports.DoubleCaretRightIcon = DoubleCaretRight_1.default;
|
|
136
|
+
var Download_1 = __importDefault(require("./icons/Download"));
|
|
137
|
+
exports.DownloadIcon = Download_1.default;
|
|
138
|
+
var Drag_1 = __importDefault(require("./icons/Drag"));
|
|
139
|
+
exports.DragIcon = Drag_1.default;
|
|
140
|
+
var Edit_1 = __importDefault(require("./icons/Edit"));
|
|
141
|
+
exports.EditIcon = Edit_1.default;
|
|
142
|
+
var Heart_1 = __importDefault(require("./icons/Heart"));
|
|
143
|
+
exports.HeartIcon = Heart_1.default;
|
|
144
|
+
var Image_1 = __importDefault(require("./icons/Image"));
|
|
145
|
+
exports.ImageIcon = Image_1.default;
|
|
146
|
+
var Info_1 = __importDefault(require("./icons/Info"));
|
|
147
|
+
exports.InfoIcon = Info_1.default;
|
|
148
|
+
var Mail_1 = __importDefault(require("./icons/Mail"));
|
|
149
|
+
exports.MailIcon = Mail_1.default;
|
|
150
|
+
var Menu_1 = __importDefault(require("./icons/Menu"));
|
|
151
|
+
exports.MenuIcon = Menu_1.default;
|
|
152
|
+
var More_1 = __importDefault(require("./icons/More"));
|
|
153
|
+
exports.MoreIcon = More_1.default;
|
|
154
|
+
var NewWindow_1 = __importDefault(require("./icons/NewWindow"));
|
|
155
|
+
exports.NewWindowIcon = NewWindow_1.default;
|
|
156
|
+
var Pause_1 = __importDefault(require("./icons/Pause"));
|
|
157
|
+
exports.PauseIcon = Pause_1.default;
|
|
158
|
+
var Play_1 = __importDefault(require("./icons/Play"));
|
|
159
|
+
exports.PlayIcon = Play_1.default;
|
|
160
|
+
var Redo_1 = __importDefault(require("./icons/Redo"));
|
|
161
|
+
exports.RedoIcon = Redo_1.default;
|
|
162
|
+
var Remove_1 = __importDefault(require("./icons/Remove"));
|
|
163
|
+
exports.RemoveIcon = Remove_1.default;
|
|
164
|
+
var Ruler_1 = __importDefault(require("./icons/Ruler"));
|
|
165
|
+
exports.RulerIcon = Ruler_1.default;
|
|
166
|
+
var Search_1 = __importDefault(require("./icons/Search"));
|
|
167
|
+
exports.SearchIcon = Search_1.default;
|
|
168
|
+
var Settings_1 = __importDefault(require("./icons/Settings"));
|
|
169
|
+
exports.SettingsIcon = Settings_1.default;
|
|
170
|
+
var Share_2 = __importDefault(require("./icons/Share"));
|
|
171
|
+
exports.ShareIcon = Share_2.default;
|
|
172
|
+
var Switch_2 = __importDefault(require("./icons/Switch"));
|
|
173
|
+
exports.SwitchIcon = Switch_2.default;
|
|
174
|
+
var Tag_1 = __importDefault(require("./icons/Tag"));
|
|
175
|
+
exports.TagIcon = Tag_1.default;
|
|
176
|
+
var Undo_1 = __importDefault(require("./icons/Undo"));
|
|
177
|
+
exports.UndoIcon = Undo_1.default;
|
|
178
|
+
var Wishlist_2 = __importDefault(require("./icons/Wishlist"));
|
|
179
|
+
exports.WishlistIcon = Wishlist_2.default;
|
|
180
|
+
var ZoomIn_1 = __importDefault(require("./icons/ZoomIn"));
|
|
181
|
+
exports.ZoomInIcon = ZoomIn_1.default;
|
|
182
|
+
var ZoomOut_1 = __importDefault(require("./icons/ZoomOut"));
|
|
183
|
+
exports.ZoomOutIcon = ZoomOut_1.default;
|
|
184
|
+
var Spinner_1 = __importDefault(require("./icons/Spinner"));
|
|
185
|
+
exports.SpinnerIcon = Spinner_1.default;
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
2
|
import { ISetConfiguration, IThreekitDisplayAttribute } from '../types';
|
|
3
3
|
import { ITranslationMap } from '../api/products';
|
|
4
|
-
/*****************************************************
|
|
5
|
-
* Types and Interfaces
|
|
6
|
-
****************************************************/
|
|
7
4
|
export declare type AttributesState = Record<string, IThreekitDisplayAttribute>;
|
|
8
|
-
/*****************************************************
|
|
9
|
-
* Actions
|
|
10
|
-
****************************************************/
|
|
11
5
|
export declare const setAttributes: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[attributes: IThreekitDisplayAttribute[]], Record<string, IThreekitDisplayAttribute>, "treble/attributes/set-attributes", never, never>;
|
|
12
|
-
/*****************************************************
|
|
13
|
-
* Slice
|
|
14
|
-
****************************************************/
|
|
15
6
|
declare const reducer: import("redux").Reducer<AttributesState, import("redux").AnyAction>;
|
|
16
|
-
/*****************************************************
|
|
17
|
-
* Standard Selectors
|
|
18
|
-
****************************************************/
|
|
19
7
|
export declare const getAttributes: (state: RootState) => AttributesState;
|
|
20
8
|
export declare const getHydrationData: ((state: {
|
|
21
9
|
treble: import("./treble").TrebleState;
|
package/dist/store/attributes.js
CHANGED
|
@@ -40,9 +40,6 @@ exports.setConfiguration = exports.getHydrationData = exports.getAttributes = ex
|
|
|
40
40
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
41
41
|
var treble_1 = require("./treble");
|
|
42
42
|
var translations_1 = require("./translations");
|
|
43
|
-
/*****************************************************
|
|
44
|
-
* Actions
|
|
45
|
-
****************************************************/
|
|
46
43
|
exports.setAttributes = (0, toolkit_1.createAction)('treble/attributes/set-attributes', function (attributes) {
|
|
47
44
|
var payload = attributes.reduce(function (output, attr) {
|
|
48
45
|
var _a;
|
|
@@ -50,13 +47,7 @@ exports.setAttributes = (0, toolkit_1.createAction)('treble/attributes/set-attri
|
|
|
50
47
|
}, {});
|
|
51
48
|
return { payload: payload };
|
|
52
49
|
});
|
|
53
|
-
/*****************************************************
|
|
54
|
-
* State and Data
|
|
55
|
-
****************************************************/
|
|
56
50
|
var initialState = {};
|
|
57
|
-
/*****************************************************
|
|
58
|
-
* Slice
|
|
59
|
-
****************************************************/
|
|
60
51
|
var reducer = (0, toolkit_1.createSlice)({
|
|
61
52
|
name: 'attributes',
|
|
62
53
|
initialState: initialState,
|
|
@@ -74,25 +65,21 @@ var reducer = (0, toolkit_1.createSlice)({
|
|
|
74
65
|
});
|
|
75
66
|
},
|
|
76
67
|
}).reducer;
|
|
77
|
-
/*****************************************************
|
|
78
|
-
* Standard Selectors
|
|
79
|
-
****************************************************/
|
|
80
68
|
var getAttributes = function (state) { return state.attributes; };
|
|
81
69
|
exports.getAttributes = getAttributes;
|
|
82
70
|
exports.getHydrationData = (0, toolkit_1.createSelector)(exports.getAttributes, translations_1.getLanguage, function (attributes, language) {
|
|
83
71
|
return [attributes, translations_1.TRANSLATIONS, language];
|
|
84
72
|
});
|
|
85
|
-
// Configurator
|
|
86
73
|
var setConfiguration = function (config) { return function (dispatch) { return __awaiter(void 0, void 0, void 0, function () {
|
|
87
74
|
return __generator(this, function (_a) {
|
|
88
75
|
switch (_a.label) {
|
|
89
76
|
case 0:
|
|
90
77
|
dispatch((0, treble_1.setPlayerLoading)(true));
|
|
91
|
-
return [4
|
|
78
|
+
return [4, window.threekit.configurator.setConfiguration(config)];
|
|
92
79
|
case 1:
|
|
93
80
|
_a.sent();
|
|
94
81
|
dispatch((0, treble_1.setPlayerLoading)(false));
|
|
95
|
-
return [2
|
|
82
|
+
return [2];
|
|
96
83
|
}
|
|
97
84
|
});
|
|
98
85
|
}); }; };
|
package/dist/store/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
|
29
29
|
wishlist: import("../Treble").WishlistArray;
|
|
30
30
|
price: import("./price").PriceState;
|
|
31
31
|
}, import("redux").Dispatch<import("redux").AnyAction>>>>;
|
|
32
|
-
export declare const createStore: (reducer?: Record<string, Reducer
|
|
32
|
+
export declare const createStore: (reducer?: Record<string, Reducer>) => import("@reduxjs/toolkit").EnhancedStore<{
|
|
33
33
|
treble: import("./treble").TrebleState;
|
|
34
34
|
product: import("./product").ProductState;
|
|
35
35
|
attributes: import("./attributes").AttributesState;
|