@framework-m/desk 0.4.2

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 (121) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +153 -0
  3. package/dist/auth.d.ts +11 -0
  4. package/dist/auth.d.ts.map +1 -0
  5. package/dist/authConfig.d.ts +42 -0
  6. package/dist/authConfig.d.ts.map +1 -0
  7. package/dist/components/CommandPalette.d.ts +49 -0
  8. package/dist/components/CommandPalette.d.ts.map +1 -0
  9. package/dist/components/breadcrumb/index.d.ts +2 -0
  10. package/dist/components/breadcrumb/index.d.ts.map +1 -0
  11. package/dist/components/feedback/AlertBanner.d.ts +8 -0
  12. package/dist/components/feedback/AlertBanner.d.ts.map +1 -0
  13. package/dist/components/feedback/ConfirmDialog.d.ts +13 -0
  14. package/dist/components/feedback/ConfirmDialog.d.ts.map +1 -0
  15. package/dist/components/feedback/index.d.ts +5 -0
  16. package/dist/components/feedback/index.d.ts.map +1 -0
  17. package/dist/components/form/AutoForm.d.ts +61 -0
  18. package/dist/components/form/AutoForm.d.ts.map +1 -0
  19. package/dist/components/form/LinkWidget.d.ts +20 -0
  20. package/dist/components/form/LinkWidget.d.ts.map +1 -0
  21. package/dist/components/form/index.d.ts +10 -0
  22. package/dist/components/form/index.d.ts.map +1 -0
  23. package/dist/components/form/templates.d.ts +58 -0
  24. package/dist/components/form/templates.d.ts.map +1 -0
  25. package/dist/components/layout/index.d.ts +3 -0
  26. package/dist/components/layout/index.d.ts.map +1 -0
  27. package/dist/components/menu/index.d.ts +2 -0
  28. package/dist/components/menu/index.d.ts.map +1 -0
  29. package/dist/components/table/AutoTable.d.ts +47 -0
  30. package/dist/components/table/AutoTable.d.ts.map +1 -0
  31. package/dist/components/table/BulkActionsBar.d.ts +40 -0
  32. package/dist/components/table/BulkActionsBar.d.ts.map +1 -0
  33. package/dist/components/table/EditableCell.d.ts +54 -0
  34. package/dist/components/table/EditableCell.d.ts.map +1 -0
  35. package/dist/components/table/index.d.ts +12 -0
  36. package/dist/components/table/index.d.ts.map +1 -0
  37. package/dist/components/workflow/StateBadge.d.ts +29 -0
  38. package/dist/components/workflow/StateBadge.d.ts.map +1 -0
  39. package/dist/components/workflow/WorkflowActions.d.ts +37 -0
  40. package/dist/components/workflow/WorkflowActions.d.ts.map +1 -0
  41. package/dist/components/workflow/index.d.ts +10 -0
  42. package/dist/components/workflow/index.d.ts.map +1 -0
  43. package/dist/config/i18n.d.ts +3 -0
  44. package/dist/config/i18n.d.ts.map +1 -0
  45. package/dist/config/index.d.ts +13 -0
  46. package/dist/config/index.d.ts.map +1 -0
  47. package/dist/config/registry.d.ts +75 -0
  48. package/dist/config/registry.d.ts.map +1 -0
  49. package/dist/config/types.d.ts +130 -0
  50. package/dist/config/types.d.ts.map +1 -0
  51. package/dist/config/useConfig.d.ts +18 -0
  52. package/dist/config/useConfig.d.ts.map +1 -0
  53. package/dist/constants.d.ts +35 -0
  54. package/dist/constants.d.ts.map +1 -0
  55. package/dist/data.d.ts +6 -0
  56. package/dist/data.d.ts.map +1 -0
  57. package/dist/hooks/index.d.ts +21 -0
  58. package/dist/hooks/index.d.ts.map +1 -0
  59. package/dist/hooks/types.d.ts +113 -0
  60. package/dist/hooks/types.d.ts.map +1 -0
  61. package/dist/hooks/useBulkActions.d.ts +82 -0
  62. package/dist/hooks/useBulkActions.d.ts.map +1 -0
  63. package/dist/hooks/useCommandPalette.d.ts +33 -0
  64. package/dist/hooks/useCommandPalette.d.ts.map +1 -0
  65. package/dist/hooks/useDocTypeMeta.d.ts +48 -0
  66. package/dist/hooks/useDocTypeMeta.d.ts.map +1 -0
  67. package/dist/hooks/useDocTypes.d.ts +66 -0
  68. package/dist/hooks/useDocTypes.d.ts.map +1 -0
  69. package/dist/hooks/useInlineEdit.d.ts +64 -0
  70. package/dist/hooks/useInlineEdit.d.ts.map +1 -0
  71. package/dist/hooks/useTranslation.d.ts +36 -0
  72. package/dist/hooks/useTranslation.d.ts.map +1 -0
  73. package/dist/hooks/useUIMeta.d.ts +111 -0
  74. package/dist/hooks/useUIMeta.d.ts.map +1 -0
  75. package/dist/hooks/useWorkflowActions.d.ts +75 -0
  76. package/dist/hooks/useWorkflowActions.d.ts.map +1 -0
  77. package/dist/index.d.ts +68 -0
  78. package/dist/index.d.ts.map +1 -0
  79. package/dist/index.js +5302 -0
  80. package/dist/index.js.map +1 -0
  81. package/dist/live.d.ts +21 -0
  82. package/dist/live.d.ts.map +1 -0
  83. package/dist/pages/FormView.d.ts +40 -0
  84. package/dist/pages/FormView.d.ts.map +1 -0
  85. package/dist/pages/ListView.d.ts +39 -0
  86. package/dist/pages/ListView.d.ts.map +1 -0
  87. package/dist/pages/LoginPage.d.ts +32 -0
  88. package/dist/pages/LoginPage.d.ts.map +1 -0
  89. package/dist/plugins/Slot.d.ts +27 -0
  90. package/dist/plugins/Slot.d.ts.map +1 -0
  91. package/dist/plugins/index.d.ts +14 -0
  92. package/dist/plugins/index.d.ts.map +1 -0
  93. package/dist/plugins/registry.d.ts +104 -0
  94. package/dist/plugins/registry.d.ts.map +1 -0
  95. package/dist/plugins/types.d.ts +130 -0
  96. package/dist/plugins/types.d.ts.map +1 -0
  97. package/dist/types.d.ts +51 -0
  98. package/dist/types.d.ts.map +1 -0
  99. package/dist/views/CalendarView.d.ts +14 -0
  100. package/dist/views/CalendarView.d.ts.map +1 -0
  101. package/dist/views/GanttView.d.ts +14 -0
  102. package/dist/views/GanttView.d.ts.map +1 -0
  103. package/dist/views/KanbanView.d.ts +16 -0
  104. package/dist/views/KanbanView.d.ts.map +1 -0
  105. package/dist/views/TreeView.d.ts +15 -0
  106. package/dist/views/TreeView.d.ts.map +1 -0
  107. package/dist/views/index.d.ts +17 -0
  108. package/dist/views/index.d.ts.map +1 -0
  109. package/dist/views/registry.d.ts +32 -0
  110. package/dist/views/registry.d.ts.map +1 -0
  111. package/dist/views/types.d.ts +97 -0
  112. package/dist/views/types.d.ts.map +1 -0
  113. package/dist/workspace/WorkspaceSection.d.ts +16 -0
  114. package/dist/workspace/WorkspaceSection.d.ts.map +1 -0
  115. package/dist/workspace/index.d.ts +12 -0
  116. package/dist/workspace/index.d.ts.map +1 -0
  117. package/dist/workspace/types.d.ts +95 -0
  118. package/dist/workspace/types.d.ts.map +1 -0
  119. package/dist/workspace/useWorkspaces.d.ts +38 -0
  120. package/dist/workspace/useWorkspaces.d.ts.map +1 -0
  121. package/package.json +89 -0
