@crystaldesign/diva-backoffice 25.15.0-beta.4 → 25.15.0-beta.5
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/build/esm/index.js
CHANGED
|
@@ -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,
|
|
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: '
|
|
6092
|
-
imageEnding: '_low',
|
|
6091
|
+
field: 'mediaItems',
|
|
6093
6092
|
width: 99,
|
|
6094
|
-
type: '
|
|
6093
|
+
type: 'mediaItem',
|
|
6095
6094
|
align: 'center'
|
|
6096
6095
|
}, {
|
|
6097
6096
|
title: t('backoffice.table.renderjobs.columns.realTimeRenderUrl'),
|
|
@@ -26667,7 +26666,7 @@ _defineProperty(UtilStore, "viewConfig", void 0);
|
|
|
26667
26666
|
function MediaItemViewerCell (_ref) {
|
|
26668
26667
|
var children = _ref.children;
|
|
26669
26668
|
_ref.column;
|
|
26670
|
-
var _useState = useState(
|
|
26669
|
+
var _useState = useState(),
|
|
26671
26670
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26672
26671
|
media = _useState2[0],
|
|
26673
26672
|
setMedia = _useState2[1];
|
|
@@ -26693,32 +26692,38 @@ function MediaItemViewerCell (_ref) {
|
|
|
26693
26692
|
useEffect(function () {
|
|
26694
26693
|
if (!id) return;
|
|
26695
26694
|
handler.mediaHandler.getMediaById(id).then(function (res) {
|
|
26696
|
-
var _mediaItem$
|
|
26695
|
+
var _mediaItem$variants;
|
|
26697
26696
|
var mediaItem = res.data[0];
|
|
26698
|
-
|
|
26699
|
-
|
|
26700
|
-
|
|
26701
|
-
|
|
26702
|
-
|
|
26703
|
-
}
|
|
26704
|
-
|
|
26697
|
+
var mediaUrl;
|
|
26698
|
+
if (mediaItem.thumbnailUrl) {
|
|
26699
|
+
mediaUrl = mediaItem.thumbnailUrl;
|
|
26700
|
+
} else if ((_mediaItem$variants = mediaItem.variants) !== null && _mediaItem$variants !== void 0 && _mediaItem$variants[0]) {
|
|
26701
|
+
mediaUrl = mediaItem.variants[0];
|
|
26702
|
+
} else if (mediaItem.url && mediaItem.mediaType !== 'AR') {
|
|
26703
|
+
mediaUrl = mediaItem.url;
|
|
26704
|
+
}
|
|
26705
|
+
if (mediaItem.mediaType == 'AR' && mediaUrl) {
|
|
26706
|
+
var url = new URL(mediaUrl);
|
|
26705
26707
|
url.searchParams.append('v', timeStamp.toString());
|
|
26708
|
+
mediaUrl = url.toString();
|
|
26709
|
+
}
|
|
26710
|
+
if (mediaItem.mediaType === 'AR' && mediaItem.mimeType === 'application/octet-stream') {
|
|
26711
|
+
setMedia(undefined);
|
|
26712
|
+
return;
|
|
26706
26713
|
}
|
|
26707
26714
|
setMedia({
|
|
26708
|
-
|
|
26709
|
-
|
|
26710
|
-
|
|
26711
|
-
storage: 'OTHER',
|
|
26712
|
-
arViewerSettings: UtilStore.getArViewerSettings()
|
|
26715
|
+
thumbnailUrl: mediaUrl,
|
|
26716
|
+
originalUrl: mediaItem.url,
|
|
26717
|
+
mediaType: mediaItem.mediaType
|
|
26713
26718
|
});
|
|
26714
26719
|
});
|
|
26715
26720
|
}, [timeStamp, id]);
|
|
26716
|
-
if (!id) return /*#__PURE__*/jsx(
|
|
26721
|
+
if (!id) return /*#__PURE__*/jsx(Fragment, {});
|
|
26717
26722
|
var openModelViewer = function openModelViewer() {
|
|
26718
26723
|
actions.openFullscreen({
|
|
26719
26724
|
content: /*#__PURE__*/jsx("model-viewer", {
|
|
26720
26725
|
id: "model-viewer",
|
|
26721
|
-
src:
|
|
26726
|
+
src: media === null || media === void 0 ? void 0 : media.originalUrl,
|
|
26722
26727
|
ar: true,
|
|
26723
26728
|
"ar-scale": 'fixed',
|
|
26724
26729
|
"ar-modes": !isFirefox ? 'webxr quick-look' : '',
|
|
@@ -26743,7 +26748,13 @@ function MediaItemViewerCell (_ref) {
|
|
|
26743
26748
|
settings: {
|
|
26744
26749
|
contentBoxProps: {
|
|
26745
26750
|
type: 'MediaViewer',
|
|
26746
|
-
medias: media
|
|
26751
|
+
medias: media !== null && media !== void 0 && media.originalUrl ? [{
|
|
26752
|
+
url: media.originalUrl,
|
|
26753
|
+
mediaType: media.mediaType,
|
|
26754
|
+
functionType: 'ART',
|
|
26755
|
+
storage: 'OTHER',
|
|
26756
|
+
arViewerSettings: UtilStore.getArViewerSettings()
|
|
26757
|
+
}] : undefined,
|
|
26747
26758
|
defaultDataOptions: 'fullscreen.enable:false;'
|
|
26748
26759
|
}
|
|
26749
26760
|
}
|
|
@@ -26754,7 +26765,10 @@ function MediaItemViewerCell (_ref) {
|
|
|
26754
26765
|
children: (media === null || media === void 0 ? void 0 : media.mediaType) === 'AR' ? /*#__PURE__*/jsx(FullscreenOutlined, {
|
|
26755
26766
|
onClick: openModelViewer
|
|
26756
26767
|
}) : /*#__PURE__*/jsx("img", {
|
|
26757
|
-
|
|
26768
|
+
style: {
|
|
26769
|
+
cursor: 'pointer'
|
|
26770
|
+
},
|
|
26771
|
+
src: media === null || media === void 0 ? void 0 : media.thumbnailUrl,
|
|
26758
26772
|
width: 39,
|
|
26759
26773
|
onClick: openContentBox
|
|
26760
26774
|
})
|
|
@@ -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,
|
|
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.15.0-beta.
|
|
3
|
+
"version": "25.15.0-beta.5",
|
|
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.15.0-beta.
|
|
19
|
-
"@crystaldesign/content-item": "25.15.0-beta.
|
|
20
|
-
"@crystaldesign/diva-core": "25.15.0-beta.
|
|
21
|
-
"@crystaldesign/diva-utils": "25.15.0-beta.
|
|
22
|
-
"@crystaldesign/media-upload": "25.15.0-beta.
|
|
23
|
-
"@crystaldesign/rtf-editor": "25.15.0-beta.
|
|
24
|
-
"@crystaldesign/spreadsheet": "25.15.0-beta.
|
|
18
|
+
"@crystaldesign/content-box": "25.15.0-beta.5",
|
|
19
|
+
"@crystaldesign/content-item": "25.15.0-beta.5",
|
|
20
|
+
"@crystaldesign/diva-core": "25.15.0-beta.5",
|
|
21
|
+
"@crystaldesign/diva-utils": "25.15.0-beta.5",
|
|
22
|
+
"@crystaldesign/media-upload": "25.15.0-beta.5",
|
|
23
|
+
"@crystaldesign/rtf-editor": "25.15.0-beta.5",
|
|
24
|
+
"@crystaldesign/spreadsheet": "25.15.0-beta.5",
|
|
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": "
|
|
54
|
+
"gitHead": "3d00a0b451b05b9bb8c06a06778fcca56d1ccd18"
|
|
55
55
|
}
|