@hywax/cms 1.6.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -1
- package/dist/runtime/components/Layout.vue +1 -1
- package/dist/runtime/components/TableColumnSorting.vue +1 -1
- package/dist/runtime/components/TableColumnVisibility.vue +1 -1
- package/dist/runtime/components/TableFilters.vue +1 -1
- package/dist/runtime/components/TablePanel.vue +2 -2
- package/dist/runtime/components/TableSearchInput.vue +1 -0
- package/dist/runtime/composables/useTableColumns.d.ts +2 -1
- package/dist/runtime/composables/useTableColumns.js +10 -6
- package/dist/runtime/utils/uplora.d.ts +1 -0
- package/dist/runtime/utils/uplora.js +5 -2
- package/package.json +3 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { snakeCase, kebabCase } from 'scule';
|
|
|
6
6
|
import { readFile, writeFile } from 'node:fs/promises';
|
|
7
7
|
|
|
8
8
|
const name = "@hywax/cms";
|
|
9
|
-
const version = "1.
|
|
9
|
+
const version = "1.7.1";
|
|
10
10
|
|
|
11
11
|
function createContext(options, nuxt) {
|
|
12
12
|
const { resolve } = createResolver(import.meta.url);
|
|
@@ -514,6 +514,7 @@ const module$1 = defineNuxtModule({
|
|
|
514
514
|
moduleDependencies: {
|
|
515
515
|
"@nuxt/ui": {},
|
|
516
516
|
"@nuxtjs/mdc": {},
|
|
517
|
+
"@nuxtjs/seo": {},
|
|
517
518
|
"@vueuse/nuxt": {},
|
|
518
519
|
"nuxt-auth-utils": {}
|
|
519
520
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<UDashboardSidebar
|
|
4
4
|
v-model:open="isSidebarOpen"
|
|
5
5
|
v-model:collapsed="isSidebarCollapsed"
|
|
6
|
-
:ui="{ footer: 'lg:border-t lg:border-default' }"
|
|
6
|
+
:ui="{ root: 'bg-elevated/25', footer: 'lg:border-t lg:border-default' }"
|
|
7
7
|
collapsible
|
|
8
8
|
>
|
|
9
9
|
<template #header="{ collapsed }">
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
:model-value="itemsPerPage"
|
|
101
101
|
:items="itemsPerPageItems"
|
|
102
102
|
:ui="{ base: 'text-muted' }"
|
|
103
|
-
variant="
|
|
103
|
+
variant="subtle"
|
|
104
104
|
@update:model-value="emit('update:items-per-page', $event)"
|
|
105
105
|
>
|
|
106
106
|
<template #default="{ modelValue }">
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
<UPagination
|
|
116
116
|
v-bind="paginationProps"
|
|
117
117
|
:ui="isTotalUnknown ? { first: 'hidden', last: 'hidden' } : void 0"
|
|
118
|
-
variant="
|
|
118
|
+
variant="subtle"
|
|
119
119
|
:sibling-count="isTotalUnknown ? 3 : 1"
|
|
120
120
|
:show-edges="!isTotalUnknown"
|
|
121
121
|
@update:page="emit('update:page', $event)"
|
|
@@ -17,8 +17,9 @@ export type TableColumnCustom<T extends TableData, D = unknown> = TableColumn<T,
|
|
|
17
17
|
format?: TableColumnFormat;
|
|
18
18
|
to?: ((row: TableRow<T>) => RouteLocationRaw | string | undefined) | RouteLocationRaw | string | undefined;
|
|
19
19
|
target?: ButtonProps['target'];
|
|
20
|
-
external?: boolean;
|
|
21
20
|
emptyValue?: string;
|
|
21
|
+
image?: string;
|
|
22
|
+
description?: string;
|
|
22
23
|
};
|
|
23
24
|
export declare function useTableColumns<I extends Record<string, any>, T extends readonly TableColumnCustom<I>[] = readonly TableColumnCustom<I>[]>(columns: T): {
|
|
24
25
|
columns: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UUser } from "#components";
|
|
2
2
|
import { h } from "vue";
|
|
3
3
|
import { formatDate, formatDateTime } from "../utils/date.js";
|
|
4
4
|
import { formatNumber } from "../utils/formatters.js";
|
|
@@ -29,13 +29,17 @@ function transformColumn(column) {
|
|
|
29
29
|
return void 0;
|
|
30
30
|
}
|
|
31
31
|
if (column.to) {
|
|
32
|
-
return h(
|
|
32
|
+
return h(UUser, {
|
|
33
33
|
to: typeof column.to === "function" ? column.to(row) : column.to,
|
|
34
|
-
external: column.external,
|
|
35
34
|
target: column.target,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
name: value.toString(),
|
|
36
|
+
class: "inline-flex",
|
|
37
|
+
ui: {
|
|
38
|
+
name: "text-primary",
|
|
39
|
+
avatar: "group-hover/user:scale-100"
|
|
40
|
+
},
|
|
41
|
+
avatar: column.image ? { src: column.image, size: "sm", alt: value.toString() } : void 0,
|
|
42
|
+
description: column.description
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
return value;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { useRuntimeConfig } from "#imports";
|
|
2
2
|
import { imagesExtensionsToMimeTypes } from "@uplora/formats";
|
|
3
3
|
import { serialize } from "@uplora/serializer";
|
|
4
|
-
export function
|
|
4
|
+
export function getUploraFileUrl(id) {
|
|
5
5
|
const runtimeConfig = useRuntimeConfig();
|
|
6
6
|
const { fluxorUrl } = runtimeConfig.public;
|
|
7
|
+
return `${fluxorUrl}/${id}`;
|
|
8
|
+
}
|
|
9
|
+
export function createUploraImageResolver() {
|
|
7
10
|
return (id, filters) => {
|
|
8
11
|
const serializeFilters = filters ? serialize(filters) : "";
|
|
9
|
-
return `${
|
|
12
|
+
return `${getUploraFileUrl(id)}${serializeFilters ? `/${serializeFilters}` : ""}`;
|
|
10
13
|
};
|
|
11
14
|
}
|
|
12
15
|
export function buildUploraImage(options) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hywax/cms",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.1",
|
|
5
5
|
"description": "Hywax CMS. ⚠️ This package is intended for internal use only.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"@nuxt/kit": "^4.2.2",
|
|
62
62
|
"@nuxt/ui": "^4.3.0",
|
|
63
63
|
"@nuxtjs/mdc": "^0.19.2",
|
|
64
|
+
"@nuxtjs/seo": "^3.3.0",
|
|
64
65
|
"@sindresorhus/slugify": "^3.0.0",
|
|
65
66
|
"@uplora/formats": "^0.1.0",
|
|
66
67
|
"@uplora/serializer": "^0.1.3",
|
|
@@ -70,6 +71,7 @@
|
|
|
70
71
|
"fast-copy": "^3.0.2",
|
|
71
72
|
"fast-equals": "^5.4.0",
|
|
72
73
|
"nuxt-auth-utils": "^0.5.26",
|
|
74
|
+
"object-to-formdata": "^4.5.1",
|
|
73
75
|
"pathe": "^2.0.3",
|
|
74
76
|
"scule": "^1.3.0",
|
|
75
77
|
"sortablejs": "^1.15.6",
|