morghulis 3.0.21 → 3.0.22

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 (39) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/morghulis.es.js +6043 -8551
  3. package/dist/morghulis.es.js.map +1 -1
  4. package/dist/morghulis.umd.js +23 -583
  5. package/dist/morghulis.umd.js.map +1 -1
  6. package/dist/types/components/cell/MCell.vue.d.ts +10 -0
  7. package/dist/types/components/cell/char/CharCell.vue.d.ts +7 -0
  8. package/dist/types/components/cell/char/ColorCell.vue.d.ts +2 -0
  9. package/dist/types/components/cell/date/DateCell.vue.d.ts +7 -0
  10. package/dist/types/components/cell/date/TimeCell.vue.d.ts +7 -0
  11. package/dist/types/components/cell/refer/SelectCell.vue.d.ts +7 -0
  12. package/dist/types/components/cell/simple/BooleanCell.vue.d.ts +7 -0
  13. package/dist/types/components/cell/simple/DefaultCell.vue.d.ts +7 -0
  14. package/dist/types/components/cell/simple/NumberCell.vue.d.ts +7 -0
  15. package/dist/types/components/cell/simple/SwitchCell.vue.d.ts +2 -0
  16. package/dist/types/components/cell/special/ObjectCell.vue.d.ts +7 -0
  17. package/dist/types/components/form/MForm.vue.d.ts +12 -0
  18. package/dist/types/components/{table-data → table/data}/DTable.vue.d.ts +2 -2
  19. package/dist/types/components/table/data/popover/DCellPopover.vue.d.ts +18 -0
  20. package/dist/types/components/table/data/popover/DTablePopWrapper.vue.d.ts +2 -0
  21. package/dist/types/components/{table-data → table/data}/types.d.ts +3 -3
  22. package/dist/types/components/table/data/widgets/DForm.vue.d.ts +13 -0
  23. package/dist/types/components/{table-morghulis → table/simple}/MTable.vue.d.ts +4 -4
  24. package/dist/types/components/{table-morghulis → table/simple}/buttons/MTableButtons.vue.d.ts +1 -1
  25. package/dist/types/components/{table-morghulis → table/simple}/types.d.ts +1 -1
  26. package/dist/types/components/{table-morghulis → table/simple}/widgets/MTableHeader.vue.d.ts +1 -1
  27. package/dist/types/components/{table-morghulis → table/simple}/widgets/MTablePopover.vue.d.ts +3 -7
  28. package/dist/types/components/{table-simple/STable.vue.d.ts → table/virtual/VTable.vue.d.ts} +3 -3
  29. package/dist/types/hooks/use-cell/index.d.ts +6 -0
  30. package/dist/types/hooks/use-cell/tool.d.ts +2 -0
  31. package/dist/types/hooks/use-cell/types.d.ts +7 -0
  32. package/dist/types/hooks/use-table-data/index.d.ts +2 -1
  33. package/dist/types/hooks/use-table-morghulis/index.d.ts +1 -1
  34. package/dist/types/index.d.ts +9 -6
  35. package/package.json +1 -1
  36. /package/dist/types/components/{table-data → table/data}/controller/DTableController.vue.d.ts +0 -0
  37. /package/dist/types/components/{table-morghulis → table/simple}/buttons/MTableButtonWrapper.vue.d.ts +0 -0
  38. /package/dist/types/components/{table-morghulis → table/simple}/columns/MTableColumnWrapper.vue.d.ts +0 -0
  39. /package/dist/types/components/{table-morghulis → table/simple}/widgets/MTableIndex.vue.d.ts +0 -0
