@ostack.tech/ui-kform-scaffolder 0.4.0 → 0.4.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/ostack-ui-kform-scaffolder.js +18 -15
- package/dist/ostack-ui-kform-scaffolder.js.map +1 -1
- package/dist/types/scaffolding/scaffolders/scaffoldAppComponent.d.ts +1 -0
- package/dist/webapp/assets/{index-B-HtMoCt.js → index-Cv7RvBg1.js} +60 -56
- package/dist/webapp/index.html +1 -1
- package/package.json +1 -1
|
@@ -757,6 +757,7 @@ function scaffoldAppComponentFile(schematic, data) {
|
|
|
757
757
|
{ moduleName: "@ostack.tech/ui-kform", name: "Annexes" },
|
|
758
758
|
{ moduleName: "@ostack.tech/ui-kform", name: "Annex" },
|
|
759
759
|
{ moduleName: "@ostack.tech/ui-kform", name: "FormPages" },
|
|
760
|
+
{ moduleName: "@ostack.tech/ui-kform", name: "FormPage" },
|
|
760
761
|
{ moduleName: "@ostack.tech/ui-kform", name: "IssuesPanel" },
|
|
761
762
|
{ moduleName: "react", name: "useMemo" },
|
|
762
763
|
{ moduleName: data.kmpModuleName, name: schematic.name },
|
|
@@ -783,9 +784,7 @@ function scaffoldAppComponentFile(schematic, data) {
|
|
|
783
784
|
moduleName: "@ostack.tech/ui-kform",
|
|
784
785
|
name: "AnnexesManager"
|
|
785
786
|
});
|
|
786
|
-
annexesManager =
|
|
787
|
-
<AnnexesManager />
|
|
788
|
-
`;
|
|
787
|
+
annexesManager = "\n <AnnexesManager />\n";
|
|
789
788
|
}
|
|
790
789
|
data.currentFile.declarations.push(code`
|
|
791
790
|
export function ${schematic.name}App() {
|
|
@@ -838,22 +837,25 @@ function scaffoldAnnexes(layout, data) {
|
|
|
838
837
|
return layout.map((annex) => scaffoldAnnex(annex, data)).join("\n\n");
|
|
839
838
|
}
|
|
840
839
|
function scaffoldAnnex(annex, data) {
|
|
840
|
+
return code`
|
|
841
|
+
<Annex path="${annex.data.currentPath}" title="${sentenceCase(annex.schematic.name)}"${annex.formPages.length === 1 && annex.schematic === annex.formPages[0].schematic ? " documentTitle={null}" : ""}>
|
|
842
|
+
${scaffoldFormPages(annex, data)}
|
|
843
|
+
</Annex>
|
|
844
|
+
`;
|
|
845
|
+
}
|
|
846
|
+
function scaffoldFormPages(annex, data) {
|
|
841
847
|
let formPagesNavigation = "";
|
|
842
848
|
if (annex.formPages.length > 1) {
|
|
843
849
|
data.currentFile.imports.push({
|
|
844
850
|
moduleName: "@ostack.tech/ui-kform",
|
|
845
851
|
name: "FormPagesNavigation"
|
|
846
852
|
});
|
|
847
|
-
formPagesNavigation =
|
|
848
|
-
<FormPagesNavigation />
|
|
849
|
-
`;
|
|
853
|
+
formPagesNavigation = "\n <FormPagesNavigation />\n";
|
|
850
854
|
}
|
|
851
855
|
return code`
|
|
852
|
-
<
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
</FormPages>
|
|
856
|
-
</Annex>
|
|
856
|
+
<FormPages>${formPagesNavigation}
|
|
857
|
+
${annex.formPages.map((formPage) => scaffoldFormPage(annex, formPage, data)).join("\n\n")}
|
|
858
|
+
</FormPages>
|
|
857
859
|
`;
|
|
858
860
|
}
|
|
859
861
|
function scaffoldFormPage(annex, formPage, data) {
|
|
@@ -932,7 +934,7 @@ function scaffoldGradleProject(schematic, data) {
|
|
|
932
934
|
filePackage: data.currentPackage,
|
|
933
935
|
formId: kebabCase(schematic.name),
|
|
934
936
|
formTitle: capitalCase(schematic.name),
|
|
935
|
-
kFormVersion: "0.31.
|
|
937
|
+
kFormVersion: "0.31.6",
|
|
936
938
|
serializationFormat: data.serializationFormat ?? "json",
|
|
937
939
|
includeKotlinxDatetime: data.includeKotlinxDatetime ?? usesKotlinxDatetime(schematic, data),
|
|
938
940
|
includeKtMath: data.includeKtMath ?? usesKtMath(schematic),
|
|
@@ -1446,9 +1448,9 @@ function scaffoldViteProject(schematic, data) {
|
|
|
1446
1448
|
formId: kebabCase(schematic.name),
|
|
1447
1449
|
formClass: schematic.name,
|
|
1448
1450
|
formTitle: capitalCase(schematic.name),
|
|
1449
|
-
ostackUiVersion: "0.4.
|
|
1450
|
-
kFormVersion: "0.31.
|
|
1451
|
-
dependencyVersions: JSON.parse('{"@eslint/js":"^9.39.1","@fortawesome/fontawesome-svg-core":"^7.1.0","@fortawesome/free-brands-svg-icons":"^7.1.0","@fortawesome/free-regular-svg-icons":"^7.1.0","@fortawesome/free-solid-svg-icons":"^7.1.0","@ostack.tech/kform":"~0.31.
|
|
1451
|
+
ostackUiVersion: "0.4.1",
|
|
1452
|
+
kFormVersion: "0.31.6",
|
|
1453
|
+
dependencyVersions: JSON.parse('{"@eslint/js":"^9.39.1","@fortawesome/fontawesome-svg-core":"^7.1.0","@fortawesome/free-brands-svg-icons":"^7.1.0","@fortawesome/free-regular-svg-icons":"^7.1.0","@fortawesome/free-solid-svg-icons":"^7.1.0","@ostack.tech/kform":"~0.31.6","@ostack.tech/kform-react":"~0.31.6","@ostack.tech/kform-scaffolder":"~0.31.6","@storybook/addon-docs":"^10.0.5","@storybook/addon-links":"^10.0.5","@storybook/react-vite":"^10.0.5","@types/node":"^24.10.0","@types/react":"^19.2.2","@types/react-dom":"^19.2.2","@vitejs/plugin-react-swc":"^4.2.1","change-case":"^5.4.4","cpy-cli":"^6.0.0","date-fns":"^4.1.0","eslint":"^9.39.1","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","eslint-plugin-react-hooks":"^7.0.1","eslint-plugin-react-refresh":"^0.4.24","eslint-plugin-simple-import-sort":"^12.1.1","eslint-plugin-storybook":"^10.0.5","globals":"^16.5.0","happy-dom":"^20.0.10","lint-staged":"^16.2.6","prettier":"^3.6.2","prettier-plugin-jsdoc":"^1.5.0","react":"^19.2.0","react-dom":"^19.2.0","rimraf":"^6.1.0","sass-embedded":"^1.93.2","simple-git-hooks":"^2.13.1","storybook":"^10.0.5","terser":"^5.44.1","tslib":"^2.8.1","typescript":"~5.9.3","typescript-eslint":"^8.46.3","vite":"^7.2.1","vite-plugin-dts":"^4.5.4","vitest":"^4.0.7","zustand":"^5.0.8"}'),
|
|
1452
1454
|
externalContextsData: data.serializationFormat === "json" ? "{}" : `<${schematic.name}ExternalContexts />`,
|
|
1453
1455
|
apiBasePath: data.apiBasePath ?? DEFAULT_API_BASE_PATH,
|
|
1454
1456
|
viteConfigOutDir: data.viteConfigOutDir ?? DEFAULT_VITE_CONFIG_OUT_DIR,
|
|
@@ -1568,6 +1570,7 @@ export {
|
|
|
1568
1570
|
scaffoldExternalContexts,
|
|
1569
1571
|
scaffoldField,
|
|
1570
1572
|
scaffoldFormPage,
|
|
1573
|
+
scaffoldFormPages,
|
|
1571
1574
|
scaffoldGradleProject,
|
|
1572
1575
|
scaffoldGradleWrapper,
|
|
1573
1576
|
scaffoldIssueMessages,
|