@ostack.tech/ui-kform-scaffolder 1.3.0-beta.1 → 1.3.0-beta.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.
@@ -436,12 +436,12 @@ fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %
436
436
  <TableControlAddRowTrigger />
437
437
  <TableControlContent />
438
438
  </TableControl>
439
- `}}];function Ts(e,t){let n=[];if(e.children?.every(e=>e.kind===ss.kind||e.kind===Cs.kind))for(let r of e.children)r.kind===ss.kind?n.push(Ds(r,{...t,currentPath:Sr(t.currentPath,r.childName),currentDir:Sr(t.currentDir,r.packageSuffix?.replaceAll(`.`,`/`))})):n.push(Es(r,{...t,currentPath:Sr(t.currentPath,r.childName)}));else if(e.children?.every(e=>e.kind===cs.kind))n.push(Ds(e,t));else if(e.children?.some(e=>e.kind===ss.kind||e.kind===Cs.kind||e.kind===cs.kind))throw Error(`Annexes/form pages cannot be mixed with other kinds of fields.`);else n.push(Ds(e,t));return n}function Es(e,t){let n=e.children[0];return Ds(n,{...t,currentPath:Sr(t.currentPath,`*`),currentDir:Sr(t.currentDir,n.packageSuffix?.replaceAll(`.`,`/`))})}function Ds(e,t){if(e.children?.some(e=>e.kind===ss.kind||e.kind===Cs.kind))throw Error(`Annexes must only appear at the top level of the schematic.`);let n;if(e.children?.every(e=>e.kind===cs.kind))n=e.children?.map(e=>({schematic:e,data:{...t,currentPath:Sr(t.currentPath,ko(e.childName)),currentDir:Sr(t.currentDir,e.packageSuffix?.replaceAll(`.`,`/`))}}));else if(e.children?.some(e=>e.kind===cs.kind))throw Error(`Form pages cannot be mixed with other kinds of fields.`);else n=[{schematic:e,data:t}];return{schematic:e,data:t,formPages:n}}function Os(e,t){let n=Sr(t.currentDir,`${e.name}App.tsx`),r=t.files.get(n);r||t.files.set(n,r=oo()),ks(e,{kmpModuleName:`${No(e.name)}-shared`,...t,currentFile:r}),Wo(e,t)}function ks(e,t){let n=(t.sourceLocale??`en-US`).replaceAll(`-`,``),r=t.activePathSearchParam??`page`;t.currentFile.imports.push({moduleName:`@ostack.tech/kform`,name:`ktMapToObject`},{moduleName:`@ostack.tech/ui`,name:`useSearchParam`},{moduleName:`@ostack.tech/ui-kform`,name:`FormApp`},{moduleName:`@ostack.tech/ui-kform/locales`,name:n},{moduleName:`@ostack.tech/ui-kform`,name:`IssuesPanel`},{moduleName:t.kmpModuleName,name:`${e.name}FormMode`},{moduleName:t.kmpModuleName,name:`${e.name}Schema`},{moduleName:`./api/reportError.ts`,name:`reportError`},{moduleName:`./${e.name}Context.ts`,name:`use${e.name}Context`}),t.useReactCompiler||t.currentFile.imports.push({moduleName:`react`,name:`useMemo`});let i=Go(t);i&&t.currentFile.imports.push({moduleName:`./${e.name}IssueMessages.tsx`,name:`${Mo(e.name)}_ISSUE_MESSAGES`}),t.supportMultipleLocales&&t.currentFile.imports.push({moduleName:`@lingui/react/macro`,name:`useLingui`},{moduleName:`./i18n.ts`,name:`LOCALE_SEARCH_PARAM`},{moduleName:`./i18n.ts`,name:`DEFAULT_LOCALE`}),t.currentFile.declarations.push(oa`
439
+ `}}];function Ts(e,t){let n=[];if(e.children?.every(e=>e.kind===ss.kind||e.kind===Cs.kind))for(let r of e.children)r.kind===ss.kind?n.push(Ds(r,{...t,currentPath:Sr(t.currentPath,r.childName),currentDir:Sr(t.currentDir,r.packageSuffix?.replaceAll(`.`,`/`))})):n.push(Es(r,{...t,currentPath:Sr(t.currentPath,r.childName)}));else if(e.children?.every(e=>e.kind===cs.kind))n.push(Ds(e,t));else if(e.children?.some(e=>e.kind===ss.kind||e.kind===Cs.kind||e.kind===cs.kind))throw Error(`Annexes/form pages cannot be mixed with other kinds of fields.`);else n.push(Ds(e,t));return n}function Es(e,t){let n=e.children[0];return Ds(n,{...t,currentPath:Sr(t.currentPath,`*`),currentDir:Sr(t.currentDir,n.packageSuffix?.replaceAll(`.`,`/`))})}function Ds(e,t){if(e.children?.some(e=>e.kind===ss.kind||e.kind===Cs.kind))throw Error(`Annexes must only appear at the top level of the schematic.`);let n;if(e.children?.every(e=>e.kind===cs.kind))n=e.children?.map(e=>({schematic:e,data:{...t,currentPath:Sr(t.currentPath,ko(e.childName)),currentDir:Sr(t.currentDir,e.packageSuffix?.replaceAll(`.`,`/`))}}));else if(e.children?.some(e=>e.kind===cs.kind))throw Error(`Form pages cannot be mixed with other kinds of fields.`);else n=[{schematic:e,data:t}];return{schematic:e,data:t,formPages:n}}function Os(e,t){let n=Sr(t.currentDir,`${e.name}App.tsx`),r=t.files.get(n);r||t.files.set(n,r=oo()),ks(e,{kmpModuleName:`${No(e.name)}-shared`,...t,currentFile:r}),Wo(e,t)}function ks(e,t){let n=(t.sourceLocale??`en-US`).replaceAll(`-`,``),r=t.activePathSearchParam??`page`;t.currentFile.imports.push({moduleName:`@ostack.tech/kform`,name:`ktMapToObject`},{moduleName:`@ostack.tech/ui`,name:`useSearchParam`},{moduleName:`@ostack.tech/ui-kform`,name:`FormApp`},{moduleName:`@ostack.tech/ui-kform`,name:`IssuesPanel`},{moduleName:t.kmpModuleName,name:`${e.name}FormMode`},{moduleName:t.kmpModuleName,name:`${e.name}Schema`},{moduleName:`./api/reportError.ts`,name:`reportError`},{moduleName:`./${e.name}Context.ts`,name:`use${e.name}Context`}),t.useReactCompiler||t.currentFile.imports.push({moduleName:`react`,name:`useMemo`});let i=Go(t);i&&t.currentFile.imports.push({moduleName:`./${e.name}IssueMessages.tsx`,name:`${Mo(e.name)}_ISSUE_MESSAGES`}),t.supportMultipleLocales?t.currentFile.imports.push({moduleName:`@lingui/react/macro`,name:`useLingui`},{moduleName:`./i18n.ts`,name:`LOCALE_SEARCH_PARAM`},{moduleName:`./i18n.ts`,name:`DEFAULT_LOCALE`}):t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform/locales`,name:n}),t.currentFile.declarations.push(oa`
440
440
  export function ${e.name}App() {
441
- ${t.supportMultipleLocales?`const { i18n, t } = useLingui();`:``}
441
+ ${t.supportMultipleLocales&&`const { i18n, t } = useLingui();`}
442
442
  const { externalContexts } = use${e.name}Context();
443
443
  const [activePath, setActivePath] = useSearchParam("${r}");
444
- ${t.supportMultipleLocales?`const [, setSearchLocale] = useSearchParam(LOCALE_SEARCH_PARAM, DEFAULT_LOCALE);`:``}
444
+ ${t.supportMultipleLocales&&`const [, setSearchLocale] = useSearchParam(LOCALE_SEARCH_PARAM, DEFAULT_LOCALE);`}
445
445
 
446
446
  return (
447
447
  <FormApp
@@ -456,8 +456,8 @@ fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %
456
456
  formTitle="${jo(e.name)}"
457
457
  activePath={activePath}
458
458
  onActivePathChange={setActivePath}
459
- ${i?`issueMessages={${Mo(e.name)}_ISSUE_MESSAGES}`:``}
460
- defaultLocale={${n}}
459
+ ${i&&`issueMessages={${Mo(e.name)}_ISSUE_MESSAGES}`}
460
+ ${!t.supportMultipleLocales&&`defaultLocale={${n}}`}
461
461
  reportError={reportError}
462
462
  debug={import.meta.env.DEV}
463
463
  >
@@ -480,7 +480,8 @@ fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %
480
480
  `)}