@@ -0,0 +1,10 @@
1
+ import type { DataItem } from "../../hooks/use-query/types";
2
+ import type { MetaDatabase, MetaField } from "../../hooks/use-mata/types";
3
+ type __VLS_Props = {
4
+ field: MetaField;
5
+ bean: DataItem;
6
+ db: MetaDatabase;
7
+ disabled: boolean;
8
+ };
9
+ 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>;
10
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { MCellProps } from "../../../hooks/use-cell/types";
2
+ declare const _default: import("vue").DefineComponent<MCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<MCellProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ 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,7 @@
1
+ import { MCellProps } from "../../../hooks/use-cell/types";
2
+ declare const _default: import("vue").DefineComponent<MCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<MCellProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { MCellProps } from "../../../hooks/use-cell/types";
2
+ declare const _default: import("vue").DefineComponent<MCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<MCellProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { MCellProps } from "../../../hooks/use-cell/types";
2
+ declare const _default: import("vue").DefineComponent<MCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<MCellProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { MCellProps } from "../../../hooks/use-cell/types";
2
+ declare const _default: import("vue").DefineComponent<MCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<MCellProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { MCellProps } from "../../../hooks/use-cell/types";
2
+ declare const _default: import("vue").DefineComponent<MCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<MCellProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { MCellProps } from "../../../hooks/use-cell/types";
2
+ declare const _default: import("vue").DefineComponent<MCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<MCellProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ 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,7 @@
1
+ import { MCellProps } from "../../../hooks/use-cell/types";
2
+ declare const _default: import("vue").DefineComponent<MCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "update:modelValue": (...args: any[]) => void;
4
+ }, string, import("vue").PublicProps, Readonly<MCellProps> & Readonly<{
5
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { MetaDatabase, MetaView } from "../../hooks/use-mata/types";
2
+ import type { DataItem } from "../../hooks/use-query/types";
3
+ type __VLS_Props = {
4
+ item: DataItem;
5
+ view: MetaView;
6
+ db: MetaDatabase;
7
+ };
8
+ declare function getData(): any;
9
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {
10
+ getData: typeof getData;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ export default _default;
@@ -1,7 +1,7 @@
1
1
  import { DTableProps } from "./types";
2
- declare var __VLS_7: {};
2
+ declare var __VLS_15: {};
3
3
  type __VLS_Slots = {} & {
4
- header?: (props: typeof __VLS_7) => any;
4
+ header?: (props: typeof __VLS_15) => any;
5
5
  };
6
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>;
7
7
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -0,0 +1,18 @@
1
+ import { MetaDatabase, MetaView } from "../../../../hooks/use-mata/types";
2
+ import { DataItem } from "../../../../hooks/use-query/types";
3
+ type __VLS_Props = {
4
+ view: MetaView;
5
+ data: {
6
+ prop: string;
7
+ row: DataItem;
8
+ };
9
+ db: MetaDatabase;
10
+ };
11
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
+ cancel: (...args: any[]) => void;
13
+ save: (...args: any[]) => void;
14
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
+ onCancel?: ((...args: any[]) => any) | undefined;
16
+ onSave?: ((...args: any[]) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ 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,6 +1,6 @@
1
- import { MetaDatabase } from "../../hooks/use-mata/types";
2
- import { QueryConfig } from "../../hooks/use-query/types";
3
- import { MTableButton, MTableColumn } from "../table-morghulis/types";
1
+ import { MetaDatabase } from "../../../hooks/use-mata/types";
2
+ import { QueryConfig } from "../../../hooks/use-query/types";
3
+ import { MTableButton, MTableColumn } from "../simple/types";
4
4
  export type DTableProps = {
5
5
  db: MetaDatabase;
6
6
  entity: string;
@@ -0,0 +1,13 @@
1
+ import { MetaDatabase, MetaView } from "../../../../hooks/use-mata/types";
2
+ import { DataItem } from "../../../../hooks/use-query/types";
3
+ type __VLS_Props = {
4
+ selection: any[];
5
+ view: MetaView;
6
+ db: MetaDatabase;
7
+ bean: DataItem;
8
+ };
9
+ declare function getData(): any[];
10
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {
11
+ getData: typeof getData;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -1,10 +1,10 @@
1
1
  import { type MTableProps } from "./types";
2
2
  declare function getSelection(): any;
3
3
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_35: {
4
- field: import("../../hooks/use-mata/types").MetaField;
4
+ field: import("../../../hooks/use-mata/types").MetaField;
5
5
  row: any;
6
6
  prop: string | number;
7
- }, __VLS_43: {}, __VLS_45: {}, __VLS_54: {
7
+ }, __VLS_43: {}, __VLS_45: {}, __VLS_50: {
8
8
  type: import("./types").MTablePopperType;
9
9
  data: any;
10
10
  };
@@ -19,15 +19,15 @@ type __VLS_Slots = {} & {
19
19
  } & {
20
20
  'footer-tool'?: (props: typeof __VLS_45) => any;
21
21
  } & {
22
- pop?: (props: typeof __VLS_54) => any;
22
+ pop?: (props: typeof __VLS_50) => any;
23
23
  };
24
24
  declare const __VLS_component: import("vue").DefineComponent<MTableProps, {
25
25
  getSelection: typeof getSelection;
26
26
  setSelection: (keys: any[]) => void;
27
27
  closePopover: () => boolean;
28
28
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MTableProps> & Readonly<{}>, {
29
- border: boolean;
30
29
  showOverflowTooltip: boolean;
30
+ border: boolean;
31
31
  fit: boolean;
32
32
  showHeader: boolean;
33
33
  highlightCurrentRow: boolean;
@@ -1,5 +1,5 @@
1
1
  import { MTableButton } from "../types";
2
- import { DataItem } from "../../../hooks/use-query/types";
2
+ import { DataItem } from "../../../../hooks/use-query/types";
3
3
  type __VLS_Props = {
4
4
  buttons: MTableButton[];
5
5
  item: DataItem;
@@ -1,7 +1,7 @@
1
1
  import type { Component } from "vue";
2
2
  import { type CSSProperties, type VNode } from "vue";
3
3
  import { type ElTooltipProps, type Sort, type TreeNode } from "element-plus";
4
- import { MetaView } from "../../hooks/use-mata/types";
4
+ import { MetaView } from "../../../hooks/use-mata/types";
5
5
  /**
6
6
  * style function
7
7
  */
@@ -1,4 +1,4 @@
1
- import { MetaField, MetaView } from "../../../hooks/use-mata/types";
1
+ import { MetaField, MetaView } from "../../../../hooks/use-mata/types";
2
2
  type __VLS_Props = {
3
3
  view: MetaView;
4
4
  field: MetaField;
@@ -1,16 +1,12 @@
1
1
  import { MTablePopper } from "../types";
2
- declare var __VLS_34: {
2
+ declare var __VLS_6: {
3
3
  type: import("../types").MTablePopperType;
4
4
  data: any;
5
5
  };
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_34) => any;
7
+ default?: (props: typeof __VLS_6) => any;
8
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>;
9
+ declare const __VLS_component: import("vue").DefineComponent<MTablePopper, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MTablePopper> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
10
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
15
11
  export default _default;
16
12
  type __VLS_WithSlots<T, S> = T & {
@@ -1,6 +1,6 @@
1
- import { DataItem } from "../../hooks/use-query/types";
2
- import { MetaView } from "../../hooks/use-mata/types";
3
- import { MTableButton, MTableColumn } from "../table-morghulis/types";
1
+ import { DataItem } from "../../../hooks/use-query/types";
2
+ import { MetaView } from "../../../hooks/use-mata/types";
3
+ import { MTableButton, MTableColumn } from "../simple/types";
4
4
  type __VLS_Props = {
5
5
  title?: string;
6
6
  data: DataItem[];
@@ -0,0 +1,6 @@
1
+ import { type Ref } from "vue";
2
+ import type { MetaView } from "../use-mata/types";
3
+ import type { DataItem } from "../use-query/types";
4
+ export default function useDCell(view: Ref<MetaView>): {
5
+ getValue: (prop: string, row: DataItem) => any;
6
+ };
@@ -0,0 +1,2 @@
1
+ import type { Component } from "vue";
2
+ export declare function getComponentByDomain(domain: String): Component;
@@ -0,0 +1,7 @@
1
+ import { MetaDatabase, MetaField } from "../use-mata/types";
2
+ export type MCellProps = {
3
+ modelValue: any;
4
+ disabled: boolean;
5
+ field: MetaField;
6
+ db: MetaDatabase;
7
+ };
@@ -1,7 +1,7 @@
1
1
  import { ComputedRef, Ref } from "vue";
2
- import { DTableInfo, DTableProps } from "../../components/table-data/types";
3
2
  import { MetaView } from "../use-mata/types";
4
3
  import { DataItem, QueryConfig } from "../use-query/types";
4
+ import { DTableInfo, DTableProps } from "../../components/table/data/types";
5
5
  export declare function useDTable(table: Ref, props: DTableProps): {
6
6
  config: Ref<{
7
7
  includes?: {
@@ -97,6 +97,7 @@ export declare function useDTable(table: Ref, props: DTableProps): {
97
97
  selection: ComputedRef<any[]>;
98
98
  loading: ComputedRef<boolean>;
99
99
  load: () => void;
100
+ collect: (callback: (item: DataItem) => void) => void;
100
101
  upload: (array: any[]) => void;
101
102
  remove: (id?: number | string) => void;
102
103
  };
@@ -1,5 +1,5 @@
1
1
  import { type Ref } from "vue";
2
- import { MTablePopperType, MTableProps } from "../../components/table-morghulis/types";
2
+ import { MTablePopperType, MTableProps } from "../../components/table/simple/types";
3
3
  export declare function useMTable(table: Ref, props: MTableProps): {
4
4
  visible: import("vue").ComputedRef<{
5
5
  popover: {
@@ -7,20 +7,23 @@ import { MorghulisOptions } from "./hooks/use-morghulis/types";
7
7
  import type { MorghulisChannelConfig } from "./hooks/use-channel/types";
8
8
  import MDialog from "./components/dialog/MDialog.vue";
9
9
  import MApp from "./MApp.vue";
10
- import MTable from "./components/table-morghulis/MTable.vue";
11
- import DTable from "./components/table-data/DTable.vue";
12
- import type { MTableButton, MTableColumn } from "./components/table-morghulis/types";
13
- import STable from "./components/table-simple/STable.vue";
10
+ import MTable from "./components/table/simple/MTable.vue";
11
+ import DTable from "./components/table/data/DTable.vue";
12
+ import VTable from './components/table/virtual/VTable.vue';
13
+ import MForm from "./components/form/MForm.vue";
14
+ import type { MTableButton, MTableColumn } from "./components/table/simple/types";
15
+ import type { Query } from "./hooks/use-query/types";
14
16
  declare module "vue" {
15
17
  interface GlobalComponents {
16
18
  MApp: typeof MApp;
17
19
  MDialog: typeof MDialog;
18
20
  MTable: typeof MTable;
19
21
  DTable: typeof DTable;
20
- STable: typeof STable;
22
+ VTable: typeof VTable;
23
+ MForm: typeof MForm;
21
24
  }
22
25
  }
23
26
  declare const createMorghulis: (options?: MorghulisOptions) => {
24
27
  install(Vue: App): void;
25
28
  };
26
- export { MApp, MDialog, MTable, DTable, STable, createMorghulis, useMRequest, useMChannel, useMSockets, MorghulisChannelConfig, MTableButton, MTableColumn };
29
+ export { MApp, MDialog, MTable, DTable, VTable, MForm, createMorghulis, useMRequest, useMChannel, useMSockets, MorghulisChannelConfig, MTableButton, MTableColumn, Query };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "3.0.21",
3
+ "version": "3.0.22",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"