@threekit-tools/treble 0.0.62 → 0.0.65
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 -3
- package/dist/Treble/Treble.js +0 -1
- package/dist/api/configurations.d.ts +1 -1
- package/dist/api/datatables.d.ts +7 -0
- package/dist/api/datatables.js +90 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/components/ProductLayout/index.d.ts +1 -1
- package/dist/components/Switch/index.js +1 -1
- package/dist/components/Wishlist/WishlistItem.d.ts +1 -1
- package/dist/components/containers/formInputContainer.d.ts +2 -2
- package/dist/components/containers/formInputContainer.js +1 -1
- package/dist/constants.d.ts +7 -0
- package/dist/constants.js +8 -1
- package/dist/hooks/useAttribute/index.d.ts +1 -1
- package/dist/hooks/useConfigurator/index.d.ts +1 -1
- package/dist/hooks/useMetadata/index.d.ts +1 -1
- package/dist/hooks/useNestedConfigurator/index.d.ts +1 -1
- package/dist/hooks/useSingleAnimation/index.d.ts +1 -1
- package/dist/http/configurations.d.ts +1 -1
- package/dist/http/datatables.d.ts +18 -0
- package/dist/http/datatables.js +22 -0
- package/dist/http/index.d.ts +2 -0
- package/dist/http/index.js +2 -0
- package/dist/store/attributes.d.ts +1 -1
- package/dist/store/product.d.ts +1 -1
- package/dist/store/treble.d.ts +1 -1
- package/dist/store/treble.js +1 -0
- package/dist/{threekit.d.ts → types.d.ts} +2 -0
- package/dist/{threekit.js → types.js} +0 -0
- package/dist/utils.d.ts +2 -2
- package/package.json +1 -1
package/dist/Treble/Treble.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { IThreekitPlayer, IConfiguration, ISetConfiguration, IThreekitPrivateConfigurator } from '../threekit';
|
|
1
|
+
import { IThreekitPlayer, IConfiguration, ISetConfiguration, IThreekitPrivateConfigurator } from '../types';
|
|
3
2
|
import { IWishlist } from './Wishlist';
|
|
4
3
|
import Snapshots from './Snapshots';
|
|
5
4
|
import { ISaveConfiguration } from '../api/configurations';
|
|
@@ -14,7 +13,6 @@ interface IEmailShareCredentials {
|
|
|
14
13
|
templateId: string;
|
|
15
14
|
}
|
|
16
15
|
declare class Treble {
|
|
17
|
-
_api: typeof threekitAPI;
|
|
18
16
|
_player: IThreekitPlayer;
|
|
19
17
|
wishlist: IWishlist;
|
|
20
18
|
private _initialConfiguration;
|
package/dist/Treble/Treble.js
CHANGED
|
@@ -120,7 +120,6 @@ var Treble = /** @class */ (function () {
|
|
|
120
120
|
return api_1.default.server.sendEmail(data);
|
|
121
121
|
};
|
|
122
122
|
// Threekit API
|
|
123
|
-
this._api = api_1.default;
|
|
124
123
|
this._player = player;
|
|
125
124
|
this.wishlist = (0, Wishlist_1.default)(orgId);
|
|
126
125
|
this._snapshots = new Snapshots_1.default();
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
exports.getDatatable = void 0;
|
|
43
|
+
var http_1 = __importDefault(require("../http"));
|
|
44
|
+
var utils_1 = require("../utils");
|
|
45
|
+
var constants_1 = require("../constants");
|
|
46
|
+
var getDatatable = function (datatableId, config) { return __awaiter(void 0, void 0, void 0, function () {
|
|
47
|
+
var message, format, response, csvData, headings, datatableJson;
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
switch (_a.label) {
|
|
50
|
+
case 0:
|
|
51
|
+
if (!datatableId)
|
|
52
|
+
message = 'Requires a datatable ID';
|
|
53
|
+
if (message)
|
|
54
|
+
return [2 /*return*/, Promise.resolve(undefined)];
|
|
55
|
+
format = Object.assign({ format: constants_1.DATATABLE_FORMATS.json }, config).format;
|
|
56
|
+
return [4 /*yield*/, http_1.default.datatables.getDatatable(datatableId)];
|
|
57
|
+
case 1:
|
|
58
|
+
response = _a.sent();
|
|
59
|
+
if (response.status !== 200)
|
|
60
|
+
return [2 /*return*/, Promise.resolve(undefined)];
|
|
61
|
+
if (format.toLowerCase() === constants_1.DATATABLE_FORMATS.csv)
|
|
62
|
+
return [2 /*return*/, Promise.resolve(response.data)];
|
|
63
|
+
csvData = response.data
|
|
64
|
+
.replace(/"/g, '')
|
|
65
|
+
.split('\n')
|
|
66
|
+
.map(function (el) { return el.split(','); });
|
|
67
|
+
headings = csvData[0];
|
|
68
|
+
datatableJson = csvData.reduce(function (output, row, idx) {
|
|
69
|
+
if (!idx)
|
|
70
|
+
return output;
|
|
71
|
+
var rowOutput = row.reduce(function (result, el, i) {
|
|
72
|
+
var _a;
|
|
73
|
+
if (!i)
|
|
74
|
+
return result;
|
|
75
|
+
return Object.assign(result, (_a = {},
|
|
76
|
+
_a[headings[i]] = el.length
|
|
77
|
+
? (0, utils_1.isJsonString)(el)
|
|
78
|
+
? JSON.parse(el)
|
|
79
|
+
: el
|
|
80
|
+
: undefined,
|
|
81
|
+
_a));
|
|
82
|
+
}, {});
|
|
83
|
+
output.push(rowOutput);
|
|
84
|
+
return output;
|
|
85
|
+
}, []);
|
|
86
|
+
return [2 /*return*/, Promise.resolve(datatableJson)];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}); };
|
|
90
|
+
exports.getDatatable = getDatatable;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as configurations from './configurations';
|
|
|
3
3
|
import * as price from './price';
|
|
4
4
|
import * as orders from './orders';
|
|
5
5
|
import * as catalog from './catalog';
|
|
6
|
+
import * as datatables from './datatables';
|
|
6
7
|
import * as server from './server';
|
|
7
8
|
declare const _default: {
|
|
8
9
|
products: typeof products;
|
|
@@ -10,6 +11,7 @@ declare const _default: {
|
|
|
10
11
|
price: typeof price;
|
|
11
12
|
orders: typeof orders;
|
|
12
13
|
catalog: typeof catalog;
|
|
14
|
+
datatables: typeof datatables;
|
|
13
15
|
server: typeof server;
|
|
14
16
|
};
|
|
15
17
|
export default _default;
|
package/dist/api/index.js
CHANGED
|
@@ -24,6 +24,7 @@ var configurations = __importStar(require("./configurations"));
|
|
|
24
24
|
var price = __importStar(require("./price"));
|
|
25
25
|
var orders = __importStar(require("./orders"));
|
|
26
26
|
var catalog = __importStar(require("./catalog"));
|
|
27
|
+
var datatables = __importStar(require("./datatables"));
|
|
27
28
|
var server = __importStar(require("./server"));
|
|
28
29
|
exports.default = {
|
|
29
30
|
products: products,
|
|
@@ -31,5 +32,6 @@ exports.default = {
|
|
|
31
32
|
price: price,
|
|
32
33
|
orders: orders,
|
|
33
34
|
catalog: catalog,
|
|
35
|
+
datatables: datatables,
|
|
34
36
|
server: server,
|
|
35
37
|
};
|
|
@@ -20,7 +20,7 @@ var Switch = function (props) {
|
|
|
20
20
|
react_1.default.createElement(FormComponentTitle_1.default, { title: title, className: cls }),
|
|
21
21
|
react_1.default.createElement(FormComponentDescription_1.default, { description: showDescription ? description : undefined, className: cls }),
|
|
22
22
|
react_1.default.createElement(switch_styles_1.SwitchWrapper, null,
|
|
23
|
-
react_1.default.createElement(switch_styles_1.Checkbox, { type: "checkbox", checked:
|
|
23
|
+
react_1.default.createElement(switch_styles_1.Checkbox, { type: "checkbox", checked: !!value, onChange: function () { return onChange === null || onChange === void 0 ? void 0 : onChange(!!!value); } }),
|
|
24
24
|
react_1.default.createElement(switch_styles_1.Knob, null),
|
|
25
25
|
react_1.default.createElement(switch_styles_1.Layer, null))));
|
|
26
26
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { RawAttributeValue } from '../../hooks/useAttribute';
|
|
3
|
-
import { IHydratedAttribute, IHydratedAttributeAssetValue } from '../../
|
|
3
|
+
import { IHydratedAttribute, IHydratedAttributeAssetValue } from '../../types';
|
|
4
4
|
export interface IOptionShared {
|
|
5
5
|
name: string;
|
|
6
6
|
value: string;
|
|
@@ -41,7 +41,7 @@ interface IHydrateAttributeConfig {
|
|
|
41
41
|
sort?: string;
|
|
42
42
|
}
|
|
43
43
|
export declare const hydrateAttributeForComponent: (attribute: IHydratedAttribute, config: IHydrateAttributeConfig) => {
|
|
44
|
-
selected: string | number | boolean | import("../../
|
|
44
|
+
selected: string | number | boolean | import("../../types").IConfigurationAsset | import("../../types").IConfigurationColor;
|
|
45
45
|
options: {
|
|
46
46
|
name: string;
|
|
47
47
|
handleSelect: () => Promise<void>;
|
|
@@ -104,7 +104,7 @@ function formComponentContainer(FormComponent) {
|
|
|
104
104
|
var preppedProps = __assign({}, props);
|
|
105
105
|
if (!hideAttributeTitle && !preppedProps.title)
|
|
106
106
|
preppedProps.title = attributeData.label;
|
|
107
|
-
return (react_1.default.createElement(FormComponent, __assign({}, preppedProps, {
|
|
107
|
+
return (react_1.default.createElement(FormComponent, __assign({}, preppedProps, { value: selected, onClick: handleSetAttribute, onChange: handleSetAttribute, options: options, isPlayerLoading: isLoading })));
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
110
|
exports.default = formComponentContainer;
|
package/dist/constants.d.ts
CHANGED
|
@@ -84,3 +84,10 @@ export declare const SNAPSHOT_OUTPUTS: {
|
|
|
84
84
|
* Wishlist
|
|
85
85
|
****************************************************/
|
|
86
86
|
export declare const WISHLIST_LOCALSTORAGE_KEY = "tk_wishlist";
|
|
87
|
+
/*****************************************************
|
|
88
|
+
* Datatables
|
|
89
|
+
****************************************************/
|
|
90
|
+
export declare const DATATABLE_FORMATS: {
|
|
91
|
+
csv: string;
|
|
92
|
+
json: string;
|
|
93
|
+
};
|
package/dist/constants.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
****************************************************/
|
|
5
5
|
var _a;
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.WISHLIST_LOCALSTORAGE_KEY = exports.SNAPSHOT_OUTPUTS = exports.SNAPSHOT_FORMATS = exports.METADATA_RESERVED = exports.ATTRIBUTES_RESERVED = exports.SORT_OPTIONS = exports.ASSET_TYPES = exports.ATTRIBUTE_TYPES = exports.DEFAULT_PLAYER_CONFIG = exports.TK_PLAYER_ROOT_DIV = exports.TK_PLAYER_LOADER_DIV = exports.TK_SAVED_CONFIG_PARAM_KEY = exports.TK_PRODUCT_ID_PARAM_KEY = exports.IS_TREBLE_SCRIPTS = exports.FORM_CLASS_NAME = exports.DISPLAY_CLASS_NAME = exports.TOOL_CLASS_NAME = exports.LAYOUT_CLASS_NAME = exports.WIDGET_CLASS_NAME = exports.INPUT_COMPONENT_CLASS_NAME = exports.CLASS_NAME_PREFIX = exports.DEFAULT_CLASS_NAME = void 0;
|
|
7
|
+
exports.DATATABLE_FORMATS = exports.WISHLIST_LOCALSTORAGE_KEY = exports.SNAPSHOT_OUTPUTS = exports.SNAPSHOT_FORMATS = exports.METADATA_RESERVED = exports.ATTRIBUTES_RESERVED = exports.SORT_OPTIONS = exports.ASSET_TYPES = exports.ATTRIBUTE_TYPES = exports.DEFAULT_PLAYER_CONFIG = exports.TK_PLAYER_ROOT_DIV = exports.TK_PLAYER_LOADER_DIV = exports.TK_SAVED_CONFIG_PARAM_KEY = exports.TK_PRODUCT_ID_PARAM_KEY = exports.IS_TREBLE_SCRIPTS = exports.FORM_CLASS_NAME = exports.DISPLAY_CLASS_NAME = exports.TOOL_CLASS_NAME = exports.LAYOUT_CLASS_NAME = exports.WIDGET_CLASS_NAME = exports.INPUT_COMPONENT_CLASS_NAME = exports.CLASS_NAME_PREFIX = exports.DEFAULT_CLASS_NAME = void 0;
|
|
8
8
|
exports.DEFAULT_CLASS_NAME = 'threekit-react';
|
|
9
9
|
exports.CLASS_NAME_PREFIX = 'tk';
|
|
10
10
|
exports.INPUT_COMPONENT_CLASS_NAME = "".concat(exports.DEFAULT_CLASS_NAME, " ").concat(exports.CLASS_NAME_PREFIX, "-input");
|
|
@@ -97,3 +97,10 @@ exports.SNAPSHOT_OUTPUTS = {
|
|
|
97
97
|
* Wishlist
|
|
98
98
|
****************************************************/
|
|
99
99
|
exports.WISHLIST_LOCALSTORAGE_KEY = 'tk_wishlist';
|
|
100
|
+
/*****************************************************
|
|
101
|
+
* Datatables
|
|
102
|
+
****************************************************/
|
|
103
|
+
exports.DATATABLE_FORMATS = {
|
|
104
|
+
csv: 'csv',
|
|
105
|
+
json: 'json',
|
|
106
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHydratedAttribute, IConfigurationColor } from '../../
|
|
1
|
+
import { IHydratedAttribute, IConfigurationColor } from '../../types';
|
|
2
2
|
export declare type RawAttributeValue = string | number | boolean | IConfigurationColor | File | undefined;
|
|
3
3
|
declare type UseAttributeError = [undefined, undefined];
|
|
4
4
|
declare type UseAttributeSuccess = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ISetConfiguration, IHydratedAttribute } from '../../
|
|
1
|
+
import { ISetConfiguration, IHydratedAttribute } from '../../types';
|
|
2
2
|
declare type UseConfiguratorError = [undefined, undefined];
|
|
3
3
|
declare type UseConfiguratorSuccess = [
|
|
4
4
|
Record<string, IHydratedAttribute>,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHydratedAttribute, ISetConfiguration } from '../../
|
|
1
|
+
import { IHydratedAttribute, ISetConfiguration } from '../../types';
|
|
2
2
|
declare type UseNestedConfiguratorError = [undefined, undefined];
|
|
3
3
|
declare type UseNestedConfiguratorSuccess = [
|
|
4
4
|
Record<string, IHydratedAttribute>,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface IDatatable {
|
|
2
|
+
id: string;
|
|
3
|
+
orgId: string;
|
|
4
|
+
name: string;
|
|
5
|
+
version: number;
|
|
6
|
+
columnInfo: string;
|
|
7
|
+
createdBy: string;
|
|
8
|
+
updatedBy: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
deletedAt: null | string;
|
|
12
|
+
deletedBy: null | string;
|
|
13
|
+
}
|
|
14
|
+
export declare const getDatatablesList: () => Promise<import("axios").AxiosResponse<{
|
|
15
|
+
datatables: Array<IDatatable>;
|
|
16
|
+
}>>;
|
|
17
|
+
export declare const getDatatable: (datatableId: string) => Promise<import("axios").AxiosResponse<string>>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
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.getDatatable = exports.getDatatablesList = void 0;
|
|
7
|
+
var request_1 = __importDefault(require("./request"));
|
|
8
|
+
var DATATABLES_API_ROUTE = "/api/datatables";
|
|
9
|
+
var getDatatablesList = function () {
|
|
10
|
+
return request_1.default.get(DATATABLES_API_ROUTE);
|
|
11
|
+
};
|
|
12
|
+
exports.getDatatablesList = getDatatablesList;
|
|
13
|
+
var getDatatable = function (datatableId) {
|
|
14
|
+
var error;
|
|
15
|
+
if (!datatableId)
|
|
16
|
+
error = 'Requires a datatableId';
|
|
17
|
+
if (error)
|
|
18
|
+
throw new Error(error);
|
|
19
|
+
// return threekitRequest.get<Array<IDatatable>>(
|
|
20
|
+
return request_1.default.get("".concat(DATATABLES_API_ROUTE, "/").concat(datatableId, "/download"));
|
|
21
|
+
};
|
|
22
|
+
exports.getDatatable = getDatatable;
|
package/dist/http/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ 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
|
+
import * as datatables from './datatables';
|
|
6
7
|
import * as server from './server';
|
|
7
8
|
declare const _default: {
|
|
8
9
|
orders: typeof orders;
|
|
@@ -10,6 +11,7 @@ declare const _default: {
|
|
|
10
11
|
configurations: typeof configurations;
|
|
11
12
|
pricebook: typeof pricebook;
|
|
12
13
|
catalog: typeof catalog;
|
|
14
|
+
datatables: typeof datatables;
|
|
13
15
|
server: typeof server;
|
|
14
16
|
};
|
|
15
17
|
export default _default;
|
package/dist/http/index.js
CHANGED
|
@@ -24,6 +24,7 @@ var products = __importStar(require("./products"));
|
|
|
24
24
|
var configurations = __importStar(require("./configurations"));
|
|
25
25
|
var pricebook = __importStar(require("./pricebook"));
|
|
26
26
|
var catalog = __importStar(require("./catalog"));
|
|
27
|
+
var datatables = __importStar(require("./datatables"));
|
|
27
28
|
var server = __importStar(require("./server"));
|
|
28
29
|
exports.default = {
|
|
29
30
|
orders: orders,
|
|
@@ -31,5 +32,6 @@ exports.default = {
|
|
|
31
32
|
configurations: configurations,
|
|
32
33
|
pricebook: pricebook,
|
|
33
34
|
catalog: catalog,
|
|
35
|
+
datatables: datatables,
|
|
34
36
|
server: server,
|
|
35
37
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
|
-
import { ISetConfiguration, IThreekitDisplayAttribute } from '../
|
|
2
|
+
import { ISetConfiguration, IThreekitDisplayAttribute } from '../types';
|
|
3
3
|
import { ITranslationMap } from '../api/products';
|
|
4
4
|
/*****************************************************
|
|
5
5
|
* Types and Interfaces
|
package/dist/store/product.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
|
-
import { IMetadata, IConfiguration, IProduct } from '../
|
|
2
|
+
import { IMetadata, IConfiguration, IProduct } from '../types';
|
|
3
3
|
import { IConnectionConfig } from '../connection';
|
|
4
4
|
import { IReloadConfig } from './treble';
|
|
5
5
|
/*****************************************************
|
package/dist/store/treble.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RootState, ThreekitDispatch } from './index';
|
|
2
|
-
import { IProject, IPlayerConfig, IThreekitDisplayAttribute, ISetConfiguration, IConfiguration } from '../
|
|
2
|
+
import { IProject, IPlayerConfig, IThreekitDisplayAttribute, ISetConfiguration, IConfiguration } from '../types';
|
|
3
3
|
/*****************************************************
|
|
4
4
|
* Types and Interfaces
|
|
5
5
|
****************************************************/
|
package/dist/store/treble.js
CHANGED
|
@@ -190,6 +190,7 @@ var initPlayer = function (config) { return function (dispatch) { return __await
|
|
|
190
190
|
window.threekit = {
|
|
191
191
|
player: player,
|
|
192
192
|
configurator: configurator,
|
|
193
|
+
services: api_1.default,
|
|
193
194
|
treble: new Treble_1.default({
|
|
194
195
|
player: player,
|
|
195
196
|
orgId: orgId,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="webpack-env" />
|
|
2
|
+
import threekitAPI from './api';
|
|
2
3
|
import Treble from './Treble';
|
|
3
4
|
declare type SCENE_PHASES = 'LOADED' | 'PRELOADED' | 'RENDERED';
|
|
4
5
|
declare type PRIVATE_APIS = 'scene' | 'player';
|
|
@@ -296,6 +297,7 @@ declare global {
|
|
|
296
297
|
threekit: {
|
|
297
298
|
player: IThreekitPlayer;
|
|
298
299
|
configurator: IThreekitConfigurator;
|
|
300
|
+
services: typeof threekitAPI;
|
|
299
301
|
treble: Treble;
|
|
300
302
|
};
|
|
301
303
|
}
|
|
File without changes
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IThreekitCamera, IConfigurationColor, ICoordinates, IQuaternion, IThreekitDisplayAttribute, ISetConfiguration, IHydratedAttribute } from './
|
|
2
|
-
import { ITrebleConfig, IAttributeTypes } from './
|
|
1
|
+
import { IThreekitCamera, IConfigurationColor, ICoordinates, IQuaternion, IThreekitDisplayAttribute, ISetConfiguration, IHydratedAttribute } from './types';
|
|
2
|
+
import { ITrebleConfig, IAttributeTypes } from './types';
|
|
3
3
|
import { RawAttributeValue } from './hooks/useAttribute';
|
|
4
4
|
import { ITranslationMap } from './api/products';
|
|
5
5
|
interface ICameraPosition {
|