481
481
  </Annexes>
482
482
  `)}function js(e,t,n){let r=e.name,i=ko(r),a=t.serializationFormat??`json`,o=`application/${t.serializationFormat}`;return t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`TopBar`},{moduleName:`@ostack.tech/ui-kform`,name:`TopBarActions`},{moduleName:`@ostack.tech/ui-kform`,name:`TopBarActionsSecondary`},{moduleName:`@ostack.tech/ui-kform`,name:`LoadAction`},{moduleName:`@ostack.tech/ui-kform`,name:`SaveAction`},{moduleName:`@ostack.tech/ui-kform`,name:`ValidateAction`},{moduleName:`@ostack.tech/ui-kform`,name:`SubmitAction`},{moduleName:`@ostack.tech/kform`,name:`LocatedValidationWarning`},{moduleName:t.kmpModuleName,name:r,isType:!0},{moduleName:t.kmpModuleName,name:`decode${r}FromString`},{moduleName:t.kmpModuleName,name:`encode${r}ToString`},{moduleName:t.kmpModuleName,name:`${r}SubmitSuccess`},{moduleName:t.kmpModuleName,name:`${r}SubmitValidationError`},{moduleName:t.kmpModuleName,name:`${r}SubmitError`},{moduleName:`./api/submit.ts`,name:`submit`}),t.supportMultipleLocales&&t.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`ChangeLocaleAction`},{moduleName:`./i18n.ts`,name:`LOCALES`},{moduleName:`./i18n.ts`,name:`getUiKFormLocale`},{moduleName:`./i18n.ts`,name:`getAppMessages`}),oa`
