@scaleflex/widget-explorer 0.0.5 → 0.1.1
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 +42 -17
- package/lib/components/ExplorerWrapper.js +1 -0
- package/lib/components/FileItem/index.js +3 -1
- package/lib/components/UploadBar/index.js +9 -0
- package/lib/components/UploadsPanel/UploadsList/UploadsVirtualGrid.js +5 -1
- package/lib/hooks/useAssetPicker.js +16 -6
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,23 +3,7 @@
|
|
|
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.
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [0.0.4](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.3...v0.0.4) (2025-07-20)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [0.0.3](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.2...v0.0.3) (2025-07-20)
|
|
6
|
+
## [0.1.1](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.1.0...v0.1.1) (2025-07-28)
|
|
23
7
|
|
|
24
8
|
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
25
9
|
|
|
@@ -28,6 +12,47 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
28
12
|
|
|
29
13
|
|
|
30
14
|
|
|
15
|
+
# [0.1.0](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.5...v0.1.0) (2025-07-23)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* modal aria-label ([3f67277](https://code.scaleflex.cloud/scaleflex/widget/commits/3f67277c031c6a668d7b0d3db35be72072c235fd))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* add roles and aria-labels for e2e testing ([7e5e36e](https://code.scaleflex.cloud/scaleflex/widget/commits/7e5e36e61fb0469ca54a6edccf2840149fd6d513))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [0.0.5](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.4...v0.0.5) (2025-07-22)
|
|
32
|
+
|
|
33
|
+
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## [0.0.4](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.3...v0.0.4) (2025-07-20)
|
|
40
|
+
|
|
41
|
+
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## [0.0.3](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.2...v0.0.3) (2025-07-20)
|
|
48
|
+
|
|
49
|
+
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
31
56
|
## [0.0.2](https://code.scaleflex.cloud/scaleflex/widget/compare/v0.0.1...v0.0.2) (2025-07-20)
|
|
32
57
|
|
|
33
58
|
**Note:** Version bump only for package @scaleflex/widget-explorer
|
|
@@ -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,
|
|
@@ -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
|
};
|
|
@@ -18,10 +18,12 @@ import Filerobot from '@scaleflex/widget-core';
|
|
|
18
18
|
import { VIEW_IDS, PLUGINS_IDS } from '@scaleflex/widget-utils/lib/constants';
|
|
19
19
|
|
|
20
20
|
// We are importing Explorer dynamically to avoid issue with redux slice initialization
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
// Using a promise-based approach to ensure proper loading
|
|
22
|
+
var loadExplorer = function loadExplorer() {
|
|
23
|
+
return import('../index').then(function (module) {
|
|
24
|
+
return module["default"];
|
|
25
|
+
});
|
|
26
|
+
};
|
|
25
27
|
var DEFAULT_VIEWS = [VIEW_IDS.ASSETS, VIEW_IDS.FOLDERS];
|
|
26
28
|
var getConfigs = function getConfigs(_ref) {
|
|
27
29
|
var container = _ref.container,
|
|
@@ -120,7 +122,7 @@ var useAssetsPicker = function useAssetsPicker(_ref2) {
|
|
|
120
122
|
onImport: onImport
|
|
121
123
|
});
|
|
122
124
|
};
|
|
123
|
-
var openAssetPicker = function openAssetPicker() {
|
|
125
|
+
var openAssetPicker = async function openAssetPicker() {
|
|
124
126
|
var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
125
127
|
onImport = _ref6.onImport,
|
|
126
128
|
multiSelect = _ref6.multiSelect,
|
|
@@ -165,7 +167,15 @@ var useAssetsPicker = function useAssetsPicker(_ref2) {
|
|
|
165
167
|
core = _getConfigs.core,
|
|
166
168
|
explorer = _getConfigs.explorer;
|
|
167
169
|
var filerobot = Filerobot(core);
|
|
168
|
-
|
|
170
|
+
|
|
171
|
+
// Load Explorer module dynamically
|
|
172
|
+
try {
|
|
173
|
+
var Explorer = await loadExplorer();
|
|
174
|
+
filerobot.use(Explorer, explorer);
|
|
175
|
+
} catch (error) {
|
|
176
|
+
console.error('Failed to load Explorer module:', error);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
169
179
|
if (!hideUploadButton) {
|
|
170
180
|
import('@scaleflex/widget-xhr-upload').then(function (module) {
|
|
171
181
|
var XHRUpload = module["default"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/widget-explorer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
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.
|
|
22
|
-
"@scaleflex/widget-icons": "^0.
|
|
23
|
-
"@scaleflex/widget-informer": "^0.
|
|
24
|
-
"@scaleflex/widget-provider-views": "^0.
|
|
25
|
-
"@scaleflex/widget-thumbnail-generator": "^0.
|
|
26
|
-
"@scaleflex/widget-utils": "^0.
|
|
21
|
+
"@scaleflex/widget-common": "^0.1.1",
|
|
22
|
+
"@scaleflex/widget-icons": "^0.1.1",
|
|
23
|
+
"@scaleflex/widget-informer": "^0.1.1",
|
|
24
|
+
"@scaleflex/widget-provider-views": "^0.1.1",
|
|
25
|
+
"@scaleflex/widget-thumbnail-generator": "^0.1.1",
|
|
26
|
+
"@scaleflex/widget-utils": "^0.1.1",
|
|
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": "033a120c03dbd1e8f371975285511f89e828cb9c"
|
|
55
55
|
}
|