@hostlink/nuxt-light 1.54.3 → 1.54.5

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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.54.3",
4
+ "version": "1.54.5",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,2 +1,2 @@
1
- declare const _default: (name: string, fields: string[]) => any;
1
+ declare const _default: (name: string, fields: string[]) => Record<string, any>;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: (name: string, field: string) => any;
1
+ declare const _default: (name: string, field: string) => import("@hostlink/light").Field | null;
2
2
  export default _default;
@@ -1,2 +1,162 @@
1
- declare const _default: (name: string, fields: Record<string, any>) => any;
1
+ declare const _default: (name: string, fields: Record<string, any>) => {
2
+ fetch(): Promise<any[]>;
3
+ fetchFirst(): Promise<any>;
4
+ first(): Promise<any>;
5
+ all(): Promise<any[]>;
6
+ fetchWithMeta(): Promise<any>;
7
+ dataPath(dataPath?: string): {
8
+ first(): Promise<any>;
9
+ all(): Promise<any[]>;
10
+ fetchFirst(): Promise<any>;
11
+ fetchWithMeta(): Promise<any>;
12
+ fetch(): Promise<any[]>;
13
+ dataPath(dataPath?: string): any;
14
+ sort(sortStr: string): any;
15
+ filters(filterObj: Record<string, any>): any;
16
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
17
+ whereContains(field: string, val: any): any;
18
+ whereIn(field: string, vals: any[]): any;
19
+ whereBetween(field: string, min: any, max: any): any;
20
+ limit(n: number): any;
21
+ offset(n: number): any;
22
+ toQuery(includeMeta?: boolean): any;
23
+ };
24
+ sort(sortStr: string): {
25
+ first(): Promise<any>;
26
+ all(): Promise<any[]>;
27
+ fetchFirst(): Promise<any>;
28
+ fetchWithMeta(): Promise<any>;
29
+ fetch(): Promise<any[]>;
30
+ dataPath(dataPath?: string): any;
31
+ sort(sortStr: string): any;
32
+ filters(filterObj: Record<string, any>): any;
33
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
34
+ whereContains(field: string, val: any): any;
35
+ whereIn(field: string, vals: any[]): any;
36
+ whereBetween(field: string, min: any, max: any): any;
37
+ limit(n: number): any;
38
+ offset(n: number): any;
39
+ toQuery(includeMeta?: boolean): any;
40
+ };
41
+ filters(filterObj: Record<string, any>): {
42
+ first(): Promise<any>;
43
+ all(): Promise<any[]>;
44
+ fetchFirst(): Promise<any>;
45
+ fetchWithMeta(): Promise<any>;
46
+ fetch(): Promise<any[]>;
47
+ dataPath(dataPath?: string): any;
48
+ sort(sortStr: string): any;
49
+ filters(filterObj: Record<string, any>): any;
50
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
51
+ whereContains(field: string, val: any): any;
52
+ whereIn(field: string, vals: any[]): any;
53
+ whereBetween(field: string, min: any, max: any): any;
54
+ limit(n: number): any;
55
+ offset(n: number): any;
56
+ toQuery(includeMeta?: boolean): any;
57
+ };
58
+ where(key: string, opOrVal?: any, maybeVal?: any): {
59
+ first(): Promise<any>;
60
+ all(): Promise<any[]>;
61
+ fetchFirst(): Promise<any>;
62
+ fetchWithMeta(): Promise<any>;
63
+ fetch(): Promise<any[]>;
64
+ dataPath(dataPath?: string): any;
65
+ sort(sortStr: string): any;
66
+ filters(filterObj: Record<string, any>): any;
67
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
68
+ whereContains(field: string, val: any): any;
69
+ whereIn(field: string, vals: any[]): any;
70
+ whereBetween(field: string, min: any, max: any): any;
71
+ limit(n: number): any;
72
+ offset(n: number): any;
73
+ toQuery(includeMeta?: boolean): any;
74
+ };
75
+ whereContains(field: string, val: any): {
76
+ first(): Promise<any>;
77
+ all(): Promise<any[]>;
78
+ fetchFirst(): Promise<any>;
79
+ fetchWithMeta(): Promise<any>;
80
+ fetch(): Promise<any[]>;
81
+ dataPath(dataPath?: string): any;
82
+ sort(sortStr: string): any;
83
+ filters(filterObj: Record<string, any>): any;
84
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
85
+ whereContains(field: string, val: any): any;
86
+ whereIn(field: string, vals: any[]): any;
87
+ whereBetween(field: string, min: any, max: any): any;
88
+ limit(n: number): any;
89
+ offset(n: number): any;
90
+ toQuery(includeMeta?: boolean): any;
91
+ };
92
+ whereIn(field: string, vals: any[]): {
93
+ first(): Promise<any>;
94
+ all(): Promise<any[]>;
95
+ fetchFirst(): Promise<any>;
96
+ fetchWithMeta(): Promise<any>;
97
+ fetch(): Promise<any[]>;
98
+ dataPath(dataPath?: string): any;
99
+ sort(sortStr: string): any;
100
+ filters(filterObj: Record<string, any>): any;
101
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
102
+ whereContains(field: string, val: any): any;
103
+ whereIn(field: string, vals: any[]): any;
104
+ whereBetween(field: string, min: any, max: any): any;
105
+ limit(n: number): any;
106
+ offset(n: number): any;
107
+ toQuery(includeMeta?: boolean): any;
108
+ };
109
+ whereBetween(field: string, min: any, max: any): {
110
+ first(): Promise<any>;
111
+ all(): Promise<any[]>;
112
+ fetchFirst(): Promise<any>;
113
+ fetchWithMeta(): Promise<any>;
114
+ fetch(): Promise<any[]>;
115
+ dataPath(dataPath?: string): any;
116
+ sort(sortStr: string): any;
117
+ filters(filterObj: Record<string, any>): any;
118
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
119
+ whereContains(field: string, val: any): any;
120
+ whereIn(field: string, vals: any[]): any;
121
+ whereBetween(field: string, min: any, max: any): any;
122
+ limit(n: number): any;
123
+ offset(n: number): any;
124
+ toQuery(includeMeta?: boolean): any;
125
+ };
126
+ limit(n: number): {
127
+ first(): Promise<any>;
128
+ all(): Promise<any[]>;
129
+ fetchFirst(): Promise<any>;
130
+ fetchWithMeta(): Promise<any>;
131
+ fetch(): Promise<any[]>;
132
+ dataPath(dataPath?: string): any;
133
+ sort(sortStr: string): any;
134
+ filters(filterObj: Record<string, any>): any;
135
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
136
+ whereContains(field: string, val: any): any;
137
+ whereIn(field: string, vals: any[]): any;
138
+ whereBetween(field: string, min: any, max: any): any;
139
+ limit(n: number): any;
140
+ offset(n: number): any;
141
+ toQuery(includeMeta?: boolean): any;
142
+ };
143
+ offset(n: number): {
144
+ first(): Promise<any>;
145
+ all(): Promise<any[]>;
146
+ fetchFirst(): Promise<any>;
147
+ fetchWithMeta(): Promise<any>;
148
+ fetch(): Promise<any[]>;
149
+ dataPath(dataPath?: string): any;
150
+ sort(sortStr: string): any;
151
+ filters(filterObj: Record<string, any>): any;
152
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
153
+ whereContains(field: string, val: any): any;
154
+ whereIn(field: string, vals: any[]): any;
155
+ whereBetween(field: string, min: any, max: any): any;
156
+ limit(n: number): any;
157
+ offset(n: number): any;
158
+ toQuery(includeMeta?: boolean): any;
159
+ };
160
+ toQuery(includeMeta?: boolean): any;
161
+ };
2
162
  export default _default;
