@dskripchenko/laravel-admin 1.26.0 → 1.27.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.
Files changed (104) hide show
  1. package/dist/api/bootstrap.d.ts +18 -17
  2. package/dist/api/client.d.ts +12 -11
  3. package/dist/api/envelope.d.ts +3 -3
  4. package/dist/api/errors.d.ts +7 -7
  5. package/dist/components/ScreenPage.vue.d.ts +1 -1
  6. package/dist/components/auth/LoginForm.vue.d.ts +2 -2
  7. package/dist/components/auth/LoginPage.vue.d.ts +5 -5
  8. package/dist/components/auth/index.d.ts +1 -1
  9. package/dist/components/createComponentRegistry.d.ts +6 -5
  10. package/dist/components/dashboard/ChartWidget.vue.d.ts +2 -2
  11. package/dist/components/dashboard/GaugeWidget.vue.d.ts +2 -2
  12. package/dist/components/dashboard/HeatmapWidget.vue.d.ts +2 -2
  13. package/dist/components/dashboard/IframeWidget.vue.d.ts +4 -3
  14. package/dist/components/dashboard/RecentTableWidget.vue.d.ts +4 -3
  15. package/dist/components/dashboard/StatWidget.vue.d.ts +8 -7
  16. package/dist/components/dashboard/TableWidget.vue.d.ts +3 -2
  17. package/dist/components/dashboard/WidgetConfigDialog.vue.d.ts +4 -4
  18. package/dist/components/dashboard/WidgetRenderer.vue.d.ts +1 -1
  19. package/dist/components/dashboard/builtin.d.ts +5 -4
  20. package/dist/components/dashboard/index.d.ts +1 -1
  21. package/dist/components/dashboard/registry.d.ts +5 -5
  22. package/dist/components/fields/BuilderField.vue.d.ts +1 -1
  23. package/dist/components/fields/DateField.vue.d.ts +3 -3
  24. package/dist/components/fields/GeneratedField.vue.d.ts +3 -3
  25. package/dist/components/fields/SelectField.vue.d.ts +3 -2
  26. package/dist/components/fields/TagsField.vue.d.ts +6 -6
  27. package/dist/components/fields/TranslatableField.vue.d.ts +2 -2
  28. package/dist/components/fields/WysiwygField.vue.d.ts +2 -2
  29. package/dist/components/fields/wysiwyg/quill/QuillField.vue.d.ts +3 -3
  30. package/dist/components/fields/wysiwyg/quill/index.d.ts +3 -3
  31. package/dist/components/fields/wysiwyg/tinymce/TinymceField.vue.d.ts +6 -5
  32. package/dist/components/fields/wysiwyg/tinymce/index.d.ts +3 -3
  33. package/dist/components/import/ImportWizardPage.vue.d.ts +9 -9
  34. package/dist/components/infolist/BadgeEntry.vue.d.ts +4 -4
  35. package/dist/components/infolist/InfolistRenderer.vue.d.ts +1 -1
  36. package/dist/components/infolist/TextEntry.vue.d.ts +3 -3
  37. package/dist/components/infolist/builtin.d.ts +6 -6
  38. package/dist/components/infolist/index.d.ts +1 -1
  39. package/dist/components/infolist/recordContext.d.ts +3 -3
  40. package/dist/components/infolist/registry.d.ts +7 -7
  41. package/dist/components/layouts/ColumnsLayout.vue.d.ts +2 -2
  42. package/dist/components/layouts/RowsLayout.vue.d.ts +1 -1
  43. package/dist/components/layouts/TabsLayout.vue.d.ts +12 -11
  44. package/dist/components/notifications/index.d.ts +5 -5
  45. package/dist/components/profile/ProfilePage.vue.d.ts +3 -3
  46. package/dist/components/profile/TwoFactorSetup.vue.d.ts +1 -1
  47. package/dist/components/render/builtin.d.ts +2 -2
  48. package/dist/components/render/formState.d.ts +18 -15
  49. package/dist/components/render/index.d.ts +1 -1
  50. package/dist/components/render/registry.d.ts +9 -9
  51. package/dist/components/resource/AdminFilterToolbar.vue.d.ts +3 -3
  52. package/dist/components/resource/AuditTimeline.vue.d.ts +4 -4
  53. package/dist/components/resource/FilterEditor.d.ts +4 -3
  54. package/dist/components/resource/InlineEditCell.vue.d.ts +4 -4
  55. package/dist/components/resource/ResourceFormPage.vue.d.ts +4 -4
  56. package/dist/components/resource/ResourceIndexPage.vue.d.ts +5 -5
  57. package/dist/components/resource/ResourceViewPage.vue.d.ts +7 -7
  58. package/dist/components/resource/cellFormat.d.ts +14 -12
  59. package/dist/components/resource/index.d.ts +1 -1
  60. package/dist/components/resource/statusLabel.d.ts +14 -13
  61. package/dist/components/shell/AdminShell.vue.d.ts +7 -7
  62. package/dist/components/shell/AdminSidebar.vue.d.ts +7 -7
  63. package/dist/components/shell/AdminSidebarNode.vue.d.ts +2 -2
  64. package/dist/components/shell/AdminTopBar.vue.d.ts +2 -2
  65. package/dist/components/shell/BrandLogo.vue.d.ts +3 -3
  66. package/dist/components/shell/iconRegistry.d.ts +10 -9
  67. package/dist/components/shell/index.d.ts +2 -2
  68. package/dist/composables/useAppReady.d.ts +12 -11
  69. package/dist/composables/useBrand.d.ts +4 -3
  70. package/dist/createAdminApp.d.ts +34 -33
  71. package/dist/formState-DeRZBwWH.js.map +1 -1
  72. package/dist/formState-yUTD6wAR.cjs.map +1 -1
  73. package/dist/i18n-BCRWWhHE.cjs.map +1 -1
  74. package/dist/i18n-DXndsABq.js.map +1 -1
  75. package/dist/index.cjs +4 -4
  76. package/dist/index.cjs.map +1 -1
  77. package/dist/index.d.ts +12 -10
  78. package/dist/index.mjs +3789 -3774
  79. package/dist/index.mjs.map +1 -1
  80. package/dist/quill.cjs.map +1 -1
  81. package/dist/quill.mjs.map +1 -1
  82. package/dist/router/builder.d.ts +15 -14
  83. package/dist/router/guards.d.ts +28 -27
  84. package/dist/router/index.d.ts +20 -18
  85. package/dist/stores/auth.d.ts +10 -10
  86. package/dist/stores/dashboard.d.ts +33 -32
  87. package/dist/stores/i18n.d.ts +5 -4
  88. package/dist/stores/index.d.ts +2 -2
  89. package/dist/stores/locale.d.ts +7 -6
  90. package/dist/stores/manifest.d.ts +64 -61
  91. package/dist/stores/menu.d.ts +58 -57
  92. package/dist/stores/navigation.d.ts +5 -5
  93. package/dist/stores/notifications.d.ts +5 -4
  94. package/dist/stores/registry.d.ts +7 -7
  95. package/dist/stores/resourceForm.d.ts +12 -10
  96. package/dist/stores/resourceIndex.d.ts +12 -10
  97. package/dist/stores/screen.d.ts +15 -12
  98. package/dist/stores/theme.d.ts +4 -3
  99. package/dist/stores/toast.d.ts +3 -2
  100. package/dist/style.css +1 -1
  101. package/dist/tinymce.cjs.map +1 -1
  102. package/dist/tinymce.mjs.map +1 -1
  103. package/dist/types/bootstrap.d.ts +9 -9
  104. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Public exports для subpath @dskripchenko/laravel-admin/tinymce.
