@threekit-tools/treble 0.0.70 → 0.0.71

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.
@@ -24,6 +24,7 @@ declare class Treble {
24
24
  } & import("../http/configurations").IConfigurationResponse & {
25
25
  thumbnail: string;
26
26
  }>;
27
+ resumeConfiguration: (configurationId: string) => Promise<void>;
27
28
  getNestedConfigurator: (address: string | Array<string>) => undefined | IThreekitPrivateConfigurator;
28
29
  resetConfiguration: (configuration?: ISetConfiguration | undefined) => void;
29
30
  sendEmail: (credentials: IEmailShareCredentials, templateData: Record<string, any>) => Promise<import("../http/server").IPostEmailResponse>;
@@ -82,6 +82,23 @@ var Treble = /** @class */ (function () {
82
82
  }
83
83
  });
84
84
  }); };
85
+ this.resumeConfiguration = function (configurationId) { return __awaiter(_this, void 0, void 0, function () {
86
+ var configuration;
87
+ return __generator(this, function (_a) {
88
+ switch (_a.label) {
89
+ case 0:
90
+ if (!configurationId)
91
+ return [2 /*return*/];
92
+ return [4 /*yield*/, api_1.default.configurations.fetch(configurationId)];
93
+ case 1:
94
+ configuration = _a.sent();
95
+ if (!configuration)
96
+ return [2 /*return*/];
97
+ window.threekit.configurator.setConfiguration(configuration.data.variant);
98
+ return [2 /*return*/, Promise.resolve()];
99
+ }
100
+ });
101
+ }); };
85
102
  this.getNestedConfigurator = function (address) {
86
103
  if (!address)
87
104
  return undefined;
@@ -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)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threekit-tools/treble",
3
- "version": "0.0.70",
3
+ "version": "0.0.71",
4
4
  "author": "Amaan Saeed",
5
5
  "license": "MIT",
6
6
  "files": [