package/dist/live.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { LiveProvider } from '@refinedev/core';
2
+ /**
3
+ * Framework M Live Provider
4
+ *
5
+ * Implements Refine's LiveProvider interface for real-time updates.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Refine
10
+ * liveProvider={liveProvider}
11
+ * options={{ liveMode: "auto" }}
12
+ * />
13
+ * ```
14
+ */
15
+ export declare const liveProvider: LiveProvider;
16
+ /**
17
+ * Close all WebSocket connections
18
+ * Call this on app unmount or logout
19
+ */
20
+ export declare function closeAllConnections(): void;
21
+ //# sourceMappingURL=live.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../src/live.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,iBAAiB,CAAC;AAuF/D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,EAAE,YA6F1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * FormView Page Component
3
+ *
4
+ * Generic form view for any DocType (create/edit).
5
+ * Per checklist 3.2:
6
+ * - Route Create: `/app/{doctype}/new`
7
+ * - Route Edit: `/app/{doctype}/detail/{id}`
8
+ *
9
+ * Features:
10
+ * - Fetches metadata
11
+ * - Fetches document (if editing)
12
+ * - Renders AutoForm
13
+ * - Renders Workflow Actions
14
+ * - Save/Submit/Cancel buttons
15
+ * - Shows validation errors
16
+ */
17
+ /**
18
+ * FormView props
19
+ */
20
+ export interface FormViewProps {
21
+ /** DocType name (overrides route param) */
22
+ doctype?: string;
23
+ /** Document ID (overrides route param) */
24
+ id?: string;
25
+ }
26
+ /**
27
+ * FormView Component
28
+ *
29
+ * Renders a form for creating or editing any DocType.
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * // In routes
34
+ * <Route path="/app/:doctype/new" element={<FormView />} />
35
+ * <Route path="/app/:doctype/detail/:id" element={<FormView />} />
36
+ * ```
37
+ */
38
+ export declare function FormView({ doctype: propDoctype, id: propId, }: Readonly<FormViewProps>): import("react/jsx-runtime").JSX.Element;
39
+ export default FormView;
40
+ //# sourceMappingURL=FormView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormView.d.ts","sourceRoot":"","sources":["../../src/pages/FormView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAaH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE,MAAM,GACX,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAgfzB;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * ListView Page Component
3
+ *
4
+ * Generic list view for any DocType.
5
+ * Per checklist 3.1: Route /app/{doctype}/list
6
+ *
7
+ * Features:
8
+ * - Fetches metadata for column generation
9
+ * - Renders AutoTable
10
+ * - New button
11
+ * - Search and filters
12
+ * - Bulk actions
13
+ */
14
+ /**
15
+ * ListView props
16
+ */
17
+ export interface ListViewProps {
18
+ /** DocType name (overrides route param) */
19
+ doctype?: string;
20
+ /** View override used by explicit routes (/kanban, /tree) */
21
+ view?: "list" | "kanban" | "tree";
22
+ }
23
+ /**
24
+ * ListView Component
25
+ *
26
+ * Renders a list view for any DocType with search, filters, and bulk actions.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * // In routes
31
+ * <Route path="/app/:doctype/list" element={<ListView />} />
32
+ *
33
+ * // Or with explicit doctype
34
+ * <ListView doctype="Task" />
35
+ * ```
36
+ */
37
+ export declare function ListView({ doctype: propDoctype, view: propView, }: Readonly<ListViewProps>): import("react/jsx-runtime").JSX.Element;
38
+ export default ListView;
39
+ //# sourceMappingURL=ListView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListView.d.ts","sourceRoot":"","sources":["../../src/pages/ListView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;CACnC;AAoDD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,QAAQ,CAAC,EACvB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,QAAQ,GACf,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAsdzB;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Login Page Component
3
+ *
4
+ * Login page for Indie/BFF mode (cookie auth).
5
+ * Per checklist 4.4: Route /login with useLogin hook.
6
+ * Supports OAuth social login when providers are configured.
7
+ */
8
+ /**
9
+ * LoginPage props
10
+ */
11
+ export interface LoginPageProps {
12
+ /** Title to display */
13
+ title?: string;
14
+ /** Logo URL or component */
15
+ logo?: string | React.ReactNode;
16
+ /** Redirect URL after login */
17
+ redirectTo?: string;
18
+ }
19
+ /**
20
+ * LoginPage Component
21
+ *
22
+ * Simple login form using Refine's useLogin hook.
23
+ * For Indie/BFF cookie-based authentication.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * <Route path="/login" element={<LoginPage />} />
28
+ * ```
29
+ */
30
+ export declare function LoginPage({ title, logo, redirectTo, }: Readonly<LoginPageProps>): import("react/jsx-runtime").JSX.Element;
31
+ export default LoginPage;
32
+ //# sourceMappingURL=LoginPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoginPage.d.ts","sourceRoot":"","sources":["../../src/pages/LoginPage.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiFH;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,+BAA+B;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAiB,EACjB,IAAI,EACJ,UAAU,GACX,EAAE,QAAQ,CAAC,cAAc,CAAC,2CAiQ1B;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { SlotProps } from './types';
2
+ /**
3
+ * Slot component props
4
+ */
5
+ export interface SlotComponentProps extends SlotProps {
6
+ /** Slot name */
7
+ name: string;
8
+ /** Children to render if no slot components */
9
+ children?: React.ReactNode;
10
+ }
11
+ /**
12
+ * Slot Component
13
+ *
14
+ * Renders all registered components for a named slot.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * // In FormView header
19
+ * <div className="form-header">
20
+ * <h1>{doctype}</h1>
21
+ * <Slot name="form-header" doctype={doctype} data={formData} />
22
+ * </div>
23
+ * ```
24
+ */
25
+ export declare function Slot({ name, doctype, data, id, children, }: SlotComponentProps): import("react/jsx-runtime").JSX.Element;
26
+ export default Slot;
27
+ //# sourceMappingURL=Slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slot.d.ts","sourceRoot":"","sources":["../../src/plugins/Slot.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAoB,SAAS,EAAE,MAAM,SAAS,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,gBAAgB;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,EAAE,EACF,QAAQ,GACT,EAAE,kBAAkB,2CAsBpB;AAED,eAAe,IAAI,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Plugin System
3
+ *
4
+ * Re-exports plugin system APIs for convenient importing.
5
+ *
6
+ * Per checklist 2.5: "Easy as Frappe" but with Vite/React tooling
7
+ * - No Monkey Patching
8
+ * - Plugins register via app.registerPlugin()
9
+ */
10
+ export { registerPlugin, registerField, registerSlot, registerPage, getField, getSlotComponents, getPage, getResources, getTheme, getPlugins, hasPlugin, clearRegistry, } from './registry';
11
+ export { Slot } from './Slot';
12
+ export type { SlotComponentProps } from './Slot';
13
+ export type { Plugin, PluginRegistry, FieldRegistration, FieldWidgetProps, SlotRegistration, SlotProps, PageRegistration, PageProps, ResourceRegistration, ThemeRegistration, } from './types';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,cAAc,EACd,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,SAAS,EACT,aAAa,GACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAGjD,YAAY,EACV,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,gBAAgB,EAChB,SAAS,EACT,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,104 @@
1
+ import { Plugin, FieldRegistration, SlotRegistration, PageRegistration, ResourceRegistration, ThemeRegistration } from './types';
2
+ /**
3
+ * Register a plugin with the application
4
+ *
5
+ * @param plugin - Plugin definition
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * // In custom_app/frontend/index.ts
10
+ * import { registerPlugin } from "@framework-m/core";
11
+ * import { StarRating } from "./components/StarRating";
12
+ * import { PaymentButton } from "./components/PaymentButton";
13
+ *
14
+ * registerPlugin({
15
+ * name: "custom_app",
16
+ * version: "1.0.0",
17
+ * fields: [
18
+ * { name: "rating", component: StarRating, fieldTypes: ["Rating"] }
19
+ * ],
20
+ * slots: [
21
+ * { slot: "form-header", component: PaymentButton, doctypes: ["Sales Invoice"] }
22
+ * ],
23
+ * });
24
+ * ```
25
+ */
26
+ export declare function registerPlugin(plugin: Plugin): void;
27
+ /**
28
+ * Register a custom field widget
29
+ *
30
+ * @param name - Field name/type
31
+ * @param component - React component for the field
32
+ * @param fieldTypes - Optional field types this widget handles
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * registerField("rating", StarRating, ["Rating"]);
37
+ * ```
38
+ */
39
+ export declare function registerField(name: string, component: FieldRegistration["component"], fieldTypes?: string[]): void;
40
+ /**
41
+ * Register a slot injection
42
+ *
43
+ * @param slot - Slot name
44
+ * @param component - React component to inject
45
+ * @param options - Optional doctypes filter and priority
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * registerSlot("form-header", PaymentButton, {
50
+ * doctypes: ["Sales Invoice"],
51
+ * priority: 10
52
+ * });
53
+ * ```
54
+ */
55
+ export declare function registerSlot(slot: string, component: SlotRegistration["component"], options?: {
56
+ doctypes?: string[];
57
+ priority?: number;
58
+ }): void;
59
+ /**
60
+ * Register a page override
61
+ *
62
+ * @param pageType - Page type to override
63
+ * @param doctype - DocType or '*' for all
64
+ * @param component - React component for the page
65
+ *
66
+ * @example
67
+ * ```tsx
68
+ * registerPage("form", "Sales Invoice", CustomInvoiceForm);
69
+ * ```
70
+ */
71
+ export declare function registerPage(pageType: PageRegistration["pageType"], doctype: string, component: PageRegistration["component"]): void;
72
+ /**
73
+ * Get a registered field widget
74
+ */
75
+ export declare function getField(name: string): FieldRegistration | undefined;
76
+ /**
77
+ * Get all slot components for a slot name
78
+ */
79
+ export declare function getSlotComponents(slotName: string, doctype?: string): SlotRegistration[];
80
+ /**
81
+ * Get a page override
82
+ */
83
+ export declare function getPage(pageType: string, doctype: string): PageRegistration | undefined;
84
+ /**
85
+ * Get all registered resources
86
+ */
87
+ export declare function getResources(): ResourceRegistration[];
88
+ /**
89
+ * Get the current theme
90
+ */
91
+ export declare function getTheme(): ThemeRegistration | undefined;
92
+ /**
93
+ * Get all registered plugins
94
+ */
95
+ export declare function getPlugins(): Plugin[];
96
+ /**
97
+ * Check if a plugin is registered
98
+ */
99
+ export declare function hasPlugin(name: string): boolean;
100
+ /**
101
+ * Clear all registrations (for testing)
102
+ */
103
+ export declare function clearRegistry(): void;
104
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/plugins/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,MAAM,EAEN,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAmDjB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2DnD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAA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+ /**
4
+ * Custom field widget registration
5
+ * Level 2: app.registerField('rating', StarRating)
6
+ */
7
+ export interface FieldRegistration {
8
+ name: string;
9
+ component: ComponentType<FieldWidgetProps>;
10
+ /** Field types this widget handles */
11
+ fieldTypes?: string[];
12
+ }
13
+ /**
14
+ * Props passed to custom field widgets
15
+ */
16
+ export interface FieldWidgetProps {
17
+ value: unknown;
18
+ onChange: (value: unknown) => void;
19
+ schema: RJSFSchema;
20
+ disabled?: boolean;
21
+ readonly?: boolean;
22
+ id?: string;
23
+ label?: string;
24
+ }
25
+ /**
26
+ * Slot injection registration
27
+ * Level 2: app.registerSlot('form-header', PaymentButton)
28
+ */
29
+ export interface SlotRegistration {
30
+ /** Slot name (e.g., 'form-header', 'list-actions', 'sidebar') */
31
+ slot: string;
32
+ /** Component to render in slot */
33
+ component: ComponentType<SlotProps>;
34
+ /** Optional priority for ordering (higher = first) */
35
+ priority?: number;
36
+ /** Optional filter - only show for specific doctypes */
37
+ doctypes?: string[];
38
+ }
39
+ /**
40
+ * Props passed to slot components
41
+ */
42
+ export interface SlotProps {
43
+ /** Current DocType */
44
+ doctype?: string;
45
+ /** Current document data */
46
+ data?: Record<string, unknown>;
47
+ /** Document ID if editing */
48
+ id?: string;
49
+ }
50
+ /**
51
+ * Page override registration
52
+ * Level 3: Replace FormView, ListView, etc.
53
+ */
54
+ export interface PageRegistration {
55
+ /** Page type to override */
56
+ pageType: "form" | "list" | "dashboard" | "custom";
57
+ /** DocType this applies to (or '*' for all) */
58
+ doctype: string;
59
+ /** Component to render */
60
+ component: ComponentType<PageProps>;
61
+ }
62
+ /**
63
+ * Props passed to page components
64
+ */
65
+ export interface PageProps {
66
+ doctype: string;
67
+ id?: string;
68
+ /** Default page component (for wrapping/extending) */
69
+ DefaultPage?: ComponentType;
70
+ }
71
+ /**
72
+ * Resource registration for custom navigation items
73
+ */
74
+ export interface ResourceRegistration {
75
+ name: string;
76
+ label: string;
77
+ icon?: ReactNode;
78
+ route?: string;
79
+ /** Nested resources */
80
+ children?: ResourceRegistration[];
81
+ }
82
+ /**
83
+ * Theme/layout override
84
+ * Level 3: Whitelabel support
85
+ */
86
+ export interface ThemeRegistration {
87
+ /** Layout component */
88
+ layout?: ComponentType<{
89
+ children: ReactNode;
90
+ }>;
91
+ /** Theme CSS variables */
92
+ variables?: Record<string, string>;
93
+ /** Logo component or URL */
94
+ logo?: string | ComponentType;
95
+ /** App title */
96
+ title?: string;
97
+ }
98
+ /**
99
+ * Plugin definition
100
+ */
101
+ export interface Plugin {
102
+ /** Unique plugin name */
103
+ name: string;
104
+ /** Plugin version */
105
+ version?: string;
106
+ /** Custom field widgets */
107
+ fields?: FieldRegistration[];
108
+ /** Slot injections */
109
+ slots?: SlotRegistration[];
110
+ /** Page overrides */
111
+ pages?: PageRegistration[];
112
+ /** Custom resources/navigation */
113
+ resources?: ResourceRegistration[];
114
+ /** Theme customization */
115
+ theme?: ThemeRegistration;
116
+ /** Initialization function */
117
+ init?: () => void | Promise<void>;
118
+ }
119
+ /**
120
+ * Plugin registry state
121
+ */
122
+ export interface PluginRegistry {
123
+ plugins: Map<string, Plugin>;
124
+ fields: Map<string, FieldRegistration>;
125
+ slots: Map<string, SlotRegistration[]>;
126
+ pages: Map<string, PageRegistration>;
127
+ resources: ResourceRegistration[];
128
+ theme?: ThemeRegistration;
129
+ }
130
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugins/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3C,sCAAsC;IACtC,UAAU,CAAC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iB,CAAC,CAAC;IACvC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACvC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACrC,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,iBAAiB,CAAC;CAC3B"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Framework M API Types
3
+ *
4
+ * Type definitions for API responses and requests.
5
+ */
6
+ /**
7
+ * Standard paginated list response from Framework M API
8
+ */
9
+ export interface ListResponse<T> {
10
+ items: T[];
11
+ total: number;
12
+ limit: number;
13
+ offset: number;
14
+ }
15
+ /**
16
+ * Base document type - all DocTypes have these fields
17
+ */
18
+ export interface BaseDocument {
19
+ id: string;
20
+ name: string;
21
+ created_at: string;
22
+ updated_at: string;
23
+ owner?: string;
24
+ }
25
+ /**
26
+ * User identity returned from /api/v1/auth/me
27
+ */
28
+ export interface UserIdentity {
29
+ id: string;
30
+ email: string;
31
+ name?: string;
32
+ avatar?: string;
33
+ roles: string[];
34
+ }
35
+ /**
36
+ * Error response from Framework M API
37
+ */
38
+ export interface ApiError {
39
+ detail: string;
40
+ status_code: number;
41
+ extra?: Record<string, unknown>;
42
+ }
43
+ /**
44
+ * Filter operators supported by Framework M
45
+ */
46
+ export type FilterOperator = "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "contains" | "startswith" | "endswith" | "in" | "nin";
47
+ /**
48
+ * Sort direction
49
+ */
50
+ export type SortOrder = "asc" | "desc";
51
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,IAAI,GACJ,KAAK,GACL,UAAU,GACV,YAAY,GACZ,UAAU,GACV,IAAI,GACJ,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ViewProps, CalendarConfig } from './types';
2
+ /**
3
+ * Calendar view props
4
+ */
5
+ export interface CalendarViewProps extends ViewProps {
6
+ /** Calendar configuration */
7
+ config: CalendarConfig;
8
+ }
9
+ /**
10
+ * CalendarView Component
11
+ */
12
+ export declare function CalendarView({ resource, config }: CalendarViewProps): import("react/jsx-runtime").JSX.Element;
13
+ export default CalendarView;
14
+ //# sourceMappingURL=CalendarView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalendarView.d.ts","sourceRoot":"","sources":["../../src/views/CalendarView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,6BAA6B;IAC7B,MAAM,EAAE,cAAc,CAAC;CACxB;AA0BD;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CA0KnE;AAWD,eAAe,YAAY,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ViewProps, GanttConfig } from './types';
2
+ /**
3
+ * Gantt view props
4
+ */
5
+ export interface GanttViewProps extends ViewProps {
6
+ /** Gantt configuration */
7
+ config: GanttConfig;
8
+ }
9
+ /**
10
+ * GanttView Component
11
+ */
12
+ export declare function GanttView({ resource, config }: GanttViewProps): import("react/jsx-runtime").JSX.Element;
13
+ export default GanttView;
14
+ //# sourceMappingURL=GanttView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GanttView.d.ts","sourceRoot":"","sources":["../../src/views/GanttView.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC;CACrB;AAuCD;;GAEG;AACH,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,cAAc,2CAqL7D;AAED,eAAe,SAAS,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ViewProps, KanbanConfig } from './types';
2
+ export interface KanbanViewProps extends ViewProps {
3
+ config: KanbanConfig;
4
+ }
5
+ /**
6
+ * KanbanView — Full-featured Kanban board.
7
+ *
8
+ * Features:
9
+ * - Drag cards between columns to update the group field
10
+ * - Click a card to Quick Edit (title, description, status)
11
+ * - Auto-discover columns from live data if none configured
12
+ * - Group by any Select/Link field via `config.groupField`
13
+ */
14
+ export declare function KanbanView({ resource, config }: KanbanViewProps): import("react/jsx-runtime").JSX.Element;
15
+ export default KanbanView;
16
+ //# sourceMappingURL=KanbanView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KanbanView.d.ts","sourceRoot":"","sources":["../../src/views/KanbanView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAgB,MAAM,SAAS,CAAC;AAErE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,MAAM,EAAE,YAAY,CAAC;CACtB;AAqOD;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,eAAe,2CAsV/D;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { ViewProps, TreeConfig } from './types';
2
+ export interface TreeViewProps extends ViewProps {
3
+ config: TreeConfig;
4
+ }
5
+ /**
6
+ * TreeView — Hierarchical tree view for DocTypes with a parent field.
7
+ *
8
+ * Reads from `/api/tree/:doctype` and supports:
9
+ * - Inline Add Child (click "+")
10
+ * - Inline Rename (double-click)
11
+ * - Drag-and-drop reparenting (PATCH /api/tree/:doctype/:id)
12
+ */
13
+ export declare function TreeView({ resource }: Readonly<TreeViewProps>): import("react/jsx-runtime").JSX.Element;
14
+ export default TreeView;
15
+ //# sourceMappingURL=TreeView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/views/TreeView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,MAAM,EAAE,UAAU,CAAC;CACpB;AAsXD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,aAAa,CAAC,2CAuM7D;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Views
3
+ *
4
+ * Custom view components and registry.
5
+ * Per checklist 5.1: Custom Views.
6
+ */
7
+ export type { ViewType, ViewProps, ViewRegistration, KanbanConfig, KanbanColumn, CalendarConfig, GanttConfig, TreeConfig, } from './types';
8
+ export { registerView, getViewComponent, getRegisteredViews, getViewRegistration, setDocTypeViews, getDocTypeViews, isViewAvailable, } from './registry';
9
+ export { KanbanView } from './KanbanView';
10
+ export type { KanbanViewProps } from './KanbanView';
11
+ export { CalendarView } from './CalendarView';
12
+ export type { CalendarViewProps } from './CalendarView';
13
+ export { GanttView } from './GanttView';
14
+ export type { GanttViewProps } from './GanttView';
15
+ export { TreeView } from './TreeView';
16
+ export type { TreeViewProps } from './TreeView';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/views/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,WAAW,EACX,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { ComponentType } from 'react';
2
+ import { ViewType, ViewProps, ViewRegistration } from './types';
3
+ /**
4
+ * Register a view type
5
+ */
6
+ export declare function registerView(registration: ViewRegistration): void;
7
+ /**
8
+ * Get a view component by type
9
+ */
10
+ export declare function getViewComponent(type: ViewType): ComponentType<ViewProps> | undefined;
11
+ /**
12
+ * Get all registered views
13
+ */
14
+ export declare function getRegisteredViews(): ViewRegistration[];
15
+ /**
16
+ * Get view registration by type
17
+ */
18
+ export declare function getViewRegistration(type: ViewType): ViewRegistration | undefined;
19
+ /**
20
+ * Set available views for a DocType
21
+ */
22
+ export declare function setDocTypeViews(doctype: string, views: ViewType[]): void;
23
+ /**
24
+ * Get available views for a DocType
25
+ * Returns default ['list'] if not configured
26
+ */
27
+ export declare function getDocTypeViews(doctype: string): ViewType[];
28
+ /**
29
+ * Check if a view type is available for a DocType
30
+ */
31
+ export declare function isViewAvailable(doctype: string, viewType: ViewType): boolean;
32
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/views/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAQrE;;GAEG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,gBAAgB,GAAG,IAAI,CAEjE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,GAAG,SAAS,CAErF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,EAAE,CAEvD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,gBAAgB,GAAG,SAAS,CAEhF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAExE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,EAAE,CAE3D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAG5E"}