@axinom/mosaic-ui 0.75.0-rc.3 → 0.75.0-rc.6
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/cjs/components/ActionBar/ActionBar.d.ts +26 -0
- package/dist/cjs/components/ActionBar/ActionBar.d.ts.map +1 -0
- package/dist/cjs/components/ActionBar/ActionBar.model.d.ts +49 -0
- package/dist/cjs/components/ActionBar/ActionBar.model.d.ts.map +1 -0
- package/dist/cjs/components/ActionBar/ActionBarButton/ActionBarButton.d.ts +22 -0
- package/dist/cjs/components/ActionBar/ActionBarButton/ActionBarButton.d.ts.map +1 -0
- package/dist/cjs/components/ActionBar/helpers.d.ts +22 -0
- package/dist/cjs/components/ActionBar/helpers.d.ts.map +1 -0
- package/dist/cjs/components/ActionBar/index.d.ts +3 -0
- package/dist/cjs/components/ActionBar/index.d.ts.map +1 -0
- package/dist/cjs/components/Actions/Action/Action.d.ts.map +1 -1
- package/dist/cjs/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/cjs/components/ConfirmDialog/index.d.ts +1 -0
- package/dist/cjs/components/ConfirmDialog/index.d.ts.map +1 -1
- package/dist/cjs/components/ConfirmDialog/useConfirmableAction.d.ts +55 -0
- package/dist/cjs/components/ConfirmDialog/useConfirmableAction.d.ts.map +1 -0
- package/dist/cjs/components/Explorer/BulkEdit/useBulkEdit.d.ts.map +1 -1
- package/dist/cjs/components/Explorer/Explorer.d.ts +2 -3
- package/dist/cjs/components/Explorer/Explorer.d.ts.map +1 -1
- package/dist/cjs/components/Explorer/Explorer.model.d.ts +10 -1
- package/dist/cjs/components/Explorer/Explorer.model.d.ts.map +1 -1
- package/dist/cjs/components/Explorer/QuickEdit/useQuickEdit.d.ts +14 -3
- package/dist/cjs/components/Explorer/QuickEdit/useQuickEdit.d.ts.map +1 -1
- package/dist/cjs/components/Explorer/helpers/useActions.d.ts +17 -7
- package/dist/cjs/components/Explorer/helpers/useActions.d.ts.map +1 -1
- package/dist/cjs/components/Explorer/helpers/useSubtitle.d.ts.map +1 -1
- package/dist/cjs/components/Explorer/index.d.ts +1 -1
- package/dist/cjs/components/Explorer/index.d.ts.map +1 -1
- package/dist/cjs/components/InlineMenu/InlineMenu.d.ts.map +1 -1
- package/dist/cjs/components/List/List.d.ts +17 -3
- package/dist/cjs/components/List/List.d.ts.map +1 -1
- package/dist/cjs/components/List/List.model.d.ts +5 -1
- package/dist/cjs/components/List/List.model.d.ts.map +1 -1
- package/dist/cjs/components/List/ListHeader/ListHeader.d.ts +10 -1
- package/dist/cjs/components/List/ListHeader/ListHeader.d.ts.map +1 -1
- package/dist/cjs/components/List/ListRow/ListRow.d.ts +16 -5
- package/dist/cjs/components/List/ListRow/ListRow.d.ts.map +1 -1
- package/dist/cjs/components/List/ListRowRenderer/ListRowRenderer.d.ts.map +1 -1
- package/dist/cjs/components/List/helpers.d.ts +11 -3
- package/dist/cjs/components/List/helpers.d.ts.map +1 -1
- package/dist/cjs/components/List/useColumnsSize.d.ts +4 -2
- package/dist/cjs/components/List/useColumnsSize.d.ts.map +1 -1
- package/dist/cjs/components/PageHeader/PageHeader.d.ts +4 -1
- package/dist/cjs/components/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/cjs/components/PageHeader/PageHeader.model.d.ts +37 -1
- package/dist/cjs/components/PageHeader/PageHeader.model.d.ts.map +1 -1
- package/dist/cjs/components/PageHeader/PageHeaderAction/PageHeaderAction.d.ts +3 -0
- package/dist/cjs/components/PageHeader/PageHeaderAction/PageHeaderAction.d.ts.map +1 -1
- package/dist/cjs/components/PageHeader/PageHeaderAction/PageHeaderAction.model.d.ts +8 -0
- package/dist/cjs/components/PageHeader/PageHeaderAction/PageHeaderAction.model.d.ts.map +1 -1
- package/dist/cjs/components/PageHeader/helpers.d.ts +9 -0
- package/dist/cjs/components/PageHeader/helpers.d.ts.map +1 -0
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/hooks/index.d.ts +1 -0
- package/dist/cjs/hooks/index.d.ts.map +1 -1
- package/dist/cjs/hooks/useClickOutside/useClickOutside.d.ts +2 -2
- package/dist/cjs/hooks/useClickOutside/useClickOutside.d.ts.map +1 -1
- package/dist/cjs/hooks/useElementWidthObserver/useElementWidthObserver.d.ts.map +1 -0
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/ActionBar/ActionBar.d.ts +26 -0
- package/dist/esm/components/ActionBar/ActionBar.d.ts.map +1 -0
- package/dist/esm/components/ActionBar/ActionBar.model.d.ts +49 -0
- package/dist/esm/components/ActionBar/ActionBar.model.d.ts.map +1 -0
- package/dist/esm/components/ActionBar/ActionBarButton/ActionBarButton.d.ts +22 -0
- package/dist/esm/components/ActionBar/ActionBarButton/ActionBarButton.d.ts.map +1 -0
- package/dist/esm/components/ActionBar/helpers.d.ts +22 -0
- package/dist/esm/components/ActionBar/helpers.d.ts.map +1 -0
- package/dist/esm/components/ActionBar/index.d.ts +3 -0
- package/dist/esm/components/ActionBar/index.d.ts.map +1 -0
- package/dist/esm/components/Actions/Action/Action.d.ts.map +1 -1
- package/dist/esm/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/esm/components/ConfirmDialog/index.d.ts +1 -0
- package/dist/esm/components/ConfirmDialog/index.d.ts.map +1 -1
- package/dist/esm/components/ConfirmDialog/useConfirmableAction.d.ts +55 -0
- package/dist/esm/components/ConfirmDialog/useConfirmableAction.d.ts.map +1 -0
- package/dist/esm/components/Explorer/BulkEdit/useBulkEdit.d.ts.map +1 -1
- package/dist/esm/components/Explorer/Explorer.d.ts +2 -3
- package/dist/esm/components/Explorer/Explorer.d.ts.map +1 -1
- package/dist/esm/components/Explorer/Explorer.model.d.ts +10 -1
- package/dist/esm/components/Explorer/Explorer.model.d.ts.map +1 -1
- package/dist/esm/components/Explorer/QuickEdit/useQuickEdit.d.ts +14 -3
- package/dist/esm/components/Explorer/QuickEdit/useQuickEdit.d.ts.map +1 -1
- package/dist/esm/components/Explorer/helpers/useActions.d.ts +17 -7
- package/dist/esm/components/Explorer/helpers/useActions.d.ts.map +1 -1
- package/dist/esm/components/Explorer/helpers/useSubtitle.d.ts.map +1 -1
- package/dist/esm/components/Explorer/index.d.ts +1 -1
- package/dist/esm/components/Explorer/index.d.ts.map +1 -1
- package/dist/esm/components/InlineMenu/InlineMenu.d.ts.map +1 -1
- package/dist/esm/components/List/List.d.ts +17 -3
- package/dist/esm/components/List/List.d.ts.map +1 -1
- package/dist/esm/components/List/List.model.d.ts +5 -1
- package/dist/esm/components/List/List.model.d.ts.map +1 -1
- package/dist/esm/components/List/ListHeader/ListHeader.d.ts +10 -1
- package/dist/esm/components/List/ListHeader/ListHeader.d.ts.map +1 -1
- package/dist/esm/components/List/ListRow/ListRow.d.ts +16 -5
- package/dist/esm/components/List/ListRow/ListRow.d.ts.map +1 -1
- package/dist/esm/components/List/ListRowRenderer/ListRowRenderer.d.ts.map +1 -1
- package/dist/esm/components/List/helpers.d.ts +11 -3
- package/dist/esm/components/List/helpers.d.ts.map +1 -1
- package/dist/esm/components/List/useColumnsSize.d.ts +4 -2
- package/dist/esm/components/List/useColumnsSize.d.ts.map +1 -1
- package/dist/esm/components/PageHeader/PageHeader.d.ts +4 -1
- package/dist/esm/components/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/esm/components/PageHeader/PageHeader.model.d.ts +37 -1
- package/dist/esm/components/PageHeader/PageHeader.model.d.ts.map +1 -1
- package/dist/esm/components/PageHeader/PageHeaderAction/PageHeaderAction.d.ts +3 -0
- package/dist/esm/components/PageHeader/PageHeaderAction/PageHeaderAction.d.ts.map +1 -1
- package/dist/esm/components/PageHeader/PageHeaderAction/PageHeaderAction.model.d.ts +8 -0
- package/dist/esm/components/PageHeader/PageHeaderAction/PageHeaderAction.model.d.ts.map +1 -1
- package/dist/esm/components/PageHeader/helpers.d.ts +9 -0
- package/dist/esm/components/PageHeader/helpers.d.ts.map +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/index.d.ts.map +1 -1
- package/dist/esm/hooks/useClickOutside/useClickOutside.d.ts +2 -2
- package/dist/esm/hooks/useClickOutside/useClickOutside.d.ts.map +1 -1
- package/dist/esm/hooks/useElementWidthObserver/useElementWidthObserver.d.ts.map +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/ActionBar/ActionBar.model.ts +61 -0
- package/src/components/ActionBar/ActionBar.module.scss +64 -0
- package/src/components/ActionBar/ActionBar.spec.tsx +398 -0
- package/src/components/ActionBar/ActionBar.stories.tsx +205 -0
- package/src/components/ActionBar/ActionBar.tsx +170 -0
- package/src/components/ActionBar/ActionBarButton/ActionBarButton.module.scss +140 -0
- package/src/components/ActionBar/ActionBarButton/ActionBarButton.tsx +193 -0
- package/src/components/ActionBar/helpers.spec.ts +41 -0
- package/src/components/ActionBar/helpers.ts +54 -0
- package/src/components/ActionBar/index.ts +2 -0
- package/src/components/Actions/Action/Action.module.scss +5 -3
- package/src/components/Actions/Action/Action.spec.tsx +64 -2
- package/src/components/Actions/Action/Action.tsx +7 -1
- package/src/components/ConfirmDialog/ConfirmDialog.module.scss +7 -1
- package/src/components/ConfirmDialog/ConfirmDialog.spec.tsx +36 -15
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +9 -2
- package/src/components/ConfirmDialog/index.ts +1 -0
- package/src/components/ConfirmDialog/useConfirmableAction.tsx +159 -0
- package/src/components/EmptyStation/EmptyStation.stories.tsx +97 -0
- package/src/components/Explorer/BulkEdit/useBulkEdit.tsx +2 -0
- package/src/components/Explorer/Explorer.model.ts +15 -1
- package/src/components/Explorer/Explorer.spec.tsx +293 -8
- package/src/components/Explorer/Explorer.tsx +29 -15
- package/src/components/Explorer/NavigationExplorer/NavigationExplorer.stories.tsx +124 -1
- package/src/components/Explorer/QuickEdit/useQuickEdit.spec.tsx +94 -50
- package/src/components/Explorer/QuickEdit/useQuickEdit.tsx +101 -42
- package/src/components/Explorer/SelectionExplorer/SelectionExplorer.spec.tsx +46 -13
- package/src/components/Explorer/helpers/useActions.ts +134 -76
- package/src/components/Explorer/helpers/useDataProvider.tsx +1 -0
- package/src/components/Explorer/helpers/useSubtitle.spec.tsx +33 -23
- package/src/components/Explorer/helpers/useSubtitle.tsx +18 -26
- package/src/components/Explorer/index.ts +2 -0
- package/src/components/FormElements/Checkbox/Checkbox.module.scss +6 -4
- package/src/components/FormElements/Radio/Radio.module.scss +6 -4
- package/src/components/InlineMenu/InlineMenu.spec.tsx +262 -1
- package/src/components/InlineMenu/InlineMenu.tsx +118 -17
- package/src/components/List/List.model.ts +5 -1
- package/src/components/List/List.module.scss +25 -6
- package/src/components/List/List.spec.tsx +498 -1
- package/src/components/List/List.stories.tsx +137 -8
- package/src/components/List/List.tsx +305 -194
- package/src/components/List/ListHeader/ListHeader.module.scss +14 -0
- package/src/components/List/ListHeader/ListHeader.spec.tsx +1 -0
- package/src/components/List/ListHeader/ListHeader.tsx +25 -8
- package/src/components/List/ListRow/ListRow.module.scss +1 -1
- package/src/components/List/ListRow/ListRow.spec.tsx +109 -22
- package/src/components/List/ListRow/ListRow.tsx +52 -13
- package/src/components/List/ListRowRenderer/ListRowRenderer.tsx +28 -22
- package/src/components/List/helpers.spec.ts +29 -0
- package/src/components/List/helpers.ts +17 -9
- package/src/components/List/useColumnsSize.ts +17 -7
- package/src/components/PageHeader/PageHeader.model.ts +38 -1
- package/src/components/PageHeader/PageHeader.module.scss +39 -18
- package/src/components/PageHeader/PageHeader.spec.tsx +407 -18
- package/src/components/PageHeader/PageHeader.stories.tsx +95 -12
- package/src/components/PageHeader/PageHeader.tsx +89 -38
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.model.ts +8 -0
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.module.scss +50 -42
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.spec.tsx +203 -5
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.stories.tsx +36 -0
- package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.tsx +81 -130
- package/src/components/PageHeader/helpers.spec.ts +60 -0
- package/src/components/PageHeader/helpers.ts +36 -0
- package/src/components/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useClickOutside/useClickOutside.spec.tsx +25 -1
- package/src/hooks/useClickOutside/useClickOutside.ts +3 -3
- package/src/styles/variables.scss +41 -7
- package/dist/cjs/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroup.d.ts +0 -35
- package/dist/cjs/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroup.d.ts.map +0 -1
- package/dist/cjs/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContext.d.ts +0 -6
- package/dist/cjs/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContext.d.ts.map +0 -1
- package/dist/cjs/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContextProvider.d.ts +0 -3
- package/dist/cjs/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContextProvider.d.ts.map +0 -1
- package/dist/cjs/components/PageHeader/helpers/useElementWidthObserver.d.ts.map +0 -1
- package/dist/esm/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroup.d.ts +0 -35
- package/dist/esm/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroup.d.ts.map +0 -1
- package/dist/esm/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContext.d.ts +0 -6
- package/dist/esm/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContext.d.ts.map +0 -1
- package/dist/esm/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContextProvider.d.ts +0 -3
- package/dist/esm/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContextProvider.d.ts.map +0 -1
- package/dist/esm/components/PageHeader/helpers/useElementWidthObserver.d.ts.map +0 -1
- package/src/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroup.module.scss +0 -77
- package/src/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroup.spec.tsx +0 -122
- package/src/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroup.tsx +0 -235
- package/src/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContext.ts +0 -15
- package/src/components/PageHeader/PageHeaderActionsGroup/PageHeaderActionsGroupsContextProvider.tsx +0 -37
- /package/dist/cjs/{components/PageHeader/helpers → hooks/useElementWidthObserver}/useElementWidthObserver.d.ts +0 -0
- /package/dist/esm/{components/PageHeader/helpers → hooks/useElementWidthObserver}/useElementWidthObserver.d.ts +0 -0
- /package/src/{components/PageHeader/helpers → hooks/useElementWidthObserver}/useElementWidthObserver.tsx +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ActionBarData } from './ActionBar.model';
|
|
3
|
+
export interface ActionBarProps extends ActionBarData {
|
|
4
|
+
/** Height of the bar, not including its bottom border. (default: '44px') */
|
|
5
|
+
height?: string;
|
|
6
|
+
/** CSS Class name for additional styles */
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders a bar with a label at its start and actions that run to its end, e.g.
|
|
11
|
+
* the bulk actions that apply to the items selected in a list.
|
|
12
|
+
*
|
|
13
|
+
* Actions that do not fit the available width are moved into an overflow menu.
|
|
14
|
+
*
|
|
15
|
+
* The List renders the bar on top of its column header through its `actionBar`
|
|
16
|
+
* property, and the PageHeader renders it below itself while an actions group
|
|
17
|
+
* is open. Render it directly to place it anywhere else.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <ActionBar
|
|
21
|
+
* label={'Selected 3'}
|
|
22
|
+
* actions={[{ label: 'Delete', icon: IconName.Delete, onClick: deleteHandler }]}
|
|
23
|
+
* />
|
|
24
|
+
*/
|
|
25
|
+
export declare const ActionBar: React.FC<ActionBarProps>;
|
|
26
|
+
//# sourceMappingURL=ActionBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionBar.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionBar/ActionBar.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAIlE,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAQxE,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,4EAA4E;IAC5E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAyG9C,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Not } from '../../types';
|
|
2
|
+
import type { IconName } from '../Icons';
|
|
3
|
+
import type { ConfirmAction, DefaultHandler, LinkAction } from '../models';
|
|
4
|
+
/**
|
|
5
|
+
* An action that is rendered on the ActionBar. Actions with an `onClick`
|
|
6
|
+
* handler run it, optionally behind a confirmation, while actions with a `path`
|
|
7
|
+
* navigate to it.
|
|
8
|
+
*/
|
|
9
|
+
export type ActionBarAction = ActionBarJsAction | ActionBarNavigationAction;
|
|
10
|
+
/** An action of the ActionBar that runs a handler when clicked. */
|
|
11
|
+
export interface ActionBarJsAction extends ActionBarBaseAction, HandledAction, ConfirmAction, Not<LinkAction> {
|
|
12
|
+
/**
|
|
13
|
+
* Whether the action is toggled on, e.g. while the panel it has opened is the
|
|
14
|
+
* one on display. Set this to make the action a toggle button rather than a
|
|
15
|
+
* one-shot action. (default: undefined)
|
|
16
|
+
*/
|
|
17
|
+
toggled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** An action of the ActionBar that navigates when clicked. */
|
|
20
|
+
export interface ActionBarNavigationAction extends ActionBarBaseAction, LinkAction, Not<ConfirmAction>, Not<HandledAction>, Not<Pick<ActionBarJsAction, 'toggled'>> {
|
|
21
|
+
}
|
|
22
|
+
interface HandledAction {
|
|
23
|
+
/** Callback to emit when a user clicks on the action. */
|
|
24
|
+
onClick: DefaultHandler;
|
|
25
|
+
}
|
|
26
|
+
interface ActionBarBaseAction {
|
|
27
|
+
/** The label of the action. */
|
|
28
|
+
label: string;
|
|
29
|
+
/** Optional built in icon. This prop also accepts an img src. */
|
|
30
|
+
icon?: IconName | string;
|
|
31
|
+
/** Optional image alt attribute. */
|
|
32
|
+
imgAlt?: string;
|
|
33
|
+
/** Whether the action is disabled. If set to true, disallows interactions. (default: false) */
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** Optional tag rendered next to the label, e.g. 'BETA'. */
|
|
36
|
+
tag?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The content of an ActionBar: a label at its start and the actions that run to
|
|
40
|
+
* its end.
|
|
41
|
+
*/
|
|
42
|
+
export interface ActionBarData {
|
|
43
|
+
/** Optional text rendered at the start of the bar, e.g. 'Selected 3'. */
|
|
44
|
+
label?: string;
|
|
45
|
+
/** The actions to render. Actions that do not fit move into an overflow menu. */
|
|
46
|
+
actions: ActionBarAction[];
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=ActionBar.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionBar.model.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionBar/ActionBar.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE3E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,yBAAyB,CAAC;AAE5E,mEAAmE;AACnE,MAAM,WAAW,iBACf,SAAQ,mBAAmB,EACzB,aAAa,EACb,aAAa,EACb,GAAG,CAAC,UAAU,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,8DAA8D;AAC9D,MAAM,WAAW,yBACf,SAAQ,mBAAmB,EACzB,UAAU,EACV,GAAG,CAAC,aAAa,CAAC,EAClB,GAAG,CAAC,aAAa,CAAC,EAClB,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;CAAG;AAE9C,UAAU,aAAa;IACrB,yDAAyD;IACzD,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,UAAU,mBAAmB;IAC3B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ActionBarAction } from '../ActionBar.model';
|
|
3
|
+
export interface ActionBarButtonProps {
|
|
4
|
+
/** The action to render */
|
|
5
|
+
action: ActionBarAction;
|
|
6
|
+
/** CSS Class name for additional styles */
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Renders a single action of the ActionBar: a button running the handler of the
|
|
11
|
+
* action, or a link if the action has a `path`.
|
|
12
|
+
*
|
|
13
|
+
* Supports the same confirmation modes as the other action components: in
|
|
14
|
+
* 'Simple' mode the label is replaced by a confirmation message until the
|
|
15
|
+
* action is clicked a second time, in 'Advanced' mode a confirmation dialog is
|
|
16
|
+
* opened above the action.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <ActionBarButton action={{ label: 'Delete', icon: IconName.Delete, onClick: deleteHandler }} />
|
|
20
|
+
*/
|
|
21
|
+
export declare const ActionBarButton: React.FC<ActionBarButtonProps>;
|
|
22
|
+
//# sourceMappingURL=ActionBarButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionBarButton.d.ts","sourceRoot":"","sources":["../../../../../src/components/ActionBar/ActionBarButton/ActionBarButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAMtD,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,oBAAoB,CAAC;AAI5B,MAAM,WAAW,oBAAoB;IACnC,2BAA2B;IAC3B,MAAM,EAAE,eAAe,CAAC;IACxB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAQxD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ActionBarAction, ActionBarNavigationAction } from './ActionBar.model';
|
|
2
|
+
/**
|
|
3
|
+
* Determines how many actions of the action bar can be rendered next to each
|
|
4
|
+
* other, given the space that is available to them.
|
|
5
|
+
*
|
|
6
|
+
* Whenever not every action fits, room for the overflow menu is taken off the
|
|
7
|
+
* budget first, so that the menu holding the remaining actions is always
|
|
8
|
+
* reachable. A return value of 0 means that every action has to move into the
|
|
9
|
+
* overflow menu.
|
|
10
|
+
*
|
|
11
|
+
* @param actionWidths the width of each action, in the order they are rendered
|
|
12
|
+
* @param availableWidth the width the actions may occupy
|
|
13
|
+
* @param overflowMenuWidth the width of the overflow menu trigger
|
|
14
|
+
*/
|
|
15
|
+
export declare const getVisibleActionCount: (actionWidths: number[], availableWidth: number, overflowMenuWidth: number) => number;
|
|
16
|
+
/**
|
|
17
|
+
* Determines whether an action of the action bar navigates rather than runs a
|
|
18
|
+
* handler.
|
|
19
|
+
* @param action the action to check
|
|
20
|
+
*/
|
|
21
|
+
export declare const isActionBarNavigationAction: (action: ActionBarAction) => action is ActionBarNavigationAction;
|
|
22
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionBar/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,MAAM,EAAE,EACtB,gBAAgB,MAAM,EACtB,mBAAmB,MAAM,KACxB,MAsBF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,QAAQ,eAAe,KACtB,MAAM,IAAI,yBAA8D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../../src/components/Actions/Action/Action.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,WAAW,WAAW;IAC1B,wBAAwB;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAC/B,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,EAC/C,MAAM,EAAE,iBAAiB,KACtB,IAAI,CAAC;AAqBV;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAKtC,CAAC;
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../../src/components/Actions/Action/Action.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,WAAW,WAAW;IAC1B,wBAAwB;IACxB,MAAM,EAAE,UAAU,CAAC;IACnB,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACpC;AAED,MAAM,MAAM,kBAAkB,GAAG,CAC/B,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,cAAc,EAAE,UAAU,CAAC,EAC/C,MAAM,EAAE,iBAAiB,KACtB,IAAI,CAAC;AAqBV;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAKtC,CAAC;AAqJJ;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,GAC1B,MAAM,IAAI,oBAAoB,CAEhC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,GAC1B,MAAM,IAAI,iBAAiB,CAE7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmDialog/ConfirmDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmDialog/ConfirmDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAIhC,UAAU,yBAAyB;IACjC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CAChE;AAED,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,kDAAkD;IAClD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAC7E,kCAAkC;IAClC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3C;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqFtD,CAAC;AAGF,eAAO,MAAM,oBAAoB,GAAI,sDAIlC,yBAAyB,KAAG;IAC7B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CA8BxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtE,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmDialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACtE,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ConfirmationConfig, ConfirmationMode } from './ConfirmDialog.models';
|
|
3
|
+
interface UseConfirmableActionProps {
|
|
4
|
+
/** How the action confirms before it runs. (default: 'None') */
|
|
5
|
+
confirmationMode?: ConfirmationMode;
|
|
6
|
+
/** Optional text overrides for the confirmation. */
|
|
7
|
+
confirmationConfig?: ConfirmationConfig;
|
|
8
|
+
/** Called once the action is confirmed, or immediately when no confirmation is required. */
|
|
9
|
+
onConfirmed: () => void;
|
|
10
|
+
/** Move the 'Advanced' dialog along the trigger element. (default: 0) */
|
|
11
|
+
offsetSkidding?: number;
|
|
12
|
+
}
|
|
13
|
+
interface UseConfirmableActionResult<T extends HTMLElement> {
|
|
14
|
+
/** Whether a confirmation is currently pending. */
|
|
15
|
+
isConfirming: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the trigger should render `simpleConfirmation` in place of its
|
|
18
|
+
* label. Only ever true in 'Simple' mode.
|
|
19
|
+
*/
|
|
20
|
+
isSimpleConfirmation: boolean;
|
|
21
|
+
/** Click handler for the trigger element. */
|
|
22
|
+
onTriggerClicked: () => void;
|
|
23
|
+
/** Props that have to be spread on the trigger element. */
|
|
24
|
+
triggerProps: {
|
|
25
|
+
ref: React.LegacyRef<T>;
|
|
26
|
+
onMouseEnter: () => void;
|
|
27
|
+
onMouseLeave: () => void;
|
|
28
|
+
onMouseOver: () => void;
|
|
29
|
+
};
|
|
30
|
+
/** 'Click again to confirm' message, to be rendered instead of the label. */
|
|
31
|
+
simpleConfirmation: JSX.Element | null;
|
|
32
|
+
/** The confirmation dialog of the 'Advanced' mode, anchored to the trigger. */
|
|
33
|
+
advancedConfirmation: JSX.Element | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Covers the concern of confirming an action before it is executed, shared by
|
|
37
|
+
* the components that render actions.
|
|
38
|
+
*
|
|
39
|
+
* In 'Simple' mode the first click arms the confirmation and the trigger swaps
|
|
40
|
+
* its label for `simpleConfirmation`, the second click executes the action. In
|
|
41
|
+
* 'Advanced' mode the click opens `advancedConfirmation`, which executes the
|
|
42
|
+
* action once confirmed.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* const { onTriggerClicked, triggerProps, isSimpleConfirmation, simpleConfirmation, advancedConfirmation } =
|
|
46
|
+
* useConfirmableAction<HTMLButtonElement>({ confirmationMode, confirmationConfig, onConfirmed: onClick });
|
|
47
|
+
*
|
|
48
|
+
* <button {...triggerProps} onClick={onTriggerClicked}>
|
|
49
|
+
* {isSimpleConfirmation ? simpleConfirmation : label}
|
|
50
|
+
* </button>
|
|
51
|
+
* {advancedConfirmation}
|
|
52
|
+
*/
|
|
53
|
+
export declare const useConfirmableAction: <T extends HTMLElement>({ confirmationMode, confirmationConfig, onConfirmed, offsetSkidding, }: UseConfirmableActionProps) => UseConfirmableActionResult<T>;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=useConfirmableAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConfirmableAction.d.ts","sourceRoot":"","sources":["../../../../src/components/ConfirmDialog/useConfirmableAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,wBAAwB,CAAC;AAEhC,UAAU,yBAAyB;IACjC,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,oDAAoD;IACpD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,4FAA4F;IAC5F,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,0BAA0B,CAAC,CAAC,SAAS,WAAW;IACxD,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,oBAAoB,EAAE,OAAO,CAAC;IAC9B,6CAA6C;IAC7C,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,2DAA2D;IAC3D,YAAY,EAAE;QACZ,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACxB,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,YAAY,EAAE,MAAM,IAAI,CAAC;QACzB,WAAW,EAAE,MAAM,IAAI,CAAC;KACzB,CAAC;IACF,6EAA6E;IAC7E,kBAAkB,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACvC,+EAA+E;IAC/E,oBAAoB,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,WAAW,EAAE,wEAKzD,yBAAyB,KAAG,0BAA0B,CAAC,CAAC,CA2E1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBulkEdit.d.ts","sourceRoot":"","sources":["../../../../../src/components/Explorer/BulkEdit/useBulkEdit.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,IAAI;IAC9C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAC/C,sBAAsB,EAAE,MAAM,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,IAAI;IACnD,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC3C,QAAQ,CAAC,cAAc,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAChD,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,IAAI,EAAE,oEAIzC,gBAAgB,CAAC,CAAC,CAAC,KAAG,qBAAqB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"useBulkEdit.d.ts","sourceRoot":"","sources":["../../../../../src/components/Explorer/BulkEdit/useBulkEdit.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,IAAI;IAC9C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAC/C,sBAAsB,EAAE,MAAM,aAAa,CAAC,CAAC,CAAC,CAAC;IAC/C,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,SAAS,IAAI;IACnD,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IAC/C,QAAQ,CAAC,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC3C,QAAQ,CAAC,cAAc,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAChD,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;CACpC;AAED,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,IAAI,EAAE,oEAIzC,gBAAgB,CAAC,CAAC,CAAC,KAAG,qBAAqB,CAAC,CAAC,CAyG/C,CAAC"}
|
|
@@ -4,8 +4,7 @@ import type { Data } from '../../types/data';
|
|
|
4
4
|
import type { ActionData } from '../Actions/Actions.models';
|
|
5
5
|
import type { FilterType, FilterValues } from '../Filters/Filters.model';
|
|
6
6
|
import { type Column, ListSelectMode, type SortData } from '../List';
|
|
7
|
-
import {
|
|
8
|
-
import type { BulkEditRegistration, ExplorerBulkAction, ExplorerDataProvider, ExplorerDataProviderConnection, ExplorerStateOptions, QuickEditConfig, QuickEditRegistration } from './Explorer.model';
|
|
7
|
+
import type { BulkEditRegistration, ExplorerAction, ExplorerBulkAction, ExplorerDataProvider, ExplorerDataProviderConnection, ExplorerStateOptions, QuickEditConfig, QuickEditRegistration } from './Explorer.model';
|
|
9
8
|
export interface ExplorerProps<T extends Data> {
|
|
10
9
|
/** Title shown in page header */
|
|
11
10
|
title?: string;
|
|
@@ -45,7 +44,7 @@ export interface ExplorerProps<T extends Data> {
|
|
|
45
44
|
/** Defines when the loading of the next page is triggered. The number represents the number of row left, before a load is triggered. (default: 10) */
|
|
46
45
|
loadingTriggerOffset?: number;
|
|
47
46
|
/** Array of actions to be rendered. */
|
|
48
|
-
actions?:
|
|
47
|
+
actions?: ExplorerAction[];
|
|
49
48
|
/** Array of Bulk Actions to be rendered. If populated, Bulk Actions will become available. */
|
|
50
49
|
bulkActions?: ExplorerBulkAction<T>[];
|
|
51
50
|
/** Whether or not bulk actions are shown by default. (default: false) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Explorer.d.ts","sourceRoot":"","sources":["../../../../src/components/Explorer/Explorer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAEL,OAAO,IAAI,KAAK,EAIjB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAG7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EACL,KAAK,MAAM,EAGX,cAAc,EACd,KAAK,QAAQ,EACd,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Explorer.d.ts","sourceRoot":"","sources":["../../../../src/components/Explorer/Explorer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAEL,OAAO,IAAI,KAAK,EAIjB,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC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CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;IAEzD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAEnD,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC;CAC/C;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,QAAQ,GAAsC,CAAC,SAAS,IAAI,gHA+SvE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import type { Data } from '../../types/data';
|
|
|
3
3
|
import type { FilterValues } from '../Filters';
|
|
4
4
|
import type { IconName } from '../Icons';
|
|
5
5
|
import type { SortData } from '../List';
|
|
6
|
-
import type { PageHeaderJsActionProps } from '../PageHeader/PageHeaderAction/PageHeaderAction.model';
|
|
6
|
+
import type { PageHeaderJsActionProps, PageHeaderNavigationActionProps } from '../PageHeader/PageHeaderAction/PageHeaderAction.model';
|
|
7
7
|
import type { ErrorType } from '../models';
|
|
8
8
|
import type { BulkEditConfig } from './BulkEdit';
|
|
9
9
|
/**
|
|
@@ -36,6 +36,13 @@ export interface ExplorerBulkAction<T extends Data> extends Omit<PageHeaderJsAct
|
|
|
36
36
|
*/
|
|
37
37
|
showStartedNotification?: boolean;
|
|
38
38
|
}
|
|
39
|
+
export interface ExplorerJsAction extends PageHeaderJsActionProps {
|
|
40
|
+
/**
|
|
41
|
+
* Whether the Explorer should reload the data once the action is completed
|
|
42
|
+
*/
|
|
43
|
+
reloadData?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export type ExplorerAction = ExplorerJsAction | PageHeaderNavigationActionProps;
|
|
39
46
|
export type PageIdentifier = string | number | undefined;
|
|
40
47
|
export interface DataProviderResults<T extends Data> {
|
|
41
48
|
/** Paginated data results */
|
|
@@ -67,6 +74,8 @@ export interface ExplorerDataProviderConnection<T extends Data> {
|
|
|
67
74
|
remove: (itemId: any) => void;
|
|
68
75
|
/** Use this method to tell the Explorer that an item got added. */
|
|
69
76
|
add: (values: T) => void;
|
|
77
|
+
/** Use this method to make the Explorer reload its data. */
|
|
78
|
+
reload: () => void;
|
|
70
79
|
}
|
|
71
80
|
export interface ExplorerDataProvider<T extends Data> {
|
|
72
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Explorer.model.d.ts","sourceRoot":"","sources":["../../../../src/components/Explorer/Explorer.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Explorer.model.d.ts","sourceRoot":"","sources":["../../../../src/components/Explorer/Explorer.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EACV,uBAAuB,EACvB,+BAA+B,EAChC,MAAM,uDAAuD,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,IAAI,IACpC,oBAAoB,CAAC,CAAC,CAAC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AO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,0BAA0B;IAC1B,SAAS,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,kBAAkB,CAAC,OAAO,CAAC,CAAC,GAAG,KAAK,CAAC;CAC1E;AAED,MAAM,WAAW,eAAe;IAC9B,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,iGAAiG;IACjG,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,IAAI;IAClD,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACxB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,gEAAgE;IAChE,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { LocationDescriptor } from 'history';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { Data } from '../../../types';
|
|
4
|
+
import type { ActionBarData } from '../../ActionBar';
|
|
4
5
|
import type { ListElement } from '../../List';
|
|
5
|
-
import {
|
|
6
|
+
import type { PageHeaderJsActionProps } from '../../PageHeader/PageHeaderAction';
|
|
6
7
|
import type { QuickEditConfig, QuickEditRegistration } from '../Explorer.model';
|
|
7
8
|
export interface useQuickEditProps<T extends Data> {
|
|
8
9
|
listRef: React.RefObject<ListElement>;
|
|
@@ -12,13 +13,23 @@ export interface useQuickEditProps<T extends Data> {
|
|
|
12
13
|
quickEditConfig?: QuickEditConfig;
|
|
13
14
|
collapseFilters: () => void;
|
|
14
15
|
generateItemLink?: (data: T) => LocationDescriptor<unknown>;
|
|
16
|
+
/**
|
|
17
|
+
* Called before quick edit opens, so that the consumer can put away whatever
|
|
18
|
+
* else is on display - only one set of actions can be shown at a time.
|
|
19
|
+
*/
|
|
20
|
+
onBeforeOpen?: () => void;
|
|
15
21
|
}
|
|
16
22
|
export interface useQuickEditReturnType<T extends Data> {
|
|
17
23
|
readonly isQuickEditMode: boolean;
|
|
18
|
-
|
|
24
|
+
/** Toggle of quick edit, to be rendered on the page header. */
|
|
25
|
+
readonly quickEditToggleAction?: PageHeaderJsActionProps;
|
|
26
|
+
/** The registrations to choose from, to be rendered on the action bar of the List. */
|
|
27
|
+
readonly quickEditActionBar?: ActionBarData;
|
|
19
28
|
readonly QuickEditContextProvider: React.FC;
|
|
20
29
|
readonly quickEditStation: JSX.Element | undefined;
|
|
21
30
|
readonly changeSelectedItem: (item: T, detailsLink?: LocationDescriptor<unknown>) => Promise<void>;
|
|
31
|
+
/** Closes quick edit, saving whatever is pending. Does nothing if it is not open. */
|
|
32
|
+
readonly closeQuickEdit: () => Promise<void>;
|
|
22
33
|
}
|
|
23
|
-
export declare const useQuickEdit: <T extends Data>({ hasData, listRef, defaultItem, registrations, quickEditConfig, collapseFilters, generateItemLink, }: useQuickEditProps<T>) => useQuickEditReturnType<T>;
|
|
34
|
+
export declare const useQuickEdit: <T extends Data>({ hasData, listRef, defaultItem, registrations, quickEditConfig, collapseFilters, generateItemLink, onBeforeOpen, }: useQuickEditProps<T>) => useQuickEditReturnType<T>;
|
|
24
35
|
//# sourceMappingURL=useQuickEdit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuickEdit.d.ts","sourceRoot":"","sources":["../../../../../src/components/Explorer/QuickEdit/useQuickEdit.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,
|
|
1
|
+
{"version":3,"file":"useQuickEdit.d.ts","sourceRoot":"","sources":["../../../../../src/components/Explorer/QuickEdit/useQuickEdit.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAGhF,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,IAAI;IAC/C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACtC,aAAa,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC;IACtD,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,CAAC,CAAC;IACf,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC5D;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,IAAI;IACpD,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,qBAAqB,CAAC,EAAE,uBAAuB,CAAC;IACzD,sFAAsF;IACtF,QAAQ,CAAC,kBAAkB,CAAC,EAAE,aAAa,CAAC;IAC5C,QAAQ,CAAC,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC5C,QAAQ,CAAC,gBAAgB,EAAE,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,kBAAkB,EAAE,CAC3B,IAAI,EAAE,CAAC,EACP,WAAW,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,KACtC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,qFAAqF;IACrF,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9C;AAED,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,IAAI,EAAE,qHAS1C,iBAAiB,CAAC,CAAC,CAAC,KAAG,sBAAsB,CAAC,CAAC,CAwLjD,CAAC"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import type { Data } from '../../../types';
|
|
2
|
+
import type { ActionBarData } from '../../ActionBar';
|
|
2
3
|
import type { ItemSelectEventArgs } from '../../List';
|
|
3
4
|
import type { PageHeaderActionItemProps } from '../../PageHeader';
|
|
4
|
-
import { type
|
|
5
|
-
import type { ExplorerBulkAction, ItemSelection } from '../Explorer.model';
|
|
5
|
+
import { type PageHeaderJsActionProps } from '../../PageHeader/PageHeaderAction';
|
|
6
|
+
import type { ExplorerAction, ExplorerBulkAction, ItemSelection } from '../Explorer.model';
|
|
6
7
|
import type { ResultCounts } from './useDataProvider';
|
|
7
8
|
import type { StationMessage } from './useStationMessage';
|
|
8
9
|
interface UseActionsProps<T extends Data> {
|
|
9
|
-
actions?:
|
|
10
|
+
actions?: ExplorerAction[];
|
|
10
11
|
bulkActions?: ExplorerBulkAction<T>[];
|
|
11
|
-
quickEditAction?: PageHeaderActionItemProps;
|
|
12
12
|
bulkEditAction?: ExplorerBulkAction<T>;
|
|
13
|
-
|
|
13
|
+
/** Toggle of quick edit, rendered next to the toggle of the bulk actions */
|
|
14
|
+
quickEditToggleAction?: PageHeaderJsActionProps;
|
|
15
|
+
/** Actions of quick edit, shown on the action bar while quick edit is open */
|
|
16
|
+
quickEditActionBar?: ActionBarData;
|
|
17
|
+
/** Text the action bar shows next to the actions, e.g. the result counts */
|
|
18
|
+
actionBarLabel?: string;
|
|
19
|
+
/** Whether the bulk actions are currently on display */
|
|
20
|
+
isBulkOpen: boolean;
|
|
14
21
|
resultCount: ResultCounts;
|
|
15
|
-
activeFilterCount: number;
|
|
16
22
|
itemSelection: ItemSelectEventArgs<T>;
|
|
17
23
|
getBulkActionSelection: () => ItemSelection<T>;
|
|
18
24
|
onReloadData: () => void;
|
|
@@ -20,10 +26,14 @@ interface UseActionsProps<T extends Data> {
|
|
|
20
26
|
onBulkActionsToggled: (expanded: boolean) => void;
|
|
21
27
|
setIsBulkOpen: (value: React.SetStateAction<boolean>) => void;
|
|
22
28
|
closeBulkEdit: () => void;
|
|
29
|
+
closeQuickEdit: () => Promise<void>;
|
|
23
30
|
}
|
|
24
31
|
interface UseActionsReturnType {
|
|
32
|
+
/** Actions of the page header, which includes the toggles of the action sets */
|
|
25
33
|
readonly actions: PageHeaderActionItemProps[];
|
|
34
|
+
/** Content of the action bar of the List, for the context that is active */
|
|
35
|
+
readonly actionBar: ActionBarData;
|
|
26
36
|
}
|
|
27
|
-
export declare const useActions: <T extends Data>({ getBulkActionSelection, onReloadData, setStationMessage, actions, itemSelection, onBulkActionsToggled,
|
|
37
|
+
export declare const useActions: <T extends Data>({ getBulkActionSelection, onReloadData, setStationMessage, actions, itemSelection, onBulkActionsToggled, isBulkOpen, resultCount, setIsBulkOpen, quickEditToggleAction, quickEditActionBar, actionBarLabel, bulkActions, closeBulkEdit, closeQuickEdit, bulkEditAction, }: UseActionsProps<T>) => UseActionsReturnType;
|
|
28
38
|
export {};
|
|
29
39
|
//# sourceMappingURL=useActions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/Explorer/helpers/useActions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"useActions.d.ts","sourceRoot":"","sources":["../../../../../src/components/Explorer/helpers/useActions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEtE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,mCAAmC,CAAC;AAG3C,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,UAAU,eAAe,CAAC,CAAC,SAAS,IAAI;IACtC,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC;IACtC,cAAc,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,CAAC;IACvC,4EAA4E;IAC5E,qBAAqB,CAAC,EAAE,uBAAuB,CAAC;IAChD,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,aAAa,CAAC;IACnC,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wDAAwD;IACxD,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAA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AAC,EAAE,YAAY,GACrB;IACD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,
|
|
1
|
+
{"version":3,"file":"useSubtitle.d.ts","sourceRoot":"","sources":["../../../../../src/components/Explorer/helpers/useSubtitle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACL,KAAK,mBAAmB,EACxB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,IAAI,EACxC,IAAI,EAAE,cAAc,EACpB,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,EACrC,OAAO,CAAC,EAAE,YAAY,GACrB;IACD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CA2BA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BulkEditContext, BulkEditEnumType, BulkEditFormFieldsConfigConverter, defaultComponentMap, generateBulkEditMutation, } from './BulkEdit';
|
|
2
2
|
export type { BulkEditConfig, BulkEditContextType, BulkEditFieldConfig, BulkEditFieldConfigMap, } from './BulkEdit';
|
|
3
3
|
export { Explorer, type ExplorerProps } from './Explorer';
|
|
4
|
-
export type { ExplorerBulkAction, ExplorerDataProvider, ExplorerDataProviderConnection, ItemSelection, PageIdentifier, } from './Explorer.model';
|
|
4
|
+
export type { ExplorerAction, ExplorerBulkAction, ExplorerDataProvider, ExplorerDataProviderConnection, ExplorerJsAction, ItemSelection, PageIdentifier, } from './Explorer.model';
|
|
5
5
|
export { createInMemoryDataProvider, findAnywhereInString, findAnywhereInStringCaseInsensitive, findExact, } from './helpers/InMemoryDataProvider';
|
|
6
6
|
export { NavigationExplorer, type NavigationExplorerProps, } from './NavigationExplorer/NavigationExplorer';
|
|
7
7
|
export { QuickEditContext, type QuickEditContextType, } from './QuickEdit/QuickEditContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,iCAAiC,EACjC,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,8BAA8B,EAC9B,aAAa,EACb,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,mCAAmC,EACnC,SAAS,GACV,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,uCAAuC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Explorer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,iCAAiC,EACjC,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,8BAA8B,EAC9B,gBAAgB,EAChB,aAAa,EACb,cAAc,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,mCAAmC,EACnC,SAAS,GACV,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,gBAAgB,EAChB,KAAK,oBAAoB,GAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,uCAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/InlineMenu/InlineMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"InlineMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/InlineMenu/InlineMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,KAMN,MAAM,OAAO,CAAC;AAKf,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAGxD,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kDAAkD;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oFAAoF;IACpF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,gDAAgD;IAChD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,gDAAgD;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,eAAe,CAAC,EAAE,CAChB,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KACnD,IAAI,CAAC;CACX;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyMhD,CAAC"}
|
|
@@ -2,6 +2,7 @@ import type { LocationDescriptor } from 'history';
|
|
|
2
2
|
import React, { type ReactElement } from 'react';
|
|
3
3
|
import type { ActionData } from '..';
|
|
4
4
|
import type { Data } from '../../types/data';
|
|
5
|
+
import { type ActionBarData } from '../ActionBar';
|
|
5
6
|
import { type Column, type ItemSelectEventArgs, type ListElement, ListSelectMode, type SortData } from './List.model';
|
|
6
7
|
import type { ListRowProps } from './ListRow/ListRow';
|
|
7
8
|
export interface ListProps<T extends Data> {
|
|
@@ -18,7 +19,7 @@ export interface ListProps<T extends Data> {
|
|
|
18
19
|
isLoading?: boolean;
|
|
19
20
|
/** Defines whether there was an error with the data. If true a button will be shown that will trigger `onRetry` when hit. */
|
|
20
21
|
isError?: boolean;
|
|
21
|
-
/** Optional error message to display if an error occurs. (default: 'There was an error.) */
|
|
22
|
+
/** Optional error message to display if an error occurs. (default: 'There was an error.') */
|
|
22
23
|
errorMsg?: string;
|
|
23
24
|
/** Determines whether the component should render the error message and the 'onRetry' button. Set this to false if error handling will be done outside this component. (default: true) */
|
|
24
25
|
handleRetry?: boolean;
|
|
@@ -64,13 +65,16 @@ export interface ListProps<T extends Data> {
|
|
|
64
65
|
/**
|
|
65
66
|
* When set, this function is used to generate the link that the user should be navigated to for each item.
|
|
66
67
|
*
|
|
67
|
-
* This property takes precedence over `onItemClicked`, which
|
|
68
|
+
* This property takes precedence over `onItemClicked`, which is only executed
|
|
69
|
+
* while the link is suppressed, i.e. when the list is in a selection mode or
|
|
70
|
+
* the row is disabled.
|
|
68
71
|
*/
|
|
69
72
|
generateItemLink?: (data: T) => LocationDescriptor<unknown>;
|
|
70
73
|
/**
|
|
71
74
|
* Raised when an data item is clicked.
|
|
72
75
|
*
|
|
73
|
-
*
|
|
76
|
+
* If `generateItemLink` is set, this is only raised while the list is in a
|
|
77
|
+
* selection mode or the row is disabled.
|
|
74
78
|
*/
|
|
75
79
|
onItemClicked?: (data: T) => void | Promise<void>;
|
|
76
80
|
/** Raised when item selection has changed */
|
|
@@ -83,6 +87,16 @@ export interface ListProps<T extends Data> {
|
|
|
83
87
|
onRetry?: () => void;
|
|
84
88
|
/** CSS Class name for additional styles */
|
|
85
89
|
className?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Content of the bar that sits on top of the column header, holding the
|
|
92
|
+
* actions of whichever context is currently active.
|
|
93
|
+
*
|
|
94
|
+
* Consumers that offer several sets of actions, e.g. bulk actions and quick
|
|
95
|
+
* edit, resolve which of them is active and pass that one - only a single set
|
|
96
|
+
* can be on display at a time. The bar collapses while it has neither a label
|
|
97
|
+
* nor any actions to show.
|
|
98
|
+
*/
|
|
99
|
+
actionBar?: ActionBarData;
|
|
86
100
|
/** Provide inline actions which are available through '...' context menu */
|
|
87
101
|
inlineMenuActions?: (data: T) => ActionData[];
|
|
88
102
|
/** Function to determine if a specific row should be disabled */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,KAAK,EAAE,EAEZ,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,S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Aa,CAAC;IAC1B,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC;IAC9C,iEAAiE;IACjE,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACpD,iFAAiF;IACjF,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,GAAG,IAAI,CAAC;CACrE;AA6YD;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,GA3XK,CAAC,SAAS,IAAI;;kEA2Xc,CAAC"}
|
|
@@ -94,7 +94,11 @@ export interface ListElement {
|
|
|
94
94
|
*/
|
|
95
95
|
resetSelection: () => void;
|
|
96
96
|
/**
|
|
97
|
-
* Selects
|
|
97
|
+
* Selects the row at the given index.
|
|
98
|
+
*
|
|
99
|
+
* In multi selection, `onItemSelected` is raised as for a selection made by
|
|
100
|
+
* the user. In single selection the row is only marked as selected, without
|
|
101
|
+
* raising `onItemClicked`.
|
|
98
102
|
*/
|
|
99
103
|
selectIndex: (index: number) => void;
|
|
100
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.model.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,oBAAY,cAAc;IACxB,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,KAAK,IAAA;CACN;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,IAAI;AACvC;;;GAGG;AACH,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,iBAAiB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B;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC,SAAS,IAAI;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,CAAC,CAAC;CACT;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,IAAI;IACjD,IAAI,EAAE,cAAc,GAAG,YAAY,CAAC;IACpC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC;CACb;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChB,wBAAwB;IACxB,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAE1B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B
|
|
1
|
+
{"version":3,"file":"List.model.d.ts","sourceRoot":"","sources":["../../../../src/components/List/List.model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,oBAAY,cAAc;IACxB,IAAI,IAAA;IACJ,MAAM,IAAA;IACN,KAAK,IAAA;CACN;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,IAAI;AACvC;;;GAGG;AACH,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,iBAAiB,CAAC,CAAC,SAAS,IAAI,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IACnE,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAE1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,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C,EAAE,CAAC;CACb;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChB,wBAAwB;IACxB,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAE1B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B;;;;;;OAMG;IACH,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC"}
|
|
@@ -12,6 +12,13 @@ export interface ListHeaderProps<T extends Data> {
|
|
|
12
12
|
rowHeight: string;
|
|
13
13
|
/** Size of the checkbox */
|
|
14
14
|
actionSize: string;
|
|
15
|
+
/** Width of a single action slot of the trailing actions column */
|
|
16
|
+
actionSlotSize: string;
|
|
17
|
+
/**
|
|
18
|
+
* Distance the header keeps from the top of the list while it is stuck, to
|
|
19
|
+
* leave room for whatever sticks above it. (default: '0')
|
|
20
|
+
*/
|
|
21
|
+
stickyOffset?: string;
|
|
15
22
|
/** Horizontal alignment of text */
|
|
16
23
|
horizontalTextAlign: 'left' | 'right' | 'center';
|
|
17
24
|
/** Vertical alignment of text */
|
|
@@ -47,9 +54,11 @@ export interface ListHeaderProps<T extends Data> {
|
|
|
47
54
|
* columnSizes={'1fr'}
|
|
48
55
|
* columnGap={'5px'}
|
|
49
56
|
* rowHeight={'44px'}
|
|
57
|
+
* actionSize={'28px'}
|
|
58
|
+
* actionSlotSize={'50px'}
|
|
50
59
|
* horizontalTextAlign={'left'}
|
|
51
60
|
* verticalTextAlign={'center'}
|
|
52
61
|
* />
|
|
53
62
|
*/
|
|
54
|
-
export declare const ListHeader: <T extends Data>({ columns, columnSizes, columnGap, rowHeight, actionSize, horizontalTextAlign, verticalTextAlign, itemSelected, sortData, showItemCheckbox, isCheckboxDisabled, onCheckboxToggled, onSortChanged, className, onResetColumnSizes, onColumnSizesChanged, hasActionColumn, }: PropsWithChildren<ListHeaderProps<T>>) => JSX.Element;
|
|
63
|
+
export declare const ListHeader: <T extends Data>({ columns, columnSizes, columnGap, rowHeight, actionSize, actionSlotSize, stickyOffset, horizontalTextAlign, verticalTextAlign, itemSelected, sortData, showItemCheckbox, isCheckboxDisabled, onCheckboxToggled, onSortChanged, className, onResetColumnSizes, onColumnSizesChanged, hasActionColumn, }: PropsWithChildren<ListHeaderProps<T>>) => JSX.Element;
|
|
55
64
|
//# sourceMappingURL=ListHeader.d.ts.map
|