@dskripchenko/laravel-admin 1.2.4 → 1.4.0

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.
@@ -0,0 +1,8 @@
1
+ interface Props {
2
+ /** Slug screen'а. Если null — берётся из route.params.slug. */
3
+ slug?: string | null;
4
+ }
5
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
6
+ slug: string | null;
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
@@ -4,6 +4,11 @@ interface ChartDataset {
4
4
  color?: string;
5
5
  }
6
6
  interface ChartData {
7
+ /**
8
+ * Backend ChartWidget::data() отдаёт `chartType`. Историческая обёртка
9
+ * читала `type` — оставляем как fallback для совместимости.
10
+ */
11
+ chartType?: string;
7
12
  type?: string;
8
13
  labels?: string[];
9
14
  datasets?: ChartDataset[];
@@ -7,6 +7,12 @@ interface Props {
7
7
  max?: number;
8
8
  size?: number;
9
9
  ranges?: GaugeRange[];
10
+ /**
11
+ * Backend GaugeWidget::data() отдаёт `thresholds` — структурно совпадает
12
+ * с UidGauge.ranges ({from, to, color}). Принимаем оба имени.
13
+ */
14
+ thresholds?: GaugeRange[];
15
+ unit?: string;
10
16
  tone?: SemanticTone;
11
17
  color?: string;
12
18
  label?: string;
@@ -25,5 +31,7 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
25
31
  precision: number;
26
32
  tone: SemanticTone;
27
33
  ranges: GaugeRange[];
34
+ thresholds: GaugeRange[];
35
+ unit: string;
28
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
29
37
  export default _default;
@@ -1,18 +1,19 @@
1
- interface HeatmapPoint {
2
- date: string;
3
- value: number;
4
- }
5
1
  interface Props {
6
2
  title?: string;
7
- data: HeatmapPoint[];
8
- levels?: number;
3
+ rows?: string[];
4
+ cols?: string[];
5
+ matrix?: number[][];
6
+ /** Для подписи в hover'e — формат значения. */
7
+ formatValue?: (v: number, row: string, col: string) => string;
8
+ /** CSS-цвет ячейки. Default — accent token. */
9
9
  color?: string;
10
- gap?: number;
11
10
  }
12
11
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
13
12
  title: string;
14
13
  color: string;
15
- levels: number;
16
- gap: number;
14
+ rows: string[];
15
+ cols: string[];
16
+ matrix: number[][];
17
+ formatValue: (v: number, row: string, col: string) => string;
17
18
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
19
  export default _default;
@@ -1,12 +1,24 @@
1
1
  import { type UidTableColumn } from '@dskripchenko/ui';
2
+ /**
3
+ * Backend RecentListWidget::data() отдаёт columns как `[{column, label}]`,
4
+ * но UidTable ожидает `{key, label}`. Конвертируем here.
5
+ */
6
+ interface BackendColumn {
7
+ column?: string;
8
+ key?: string;
9
+ label: string;
10
+ align?: 'left' | 'center' | 'right';
11
+ }
2
12
  interface Props {
3
13
  title?: string;
4
- columns: UidTableColumn[];
5
- rows: Record<string, unknown>[];
14
+ columns?: Array<BackendColumn | UidTableColumn>;
15
+ rows?: Record<string, unknown>[];
6
16
  emptyText?: string;
7
17
  }
8
18
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
9
19
  title: string;
20
+ columns: Array<BackendColumn | UidTableColumn>;
21
+ rows: Record<string, unknown>[];
10
22
  emptyText: string;
11
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
24
  export default _default;
@@ -1,6 +1,31 @@
1
1
  type SemanticTone = 'neutral' | 'positive' | 'negative' | 'warning' | 'info';
2
+ /**
3
+ * Backend StatsOverviewWidget::data() отдаёт массив `stats: [{label, value,
4
+ * change: {delta, direction}, color, icon}]`. Frontend StatWidget берёт
5
+ * первый stat и рендерит UidStat. Несколько stats в одном виджете пока
6
+ * не поддерживаются (если нужно — host задаёт несколько StatWidget'ов).
7
+ *
8
+ * Для legacy scalar-values (если widget сам прислал `value` напрямую) тоже
9
+ * работает — приоритет имеет stats[0].
10
+ */
11
+ interface StatChange {
12
+ delta?: number;
13
+ direction?: 'up' | 'down' | 'flat';
14
+ }
15
+ interface StatItem {
16
+ label?: string;
17
+ value?: number | string;
18
+ prefix?: string;
19
+ suffix?: string;
20
+ change?: StatChange | null;
21
+ color?: string | null;
22
+ icon?: string | null;
23
+ }
2
24
  interface Props {
3
25
  title?: string;
26
+ /** Backend payload from StatsOverviewWidget. */
27
+ stats?: StatItem[];
28
+ /** Legacy scalar value (если host передал не через массив). */
4
29
  value?: number | string;
5
30
  prefix?: string;
6
31
  suffix?: string;
@@ -14,6 +39,7 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
14
39
  title: string;
15
40
  loading: boolean;
16
41
  prefix: string;
42
+ stats: StatItem[];
17
43
  suffix: string;
18
44
  trend: number;
19
45
  precision: number;
@@ -16,9 +16,9 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
16
16
  min: number | null;
17
17
  disabled: boolean;
18
18
  placeholder: string | null;
19
+ required: boolean;
19
20
  step: number | null;
20
21
  readonly: boolean;
21
- required: boolean;
22
22
  help: string | null;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
24
  export default _default;
@@ -11,6 +11,11 @@ interface Props {
11
11
  required?: boolean;
12
12
  placeholder?: string | null;
13
13
  disabled?: boolean;
14
+ /**
15
+ * Read-only — бэкенд может пометить Select через `->readonly()`. UidSelect
16
+ * не различает readonly/disabled — мапим в disabled (визуально совпадает).
17
+ */
18
+ readonly?: boolean;
14
19
  searchable?: boolean;
15
20
  clearable?: boolean;
16
21
  size?: 'sm' | 'md' | 'lg';
@@ -20,8 +25,9 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
20
25
  label: string | null;
21
26
  disabled: boolean;
22
27
  placeholder: string | null;
23
- searchable: boolean;
24
28
  required: boolean;
29
+ searchable: boolean;
30
+ readonly: boolean;
25
31
  clearable: boolean;
26
32
  help: string | null;
27
33
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -12,8 +12,8 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
12
12
  label: string | null;
13
13
  disabled: boolean;
14
14
  placeholder: string | null;
15
- readonly: boolean;
16
15
  required: boolean;
16
+ readonly: boolean;
17
17
  rows: number;
18
18
  help: string | null;
19
19
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -13,8 +13,8 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
13
13
  label: string | null;
14
14
  disabled: boolean;
15
15
  placeholder: string | null;
16
- readonly: boolean;
17
16
  required: boolean;
17
+ readonly: boolean;
18
18
  autocomplete: string | null;
19
19
  help: string | null;
20
20
  inputType: "text" | "email" | "url" | "password" | "tel" | "search";
@@ -18,8 +18,8 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
18
18
  disabled: boolean;
19
19
  placeholder: string | null;
20
20
  theme: "snow" | "bubble" | "core";
21
- toolbar: string | unknown[];
22
21
  required: boolean;
22
+ toolbar: string | unknown[];
23
23
  help: string | null;
24
24
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
25
25
  export default _default;
@@ -7,7 +7,7 @@ interface Props {
7
7
  cols?: number;
8
8
  }
9
9
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
10
- gap: string;
11
10
  cols: number;
11
+ gap: string;
12
12
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { MenuItem } from '../../stores/menu';
2
+ interface Props {
3
+ item: MenuItem;
4
+ depth?: number;
5
+ collapsed?: boolean;
6
+ /** Глубина, после которой включается stripe-режим (вместо роста indent). */
7
+ stripeAt?: number;
8
+ /** Шаг indent в px на каждый уровень (до stripeAt). */
9
+ indentStep?: number;
10
+ }
11
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
12
+ depth: number;
13
+ collapsed: boolean;
14
+ stripeAt: number;
15
+ indentStep: number;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ export default _default;