morghulis 3.0.24 → 3.0.25

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 (25) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/morghulis.es.js +4361 -4120
  3. package/dist/morghulis.es.js.map +1 -1
  4. package/dist/morghulis.umd.js +25 -25
  5. package/dist/morghulis.umd.js.map +1 -1
  6. package/dist/types/components/table/data/DTable.vue.d.ts +2 -2
  7. package/dist/types/components/table/data/popover/DCellPopover.vue.d.ts +4 -3
  8. package/dist/types/components/table/data/popover/DFieldPopover.vue.d.ts +4 -2
  9. package/dist/types/components/table/data/popover/DIndexPopover.vue.d.ts +4 -3
  10. package/dist/types/components/table/data/popover/DMetaPopover.vue.d.ts +4 -2
  11. package/dist/types/components/table/data/popover/DSearchPopover.vue.d.ts +4 -2
  12. package/dist/types/components/table/data/widgets/DPopoverWrapper.vue.d.ts +2 -0
  13. package/dist/types/components/table/data/widgets/DTableHeader.vue.d.ts +8 -0
  14. package/dist/types/components/table/simple/MTable.vue.d.ts +9 -5
  15. package/dist/types/components/table/simple/widgets/MTableHeader.vue.d.ts +11 -1
  16. package/dist/types/hooks/use-dao/index.d.ts +4 -4
  17. package/dist/types/hooks/use-query/index.d.ts +2 -2
  18. package/dist/types/hooks/use-query/tool.d.ts +4 -0
  19. package/dist/types/hooks/use-query/types.d.ts +20 -0
  20. package/dist/types/hooks/use-table/data/index.d.ts +2 -1
  21. package/package.json +1 -1
  22. package/dist/types/components/table/data/search/FieldSearch.vue.d.ts +0 -2
  23. package/dist/types/components/table/data/search/SearchCell.vue.d.ts +0 -2
  24. package/dist/types/components/table/data/search/TableSearch.vue.d.ts +0 -2
  25. package/dist/types/hooks/use-table/data/tool.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { DTableProps } from "./types";
