morghulis 3.1.1 → 3.1.2

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.
Files changed (77) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/morghulis.es.js +30058 -7372
  3. package/dist/morghulis.es.js.map +1 -1
  4. package/dist/morghulis.umd.js +64 -26
  5. package/dist/morghulis.umd.js.map +1 -1
  6. package/dist/types/components/dialog/DDialog.vue.d.ts +17 -0
  7. package/dist/types/components/dialog/MButtonDialog.vue.d.ts +2 -0
  8. package/dist/types/components/{table/data/widgets → form}/DForm.vue.d.ts +3 -3
  9. package/dist/types/components/form/MForm.vue.d.ts +1 -0
  10. package/dist/types/components/{table/simple/buttons/MTableButtons.vue.d.ts → meta/edit/EditMetaField.vue.d.ts} +4 -8
  11. package/dist/types/components/meta/field/AddField.vue.d.ts +10 -0
  12. package/dist/types/components/meta/field/MetaFieldFormat.vue.d.ts +6 -0
  13. package/dist/types/components/meta/field/MetaFieldRefer.vue.d.ts +6 -0
  14. package/dist/types/components/meta/field/formats/CharFormats.vue.d.ts +2 -0
  15. package/dist/types/components/meta/field/formats/FileFormats.vue.d.ts +2 -0
  16. package/dist/types/components/meta/field/formats/NumberFormats.vue.d.ts +2 -0
  17. package/dist/types/components/meta/widgets/MetaSelect.vue.d.ts +10 -0
  18. package/dist/types/components/table/aoa/ATable.vue.d.ts +10 -0
  19. package/dist/types/components/table/data/DTable.vue.d.ts +6 -3
  20. package/dist/types/{hooks/use-table/data/index.d.ts → components/table/data/hook.d.ts} +40 -33
  21. package/dist/types/components/table/data/slots/DTableEmpty.vue.d.ts +2 -0
  22. package/dist/types/components/table/data/slots/DTableFooter.vue.d.ts +13 -0
  23. package/dist/types/components/table/data/slots/DTableFooterTool.vue.d.ts +10 -0
  24. package/dist/types/components/table/data/{widgets → slots}/DTableHeader.vue.d.ts +2 -2
  25. package/dist/types/components/table/data/slots/DTableHeaderCell.vue.d.ts +2 -0
  26. package/dist/types/components/table/data/{widgets/DTableController.vue.d.ts → slots/DTableHeaderTool.vue.d.ts} +6 -5
  27. package/dist/types/components/table/data/{widgets/DPopoverWrapper.vue.d.ts → slots/DTablePop.vue.d.ts} +4 -4
  28. package/dist/types/components/table/data/types.d.ts +7 -12
  29. package/dist/types/components/table/simple/MTable.vue.d.ts +20 -32
  30. package/dist/types/components/table/simple/buttons/MTableButtonWrapper.vue.d.ts +1 -1
  31. package/dist/types/components/table/simple/hook.d.ts +17 -0
  32. package/dist/types/components/table/simple/tool.d.ts +19 -0
  33. package/dist/types/components/table/simple/types.d.ts +25 -164
  34. package/dist/types/components/table/simple/widgets/MTableHeader.vue.d.ts +1 -1
  35. package/dist/types/components/table/simple/widgets/MTableIndex.vue.d.ts +8 -9
  36. package/dist/types/components/table/upload/DTableUpload.vue.d.ts +1 -0
  37. package/dist/types/components/table/upload/control/DTableUploadActivator.vue.d.ts +5 -1
  38. package/dist/types/components/table/upload/control/DTableUploadButtons.vue.d.ts +6 -2
  39. package/dist/types/components/table/upload/control/DTableUploadController.vue.d.ts +1 -0
  40. package/dist/types/components/table/virtual/VTable.vue.d.ts +10 -4
  41. package/dist/types/components/tree/data/DTree.vue.d.ts +6 -0
  42. package/dist/types/components/tree/data/hook.d.ts +109 -0
  43. package/dist/types/components/tree/data/slots/DTreePop.vue.d.ts +8 -0
  44. package/dist/types/components/tree/data/types.d.ts +10 -0
  45. package/dist/types/components/tree/simple/MTree.vue.d.ts +31 -0
  46. package/dist/types/components/tree/simple/hook.d.ts +21 -0
  47. package/dist/types/components/tree/simple/tool.d.ts +4 -0
  48. package/dist/types/components/tree/simple/types.d.ts +18 -0
  49. package/dist/types/components/tree/simple/widgets/MTreeExpand.vue.d.ts +12 -0
  50. package/dist/types/components/tree/simple/widgets/MTreeIcon.vue.d.ts +11 -0
  51. package/dist/types/components/tree/tool.d.ts +7 -0
  52. package/dist/types/components/tree/types.d.ts +20 -0
  53. package/dist/types/components/wrapper/MWrapper.vue.d.ts +33 -0
  54. package/dist/types/components/wrapper/types.d.ts +1 -0
  55. package/dist/types/hooks/use-admin/index.d.ts +4 -0
  56. package/dist/types/hooks/use-channel/index.d.ts +9 -4
  57. package/dist/types/hooks/use-channel/types.d.ts +35 -16
  58. package/dist/types/hooks/use-dao/index.d.ts +166 -12
  59. package/dist/types/hooks/use-dao/types.d.ts +2 -2
  60. package/dist/types/hooks/use-mata/types.d.ts +2 -0
  61. package/dist/types/hooks/use-morghulis/types.d.ts +2 -2
  62. package/dist/types/hooks/use-paster/index.d.ts +3 -2
  63. package/dist/types/hooks/use-paster/tool.d.ts +7 -0
  64. package/dist/types/hooks/use-paster/types.d.ts +4 -0
  65. package/dist/types/hooks/use-query/index.d.ts +35 -3
  66. package/dist/types/hooks/use-query/tool.d.ts +6 -2
  67. package/dist/types/hooks/use-query/types.d.ts +17 -2
  68. package/dist/types/hooks/use-sortable/index.d.ts +3 -0
  69. package/dist/types/hooks/use-tree/tools.d.ts +0 -0
  70. package/dist/types/hooks/use-tree/types.d.ts +0 -0
  71. package/dist/types/index.d.ts +6 -3
  72. package/package.json +8 -6
  73. package/dist/types/components/table/simple/widgets/MTablePopover.vue.d.ts +0 -16
  74. package/dist/types/hooks/use-channel/tools.d.ts +0 -3
  75. package/dist/types/hooks/use-table/simple/index.d.ts +0 -34
  76. /package/dist/types/components/table/data/{widgets/DCellContent.vue.d.ts → slots/DTableCell.vue.d.ts} +0 -0
  77. /package/dist/types/{hooks/use-table/simple/types.d.ts → components/table/data/tool.d.ts} +0 -0