483
- <TopBar>${n?`\n ${n}\n`:``}
483
+ <TopBar>
484
+ ${n&&`${n}\n`}
484
485
  <TopBarActions>
485
486
  <TopBarActionsSecondary>
486
487
  <LoadAction
@@ -493,16 +494,16 @@ fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %
493
494
  mimeTypes={["${o}"]}
494
495
  extensions={[".${a}"]}
495
496
  />
496
- ${t.supportMultipleLocales?oa`
497
- <ChangeLocaleAction
498
- locales={LOCALES}
499
- getLocalizationObject={getUiKFormLocale}
500
- onLocaleChange={async (locale) => {
501
- i18n.loadAndActivate({ locale, messages: await getAppMessages(locale) });
502
- setSearchLocale(locale, { clearDefaultValue: true });
503
- }}
504
- />
505
- `:``}
497
+ ${t.supportMultipleLocales&&oa`
498
+ <ChangeLocaleAction
499
+ locales={LOCALES}
500
+ getLocalizationObject={getUiKFormLocale}
501
+ onLocaleChange={async (locale) => {
502
+ i18n.loadAndActivate({ locale, messages: await getAppMessages(locale) });
503
+ setSearchLocale(locale, { clearDefaultValue: true });
504
+ }}
505
+ />
506
+ `}
506
507
  <ValidateAction />
507
508
  </TopBarActionsSecondary>
508
509
  <SubmitAction
@@ -521,24 +522,24 @@ fun decode<%= formClass %>SubmitResponseFromString(xml: String): <%= formClass %
521
522
  }}
522
523
  onSuccessfulSubmit={(redirectTo: string) => {
523
524
  window.location.href = redirectTo;
524
- }}${t.useTableValuesSerializer?`
525
- convertExternalIssuesTableRowIndicesToIds`:``}
525
+ }}
526
+ ${t.useTableValuesSerializer&&`convertExternalIssuesTableRowIndicesToIds`}
526
527
  />
527
528
  </TopBarActions>
528
529
  </TopBar>
529
- `}function Ms(e,t){e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`Annex`});let n=Po(t.schematic.name),r=e.supportMultipleLocales?`title={t\`${n}\`}`:`title=${JSON.stringify(n)}`,i=t.formPages.length===1&&t.schematic===t.formPages[0].schematic?` documentTitle={null}`:``;return oa`
530
- <Annex path="${t.data.currentPath}" ${r}${i}>
530
+ `}function Ms(e,t){e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`Annex`});let n=Po(t.schematic.name);return oa`
531
+ <Annex ${[`path="${t.data.currentPath}"`,e.supportMultipleLocales?`title={t\`${n}\`}`:`title=${JSON.stringify(n)}`,t.formPages.length===1&&t.schematic===t.formPages[0].schematic&&`documentTitle={null}`].filter(Boolean).join(` `)}>
531
532
  ${Ns(e,t)}
532
533
  </Annex>
533
534
  `}function Ns(e,t){return e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPages`}),t.formPages.length>1&&e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPagesNavigation`}),oa`
534
535
  <FormPages>
535
- ${t.formPages.length>1?`<FormPagesNavigation />`:``}
536
+ ${t.formPages.length>1&&`<FormPagesNavigation />`}
536
537
  ${t.formPages.map(n=>Ps(e,t,n)).join(`
537
538
 
538
539
  `)}
539
540
  </FormPages>