2
- declare var __VLS_7: {};
2
+ declare var __VLS_10: {};
3
3
  type __VLS_Slots = {} & {
4
- header?: (props: typeof __VLS_7) => any;
4
+ header?: (props: typeof __VLS_10) => 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>;
@@ -1,18 +1,19 @@
1
1
  import { MetaDatabase, MetaView } from "../../../../hooks/use-mata/types";
2
- import { DataItem } from "../../../../hooks/use-query/types";
2
+ import { DataItem, Query } from "../../../../hooks/use-query/types";
3
3
  type __VLS_Props = {
4
4
  view: MetaView;
5
5
  data: {
6
6
  prop: string;
7
7
  row: DataItem;
8
8
  };
9
+ query: Query;
9
10
  db: MetaDatabase;
10
11
  };
11
12
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
13
  close: (...args: any[]) => void;
13
- change: (...args: any[]) => void;
14
+ reset: (...args: any[]) => void;
14
15
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
15
16
  onClose?: ((...args: any[]) => any) | undefined;
16
- onChange?: ((...args: any[]) => any) | undefined;
17
+ onReset?: ((...args: any[]) => any) | undefined;
17
18
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
19
  export default _default;
@@ -1,14 +1,16 @@
1
1
  import { MetaDatabase, MetaField, MetaView } from "../../../../hooks/use-mata/types";
2
+ import { Query } from "../../../../hooks/use-query/types";
2
3
  type __VLS_Props = {
3
4
  view: MetaView;
4
5
  data: MetaField;
5
6
  db: MetaDatabase;
7
+ query: Query;
6
8
  };
7
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
10
  close: (...args: any[]) => void;
9
- change: (...args: any[]) => void;
11
+ reset: (...args: any[]) => void;
10
12
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
13
  onClose?: ((...args: any[]) => any) | undefined;
12
- onChange?: ((...args: any[]) => any) | undefined;
14
+ onReset?: ((...args: any[]) => any) | undefined;
13
15
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
16
  export default _default;
@@ -1,15 +1,16 @@
1
1
  import { MetaDatabase, MetaView } from "../../../../hooks/use-mata/types";
2
- import { DataItem } from "../../../../hooks/use-query/types";
2
+ import { DataItem, Query } from "../../../../hooks/use-query/types";
3
3
  type __VLS_Props = {
4
4
  view: MetaView;
5
5
  data: DataItem;
6
6
  db: MetaDatabase;
7
+ query: Query;
7
8
  };
8
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
10
  close: (...args: any[]) => void;
10
- change: (...args: any[]) => void;
11
+ reset: (...args: any[]) => void;
11
12
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
13
  onClose?: ((...args: any[]) => any) | undefined;
13
- onChange?: ((...args: any[]) => any) | undefined;
14
+ onReset?: ((...args: any[]) => any) | undefined;
14
15
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
16
  export default _default;
@@ -1,14 +1,16 @@
1
1
  import { MetaDatabase, MetaView } from "../../../../hooks/use-mata/types";
2
+ import { Query } from "../../../../hooks/use-query/types";
2
3
  type __VLS_Props = {
3
4
  view: MetaView;
4
5
  data: any;
6
+ query: Query;
5
7
  db: MetaDatabase;
6
8
  };
7
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
10
  close: (...args: any[]) => void;
9
- change: (...args: any[]) => void;
11
+ reset: (...args: any[]) => void;
10
12
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
13
  onClose?: ((...args: any[]) => any) | undefined;
12
- onChange?: ((...args: any[]) => any) | undefined;
14
+ onReset?: ((...args: any[]) => any) | undefined;
13
15
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
16
  export default _default;
@@ -1,14 +1,16 @@
1
1
  import { MetaDatabase, MetaField, MetaView } from "../../../../hooks/use-mata/types";
2
+ import { Query } from "../../../../hooks/use-query/types";
2
3
  type __VLS_Props = {
3
4
  view: MetaView;
5
+ query: Query;
4
6
  data: MetaField;
5
7
  db: MetaDatabase;
6
8
  };
7
9
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
10
  close: (...args: any[]) => void;
9
- change: (...args: any[]) => void;
11
+ reset: (...args: any[]) => void;
10
12
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
13
  onClose?: ((...args: any[]) => any) | undefined;
12
- onChange?: ((...args: any[]) => any) | undefined;
14
+ onReset?: ((...args: any[]) => any) | undefined;
13
15
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
16
  export default _default;
@@ -1,8 +1,10 @@
1
1
  import { MTablePopperType } from "../../simple/types";
2
2
  import { MetaDatabase, MetaView } from "../../../../hooks/use-mata/types";
3
+ import { Query } from "../../../../hooks/use-query/types";
3
4
  type __VLS_Props = {
4
5
  type: MTablePopperType;
5
6
  db: MetaDatabase;
7
+ query: Query;
6
8
  view: MetaView;
7
9
  data: any;
8
10
  };
@@ -0,0 +1,8 @@
1
+ import { Finder } from "../../../../hooks/use-query/types";
2
+ import { MetaField } from "../../../../hooks/use-mata/types";
3
+ type __VLS_Props = {
4
+ field: MetaField;
5
+ finder: Finder;
6
+ };
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
+ export default _default;
@@ -2,9 +2,11 @@ import { type MTableProps } from "./types";
2
2
  declare function getSelection(): any;
3
3
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_38: {
4
4
  field: import("../../../hooks/use-mata/types").MetaField;
5
+ }, __VLS_40: {
6
+ field: import("../../../hooks/use-mata/types").MetaField;
5
7
  row: any;
6
8
  prop: string | number;
7
- }, __VLS_46: {}, __VLS_48: {}, __VLS_53: {
9
+ }, __VLS_48: {}, __VLS_50: {}, __VLS_55: {
8
10
  type: import("./types").MTablePopperType;
9
11
  data: any;
10
12
  };
@@ -13,13 +15,15 @@ type __VLS_Slots = {} & {
13
15
  } & {
14
16
  'header-tool'?: (props: typeof __VLS_3) => any;
15
17
  } & {
16
- cell?: (props: typeof __VLS_38) => any;
18
+ 'header-cell'?: (props: typeof __VLS_38) => any;
19
+ } & {
20
+ cell?: (props: typeof __VLS_40) => any;
17
21
  } & {
18
- footer?: (props: typeof __VLS_46) => any;
22
+ footer?: (props: typeof __VLS_48) => any;
19
23
  } & {
20
- 'footer-tool'?: (props: typeof __VLS_48) => any;
24
+ 'footer-tool'?: (props: typeof __VLS_50) => any;
21
25
  } & {
22
- pop?: (props: typeof __VLS_53) => any;
26
+ pop?: (props: typeof __VLS_55) => any;
23
27
  };
24
28
  declare const __VLS_component: import("vue").DefineComponent<MTableProps, {
25
29
  getSelection: typeof getSelection;
@@ -7,7 +7,11 @@ type __VLS_Props = {
7
7
  searchable: boolean;
8
8
  metaEnable: boolean;
9
9
  };
10
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ declare var __VLS_14: {};
11
+ type __VLS_Slots = {} & {
12
+ default?: (props: typeof __VLS_14) => any;
13
+ };
14
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
15
  search: (...args: any[]) => void;
12
16
  field: (...args: any[]) => void;
13
17
  order: (...args: any[]) => void;
@@ -16,4 +20,10 @@ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {
16
20
  onField?: ((...args: any[]) => any) | undefined;
17
21
  onOrder?: ((...args: any[]) => any) | undefined;
18
22
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
19
24
  export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -1,14 +1,14 @@
1
1
  import { type Ref } from "vue";
2
2
  import { type Meta, MetaView } from "../use-mata/types";
3
3
  import { MorghulisChannelConfig } from "../use-channel/types";
4
- import { DataItem, Query } from "../use-query/types";
4
+ import { DataItem, IQuery, Query } from "../use-query/types";
5
5
  /**
6
6
  * http和socket的loading冲突问题
7
7
  */
8
8
  export declare function useMDao(meta: Ref<Meta>, channelConfig?: MorghulisChannelConfig, auth?: boolean): {
9
9
  loading: import("vue").ComputedRef<boolean>;
10
10
  payload: Ref<any, any>;
11
- find_many: (query: Query) => Promise<{
11
+ find_many: (query: Query | IQuery) => Promise<{
12
12
  results: DataItem[];
13
13
  total?: number;
14
14
  }>;
@@ -19,8 +19,8 @@ export declare function useMDao(meta: Ref<Meta>, channelConfig?: MorghulisChanne
19
19
  find_one: (id: string | number) => Promise<{
20
20
  item: DataItem;
21
21
  }>;
22
- delete_many: (query: Query) => Promise<boolean>;
23
- update_many: (query: Query, template: DataItem) => Promise<boolean>;
22
+ delete_many: (query: Query | IQuery) => Promise<boolean>;
23
+ update_many: (query: Query | IQuery, template: DataItem) => Promise<boolean>;
24
24
  load_view: () => Promise<MetaView>;
25
25
  save_many: (array: DataItem[]) => void;
26
26
  };
@@ -1,3 +1,3 @@
1
- import { Query, QueryConfig } from "./types";
1
+ import { Finder, Query, QueryConfig } from "./types";
2
2
  import { ComputedRef, Ref } from "vue";
3
- export declare function useMQuery(config?: Ref<QueryConfig>): ComputedRef<Query>;
3
+ export declare function useMQuery(config?: Ref<QueryConfig>, finder?: Ref<Finder>): ComputedRef<Query>;
@@ -0,0 +1,4 @@
1
+ import { Query, SearchParam } from "./types";
2
+ import { MetaView } from "../use-mata/types";
3
+ export declare function queryFinder(query: Query, view: MetaView): void;
4
+ export declare function checkFinder(param: SearchParam): boolean;
@@ -18,11 +18,31 @@ export type QueryConfig = {
18
18
  size?: number;
19
19
  };
20
20
  export type Query = {
21
+ condition: Condition;
22
+ orders: Orders;
23
+ page: number;
24
+ size: number;
25
+ template: DataItem;
26
+ search: Condition[];
27
+ finder: Finder;
28
+ };
29
+ export type IQuery = {
21
30
  condition?: Condition;
22
31
  orders?: Orders;
23
32
  page?: number;
24
33
  size?: number;
25
34
  template?: DataItem;
26
35
  search?: Condition[];
36
+ finder?: Finder;
37
+ };
38
+ export type Finder = {
39
+ [key: string]: SearchParam;
40
+ };
41
+ export type SearchParam = {
42
+ type: 'includes' | 'excludes';
43
+ isnull: boolean;
44
+ decorate: boolean;
45
+ suffix: 'contains' | 'exact' | 'startswith' | 'endswith' | 'gt' | 'lt' | 'isnull';
46
+ value: any;
27
47
  };
28
48
  export {};
@@ -1,8 +1,9 @@
1
1
  import { ComputedRef, Ref } from "vue";
2
2
  import { MetaView } from "../../use-mata/types";
3
- import { DataItem, Query, QueryConfig } from "../../use-query/types";
3
+ import { DataItem, Finder, Query, QueryConfig } from "../../use-query/types";
4
4
  import { DTableInfo, DTableProps } from "../../../components/table/data/types";
5
5
  export declare function useDTable(table: Ref, props: DTableProps): {
6
+ finder: Ref<Finder, Finder>;
6
7
  query: ComputedRef<Query>;
7
8
  config: Ref<{
8
9
  includes?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "morghulis",
3
- "version": "3.0.24",
3
+ "version": "3.0.25",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,2 +0,0 @@
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,2 +0,0 @@
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,2 +0,0 @@
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;
File without changes