@scaleflex/widget-explorer 4.0.7 → 4.3.0

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +12145 -12100
  2. package/LICENSE +21 -21
  3. package/README.md +1267 -1235
  4. package/dist/style.css +1438 -1094
  5. package/dist/style.min.css +1 -1
  6. package/lib/components/AssetsList/SearchView.hook.js +24 -24
  7. package/lib/components/AssetsList/__SearchTestPannel.js +27 -27
  8. package/lib/components/BulkEditPanel/components/AssetsList/Columns/columns.utils.js +2 -2
  9. package/lib/components/CropPanel/index.scss +55 -55
  10. package/lib/components/Details/FileItem/style.scss +11 -11
  11. package/lib/components/Drawer/ResizerCore.js +3 -3
  12. package/lib/components/FileItem/PreUploadFileThumbnail/index.scss +19 -19
  13. package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralSection.js +1 -1
  14. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.constants.js +7 -3
  15. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.styled.js +4 -2
  16. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/Variations.thunks.js +45 -0
  17. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsContent.js +15 -1
  18. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTabs.js +11 -3
  19. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/VariationsTopOptions.js +4 -4
  20. package/lib/components/FileWindowPanel/FileTabs/VariationsTab/index.js +194 -27
  21. package/lib/components/FileWindowPanel/Header/BeforeUploadActionBtns.js +4 -4
  22. package/lib/components/FoldersView/index.js +29 -3
  23. package/lib/components/GalleryRoleSelect/GalleryRoleSelect.utils.js +3 -3
  24. package/lib/components/GalleryRoleSelect/index.js +11 -11
  25. package/lib/components/Modals/AddNewFolder/AddNewFolder.hooks.js +99 -0
  26. package/lib/components/Modals/AddNewFolder/index.js +1 -0
  27. package/lib/components/Modals/TransformedDownload/TransformedDownload.hooks.js +11 -11
  28. package/lib/components/Modals/TransformedDownload/TransformedDownload.utils.js +4 -4
  29. package/lib/components/Modals/index.js +1 -0
  30. package/lib/components/TopBar/index.scss +20 -20
  31. package/lib/components/UrlBuilderModal/index.js +6 -2
  32. package/lib/components/common/FileMetadataFieldValue/FileMetadataFieldValue.utils.js +12 -8
  33. package/lib/components/metadata.adapter.js +18 -18
  34. package/lib/defaultLocale.js +8 -1
  35. package/lib/hooks/useEditFileDetails.js +5 -5
  36. package/lib/hooks/useFileMetadata.js +5 -3
  37. package/lib/hooks/useIsSmallScreen.js +6 -6
  38. package/lib/hooks/useValidateFileName.js +22 -22
  39. package/lib/index.js +155 -151
  40. package/lib/slices/files.slice.js +15 -15
  41. package/lib/slices/folders.slice.js +9 -9
  42. package/lib/slices/metadata.slice.js +9 -2
  43. package/lib/style.scss +268 -268
  44. package/lib/utils/SearchSuggestions/SearchSuggestionsMenu.js +4 -4
  45. package/lib/utils/createSuperFocus.js +5 -5
  46. package/lib/utils/filters.js +3 -3
  47. package/lib/utils/formatPinSubTitle.js +6 -6
  48. package/lib/utils/getActiveOverlayEl.js +2 -2
  49. package/lib/utils/truncateString.js +7 -7
  50. package/package.json +8 -8
  51. package/types/index.d.ts +102 -102
@@ -26,17 +26,17 @@ import StandardRolesTab from './StandardRolesTab';
26
26
  import { GALLERY_ROLE_TABS, GALLERY_ROLE_TABS_IDS } from './GalleryRoleSelect.constants';
27
27
  import CustomRolesTab from './CustomRolesTab';
28
28
 
