@dskripchenko/laravel-admin 1.1.12 → 1.1.14
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/components/infolist/IconEntry.vue.d.ts +2 -2
- package/dist/components/resource/ResourceIndexPage.vue.d.ts +2 -2
- package/dist/components/resource/cellFormat.d.ts +26 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1754 -1675
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -14,9 +14,9 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
14
14
|
value: boolean | null;
|
|
15
15
|
label: string;
|
|
16
16
|
name: string;
|
|
17
|
-
trueIcon: string;
|
|
18
|
-
falseIcon: string;
|
|
19
17
|
trueLabel: string;
|
|
20
18
|
falseLabel: string;
|
|
19
|
+
trueIcon: string;
|
|
20
|
+
falseIcon: string;
|
|
21
21
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
export default _default;
|
|
@@ -13,11 +13,11 @@ interface Props {
|
|
|
13
13
|
declare var __VLS_1: {}, __VLS_51: {
|
|
14
14
|
filters: Record<string, unknown>;
|
|
15
15
|
setFilter: (key: string, value: unknown) => Promise<void>;
|
|
16
|
-
},
|
|
16
|
+
}, __VLS_101: `cell-${string}`, __VLS_102: {
|
|
17
17
|
row: Record<string, unknown> | undefined;
|
|
18
18
|
};
|
|
19
19
|
type __VLS_Slots = {} & {
|
|
20
|
-
[K in NonNullable<typeof
|
|
20
|
+
[K in NonNullable<typeof __VLS_101>]?: (props: typeof __VLS_102) => any;
|
|
21
21
|
} & {
|
|
22
22
|
actions?: (props: typeof __VLS_1) => any;
|
|
23
23
|
} & {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formatter cell-значений для ResourceIndexPage.
|
|
3
|
+
*
|
|
4
|
+
* Backend-side TableColumn presets:
|
|
5
|
+
* - text → as-is (string).
|
|
6
|
+
* - date → 'd.m.Y' (default).
|
|
7
|
+
* - datetime → 'd.m.Y H:i:s' (default).
|
|
8
|
+
* - money → '{value} {currency}' с decimals.
|
|
9
|
+
* - boolean → trueLabel / falseLabel из meta.
|
|
10
|
+
* - badge → текст; стилизация на UI рендере (через slot или CSS-class).
|
|
11
|
+
* - bytes → human-readable размер.
|
|
12
|
+
* - text → fallback.
|
|
13
|
+
*
|
|
14
|
+
* `auto-format` для колонок без явного preset'а: если значение похоже на ISO
|
|
15
|
+
* datetime (`*_at` или строка с T...Z) — применяется default datetime формат.
|
|
16
|
+
*/
|
|
17
|
+
export type CellPreset = 'text' | 'date' | 'datetime' | 'money' | 'boolean' | 'badge' | 'bytes';
|
|
18
|
+
export interface CellMeta {
|
|
19
|
+
format?: string;
|
|
20
|
+
currency?: string;
|
|
21
|
+
decimals?: number;
|
|
22
|
+
trueLabel?: string | null;
|
|
23
|
+
falseLabel?: string | null;
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
export declare function formatCell(value: unknown, preset: string | undefined, meta?: CellMeta): string;
|