@threekit-tools/treble 0.0.79 → 0.0.80

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.
@@ -32,12 +32,13 @@ var GlobalStyles_styles_1 = __importDefault(require("./GlobalStyles.styles"));
32
32
  var DevTools_1 = __importDefault(require("../DevTools"));
33
33
  var App = function (props) {
34
34
  var dispatch = (0, store_1.useThreekitDispatch)();
35
- var playerConfig = props.playerConfig, productId = props.productId, project = props.project, locale = props.locale, threekitEnv = props.threekitEnv, eventHandlers = props.eventHandlers;
35
+ var playerConfig = props.playerConfig, assetId = props.assetId, productId = props.productId, project = props.project, locale = props.locale, threekitEnv = props.threekitEnv, eventHandlers = props.eventHandlers;
36
36
  (0, react_1.useEffect)(function () {
37
37
  var init = function () {
38
38
  dispatch((0, treble_1.launch)({
39
39
  playerConfig: playerConfig,
40
40
  productId: productId,
41
+ assetId: assetId,
41
42
  project: project,
42
43
  locale: locale,
43
44
  threekitEnv: threekitEnv,
@@ -53,7 +54,7 @@ var ThreekitProvider = function (props) {
53
54
  return (react_1.default.createElement(react_redux_1.Provider, { store: (0, store_1.default)(props.reducer) },
54
55
  react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme_1.default },
55
56
  react_1.default.createElement(GlobalStyles_styles_1.default, null),
56
- react_1.default.createElement(App, { locale: props.locale, productId: props.productId, project: props.project, playerConfig: props.playerConfig, threekitEnv: props.threekitEnv, eventHandlers: props.eventHandlers }, props.children),
57
+ react_1.default.createElement(App, { locale: props.locale, assetId: props.assetId, productId: props.productId, project: props.project, playerConfig: props.playerConfig, threekitEnv: props.threekitEnv, eventHandlers: props.eventHandlers }, props.children),
57
58
  react_1.default.createElement(DevTools_1.default, null))));
58
59
  };
59
60
  exports.default = ThreekitProvider;
@@ -13,6 +13,7 @@ export interface IPlayerInit {
13
13
  initialConfiguration?: IConfiguration;
14
14
  }
15
15
  export interface ILaunchConfig {
16
+ assetId?: string;
16
17
  productId: string;
17
18
  threekitEnv: string;
18
19
  serverUrl: string;
@@ -227,7 +227,7 @@ var initPlayer = function (config) {
227
227
  exports.initPlayer = initPlayer;
228
228
  var launch = function (launchConfig) {
229
229
  return function (dispatch) { return __awaiter(void 0, void 0, void 0, function () {
230
- var config, productId, credentials, productsRaw, products, threekitEnv, serverUrl, playerConfig, envCredentials, _a, assetId, stageId, configurationId, initialConfigurationRaw, threekitDomainRaw, orgId, authToken, el, threekitDomain, initialConfiguration, updatedAssetId, params, configId, configuration;
230
+ var config, productId, credentials, productsRaw, products, threekitEnv, serverUrl, playerConfig, envCredentials, _a, assetIdRaw, stageId, configurationId, initialConfigurationRaw, assetId, threekitDomainRaw, orgId, authToken, el, threekitDomain, initialConfiguration, updatedAssetId, params, configId, configuration;
231
231
  var _b, _c, _d, _e, _f, _g, _h;
232
232
  return __generator(this, function (_j) {
233
233
  switch (_j.label) {
@@ -285,7 +285,8 @@ var launch = function (launchConfig) {
285
285
  serverUrl = (launchConfig === null || launchConfig === void 0 ? void 0 : launchConfig.serverUrl) || ((_g = config === null || config === void 0 ? void 0 : config.project) === null || _g === void 0 ? void 0 : _g.serverUrl);
286
286
  playerConfig = Object.assign({}, constants_1.DEFAULT_PLAYER_CONFIG, config.player, launchConfig === null || launchConfig === void 0 ? void 0 : launchConfig.playerConfig);
287
287
  envCredentials = credentials[threekitEnv];
288
- _a = products[productId][threekitEnv], assetId = _a.assetId, stageId = _a.stageId, configurationId = _a.configurationId, initialConfigurationRaw = _a.initialConfiguration;
288
+ _a = products[productId][threekitEnv], assetIdRaw = _a.assetId, stageId = _a.stageId, configurationId = _a.configurationId, initialConfigurationRaw = _a.initialConfiguration;
289
+ assetId = (launchConfig === null || launchConfig === void 0 ? void 0 : launchConfig.assetId) || assetIdRaw;
289
290
  threekitDomainRaw = envCredentials.threekitDomain || "".concat(threekitEnv, ".threekit.com");
290
291
  orgId = envCredentials.orgId, authToken = envCredentials.publicToken;
291
292
  if (playerConfig.elementId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threekit-tools/treble",
3
- "version": "0.0.79",
3
+ "version": "0.0.80",
4
4
  "author": "Amaan Saeed",
5
5
  "license": "MIT",
6
6
  "files": [