@r2digisolutions/ui 0.24.7 → 0.24.8
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/components/container/DataTable/DataTable.svelte +5 -1
- package/dist/components/container/DataTable/components/ContextMenu.svelte +1 -0
- package/dist/components/index.d.ts +2 -7
- package/dist/components/index.js +2 -7
- package/dist/components/ui/Dialog/context.svelte.d.ts +3 -3
- package/dist/components/ui/Dialog/context.svelte.js +3 -3
- package/dist/components/ui/Dialog/index.d.ts +8 -0
- package/dist/components/ui/Dialog/index.js +8 -0
- package/package.json +1 -1
|
@@ -144,6 +144,10 @@
|
|
|
144
144
|
return manager.state.items.filter((r) => ids.has(rowId(r)));
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
const selectedRowsItems = $derived.by(() => {
|
|
148
|
+
return selectedRows();
|
|
149
|
+
});
|
|
150
|
+
|
|
147
151
|
function colTrack(cId: string, measuring: boolean) {
|
|
148
152
|
if (measuring) return 'max-content';
|
|
149
153
|
const c = manager.getColumn(cId);
|
|
@@ -379,7 +383,7 @@
|
|
|
379
383
|
x={rightMenu.x}
|
|
380
384
|
y={rightMenu.y}
|
|
381
385
|
context={rightClickContext}
|
|
382
|
-
items={(actions?.(
|
|
386
|
+
items={(actions?.(selectedRowsItems, rightClickContext) ?? []).map((a) => ({
|
|
383
387
|
...a,
|
|
384
388
|
onClick: a.onClick
|
|
385
389
|
}))}
|
|
@@ -21,11 +21,6 @@ import Checkbox from './ui/Checkbox/Checkbox.svelte';
|
|
|
21
21
|
import Badge from './ui/Badge/Badge.svelte';
|
|
22
22
|
import NoContent from './ui/NoContent/NoContent.svelte';
|
|
23
23
|
import Tag from './ui/Tag/Tag.svelte';
|
|
24
|
-
|
|
25
|
-
import DialogHeader from './ui/Dialog/DialogHeader.svelte';
|
|
26
|
-
import DialogTitle from './ui/Dialog/DialogTitle.svelte';
|
|
27
|
-
import DialogDescription from './ui/Dialog/DialogDescription.svelte';
|
|
28
|
-
import DialogContent from './ui/Dialog/DialogContent.svelte';
|
|
29
|
-
import DialogFooter from './ui/Dialog/DialogFooter.svelte';
|
|
24
|
+
export * from './ui/Dialog/index.js';
|
|
30
25
|
import Selector from './ui/Selector/Selector.svelte';
|
|
31
|
-
export { Selector,
|
|
26
|
+
export { Selector, Tag, NoContent, Alert, Avatar, Button, Badge, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Container, Checkbox, Field, Section, Loading, TableList, Heading, Label, Input, InputRadio, Textarea, };
|
package/dist/components/index.js
CHANGED
|
@@ -21,11 +21,6 @@ import Checkbox from './ui/Checkbox/Checkbox.svelte';
|
|
|
21
21
|
import Badge from './ui/Badge/Badge.svelte';
|
|
22
22
|
import NoContent from './ui/NoContent/NoContent.svelte';
|
|
23
23
|
import Tag from './ui/Tag/Tag.svelte';
|
|
24
|
-
|
|
25
|
-
import DialogHeader from './ui/Dialog/DialogHeader.svelte';
|
|
26
|
-
import DialogTitle from './ui/Dialog/DialogTitle.svelte';
|
|
27
|
-
import DialogDescription from './ui/Dialog/DialogDescription.svelte';
|
|
28
|
-
import DialogContent from './ui/Dialog/DialogContent.svelte';
|
|
29
|
-
import DialogFooter from './ui/Dialog/DialogFooter.svelte';
|
|
24
|
+
export * from './ui/Dialog/index.js';
|
|
30
25
|
import Selector from './ui/Selector/Selector.svelte';
|
|
31
|
-
export { Selector,
|
|
26
|
+
export { Selector, Tag, NoContent, Alert, Avatar, Button, Badge, Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Container, Checkbox, Field, Section, Loading, TableList, Heading, Label, Input, InputRadio, Textarea, };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModalContext } from './ModalContext.svelte';
|
|
2
|
-
export declare const
|
|
3
|
-
export interface
|
|
2
|
+
export declare const KEY_DIALOG: unique symbol;
|
|
3
|
+
export interface IDialogActions {
|
|
4
4
|
onOpenChange?(open: boolean): void;
|
|
5
5
|
}
|
|
6
|
-
export declare function createDialogContext(fn_open: any, actions?:
|
|
6
|
+
export declare function createDialogContext(fn_open: any, actions?: IDialogActions): ModalContext;
|
|
7
7
|
export declare function useDialogContext(): ModalContext;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getContext, setContext } from 'svelte';
|
|
2
2
|
import { ModalContext } from './ModalContext.svelte';
|
|
3
|
-
export const
|
|
3
|
+
export const KEY_DIALOG = Symbol('Dialog');
|
|
4
4
|
export function createDialogContext(fn_open, actions = {}) {
|
|
5
5
|
const context = new ModalContext(fn_open());
|
|
6
|
-
setContext(
|
|
6
|
+
setContext(KEY_DIALOG, context);
|
|
7
7
|
$effect(() => {
|
|
8
8
|
context.open = fn_open();
|
|
9
9
|
actions.onOpenChange?.(context.open);
|
|
@@ -15,5 +15,5 @@ export function createDialogContext(fn_open, actions = {}) {
|
|
|
15
15
|
return context;
|
|
16
16
|
}
|
|
17
17
|
export function useDialogContext() {
|
|
18
|
-
return getContext(
|
|
18
|
+
return getContext(KEY_DIALOG);
|
|
19
19
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Dialog from './Dialog.svelte';
|
|
2
|
+
import DialogTitle from './DialogTitle.svelte';
|
|
3
|
+
import DialogDescription from './DialogDescription.svelte';
|
|
4
|
+
import DialogContent from './DialogContent.svelte';
|
|
5
|
+
import DialogHeader from './DialogHeader.svelte';
|
|
6
|
+
import DialogFooter from './DialogFooter.svelte';
|
|
7
|
+
export * from './context.svelte.js';
|
|
8
|
+
export { Dialog, DialogTitle, DialogDescription, DialogContent, DialogHeader, DialogFooter };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Dialog from './Dialog.svelte';
|
|
2
|
+
import DialogTitle from './DialogTitle.svelte';
|
|
3
|
+
import DialogDescription from './DialogDescription.svelte';
|
|
4
|
+
import DialogContent from './DialogContent.svelte';
|
|
5
|
+
import DialogHeader from './DialogHeader.svelte';
|
|
6
|
+
import DialogFooter from './DialogFooter.svelte';
|
|
7
|
+
export * from './context.svelte.js';
|
|
8
|
+
export { Dialog, DialogTitle, DialogDescription, DialogContent, DialogHeader, DialogFooter };
|