@@ -1,6 +1,4 @@
1
1
  import { getModel } from "@hostlink/light";
2
2
  export default (name, fields) => {
3
- console.log(name);
4
- const m = getModel(name);
5
- return m.list(fields);
3
+ return getModel(name).list(fields);
6
4
  };
@@ -1,2 +1,179 @@
1
- declare const _default: (name: string) => any;
1
+ import type { LTableColumn } from "../components/l-table.vue.js";
2
+ declare const _default: (name: string) => Omit<{
3
+ field: (f: string) => import("@hostlink/light").Field | null;
4
+ $fields: Record<string, import("@hostlink/light").Field>;
5
+ setDataPath(path: string): string;
6
+ getDataPath(): string;
7
+ gqlFields(fields: (string | object)[]): Record<string, any>;
8
+ update(id: number, data: Object): Promise<any>;
9
+ delete(id: number): Promise<any>;
10
+ add(data: Object): Promise<any>;
11
+ fields(fields: string[]): import("@hostlink/light").Field[];
12
+ get(filters: any, fields: import("@hostlink/light").Fields): Promise<any>;
13
+ list(fields: Record<string, any>): {
14
+ fetch(): Promise<any[]>;
15
+ fetchFirst(): Promise<any>;
16
+ first(): Promise<any>;
17
+ all(): Promise<any[]>;
18
+ fetchWithMeta(): Promise<any>;
19
+ dataPath(dataPath?: string): {
20
+ first(): Promise<any>;
21
+ all(): Promise<any[]>;
22
+ fetchFirst(): Promise<any>;
23
+ fetchWithMeta(): Promise<any>;
24
+ fetch(): Promise<any[]>;
25
+ dataPath(dataPath?: string): any;
26
+ sort(sortStr: string): any;
27
+ filters(filterObj: Record<string, any>): any;
28
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
29
+ whereContains(field: string, val: any): any;
30
+ whereIn(field: string, vals: any[]): any;
31
+ whereBetween(field: string, min: any, max: any): any;
32
+ limit(n: number): any;
33
+ offset(n: number): any;
34
+ toQuery(includeMeta?: boolean): any;
35
+ };
36
+ sort(sortStr: string): {
37
+ first(): Promise<any>;
38
+ all(): Promise<any[]>;
39
+ fetchFirst(): Promise<any>;
40
+ fetchWithMeta(): Promise<any>;
41
+ fetch(): Promise<any[]>;
42
+ dataPath(dataPath?: string): any;
43
+ sort(sortStr: string): any;
44
+ filters(filterObj: Record<string, any>): any;
45
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
46
+ whereContains(field: string, val: any): any;
47
+ whereIn(field: string, vals: any[]): any;
48
+ whereBetween(field: string, min: any, max: any): any;
49
+ limit(n: number): any;
50
+ offset(n: number): any;
51
+ toQuery(includeMeta?: boolean): any;
52
+ };
53
+ filters(filterObj: Record<string, any>): {
54
+ first(): Promise<any>;
55
+ all(): Promise<any[]>;
56
+ fetchFirst(): Promise<any>;
57
+ fetchWithMeta(): Promise<any>;
58
+ fetch(): Promise<any[]>;
59
+ dataPath(dataPath?: string): any;
60
+ sort(sortStr: string): any;
61
+ filters(filterObj: Record<string, any>): any;
62
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
63
+ whereContains(field: string, val: any): any;
64
+ whereIn(field: string, vals: any[]): any;
65
+ whereBetween(field: string, min: any, max: any): any;
66
+ limit(n: number): any;
67
+ offset(n: number): any;
68
+ toQuery(includeMeta?: boolean): any;
69
+ };
70
+ where(key: string, opOrVal?: any, maybeVal?: any): {
71
+ first(): Promise<any>;
72
+ all(): Promise<any[]>;
73
+ fetchFirst(): Promise<any>;
74
+ fetchWithMeta(): Promise<any>;
75
+ fetch(): Promise<any[]>;
76
+ dataPath(dataPath?: string): any;
77
+ sort(sortStr: string): any;
78
+ filters(filterObj: Record<string, any>): any;
79
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
80
+ whereContains(field: string, val: any): any;
81
+ whereIn(field: string, vals: any[]): any;
82
+ whereBetween(field: string, min: any, max: any): any;
83
+ limit(n: number): any;
84
+ offset(n: number): any;
85
+ toQuery(includeMeta?: boolean): any;
86
+ };
87
+ whereContains(field: string, val: any): {
88
+ first(): Promise<any>;
89
+ all(): Promise<any[]>;
90
+ fetchFirst(): Promise<any>;
91
+ fetchWithMeta(): Promise<any>;
92
+ fetch(): Promise<any[]>;
93
+ dataPath(dataPath?: string): any;
94
+ sort(sortStr: string): any;
95
+ filters(filterObj: Record<string, any>): any;
96
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
97
+ whereContains(field: string, val: any): any;
98
+ whereIn(field: string, vals: any[]): any;
99
+ whereBetween(field: string, min: any, max: any): any;
100
+ limit(n: number): any;
101
+ offset(n: number): any;
102
+ toQuery(includeMeta?: boolean): any;
103
+ };
104
+ whereIn(field: string, vals: any[]): {
105
+ first(): Promise<any>;
106
+ all(): Promise<any[]>;
107
+ fetchFirst(): Promise<any>;
108
+ fetchWithMeta(): Promise<any>;
109
+ fetch(): Promise<any[]>;
110
+ dataPath(dataPath?: string): any;
111
+ sort(sortStr: string): any;
112
+ filters(filterObj: Record<string, any>): any;
113
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
114
+ whereContains(field: string, val: any): any;
115
+ whereIn(field: string, vals: any[]): any;
116
+ whereBetween(field: string, min: any, max: any): any;
117
+ limit(n: number): any;
118
+ offset(n: number): any;
119
+ toQuery(includeMeta?: boolean): any;
120
+ };
121
+ whereBetween(field: string, min: any, max: any): {
122
+ first(): Promise<any>;
123
+ all(): Promise<any[]>;
124
+ fetchFirst(): Promise<any>;
125
+ fetchWithMeta(): Promise<any>;
126
+ fetch(): Promise<any[]>;
127
+ dataPath(dataPath?: string): any;
128
+ sort(sortStr: string): any;
129
+ filters(filterObj: Record<string, any>): any;
130
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
131
+ whereContains(field: string, val: any): any;
132
+ whereIn(field: string, vals: any[]): any;
133
+ whereBetween(field: string, min: any, max: any): any;
134
+ limit(n: number): any;
135
+ offset(n: number): any;
136
+ toQuery(includeMeta?: boolean): any;
137
+ };
138
+ limit(n: number): {
139
+ first(): Promise<any>;
140
+ all(): Promise<any[]>;
141
+ fetchFirst(): Promise<any>;
142
+ fetchWithMeta(): Promise<any>;
143
+ fetch(): Promise<any[]>;
144
+ dataPath(dataPath?: string): any;
145
+ sort(sortStr: string): any;
146
+ filters(filterObj: Record<string, any>): any;
147
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
148
+ whereContains(field: string, val: any): any;
149
+ whereIn(field: string, vals: any[]): any;
150
+ whereBetween(field: string, min: any, max: any): any;
151
+ limit(n: number): any;
152
+ offset(n: number): any;
153
+ toQuery(includeMeta?: boolean): any;
154
+ };
155
+ offset(n: number): {
156
+ first(): Promise<any>;
157
+ all(): Promise<any[]>;
158
+ fetchFirst(): Promise<any>;
159
+ fetchWithMeta(): Promise<any>;
160
+ fetch(): Promise<any[]>;
161
+ dataPath(dataPath?: string): any;
162
+ sort(sortStr: string): any;
163
+ filters(filterObj: Record<string, any>): any;
164
+ where(key: string, opOrVal?: any, maybeVal?: any): any;
165
+ whereContains(field: string, val: any): any;
166
+ whereIn(field: string, vals: any[]): any;
167
+ whereBetween(field: string, min: any, max: any): any;
168
+ limit(n: number): any;
169
+ offset(n: number): any;
170
+ toQuery(includeMeta?: boolean): any;
171
+ };
172
+ toQuery(includeMeta?: boolean): any;
173
+ };
174
+ }, never> & Omit<{
175
+ columns(fields: string[] | {
176
+ [key: string]: boolean;
177
+ }): Array<LTableColumn>;
178
+ }, never> & {};
2
179
  export default _default;
@@ -2,7 +2,6 @@ import { getModel } from "@hostlink/light";
2
2
  import defu from "defu";
3
3
  export default (name) => {
4
4
  const m = getModel(name);
5
- console.log(m.getDataPath());
6
5
  return defu(m, {
7
6
  columns(fields) {
8
7
  let columns = [];
@@ -46,8 +46,7 @@ export default defineLightModel({
46
46
  searchType: "date"
47
47
  },
48
48
  roles: {
49
- label: "Roles",
50
- format: (value) => value.join(", ")
49
+ label: "Roles"
51
50
  },
52
51
  status: {
53
52
  label: "Status",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.54.3",
3
+ "version": "1.54.5",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,7 +54,7 @@
54
54
  "@nuxt/schema": "^4.2.1",
55
55
  "@nuxt/test-utils": "^3.17.2",
56
56
  "@types/node": "^24.10.1",
57
- "changelogen": "^0.5.4",
57
+ "changelogen": "^0.5.7",
58
58
  "eslint": "^9.39.1",
59
59
  "nuxt": "^4.2.1",
60
60
  "typescript": "^5.9.2",