2
+ * The public exports of the @dskripchenko/laravel-admin/tinymce subpath.
3
3
  *
4
- * Host подключает через:
4
+ * A host wires it in like this:
5
5
  *
6
6
  * import { registerField } from '@dskripchenko/laravel-admin'
7
7
  * import { TinymceField } from '@dskripchenko/laravel-admin/tinymce'
8
8
  * registerField('wysiwyg', TinymceField)
9
9
  *
10
- * @tinymce/tinymce-vue и tinymce — peer-deps, host устанавливает их вручную.
10
+ * @tinymce/tinymce-vue and tinymce are peer dependencies; the host installs them itself.
11
11
  */
12
12
  export { default as TinymceField } from './TinymceField.vue';
@@ -5,9 +5,9 @@ interface ColumnHeader {
5
5
  sample?: string;
6
6
  }
7
7
  interface Mapping {
8
- /** Header из файла. */
8
+ /** A header from the file. */
9
9
  source: string;
10
- /** Field-name в ресурсе либо null = пропустить. */
10
+ /** The resource's field name, or null to skip the column. */
11
11
  target: string | null;
12
12
  }
13
13
  interface PreviewRow extends Record<string, unknown> {
@@ -20,22 +20,22 @@ interface ImportProgress {
20
20
  total: number;
21
21
  }
22
22
  interface Props {
23
- /** Заголовок страницы. */
23
+ /** The page's title. */
24
24
  title?: string;
25
- /** Опции для select'а target field'а на step 2. */
25
+ /** The options of the target-field select on step 2. */
26
26
  fieldOptions: Array<{
27
27
  value: string;
28
28
  label: string;
29
29
  }>;
30
- /** Headers + sample из uploaded file (host передаёт после step 1). */
30
+ /** The headers and the sample from the uploaded file; the host passes them after step 1. */
31
31
  headers?: ColumnHeader[];
32
- /** Preview rows с warning'ами (host передаёт после step 2 submit). */
32
+ /** The preview rows with their warnings; the host passes them after step 2 is submitted. */
33
33
  preview?: PreviewRow[];
34
- /** Preview-table columns (host передаёт). */
34
+ /** The preview table's columns, passed by the host. */
35
35
  previewColumns?: UidTableColumn[];
36
- /** Финальная сводка импорта. */
36
+ /** The import's final summary. */
37
37
  progress?: ImportProgress | null;
38
- /** Внешне controlled-mode current step (опц.). */
38
+ /** The current step in the externally controlled mode; optional. */
39
39
  step?: number;
40
40
  }
41
41
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -3,13 +3,13 @@ interface Props {
3
3
  name?: string;
4
4
  label?: string;
5
5
  value?: string | null;
6
- /** map value → variant. Если не задан — default. */
6
+ /** Maps a value to a variant; without it, the default is used. */
7
7
  map?: Record<string, BadgeVariant>;
8
- /** Backend BadgeEntry::colors() — value → variant (алиас map). */
8
+ /** The backend's BadgeEntry::colors(): value → variant, an alias of map. */
9
9
  colors?: Record<string, BadgeVariant>;
10
- /** map value → отображаемая подпись (локализация: active → «Активен»). */
10
+ /** Maps a value to the label shown — the localization: active → "Active". */
11
11
  labels?: Record<string, string>;
12
- /** Принудительный variant. */
12
+ /** Forces a particular variant. */
13
13
  variant?: BadgeVariant;
14
14
  }
15
15
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
@@ -1,6 +1,6 @@
1
1
  export interface InfolistNode extends Record<string, unknown> {
2
2
  type: string;
3
- /** Hint: 'entry' либо 'layout'. */
3
+ /** The hint: 'entry' or 'layout'. */
4
4
  kind?: 'entry' | 'layout';
5
5
  items?: InfolistNode[];
6
6
  }
@@ -2,11 +2,11 @@ interface Props {
2
2
  name?: string;
3
3
  label?: string;
4
4
  value?: string | number | null;
5
- /** Заместитель пустого значения. */
5
+ /** What stands in for an empty value. */
6
6
  placeholder?: string;
7
- /** Применить mono-font (например для ID/UUID). */
7
+ /** Use a monospaced font, for an id or a UUID, say. */
8
8
  mono?: boolean;
9
- /** Preset форматтер: datetime/date/money/boolean/bytes. */
9
+ /** The preset formatter: datetime, date, money, boolean or bytes. */
10
10
  preset?: string;
11
11
  meta?: Record<string, unknown>;
12
12
  }
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Default-bundle с минимальным набором builtin infolist-entry'ев.
2
+ * The default bundle, with the minimal set of built-in infolist entries.
3
3
  *
4
- * View-страница (ResourceViewPage) использует те же type-strings что и
5
- * form-page (ResourceFormPage) — backend Field::fieldType() возвращает
6
- * одинаковое имя в обоих контекстах. Поэтому infolist-mapping должен
7
- * покрывать те же типы что registerBuiltinComponents — fallback на
8
- * TextEntry для всех stdread-only представлений.
4
+ * The view page (ResourceViewPage) uses the same type strings as the form page
5
+ * (ResourceFormPage): the backend's Field::fieldType() returns one name in
6
+ * both contexts. So the infolist mapping has to cover the same types
7
+ * registerBuiltinComponents does, falling back to TextEntry for every
8
+ * read-only rendering.
9
9
  */
10
10
  export declare function registerBuiltinInfolistEntries(): void;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Public exports infolist-системы.
2
+ * The public exports of the infolist system.
3
3
  */
4
4
  export { default as InfolistRenderer } from './InfolistRenderer.vue';
5
5
  export type { InfolistNode } from './InfolistRenderer.vue';
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Composable для read-only record-контекста, передаваемого Infolist'ом.
2
+ * The composable behind the read-only record context an infolist passes down.
3
3
  *
4
- * Контейнер (ResourceViewPage) вызывает `provideRecord(record)`, entry-
5
- * компоненты — `useRecord()` для чтения значения.
4
+ * The container — ResourceViewPage — calls `provideRecord(record)`, and the
5
+ * entry components call `useRecord()` to read the values.
6
6
  */
7
7
  export declare function provideRecord(record: Record<string, unknown>): void;
8
8
  export declare function useRecord(): Record<string, unknown>;
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Реестр infolist-entry-компонентов.
2
+ * The registry of the infolist entry components.
3
3
  *
4
- * Аналог field-registry, но для read-only display'я. Узлы манифеста имеют
5
- * форму:
6
- * { type: 'text', name: 'title', label: 'Заголовок', value?: '...' }
7
- * либо без явного `value` — тогда entry извлекает `record[name]` из
8
- * provide'нутого `record`.
4
+ * It mirrors the field registry, but for a read-only display. The manifest's
5
+ * nodes look like:
6
+ * { type: 'text', name: 'title', label: 'Title', value?: '...' }
7
+ * or come without an explicit `value`, in which case the entry takes
8
+ * `record[name]` from the provided `record`.
9
9
  *
10
- * Host регистрирует кастомные entry через `registerInfolistEntry()` /
10
+ * A host registers its own entries through `registerInfolistEntry()` or a
11
11
  * `registerInfolistEntries()` bundle.
12
12
  */
13
13
  import type { Component } from 'vue';
@@ -1,9 +1,9 @@
1
1
  import type { LayoutNode } from '../render/LayoutRenderer.vue';
2
2
  interface Props {
3
3
  items: LayoutNode[];
4
- /** Зазор между ячейками (CSS, token или px). */
4
+ /** The gap between the cells: CSS, a token or pixels. */
5
5
  gap?: string;
6
- /** Сколько колонок в гриде (default 12). */
6
+ /** How many columns the grid has; 12 by default. */
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<{}>, {
@@ -1,7 +1,7 @@
1
1
  import type { LayoutNode } from '../render/LayoutRenderer.vue';
2
2
  interface Props {
3
3
  items: LayoutNode[];
4
- /** CSS-зазор между элементами (token либо px), по умолчанию --uid-space-md. */
4
+ /** The CSS gap between the items, a token or pixels; --uid-space-md by default. */
5
5
  gap?: string;
6
6
  }
7
7
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
@@ -1,27 +1,28 @@
1
1
  import type { LayoutNode } from '../render/LayoutRenderer.vue';
2
2
  export interface TabNode {
3
- /** Уникальный ключ вкладки. Если не задан — берётся индекс. */
3
+ /** The tab's unique key; without one, its index is used. */
4
4
  key?: string;
5
- /** Текст вкладки. */
5
+ /** The tab's text. */
6
6
  label: string;
7
7
  icon?: string | null;
8
8
  items: LayoutNode[];
9
9
  }
10
10
  interface Props {
11
11
  items: TabNode[];
12
- /** Активная вкладка (key либо индекс при отсутствии key). */
12
+ /** The active tab — its key, or its index when there is no key. */
13
13
  active?: string | number;
14
14
  /**
15
- * Отступ между элементами внутри вкладки.
15
+ * The gap between the elements inside a tab.
16
16
  *
17
- * Панель вкладки раскладывала детей БЕЗ стека: поля шли вплотную, зазор 0.
18
- * Внутри `Rows` тот же набор полей дышал (`--uid-space-md`), а на вкладке
19
- * подпись следующего поля прилипала к подсказке предыдущего — читалось как
20
- * одна сплошная лента, где не видно, где кончается одно поле и начинается
21
- * другое.
17
+ * A tab panel used to lay its children out with NO stack: the fields ran
18
+ * together at a gap of zero. Inside `Rows` the very same fields breathed
19
+ * (`--uid-space-md`), while on a tab the next field's label stuck to the
20
+ * previous one's hint — it read as one continuous ribbon, with no telling
21
+ * where one field ended and the next began.
22
22
  *
23
- * Взято на ступень крупнее строчного ритма: вкладка — это набор наборов, и
24
- * расстояние между ними должно быть заметнее, чем внутри одного поля.
23
+ * The value is one step above the line rhythm: a tab is a set of sets, and
24
+ * the distance between them should be more noticeable than the distance
25
+ * inside a single field.
25
26
  */
26
27
  gap?: string;
27
28
  }
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Уведомления: шторка топбара и страница полного списка.
2
+ * The notifications: the topbar's drawer and the full-list page.
3
3
  *
4
- * Шторка ЖИВЁТ в `shell/NotificationsDrawer.vue` — именно её рисует AdminApp.
5
- * Здесь долгое время лежал её двойник с тем же именем: он экспортировался
6
- * наружу, но не рисовался нигде. Правка в него уходила в пустоту — так и
7
- * случилось со ссылкой на полный список, добавленной в 1.25.1.
4
+ * The drawer LIVES in `shell/NotificationsDrawer.vue` — that is the one
5
+ * AdminApp draws. For a long time a twin of it sat here under the same name:
6
+ * exported outwards, rendered nowhere. An edit to it went into the void, which
7
+ * is exactly what happened to the link to the full list added in 1.25.1.
8
8
  */
9
9
  export { default as NotificationsDrawer } from '../shell/NotificationsDrawer.vue';
10
10
  export { default as NotificationsPage } from './NotificationsPage.vue';
@@ -1,9 +1,9 @@
1
1
  interface Props {
2
- /** Заголовок страницы (по умолчанию «Profile»). */
2
+ /** The page's title; "Profile" by default. */
3
3
  title?: string;
4
- /** Подзаголовок (по умолчанию из handoff'а). */
4
+ /** The subtitle; taken from the handoff by default. */
5
5
  subtitle?: string;
6
- /** Какая section активна. */
6
+ /** Which section is active. */
7
7
  section?: 'general' | 'security' | 'tokens' | 'sessions' | string;
8
8
  }
9
9
  declare var __VLS_49: {}, __VLS_60: string, __VLS_61: {
@@ -1,5 +1,5 @@
1
1
  interface Props {
2
- /** Включена ли 2FA на момент монтирования (auth.user.twoFactorEnabled). */
2
+ /** Whether 2FA was on when this mounted — auth.user.twoFactorEnabled. */
3
3
  enabled: boolean;
4
4
  }
5
5
  declare var __VLS_17: {
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Default-bundle с минимальным набором builtin-компонентов.
2
+ * The default bundle, with the minimal set of built-in components.
3
3
  *
4
- * Использование:
4
+ * Usage:
5
5
  *
6
6
  * import { registerBuiltinComponents } from '@dskripchenko/laravel-admin'
7
7
  * registerBuiltinComponents()
@@ -1,17 +1,18 @@
1
1
  /**
2
- * Composable для form-state: предоставляет state + ошибки через provide/inject.
2
+ * The form-state composable: it exposes the state and the errors through
3
+ * provide/inject.
3
4
  *
4
- * Контейнер (Resource form / Settings page) вызывает `provideFormState()`,
5
- * Field-компоненты в дереве — `useFormState()` для чтения значения и
6
- * мутации поля.
5
+ * The container — a resource form, a settings page — calls
6
+ * `provideFormState()`, and the field components in the tree call
7
+ * `useFormState()` to read a value and change a field.
7
8
  *
8
- * State — reactive proxy; setField мутирует ключ. Errors — отдельный
9
- * reactive Map (field-name → string[] messages).
9
+ * The state is a reactive proxy that setField mutates by key; the errors are a
10
+ * separate reactive map of field name → string[] messages.
10
11
  */
11
12
  export interface FormStateContext {
12
13
  state: Record<string, unknown>;
13
14
  errors: Record<string, string[]>;
14
- /** Контекст формы: FieldRenderer скрывает поля с visibility[mode]=false. */
15
+ /** The form's context: FieldRenderer hides the fields with visibility[mode]=false. */
15
16
  mode?: 'create' | 'update' | 'view';
16
17
  setField: (name: string, value: unknown) => void;
17
18
  getField: (name: string) => unknown;
@@ -20,19 +21,21 @@ export interface FormStateContext {
20
21
  clearErrors: () => void;
21
22
  }
22
23
  /**
23
- * Создаёт form-context и provid'ит его потомкам.
24
+ * Creates the form context and provides it to the descendants.
24
25
  *
25
- * Переданный `initial`-object оборачивается в `reactive()` — мутации stora
26
- * видны и снаружи (caller владеет state'ом и может его читать после submit'а).
26
+ * The `initial` object given is wrapped into `reactive()`, so the mutations are
27
+ * visible from outside too: the caller owns the state and may read it after a
28
+ * submit.
27
29
  *
28
- * @param initial Начальные значения state'а.
29
- * @param initialErrors Начальные ошибки (для повторного render'а после
30
- * ValidationError).
30
+ * @param initial The state's initial values.
31
+ * @param initialErrors The initial errors, for a re-render after a
32
+ * ValidationError.
31
33
  */
32
34
  export declare function provideFormState(initial?: Record<string, unknown>, initialErrors?: Record<string, string[]>, mode?: 'create' | 'update' | 'view'): FormStateContext;
33
35
  /**
34
- * Получить form-context. Throws, если не вызван внутри `provideFormState()`.
36
+ * Returns the form context. It throws when called outside a
37
+ * `provideFormState()`.
35
38
  */
36
39
  export declare function useFormState(): FormStateContext;
37
- /** Опционально получить (null если нет). */
40
+ /** The optional form: null when there is none. */
38
41
  export declare function tryUseFormState(): FormStateContext | null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Public exports JSON-driven рендеринга.
2
+ * The public exports of the JSON-driven rendering.
3
3
  */
4
4
  export { default as FieldRenderer } from './FieldRenderer.vue';
5
5
  export type { FieldNode } from './FieldRenderer.vue';
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Реестр Vue-компонентов для JSON-driven рендеринга.
2
+ * The registry of the Vue components behind the JSON-driven rendering.
3
3
  *
4
- * Содержит две Map'ы — для `field`-типов (input'ы, контролы) и для
5
- * `layout`-типов (контейнеры). LayoutRenderer и FieldRenderer резолвят тип
6
- * через эти реестры; host-проект может зарегистрировать кастомные компоненты
7
- * через `registerField()` / `registerLayout()`.
4
+ * It holds two maps: one for the `field` types — the inputs and controls — and
5
+ * one for the `layout` types, the containers. LayoutRenderer and FieldRenderer
6
+ * resolve a type through them, and a host project registers its own components
7
+ * with `registerField()` and `registerLayout()`.
8
8
  *
9
- * Singleton — один регистр на admin-instance. Тестовый сценарий —
10
- * `clearRegistry()` + `registerField()` в `beforeEach`.
9
+ * It is a singleton, one registry per admin instance. In tests the pattern is
10
+ * `clearRegistry()` plus `registerField()` in a `beforeEach`.
11
11
  */
12
12
  import type { Component } from 'vue';
13
13
  export declare const registerField: (type: string, value: Component) => void;
@@ -18,10 +18,10 @@ export declare const registerLayout: (type: string, value: Component) => void;
18
18
  export declare const getLayout: (type: string) => Component | null;
19
19
  export declare const hasLayout: (type: string) => boolean;
20
20
  export declare const listLayouts: () => string[];
21
- /** Очистить оба реестра. Используется в тестах. */
21
+ /** Clears both registries; used by the tests. */
22
22
  export declare function clearRegistry(): void;
23
23
  /**
24
- * Зарегистрировать сразу несколько компонентов.
24
+ * Registers several components at once.
25
25
  *
26
26
  * registerComponents({
27
27
  * fields: { text: TextField, select: SelectField },
@@ -12,11 +12,11 @@ interface Props {
12
12
  filters: FilterDef[];
13
13
  values: Record<string, unknown>;
14
14
  columns: ColumnDef[];
15
- /** Group-by column key (если выбран). */
15
+ /** The key of the group-by column, when one is chosen. */
16
16
  groupBy?: string | null;
17
- /** Visibility map для column-toggle. true = видна. */
17
+ /** The visibility map behind the column toggle; true means shown. */
18
18
  columnVisibility?: Record<string, boolean>;
19
- /** Показывать ли "Сохранить" (saved-views) — host управляет наличием feature. */
19
+ /** Whether to show "Save" — the saved views; the host decides whether the feature is there. */
20
20
  enableSavedViews?: boolean;
21
21
  }
22
22
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
@@ -1,9 +1,9 @@
1
1
  interface Props {
2
2
  /**
3
- * Eloquent morph-class либо FQCN модели. Может быть пустой строкой /
4
- * null — компонент в этом случае не делает запрос и показывает
5
- * пустой state. Это нужно чтобы блок «История изменений» был всегда
6
- * виден на view-странице даже когда у Resource не задан model-class.
3
+ * The Eloquent morph class, or the model's FQCN. It may be an empty string
4
+ * or null, in which case the component makes no request and shows an empty
5
+ * state — that way the "change history" block stays visible on the view page
6
+ * even for a resource with no model class.
7
7
  */
8
8
  subjectType: string | null;
9
9
  subjectId: string | number;
@@ -1,8 +1,9 @@
1
1
  /**
2
- * FilterEditor — render-функция для редактора одного filter'а.
2
+ * FilterEditor — the render function behind one filter's editor.
3
3
  *
4
- * Отдельный модуль (не SFC), потому что компонент чисто render-based —
5
- * выбирает control под filter.type без шаблона и состояния.
4
+ * It is a module rather than an SFC because the component is purely
5
+ * render-based: it picks a control for the filter.type, with no template and
6
+ * no state.
6
7
  */
7
8
  import { type PropType } from 'vue';
8
9
  export interface FilterOption {
@@ -4,13 +4,13 @@ interface Props {
4
4
  rowId: string | number;
5
5
  column: string;
6
6
  value: unknown;
7
- /** Если false — двойной клик ничего не делает (read-only cell). */
7
+ /** With false a double click does nothing: the cell is read-only. */
8
8
  editable?: boolean;
9
- /** Тип контрола редактирования. */
9
+ /** The kind of editing control. */
10
10
  inputType?: InlineInputType;
11
- /** Для inputType='select' — мапа value→label. */
11
+ /** For inputType='select': the value → label map. */
12
12
  options?: Record<string | number, string>;
13
- /** Per-row override map; если column ∈ override и значение false — read-only. */
13
+ /** The per-row override map: a column present there with a false value is read-only. */
14
14
  rowOverride?: Record<string, boolean>;
15
15
  }
16
16
  declare var __VLS_1: {}, __VLS_3: {};
@@ -1,11 +1,11 @@
1
1
  interface Props {
2
- /** Slug ресурса (articles/users/etc). */
2
+ /** The resource slug: articles, users and so on. */
3
3
  slug: string;
4
- /** ID записи. null/undefined → create-mode; число/строка → edit. */
4
+ /** The record id. null/undefined means create mode, a number or string means edit. */
5
5
  id?: string | number | null;
6
6
  /**
7
- * Override имени router-route для back-redirect после save/delete.
8
- * По умолчанию выводится из slug: `admin.resource.{slug}.index`.
7
+ * Overrides the router route name used to go back after a save or a delete.
8
+ * By default it is derived from the slug: `admin.resource.{slug}.index`.
9
9
  */
10
10
  indexRouteName?: string | null;
11
11
  }
@@ -1,13 +1,13 @@
1
1
  interface Props {
2
- /** Slug ресурса (users/articles/etc). */
2
+ /** Resource slug: users, articles and so on. */
3
3
  slug: string;
4
- /** Заголовок страницы. Если не задан — берётся из manifest'а. */
4
+ /** Page title. Taken from the manifest when not given. */
5
5
  title?: string | null;
6
- /** Подпись под заголовком (например "Аналитика контента"). */
6
+ /** The line under the title, e.g. "Content analytics". */
7
7
  subtitle?: string | null;
8
- /** Текст primary-кнопки «Создать». */
8
+ /** Text of the primary “Create” button. */
9
9
  createLabel?: string;
10
- /** Имя router-route для action «Создать». */
10
+ /** Router route name behind the “Create” action. */
11
11
  createRouteName?: string | null;
12
12
  }
13
13
  declare var __VLS_5: {}, __VLS_79: {}, __VLS_149: {
@@ -1,22 +1,22 @@
1
1
  interface Props {
2
2
  slug: string;
3
3
  id: string | number;
4
- /** Имя router-route для перехода в edit. */
4
+ /** The name of the router route leading to the edit page. */
5
5
  editRouteName?: string;
6
6
  /**
7
- * Override имени router-route для back-link / возврата после delete.
8
- * По умолчанию выводится из slug: `admin.resource.{slug}.index`. Если
9
- * у host'а собственное имя — передаётся явно.
7
+ * Overrides the router route name behind the back link and the return after
8
+ * a delete. By default it is derived from the slug as
9
+ * `admin.resource.{slug}.index`; a host with its own name passes it here.
10
10
  */
11
11
  indexRouteName?: string | null;
12
12
  /**
13
- * Override Eloquent morph-class. По умолчанию резолвится из
13
+ * Overrides the Eloquent morph class. By default it is resolved from
14
14
  * `manifest.resources[slug].subject_type` (Resource::meta()).
15
15
  */
16
16
  auditSubjectType?: string | null;
17
- /** Поле в record, по которому считать status badge. По умолчанию `status`. */
17
+ /** The record's field the status badge is built from; `status` by default. */
18
18
  statusField?: string;
19
- /** Префикс UID-метки рядом со статусом. Например 'A-' даёт 'A-1284'. */
19
+ /** The prefix of the UID label next to the status: 'A-' gives 'A-1284'. */
20
20
  uidPrefix?: string;
21
21
  }
22
22
  declare var __VLS_75: {
@@ -1,18 +1,20 @@
1
1
  /**
2
- * Formatter cell-значений для ResourceIndexPage.
2
+ * Formats the cell values of ResourceIndexPage.
3
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.
4
+ * The backend's TableColumn presets:
5
+ * - text → as it is, a string.
6
+ * - date → 'd.m.Y' by default.
7
+ * - datetime → 'd.m.Y H:i:s' by default.
8
+ * - money → '{value} {currency}', with decimals.
9
+ * - boolean → the trueLabel or falseLabel from the meta.
10
+ * - badge → the text; the styling happens in the UI, through a slot or
11
+ * a CSS class.
12
+ * - bytes → a human-readable size.
13
+ * - text → the fallback.
13
14
  *
14
- * `auto-format` для колонок без явного preset'а: если значение похоже на ISO
15
- * datetime (`*_at` или строка с T...Z) — применяется default datetime формат.
15
+ * Columns with no explicit preset are formatted automatically: a value that
16
+ * looks like an ISO datetime — the column ends in `_at`, or the string carries
17
+ * T...Z — gets the default datetime format.
16
18
  */
17
19
  export type CellPreset = 'text' | 'date' | 'datetime' | 'money' | 'boolean' | 'badge' | 'bytes';
18
20
  export interface CellMeta {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Public exports resource-страниц admin'а.
2
+ * The public exports of the admin's resource pages.
3
3
  */
4
4
  export { default as ResourceIndexPage } from './ResourceIndexPage.vue';
5
5
  export { default as ResourceFormPage } from './ResourceFormPage.vue';