@vitrosoftware/common-ui-ts 1.1.82 → 1.1.83

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.
@@ -286,11 +286,14 @@
286
286
  top: 50%;
287
287
  right: 0;
288
288
  transform: translate(0, -50%);
289
- background: url('@vitrosoftware/common-ui-ts/css/std/controls/pdf-viewer/img/layer-unvisible.png') no-repeat center center;
289
+ background-repeat: no-repeat;
290
+ /* layer-unvisible.svg URL-encoder for svg */
291
+ background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3179_133923)'%3E%3Cpath d='M16.5 9C16.5 9.20856 16.3581 9.59902 15.9715 10.1138C15.6003 10.6081 15.0514 11.1527 14.361 11.6594C12.978 12.6745 11.0792 13.5 9 13.5C6.92079 13.5 5.02204 12.6745 3.63898 11.6594C2.94857 11.1527 2.39968 10.6081 2.02849 10.1138C1.6419 9.59902 1.5 9.20856 1.5 9C1.5 8.79144 1.6419 8.40098 2.02849 7.88619C2.39968 7.39191 2.94857 6.8473 3.63898 6.34059C5.02204 5.32554 6.92079 4.5 9 4.5C11.0792 4.5 12.978 5.32554 14.361 6.34059C15.0514 6.8473 15.6003 7.39191 15.9715 7.88619C16.3581 8.40098 16.5 8.79144 16.5 9Z' fill='%2394949F' stroke='%2394949F'/%3E%3Ccircle cx='9' cy='9' r='3.25' fill='%2394949F' stroke='white' stroke-width='1.5'/%3E%3Crect x='0.292893' y='16.1406' width='23' height='2' transform='rotate(-45 0.292893 16.1406)' fill='%2394949F' stroke='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3179_133923'%3E%3Crect width='18' height='18' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
290
292
  }
291
293
 
292
294
  .compare-layer-visibility.active {
293
- background: url('@vitrosoftware/common-ui-ts/css/std/controls/pdf-viewer/img/layer-visible.png') no-repeat center center;
295
+ /* layer-visible.svg URL-encoder for svg */
296
+ background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.5 9C16.5 9.20856 16.3581 9.59902 15.9715 10.1138C15.6003 10.6081 15.0514 11.1527 14.361 11.6594C12.978 12.6745 11.0792 13.5 9 13.5C6.92079 13.5 5.02204 12.6745 3.63898 11.6594C2.94857 11.1527 2.39968 10.6081 2.02849 10.1138C1.6419 9.59902 1.5 9.20856 1.5 9C1.5 8.79144 1.6419 8.40098 2.02849 7.88619C2.39968 7.39191 2.94857 6.8473 3.63898 6.34059C5.02204 5.32554 6.92079 4.5 9 4.5C11.0792 4.5 12.978 5.32554 14.361 6.34059C15.0514 6.8473 15.6003 7.39191 15.9715 7.88619C16.3581 8.40098 16.5 8.79144 16.5 9Z' fill='black' stroke='black'/%3E%3Ccircle cx='9' cy='9' r='2.25' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A");
294
297
  }
295
298
 
296
299
  .compare-viewer-wrap.side-by-side #compareCanvasResult,
@@ -3533,11 +3533,14 @@ img.pixelcompare-before, img.pixelcompare-after {
3533
3533
  top: 50%;
3534
3534
  right: 0;
3535
3535
  transform: translate(0, -50%);
3536
- background: url('@vitrosoftware/common-ui-ts/css/std/controls/pdf-viewer/img/layer-unvisible.png') no-repeat center center;
3536
+ background-repeat: no-repeat;
3537
+ /* layer-unvisible.svg URL-encoder for svg */
3538
+ background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3179_133923)'%3E%3Cpath d='M16.5 9C16.5 9.20856 16.3581 9.59902 15.9715 10.1138C15.6003 10.6081 15.0514 11.1527 14.361 11.6594C12.978 12.6745 11.0792 13.5 9 13.5C6.92079 13.5 5.02204 12.6745 3.63898 11.6594C2.94857 11.1527 2.39968 10.6081 2.02849 10.1138C1.6419 9.59902 1.5 9.20856 1.5 9C1.5 8.79144 1.6419 8.40098 2.02849 7.88619C2.39968 7.39191 2.94857 6.8473 3.63898 6.34059C5.02204 5.32554 6.92079 4.5 9 4.5C11.0792 4.5 12.978 5.32554 14.361 6.34059C15.0514 6.8473 15.6003 7.39191 15.9715 7.88619C16.3581 8.40098 16.5 8.79144 16.5 9Z' fill='%2394949F' stroke='%2394949F'/%3E%3Ccircle cx='9' cy='9' r='3.25' fill='%2394949F' stroke='white' stroke-width='1.5'/%3E%3Crect x='0.292893' y='16.1406' width='23' height='2' transform='rotate(-45 0.292893 16.1406)' fill='%2394949F' stroke='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3179_133923'%3E%3Crect width='18' height='18' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
3537
3539
  }
