@finema/core 1.4.165 → 1.4.167
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 +1 -1
- package/dist/module.mjs +123 -318
- package/dist/runtime/components/Form/InputNumber/index.vue +2 -2
- package/dist/runtime/components/Form/InputText/index.vue +3 -2
- package/dist/runtime/components/Table/Base.vue +7 -1
- package/dist/runtime/composables/useFlexDeck.d.ts +1 -1
- package/dist/runtime/composables/useTable.d.ts +1 -1
- package/dist/runtime/helpers/componentHelper.mjs +2 -4
- package/dist/runtime/utils/lodash.d.ts +0 -1
- package/dist/runtime/utils/lodash.mjs +0 -18
- package/package.json +8 -10
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,265 +1,8 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, installModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
2
|
+
import { defu } from 'defu';
|
|
2
3
|
|
|
3
4
|
const name = "@finema/core";
|
|
4
|
-
const version = "1.4.
|
|
5
|
-
|
|
6
|
-
const colors = {
|
|
7
|
-
black: "#20243E",
|
|
8
|
-
white: "#FFFFFF",
|
|
9
|
-
dark: {
|
|
10
|
-
DEFAULT: "#20243E",
|
|
11
|
-
50: "#6D7280",
|
|
12
|
-
100: "#505050"
|
|
13
|
-
},
|
|
14
|
-
light: {
|
|
15
|
-
DEFAULT: "#FAFAFA"
|
|
16
|
-
},
|
|
17
|
-
gray: {
|
|
18
|
-
DEFAULT: "#9095A6",
|
|
19
|
-
disabled: "#C1C4D0",
|
|
20
|
-
border: "#E2E4EA",
|
|
21
|
-
fill: "#F4F5FA",
|
|
22
|
-
50: "#E0E0E0",
|
|
23
|
-
600: "#616161"
|
|
24
|
-
},
|
|
25
|
-
secondary: {
|
|
26
|
-
DEFAULT: "#EE8B36",
|
|
27
|
-
50: "#fdf1e7",
|
|
28
|
-
100: "#f9d6b8",
|
|
29
|
-
200: "#f5bb89",
|
|
30
|
-
300: "#f1a05a",
|
|
31
|
-
400: "#ed852b",
|
|
32
|
-
500: "#d46b12",
|
|
33
|
-
600: "#a5540e",
|
|
34
|
-
700: "#763c0a",
|
|
35
|
-
800: "#472406",
|
|
36
|
-
900: "#180c02"
|
|
37
|
-
},
|
|
38
|
-
info: {
|
|
39
|
-
DEFAULT: "#0D8CEE",
|
|
40
|
-
50: "#F3F9FE",
|
|
41
|
-
100: "#E7F4FD",
|
|
42
|
-
200: "#C3E2FB",
|
|
43
|
-
300: "#9ED1F8",
|
|
44
|
-
400: "#56AFF3",
|
|
45
|
-
500: "#0D8CEE",
|
|
46
|
-
600: "#0C7ED6",
|
|
47
|
-
700: "#08548F",
|
|
48
|
-
800: "#063F6B",
|
|
49
|
-
900: "#042A47"
|
|
50
|
-
},
|
|
51
|
-
danger: {
|
|
52
|
-
DEFAULT: "#F25555",
|
|
53
|
-
50: "#FEF7F7",
|
|
54
|
-
100: "#FEEEEE",
|
|
55
|
-
200: "#FCD5D5",
|
|
56
|
-
300: "#FABBBB",
|
|
57
|
-
400: "#F68888",
|
|
58
|
-
500: "#F25555",
|
|
59
|
-
600: "#DA4D4D",
|
|
60
|
-
700: "#913333",
|
|
61
|
-
800: "#6D2626",
|
|
62
|
-
900: "#491A1A"
|
|
63
|
-
},
|
|
64
|
-
success: {
|
|
65
|
-
DEFAULT: "#3FB061",
|
|
66
|
-
50: "#F5FBF7",
|
|
67
|
-
100: "#ECF7EF",
|
|
68
|
-
200: "#CFEBD8",
|
|
69
|
-
300: "#B2DFC0",
|
|
70
|
-
400: "#79C890",
|
|
71
|
-
500: "#3FB061",
|
|
72
|
-
600: "#399E57",
|
|
73
|
-
700: "#266A3A",
|
|
74
|
-
800: "#1C4F2C",
|
|
75
|
-
900: "#13351D"
|
|
76
|
-
},
|
|
77
|
-
warning: {
|
|
78
|
-
DEFAULT: "#FF9A35",
|
|
79
|
-
50: "#FFFAF5",
|
|
80
|
-
100: "#FFF5EB",
|
|
81
|
-
200: "#FFE6CD",
|
|
82
|
-
300: "#FFD7AE",
|
|
83
|
-
400: "#FFB872",
|
|
84
|
-
500: "#FF9A35",
|
|
85
|
-
600: "#E68B30",
|
|
86
|
-
700: "#995C20",
|
|
87
|
-
800: "#734518",
|
|
88
|
-
900: "#4D2E10"
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
const isObj = (item) => item && typeof item === "object" && !Array.isArray(item);
|
|
93
|
-
const _deepMerge = (target, ...sources) => {
|
|
94
|
-
if (!sources.length)
|
|
95
|
-
return target;
|
|
96
|
-
const source = sources.shift();
|
|
97
|
-
if (isObj(target) && isObj(source)) {
|
|
98
|
-
for (const key in source) {
|
|
99
|
-
if (isObj(source[key])) {
|
|
100
|
-
if (!target[key])
|
|
101
|
-
Object.assign(target, { [key]: {} });
|
|
102
|
-
_deepMerge(target[key], source[key]);
|
|
103
|
-
} else {
|
|
104
|
-
Object.assign(target, { [key]: source[key] });
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return _deepMerge(target, ...sources);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
const pagination = {
|
|
112
|
-
wrapper: "flex items-center space-x-1",
|
|
113
|
-
default: {
|
|
114
|
-
size: "sm",
|
|
115
|
-
activeButton: {
|
|
116
|
-
color: "primary",
|
|
117
|
-
class: "rounded-md px-3"
|
|
118
|
-
},
|
|
119
|
-
inactiveButton: {
|
|
120
|
-
color: "primary",
|
|
121
|
-
variant: "ghost",
|
|
122
|
-
class: "rounded-md px-3 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
123
|
-
},
|
|
124
|
-
firstButton: {
|
|
125
|
-
color: "primary",
|
|
126
|
-
variant: "ghost",
|
|
127
|
-
class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
128
|
-
},
|
|
129
|
-
lastButton: {
|
|
130
|
-
color: "primary",
|
|
131
|
-
variant: "ghost",
|
|
132
|
-
class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
133
|
-
},
|
|
134
|
-
prevButton: {
|
|
135
|
-
color: "primary",
|
|
136
|
-
variant: "ghost",
|
|
137
|
-
icon: "i-heroicons-chevron-left-20-solid",
|
|
138
|
-
class: "rtl:[&_span:first-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
139
|
-
},
|
|
140
|
-
nextButton: {
|
|
141
|
-
color: "primary",
|
|
142
|
-
variant: "ghost",
|
|
143
|
-
icon: "i-heroicons-chevron-right-20-solid",
|
|
144
|
-
class: "rtl:[&_span:last-child]:rotate-180 rounded-md px-2 text-gray-500 hover:bg-primary-500 hover:text-white"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
const table = {
|
|
150
|
-
wrapper: "relative overflow-x-auto bg-white rounded-lg",
|
|
151
|
-
base: "min-w-full table-fixed",
|
|
152
|
-
divide: "divide-y divide-y-2 divide-gray-300 dark:divide-gray-700",
|
|
153
|
-
thead: "",
|
|
154
|
-
tbody: "divide-y divide-gray-200 dark:divide-gray-800",
|
|
155
|
-
tr: {
|
|
156
|
-
base: "even:bg-gray-50",
|
|
157
|
-
selected: "bg-gray-50 dark:bg-gray-800/50",
|
|
158
|
-
active: "hover:bg-gray-50 dark:hover:bg-gray-800/50 cursor-pointer"
|
|
159
|
-
},
|
|
160
|
-
th: {
|
|
161
|
-
base: "text-left rtl:text-right",
|
|
162
|
-
padding: "px-3 py-3.5",
|
|
163
|
-
color: "text-gray-700 dark:text-white",
|
|
164
|
-
font: "font-normal",
|
|
165
|
-
size: "text-sm"
|
|
166
|
-
},
|
|
167
|
-
td: {
|
|
168
|
-
base: "whitespace-nowrap",
|
|
169
|
-
padding: "px-3 py-4",
|
|
170
|
-
color: "text-gray-500 dark:text-gray-400",
|
|
171
|
-
font: "",
|
|
172
|
-
size: "text-sm"
|
|
173
|
-
},
|
|
174
|
-
default: {
|
|
175
|
-
sortButton: {
|
|
176
|
-
icon: "i-heroicons-arrows-up-down-20-solid",
|
|
177
|
-
trailing: true,
|
|
178
|
-
square: true,
|
|
179
|
-
color: "gray",
|
|
180
|
-
variant: "ghost",
|
|
181
|
-
class: "-m-1.5 text-gray-700 font-normal"
|
|
182
|
-
},
|
|
183
|
-
loadingState: {
|
|
184
|
-
label: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14..."
|
|
185
|
-
},
|
|
186
|
-
emptyState: {
|
|
187
|
-
label: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
const alert = {
|
|
193
|
-
default: {
|
|
194
|
-
variant: "soft",
|
|
195
|
-
color: "primary"
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
const button = {
|
|
200
|
-
default: {
|
|
201
|
-
size: "md",
|
|
202
|
-
variant: "solid",
|
|
203
|
-
color: "primary",
|
|
204
|
-
loadingIcon: "i-svg-spinners:180-ring"
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
const buttonGroup = {};
|
|
209
|
-
|
|
210
|
-
const formGroup = {
|
|
211
|
-
default: {
|
|
212
|
-
size: "lg"
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
const checkbox = {};
|
|
217
|
-
|
|
218
|
-
const input = {
|
|
219
|
-
default: {
|
|
220
|
-
size: "lg"
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
const select = {
|
|
225
|
-
default: {
|
|
226
|
-
size: "lg"
|
|
227
|
-
}
|
|
228
|
-
};
|
|
229
|
-
|
|
230
|
-
const selectMenu = {
|
|
231
|
-
default: {
|
|
232
|
-
size: "lg"
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
const textarea = {
|
|
237
|
-
default: {
|
|
238
|
-
size: "lg"
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
const toggle = {
|
|
243
|
-
default: {
|
|
244
|
-
size: "lg"
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
const badge = {};
|
|
249
|
-
|
|
250
|
-
const notification = {
|
|
251
|
-
ring: "ring-0",
|
|
252
|
-
progress: {
|
|
253
|
-
base: "hidden"
|
|
254
|
-
},
|
|
255
|
-
actionGroup: {
|
|
256
|
-
wrapper: "mt-5 flex justify-end space-x-4",
|
|
257
|
-
cancelColor: "primary",
|
|
258
|
-
cancelVariant: "outline",
|
|
259
|
-
confirmColor: "primary",
|
|
260
|
-
confirmVariant: "solid"
|
|
261
|
-
}
|
|
262
|
-
};
|
|
5
|
+
const version = "1.4.167";
|
|
263
6
|
|
|
264
7
|
const colorModeOptions = {
|
|
265
8
|
preference: "light"
|
|
@@ -357,6 +100,92 @@ const nuxtRunTimeConfigOptions = {
|
|
|
357
100
|
}
|
|
358
101
|
};
|
|
359
102
|
|
|
103
|
+
const colors = {
|
|
104
|
+
black: "#20243E",
|
|
105
|
+
white: "#FFFFFF",
|
|
106
|
+
dark: {
|
|
107
|
+
DEFAULT: "#20243E",
|
|
108
|
+
50: "#6D7280",
|
|
109
|
+
100: "#505050"
|
|
110
|
+
},
|
|
111
|
+
light: {
|
|
112
|
+
DEFAULT: "#FAFAFA"
|
|
113
|
+
},
|
|
114
|
+
gray: {
|
|
115
|
+
DEFAULT: "#9095A6",
|
|
116
|
+
disabled: "#C1C4D0",
|
|
117
|
+
border: "#E2E4EA",
|
|
118
|
+
fill: "#F4F5FA",
|
|
119
|
+
50: "#E0E0E0",
|
|
120
|
+
600: "#616161"
|
|
121
|
+
},
|
|
122
|
+
secondary: {
|
|
123
|
+
DEFAULT: "#EE8B36",
|
|
124
|
+
50: "#fdf1e7",
|
|
125
|
+
100: "#f9d6b8",
|
|
126
|
+
200: "#f5bb89",
|
|
127
|
+
300: "#f1a05a",
|
|
128
|
+
400: "#ed852b",
|
|
129
|
+
500: "#d46b12",
|
|
130
|
+
600: "#a5540e",
|
|
131
|
+
700: "#763c0a",
|
|
132
|
+
800: "#472406",
|
|
133
|
+
900: "#180c02"
|
|
134
|
+
},
|
|
135
|
+
info: {
|
|
136
|
+
DEFAULT: "#0D8CEE",
|
|
137
|
+
50: "#F3F9FE",
|
|
138
|
+
100: "#E7F4FD",
|
|
139
|
+
200: "#C3E2FB",
|
|
140
|
+
300: "#9ED1F8",
|
|
141
|
+
400: "#56AFF3",
|
|
142
|
+
500: "#0D8CEE",
|
|
143
|
+
600: "#0C7ED6",
|
|
144
|
+
700: "#08548F",
|
|
145
|
+
800: "#063F6B",
|
|
146
|
+
900: "#042A47"
|
|
147
|
+
},
|
|
148
|
+
danger: {
|
|
149
|
+
DEFAULT: "#F25555",
|
|
150
|
+
50: "#FEF7F7",
|
|
151
|
+
100: "#FEEEEE",
|
|
152
|
+
200: "#FCD5D5",
|
|
153
|
+
300: "#FABBBB",
|
|
154
|
+
400: "#F68888",
|
|
155
|
+
500: "#F25555",
|
|
156
|
+
600: "#DA4D4D",
|
|
157
|
+
700: "#913333",
|
|
158
|
+
800: "#6D2626",
|
|
159
|
+
900: "#491A1A"
|
|
160
|
+
},
|
|
161
|
+
success: {
|
|
162
|
+
DEFAULT: "#3FB061",
|
|
163
|
+
50: "#F5FBF7",
|
|
164
|
+
100: "#ECF7EF",
|
|
165
|
+
200: "#CFEBD8",
|
|
166
|
+
300: "#B2DFC0",
|
|
167
|
+
400: "#79C890",
|
|
168
|
+
500: "#3FB061",
|
|
169
|
+
600: "#399E57",
|
|
170
|
+
700: "#266A3A",
|
|
171
|
+
800: "#1C4F2C",
|
|
172
|
+
900: "#13351D"
|
|
173
|
+
},
|
|
174
|
+
warning: {
|
|
175
|
+
DEFAULT: "#FF9A35",
|
|
176
|
+
50: "#FFFAF5",
|
|
177
|
+
100: "#FFF5EB",
|
|
178
|
+
200: "#FFE6CD",
|
|
179
|
+
300: "#FFD7AE",
|
|
180
|
+
400: "#FFB872",
|
|
181
|
+
500: "#FF9A35",
|
|
182
|
+
600: "#E68B30",
|
|
183
|
+
700: "#995C20",
|
|
184
|
+
800: "#734518",
|
|
185
|
+
900: "#4D2E10"
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
|
|
360
189
|
const module = defineNuxtModule({
|
|
361
190
|
meta: {
|
|
362
191
|
name,
|
|
@@ -375,26 +204,18 @@ const module = defineNuxtModule({
|
|
|
375
204
|
nuxt.options.alias["#core"] = runtimeDir;
|
|
376
205
|
nuxt.options.css.push(resolve(runtimeDir, "ui.css"));
|
|
377
206
|
nuxt.hook("tailwindcss:config", (tailwindConfig) => {
|
|
378
|
-
tailwindConfig.
|
|
379
|
-
|
|
207
|
+
tailwindConfig.theme.extend.colors = defu(colors, tailwindConfig.theme.extend.colors);
|
|
208
|
+
tailwindConfig.content = defu(
|
|
380
209
|
{
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
resolve(runtimeDir, "ui.config/**/*.{mjs,js,ts}"),
|
|
391
|
-
resolve(runtimeDir, "presets/**/*.{mjs,js,ts}")
|
|
392
|
-
]
|
|
393
|
-
};
|
|
394
|
-
tailwindConfig.theme.extend.colors = {
|
|
395
|
-
...tailwindConfig.theme.extend.colors,
|
|
396
|
-
...colors
|
|
397
|
-
};
|
|
210
|
+
files: [
|
|
211
|
+
...tailwindConfig.content.files || [],
|
|
212
|
+
resolve(runtimeDir, "components/**/*.{vue,mjs,ts}"),
|
|
213
|
+
resolve(runtimeDir, "composables/**/*.{vue,mjs,ts}"),
|
|
214
|
+
resolve(runtimeDir, "ui.config/**/*.{mjs,js,ts}")
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
tailwindConfig.content
|
|
218
|
+
);
|
|
398
219
|
});
|
|
399
220
|
await installModule("@nuxt/ui", {
|
|
400
221
|
safelistColors: ["secondary", "success", "info", "danger", "warning"]
|
|
@@ -403,50 +224,34 @@ const module = defineNuxtModule({
|
|
|
403
224
|
prefix: "_",
|
|
404
225
|
upperAfterPrefix: false
|
|
405
226
|
});
|
|
406
|
-
nuxt.options.
|
|
227
|
+
nuxt.options.app = defu(nuxtAppOptions, nuxt.options.app);
|
|
228
|
+
nuxt.options.colorMode = defu(colorModeOptions, nuxt.options.colorMode);
|
|
229
|
+
nuxt.options.devtools = defu({ enabled: true }, nuxt.options.devtools);
|
|
230
|
+
nuxt.options.runtimeConfig = defu(nuxtRunTimeConfigOptions, nuxt.options.runtimeConfig);
|
|
231
|
+
nuxt.options.build = defu(
|
|
407
232
|
{
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
checkbox,
|
|
415
|
-
input,
|
|
416
|
-
select,
|
|
417
|
-
selectMenu,
|
|
418
|
-
textarea,
|
|
419
|
-
toggle,
|
|
420
|
-
badge,
|
|
421
|
-
notification,
|
|
422
|
-
icons: {
|
|
423
|
-
dynamic: true
|
|
424
|
-
}
|
|
233
|
+
transpile: [
|
|
234
|
+
...nuxt.options.build?.transpile || [],
|
|
235
|
+
"date-fns",
|
|
236
|
+
"@vuepic/vue-datepicker",
|
|
237
|
+
"defu"
|
|
238
|
+
]
|
|
425
239
|
},
|
|
426
|
-
nuxt.options.
|
|
240
|
+
nuxt.options.build
|
|
427
241
|
);
|
|
428
|
-
nuxt.options.
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
242
|
+
nuxt.options.vite = defu(
|
|
243
|
+
{
|
|
244
|
+
optimizeDeps: {
|
|
245
|
+
include: [
|
|
246
|
+
...nuxt.options.vite?.optimizeDeps?.include || [],
|
|
247
|
+
"quill",
|
|
248
|
+
"@vueup/vue-quill",
|
|
249
|
+
"@wdns/vue-code-block"
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
nuxt.options.vite
|
|
436
254
|
);
|
|
437
|
-
nuxt.options.build = _deepMerge({}, nuxt.options.build, {
|
|
438
|
-
transpile: [...nuxt.options.build?.transpile || [], "date-fns", "@vuepic/vue-datepicker"]
|
|
439
|
-
});
|
|
440
|
-
nuxt.options.vite = _deepMerge({}, nuxt.options.vite, {
|
|
441
|
-
optimizeDeps: {
|
|
442
|
-
include: [
|
|
443
|
-
...nuxt.options.vite?.optimizeDeps?.include || [],
|
|
444
|
-
"quill",
|
|
445
|
-
"@vueup/vue-quill",
|
|
446
|
-
"@wdns/vue-code-block"
|
|
447
|
-
]
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
255
|
await installModule("@pinia/nuxt");
|
|
451
256
|
await installModule("@vee-validate/nuxt", veeValidateNuxtOptions);
|
|
452
257
|
if (!options.securityDisabled) {
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
:autofocus="!!autoFocus"
|
|
12
12
|
:icon="icon"
|
|
13
13
|
:readonly="isReadonly"
|
|
14
|
-
:ui="
|
|
14
|
+
:ui="defu(ui, { icon: { trailing: { pointer: '' } } })"
|
|
15
15
|
/>
|
|
16
16
|
</FieldWrapper>
|
|
17
17
|
</template>
|
|
18
18
|
<script lang="ts" setup>
|
|
19
|
-
import { _deepMerge } from '#imports'
|
|
20
19
|
import { useFieldHOC } from '#core/composables/useForm'
|
|
21
20
|
import FieldWrapper from '#core/components/Form/FieldWrapper.vue'
|
|
22
21
|
import type { INumberFieldProps } from '#core/components/Form/InputNumber/types'
|
|
22
|
+
import { defu } from 'defu'
|
|
23
23
|
|
|
24
24
|
const props = withDefaults(defineProps<INumberFieldProps>(), {})
|
|
25
25
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
:autofocus="!!autoFocus"
|
|
19
19
|
:icon="icon"
|
|
20
20
|
:readonly="isReadonly"
|
|
21
|
-
:ui="
|
|
21
|
+
:ui="defu(ui, { icon: { trailing: { pointer: '' } } })"
|
|
22
22
|
>
|
|
23
23
|
<template #trailing>
|
|
24
24
|
<UButton
|
|
@@ -53,11 +53,12 @@
|
|
|
53
53
|
</FieldWrapper>
|
|
54
54
|
</template>
|
|
55
55
|
<script lang="ts" setup>
|
|
56
|
-
import {
|
|
56
|
+
import { ref } from '#imports'
|
|
57
57
|
import { type ITextFieldProps } from '#core/components/Form/InputText/types'
|
|
58
58
|
import { useFieldHOC } from '#core/composables/useForm'
|
|
59
59
|
import FieldWrapper from '#core/components/Form/FieldWrapper.vue'
|
|
60
60
|
import { vMaska } from 'maska'
|
|
61
|
+
import { defu } from 'defu'
|
|
61
62
|
|
|
62
63
|
const props = withDefaults(defineProps<ITextFieldProps>(), {})
|
|
63
64
|
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<UTable
|
|
2
|
+
<UTable
|
|
3
|
+
:loading="status.isLoading"
|
|
4
|
+
:columns="columns"
|
|
5
|
+
:rows="rawData"
|
|
6
|
+
:progress="null as unknown as any"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
>
|
|
3
9
|
<template #loading-state>
|
|
4
10
|
<div class="flex h-60 items-center justify-center">
|
|
5
11
|
<Icon name="i-svg-spinners:180-ring-with-bg" class="text-primary size-8" />
|
|
@@ -6,5 +6,5 @@ export interface IUseFlexDeck<T = object> {
|
|
|
6
6
|
repo: IUsePageLoader<T> | Store<any, any>;
|
|
7
7
|
options?: (() => Partial<IFlexDeckOptions<T>>) | Partial<IFlexDeckOptions<T>>;
|
|
8
8
|
}
|
|
9
|
-
export declare const createFlexDeckOptions: <T = object>(repo: IUsePageLoader<T>, options: IFlexDeckOptions<T
|
|
9
|
+
export declare const createFlexDeckOptions: <T = object>(repo: IUsePageLoader<T>, options: Partial<IFlexDeckOptions<T>>) => IFlexDeckOptions<T>;
|
|
10
10
|
export declare const useFlexDeck: <T = object>(options: IUseFlexDeck<T>) => ComputedRef<IFlexDeckOptions<T>>;
|
|
@@ -17,4 +17,4 @@ export interface IUseTableSimple<T = object> {
|
|
|
17
17
|
}
|
|
18
18
|
export declare const useTable: <T = object>(options: IUseTable<T>) => ComputedRef<ITableOptions<T>>;
|
|
19
19
|
export declare const useTableSimple: <T = object>(options: IUseTableSimple<T>) => ComputedRef<ISimpleTableOptions<T>>;
|
|
20
|
-
export declare const createTableOptions: <T = object>(repo: IUsePageLoader<T>, columns: IColumn[], options: Partial<ITableOptions<T>>, transformItems?: (
|
|
20
|
+
export declare const createTableOptions: <T = object>(repo: IUsePageLoader<T>, columns: IColumn[], options: Partial<ITableOptions<T>>, transformItems?: (items: T[]) => T[]) => ITableOptions<T>;
|
|
@@ -6,15 +6,13 @@ export const checkMaxSize = (file, acceptFileSize = 0) => {
|
|
|
6
6
|
return true;
|
|
7
7
|
};
|
|
8
8
|
export const checkFileType = (file, acceptFileType) => {
|
|
9
|
-
if (!acceptFileType || Array.isArray(acceptFileType) && acceptFileType.length === 0)
|
|
10
|
-
return true;
|
|
9
|
+
if (!acceptFileType || Array.isArray(acceptFileType) && acceptFileType.length === 0) return true;
|
|
11
10
|
const result = [];
|
|
12
11
|
const acceptedTypes = Array.isArray(acceptFileType) ? acceptFileType : acceptFileType.split(",");
|
|
13
12
|
for (const acceptedType of acceptedTypes) {
|
|
14
13
|
if (acceptedType.startsWith(".")) {
|
|
15
14
|
const fileExtension = `.${file.name.split(".").pop()}`;
|
|
16
|
-
if (fileExtension.toLowerCase() === acceptedType.toLowerCase())
|
|
17
|
-
result.push(true);
|
|
15
|
+
if (fileExtension.toLowerCase() === acceptedType.toLowerCase()) result.push(true);
|
|
18
16
|
} else {
|
|
19
17
|
const fileType = acceptedType.split("/");
|
|
20
18
|
const fileExtension = file.type.split("/");
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
const isObj = (item) => item && typeof item === "object" && !Array.isArray(item);
|
|
2
|
-
export const _deepMerge = (target, ...sources) => {
|
|
3
|
-
if (!sources.length)
|
|
4
|
-
return target;
|
|
5
|
-
const source = sources.shift();
|
|
6
|
-
if (isObj(target) && isObj(source)) {
|
|
7
|
-
for (const key in source) {
|
|
8
|
-
if (isObj(source[key])) {
|
|
9
|
-
if (!target[key])
|
|
10
|
-
Object.assign(target, { [key]: {} });
|
|
11
|
-
_deepMerge(target[key], source[key]);
|
|
12
|
-
} else {
|
|
13
|
-
Object.assign(target, { [key]: source[key] });
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return _deepMerge(target, ...sources);
|
|
18
|
-
};
|
|
19
1
|
export const _isEmpty = (value) => {
|
|
20
2
|
if (value === null || value === void 0) {
|
|
21
3
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finema/core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.167",
|
|
4
4
|
"repository": "https://gitlab.finema.co/finema/ui-kit",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Finema Dev Core Team",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"prepare": "husky install"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nuxt/kit": "^3.12.
|
|
39
|
-
"@nuxt/ui": "2.
|
|
38
|
+
"@nuxt/kit": "^3.12.4",
|
|
39
|
+
"@nuxt/ui": "2.18.0",
|
|
40
40
|
"@pinia/nuxt": "^0.5.1",
|
|
41
41
|
"@vee-validate/nuxt": "^4.13.2",
|
|
42
42
|
"@vee-validate/zod": "^4.13.2",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"@wdns/vue-code-block": "^2.3.2",
|
|
46
46
|
"axios": "^1.7.2",
|
|
47
47
|
"date-fns": "^3.3.1",
|
|
48
|
+
"defu": "^6.1.4",
|
|
48
49
|
"i18next": "^23.11.5",
|
|
49
50
|
"maska": "^2.1.11",
|
|
50
51
|
"nuxt-lodash": "^2.5.3",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"@nuxt/devtools": "^1.3.9",
|
|
61
62
|
"@nuxt/eslint-config": "^0.2.0",
|
|
62
63
|
"@nuxt/module-builder": "^0.5.5",
|
|
63
|
-
"@nuxt/schema": "^3.12.
|
|
64
|
+
"@nuxt/schema": "^3.12.4",
|
|
64
65
|
"@nuxt/test-utils": "^3.13.1",
|
|
65
66
|
"@release-it/conventional-changelog": "^8.0.1",
|
|
66
67
|
"@types/node": "^20.10.17",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"happy-dom": "^13.0.0",
|
|
72
73
|
"husky": "^9.0.11",
|
|
73
74
|
"lint-staged": "^15.2.0",
|
|
74
|
-
"nuxt": "^3.12.
|
|
75
|
+
"nuxt": "^3.12.4",
|
|
75
76
|
"playwright-core": "^1.42.1",
|
|
76
77
|
"prettier": "^3.1.1",
|
|
77
78
|
"release-it": "^17.0.1",
|
|
@@ -79,11 +80,8 @@
|
|
|
79
80
|
"stylelint": "^16.1.0",
|
|
80
81
|
"stylelint-config-prettier-scss": "^1.0.0",
|
|
81
82
|
"stylelint-config-standard-scss": "^13.0.0",
|
|
82
|
-
"vitest": "^
|
|
83
|
-
"vue": "^3.4.
|
|
84
|
-
},
|
|
85
|
-
"resolutions": {
|
|
86
|
-
"@nuxtjs/tailwindcss": "6.11.4"
|
|
83
|
+
"vitest": "^2.0.4",
|
|
84
|
+
"vue": "^3.4.34"
|
|
87
85
|
},
|
|
88
86
|
"lint-staged": {
|
|
89
87
|
"*.{ts,vue,tsx,js}": "eslint --fix --cache"
|