@hywax/cms 3.8.0 → 3.8.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 +1 -1
- package/dist/runtime/components/TablePreviewLink.d.vue.ts +2 -2
- package/dist/runtime/components/TablePreviewLink.vue +3 -2
- package/dist/runtime/components/TablePreviewLink.vue.d.ts +2 -2
- package/dist/runtime/components/TablePreviewSeo.d.vue.ts +1 -1
- package/dist/runtime/components/TablePreviewSeo.vue +3 -2
- package/dist/runtime/components/TablePreviewSeo.vue.d.ts +1 -1
- package/dist/runtime/composables/useTableColumns.d.ts +2 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { pascalCase, kebabCase, camelCase } from 'scule';
|
|
|
7
7
|
import { globSync } from 'tinyglobby';
|
|
8
8
|
|
|
9
9
|
const name = "@hywax/cms";
|
|
10
|
-
const version = "3.8.
|
|
10
|
+
const version = "3.8.1";
|
|
11
11
|
|
|
12
12
|
function createContext(options, nuxt) {
|
|
13
13
|
const { resolve } = createResolver(import.meta.url);
|
|
@@ -5,8 +5,8 @@ export interface TablePreviewLinkProps {
|
|
|
5
5
|
to?: RouteLocationRaw;
|
|
6
6
|
target?: ButtonProps['target'];
|
|
7
7
|
label: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
image?: Pick<UploraImageProps, 'image' | 'alt' | 'color' | 'lqip'
|
|
8
|
+
description?: string | null;
|
|
9
|
+
image?: Pick<UploraImageProps, 'image' | 'alt' | 'color' | 'lqip'> | null;
|
|
10
10
|
}
|
|
11
11
|
declare const __VLS_export: import("vue").DefineComponent<TablePreviewLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TablePreviewLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="relative flex items-center gap-2">
|
|
3
|
+
<!-- TODO: добавить <CUploraPlaceholder /> -->
|
|
3
4
|
<div v-if="image" class="overflow-hidden rounded-lg shrink-0 size-8">
|
|
4
5
|
<CUploraImage
|
|
5
6
|
v-bind="image"
|
|
@@ -32,7 +33,7 @@ defineProps({
|
|
|
32
33
|
to: { type: null, required: false },
|
|
33
34
|
target: { type: [String, Object, null], required: false },
|
|
34
35
|
label: { type: String, required: true },
|
|
35
|
-
description: { type: String, required: false },
|
|
36
|
-
image: { type: Object, required: false }
|
|
36
|
+
description: { type: [String, null], required: false },
|
|
37
|
+
image: { type: [Object, null], required: false }
|
|
37
38
|
});
|
|
38
39
|
</script>
|
|
@@ -5,8 +5,8 @@ export interface TablePreviewLinkProps {
|
|
|
5
5
|
to?: RouteLocationRaw;
|
|
6
6
|
target?: ButtonProps['target'];
|
|
7
7
|
label: string;
|
|
8
|
-
description?: string;
|
|
9
|
-
image?: Pick<UploraImageProps, 'image' | 'alt' | 'color' | 'lqip'
|
|
8
|
+
description?: string | null;
|
|
9
|
+
image?: Pick<UploraImageProps, 'image' | 'alt' | 'color' | 'lqip'> | null;
|
|
10
10
|
}
|
|
11
11
|
declare const __VLS_export: import("vue").DefineComponent<TablePreviewLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TablePreviewLinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
12
|
declare const _default: typeof __VLS_export;
|
|
@@ -13,10 +13,11 @@ import { useSeoStats } from "../composables/useSeoStats";
|
|
|
13
13
|
|
|
14
14
|
<script setup>
|
|
15
15
|
const props = defineProps({
|
|
16
|
-
seo: { type: Object, required: true },
|
|
16
|
+
seo: { type: [Object, null], required: true },
|
|
17
17
|
as: { type: null, required: false }
|
|
18
18
|
});
|
|
19
|
-
const { title, description
|
|
19
|
+
const seo = computed(() => props.seo ?? { title: "", description: "" });
|
|
20
|
+
const { title, description, computeColor } = useSeoStats(seo);
|
|
20
21
|
const rating = computed(() => {
|
|
21
22
|
return Math.round((title.value.progress + description.value.progress) / 2);
|
|
22
23
|
});
|
|
@@ -19,8 +19,8 @@ export type TableColumnCustom<T extends TableData, D = unknown> = TableColumn<T,
|
|
|
19
19
|
to?: ((row: TableRow<T>) => RouteLocationRaw | string | undefined) | RouteLocationRaw | string | undefined;
|
|
20
20
|
target?: ButtonProps['target'];
|
|
21
21
|
emptyValue?: string;
|
|
22
|
-
image?: ((row: TableRow<T>) => TablePreviewLinkProps['image'] | undefined) | TablePreviewLinkProps['image'] | undefined;
|
|
23
|
-
description?: ((row: TableRow<T>) => string | undefined) | string | undefined;
|
|
22
|
+
image?: ((row: TableRow<T>) => TablePreviewLinkProps['image'] | undefined | null) | TablePreviewLinkProps['image'] | undefined | null;
|
|
23
|
+
description?: ((row: TableRow<T>) => string | undefined | null) | string | undefined | null;
|
|
24
24
|
};
|
|
25
25
|
export declare function useTableColumns<I extends Record<string, any>, T extends readonly TableColumnCustom<I>[] = readonly TableColumnCustom<I>[]>(columns: T): {
|
|
26
26
|
columns: {
|