@modufolio/panel 0.1.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.
Files changed (194) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +165 -0
  3. package/dist/Builder/ImageNodeView.d.ts +33 -0
  4. package/dist/Builder/document.d.ts +17 -0
  5. package/dist/Builder/dragHandle.d.ts +13 -0
  6. package/dist/Builder/editing.d.ts +53 -0
  7. package/dist/Builder/plugins.d.ts +27 -0
  8. package/dist/Builder/schema.d.ts +20 -0
  9. package/dist/Components/Actions/Action.vue.d.ts +116 -0
  10. package/dist/Components/Actions/ActionGroup.vue.d.ts +25 -0
  11. package/dist/Components/Actions/ActionGroupItem.vue.d.ts +48 -0
  12. package/dist/Components/Auth/ForgotPassword.vue.d.ts +17 -0
  13. package/dist/Components/Auth/Login.vue.d.ts +33 -0
  14. package/dist/Components/Auth/ResetPassword.vue.d.ts +27 -0
  15. package/dist/Components/Auth/TwoFactor.vue.d.ts +32 -0
  16. package/dist/Components/Auth/TwoFactorVerify.vue.d.ts +31 -0
  17. package/dist/Components/Columns/BadgeColumn.vue.d.ts +34 -0
  18. package/dist/Components/Columns/BooleanColumn.vue.d.ts +78 -0
  19. package/dist/Components/Columns/CellActions.vue.d.ts +34 -0
  20. package/dist/Components/Columns/ColorColumn.vue.d.ts +84 -0
  21. package/dist/Components/Columns/CopyButton.vue.d.ts +15 -0
  22. package/dist/Components/Columns/DateColumn.vue.d.ts +60 -0
  23. package/dist/Components/Columns/IconColumn.vue.d.ts +56 -0
  24. package/dist/Components/Columns/ImageColumn.vue.d.ts +46 -0
  25. package/dist/Components/Columns/SelectColumn.vue.d.ts +71 -0
  26. package/dist/Components/Columns/TextColumn.vue.d.ts +69 -0
  27. package/dist/Components/Columns/TextInputColumn.vue.d.ts +75 -0
  28. package/dist/Components/Columns/ToggleColumn.vue.d.ts +91 -0
  29. package/dist/Components/Columns/TreeColumn.vue.d.ts +60 -0
  30. package/dist/Components/Columns/columnRegistry.d.ts +6 -0
  31. package/dist/Components/Composables/useInlineEdit.d.ts +27 -0
  32. package/dist/Components/Composables/useRelationship.d.ts +38 -0
  33. package/dist/Components/Core/Badge.vue.d.ts +47 -0
  34. package/dist/Components/Core/Button.vue.d.ts +131 -0
  35. package/dist/Components/Core/Dropdown.vue.d.ts +24 -0
  36. package/dist/Components/Core/Empty.vue.d.ts +54 -0
  37. package/dist/Components/Core/ErrorBoundary.vue.d.ts +24 -0
  38. package/dist/Components/Core/FlashMessages.vue.d.ts +7 -0
  39. package/dist/Components/Core/Icon.vue.d.ts +23 -0
  40. package/dist/Components/Core/Icons/DocumentLinesIcon.vue.d.ts +3 -0
  41. package/dist/Components/Core/Icons/SitemapIcon.vue.d.ts +3 -0
  42. package/dist/Components/Core/Label.vue.d.ts +52 -0
  43. package/dist/Components/Core/LoadingButton.vue.d.ts +18 -0
  44. package/dist/Components/Core/Modal.vue.d.ts +26 -0
  45. package/dist/Components/Core/Pagination.vue.d.ts +10 -0
  46. package/dist/Components/Core/SelectInput.vue.d.ts +26 -0
  47. package/dist/Components/Core/Tag.vue.d.ts +65 -0
  48. package/dist/Components/Core/TextInput.vue.d.ts +25 -0
  49. package/dist/Components/Core/iconRegistry.d.ts +3 -0
  50. package/dist/Components/Dialogs/ConfirmDialog.vue.d.ts +16 -0
  51. package/dist/Components/Dialogs/DeleteConfirmDialog.vue.d.ts +30 -0
  52. package/dist/Components/Dialogs/Dialog.vue.d.ts +81 -0
  53. package/dist/Components/Drawer/Drawer.vue.d.ts +130 -0
  54. package/dist/Components/Drawer/DrawerFieldGrid.vue.d.ts +39 -0
  55. package/dist/Components/Drawer/DrawerLink.vue.d.ts +96 -0
  56. package/dist/Components/Drawer/DrawerRelationList.vue.d.ts +81 -0
  57. package/dist/Components/Drawer/DrawerStack.vue.d.ts +93 -0
  58. package/dist/Components/Drawer/DrawerTabs.vue.d.ts +42 -0
  59. package/dist/Components/Drawer/NestedDrawerForm.vue.d.ts +55 -0
  60. package/dist/Components/Drawer/drawerFieldGrid.d.ts +25 -0
  61. package/dist/Components/Drawer/drawerTabs.d.ts +16 -0
  62. package/dist/Components/Drawer/useDrawerPage.d.ts +34 -0
  63. package/dist/Components/Drawer/useDrawerStack.d.ts +93 -0
  64. package/dist/Components/Drawer/useFocusedStackRow.d.ts +22 -0
  65. package/dist/Components/Drawer/useIsDrawer.d.ts +66 -0
  66. package/dist/Components/Drawer/visitDrawer.d.ts +48 -0
  67. package/dist/Components/Fields/BelongsToSelect.vue.d.ts +247 -0
  68. package/dist/Components/Fields/BlueprintForm.vue.d.ts +96 -0
  69. package/dist/Components/Fields/Calendar/CalendarPanel.vue.d.ts +63 -0
  70. package/dist/Components/Fields/Calendar/MonthGrid.vue.d.ts +82 -0
  71. package/dist/Components/Fields/CheckboxField.vue.d.ts +92 -0
  72. package/dist/Components/Fields/ColorPickerField.vue.d.ts +105 -0
  73. package/dist/Components/Fields/DatePickerField.vue.d.ts +102 -0
  74. package/dist/Components/Fields/DateRangePickerField.vue.d.ts +138 -0
  75. package/dist/Components/Fields/DateTimePickerField.vue.d.ts +134 -0
  76. package/dist/Components/Fields/FieldGrid.vue.d.ts +13 -0
  77. package/dist/Components/Fields/FileUploadField.vue.d.ts +117 -0
  78. package/dist/Components/Fields/MultiSelectField.vue.d.ts +129 -0
  79. package/dist/Components/Fields/ProseMirrorBuilderField.vue.d.ts +71 -0
  80. package/dist/Components/Fields/RangeField.vue.d.ts +122 -0
  81. package/dist/Components/Fields/RepeaterField.vue.d.ts +174 -0
  82. package/dist/Components/Fields/RichTextEditorField.vue.d.ts +118 -0
  83. package/dist/Components/Fields/SelectField.vue.d.ts +102 -0
  84. package/dist/Components/Fields/TagsField.vue.d.ts +102 -0
  85. package/dist/Components/Fields/TextField.vue.d.ts +138 -0
  86. package/dist/Components/Fields/TextareaField.vue.d.ts +111 -0
  87. package/dist/Components/Fields/TimePickerField.vue.d.ts +115 -0
  88. package/dist/Components/Fields/ToggleButtonsField.vue.d.ts +93 -0
  89. package/dist/Components/Fields/ToggleField.vue.d.ts +95 -0
  90. package/dist/Components/Fields/fieldRegistry.d.ts +25 -0
  91. package/dist/Components/Fields/fieldsFromSpec.d.ts +10 -0
  92. package/dist/Components/Fields/useBlueprint.d.ts +94 -0
  93. package/dist/Components/Fields/useFieldWidth.d.ts +10 -0
  94. package/dist/Components/Fields/validation.d.ts +43 -0
  95. package/dist/Components/Filters/DateRangeFilter.vue.d.ts +92 -0
  96. package/dist/Components/Filters/FacetedFilter.vue.d.ts +41 -0
  97. package/dist/Components/Filters/FilterIndicators.vue.d.ts +40 -0
  98. package/dist/Components/Filters/FilterPopover.vue.d.ts +38 -0
  99. package/dist/Components/Filters/MultiSelectFilter.vue.d.ts +51 -0
  100. package/dist/Components/Filters/NumberFilter.vue.d.ts +61 -0
  101. package/dist/Components/Filters/QueryBuilder.vue.d.ts +32 -0
  102. package/dist/Components/Filters/SelectFilter.vue.d.ts +61 -0
  103. package/dist/Components/Filters/TernaryFilter.vue.d.ts +73 -0
  104. package/dist/Components/Layout/AppLayout.vue.d.ts +137 -0
  105. package/dist/Components/Layout/Breadcrumbs.vue.d.ts +44 -0
  106. package/dist/Components/Layout/Cluster.vue.d.ts +88 -0
  107. package/dist/Components/Layout/Container.vue.d.ts +69 -0
  108. package/dist/Components/Layout/Grid.vue.d.ts +110 -0
  109. package/dist/Components/Layout/PageHeader.vue.d.ts +62 -0
  110. package/dist/Components/Layout/Sidebar.vue.d.ts +59 -0
  111. package/dist/Components/Layout/Stack.vue.d.ts +69 -0
  112. package/dist/Components/Layout/TopNavigation.vue.d.ts +124 -0
  113. package/dist/Components/Media/MediaPickerDialog.vue.d.ts +20 -0
  114. package/dist/Components/Media/mediaEndpoints.d.ts +18 -0
  115. package/dist/Components/Notifications/Toast.vue.d.ts +17 -0
  116. package/dist/Components/Notifications/useToast.d.ts +43 -0
  117. package/dist/Components/Relations/RelationManager.vue.d.ts +232 -0
  118. package/dist/Components/Sections/FieldsSection.vue.d.ts +56 -0
  119. package/dist/Components/Sections/FilesSection.vue.d.ts +120 -0
  120. package/dist/Components/Sections/FormSection.vue.d.ts +111 -0
  121. package/dist/Components/Sections/InfoSection.vue.d.ts +77 -0
  122. package/dist/Components/Sections/Section.vue.d.ts +67 -0
  123. package/dist/Components/Table/ColumnToggle.vue.d.ts +42 -0
  124. package/dist/Components/Table/ExportButton.vue.d.ts +93 -0
  125. package/dist/Components/Table/SchemaCell.d.ts +50 -0
  126. package/dist/Components/Table/SchemaFilterPanel.vue.d.ts +64 -0
  127. package/dist/Components/Table/SchemaTable.vue.d.ts +255 -0
  128. package/dist/Components/Table/Table.vue.d.ts +232 -0
  129. package/dist/Components/Table/TableEmptyState.vue.d.ts +24 -0
  130. package/dist/Components/Table/TablePagination.vue.d.ts +71 -0
  131. package/dist/Components/Table/TableSkeletonRows.vue.d.ts +52 -0
  132. package/dist/Components/Table/TableSortButton.vue.d.ts +38 -0
  133. package/dist/Components/Table/TableToolbar.vue.d.ts +62 -0
  134. package/dist/Components/Table/schemaLinks.d.ts +16 -0
  135. package/dist/Components/Table/tableSchema.d.ts +243 -0
  136. package/dist/Components/Table/tableTypes.d.ts +13 -0
  137. package/dist/Components/Table/useSchemaActions.d.ts +82 -0
  138. package/dist/Components/Table/useSchemaFilters.d.ts +28 -0
  139. package/dist/Components/Table/useTableExport.d.ts +16 -0
  140. package/dist/Components/Table/useTableGrouping.d.ts +9 -0
  141. package/dist/Components/Table/useTableRowFocus.d.ts +27 -0
  142. package/dist/Components/Table/useTableSelection.d.ts +15 -0
  143. package/dist/Components/Table/useTableTree.d.ts +23 -0
  144. package/dist/Components/Widgets/StatCard.vue.d.ts +81 -0
  145. package/dist/Components/Widgets/StatsWidget.vue.d.ts +27 -0
  146. package/dist/Components/Wizard/Wizard.vue.d.ts +99 -0
  147. package/dist/Composables/useAsyncData.d.ts +48 -0
  148. package/dist/Composables/useDeleteConfirmation.d.ts +86 -0
  149. package/dist/Composables/useDragReorder.d.ts +12 -0
  150. package/dist/Composables/useFieldSaver.d.ts +15 -0
  151. package/dist/Composables/useFocusTrap.d.ts +5 -0
  152. package/dist/Composables/useLocalStoragePersistence.d.ts +18 -0
  153. package/dist/Composables/useNestedDrawerForm.d.ts +58 -0
  154. package/dist/Composables/usePagination.d.ts +23 -0
  155. package/dist/Composables/usePendingKeys.d.ts +30 -0
  156. package/dist/Composables/useQuery.d.ts +61 -0
  157. package/dist/Composables/useReconciled.d.ts +22 -0
  158. package/dist/Composables/useUnsavedChangesWarning.d.ts +16 -0
  159. package/dist/Primitives/hideOthers.d.ts +12 -0
  160. package/dist/Primitives/teleportTarget.d.ts +2 -0
  161. package/dist/Primitives/useAnchoredPosition.d.ts +32 -0
  162. package/dist/Primitives/useArrowNavigation.d.ts +30 -0
  163. package/dist/Primitives/useBodyScrollLock.d.ts +9 -0
  164. package/dist/Primitives/useDismissableLayer.d.ts +46 -0
  165. package/dist/Primitives/useId.d.ts +13 -0
  166. package/dist/Primitives/useTypeahead.d.ts +11 -0
  167. package/dist/Utils/apiFetch.d.ts +28 -0
  168. package/dist/Utils/csrf.d.ts +2 -0
  169. package/dist/Utils/dates.d.ts +50 -0
  170. package/dist/Utils/moduleSingleton.d.ts +21 -0
  171. package/dist/Utils/optimistic.d.ts +33 -0
  172. package/dist/Utils/reconcile.d.ts +17 -0
  173. package/dist/Utils/tagsChanged.d.ts +16 -0
  174. package/dist/Utils/url.d.ts +40 -0
  175. package/dist/Utils/writeGate.d.ts +82 -0
  176. package/dist/index.css +1 -0
  177. package/dist/index.d.ts +157 -0
  178. package/dist/index.js +27193 -0
  179. package/dist/index.js.map +1 -0
  180. package/dist/injectionKeys.d.ts +10 -0
  181. package/dist/plugin.d.ts +36 -0
  182. package/dist/types/menu.d.ts +11 -0
  183. package/docs/async-writes.md +159 -0
  184. package/docs/custom-fields.md +71 -0
  185. package/docs/drawer-protocol.md +130 -0
  186. package/docs/overlays.md +106 -0
  187. package/docs/relation-fields.md +112 -0
  188. package/docs/roadmap.md +38 -0
  189. package/docs/table-schema.md +371 -0
  190. package/package.json +150 -0
  191. package/styles/buttons.css +31 -0
  192. package/styles/form.css +74 -0
  193. package/styles/index.css +15 -0
  194. package/styles/tokens.css +79 -0
