@ninetailed/experience.js-plugin-preview 1.0.1-beta.19 → 1.1.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.esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import union from 'lodash/union';
2
2
  import isEqual from 'lodash/isEqual';
3
+ import get$1 from 'lodash/get';
3
4
  import { createAction, createReducer, configureStore, bindActionCreators } from '@reduxjs/toolkit';
4
5
 
5
6
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -1816,7 +1817,7 @@ const NinetailedPreviewPlugin = ({
1816
1817
  secret,
1817
1818
  url,
1818
1819
  environment,
1819
- hideSidebarOpener
1820
+ ui
1820
1821
  }) => {
1821
1822
  let previewSdk;
1822
1823
  let lastProfile;
@@ -1855,8 +1856,8 @@ const NinetailedPreviewPlugin = ({
1855
1856
  } else {
1856
1857
  container.style.right = BUTTON_VARIABLES.right;
1857
1858
  container.style.bottom = BUTTON_VARIABLES.bottom;
1858
- container.style.width = hideSidebarOpener ? '0px' : BUTTON_VARIABLES.width;
1859
- container.style.height = hideSidebarOpener ? '0px' : BUTTON_VARIABLES.height;
1859
+ container.style.width = get$1(ui, 'opener.hide', false) ? '0px' : BUTTON_VARIABLES.width;
1860
+ container.style.height = get$1(ui, 'opener.hide', false) ? '0px' : BUTTON_VARIABLES.height;
1860
1861
  }
1861
1862
 
1862
1863
  preview.updateProps({
package/index.umd.js CHANGED
@@ -1,13 +1,14 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash/union'), require('lodash/isEqual'), require('@reduxjs/toolkit')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'lodash/union', 'lodash/isEqual', '@reduxjs/toolkit'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PreviewPlugin = {}, global.union, global.isEqual, global.toolkit));
5
- })(this, (function (exports, union, isEqual, toolkit) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash/union'), require('lodash/isEqual'), require('lodash/get'), require('@reduxjs/toolkit')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'lodash/union', 'lodash/isEqual', 'lodash/get', '@reduxjs/toolkit'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.PreviewPlugin = {}, global.union, global.isEqual, global.get$1, global.toolkit));
5
+ })(this, (function (exports, union, isEqual, get$1, toolkit) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
9
  var union__default = /*#__PURE__*/_interopDefaultLegacy(union);
10
10
  var isEqual__default = /*#__PURE__*/_interopDefaultLegacy(isEqual);
11
+ var get__default = /*#__PURE__*/_interopDefaultLegacy(get$1);
11
12
 
12
13
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13
14
 
@@ -1877,7 +1878,7 @@
1877
1878
  secret = _a.secret,
1878
1879
  url = _a.url,
1879
1880
  environment = _a.environment,
1880
- hideSidebarOpener = _a.hideSidebarOpener;
1881
+ ui = _a.ui;
1881
1882
  var previewSdk;
1882
1883
  var lastProfile;
1883
1884
  return {
@@ -1911,8 +1912,8 @@
1911
1912
  } else {
1912
1913
  container_1.style.right = BUTTON_VARIABLES.right;
1913
1914
  container_1.style.bottom = BUTTON_VARIABLES.bottom;
1914
- container_1.style.width = hideSidebarOpener ? '0px' : BUTTON_VARIABLES.width;
1915
- container_1.style.height = hideSidebarOpener ? '0px' : BUTTON_VARIABLES.height;
1915
+ container_1.style.width = get__default["default"](ui, 'opener.hide', false) ? '0px' : BUTTON_VARIABLES.width;
1916
+ container_1.style.height = get__default["default"](ui, 'opener.hide', false) ? '0px' : BUTTON_VARIABLES.height;
1916
1917
  }
1917
1918
 
1918
1919
  preview_1.updateProps({
@@ -12,7 +12,11 @@ export declare const NINETAILED_PREVIEW_EVENTS: {
12
12
  declare type NinetailedPreviewPluginOptions = Credentials & {
13
13
  url?: string;
14
14
  environment?: string;
15
- hideSidebarOpener?: boolean;
15
+ ui?: {
16
+ opener?: {
17
+ hide: boolean;
18
+ };
19
+ };
16
20
  };
17
- export declare const NinetailedPreviewPlugin: ({ clientId, secret, url, environment, hideSidebarOpener, }: NinetailedPreviewPluginOptions) => AnalyticsPlugin;
21
+ export declare const NinetailedPreviewPlugin: ({ clientId, secret, url, environment, ui, }: NinetailedPreviewPluginOptions) => AnalyticsPlugin;
18
22
  export {};
package/package.json CHANGED
@@ -1,18 +1,20 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js-plugin-preview",
3
- "version": "1.0.1-beta.19",
3
+ "version": "1.1.0",
4
4
  "main": "./index.umd.js",
5
5
  "module": "./index.esm.js",
6
6
  "typings": "./index.d.ts",
7
7
  "dependencies": {},
8
8
  "peerDependencies": {
9
9
  "analytics": "^0.8.0",
10
- "@ninetailed/experience.js-shared": "1.0.1-beta.19",
10
+ "@ninetailed/experience.js-shared": "1.1.0",
11
11
  "uuid": "^8.3.2",
12
12
  "ts-toolbelt": "^9.6.0",
13
13
  "locale-enum": "^1.1.1",
14
14
  "i18n-iso-countries": "^7.3.0",
15
15
  "lodash": "^4.17.21",
16
+ "@ninetailed/experience.js-preview-bridge": "1.1.0",
17
+ "zoid": "^9.0.86",
16
18
  "@reduxjs/toolkit": "^1.8.0"
17
19
  }
18
20
  }