@box/metadata-view 0.19.1 → 0.20.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/dist/chunks/table-body-with-data.js +44 -47
- package/dist/chunks/types.js +9 -0
- package/dist/esm/index.js +5 -2
- package/dist/esm/lib/components/action-bar/action-bar.js +35 -22
- package/dist/esm/lib/components/action-bar/messages.js +14 -0
- package/dist/esm/lib/components/item-action-menu/item-action-menu.js +77 -63
- package/dist/esm/lib/components/metadata-grid/index.js +1 -0
- package/dist/esm/lib/components/metadata-grid/messages.js +10 -0
- package/dist/esm/lib/components/metadata-grid/metadata-grid.js +45 -0
- package/dist/esm/lib/components/metadata-table/metadata-table.js +18 -17
- package/dist/esm/lib/components/metadata-table/table-body/table-body-with-data.js +3 -2
- package/dist/esm/lib/components/switch-case/switch-case.js +14 -0
- package/dist/esm/lib/metadata-view.js +51 -28
- package/dist/i18n/bn-IN.js +5 -2
- package/dist/i18n/bn-IN.properties +16 -0
- package/dist/i18n/da-DK.js +5 -2
- package/dist/i18n/da-DK.properties +16 -0
- package/dist/i18n/de-DE.js +5 -2
- package/dist/i18n/de-DE.properties +16 -0
- package/dist/i18n/en-AU.js +3 -0
- package/dist/i18n/en-AU.properties +16 -0
- package/dist/i18n/en-CA.js +3 -0
- package/dist/i18n/en-CA.properties +16 -0
- package/dist/i18n/en-GB.js +3 -0
- package/dist/i18n/en-GB.properties +16 -0
- package/dist/i18n/en-US.js +3 -0
- package/dist/i18n/en-US.properties +6 -0
- package/dist/i18n/en-x-pseudo.js +18 -15
- package/dist/i18n/en-x-pseudo.properties +23 -7
- package/dist/i18n/es-419.js +5 -2
- package/dist/i18n/es-419.properties +16 -0
- package/dist/i18n/es-ES.js +5 -2
- package/dist/i18n/es-ES.properties +16 -0
- package/dist/i18n/fi-FI.js +5 -2
- package/dist/i18n/fi-FI.properties +16 -0
- package/dist/i18n/fr-CA.js +5 -2
- package/dist/i18n/fr-CA.properties +16 -0
- package/dist/i18n/fr-FR.js +5 -2
- package/dist/i18n/fr-FR.properties +16 -0
- package/dist/i18n/hi-IN.js +5 -2
- package/dist/i18n/hi-IN.properties +16 -0
- package/dist/i18n/it-IT.js +6 -3
- package/dist/i18n/it-IT.properties +17 -1
- package/dist/i18n/ja-JP.js +5 -2
- package/dist/i18n/ja-JP.properties +16 -0
- package/dist/i18n/json/src/lib/components/action-bar/messages.json +1 -0
- package/dist/i18n/json/src/lib/components/metadata-grid/messages.json +1 -0
- package/dist/i18n/ko-KR.js +5 -2
- package/dist/i18n/ko-KR.properties +16 -0
- package/dist/i18n/nb-NO.js +6 -3
- package/dist/i18n/nb-NO.properties +17 -1
- package/dist/i18n/nl-NL.js +5 -2
- package/dist/i18n/nl-NL.properties +16 -0
- package/dist/i18n/pl-PL.js +5 -2
- package/dist/i18n/pl-PL.properties +16 -0
- package/dist/i18n/pt-BR.js +5 -2
- package/dist/i18n/pt-BR.properties +16 -0
- package/dist/i18n/ru-RU.js +5 -2
- package/dist/i18n/ru-RU.properties +16 -0
- package/dist/i18n/sv-SE.js +5 -2
- package/dist/i18n/sv-SE.properties +16 -0
- package/dist/i18n/tr-TR.js +5 -2
- package/dist/i18n/tr-TR.properties +16 -0
- package/dist/i18n/zh-CN.js +5 -2
- package/dist/i18n/zh-CN.properties +16 -0
- package/dist/i18n/zh-TW.js +5 -2
- package/dist/i18n/zh-TW.properties +16 -0
- package/dist/styles/metadata-grid.css +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/components/action-bar/action-bar.d.ts +5 -3
- package/dist/types/lib/components/action-bar/messages.d.ts +13 -0
- package/dist/types/lib/components/item-action-menu/item-action-menu.d.ts +3 -1
- package/dist/types/lib/components/metadata-grid/index.d.ts +0 -0
- package/dist/types/lib/components/metadata-grid/messages.d.ts +8 -0
- package/dist/types/lib/components/metadata-grid/metadata-grid.d.ts +4 -0
- package/dist/types/lib/components/metadata-table/metadata-table.d.ts +2 -7
- package/dist/types/lib/components/switch-case/switch-case.d.ts +12 -0
- package/dist/types/lib/metadata-view.d.ts +7 -5
- package/dist/types/lib/types.d.ts +10 -0
- package/package.json +3 -3
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Body text for the empty state when no items are found
|
|
2
|
+
groupSharedFeatures.emptyState.body = Try adjusting your filters or keywords.
|
|
3
|
+
# Heading for the empty state when no items are found
|
|
4
|
+
groupSharedFeatures.emptyState.heading = Sorry, we couldn't find what you're looking for.
|
|
1
5
|
# Button label to open the sidepanel with all filters
|
|
2
6
|
groupSharedFeatures.metadataView.filterRow.AllFilters = Alla filter
|
|
3
7
|
# Button label to apply the current input as a filter to the metadata table
|
|
@@ -6,9 +10,21 @@ groupSharedFeatures.metadataView.filterRow.applyButton = Tillämpa
|
|
|
6
10
|
groupSharedFeatures.metadataView.filterRow.clearButton = Rensa
|
|
7
11
|
# Placeholder text for the input field in the filter row
|
|
8
12
|
groupSharedFeatures.metadataView.filterRow.textInputPlaceholder = Ange värde
|
|
13
|
+
# Button label to clear all filters in the sidepanel
|
|
14
|
+
groupSharedFeatures.metadataView.filterSidepanel.clearAllButton = Clear All
|
|
15
|
+
# Aria label for the close button in the filter sidepanel
|
|
16
|
+
groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel = Close
|
|
17
|
+
# Header for the filter sidepanel
|
|
18
|
+
groupSharedFeatures.metadataView.filterSidepanel.filtersHeader = Filters
|
|
19
|
+
# Button label to apply filters and show results
|
|
20
|
+
groupSharedFeatures.metadataView.filterSidepanel.showResultsButton = Search
|
|
9
21
|
# Label for the action menu for an item in the metadata view list
|
|
10
22
|
groupSharedFeatures.metadataView.itemActionMenu.actionMenu = Åtgärdsmeny
|
|
23
|
+
# Error message displayed when metadata fails to load
|
|
24
|
+
groupSharedFeatures.metadataView.itemList.errorMessage = Något gick fel. Uppdatera den här sidan.
|
|
11
25
|
# Label for the list of files and folders displayed in a list view
|
|
12
26
|
groupSharedFeatures.metadataView.itemList.listView = Listvy
|
|
27
|
+
# Label for the refresh button in error state
|
|
28
|
+
groupSharedFeatures.metadataView.itemList.refreshButton = Uppdatera
|
|
13
29
|
# Label for the select all checkbox in the metadata table
|
|
14
30
|
groupSharedFeatures.metadataView.itemList.selectAll = Välj alla
|
package/dist/i18n/tr-TR.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"groupSharedFeatures.emptyState.body": "Try adjusting your filters or keywords.",
|
|
3
3
|
"groupSharedFeatures.emptyState.heading": "Sorry, we couldn't find what you're looking for.",
|
|
4
|
+
"groupSharedFeatures.metadataView.actionBar.switchToGridView": "Switch to Grid View",
|
|
5
|
+
"groupSharedFeatures.metadataView.actionBar.switchToListView": "Switch to List View",
|
|
4
6
|
"groupSharedFeatures.metadataView.filterRow.AllFilters": "Tüm Filtreler",
|
|
5
7
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Uygula",
|
|
6
8
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Temizle",
|
|
@@ -9,9 +11,10 @@ export default {
|
|
|
9
11
|
"groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel": "Close",
|
|
10
12
|
"groupSharedFeatures.metadataView.filterSidepanel.filtersHeader": "Filters",
|
|
11
13
|
"groupSharedFeatures.metadataView.filterSidepanel.showResultsButton": "Search",
|
|
14
|
+
"groupSharedFeatures.metadataView.gridList.gridView": "Grid View",
|
|
12
15
|
"groupSharedFeatures.metadataView.itemActionMenu.actionMenu": "İşlem menüsü",
|
|
13
|
-
"groupSharedFeatures.metadataView.itemList.errorMessage": "
|
|
16
|
+
"groupSharedFeatures.metadataView.itemList.errorMessage": "Bir hata oluştu. Lütfen bu sayfayı yenileyin.",
|
|
14
17
|
"groupSharedFeatures.metadataView.itemList.listView": "Liste görünümü",
|
|
15
|
-
"groupSharedFeatures.metadataView.itemList.refreshButton": "
|
|
18
|
+
"groupSharedFeatures.metadataView.itemList.refreshButton": "Yenile",
|
|
16
19
|
"groupSharedFeatures.metadataView.itemList.selectAll": "Tümünü Seç"
|
|
17
20
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Body text for the empty state when no items are found
|
|
2
|
+
groupSharedFeatures.emptyState.body = Try adjusting your filters or keywords.
|
|
3
|
+
# Heading for the empty state when no items are found
|
|
4
|
+
groupSharedFeatures.emptyState.heading = Sorry, we couldn't find what you're looking for.
|
|
1
5
|
# Button label to open the sidepanel with all filters
|
|
2
6
|
groupSharedFeatures.metadataView.filterRow.AllFilters = Tüm Filtreler
|
|
3
7
|
# Button label to apply the current input as a filter to the metadata table
|
|
@@ -6,9 +10,21 @@ groupSharedFeatures.metadataView.filterRow.applyButton = Uygula
|
|
|
6
10
|
groupSharedFeatures.metadataView.filterRow.clearButton = Temizle
|
|
7
11
|
# Placeholder text for the input field in the filter row
|
|
8
12
|
groupSharedFeatures.metadataView.filterRow.textInputPlaceholder = Değer Ayarla
|
|
13
|
+
# Button label to clear all filters in the sidepanel
|
|
14
|
+
groupSharedFeatures.metadataView.filterSidepanel.clearAllButton = Clear All
|
|
15
|
+
# Aria label for the close button in the filter sidepanel
|
|
16
|
+
groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel = Close
|
|
17
|
+
# Header for the filter sidepanel
|
|
18
|
+
groupSharedFeatures.metadataView.filterSidepanel.filtersHeader = Filters
|
|
19
|
+
# Button label to apply filters and show results
|
|
20
|
+
groupSharedFeatures.metadataView.filterSidepanel.showResultsButton = Search
|
|
9
21
|
# Label for the action menu for an item in the metadata view list
|
|
10
22
|
groupSharedFeatures.metadataView.itemActionMenu.actionMenu = İşlem menüsü
|
|
23
|
+
# Error message displayed when metadata fails to load
|
|
24
|
+
groupSharedFeatures.metadataView.itemList.errorMessage = Bir hata oluştu. Lütfen bu sayfayı yenileyin.
|
|
11
25
|
# Label for the list of files and folders displayed in a list view
|
|
12
26
|
groupSharedFeatures.metadataView.itemList.listView = Liste görünümü
|
|
27
|
+
# Label for the refresh button in error state
|
|
28
|
+
groupSharedFeatures.metadataView.itemList.refreshButton = Yenile
|
|
13
29
|
# Label for the select all checkbox in the metadata table
|
|
14
30
|
groupSharedFeatures.metadataView.itemList.selectAll = Tümünü Seç
|
package/dist/i18n/zh-CN.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"groupSharedFeatures.emptyState.body": "Try adjusting your filters or keywords.",
|
|
3
3
|
"groupSharedFeatures.emptyState.heading": "Sorry, we couldn't find what you're looking for.",
|
|
4
|
+
"groupSharedFeatures.metadataView.actionBar.switchToGridView": "Switch to Grid View",
|
|
5
|
+
"groupSharedFeatures.metadataView.actionBar.switchToListView": "Switch to List View",
|
|
4
6
|
"groupSharedFeatures.metadataView.filterRow.AllFilters": "所有筛选条件",
|
|
5
7
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "应用程序",
|
|
6
8
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "清除",
|
|
@@ -9,9 +11,10 @@ export default {
|
|
|
9
11
|
"groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel": "Close",
|
|
10
12
|
"groupSharedFeatures.metadataView.filterSidepanel.filtersHeader": "Filters",
|
|
11
13
|
"groupSharedFeatures.metadataView.filterSidepanel.showResultsButton": "Search",
|
|
14
|
+
"groupSharedFeatures.metadataView.gridList.gridView": "Grid View",
|
|
12
15
|
"groupSharedFeatures.metadataView.itemActionMenu.actionMenu": "操作菜单",
|
|
13
|
-
"groupSharedFeatures.metadataView.itemList.errorMessage": "
|
|
16
|
+
"groupSharedFeatures.metadataView.itemList.errorMessage": "发生错误。请刷新此页面。",
|
|
14
17
|
"groupSharedFeatures.metadataView.itemList.listView": "列表视图",
|
|
15
|
-
"groupSharedFeatures.metadataView.itemList.refreshButton": "
|
|
18
|
+
"groupSharedFeatures.metadataView.itemList.refreshButton": "刷新",
|
|
16
19
|
"groupSharedFeatures.metadataView.itemList.selectAll": "选择全部"
|
|
17
20
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Body text for the empty state when no items are found
|
|
2
|
+
groupSharedFeatures.emptyState.body = Try adjusting your filters or keywords.
|
|
3
|
+
# Heading for the empty state when no items are found
|
|
4
|
+
groupSharedFeatures.emptyState.heading = Sorry, we couldn't find what you're looking for.
|
|
1
5
|
# Button label to open the sidepanel with all filters
|
|
2
6
|
groupSharedFeatures.metadataView.filterRow.AllFilters = 所有筛选条件
|
|
3
7
|
# Button label to apply the current input as a filter to the metadata table
|
|
@@ -6,9 +10,21 @@ groupSharedFeatures.metadataView.filterRow.applyButton = 应用程序
|
|
|
6
10
|
groupSharedFeatures.metadataView.filterRow.clearButton = 清除
|
|
7
11
|
# Placeholder text for the input field in the filter row
|
|
8
12
|
groupSharedFeatures.metadataView.filterRow.textInputPlaceholder = 设置值
|
|
13
|
+
# Button label to clear all filters in the sidepanel
|
|
14
|
+
groupSharedFeatures.metadataView.filterSidepanel.clearAllButton = Clear All
|
|
15
|
+
# Aria label for the close button in the filter sidepanel
|
|
16
|
+
groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel = Close
|
|
17
|
+
# Header for the filter sidepanel
|
|
18
|
+
groupSharedFeatures.metadataView.filterSidepanel.filtersHeader = Filters
|
|
19
|
+
# Button label to apply filters and show results
|
|
20
|
+
groupSharedFeatures.metadataView.filterSidepanel.showResultsButton = Search
|
|
9
21
|
# Label for the action menu for an item in the metadata view list
|
|
10
22
|
groupSharedFeatures.metadataView.itemActionMenu.actionMenu = 操作菜单
|
|
23
|
+
# Error message displayed when metadata fails to load
|
|
24
|
+
groupSharedFeatures.metadataView.itemList.errorMessage = 发生错误。请刷新此页面。
|
|
11
25
|
# Label for the list of files and folders displayed in a list view
|
|
12
26
|
groupSharedFeatures.metadataView.itemList.listView = 列表视图
|
|
27
|
+
# Label for the refresh button in error state
|
|
28
|
+
groupSharedFeatures.metadataView.itemList.refreshButton = 刷新
|
|
13
29
|
# Label for the select all checkbox in the metadata table
|
|
14
30
|
groupSharedFeatures.metadataView.itemList.selectAll = 选择全部
|
package/dist/i18n/zh-TW.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"groupSharedFeatures.emptyState.body": "Try adjusting your filters or keywords.",
|
|
3
3
|
"groupSharedFeatures.emptyState.heading": "Sorry, we couldn't find what you're looking for.",
|
|
4
|
+
"groupSharedFeatures.metadataView.actionBar.switchToGridView": "Switch to Grid View",
|
|
5
|
+
"groupSharedFeatures.metadataView.actionBar.switchToListView": "Switch to List View",
|
|
4
6
|
"groupSharedFeatures.metadataView.filterRow.AllFilters": "全部篩選條件",
|
|
5
7
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "套用",
|
|
6
8
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "清除",
|
|
@@ -9,9 +11,10 @@ export default {
|
|
|
9
11
|
"groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel": "Close",
|
|
10
12
|
"groupSharedFeatures.metadataView.filterSidepanel.filtersHeader": "Filters",
|
|
11
13
|
"groupSharedFeatures.metadataView.filterSidepanel.showResultsButton": "Search",
|
|
14
|
+
"groupSharedFeatures.metadataView.gridList.gridView": "Grid View",
|
|
12
15
|
"groupSharedFeatures.metadataView.itemActionMenu.actionMenu": "動作選單",
|
|
13
|
-
"groupSharedFeatures.metadataView.itemList.errorMessage": "
|
|
16
|
+
"groupSharedFeatures.metadataView.itemList.errorMessage": "出了點問題。請重新整理此頁面。",
|
|
14
17
|
"groupSharedFeatures.metadataView.itemList.listView": "清單檢視",
|
|
15
|
-
"groupSharedFeatures.metadataView.itemList.refreshButton": "
|
|
18
|
+
"groupSharedFeatures.metadataView.itemList.refreshButton": "重新整理",
|
|
16
19
|
"groupSharedFeatures.metadataView.itemList.selectAll": "全選"
|
|
17
20
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# Body text for the empty state when no items are found
|
|
2
|
+
groupSharedFeatures.emptyState.body = Try adjusting your filters or keywords.
|
|
3
|
+
# Heading for the empty state when no items are found
|
|
4
|
+
groupSharedFeatures.emptyState.heading = Sorry, we couldn't find what you're looking for.
|
|
1
5
|
# Button label to open the sidepanel with all filters
|
|
2
6
|
groupSharedFeatures.metadataView.filterRow.AllFilters = 全部篩選條件
|
|
3
7
|
# Button label to apply the current input as a filter to the metadata table
|
|
@@ -6,9 +10,21 @@ groupSharedFeatures.metadataView.filterRow.applyButton = 套用
|
|
|
6
10
|
groupSharedFeatures.metadataView.filterRow.clearButton = 清除
|
|
7
11
|
# Placeholder text for the input field in the filter row
|
|
8
12
|
groupSharedFeatures.metadataView.filterRow.textInputPlaceholder = 設定值
|
|
13
|
+
# Button label to clear all filters in the sidepanel
|
|
14
|
+
groupSharedFeatures.metadataView.filterSidepanel.clearAllButton = Clear All
|
|
15
|
+
# Aria label for the close button in the filter sidepanel
|
|
16
|
+
groupSharedFeatures.metadataView.filterSidepanel.closeAriaLabel = Close
|
|
17
|
+
# Header for the filter sidepanel
|
|
18
|
+
groupSharedFeatures.metadataView.filterSidepanel.filtersHeader = Filters
|
|
19
|
+
# Button label to apply filters and show results
|
|
20
|
+
groupSharedFeatures.metadataView.filterSidepanel.showResultsButton = Search
|
|
9
21
|
# Label for the action menu for an item in the metadata view list
|
|
10
22
|
groupSharedFeatures.metadataView.itemActionMenu.actionMenu = 動作選單
|
|
23
|
+
# Error message displayed when metadata fails to load
|
|
24
|
+
groupSharedFeatures.metadataView.itemList.errorMessage = 出了點問題。請重新整理此頁面。
|
|
11
25
|
# Label for the list of files and folders displayed in a list view
|
|
12
26
|
groupSharedFeatures.metadataView.itemList.listView = 清單檢視
|
|
27
|
+
# Label for the refresh button in error state
|
|
28
|
+
groupSharedFeatures.metadataView.itemList.refreshButton = 重新整理
|
|
13
29
|
# Label for the select all checkbox in the metadata table
|
|
14
30
|
groupSharedFeatures.metadataView.itemList.selectAll = 全選
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._itemThumbnail_1j3e6_1{display:flex;align-items:center;justify-content:center}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { FilterRowProps } from '../filter-row';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { ViewMode } from '../../types';
|
|
3
|
+
export interface ActionBarProps extends FilterRowProps {
|
|
4
|
+
onViewModeClick?: () => void;
|
|
5
|
+
viewMode?: ViewMode;
|
|
4
6
|
}
|
|
5
|
-
export declare const ActionBar: ({
|
|
7
|
+
export declare const ActionBar: ({ onViewModeClick, viewMode, ...rest }: ActionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export default ActionBar;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent, PropsWithChildren, SVGProps } from 'react';
|
|
2
2
|
import { Item } from '@box/types';
|
|
3
|
+
import { ViewMode } from '../../types';
|
|
3
4
|
export interface ItemAction {
|
|
4
5
|
label: string;
|
|
5
6
|
onClick: (item: Item) => void;
|
|
@@ -16,5 +17,6 @@ export interface ItemActionMenuProps {
|
|
|
16
17
|
label: string;
|
|
17
18
|
icon: FunctionComponent<PropsWithChildren<SVGProps<SVGSVGElement>>>;
|
|
18
19
|
};
|
|
20
|
+
viewMode?: ViewMode;
|
|
19
21
|
}
|
|
20
|
-
export declare function ItemActionMenu({ actions, inlineActions, isDisabled, item, onOpenChange, subMenuActions, subMenuTrigger, }: ItemActionMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function ItemActionMenu({ actions, inlineActions, isDisabled, item, onOpenChange, subMenuActions, subMenuTrigger, viewMode, }: ItemActionMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import { TableProps } from '@box/blueprint-web';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { IconColumnVariant, Column } from '../../types';
|
|
5
|
-
export interface MetadataTableProps extends TableProps {
|
|
2
|
+
import { IconColumnVariant, Column, MetadataProps } from '../../types';
|
|
3
|
+
export interface MetadataTableProps extends TableProps, MetadataProps {
|
|
6
4
|
columns: Column[];
|
|
7
5
|
iconColumnVariant?: IconColumnVariant;
|
|
8
|
-
isLoading?: boolean;
|
|
9
6
|
isSelectAllEnabled?: boolean;
|
|
10
|
-
items: Item[];
|
|
11
|
-
itemActionMenuProps?: Omit<ItemActionMenuProps, 'item' | 'onOpenChange'>;
|
|
12
7
|
}
|
|
13
8
|
declare const MetadataTable: ({ columns, isLoading, iconColumnVariant, isSelectAllEnabled, items, itemActionMenuProps, ...tableProps }: MetadataTableProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
9
|
export default MetadataTable;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface CaseProps {
|
|
3
|
+
condition: boolean;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const Case: React.FC<CaseProps>;
|
|
7
|
+
type CaseElement = React.ReactElement<CaseProps>;
|
|
8
|
+
interface SwitchCaseProps {
|
|
9
|
+
children: CaseElement | CaseElement[];
|
|
10
|
+
}
|
|
11
|
+
export declare const SwitchCase: React.FC<SwitchCaseProps>;
|
|
12
|
+
export {};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { MetadataTableProps } from './components/metadata-table';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { ActionBarProps } from './components/action-bar';
|
|
3
|
+
import { MetadataProps, ViewMode } from './types';
|
|
4
|
+
export interface MetadataViewProps extends MetadataProps {
|
|
5
|
+
actionBarProps: Omit<ActionBarProps, 'onViewModeChange' | 'viewMode'>;
|
|
6
6
|
hasError?: boolean;
|
|
7
|
+
initialViewMode?: ViewMode;
|
|
7
8
|
onRefresh?: () => void;
|
|
9
|
+
tableProps: Omit<MetadataTableProps, 'items' | 'itemActionMenuProps'>;
|
|
8
10
|
}
|
|
9
|
-
export declare function MetadataView({
|
|
11
|
+
export declare function MetadataView({ actionBarProps, tableProps, hasError, onRefresh, initialViewMode, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export default MetadataView;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ColumnProps } from '@box/blueprint-web';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { Item } from '@box/types';
|
|
4
|
+
import { ItemActionMenuProps } from './components/item-action-menu';
|
|
4
5
|
export type MetadataFieldType = 'date' | 'enum' | 'float' | 'multiSelect' | 'string';
|
|
5
6
|
export interface Column extends Partial<ColumnProps> {
|
|
6
7
|
cellRenderer?: (item: Item, column: Column) => React.ReactNode | undefined;
|
|
@@ -15,3 +16,12 @@ export declare enum IconColumnVariant {
|
|
|
15
16
|
COLUMN = "column",
|
|
16
17
|
INLINE_SUBTITLE = "inline-subtitle"
|
|
17
18
|
}
|
|
19
|
+
export interface MetadataProps {
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
items: Item[];
|
|
22
|
+
itemActionMenuProps?: Omit<ItemActionMenuProps, 'item' | 'onOpenChange' | ' viewMode'>;
|
|
23
|
+
}
|
|
24
|
+
export declare enum ViewMode {
|
|
25
|
+
GRID = "grid",
|
|
26
|
+
LIST = "list"
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-view",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@box/blueprint-web": "^11.12.0",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"@box/blueprint-web": "^11.12.0",
|
|
19
19
|
"@box/blueprint-web-assets": "^4.56.6",
|
|
20
20
|
"@box/eslint-plugin-blueprint": "*",
|
|
21
|
-
"@box/item-icon": "^0.
|
|
22
|
-
"@box/metadata-filter": "^1.
|
|
21
|
+
"@box/item-icon": "^0.12.0",
|
|
22
|
+
"@box/metadata-filter": "^1.13.0",
|
|
23
23
|
"@box/storybook-utils": "0.13.10",
|
|
24
24
|
"@box/types": "0.2.0",
|
|
25
25
|
"react-intl": "^6.4.2"
|