@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.
Files changed (73) hide show
  1. package/dist/module.d.mts +1 -1
  2. package/dist/module.d.ts +1 -1
  3. package/dist/module.json +1 -5
  4. package/dist/module.mjs +1 -1
  5. package/dist/runtime/components/l-app.vue +4 -3
  6. package/dist/runtime/components/l-banner.vue +1 -1
  7. package/dist/runtime/components/l-btn.vue +1 -1
  8. package/dist/runtime/components/l-card.vue +1 -1
  9. package/dist/runtime/components/l-checkbox.vue +1 -1
  10. package/dist/runtime/components/l-editor.vue +1 -1
  11. package/dist/runtime/components/l-file-manager.vue +12 -8
  12. package/dist/runtime/components/l-form.vue +1 -1
  13. package/dist/runtime/components/l-input.vue +1 -1
  14. package/dist/runtime/components/l-item.vue +1 -1
  15. package/dist/runtime/components/l-list.vue +1 -1
  16. package/dist/runtime/components/l-login.vue +24 -22
  17. package/dist/runtime/components/l-page.vue +1 -1
  18. package/dist/runtime/components/l-select.vue +1 -1
  19. package/dist/runtime/components/l-table.vue +2 -2
  20. package/dist/runtime/components/l-tabs.vue +1 -1
  21. package/dist/runtime/formkit/Form.vue +1 -1
  22. package/dist/runtime/index.d.ts +3 -3
  23. package/dist/runtime/{index.js → index.mjs} +2 -2
  24. package/dist/runtime/lib/{SystemValue.js → SystemValue.mjs} +2 -2
  25. package/dist/runtime/lib/defineLightModel.d.ts +1 -1
  26. package/dist/runtime/lib/{defineLightModel.js → defineLightModel.mjs} +2 -2
  27. package/dist/runtime/lib/{f.js → f.mjs} +1 -1
  28. package/dist/runtime/lib/{getApiUrl.js → getApiUrl.mjs} +1 -1
  29. package/dist/runtime/lib/{getCurrentUser.js → getCurrentUser.mjs} +1 -1
  30. package/dist/runtime/lib/{getGQLFields.js → getGQLFields.mjs} +3 -3
  31. package/dist/runtime/lib/{getID.js → getID.mjs} +1 -1
  32. package/dist/runtime/lib/{getModelColumns.js → getModelColumns.mjs} +1 -1
  33. package/dist/runtime/lib/getModelField.d.ts +2 -2
  34. package/dist/runtime/lib/getModelField.mjs +2 -0
  35. package/dist/runtime/lib/{getModelFields.js → getModelFields.mjs} +1 -1
  36. package/dist/runtime/lib/{getObject.js → getObject.mjs} +2 -2
  37. package/dist/runtime/lib/index.d.ts +23 -25
  38. package/dist/runtime/lib/index.mjs +35 -0
  39. package/dist/runtime/lib/{list.js → list.mjs} +2 -3
  40. package/dist/runtime/lib/{listObject.js → listObject.mjs} +1 -1
  41. package/dist/runtime/lib/{loadObject.js → loadObject.mjs} +1 -1
  42. package/dist/runtime/lib/m.mjs +4 -0
  43. package/dist/runtime/lib/model.d.ts +3 -3
  44. package/dist/runtime/lib/{model.js → model.mjs} +4 -4
  45. package/dist/runtime/lib/{q.js → q.mjs} +7 -3
  46. package/dist/runtime/lib/{sv.js → sv.mjs} +2 -2
  47. package/dist/runtime/lib/{updateObject.js → updateObject.mjs} +1 -1
  48. package/dist/runtime/pages/Permission/all.vue +4 -4
  49. package/dist/runtime/pages/Permission/export.vue +2 -2
  50. package/dist/runtime/pages/System/database/table.vue +2 -2
  51. package/dist/runtime/pages/User/index.vue +0 -2
  52. package/dist/runtime/pages/User/setting/bio-auth.vue +2 -2
  53. package/dist/runtime/pages/User/setting/password.vue +4 -4
  54. package/dist/runtime/pages/logout.vue +2 -2
  55. package/dist/runtime/plugin.d.ts +2 -2
  56. package/dist/runtime/{plugin.js → plugin.mjs} +13 -14
  57. package/dist/types.d.mts +16 -1
  58. package/dist/types.d.ts +16 -1
  59. package/package.json +14 -10
  60. package/dist/runtime/lib/getModelField.js +0 -4
  61. package/dist/runtime/lib/index.js +0 -39
  62. package/dist/runtime/lib/m.js +0 -4
  63. /package/dist/runtime/formkit/{index.js → index.mjs} +0 -0
  64. /package/dist/runtime/lib/{GQLFieldBuilder.js → GQLFieldBuilder.mjs} +0 -0
  65. /package/dist/runtime/lib/{isGranted.js → isGranted.mjs} +0 -0
  66. /package/dist/runtime/lib/{t.js → t.mjs} +0 -0
  67. /package/dist/runtime/lib/{tc2sc.js → tc2sc.mjs} +0 -0
  68. /package/dist/runtime/lib/{toJson.js → toJson.mjs} +0 -0
  69. /package/dist/runtime/types/{EventLog.js → EventLog.mjs} +0 -0
  70. /package/dist/runtime/types/{MailLog.js → MailLog.mjs} +0 -0
  71. /package/dist/runtime/types/{SystemValue.js → SystemValue.mjs} +0 -0
  72. /package/dist/runtime/types/{User.js → User.mjs} +0 -0
  73. /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, ModuleOptions, false>;
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, ModuleOptions, false>;
5
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
6
6
 
