@ithinkdt/ui 4.0.15 → 4.0.16

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.
@@ -1 +1,27 @@
1
- export * from '../dist/composables.js'
1
+ import { nextTick as e, ref as t, watch as n } from "vue";
2
+ import { unrefElement as r } from "@vueuse/core";
3
+ import { Sortable as i } from "sortablejs";
4
+ //#region src/composables/use-data-table-drag.js
5
+ function a(a, { data: o, onSort: s, ...c }) {
6
+ n([t(o), a], async ([t, n]) => {
7
+ if (t.length === 0) return;
8
+ await e();
9
+ let a = r(n)?.querySelector(".n-data-table-base-table-body .n-data-table-tbody");
10
+ if (!a) return;
11
+ let o = i.create(a, {
12
+ animation: 150,
13
+ ...c,
14
+ onSort(e) {
15
+ s({
16
+ from: e.oldIndex,
17
+ to: e.newIndex
18
+ });
19
+ }
20
+ });
21
+ return () => {
22
+ o.destroy();
23
+ };
24
+ }, { immediate: !0 });
25
+ }
26
+ //#endregion
27
+ export { a as useDataTableDrag };
package/esm/design.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { DrawerProps } from 'ithinkdt-ui'
1
2
  import { Component, FunctionalComponent, VNode, VNodeChild } from 'vue'
2
3
 
3
4
  import { MaybePromise, PublicProps } from '@ithinkdt/common'
@@ -216,6 +217,7 @@ export interface NotificationProps {
216
217
  type: 'all' | 'unread',
217
218
  page: number,
218
219
  size: number,
220
+ searchText: string | undefined,
219
221
  ) => Promise<{
220
222
  records: {
221
223
  key: string
@@ -230,6 +232,7 @@ export interface NotificationProps {
230
232
  markRead: (keys: string[]) => Promise<void>
231
233
  markDelete: (keys: string[]) => Promise<void>
232
234
  interval?: number | undefined
235
+ drawerTo?: DrawerProps['to'] | undefined
233
236
  }
234
237
 
235
238
  export declare const AppNotification: (props: PublicProps & NotificationProps) => VNode
package/esm/directives.js CHANGED
@@ -1 +1,2 @@
1
- export * from '../dist/directives.js'
1
+ import { i as e, n as t, r as n, t as r } from "./directives-g3YmS-dM.js";
2
+ export { r as SpinDirectiveProvider, n as TooltipDirectiveProvider, t as vSpin, e as vTooltip };