@ninetailed/experience.js-plugin-preview 1.7.0 → 1.7.2-beta.0

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/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export { NinetailedPreviewPlugin } from './lib/plugin';
2
+ export { NinetailedPreviewPlugin as default } from './lib/plugin';
package/index.esm.js CHANGED
@@ -1035,6 +1035,8 @@ const TRANSFORM_CLOSED_HIDE = `translate(${CONTAINER_WIDTH}px, 0px)`;
1035
1035
  const TRANSFORM_OPEN = `translate(0px, 0px)`;
1036
1036
  class WidgetContainer {
1037
1037
  constructor(options) {
1038
+ var _a, _b;
1039
+
1038
1040
  this.options = options;
1039
1041
  this.container = document.createElement('div');
1040
1042
  this.container.style.position = 'fixed';
@@ -1044,7 +1046,7 @@ class WidgetContainer {
1044
1046
  this.container.style.width = `${CONTAINER_WIDTH}px`;
1045
1047
  this.container.style.height = `${BUTTON_HEIGHT}px`;
1046
1048
 
1047
- if (options.ui.opener.hide) {
1049
+ if ((_b = (_a = options.ui) === null || _a === void 0 ? void 0 : _a.opener) === null || _b === void 0 ? void 0 : _b.hide) {
1048
1050
  this.container.style.transform = TRANSFORM_CLOSED_HIDE;
1049
1051
  } else {
1050
1052
  this.container.style.transform = TRANSFORM_CLOSED;
@@ -1063,7 +1065,9 @@ class WidgetContainer {
1063
1065
  }
1064
1066
 
1065
1067
  close() {
1066
- if (this.options.ui.opener.hide) {
1068
+ var _a, _b;
1069
+
1070
+ if ((_b = (_a = this.options.ui) === null || _a === void 0 ? void 0 : _a.opener) === null || _b === void 0 ? void 0 : _b.hide) {
1067
1071
  this.container.style.transform = TRANSFORM_CLOSED_HIDE;
1068
1072
  } else {
1069
1073
  this.container.style.transform = TRANSFORM_CLOSED;
@@ -1217,4 +1221,9 @@ const NinetailedPreviewPlugin = ({
1217
1221
  };
1218
1222
  };
1219
1223
 
1220
- export { NinetailedPreviewPlugin };
1224
+ if (typeof window === 'object' && !('process' in window)) {
1225
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1226
+ window.process = {};
1227
+ }
1228
+
1229
+ export { NinetailedPreviewPlugin, NinetailedPreviewPlugin as default };
package/index.umd.js CHANGED
@@ -1072,6 +1072,8 @@
1072
1072
  /** @class */
1073
1073
  function () {
1074
1074
  function WidgetContainer(options) {
1075
+ var _a, _b;
1076
+
1075
1077
  this.options = options;
1076
1078
  this.container = document.createElement('div');
1077
1079
  this.container.style.position = 'fixed';
@@ -1081,7 +1083,7 @@
1081
1083
  this.container.style.width = "".concat(CONTAINER_WIDTH, "px");
1082
1084
  this.container.style.height = "".concat(BUTTON_HEIGHT, "px");
1083
1085
 
1084
- if (options.ui.opener.hide) {
1086
+ if ((_b = (_a = options.ui) === null || _a === void 0 ? void 0 : _a.opener) === null || _b === void 0 ? void 0 : _b.hide) {
1085
1087
  this.container.style.transform = TRANSFORM_CLOSED_HIDE;
1086
1088
  } else {
1087
1089
  this.container.style.transform = TRANSFORM_CLOSED;
@@ -1102,7 +1104,9 @@
1102
1104
  WidgetContainer.prototype.close = function () {
1103
1105
  var _this = this;
1104
1106
 
1105
- if (this.options.ui.opener.hide) {
1107
+ var _a, _b;
1108
+
1109
+ if ((_b = (_a = this.options.ui) === null || _a === void 0 ? void 0 : _a.opener) === null || _b === void 0 ? void 0 : _b.hide) {
1106
1110
  this.container.style.transform = TRANSFORM_CLOSED_HIDE;
1107
1111
  } else {
1108
1112
  this.container.style.transform = TRANSFORM_CLOSED;
@@ -1272,7 +1276,13 @@
1272
1276
  };
1273
1277
  };
1274
1278
 
1279
+ if (typeof window === 'object' && !('process' in window)) {
1280
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1281
+ window.process = {};
1282
+ }
1283
+
1275
1284
  exports.NinetailedPreviewPlugin = NinetailedPreviewPlugin;
1285
+ exports["default"] = NinetailedPreviewPlugin;
1276
1286
 
1277
1287
  Object.defineProperty(exports, '__esModule', { value: true });
1278
1288
 
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js-plugin-preview",
3
- "version": "1.7.0",
3
+ "version": "1.7.2-beta.0",
4
4
  "main": "./index.umd.js",
5
5
  "module": "./index.esm.js",
6
6
  "typings": "./index.d.ts",
7
7
  "dependencies": {
8
8
  "analytics": "^0.8.0",
9
- "@ninetailed/experience.js-shared": "1.7.0",
9
+ "@ninetailed/experience.js-shared": "1.7.2-beta.0",
10
10
  "uuid": "^8.3.2",
11
11
  "ts-toolbelt": "^9.6.0",
12
12
  "locale-enum": "^1.1.1",
13
13
  "i18n-iso-countries": "^7.3.0",
14
14
  "lodash": "^4.17.21",
15
- "@ninetailed/experience.js-preview-bridge": "1.7.0",
15
+ "@ninetailed/experience.js-preview-bridge": "1.7.2-beta.0",
16
16
  "zoid": "^9.0.86",
17
- "@ninetailed/experience.js": "1.7.0"
17
+ "@ninetailed/experience.js": "1.7.2-beta.0"
18
18
  },
19
19
  "peerDependencies": {}
20
20
  }