@hostlink/nuxt-light 1.13.2 → 1.13.4
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.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -5
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/l-app.vue +4 -3
- package/dist/runtime/components/l-banner.vue +1 -1
- package/dist/runtime/components/l-btn.vue +1 -1
- package/dist/runtime/components/l-card.vue +1 -1
- package/dist/runtime/components/l-checkbox.vue +1 -1
- package/dist/runtime/components/l-editor.vue +1 -1
- package/dist/runtime/components/l-file-manager.vue +12 -8
- package/dist/runtime/components/l-form.vue +1 -1
- package/dist/runtime/components/l-input.vue +1 -1
- package/dist/runtime/components/l-item.vue +1 -1
- package/dist/runtime/components/l-list.vue +1 -1
- package/dist/runtime/components/l-login.vue +24 -22
- package/dist/runtime/components/l-page.vue +1 -1
- package/dist/runtime/components/l-select.vue +1 -1
- package/dist/runtime/components/l-table.vue +2 -2
- package/dist/runtime/components/l-tabs.vue +1 -1
- package/dist/runtime/formkit/Form.vue +1 -1
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime/{index.js → index.mjs} +2 -2
- package/dist/runtime/lib/{SystemValue.js → SystemValue.mjs} +2 -2
- package/dist/runtime/lib/defineLightModel.d.ts +1 -1
- package/dist/runtime/lib/{defineLightModel.js → defineLightModel.mjs} +2 -2
- package/dist/runtime/lib/{f.js → f.mjs} +1 -1
- package/dist/runtime/lib/{getApiUrl.js → getApiUrl.mjs} +1 -1
- package/dist/runtime/lib/{getCurrentUser.js → getCurrentUser.mjs} +1 -1
- package/dist/runtime/lib/{getGQLFields.js → getGQLFields.mjs} +3 -3
- package/dist/runtime/lib/{getID.js → getID.mjs} +1 -1
- package/dist/runtime/lib/{getModelColumns.js → getModelColumns.mjs} +1 -1
- package/dist/runtime/lib/getModelField.d.ts +2 -2
- package/dist/runtime/lib/getModelField.mjs +2 -0
- package/dist/runtime/lib/{getModelFields.js → getModelFields.mjs} +1 -1
- package/dist/runtime/lib/{getObject.js → getObject.mjs} +2 -2
- package/dist/runtime/lib/index.d.ts +23 -25
- package/dist/runtime/lib/index.mjs +35 -0
- package/dist/runtime/lib/{list.js → list.mjs} +2 -3
- package/dist/runtime/lib/{listObject.js → listObject.mjs} +1 -1
- package/dist/runtime/lib/{loadObject.js → loadObject.mjs} +1 -1
- package/dist/runtime/lib/m.mjs +4 -0
- package/dist/runtime/lib/model.d.ts +3 -3
- package/dist/runtime/lib/{model.js → model.mjs} +4 -4
- package/dist/runtime/lib/{q.js → q.mjs} +7 -3
- package/dist/runtime/lib/{sv.js → sv.mjs} +2 -2
- package/dist/runtime/lib/{updateObject.js → updateObject.mjs} +1 -1
- package/dist/runtime/pages/Permission/all.vue +4 -4
- package/dist/runtime/pages/Permission/export.vue +2 -2
- package/dist/runtime/pages/System/database/table.vue +2 -2
- package/dist/runtime/pages/User/index.vue +0 -2
- package/dist/runtime/pages/User/setting/bio-auth.vue +2 -2
- package/dist/runtime/pages/User/setting/password.vue +4 -4
- package/dist/runtime/pages/logout.vue +2 -2
- package/dist/runtime/plugin.d.ts +2 -2
- package/dist/runtime/{plugin.js → plugin.mjs} +13 -14
- package/dist/types.d.mts +16 -1
- package/dist/types.d.ts +16 -1
- package/package.json +14 -10
- package/dist/runtime/lib/getModelField.js +0 -4
- package/dist/runtime/lib/index.js +0 -39
- package/dist/runtime/lib/m.js +0 -4
- /package/dist/runtime/formkit/{index.js → index.mjs} +0 -0
- /package/dist/runtime/lib/{GQLFieldBuilder.js → GQLFieldBuilder.mjs} +0 -0
- /package/dist/runtime/lib/{isGranted.js → isGranted.mjs} +0 -0
- /package/dist/runtime/lib/{t.js → t.mjs} +0 -0
- /package/dist/runtime/lib/{tc2sc.js → tc2sc.mjs} +0 -0
- /package/dist/runtime/lib/{toJson.js → toJson.mjs} +0 -0
- /package/dist/runtime/types/{EventLog.js → EventLog.mjs} +0 -0
- /package/dist/runtime/types/{MailLog.js → MailLog.mjs} +0 -0
- /package/dist/runtime/types/{SystemValue.js → SystemValue.mjs} +0 -0
- /package/dist/runtime/types/{User.js → User.mjs} +0 -0
- /package/dist/runtime/types/{UserLog.js → UserLog.mjs} +0 -0
package/dist/module.d.mts
CHANGED
|
@@ -2,6 +2,6 @@ import * as _nuxt_schema from '@nuxt/schema';
|
|
|
2
2
|
|
|
3
3
|
interface ModuleOptions {
|
|
4
4
|
}
|
|
5
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions
|
|
5
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
6
6
|
|
|
7
7
|
export { type ModuleOptions, _default as default };
|
package/dist/module.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import * as _nuxt_schema from '@nuxt/schema';
|
|
|
2
2
|
|
|
3
3
|
interface ModuleOptions {
|
|
4
4
|
}
|
|
5
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions
|
|
5
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
|
|
6
6
|
|
|
7
7
|
export { type ModuleOptions, _default as default };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -248,6 +248,7 @@ const module = defineNuxtModule({
|
|
|
248
248
|
async setup(options, nuxt) {
|
|
249
249
|
const resolver = createResolver(import.meta.url);
|
|
250
250
|
const { resolve: resolveQuasar } = createResolver(dirname(await resolvePath("quasar/package.json")));
|
|
251
|
+
JSON.parse(await readFile(resolveQuasar("package.json"), "utf-8"));
|
|
251
252
|
const importMap = JSON.parse(await await readFile(resolveQuasar("dist/transforms/import-map.json"), "utf-8"));
|
|
252
253
|
nuxt.options.css.push("quasar/dist/quasar.prod.css");
|
|
253
254
|
nuxt.options.css.push("@quasar/extras/material-icons/material-icons.css");
|
|
@@ -268,7 +269,6 @@ const module = defineNuxtModule({
|
|
|
268
269
|
const index = resolver.resolve("./runtime/index");
|
|
269
270
|
const SystemValue = resolver.resolve("./runtime/lib/SystemValue");
|
|
270
271
|
addImports([
|
|
271
|
-
{ name: "api", from },
|
|
272
272
|
{ name: "id", from },
|
|
273
273
|
{ name: "getID", from },
|
|
274
274
|
{ name: "addObject", from },
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { provide, ref } from 'vue'
|
|
3
3
|
import { useLight, watch } from "#imports";
|
|
4
|
-
|
|
4
|
+
import { useRuntimeConfig } from 'nuxt/app'
|
|
5
|
+
import { setApiUrl } from '@hostlink/light'
|
|
5
6
|
import { useQuasar } from 'quasar'
|
|
6
7
|
import { q } from '#imports'
|
|
7
8
|
import { useRoute } from "vue-router";
|
|
8
|
-
|
|
9
|
+
const config = useRuntimeConfig();
|
|
9
10
|
setApiUrl(config?.public?.apiBase ?? '/api/');
|
|
10
|
-
|
|
11
|
+
|
|
11
12
|
const route = useRoute();
|
|
12
13
|
const light = useLight()
|
|
13
14
|
const quasar = useQuasar()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { type QBannerProps } from 'quasar'
|
|
3
3
|
import { computed, useSlots } from 'vue'
|
|
4
4
|
|
|
5
|
-
export interface LBannerProps extends
|
|
5
|
+
export interface LBannerProps extends QBannerProps {
|
|
6
6
|
icon?: string
|
|
7
7
|
type?: 'primary' | 'secondary' | 'accent' | 'dark' | 'positive' | 'negative' | 'info' | 'warning'
|
|
8
8
|
}
|
|
@@ -4,7 +4,7 @@ import { computed, inject, unref, toRaw } from "vue";
|
|
|
4
4
|
import { useLight } from '#imports';
|
|
5
5
|
import { useI18n } from "vue-i18n";
|
|
6
6
|
|
|
7
|
-
export interface LBtnProps extends
|
|
7
|
+
export interface LBtnProps extends QBtnProps {
|
|
8
8
|
permission?: string;
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -8,7 +8,7 @@ const emit = defineEmits(["close"]);
|
|
|
8
8
|
const minimized = defineModel<boolean>("minimized", { default: false })
|
|
9
9
|
const maximized = defineModel<boolean>("maximized", { default: false })
|
|
10
10
|
|
|
11
|
-
export interface LCardProps extends
|
|
11
|
+
export interface LCardProps extends QCardProps {
|
|
12
12
|
loading?: boolean;
|
|
13
13
|
title?: string;
|
|
14
14
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { computed } from "vue"
|
|
3
3
|
import { type QCheckboxProps } from "quasar"
|
|
4
4
|
|
|
5
|
-
export interface LCheckboxProps extends
|
|
5
|
+
export interface LCheckboxProps extends QCheckboxProps {
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
const emit = defineEmits(["update:modelValue"]);
|
|
@@ -3,7 +3,11 @@ import { useI18n } from "vue-i18n";
|
|
|
3
3
|
import { ref, watch, computed } from 'vue';
|
|
4
4
|
import { useQuasar, format } from 'quasar';
|
|
5
5
|
import { q, m, useLight } from '#imports';
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
fsListFolders, fsCreateFolder, fsDeleteFolder, fsDeleteFile, fsRenameFile, fsRenameFolder, fsReadFile,
|
|
8
|
+
granted
|
|
9
|
+
|
|
10
|
+
} from "@hostlink/light";
|
|
7
11
|
const { humanStorageSize } = format
|
|
8
12
|
|
|
9
13
|
const light = useLight();
|
|
@@ -103,7 +107,7 @@ function toggleLeftDrawer() {
|
|
|
103
107
|
const path = ref(props.base);
|
|
104
108
|
|
|
105
109
|
const onLazyLoad = async ({ node, key, done, fail }) => {
|
|
106
|
-
const data = await
|
|
110
|
+
const data = await fsListFolders(node.path);
|
|
107
111
|
data.map((item) => {
|
|
108
112
|
item.lazy = true;
|
|
109
113
|
return item;
|
|
@@ -135,7 +139,7 @@ const loadItems = async () => {
|
|
|
135
139
|
|
|
136
140
|
let folders = [];
|
|
137
141
|
if (!label.value && !localSearch.value) {
|
|
138
|
-
folders = await
|
|
142
|
+
folders = await fsListFolders(path.value);
|
|
139
143
|
folders = folders.map((item) => {
|
|
140
144
|
item.type = "folder";
|
|
141
145
|
item.lazy = true;
|
|
@@ -275,7 +279,7 @@ const onNewFolder = () => {
|
|
|
275
279
|
},
|
|
276
280
|
cancel: true,
|
|
277
281
|
}).onOk(async (name) => {
|
|
278
|
-
await
|
|
282
|
+
await fsCreateFolder(path.value + "/" + name)
|
|
279
283
|
const items = await loadItems();
|
|
280
284
|
reloadTreeFolder(path.value, items.folders);
|
|
281
285
|
});
|
|
@@ -420,7 +424,7 @@ const onDownloadRow = async (row) => {
|
|
|
420
424
|
const search = ref(null);
|
|
421
425
|
|
|
422
426
|
const reloadStorage = async () => {
|
|
423
|
-
|
|
427
|
+
path.value = props.base;
|
|
424
428
|
|
|
425
429
|
search.value = "";
|
|
426
430
|
localSearch.value = "";
|
|
@@ -429,7 +433,7 @@ const reloadStorage = async () => {
|
|
|
429
433
|
reloadTreeFolder(path.value, items.folders);
|
|
430
434
|
}
|
|
431
435
|
|
|
432
|
-
const permission = await
|
|
436
|
+
const permission = await granted([
|
|
433
437
|
'fs.folder.create', 'fs.folder.delete', 'fs.folder.rename',
|
|
434
438
|
'fs.file.delete', 'fs.file.rename', 'fs.file.upload'
|
|
435
439
|
]);
|
|
@@ -485,8 +489,8 @@ const onPreviewPDF = async (row) => {
|
|
|
485
489
|
}
|
|
486
490
|
|
|
487
491
|
const onClickInfo = async (row) => {
|
|
488
|
-
|
|
489
|
-
|
|
492
|
+
rightDrawerOpen.value = true;
|
|
493
|
+
|
|
490
494
|
}
|
|
491
495
|
|
|
492
496
|
</script>
|
|
@@ -5,7 +5,7 @@ import tc2sc from "../lib/tc2sc";
|
|
|
5
5
|
import { useLight } from '#imports';
|
|
6
6
|
|
|
7
7
|
import type { QInputProps } from "quasar";
|
|
8
|
-
export interface LInputProps extends
|
|
8
|
+
export interface LInputProps extends QInputProps {
|
|
9
9
|
showPassword?: boolean;
|
|
10
10
|
translate?: boolean;
|
|
11
11
|
required?: boolean;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { useLight } from "#imports";
|
|
2
3
|
import { ref, reactive, onMounted } from 'vue'
|
|
3
|
-
import { useQuasar } from 'quasar';
|
|
4
|
+
import { useQuasar, Dialog } from 'quasar';
|
|
4
5
|
import { useI18n } from 'vue-i18n';
|
|
5
|
-
import {
|
|
6
|
+
import { m, notify } from '#imports';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import { login, webauthnLogin } from '@hostlink/light';
|
|
6
10
|
|
|
7
11
|
const light = useLight();
|
|
8
12
|
|
|
@@ -17,14 +21,13 @@ const data = reactive({
|
|
|
17
21
|
username: "", password: "", code: ""
|
|
18
22
|
});
|
|
19
23
|
|
|
20
|
-
const
|
|
24
|
+
const qua = useQuasar()
|
|
21
25
|
|
|
22
26
|
const submit = async () => {
|
|
23
27
|
if (await form1.value.validate()) {
|
|
24
28
|
|
|
25
29
|
try {
|
|
26
|
-
|
|
27
|
-
await api.auth.login(data.username, data.password, data.code)
|
|
30
|
+
await login(data.username, data.password, data.code)
|
|
28
31
|
window.self.location.reload();
|
|
29
32
|
} catch (e) {
|
|
30
33
|
notify(e.message, "negative");
|
|
@@ -34,9 +37,9 @@ const submit = async () => {
|
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
const forgetPassword = async () => {
|
|
37
|
-
|
|
40
|
+
Dialog.create({
|
|
38
41
|
title: i18n.t("Forget password"),
|
|
39
|
-
message:
|
|
42
|
+
message: "Please enter your email address, we will send you a code to reset your password",
|
|
40
43
|
prompt: {
|
|
41
44
|
model: "",
|
|
42
45
|
type: "email",
|
|
@@ -47,12 +50,11 @@ const forgetPassword = async () => {
|
|
|
47
50
|
return;
|
|
48
51
|
}
|
|
49
52
|
|
|
50
|
-
|
|
51
53
|
try {
|
|
52
|
-
await
|
|
53
|
-
|
|
54
|
-
title:
|
|
55
|
-
message:
|
|
54
|
+
await m("forgetPassword", { email: email });
|
|
55
|
+
qua.dialog({
|
|
56
|
+
title: "Enter your code",
|
|
57
|
+
message: "Please enter the code sent to your email, your code will expire in 10 minutes",
|
|
56
58
|
prompt: {
|
|
57
59
|
model: "",
|
|
58
60
|
type: "text"
|
|
@@ -65,9 +67,9 @@ const forgetPassword = async () => {
|
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
if (await m("verifyCode", { code: code, email: email })) {
|
|
68
|
-
|
|
69
|
-
title:
|
|
70
|
-
message:
|
|
70
|
+
qua.dialog({
|
|
71
|
+
title: "Reset password",
|
|
72
|
+
message: "Please enter your new password",
|
|
71
73
|
prompt: {
|
|
72
74
|
model: "",
|
|
73
75
|
type: "password"
|
|
@@ -77,9 +79,9 @@ const forgetPassword = async () => {
|
|
|
77
79
|
return;
|
|
78
80
|
}
|
|
79
81
|
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
message:
|
|
82
|
+
if (await m("resetPassword", { password: password, email: email, code: code })) {
|
|
83
|
+
qua.notify({
|
|
84
|
+
message: "Your password has been reset successfully",
|
|
83
85
|
color: "positive",
|
|
84
86
|
icon: "sym_o_check",
|
|
85
87
|
position: "top",
|
|
@@ -88,8 +90,8 @@ const forgetPassword = async () => {
|
|
|
88
90
|
}
|
|
89
91
|
});
|
|
90
92
|
} else {
|
|
91
|
-
|
|
92
|
-
message:
|
|
93
|
+
qua.notify({
|
|
94
|
+
message: "Your code is invalid",
|
|
93
95
|
color: "negative",
|
|
94
96
|
icon: "sym_o_error",
|
|
95
97
|
position: "top",
|
|
@@ -101,7 +103,7 @@ const forgetPassword = async () => {
|
|
|
101
103
|
|
|
102
104
|
});
|
|
103
105
|
} catch (e) {
|
|
104
|
-
|
|
106
|
+
qua.notify({
|
|
105
107
|
message: e.message,
|
|
106
108
|
color: "negative",
|
|
107
109
|
icon: "sym_o_error",
|
|
@@ -142,7 +144,7 @@ onMounted(() => {
|
|
|
142
144
|
|
|
143
145
|
|
|
144
146
|
if (!window.google) {
|
|
145
|
-
|
|
147
|
+
qua.notify({
|
|
146
148
|
message: "Google login is not available", //set script https://accounts.google.com/gsi/client in nuuxt.config.js
|
|
147
149
|
color: "negative",
|
|
148
150
|
icon: "sym_o_error",
|
|
@@ -9,7 +9,7 @@ const router = useRouter();
|
|
|
9
9
|
const route = useRoute();
|
|
10
10
|
const light = useLight();
|
|
11
11
|
|
|
12
|
-
export interface LPageProps extends
|
|
12
|
+
export interface LPageProps extends QPageProps {
|
|
13
13
|
title?: string;
|
|
14
14
|
backBtn?: boolean;
|
|
15
15
|
editBtn?: boolean;
|
|
@@ -11,7 +11,7 @@ const maximized = defineModel<boolean>("maximized", { default: false })
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
// extends QTableColumn
|
|
14
|
-
export interface LTableColumn extends
|
|
14
|
+
export interface LTableColumn extends QTableColumn {
|
|
15
15
|
searchable?: boolean,
|
|
16
16
|
searchType?: string,
|
|
17
17
|
searchOptions?: Array<any> | Function,
|
|
@@ -23,7 +23,7 @@ export interface LTableColumn extends /* @vue-ignore */ QTableColumn {
|
|
|
23
23
|
const errors = ref<InstanceType<any>>([
|
|
24
24
|
]);
|
|
25
25
|
|
|
26
|
-
export interface LTableProps extends
|
|
26
|
+
export interface LTableProps extends QTableProps {
|
|
27
27
|
columns?: Array<LTableColumn>,
|
|
28
28
|
actions?: Array<string>,
|
|
29
29
|
sortBy?: string | null | undefined,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { QTabsProps } from 'quasar';
|
|
3
3
|
import { onMounted, useSlots } from '#imports';
|
|
4
4
|
const model = defineModel<string | number | null | undefined>()
|
|
5
|
-
export interface LTabsProps extends
|
|
5
|
+
export interface LTabsProps extends QTabsProps {
|
|
6
6
|
}
|
|
7
7
|
defineProps<LTabsProps>();
|
|
8
8
|
const slots = useSlots()
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ declare const app: {
|
|
|
33
33
|
getCompany: () => string;
|
|
34
34
|
setCompanyLogo: (logo: string) => void;
|
|
35
35
|
getCompanyLogo: () => string;
|
|
36
|
-
getVersion: () =>
|
|
36
|
+
getVersion: () => any;
|
|
37
37
|
addError: (error: String) => void;
|
|
38
38
|
getErrors: () => String[];
|
|
39
39
|
removeError: (error: String) => void;
|
|
@@ -82,7 +82,7 @@ export declare const useLight: (options?: {
|
|
|
82
82
|
getCompany: () => string;
|
|
83
83
|
setCompanyLogo: (logo: string) => void;
|
|
84
84
|
getCompanyLogo: () => string;
|
|
85
|
-
getVersion: () =>
|
|
85
|
+
getVersion: () => any;
|
|
86
86
|
addError: (error: String) => void;
|
|
87
87
|
getErrors: () => String[];
|
|
88
88
|
removeError: (error: String) => void;
|
|
@@ -98,4 +98,4 @@ export declare const useLight: (options?: {
|
|
|
98
98
|
isGranted: (right?: string) => boolean;
|
|
99
99
|
setPermissions: (permissions: Array<string>) => void;
|
|
100
100
|
};
|
|
101
|
-
export * from "./lib
|
|
101
|
+
export * from "./lib";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import packageJson from "../../package.json";
|
|
2
2
|
import { watch, reactive, toRaw } from "vue";
|
|
3
|
-
import { m, q } from "./lib/index.
|
|
3
|
+
import { m, q } from "./lib/index.mjs";
|
|
4
4
|
const errors = [];
|
|
5
5
|
let styles = {};
|
|
6
6
|
const COLOR_CODE = {
|
|
@@ -207,4 +207,4 @@ export const useLight = (options = {}) => {
|
|
|
207
207
|
}
|
|
208
208
|
return app;
|
|
209
209
|
};
|
|
210
|
-
export * from "./lib/index.
|
|
210
|
+
export * from "./lib/index.mjs";
|
|
@@ -19,5 +19,5 @@ export interface LightModel {
|
|
|
19
19
|
name: string;
|
|
20
20
|
fields: LightModelFields;
|
|
21
21
|
}
|
|
22
|
-
declare const _default: (model: LightModel) =>
|
|
22
|
+
declare const _default: (model: LightModel) => any;
|
|
23
23
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineNuxtPlugin } from "#app";
|
|
2
|
-
import {
|
|
2
|
+
import { defineModel } from "@hostlink/light";
|
|
3
3
|
export default (model) => {
|
|
4
4
|
return defineNuxtPlugin(() => {
|
|
5
|
-
|
|
5
|
+
defineModel(model.name, model.fields);
|
|
6
6
|
});
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import GQLFieldBuilder from "./GQLFieldBuilder.
|
|
2
|
-
import {
|
|
1
|
+
import GQLFieldBuilder from "./GQLFieldBuilder.mjs";
|
|
2
|
+
import { getModelField } from "@hostlink/light";
|
|
3
3
|
export default (name, fields) => {
|
|
4
4
|
const builder = GQLFieldBuilder();
|
|
5
5
|
fields.forEach((field) => {
|
|
6
|
-
const modelField =
|
|
6
|
+
const modelField = getModelField(name, field);
|
|
7
7
|
if (modelField) {
|
|
8
8
|
builder.add(modelField.getGQLField());
|
|
9
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export default
|
|
1
|
+
import { getModelField } from "@hostlink/light";
|
|
2
|
+
export default getModelField;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRoute } from "vue-router";
|
|
2
|
-
import loadObject from "./loadObject.
|
|
3
|
-
import { getModelField } from "
|
|
2
|
+
import loadObject from "./loadObject.mjs";
|
|
3
|
+
import { getModelField } from "@hostlink/light";
|
|
4
4
|
export default async function(fields = []) {
|
|
5
5
|
let route = useRoute();
|
|
6
6
|
if (!route.name) {
|
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
7
|
-
export { default as
|
|
8
|
-
export { default as
|
|
9
|
-
export { default as
|
|
10
|
-
export { default as
|
|
11
|
-
export { default as
|
|
12
|
-
export { default as
|
|
13
|
-
export { default as
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
20
|
-
export {
|
|
21
|
-
export { type LightModelField, type LightModel } from "./defineLightModel.js";
|
|
1
|
+
export { default as f } from "./f";
|
|
2
|
+
export { default as getApiUrl } from "./getApiUrl";
|
|
3
|
+
export { default as getCurrentUser } from "./getCurrentUser";
|
|
4
|
+
export { default as getObject } from "./getObject";
|
|
5
|
+
export { default as list } from "./list";
|
|
6
|
+
export { default as m } from "./m";
|
|
7
|
+
export { default as q } from "./q";
|
|
8
|
+
export { default as t } from "./t";
|
|
9
|
+
export { default as updateObject } from "./updateObject";
|
|
10
|
+
export { default as listObject } from "./listObject";
|
|
11
|
+
export { default as loadObject } from "./loadObject";
|
|
12
|
+
export { default as isGranted } from "./isGranted";
|
|
13
|
+
export { default as GQLFieldBuilder } from "./GQLFieldBuilder";
|
|
14
|
+
export { default as getModelField } from "./getModelField";
|
|
15
|
+
export { default as getModelFields } from "./getModelFields";
|
|
16
|
+
export { default as getModelColumns } from "./getModelColumns";
|
|
17
|
+
export { default as sv } from "./sv";
|
|
18
|
+
export { default as model } from "./model";
|
|
19
|
+
export { default as defineLightModel } from "./defineLightModel";
|
|
20
|
+
export { type LightModelField, type LightModel } from "./defineLightModel";
|
|
22
21
|
export declare const notify: (message: string, color?: string) => void;
|
|
23
|
-
export { default as getID } from "./getID
|
|
24
|
-
export { default as id } from "./getID
|
|
22
|
+
export { default as getID } from "./getID";
|
|
23
|
+
export { default as id } from "./getID";
|
|
25
24
|
export declare const getApiBase: () => {};
|
|
26
|
-
export
|
|
27
|
-
export declare const getGQLFields: (name: string, fields: string[]) => any[];
|
|
25
|
+
export { getGQLFields } from '@hostlink/light';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useRuntimeConfig } from "nuxt/app";
|
|
2
|
+
import { Notify } from "quasar";
|
|
3
|
+
export { default as f } from "./f.mjs";
|
|
4
|
+
export { default as getApiUrl } from "./getApiUrl.mjs";
|
|
5
|
+
export { default as getCurrentUser } from "./getCurrentUser.mjs";
|
|
6
|
+
export { default as getObject } from "./getObject.mjs";
|
|
7
|
+
export { default as list } from "./list.mjs";
|
|
8
|
+
export { default as m } from "./m.mjs";
|
|
9
|
+
export { default as q } from "./q.mjs";
|
|
10
|
+
export { default as t } from "./t.mjs";
|
|
11
|
+
export { default as updateObject } from "./updateObject.mjs";
|
|
12
|
+
export { default as listObject } from "./listObject.mjs";
|
|
13
|
+
export { default as loadObject } from "./loadObject.mjs";
|
|
14
|
+
export { default as isGranted } from "./isGranted.mjs";
|
|
15
|
+
export { default as GQLFieldBuilder } from "./GQLFieldBuilder.mjs";
|
|
16
|
+
export { default as getModelField } from "./getModelField.mjs";
|
|
17
|
+
export { default as getModelFields } from "./getModelFields.mjs";
|
|
18
|
+
export { default as getModelColumns } from "./getModelColumns.mjs";
|
|
19
|
+
export { default as sv } from "./sv.mjs";
|
|
20
|
+
export { default as model } from "./model.mjs";
|
|
21
|
+
export { default as defineLightModel } from "./defineLightModel.mjs";
|
|
22
|
+
export const notify = function(message, color = "positive") {
|
|
23
|
+
Notify.create({
|
|
24
|
+
message,
|
|
25
|
+
color,
|
|
26
|
+
position: "top"
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
export { default as getID } from "./getID.mjs";
|
|
30
|
+
export { default as id } from "./getID.mjs";
|
|
31
|
+
export const getApiBase = () => {
|
|
32
|
+
const config = useRuntimeConfig();
|
|
33
|
+
return config?.public?.apiBase ?? "/api/";
|
|
34
|
+
};
|
|
35
|
+
export { getGQLFields } from "@hostlink/light";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { toQuery } from "@hostlink/light";
|
|
2
|
-
import { api } from "./index.js";
|
|
1
|
+
import { query, toQuery } from "@hostlink/light";
|
|
3
2
|
export default async function list(name, props = null, fields = []) {
|
|
4
3
|
let q = {};
|
|
5
4
|
if (props) {
|
|
@@ -32,7 +31,7 @@ export default async function list(name, props = null, fields = []) {
|
|
|
32
31
|
key: true,
|
|
33
32
|
name: true
|
|
34
33
|
};
|
|
35
|
-
const resp = await
|
|
34
|
+
const resp = await query({
|
|
36
35
|
[`list${name}`]: q
|
|
37
36
|
});
|
|
38
37
|
return resp[`list${name}`];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { LTableColumn } from "../components/l-table.vue
|
|
3
|
-
interface LModel extends ReturnType<typeof
|
|
1
|
+
import { model } from "@hostlink/light";
|
|
2
|
+
import type { LTableColumn } from "../components/l-table.vue";
|
|
3
|
+
interface LModel extends ReturnType<typeof model> {
|
|
4
4
|
columns(fields: string[]): Array<LTableColumn>;
|
|
5
5
|
}
|
|
6
6
|
declare const _default: (name: string) => LModel;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { model, getModelField } from "@hostlink/light";
|
|
2
2
|
export default (name) => {
|
|
3
|
-
const m =
|
|
3
|
+
const m = model(name);
|
|
4
4
|
return Object.assign(m, {
|
|
5
5
|
columns(fields) {
|
|
6
6
|
let columns = [];
|
|
7
7
|
if (Array.isArray(fields)) {
|
|
8
8
|
for (let f of fields) {
|
|
9
|
-
const field =
|
|
9
|
+
const field = getModelField(name, f);
|
|
10
10
|
if (!field) continue;
|
|
11
11
|
const option = field.getRaw();
|
|
12
12
|
option.name = field.getName();
|
|
@@ -15,7 +15,7 @@ export default (name) => {
|
|
|
15
15
|
} else {
|
|
16
16
|
for (let f in fields) {
|
|
17
17
|
if (!fields[f]) continue;
|
|
18
|
-
const field =
|
|
18
|
+
const field = getModelField(name, f);
|
|
19
19
|
if (!field) continue;
|
|
20
20
|
const option = field.getRaw();
|
|
21
21
|
option.name = field.getName();
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import f from "./f.mjs";
|
|
2
3
|
import { jsonToGraphQLQuery } from "json-to-graphql-query";
|
|
4
|
+
import { getApiBase } from "./index.mjs";
|
|
3
5
|
import { toQuery } from "@hostlink/light";
|
|
4
|
-
import { api } from "./index.js";
|
|
5
6
|
export default async function(operation, args = null, fields = []) {
|
|
7
|
+
const service = axios.create({
|
|
8
|
+
withCredentials: true
|
|
9
|
+
});
|
|
6
10
|
let query;
|
|
7
11
|
if (operation instanceof Object) {
|
|
8
12
|
query = jsonToGraphQLQuery(toQuery(operation));
|
|
@@ -13,7 +17,7 @@ export default async function(operation, args = null, fields = []) {
|
|
|
13
17
|
}
|
|
14
18
|
query = f(operation, args, fields);
|
|
15
19
|
}
|
|
16
|
-
const resp = (await
|
|
20
|
+
const resp = (await service.post(getApiBase(), {
|
|
17
21
|
query: `{ ${query} }`
|
|
18
22
|
})).data;
|
|
19
23
|
if (resp.errors) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { query } from "@hostlink/light";
|
|
2
2
|
export const cache = {};
|
|
3
3
|
export default (name) => {
|
|
4
4
|
if (cache[name]) {
|
|
5
5
|
return cache[name];
|
|
6
6
|
}
|
|
7
7
|
const p = new Promise(async (resolve, reject) => {
|
|
8
|
-
const resp = await
|
|
8
|
+
const resp = await query({
|
|
9
9
|
systemValue: {
|
|
10
10
|
__args: {
|
|
11
11
|
name
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactive } from 'vue'
|
|
3
|
-
import { m
|
|
3
|
+
import { m } from '#imports'
|
|
4
4
|
import { useI18n } from 'vue-i18n';
|
|
5
|
+
import { query } from '@hostlink/light';
|
|
5
6
|
const { t } = useI18n();
|
|
6
7
|
|
|
7
|
-
const { app, listRole: roles } = await
|
|
8
|
+
const { app, listRole: roles } = await query({
|
|
8
9
|
app: {
|
|
9
10
|
permissions: true
|
|
10
11
|
},
|
|
@@ -77,8 +78,7 @@ const onUpdate = (value, role, permission) => {
|
|
|
77
78
|
</q-td>
|
|
78
79
|
<q-td v-for="role in roles">
|
|
79
80
|
<q-checkbox v-model="props.row[role.name]"
|
|
80
|
-
@update:model-value="onUpdate($event, role.name, props.row.permission)"
|
|
81
|
-
:color="$light.color" />
|
|
81
|
+
@update:model-value="onUpdate($event, role.name, props.row.permission)" :color="$light.color" />
|
|
82
82
|
</q-td>
|
|
83
83
|
</q-tr>
|
|
84
84
|
</template>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactive } from 'vue'
|
|
3
3
|
import { utils, writeFileXLSX } from 'xlsx';
|
|
4
|
-
import {
|
|
4
|
+
import { query } from '@hostlink/light';
|
|
5
5
|
const obj = reactive({
|
|
6
6
|
roles: []
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
const { app, listRole } = await
|
|
9
|
+
const { app, listRole } = await query({
|
|
10
10
|
app: {
|
|
11
11
|
permissions: true
|
|
12
12
|
},
|
|
@@ -4,13 +4,13 @@ import { ref } from "vue"
|
|
|
4
4
|
import { q, m, getCurrentUser } from '#imports'
|
|
5
5
|
const app = await q("app", ["hasBioAuth"]);
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { webauthnRegister } from "@hostlink/light"
|
|
8
8
|
|
|
9
9
|
const data = ref(await q("listWebAuthn", ["uuid", "ip", "user_agent", "createdTime"]));
|
|
10
10
|
|
|
11
11
|
const register = async () => {
|
|
12
12
|
try {
|
|
13
|
-
await
|
|
13
|
+
await webauthnRegister();
|
|
14
14
|
data.value = await q("listWebAuthn", ["uuid", "ip", "user_agent", "createdTime"]);
|
|
15
15
|
const user = await getCurrentUser();
|
|
16
16
|
localStorage.setItem("username", user.username);
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import { useI18n } from 'vue-i18n'
|
|
3
3
|
import { Dialog } from 'quasar'
|
|
4
4
|
import { reset } from "@formkit/core"
|
|
5
|
-
|
|
5
|
+
import { updatePassword } from "@hostlink/light"
|
|
6
6
|
import { computed } from 'vue'
|
|
7
|
-
import { q
|
|
7
|
+
import { q } from "#imports"
|
|
8
8
|
|
|
9
9
|
const { t } = useI18n()
|
|
10
10
|
|
|
11
11
|
const onSubmit = async (data, form) => {
|
|
12
|
-
if (await
|
|
12
|
+
if (await updatePassword(data.old_password, data.new_password)) {
|
|
13
13
|
reset(form);
|
|
14
14
|
await Dialog.create({
|
|
15
15
|
title: "Password updated",
|
|
@@ -35,7 +35,7 @@ const policies = computed(() => {
|
|
|
35
35
|
if (name == "length") {
|
|
36
36
|
return t('Must contain at least {0} characters', [policy.split(":")[1]]);
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
return t(name);
|
|
40
40
|
})
|
|
41
41
|
})
|
package/dist/runtime/plugin.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./assets/main.css
|
|
2
|
-
declare const _default:
|
|
1
|
+
import "./assets/main.css";
|
|
2
|
+
declare const _default: any;
|
|
3
3
|
export default _default;
|
|
@@ -4,25 +4,24 @@ import { defineNuxtPlugin } from "#app";
|
|
|
4
4
|
import "./assets/main.css";
|
|
5
5
|
import message_en from "./locales/en.json";
|
|
6
6
|
import message_zh from "./locales/zh-hk.json";
|
|
7
|
-
import {
|
|
7
|
+
import { defineModel } from "@hostlink/light";
|
|
8
8
|
localStorage.getItem("locale") || localStorage.setItem("locale", "en");
|
|
9
9
|
import { createQuasarPlugin } from "formkit-quasar";
|
|
10
|
-
import { createLightPlugin } from "./formkit/index.
|
|
10
|
+
import { createLightPlugin } from "./formkit/index.mjs";
|
|
11
11
|
import { plugin, defaultConfig } from "@formkit/vue";
|
|
12
|
-
import {
|
|
13
|
-
import TypeUser from "./types/User.
|
|
14
|
-
import TypeUserLog from "./types/UserLog.
|
|
15
|
-
import TypeSystemValue from "./types/SystemValue.
|
|
16
|
-
import TypeMailLog from "./types/MailLog.
|
|
17
|
-
import TypeEventLog from "./types/EventLog.
|
|
12
|
+
import { useLight } from "./index.mjs";
|
|
13
|
+
import TypeUser from "./types/User.mjs";
|
|
14
|
+
import TypeUserLog from "./types/UserLog.mjs";
|
|
15
|
+
import TypeSystemValue from "./types/SystemValue.mjs";
|
|
16
|
+
import TypeMailLog from "./types/MailLog.mjs";
|
|
17
|
+
import TypeEventLog from "./types/EventLog.mjs";
|
|
18
18
|
import { zhTW } from "@formkit/i18n";
|
|
19
19
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
api.models.create("EventLog", TypeEventLog);
|
|
20
|
+
defineModel("User", TypeUser);
|
|
21
|
+
defineModel("UserLog", TypeUserLog);
|
|
22
|
+
defineModel("SystemValue", TypeSystemValue);
|
|
23
|
+
defineModel("MailLog", TypeMailLog);
|
|
24
|
+
defineModel("EventLog", TypeEventLog);
|
|
26
25
|
nuxtApp.vueApp.config.globalProperties.$light = useLight();
|
|
27
26
|
nuxtApp.vueApp.config.errorHandler = (error) => {
|
|
28
27
|
console.log(error);
|
package/dist/types.d.mts
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import type { ModuleOptions } from './module.js'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare module '@nuxt/schema' {
|
|
6
|
+
interface NuxtConfig { ['light']?: Partial<ModuleOptions> }
|
|
7
|
+
interface NuxtOptions { ['light']?: ModuleOptions }
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare module 'nuxt/schema' {
|
|
11
|
+
interface NuxtConfig { ['light']?: Partial<ModuleOptions> }
|
|
12
|
+
interface NuxtOptions { ['light']?: ModuleOptions }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export type { ModuleOptions, default } from './module.js'
|
package/dist/types.d.ts
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import type { ModuleOptions } from './module'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
declare module '@nuxt/schema' {
|
|
6
|
+
interface NuxtConfig { ['light']?: Partial<ModuleOptions> }
|
|
7
|
+
interface NuxtOptions { ['light']?: ModuleOptions }
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
declare module 'nuxt/schema' {
|
|
11
|
+
interface NuxtConfig { ['light']?: Partial<ModuleOptions> }
|
|
12
|
+
interface NuxtOptions { ['light']?: ModuleOptions }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export type { ModuleOptions, default } from './module'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/nuxt-light",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.4",
|
|
4
4
|
"description": "HostLink Nuxt Light Framework",
|
|
5
5
|
"repository": "@hostlink/nuxt-light",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"types": "./dist/types.d.ts",
|
|
11
11
|
"import": "./dist/module.mjs",
|
|
12
12
|
"require": "./dist/module.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./dist": {
|
|
15
|
+
"types": "./dist/runtime/index.d.ts",
|
|
16
|
+
"import": "./dist/runtime/index.mjs"
|
|
13
17
|
}
|
|
14
18
|
},
|
|
15
19
|
"main": "./dist/module.cjs",
|
|
@@ -21,7 +25,7 @@
|
|
|
21
25
|
"prepack": "nuxt-module-build build",
|
|
22
26
|
"dev": "nuxi dev playground --host",
|
|
23
27
|
"dev:build": "nuxi build playground",
|
|
24
|
-
"dev:prepare": "nuxt-module-build build --stub &&
|
|
28
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxi prepare playground",
|
|
25
29
|
"release:org": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
26
30
|
"release": "npm run prepack && changelogen --release && npm publish --access=public && git push --follow-tags",
|
|
27
31
|
"lint": "eslint .",
|
|
@@ -29,28 +33,28 @@
|
|
|
29
33
|
"test:watch": "vitest watch"
|
|
30
34
|
},
|
|
31
35
|
"dependencies": {
|
|
32
|
-
"@formkit/drag-and-drop": "^0.
|
|
33
|
-
"@hostlink/light": "^2.
|
|
34
|
-
"@nuxt/kit": "^3.
|
|
36
|
+
"@formkit/drag-and-drop": "^0.0.36",
|
|
37
|
+
"@hostlink/light": "^1.2.1",
|
|
38
|
+
"@nuxt/kit": "^3.7.4",
|
|
39
|
+
"@nuxt/module-builder": "^0.5.2",
|
|
35
40
|
"@quasar/extras": "^1.16.11",
|
|
36
41
|
"@quasar/vite-plugin": "^1.7.0",
|
|
37
|
-
"axios": "^1.
|
|
42
|
+
"axios": "^1.5.0",
|
|
38
43
|
"diff2html": "^3.4.47",
|
|
39
44
|
"formkit-quasar": "^0.0.15",
|
|
40
45
|
"json-to-graphql-query": "^2.2.5",
|
|
41
|
-
"quasar": "^2.
|
|
46
|
+
"quasar": "^2.15.4",
|
|
42
47
|
"vue-i18n": "^9.2.2",
|
|
43
48
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
|
|
44
49
|
},
|
|
45
50
|
"devDependencies": {
|
|
46
51
|
"@nuxt/devtools": "latest",
|
|
47
52
|
"@nuxt/eslint-config": "^0.2.0",
|
|
48
|
-
"@nuxt/module-builder": "^0.8.3",
|
|
49
53
|
"@nuxt/schema": "^3.7.4",
|
|
50
54
|
"@nuxt/test-utils": "^3.7.0",
|
|
51
|
-
"@types/node": "^
|
|
55
|
+
"@types/node": "^18.17.3",
|
|
52
56
|
"changelogen": "^0.5.4",
|
|
53
57
|
"eslint": "^8.46.0",
|
|
54
58
|
"nuxt": "^3.7.0"
|
|
55
59
|
}
|
|
56
|
-
}
|
|
60
|
+
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { useRuntimeConfig } from "nuxt/app";
|
|
2
|
-
import { Notify } from "quasar";
|
|
3
|
-
import { createClient } from "@hostlink/light";
|
|
4
|
-
export { default as f } from "./f.js";
|
|
5
|
-
export { default as getApiUrl } from "./getApiUrl.js";
|
|
6
|
-
export { default as getCurrentUser } from "./getCurrentUser.js";
|
|
7
|
-
export { default as getObject } from "./getObject.js";
|
|
8
|
-
export { default as list } from "./list.js";
|
|
9
|
-
export { default as m } from "./m.js";
|
|
10
|
-
export { default as q } from "./q.js";
|
|
11
|
-
export { default as t } from "./t.js";
|
|
12
|
-
export { default as updateObject } from "./updateObject.js";
|
|
13
|
-
export { default as listObject } from "./listObject.js";
|
|
14
|
-
export { default as loadObject } from "./loadObject.js";
|
|
15
|
-
export { default as isGranted } from "./isGranted.js";
|
|
16
|
-
export { default as GQLFieldBuilder } from "./GQLFieldBuilder.js";
|
|
17
|
-
export { default as getModelField } from "./getModelField.js";
|
|
18
|
-
export { default as getModelFields } from "./getModelFields.js";
|
|
19
|
-
export { default as getModelColumns } from "./getModelColumns.js";
|
|
20
|
-
export { default as sv } from "./sv.js";
|
|
21
|
-
export { default as model } from "./model.js";
|
|
22
|
-
export { default as defineLightModel } from "./defineLightModel.js";
|
|
23
|
-
export const notify = function(message, color = "positive") {
|
|
24
|
-
Notify.create({
|
|
25
|
-
message,
|
|
26
|
-
color,
|
|
27
|
-
position: "top"
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
export { default as getID } from "./getID.js";
|
|
31
|
-
export { default as id } from "./getID.js";
|
|
32
|
-
export const getApiBase = () => {
|
|
33
|
-
const config = useRuntimeConfig();
|
|
34
|
-
return config?.public?.apiBase ?? "/api/";
|
|
35
|
-
};
|
|
36
|
-
export const api = createClient("");
|
|
37
|
-
export const getGQLFields = (name, fields) => {
|
|
38
|
-
return api.model(name).gqlFields(fields);
|
|
39
|
-
};
|
package/dist/runtime/lib/m.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|