@epie/bi-crud 2.0.24 → 2.0.26

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 (70) hide show
  1. package/package.json +1 -1
  2. package/lib/bi-crud.esm.js +0 -14472
  3. package/lib/bi-crud.umd.js +0 -14503
  4. package/lib/components/add-btn.d.ts +0 -2
  5. package/lib/components/adv-btn.d.ts +0 -2
  6. package/lib/components/adv-search.d.ts +0 -48
  7. package/lib/components/context-menu/index.d.ts +0 -54
  8. package/lib/components/crud/helper.d.ts +0 -16
  9. package/lib/components/crud/index.d.ts +0 -96
  10. package/lib/components/descriptions/descriptions.d.ts +0 -100
  11. package/lib/components/descriptions/helper.d.ts +0 -3
  12. package/lib/components/descriptions/index.d.ts +0 -5
  13. package/lib/components/dialog/index.d.ts +0 -79
  14. package/lib/components/duration/duration.d.ts +0 -73
  15. package/lib/components/duration/index.d.ts +0 -5
  16. package/lib/components/error-message.d.ts +0 -6
  17. package/lib/components/export-btn.d.ts +0 -15
  18. package/lib/components/filter-group.d.ts +0 -41
  19. package/lib/components/filter.d.ts +0 -6
  20. package/lib/components/flex1.d.ts +0 -2
  21. package/lib/components/form/form.d.ts +0 -102
  22. package/lib/components/form/helper.d.ts +0 -28
  23. package/lib/components/form/index.d.ts +0 -11
  24. package/lib/components/form-tabs.d.ts +0 -44
  25. package/lib/components/index.d.ts +0 -4
  26. package/lib/components/inline-search/helper.d.ts +0 -4
  27. package/lib/components/inline-search/index.d.ts +0 -3
  28. package/lib/components/inline-search/inlinesearch.d.ts +0 -66
  29. package/lib/components/multi-delete-btn.d.ts +0 -2
  30. package/lib/components/pagination.d.ts +0 -9
  31. package/lib/components/query.d.ts +0 -35
  32. package/lib/components/refresh-btn.d.ts +0 -2
  33. package/lib/components/search-key.d.ts +0 -41
  34. package/lib/components/table/helper.d.ts +0 -23
  35. package/lib/components/table/index.d.ts +0 -59
  36. package/lib/components/upsert/index.d.ts +0 -64
  37. package/lib/css/bi-crud.min.css +0 -1
  38. package/lib/emitter.d.ts +0 -3
  39. package/lib/hooks/browser.d.ts +0 -4
  40. package/lib/hooks/core.d.ts +0 -16
  41. package/lib/hooks/crud.d.ts +0 -15
  42. package/lib/hooks/form.d.ts +0 -6
  43. package/lib/hooks/i18n.d.ts +0 -1
  44. package/lib/hooks/index.d.ts +0 -4
  45. package/lib/hooks/proxy.d.ts +0 -1
  46. package/lib/index.d.ts +0 -12
  47. package/lib/locales/en-US.d.ts +0 -73
  48. package/lib/locales/index.d.ts +0 -2
  49. package/lib/locales/zh-CN.d.ts +0 -73
  50. package/lib/types/base/adv-search.d.ts +0 -15
  51. package/lib/types/base/base.d.ts +0 -14
  52. package/lib/types/base/browser.d.ts +0 -4
  53. package/lib/types/base/context-menu.d.ts +0 -31
  54. package/lib/types/base/crud.d.ts +0 -133
  55. package/lib/types/base/element-plus.d.ts +0 -15
  56. package/lib/types/base/emitter.d.ts +0 -14
  57. package/lib/types/base/hook.d.ts +0 -8
  58. package/lib/types/base/index.d.ts +0 -11
  59. package/lib/types/base/render.d.ts +0 -15
  60. package/lib/types/base/table.d.ts +0 -76
  61. package/lib/types/base/test.d.ts +0 -3
  62. package/lib/types/base/upsert.d.ts +0 -25
  63. package/lib/types/emitter.d.ts +0 -3
  64. package/lib/types/index.d.ts +0 -2
  65. package/lib/utils/form.d.ts +0 -7
  66. package/lib/utils/index.d.ts +0 -18
  67. package/lib/utils/mitt.d.ts +0 -9
  68. package/lib/utils/parse.d.ts +0 -8
  69. package/lib/utils/test.d.ts +0 -43
  70. package/lib/utils/vnode.d.ts +0 -16
