@ossy/storage 3.0.2 → 3.0.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ossy/storage",
3
3
  "description": "Analytics module — workspace analytics for website traffic",
4
- "version": "3.0.2",
4
+ "version": "3.0.3",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "module": "./src/index.js",
@@ -30,5 +30,5 @@
30
30
  "ramda": "*",
31
31
  "react": "*"
32
32
  },
33
- "gitHead": "f0a8af3c370bbaffe4f7388c14f9345a5c6c56e5"
33
+ "gitHead": "8d098a04b595b2d1f54788c5c7ed7f310e9cd7e1"
34
34
  }
@@ -127,7 +127,7 @@ export const ResourcesPage = () => {
127
127
  const onRemoveResource = resource => {
128
128
  setSelectedResourceId(resource.id)
129
129
 
130
- if (resource.type === 'directory') {
130
+ if (resource.type === '@ossy/platform/schema/directory' || resource.type === 'directory') {
131
131
  setOverlay(Overlays.RemoveDirectory)
132
132
  } else {
133
133
  removeResource(sdk, resource.id, resource.location)
@@ -158,7 +158,7 @@ export const ResourcesPage = () => {
158
158
  .filter(resource => !resource?.name?.startsWith?.('@ossy'))
159
159
  .map(resource => {
160
160
 
161
- if (resource.type === 'directory') {
161
+ if (resource.type === '@ossy/platform/schema/directory' || resource.type === 'directory') {
162
162
  const folderLocation = `${activePath}${resource.name}`
163
163
  return {
164
164
  ...resource,
@@ -232,8 +232,10 @@ export const ResourcesPage = () => {
232
232
 
233
233
  })
234
234
  .sort((a, b) => {
235
- if (a.type === 'directory' && b.type !== 'directory') return -1
236
- if (a.type !== 'directory' && b.type === 'directory') return 1
235
+ const aDir = a.type === '@ossy/platform/schema/directory' || a.type === 'directory'
236
+ const bDir = b.type === '@ossy/platform/schema/directory' || b.type === 'directory'
237
+ if (aDir && !bDir) return -1
238
+ if (!aDir && bDir) return 1
237
239
  }), [displayResources, activePath, storageHomeHref, openLocation, onMoveResource, onRemoveResource, setSelectedResourceId, t])
238
240
 
239
241
  return (