runlify 0.0.714 → 0.0.715

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 (352) hide show
  1. package/build/cli.js +20 -52
  2. package/build/commands/availableEnvironments.js +16 -51
  3. package/build/commands/generate.js +10 -46
  4. package/build/commands/init.js +73 -140
  5. package/build/commands/login.js +6 -42
  6. package/build/commands/logout.js +5 -41
  7. package/build/commands/pullEnvs.js +23 -70
  8. package/build/commands/readEnv.js +16 -45
  9. package/build/commands/regen.js +17 -48
  10. package/build/commands/runlify.js +6 -37
  11. package/build/commands/showToken.js +14 -45
  12. package/build/commands/start.js +57 -84
  13. package/build/commands/tryGetMeta.js +7 -43
  14. package/build/documentation/algoritmToDoc.js +4 -4
  15. package/build/documentation/algoritmToDoc.spec.js +5 -5
  16. package/build/documentation/curlExampleToText.js +15 -16
  17. package/build/documentation/curlExampleToText.spec.js +32 -16
  18. package/build/documentation/doc.js +1 -2
  19. package/build/documentation/docToFlatDoc.js +13 -17
  20. package/build/documentation/docToFlatDoc.spec.js +9 -9
  21. package/build/documentation/flatDoc.js +1 -2
  22. package/build/documentation/flatDocToText.js +4 -6
  23. package/build/documentation/flatDocToText.spec.js +20 -8
  24. package/build/documentation/templateDoc.js +1 -2
  25. package/build/documentation/templateDocToDoc.js +2 -2
  26. package/build/extensions/auth.js +64 -124
  27. package/build/extensions/cli-extension.js +3 -3
  28. package/build/extensions/cloudEnv.js +76 -120
  29. package/build/extensions/cloudMeta.js +35 -73
  30. package/build/extensions/globalConfig.js +37 -80
  31. package/build/extensions/localConfig.js +15 -46
  32. package/build/extensions/preventRunningIfUpdateAvailable.js +18 -52
  33. package/build/log.js +6 -6
  34. package/build/projectsGeneration/args.js +33 -53
  35. package/build/projectsGeneration/builders/AdditionalServiceBuilder.js +62 -96
  36. package/build/projectsGeneration/builders/BaseBuilder.js +30 -34
  37. package/build/projectsGeneration/builders/BaseSavableEntityBuilder.js +272 -312
  38. package/build/projectsGeneration/builders/CatalogBuilder.js +17 -46
  39. package/build/projectsGeneration/builders/ConfigVarBuilder.js +25 -36
  40. package/build/projectsGeneration/builders/DeploymentBuilder.js +18 -47
  41. package/build/projectsGeneration/builders/DocumentBuilder.js +26 -56
  42. package/build/projectsGeneration/builders/InfoRegistryBuilder.js +106 -140
  43. package/build/projectsGeneration/builders/PageBuilder.js +22 -51
  44. package/build/projectsGeneration/builders/PermissionBuilder.js +12 -41
  45. package/build/projectsGeneration/builders/ReportBuilder.js +23 -52
  46. package/build/projectsGeneration/builders/RestApiBuilder.js +20 -50
  47. package/build/projectsGeneration/builders/RestApiMethodBuilder.js +25 -54
  48. package/build/projectsGeneration/builders/RoleBuilder.js +12 -41
  49. package/build/projectsGeneration/builders/SumRegistryBuilder.js +100 -133
  50. package/build/projectsGeneration/builders/SystemMetaBuilder.js +281 -324
  51. package/build/projectsGeneration/builders/TelegramBotBuilder.js +18 -47
  52. package/build/projectsGeneration/builders/docs/DocumentationOfDocumentBuilder.js +8 -9
  53. package/build/projectsGeneration/builders/fields/BaseFieldBuilder.js +89 -105
  54. package/build/projectsGeneration/builders/fields/IdFieldBuilder.js +24 -54
  55. package/build/projectsGeneration/builders/fields/LinkFieldBuilder.js +33 -62
  56. package/build/projectsGeneration/builders/fields/ModelFieldBuilder.js +18 -47
  57. package/build/projectsGeneration/builders/fields/ScalarFieldBuilder.js +11 -42
  58. package/build/projectsGeneration/builders/fields/ViewLinkFieldBuilder.js +26 -55
  59. package/build/projectsGeneration/builders/integrationClients/IntegrationClientArgsModelBuilder.js +6 -23
  60. package/build/projectsGeneration/builders/integrationClients/IntegrationClientBaseModelBuilder.js +28 -57
  61. package/build/projectsGeneration/builders/integrationClients/IntegrationClientBuilder.js +25 -54
  62. package/build/projectsGeneration/builders/integrationClients/IntegrationClientQueryMethodsBuilder.js +18 -47
  63. package/build/projectsGeneration/builders/integrationClients/IntegrationClientReturnModelBuilder.js +12 -41
  64. package/build/projectsGeneration/builders/materialUiIcons.js +2 -2
  65. package/build/projectsGeneration/builders/mehods/ArgsModelBuilder.js +6 -23
  66. package/build/projectsGeneration/builders/mehods/BaseModelBuilder.js +30 -59
  67. package/build/projectsGeneration/builders/mehods/MethodBuilder.js +36 -66
  68. package/build/projectsGeneration/builders/mehods/ReturnModelBuilder.js +12 -41
  69. package/build/projectsGeneration/builders/menu/BaseMenuItemBuilder.js +24 -54
  70. package/build/projectsGeneration/builders/menu/ExternalEnvMenuItemBuilder.js +11 -40
  71. package/build/projectsGeneration/builders/menu/ExternalMenuItemBuilder.js +11 -40
  72. package/build/projectsGeneration/builders/menu/GroupMenuItemBuilder.js +31 -66
  73. package/build/projectsGeneration/builders/menu/InternalMenuItemBuilder.js +16 -45
  74. package/build/projectsGeneration/builders/tsFilterFields.js +11 -12
  75. package/build/projectsGeneration/builders/tsFilterFields.spec.js +29 -11
  76. package/build/projectsGeneration/builders/ui/FormsBuilder.js +9 -10
  77. package/build/projectsGeneration/builders/ui/ListFormBuilder.js +9 -10
  78. package/build/projectsGeneration/builders/ui/ListFormFilterBuilder.js +14 -16
  79. package/build/projectsGeneration/builders/ui/ListFormFilterFieldBuilder.js +8 -9
  80. package/build/projectsGeneration/builders/utils/accessFunctions.js +4 -4
  81. package/build/projectsGeneration/builders/validation/baseValudationToYupAssertions.js +4 -4
  82. package/build/projectsGeneration/builders/validation/bigintValudationToYupAssertions.js +5 -5
  83. package/build/projectsGeneration/builders/validation/bigintValudationToYupAssertions.spec.js +7 -7
  84. package/build/projectsGeneration/builders/validation/floatValudationToYupAssertions.js +4 -4
  85. package/build/projectsGeneration/builders/validation/floatValudationToYupAssertions.spec.js +6 -6
  86. package/build/projectsGeneration/builders/validation/intValudationToYupAssertions.js +9 -9
  87. package/build/projectsGeneration/builders/validation/intValudationToYupAssertions.spec.js +9 -9
  88. package/build/projectsGeneration/builders/validation/numberValudationToYupAssertions.js +10 -10
  89. package/build/projectsGeneration/builders/validation/stringValudationToYupAssertions.js +6 -6
  90. package/build/projectsGeneration/builders/validation/stringValudationToYupAssertions.spec.js +6 -6
  91. package/build/projectsGeneration/commonEntities/addAggregateTrackings.js +3 -3
  92. package/build/projectsGeneration/commonEntities/addAuditLogs.js +6 -6
  93. package/build/projectsGeneration/commonEntities/addAutogeneration.js +4 -4
  94. package/build/projectsGeneration/commonEntities/addCommonCommands.js +2 -2
  95. package/build/projectsGeneration/commonEntities/addCommonEntities.js +14 -14
  96. package/build/projectsGeneration/commonEntities/addConfigurationVariables.js +4 -4
  97. package/build/projectsGeneration/commonEntities/addLanguages.js +3 -3
  98. package/build/projectsGeneration/commonEntities/addManagers.js +6 -6
  99. package/build/projectsGeneration/commonEntities/addRefreshTokens.js +4 -4
  100. package/build/projectsGeneration/commonEntities/addRoles.js +8 -8
  101. package/build/projectsGeneration/commonEntities/addTenants.js +3 -3
  102. package/build/projectsGeneration/commonEntities/addUserSettings.js +7 -7
  103. package/build/projectsGeneration/commonEntities/addUsers.js +4 -4
  104. package/build/projectsGeneration/defaultCatalogs/addElasticSearch.js +12 -13
  105. package/build/projectsGeneration/defaultCatalogs/files.js +6 -6
  106. package/build/projectsGeneration/fileCleaners/back/graphServices/cleanGraphServices.js +24 -59
  107. package/build/projectsGeneration/fileCleaners/back/services/cleanServices.js +32 -67
  108. package/build/projectsGeneration/fileCleaners/cleanFiles.js +7 -38
  109. package/build/projectsGeneration/fileCleaners/ui/cleanUi.js +7 -39
  110. package/build/projectsGeneration/fileCleaners/ui/pages/cleanPages.js +24 -59
  111. package/build/projectsGeneration/fileCleaners/ui/widgets/cleanWidgets.js +10 -40
  112. package/build/projectsGeneration/fileCleaners/ui/widgets/cleanWidgetsByType.js +29 -62
  113. package/build/projectsGeneration/genGraphSchemesByLocalGenerator.js +26 -68
  114. package/build/projectsGeneration/generateAdditionalService.js +41 -98
  115. package/build/projectsGeneration/generateEntity.js +215 -346
  116. package/build/projectsGeneration/generateEnvironment.js +157 -265
  117. package/build/projectsGeneration/generateProject.js +422 -724
  118. package/build/projectsGeneration/generators/fieldTypeToTsType.js +4 -4
  119. package/build/projectsGeneration/generators/fileTemplates/back/Entities.js +16 -14
  120. package/build/projectsGeneration/generators/fileTemplates/back/devEnum.js +17 -13
  121. package/build/projectsGeneration/generators/fileTemplates/back/elastic/elastic.js +8 -44
  122. package/build/projectsGeneration/generators/fileTemplates/back/elastic/jobs.js +36 -26
  123. package/build/projectsGeneration/generators/fileTemplates/back/enum.js +17 -13
  124. package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/Chart.js +12 -8
  125. package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/back.js +128 -12
  126. package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/ingress.js +54 -8
  127. package/build/projectsGeneration/generators/fileTemplates/back/environment/chart/values.js +149 -13
  128. package/build/projectsGeneration/generators/fileTemplates/back/environment/ciNotify.js +19 -8
  129. package/build/projectsGeneration/generators/fileTemplates/back/environment/defaultEnv.js +5 -9
  130. package/build/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplBack.js +38 -8
  131. package/build/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplUI.js +42 -8
  132. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocSpec.js +3 -6
  133. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsConfiguration.js +27 -19
  134. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsEntity.js +7 -5
  135. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsIntegrationClient.js +44 -29
  136. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/backDocsRestApi.js +45 -18
  137. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/findLinksToEntities.js +2 -4
  138. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/getAllSavableEntities.js +7 -11
  139. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/getProjectSpec.js +206 -216
  140. package/build/projectsGeneration/generators/fileTemplates/back/environment/docs/spec/titleMd.js +5 -5
  141. package/build/projectsGeneration/generators/fileTemplates/back/environment/gitlabCi.js +272 -37
  142. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/getPrisma.js +78 -9
  143. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/clients/queue/getQueue.js +42 -9
  144. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/index.js +36 -9
  145. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClient.js +56 -5
  146. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClients.js +12 -9
  147. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/fieldsToTsTypeFields.js +4 -6
  148. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/integrationClientConstrictors.js +13 -9
  149. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/tsModelTmpl.js +6 -4
  150. package/build/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/types.js +15 -7
  151. package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalResolvers.js +9 -2
  152. package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/permissionToGraphql.js +16 -9
  153. package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/resolvers.js +32 -12
  154. package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalService/typeDefs.js +18 -11
  155. package/build/projectsGeneration/generators/fileTemplates/back/graph/additionalTypes.js +7 -2
  156. package/build/projectsGeneration/generators/fileTemplates/back/graph/entityAdditionalPermissionToGraphqlTmpl.js +20 -9
  157. package/build/projectsGeneration/generators/fileTemplates/back/graph/entityBasePermissionToGraphql.js +22 -10
  158. package/build/projectsGeneration/generators/fileTemplates/back/graph/entityPermissionToGraphqlTmpl.js +18 -9
  159. package/build/projectsGeneration/generators/fileTemplates/back/graph/help/baseResolvers.js +17 -2
  160. package/build/projectsGeneration/generators/fileTemplates/back/graph/help/baseTypeDefs.js +15 -5
  161. package/build/projectsGeneration/generators/fileTemplates/back/graph/help/permissionsToGraphql.js +11 -2
  162. package/build/projectsGeneration/generators/fileTemplates/back/graph/meta/resolvers.js +26 -2
  163. package/build/projectsGeneration/generators/fileTemplates/back/graph/meta/typeDefs.js +17 -2
  164. package/build/projectsGeneration/generators/fileTemplates/back/graph/permissionsToGraphql.js +52 -13
  165. package/build/projectsGeneration/generators/fileTemplates/back/graph/resolvers.js +52 -13
  166. package/build/projectsGeneration/generators/fileTemplates/back/graph/types.js +18 -11
  167. package/build/projectsGeneration/generators/fileTemplates/back/initCommon.js +30 -16
  168. package/build/projectsGeneration/generators/fileTemplates/back/initDev.js +27 -15
  169. package/build/projectsGeneration/generators/fileTemplates/back/initEntities.js +24 -10
  170. package/build/projectsGeneration/generators/fileTemplates/back/root/config/config.js +30 -16
  171. package/build/projectsGeneration/generators/fileTemplates/back/root/restRouter.js +21 -2
  172. package/build/projectsGeneration/generators/fileTemplates/back/services/AdditionalServices.js +7 -2
  173. package/build/projectsGeneration/generators/fileTemplates/back/services/BaseServices.js +18 -22
  174. package/build/projectsGeneration/generators/fileTemplates/back/services/HelpService/HelpService.js +30 -7
  175. package/build/projectsGeneration/generators/fileTemplates/back/services/additionalService/types.js +18 -13
  176. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/additionalClass.js +7 -5
  177. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/class.js +126 -49
  178. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/config.js +59 -40
  179. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnCreate.js +13 -5
  180. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnDelete.js +14 -6
  181. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/additionalOperationsOnUpdate.js +14 -6
  182. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterCreate.js +15 -6
  183. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterDelete.js +15 -6
  184. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/afterUpdate.js +15 -6
  185. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeCreate.js +15 -6
  186. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeDelete.js +15 -6
  187. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpdate.js +14 -6
  188. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/beforeUpsert.js +30 -7
  189. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/changeListFilter.js +14 -6
  190. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/hooks/tenantIdRequiredHooks.js +81 -8
  191. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/initBuiltInHooks.js +22 -10
  192. package/build/projectsGeneration/generators/fileTemplates/back/services/entity/initUserHooks.js +31 -6
  193. package/build/projectsGeneration/generators/fileTemplates/back/services/serviceConstrictors.js +26 -14
  194. package/build/projectsGeneration/generators/fileTemplates/ui/Dashboard.js +14 -2
  195. package/build/projectsGeneration/generators/fileTemplates/ui/MetaPage.js +120 -3
  196. package/build/projectsGeneration/generators/fileTemplates/ui/ResourcesPage.js +45 -10
  197. package/build/projectsGeneration/generators/fileTemplates/ui/additionalRoutes.js +5 -2
  198. package/build/projectsGeneration/generators/fileTemplates/ui/entityMapping.js +14 -12
  199. package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/Chart.js +12 -8
  200. package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.js +118 -13
  201. package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.js +51 -8
  202. package/build/projectsGeneration/generators/fileTemplates/ui/environment/chart/values.js +79 -8
  203. package/build/projectsGeneration/generators/fileTemplates/ui/environment/ciNotify.js +19 -8
  204. package/build/projectsGeneration/generators/fileTemplates/ui/environment/docs/adminAppDocsConfiguration.js +27 -21
  205. package/build/projectsGeneration/generators/fileTemplates/ui/environment/gitlabCi.js +179 -26
  206. package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/App.js +107 -10
  207. package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/contexts/SpacesContext.js +67 -9
  208. package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/getAdditionalMethods.js +55 -18
  209. package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/dataProvider/index.js +93 -13
  210. package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/i18nProvider/index.js +51 -19
  211. package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/AppBar.js +60 -9
  212. package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/layout/Menu.js +52 -9
  213. package/build/projectsGeneration/generators/fileTemplates/ui/environment/src/routes.js +38 -9
  214. package/build/projectsGeneration/generators/fileTemplates/ui/functions/Functions.js +60 -7
  215. package/build/projectsGeneration/generators/fileTemplates/ui/getAdditionalMenu.js +11 -2
  216. package/build/projectsGeneration/generators/fileTemplates/ui/getDefaultMenu.js +136 -23
  217. package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangCatalogsTmpl.js +3 -5
  218. package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangDocsTmpl.js +3 -5
  219. package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangInfoRegistriesTmpl.js +3 -5
  220. package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangReportsTmpl.js +3 -3
  221. package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiLangSumRegistriesTmpl.js +3 -5
  222. package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsForServicesOfSavablesTmpl.js +33 -21
  223. package/build/projectsGeneration/generators/fileTemplates/ui/i18n/lang/uiTranslationsLangTmpl.js +23 -15
  224. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/DefaultEntityCreate.js +101 -62
  225. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityCreate/index.js +15 -5
  226. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/DefaultEntityEdit.js +176 -77
  227. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityEdit/index.js +15 -5
  228. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityFilter.js +68 -50
  229. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/DefaultEntityList.js +83 -47
  230. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/EntityFilter.js +12 -5
  231. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityList/index.js +15 -5
  232. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultActions.js +54 -19
  233. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultEntityShow.js +53 -30
  234. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DefaultMainTab.js +45 -32
  235. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/DependencyTab.js +57 -41
  236. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/MainTab.js +3 -2
  237. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/additionalTabs.js +7 -3
  238. package/build/projectsGeneration/generators/fileTemplates/ui/pages/EntityShow/index.js +15 -5
  239. package/build/projectsGeneration/generators/fileTemplates/ui/pages/Icon.js +8 -8
  240. package/build/projectsGeneration/generators/fileTemplates/ui/pages/getEntityValidation.js +45 -30
  241. package/build/projectsGeneration/generators/fileTemplates/ui/resources.js +46 -12
  242. package/build/projectsGeneration/generators/fileTemplates/ui/widgets/count/CountWidget.js +50 -9
  243. package/build/projectsGeneration/generators/fileTemplates/ui/widgets/list/ListWidget.js +109 -14
  244. package/build/projectsGeneration/generators/graph/fieldTypeToGraphScalar.js +8 -9
  245. package/build/projectsGeneration/generators/graph/fieldTypeToGraphScalarStringified.js +4 -6
  246. package/build/projectsGeneration/generators/graph/fields/genGraphField.js +8 -9
  247. package/build/projectsGeneration/generators/graph/fields/genGraphIdField.js +7 -8
  248. package/build/projectsGeneration/generators/graph/fields/genGraphIdFieldType.js +6 -6
  249. package/build/projectsGeneration/generators/graph/fields/genGraphLinkField.js +10 -11
  250. package/build/projectsGeneration/generators/graph/fields/genGraphModelField.js +10 -11
  251. package/build/projectsGeneration/generators/graph/fields/genGraphScalarField.js +10 -11
  252. package/build/projectsGeneration/generators/graph/filters/genGraphField.js +7 -7
  253. package/build/projectsGeneration/generators/graph/filters/genGraphIdFilter.js +12 -14
  254. package/build/projectsGeneration/generators/graph/filters/genGraphLinkFilter.js +12 -24
  255. package/build/projectsGeneration/generators/graph/filters/genGraphScalarFilter.js +25 -37
  256. package/build/projectsGeneration/generators/graph/genGraphAdditionalServiceSchema.js +35 -35
  257. package/build/projectsGeneration/generators/graph/genGraphAdditionalServiceSchema.spec.js +148 -65
  258. package/build/projectsGeneration/generators/graph/genGraphCrudSchema.js +38 -50
  259. package/build/projectsGeneration/generators/graph/genGraphCrudSchema.spec.js +393 -34
  260. package/build/projectsGeneration/generators/graph/genGraphFilterType.js +11 -22
  261. package/build/projectsGeneration/generators/graph/genGraphFilterType.spec.js +75 -13
  262. package/build/projectsGeneration/generators/graph/genGraphModelType.js +15 -27
  263. package/build/projectsGeneration/generators/graph/genGraphType.js +7 -18
  264. package/build/projectsGeneration/generators/graph/genGraphType.spec.js +27 -12
  265. package/build/projectsGeneration/generators/graph/printGraphType.js +5 -7
  266. package/build/projectsGeneration/generators/graph/printGraphType.spec.js +11 -6
  267. package/build/projectsGeneration/generators/graph/utils/mapUtils.js +11 -30
  268. package/build/projectsGeneration/generators/graph/utils/models/getModelInitOrder.js +14 -28
  269. package/build/projectsGeneration/generators/graph/utils/models/getModelInitOrder.spec.js +18 -18
  270. package/build/projectsGeneration/generators/graph/utils/models/getUniqModels.js +3 -3
  271. package/build/projectsGeneration/generators/graph/utils/models/getUniqModels.spec.js +17 -28
  272. package/build/projectsGeneration/generators/graph/utils/models/getUsedModels.js +14 -19
  273. package/build/projectsGeneration/generators/graph/utils/models/getUsedModels.spec.js +40 -51
  274. package/build/projectsGeneration/generators/graph/utils/serviceModels/augmentInputModelsByUsedAsInputGeneralModelsAndPostfixThemByInput.js +17 -26
  275. package/build/projectsGeneration/generators/graph/utils/serviceModels/augmentInputModelsByUsedAsInputGeneralModelsAndPostfixThemByInput.spec.js +68 -68
  276. package/build/projectsGeneration/generators/graph/utils/serviceModels/getGraphTypesFromInputOutputModels.js +21 -42
  277. package/build/projectsGeneration/generators/graph/utils/serviceModels/getGraphTypesFromInputOutputModels.spec.js +85 -62
  278. package/build/projectsGeneration/generators/graph/utils/serviceModels/getPreparedModelsForGraph.js +20 -31
  279. package/build/projectsGeneration/generators/graph/utils/serviceModels/getPreparedModelsForGraph.spec.js +48 -49
  280. package/build/projectsGeneration/generators/graph/utils/serviceModels/getServiceModels.js +7 -7
  281. package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedGraphModelsForService.js +6 -6
  282. package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedGraphModelsForService.spec.js +13 -13
  283. package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedModelsForService.js +18 -21
  284. package/build/projectsGeneration/generators/graph/utils/serviceModels/getUsedModelsForService.spec.js +153 -153
  285. package/build/projectsGeneration/generators/graph/utils/serviceModels/prefixServiceModelsWithServiceName.js +25 -26
  286. package/build/projectsGeneration/generators/graph/utils/serviceModels/prefixServiceModelsWithServiceName.spec.js +69 -69
  287. package/build/projectsGeneration/generators/graph/utils/serviceModels/removeDublicatesFromServiceModels.js +4 -4
  288. package/build/projectsGeneration/generators/graph/utils/serviceModels/removeUnusedInOutputGeneralModels.js +6 -17
  289. package/build/projectsGeneration/generators/graph/utils/serviceModels/removeVoidsInServiceModels.js +5 -5
  290. package/build/projectsGeneration/generators/prisma/fieldIdTypeToPrismaType.js +3 -3
  291. package/build/projectsGeneration/generators/prisma/fieldTypeToPrismaType.js +3 -3
  292. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.js +3 -3
  293. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaDefault.spec.js +20 -20
  294. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaField.js +7 -8
  295. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.js +6 -7
  296. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaFieldFromExternalEntity.spec.js +7 -19
  297. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.js +10 -11
  298. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaIdField.spec.js +13 -13
  299. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.js +15 -18
  300. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaLinkFields.spec.js +27 -28
  301. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.js +12 -14
  302. package/build/projectsGeneration/generators/prisma/scheme/fields/genPrismaScalarField.spec.js +29 -30
  303. package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.js +23 -32
  304. package/build/projectsGeneration/generators/prisma/scheme/genPrismaEntity.spec.js +104 -47
  305. package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntities.js +5 -7
  306. package/build/projectsGeneration/generators/prisma/scheme/genPrismaSchemaForEntitiesWithClientAdnDb.js +19 -10
  307. package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNameToEditScalar.js +3 -3
  308. package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditField.js +7 -7
  309. package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditIdField.js +3 -3
  310. package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.js +5 -5
  311. package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditLinkField.spec.js +10 -10
  312. package/build/projectsGeneration/generators/ui/componentNames/edit/getCompNamesToEditScalarField.js +3 -3
  313. package/build/projectsGeneration/generators/ui/componentNames/show/getCompNameToShowScalar.js +3 -3
  314. package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowField.js +7 -7
  315. package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowIdField.js +3 -3
  316. package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.js +2 -14
  317. package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowLinkField.spec.js +17 -17
  318. package/build/projectsGeneration/generators/ui/componentNames/show/getCompNamesToShowScalarField.js +3 -3
  319. package/build/projectsGeneration/generators/ui/getLinkShowComponent.spec.js +18 -18
  320. package/build/projectsGeneration/generators/ui/getScalarShowComponent.spec.js +11 -11
  321. package/build/projectsGeneration/generators/ui/getShowComponent.js +19 -20
  322. package/build/projectsGeneration/links/getLinksFromExternalEntities.js +2 -4
  323. package/build/projectsGeneration/links/getLinksFromExternalEntities.spec.js +11 -22
  324. package/build/projectsGeneration/links/getLinksOfEntities.js +6 -8
  325. package/build/projectsGeneration/links/getLinksOfEntities.spec.js +20 -31
  326. package/build/projectsGeneration/links/getLinksToExternalEntities.js +2 -4
  327. package/build/projectsGeneration/links/getLinksToExternalEntities.spec.js +11 -22
  328. package/build/projectsGeneration/metaUtils.js +17 -23
  329. package/build/projectsGeneration/modelsGeneration.serialization.spec.js +8 -8
  330. package/build/projectsGeneration/modules/addEmailModuleEntities.js +11 -11
  331. package/build/projectsGeneration/types.js +6 -6
  332. package/build/projectsGeneration/utils.js +24 -61
  333. package/build/refs/yup.spec.js +7 -7
  334. package/build/types/projectsGeneration/builders/InfoRegistryBuilder.d.ts +0 -4
  335. package/build/types/projectsGeneration/builders/SumRegistryBuilder.d.ts +0 -3
  336. package/build/types/projectsGeneration/fileCleaners/cleanFiles.d.ts +1 -1
  337. package/build/types/projectsGeneration/generateProject.d.ts +0 -5
  338. package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/back.d.ts +1 -1
  339. package/build/types/projectsGeneration/generators/fileTemplates/back/environment/chart/templates/ingress.d.ts +1 -1
  340. package/build/types/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplBack.d.ts +1 -1
  341. package/build/types/projectsGeneration/generators/fileTemplates/back/environment/dockerfileTmplUI.d.ts +1 -1
  342. package/build/types/projectsGeneration/generators/fileTemplates/back/environment/src/integrationClients/IntegrationClient.d.ts +1 -1
  343. package/build/types/projectsGeneration/generators/fileTemplates/back/services/entity/config.d.ts +1 -1
  344. package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/front.d.ts +1 -1
  345. package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/chart/templates/ingress.d.ts +1 -1
  346. package/build/types/projectsGeneration/generators/fileTemplates/ui/environment/src/App.d.ts +1 -1
  347. package/build/utils/TermSignals.js +35 -43
  348. package/build/utils/cases.js +12 -18
  349. package/build/utils/getPkgManager.js +4 -4
  350. package/package.json +12 -24
  351. package/build/projectsGeneration/fileCleaners/back/cleanBack.js +0 -50
  352. package/build/types/projectsGeneration/fileCleaners/back/cleanBack.d.ts +0 -3
