@threekit-tools/treble 0.0.42 → 0.0.43

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.
@@ -45,6 +45,6 @@ var ThreekitProvider = function (props) {
45
45
  return (react_1.default.createElement(react_redux_1.Provider, { store: store_1.default },
46
46
  react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme_1.default },
47
47
  react_1.default.createElement(GlobalStyles_styles_1.default, null),
48
- react_1.default.createElement(App, { locale: props.locale, project: props.project, playerConfig: props.playerConfig, threekitEnv: props.threekitEnv }, props.children))));
48
+ react_1.default.createElement(App, { locale: props.locale, project: props.project, playerConfig: props.playerConfig, threekitEnv: props.threekitEnv, eventHandlers: props.eventHandlers }, props.children))));
49
49
  };
50
50
  exports.default = ThreekitProvider;
@@ -6,7 +6,7 @@ import { ISaveConfigurationConfig, WishlistArray } from '../Treble';
6
6
  * Types and Interfaces
7
7
  ****************************************************/
8
8
  interface EventHandlers {
9
- postConfigurationChange?: (attributes: Array<IThreekitDisplayAttribute>) => void | Promise<void>;
9
+ postConfigurationChange?: (updatedAttributes: Array<IThreekitDisplayAttribute>, configurationChange: ISetConfiguration, previousConfiguration: Array<IThreekitDisplayAttribute>) => void | Promise<void>;
10
10
  }
11
11
  export interface ILaunchConfig {
12
12
  threekitEnv: string;
@@ -390,17 +390,18 @@ var launch = function (launchConfig) {
390
390
  exports.launch = launch;
391
391
  // Configurator
392
392
  var setConfiguration = function (config) { return function (dispatch) { return __awaiter(void 0, void 0, void 0, function () {
393
- var updatedAttributes;
393
+ var previousConfiguration, updatedAttributes;
394
394
  return __generator(this, function (_a) {
395
395
  switch (_a.label) {
396
396
  case 0:
397
+ previousConfiguration = window.threekit.configurator.getDisplayAttributes();
397
398
  dispatch(setPlayerLoading(true));
398
399
  return [4 /*yield*/, window.threekit.configurator.setConfiguration(config)];
399
400
  case 1:
400
401
  _a.sent();
401
402
  updatedAttributes = window.threekit.configurator.getDisplayAttributes();
402
403
  if (!EVENTS.postConfigurationChange) return [3 /*break*/, 3];
403
- return [4 /*yield*/, EVENTS.postConfigurationChange(updatedAttributes)];
404
+ return [4 /*yield*/, EVENTS.postConfigurationChange(updatedAttributes, config, previousConfiguration)];
404
405
  case 2:
405
406
  _a.sent();
406
407
  _a.label = 3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threekit-tools/treble",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "author": "Amaan Saeed",
5
5
  "license": "MIT",
6
6
  "files": [