@solidxai/solidctl 0.1.38 → 0.1.39-beta.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.
- package/dist/commands/generate-ui-module.d.ts +2 -0
- package/dist/commands/generate-ui-module.js +47 -0
- package/dist/commands/generate-ui-module.js.map +1 -0
- package/dist/commands/generate.command.js +11 -14
- package/dist/commands/generate.command.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/templates/ui-module-template/README.md +13 -0
- package/templates/ui-module-template/__module-name__.ui-module.ts +31 -0
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# __module-name__ — solid-ui module
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
__module-name__/
|
|
7
|
+
├── __module-name__.ui-module.ts ← module registry (auto-discovered)
|
|
8
|
+
├── admin-layout/ ← use custom-layout/ for bespoke routes
|
|
9
|
+
│ └── {model-name}/ ← matches the model key in SolidX
|
|
10
|
+
│ ├── extension-components/ ← custom React components
|
|
11
|
+
│ └── extension-functions/ ← event handlers
|
|
12
|
+
└── redux/ ← RTK Query APIs / Redux slices (optional)
|
|
13
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ExtensionComponentTypes,
|
|
3
|
+
ExtensionFunctionTypes,
|
|
4
|
+
type SolidUiModule,
|
|
5
|
+
} from "@solidxai/core-ui";
|
|
6
|
+
|
|
7
|
+
// Import extension components and functions per model, e.g.:
|
|
8
|
+
// import ExampleWidget from "./admin-layout/{model-name}/extension-components/ExampleWidget";
|
|
9
|
+
// import exampleChangeHandler from "./admin-layout/{model-name}/extension-functions/exampleChangeHandler";
|
|
10
|
+
|
|
11
|
+
// Import Redux API slices, e.g.:
|
|
12
|
+
// import { exampleApi } from "./redux/exampleApi";
|
|
13
|
+
|
|
14
|
+
// This file is auto-discovered by solid-ui-modules.ts via import.meta.glob.
|
|
15
|
+
const moduleUiModule = {
|
|
16
|
+
name: "__module-name__",
|
|
17
|
+
extensionComponents: [
|
|
18
|
+
// { name: "ExampleWidget", component: ExampleWidget, type: ExtensionComponentTypes.formWidget },
|
|
19
|
+
],
|
|
20
|
+
extensionFunctions: [
|
|
21
|
+
// { name: "exampleChangeHandler", fn: exampleChangeHandler, type: ExtensionFunctionTypes.onFieldChange },
|
|
22
|
+
],
|
|
23
|
+
reducers: {
|
|
24
|
+
// [exampleApi.reducerPath]: exampleApi.reducer,
|
|
25
|
+
},
|
|
26
|
+
middlewares: [
|
|
27
|
+
// exampleApi.middleware,
|
|
28
|
+
],
|
|
29
|
+
} satisfies SolidUiModule;
|
|
30
|
+
|
|
31
|
+
export default moduleUiModule;
|