7
7
  export { type ModuleOptions, _default as default };
package/dist/module.json CHANGED
@@ -1,9 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.13.2",
5
- "builder": {
6
- "@nuxt/module-builder": "0.8.3",
7
- "unbuild": "2.0.0"
8
- }
4
+ "version": "1.13.4"
9
5
  }
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
- //import { useRuntimeConfig } from 'nuxt/app'
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
- /* const config = useRuntimeConfig();
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 /* @vue-ignore */ QBannerProps {
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 /* @vue-ignore */ QBtnProps {
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 /* @vue-ignore */ QCardProps {
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 /* @vue-ignore */ QCheckboxProps {
5
+ export interface LCheckboxProps extends QCheckboxProps {
6
6
  }
7
7
 
8
8
  const emit = defineEmits(["update:modelValue"]);
@@ -27,7 +27,7 @@ const TextHightlightCMD = ((cmd, name) => {
27
27
  edit.focus()
28
28
  })
29
29
 
30
- export interface LEditorProps extends /* @vue-ignore */ QEditorProps {
30
+ export interface LEditorProps extends QEditorProps {
31
31
  }
32
32
 
33
33
  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 { api } from "../lib";
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 api.fs.folders.list(node.path);
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 api.fs.folders.list(path.value);
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 api.fs.folders.create(path.value + "/" + name)
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
- ath.value = props.base;
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 api.auth.granted([
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
- rightDrawerOpen.value = true;
489
-
492
+ rightDrawerOpen.value = true;
493
+
490
494
  }
491
495
 
492
496
  </script>
@@ -2,7 +2,7 @@
2
2
  import { ref } from "vue";
3
3
  import { useRouter, useRoute } from "vue-router";
4
4
  import { useQuasar } from "quasar";
5
- import { model } from "#imports";
5
+ import { model } from "@hostlink/light"
6
6
 
7
7
  const route = useRoute();
8
8
  const router = useRouter();
@@ -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 /* @vue-ignore */ QInputProps {
8
+ export interface LInputProps extends QInputProps {
9
9
  showPassword?: boolean;
10
10
  translate?: boolean;
11
11
  required?: boolean;
@@ -1,7 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import type { QItemProps } from 'quasar';
3
3
 
4
- export interface LItemProps extends /* @vue-ignore */ QItemProps {
4
+ export interface LItemProps extends QItemProps {
5
5
  label?: string;
6
6
  type?: 'text' | 'caption';
7
7
  name?: string;
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { QListProps } from 'quasar';
4
4
 
5
- export interface LListProps extends /* @vue-ignore */ QListProps {
5
+ export interface LListProps extends QListProps {
6
6
  fields?: any[];
7
7
  modelValue?: any;
8
8
  }
@@ -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 { useLight, m, notify, api } from '#imports';
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 quasar = useQuasar()
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
- quasar.dialog({
40
+ Dialog.create({
38
41
  title: i18n.t("Forget password"),
39
- message: i18n.t("Please enter your email address, we will send you a code to reset your password"),
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 api.auth.forgetPassword(email);
53
- quasar.dialog({
54
- title: i18n.t("Enter your code"),
55
- message: i18n.t("Please enter the code sent to your email, your code will expire in 10 minutes"),
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
- quasar.dialog({
69
- title: i18n.t("Reset password"),
70
- message: i18n.t("Please enter your new password"),
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 (api.auth.resetPassword(email, password, code)) {
81
- quasar.notify({
82
- message: i18n.t("Your password has been reset successfully"),
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
- quasar.notify({
92
- message: i18n.t("Your code is invalid"),
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
- quasar.notify({
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
- quasar.notify({
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 /* @vue-ignore */ QPageProps {
12
+ export interface LPageProps extends QPageProps {
13
13
  title?: string;
14
14
  backBtn?: boolean;
15
15
  editBtn?: boolean;
@@ -8,7 +8,7 @@ const emits = defineEmits(["update:modelValue"]);
8
8
 
9
9
  const { t } = useI18n();
10
10
  const light = useLight();
11
- interface LSelectProps extends /* @vue-ignore */ QSelectProps {
11
+ interface LSelectProps extends QSelectProps {
12
12
  required?: boolean,
13
13
  }
14
14
 
@@ -11,7 +11,7 @@ const maximized = defineModel<boolean>("maximized", { default: false })
11
11
 
12
12
 
13
13
  // extends QTableColumn
14
- export interface LTableColumn extends /* @vue-ignore */ QTableColumn {
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 /* @vue-ignore */ QTableProps {
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 /* @vue-ignore */ QTabsProps {
5
+ export interface LTabsProps extends QTabsProps {
6
6
  }
7
7
  defineProps<LTabsProps>();
8
8
  const slots = useSlots()
@@ -2,7 +2,7 @@
2
2
  import { ref } from 'vue'
3
3
  import { useRouter, useRoute } from "vue-router";
4
4
  import { useQuasar } from "quasar";
5
- import { model } from "#imports";
5
+ import { model } from "@hostlink/light"
6
6
 
7
7
  const route = useRoute();
8
8
  const router = useRouter();
@@ -33,7 +33,7 @@ declare const app: {
33
33
  getCompany: () => string;
34
34
  setCompanyLogo: (logo: string) => void;
35
35
  getCompanyLogo: () => string;
36
- getVersion: () => string;
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: () => string;
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.js";
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.js";
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.js";
210
+ export * from "./lib/index.mjs";
@@ -1,5 +1,5 @@
1
- import sv from "./sv.js";
2
- import { cache } from "./sv.js";
1
+ import sv from "./sv.mjs";
2
+ import { cache } from "./sv.mjs";
3
3
  export const loadSV = (name) => {
4
4
  return () => sv(name);
5
5
  };
@@ -19,5 +19,5 @@ export interface LightModel {
19
19
  name: string;
20
20
  fields: LightModelFields;
21
21
  }
22
- declare const _default: (model: LightModel) => import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
22
+ declare const _default: (model: LightModel) => any;
23
23
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { defineNuxtPlugin } from "#app";
2
- import { api } from "./index.js";
2
+ import { defineModel } from "@hostlink/light";
3
3
  export default (model) => {
4
4
  return defineNuxtPlugin(() => {
5
- api.models.create(model.name, model.fields);
5
+ defineModel(model.name, model.fields);
6
6
  });
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import { jsonToGraphQLQuery } from "json-to-graphql-query";
2
- import toJson from "./toJson.js";
2
+ import toJson from "./toJson.mjs";
3
3
  export default function(operation, args, fields = []) {
4
4
  if (arguments.length === 2) {
5
5
  fields = args;
@@ -1,4 +1,4 @@
1
- import { getApiBase } from "./index.js";
1
+ import { getApiBase } from "./index.mjs";
2
2
  export default function getApiUrl(url, params) {
3
3
  const urlParams = new URLSearchParams(params).toString();
4
4
  return getApiBase() + `${url}?${urlParams}`;
@@ -1,4 +1,4 @@
1
- import q from "./q.js";
1
+ import q from "./q.mjs";
2
2
  export default async () => {
3
3
  try {
4
4
  return await q("my", ["username", "first_name", "last_name", "roles"]);
@@ -1,9 +1,9 @@
1
- import GQLFieldBuilder from "./GQLFieldBuilder.js";
2
- import { api } from "./index.js";
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 = api.model(name).field(field);
6
+ const modelField = getModelField(name, field);
7
7
  if (modelField) {
8
8
  builder.add(modelField.getGQLField());
9
9
  }
@@ -1,4 +1,4 @@
1
- import { useLight } from "../index.js";
1
+ import { useLight } from "../index.mjs";
2
2
  export default () => {
3
3
  return useLight().getID();
4
4
  };
@@ -1,4 +1,4 @@
1
- import { getModelField } from "./index.js";
1
+ import { getModelField } from "@hostlink/light";
2
2
  export default (model, names) => {
3
3
  let columns = [];
4
4
  for (let name of names) {
@@ -1,2 +1,2 @@
1
- declare const _default: (name: string, field: string) => import("@hostlink/light").ModelField | null;
2
- export default _default;
1
+ import { getModelField } from "@hostlink/light";
2
+ export default getModelField;
@@ -0,0 +1,2 @@
1
+ import { getModelField } from "@hostlink/light";
2
+ export default getModelField;
@@ -1,4 +1,4 @@
1
- import { getModelField } from "./index.js";
1
+ import { getModelField } from "@hostlink/light";
2
2
  export default (model, names) => {
3
3
  let fields = [];
4
4
  for (let name of names) {
@@ -1,6 +1,6 @@
1
1
  import { useRoute } from "vue-router";
2
- import loadObject from "./loadObject.js";
3
- import { getModelField } from "./index.js";
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
- import type { LightClient } from '@hostlink/light';
2
- export { default as f } from "./f.js";
3
- export { default as getApiUrl } from "./getApiUrl.js";
4
- export { default as getCurrentUser } from "./getCurrentUser.js";
5
- export { default as getObject } from "./getObject.js";
6
- export { default as list } from "./list.js";
7
- export { default as m } from "./m.js";
8
- export { default as q } from "./q.js";
9
- export { default as t } from "./t.js";
10
- export { default as updateObject } from "./updateObject.js";
11
- export { default as listObject } from "./listObject.js";
12
- export { default as loadObject } from "./loadObject.js";
13
- export { default as isGranted } from "./isGranted.js";
14
- export { default as GQLFieldBuilder } from "./GQLFieldBuilder.js";
15
- export { default as getModelField } from "./getModelField.js";
16
- export { default as getModelFields } from "./getModelFields.js";
17
- export { default as getModelColumns } from "./getModelColumns.js";
18
- export { default as sv } from "./sv.js";
19
- export { default as model } from "./model.js";
20
- export { default as defineLightModel } from "./defineLightModel.js";
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.js";
24
- export { default as id } from "./getID.js";
22
+ export { default as getID } from "./getID";
23
+ export { default as id } from "./getID";
25
24
  export declare const getApiBase: () => {};
26
- export declare const api: LightClient;
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 api.query({
34
+ const resp = await query({
36
35
  [`list${name}`]: q
37
36
  });
38
37
  return resp[`list${name}`];
@@ -1,4 +1,4 @@
1
- import list from "./list.js";
1
+ import list from "./list.mjs";
2
2
  export default async function listObject(name, filters = {}, sort, offset, limit, fields = []) {
3
3
  const resp = await list(name, {
4
4
  filters,
@@ -1,4 +1,4 @@
1
- import list from "./list.js";
1
+ import list from "./list.mjs";
2
2
  export default async function(module, filters, fields = []) {
3
3
  let { data } = await list(module, {
4
4
  filters
@@ -0,0 +1,4 @@
1
+ import { mutation } from "@hostlink/light";
2
+ export default function(operation, args, fields = []) {
3
+ return mutation(operation, args, fields);
4
+ }
@@ -1,6 +1,6 @@
1
- import { api } from ".";
2
- import type { LTableColumn } from "../components/l-table.vue.js";
3
- interface LModel extends ReturnType<typeof api.model> {
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 { api } from "./index.js";
1
+ import { model, getModelField } from "@hostlink/light";
2
2
  export default (name) => {
3
- const m = api.model(name);
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 = m.field(f);
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 = m.field(f);
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 f from "./f.js";
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 api.axios.post("", {
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 { q } from "#imports";
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 q({
8
+ const resp = await query({
9
9
  systemValue: {
10
10
  __args: {
11
11
  name
@@ -1,4 +1,4 @@
1
- import m from "./m.js";
1
+ import m from "./m.mjs";
2
2
  import { Dialog } from "quasar";
3
3
  export default async (name, id, data) => {
4
4
  try {
@@ -1,10 +1,11 @@
1
1
  <script setup>
2
2
  import { reactive } from 'vue'
3
- import { m, q } from '#imports'
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 q({
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 { q } from '#imports';
4
+ import { query } from '@hostlink/light';
5
5
  const obj = reactive({
6
6
  roles: []
7
7
  });
8
8
 
9
- const { app, listRole } = await q({
9
+ const { app, listRole } = await query({
10
10
  app: {
11
11
  permissions: true
12
12
  },
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
- import { q } from '#imports';
2
+ import { query } from '@hostlink/light';
3
3
 
4
- const { system: { database } } = await q({
4
+ const { system: { database } } = await query({
5
5
  system: {
6
6
  database: {
7
7
  table: true
@@ -16,8 +16,6 @@ const columns = model("User").columns({
16
16
  has2FA: true,
17
17
  })
18
18
 
19
- console.log(columns);
20
-
21
19
  const status = ref("0");
22
20
 
23
21
  </script>
@@ -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 { api } from "#imports"
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 api.auth.WebAuthn.register();
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, api } from "#imports"
7
+ import { q } from "#imports"
8
8
 
9
9
  const { t } = useI18n()
10
10
 
11
11
  const onSubmit = async (data, form) => {
12
- if (await api.auth.updatePassword(data.old_password, data.new_password)) {
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
  })
@@ -1,8 +1,8 @@
1
1
  <script setup>
2
2
 
3
- import { api } from '#imports';
3
+ import { logout } from '@hostlink/light';
4
4
 
5
- await api.auth.logout();
5
+ await logout();
6
6
  const href = window.self.location.href;
7
7
 
8
8
  const url = new URL(href);
@@ -1,3 +1,3 @@
1
- import "./assets/main.css.js";
2
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
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 { api } from "./lib/index.js";
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.js";
10
+ import { createLightPlugin } from "./formkit/index.mjs";
11
11
  import { plugin, defaultConfig } from "@formkit/vue";
12
- import { getApiBase, useLight } from "./index.js";
13
- import TypeUser from "./types/User.js";
14
- import TypeUserLog from "./types/UserLog.js";
15
- import TypeSystemValue from "./types/SystemValue.js";
16
- import TypeMailLog from "./types/MailLog.js";
17
- import TypeEventLog from "./types/EventLog.js";
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
- api.axios.defaults.baseURL = getApiBase();
21
- api.models.create("User", TypeUser);
22
- api.models.create("UserLog", TypeUserLog);
23
- api.models.create("SystemValue", TypeSystemValue);
24
- api.models.create("MailLog", TypeMailLog);
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
- export { type ModuleOptions, default } from './module.js'
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
- export { type ModuleOptions, default } from './module'
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.2",
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 && nuxt-module-build prepare && nuxi prepare playground",
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.1.6",
33
- "@hostlink/light": "^2.0.1",
34
- "@nuxt/kit": "^3.13.0",
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.7.7",
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.16.9",
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": "^22.5.0",
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,4 +0,0 @@
1
- import { api } from "./index.js";
2
- export default (name, field) => {
3
- return api.model(name).field(field);
4
- };
@@ -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
- };
@@ -1,4 +0,0 @@
1
- import { api } from "./index.js";
2
- export default function(operation, args, fields = []) {
3
- return api.mutation(operation, args, fields);
4
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes