@finema/core 1.3.34 → 1.3.36
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 +83 -1
- package/dist/runtime/components/Table/ColumnImage.vue +13 -13
- package/dist/runtime/components/Table/ColumnNumber.vue +14 -14
- package/dist/runtime/utils/lodash.d.ts +1 -0
- package/dist/runtime/utils/lodash.mjs +18 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { defineNuxtModule, createResolver, installModule, addPlugin, addComponen
|
|
|
2
2
|
import { merge } from 'lodash-es';
|
|
3
3
|
|
|
4
4
|
const name = "@finema/core";
|
|
5
|
-
const version = "1.3.
|
|
5
|
+
const version = "1.3.36";
|
|
6
6
|
|
|
7
7
|
const colors = {
|
|
8
8
|
black: "#20243E",
|
|
@@ -68,6 +68,24 @@ const colors = {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
const _merge = merge;
|
|
71
|
+
const isObj = (item) => item && typeof item === "object" && !Array.isArray(item);
|
|
72
|
+
const _deepMerge = (target, ...sources) => {
|
|
73
|
+
if (!sources.length)
|
|
74
|
+
return target;
|
|
75
|
+
const source = sources.shift();
|
|
76
|
+
if (isObj(target) && isObj(source)) {
|
|
77
|
+
for (const key in source) {
|
|
78
|
+
if (isObj(source[key])) {
|
|
79
|
+
if (!target[key])
|
|
80
|
+
Object.assign(target, { [key]: {} });
|
|
81
|
+
_deepMerge(target[key], source[key]);
|
|
82
|
+
} else {
|
|
83
|
+
Object.assign(target, { [key]: source[key] });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return _deepMerge(target, ...sources);
|
|
88
|
+
};
|
|
71
89
|
|
|
72
90
|
const pagination = {
|
|
73
91
|
default: {
|
|
@@ -183,6 +201,70 @@ const module = defineNuxtModule({
|
|
|
183
201
|
pagination
|
|
184
202
|
});
|
|
185
203
|
nuxt.options.appConfig.ui.strategy = "override";
|
|
204
|
+
nuxt.options.runtimeConfig = _deepMerge(
|
|
205
|
+
{},
|
|
206
|
+
{
|
|
207
|
+
public: {
|
|
208
|
+
baseAPI: process.env.APP_BASE_API,
|
|
209
|
+
baseAPIMock: process.env.APP_BASE_API_MOCK,
|
|
210
|
+
baseInternalAPI: process.env.APP_BASE_INTERNAL_API,
|
|
211
|
+
port: process.env.PORT || "3000"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
nuxt.options.runtimeConfig
|
|
215
|
+
);
|
|
216
|
+
nuxt.options.app = _deepMerge(
|
|
217
|
+
{},
|
|
218
|
+
{
|
|
219
|
+
head: {
|
|
220
|
+
htmlAttrs: {
|
|
221
|
+
lang: "en"
|
|
222
|
+
},
|
|
223
|
+
meta: [
|
|
224
|
+
{ charset: "utf-8" },
|
|
225
|
+
{
|
|
226
|
+
name: "viewport",
|
|
227
|
+
content: "width=device-width, initial-scale=1"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
id: "description",
|
|
231
|
+
name: "description",
|
|
232
|
+
content: ""
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "format-detection",
|
|
236
|
+
content: "telephone=no"
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
link: [
|
|
240
|
+
{
|
|
241
|
+
rel: "preconnect",
|
|
242
|
+
href: "https://fonts.googleapis.com"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
rel: "preconnect",
|
|
246
|
+
href: "https://fonts.gstatic.com",
|
|
247
|
+
crossorigin: ""
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
rel: "dns-prefetch",
|
|
251
|
+
href: "https://www.google-analytics.com/"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
rel: "preconnect",
|
|
255
|
+
href: "https://www.google-analytics.com/",
|
|
256
|
+
crossorigin: ""
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
rel: "icon",
|
|
260
|
+
type: "image/x-icon",
|
|
261
|
+
href: "/favicon.ico"
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
nuxt.options.app
|
|
267
|
+
);
|
|
186
268
|
await installModule("@pinia/nuxt");
|
|
187
269
|
await installModule("@vee-validate/nuxt", {
|
|
188
270
|
// disable or enable auto imports
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<template><img class="h-12" :src="getValue" /></template>
|
|
2
|
-
<script lang="ts" setup>
|
|
3
|
-
import { computed } from 'vue'
|
|
4
|
-
import { type IColumn } from '#core/components/Table/types'
|
|
5
|
-
|
|
6
|
-
const props = defineProps<{
|
|
7
|
-
value: any
|
|
8
|
-
row: any
|
|
9
|
-
column: IColumn
|
|
10
|
-
}>()
|
|
11
|
-
|
|
12
|
-
const getValue = computed(() => props.value)
|
|
13
|
-
</script>
|
|
1
|
+
<template><img class="h-12" :src="getValue" /></template>
|
|
2
|
+
<script lang="ts" setup>
|
|
3
|
+
import { computed } from 'vue'
|
|
4
|
+
import { type IColumn } from '#core/components/Table/types'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
value: any
|
|
8
|
+
row: any
|
|
9
|
+
column: IColumn
|
|
10
|
+
}>()
|
|
11
|
+
|
|
12
|
+
const getValue = computed(() => props.value)
|
|
13
|
+
</script>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<template>{{ getValue }}</template>
|
|
2
|
-
<script lang="ts" setup>
|
|
3
|
-
import { StringHelper } from '../../utils/StringHelper'
|
|
4
|
-
import { computed } from 'vue'
|
|
5
|
-
import { type IColumn } from '#core/components/Table/types'
|
|
6
|
-
|
|
7
|
-
const props = defineProps<{
|
|
8
|
-
value: any
|
|
9
|
-
row: any
|
|
10
|
-
column: IColumn
|
|
11
|
-
}>()
|
|
12
|
-
|
|
13
|
-
const getValue = computed(() => StringHelper.withComma(props.value))
|
|
14
|
-
</script>
|
|
1
|
+
<template>{{ getValue }}</template>
|
|
2
|
+
<script lang="ts" setup>
|
|
3
|
+
import { StringHelper } from '../../utils/StringHelper'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
|
+
import { type IColumn } from '#core/components/Table/types'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
value: any
|
|
9
|
+
row: any
|
|
10
|
+
column: IColumn
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const getValue = computed(() => StringHelper.withComma(props.value))
|
|
14
|
+
</script>
|
|
@@ -108,3 +108,4 @@ export declare const _fromPairs: {
|
|
|
108
108
|
export declare const _xor: <T>(...arrays: (import("lodash").List<T> | null | undefined)[]) => T[];
|
|
109
109
|
export declare const _clone: (object: any) => any;
|
|
110
110
|
export declare const _debounce: <T extends (...args: any[]) => any>(func: T, wait?: number) => import("lodash").DebouncedFunc<T>;
|
|
111
|
+
export declare const _deepMerge: (target: any, ...sources: any[]) => any;
|
|
@@ -67,3 +67,21 @@ export const _clone = (object) => {
|
|
|
67
67
|
export const _debounce = (func, wait = 150) => {
|
|
68
68
|
return debounce(func, wait);
|
|
69
69
|
};
|
|
70
|
+
const isObj = (item) => item && typeof item === "object" && !Array.isArray(item);
|
|
71
|
+
export const _deepMerge = (target, ...sources) => {
|
|
72
|
+
if (!sources.length)
|
|
73
|
+
return target;
|
|
74
|
+
const source = sources.shift();
|
|
75
|
+
if (isObj(target) && isObj(source)) {
|
|
76
|
+
for (const key in source) {
|
|
77
|
+
if (isObj(source[key])) {
|
|
78
|
+
if (!target[key])
|
|
79
|
+
Object.assign(target, { [key]: {} });
|
|
80
|
+
_deepMerge(target[key], source[key]);
|
|
81
|
+
} else {
|
|
82
|
+
Object.assign(target, { [key]: source[key] });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return _deepMerge(target, ...sources);
|
|
87
|
+
};
|