3538
3540
 
3539
3541
  .compare-layer-visibility.active {
3540
- background: url('@vitrosoftware/common-ui-ts/css/std/controls/pdf-viewer/img/layer-visible.png') no-repeat center center;
3542
+ /* layer-visible.svg URL-encoder for svg */
3543
+ background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.5 9C16.5 9.20856 16.3581 9.59902 15.9715 10.1138C15.6003 10.6081 15.0514 11.1527 14.361 11.6594C12.978 12.6745 11.0792 13.5 9 13.5C6.92079 13.5 5.02204 12.6745 3.63898 11.6594C2.94857 11.1527 2.39968 10.6081 2.02849 10.1138C1.6419 9.59902 1.5 9.20856 1.5 9C1.5 8.79144 1.6419 8.40098 2.02849 7.88619C2.39968 7.39191 2.94857 6.8473 3.63898 6.34059C5.02204 5.32554 6.92079 4.5 9 4.5C11.0792 4.5 12.978 5.32554 14.361 6.34059C15.0514 6.8473 15.6003 7.39191 15.9715 7.88619C16.3581 8.40098 16.5 8.79144 16.5 9Z' fill='black' stroke='black'/%3E%3Ccircle cx='9' cy='9' r='2.25' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A");
3541
3544
  }
3542
3545
 
3543
3546
  .compare-viewer-wrap.side-by-side #compareCanvasResult,
@@ -5173,11 +5176,11 @@ a:focus > .thumbnail > .thumbnailSelectionRing,
5173
5176
  }
5174
5177
 
5175
5178
  .compare-panel_doc-color.docA {
5176
- border-left: 4px solid #ff5b2d;
5179
+ border-left: 4px solid rgba(255,68,68,1);
5177
5180
  }
5178
5181
 
5179
5182
  .compare-panel_doc-color.docB {
5180
- border-left: 4px solid #0097ff;
5183
+ border-left: 4px solid rgba(68,68,255,1);
5181
5184
  }
5182
5185
 
5183
5186
  .compare-panel_doc-color .version,
@@ -5501,3 +5504,7 @@ dialog .separator {
5501
5504
  font-family: 'InterRegular' !important;
5502
5505
  opacity: 1;
5503
5506
  }
5507
+
5508
+ .compare-viewer-wrap canvas {
5509
+ max-width: unset !important;
5510
+ }
@@ -613,11 +613,11 @@ a:focus > .thumbnail > .thumbnailSelectionRing,
613
613
  }
614
614
 
615
615
  .compare-panel_doc-color.docA {
616
- border-left: 4px solid #ff5b2d;
616
+ border-left: 4px solid rgba(255,68,68,1);
617
617
  }
618
618
 
619
619
  .compare-panel_doc-color.docB {
620
- border-left: 4px solid #0097ff;
620
+ border-left: 4px solid rgba(68,68,255,1);
621
621
  }
622
622
 
623
623
  .compare-panel_doc-color .version,
@@ -941,3 +941,7 @@ dialog .separator {
941
941
  font-family: 'InterRegular' !important;
942
942
  opacity: 1;
943
943
  }
944
+
945
+ .compare-viewer-wrap canvas {
946
+ max-width: unset !important;
947
+ }
package/dist/index.js CHANGED
@@ -61471,7 +61471,7 @@ var Viewer = function Viewer(props) {
61471
61471
  };