540
- `}function Ps(e,t,n){e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPage`},{moduleName:`./${Sr(n.data.currentDir.slice(e.currentDir.length+ +!e.currentDir.endsWith(`/`)),n.schematic.name)}.tsx`,name:n.schematic.name});let r=``;Go(e)&&n.data.currentPath!==`/`&&(e.currentFile.imports.push({moduleName:`./${Sr(n.data.currentDir.slice(e.currentDir.length+ +!e.currentDir.endsWith(`/`)),n.schematic.name)}IssueMessages.tsx`,name:`${Mo(n.schematic.name)}_ISSUE_MESSAGES`}),r=` issueMessages={${Mo(n.schematic.name)}_ISSUE_MESSAGES}`);let i=t.schematic===n.schematic?``:` path="${n.data.currentPath.slice(t.data.currentPath.length+ +!t.data.currentPath.endsWith(`/`))}"`,a=Po(n.schematic.name),o=e.supportMultipleLocales?`title={t\`${a}\`}`:`title=${JSON.stringify(a)}`,s=n.data.currentPath===`/`?` documentTitle={null}`:``;return oa`
541
- <FormPage${i} ${o} code="${n.schematic.name?.[0].toUpperCase()}"${s}${r}>
541
+ `}function Ps(e,t,n){e.currentFile.imports.push({moduleName:`@ostack.tech/ui-kform`,name:`FormPage`},{moduleName:`./${Sr(n.data.currentDir.slice(e.currentDir.length+ +!e.currentDir.endsWith(`/`)),n.schematic.name)}.tsx`,name:n.schematic.name});let r=[];Go(e)&&n.data.currentPath!==`/`&&(e.currentFile.imports.push({moduleName:`./${Sr(n.data.currentDir.slice(e.currentDir.length+ +!e.currentDir.endsWith(`/`)),n.schematic.name)}IssueMessages.tsx`,name:`${Mo(n.schematic.name)}_ISSUE_MESSAGES`}),r.push(`issueMessages={${Mo(n.schematic.name)}_ISSUE_MESSAGES}`));let i=Po(n.schematic.name);return r.push(t.schematic===n.schematic&&`path="${n.data.currentPath.slice(t.data.currentPath.length+ +!t.data.currentPath.endsWith(`/`))}"`,e.supportMultipleLocales?`title={t\`${i}\`}`:`title=${JSON.stringify(i)}`,`code="${n.schematic.name?.[0].toUpperCase()}"`,n.data.currentPath===`/`&&`documentTitle={null}`),oa`
542
+ <FormPage ${r.filter(Boolean).join(` `)}>
542
543
  <${n.schematic.name} />
543
544
  </FormPage>
544
545
  `}var Fs=`import { createContext, useContext } from "react";
@@ -649,27 +650,27 @@ toolchainUrl.WINDOWS.X86_64=https\\://api.foojay.io/disco/v3.0/ids/ccc3884e65cd8
649
650
  toolchainVersion=<%= jvmToolchainVersion %>
650
651
  `,Gs=`[versions]
651
652
  # Plugins
652
- kotlin = "2.4.21"
653
- nodeGradle = "7.1.0"
653
+ kotlin = "<%= dependencyVersions.kotlin %>"
654
+ nodeGradle = "<%= dependencyVersions.nodeGradle %>"
654
655
  # Libraries
655
656
  kform = "<%= kFormVersion %>"
656
- kotlinxCoroutines = "1.11.0"
657
+ kotlinxCoroutines = "<%= dependencyVersions.kotlinxCoroutines %>"
657
658
  <%_ if (includeKotlinxDatetime) { -%>
658
- kotlinxDatetime = "0.8.0"
659
+ kotlinxDatetime = "<%= dependencyVersions.kotlinxDatetime %>"
659
660
  <%_ } -%>
660
661
  <%_ if (serializationFormat === "json") { -%>
661
- kotlinxSerialization = "1.12.0"
662
+ kotlinxSerialization = "<%= dependencyVersions.kotlinxSerialization %>"
662
663
  <%_ } -%>
663
664
  <%_ if (includeKtMath) { -%>
664
- ktMath = "0.10.2"
665
+ ktMath = "<%= dependencyVersions.ktMath %>"
665
666
  <%_ } -%>
666
- slf4j = "2.0.19"
667
+ slf4j = "<%= dependencyVersions.slf4j %>"
667
668
  <%_ if (serializationFormat === "xml") { -%>
668
- xmlutil = "0.91.1"
669
+ xmlutil = "<%= dependencyVersions.xmlutil %>"
669
670
  <%_ } -%>
670
671
  <%_ if (includeKotlinxDatetime) { -%>
671
672
  # npm libraries
672
- jsJodaTimezone = "2.23.0"
673
+ jsJodaTimezone = "<%= dependencyVersions.jsJodaTimezone %>"
673
674
  <%_ } -%>
674
675
  # Runtimes
675
676
  jvmToolchain = "<%= jvmToolchainVersion %>"
@@ -730,6 +731,9 @@ tasks.register<NpmTask>("npmRunDev") {
730
731
  private fun NpmTask.npmRunBuild(buildReason: String) {
731
732
  group = "build"
732
733
  dependsOn(tasks.npmInstall)
734
+ <%_ if (supportMultipleLocales) { -%>
735
+ mustRunAfter(npmRunI18nExtract)
736
+ <%_ } -%>
733
737
  npmCommand = listOf("run", "build")
734
738
  environment = mapOf("VITE_BUILD_REASON" to buildReason)
735
739
 
@@ -761,6 +765,9 @@ tasks.register<NpmTask>("npmRunPreview") {
761
765
  val npmRunLint = tasks.register<NpmTask>("npmRunLint") {
762
766
  group = "verification"
763
767
  dependsOn(tasks.npmInstall)
768
+ <%_ if (supportMultipleLocales) { -%>
769
+ mustRunAfter(npmRunI18nExtract)
770
+ <%_ } -%>
764
771
  npmCommand = listOf("run", "lint")
765
772
 
766
773
  inputs.dir("src")
@@ -797,7 +804,7 @@ tasks.check {
797
804
  dependsOn(npmRunLint)
798
805
  }
799
806
  `,qs=`plugins {
800
- id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
807
+ id("org.gradle.toolchains.foojay-resolver-convention") version "<%= dependencyVersions.foojayResolverConvention %>"
801
808
  }
802
809
 
803
810
  @Suppress("UnstableApiUsage")
@@ -911,7 +918,7 @@ external object JsJodaTimeZoneModule
911
918
 
912
919
  @JsExport
913
920
  val jsJodaTz = JsJodaTimeZoneModule
914
- `;function Xs(e,t){let n={gradlePropertiesGroup:t.gradlePropertiesGroup??t.currentPackage,filePackage:t.currentPackage,formId:No(e.name),formTitle:jo(e.name),kFormVersion:`1.2.1`,supportMultipleLocales:t.supportMultipleLocales,serializationFormat:t.serializationFormat??`json`,includeKotlinxDatetime:t.includeKotlinxDatetime??Zs(e,t),includeKtMath:t.includeKtMath??Qs(e),jvmToolchainVersion:t.jvmToolchainVersion??`21`,nodejsVersion:t.nodejsVersion??`24.22.2`};za(t,`gradle.properties`,Us,n),za(t,`settings.gradle.kts`,qs,n),za(t,`gradle/libs.versions.toml`,Gs,n),za(t,`gradle/gradle-daemon-jvm.properties`,Ws,n),ao(t,`build.gradle.kts`,Hs),ao(t,`build-logic/settings.gradle.kts`,Bs),ao(t,`build-logic/build.gradle.kts`,zs),ao(t,`build-logic/src/main/kotlin/node-gradle-conventions.gradle.kts`,Vs),za(t,`shared/build.gradle.kts`,Js,n),n.includeKotlinxDatetime&&za(t,`shared/src/jsMain/kotlin/JsJodaTimeZone.kt`,Ys,n),za(t,`react-app/build.gradle.kts`,Ks,n)}function Zs(e,t){return t.schematicKinds.get(e.kind)?.package===`kotlinx.datetime`||e.children?.some(e=>Zs(e,t))===!0}function Qs(e){return[`BigInteger`,`BigDecimal`].includes(e.kind)||e.children?.some(e=>Qs(e))===!0}var $s=`/assets/gradle-wrapper-BvbY_R1M.jar`,ec=`distributionBase=GRADLE_USER_HOME
921
+ `;function Xs(e,t){let n=JSON.parse(`{"kotlin":"2.4.21","nodeGradle":"7.1.0","kotlinxCoroutines":"1.11.0","kotlinxDatetime":"0.8.0","kotlinxSerialization":"1.12.0","ktMath":"0.10.2","slf4j":"2.0.20","xmlutil":"0.91.1","jsJodaTimezone":"2.23.0","jvmToolchain":"21","nodejs":"24.22.2","foojayResolverConvention":"1.0.0"}`),r={gradlePropertiesGroup:t.gradlePropertiesGroup??t.currentPackage,filePackage:t.currentPackage,formId:No(e.name),formTitle:jo(e.name),kFormVersion:`1.2.1`,supportMultipleLocales:t.supportMultipleLocales,serializationFormat:t.serializationFormat??`json`,includeKotlinxDatetime:t.includeKotlinxDatetime??Zs(e,t),includeKtMath:t.includeKtMath??Qs(e),dependencyVersions:n,jvmToolchainVersion:t.jvmToolchainVersion??n.jvmToolchain,nodejsVersion:t.nodejsVersion??n.nodejs};za(t,`gradle.properties`,Us,r),za(t,`settings.gradle.kts`,qs,r),za(t,`gradle/libs.versions.toml`,Gs,r),za(t,`gradle/gradle-daemon-jvm.properties`,Ws,r),ao(t,`build.gradle.kts`,Hs),ao(t,`build-logic/settings.gradle.kts`,Bs),ao(t,`build-logic/build.gradle.kts`,zs),ao(t,`build-logic/src/main/kotlin/node-gradle-conventions.gradle.kts`,Vs),za(t,`shared/build.gradle.kts`,Js,r),r.includeKotlinxDatetime&&za(t,`shared/src/jsMain/kotlin/JsJodaTimeZone.kt`,Ys,r),za(t,`react-app/build.gradle.kts`,Ks,r)}function Zs(e,t){return t.schematicKinds.get(e.kind)?.package===`kotlinx.datetime`||e.children?.some(e=>Zs(e,t))===!0}function Qs(e){return[`BigInteger`,`BigDecimal`].includes(e.kind)||e.children?.some(e=>Qs(e))===!0}var $s=`/assets/gradle-wrapper-BvbY_R1M.jar`,ec=`distributionBase=GRADLE_USER_HOME
915
922
  distributionPath=wrapper/dists
916
923
  distributionUrl=https\\://services.gradle.org/distributions/gradle-9.5.0-bin.zip
917
924
  networkTimeout=10000
@@ -1473,7 +1480,7 @@ class <%= formClass %>SubmitValidationError(val issues: List<LocatedValidationIs
1473
1480
  "@fortawesome/free-regular-svg-icons": "<%= dependencyVersions["@fortawesome/free-regular-svg-icons"] %>",
1474
1481
  "@fortawesome/free-solid-svg-icons": "<%= dependencyVersions["@fortawesome/free-solid-svg-icons"] %>",
1475
1482
  <%_ if (supportMultipleLocales) { -%>
1476
- "@lingui/react": "^6.7.0",
1483
+ "@lingui/react": "<%= dependencyVersions["@lingui/react"] %>",
1477
1484
  <%_ } -%>
1478
1485
  "@ostack.tech/kform-react": "^<%= kFormVersion %>",
1479
1486
  "@ostack.tech/ui": "^<%= ostackUiVersion %>",
@@ -1484,15 +1491,14 @@ class <%= formClass %>SubmitValidationError(val issues: List<LocatedValidationIs
1484
1491
  "react-dom": "<%= dependencyVersions["react-dom"] %>"
1485
1492
  },
1486
1493
  "devDependencies": {
1487
- <%_ if (supportMultipleLocales || useReactCompiler) { -%>
1488
- "@babel/core": "^8.0.5",
1494
+ <%_ if (useReactCompiler) { -%>
1495
+ "@babel/core": "<%= dependencyVersions["@babel/core"] %>",
1489
1496
  <%_ } -%>
1490
1497
  <%_ if (supportMultipleLocales) { -%>
1491
- "@lingui/babel-plugin-lingui-macro": "^6.7.0",
1492
- "@lingui/vite-plugin": "^6.7.0",
1498
+ "@lingui/vite-plugin": "<%= dependencyVersions["@lingui/vite-plugin"] %>",
1493
1499
  <%_ } -%>
1494
- <%_ if (supportMultipleLocales || useReactCompiler) { -%>
1495
- "@rolldown/plugin-babel": "^0.2.4",
1500
+ <%_ if (useReactCompiler) { -%>
1501
+ "@rolldown/plugin-babel": "<%= dependencyVersions["@rolldown/plugin-babel"] %>",
1496
1502
  <%_ } -%>
1497
1503
  "@types/node": "<%= dependencyVersions["@types/node"] %>",
1498
1504
  "@types/ostack.tech__kform": "npm:@ostack.tech/kform@^<%= kFormVersion %>",
@@ -1500,10 +1506,10 @@ class <%= formClass %>SubmitValidationError(val issues: List<LocatedValidationIs
1500
1506
  "@types/react-dom": "<%= dependencyVersions["@types/react-dom"] %>",
1501
1507
  "@vitejs/plugin-react": "<%= dependencyVersions["@vitejs/plugin-react"] %>",
1502
1508
  <%_ if (useReactCompiler) { -%>
1503
- "babel-plugin-react-compiler": "^1.0.0",
1509
+ "babel-plugin-react-compiler": "<%= dependencyVersions["babel-plugin-react-compiler"] %>",
1504
1510
  <%_ } -%>
1505
1511
  <%_ if (supportMultipleLocales) { -%>
1506
- "eslint-plugin-lingui": "^0.16.0",
1512
+ "eslint-plugin-lingui": "<%= dependencyVersions["eslint-plugin-lingui"] %>",
1507
1513
  <%_ } -%>
1508
1514
  "oxlint": "<%= dependencyVersions.oxlint %>",
1509
1515
  "oxlint-tsgolint": "<%= dependencyVersions["oxlint-tsgolint"] %>",
@@ -1568,12 +1574,10 @@ class <%= formClass %>SubmitValidationError(val issues: List<LocatedValidationIs
1568
1574
  `,wc=`import { resolve } from "node:path";
1569
1575
 
1570
1576
  <%_ if (supportMultipleLocales) { -%>
1571
- import { lingui, linguiTransformerBabelPreset } from "@lingui/vite-plugin";
1572
- <%_ } -%>
1573
- <%_ if (supportMultipleLocales || useReactCompiler) { -%>
1574
- import babel from "@rolldown/plugin-babel";
1577
+ import { lingui } from "@lingui/vite-plugin";
1575
1578
  <%_ } -%>
1576
1579
  <%_ if (useReactCompiler) { -%>
1580
+ import babel from "@rolldown/plugin-babel";
1577
1581
  import react, { reactCompilerPreset } from "@vitejs/plugin-react";
1578
1582
  <%_ } else { -%>
1579
1583
  import react from "@vitejs/plugin-react";
@@ -1589,19 +1593,10 @@ export default defineConfig({
1589
1593
  plugins: [
1590
1594
  react(),
1591
1595
  <%_ if (supportMultipleLocales) { -%>
1592
- lingui({ failOnMissing: mode === "production" }),
1596
+ lingui({ macroTransform: true, failOnMissing: mode === "production" }),
1593
1597
  <%_ } -%>
1594
- <%_ if (supportMultipleLocales || useReactCompiler) { -%>
1595
- babel({
1596
- presets: [
1597
- <%_ if (useReactCompiler) { -%>
1598
- reactCompilerPreset(),
1599
- <%_ } -%>
1600
- <%_ if (supportMultipleLocales) { -%>
1601
- linguiTransformerBabelPreset(),
1602
- <%_ } -%>
1603
- ]
1604
- }),
1598
+ <%_ if (useReactCompiler) { -%>
1599
+ babel({ presets: [reactCompilerPreset()] }),
1605
1600
  <%_ } -%>
1606
1601
  ],
1607
1602
  build: {
@@ -1639,4 +1634,4 @@ export default defineConfig({
1639
1634
  <%_ } else { -%>
1640
1635
  });
1641
1636
  <%_ } -%>
1642
- `;function Tc(e,t){let n={formId:No(e.name),formClass:e.name,formTitle:jo(e.name),supportMultipleLocales:t.supportMultipleLocales,useReactCompiler:t.useReactCompiler,ostackUiVersion:`1.3.0-beta.1`,kFormVersion:`1.2.1`,dependencyVersions:JSON.parse(`{"@fortawesome/fontawesome-svg-core":"^7.3.1","@fortawesome/free-brands-svg-icons":"^7.3.1","@fortawesome/free-regular-svg-icons":"^7.3.1","@fortawesome/free-solid-svg-icons":"^7.3.1","@ostack.tech/kform":"^1.2.1","@ostack.tech/kform-react":"^1.2.1","@ostack.tech/kform-scaffolder":"^1.2.1","@storybook/addon-a11y":"^10.6.5","@storybook/addon-docs":"^10.6.5","@storybook/addon-links":"^10.6.5","@storybook/react-vite":"^10.6.5","@testing-library/react":"^16.3.3","@types/node":"^24.19.2","@types/react":"^19.3.0","@types/react-dom":"^19.3.0","@vitejs/plugin-react":"^6.2.1","change-case":"^5.4.4","cpy-cli":"^7.0.0","date-fns":"^4.4.0","happy-dom":"^21.0.4","lint-staged":"^17.6.0","oxc-transform-react":"^0.157.0","oxfmt":"^0.76.0","oxlint":"^1.91.0","oxlint-tsgolint":"^7.0.2005","prettier":"^3.9.10","react":"^19.3.1","react-dom":"^19.3.1","refractor":"^5.0.0","rimraf":"^6.1.3","sass-embedded":"^1.107.1","simple-git-hooks":"^2.14.0","storybook":"^10.6.5","terser":"^5.51.2","typescript":"~6.0.3","vite":"^8.3.5","vitest":"^5.1.0","write-excel-file":"^4.1.1","zod":"^4.6.7","zustand":"^5.0.16"}`),encodedExternalContexts:JSON.stringify(t.serializationFormat===`json`?`{}`:`<${e.name}ExternalContexts />`),apiBasePath:t.apiBasePath??`/api/`,viteConfigOutDir:t.viteConfigOutDir??`build/dist/`,viteConfigProxyTarget:t.viteConfigProxyTarget??`http://127.0.0.1:8080/`};za(t,`react-app/package.json`,yc,n),za(t,`react-app/vite.config.ts`,wc,n),ao(t,`react-app/tsconfig.json`,Sc),ao(t,`react-app/tsconfig.app.json`,xc),ao(t,`react-app/tsconfig.node.json`,Cc),za(t,`react-app/.oxlintrc.json`,_c,n),za(t,`react-app/index.html`,vc,n),ao(t,`react-app/public/favicon.svg`,bc)}var Ec={currentDir:`shared/src/commonMain/kotlin`},Dc={currentDir:`shared/src/commonTest/kotlin`},Oc={currentDir:`react-app/src`},kc=`1.3.0-beta.1`,Ac=[fc,rc,Xs,Tc,oc,br(Na,Ec),br(Br,Ec),br(mc,Ec),br(Rs,Ec),br(es,Ec),br(Ha,Dc),br(sc,Oc),br(gc,Oc),br(Os,Oc),br(Is,Oc),br(Vo,Oc),br(qo,Oc)],jc=e=>({useFileBase64Serializer:!0,useReactCompiler:!0,...e.config}),Mc=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(mo,{}),(0,K.jsx)(_o,{}),(0,K.jsx)(yo,{}),(0,K.jsx)(vo,{defaultValue:!0})]});function Nc(e){let t=(0,S.c)(16),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({name:r,schematicKinds:i,scaffolders:a,scaffoldingData:o,configs:s,version:c,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=r===void 0?`ostack-ui-kform`:r,u=i===void 0?ws:i,d=a===void 0?Ac:a,f=o===void 0?jc:o,p=s===void 0?Mc:s,m=c===void 0?kc:c,h;return t[8]!==p||t[9]!==l||t[10]!==n||t[11]!==d||t[12]!==f||t[13]!==u||t[14]!==m?(h=(0,K.jsx)($a,{name:l,schematicKinds:u,scaffolders:d,scaffoldingData:f,configs:p,version:m,...n}),t[8]=p,t[9]=l,t[10]=n,t[11]=d,t[12]=f,t[13]=u,t[14]=m,t[15]=h):h=t[15],h}(0,x.createRoot)(document.getElementById(`root`)).render((0,K.jsx)(C.StrictMode,{children:(0,K.jsx)(Nc,{})}));
1637
+ `;function Tc(e,t){let n={formId:No(e.name),formClass:e.name,formTitle:jo(e.name),supportMultipleLocales:t.supportMultipleLocales,useReactCompiler:t.useReactCompiler,ostackUiVersion:`1.3.0-beta.2`,kFormVersion:`1.2.1`,dependencyVersions:JSON.parse(`{"@fortawesome/fontawesome-svg-core":"^7.3.1","@fortawesome/free-brands-svg-icons":"^7.3.1","@fortawesome/free-regular-svg-icons":"^7.3.1","@fortawesome/free-solid-svg-icons":"^7.3.1","@ostack.tech/kform":"^1.2.1","@ostack.tech/kform-react":"^1.2.1","@ostack.tech/kform-scaffolder":"^1.2.1","@storybook/addon-a11y":"^10.6.5","@storybook/addon-docs":"^10.6.5","@storybook/addon-links":"^10.6.5","@storybook/react-vite":"^10.6.5","@testing-library/react":"^16.3.3","@types/node":"^24.19.2","@types/react":"^19.3.0","@types/react-dom":"^19.3.0","@vitejs/plugin-react":"^6.2.1","change-case":"^5.4.4","cpy-cli":"^7.0.0","date-fns":"^4.4.0","happy-dom":"^21.0.4","lint-staged":"^17.6.0","oxc-transform-react":"^0.157.0","oxfmt":"^0.76.0","oxlint":"^1.91.0","oxlint-tsgolint":"^7.0.2005","playwright":"^1.64.1","prettier":"^3.9.10","react":"^19.3.1","react-dom":"^19.3.1","refractor":"^5.0.0","rimraf":"^6.1.3","sass-embedded":"^1.107.1","simple-git-hooks":"^2.14.0","storybook":"^10.6.5","terser":"^5.51.2","typescript":"~6.0.3","vite":"^8.3.5","vitest":"^5.1.0","write-excel-file":"^4.1.1","zod":"^4.6.7","zustand":"^5.0.16","@babel/core":"^7.29.7","@lingui/react":"^6.12.0","@lingui/vite-plugin":"^6.12.0","@rolldown/plugin-babel":"^0.3.0","babel-plugin-react-compiler":"^1.0.0","eslint-plugin-lingui":"^0.16.0"}`),encodedExternalContexts:JSON.stringify(t.serializationFormat===`json`?`{}`:`<${e.name}ExternalContexts />`),apiBasePath:t.apiBasePath??`/api/`,viteConfigOutDir:t.viteConfigOutDir??`build/dist/`,viteConfigProxyTarget:t.viteConfigProxyTarget??`http://127.0.0.1:8080/`};za(t,`react-app/package.json`,yc,n),za(t,`react-app/vite.config.ts`,wc,n),ao(t,`react-app/tsconfig.json`,Sc),ao(t,`react-app/tsconfig.app.json`,xc),ao(t,`react-app/tsconfig.node.json`,Cc),za(t,`react-app/.oxlintrc.json`,_c,n),za(t,`react-app/index.html`,vc,n),ao(t,`react-app/public/favicon.svg`,bc)}var Ec={currentDir:`shared/src/commonMain/kotlin`},Dc={currentDir:`shared/src/commonTest/kotlin`},Oc={currentDir:`react-app/src`},kc=`1.3.0-beta.2`,Ac=[fc,rc,Xs,Tc,oc,br(Na,Ec),br(Br,Ec),br(mc,Ec),br(Rs,Ec),br(es,Ec),br(Ha,Dc),br(sc,Oc),br(gc,Oc),br(Os,Oc),br(Is,Oc),br(Vo,Oc),br(qo,Oc)],jc=e=>({useFileBase64Serializer:!0,useReactCompiler:!0,...e.config}),Mc=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(mo,{}),(0,K.jsx)(_o,{}),(0,K.jsx)(yo,{}),(0,K.jsx)(vo,{defaultValue:!0})]});function Nc(e){let t=(0,S.c)(16),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({name:r,schematicKinds:i,scaffolders:a,scaffoldingData:o,configs:s,version:c,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=r===void 0?`ostack-ui-kform`:r,u=i===void 0?ws:i,d=a===void 0?Ac:a,f=o===void 0?jc:o,p=s===void 0?Mc:s,m=c===void 0?kc:c,h;return t[8]!==p||t[9]!==l||t[10]!==n||t[11]!==d||t[12]!==f||t[13]!==u||t[14]!==m?(h=(0,K.jsx)($a,{name:l,schematicKinds:u,scaffolders:d,scaffoldingData:f,configs:p,version:m,...n}),t[8]=p,t[9]=l,t[10]=n,t[11]=d,t[12]=f,t[13]=u,t[14]=m,t[15]=h):h=t[15],h}(0,x.createRoot)(document.getElementById(`root`)).render((0,K.jsx)(C.StrictMode,{children:(0,K.jsx)(Nc,{})}));
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <meta name="color-scheme" content="light dark" />
8
8
  <title>Form Scaffolder—ostack/UI-KForm</title>
9
- <script type="module" crossorigin src="/assets/index-DPkVjTyj.js"></script>
9
+ <script type="module" crossorigin src="/assets/index-DKV_8gck.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/assets/index-BKUWl2po.css">
11
11
  </head>
12
12
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ostack.tech/ui-kform-scaffolder",
3
- "version": "1.3.0-beta.1",
3
+ "version": "1.3.0-beta.2",
4
4
  "description": "Scaffold a new project using ostack/KForm, UI, and UI-KForm.",
5
5
  "homepage": "https://ui-kform-scaffolder.ostack.tech/",
6
6
  "author": {
@@ -1,5 +1,3 @@
1
1
  import { type Schematic } from "@ostack.tech/kform-scaffolder";
2
2
  import type { ScaffoldingData } from "../ScaffoldingData.ts";
3
- export declare const DEFAULT_JVM_TOOLCHAIN_VERSION = "21";
4
- export declare const DEFAULT_NODEJS_VERSION = "24.22.2";
5
3
  export declare function scaffoldGradleProject(schematic: Schematic, data: ScaffoldingData): void;