@@ -0,0 +1,24 @@
1
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ title: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ description: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
+ title: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ description: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ }>> & Readonly<{}>, {
20
+ title: string;
21
+ description: string;
22
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -0,0 +1,71 @@
1
+ import { PropType } from 'vue';
2
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
+ currentPage: {
4
+ type: NumberConstructor;
5
+ required: true;
6
+ };
7
+ lastPage: {
8
+ type: NumberConstructor;
9
+ required: true;
10
+ };
11
+ total: {
12
+ type: NumberConstructor;
13
+ required: true;
14
+ };
15
+ perPage: {
16
+ type: NumberConstructor;
17
+ default: number;
18
+ };
19
+ from: {
20
+ type: NumberConstructor;
21
+ required: true;
22
+ };
23
+ to: {
24
+ type: NumberConstructor;
25
+ required: true;
26
+ };
27
+ perPageOptions: {
28
+ type: PropType<number[]>;
29
+ default: () => number[];
30
+ };
31
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
+ goto: (...args: any[]) => void;
33
+ "update:perPage": (...args: any[]) => void;
34
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
35
+ currentPage: {
36
+ type: NumberConstructor;
37
+ required: true;
38
+ };
39
+ lastPage: {
40
+ type: NumberConstructor;
41
+ required: true;
42
+ };
43
+ total: {
44
+ type: NumberConstructor;
45
+ required: true;
46
+ };
47
+ perPage: {
48
+ type: NumberConstructor;
49
+ default: number;
50
+ };
51
+ from: {
52
+ type: NumberConstructor;
53
+ required: true;
54
+ };
55
+ to: {
56
+ type: NumberConstructor;
57
+ required: true;
58
+ };
59
+ perPageOptions: {
60
+ type: PropType<number[]>;
61
+ default: () => number[];
62
+ };
63
+ }>> & Readonly<{
64
+ onGoto?: ((...args: any[]) => any) | undefined;
65
+ "onUpdate:perPage"?: ((...args: any[]) => any) | undefined;
66
+ }>, {
67
+ perPage: number;
68
+ perPageOptions: number[];
69
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
70
+ declare const _default: typeof __VLS_export;
71
+ export default _default;
@@ -0,0 +1,52 @@
1
+ import { PropType } from 'vue';
2
+ import { TableColumn } from './tableTypes';
3
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ rows: {
5
+ type: NumberConstructor;
6
+ default: number;
7
+ };
8
+ columns: {
9
+ type: PropType<TableColumn[]>;
10
+ required: true;
11
+ };
12
+ expandable: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ selectable: {
17
+ type: BooleanConstructor;
18
+ default: boolean;
19
+ };
20
+ hasActions: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
25
+ rows: {
26
+ type: NumberConstructor;
27
+ default: number;
28
+ };
29
+ columns: {
30
+ type: PropType<TableColumn[]>;
31
+ required: true;
32
+ };
33
+ expandable: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ selectable: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ hasActions: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ }>> & Readonly<{}>, {
46
+ rows: number;
47
+ expandable: boolean;
48
+ selectable: boolean;
49
+ hasActions: boolean;
50
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
51
+ declare const _default: typeof __VLS_export;
52
+ export default _default;
@@ -0,0 +1,38 @@
1
+ import { PropType } from 'vue';
2
+ import { TableColumn } from './tableTypes';
3
+ declare const __VLS_export: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
4
+ column: {
5
+ type: PropType<TableColumn>;
6
+ required: true;
7
+ };
8
+ sortColumn: {
9
+ type: StringConstructor;
10
+ default: null;
11
+ };
12
+ sortDirection: {
13
+ type: StringConstructor;
14
+ default: string;
15
+ };
16
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ sort: (...args: any[]) => void;
18
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
19
+ column: {
20
+ type: PropType<TableColumn>;
21
+ required: true;
22
+ };
23
+ sortColumn: {
24
+ type: StringConstructor;
25
+ default: null;
26
+ };
27
+ sortDirection: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ }>> & Readonly<{
32
+ onSort?: ((...args: any[]) => any) | undefined;
33
+ }>, {
34
+ sortColumn: string;
35
+ sortDirection: string;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
@@ -0,0 +1,62 @@
1
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
2
+ type __VLS_Slots = {} & {
3
+ header?: (props: typeof __VLS_1) => any;
4
+ } & {
5
+ filters?: (props: typeof __VLS_3) => any;
6
+ } & {
7
+ headerActions?: (props: typeof __VLS_5) => any;
8
+ };
9
+ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
10
+ searchable: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ search: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ showTreeToggle: {
19
+ type: BooleanConstructor;
20
+ default: boolean;
21
+ };
22
+ allTreeCollapsed: {
23
+ type: BooleanConstructor;
24
+ default: boolean;
25
+ };
26
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
27
+ "update:search": (...args: any[]) => void;
28
+ toggleTree: (...args: any[]) => void;
29
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
30
+ searchable: {
31
+ type: BooleanConstructor;
32
+ default: boolean;
33
+ };
34
+ search: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ showTreeToggle: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ allTreeCollapsed: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ }>> & Readonly<{
47
+ "onUpdate:search"?: ((...args: any[]) => any) | undefined;
48
+ onToggleTree?: ((...args: any[]) => any) | undefined;
49
+ }>, {
50
+ search: string;
51
+ searchable: boolean;
52
+ showTreeToggle: boolean;
53
+ allTreeCollapsed: boolean;
54
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
55
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
56
+ declare const _default: typeof __VLS_export;
57
+ export default _default;
58
+ type __VLS_WithSlots<T, S> = T & {
59
+ new (): {
60
+ $slots: S;
61
+ };
62
+ };
@@ -0,0 +1,16 @@
1
+ import { SchemaColumn } from './tableSchema';
2
+ /**
3
+ * The cell's displayed value, honouring `valueKey` so a column can render a
4
+ * nested field while staying keyed on its own name.
5
+ *
6
+ * Resolved here rather than using Table.vue's `value` slot prop, which always
7
+ * reads the bare column key — that returns the relation object, not its name.
8
+ */
9
+ export declare function cellValue(column: SchemaColumn, record: Record<string, any>): unknown;
10
+ /** Where a cell links to, or null when it renders as plain content. */
11
+ export declare function cellLink(column: SchemaColumn, record: Record<string, any>, recordUrl: string | null | undefined): string | null;
12
+ /**
13
+ * A drill-down into a *related* record gets the accented style with an arrow;
14
+ * a link to the row's own drawer stays muted and inline.
15
+ */
16
+ export declare function cellLinkProps(column: SchemaColumn, record: Record<string, any>, recordUrl: string | null | undefined, queryParams: Record<string, any>): Record<string, any>;
@@ -0,0 +1,243 @@
1
+ /**
2
+ * Client-side shape of a server-authored table schema.
3
+ *
4
+ * Mirrors App\Table\TableSchema / App\Table\Column. Declared in a .ts file
5
+ * rather than inside the SFC so pages can import the types (`<script setup>`
6
+ * cannot export type declarations).
7
+ */
8
+ export type SchemaColumnType = 'text' | 'select' | 'money' | 'numeric' | 'badge' | 'date' | 'boolean' | 'image' | 'icon' | 'color';
9
+ /**
10
+ * An action button rendered inside every cell of a column.
11
+ *
12
+ * Mirrors App\Table\ColumnAction. Either navigates (`urlTemplate`) or calls the
13
+ * handler the page registered under `name` in `cellActionHandlers`.
14
+ */
15
+ export interface SchemaColumnAction {
16
+ /** Key into the page's `cellActionHandlers` map. */
17
+ name: string;
18
+ /** Accessible name and tooltip. */
19
+ label: string;
20
+ icon?: string;
21
+ color?: string;
22
+ /** Render as a link. Dot-path placeholders, like `Column.urlTemplate`. */
23
+ urlTemplate?: string;
24
+ /** Render inert when this field on the row is truthy. */
25
+ disabledWhen?: string;
26
+ /** Omit entirely when this field on the row is truthy. */
27
+ hiddenWhen?: string;
28
+ confirm?: boolean;
29
+ confirmMessage?: string;
30
+ }
31
+ export interface SchemaColumn {
32
+ /** Field on the record, and the `#cell-{key}` slot name for overrides. */
33
+ key: string;
34
+ /** Duplicate of `key`; Table.vue reads either. */
35
+ name: string;
36
+ label: string;
37
+ type: SchemaColumnType | (string & {});
38
+ /** Resolved server-side against the list query — never declared by hand. */
39
+ sortable: boolean;
40
+ toggleable?: boolean;
41
+ hiddenByDefault?: boolean;
42
+ /** Link the cell to the record using the schema's `recordUrl`. */
43
+ linksToRecord?: boolean;
44
+ /** Read the displayed value from another field; dot-paths supported. */
45
+ valueKey?: string;
46
+ /** Per-column link target, overriding `recordUrl`. Dot-path placeholders. */
47
+ urlTemplate?: string;
48
+ /** Accented drill-down style with a trailing arrow. */
49
+ showArrow?: boolean;
50
+ /** Rendered when the row's value is null or empty. */
51
+ placeholder?: string;
52
+ /** Field holding a secondary line of text, computed by the presenter. */
53
+ descriptionKey?: string;
54
+ width?: string;
55
+ /** Date format, for `type: 'date'`. */
56
+ format?: string;
57
+ relative?: boolean;
58
+ /** Value → colour map, for `type: 'badge'` and read-only selects. */
59
+ colors?: Record<string, string>;
60
+ /** Choices for `type: 'select'`. */
61
+ options?: Array<{
62
+ label: string;
63
+ value: string;
64
+ class?: string;
65
+ }>;
66
+ /** Editable in place — the page supplies the save handler via `cellHandlers`. */
67
+ editable?: boolean;
68
+ /** Render the control inert when this field on the row is truthy. */
69
+ disabledWhen?: string;
70
+ /** Drop the control for a static badge when this field on the row is truthy. */
71
+ readOnlyWhen?: string;
72
+ /** Action buttons rendered inside every cell, after the value. */
73
+ actions?: SchemaColumnAction[];
74
+ /** Font emphasis: 'medium' | 'bold'. */
75
+ weight?: string;
76
+ /** Cell alignment: 'left' | 'center' | 'right'. */
77
+ align?: string;
78
+ /** Static text colour token. */
79
+ color?: string;
80
+ /** Registered icon name rendered before the value. */
81
+ icon?: string;
82
+ /** Truncate after N characters, keeping the full value in the title. */
83
+ limit?: number;
84
+ /** Offer click-to-copy on the cell. */
85
+ copyable?: boolean;
86
+ /** Thumbnail size, for `type: 'image'`: 'sm' | 'md' | 'lg' | 'xl'. */
87
+ size?: string;
88
+ /** Corner rounding, for `type: 'image'`: 'none' | 'sm' | 'md' | 'lg' | 'full'. */
89
+ rounded?: string;
90
+ /** ISO currency code, for `type: 'money'`. */
91
+ currency?: string;
92
+ /** Decimal places, for `type: 'numeric'`. */
93
+ decimals?: number;
94
+ }
95
+ /** Emphasis / alignment / colour → utility classes for a text cell. */
96
+ export declare function cellClasses(column: SchemaColumn): string;
97
+ /** Truncate for display; the untruncated value is kept as a title attribute. */
98
+ export declare function truncate(value: string, limit?: number): string;
99
+ /**
100
+ * Format a cell value for display.
101
+ *
102
+ * Kept client-side so re-sorting or a partial reload doesn't need the server
103
+ * to re-render text it already has.
104
+ */
105
+ export declare function formatValue(column: SchemaColumn, value: unknown): string;
106
+ export type SchemaFilterType = 'select' | 'multiSelect' | 'ternary' | 'trashed' | 'dateRange';
107
+ export interface SchemaFilter {
108
+ /** Query-param name and the key its value lives under in the filter form. */
109
+ key: string;
110
+ type: SchemaFilterType | (string & {});
111
+ label: string;
112
+ placeholder?: string;
113
+ options?: Array<{
114
+ label: string;
115
+ value: string;
116
+ }>;
117
+ /**
118
+ * The server capped the option list — only sent when it did. The control
119
+ * shows this rather than ending the list silently, so a value that exists
120
+ * but is unreachable from the dropdown is never mistaken for absent.
121
+ */
122
+ optionsTruncated?: boolean;
123
+ trueLabel?: string;
124
+ falseLabel?: string;
125
+ trueValue?: string;
126
+ falseValue?: string;
127
+ }
128
+ export interface SchemaConstraintOperator {
129
+ value: string;
130
+ label: string;
131
+ /** Number of value inputs the operator needs: 0, 1 or 2. */
132
+ values: number;
133
+ }
134
+ export interface SchemaConstraint {
135
+ key: string;
136
+ type: 'text' | 'number' | 'boolean' | 'date' | (string & {});
137
+ label: string;
138
+ icon?: string;
139
+ operators: SchemaConstraintOperator[];
140
+ }
141
+ /** One user-composed condition. */
142
+ export interface QueryCondition {
143
+ key: string;
144
+ operator: string;
145
+ value?: string;
146
+ value2?: string;
147
+ }
148
+ export interface TableSchema {
149
+ columns: SchemaColumn[];
150
+ filters?: SchemaFilter[];
151
+ /** Groupings the user can switch between, as select options. */
152
+ groups?: Array<{
153
+ value: string;
154
+ label: string;
155
+ }>;
156
+ /** Fields the user may build ad-hoc conditions against. */
157
+ constraints?: SchemaConstraint[];
158
+ /** URL template with an `{id}` placeholder, e.g. `/panel/organizations/{id}`. */
159
+ recordUrl?: string | null;
160
+ emptyStateTitle?: string | null;
161
+ emptyStateDescription?: string | null;
162
+ searchable?: boolean;
163
+ /** Row selection enabled — the checkbox column. */
164
+ bulkActions?: boolean;
165
+ /** Actions offered on each row; the page's `#actions` slot still wins. */
166
+ actions?: SchemaRowAction[];
167
+ /** Actions offered on a selection; the page's `#bulkActions` slot wins. */
168
+ bulkActionItems?: SchemaBulkAction[];
169
+ stickyHeader?: boolean;
170
+ }
171
+ /**
172
+ * Read a possibly-nested field, e.g. `getPath(row, 'organization.name')`.
173
+ *
174
+ * Returns undefined rather than throwing when any segment is missing, so a
175
+ * null relation renders the column's placeholder instead of blowing up.
176
+ */
177
+ export declare function getPath(record: Record<string, any>, path: string): unknown;
178
+ /**
179
+ * The cell actions that apply to one row, after `hiddenWhen` is resolved
180
+ * against it. Dot-paths are supported, matching every other field reference.
181
+ */
182
+ /** One action offered on a row, from `schema.actions`. */
183
+ export interface SchemaRowAction {
184
+ name: string;
185
+ /** 'drawer' | 'visit' | 'delete' | 'handler' — what the table does with it. */
186
+ behaviour: string;
187
+ label: string;
188
+ icon?: string;
189
+ color?: string;
190
+ urlTemplate?: string;
191
+ /** Where to ask what deleting would do; `delete` behaviour only. */
192
+ previewUrl?: string;
193
+ /** The delete is reversible, so the dialog must not say "cannot be undone". */
194
+ soft?: boolean;
195
+ hiddenWhen?: string;
196
+ visibleWhen?: string;
197
+ confirm?: boolean;
198
+ confirmMessage?: string;
199
+ }
200
+ /** One action offered on a selection, from `schema.bulkActionItems`. */
201
+ export interface SchemaBulkAction {
202
+ name: string;
203
+ /** 'post' | 'handler'. */
204
+ behaviour: string;
205
+ label: string;
206
+ icon?: string;
207
+ color?: string;
208
+ variant?: string;
209
+ url?: string;
210
+ confirm?: boolean;
211
+ confirmMessage?: string;
212
+ }
213
+ /** The actions this row offers, after its own visibility fields are read. */
214
+ export declare function visibleRowActions(actions: SchemaRowAction[] | undefined, record: Record<string, any>): SchemaRowAction[];
215
+ export declare function visibleCellActions(column: SchemaColumn, record: Record<string, any>): SchemaColumnAction[];
216
+ /**
217
+ * Fill a URL template from a record: `/panel/contacts/{id}/organization/{organization.id}`.
218
+ *
219
+ * Returns null when a placeholder cannot be resolved — a link containing a
220
+ * literal `{organization.id}` would 404, so no link is the better answer.
221
+ */
222
+ export declare function resolveRecordUrl(template: string | null | undefined, record: Record<string, any>): string | null;
223
+ /**
224
+ * Empty form value per filter type — the shape useListFilters needs so it can
225
+ * tell "unset" from "set", and so reset() restores the right type.
226
+ */
227
+ export declare function emptyFilterValue(filter: SchemaFilter): unknown;
228
+ /**
229
+ * Build the `defaults` map useListFilters expects, straight from the schema.
230
+ *
231
+ * Keeps the page from restating filter keys the server already declared.
232
+ */
233
+ export declare function filterDefaults(schema: TableSchema | undefined): Record<string, unknown>;
234
+ /**
235
+ * Which columns a listing starts with visible.
236
+ *
237
+ * Every key except the ones the schema marks `hiddenByDefault` — the flag was
238
+ * declarable server-side but nothing acted on it, because Table only filters
239
+ * against the list a page hands it.
240
+ */
241
+ export declare function visibleColumnDefaults(schema: TableSchema | undefined): string[];
242
+ /** Treat null, undefined and '' as "no value" so the placeholder shows. */
243
+ export declare function isEmptyValue(value: unknown): boolean;
@@ -0,0 +1,13 @@
1
+ /** One column of a plain (non-schema) table. */
2
+ export interface TableColumn {
3
+ key?: string;
4
+ name?: string;
5
+ label?: string;
6
+ sortable?: boolean;
7
+ width?: string;
8
+ headerClass?: string;
9
+ cellClass?: string;
10
+ }
11
+ export type TableRecord = Record<string, any>;
12
+ /** Columns carry either `key` or `name`; every lookup goes through this. */
13
+ export declare function columnName(column: TableColumn): string | undefined;
@@ -0,0 +1,82 @@
1
+ import { SchemaRowAction, SchemaBulkAction, TableSchema } from './tableSchema';
2
+ type Row = Record<string, any>;
3
+ interface ActionOptions {
4
+ schema: () => TableSchema;
5
+ /** Appended to record links so a drawer preserves the current list state. */
6
+ queryParams: () => Record<string, any>;
7
+ /** The resource's own word for one record ('movie'), for the delete dialog. */
8
+ recordLabel: () => string | undefined;
9
+ /** Row actions the schema declares but the table cannot service itself. */
10
+ rowActionHandlers: () => Record<string, (record: Row, action: SchemaRowAction) => unknown>;
11
+ bulkActionHandlers: () => Record<string, (records: Row[], action: SchemaBulkAction) => unknown>;
12
+ }
13
+ /**
14
+ * Runs the actions a schema declares, and owns the confirmations they need.
15
+ *
16
+ * The dialogs live here rather than on each page: an action that says
17
+ * `confirm` should not require the page to remember to render one for it.
18
+ */
19
+ export declare function useSchemaActions(options: ActionOptions): {
20
+ rowActionsFor: (record: Row) => SchemaRowAction[];
21
+ runRowAction: (action: SchemaRowAction, record: Row) => void;
22
+ deletion: import('vue').ComputedRef<{
23
+ state: {
24
+ open: boolean;
25
+ record: Row | null;
26
+ plan: {
27
+ blocked: boolean;
28
+ protected?: string[] | undefined;
29
+ nested?: {
30
+ label: string;
31
+ type?: string | undefined;
32
+ children?: any[] | undefined;
33
+ }[] | undefined;
34
+ counts?: Record<string, number> | undefined;
35
+ linkCounts?: Record<string, number> | undefined;
36
+ soft?: boolean | undefined;
37
+ } | null;
38
+ loading: boolean;
39
+ deleting: boolean;
40
+ error: string | null;
41
+ };
42
+ request: (record: Row) => Promise<void>;
43
+ confirm: () => Promise<void>;
44
+ close: () => void;
45
+ message: ((record: Row) => string) | undefined;
46
+ }>;
47
+ deleteLabel: import('vue').ComputedRef<string>;
48
+ runBulkAction: (action: SchemaBulkAction, records: Row[]) => void;
49
+ pendingBulk: import('vue').Ref<{
50
+ action: {
51
+ name: string;
52
+ behaviour: string;
53
+ label: string;
54
+ icon?: string | undefined;
55
+ color?: string | undefined;
56
+ variant?: string | undefined;
57
+ url?: string | undefined;
58
+ confirm?: boolean | undefined;
59
+ confirmMessage?: string | undefined;
60
+ };
61
+ records: Row[];
62
+ } | null, {
63
+ action: SchemaBulkAction;
64
+ records: Row[];
65
+ } | {
66
+ action: {
67
+ name: string;
68
+ behaviour: string;
69
+ label: string;
70
+ icon?: string | undefined;
71
+ color?: string | undefined;
72
+ variant?: string | undefined;
73
+ url?: string | undefined;
74
+ confirm?: boolean | undefined;
75
+ confirmMessage?: string | undefined;
76
+ };
77
+ records: Row[];
78
+ } | null>;
79
+ bulkMessage: import('vue').ComputedRef<string>;
80
+ confirmBulk: () => void;
81
+ };
82
+ export {};
@@ -0,0 +1,28 @@
1
+ import { FilterIndicator } from '../Filters/FilterIndicators.vue';
2
+ import { SchemaFilter, TableSchema } from './tableSchema';
3
+ interface FilterOptions {
4
+ schema: () => TableSchema;
5
+ /** Current filter form values, keyed by filter key. */
6
+ values: () => Record<string, unknown>;
7
+ /** Reports a filter change; the page owns the state and the request. */
8
+ onChange: (key: string, value: unknown) => void;
9
+ /** Fired once after every filter has been cleared. */
10
+ onReset: () => void;
11
+ }
12
+ /**
13
+ * The state behind the schema's filter controls: what counts as active, what
14
+ * the chips above the table say, and how a filter is cleared.
15
+ *
16
+ * Grouping and ad-hoc conditions are filter-shaped here too — they are set,
17
+ * counted and cleared through the same plumbing as a declared filter.
18
+ */
19
+ export declare function useSchemaFilters({ schema, values, onChange, onReset }: FilterOptions): {
20
+ schemaFilters: import('vue').ComputedRef<SchemaFilter[]>;
21
+ activeGroupField: import('vue').ComputedRef<string>;
22
+ hasFilterControls: import('vue').ComputedRef<boolean>;
23
+ activeFilterCount: import('vue').ComputedRef<number>;
24
+ filterIndicators: import('vue').ComputedRef<FilterIndicator[]>;
25
+ clearFilter: (key: string) => void;
26
+ resetFilters: () => void;
27
+ };
28
+ export {};
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Composable for exporting table data to various formats
3
+ */
4
+ export interface TableColumn {
5
+ key?: string;
6
+ name?: string;
7
+ label: string;
8
+ exportable?: boolean;
9
+ }
10
+ export declare function useTableExport(): {
11
+ exportToCSV: (data: Record<string, unknown>[], columns: TableColumn[], filename?: string) => void;
12
+ exportToExcel: (data: Record<string, unknown>[], columns: TableColumn[], filename?: string) => void;
13
+ exportToJSON: (data: Record<string, unknown>[], columns: TableColumn[], filename?: string) => void;
14
+ exportView: (data: Record<string, unknown>[], columns: TableColumn[], format?: string, filename?: string) => void;
15
+ printTable: (data: Record<string, unknown>[], columns: TableColumn[], title?: string) => void;
16
+ };
@@ -0,0 +1,9 @@
1
+ import { TableRecord } from './tableTypes';
2
+ /**
3
+ * Group headings for rows the server already ordered by the grouped field.
4
+ * The client only draws the break where the value changes.
5
+ */
6
+ export declare function useTableGrouping(groupBy: () => string, visibleRecords: () => TableRecord[]): {
7
+ isGroupStart: (index: number) => boolean;
8
+ groupHeading: (record: TableRecord) => string;
9
+ };