@hostlink/nuxt-light 1.52.1 → 1.52.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.52.1",
4
+ "version": "1.52.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -0,0 +1,12 @@
1
+ declare var __VLS_6: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_6) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <q-btn flat round size="sm">
3
+ <slot></slot>
4
+ </q-btn>
5
+ </template>
@@ -0,0 +1,12 @@
1
+ declare var __VLS_6: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_6) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
7
+ export default _default;
8
+ type __VLS_WithSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
@@ -9,8 +9,8 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_1) => any;
10
10
  };
11
11
  declare const __VLS_component: import("vue").DefineComponent<LColProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LColProps> & Readonly<{}>, {
12
- xs: number | string;
13
12
  sm: number | string;
13
+ xs: number | string;
14
14
  md: number | string;
15
15
  gutter: "xs" | "sm" | "md" | "lg" | "xl" | "none";
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -9,8 +9,8 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_1) => any;
10
10
  };
11
11
  declare const __VLS_component: import("vue").DefineComponent<LColProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LColProps> & Readonly<{}>, {
12
- xs: number | string;
13
12
  sm: number | string;
13
+ xs: number | string;
14
14
  md: number | string;
15
15
  gutter: "xs" | "sm" | "md" | "lg" | "xl" | "none";
16
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -62,16 +62,12 @@ const lastPart = computed(() => {
62
62
 
63
63
  <template>
64
64
  <q-page :padding="padding" class="q-pt-sm">
65
-
66
-
67
-
68
65
  <q-toolbar v-if="showToolbar">
69
66
  <l-back-btn v-if="backBtn" dense />
70
67
  <l-add-btn v-if="addBtn" dense />
71
68
  <l-edit-btn v-if="editBtn" dense />
72
69
  <l-delete-btn v-if="deleteBtn" @submit="onDelete" dense />
73
70
  <q-toolbar-title>{{ $t(title) }}</q-toolbar-title>
74
-
75
71
  <q-breadcrumbs v-if="breadcrumbs">
76
72
  <q-breadcrumbs-el :label="$t('Home')" to="/" icon="home" />
77
73
  <q-breadcrumbs-el :label="$t(title)" :to="'/' + route.path.split('/')[1]"
@@ -423,7 +423,7 @@ const hasRowExpand = computed(() => {
423
423
  return ss.indexOf("row-expand") >= 0;
424
424
  });
425
425
  const hasActions = computed(() => {
426
- return props.actions.length > 0;
426
+ return props.actions.length > 0 || ss.indexOf("actions") >= 0;
427
427
  });
428
428
  const getCellStyle = (col, row) => {
429
429
  const style = col.cellStyle ?? {};
@@ -482,7 +482,6 @@ const searchSelectFilter = (val, update, name) => {
482
482
  } else {
483
483
  localSearchOptions.value[name] = options;
484
484
  }
485
- console.log(localSearchOptions.value[name]);
486
485
  });
487
486
  }
488
487
  };
@@ -494,7 +493,6 @@ const hidableColumns = computed(() => {
494
493
  });
495
494
  const visibleColumns = props.name ? useStorage("l-table-visible-columns-" + simpleRouteName.value + "-" + props.name, hidableColumns.value.map((c) => c.name)) : ref(hidableColumns.value.map((c) => c.name));
496
495
  watch(filters, () => {
497
- console.log("filters changed", filters.value);
498
496
  onFilters();
499
497
  }, { deep: true });
500
498
  const tempFilters = ref({});
