@threekit-tools/treble 0.0.69 → 0.0.72
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.js +21 -21
- package/dist/api/datatables.js +0 -2
- package/dist/components/ProductDescription/index.d.ts +3 -2
- package/dist/components/ProductDescription/index.js +17 -11
- package/dist/components/ProductDescription/{description.styles.d.ts → productDescription.styles.d.ts} +0 -0
- package/dist/components/ProductDescription/{description.styles.js → productDescription.styles.js} +0 -0
- package/dist/components/ProductName/index.d.ts +3 -2
- package/dist/components/ProductName/index.js +11 -6
- package/dist/components/TotalPrice/index.d.ts +3 -2
- package/dist/components/TotalPrice/index.js +11 -6
- package/dist/hooks/useConfigurationLoader/index.d.ts +2 -0
- package/dist/hooks/useConfigurationLoader/index.js +68 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/package.json +3 -2
package/dist/Treble/Snapshots.js
CHANGED
|
@@ -40,7 +40,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
40
40
|
};
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
var api_1 = __importDefault(require("../api"));
|
|
43
|
-
|
|
43
|
+
// import connection from '../connection';
|
|
44
44
|
var constants_1 = require("../constants");
|
|
45
45
|
var utils_1 = require("../utils");
|
|
46
46
|
var DEFAULT_CAMERA_CONFIG = {
|
|
@@ -129,12 +129,11 @@ var Snapshots = /** @class */ (function () {
|
|
|
129
129
|
}, Promise.resolve(snapshots));
|
|
130
130
|
};
|
|
131
131
|
this.takeSnapshots = function (camerasList, snapshotsConfig) { return __awaiter(_this, void 0, void 0, function () {
|
|
132
|
-
var
|
|
133
|
-
var
|
|
134
|
-
return __generator(this, function (
|
|
135
|
-
switch (
|
|
132
|
+
var filename, size, format, attributeName, output, cameras, snapshotsRaw, snapshotData, camerasMap_1, currentCamera, cameraPosition, _a, attachments, response, urlsArray, snapshotBlobs, snapshotFiles;
|
|
133
|
+
var _b;
|
|
134
|
+
return __generator(this, function (_c) {
|
|
135
|
+
switch (_c.label) {
|
|
136
136
|
case 0:
|
|
137
|
-
_a = connection_1.default.getConnection(), threekitDomain = _a.threekitDomain, orgId = _a.orgId;
|
|
138
137
|
filename = (snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.filename) || DEFAULT_CAMERA_CONFIG.filename;
|
|
139
138
|
size = (snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.size) || DEFAULT_CAMERA_CONFIG.size;
|
|
140
139
|
format = (snapshotsConfig === null || snapshotsConfig === void 0 ? void 0 : snapshotsConfig.format) || DEFAULT_CAMERA_CONFIG.format;
|
|
@@ -144,7 +143,7 @@ var Snapshots = /** @class */ (function () {
|
|
|
144
143
|
if (!(cameras.length === 1 && cameras[0] === undefined)) return [3 /*break*/, 2];
|
|
145
144
|
return [4 /*yield*/, this.getSnapshot({ size: size, format: format })];
|
|
146
145
|
case 1:
|
|
147
|
-
snapshotData =
|
|
146
|
+
snapshotData = _c.sent();
|
|
148
147
|
snapshotsRaw = [snapshotData];
|
|
149
148
|
return [3 /*break*/, 5];
|
|
150
149
|
case 2:
|
|
@@ -156,17 +155,17 @@ var Snapshots = /** @class */ (function () {
|
|
|
156
155
|
cameraPosition = (0, utils_1.getCameraPosition)(window.threekit.player.camera);
|
|
157
156
|
return [4 /*yield*/, this.getSnapshots(cameras, camerasMap_1)];
|
|
158
157
|
case 3:
|
|
159
|
-
snapshotsRaw =
|
|
160
|
-
return [4 /*yield*/, window.threekit.configurator.setConfiguration((
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
snapshotsRaw = _c.sent();
|
|
159
|
+
return [4 /*yield*/, window.threekit.configurator.setConfiguration((_b = {},
|
|
160
|
+
_b[attributeName] = currentCamera,
|
|
161
|
+
_b))];
|
|
163
162
|
case 4:
|
|
164
|
-
|
|
163
|
+
_c.sent();
|
|
165
164
|
(0, utils_1.setCameraPosition)(window.threekit.player.camera, cameraPosition);
|
|
166
|
-
|
|
165
|
+
_c.label = 5;
|
|
167
166
|
case 5:
|
|
168
|
-
|
|
169
|
-
switch (
|
|
167
|
+
_a = output;
|
|
168
|
+
switch (_a) {
|
|
170
169
|
case constants_1.SNAPSHOT_OUTPUTS.url: return [3 /*break*/, 6];
|
|
171
170
|
case constants_1.SNAPSHOT_OUTPUTS.download: return [3 /*break*/, 8];
|
|
172
171
|
case constants_1.SNAPSHOT_OUTPUTS.blob: return [3 /*break*/, 9];
|
|
@@ -179,8 +178,11 @@ var Snapshots = /** @class */ (function () {
|
|
|
179
178
|
var _a;
|
|
180
179
|
var cameraName = (camerasList === null || camerasList === void 0 ? void 0 : camerasList[idx])
|
|
181
180
|
? (0, utils_1.regularToKebabCase)(camerasList[idx] || 'default')
|
|
182
|
-
:
|
|
183
|
-
var
|
|
181
|
+
: filename;
|
|
182
|
+
var preppedFilename = cameraName === filename
|
|
183
|
+
? "".concat(filename, ".").concat(format)
|
|
184
|
+
: "".concat(filename, "-").concat(cameraName, ".").concat(format);
|
|
185
|
+
var file = (0, utils_1.dataURItoFile)(el, preppedFilename);
|
|
184
186
|
return Object.assign(output, (_a = {}, _a[cameraName] = file, _a));
|
|
185
187
|
}, {});
|
|
186
188
|
return [4 /*yield*/, api_1.default.configurations.save({
|
|
@@ -189,10 +191,8 @@ var Snapshots = /** @class */ (function () {
|
|
|
189
191
|
attachments: attachments,
|
|
190
192
|
})];
|
|
191
193
|
case 7:
|
|
192
|
-
|
|
193
|
-
urlsArray = Object.
|
|
194
|
-
return "".concat(threekitDomain, "/api/configurations/").concat(response_1.data.shortId, "/files/").concat(key, "?orgId=").concat(orgId);
|
|
195
|
-
});
|
|
194
|
+
response = _c.sent();
|
|
195
|
+
urlsArray = Object.values(response.data.attachments);
|
|
196
196
|
return [2 /*return*/, Promise.resolve(urlsArray)];
|
|
197
197
|
case 8:
|
|
198
198
|
snapshotsRaw.forEach(function (snapshotBlob, idx) {
|
package/dist/api/datatables.js
CHANGED
|
@@ -70,8 +70,6 @@ var getDatatable = function (datatableId, config) { return __awaiter(void 0, voi
|
|
|
70
70
|
return output;
|
|
71
71
|
var rowOutput = row.reduce(function (result, el, i) {
|
|
72
72
|
var _a;
|
|
73
|
-
if (!i)
|
|
74
|
-
return result;
|
|
75
73
|
return Object.assign(result, (_a = {},
|
|
76
74
|
_a[headings[i]] = el.length
|
|
77
75
|
? (0, utils_1.isJsonString)(el)
|
|
@@ -4,8 +4,8 @@ interface IProductDescription {
|
|
|
4
4
|
description?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
(props: IProductDescription): JSX.Element
|
|
7
|
+
export declare const ProductDescriptionComponent: {
|
|
8
|
+
(props: IProductDescription): JSX.Element;
|
|
9
9
|
propTypes: {
|
|
10
10
|
/**
|
|
11
11
|
* The description displayed to the user
|
|
@@ -21,4 +21,5 @@ export declare const ProductDescription: {
|
|
|
21
21
|
className: string;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
+
declare const ProductDescription: (props: IProductDescription) => JSX.Element | null;
|
|
24
25
|
export default ProductDescription;
|
|
@@ -3,25 +3,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.ProductDescriptionComponent = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var prop_types_1 = __importDefault(require("prop-types"));
|
|
9
|
-
var
|
|
9
|
+
var productDescription_styles_1 = require("./productDescription.styles");
|
|
10
10
|
var useMetadata_1 = __importDefault(require("../../hooks/useMetadata"));
|
|
11
11
|
var utils_1 = require("../../utils");
|
|
12
|
+
var ProductDescriptionComponent = function (props) {
|
|
13
|
+
var _a = Object.assign({ className: '' }, props), description = _a.description, customClassName = _a.className;
|
|
14
|
+
var cls = (0, utils_1.generateDisplayClassName)('description', customClassName);
|
|
15
|
+
return react_1.default.createElement(productDescription_styles_1.Wrapper, { className: cls }, description);
|
|
16
|
+
};
|
|
17
|
+
exports.ProductDescriptionComponent = ProductDescriptionComponent;
|
|
12
18
|
var ProductDescription = function (props) {
|
|
13
|
-
var _a
|
|
19
|
+
var _a;
|
|
20
|
+
var _b = Object.assign({
|
|
14
21
|
description: undefined,
|
|
15
|
-
|
|
16
|
-
}, props), description = _a.description, customClassName = _a.className;
|
|
22
|
+
}, props), description = _b.description, className = _b.className;
|
|
17
23
|
var metadata = (0, useMetadata_1.default)();
|
|
18
24
|
if (!description && !(metadata === null || metadata === void 0 ? void 0 : metadata._description))
|
|
19
25
|
return null;
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
if (!description)
|
|
27
|
+
return null;
|
|
28
|
+
return (react_1.default.createElement(exports.ProductDescriptionComponent, { className: className, description: ((_a = metadata === null || metadata === void 0 ? void 0 : metadata._description) === null || _a === void 0 ? void 0 : _a.toString()) || description }));
|
|
22
29
|
};
|
|
23
|
-
exports.
|
|
24
|
-
exports.ProductDescription.propTypes = {
|
|
30
|
+
exports.ProductDescriptionComponent.propTypes = {
|
|
25
31
|
/**
|
|
26
32
|
* The description displayed to the user
|
|
27
33
|
*/
|
|
@@ -31,8 +37,8 @@ exports.ProductDescription.propTypes = {
|
|
|
31
37
|
*/
|
|
32
38
|
className: prop_types_1.default.string,
|
|
33
39
|
};
|
|
34
|
-
exports.
|
|
40
|
+
exports.ProductDescriptionComponent.defaultProps = {
|
|
35
41
|
description: undefined,
|
|
36
42
|
className: '',
|
|
37
43
|
};
|
|
38
|
-
exports.default =
|
|
44
|
+
exports.default = ProductDescription;
|
|
File without changes
|
package/dist/components/ProductDescription/{description.styles.js → productDescription.styles.js}
RENAMED
|
File without changes
|
|
@@ -5,8 +5,8 @@ interface ITitle {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
align?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const
|
|
9
|
-
(props: ITitle): JSX.Element
|
|
8
|
+
export declare const ProductNameComponent: {
|
|
9
|
+
(props: ITitle): JSX.Element;
|
|
10
10
|
propTypes: {
|
|
11
11
|
/**
|
|
12
12
|
* The title displayed to the user
|
|
@@ -26,4 +26,5 @@ export declare const ProductName: {
|
|
|
26
26
|
align: string;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
+
export declare const ProductName: (props: ITitle) => JSX.Element | null;
|
|
29
30
|
export default ProductName;
|
|
@@ -3,22 +3,27 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ProductName = void 0;
|
|
6
|
+
exports.ProductName = exports.ProductNameComponent = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var prop_types_1 = __importDefault(require("prop-types"));
|
|
9
9
|
var productName_styles_1 = require("./productName.styles");
|
|
10
10
|
var useName_1 = __importDefault(require("../../hooks/useName"));
|
|
11
11
|
var utils_1 = require("../../utils");
|
|
12
|
-
var
|
|
12
|
+
var ProductNameComponent = function (props) {
|
|
13
13
|
var _a = Object.assign({ className: '', align: 'left' }, props), title = _a.title, customClassName = _a.className, align = _a.align;
|
|
14
|
+
var cls = (0, utils_1.generateDisplayClassName)('title', customClassName);
|
|
15
|
+
return (react_1.default.createElement(productName_styles_1.Wrapper, { align: align, className: cls }, title));
|
|
16
|
+
};
|
|
17
|
+
exports.ProductNameComponent = ProductNameComponent;
|
|
18
|
+
var ProductName = function (props) {
|
|
19
|
+
var title = props.title, className = props.className, align = props.align;
|
|
14
20
|
var name = (0, useName_1.default)();
|
|
15
21
|
if (!(title === null || title === void 0 ? void 0 : title.length) && !name)
|
|
16
22
|
return null;
|
|
17
|
-
|
|
18
|
-
return (react_1.default.createElement(productName_styles_1.Wrapper, { align: align, className: cls }, title || name));
|
|
23
|
+
return (react_1.default.createElement(exports.ProductNameComponent, { align: align, className: className, title: title || name }));
|
|
19
24
|
};
|
|
20
25
|
exports.ProductName = ProductName;
|
|
21
|
-
exports.
|
|
26
|
+
exports.ProductNameComponent.propTypes = {
|
|
22
27
|
/**
|
|
23
28
|
* The title displayed to the user
|
|
24
29
|
*/
|
|
@@ -32,7 +37,7 @@ exports.ProductName.propTypes = {
|
|
|
32
37
|
*/
|
|
33
38
|
align: prop_types_1.default.string,
|
|
34
39
|
};
|
|
35
|
-
exports.
|
|
40
|
+
exports.ProductNameComponent.defaultProps = {
|
|
36
41
|
className: '',
|
|
37
42
|
align: 'left',
|
|
38
43
|
};
|
|
@@ -4,8 +4,8 @@ interface IPrice {
|
|
|
4
4
|
price?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
(props: IPrice): JSX.Element
|
|
7
|
+
export declare const TotalPriceComponent: {
|
|
8
|
+
(props: IPrice): JSX.Element;
|
|
9
9
|
propTypes: {
|
|
10
10
|
/**
|
|
11
11
|
* The price displayed to the user
|
|
@@ -21,4 +21,5 @@ export declare const TotalPrice: {
|
|
|
21
21
|
className: string;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
+
export declare const TotalPrice: (props: IPrice) => JSX.Element | null;
|
|
24
25
|
export default TotalPrice;
|
|
@@ -3,25 +3,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TotalPrice = void 0;
|
|
6
|
+
exports.TotalPrice = exports.TotalPriceComponent = void 0;
|
|
7
7
|
var react_1 = __importDefault(require("react"));
|
|
8
8
|
var prop_types_1 = __importDefault(require("prop-types"));
|
|
9
9
|
var totalPrice_styles_1 = require("./totalPrice.styles");
|
|
10
10
|
var usePrice_1 = __importDefault(require("../../hooks/usePrice"));
|
|
11
11
|
var utils_1 = require("../../utils");
|
|
12
|
-
var
|
|
12
|
+
var TotalPriceComponent = function (props) {
|
|
13
13
|
var price = props.price, customClassName = props.className;
|
|
14
|
-
var priceData = (0, usePrice_1.default)();
|
|
15
14
|
var cls = (0, utils_1.generateDisplayClassName)('price', customClassName);
|
|
15
|
+
return react_1.default.createElement(totalPrice_styles_1.Wrapper, { className: cls }, price);
|
|
16
|
+
};
|
|
17
|
+
exports.TotalPriceComponent = TotalPriceComponent;
|
|
18
|
+
var TotalPrice = function (props) {
|
|
19
|
+
var price = props.price, className = props.className;
|
|
20
|
+
var priceData = (0, usePrice_1.default)();
|
|
16
21
|
var preppedPrice = props.price;
|
|
17
22
|
if (priceData)
|
|
18
23
|
preppedPrice = "".concat(priceData.price, " ").concat(priceData.currency);
|
|
19
24
|
if (!price && !priceData)
|
|
20
25
|
return null;
|
|
21
|
-
return react_1.default.createElement(
|
|
26
|
+
return react_1.default.createElement(exports.TotalPriceComponent, { className: className, price: preppedPrice });
|
|
22
27
|
};
|
|
23
28
|
exports.TotalPrice = TotalPrice;
|
|
24
|
-
exports.
|
|
29
|
+
exports.TotalPriceComponent.propTypes = {
|
|
25
30
|
/**
|
|
26
31
|
* The price displayed to the user
|
|
27
32
|
*/
|
|
@@ -31,7 +36,7 @@ exports.TotalPrice.propTypes = {
|
|
|
31
36
|
*/
|
|
32
37
|
className: prop_types_1.default.string,
|
|
33
38
|
};
|
|
34
|
-
exports.
|
|
39
|
+
exports.TotalPriceComponent.defaultProps = {
|
|
35
40
|
price: undefined,
|
|
36
41
|
className: '',
|
|
37
42
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
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
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
var api_1 = __importDefault(require("../../api"));
|
|
43
|
+
var attributes_1 = require("../../store/attributes");
|
|
44
|
+
var store_1 = require("../../store");
|
|
45
|
+
var useConfigurationLoader = function () {
|
|
46
|
+
var dispatch = (0, store_1.useThreekitDispatch)();
|
|
47
|
+
var loadConfiguration = function (configurationId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
+
var configuration;
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
switch (_a.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
if (!configurationId)
|
|
53
|
+
return [2 /*return*/];
|
|
54
|
+
return [4 /*yield*/, api_1.default.configurations.fetch(configurationId)];
|
|
55
|
+
case 1:
|
|
56
|
+
configuration = _a.sent();
|
|
57
|
+
if (!configuration)
|
|
58
|
+
return [2 /*return*/];
|
|
59
|
+
return [4 /*yield*/, dispatch((0, attributes_1.setConfiguration)(configuration.data.variant))];
|
|
60
|
+
case 2:
|
|
61
|
+
_a.sent();
|
|
62
|
+
return [2 /*return*/, Promise.resolve()];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}); };
|
|
66
|
+
return loadConfiguration;
|
|
67
|
+
};
|
|
68
|
+
exports.default = useConfigurationLoader;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import useAttribute from './hooks/useAttribute';
|
|
2
2
|
import useConfigurator from './hooks/useConfigurator';
|
|
3
|
+
import useConfigurationLoader from './hooks/useConfigurationLoader';
|
|
3
4
|
import useMetadata from './hooks/useMetadata';
|
|
4
5
|
import useName from './hooks/useName';
|
|
5
6
|
import usePlayerLoadingStatus from './hooks/usePlayerLoadingStatus';
|
|
@@ -45,4 +46,4 @@ import icons from './icons';
|
|
|
45
46
|
export * from './icons';
|
|
46
47
|
import TrebleApp from './components/TrebleApp';
|
|
47
48
|
import ProductLayout from './components/ProductLayout';
|
|
48
|
-
export { useAttribute, useConfigurator, useMetadata, useName, usePlayerLoadingStatus, usePrice, useThreekitInitStatus, useZoom, useSnapshot, useWishlist, useShare, usePlayerPortal, useProductCache, useNestedConfigurator, 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, icons, TrebleApp, ProductLayout, };
|
|
49
|
+
export { useAttribute, useConfigurator, useConfigurationLoader, useMetadata, useName, usePlayerLoadingStatus, usePrice, useThreekitInitStatus, useZoom, useSnapshot, useWishlist, useShare, usePlayerPortal, useProductCache, useNestedConfigurator, 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, icons, TrebleApp, ProductLayout, };
|
package/dist/index.js
CHANGED
|
@@ -13,12 +13,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ProductLayout = exports.TrebleApp = exports.icons = 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.useNestedConfigurator = exports.useProductCache = exports.usePlayerPortal = exports.useShare = exports.useWishlist = exports.useSnapshot = exports.useZoom = exports.useThreekitInitStatus = exports.usePrice = exports.usePlayerLoadingStatus = exports.useName = exports.useMetadata = exports.useConfigurator = exports.useAttribute = void 0;
|
|
16
|
+
exports.ProductLayout = exports.TrebleApp = exports.icons = 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.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;
|
|
17
17
|
// Hooks
|
|
18
18
|
var useAttribute_1 = __importDefault(require("./hooks/useAttribute"));
|
|
19
19
|
exports.useAttribute = useAttribute_1.default;
|
|
20
20
|
var useConfigurator_1 = __importDefault(require("./hooks/useConfigurator"));
|
|
21
21
|
exports.useConfigurator = useConfigurator_1.default;
|
|
22
|
+
var useConfigurationLoader_1 = __importDefault(require("./hooks/useConfigurationLoader"));
|
|
23
|
+
exports.useConfigurationLoader = useConfigurationLoader_1.default;
|
|
22
24
|
var useMetadata_1 = __importDefault(require("./hooks/useMetadata"));
|
|
23
25
|
exports.useMetadata = useMetadata_1.default;
|
|
24
26
|
var useName_1 = __importDefault(require("./hooks/useName"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threekit-tools/treble",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.72",
|
|
4
4
|
"author": "Amaan Saeed",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -60,12 +60,13 @@
|
|
|
60
60
|
"@types/webpack-env": "^1.16.3",
|
|
61
61
|
"babel-jest": "^27.5.1",
|
|
62
62
|
"babel-loader": "^8.2.2",
|
|
63
|
+
"chromatic": "^6.5.3",
|
|
63
64
|
"jest": "^27.5.1",
|
|
64
65
|
"react": ">=17.0.2",
|
|
65
66
|
"react-dom": ">=17.0.2",
|
|
66
67
|
"rimraf": "^3.0.2",
|
|
67
68
|
"serve": "^12.0.1",
|
|
68
|
-
"storybook
|
|
69
|
+
"themeprovider-storybook": "^1.8.0",
|
|
69
70
|
"ts-jest": "^27.1.3",
|
|
70
71
|
"typescript": ">=4.4.4"
|
|
71
72
|
},
|