@@ -1,73 +0,0 @@
1
- declare const _default: {
2
- epie: {
3
- crud: {
4
- add: string;
5
- refresh: string;
6
- edit: string;
7
- delete: string;
8
- multidelete: string;
9
- select: string;
10
- unselect: string;
11
- action: string;
12
- nomethodinservice: string;
13
- responseformaterror: string;
14
- order: {
15
- desc: string;
16
- asc: string;
17
- };
18
- actiondel: {
19
- tip: string;
20
- prompt: string;
21
- cancel: string;
22
- ok: string;
23
- success: string;
24
- };
25
- descriptions: {
26
- title: string;
27
- };
28
- form: {
29
- show: string;
30
- hide: string;
31
- title: string;
32
- save: string;
33
- cancel: string;
34
- cannotbeempty: string;
35
- };
36
- inlinesearch: {
37
- search: string;
38
- reset: string;
39
- };
40
- upsert: {
41
- success: string;
42
- invalid: string;
43
- edit: string;
44
- add: string;
45
- };
46
- advsearch: {
47
- title: string;
48
- search: string;
49
- reset: string;
50
- clear: string;
51
- close: string;
52
- };
53
- export: {
54
- label: string;
55
- success: string;
56
- failed: string;
57
- ok: string;
58
- cancel: string;
59
- prompt: string;
60
- };
61
- filtergroup: {
62
- search: string;
63
- reset: string;
64
- };
65
- searchkey: {
66
- pleaseinput: string;
67
- pleaseinputkey: string;
68
- search: string;
69
- };
70
- };
71
- };
72
- };
73
- export default _default;
@@ -1,15 +0,0 @@
1
- import { EpieForm } from ".";
2
- export declare namespace EpieAdvSearch {
3
- interface Props {
4
- items: EpieForm.Item[];
5
- title?: string;
6
- size?: string | number;
7
- op?: Array<"clear" | "reset" | "close" | "save">;
8
- onSearch?(data: any, event: {
9
- next(params: any): void;
10
- close(): void;
11
- }): void;
12
- }
13
- interface Ref extends EpieForm.Ref {
14
- }
15
- }
@@ -1,14 +0,0 @@
1
- import { Render } from ".";
2
- /** 支持的变形,还未完全支持完毕 */
3
- export declare type EpieSchemaComponentTypes = 'descriptions' | 'table' | undefined;
4
- export declare type EpieSchema<ComponentsType = EpieSchemaComponentTypes> = {
5
- hide?: boolean;
6
- prop?: string;
7
- component?: Render.Options;
8
- formatter?: ((row: any, column: any, value: any, index: number) => any) | undefined;
9
- /** @name 在 descriptions 隐藏 */
10
- hideInDescriptions?: boolean;
11
- /** @name 在 Form 中隐藏 */
12
- /** @name 在 table 中隐藏 */
13
- hideInTable?: boolean;
14
- };
@@ -1,4 +0,0 @@
1
- export declare type Browser = {
2
- screen: string;
3
- isMini: boolean;
4
- };
@@ -1,31 +0,0 @@
1
- import { fun } from ".";
2
- export declare namespace NSEpieContextMenu {
3
- interface Item {
4
- label: string;
5
- icon?: string;
6
- prefixIcon?: string;
7
- suffixIcon?: string;
8
- ellipsis?: boolean;
9
- disabled?: boolean;
10
- hidden?: boolean;
11
- children?: Item[];
12
- showChildren?: boolean;
13
- callback?(done: fun): void;
14
- }
15
- interface Event {
16
- pageX: number;
17
- pageY: number;
18
- [key: string]: any;
19
- }
20
- interface Options {
21
- hover?: boolean | {
22
- target?: string;
23
- className?: string;
24
- };
25
- list: Item[];
26
- }
27
- interface Ref {
28
- open(event: Event, options: Options): Ref;
29
- close(): void;
30
- }
31
- }
@@ -1,133 +0,0 @@
1
- import { fun } from ".";
2
- export declare namespace EpieCrud {
3
- interface Dict {
4
- api?: {
5
- list?: string;
6
- add?: string;
7
- update?: string;
8
- delete?: string;
9
- info?: string;
10
- page?: string;
11
- export?: string;
12
- };
13
- pagination?: {
14
- page?: string;
15
- size?: string;
16
- };
17
- search?: {
18
- keyWord?: string;
19
- query?: string;
20
- };
21
- sort?: {
22
- order?: string;
23
- prop?: string;
24
- };
25
- }
26
- interface Permission {
27
- page?: boolean;
28
- list?: boolean;
29
- add?: boolean;
30
- delete?: boolean;
31
- update?: boolean;
32
- info?: boolean;
33
- [key: string]: any;
34
- }
35
- interface PermissionMap {
36
- page?: string;
37
- list?: string;
38
- add?: string;
39
- delete?: string;
40
- update?: string;
41
- info?: string;
42
- export?: string;
43
- [key: string]: string | undefined;
44
- }
45
- interface ServiceApi {
46
- page?(params?: any): Promise<any>;
47
- list?(params?: any): Promise<any>;
48
- add?(params?: any): Promise<any>;
49
- update?(params?: any): Promise<any>;
50
- info?(params?: any): Promise<any>;
51
- delete?(params?: any): Promise<any>;
52
- export?(params?: any): Promise<any>;
53
- [key: string]: any;
54
- }
55
- interface Service {
56
- page: {
57
- params: {
58
- page?: number;
59
- pageSize?: number;
60
- keyWord?: string;
61
- [key: string]: any;
62
- };
63
- result: {
64
- list: any[];
65
- pagination?: {
66
- total?: number;
67
- page?: number;
68
- size?: number;
69
- };
70
- [key: string]: any;
71
- };
72
- request(params?: Service["page"]["params"]): Promise<Service["page"]["result"]>;
73
- };
74
- delete: {
75
- params: {
76
- ids?: Array<string | number>;
77
- [key: string]: any;
78
- };
79
- request(params: Service["delete"]["params"]): Promise<any>;
80
- };
81
- info: {
82
- params: {
83
- id?: string | number;
84
- [key: string]: any;
85
- };
86
- request(params: Service["info"]["params"]): Promise<any>;
87
- };
88
- upsert: {
89
- request(params: any): Promise<any>;
90
- };
91
- list: {
92
- request(params: any): Promise<any[]>;
93
- };
94
- api: ServiceApi;
95
- }
96
- interface Props {
97
- service: ServiceApi;
98
- permission?: PermissionMap;
99
- dict?: Dict;
100
- onRefresh?(params: Service["page"]["params"], event: {
101
- done: fun;
102
- next: Service["page"]["request"];
103
- render: (list: any[], pagination?: Service["page"]["result"]["pagination"]) => void;
104
- }): any;
105
- onDelete?(selection: any[], event: {
106
- next: Service["delete"]["request"];
107
- }): any;
108
- }
109
- interface Ref {
110
- name: string;
111
- routePath: string;
112
- permission: Permission;
113
- dict: Dict;
114
- service: Service["api"];
115
- loading: boolean;
116
- params: any;
117
- selection: any[];
118
- set(key: "dict" | "style" | "service" | "permission", value: any): void;
119
- done(): void;
120
- getParams(): any;
121
- getPermission(key?: string): boolean;
122
- rowAdd(): any;
123
- rowEdit(data: any): any;
124
- rowAppend(data?: any): any;
125
- rowClose(): any;
126
- rowDelete(...selection: any[]): void;
127
- rowDescription(row?: any): void;
128
- refresh: Service["page"]["request"];
129
- }
130
- interface Provide extends Ref {
131
- [key: string]: any;
132
- }
133
- }
@@ -1,15 +0,0 @@
1
- declare namespace ElementPlus {
2
- type Size = "large" | "default" | "small";
3
- interface FormProps {
4
- inline?: boolean;
5
- labelPosition?: "left" | "right" | "top";
6
- labelWidth?: string | number;
7
- labelSuffix?: string;
8
- hideRequiredAsterisk?: boolean;
9
- showMessage?: boolean;
10
- inlineMessage?: boolean;
11
- statusIcon?: boolean;
12
- validateOnRuleChange?: boolean;
13
- size?: Size;
14
- }
15
- }
@@ -1,14 +0,0 @@
1
- import { EpieCrud } from ".";
2
- export declare interface EmitterItem {
3
- name: string;
4
- callback(data: any, events: {
5
- refresh(params: any): void;
6
- crudList: EpieCrud.Ref[];
7
- }): void;
8
- }
9
- export declare interface Emitter {
10
- list: EmitterItem[];
11
- init(events: any): void;
12
- emit(name: string, data?: any): void;
13
- on(name: string, callback: any): void;
14
- }
@@ -1,8 +0,0 @@
1
- import { fun } from ".";
2
- export declare namespace Hook {
3
- type FormPipe = "number" | "string" | "split" | "join" | "boolean" | "booleanNumber" | "datetimerange" | FormPipe[] | fun;
4
- type Form = string | {
5
- bind?: FormPipe;
6
- submit?: FormPipe;
7
- };
8
- }
@@ -1,11 +0,0 @@
1
- export declare type fun = () => void;
2
- export * from "../../components/form/form";
3
- export * from "./crud";
4
- export * from "./adv-search";
5
- export * from "./browser";
6
- export * from "./context-menu";
7
- export * from "./emitter";
8
- export * from "./hook";
9
- export * from "./render";
10
- export * from "./table";
11
- export * from "./upsert";
@@ -1,15 +0,0 @@
1
- import { Ref } from "vue";
2
- import { EpieDict, fun } from ".";
3
- export declare namespace Render {
4
- type OpButton = `slot-${string}` | {
5
- label: string;
6
- onClick({ scope }: any): void;
7
- };
8
- interface Options {
9
- name?: string;
10
- options?: Ref<Array<EpieDict>> | Array<EpieDict> | fun;
11
- props?: any;
12
- vm?: any;
13
- [key: string]: any;
14
- }
15
- }
@@ -1,76 +0,0 @@
1
- import { Ref } from "vue";
2
- import { fun, NSEpieContextMenu, Render } from ".";
3
- import { EpieSchema } from "./base";
4
- export declare type EpieDict = {
5
- label: string | JSX.Element;
6
- value?: any;
7
- type?: "success" | "warning" | "info" | "danger";
8
- size?: "medium" | "default" | "small";
9
- effect?: "dark" | "light" | "plain";
10
- color?: string;
11
- };
12
- export declare type EpieColumn = EpieSchema<"table"> & {
13
- type?: "index" | "selection" | "expand" | "op";
14
- dict?: Array<EpieDict> | Ref<Array<EpieDict>>;
15
- buttons?: Array<"edit" | "delete" | Render.OpButton>;
16
- align?: "left" | "center" | "right";
17
- label?: string;
18
- className?: string;
19
- width?: number;
20
- minWidth?: number | string;
21
- renderHeader?: fun;
22
- sortable?: boolean | "desc" | "descending" | "ascending" | "asc" | "custom" | string;
23
- sortMethod?: fun;
24
- sortBy?: string | fun | unknown[];
25
- resizable?: {
26
- type: boolean;
27
- default: true;
28
- };
29
- columnKey?: string;
30
- headerAlign?: string;
31
- showOverflowTooltip?: boolean;
32
- fixed?: boolean | string;
33
- selectable?: fun;
34
- reserveSelection?: boolean;
35
- filterMethod?: fun;
36
- filteredValue?: unknown[];
37
- filters?: unknown[];
38
- filterPlacement?: string;
39
- filterMultiple?: {
40
- type: boolean;
41
- default: true;
42
- };
43
- index?: number | fun;
44
- sortOrders?: unknown[];
45
- detailExpand?: boolean;
46
- };
47
- export declare namespace EpieTable {
48
- interface Props {
49
- columns: EpieColumn[];
50
- contextMenu?: boolean | Array<NSEpieContextMenu.Item | ((row: any) => NSEpieContextMenu.Item) | "refresh" | "check" | "update" | "edit" | "delete" | "order-desc" | "order-asc">;
51
- }
52
- interface Ref {
53
- selection: any[];
54
- data: any[];
55
- columns: EpieColumn[];
56
- showColumn(prop: string | string[], status?: boolean): void;
57
- hideColumn(prop: string | string[]): void;
58
- changeSort(prop: string, order: string): void;
59
- clearSelection(): void;
60
- getSelectionRows(): any[];
61
- toggleRowSelection(row: any, selected: any[]): void;
62
- toggleAllSelection(): void;
63
- toggleRowExpansion(row: any, expanded: any[]): void;
64
- setCurrentRow(row: any): void;
65
- clearSort(): void;
66
- clearFilter(columnKeys: string[]): void;
67
- doLayout(): void;
68
- sort(prop: string, order: string): void;
69
- scrollTo(position: {
70
- top?: number;
71
- left?: number;
72
- }): void;
73
- setScrollTop(top: number): void;
74
- setScrollLeft(left: number): void;
75
- }
76
- }
@@ -1,3 +0,0 @@
1
- declare interface A {
2
- name: string;
3
- }
@@ -1,25 +0,0 @@
1
- import { EpieForm, fun, EpieCrud } from ".";
2
- export declare namespace EpieUpsert {
3
- interface Props {
4
- baseSpan?: number;
5
- items: EpieForm.Item[];
6
- props?: EpieForm.Options["props"];
7
- sync?: boolean;
8
- op?: EpieForm.Options["op"];
9
- dialog?: EpieForm.Options["dialog"];
10
- onOpen?(isEdit: boolean, data: any): void;
11
- onClose?(done: fun): void;
12
- onInfo?(data: EpieCrud.Service["info"]["params"], event: {
13
- close: fun;
14
- done(data: any): void;
15
- next: EpieCrud.Service["info"]["request"];
16
- }): void;
17
- onSubmit?(isEdit: boolean, data: any, event: {
18
- close: fun;
19
- done: fun;
20
- next: EpieCrud.Service["upsert"]["request"];
21
- }): void;
22
- }
23
- interface Ref extends EpieForm.Ref {
24
- }
25
- }
@@ -1,3 +0,0 @@
1
- import { EpieCrud, Emitter } from ".";
2
- export declare const crudList: EpieCrud.Ref[];
3
- export declare const emitter: Emitter;
@@ -1,2 +0,0 @@
1
- import "../static/index.scss";
2
- export * from "./base";
@@ -1,7 +0,0 @@
1
- declare type Label = {
2
- text?: string;
3
- icon?: string | JSX.Element;
4
- tip?: string;
5
- };
6
- export declare const getLabel: (src: string | Label) => Label;
7
- export {};
@@ -1,18 +0,0 @@
1
- import cloneDeep from "clone-deep";
2
- import flat from "array.prototype.flat";
3
- import merge from "merge";
4
- export declare function isArray(value: any): boolean;
5
- export declare function isObject(value: any): boolean;
6
- export declare function isNumber(value: any): boolean;
7
- export declare function isFunction(value: any): boolean;
8
- export declare function isString(value: any): boolean;
9
- export declare function isNull(value: any): boolean;
10
- export declare function isBoolean(value: any): boolean;
11
- export declare function isEmpty(value: any): boolean;
12
- export declare function clone(obj: any): any;
13
- export declare function dataset(obj: any, key: string, value: any): any;
14
- export declare function contains(parent: any, node: any): any;
15
- export declare function deepMerge(a: any, b: any): any;
16
- export declare function addClass(el: Element, name: string): void;
17
- export declare function removeClass(el: Element, name: string): void;
18
- export { cloneDeep, flat, merge };
@@ -1,9 +0,0 @@
1
- declare class Emitter {
2
- id: number;
3
- constructor(id?: number);
4
- send(type: string, name: string, ...args: any[]): void;
5
- on(name: string, ...args: any[]): void;
6
- emit(name: string, ...args: any[]): void;
7
- off(name: string, ...args: any[]): void;
8
- }
9
- export default Emitter;
@@ -1,8 +0,0 @@
1
- /**
2
- * parse hidden
3
- * 1 Boolean
4
- * 2 Function({ scope })
5
- * 3 :[prop] is bind form[prop] value
6
- * @param {*} value
7
- */
8
- export default function (method: string, { value, scope, data }: any): any;
@@ -1,43 +0,0 @@
1
- export declare const UserList: ({
2
- id: number;
3
- name: string;
4
- createTime: string;
5
- price: number;
6
- status: number;
7
- duration: number;
8
- statusx: string;
9
- hook: string;
10
- } | {
11
- id: number;
12
- name: string;
13
- createTime: string;
14
- price: number;
15
- status: number;
16
- statusx: string;
17
- duration?: undefined;
18
- hook?: undefined;
19
- } | {
20
- id: number;
21
- name: string;
22
- createTime: string;
23
- price: number;
24
- status: number;
25
- duration?: undefined;
26
- statusx?: undefined;
27
- hook?: undefined;
28
- })[];
29
- export declare const TestService: {
30
- page: (p: any) => Promise<unknown>;
31
- list: (p: any) => Promise<unknown>;
32
- info: (d: any) => Promise<unknown>;
33
- add: (d: any) => Promise<void>;
34
- delete: (d: any) => Promise<void>;
35
- update: (d: any) => Promise<void>;
36
- export: (d: any) => Promise<{
37
- code: number;
38
- msg: string;
39
- }> | Promise<{
40
- code: number;
41
- data: string;
42
- }>;
43
- };
@@ -1,16 +0,0 @@
1
- interface Options {
2
- prop?: string;
3
- scope?: any;
4
- item?: any;
5
- slots?: any;
6
- type?: "table-op" | "form-op";
7
- render?: "slot" | null;
8
- [key: string]: any;
9
- }
10
- /**
11
- * 渲染节点
12
- * @param {*} vnode
13
- * @param {*} options
14
- */
15
- export declare function renderNode(vnode: any, options: Options): any;
16
- export {};