@@ -0,0 +1,17 @@
1
+ import { MetaDatabase, MetaView } from "../../hooks/use-mata/types";
2
+ type __VLS_Props = {
3
+ db: MetaDatabase;
4
+ view: MetaView;
5
+ selection: any[];
6
+ };
7
+ declare function open(data: any): void;
8
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {
9
+ open: typeof open;
10
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ confirm: (...args: any[]) => void;
12
+ cancel: (...args: any[]) => void;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ onConfirm?: ((...args: any[]) => any) | undefined;
15
+ onCancel?: ((...args: any[]) => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,10 +1,10 @@
1
- import { MetaDatabase, MetaView } from "../../../../hooks/use-mata/types";
2
- import { DataItem } from "../../../../hooks/use-query/types";
1
+ import { MetaDatabase, MetaView } from "../../hooks/use-mata/types";
2
+ import { DataItem, TreeItem } from "../../hooks/use-query/types";
3
3
  type __VLS_Props = {
4
4
  selection: any[];
5
5
  view: MetaView;
6
6
  db: MetaDatabase;
7
- bean: DataItem;
7
+ bean: DataItem | TreeItem;
8
8
  };
9
9
  declare function getData(): any[];
10
10
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  item: DataItem;
5
5
  view: MetaView;
6
6
  db: MetaDatabase;
7
+ size?: 'small' | 'large' | '';
7
8
  };
8
9
  declare function getData(): any;
9
10
  declare const _default: import("vue").DefineComponent<__VLS_Props, {
@@ -1,14 +1,10 @@
1
- import { MTableButton } from "../types";
2
- import { DataItem } from "../../../../hooks/use-query/types";
1
+ import { MetaField } from "../../../hooks/use-mata/types";
3
2
  type __VLS_Props = {
4
- buttons: MTableButton[];
5
- item: DataItem;
3
+ field: MetaField;
6
4
  };
7
5
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- click: (...args: any[]) => void;
9
- width: (...args: any[]) => void;
6
+ cancel: (...args: any[]) => void;
10
7
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
- onClick?: ((...args: any[]) => any) | undefined;
12
- onWidth?: ((...args: any[]) => any) | undefined;
8
+ onCancel?: ((...args: any[]) => any) | undefined;
13
9
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
10
  export default _default;
@@ -0,0 +1,10 @@
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
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onConfirm?: ((...args: any[]) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { MetaField } from "../../../hooks/use-mata/types";
2
+ type __VLS_Props = {
3
+ field: MetaField;
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 { MetaField } from "../../../hooks/use-mata/types";
2
+ type __VLS_Props = {
3
+ field: MetaField;
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,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ type __VLS_Props = {
2
+ entity?: string;
3
+ disabled?: boolean;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "update:entity": (...args: any[]) => void;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onUpdate:entity"?: ((...args: any[]) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { AoaMap } from "../../../hooks/use-paster/types";
2
+ type __VLS_Props = {
3
+ mapping: AoaMap;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ confirm: (...args: any[]) => void;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onConfirm?: ((...args: any[]) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -1,10 +1,13 @@
1
- import { DTableProps } from "./types";
2
- declare var __VLS_13: {};
1
+ import type { DTableProps } from "./types";
2
+ import { DataItem } from "../../../hooks/use-query/types";
3
+ declare var __VLS_7: {};
3
4
  type __VLS_Slots = {} & {
4
- header?: (props: typeof __VLS_13) => any;
5
+ header?: (props: typeof __VLS_7) => any;
5
6
  };
6
7
  declare const __VLS_component: import("vue").DefineComponent<DTableProps, {
8
+ reload: () => void;
7
9
  load: () => void;
10
+ save_many: (array: DataItem[]) => void;
8
11
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DTableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
12
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
10
13
  export default _default;
@@ -1,43 +1,51 @@
1
- import { ComputedRef, Ref } from "vue";
2
- import { MetaView } from "../../use-mata/types";
3
- import { DataItem, Finder, Query, QueryConfig } from "../../use-query/types";
4
- import { DTableInfo, DTableProps } from "../../../components/table/data/types";
1
+ import { Ref } from "vue";
2
+ import { DTableProps } from "./types";
5
3
  export declare function useDTable(table: Ref, props: DTableProps): {
4
+ selection: import("vue").ComputedRef<any[]>;
5
+ isAdmin: Ref<boolean, boolean>;
6
6
  admin: Ref<boolean, boolean>;
7
- switch_admin: () => void;
8
- reload: () => void;
9
- finder: Ref<Finder, Finder>;
10
- query: ComputedRef<Query>;
11
7
  config: Ref<{
12
8
  includes?: {
13
9
  [x: string]: any;
14
- id?: (string | number) | undefined;
10
+ id?: import("../../../hooks/use-query/types").DataItemId | undefined;
15
11
  } | undefined;
16
12
  excludes?: {
17
13
  [x: string]: any;
18
- id?: (string | number) | undefined;
14
+ id?: import("../../../hooks/use-query/types").DataItemId | undefined;
19
15
  } | undefined;
20
- orders?: import("../../use-query/types").Orders | undefined;
16
+ orders?: import("../../../hooks/use-query/types").Orders | undefined;
21
17
  page?: number | undefined;
22
18
  size?: number | undefined;
23
- }, QueryConfig | {
19
+ root?: number | undefined;
20
+ finder?: import("../../../hooks/use-query/types").Finder | undefined;
21
+ }, import("../../../hooks/use-query/types").QueryConfig | {
24
22
  includes?: {
25
23
  [x: string]: any;
26
- id?: (string | number) | undefined;
24
+ id?: import("../../../hooks/use-query/types").DataItemId | undefined;
27
25
  } | undefined;
28
26
  excludes?: {
29
27
  [x: string]: any;
30
- id?: (string | number) | undefined;
28
+ id?: import("../../../hooks/use-query/types").DataItemId | undefined;
31
29
  } | undefined;
32
- orders?: import("../../use-query/types").Orders | undefined;
30
+ orders?: import("../../../hooks/use-query/types").Orders | undefined;
33
31
  page?: number | undefined;
34
32
  size?: number | undefined;
33
+ root?: number | undefined;
34
+ finder?: import("../../../hooks/use-query/types").Finder | undefined;
35
35
  }>;
36
- payload: Ref<any, any>;
36
+ query: import("vue").ComputedRef<import("../../..").Query>;
37
+ meta: import("vue").ComputedRef<import("../../../hooks/use-mata/types").Meta>;
38
+ switchAdmin: () => void;
39
+ load: () => void;
40
+ reload: () => void;
41
+ status: {
42
+ loading: boolean;
43
+ payload: any;
44
+ };
37
45
  view: Ref<{
38
46
  id?: number | undefined;
39
47
  fields?: {
40
- [key: string]: import("../../use-mata/types").MetaField;
48
+ [key: string]: import("../../..").MetaField;
41
49
  } | undefined;
42
50
  entity?: string | undefined;
43
51
  code?: string | undefined;
@@ -58,10 +66,10 @@ export declare function useDTable(table: Ref, props: DTableProps): {
58
66
  allow_remove?: boolean | undefined;
59
67
  allow_download?: boolean | undefined;
60
68
  allow_upload?: boolean | undefined;
61
- }, MetaView | {
69
+ }, import("../../..").MetaView | {
62
70
  id?: number | undefined;
63
71
  fields?: {
64
- [key: string]: import("../../use-mata/types").MetaField;
72
+ [key: string]: import("../../..").MetaField;
65
73
  } | undefined;
66
74
  entity?: string | undefined;
67
75
  code?: string | undefined;
@@ -83,25 +91,24 @@ export declare function useDTable(table: Ref, props: DTableProps): {
83
91
  allow_download?: boolean | undefined;
84
92
  allow_upload?: boolean | undefined;
85
93
  }>;
94
+ results: Ref<{
95
+ [x: string]: any;
96
+ id?: import("../../../hooks/use-query/types").DataItemId | undefined;
97
+ }[], import("../../..").DataItem[] | {
98
+ [x: string]: any;
99
+ id?: import("../../../hooks/use-query/types").DataItemId | undefined;
100
+ }[]>;
86
101
  info: Ref<{
87
102
  current: number;
88
103
  total: number;
89
- }, DTableInfo | {
104
+ }, import("../../../hooks/use-query/types").QueryInfo | {
90
105
  current: number;
91
106
  total: number;
92
107
  }>;
93
- results: Ref<{
94
- [x: string]: any;
95
- id?: (string | number) | undefined;
96
- }[], DataItem[] | {
97
- [x: string]: any;
98
- id?: (string | number) | undefined;
99
- }[]>;
100
- selection: ComputedRef<any[]>;
101
- loading: ComputedRef<boolean>;
102
- load: () => void;
103
- collect: (callback: (item: DataItem) => void) => void;
104
- upload: (array: any[]) => void;
105
- remove: (id?: number | string) => void;
108
+ save_many: (array: import("../../..").DataItem[]) => void;
109
+ delete_one: (id: string | number) => Promise<boolean>;
110
+ remove: () => void;
106
111
  clip: () => void;
112
+ clone: () => void;
113
+ collect: (callback: (item: import("../../..").DataItem) => void) => void;
107
114
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,13 @@
1
+ type __VLS_Props = {
2
+ size?: number;
3
+ page?: number;
4
+ total?: number;
5
+ };
6
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:size": (...args: any[]) => void;
8
+ "update:page": (...args: any[]) => void;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ "onUpdate:size"?: ((...args: any[]) => any) | undefined;
11
+ "onUpdate:page"?: ((...args: any[]) => any) | undefined;
12
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import type { QueryInfo } from "../../../../hooks/use-query/types";
2
+ type __VLS_Props = {
3
+ info: QueryInfo;
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ reload: (...args: any[]) => void;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onReload?: ((...args: any[]) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ export default _default;
@@ -1,8 +1,8 @@
1
- import { Finder } from "../../../../hooks/use-query/types";
1
+ import { QueryConfig } from "../../../../hooks/use-query/types";
2
2
  import { MetaField } from "../../../../hooks/use-mata/types";
3
3
  type __VLS_Props = {
4
4
  field: MetaField;
5
- finder: Finder;
5
+ config: QueryConfig;
6
6
  };
7
7
  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>;
8
8
  export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,29 +1,30 @@
1
+ import type { ChannelStatus } from "../../../../hooks/use-channel/types";
2
+ import type { MetaView } from "../../../../hooks/use-mata/types";
1
3
  import { DataItem } from "../../../../hooks/use-query/types";
2
- import { MetaView } from "../../../../hooks/use-mata/types";
3
4
  type __VLS_Props = {
4
- is_admin?: boolean;
5
- admin: boolean;
6
5
  selection: DataItem[];
7
6
  view: MetaView;
7
+ status: ChannelStatus;
8
+ admin: boolean;
8
9
  };
9
10
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
11
  remove: (...args: any[]) => void;
11
12
  open: (...args: any[]) => void;
12
13
  check: (...args: any[]) => void;
13
- paste: (...args: any[]) => void;
14
14
  switch: (...args: any[]) => void;
15
15
  uncheck: (...args: any[]) => void;
16
16
  clone: (...args: any[]) => void;
17
+ clip: (...args: any[]) => void;
17
18
  upload: (...args: any[]) => void;
18
19
  download: (...args: any[]) => void;
19
20
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
21
  onRemove?: ((...args: any[]) => any) | undefined;
21
22
  onOpen?: ((...args: any[]) => any) | undefined;
22
23
  onCheck?: ((...args: any[]) => any) | undefined;
23
- onPaste?: ((...args: any[]) => any) | undefined;
24
24
  onSwitch?: ((...args: any[]) => any) | undefined;
25
25
  onUncheck?: ((...args: any[]) => any) | undefined;
26
26
  onClone?: ((...args: any[]) => any) | undefined;
27
+ onClip?: ((...args: any[]) => any) | undefined;
27
28
  onUpload?: ((...args: any[]) => any) | undefined;
28
29
  onDownload?: ((...args: any[]) => any) | undefined;
29
30
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,9 +1,9 @@
1
- import { MTablePopperType } from "../../simple/types";
2
1
  import { MetaDatabase, MetaView } from "../../../../hooks/use-mata/types";
3
2
  import { Query } from "../../../../hooks/use-query/types";
3
+ import { MWrapperPopperType } from "../../../wrapper/types";
4
4
  type __VLS_Props = {
5
- type: MTablePopperType;
6
5
  db: MetaDatabase;
6
+ type: MWrapperPopperType;
7
7
  query: Query;
8
8
  view: MetaView;
9
9
  data: any;
@@ -11,12 +11,12 @@ type __VLS_Props = {
11
11
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  search: (...args: any[]) => void;
13
13
  close: (...args: any[]) => void;
14
- save: (...args: any[]) => void;
15
14
  reload: (...args: any[]) => void;
15
+ save: (...args: any[]) => void;
16
16
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
17
17
  onSearch?: ((...args: any[]) => any) | undefined;
18
18
  onClose?: ((...args: any[]) => any) | undefined;
19
- onSave?: ((...args: any[]) => any) | undefined;
20
19
  onReload?: ((...args: any[]) => any) | undefined;
20
+ onSave?: ((...args: any[]) => any) | undefined;
21
21
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
22
  export default _default;
@@ -1,16 +1,11 @@
1
- import { MetaDatabase } from "../../../hooks/use-mata/types";
1
+ import { Meta } from "../../../hooks/use-mata/types";
2
2
  import { QueryConfig } from "../../../hooks/use-query/types";
3
- import { MTableButton, MTableColumn } from "../simple/types";
3
+ import { MTableButton, MTableColumn, SummaryMethodFn } from "../simple/types";
4
4
  export type DTableProps = {
5
- db: MetaDatabase;
6
- entity: string;
7
- code?: string;
8
- auth?: boolean;
9
- is_admin?: boolean;
5
+ tableSize?: '' | 'large' | 'default' | 'small';
10
6
  buttons?: MTableButton[];
11
7
  columns?: MTableColumn[];
12
- } & QueryConfig;
13
- export type DTableInfo = {
14
- current: number;
15
- total: number;
16
- };
8
+ showSummary?: boolean;
9
+ sumText?: string;
10
+ summaryMethod?: SummaryMethodFn;
11
+ } & QueryConfig & Meta;
@@ -1,49 +1,37 @@
1
1
  import { type MTableProps } from "./types";
2
- declare function getSelection(): any;
3
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_16: {}, __VLS_40: {
4
- field: import("../../../hooks/use-mata/types").MetaField;
5
- }, __VLS_42: {
6
- field: import("../../../hooks/use-mata/types").MetaField;
2
+ import { DataItem } from "../../../hooks/use-query/types";
3
+ declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {
4
+ type: import("../../wrapper/types").MWrapperPopperType;
5
+ data: any;
6
+ }, __VLS_27: {}, __VLS_51: {
7
+ field: import("../../..").MetaField;
8
+ }, __VLS_53: {
9
+ field: import("../../..").MetaField;
7
10
  row: any;
8
11
  prop: string | number;
9
- }, __VLS_54: {}, __VLS_56: {}, __VLS_61: {
10
- type: import("./types").MTablePopperType;
11
- data: any;
12
12
  };
13
13
  type __VLS_Slots = {} & {
14
- header?: (props: typeof __VLS_1) => any;
14
+ header?: (props: typeof __VLS_6) => any;
15
15
  } & {
16
- 'header-tool'?: (props: typeof __VLS_3) => any;
16
+ 'header-tool'?: (props: typeof __VLS_8) => any;
17
17
  } & {
18
- empty?: (props: typeof __VLS_16) => any;
18
+ footer?: (props: typeof __VLS_10) => any;
19
19
  } & {
20
- 'header-cell'?: (props: typeof __VLS_40) => any;
20
+ 'footer-tool'?: (props: typeof __VLS_12) => any;
21
21
  } & {
22
- cell?: (props: typeof __VLS_42) => any;
22
+ pop?: (props: typeof __VLS_14) => any;
23
23
  } & {
24
- footer?: (props: typeof __VLS_54) => any;
24
+ empty?: (props: typeof __VLS_27) => any;
25
25
  } & {
26
- 'footer-tool'?: (props: typeof __VLS_56) => any;
26
+ 'header-cell'?: (props: typeof __VLS_51) => any;
27
27
  } & {
28
- pop?: (props: typeof __VLS_61) => any;
28
+ cell?: (props: typeof __VLS_53) => any;
29
29
  };
30
30
  declare const __VLS_component: import("vue").DefineComponent<MTableProps, {
31
- getSelection: typeof getSelection;
32
- setSelection: (keys: any[]) => void;
33
- closePopover: () => boolean;
34
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MTableProps> & Readonly<{}>, {
35
- showOverflowTooltip: boolean;
36
- border: boolean;
37
- fit: boolean;
38
- showHeader: boolean;
39
- highlightCurrentRow: boolean;
40
- headerCellClassName: ((data: {
41
- row: any;
42
- column: any;
43
- rowIndex: number;
44
- columnIndex: number;
45
- }) => string) | string;
46
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
+ getSelection: () => any;
32
+ setSelection: (data: any[] | DataItem) => void;
33
+ closePopover: () => void;
34
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MTableProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
35
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
48
36
  export default _default;
49
37
  type __VLS_WithSlots<T, S> = T & {
@@ -1,6 +1,6 @@
1
1
  import { MTableButton } from "../types";
2
2
  type __VLS_Props = {
3
- buttons?: MTableButton[];
3
+ buttons: MTableButton[];
4
4
  };
5
5
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
6
  click: (...args: any[]) => void;
@@ -0,0 +1,17 @@
1
+ import { type Ref } from "vue";
2
+ import { MTableProps } from "./types";
3
+ import { MWrapperPopperType } from "../../wrapper/types";
4
+ import type { DataItem } from "../../../hooks/use-query/types";
5
+ export declare function useMTable(table: Ref, wrapper: Ref, props: MTableProps): {
6
+ handleOrder: (prop: string, dir: 1 | -1) => void;
7
+ toggleAllSelection: (flag: boolean) => void;
8
+ selection: import("vue").ComputedRef<any>;
9
+ tableCellClassName: (data: any) => "m-table-cell" | "m-table-index" | "m-table-custom";
10
+ tableRowClassName: (payload: any) => "" | "m-table-current" | "m-table-highlight";
11
+ handleCellClick: (row: object, column: any, cell: any, event: any) => void;
12
+ handleCellContextMenu: (row: any, column: any, cell: any, event: any) => void;
13
+ setSelection: (data: any[] | DataItem) => void;
14
+ getSelection: () => any;
15
+ showPopover: (event: PointerEvent, type: MWrapperPopperType, data?: any, placement?: string) => void;
16
+ closePopover: () => void;
17
+ };
@@ -0,0 +1,19 @@
1
+ export declare const mTablePropsDefaults: {
2
+ border: boolean;
3
+ fit: boolean;
4
+ highlightCurrentRow: boolean;
5
+ headerCellClassName: string;
6
+ showOverflowTooltip: boolean;
7
+ scrollbarAlwaysOn: boolean;
8
+ };
9
+ export declare const mTableTooltipOptions: {
10
+ placement: string;
11
+ popperClass: string;
12
+ enterable: boolean;
13
+ effect: string;
14
+ hideAfter: number;
15
+ offset: number;
16
+ popperOptions: {};
17
+ showAfter: number;
18
+ showArrow: boolean;
19
+ };