@crystaldesign/diva-backoffice 25.14.0-rc.1 → 25.14.0-rc.11

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.
@@ -76,7 +76,7 @@ import DeleteOutlined from '@ant-design/icons/DeleteOutlined';
76
76
  import JSONEditor from 'jsoneditor';
77
77
  import 'jsoneditor/dist/jsoneditor.css';
78
78
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
79
- import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, FileUnknownOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, EditOutlined, EyeOutlined, InfoCircleOutlined as InfoCircleOutlined$1, FilePdfOutlined, LoadingOutlined, DownOutlined as DownOutlined$1, UploadOutlined as UploadOutlined$2, GlobalOutlined, DatabaseOutlined as DatabaseOutlined$1, DatabaseFilled, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
79
+ import { MinusCircleOutlined, PlusOutlined, DownloadOutlined as DownloadOutlined$1, PlusSquareOutlined, DeleteOutlined as DeleteOutlined$1, FullscreenOutlined, CloseOutlined as CloseOutlined$1, PlusCircleOutlined as PlusCircleOutlined$1, HomeOutlined as HomeOutlined$1, InboxOutlined, EditOutlined, EyeOutlined, InfoCircleOutlined as InfoCircleOutlined$1, FilePdfOutlined, LoadingOutlined, DownOutlined as DownOutlined$1, UploadOutlined as UploadOutlined$2, GlobalOutlined, DatabaseOutlined as DatabaseOutlined$1, DatabaseFilled, ReloadOutlined as ReloadOutlined$1 } from '@ant-design/icons';
80
80
  import classnames from 'classnames';
81
81
  import RTFEditor from '@crystaldesign/rtf-editor';
82
82
  import debounce from 'lodash/debounce';
@@ -6088,10 +6088,9 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
6088
6088
  width: 150
