@ossy/storage 3.26.0 → 3.30.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/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.26.0",
4
+ "version": "3.30.0",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
7
7
  "module": "./src/index.js",
@@ -31,5 +31,5 @@
31
31
  "ramda": "*",
32
32
  "react": "*"
33
33
  },
34
- "gitHead": "0df308a330150a890b9dd4d6ffc2e9f28bd31966"
34
+ "gitHead": "1e6ffe03d96f60de67e2f29bcf9e3d08c0de6b00"
35
35
  }
@@ -63,7 +63,8 @@ import {
63
63
  identity,
64
64
  last,
65
65
  } from 'ramda'
66
- import { Text, Overlay, Switch, DropZone, Breadcrumbs, Guide, DelayedRender, useDocumentTitle, View, Button, ContextMenu, Dropdown, Page, Tags, Alert, useLocale, hasTranslation, preloadStorageIcons } from '@ossy/design-system'
66
+ import { Text, Overlay, Switch, DropZone, Breadcrumbs, Guide, DelayedRender, useDocumentTitle, View, Button, ContextMenu, Dropdown, Icon, Page, Tags, Alert, useLocale, hasTranslation, preloadStorageIcons } from '@ossy/design-system'
67
+ import { Definition } from './Definition.js'
67
68
  import { TaskRunDialog } from './TaskRunDialog.jsx'
68
69
  import { useRouter, useSearchParams } from '@ossy/router-react'
69
70
 
@@ -115,6 +116,11 @@ export const ResourcesPage = () => {
115
116
  const sdk = useSdk()
116
117
  const app = useApp()
117
118
  const { data: workspace = {} } = sdk.read(GetWorkspace)
119
+ const { data: integrationList } = sdk.read({ id: '@ossy/platform/actions/list-integrations' })
120
+ const connectedIntegrationIds = useMemo(
121
+ () => (Array.isArray(integrationList?.integrations) ? integrationList.integrations : []),
122
+ [integrationList],
123
+ )
118
124
  const [overlay, setOverlay] = useState(Overlays.None)
119
125
  const [viewMode, setViewMode] = useState(ViewMode.List)
120
126
  const [addMenuOpen, setAddMenuOpen] = useState(false)
@@ -490,7 +496,7 @@ export const ResourcesPage = () => {
490
496
  {t('storage.resources.move')}
491
497
  </ContextMenu.Item>,
492
498
  ...(() => {
493
- const matchingTasks = tasksForResource(taskCatalog, resource)
499
+ const matchingTasks = tasksForResource(taskCatalog, resource, { connectedIntegrationIds })
494
500
  .filter(task => !task.package || isServiceEntitled(workspace?.services, task.package))
495
501
  if (!matchingTasks.length) return []
496
502
  return [
@@ -523,7 +529,7 @@ export const ResourcesPage = () => {
523
529
  ]
524
530
  }
525
531
 
526
- }), [displayResources, activePath, storageHomeHref, openLocation, onMoveResource, onUploadFiles, onRemoveResource, setSelectedResourceId, t, messages, taskCatalog, runResourceTask])
532
+ }), [displayResources, activePath, storageHomeHref, openLocation, onMoveResource, onUploadFiles, onRemoveResource, setSelectedResourceId, t, messages, taskCatalog, runResourceTask, workspace, connectedIntegrationIds])
527
533
 
528
534
  // Server already sorted + paginated.
529
535
  const visibleResources = filterResources
@@ -651,6 +657,7 @@ export const ResourcesPage = () => {
651
657
 
652
658
  <Page
653
659
  scroll
660
+ prefix={<Icon name={Definition.icon} size="l" />}
654
661
  title="storage.resources.title"
655
662
  description="storage.resources.description"
656
663
  near={<Tags tags={[t('storage.resources.beta')]} size="s" />}
@@ -9,7 +9,6 @@ export const metadata = {
9
9
  sv: '/storage',
10
10
  en: '/storage',
11
11
  },
12
- layout: '@ossy/app/layout/workspace',
13
12
  }
14
13
 
15
14
  const PACKAGE_DETAIL = {