@vitrosoftware/common-ui-ts 1.1.81 → 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.
@@ -143,8 +143,8 @@ select {
143
143
  }
144
144
 
145
145
  .toolbarButton#btnToggleNotes::before {
146
- /* show-annotation.svg URL-encoder for svg */
147
- content: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3179_133352)'%3E%3Crect x='0.5' y='0.5' width='27' height='21' rx='1.5' stroke='white'/%3E%3Cpath d='M4 4.5H24M4 8.5H17M4 12.5H21M24 16.5H4' stroke='white'/%3E%3Cpath d='M12 22H18V28L15 25L12 22Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3179_133352'%3E%3Crect width='28' height='28' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
146
+ /* hide-annotation.svg URL-encoder for svg */
147
+ content: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3179_133198)'%3E%3Cpath d='M27.5 4V11V19.5C27.5 20.6046 26.6046 21.5 25.5 21.5H2.5C1.39543 21.5 0.5 20.6046 0.5 19.5L0.5 2.5C0.5 1.39543 1.39543 0.5 2.5 0.5H24' stroke='white'/%3E%3Cpath d='M4 4.5H20M4 8.5H16M4 12.5H12M4 16.5H8M15 16.5H24M19 12.5H24M22 8.5H24' stroke='white'/%3E%3Cpath d='M12 22H18V28L15 25L12 22Z' fill='white'/%3E%3Cpath d='M0.5 27.5L27.5 0.5' stroke='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3179_133198'%3E%3Crect width='28' height='28' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
148
148
  }
149
149
 
150
150
  .toolbarButton#btnToggleSidebarNotes::before {
@@ -86,8 +86,8 @@ select {
86
86
  }
87
87
 
88
88
  .toolbarButton#btnToggleNotes::before {
89
- /* show-annotation.svg URL-encoder for svg */
90
- content: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3179_133352)'%3E%3Crect x='0.5' y='0.5' width='27' height='21' rx='1.5' stroke='white'/%3E%3Cpath d='M4 4.5H24M4 8.5H17M4 12.5H21M24 16.5H4' stroke='white'/%3E%3Cpath d='M12 22H18V28L15 25L12 22Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3179_133352'%3E%3Crect width='28' height='28' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
89
+ /* hide-annotation.svg URL-encoder for svg */
90
+ content: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 28 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_3179_133198)'%3E%3Cpath d='M27.5 4V11V19.5C27.5 20.6046 26.6046 21.5 25.5 21.5H2.5C1.39543 21.5 0.5 20.6046 0.5 19.5L0.5 2.5C0.5 1.39543 1.39543 0.5 2.5 0.5H24' stroke='white'/%3E%3Cpath d='M4 4.5H20M4 8.5H16M4 12.5H12M4 16.5H8M15 16.5H24M19 12.5H24M22 8.5H24' stroke='white'/%3E%3Cpath d='M12 22H18V28L15 25L12 22Z' fill='white'/%3E%3Cpath d='M0.5 27.5L27.5 0.5' stroke='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_3179_133198'%3E%3Crect width='28' height='28' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
91
91
  }
92
92
 
93
93
  .toolbarButton#btnToggleSidebarNotes::before {
@@ -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.81";
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,10 +61536,10 @@ 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
- "src/controls/BimViewer/js/bim-viewer.js"
61541
+ "src/controls/BimViewer/js/bim-viewer.js",
61542
+ "src/controls/BimViewer/js/bim-viewer-models.js"
61543
61543
  ];
61544
61544
  var dependencies = {
61545
61545
  "rollup-plugin-postcss": "^3.1.3",
@@ -61567,21 +61567,51 @@ var Package = {
61567
61567
  };
61568
61568
 
61569
61569
  var PdfViewer = function PdfViewer(props) {
61570
- var scriptList = [{
61571
- "url": "resource/pdfViewer/js/init-viewer-page.js?version=v" + Package.version,
61572
- "id": "vitro-script-init-pdf-viewer"
61573
- }];
61574
- return React__default.createElement(commonUi.ScriptLoader, {
61575
- urlList: scriptList.map(function (x) {
61576
- return x.url;
61577
- }),
61578
- idList: scriptList.map(function (x) {
61579
- return x.id;
61580
- }),
61581
- placeholder: React__default.createElement(commonUi.Progress, null)
61582
- }, 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, {
61583
61613
  context: props.context
61584
- }));
61614
+ });
61585
61615
  };
61586
61616
 
61587
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"};