@@ -547,11 +545,11 @@ const hasFilters = computed(() => {
547
545
  <q-td v-if="hasActions" auto-width>
548
546
  <div :class="{ 'text-grey-8': !isDark }" v-if="primaryKey">
549
547
 
550
- <l-view-btn v-if="actionView && props.row.canView"
551
- :to="`/${modelName}/${props.row[primaryKey]}/view`" size="sm" />
548
+ <l-action-btn v-if="actionView && props.row.canView"
549
+ :to="`/${modelName}/${props.row[primaryKey]}/view`" icon="sym_o_search" />
552
550
 
553
- <l-edit-btn v-if="activeEdit && props.row.canUpdate"
554
- :to="`/${modelName}/${props.row[primaryKey]}/edit`" size="sm" />
551
+ <l-action-btn v-if="activeEdit && props.row.canUpdate"
552
+ :to="`/${modelName}/${props.row[primaryKey]}/edit`" icon="sym_o_edit" />
555
553
 
556
554
  <l-delete-btn v-if="actionDelete && props.row.canDelete"
557
555
  @submit="onDelete(props.row[primaryKey])" size="sm"></l-delete-btn>
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ status?: number | undefined;
3
+ $props: {
4
+ readonly status?: number | undefined;
5
+ };
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
@@ -0,0 +1,28 @@
1
+ <script setup>
2
+ import { model } from "#imports";
3
+ const props = defineProps({
4
+ status: Number
5
+ });
6
+ const onRequest = async (request) => {
7
+ const filters = {};
8
+ if (props.status >= 0) {
9
+ filters.status = props.status;
10
+ }
11
+ request.loadObjects("User", filters);
12
+ };
13
+ const columns = model("User").columns({
14
+ username: true,
15
+ first_name: true,
16
+ label_name: true,
17
+ email: true,
18
+ phone: true,
19
+ join_date: true,
20
+ has2FA: true
21
+ });
22
+ </script>
23
+
24
+ <template>
25
+ <l-table ref="table" row-key="user_id" @request-data="onRequest" :columns="columns"
26
+ :actions="['view', 'update', 'delete']">
27
+ </l-table>
28
+ </template>
@@ -0,0 +1,7 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {
2
+ status?: number | undefined;
3
+ $props: {
4
+ readonly status?: number | undefined;
5
+ };
6
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
7
+ export default _default;
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { computed, ref } from "vue";
3
- import { useDragAndDrop, dragAndDrop } from "@formkit/drag-and-drop/vue";
3
+ import { useDragAndDrop } from "@formkit/drag-and-drop/vue";
4
4
  import { animations } from "@formkit/drag-and-drop";
5
5
  const props = defineProps({
6
6
  context: Object
@@ -10,6 +10,9 @@ const min = props.context.node.props.min ?? 1;
10
10
  const max = props.context.node.props.max ?? Infinity;
11
11
  const sortable = props.context.node.props.sortable !== void 0 ? props.context.node.props.sortable : true;
12
12
  const addLabel = props.context.node.props.addLabel ?? "Add";
13
+ if (!props.context.value) {
14
+ await node.input([]);
15
+ }
13
16
  const [parent, localValue] = useDragAndDrop(props.context.value, {
14
17
  dragHandle: ".l-repeater-handle",
15
18
  plugins: [animations()]
@@ -61,8 +64,8 @@ const cursor = ref("cursor-grab");
61
64
  </style>
62
65
 
63
66
  <template>
64
- <div class="col col-12 ">
65
- <FormKit type="list" v-model="localValue" dynamic #default="{ items, node }" :name="node.name">
67
+ <FormKit type="list" v-model="localValue" dynamic #default="{ items, node }" :name="node.name">
68
+ <div class="col col-12">
66
69
  <q-list bordered separator ref="parent">
67
70
  <FormKit type="group" v-for="(item, index) in items" :index="index" :key="item" #default="{ node }">
68
71
  <q-item class="q-pa-xs">
@@ -95,6 +98,6 @@ const cursor = ref("cursor-grab");
95
98
  </q-list>
96
99
  <q-btn @click="onAdd" :label="addLabel" icon="sym_o_add" color="primary" outline class="q-mt-sm"
97
100
  :disable="localValue.length >= max" />
98
- </FormKit>
99
- </div>
101
+ </div>
102
+ </FormKit>
100
103
  </template>
@@ -1,41 +1,12 @@
1
- <script setup>
2
- import { ref } from "vue";
3
- const status = ref("active");
4
- import { model } from "#imports";
5
- const onRequest = async (request) => {
6
- const filters = {};
7
- if (status.value === "active") {
8
- filters["status"] = 0;
9
- } else if (status.value === "inactive") {
10
- filters["status"] = 1;
11
- }
12
- request.loadObjects("User", filters);
13
- };
14
- const columns = model("User").columns({
15
- username: true,
16
- first_name: true,
17
- label_name: true,
18
- email: true,
19
- phone: true,
20
- join_date: true,
21
- has2FA: true
22
- });
23
- const selectedRows = ref([]);
24
- </script>
25
-
26
- <template>
1
+ <template>
27
2
  <l-page>
28
- <l-tabs route v-model="status">
3
+ <l-tabs route>
29
4
  <l-tab label="Active" name="active">
30
- <l-table ref="table" row-key="user_id" @request-data="onRequest" :columns="columns" name="user-active"
31
- :actions="['view', 'update', 'delete']">
32
- </l-table>
5
+ <user-list :status="0" name="user-active" />
33
6
  </l-tab>
34
7
  <l-tab label="Inactive" name="inactive">
35
- <l-table row-key="user_id" @request-data="onRequest" :columns="columns" name="user-inactive"
36
- :actions="['view', 'update', 'delete']">
37
- </l-table>
8
+ <user-list :status="1" name="user-inactive" />
38
9
  </l-tab>
39
10
  </l-tabs>
40
11
  </l-page>
41
- </template>
12
+ </template>
@@ -211,7 +211,6 @@ const confirmMove = () => {
211
211
  selectedNode.value = nodeToMove.uuid;
212
212
  };
213
213
  const saveCustomMenus = async () => {
214
- console.log("User custom menu structure:", userMenus.value[0].children);
215
214
  try {
216
215
  await m("updateMyMenu", {
217
216
  menu: userMenus.value[0].children
@@ -21,10 +21,7 @@ import TypeMailLog from "./models/MailLog.js";
21
21
  import TypeEventLog from "./models/EventLog.js";
22
22
  import TypeCustomerField from "./models/CustomField.js";
23
23
  import { zhTW } from "@formkit/i18n";
24
- import { useQuasar } from "quasar";
25
24
  export default defineNuxtPlugin((nuxtApp) => {
26
- const $q = useQuasar();
27
- console.log($q);
28
25
  addRouteMiddleware("auth", async (to, from) => {
29
26
  if (to.path == "/") {
30
27
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.52.1",
3
+ "version": "1.52.3",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- export {};
File without changes