morghulis 3.0.17 → 3.0.18

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,20 +1,25 @@
1
1
  import { type MTableProps } from "./types";
2
2
  declare function getSelection(): any;
3
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_40: {
3
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_35: {
4
4
  field: import("../../hooks/use-mata/types").MetaField;
5
5
  row: any;
6
6
  prop: string | number;
7
- }, __VLS_42: {}, __VLS_44: {};
7
+ }, __VLS_43: {}, __VLS_45: {}, __VLS_54: {
8
+ type: import("./types").MTablePopperType;
9
+ data: any;
10
+ };
8
11
  type __VLS_Slots = {} & {
9
12
  header?: (props: typeof __VLS_1) => any;
10
13
  } & {
11
14
  'header-tool'?: (props: typeof __VLS_3) => any;
12
15
  } & {
13
- cell?: (props: typeof __VLS_40) => any;
16
+ cell?: (props: typeof __VLS_35) => any;
17
+ } & {
18
+ footer?: (props: typeof __VLS_43) => any;
14
19
  } & {
15
- footer?: (props: typeof __VLS_42) => any;
20
+ 'footer-tool'?: (props: typeof __VLS_45) => any;
16
21
  } & {
17
- 'footer-tool'?: (props: typeof __VLS_44) => any;
22
+ pop?: (props: typeof __VLS_54) => any;
18
23
  };
19
24
  declare const __VLS_component: import("vue").DefineComponent<MTableProps, {
20
25
  getSelection: typeof getSelection;
@@ -22,6 +27,7 @@ declare const __VLS_component: import("vue").DefineComponent<MTableProps, {
22
27
  closePopover: () => boolean;
23
28
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MTableProps> & Readonly<{}>, {
24
29
  border: boolean;
30
+ showOverflowTooltip: boolean;
25
31
  fit: boolean;
26
32
  showHeader: boolean;
27
33
  highlightCurrentRow: boolean;
@@ -31,7 +37,6 @@ declare const __VLS_component: import("vue").DefineComponent<MTableProps, {
31
37
  rowIndex: number;
32
38
  columnIndex: number;
33
39
  }) => string) | string;
34
- showOverflowTooltip: boolean;
35
40
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
41
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
37
42
  export default _default;
@@ -0,0 +1,6 @@
1
+ import { MTableButton } from "../types";
2
+ type __VLS_Props = {
3
+ buttons?: MTableButton[];
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,14 @@
1
+ import { MTableButton } from "../types";
2
+ import { DataItem } from "../../../hooks/use-query/types";
3
+ type __VLS_Props = {
4
+ buttons: MTableButton[];
5
+ item: DataItem;
6
+ };
7
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ click: (...args: any[]) => void;
9
+ width: (...args: any[]) => void;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ onClick?: ((...args: any[]) => any) | undefined;
12
+ onWidth?: ((...args: any[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { MTableColumn } from "../types";
2
+ type __VLS_Props = {
3
+ columns?: MTableColumn[];
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;
@@ -124,11 +124,18 @@ export type MTableProps = TableProps & {
124
124
  columns?: MTableColumn[];
125
125
  sortableCallback?: MTableSortableFn;
126
126
  };
127
+ export type MTablePopperRef = {
128
+ getBoundingClientRect: () => {
129
+ x: number;
130
+ y: number;
131
+ };
132
+ };
133
+ export type MTablePopperType = 'meta' | 'search' | 'field' | 'cell' | 'index' | null | undefined;
127
134
  export type MTablePopper = {
128
- ref?: any;
129
- visible?: boolean;
130
- type?: string | null | undefined;
131
- data?: any;
135
+ vRef: MTablePopperRef;
136
+ visible: boolean;
137
+ type: MTablePopperType;
138
+ data: any;
132
139
  placement?: 'left' | 'right' | 'top' | 'bottom' | null | string;
133
140
  };
134
141
  export type MTableSortableFn = (newIndex: number, oldIndex: number) => void;
@@ -146,6 +153,7 @@ export type MTableButton = {
146
153
  dark?: boolean | Function;
147
154
  color?: string | Function;
148
155
  tag?: string | Function;
156
+ icon?: string | Function;
149
157
  };
150
158
  export type MTableColumn = {
151
159
  label: string;
@@ -0,0 +1,19 @@
1
+ import { MetaField, MetaView } from "../../../hooks/use-mata/types";
2
+ type __VLS_Props = {
3
+ view: MetaView;
4
+ field: MetaField;
5
+ order: object;
6
+ searchable: boolean;
7
+ metaEnable: boolean;
8
+ sortable: boolean;
9
+ };
10
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ search: (...args: any[]) => void;
12
+ meta: (...args: any[]) => void;
13
+ order: (...args: any[]) => void;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onSearch?: ((...args: any[]) => any) | undefined;
16
+ onMeta?: ((...args: any[]) => any) | undefined;
17
+ onOrder?: ((...args: any[]) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
19
+ export default _default;
@@ -0,0 +1,12 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ disabled?: any;
3
+ selection?: any;
4
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ click: (...args: any[]) => void;
6
+ }, string, import("vue").PublicProps, Readonly<{
7
+ disabled?: any;
8
+ selection?: any;
9
+ }> & Readonly<{
10
+ onClick?: ((...args: any[]) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
@@ -0,0 +1,20 @@
1
+ import { MTablePopper } from "../types";
2
+ declare var __VLS_34: {
3
+ type: import("../types").MTablePopperType;
4
+ data: any;
5
+ };
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_34) => any;
8
+ };
9
+ declare const __VLS_component: import("vue").DefineComponent<MTablePopper, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ close: (...args: any[]) => void;
11
+ }, string, import("vue").PublicProps, Readonly<MTablePopper> & Readonly<{
12
+ onClose?: ((...args: any[]) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
File without changes
@@ -1,11 +1,27 @@
1
1
  import { type Ref } from "vue";
2
- import { MTableProps } from "../../components/table-morghulis/types";
2
+ import { MTablePopperType, MTableProps } from "../../components/table-morghulis/types";
3
3
  export declare function useMTable(table: Ref, props: MTableProps): {
4
+ visible: import("vue").ComputedRef<{
5
+ popover: {
6
+ meta: boolean;
7
+ search: boolean;
8
+ field: boolean;
9
+ index: boolean;
10
+ cell: boolean;
11
+ };
12
+ header: boolean;
13
+ footer: boolean;
14
+ }>;
4
15
  popover: {
5
- ref?: any;
6
- visible?: boolean | undefined;
7
- type?: string | null | undefined | undefined;
8
- data?: any;
16
+ vRef: {
17
+ getBoundingClientRect: () => {
18
+ x: number;
19
+ y: number;
20
+ };
21
+ };
22
+ visible: boolean;
23
+ type: MTablePopperType;
24
+ data: any;
9
25
  placement?: "left" | "right" | "top" | "bottom" | null | string | undefined;
10
26
  };
11
27
  selection: import("vue").ComputedRef<any>;
@@ -16,10 +32,7 @@ export declare function useMTable(table: Ref, props: MTableProps): {
16
32
  showPopover: (event: {
17
33
  clientX: number;
18
34
  clientY: number;
19
- }, type: string, data?: any, placement?: string) => void;
35
+ }, type: MTablePopperType, data?: any, placement?: string) => void;
20
36
  closePopover: () => boolean;
21
37
  setSelection: (keys: any[]) => void;
22
- hasSearchSlot: import("vue").ComputedRef<boolean>;
23
- hasFieldSlot: import("vue").ComputedRef<boolean>;
24
- hasMetaViewSlot: import("vue").ComputedRef<boolean>;
25
38
  };
@@ -9,6 +9,7 @@ import MDialog from "./components/dialog/MDialog.vue";
9
9
  import MApp from "./MApp.vue";
10
10
  import MTable from "./components/table-morghulis/MTable.vue";
11
11
  import DTable from "./components/table-data/DTable.vue";
12
+ import type { MTableButton, MTableColumn } from "./components/table-morghulis/types";
12
13
  declare module "vue" {
13
14
  interface GlobalComponents {
14
15
  MApp: typeof MApp;
@@ -20,4 +21,4 @@ declare module "vue" {
20
21
  declare const createMorghulis: (options?: MorghulisOptions) => {
21
22
  install(Vue: App): void;
22
23
  };
23
- export { MApp, MDialog, MTable, DTable, createMorghulis, useMRequest, useMChannel, useMSockets, MorghulisChannelConfig };
24
+ export { MApp, MDialog, MTable, DTable, createMorghulis, useMRequest, useMChannel, useMSockets, MorghulisChannelConfig, MTableButton, MTableColumn };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "3.0.17",
3
+ "version": "3.0.18",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"