@orangelogic/orange-dam-content-browser-sdk 2.1.9 → 2.1.10
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/CBSDKdemo.html +2 -2
- package/gab_extension/GAB.html +2 -2
- package/package.json +2 -2
- package/src/components/FormatDialog/FormatDialog.styled.ts +1 -0
- package/src/components/FormatDialog/FormatDialog.tsx +1 -1
- package/src/consts/data.ts +2 -1
- package/src/page/Home/Home.tsx +16 -3
- package/src/store/search/search.api.ts +1 -1
package/CBSDKdemo.html
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
|
|
8
8
|
|
|
9
|
-
<script src="https://downloads.orangelogic.com/ContentBrowserSDK/v2.1.
|
|
9
|
+
<script src="https://downloads.orangelogic.com/ContentBrowserSDK/v2.1.10/OrangeDAMContentBrowserSDK.min.js"></script>
|
|
10
10
|
<link rel="stylesheet" type="text/css"
|
|
11
|
-
href="https://downloads.orangelogic.com/ContentBrowserSDK/v2.1.
|
|
11
|
+
href="https://downloads.orangelogic.com/ContentBrowserSDK/v2.1.10/OrangeDAMContentBrowserSDK.min.css">
|
|
12
12
|
|
|
13
13
|
<style>
|
|
14
14
|
* {
|
package/gab_extension/GAB.html
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
<head>
|
|
5
5
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
|
|
6
|
-
<script src="https://downloads.orangelogic.com/Cortex/AssetBrowser/v2.1.
|
|
6
|
+
<script src="https://downloads.orangelogic.com/Cortex/AssetBrowser/v2.1.10/OrangeDamAssetBrowser.min.js"></script>
|
|
7
7
|
<link rel="stylesheet" type="text/css"
|
|
8
|
-
href="https://downloads.orangelogic.com/Cortex/AssetBrowser/v2.1.
|
|
8
|
+
href="https://downloads.orangelogic.com/Cortex/AssetBrowser/v2.1.10/OrangeDamAssetBrowser.min.css">
|
|
9
9
|
<style>
|
|
10
10
|
#orangelogic-GAB-browser-wrapper {
|
|
11
11
|
min-width: 382px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orangelogic/orange-dam-content-browser-sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.10",
|
|
4
4
|
"description": "OrangeDAM Content Browser SDK source code",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"homepage": "/",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@babel/core": "^7.16.0",
|
|
70
|
-
"@orangelogic-private/design-system": "^1.0.
|
|
70
|
+
"@orangelogic-private/design-system": "^1.0.261",
|
|
71
71
|
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
|
|
72
72
|
"@reduxjs/toolkit": "^1.9.5",
|
|
73
73
|
"@svgr/webpack": "^8.1.0",
|
|
@@ -1235,7 +1235,7 @@ const FormatDialog: FC<Props> = ({
|
|
|
1235
1235
|
{allowFavorites && (
|
|
1236
1236
|
<cx-tooltip
|
|
1237
1237
|
slot="header-actions"
|
|
1238
|
-
content={isFavorite ? '
|
|
1238
|
+
content={isFavorite ? 'Unmark favorite' : 'Mark favorite'}
|
|
1239
1239
|
placement="bottom"
|
|
1240
1240
|
>
|
|
1241
1241
|
{state.isLoadingFavorites ? (
|
package/src/consts/data.ts
CHANGED
|
@@ -15,4 +15,5 @@ export const FIELD_HAS_BROWSER_CHILDREN = 'Document.HasBrowserChildren';
|
|
|
15
15
|
export const LIBRARY_NAME = 'Library';
|
|
16
16
|
export const MESSAGE_NEW_LINE = '\n';
|
|
17
17
|
export const ORIGINAL_VIEW_SIZE = 'CoreField.OriginalPreview';
|
|
18
|
-
export const FIELD_ALLOW_ATS_LINK = 'AllowATSLink';
|
|
18
|
+
export const FIELD_ALLOW_ATS_LINK = 'AllowATSLink';
|
|
19
|
+
export const COMPUTED_FIELDS = ['ScrubUrl', 'AllowATSLink'];
|
package/src/page/Home/Home.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _camelCase from 'lodash-es/camelCase';
|
|
1
2
|
import _debounce from 'lodash-es/debounce';
|
|
2
3
|
import _intersection from 'lodash-es/intersection';
|
|
3
4
|
import {
|
|
@@ -34,6 +35,7 @@ import type { CxResizeEvent, CxResizeObserver } from '@orangelogic-private/desig
|
|
|
34
35
|
import { skipToken } from '@reduxjs/toolkit/query';
|
|
35
36
|
|
|
36
37
|
import { Container } from './Home.styled';
|
|
38
|
+
import { COMPUTED_FIELDS } from '@/consts/data';
|
|
37
39
|
|
|
38
40
|
type Props = {
|
|
39
41
|
multiSelect?: boolean;
|
|
@@ -690,12 +692,23 @@ const HomePage: FC<Props> = () => {
|
|
|
690
692
|
}, []);
|
|
691
693
|
|
|
692
694
|
const handleSelectedAsset = useCallback((images: GetAssetLinkResponse[]) => {
|
|
693
|
-
|
|
695
|
+
const payload = [...images];
|
|
696
|
+
COMPUTED_FIELDS.forEach((item) => {
|
|
697
|
+
const key = _camelCase(item) as keyof typeof selectedAsset;
|
|
698
|
+
if (selectedAsset && extraFields?.includes(item)) {
|
|
699
|
+
payload[0] = {
|
|
700
|
+
...payload[0],
|
|
701
|
+
[item]: selectedAsset[key],
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
|
|
706
|
+
window.OrangeDAMContentBrowser._onAssetSelected?.(payload);
|
|
694
707
|
if (persistMode) {
|
|
695
708
|
return;
|
|
696
709
|
}
|
|
697
710
|
window.OrangeDAMContentBrowser._onClose?.();
|
|
698
|
-
}, [persistMode]);
|
|
711
|
+
}, [extraFields, persistMode, selectedAsset]);
|
|
699
712
|
|
|
700
713
|
const hasNextPage = useMemo(
|
|
701
714
|
() => (data ? state.start + state.pageSize < state.totalCount : false),
|
|
@@ -773,7 +786,7 @@ const HomePage: FC<Props> = () => {
|
|
|
773
786
|
bordered={state.hasScrolled}
|
|
774
787
|
currentFolder={state.currentFolder}
|
|
775
788
|
isFetching={isFetchingUserInfo}
|
|
776
|
-
isLoading={
|
|
789
|
+
isLoading={isLoadingUserInfo}
|
|
777
790
|
userInfo={userInfo}
|
|
778
791
|
onMenuClick={() =>
|
|
779
792
|
dispatch({ type: 'SET_OPEN_BROWSER', payload: true })
|
|
@@ -326,7 +326,7 @@ export const searchApi = createApi({
|
|
|
326
326
|
params.push(...mappedMediaTypes);
|
|
327
327
|
}
|
|
328
328
|
if (searchText) {
|
|
329
|
-
params.push(['
|
|
329
|
+
params.push(['FieldFilters[Text]', searchText]);
|
|
330
330
|
}
|
|
331
331
|
if (useSession) {
|
|
332
332
|
params.push(['UseSession', useSession]);
|