box-content-preview 3.66.0 → 3.68.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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  [![Mergify Status](https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/box/box-content-preview&style=flat)](https://mergify.io)
3
3
  [![Styled With Prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
4
4
  [![build status](https://img.shields.io/travis/box/box-content-preview/master.svg?style=flat-square)](https://travis-ci.org/box/box-content-preview)
5
- [![version](https://img.shields.io/badge/version-v3.66.0-blue.svg?style=flat-square)](https://github.com/box/box-content-preview)
5
+ [![version](https://img.shields.io/badge/version-v3.68.0-blue.svg?style=flat-square)](https://github.com/box/box-content-preview)
6
6
  [![npm version](https://img.shields.io/npm/v/box-ui-elements.svg?style=flat-square)](https://www.npmjs.com/package/box-ui-elements)
7
7
 
8
8
  # [Box Content Preview](https://developer.box.com/docs/box-content-preview)
@@ -22,11 +22,11 @@ We encourage all users to update their applications to utilize modern browsers f
22
22
 
23
23
  ## Current Version
24
24
 
25
- - Version: v3.66.0
25
+ - Version: v3.68.0
26
26
  - Locale: en-US
27
27
 
28
- https://cdn01.boxcdn.net/platform/preview/3.66.0/en-US/preview.js
29
- https://cdn01.boxcdn.net/platform/preview/3.66.0/en-US/preview.css
28
+ https://cdn01.boxcdn.net/platform/preview/3.68.0/en-US/preview.js
29
+ https://cdn01.boxcdn.net/platform/preview/3.68.0/en-US/preview.css
30
30
 
31
31
  ## Supported Locales
32
32
 
@@ -52,10 +52,10 @@ You can self-host the Box Content Preview library or reference the versions avai
52
52
  <title>Box Content Preview Demo</title>
53
53
 
54
54
  <!-- Latest version of Preview SDK for your locale -->
55
- <script src="https://cdn01.boxcdn.net/platform/preview/3.66.0/en-US/preview.js"></script>
55
+ <script src="https://cdn01.boxcdn.net/platform/preview/3.68.0/en-US/preview.js"></script>
56
56
  <link
57
57
  rel="stylesheet"
58
- href="https://cdn01.boxcdn.net/platform/preview/3.66.0/en-US/preview.css"
58
+ href="https://cdn01.boxcdn.net/platform/preview/3.68.0/en-US/preview.css"
59
59
  />
60
60
  </head>
61
61
  <body>
@@ -76,7 +76,7 @@ To self-host the Box Content Preview library, follow these steps:
76
76
 
77
77
  1. Either fork the repo and check out the version you want to host or download the specific version as a zip:
78
78
 
79
- - Check out a specific version with `git checkout v3.66.0`
79
+ - Check out a specific version with `git checkout v3.68.0`
80
80
  - Download a specific version as a zip from https://github.com/box/box-content-preview/releases
81
81
 
82
82
  2. Install dependencies and build the library with `yarn install && yarn build:i18n && yarn build:prod`
package/dist/lib/index.js CHANGED
@@ -17416,7 +17416,7 @@ function util_toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var
17416
17416
  const CLIENT_NAME = "box-content-preview"; // eslint-disable-line no-undef
17417
17417
  const CLIENT_NAME_KEY = 'box_client_name';
17418
17418
  const CLIENT_VERSION_KEY = 'box_client_version';
17419
- const CLIENT_VERSION = "3.66.0"; // eslint-disable-line no-undef
17419
+ const CLIENT_VERSION = "3.68.0"; // eslint-disable-line no-undef
17420
17420
  const HEADER_CLIENT_NAME = 'X-Box-Client-Name';
17421
17421
  const HEADER_CLIENT_VERSION = 'X-Box-Client-Version';
17422
17422
  const PROMISE_MAP = {};
@@ -19141,7 +19141,7 @@ class Browser {
19141
19141
  ;// ./src/lib/Logger.js
19142
19142
  /* eslint-disable no-undef */
19143
19143
  const Logger_CLIENT_NAME = "box-content-preview";
19144
- const Logger_CLIENT_VERSION = "3.66.0";
19144
+ const Logger_CLIENT_VERSION = "3.68.0";
19145
19145
  /* eslint-enable no-undef */
19146
19146
 
19147
19147
  class Logger {
@@ -22861,7 +22861,7 @@ function AnnotationsControls(_ref) {
22861
22861
  title: "Markup"
22862
22862
  }, /*#__PURE__*/__WEBPACK_EXTERNAL_MODULE_react_default__.createElement(icons_IconPencilScribbleMedium24, {
22863
22863
  style: {
22864
- color: annotationColor
22864
+ color: isDrawingActive ? annotationColor : __WEBPACK_EXTERNAL_MODULE_box_ui_elements_es_styles_variables_c815ce80_white__
22865
22865
  }
22866
22866
  })), /*#__PURE__*/__WEBPACK_EXTERNAL_MODULE_react_default__.createElement(annotations_AnnotationsTargetedTooltip, {
22867
22867
  isEnabled: showRegion
@@ -43084,12 +43084,23 @@ class DocBaseViewer extends viewers_BaseViewer {
43084
43084
  this.docEl.addEventListener('keydown', this.handleDocElKeydown);
43085
43085
  this.docEl.addEventListener('scroll', this.throttledScrollHandler);
43086
43086
  if (this.hasTouch) {
43087
- this.docEl.addEventListener('touchstart', this.pinchToZoomStartHandler);
43088
- this.docEl.addEventListener('touchmove', this.pinchToZoomChangeHandler);
43087
+ const searchParams = new URLSearchParams(window.location.search);
43088
+ const disableNativePinchToZoom = searchParams.has('disableNativePinchToZoom');
43089
+ const disableAllTouchActions = searchParams.has('disableAllTouchActions');
43090
+ const forceNonPassiveTouchListeners = searchParams.has('forceNonPassiveTouchListeners');
43091
+ if (disableAllTouchActions) {
43092
+ this.docEl.style.touchAction = 'none';
43093
+ } else if (disableNativePinchToZoom) {
43094
+ this.docEl.style.touchAction = 'pan-x pan-y';
43095
+ }
43096
+ const passiveOption = forceNonPassiveTouchListeners ? {
43097
+ passive: false
43098
+ } : undefined;
43099
+ this.docEl.addEventListener('touchstart', this.pinchToZoomStartHandler, passiveOption);
43100
+ this.docEl.addEventListener('touchmove', this.pinchToZoomChangeHandler, passiveOption);
43089
43101
  this.docEl.addEventListener('touchend', this.pinchToZoomEndHandler);
43090
43102
  }
43091
- const disableMobileWheelZoom = new URLSearchParams(window.location.search).has('disableMobileWheelZoom');
43092
- if (this.featureEnabled('pinchToZoom.enabled') && !(this.isMobile && disableMobileWheelZoom)) {
43103
+ if (this.featureEnabled('pinchToZoom.enabled')) {
43093
43104
  this.docEl.addEventListener('wheel', this.trackpadPinchToZoomHandler, {
43094
43105
  passive: false
43095
43106
  });
@@ -43111,8 +43122,7 @@ class DocBaseViewer extends viewers_BaseViewer {
43111
43122
  this.docEl.removeEventListener('touchmove', this.pinchToZoomChangeHandler);
43112
43123
  this.docEl.removeEventListener('touchend', this.pinchToZoomEndHandler);
43113
43124
  }
43114
- const disableMobileWheelZoom = new URLSearchParams(window.location.search).has('disableMobileWheelZoom');
43115
- if (this.featureEnabled('pinchToZoom.enabled') && !(this.isMobile && disableMobileWheelZoom)) {
43125
+ if (this.featureEnabled('pinchToZoom.enabled')) {
43116
43126
  this.docEl.removeEventListener('wheel', this.trackpadPinchToZoomHandler);
43117
43127
  }
43118
43128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "box-content-preview",
3
- "version": "3.66.0",
3
+ "version": "3.68.0",
4
4
  "description": "Box Content Preview UI Element",
5
5
  "author": "Box (https://www.box.com/)",
6
6
  "license": "SEE LICENSE IN LICENSE",