61472
61472
 
61473
61473
  var name = "@vitrosoftware/common-ui-ts";
61474
- var version$1 = "1.1.82";
61474
+ var version$1 = "1.1.83";
61475
61475
  var description = "vitro software common ui ts";
61476
61476
  var author = "";
61477
61477
  var license = "MIT";
@@ -61536,7 +61536,6 @@ var files = [
61536
61536
  "dist",
61537
61537
  "css",
61538
61538
  "lib",
61539
- "src/controls/PdfViewer/js/init-viewer-page.js",
61540
61539
  "src/controls/PdfViewer/js/pdf-viewer.js",
61541
61540
  "src/controls/BimViewer/js/init-viewer-page.js",
61542
61541
  "src/controls/BimViewer/js/bim-viewer.js",
@@ -61568,21 +61567,51 @@ var Package = {
61568
61567
  };
61569
61568
 
61570
61569
  var PdfViewer = function PdfViewer(props) {
61571
- var scriptList = [{
61572
- "url": "resource/pdfViewer/js/init-viewer-page.js?version=v" + Package.version,
61573
- "id": "vitro-script-init-pdf-viewer"
61574
- }];
61575
- return React__default.createElement(commonUi.ScriptLoader, {
61576
- urlList: scriptList.map(function (x) {
61577
- return x.url;
61578
- }),
61579
- idList: scriptList.map(function (x) {
61580
- return x.id;
61581
- }),
61582
- placeholder: React__default.createElement(commonUi.Progress, null)
61583
- }, React__default.createElement(Viewer, {
61570
+ var initPage = function initPage() {
61571
+ try {
61572
+ var container = document.getElementsByTagName('head')[0];
61573
+ container.innerHTML += "<link rel=\"resource\" type=\"application/l10n\" href=\"resource/pdfViewer/locale/locale.js?version=" + Package.version + "\">";
61574
+ container.innerHTML += "<link href=\"/resource/pdfViewer/css/pdf-viewer.css?version=" + Package.version + "\" rel=\"stylesheet\">";
61575
+ return Promise.resolve(initHtml()).then(function () {
61576
+ var script = document.createElement('script');
61577
+ script.type = 'text/javascript';
61578
+ script.id = 'pdf-viewer';
61579
+ script.src = "resource/pdfViewer/js/pdf-viewer.js?version=" + Package.version;
61580
+ script.onload = function () {
61581
+ return setIsInit(true);
61582
+ };
61583
+ document.head.appendChild(script);
61584
+ });
61585
+ } catch (e) {
61586
+ return Promise.reject(e);
61587
+ }
61588
+ };
61589
+ var initHtml = function initHtml() {
61590
+ try {
61591
+ var htmlContainer = document.getElementsByTagName('html')[0];
61592
+ htmlContainer.dir = 'ltr';
61593
+ return Promise.resolve(fetch('resource/pdfViewer/viewer.html?version=' + Package.version)).then(function (resp) {
61594
+ return Promise.resolve(resp.text()).then(function (viewer) {
61595
+ var container = document.getElementsByTagName('body')[0];
61596
+ container.insertAdjacentHTML('afterbegin', viewer);
61597
+ });
61598
+ });
61599
+ } catch (e) {
61600
+ return Promise.reject(e);
61601
+ }
61602
+ };
61603
+ var _useState = React.useState(false),
61604
+ isInit = _useState[0],
61605
+ setIsInit = _useState[1];
61606
+ React.useEffect(function () {
61607
+ initPage();
61608
+ }, []);
61609
+ if (!isInit) {
61610
+ return React__default.createElement(commonUi.Progress, null);
61611
+ }
61612
+ return React__default.createElement(Viewer, {
61584
61613
  context: props.context
61585
- }));
61614
+ });
61586
61615
  };
61587
61616
 
61588
61617
  var styles$m = {"vitro-control":"_checkbox_vitro-control_DfB5DDM","vitro-checkbox-content":"_checkbox_vitro-checkbox-content_2fBG1zl","vitro-label":"_checkbox_vitro-label_qZxCbCP","vitro-left-label":"_checkbox_vitro-left-label_Uu1Tp31"};