6089
6089
  }, {
6090
6090
  title: t('backoffice.table.renderjobs.columns.fileUrl'),
6091
- field: 'fileUrl',
6092
- imageEnding: '_low',
6091
+ field: 'mediaItems',
6093
6092
  width: 99,
6094
- type: 'media',
6093
+ type: 'mediaItem',
6095
6094
  align: 'center'
6096
6095
  }, {
6097
6096
  title: t('backoffice.table.renderjobs.columns.realTimeRenderUrl'),
@@ -8654,6 +8653,13 @@ function loadConfiguration(t, root, config, lang, apiConfig) {
8654
8653
  hidden: function hidden(data) {
8655
8654
  return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
8656
8655
  }
8656
+ }, {
8657
+ name: 'impressumUrl',
8658
+ label: t('backoffice.form.organizationdetails.items.impressumUrl'),
8659
+ type: 'input',
8660
+ hidden: function hidden(data) {
8661
+ return (data === null || data === void 0 ? void 0 : data.parentType) === 'SUPPLIER' && (data === null || data === void 0 ? void 0 : data.type) === undefined;
8662
+ }
8657
8663
  }, {
8658
8664
  name: t('backoffice.subtitle.advanced'),
8659
8665
  type: 'subTitle',
@@ -26667,7 +26673,7 @@ _defineProperty(UtilStore, "viewConfig", void 0);
26667
26673
  function MediaItemViewerCell (_ref) {
26668
26674
  var children = _ref.children;
26669
26675
  _ref.column;
26670
- var _useState = useState(undefined),
26676
+ var _useState = useState(),
26671
26677
  _useState2 = _slicedToArray(_useState, 2),
26672
26678
  media = _useState2[0],
26673
26679
  setMedia = _useState2[1];
@@ -26693,32 +26699,38 @@ function MediaItemViewerCell (_ref) {
26693
26699
  useEffect(function () {
26694
26700
  if (!id) return;
26695
26701
  handler.mediaHandler.getMediaById(id).then(function (res) {
26696
- var _mediaItem$urlVariant, _url;
26702
+ var _mediaItem$variants;
26697
26703
  var mediaItem = res.data[0];
26698
- if (!(mediaItem !== null && mediaItem !== void 0 && mediaItem.url)) return;
26699
- var url = new URL(mediaItem.url);
26700
- var mediaType = url.pathname.endsWith('.glb') ? 'AR' : 'PCT';
26701
- if (url.pathname.endsWith('.tif') || url.pathname.endsWith('.tiff') && (_mediaItem$urlVariant = mediaItem.urlVariants) !== null && _mediaItem$urlVariant !== void 0 && _mediaItem$urlVariant[0]) {
26702
- url = mediaItem.urlVariants[0];
26703
- }
26704
- if (mediaType == 'AR') {
26704
+ var mediaUrl;
26705
+ if (mediaItem.thumbnailUrl) {
26706
+ mediaUrl = mediaItem.thumbnailUrl;
26707
+ } else if ((_mediaItem$variants = mediaItem.variants) !== null && _mediaItem$variants !== void 0 && _mediaItem$variants[0]) {
26708
+ mediaUrl = mediaItem.variants[0];
26709
+ } else if (mediaItem.url && mediaItem.mediaType !== 'AR') {
26710
+ mediaUrl = mediaItem.url;
26711
+ }
26712
+ if (mediaItem.mediaType == 'AR' && mediaUrl) {
26713
+ var url = new URL(mediaUrl);
26705
26714
  url.searchParams.append('v', timeStamp.toString());
26715
+ mediaUrl = url.toString();
26716
+ }
26717
+ if (mediaItem.mediaType === 'AR' && mediaItem.mimeType === 'application/octet-stream') {
26718
+ setMedia(undefined);
26719
+ return;
26706
26720
  }
26707
26721
  setMedia({
26708
- url: (_url = url) === null || _url === void 0 ? void 0 : _url.toString(),
26709
- mediaType: mediaType,
26710
- functionType: 'ART',
26711
- storage: 'OTHER',
26712
- arViewerSettings: UtilStore.getArViewerSettings()
26722
+ thumbnailUrl: mediaUrl,
26723
+ originalUrl: mediaItem.url,
26724
+ mediaType: mediaItem.mediaType
26713
26725
  });
26714
26726
  });
26715
26727
  }, [timeStamp, id]);
26716
- if (!id) return /*#__PURE__*/jsx(FileUnknownOutlined, {});
26728
+ if (!id) return /*#__PURE__*/jsx(Fragment, {});
26717
26729
  var openModelViewer = function openModelViewer() {
26718
26730
  actions.openFullscreen({
26719
26731
  content: /*#__PURE__*/jsx("model-viewer", {
26720
26732
  id: "model-viewer",
26721
- src: children[1],
26733
+ src: media === null || media === void 0 ? void 0 : media.originalUrl,
26722
26734
  ar: true,
26723
26735
  "ar-scale": 'fixed',
26724
26736
  "ar-modes": !isFirefox ? 'webxr quick-look' : '',
@@ -26743,7 +26755,13 @@ function MediaItemViewerCell (_ref) {
26743
26755
  settings: {
26744
26756
  contentBoxProps: {
26745
26757
  type: 'MediaViewer',
26746
- medias: media ? [media] : undefined,
26758
+ medias: media !== null && media !== void 0 && media.originalUrl ? [{
26759
+ url: media.originalUrl,
26760
+ mediaType: media.mediaType,
26761
+ functionType: 'ART',
26762
+ storage: 'OTHER',
26763
+ arViewerSettings: UtilStore.getArViewerSettings()
26764
+ }] : undefined,
26747
26765
  defaultDataOptions: 'fullscreen.enable:false;'
26748
26766
  }
26749
26767
  }
@@ -26754,7 +26772,10 @@ function MediaItemViewerCell (_ref) {
26754
26772
  children: (media === null || media === void 0 ? void 0 : media.mediaType) === 'AR' ? /*#__PURE__*/jsx(FullscreenOutlined, {
26755
26773
  onClick: openModelViewer
26756
26774
  }) : /*#__PURE__*/jsx("img", {
26757
- src: media === null || media === void 0 ? void 0 : media.url,
26775
+ style: {
26776
+ cursor: 'pointer'
26777
+ },
26778
+ src: media === null || media === void 0 ? void 0 : media.thumbnailUrl,
26758
26779
  width: 39,
26759
26780
  onClick: openContentBox
26760
26781
  })
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/Table/BaseTable/cellRenderer/MediaItemViewerCell/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAOxC,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,qBAqFhE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/ui/Table/BaseTable/cellRenderer/MediaItemViewerCell/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,IAAI,CAAC;AAOxC,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,qBAgHhE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystaldesign/diva-backoffice",
3
- "version": "25.14.0-rc.1",
3
+ "version": "25.14.0-rc.11",
4
4
  "license": "COMMERCIAL",
5
5
  "devDependencies": {
6
6
  "@testing-library/jest-dom": "^6.5.0",
@@ -15,13 +15,13 @@
15
15
  "dependencies": {
16
16
  "@ant-design/icons": "5.4.0",
17
17
  "@babel/runtime": "7.24.7",
18
- "@crystaldesign/content-box": "25.14.0-rc.1",
19
- "@crystaldesign/content-item": "25.14.0-rc.1",
20
- "@crystaldesign/diva-core": "25.14.0-rc.1",
21
- "@crystaldesign/diva-utils": "25.14.0-rc.1",
22
- "@crystaldesign/media-upload": "25.14.0-rc.1",
23
- "@crystaldesign/rtf-editor": "25.14.0-rc.1",
24
- "@crystaldesign/spreadsheet": "25.14.0-rc.1",
18
+ "@crystaldesign/content-box": "25.14.0-rc.11",
19
+ "@crystaldesign/content-item": "25.14.0-rc.11",
20
+ "@crystaldesign/diva-core": "25.14.0-rc.11",
21
+ "@crystaldesign/diva-utils": "25.14.0-rc.11",
22
+ "@crystaldesign/media-upload": "25.14.0-rc.11",
23
+ "@crystaldesign/rtf-editor": "25.14.0-rc.11",
24
+ "@crystaldesign/spreadsheet": "25.14.0-rc.11",
25
25
  "@google/model-viewer": "3.5.0",
26
26
  "ag-charts-community": "^10.1.0",
27
27
  "ag-charts-react": "^10.1.0",
@@ -51,5 +51,5 @@
51
51
  },
52
52
  "module": "build/esm/index.js",
53
53
  "types": "./build/types/backoffice/src/index.d.ts",
54
- "gitHead": "94be35eac3f27501068fe3d0b136abc1adc940c6"
54
+ "gitHead": "22942f3785dd932c1243f35cd25071349d9077ba"
55
55
  }