@box/metadata-view 0.23.1 → 0.24.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/form-filter-chip.js +66 -0
- package/dist/esm/lib/components/action-bar/action-bar.js +35 -33
- package/dist/esm/lib/components/error-state/error-state.js +1 -1
- package/dist/esm/lib/components/filter-row/filter-row.js +40 -62
- package/dist/esm/lib/components/filter-row/form-filter-chip.js +11 -0
- package/dist/esm/lib/components/filter-row/initial-field-values.js +16 -11
- package/dist/esm/lib/components/filter-row/messages.js +4 -0
- package/dist/esm/lib/components/filter-row/metadata-filter-chip.js +50 -0
- package/dist/esm/lib/components/filter-row/select-filter-chip.js +54 -0
- package/dist/esm/lib/components/pagination/index.js +10 -0
- package/dist/esm/lib/components/pagination/marker-based-pagination.js +20 -0
- package/dist/esm/lib/components/pagination/messages.js +22 -0
- package/dist/esm/lib/components/pagination/offset-based-pagination.js +32 -0
- package/dist/esm/lib/components/pagination/pagination-controls.js +53 -0
- package/dist/esm/lib/components/pagination/pagination.js +34 -5
- package/dist/esm/lib/components/pagination/utils.js +7 -0
- package/dist/esm/lib/metadata-view.js +58 -49
- package/dist/i18n/bn-IN.js +6 -1
- package/dist/i18n/da-DK.js +6 -1
- package/dist/i18n/de-DE.js +6 -1
- package/dist/i18n/en-AU.js +6 -1
- package/dist/i18n/en-CA.js +6 -1
- package/dist/i18n/en-GB.js +6 -1
- package/dist/i18n/en-US.js +6 -1
- package/dist/i18n/en-US.properties +10 -0
- package/dist/i18n/en-x-pseudo.js +6 -1
- package/dist/i18n/es-419.js +6 -1
- package/dist/i18n/es-ES.js +6 -1
- package/dist/i18n/fi-FI.js +6 -1
- package/dist/i18n/fr-CA.js +6 -1
- package/dist/i18n/fr-FR.js +6 -1
- package/dist/i18n/hi-IN.js +6 -1
- package/dist/i18n/it-IT.js +6 -1
- package/dist/i18n/ja-JP.js +6 -1
- package/dist/i18n/json/src/lib/components/filter-row/messages.json +1 -1
- package/dist/i18n/json/src/lib/components/pagination/messages.json +1 -0
- package/dist/i18n/ko-KR.js +6 -1
- package/dist/i18n/nb-NO.js +6 -1
- package/dist/i18n/nl-NL.js +6 -1
- package/dist/i18n/pl-PL.js +6 -1
- package/dist/i18n/pt-BR.js +6 -1
- package/dist/i18n/ru-RU.js +6 -1
- package/dist/i18n/sv-SE.js +6 -1
- package/dist/i18n/tr-TR.js +6 -1
- package/dist/i18n/zh-CN.js +6 -1
- package/dist/i18n/zh-TW.js +6 -1
- package/dist/styles/action-bar.css +1 -1
- package/dist/styles/form-filter-chip.css +1 -0
- package/dist/styles/metadata-view.css +1 -0
- package/dist/styles/pagination-controls.css +1 -0
- package/dist/types/lib/components/filter-row/form-filter-chip.d.ts +10 -0
- package/dist/types/lib/components/filter-row/messages.d.ts +5 -0
- package/dist/types/lib/components/filter-row/metadata-filter-chip.d.ts +8 -0
- package/dist/types/lib/components/filter-row/select-filter-chip.d.ts +11 -0
- package/dist/types/lib/components/filter-row/types.d.ts +1 -0
- package/dist/types/lib/components/pagination/index.d.ts +8 -0
- package/dist/types/lib/components/pagination/marker-based-pagination.d.ts +7 -0
- package/dist/types/lib/components/pagination/messages.d.ts +23 -0
- package/dist/types/lib/components/pagination/offset-based-pagination.d.ts +8 -0
- package/dist/types/lib/components/pagination/pagination-controls.d.ts +12 -0
- package/dist/types/lib/components/pagination/pagination.d.ts +8 -1
- package/dist/types/lib/components/pagination/utils.d.ts +8 -0
- package/dist/types/lib/metadata-view.d.ts +5 -3
- package/dist/types/lib/test-utils/mock-data.d.ts +55 -0
- package/package.json +3 -3
- package/dist/esm/lib/components/filter-row/string-filter-chip.js +0 -67
- package/dist/styles/string-filter-chip.css +0 -1
- package/dist/types/lib/components/filter-row/string-filter-chip.d.ts +0 -2
package/dist/i18n/sv-SE.js
CHANGED
|
@@ -5,6 +5,7 @@ export default {
|
|
|
5
5
|
"groupSharedFeatures.metadataView.actionBar.switchToListView": "Växla till listvy",
|
|
6
6
|
"groupSharedFeatures.metadataView.filterRow.AllFilters": "Alla filter",
|
|
7
7
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Tillämpa",
|
|
8
|
+
"groupSharedFeatures.metadataView.filterRow.chipNameWithCount": "{name} ({count})",
|
|
8
9
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Rensa",
|
|
9
10
|
"groupSharedFeatures.metadataView.filterRow.keywordSearchFilterPlaceholder": "Enter keywords",
|
|
10
11
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Ange värde",
|
|
@@ -19,5 +20,9 @@ export default {
|
|
|
19
20
|
"groupSharedFeatures.metadataView.itemList.refreshButton": "Uppdatera",
|
|
20
21
|
"groupSharedFeatures.metadataView.itemList.selectAll": "Välj alla",
|
|
21
22
|
"groupSharedFeatures.metadataView.metadataSearchField.searchInputAriaLabel": "Search",
|
|
22
|
-
"groupSharedFeatures.metadataView.metadataSearchField.searchInputClearAriaLabel": "Clear"
|
|
23
|
+
"groupSharedFeatures.metadataView.metadataSearchField.searchInputClearAriaLabel": "Clear",
|
|
24
|
+
"groupSharedFeatures.metadataView.pagination.nextPageButton": "Next",
|
|
25
|
+
"groupSharedFeatures.metadataView.pagination.pageEntryStatus": "Showing {startEntryIndex} to {endEntryIndex} of {totalCount} entries",
|
|
26
|
+
"groupSharedFeatures.metadataView.pagination.paginationLabel": "Pagination navigation controls and current page information",
|
|
27
|
+
"groupSharedFeatures.metadataView.pagination.previousPageButton": "Previous"
|
|
23
28
|
}
|
package/dist/i18n/tr-TR.js
CHANGED
|
@@ -5,6 +5,7 @@ export default {
|
|
|
5
5
|
"groupSharedFeatures.metadataView.actionBar.switchToListView": "Liste Görünümüne Geç",
|
|
6
6
|
"groupSharedFeatures.metadataView.filterRow.AllFilters": "Tüm Filtreler",
|
|
7
7
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "Uygula",
|
|
8
|
+
"groupSharedFeatures.metadataView.filterRow.chipNameWithCount": "{name} ({count})",
|
|
8
9
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "Temizle",
|
|
9
10
|
"groupSharedFeatures.metadataView.filterRow.keywordSearchFilterPlaceholder": "Enter keywords",
|
|
10
11
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "Değer Ayarla",
|
|
@@ -19,5 +20,9 @@ export default {
|
|
|
19
20
|
"groupSharedFeatures.metadataView.itemList.refreshButton": "Yenile",
|
|
20
21
|
"groupSharedFeatures.metadataView.itemList.selectAll": "Tümünü Seç",
|
|
21
22
|
"groupSharedFeatures.metadataView.metadataSearchField.searchInputAriaLabel": "Search",
|
|
22
|
-
"groupSharedFeatures.metadataView.metadataSearchField.searchInputClearAriaLabel": "Clear"
|
|
23
|
+
"groupSharedFeatures.metadataView.metadataSearchField.searchInputClearAriaLabel": "Clear",
|
|
24
|
+
"groupSharedFeatures.metadataView.pagination.nextPageButton": "Next",
|
|
25
|
+
"groupSharedFeatures.metadataView.pagination.pageEntryStatus": "Showing {startEntryIndex} to {endEntryIndex} of {totalCount} entries",
|
|
26
|
+
"groupSharedFeatures.metadataView.pagination.paginationLabel": "Pagination navigation controls and current page information",
|
|
27
|
+
"groupSharedFeatures.metadataView.pagination.previousPageButton": "Previous"
|
|
23
28
|
}
|
package/dist/i18n/zh-CN.js
CHANGED
|
@@ -5,6 +5,7 @@ export default {
|
|
|
5
5
|
"groupSharedFeatures.metadataView.actionBar.switchToListView": "切换为列表视图",
|
|
6
6
|
"groupSharedFeatures.metadataView.filterRow.AllFilters": "所有筛选条件",
|
|
7
7
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "应用程序",
|
|
8
|
+
"groupSharedFeatures.metadataView.filterRow.chipNameWithCount": "{name} ({count})",
|
|
8
9
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "清除",
|
|
9
10
|
"groupSharedFeatures.metadataView.filterRow.keywordSearchFilterPlaceholder": "Enter keywords",
|
|
10
11
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "设置值",
|
|
@@ -19,5 +20,9 @@ export default {
|
|
|
19
20
|
"groupSharedFeatures.metadataView.itemList.refreshButton": "刷新",
|
|
20
21
|
"groupSharedFeatures.metadataView.itemList.selectAll": "选择全部",
|
|
21
22
|
"groupSharedFeatures.metadataView.metadataSearchField.searchInputAriaLabel": "Search",
|
|
22
|
-
"groupSharedFeatures.metadataView.metadataSearchField.searchInputClearAriaLabel": "Clear"
|
|
23
|
+
"groupSharedFeatures.metadataView.metadataSearchField.searchInputClearAriaLabel": "Clear",
|
|
24
|
+
"groupSharedFeatures.metadataView.pagination.nextPageButton": "Next",
|
|
25
|
+
"groupSharedFeatures.metadataView.pagination.pageEntryStatus": "Showing {startEntryIndex} to {endEntryIndex} of {totalCount} entries",
|
|
26
|
+
"groupSharedFeatures.metadataView.pagination.paginationLabel": "Pagination navigation controls and current page information",
|
|
27
|
+
"groupSharedFeatures.metadataView.pagination.previousPageButton": "Previous"
|
|
23
28
|
}
|
package/dist/i18n/zh-TW.js
CHANGED
|
@@ -5,6 +5,7 @@ export default {
|
|
|
5
5
|
"groupSharedFeatures.metadataView.actionBar.switchToListView": "切換至清單檢視",
|
|
6
6
|
"groupSharedFeatures.metadataView.filterRow.AllFilters": "全部篩選條件",
|
|
7
7
|
"groupSharedFeatures.metadataView.filterRow.applyButton": "套用",
|
|
8
|
+
"groupSharedFeatures.metadataView.filterRow.chipNameWithCount": "{name} ({count})",
|
|
8
9
|
"groupSharedFeatures.metadataView.filterRow.clearButton": "清除",
|
|
9
10
|
"groupSharedFeatures.metadataView.filterRow.keywordSearchFilterPlaceholder": "Enter keywords",
|
|
10
11
|
"groupSharedFeatures.metadataView.filterRow.textInputPlaceholder": "設定值",
|
|
@@ -19,5 +20,9 @@ export default {
|
|
|
19
20
|
"groupSharedFeatures.metadataView.itemList.refreshButton": "重新整理",
|
|
20
21
|
"groupSharedFeatures.metadataView.itemList.selectAll": "全選",
|
|
21
22
|
"groupSharedFeatures.metadataView.metadataSearchField.searchInputAriaLabel": "Search",
|
|
22
|
-
"groupSharedFeatures.metadataView.metadataSearchField.searchInputClearAriaLabel": "Clear"
|
|
23
|
+
"groupSharedFeatures.metadataView.metadataSearchField.searchInputClearAriaLabel": "Clear",
|
|
24
|
+
"groupSharedFeatures.metadataView.pagination.nextPageButton": "Next",
|
|
25
|
+
"groupSharedFeatures.metadataView.pagination.pageEntryStatus": "Showing {startEntryIndex} to {endEntryIndex} of {totalCount} entries",
|
|
26
|
+
"groupSharedFeatures.metadataView.pagination.paginationLabel": "Pagination navigation controls and current page information",
|
|
27
|
+
"groupSharedFeatures.metadataView.pagination.previousPageButton": "Previous"
|
|
23
28
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._actionBar_1jgp4_1{display:flex;justify-content:space-between;padding:var(--space-4) 0}@media (max-width: 390px){._filterRow_1jgp4_8{display:none}}._additionalActions_1jgp4_13{display:flex;height:var(--size-8)}@media (max-width: 390px){._additionalActions_1jgp4_13{flex-grow:1;justify-content:space-between}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._popoverFooter_6tqyh_1{display:flex;flex-direction:row;gap:var(--space-2);align-items:center;justify-content:flex-end}._filterChipGroup_6tqyh_9{display:flex;flex-wrap:wrap}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._contentContainer_19ns1_8{overflow:auto}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._pagination_1ozaq_1{display:flex;align-items:center;justify-content:space-between;min-height:var(--size-12);margin-bottom:var(--space-3)}._paginationButtonContainer_1ozaq_9{display:flex;gap:var(--space-2)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface FormFilterChipProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
formRef: React.RefObject<HTMLFormElement>;
|
|
4
|
+
icon?: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGSVGElement>, 'ref'> & React.RefAttributes<SVGSVGElement>>;
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormFilterChip: ({ children, formRef, icon, id, name, selected }: FormFilterChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default FormFilterChip;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FilterOption } from './types';
|
|
2
|
+
export interface MetadataFilterChipProps {
|
|
3
|
+
filterOption: FilterOption;
|
|
4
|
+
formRef: React.RefObject<HTMLFormElement>;
|
|
5
|
+
selected: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const MetadataFilterChip: ({ filterOption, formRef, selected }: MetadataFilterChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default MetadataFilterChip;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MetadataFieldType } from '@box/metadata-view';
|
|
2
|
+
export interface SelectFilterChipProps {
|
|
3
|
+
fieldNamePrefix: string;
|
|
4
|
+
formRef: React.RefObject<HTMLFormElement>;
|
|
5
|
+
icon?: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGSVGElement>, 'ref'> & React.RefAttributes<SVGSVGElement>>;
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
options?: string[];
|
|
9
|
+
type: MetadataFieldType;
|
|
10
|
+
}
|
|
11
|
+
export declare const SelectFilterChip: ({ fieldNamePrefix, formRef, icon, id, name, options, type, }: SelectFilterChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,7 @@ export interface FilterOption {
|
|
|
10
10
|
icon?: React.ForwardRefExoticComponent<Omit<React.SVGProps<SVGSVGElement>, 'ref'> & React.RefAttributes<SVGSVGElement>>;
|
|
11
11
|
id: string;
|
|
12
12
|
name?: string;
|
|
13
|
+
options?: string[];
|
|
13
14
|
placeholder?: string;
|
|
14
15
|
selected: boolean;
|
|
15
16
|
shouldRenderChip?: boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Pagination } from './pagination';
|
|
2
|
+
export type { PaginationProps } from './pagination';
|
|
3
|
+
export { default as PaginationControls } from './pagination-controls';
|
|
4
|
+
export type { PaginationControlsProps } from './pagination-controls';
|
|
5
|
+
export { default as OffsetBasedPagination } from './offset-based-pagination';
|
|
6
|
+
export type { OffsetBasedPaginationProps } from './offset-based-pagination';
|
|
7
|
+
export { default as MarkerBasedPagination } from './marker-based-pagination';
|
|
8
|
+
export type { MarkerBasedPaginationProps } from './marker-based-pagination';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface MarkerBasedPaginationProps {
|
|
2
|
+
hasNextMarker?: boolean;
|
|
3
|
+
hasPrevMarker?: boolean;
|
|
4
|
+
onMarkerBasedPageChange: (pageDirection: number) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const MarkerBasedPagination: ({ hasNextMarker, hasPrevMarker, onMarkerBasedPageChange, }: MarkerBasedPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default MarkerBasedPagination;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
nextPageButton: {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
pageEntryStatus: {
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
description: string;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
paginationAriaLabel: {
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
previousPageButton: {
|
|
18
|
+
defaultMessage: string;
|
|
19
|
+
description: string;
|
|
20
|
+
id: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default messages;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface OffsetBasedPaginationProps {
|
|
2
|
+
offset: number;
|
|
3
|
+
onOffsetChange?: (offset: number) => void;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
totalCount: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const OffsetBasedPagination: ({ offset, onOffsetChange, pageSize, totalCount }: OffsetBasedPaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default OffsetBasedPagination;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PaginationControlsProps {
|
|
2
|
+
handleNextClick: () => void;
|
|
3
|
+
handlePreviousClick: () => void;
|
|
4
|
+
hasNextPage: boolean;
|
|
5
|
+
hasPageEntryStatus?: boolean;
|
|
6
|
+
hasPreviousPage: boolean;
|
|
7
|
+
offset?: number;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
totalCount?: number;
|
|
10
|
+
}
|
|
11
|
+
declare const PaginationControls: ({ handleNextClick, handlePreviousClick, hasNextPage, hasPageEntryStatus, hasPreviousPage, offset, pageSize, totalCount, }: PaginationControlsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default PaginationControls;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { MarkerBasedPaginationProps } from './marker-based-pagination';
|
|
2
|
+
import { OffsetBasedPaginationProps } from './offset-based-pagination';
|
|
3
|
+
export type PaginationProps = ({
|
|
4
|
+
type: 'marker';
|
|
5
|
+
} & MarkerBasedPaginationProps) | ({
|
|
6
|
+
type: 'offset';
|
|
7
|
+
} & OffsetBasedPaginationProps);
|
|
8
|
+
declare const Pagination: ({ type, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
9
|
export default Pagination;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the offset for the given page number, page size, and total count
|
|
3
|
+
* @param newPageNumber - The page number to get the offset for
|
|
4
|
+
* @param pageSize - The size of the page
|
|
5
|
+
* @param totalCount - The total number of items
|
|
6
|
+
* @returns The offset for the given page number
|
|
7
|
+
*/
|
|
8
|
+
export declare const getOffsetForPage: (newPageNumber: number, pageSize: number, totalCount: number) => number;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { MetadataTableProps } from './components/metadata-table';
|
|
2
|
+
import { PaginationProps } from './components/pagination/pagination';
|
|
2
3
|
import { ActionBarProps } from './components/action-bar';
|
|
3
4
|
import { ViewMode, Column, MetadataProps } from './types';
|
|
4
5
|
export interface MetadataViewProps extends MetadataProps {
|
|
5
6
|
columns: Column[];
|
|
6
|
-
actionBarProps
|
|
7
|
+
actionBarProps?: Omit<ActionBarProps, 'onViewModeClick' | 'viewMode' | 'sortableColumnNames'>;
|
|
7
8
|
hasError?: boolean;
|
|
8
9
|
initialViewMode?: ViewMode;
|
|
9
10
|
onRefresh?: () => void;
|
|
10
|
-
tableProps: Omit<MetadataTableProps, 'items' | 'itemActionMenuProps'>;
|
|
11
|
+
tableProps: Omit<MetadataTableProps, 'columns' | 'items' | 'itemActionMenuProps'>;
|
|
12
|
+
paginationProps?: PaginationProps;
|
|
11
13
|
}
|
|
12
|
-
export declare function MetadataView({ actionBarProps, columns, tableProps, hasError, onRefresh, initialViewMode, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function MetadataView({ actionBarProps, columns, tableProps, hasError, onRefresh, initialViewMode, paginationProps, ...rest }: MetadataViewProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export default MetadataView;
|
|
@@ -5,6 +5,7 @@ import { SortDropdownProps } from '../components/action-bar/sort-dropdown';
|
|
|
5
5
|
import { FilterRowProps } from '../components/filter-row/filter-row';
|
|
6
6
|
import { FilterGroup, FilterOption } from '../components/filter-row/types';
|
|
7
7
|
import { MetadataTableProps } from '../components/metadata-table';
|
|
8
|
+
import { PaginationProps } from '../components/pagination/pagination';
|
|
8
9
|
import { MetadataViewProps } from '../metadata-view';
|
|
9
10
|
import { Column } from '../types';
|
|
10
11
|
export declare const getMockFilterGroups: (filters: FilterOption[]) => {
|
|
@@ -29,6 +30,60 @@ export declare const mockFilterGroups: {
|
|
|
29
30
|
togglable: boolean;
|
|
30
31
|
filters: FilterOption[];
|
|
31
32
|
}[];
|
|
33
|
+
export declare const mockTypedPaginationPropsMarker: PaginationProps;
|
|
34
|
+
export declare const mockTypedPaginationPropsOffset: PaginationProps;
|
|
35
|
+
export declare const mockPaginationPropsOffsetWithNoAdditionalPages: {
|
|
36
|
+
offset: number;
|
|
37
|
+
onOffsetChange: (...args: any[]) => void;
|
|
38
|
+
pageSize: number;
|
|
39
|
+
totalCount: number;
|
|
40
|
+
type: "offset";
|
|
41
|
+
};
|
|
42
|
+
export declare const mockPaginationPropsOffsetWithPageAtZero: {
|
|
43
|
+
totalCount: number;
|
|
44
|
+
offset: number;
|
|
45
|
+
onOffsetChange: (...args: any[]) => void;
|
|
46
|
+
pageSize: number;
|
|
47
|
+
type: "offset";
|
|
48
|
+
};
|
|
49
|
+
export declare const mockPaginationPropsOffsetWithPageInMiddleOfData: {
|
|
50
|
+
offset: number;
|
|
51
|
+
totalCount: number;
|
|
52
|
+
onOffsetChange: (...args: any[]) => void;
|
|
53
|
+
pageSize: number;
|
|
54
|
+
type: "offset";
|
|
55
|
+
};
|
|
56
|
+
export declare const mockPaginationPropsOffsetWithPageAtEndOfData: {
|
|
57
|
+
offset: number;
|
|
58
|
+
totalCount: number;
|
|
59
|
+
onOffsetChange: (...args: any[]) => void;
|
|
60
|
+
pageSize: number;
|
|
61
|
+
type: "offset";
|
|
62
|
+
};
|
|
63
|
+
export declare const mockPaginationPropsMarkerWithNoMarkers: {
|
|
64
|
+
hasNextMarker: boolean;
|
|
65
|
+
hasPrevMarker: boolean;
|
|
66
|
+
type: "marker";
|
|
67
|
+
onMarkerBasedPageChange: (pageDirection: number) => void;
|
|
68
|
+
};
|
|
69
|
+
export declare const mockPaginationPropsMarkerWithNextMarker: {
|
|
70
|
+
hasNextMarker: boolean;
|
|
71
|
+
hasPrevMarker: boolean;
|
|
72
|
+
type: "marker";
|
|
73
|
+
onMarkerBasedPageChange: (pageDirection: number) => void;
|
|
74
|
+
};
|
|
75
|
+
export declare const mockPaginationPropsMarkerWithPrevMarker: {
|
|
76
|
+
hasPrevMarker: boolean;
|
|
77
|
+
hasNextMarker: boolean;
|
|
78
|
+
type: "marker";
|
|
79
|
+
onMarkerBasedPageChange: (pageDirection: number) => void;
|
|
80
|
+
};
|
|
81
|
+
export declare const mockPaginationPropsMarkerWithNextAndPrevMarkers: {
|
|
82
|
+
hasNextMarker: boolean;
|
|
83
|
+
hasPrevMarker: boolean;
|
|
84
|
+
type: "marker";
|
|
85
|
+
onMarkerBasedPageChange: (pageDirection: number) => void;
|
|
86
|
+
};
|
|
32
87
|
export declare const mockFilterRowArgs: FilterRowProps;
|
|
33
88
|
export declare const mockActionBarProps: ActionBarProps;
|
|
34
89
|
export declare const mockTableProps: MetadataTableProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-view",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@box/blueprint-web": "^11.12.0",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"@box/blueprint-web": "^11.12.0",
|
|
20
20
|
"@box/blueprint-web-assets": "^4.57.0",
|
|
21
21
|
"@box/eslint-plugin-blueprint": "*",
|
|
22
|
-
"@box/item-icon": "^0.13.
|
|
23
|
-
"@box/metadata-filter": "^1.
|
|
22
|
+
"@box/item-icon": "^0.13.5",
|
|
23
|
+
"@box/metadata-filter": "^1.15.0",
|
|
24
24
|
"@box/storybook-utils": "0.13.11",
|
|
25
25
|
"@box/types": "0.2.0",
|
|
26
26
|
"react-intl": "^6.4.2"
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { Popover as o, FilterChip as t, Button as m } from "@box/blueprint-web";
|
|
2
|
-
import { MetadataStringField as v } from "@box/metadata-filter";
|
|
3
|
-
import { useState as g } from "react";
|
|
4
|
-
import { useIntl as F } from "react-intl";
|
|
5
|
-
import { useFormikContext as C } from "formik";
|
|
6
|
-
import c from "./messages.js";
|
|
7
|
-
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
8
|
-
import '../../../../styles/string-filter-chip.css';const b = "_popoverFooter_1tgko_1", k = {
|
|
9
|
-
popoverFooter: b
|
|
10
|
-
}, P = ({
|
|
11
|
-
formRef: d,
|
|
12
|
-
id: r,
|
|
13
|
-
name: i,
|
|
14
|
-
selected: f,
|
|
15
|
-
icon: a
|
|
16
|
-
}) => {
|
|
17
|
-
const {
|
|
18
|
-
formatMessage: l
|
|
19
|
-
} = F(), [h, s] = g(!1), p = C(), u = () => {
|
|
20
|
-
p.handleSubmit(), s(!1);
|
|
21
|
-
};
|
|
22
|
-
return /* @__PURE__ */ e("div", {
|
|
23
|
-
children: /* @__PURE__ */ n(o.Root, {
|
|
24
|
-
onOpenChange: s,
|
|
25
|
-
open: h,
|
|
26
|
-
children: [/* @__PURE__ */ e(o.Trigger, {
|
|
27
|
-
children: /* @__PURE__ */ n(t.TriggerChip, {
|
|
28
|
-
selected: f,
|
|
29
|
-
value: r,
|
|
30
|
-
children: [a && /* @__PURE__ */ e(t.Icon, {
|
|
31
|
-
icon: a
|
|
32
|
-
}), /* @__PURE__ */ e(t.Label, {
|
|
33
|
-
children: i
|
|
34
|
-
}), /* @__PURE__ */ e(t.DropdownIndicator, {})]
|
|
35
|
-
}, r)
|
|
36
|
-
}), /* @__PURE__ */ n(o.ContentContainer, {
|
|
37
|
-
align: "start",
|
|
38
|
-
container: d.current,
|
|
39
|
-
children: [/* @__PURE__ */ e(o.MainContent, {
|
|
40
|
-
children: /* @__PURE__ */ e(v, {
|
|
41
|
-
fieldNamePrefix: `metadata.fields.${r}`,
|
|
42
|
-
label: i
|
|
43
|
-
})
|
|
44
|
-
}), /* @__PURE__ */ n(o.Footer, {
|
|
45
|
-
className: k.popoverFooter,
|
|
46
|
-
children: [/* @__PURE__ */ e(m, {
|
|
47
|
-
onClick: () => {
|
|
48
|
-
p.setFieldValue(`metadata.fields.${r}.value.enum`, []);
|
|
49
|
-
},
|
|
50
|
-
size: "small",
|
|
51
|
-
variant: "secondary",
|
|
52
|
-
children: l(c.clearButton)
|
|
53
|
-
}), /* @__PURE__ */ e(m, {
|
|
54
|
-
onClick: u,
|
|
55
|
-
size: "small",
|
|
56
|
-
type: "submit",
|
|
57
|
-
variant: "primary",
|
|
58
|
-
children: l(c.applyButton)
|
|
59
|
-
})]
|
|
60
|
-
})]
|
|
61
|
-
})]
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
export {
|
|
66
|
-
P as StringFilterChip
|
|
67
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._popoverFooter_1tgko_1{display:flex;flex-direction:row;gap:var(--space-2);align-items:center;justify-content:flex-end}
|