@crystaldesign/diva-backoffice 24.6.0-beta.1 → 24.6.0-beta.3

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.
@@ -17176,6 +17176,9 @@ function DropdownCell (_ref) {
17176
17176
  function _createForOfIteratorHelper$a(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$a(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
17177
17177
  function _unsupportedIterableToArray$a(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$a(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$a(o, minLen); }
17178
17178
  function _arrayLikeToArray$a(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
17179
+ if (!window.customElements.get('model-viewer')) {
17180
+ import('@google/model-viewer');
17181
+ }
17179
17182
  function MediaViewerCell (_ref) {
17180
17183
  var children = _ref.children,
17181
17184
  column = _ref.column;
@@ -17214,6 +17217,28 @@ function MediaViewerCell (_ref) {
17214
17217
  storage: 'OTHER'
17215
17218
  }];
17216
17219
  var test = useDivaCore();
17220
+ var openModelViewer = function openModelViewer() {
17221
+ test.actions.openFullscreen({
17222
+ content: /*#__PURE__*/jsx("model-viewer", {
17223
+ id: "model-viewer",
17224
+ src: children[1],
17225
+ ar: true,
17226
+ "ar-scale": 'fixed',
17227
+ "ar-modes": 'webxr quick-look',
17228
+ "shadow-intensity": "1",
17229
+ "camera-controls": true,
17230
+ "touch-action": "pan-y",
17231
+ style: {
17232
+ position: 'absolute',
17233
+ height: '100%',
17234
+ width: '100%',
17235
+ zIndex: 2,
17236
+ top: '0px',
17237
+ background: 'white'
17238
+ }
17239
+ })
17240
+ });
17241
+ };
17217
17242
  var openContentBox = function openContentBox() {
17218
17243
  test.actions.openFullscreen({
17219
17244
  content: /*#__PURE__*/jsx(ContentBoxComponent, {
@@ -17229,7 +17254,7 @@ function MediaViewerCell (_ref) {
17229
17254
  };
17230
17255
  return /*#__PURE__*/jsx(Fragment, {
17231
17256
  children: medias[0].mediaType === 'AR' ? /*#__PURE__*/jsx(FullscreenOutlined, {
17232
- onClick: openContentBox
17257
+ onClick: openModelViewer
17233
17258
  }) : /*#__PURE__*/jsx("img", {
17234
17259
  src: children[1],
17235
17260
  width: 39,
@@ -17324,6 +17349,9 @@ var UtilStore = /*#__PURE__*/function () {
17324
17349
  }();
17325
17350
  _defineProperty(UtilStore, "viewConfig", void 0);
17326
17351
 
17352
+ if (!window.customElements.get('model-viewer')) {
17353
+ import('@google/model-viewer');
17354
+ }
17327
17355
  function MediaItemViewerCell (_ref) {
17328
17356
  var children = _ref.children;
17329
17357
  _ref.column;
@@ -17370,6 +17398,28 @@ function MediaItemViewerCell (_ref) {
17370
17398
  var _useDivaCore = useDivaCore(),
17371
17399
  handler = _useDivaCore.handler,
17372
17400
  actions = _useDivaCore.actions;
17401
+ var openModelViewer = function openModelViewer() {
17402
+ actions.openFullscreen({
17403
+ content: /*#__PURE__*/jsx("model-viewer", {
17404
+ id: "model-viewer",
17405
+ src: children[1],
17406
+ ar: true,
17407
+ "ar-scale": 'fixed',
17408
+ "ar-modes": 'webxr quick-look',
17409
+ "shadow-intensity": "1",
17410
+ "camera-controls": true,
17411
+ "touch-action": "pan-y",
17412
+ style: {
17413
+ position: 'absolute',
17414
+ height: '100%',
17415
+ width: '100%',
17416
+ zIndex: 2,
17417
+ top: '0px',
17418
+ background: 'white'
17419
+ }
17420
+ })
17421
+ });
17422
+ };
17373
17423
  var openContentBox = function openContentBox() {
17374
17424
  setTimeStamp(Date.now());
17375
17425
  actions.openFullscreen({
@@ -17386,7 +17436,7 @@ function MediaItemViewerCell (_ref) {
17386
17436
  };
17387
17437
  return /*#__PURE__*/jsx(Fragment, {
17388
17438
  children: (media === null || media === void 0 ? void 0 : media.mediaType) === 'AR' ? /*#__PURE__*/jsx(FullscreenOutlined, {
17389
- onClick: openContentBox
17439
+ onClick: openModelViewer
17390
17440
  }) : /*#__PURE__*/jsx("img", {
17391
17441
  src: media === null || media === void 0 ? void 0 : media.url,
17392
17442
  width: 39,
@@ -1,3 +1,10 @@
1
1
  import { CellComponentProps } from '..';
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ 'model-viewer': any;
6
+ }
7
+ }
8
+ }
2
9
  export default function ({ children, column }: CellComponentProps): JSX.Element;
3
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/Table/BaseTable/cellRenderer/MediaItemViewerCell/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAOxC,MAAM,CAAC,OAAO,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,kBAAkB,eA4DhE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/Table/BaseTable/cellRenderer/MediaItemViewerCell/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAWxC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,cAAc,EAAE,GAAG,CAAC;SACrB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,kBAAkB,eA8EhE"}
@@ -1,3 +1,10 @@
1
1
  import { CellComponentProps } from '..';
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ 'model-viewer': any;
6
+ }
7
+ }
8
+ }
2
9
  export default function ({ children, column }: CellComponentProps): JSX.Element;
3
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/Table/BaseTable/cellRenderer/MediaViewerCell/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAMxC,MAAM,CAAC,OAAO,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,kBAAkB,eAmDhE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/Table/BaseTable/cellRenderer/MediaViewerCell/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAUxC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,UAAU,iBAAiB;YACzB,cAAc,EAAE,GAAG,CAAC;SACrB;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,kBAAkB,eAyEhE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "24.6.0-beta.1",
3
+ "version": "24.6.0-beta.3",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^5.15.0",
@@ -15,6 +15,7 @@
15
15
  "dependencies": {
16
16
  "@ant-design/icons": "5.0.1",
17
17
  "@babel/runtime": "7.18.0",
18
+ "@google/model-viewer": "3.4.0",
18
19
  "ag-charts-community": "^8.0.1",
19
20
  "ag-charts-react": "^8.0.0",
20
21
  "ag-grid-community": "29.3.5",
@@ -50,5 +51,5 @@
50
51
  },
51
52
  "module": "build/esm/index.js",
52
53
  "types": "./build/types/backoffice/src/index.d.ts",
53
- "gitHead": "75d35011be7640dcdc14ccd1da49a148faa4ac56"
54
+ "gitHead": "5fd2673b2308fbb8ae8fb4815458386fbc670cee"
54
55
  }