morghulis 3.0.26 → 3.1.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.
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ entity?: string;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { MetaView } from "../../../hooks/use-mata/types";
2
+ type __VLS_Props = {
3
+ view: MetaView;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { MetaView } from "../../../hooks/use-mata/types";
2
+ type __VLS_Props = {
3
+ view: MetaView;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { MetaView } from "../../../hooks/use-mata/types";
2
+ type __VLS_Props = {
3
+ view: MetaView;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { MetaView } from "../../../hooks/use-mata/types";
2
+ type __VLS_Props = {
3
+ view: MetaView;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ confirm: (...args: any[]) => void;
7
+ cancel: (...args: any[]) => void;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onConfirm?: ((...args: any[]) => any) | undefined;
10
+ onCancel?: ((...args: any[]) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -3,7 +3,9 @@ declare var __VLS_10: {};
3
3
  type __VLS_Slots = {} & {
4
4
  header?: (props: typeof __VLS_10) => any;
5
5
  };
6
- declare const __VLS_component: import("vue").DefineComponent<DTableProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DTableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const __VLS_component: import("vue").DefineComponent<DTableProps, {
7
+ load: () => void;
8
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DTableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
9
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
8
10
  export default _default;
9
11
  type __VLS_WithSlots<T, S> = T & {
@@ -6,7 +6,7 @@ declare var __VLS_1: {}, __VLS_3: {}, __VLS_38: {
6
6
  field: import("../../../hooks/use-mata/types").MetaField;
7
7
  row: any;
8
8
  prop: string | number;
9
- }, __VLS_48: {}, __VLS_50: {}, __VLS_55: {
9
+ }, __VLS_52: {}, __VLS_54: {}, __VLS_59: {
10
10
  type: import("./types").MTablePopperType;
11
11
  data: any;
12
12
  };
@@ -19,11 +19,11 @@ type __VLS_Slots = {} & {
19
19
  } & {
20
20
  cell?: (props: typeof __VLS_40) => any;
21
21
  } & {
22
- footer?: (props: typeof __VLS_48) => any;
22
+ footer?: (props: typeof __VLS_52) => any;
23
23
  } & {
24
- 'footer-tool'?: (props: typeof __VLS_50) => any;
24
+ 'footer-tool'?: (props: typeof __VLS_54) => any;
25
25
  } & {
26
- pop?: (props: typeof __VLS_55) => any;
26
+ pop?: (props: typeof __VLS_59) => any;
27
27
  };
28
28
  declare const __VLS_component: import("vue").DefineComponent<MTableProps, {
29
29
  getSelection: typeof getSelection;
@@ -2,5 +2,9 @@ import { MTableButton } from "../types";
2
2
  type __VLS_Props = {
3
3
  buttons?: MTableButton[];
4
4
  };
5
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ click: (...args: any[]) => void;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onClick?: ((...args: any[]) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
10
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { Component } from "vue";
1
+ import type { Component, Ref } from "vue";
2
2
  import { type CSSProperties, type VNode } from "vue";
3
3
  import { type ElTooltipProps, type Sort, type TreeNode } from "element-plus";
4
4
  import { MetaView } from "../../../hooks/use-mata/types";
@@ -155,6 +155,7 @@ export type MTableButton = {
155
155
  color?: string | Function;
156
156
  tag?: string | Function;
157
157
  icon?: string | Function;
158
+ dialog?: Ref;
158
159
  };
159
160
  export type MTableColumn = {
160
161
  label: string;
@@ -2,6 +2,34 @@ import { type Ref } from "vue";
2
2
  import { type Meta, MetaView } from "../use-mata/types";
3
3
  import { MorghulisChannelConfig } from "../use-channel/types";
4
4
  import { DataItem, IQuery, Query } from "../use-query/types";
5
+ export declare function useDao(meta: Meta, auth?: boolean): {
6
+ meta: Ref<{
7
+ db: import("../use-mata/types").MetaDatabase;
8
+ entity: string;
9
+ code?: string | undefined;
10
+ }, Meta | {
11
+ db: import("../use-mata/types").MetaDatabase;
12
+ entity: string;
13
+ code?: string | undefined;
14
+ }>;
15
+ loading: import("vue").ComputedRef<boolean>;
16
+ payload: Ref<any, any>;
17
+ find_many: (query: Query | IQuery) => Promise<{
18
+ results: DataItem[];
19
+ total?: number;
20
+ }>;
21
+ save_one: (item: DataItem) => Promise<{
22
+ item: DataItem;
23
+ }>;
24
+ delete_one: (id: string | number) => Promise<boolean>;
25
+ find_one: (id: string | number) => Promise<{
26
+ item: DataItem;
27
+ }>;
28
+ delete_many: (query: Query | IQuery) => Promise<boolean>;
29
+ update_many: (query: Query | IQuery, template: DataItem) => Promise<boolean>;
30
+ load_view: () => Promise<MetaView>;
31
+ save_many: (array: DataItem[]) => void;
32
+ };
5
33
  /**
6
34
  * http和socket的loading冲突问题
7
35
  */
@@ -5,6 +5,7 @@ export type Meta = {
5
5
  code?: string;
6
6
  };
7
7
  export type MetaView = {
8
+ id?: number;
8
9
  fields?: {
9
10
  [key: string]: MetaField;
10
11
  };
@@ -32,6 +32,7 @@ export declare function useDTable(table: Ref, props: DTableProps): {
32
32
  }>;
33
33
  payload: Ref<any, any>;
34
34
  view: Ref<{
35
+ id?: number | undefined;
35
36
  fields?: {
36
37
  [key: string]: import("../../use-mata/types").MetaField;
37
38
  } | undefined;
@@ -55,6 +56,7 @@ export declare function useDTable(table: Ref, props: DTableProps): {
55
56
  allow_download?: boolean | undefined;
56
57
  allow_upload?: boolean | undefined;
57
58
  }, MetaView | {
59
+ id?: number | undefined;
58
60
  fields?: {
59
61
  [key: string]: import("../../use-mata/types").MetaField;
60
62
  } | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "3.0.26",
3
+ "version": "3.1.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"