@scaleflex/widget-explorer 0.0.4 → 0.1.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.
- package/CHANGELOG.md +24 -0
- package/lib/components/Details/FileItem/CustomMetadataTab.js +6 -1
- package/lib/components/ExplorerWrapper.js +1 -0
- package/lib/components/FileItem/index.js +3 -1
- package/lib/components/FileWindowPanel/FileTabs/GeneralTab/GeneralSection.js +3 -2
- package/lib/components/UploadBar/index.js +9 -0
- package/lib/components/UploadsPanel/UploadsList/UploadsVirtualGrid.js +5 -1
- package/lib/index.js +12 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.1.0](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.5...v0.1.0) (2025-07-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* modal aria-label ([3f67277](https://code.scaleflex.cloud/scaleflex/widget/commits/3f67277c031c6a668d7b0d3db35be72072c235fd))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* add roles and aria-labels for e2e testing ([7e5e36e](https://code.scaleflex.cloud/scaleflex/widget/commits/7e5e36e61fb0469ca54a6edccf2840149fd6d513))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [0.0.5](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.4...v0.0.5) (2025-07-22)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
## [0.0.4](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.3...v0.0.4) (2025-07-20)
|
|
7
31
|
|
|
8
32
|
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useExplorer } from '../../../hooks';
|
|
1
2
|
import EditDetailsButton from '../../common/EditDetailsButton';
|
|
2
3
|
import CustomMetadataSection from '../../FileWindowPanel/FileTabs/MetadataTab/CustomMetadataSection';
|
|
3
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -15,6 +16,10 @@ var DetailsSidebarFileCustomMetadataTab = function DetailsSidebarFileCustomMetad
|
|
|
15
16
|
scrollToMetaField = _ref.scrollToMetaField,
|
|
16
17
|
TabPanelWrapper = _ref.TabPanelWrapper,
|
|
17
18
|
renderNoValue = _ref.renderNoValue;
|
|
19
|
+
var _useExplorer = useExplorer(),
|
|
20
|
+
_useExplorer$opts = _useExplorer.opts,
|
|
21
|
+
_useExplorer$opts2 = _useExplorer$opts === void 0 ? {} : _useExplorer$opts,
|
|
22
|
+
useAssetsPicker = _useExplorer$opts2.useAssetsPicker;
|
|
18
23
|
if (!file) {
|
|
19
24
|
return null;
|
|
20
25
|
}
|
|
@@ -35,7 +40,7 @@ var DetailsSidebarFileCustomMetadataTab = function DetailsSidebarFileCustomMetad
|
|
|
35
40
|
dismissMarginTop: true,
|
|
36
41
|
tagsFieldMaxWidth: 300,
|
|
37
42
|
smallerFont: true
|
|
38
|
-
}), !isEditing && /*#__PURE__*/_jsx(EditDetailsButton, {
|
|
43
|
+
}), !isEditing && !useAssetsPicker && /*#__PURE__*/_jsx(EditDetailsButton, {
|
|
39
44
|
enableEditing: enableEditing,
|
|
40
45
|
isUserNotAllowedToEdit: isUserNotAllowedToEdit,
|
|
41
46
|
bottom: "calc(100% - 40px)"
|
|
@@ -93,6 +93,7 @@ var ExplorerWrapper = function ExplorerWrapper(_ref) {
|
|
|
93
93
|
height: height
|
|
94
94
|
},
|
|
95
95
|
tabIndex: -1,
|
|
96
|
+
"aria-label": "Scaleflex widget modal",
|
|
96
97
|
children: [!inline && Boolean(ExploreViewComponent) && !useAssetsPicker && /*#__PURE__*/_jsx("button", {
|
|
97
98
|
className: "filerobot-u-reset filerobot-Explorer-close",
|
|
98
99
|
type: "button",
|
|
@@ -42,7 +42,8 @@ var FileItem = function FileItem(_ref) {
|
|
|
42
42
|
onRemove = _ref.onRemove,
|
|
43
43
|
checkIsPrivateVisibilityFile = _ref.checkIsPrivateVisibilityFile,
|
|
44
44
|
showFloatyButton = _ref.showFloatyButton,
|
|
45
|
-
hideTopOptions = _ref.hideTopOptions
|
|
45
|
+
hideTopOptions = _ref.hideTopOptions,
|
|
46
|
+
ariaLabel = _ref.ariaLabel;
|
|
46
47
|
var dispatch = useDispatch();
|
|
47
48
|
var toggleContextMenu = useContextMenu();
|
|
48
49
|
var originalFile = useSelector(function (state) {
|
|
@@ -112,6 +113,7 @@ var FileItem = function FileItem(_ref) {
|
|
|
112
113
|
return /*#__PURE__*/_jsxs(Styled.FileItem, {
|
|
113
114
|
id: "filerobot_".concat(afterOrBeforeUploadFile.uuid || afterOrBeforeUploadFile.id),
|
|
114
115
|
role: role,
|
|
116
|
+
"aria-label": ariaLabel,
|
|
115
117
|
className: explorerItemClass,
|
|
116
118
|
error: Boolean(error),
|
|
117
119
|
warning: isFileShareNotAllowed,
|
|
@@ -55,7 +55,8 @@ var GeneralSection = function GeneralSection(_ref) {
|
|
|
55
55
|
_useExplorer$opts = _useExplorer.opts,
|
|
56
56
|
_useExplorer$opts2 = _useExplorer$opts === void 0 ? {} : _useExplorer$opts,
|
|
57
57
|
config = _useExplorer$opts2.config,
|
|
58
|
-
enableAIDescription = _useExplorer$opts2.enableAIDescription
|
|
58
|
+
enableAIDescription = _useExplorer$opts2.enableAIDescription,
|
|
59
|
+
useAssetsPicker = _useExplorer$opts2.useAssetsPicker;
|
|
59
60
|
var _ref2 = (config === null || config === void 0 ? void 0 : config.tagging) || {},
|
|
60
61
|
_ref2$suggestionList = _ref2.suggestionList,
|
|
61
62
|
allTags = _ref2$suggestionList === void 0 ? [] : _ref2$suggestionList,
|
|
@@ -170,7 +171,7 @@ var GeneralSection = function GeneralSection(_ref) {
|
|
|
170
171
|
}, field.uuid);
|
|
171
172
|
})]
|
|
172
173
|
})
|
|
173
|
-
}), showEditButton && !isEditing && /*#__PURE__*/_jsx(EditDetailsButton, {
|
|
174
|
+
}), showEditButton && !isEditing && !useAssetsPicker && /*#__PURE__*/_jsx(EditDetailsButton, {
|
|
174
175
|
enableEditing: enableEditing,
|
|
175
176
|
isUserNotAllowedToEdit: isUserNotAllowedToEdit,
|
|
176
177
|
mt: "5px",
|
|
@@ -134,6 +134,7 @@ var UploadBar = function UploadBar(_ref) {
|
|
|
134
134
|
color: "primary",
|
|
135
135
|
disabled: !isOnline,
|
|
136
136
|
onClick: handleClickNextButton,
|
|
137
|
+
"aria-label": "Next",
|
|
137
138
|
children: i18n('uploadBarNextButtonLabel')
|
|
138
139
|
});
|
|
139
140
|
}
|
|
@@ -144,6 +145,7 @@ var UploadBar = function UploadBar(_ref) {
|
|
|
144
145
|
color: "primary",
|
|
145
146
|
disabled: !(panelCurrentSelection !== null && panelCurrentSelection !== void 0 && panelCurrentSelection.length) > 0,
|
|
146
147
|
onClick: addPanelSelection,
|
|
148
|
+
"aria-label": "Upload add",
|
|
147
149
|
children: i18n('uploadBarUploadAddTitle')
|
|
148
150
|
});
|
|
149
151
|
}
|
|
@@ -154,6 +156,7 @@ var UploadBar = function UploadBar(_ref) {
|
|
|
154
156
|
disabled: !isOnline,
|
|
155
157
|
onClick: startUpload,
|
|
156
158
|
startIcon: /*#__PURE__*/_jsx(Upload, {}),
|
|
159
|
+
"aria-label": "Upload",
|
|
157
160
|
children: i18n('uploadBarUploadTitle')
|
|
158
161
|
});
|
|
159
162
|
};
|
|
@@ -167,6 +170,7 @@ var UploadBar = function UploadBar(_ref) {
|
|
|
167
170
|
onClick: panelGetPrevFolder,
|
|
168
171
|
$backBtn: true,
|
|
169
172
|
startIcon: /*#__PURE__*/_jsx(ArrowLeftOutline, {}),
|
|
173
|
+
"aria-label": "Upload back",
|
|
170
174
|
children: i18n('uploadBarUploadBackTitle')
|
|
171
175
|
});
|
|
172
176
|
}
|
|
@@ -179,6 +183,7 @@ var UploadBar = function UploadBar(_ref) {
|
|
|
179
183
|
size: "lg",
|
|
180
184
|
color: "secondary",
|
|
181
185
|
onClick: openAddFilesPanel,
|
|
186
|
+
"aria-label": "Add more",
|
|
182
187
|
children: i18n('uploadBarAddMoreTitle')
|
|
183
188
|
});
|
|
184
189
|
}
|
|
@@ -187,6 +192,8 @@ var UploadBar = function UploadBar(_ref) {
|
|
|
187
192
|
return /*#__PURE__*/_jsx(Styled.UploadBarWrapper, {
|
|
188
193
|
isHidden: activePickerPanel && (panelLoading || !panelAuthenticated),
|
|
189
194
|
children: /*#__PURE__*/_jsxs(Styled.UploadBar, {
|
|
195
|
+
role: "group",
|
|
196
|
+
"aria-label": "Modal actions",
|
|
190
197
|
className: "filerobot-Explorer-uploadBar",
|
|
191
198
|
children: [/*#__PURE__*/_jsxs(Styled.ActionWrapper, {
|
|
192
199
|
children: [/*#__PURE__*/_jsx(Styled.ActionButton, {
|
|
@@ -194,6 +201,7 @@ var UploadBar = function UploadBar(_ref) {
|
|
|
194
201
|
size: "lg",
|
|
195
202
|
color: "basic",
|
|
196
203
|
onClick: handleOnClickCancel,
|
|
204
|
+
"aria-label": "Cancel",
|
|
197
205
|
children: i18n('uploadBarCancelTitle')
|
|
198
206
|
}), renderActionButton()]
|
|
199
207
|
}), /*#__PURE__*/_jsxs(Styled.SecondaryButtonsWrapper, {
|
|
@@ -203,6 +211,7 @@ var UploadBar = function UploadBar(_ref) {
|
|
|
203
211
|
color: "secondary",
|
|
204
212
|
disabled: !isOnline,
|
|
205
213
|
onClick: handleClickFillMetadata,
|
|
214
|
+
"aria-label": "Fill metadata",
|
|
206
215
|
children: i18n('uploadBarFillMetadata')
|
|
207
216
|
})]
|
|
208
217
|
})]
|
|
@@ -17,8 +17,12 @@ var UploadsVirtualGrid = function UploadsVirtualGrid(_ref) {
|
|
|
17
17
|
return /*#__PURE__*/_jsx(VirtualGrid, {
|
|
18
18
|
items: fileIds,
|
|
19
19
|
injectedItemPropName: "fileIdOrUuid",
|
|
20
|
+
role: "list",
|
|
21
|
+
ariaLabel: "Grid container",
|
|
20
22
|
children: /*#__PURE__*/_jsx(FileItem, _objectSpread({
|
|
21
|
-
isUploadsPanel: true
|
|
23
|
+
isUploadsPanel: true,
|
|
24
|
+
role: "listitem",
|
|
25
|
+
ariaLabel: "Asset"
|
|
22
26
|
}, others))
|
|
23
27
|
});
|
|
24
28
|
};
|
package/lib/index.js
CHANGED
|
@@ -58,6 +58,7 @@ import { facetedSearchToggled } from './slices/filters.slice';
|
|
|
58
58
|
import { checkIsValidSortBy, checkIsValidSortOrder } from './components/common/Sort/Sort.utils';
|
|
59
59
|
import { DEFAULT_SORT_OPTION } from './components/common/Sort/Sort.constants';
|
|
60
60
|
import isFileVersion from './utils/isFileVersion';
|
|
61
|
+
import { addUploadActivity } from './thunks/uploads.thunks';
|
|
61
62
|
|
|
62
63
|
// TODO: find a way to show version of the current plugin
|
|
63
64
|
// why solution below isn't good?
|
|
@@ -208,6 +209,17 @@ var Explorer = /*#__PURE__*/function (_Plugin) {
|
|
|
208
209
|
}
|
|
209
210
|
return url;
|
|
210
211
|
});
|
|
212
|
+
_defineProperty(_this, "triggerProgressPanelActivities", function (files, uploadActivityOptions) {
|
|
213
|
+
var progressPanelInstance = _this.filerobot.getPlugin(PLUGINS_IDS.PROGRESS_PANEL);
|
|
214
|
+
if (progressPanelInstance) {
|
|
215
|
+
console.log('files', files);
|
|
216
|
+
files.forEach(function (file) {
|
|
217
|
+
_this.dispatch(addUploadActivity(_objectSpread({
|
|
218
|
+
file: file
|
|
219
|
+
}, uploadActivityOptions)));
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
});
|
|
211
223
|
_defineProperty(_this, "triggerViewEvents", function (_ref4) {
|
|
212
224
|
var viewItem = _ref4.viewItem,
|
|
213
225
|
viewSubItem = _ref4.viewSubItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/widget-explorer",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Scaleflex explorer for the files uploaded on filerobot, handling them & upload new files.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"style": "dist/style.min.css",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"@scaleflex/icons": "^3.0.0-beta.11",
|
|
19
19
|
"@scaleflex/react-url-builder": "^0.0.72",
|
|
20
20
|
"@scaleflex/ui": "^3.0.0-beta.11",
|
|
21
|
-
"@scaleflex/widget-common": "^0.0
|
|
22
|
-
"@scaleflex/widget-icons": "^0.0
|
|
23
|
-
"@scaleflex/widget-informer": "^0.0
|
|
24
|
-
"@scaleflex/widget-provider-views": "^0.0
|
|
25
|
-
"@scaleflex/widget-thumbnail-generator": "^0.0
|
|
26
|
-
"@scaleflex/widget-utils": "^0.0
|
|
21
|
+
"@scaleflex/widget-common": "^0.1.0",
|
|
22
|
+
"@scaleflex/widget-icons": "^0.1.0",
|
|
23
|
+
"@scaleflex/widget-informer": "^0.1.0",
|
|
24
|
+
"@scaleflex/widget-provider-views": "^0.1.0",
|
|
25
|
+
"@scaleflex/widget-thumbnail-generator": "^0.1.0",
|
|
26
|
+
"@scaleflex/widget-utils": "^0.1.0",
|
|
27
27
|
"@transloadit/prettier-bytes": "0.1.0",
|
|
28
28
|
"akamai-filerobot-converter": "^0.1.6",
|
|
29
29
|
"classnames": "^2.2.6",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react-konva": ">=19.0.3"
|
|
52
52
|
},
|
|
53
53
|
"license": "MIT",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "6fa9b7a95c026352f3e3ef0cf2f8afcc66bfa23a"
|
|
55
55
|
}
|