@@ -1,17 +1,97 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.uiDataProviderTmpl = void 0;
4
- var cases_1 = require("../../../../../../../utils/cases");
5
- var types_1 = require("../../../../../../types");
6
- var utils_1 = require("../../../../../../utils");
7
- var metaUtils_1 = require("../../../../../../metaUtils");
8
- var uiDataProviderTmpl = function (entities, options) {
9
- if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
10
- return "import buildGraphQLProvider, {buildQuery as buildQueryFactory} from 'ra-data-graphql-simple';\nimport {IntrospectionResult} from 'ra-data-graphql';\nimport {DELETE} from 'ra-core';\nimport gql from 'graphql-tag';\nimport {IntrospectionType, IntrospectionSchema} from 'graphql';\nimport {mapping} from '../adm/entityMapping';\nimport sch from '../generated/graphql.schema.json';\nimport {ApolloClient} from '@apollo/client';\nimport getCustomMethods from './getCustomMethods';\nimport getAdditionalMethods from './getAdditionalMethods';\nimport {DataProvider} from './types';\n".concat(options.skipWarningThisIsGenerated
11
- ? ''
12
- : "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst schema = sch.__schema;\n\nconst getGqlResource = (resource: string) => {\n if (resource in mapping) {\n return mapping[resource as keyof typeof mapping];\n } else {\n throw new Error(`Unknown resource ${resource}`);\n }\n};\n\nconst numberIdResources: string[] = [\n ").concat(entities
13
- .filter(function (m) { return (0, metaUtils_1.getKeyField)(m).type === 'bigint' || (0, metaUtils_1.getKeyField)(m).type === 'int'; })
14
- .map(function (m) { return "'".concat((0, cases_1.camel)(m.name), "',"); }).join("\n "), "\n];\n\nconst customBuildQuery = (introspection: IntrospectionResult) =>\n (fetchType: string, originalResource: string, params: any) => {\n const resource = getGqlResource(originalResource);\n\n const builtQuery = buildQueryFactory(introspection)(fetchType, resource, params);\n\n if (numberIdResources.includes(resource) && fetchType === 'GET_ONE' && 'id' in params) {\n params.id = Number.parseInt(params.id, 10);\n }\n\n if (resource === 'Command' && fetchType === 'GET_ONE') {\n return {\n // Use the default query variables and parseResponse\n ...builtQuery,\n\n // Override the query\n query: gql`\n query Command($id: ID!) {\n data: Command(id: $id) {\n id\n reference\n customer {\n id\n firstName\n lastName\n }\n }\n }\n `,\n };\n }\n\n return builtQuery;\n };\n\nexport default async (client: ApolloClient<unknown>): Promise<DataProvider> => {\n const baseDataProvider = await buildGraphQLProvider({\n buildQuery: customBuildQuery,\n client: client as any,\n introspection: {\n schema: schema as unknown as IntrospectionSchema,\n operationNames: {\n [DELETE]: (resource: IntrospectionType) =>\n `remove${resource.name}`,\n },\n },\n });\n\n return {\n ...baseDataProvider,\n ...getCustomMethods(client, baseDataProvider),\n ...getAdditionalMethods(client),\n };\n};\n");
15
- };
4
+ const cases_1 = require("../../../../../../../utils/cases");
5
+ const types_1 = require("../../../../../../types");
6
+ const utils_1 = require("../../../../../../utils");
7
+ const metaUtils_1 = require("../../../../../../metaUtils");
8
+ const uiDataProviderTmpl = (entities, options = types_1.defaultBootstrapEntityOptions) => `import buildGraphQLProvider, {buildQuery as buildQueryFactory} from 'ra-data-graphql-simple';
9
+ import {IntrospectionResult} from 'ra-data-graphql';
10
+ import {DELETE} from 'ra-core';
11
+ import gql from 'graphql-tag';
12
+ import {IntrospectionType, IntrospectionSchema} from 'graphql';
13
+ import {mapping} from '../adm/entityMapping';
14
+ import sch from '../generated/graphql.schema.json';
15
+ import {ApolloClient} from '@apollo/client';
16
+ import getCustomMethods from './getCustomMethods';
17
+ import getAdditionalMethods from './getAdditionalMethods';
18
+ import {DataProvider} from './types';
19
+ ${options.skipWarningThisIsGenerated
20
+ ? ''
21
+ : `
22
+ // ${utils_1.generatedWarning}
23
+ `}
24
+ const schema = sch.__schema;
25
+
26
+ const getGqlResource = (resource: string) => {
27
+ if (resource in mapping) {
28
+ return mapping[resource as keyof typeof mapping];
29
+ } else {
30
+ throw new Error(\`Unknown resource \${resource}\`);
31
+ }
32
+ };
33
+
34
+ const numberIdResources: string[] = [
35
+ ${entities
36
+ .filter((m) => (0, metaUtils_1.getKeyField)(m).type === 'bigint' || (0, metaUtils_1.getKeyField)(m).type === 'int')
37
+ .map((m) => `'${(0, cases_1.camel)(m.name)}',`).join(`
38
+ `)}
39
+ ];
40
+
41
+ const customBuildQuery = (introspection: IntrospectionResult) =>
42
+ (fetchType: string, originalResource: string, params: any) => {
43
+ const resource = getGqlResource(originalResource);
44
+
45
+ const builtQuery = buildQueryFactory(introspection)(fetchType, resource, params);
46
+
47
+ if (numberIdResources.includes(resource) && fetchType === 'GET_ONE' && 'id' in params) {
48
+ params.id = Number.parseInt(params.id, 10);
49
+ }
50
+
51
+ if (resource === 'Command' && fetchType === 'GET_ONE') {
52
+ return {
53
+ // Use the default query variables and parseResponse
54
+ ...builtQuery,
55
+
56
+ // Override the query
57
+ query: gql\`
58
+ query Command($id: ID!) {
59
+ data: Command(id: $id) {
60
+ id
61
+ reference
62
+ customer {
63
+ id
64
+ firstName
65
+ lastName
66
+ }
67
+ }
68
+ }
69
+ \`,
70
+ };
71
+ }
72
+
73
+ return builtQuery;
74
+ };
75
+
76
+ export default async (client: ApolloClient<unknown>): Promise<DataProvider> => {
77
+ const baseDataProvider = await buildGraphQLProvider({
78
+ buildQuery: customBuildQuery,
79
+ client: client as any,
80
+ introspection: {
81
+ schema: schema as unknown as IntrospectionSchema,
82
+ operationNames: {
83
+ [DELETE]: (resource: IntrospectionType) =>
84
+ \`remove\${resource.name}\`,
85
+ },
86
+ },
87
+ });
88
+
89
+ return {
90
+ ...baseDataProvider,
91
+ ...getCustomMethods(client, baseDataProvider),
92
+ ...getAdditionalMethods(client),
93
+ };
94
+ };
95
+ `;
16
96
  exports.uiDataProviderTmpl = uiDataProviderTmpl;
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9zcmMvZGF0YVByb3ZpZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDBEQUF3RDtBQUN4RCxpREFHZ0M7QUFFaEMsaURBQTBEO0FBQzFELHlEQUF5RDtBQUVsRCxJQUFNLGtCQUFrQixHQUFHLFVBQ2hDLFFBQWtCLEVBQ2xCLE9BQStEO0lBQS9ELHdCQUFBLEVBQUEsVUFBa0MscUNBQTZCO0lBQzVELE9BQUEsMGtCQVlILE9BQU8sQ0FBQywwQkFBMEI7UUFDaEMsQ0FBQyxDQUFDLEVBQUU7UUFDSixDQUFDLENBQUMsZUFDRCx3QkFBZ0IsT0FDcEIsMFNBYUcsUUFBUTtTQUNQLE1BQU0sQ0FDTCxVQUFDLENBQUMsSUFBSyxPQUFBLElBQUEsdUJBQVcsRUFBQyxDQUFDLENBQUMsQ0FBQyxJQUFJLEtBQUssUUFBUSxJQUFJLElBQ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DLENBQUMsQ0FBQyxDQUFDLElBQUksS0FBSyxLQUFLLENBQ3pFO0tBQ0EsR0FBRyxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxJQUFJLElBQUEsYUFBSyxFQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUMsSUFBSSxDQUFDO0dBQ3pDLENBQUM7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztDQXlESCxDQUFBO0FBOUZZLFFBQUEsa0JBQWtCLHNCQThGOUIifQ==
@@ -1,23 +1,55 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.uiI18nProviderTmpl = void 0;
4
- var types_1 = require("../../../../../../types");
5
- var utils_1 = require("../../../../../../utils");
6
- var uiI18nProviderTmpl = function (_a, options) {
7
- var _b = _a.system, defaultLanguage = _b.defaultLanguage, languages = _b.languages;
8
- if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
9
- return "import polyglotI18nProvider from 'ra-i18n-polyglot';\nimport {Locale} from 'ra-core';\nimport defaultMessages from '../i18n/".concat(defaultLanguage, "';\nimport log from '../utils/log';\nimport {ValidationMessages} from '../i18n/types';\nimport initYupLocale from './initYupLocale';\nimport {I18nProvider} from './types';\n").concat(options.skipWarningThisIsGenerated
10
- ? ''
11
- : "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst locales: Locale[] = [").concat(languages.map(function (_a) {
12
- var id = _a.id, title = _a.title;
13
- return "\n {locale: '".concat(id, "', name: '").concat(title, "'},");
14
- }).join(''), "\n];\n\nconst i18nProvider: I18nProvider = ({\n ...polyglotI18nProvider(\n locale => {\n switch (locale) {").concat(languages.filter(function (_a) {
15
- var id = _a.id;
16
- return id !== defaultLanguage;
17
- }).map(function (_a) {
18
- var id = _a.id;
19
- return "\n case '".concat(id, "':\n return import('../i18n/").concat(id, "')\n .then(messages => {\n initYupLocale(messages.default.validation as ValidationMessages);\n\n return messages.default;\n });");
20
- }).join(''), "\n case '").concat(defaultLanguage, "':\n initYupLocale(defaultMessages.validation as ValidationMessages);\n\n return defaultMessages;\n default:\n log.error(`Unknown locale: \"${locale}\"`);\n\n initYupLocale(defaultMessages.validation as ValidationMessages);\n\n return defaultMessages;\n }\n },\n '").concat(defaultLanguage, "',\n locales,\n {allowMissing: true}, // turned off notifications about missing keys\n ),\n locales,\n});\n\nexport default i18nProvider;\n");
21
- };
4
+ const types_1 = require("../../../../../../types");
5
+ const utils_1 = require("../../../../../../utils");
6
+ const uiI18nProviderTmpl = ({ system: { defaultLanguage, languages } }, options = types_1.defaultBootstrapEntityOptions) => `import polyglotI18nProvider from 'ra-i18n-polyglot';
7
+ import {Locale} from 'ra-core';
8
+ import defaultMessages from '../i18n/${defaultLanguage}';
9
+ import log from '../utils/log';
10
+ import {ValidationMessages} from '../i18n/types';
11
+ import initYupLocale from './initYupLocale';
12
+ import {I18nProvider} from './types';
13
+ ${options.skipWarningThisIsGenerated
14
+ ? ''
15
+ : `
16
+ // ${utils_1.generatedWarning}
17
+ `}
18
+ const locales: Locale[] = [${languages.map(({ id, title }) => `
19
+ {locale: '${id}', name: '${title}'},`).join('')}
20
+ ];
21
+
22
+ const i18nProvider: I18nProvider = ({
23
+ ...polyglotI18nProvider(
24
+ locale => {
25
+ switch (locale) {${languages.filter(({ id }) => id !== defaultLanguage).map(({ id }) => `
26
+ case '${id}':
27
+ return import('../i18n/${id}')
28
+ .then(messages => {
29
+ initYupLocale(messages.default.validation as ValidationMessages);
30
+
31
+ return messages.default;
32
+ });`).join('')}
33
+ case '${defaultLanguage}':
34
+ initYupLocale(defaultMessages.validation as ValidationMessages);
35
+
36
+ return defaultMessages;
37
+ default:
38
+ log.error(\`Unknown locale: "\${locale}"\`);
39
+
40
+ initYupLocale(defaultMessages.validation as ValidationMessages);
41
+
42
+ return defaultMessages;
43
+ }
44
+ },
45
+ '${defaultLanguage}',
46
+ locales,
47
+ {allowMissing: true}, // turned off notifications about missing keys
48
+ ),
49
+ locales,
50
+ });
51
+
52
+ export default i18nProvider;
53
+ `;
22
54
  exports.uiI18nProviderTmpl = uiI18nProviderTmpl;
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9lbnZpcm9ubWVudC9zcmMvaTE4blByb3ZpZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLGlEQUdnQztBQUNoQyxpREFBMEQ7QUFFbkQsSUFBTSxrQkFBa0IsR0FBRyxVQUNoQyxFQUFxRSxFQUNyRSxPQUErRDtRQUQ3RCxjQUFzQyxFQUE1QixlQUFlLHFCQUFBLEVBQUUsU0FBUyxlQUFBO0lBQ3RDLHdCQUFBLEVBQUEsVUFBa0MscUNBQTZCO0lBQzVELE9BQUEsc0lBRWtDLGVBQWUsMExBTXBELE9BQU8sQ0FBQywwQkFBMEI7UUFDaEMsQ0FBQyxDQUFDLEVBQUU7UUFDSixDQUFDLENBQUMsZUFDRCx3QkFBZ0IsT0FDcEIsMENBRTRCLFNBQVMsQ0FBQyxHQUFHLENBQUMsVUFBQyxFQUFXO1lBQVYsRUFBRSxRQUFBLEVBQUUsS0FBSyxXQUFBO1FBQU0sT0FBQSx3QkFDOUMsRUFBRSx1QkFBYSxLQUFLLFFBQUs7SUFEcUIsQ0FDckIsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUMsZ0lBTXhCLFNBQVMsQ0FBQyxNQUFNLENBQUMsVUFBQyxFQUFJO1lBQUgsRUFBRSxRQUFBO1FBQU0sT0FBQSxFQUFFLEtBQU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EVBQUUsQ0FBQzs7Ozs7O3lCQU14QixTQUFTLENBQUMsTUFBTSxDQUFDLENBQUMsRUFBQyxFQUFFLEVBQUMsRUFBRSxFQUFFLENBQUMsRUFBRSxLQUFLLGVBQWUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQUMsRUFBRSxFQUFDLEVBQUUsRUFBRSxDQUFDO2dCQUMxRSxFQUFFO21DQUNpQixFQUFFOzs7OztnQkFLckIsQ0FBQyxDQUFDLElBQUksQ0FBQyxFQUFFLENBQUM7Z0JBQ1YsZUFBZTs7Ozs7Ozs7Ozs7O09BWXhCLGVBQWU7Ozs7Ozs7O0NBUXJCLENBQUE7QUFwRFksUUFBQSxrQkFBa0Isc0JBb0Q5QiJ9
@@ -1,13 +1,64 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.uiLayoutAppBarTmpl = void 0;
4
- var types_1 = require("../../../../../../types");
5
- var utils_1 = require("../../../../../../utils");
6
- var uiLayoutAppBarTmpl = function (options) {
7
- if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
8
- return "import * as React from 'react';\nimport {AppBar as RaAppBar} from 'react-admin';\nimport {Box, Typography} from '@mui/material';\nimport {Link} from 'react-router-dom';\nimport UserMenu from './UserMenu/UserMenu';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport {Theme} from '@mui/system';\n".concat(options.skipWarningThisIsGenerated
9
- ? ''
10
- : "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst AppBar = (props: any) => {\n const wide = useMediaQuery((theme: Theme) => theme.breakpoints.up('sm'));\n\n return (\n <RaAppBar\n sx={{\n '& .RaAppBar-title': {\n flex: 1,\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n },\n }}\n {...props}\n elevation={1}\n color='secondary'\n userMenu={<UserMenu />}\n >\n <Typography\n variant='h6'\n color='inherit'\n id='react-admin-title'\n />\n <Box flex={1} />\n {wide && (\n <Typography\n sx={{color: ").concat(options.mainColorOfAppTitile ? "'primary.main'" : "'text.main'", "}}\n color='inherit'\n variant='h6'\n >\n <Link\n to='/'\n style={{textDecoration: 'none', color: 'inherit'}}\n >\n ").concat(options.projectName, "\n </Link>\n </Typography>\n )}\n <Box flex={1} />\n </RaAppBar>\n );\n};\n\nexport default AppBar;\n");
11
- };
4
+ const types_1 = require("../../../../../../types");
5
+ const utils_1 = require("../../../../../../utils");
6
+ const uiLayoutAppBarTmpl = (options = types_1.defaultBootstrapEntityOptions) => `import * as React from 'react';
7
+ import {AppBar as RaAppBar} from 'react-admin';
8
+ import {Box, Typography} from '@mui/material';
9
+ import {Link} from 'react-router-dom';
10
+ import UserMenu from './UserMenu/UserMenu';
11
+ import useMediaQuery from '@mui/material/useMediaQuery';
12
+ import {Theme} from '@mui/system';
13
+ ${options.skipWarningThisIsGenerated
14
+ ? ''
15
+ : `
16
+ // ${utils_1.generatedWarning}
17
+ `}
18
+ const AppBar = (props: any) => {
19
+ const wide = useMediaQuery((theme: Theme) => theme.breakpoints.up('sm'));
20
+
21
+ return (
22
+ <RaAppBar
23
+ sx={{
24
+ '& .RaAppBar-title': {
25
+ flex: 1,
26
+ textOverflow: 'ellipsis',
27
+ whiteSpace: 'nowrap',
28
+ overflow: 'hidden',
29
+ },
30
+ }}
31
+ {...props}
32
+ elevation={1}
33
+ color='secondary'
34
+ userMenu={<UserMenu />}
35
+ >
36
+ <Typography
37
+ variant='h6'
38
+ color='inherit'
39
+ id='react-admin-title'
40
+ />
41
+ <Box flex={1} />
42
+ {wide && (
43
+ <Typography
44
+ sx={{color: ${options.mainColorOfAppTitile ? `'primary.main'` : `'text.main'`}}}
45
+ color='inherit'
46
+ variant='h6'
47
+ >
48
+ <Link
49
+ to='/'
50
+ style={{textDecoration: 'none', color: 'inherit'}}
51
+ >
52
+ ${options.projectName}
53
+ </Link>
54
+ </Typography>
55
+ )}
56
+ <Box flex={1} />
57
+ </RaAppBar>
58
+ );
59
+ };
60
+
61
+ export default AppBar;
62
+ `;
12
63
  exports.uiLayoutAppBarTmpl = uiLayoutAppBarTmpl;
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwQmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZW52aXJvbm1lbnQvc3JjL2xheW91dC9BcHBCYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaURBR2dDO0FBQ2hDLGlEQUEwRDtBQUVuRCxJQUFNLGtCQUFrQixHQUFHLFVBQ2hDLE9BQStEO0lBQS9ELHdCQUFBLEVBQUEsVUFBa0MscUNBQTZCO0lBQzVELE9BQUEsK1RBUUgsT0FBTyxDQUFDLDBCQUEwQjtRQUNoQyxDQUFDLENBQUMsRUFBRTtRQUNKLENBQUMsQ0FBQyxlQUNELHdCQUFnQixPQUNwQiw4bkJBNEJ1QixPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FBQyxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQyxhQUFhLDZNQVF6RSxPQUFPLENBQUMsV0FBVyx3SUFVaEM7QUExREksQ0EwREosQ0FBQTtBQTVEWSxRQUFBLGtCQUFrQixzQkE0RDlCIn0=
64
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwQmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZW52aXJvbm1lbnQvc3JjL2xheW91dC9BcHBCYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsbURBR2dDO0FBQ2hDLG1EQUEwRDtBQUVuRCxNQUFNLGtCQUFrQixHQUFHLENBQ2hDLFVBQWtDLHFDQUE2QixFQUMvRCxFQUFFLENBQUM7Ozs7Ozs7RUFRSCxPQUFPLENBQUMsMEJBQTBCO0lBQ2hDLENBQUMsQ0FBQyxFQUFFO0lBQ0osQ0FBQyxDQUFDO0tBQ0Qsd0JBQWdCO0NBRXJCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7d0JBMkJ3QixPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FBQyxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQyxhQUFhOzs7Ozs7OztjQVF6RSxPQUFPLENBQUMsV0FBVzs7Ozs7Ozs7OztDQVVoQyxDQUFBO0FBNURZLFFBQUEsa0JBQWtCLHNCQTREOUIifQ==
@@ -1,13 +1,56 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.uiLayoutMenuTmpl = void 0;
4
- var types_1 = require("../../../../../../types");
5
- var utils_1 = require("../../../../../../utils");
6
- var uiLayoutMenuTmpl = function (options) {
7
- if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
8
- return "import * as React from 'react';\nimport Box from '@mui/material/Box';\nimport {hasPermission} from '../utils/permissions';\nimport {\n DashboardMenuItem,\n useSidebarState,\n usePermissions,\n} from 'react-admin';\nimport getAdditionalMenu from '../adm/getAdditionalMenu';\nimport defaultMenu from '../adm/getDefaultMenu';\nimport MenuItem from '../uiLib/menu/MenuItem';\n".concat(options.skipWarningThisIsGenerated
9
- ? ''
10
- : "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst Menu = () => {\n const [open] = useSidebarState();\n const {permissions} = usePermissions<string[]>();\n\n const menuData = [\n ...getAdditionalMenu(),\n ...defaultMenu(),\n ];\n\n return (\n <Box\n sx={{\n width: open ? undefined : 50,\n marginTop: 1,\n marginBottom: 1,\n transition: theme =>\n theme.transitions.create('width', {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n }}\n >\n {hasPermission(permissions, 'dashboards.main') && <DashboardMenuItem />}\n {menuData.map((d, i) => (<MenuItem\n key={i}\n {...d}\n />))}\n </Box>\n );\n};\n\nexport default Menu;\n");
11
- };
4
+ const types_1 = require("../../../../../../types");
5
+ const utils_1 = require("../../../../../../utils");
6
+ const uiLayoutMenuTmpl = (options = types_1.defaultBootstrapEntityOptions) => `import * as React from 'react';
7
+ import Box from '@mui/material/Box';
8
+ import {hasPermission} from '../utils/permissions';
9
+ import {
10
+ DashboardMenuItem,
11
+ useSidebarState,
12
+ usePermissions,
13
+ } from 'react-admin';
14
+ import getAdditionalMenu from '../adm/getAdditionalMenu';
15
+ import defaultMenu from '../adm/getDefaultMenu';
16
+ import MenuItem from '../uiLib/menu/MenuItem';
17
+ ${options.skipWarningThisIsGenerated
18
+ ? ''
19
+ : `
20
+ // ${utils_1.generatedWarning}
21
+ `}
22
+ const Menu = () => {
23
+ const [open] = useSidebarState();
24
+ const {permissions} = usePermissions<string[]>();
25
+
26
+ const menuData = [
27
+ ...getAdditionalMenu(),
28
+ ...defaultMenu(),
29
+ ];
30
+
31
+ return (
32
+ <Box
33
+ sx={{
34
+ width: open ? undefined : 50,
35
+ marginTop: 1,
36
+ marginBottom: 1,
37
+ transition: theme =>
38
+ theme.transitions.create('width', {
39
+ easing: theme.transitions.easing.sharp,
40
+ duration: theme.transitions.duration.leavingScreen,
41
+ }),
42
+ }}
43
+ >
44
+ {hasPermission(permissions, 'dashboards.main') && <DashboardMenuItem />}
45
+ {menuData.map((d, i) => (<MenuItem
46
+ key={i}
47
+ {...d}
48
+ />))}
49
+ </Box>
50
+ );
51
+ };
52
+
53
+ export default Menu;
54
+ `;
12
55
  exports.uiLayoutMenuTmpl = uiLayoutMenuTmpl;
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWVudS5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0NBRXJCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Q0FpQ0MsQ0FBQTtBQXBEWSxRQUFBLGdCQUFnQixvQkFvRDVCIn0=
@@ -1,12 +1,41 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- var change_case_1 = require("change-case");
4
- var utils_1 = require("../../../../../utils");
5
- var uiRoutesTmpl = function (_a) {
6
- var system = _a.system, options = _a.options;
7
- return "import * as React from 'react';\nimport {\n Route,\n} from 'react-router-dom';\nimport Loadable from '../shared/Loadable';\nimport Guard from '../raUiLib/Guard';\nimport additionalRoutes from './additionalRoutes';\n".concat(options.skipWarningThisIsGenerated
8
- ? ''
9
- : "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst LoadableDashboard = Loadable(() => import('./Dashboard'));\nconst LoadableFunctions = Loadable(() => import('./functions/Functions'));\n// const LoadableResourcesPage = Loadable(() => import('./ResourcesPage'));\nconst LoadableMetaPage = Loadable(() => import('./MetaPage'));\nconst LoadableDebugPage = Loadable(() => import('./utility/DebugPage'));\nconst LoadableErrorMessage = Loadable(() => import('./utility/ErrorMessage'));").concat(system.pages.length ? "\n".concat(system.pages.map(function (p) { return "const Loadable".concat((0, change_case_1.pascalCase)(p.name), " = Loadable(() => import('./standalonePages/").concat((0, change_case_1.pascalCase)(p.name), "/").concat((0, change_case_1.pascalCase)(p.name), "'));"); }).join('\n')) : '', "\n\nexport const routes = [\n <Route element={<Guard shouldHave='dashboard'><LoadableDashboard /></Guard>} key='dashboard' path='/dashboard' />,\n <Route element={<Guard shouldHave='functions'><LoadableFunctions /></Guard>} key='functions' path='/functions' />,\n // <Route element={<Guard shouldHave='resources'><LoadableResourcesPage /></Guard>} key='resources' path='/resources' />,\n <Route element={<Guard shouldHave='meta'><LoadableMetaPage /></Guard>} key='meta' path='/meta' />,\n <Route element={<Guard shouldHave='debug'><LoadableDebugPage /></Guard>} key='debug' path='/debug' />,\n <Route\n element={<LoadableErrorMessage />}\n key='errorMessage'\n path='/errorMessage'\n />,\n").concat(system.pages.map(function (p) { return " <Route element={<Loadable".concat((0, change_case_1.pascalCase)(p.name), " />} key='").concat(p.name, "' path='").concat(p.link, "' />,"); }).join('\n'), "\n ...additionalRoutes,\n];\n");
10
- };
3
+ const change_case_1 = require("change-case");
4
+ const utils_1 = require("../../../../../utils");
5
+ const uiRoutesTmpl = ({ system, options, }) => `import * as React from 'react';
6
+ import {
7
+ Route,
8
+ } from 'react-router-dom';
9
+ import Loadable from '../shared/Loadable';
10
+ import Guard from '../raUiLib/Guard';
11
+ import additionalRoutes from './additionalRoutes';
12
+ ${options.skipWarningThisIsGenerated
13
+ ? ''
14
+ : `
15
+ // ${utils_1.generatedWarning}
16
+ `}
17
+ const LoadableDashboard = Loadable(() => import('./Dashboard'));
18
+ const LoadableFunctions = Loadable(() => import('./functions/Functions'));
19
+ // const LoadableResourcesPage = Loadable(() => import('./ResourcesPage'));
20
+ const LoadableMetaPage = Loadable(() => import('./MetaPage'));
21
+ const LoadableDebugPage = Loadable(() => import('./utility/DebugPage'));
22
+ const LoadableErrorMessage = Loadable(() => import('./utility/ErrorMessage'));${system.pages.length ? `
23
+ ${system.pages.map(p => `const Loadable${(0, change_case_1.pascalCase)(p.name)} = Loadable(() => import('./standalonePages/${(0, change_case_1.pascalCase)(p.name)}/${(0, change_case_1.pascalCase)(p.name)}'));`).join('\n')}` : ''}
24
+
25
+ export const routes = [
26
+ <Route element={<Guard shouldHave='dashboard'><LoadableDashboard /></Guard>} key='dashboard' path='/dashboard' />,
27
+ <Route element={<Guard shouldHave='functions'><LoadableFunctions /></Guard>} key='functions' path='/functions' />,
28
+ // <Route element={<Guard shouldHave='resources'><LoadableResourcesPage /></Guard>} key='resources' path='/resources' />,
29
+ <Route element={<Guard shouldHave='meta'><LoadableMetaPage /></Guard>} key='meta' path='/meta' />,
30
+ <Route element={<Guard shouldHave='debug'><LoadableDebugPage /></Guard>} key='debug' path='/debug' />,
31
+ <Route
32
+ element={<LoadableErrorMessage />}
33
+ key='errorMessage'
34
+ path='/errorMessage'
35
+ />,
36
+ ${system.pages.map(p => ` <Route element={<Loadable${(0, change_case_1.pascalCase)(p.name)} />} key='${p.name}' path='${p.link}' />,`).join('\n')}
37
+ ...additionalRoutes,
38
+ ];
39
+ `;
11
40
  exports.default = uiRoutesTmpl;
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjL3Byb2plY3RzR2VuZXJhdGlvbi9nZW5lcmF0b3JzL2ZpbGVUZW1wbGF0ZXMvdWkvZW52aXJvbm1lbnQvc3JjL3JvdXRlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDJDQUF3QztBQUV4Qyw4Q0FBdUQ7QUFFdkQsSUFBTSxZQUFZLEdBQUcsVUFBQyxFQUdNO1FBRjFCLE1BQU0sWUFBQSxFQUNOLE9BQU8sYUFBQTtJQUN3QixPQUFBLGtPQVEvQixPQUFPLENBQUMsMEJBQTBCO1FBQ2hDLENBQUMsQ0FBQyxFQUFFO1FBQ0osQ0FBQyxDQUFDLGVBQ0Qsd0JBQWdCLE9BQ3BCLGtjQU8rRSxNQUFNLENBQUMsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsWUFDcEcsTUFBTSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsVUFBQSxDQUFDLElBQUksT0FBQSx3QkFBaUIsSUFBQSx3QkFBVSxFQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMseURBQStDLElBQUEsd0JBQVUsRUFBQyxDQUFDLENBQUMsSUFBSSxDQUFDLGNBQUksSUFBQSx3QkFBVSxFQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsU0FBTSxFQUFoSSxDQUFnSSxDQUFDLENBQUMsSU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JQUFBLHdCQUFVLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQywrQ0FBK0MsSUFBQSx3QkFBVSxFQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxJQUFBLHdCQUFVLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsRUFBRTs7Ozs7Ozs7Ozs7OztFQWF6SyxNQUFNLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLDhCQUE4QixJQUFBLHdCQUFVLEVBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQyxJQUFJLFdBQVcsQ0FBQyxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQzs7O0NBRzlILENBQUE7QUFFRCxrQkFBZSxZQUFZLENBQUEifQ==
@@ -1,13 +1,66 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.uiFunctionsTmpl = void 0;
4
- var types_1 = require("../../../../types");
5
- var utils_1 = require("../../../../utils");
6
- var uiFunctionsTmpl = function (options) {
7
- if (options === void 0) { options = types_1.defaultBootstrapEntityOptions; }
8
- return "import React, {\n useCallback,\n useState,\n ChangeEvent,\n} from 'react';\nimport {Typography, TextField, IconButton} from '@mui/material';\nimport SendIcon from '@mui/icons-material/SendOutlined';\nimport {\n gql, useLazyQuery,\n} from '@apollo/client';\n".concat(options.skipWarningThisIsGenerated
4
+ const types_1 = require("../../../../types");
5
+ const utils_1 = require("../../../../utils");
6
+ const uiFunctionsTmpl = (options = types_1.defaultBootstrapEntityOptions) => {
7
+ return `import React, {
8
+ useCallback,
9
+ useState,
10
+ ChangeEvent,
11
+ } from 'react';
12
+ import {Typography, TextField, IconButton} from '@mui/material';
13
+ import SendIcon from '@mui/icons-material/SendOutlined';
14
+ import {
15
+ gql, useLazyQuery,
16
+ } from '@apollo/client';
17
+ ${options.skipWarningThisIsGenerated
9
18
  ? ''
10
- : "\n// ".concat(utils_1.generatedWarning, "\n"), "\nconst HELLO = gql`\n query testHello($name: String!) {\n testHello(name: $name)\n }\n`;\n\nexport default () => {\n const [name, setName] = useState('');\n\n const onNameChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n setName(e.target.value);\n },\n [setName],\n );\n\n const [hello, {data}] = useLazyQuery(HELLO);\n\n const onClick = useCallback(() => hello({variables: {name}}), [hello, name]);\n\n return (\n <div>\n <div style={{height: '7em'}}>\n <Typography >\n Hello\n </Typography>\n <TextField\n label='Name'\n onChange={onNameChange}\n value={name}\n />\n <IconButton\n onClick={onClick}\n >\n <SendIcon />\n </IconButton>\n data: {JSON.stringify(data, undefined, ' ')}\n </div>\n </div>\n );\n};\n");
19
+ : `
20
+ // ${utils_1.generatedWarning}
21
+ `}
22
+ const HELLO = gql\`
23
+ query testHello($name: String!) {
24
+ testHello(name: $name)
25
+ }
26
+ \`;
27
+
28
+ export default () => {
29
+ const [name, setName] = useState('');
30
+
31
+ const onNameChange = useCallback(
32
+ (e: ChangeEvent<HTMLInputElement>) => {
33
+ setName(e.target.value);
34
+ },
35
+ [setName],
36
+ );
37
+
38
+ const [hello, {data}] = useLazyQuery(HELLO);
39
+
40
+ const onClick = useCallback(() => hello({variables: {name}}), [hello, name]);
41
+
42
+ return (
43
+ <div>
44
+ <div style={{height: '7em'}}>
45
+ <Typography >
46
+ Hello
47
+ </Typography>
48
+ <TextField
49
+ label='Name'
50
+ onChange={onNameChange}
51
+ value={name}
52
+ />
53
+ <IconButton
54
+ onClick={onClick}
55
+ >
56
+ <SendIcon />
57
+ </IconButton>
58
+ data: {JSON.stringify(data, undefined, ' ')}
59
+ </div>
60
+ </div>
61
+ );
62
+ };
63
+ `;
11
64
  };
12
65
  exports.uiFunctionsTmpl = uiFunctionsTmpl;
13
- //#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M7S0FDRCx3QkFBZ0I7Q0FFckI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztDQTBDQyxDQUFBO0FBQ0QsQ0FBQyxDQUFBO0FBOURZLFFBQUEsZUFBZSxtQkE4RDNCIn0=
@@ -1,6 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.uiGetAdditionalMenuTmpl = void 0;
4
- var uiGetAdditionalMenuTmpl = function () { return "import {MenuElement} from '../uiLib/menu/MenuItem';\n\nconst getAdditionalMenu = () => {\n const menuData: MenuElement[] = [];\n\n return menuData;\n};\n\nexport default getAdditionalMenu;\n"; };
4
+ const uiGetAdditionalMenuTmpl = () => `import {MenuElement} from '../uiLib/menu/MenuItem';
5
+
6
+ const getAdditionalMenu = () => {
7
+ const menuData: MenuElement[] = [];
8
+
9
+ return menuData;
10
+ };
11
+
12
+ export default getAdditionalMenu;
13
+ `;
5
14
  exports.uiGetAdditionalMenuTmpl = uiGetAdditionalMenuTmpl;
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0QWRkaXRpb25hbE1lbnUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9nZXRBZGRpdGlvbmFsTWVudS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBTyxJQUFNLHVCQUF1QixHQUNsQyxjQUFNLE9BQUEsa01BU1AsRUFUTyxDQVNQLENBQUE7QUFWWSxRQUFBLHVCQUF1QiwyQkFVbkMifQ==
15
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0QWRkaXRpb25hbE1lbnUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvcHJvamVjdHNHZW5lcmF0aW9uL2dlbmVyYXRvcnMvZmlsZVRlbXBsYXRlcy91aS9nZXRBZGRpdGlvbmFsTWVudS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBTyxNQUFNLHVCQUF1QixHQUNsQyxHQUFHLEVBQUUsQ0FBQzs7Ozs7Ozs7O0NBU1AsQ0FBQTtBQVZZLFFBQUEsdUJBQXVCLDJCQVVuQyJ9