@orangelogic/orange-dam-content-browser-sdk 2.1.21 → 2.1.22
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 +1 -1
- package/src/consts/data.ts +2 -0
- package/src/store/search/search.api.ts +11 -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.22/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.22/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.22/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.22/OrangeDamAssetBrowser.min.css">
|
|
9
9
|
<style>
|
|
10
10
|
#orangelogic-GAB-browser-wrapper {
|
|
11
11
|
min-width: 382px;
|
package/package.json
CHANGED
package/src/consts/data.ts
CHANGED
|
@@ -12,6 +12,8 @@ export const FIELD_SCRUB_URL = 'ScrubURL';
|
|
|
12
12
|
export const FIELD_SUBTYPE = 'CoreField.DocSubType';
|
|
13
13
|
export const FIELD_TITLE_WITH_FALLBACK = 'CoreField.TitleWithFallback';
|
|
14
14
|
export const FIELD_HAS_BROWSER_CHILDREN = 'Document.HasBrowserChildren';
|
|
15
|
+
export const FIELD_ORIGINAL_FILE_NAME = 'CoreField.OriginalFileName';
|
|
16
|
+
export const FIELD_UPDATED_FILE_NAME = 'CoreField.UpdatedFileName';
|
|
15
17
|
export const LIBRARY_NAME = 'Library';
|
|
16
18
|
export const MESSAGE_NEW_LINE = '\n';
|
|
17
19
|
export const ORIGINAL_VIEW_SIZE = 'CoreField.OriginalPreview';
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
FIELD_HAS_BROWSER_CHILDREN,
|
|
7
7
|
FIELD_IDENTIFIER, FIELD_KEYWORDS, FIELD_MAX_HEIGHT, FIELD_MAX_WIDTH, FIELD_SCRUB_URL, FIELD_SUBTYPE, FIELD_TITLE_WITH_FALLBACK, FIELD_ALLOW_ATS_LINK,
|
|
8
8
|
FIELD_RECORD_ID,
|
|
9
|
+
FIELD_ORIGINAL_FILE_NAME,
|
|
10
|
+
FIELD_UPDATED_FILE_NAME,
|
|
9
11
|
} from '@/consts/data';
|
|
10
12
|
import { Asset, Folder, GetContentRequest, GetContentResponse, GetFavoritesResponse } from '@/types/search';
|
|
11
13
|
import { AppBaseQuery, GetValueByKeyCaseInsensitive } from '@/utils/api';
|
|
@@ -306,6 +308,8 @@ export const searchApi = createApi({
|
|
|
306
308
|
['fields', FIELD_IDENTIFIER],
|
|
307
309
|
['fields', FIELD_EXTENSION],
|
|
308
310
|
['fields', FIELD_RECORD_ID],
|
|
311
|
+
['fields', FIELD_ORIGINAL_FILE_NAME],
|
|
312
|
+
['fields', FIELD_UPDATED_FILE_NAME],
|
|
309
313
|
['seeThru', isSeeThrough],
|
|
310
314
|
['start', start],
|
|
311
315
|
['limit', pageSize],
|
|
@@ -352,9 +356,15 @@ export const searchApi = createApi({
|
|
|
352
356
|
items:
|
|
353
357
|
response.contentItems?.map((item) => {
|
|
354
358
|
let extension = GetValueByKeyCaseInsensitive(item.fields, FIELD_EXTENSION) ?? '';
|
|
359
|
+
let name = GetValueByKeyCaseInsensitive(item.fields, FIELD_UPDATED_FILE_NAME);
|
|
355
360
|
if (extension && !extension.startsWith('.')) {
|
|
356
361
|
extension = '.' + extension;
|
|
357
362
|
}
|
|
363
|
+
|
|
364
|
+
if (isNullOrWhiteSpace(name)) {
|
|
365
|
+
name = GetValueByKeyCaseInsensitive(item.fields, FIELD_ORIGINAL_FILE_NAME);
|
|
366
|
+
}
|
|
367
|
+
|
|
358
368
|
return {
|
|
359
369
|
docType: GetValueByKeyCaseInsensitive(item.fields, FIELD_DOC_TYPE) ?? '',
|
|
360
370
|
docSubType: GetValueByKeyCaseInsensitive(item.fields, FIELD_SUBTYPE) ?? '',
|
|
@@ -364,7 +374,7 @@ export const searchApi = createApi({
|
|
|
364
374
|
identifier: GetValueByKeyCaseInsensitive(item.fields, FIELD_IDENTIFIER) ?? '',
|
|
365
375
|
imageUrl: GetValueByKeyCaseInsensitive(item.fields, DEFAULT_VIEW_SIZE) ?? '',
|
|
366
376
|
originalUrl: GetValueByKeyCaseInsensitive(item.fields, ORIGINAL_VIEW_SIZE) ?? '',
|
|
367
|
-
name:
|
|
377
|
+
name: name ?? '',
|
|
368
378
|
scrubUrl: GetValueByKeyCaseInsensitive(item.fields, FIELD_SCRUB_URL) ?? '',
|
|
369
379
|
size: GetValueByKeyCaseInsensitive(item.fields, FIELD_FILE_SIZE) ?? '0 MB',
|
|
370
380
|
tags: GetValueByKeyCaseInsensitive(item.fields, FIELD_KEYWORDS) ?? '',
|