29
- /**
30
- * @param {object} props
31
- * @param {string} props.value - Role ID
32
- * @param {function} props.onChange
33
- * @param {boolean} [props.showPermissionsInfo=true]
34
- * @param {number} [props.selectorPaddingX=17]
35
- * @param {boolean} [props.disabled=false]
36
- * @param {boolean} [props.readOnly=false]
37
- * @param {boolean} [props.defaultValueFirstItem=false]
38
- * @param {number} [props.minPermissions] - Use to specify which roles could be selectable
39
- * @returns
29
+ /**
30
+ * @param {object} props
31
+ * @param {string} props.value - Role ID
32
+ * @param {function} props.onChange
33
+ * @param {boolean} [props.showPermissionsInfo=true]
34
+ * @param {number} [props.selectorPaddingX=17]
35
+ * @param {boolean} [props.disabled=false]
36
+ * @param {boolean} [props.readOnly=false]
37
+ * @param {boolean} [props.defaultValueFirstItem=false]
38
+ * @param {number} [props.minPermissions] - Use to specify which roles could be selectable
39
+ * @returns
40
40
  */
41
41
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
42
42
  var GalleryRoleSelect = function GalleryRoleSelect(_ref) {
@@ -0,0 +1,99 @@
1
+ import { useDispatch } from 'react-redux';
2
+ import { useCallback } from 'react';
3
+ import { AddFolder } from '@scaleflex/icons';
4
+ import { useTheme } from '@scaleflex/ui/theme/hooks';
5
+ import { useModal } from '@scaleflex/widget-core/lib/hooks';
6
+ import { PC } from '@scaleflex/widget-common';
7
+ import handlePromise from '@scaleflex/widget-utils/lib/handlePromise';
8
+ import { checkFileOrFolderNameValidation } from '@scaleflex/widget-utils/lib/checkFileOrFolderNameValidation';
9
+ import { InputGroup } from '@scaleflex/ui/core';
10
+ import { useExplorerI18n, useExplorerInformer } from '../../../hooks';
11
+ import { addNewFolder } from '../../../slices/folders.slice';
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ export var useAddNewFolderModal = function useAddNewFolderModal() {
14
+ var dispatch = useDispatch();
15
+ var toggleModal = useModal();
16
+ var theme = useTheme();
17
+ var i18n = useExplorerI18n();
18
+ var info = useExplorerInformer();
19
+
20
+ // If no path is provided, then the folder will be created in the current folder.
21
+ var triggerAddNewFolderModal = useCallback(function () {
22
+ var toFolderPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
23
+ var addFolderHandler = function addFolderHandler(_ref) {
24
+ var data = _ref.data,
25
+ closeModal = _ref.closeModal,
26
+ setIsModalLoading = _ref.setIsModalLoading;
27
+ var folderName = data.folderName;
28
+ if (folderName) {
29
+ setIsModalLoading(true);
30
+ handlePromise(dispatch(addNewFolder({
31
+ path: toFolderPath,
32
+ name: folderName
33
+ })), function () {
34
+ closeModal();
35
+ info(i18n('explorerFolderCreatedInfo'), 'success', 5000);
36
+ }, undefined, function () {
37
+ setIsModalLoading(false);
38
+ });
39
+ } else {
40
+ info(i18n('explorerFolderNameRequiredInfo'), 'warning', 5000);
41
+ }
42
+ };
43
+ toggleModal({
44
+ icon: /*#__PURE__*/_jsx(AddFolder, {
45
+ color: theme.palette[PC.AccentPrimary],
46
+ width: 29,
47
+ height: 29
48
+ }),
49
+ showTitleLabel: true,
50
+ disableAutoClose: true,
51
+ title: i18n('explorerModelAddFolderTitle'),
52
+ content: function content(_ref2) {
53
+ var updateData = _ref2.updateData,
54
+ data = _ref2.data,
55
+ setPrimaryButtonDisabled = _ref2.setPrimaryButtonDisabled;
56
+ return /*#__PURE__*/_jsx(InputGroup, {
57
+ onChange: function onChange(_ref3) {
58
+ var target = _ref3.target;
59
+ var error = '';
60
+ if (checkFileOrFolderNameValidation(target.value)) {
61
+ error = i18n('mutualizedFolderInvalidNameError');
62
+ }
63
+ updateData({
64
+ folderName: target.value,
65
+ error: error
66
+ });
67
+ setPrimaryButtonDisabled(Boolean(error) || !target.value);
68
+ },
69
+ error: Boolean(data.error),
70
+ hint: data.error,
71
+ label: i18n('explorerModelNewFolderName'),
72
+ placeholder: i18n('explorerModelNewFolderPlaceholder'),
73
+ value: data.folderName || '',
74
+ fullWidth: true,
75
+ focusOnMount: true
76
+ });
77
+ },
78
+ buttonPrimaryLabel: i18n('explorerModelAddLabel'),
79
+ buttonSecondaryBg: 'basic',
80
+ onButtonPrimaryClick: addFolderHandler,
81
+ enterKeySubmits: true,
82
+ modalStyle: {
83
+ maxWidth: 400
84
+ },
85
+ modalFooterStyle: {
86
+ flexDirection: 'row'
87
+ },
88
+ modalSecondaryButton: {
89
+ width: 170
90
+ },
91
+ modalSecondaryButtonColor: 'basic',
92
+ modalPrimaryButton: {
93
+ width: 170
94
+ },
95
+ disablePrimaryButton: true
96
+ });
97
+ }, [i18n, theme]);
98
+ return triggerAddNewFolderModal;
99
+ };
@@ -0,0 +1 @@
1
+ export { useAddNewFolderModal } from './AddNewFolder.hooks';
@@ -27,11 +27,11 @@ export var useTransformedDownload = function useTransformedDownload() {
27
27
  forceDownload = _useExplorer$opts.forceDownload,
28
28
  isDownloadUsageRightsEnabled = _useExplorer$opts.isDownloadUsageRightsEnabled;
29
29
  var triggerTransformedDownload = useCallback(function (filesToBeDownloaded, options) {
30
- /*
31
- * TODO: Check the following in-case BE supports it,
32
- * Disabled download as zip due to this task: https://scaleflexhq.atlassian.net/browse/FRA-7213
33
- * as BE doesn't support it for now,
34
- * to re-enable just un-comment the following line and remove isVariant in the options in the following line.
30
+ /*
31
+ * TODO: Check the following in-case BE supports it,
32
+ * Disabled download as zip due to this task: https://scaleflexhq.atlassian.net/browse/FRA-7213
33
+ * as BE doesn't support it for now,
34
+ * to re-enable just un-comment the following line and remove isVariant in the options in the following line.
35
35
  */
36
36
  // const { transformations, isDownloadAsZip = isDownloadUsageRightsEnabled } = options || {}
37
37
  var isDownloadAsZip = false;
@@ -43,12 +43,12 @@ export var useTransformedDownload = function useTransformedDownload() {
43
43
  });
44
44
  if (!preventDownloadDefaultBehavior) {
45
45
  info(i18n('mutualizedDownloadStartedInfo'));
46
- /*
47
- * TODO: Check the following in-case BE supports it,
48
- * Disabled download as zip due to this task: https://scaleflexhq.atlassian.net/browse/FRA-7213
49
- * as BE doesn't support it for now,
50
- * to re-enable remove dismissUsageRights: isVariant from downloadFilesOneByOne of the current file
51
- * and also isVariant from the following condition, and isVariant from onButtonPrimaryClick in the other function of the file.
46
+ /*
47
+ * TODO: Check the following in-case BE supports it,
48
+ * Disabled download as zip due to this task: https://scaleflexhq.atlassian.net/browse/FRA-7213
49
+ * as BE doesn't support it for now,
50
+ * to re-enable remove dismissUsageRights: isVariant from downloadFilesOneByOne of the current file
51
+ * and also isVariant from the following condition, and isVariant from onButtonPrimaryClick in the other function of the file.
52
52
  */
53
53
  if (transformedFiles.length > 1 && isDownloadAsZip || isDownloadUsageRightsEnabled && !isVariant) {
54
54
  var fileUrls = transformedFiles.map(function (file) {
@@ -21,10 +21,10 @@ export var getFileWithNewParams = function getFileWithNewParams(file) {
21
21
  });
22
22
  }
23
23
  var newExtension = newParams.force_format === 'jpeg' ? 'jpg' : newParams.force_format || file.extension;
24
- /**
25
- * For supporting animated GIF/WEBP files, we should force the format in the proper format cloudimage needs
26
- * and send it only to cloudimage but keep the extension .(gif/webp) as it's in the downloaded file.
27
- * Fix for the following card ID: [T6929]
24
+ /**
25
+ * For supporting animated GIF/WEBP files, we should force the format in the proper format cloudimage needs
26
+ * and send it only to cloudimage but keep the extension .(gif/webp) as it's in the downloaded file.
27
+ * Fix for the following card ID: [T6929]
28
28
  */
29
29
  var updatedParams = _objectSpread({}, newParams);
30
30
  if (updatedParams.force_format) {
@@ -1,4 +1,5 @@
1
1
  export { default } from './Modals';
2
+ export * from './AddNewFolder';
2
3
  export * from './DeleteItems';
3
4
  export * from './DeleteModal';
4
5
  export * from './DownloadConsent';
@@ -1,20 +1,20 @@
1
- // packages/@scaleflex/widget-provider-views/src/components/TopBar/Search/PrependedOptions/index.jsx
2
- // packages/@scaleflex/widget-provider-views/src/components/TopBar/Search/ContextDropdown/index.jsx
3
- // packages/@scaleflex/widget-provider-views/src/components/TopBar/Search/PrependedOptions/PinsOverlay/index.jsx
4
- .filerobot-Explorer-TopBar-PrependedOptions {
5
- display: flex;
6
- align-items: center;
7
- height: 100%;
8
- }
9
-
10
- .filerobot-Explorer-TopBar-AppendedOptions {
11
- display: flex;
12
- align-items: center;
13
- float: right;
14
- }
15
-
16
- .filerobot-Explorer-TopBar-Search-ContextDropdown-SubList-container {
17
- padding: 0 !important;
18
- cursor: default !important;
19
- background: #ffffff !important;
20
- }
1
+ // packages/@scaleflex/widget-provider-views/src/components/TopBar/Search/PrependedOptions/index.jsx
2
+ // packages/@scaleflex/widget-provider-views/src/components/TopBar/Search/ContextDropdown/index.jsx
3
+ // packages/@scaleflex/widget-provider-views/src/components/TopBar/Search/PrependedOptions/PinsOverlay/index.jsx
4
+ .filerobot-Explorer-TopBar-PrependedOptions {
5
+ display: flex;
6
+ align-items: center;
7
+ height: 100%;
8
+ }
9
+
10
+ .filerobot-Explorer-TopBar-AppendedOptions {
11
+ display: flex;
12
+ align-items: center;
13
+ float: right;
14
+ }
15
+
16
+ .filerobot-Explorer-TopBar-Search-ContextDropdown-SubList-container {
17
+ padding: 0 !important;
18
+ cursor: default !important;
19
+ background: #ffffff !important;
20
+ }
@@ -12,6 +12,9 @@ import { useConfirmationModal } from '../Modals';
12
12
  import { removeExtraUrlParams } from '../../utils/removeExtraUrlParams';
13
13
  import Styled from './UrlBuilderModal.styled';
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ var modalStyles = {
16
+ zIndex: 1300
17
+ };
15
18
  var UrlBuilderModal = function UrlBuilderModal(_ref) {
16
19
  var showUrlBuilderModal = _ref.showUrlBuilderModal,
17
20
  setShowUrlBuilderModal = _ref.setShowUrlBuilderModal,
@@ -19,7 +22,7 @@ var UrlBuilderModal = function UrlBuilderModal(_ref) {
19
22
  urlTitle = _ref.urlTitle,
20
23
  headerTitle = _ref.headerTitle,
21
24
  actionButtonLabel = _ref.actionButtonLabel,
22
- triggerAddVariantModal = _ref.triggerAddVariantModal,
25
+ onNewSave = _ref.onNewSave,
23
26
  i18n = _ref.i18n,
24
27
  selectedVariant = _ref.selectedVariant,
25
28
  submitVariantEdit = _ref.submitVariantEdit,
@@ -65,13 +68,14 @@ var UrlBuilderModal = function UrlBuilderModal(_ref) {
65
68
  triggerVariantEdit(nextUrl);
66
69
  setShowUrlBuilderModal(false);
67
70
  } else {
68
- triggerAddVariantModal(nextUrl);
71
+ onNewSave(nextUrl);
69
72
  }
70
73
  };
71
74
  return /*#__PURE__*/_jsx(Styled.Modal, {
72
75
  fullWidth: true,
73
76
  open: showUrlBuilderModal,
74
77
  onClose: handleClose,
78
+ modalStyles: modalStyles,
75
79
  children: /*#__PURE__*/_jsx(ModalContent, {
76
80
  children: /*#__PURE__*/_jsx(UrlBuilder, {
77
81
  url: urlWithParams,
@@ -126,7 +126,8 @@ var getRemoteFields = function getRemoteFields(_ref3) {
126
126
  scrollToMetaField = _ref3.scrollToMetaField,
127
127
  isApprovalsEnabled = _ref3.isApprovalsEnabled,
128
128
  rootFieldsRegionalUuidsByKeys = _ref3.rootFieldsRegionalUuidsByKeys,
129
- smallerFont = _ref3.smallerFont;
129
+ smallerFont = _ref3.smallerFont,
130
+ hideFileSpecsMetadataFields = _ref3.hideFileSpecsMetadataFields;
130
131
  var _file$meta = file.meta,
131
132
  meta = _file$meta === void 0 ? {} : _file$meta,
132
133
  _file$tags = file.tags,
@@ -173,7 +174,7 @@ var getRemoteFields = function getRemoteFields(_ref3) {
173
174
  type: 'labels',
174
175
  uuid: 'GENERAL-LABELS',
175
176
  value: Array.isArray(labels) ? labels : [],
176
- hide: isFastToken
177
+ hide: hideFileSpecsMetadataFields || isFastToken
177
178
  }, {
178
179
  key: 'orientation',
179
180
  placeholder: "".concat(i18n('generalSectionOrientationLabel'), "..."),
@@ -205,14 +206,16 @@ var getRemoteFields = function getRemoteFields(_ref3) {
205
206
  return "#".concat(color);
206
207
  })) || currentMainColors.map(function (color) {
207
208
  return getCorrectColor(color);
208
- })
209
+ }),
210
+ hide: hideFileSpecsMetadataFields
209
211
  }, {
210
212
  key: 'dominantColor',
211
213
  placeholder: "".concat(i18n('mutualizedDominantColorLabel'), "..."),
212
214
  title: i18n('mutualizedDominantColorLabel'),
213
215
  type: 'dominantColor',
214
216
  uuid: 'GENERAL-DOMINANT_COLOR',
215
- value: info !== null && info !== void 0 && info.dominant_color_hex ? "#".concat(info === null || info === void 0 ? void 0 : info.dominant_color_hex) : getCorrectColor(info === null || info === void 0 ? void 0 : info.dominant_color)
217
+ value: info !== null && info !== void 0 && info.dominant_color_hex ? "#".concat(info === null || info === void 0 ? void 0 : info.dominant_color_hex) : getCorrectColor(info === null || info === void 0 ? void 0 : info.dominant_color),
218
+ hide: hideFileSpecsMetadataFields
216
219
  }, {
217
220
  key: 'logoAndBrand',
218
221
  placeholder: "".concat(i18n('generalSectionLogoAndBrandLabel'), "..."),
@@ -220,7 +223,7 @@ var getRemoteFields = function getRemoteFields(_ref3) {
220
223
  type: 'linked-text',
221
224
  uuid: 'GENERAL-LOGO_AND_BRAND',
222
225
  value: fileDetails.brandAndLogosLabels,
223
- hide: !fileDetails.brandAndLogosLabels.length
226
+ hide: hideFileSpecsMetadataFields || !fileDetails.brandAndLogosLabels.length
224
227
  }, {
225
228
  key: 'createdAt',
226
229
  placeholder: "".concat(i18n('mutualizedCreatedAtText'), "..."),
@@ -235,7 +238,8 @@ var getRemoteFields = function getRemoteFields(_ref3) {
235
238
  title: i18n('mutualizedCreatedByText'),
236
239
  type: 'text',
237
240
  uuid: 'GENERAL-CREATED_BY',
238
- value: fileDetails.createdBy
241
+ value: fileDetails.createdBy,
242
+ hide: hideFileSpecsMetadataFields
239
243
  }, {
240
244
  key: 'modifiedAt',
241
245
  placeholder: "".concat(i18n('mutualizedModifiedAtText'), "..."),
@@ -251,7 +255,7 @@ var getRemoteFields = function getRemoteFields(_ref3) {
251
255
  type: 'expiryDate',
252
256
  uuid: 'GENERAL-EXPIRY_DATE',
253
257
  value: expireDateMappedField && meta[expireDateMappedField.key],
254
- hide: !expireDateMappedField,
258
+ hide: hideFileSpecsMetadataFields || !expireDateMappedField,
255
259
  labelIconTooltip: ExpiryDateTooltipContent({
256
260
  expireDateMappedField: expireDateMappedField,
257
261
  i18nArray: i18nArray,
@@ -263,7 +267,7 @@ var getRemoteFields = function getRemoteFields(_ref3) {
263
267
  title: i18n('explorerGeneralFileDetailsStatusLabel'),
264
268
  type: 'custom',
265
269
  uuid: 'GENERAL-STATUS',
266
- hide: !isApprovalsEnabled,
270
+ hide: hideFileSpecsMetadataFields || !isApprovalsEnabled,
267
271
  Component: FileApprovalsInfoPopup
268
272
  }, {
269
273
  key: 'uuid',
@@ -19,9 +19,9 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
19
19
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
20
20
  import cuid from 'cuid';
21
21
 
22
- /**
23
- * Connected with ticket -- http://sk.fl3x.cc/?i=8KJIbM0d51zOLt
24
- * We need to adapt metadata to new format which support Regional variants groups
22
+ /**
23
+ * Connected with ticket -- http://sk.fl3x.cc/?i=8KJIbM0d51zOLt
24
+ * We need to adapt metadata to new format which support Regional variants groups
25
25
  */
26
26
 
27
27
  var generateFieldPossibleValue = function generateFieldPossibleValue(posValue) {
@@ -114,8 +114,8 @@ var adaptMetadata = function adaptMetadata(metadata) {
114
114
  });
115
115
  var oldMetaModel = metadata === null || metadata === void 0 ? void 0 : metadata.model;
116
116
 
117
- /**
118
- * Generate regionalVariantsGroups and update model fields regional_variants params, to use group uuid instead of string[]
117
+ /**
118
+ * Generate regionalVariantsGroups and update model fields regional_variants params, to use group uuid instead of string[]
119
119
  */
120
120
 
121
121
  // Regional variants group hash buffer
@@ -131,12 +131,12 @@ var adaptMetadata = function adaptMetadata(metadata) {
131
131
  possibleValues = field.possible_values,
132
132
  permissions = field.permissions,
133
133
  fieldRest = _objectWithoutProperties(field, _excluded);
134
- /**
135
- * For select types we can't use regional variants. (Disscussed with Julian)
136
- * Bad file metadata:
137
- * which_colors: { default: [@item1, @item2] }
138
- * Good file metadata:
139
- * which_colors: [@item1, @item2]
134
+ /**
135
+ * For select types we can't use regional variants. (Disscussed with Julian)
136
+ * Bad file metadata:
137
+ * which_colors: { default: [@item1, @item2] }
138
+ * Good file metadata:
139
+ * which_colors: [@item1, @item2]
140
140
  */
141
141
  var needRemoveRegionalVariants = ['select-one', 'multi-select'].indexOf(fieldRest === null || fieldRest === void 0 ? void 0 : fieldRest.type) > -1;
142
142
  var adaptedField = _objectSpread(_objectSpread({}, fieldRest), {}, {
@@ -206,9 +206,9 @@ var adaptMetadata = function adaptMetadata(metadata) {
206
206
  }
207
207
  adaptedMetadata.store.regional_variants_groups = rvGroupsArray;
208
208
 
209
- /**
210
- * Add default "Root fields" group.
211
- * We wait what regional_variants_groups list is generated, to find language regional group
209
+ /**
210
+ * Add default "Root fields" group.
211
+ * We wait what regional_variants_groups list is generated, to find language regional group
212
212
  */
213
213
  adaptedMetadata.model = adaptedMetadata.model.map(function (item) {
214
214
  var _ref3;
@@ -242,10 +242,10 @@ var adaptMetadata = function adaptMetadata(metadata) {
242
242
  return adaptedMetadata;
243
243
  };
244
244
 
245
- /**
246
- * @param {object} groupsObj
247
- * @param {string[]} variants
248
- * @param {boolean} [isRoot=false] - Flag to mark group as root. TRUE is mean that this group is not deletable. Added for meta "Root fields" group
245
+ /**
246
+ * @param {object} groupsObj
247
+ * @param {string[]} variants
248
+ * @param {boolean} [isRoot=false] - Flag to mark group as root. TRUE is mean that this group is not deletable. Added for meta "Root fields" group
249
249
  */
250
250
  var generateNewRegionalVariantGroup = function generateNewRegionalVariantGroup(groupsObj, variants) {
251
251
  var _adaptedVariants;
@@ -1350,5 +1350,12 @@ export default {
1350
1350
  galleryRoleSelectorCustomTabLabel: 'Custom',
1351
1351
  galleryRoleSelectorLessRolePermsTooltip: 'This role has less permissions than the default access',
1352
1352
  explorerGridFileOptionsOverlaySelectBtn: 'Select',
1353
- explorer3rdPartyUploadIncludeSubFolders: 'Include subfolders'
1353
+ explorer3rdPartyUploadIncludeSubFolders: 'Include subfolders',
1354
+ explorerFileWindowAddPresetTitle: 'Add preset',
1355
+ explorerFileWindowAddPresetNamePlaceholder: 'Enter name (URL placeholder)',
1356
+ explorerFileWindowAddPresetDescPlaceholder: 'Enter description here',
1357
+ explorerFileWindowAddPresetDescLabel: 'Description',
1358
+ explorerFileWindowPresetAddedInfo: 'Preset is added!',
1359
+ explorerFileWindowAddPresetNameRegexError: '{ , } , | , \\ , ^ , ~ , @ , spaces , ` and , characters are not allowed',
1360
+ explorerFoldersViewTopBarNewFolderButton: 'Add folder'
1354
1361
  };
@@ -470,11 +470,11 @@ var useEditFileDetails = function useEditFileDetails(_ref) {
470
470
  var metaFieldElem = document.querySelector("#meta-field-".concat(metaFieldKey));
471
471
  if (metaFieldElem) {
472
472
  var _metaFieldElem$queryS;
473
- /**
474
- * block: 'center' replaced with block: 'nearest' as 'center' causes the whole panel's block to be scrolled outside of the view (hidden)
475
- * in-case of small screen which is not good as it blocks further operations.
476
- * And it's a common issue for people on StackOverFlow so nearest fixed the issue, seems like some strange behavior of scrollIntoView.
477
- * https://stackoverflow.com/q/11039885
473
+ /**
474
+ * block: 'center' replaced with block: 'nearest' as 'center' causes the whole panel's block to be scrolled outside of the view (hidden)
475
+ * in-case of small screen which is not good as it blocks further operations.
476
+ * And it's a common issue for people on StackOverFlow so nearest fixed the issue, seems like some strange behavior of scrollIntoView.
477
+ * https://stackoverflow.com/q/11039885
478
478
  */
479
479
  metaFieldElem.scrollIntoView({
480
480
  block: 'nearest',
@@ -28,7 +28,8 @@ var useFileMetadata = function useFileMetadata(_ref) {
28
28
  var metaRegionalGroups = useSelector(selectMetadataRegionalGroups);
29
29
  var expireDateMappedField = useSelector(selectMetaMappedLicenseExpireDateField);
30
30
  var isFastToken = opts.isFastToken,
31
- findAssetLocationEnabled = opts.findAssetLocationEnabled;
31
+ findAssetLocationEnabled = opts.findAssetLocationEnabled,
32
+ hideFileSpecsMetadataFields = opts.hideFileSpecsMetadataFields;
32
33
  var isPreUpload = isUploadableFile(file);
33
34
  var isApprovalsEnabled = (_filerobot$getPlugin = filerobot.getPlugin(PLUGINS_IDS.APPROVALS)) === null || _filerobot$getPlugin === void 0 ? void 0 : (_filerobot$getPlugin$ = _filerobot$getPlugin.isEnabled) === null || _filerobot$getPlugin$ === void 0 ? void 0 : _filerobot$getPlugin$.call(_filerobot$getPlugin);
34
35
  var languageRegionalFilterUuid = useMemo(function () {
@@ -51,9 +52,10 @@ var useFileMetadata = function useFileMetadata(_ref) {
51
52
  isFastToken: isFastToken,
52
53
  findAssetLocationEnabled: findAssetLocationEnabled,
53
54
  isApprovalsEnabled: isApprovalsEnabled,
54
- smallerFont: smallerFont
55
+ smallerFont: smallerFont,
56
+ hideFileSpecsMetadataFields: hideFileSpecsMetadataFields
55
57
  });
56
- }, [file, rootFieldsRegionalUuidsByKeys, languageRegionalFilterUuid, i18n, isPreUpload, expireDateMappedField, i18nArray, scrollToMetaField, isFastToken, findAssetLocationEnabled, isApprovalsEnabled]),
58
+ }, [file, rootFieldsRegionalUuidsByKeys, languageRegionalFilterUuid, i18n, isPreUpload, expireDateMappedField, i18nArray, scrollToMetaField, isFastToken, findAssetLocationEnabled, isApprovalsEnabled, hideFileSpecsMetadataFields]),
57
59
  readOnlyGeneralMetadataFields = _useMemo.readOnlyFields,
58
60
  editableGeneralMetadataGFields = _useMemo.editableFields;
59
61
  var customMetadataGroups = useMemo(function () {
@@ -2,12 +2,12 @@ import { useSelector } from 'react-redux';
2
2
  import { useTheme } from '@scaleflex/ui/theme/hooks';
3
3
  import { selectContainerWidth } from '../slices/common.slice';
4
4
 
5
- /**
6
- * check if the widget container <= 1085px
7
- *
8
- * @param {containerWidth} Number container width
9
- * @param {theme} Object Scaleflex theme
10
- * @returns {Boolean}
5
+ /**
6
+ * check if the widget container <= 1085px
7
+ *
8
+ * @param {containerWidth} Number container width
9
+ * @param {theme} Object Scaleflex theme
10
+ * @returns {Boolean}
11
11
  */
12
12
 
13
13
  var useIsSmallScreen = function useIsSmallScreen() {
@@ -45,16 +45,16 @@ var handleError = function handleError(_ref) {
45
45
  };
46
46
  };
47
47
 
48
- /**
49
- * Validate file name changes, to be able to control extension remove/update.
50
- * Details: T7195 https://sfx.li/IFr4y01tgqL1wg
51
- *
52
- * @param {string} oldName - Old file name that should be changed
53
- * @param {strign} newName - New file name
54
- * @param {object} [opts] - Options object
55
- * @param {boolean} [opts.ignoreChangedNameExtension=false] - If TRUE, fn will ignore extension updates
56
- *
57
- * @returns {object} - Object with validation details
48
+ /**
49
+ * Validate file name changes, to be able to control extension remove/update.
50
+ * Details: T7195 https://sfx.li/IFr4y01tgqL1wg
51
+ *
52
+ * @param {string} oldName - Old file name that should be changed
53
+ * @param {strign} newName - New file name
54
+ * @param {object} [opts] - Options object
55
+ * @param {boolean} [opts.ignoreChangedNameExtension=false] - If TRUE, fn will ignore extension updates
56
+ *
57
+ * @returns {object} - Object with validation details
58
58
  */
59
59
  var checkFileRenameValidation = function checkFileRenameValidation(oldName, newName) {
60
60
  var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
@@ -100,10 +100,10 @@ var checkFileRenameValidation = function checkFileRenameValidation(oldName, newN
100
100
  };
101
101
  };
102
102
 
103
- /**
104
- * @param {string} name - file name
105
- *
106
- * @returns {object} - Object with validation details
103
+ /**
104
+ * @param {string} name - file name
105
+ *
106
+ * @returns {object} - Object with validation details
107
107
  */
108
108
  var checkFileNameValidation = function checkFileNameValidation(name) {
109
109
  if (checkFileOrFolderNameValidation(name)) {
@@ -118,14 +118,14 @@ var checkFileNameValidation = function checkFileNameValidation(name) {
118
118
  };
119
119
  };
120
120
 
121
- /**
122
- * Change file name extension.
123
- *
124
- * @param {string} fileName - File name with extension that should be changed
125
- * @param {string} nextExtension - Extension without dot. For example: 'jpg'
126
- * @param {string} [prevExtension] - Extension without dot. For example: 'jpg'
127
- *
128
- * @returns {string} - File name with updated extension. For example: changeFileNameExtension('file-name.jpg', 'jpg', 'gif') will return file-name.gif
121
+ /**
122
+ * Change file name extension.
123
+ *
124
+ * @param {string} fileName - File name with extension that should be changed
125
+ * @param {string} nextExtension - Extension without dot. For example: 'jpg'
126
+ * @param {string} [prevExtension] - Extension without dot. For example: 'jpg'
127
+ *
128
+ * @returns {string} - File name with updated extension. For example: changeFileNameExtension('file-name.jpg', 'jpg', 'gif') will return file-name.gif
129
129
  */
130
130
  var changeFileNameExtension = function changeFileNameExtension(fileName, nextExtension) {
131
131
  var prevExtension = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;