@cratis/scene.blueprint.components 0.1.0

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 (332) hide show
  1. package/.storybook/main.ts +61 -0
  2. package/.storybook/preview.tsx +42 -0
  3. package/BorrowedComponentName.ts +22 -0
  4. package/ComponentName.ts +27 -0
  5. package/CompositeName.ts +97 -0
  6. package/README.md +40 -0
  7. package/componentsBlueprint.ts +72 -0
  8. package/componentsBlueprintComponents.ts +23 -0
  9. package/dist/cjs/BorrowedComponentName.js +25 -0
  10. package/dist/cjs/BorrowedComponentName.js.map +1 -0
  11. package/dist/cjs/ComponentName.js +30 -0
  12. package/dist/cjs/ComponentName.js.map +1 -0
  13. package/dist/cjs/CompositeName.js +52 -0
  14. package/dist/cjs/CompositeName.js.map +1 -0
  15. package/dist/cjs/componentsBlueprint.js +93 -0
  16. package/dist/cjs/componentsBlueprint.js.map +1 -0
  17. package/dist/cjs/componentsBlueprintComponents.js +27 -0
  18. package/dist/cjs/componentsBlueprintComponents.js.map +1 -0
  19. package/dist/cjs/gallery/DialogTemplatePreview.js +46 -0
  20. package/dist/cjs/gallery/DialogTemplatePreview.js.map +1 -0
  21. package/dist/cjs/gallery/GalleryScreenPreview.js +65 -0
  22. package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -0
  23. package/dist/cjs/gallery/applicationChrome.js +137 -0
  24. package/dist/cjs/gallery/applicationChrome.js.map +1 -0
  25. package/dist/cjs/gallery/navigation.js +128 -0
  26. package/dist/cjs/gallery/navigation.js.map +1 -0
  27. package/dist/cjs/gallery/previewProfile.js +87 -0
  28. package/dist/cjs/gallery/previewProfile.js.map +1 -0
  29. package/dist/cjs/gallery/screens.js +80 -0
  30. package/dist/cjs/gallery/screens.js.map +1 -0
  31. package/dist/cjs/header/ArcPageHeader.js +65 -0
  32. package/dist/cjs/header/ArcPageHeader.js.map +1 -0
  33. package/dist/cjs/header/deriveArcHeading.js +51 -0
  34. package/dist/cjs/header/deriveArcHeading.js.map +1 -0
  35. package/dist/cjs/header/humanizeBindingName.js +36 -0
  36. package/dist/cjs/header/humanizeBindingName.js.map +1 -0
  37. package/dist/cjs/index.js +119 -0
  38. package/dist/cjs/index.js.map +1 -0
  39. package/dist/cjs/package.json +3 -0
  40. package/dist/cjs/packageName.js +15 -0
  41. package/dist/cjs/packageName.js.map +1 -0
  42. package/dist/cjs/templates/SampleBindingName.js +39 -0
  43. package/dist/cjs/templates/SampleBindingName.js.map +1 -0
  44. package/dist/cjs/templates/commandTemplates.js +82 -0
  45. package/dist/cjs/templates/commandTemplates.js.map +1 -0
  46. package/dist/cjs/templates/dataElements.js +131 -0
  47. package/dist/cjs/templates/dataElements.js.map +1 -0
  48. package/dist/cjs/templates/dialogElements.js +69 -0
  49. package/dist/cjs/templates/dialogElements.js.map +1 -0
  50. package/dist/cjs/templates/dialogTemplates.js +118 -0
  51. package/dist/cjs/templates/dialogTemplates.js.map +1 -0
  52. package/dist/cjs/templates/editorElements.js +81 -0
  53. package/dist/cjs/templates/editorElements.js.map +1 -0
  54. package/dist/cjs/templates/editorTemplates.js +172 -0
  55. package/dist/cjs/templates/editorTemplates.js.map +1 -0
  56. package/dist/cjs/templates/elements.js +101 -0
  57. package/dist/cjs/templates/elements.js.map +1 -0
  58. package/dist/cjs/templates/formElements.js +77 -0
  59. package/dist/cjs/templates/formElements.js.map +1 -0
  60. package/dist/cjs/templates/listTemplates.js +187 -0
  61. package/dist/cjs/templates/listTemplates.js.map +1 -0
  62. package/dist/cjs/templates/nesting.js +150 -0
  63. package/dist/cjs/templates/nesting.js.map +1 -0
  64. package/dist/cjs/templates/sampleData.js +141 -0
  65. package/dist/cjs/templates/sampleData.js.map +1 -0
  66. package/dist/cjs/templates/screenTemplates.js +41 -0
  67. package/dist/cjs/templates/screenTemplates.js.map +1 -0
  68. package/dist/cjs/templates/workspaceTemplates.js +212 -0
  69. package/dist/cjs/templates/workspaceTemplates.js.map +1 -0
  70. package/dist/esm/BorrowedComponentName.d.ts +4 -0
  71. package/dist/esm/BorrowedComponentName.d.ts.map +1 -0
  72. package/dist/esm/BorrowedComponentName.js +23 -0
  73. package/dist/esm/BorrowedComponentName.js.map +1 -0
  74. package/dist/esm/ComponentName.d.ts +4 -0
  75. package/dist/esm/ComponentName.d.ts.map +1 -0
  76. package/dist/esm/ComponentName.js +28 -0
  77. package/dist/esm/ComponentName.js.map +1 -0
  78. package/dist/esm/CompositeName.d.ts +28 -0
  79. package/dist/esm/CompositeName.d.ts.map +1 -0
  80. package/dist/esm/CompositeName.js +50 -0
  81. package/dist/esm/CompositeName.js.map +1 -0
  82. package/dist/esm/componentsBlueprint.d.ts +5 -0
  83. package/dist/esm/componentsBlueprint.d.ts.map +1 -0
  84. package/dist/esm/componentsBlueprint.js +90 -0
  85. package/dist/esm/componentsBlueprint.js.map +1 -0
  86. package/dist/esm/componentsBlueprintComponents.d.ts +3 -0
  87. package/dist/esm/componentsBlueprintComponents.d.ts.map +1 -0
  88. package/dist/esm/componentsBlueprintComponents.js +25 -0
  89. package/dist/esm/componentsBlueprintComponents.js.map +1 -0
  90. package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.d.ts +2 -0
  91. package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.d.ts.map +1 -0
  92. package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.js +57 -0
  93. package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.js.map +1 -0
  94. package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.d.ts +2 -0
  95. package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.d.ts.map +1 -0
  96. package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.js +26 -0
  97. package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.js.map +1 -0
  98. package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.d.ts +2 -0
  99. package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.d.ts.map +1 -0
  100. package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.js +65 -0
  101. package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.js.map +1 -0
  102. package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.d.ts +2 -0
  103. package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.d.ts.map +1 -0
  104. package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.js +41 -0
  105. package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.js.map +1 -0
  106. package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts +2 -0
  107. package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts.map +1 -0
  108. package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.js +38 -0
  109. package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.js.map +1 -0
  110. package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts +2 -0
  111. package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts.map +1 -0
  112. package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js +47 -0
  113. package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js.map +1 -0
  114. package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.d.ts +2 -0
  115. package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.d.ts.map +1 -0
  116. package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.js +56 -0
  117. package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.js.map +1 -0
  118. package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.d.ts +2 -0
  119. package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.d.ts.map +1 -0
  120. package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.js +31 -0
  121. package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.js.map +1 -0
  122. package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.d.ts +2 -0
  123. package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.d.ts.map +1 -0
  124. package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.js +54 -0
  125. package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.js.map +1 -0
  126. package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.d.ts +2 -0
  127. package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.d.ts.map +1 -0
  128. package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.js +27 -0
  129. package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.js.map +1 -0
  130. package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.d.ts +2 -0
  131. package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.d.ts.map +1 -0
  132. package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.js +18 -0
  133. package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.js.map +1 -0
  134. package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.d.ts +2 -0
  135. package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.d.ts.map +1 -0
  136. package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.js +26 -0
  137. package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.js.map +1 -0
  138. package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.d.ts +2 -0
  139. package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.d.ts.map +1 -0
  140. package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.js +25 -0
  141. package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.js.map +1 -0
  142. package/dist/esm/gallery/ArcPages.stories.d.ts +30 -0
  143. package/dist/esm/gallery/ArcPages.stories.d.ts.map +1 -0
  144. package/dist/esm/gallery/ArcPages.stories.js +34 -0
  145. package/dist/esm/gallery/ArcPages.stories.js.map +1 -0
  146. package/dist/esm/gallery/Bindings.stories.d.ts +22 -0
  147. package/dist/esm/gallery/Bindings.stories.d.ts.map +1 -0
  148. package/dist/esm/gallery/Bindings.stories.js +78 -0
  149. package/dist/esm/gallery/Bindings.stories.js.map +1 -0
  150. package/dist/esm/gallery/DialogTemplatePreview.d.ts +7 -0
  151. package/dist/esm/gallery/DialogTemplatePreview.d.ts.map +1 -0
  152. package/dist/esm/gallery/DialogTemplatePreview.js +44 -0
  153. package/dist/esm/gallery/DialogTemplatePreview.js.map +1 -0
  154. package/dist/esm/gallery/DialogTemplates.stories.d.ts +21 -0
  155. package/dist/esm/gallery/DialogTemplates.stories.d.ts.map +1 -0
  156. package/dist/esm/gallery/DialogTemplates.stories.js +23 -0
  157. package/dist/esm/gallery/DialogTemplates.stories.js.map +1 -0
  158. package/dist/esm/gallery/GalleryScreenPreview.d.ts +10 -0
  159. package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -0
  160. package/dist/esm/gallery/GalleryScreenPreview.js +62 -0
  161. package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -0
  162. package/dist/esm/gallery/applicationChrome.d.ts +3 -0
  163. package/dist/esm/gallery/applicationChrome.d.ts.map +1 -0
  164. package/dist/esm/gallery/applicationChrome.js +135 -0
  165. package/dist/esm/gallery/applicationChrome.js.map +1 -0
  166. package/dist/esm/gallery/index.d.ts +7 -0
  167. package/dist/esm/gallery/index.d.ts.map +1 -0
  168. package/dist/esm/gallery/index.js +7 -0
  169. package/dist/esm/gallery/index.js.map +1 -0
  170. package/dist/esm/gallery/navigation.d.ts +9 -0
  171. package/dist/esm/gallery/navigation.d.ts.map +1 -0
  172. package/dist/esm/gallery/navigation.js +121 -0
  173. package/dist/esm/gallery/navigation.js.map +1 -0
  174. package/dist/esm/gallery/previewProfile.d.ts +6 -0
  175. package/dist/esm/gallery/previewProfile.d.ts.map +1 -0
  176. package/dist/esm/gallery/previewProfile.js +83 -0
  177. package/dist/esm/gallery/previewProfile.js.map +1 -0
  178. package/dist/esm/gallery/screens.d.ts +4 -0
  179. package/dist/esm/gallery/screens.d.ts.map +1 -0
  180. package/dist/esm/gallery/screens.js +77 -0
  181. package/dist/esm/gallery/screens.js.map +1 -0
  182. package/dist/esm/header/ArcHeading.d.ts +9 -0
  183. package/dist/esm/header/ArcHeading.d.ts.map +1 -0
  184. package/dist/esm/header/ArcHeading.js +2 -0
  185. package/dist/esm/header/ArcHeading.js.map +1 -0
  186. package/dist/esm/header/ArcPageHeader.d.ts +3 -0
  187. package/dist/esm/header/ArcPageHeader.d.ts.map +1 -0
  188. package/dist/esm/header/ArcPageHeader.js +63 -0
  189. package/dist/esm/header/ArcPageHeader.js.map +1 -0
  190. package/dist/esm/header/deriveArcHeading.d.ts +4 -0
  191. package/dist/esm/header/deriveArcHeading.d.ts.map +1 -0
  192. package/dist/esm/header/deriveArcHeading.js +49 -0
  193. package/dist/esm/header/deriveArcHeading.js.map +1 -0
  194. package/dist/esm/header/humanizeBindingName.d.ts +2 -0
  195. package/dist/esm/header/humanizeBindingName.d.ts.map +1 -0
  196. package/dist/esm/header/humanizeBindingName.js +34 -0
  197. package/dist/esm/header/humanizeBindingName.js.map +1 -0
  198. package/dist/esm/header/index.d.ts +5 -0
  199. package/dist/esm/header/index.d.ts.map +1 -0
  200. package/dist/esm/header/index.js +5 -0
  201. package/dist/esm/header/index.js.map +1 -0
  202. package/dist/esm/index.d.ts +10 -0
  203. package/dist/esm/index.d.ts.map +1 -0
  204. package/dist/esm/index.js +30 -0
  205. package/dist/esm/index.js.map +1 -0
  206. package/dist/esm/package.json +3 -0
  207. package/dist/esm/packageName.d.ts +2 -0
  208. package/dist/esm/packageName.d.ts.map +1 -0
  209. package/dist/esm/packageName.js +13 -0
  210. package/dist/esm/packageName.js.map +1 -0
  211. package/dist/esm/templates/ArcHeaderOptions.d.ts +8 -0
  212. package/dist/esm/templates/ArcHeaderOptions.d.ts.map +1 -0
  213. package/dist/esm/templates/ArcHeaderOptions.js +2 -0
  214. package/dist/esm/templates/ArcHeaderOptions.js.map +1 -0
  215. package/dist/esm/templates/ColumnDefinition.d.ts +5 -0
  216. package/dist/esm/templates/ColumnDefinition.d.ts.map +1 -0
  217. package/dist/esm/templates/ColumnDefinition.js +2 -0
  218. package/dist/esm/templates/ColumnDefinition.js.map +1 -0
  219. package/dist/esm/templates/SampleBindingName.d.ts +11 -0
  220. package/dist/esm/templates/SampleBindingName.d.ts.map +1 -0
  221. package/dist/esm/templates/SampleBindingName.js +37 -0
  222. package/dist/esm/templates/SampleBindingName.js.map +1 -0
  223. package/dist/esm/templates/TableOptions.d.ts +6 -0
  224. package/dist/esm/templates/TableOptions.d.ts.map +1 -0
  225. package/dist/esm/templates/TableOptions.js +2 -0
  226. package/dist/esm/templates/TableOptions.js.map +1 -0
  227. package/dist/esm/templates/commandTemplates.d.ts +4 -0
  228. package/dist/esm/templates/commandTemplates.d.ts.map +1 -0
  229. package/dist/esm/templates/commandTemplates.js +79 -0
  230. package/dist/esm/templates/commandTemplates.js.map +1 -0
  231. package/dist/esm/templates/dataElements.d.ts +11 -0
  232. package/dist/esm/templates/dataElements.d.ts.map +1 -0
  233. package/dist/esm/templates/dataElements.js +123 -0
  234. package/dist/esm/templates/dataElements.js.map +1 -0
  235. package/dist/esm/templates/dialogElements.d.ts +5 -0
  236. package/dist/esm/templates/dialogElements.d.ts.map +1 -0
  237. package/dist/esm/templates/dialogElements.js +65 -0
  238. package/dist/esm/templates/dialogElements.js.map +1 -0
  239. package/dist/esm/templates/dialogTemplates.d.ts +6 -0
  240. package/dist/esm/templates/dialogTemplates.d.ts.map +1 -0
  241. package/dist/esm/templates/dialogTemplates.js +113 -0
  242. package/dist/esm/templates/dialogTemplates.js.map +1 -0
  243. package/dist/esm/templates/editorElements.d.ts +11 -0
  244. package/dist/esm/templates/editorElements.d.ts.map +1 -0
  245. package/dist/esm/templates/editorElements.js +74 -0
  246. package/dist/esm/templates/editorElements.js.map +1 -0
  247. package/dist/esm/templates/editorTemplates.d.ts +5 -0
  248. package/dist/esm/templates/editorTemplates.d.ts.map +1 -0
  249. package/dist/esm/templates/editorTemplates.js +168 -0
  250. package/dist/esm/templates/editorTemplates.js.map +1 -0
  251. package/dist/esm/templates/elements.d.ts +11 -0
  252. package/dist/esm/templates/elements.d.ts.map +1 -0
  253. package/dist/esm/templates/elements.js +92 -0
  254. package/dist/esm/templates/elements.js.map +1 -0
  255. package/dist/esm/templates/formElements.d.ts +11 -0
  256. package/dist/esm/templates/formElements.d.ts.map +1 -0
  257. package/dist/esm/templates/formElements.js +70 -0
  258. package/dist/esm/templates/formElements.js.map +1 -0
  259. package/dist/esm/templates/index.d.ts +18 -0
  260. package/dist/esm/templates/index.d.ts.map +1 -0
  261. package/dist/esm/templates/index.js +18 -0
  262. package/dist/esm/templates/index.js.map +1 -0
  263. package/dist/esm/templates/listTemplates.d.ts +6 -0
  264. package/dist/esm/templates/listTemplates.d.ts.map +1 -0
  265. package/dist/esm/templates/listTemplates.js +182 -0
  266. package/dist/esm/templates/listTemplates.js.map +1 -0
  267. package/dist/esm/templates/nesting.d.ts +6 -0
  268. package/dist/esm/templates/nesting.d.ts.map +1 -0
  269. package/dist/esm/templates/nesting.js +145 -0
  270. package/dist/esm/templates/nesting.js.map +1 -0
  271. package/dist/esm/templates/sampleData.d.ts +10 -0
  272. package/dist/esm/templates/sampleData.d.ts.map +1 -0
  273. package/dist/esm/templates/sampleData.js +134 -0
  274. package/dist/esm/templates/sampleData.js.map +1 -0
  275. package/dist/esm/templates/screenTemplates.d.ts +4 -0
  276. package/dist/esm/templates/screenTemplates.d.ts.map +1 -0
  277. package/dist/esm/templates/screenTemplates.js +38 -0
  278. package/dist/esm/templates/screenTemplates.js.map +1 -0
  279. package/dist/esm/templates/workspaceTemplates.d.ts +5 -0
  280. package/dist/esm/templates/workspaceTemplates.d.ts.map +1 -0
  281. package/dist/esm/templates/workspaceTemplates.js +208 -0
  282. package/dist/esm/templates/workspaceTemplates.js.map +1 -0
  283. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  284. package/for_ArcPageHeader/when_rendering_a_gallery_screen.tsx +79 -0
  285. package/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.ts +41 -0
  286. package/for_componentsBlueprint/when_resolving_its_dependencies.ts +85 -0
  287. package/for_componentsBlueprint/when_validating_the_bundle.ts +55 -0
  288. package/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.ts +56 -0
  289. package/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.ts +66 -0
  290. package/for_componentsScreenTemplates/when_following_the_nesting_chain.ts +83 -0
  291. package/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.ts +51 -0
  292. package/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.ts +72 -0
  293. package/for_deriveArcHeading/when_no_binding_is_named.ts +42 -0
  294. package/for_deriveArcHeading/when_the_binding_is_not_registered.ts +25 -0
  295. package/for_deriveArcHeading/when_the_binding_is_registered.ts +35 -0
  296. package/for_humanizeBindingName/when_reading_a_proxy_name.ts +34 -0
  297. package/gallery/ArcPages.stories.tsx +80 -0
  298. package/gallery/Bindings.stories.tsx +134 -0
  299. package/gallery/DialogTemplatePreview.tsx +49 -0
  300. package/gallery/DialogTemplates.stories.tsx +44 -0
  301. package/gallery/GalleryScreenPreview.tsx +70 -0
  302. package/gallery/applicationChrome.ts +108 -0
  303. package/gallery/index.ts +9 -0
  304. package/gallery/navigation.ts +63 -0
  305. package/gallery/previewProfile.ts +68 -0
  306. package/gallery/screens.ts +75 -0
  307. package/header/ArcHeading.ts +39 -0
  308. package/header/ArcPageHeader.tsx +44 -0
  309. package/header/deriveArcHeading.ts +47 -0
  310. package/header/humanizeBindingName.ts +36 -0
  311. package/header/index.ts +7 -0
  312. package/index.ts +12 -0
  313. package/package.json +71 -0
  314. package/packageName.ts +12 -0
  315. package/templates/ArcHeaderOptions.ts +27 -0
  316. package/templates/ColumnDefinition.ts +18 -0
  317. package/templates/SampleBindingName.ts +50 -0
  318. package/templates/TableOptions.ts +22 -0
  319. package/templates/commandTemplates.ts +59 -0
  320. package/templates/dataElements.ts +97 -0
  321. package/templates/dialogElements.ts +53 -0
  322. package/templates/dialogTemplates.ts +105 -0
  323. package/templates/editorElements.ts +69 -0
  324. package/templates/editorTemplates.ts +129 -0
  325. package/templates/elements.ts +81 -0
  326. package/templates/formElements.ts +61 -0
  327. package/templates/index.ts +20 -0
  328. package/templates/listTemplates.ts +142 -0
  329. package/templates/nesting.ts +118 -0
  330. package/templates/sampleData.ts +81 -0
  331. package/templates/screenTemplates.ts +35 -0
  332. package/templates/workspaceTemplates.ts +163 -0
@@ -0,0 +1,9 @@
1
+ export interface ArcHeading {
2
+ title: string;
3
+ subtitle?: string;
4
+ trail: string[];
5
+ bindingName?: string;
6
+ isBound: boolean;
7
+ bindingLabel: string;
8
+ }
9
+ //# sourceMappingURL=ArcHeading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcHeading.d.ts","sourceRoot":"","sources":["../../../header/ArcHeading.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,UAAU;IAEvB,KAAK,EAAE,MAAM,CAAC;IAGd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAQlB,KAAK,EAAE,MAAM,EAAE,CAAC;IAGhB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,OAAO,EAAE,OAAO,CAAC;IAOjB,YAAY,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ArcHeading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcHeading.js","sourceRoot":"","sources":["../../../header/ArcHeading.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function ArcPageHeader({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=ArcPageHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcPageHeader.d.ts","sourceRoot":"","sources":["../../../header/ArcPageHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAqB/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAmBzE"}
@@ -0,0 +1,63 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { resolveElementBinding, BindingKind } from '@cratis/scene.components';
3
+ import { deriveArcHeading } from './deriveArcHeading.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * The one component this blueprint registers: a page header whose heading, trail and design-time state all
9
+ * follow from a single binding name.
10
+ *
11
+ * Every template in this package opens with one, and every template gives it the same binding its body is
12
+ * built around - `AllInvoices` on the list page, `RecordAdjustment` on the command page. Saying it once is
13
+ * the point. A hand-authored header repeats the page's subject in the title, again in the trail, and a
14
+ * third time in the table below it, and those three copies drift the first time anything is renamed.
15
+ *
16
+ * It also reports whether the binding is registered, which is what makes a design-time preview readable.
17
+ * A page whose body is one dashed placeholder is ambiguous - is the name wrong, or has the host simply not
18
+ * wired anything yet? The header answers that at the top of the page, in words, without opening a debugger.
19
+ *
20
+ * The `layout-page-header` class names are the default blueprint's, not this package's. That is this
21
+ * blueprint's whole posture in one detail: it reuses the shell it depends on rather than shipping a rival
22
+ * one, so a page of Arc-bound content sits inside the default shell looking like it belongs there.
23
+ */ function ArcPageHeader({ element, slots }) {
24
+ const query = resolveElementBinding(element, BindingKind.Query);
25
+ const kind = query.name === undefined ? BindingKind.Command : BindingKind.Query;
26
+ const binding = kind === BindingKind.Query ? query : resolveElementBinding(element, BindingKind.Command);
27
+ const heading = deriveArcHeading(element.properties, binding, kind);
28
+ return /*#__PURE__*/ jsxs("div", {
29
+ className: "layout-page-header",
30
+ "data-scene-id": element.id,
31
+ "data-scene-binding": heading.bindingName,
32
+ children: [
33
+ /*#__PURE__*/ jsxs("div", {
34
+ children: [
35
+ /*#__PURE__*/ jsx("nav", {
36
+ className: "layout-page-header-trail",
37
+ "aria-label": "Breadcrumb",
38
+ children: heading.trail.join(' › ')
39
+ }),
40
+ /*#__PURE__*/ jsx("h1", {
41
+ className: "layout-page-header-title",
42
+ children: heading.title
43
+ }),
44
+ heading.subtitle && /*#__PURE__*/ jsx("p", {
45
+ className: "layout-page-header-subtitle",
46
+ children: heading.subtitle
47
+ }),
48
+ /*#__PURE__*/ jsx("span", {
49
+ "data-scene-binding-state": heading.isBound ? 'bound' : 'unbound',
50
+ children: heading.bindingLabel
51
+ })
52
+ ]
53
+ }),
54
+ (slots.actions?.length ?? 0) > 0 && /*#__PURE__*/ jsx("div", {
55
+ className: "layout-page-header-actions",
56
+ children: slots.actions
57
+ })
58
+ ]
59
+ });
60
+ }
61
+
62
+ export { ArcPageHeader };
63
+ //# sourceMappingURL=ArcPageHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcPageHeader.js","sources":["../../../header/ArcPageHeader.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { BindingKind, resolveElementBinding } from '@cratis/scene.components';\nimport { deriveArcHeading } from './deriveArcHeading';\n\n/**\n * The one component this blueprint registers: a page header whose heading, trail and design-time state all\n * follow from a single binding name.\n *\n * Every template in this package opens with one, and every template gives it the same binding its body is\n * built around - `AllInvoices` on the list page, `RecordAdjustment` on the command page. Saying it once is\n * the point. A hand-authored header repeats the page's subject in the title, again in the trail, and a\n * third time in the table below it, and those three copies drift the first time anything is renamed.\n *\n * It also reports whether the binding is registered, which is what makes a design-time preview readable.\n * A page whose body is one dashed placeholder is ambiguous - is the name wrong, or has the host simply not\n * wired anything yet? The header answers that at the top of the page, in words, without opening a debugger.\n *\n * The `layout-page-header` class names are the default blueprint's, not this package's. That is this\n * blueprint's whole posture in one detail: it reuses the shell it depends on rather than shipping a rival\n * one, so a page of Arc-bound content sits inside the default shell looking like it belongs there.\n */\nexport function ArcPageHeader({ element, slots }: RegisteredComponentProps) {\n const query = resolveElementBinding(element, BindingKind.Query);\n const kind = query.name === undefined ? BindingKind.Command : BindingKind.Query;\n const binding = kind === BindingKind.Query ? query : resolveElementBinding(element, BindingKind.Command);\n const heading = deriveArcHeading(element.properties, binding, kind);\n\n return (\n <div className='layout-page-header' data-scene-id={element.id} data-scene-binding={heading.bindingName}>\n <div>\n <nav className='layout-page-header-trail' aria-label='Breadcrumb'>\n {heading.trail.join(' › ')}\n </nav>\n <h1 className='layout-page-header-title'>{heading.title}</h1>\n {heading.subtitle && <p className='layout-page-header-subtitle'>{heading.subtitle}</p>}\n <span data-scene-binding-state={heading.isBound ? 'bound' : 'unbound'}>{heading.bindingLabel}</span>\n </div>\n {(slots.actions?.length ?? 0) > 0 && <div className='layout-page-header-actions'>{slots.actions}</div>}\n </div>\n );\n}\n"],"names":["ArcPageHeader","element","slots","query","resolveElementBinding","BindingKind","Query","kind","name","undefined","Command","binding","heading","deriveArcHeading","properties","_jsxs","div","className","data-scene-id","id","data-scene-binding","bindingName","_jsx","nav","aria-label","trail","join","h1","title","subtitle","p","span","data-scene-binding-state","isBound","bindingLabel","actions","length"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;AAgBC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACtE,IAAA,MAAMC,KAAAA,GAAQC,qBAAAA,CAAsBH,OAAAA,EAASI,WAAAA,CAAYC,KAAK,CAAA;IAC9D,MAAMC,IAAAA,GAAOJ,MAAMK,IAAI,KAAKC,YAAYJ,WAAAA,CAAYK,OAAO,GAAGL,WAAAA,CAAYC,KAAK;IAC/E,MAAMK,OAAAA,GAAUJ,SAASF,WAAAA,CAAYC,KAAK,GAAGH,KAAAA,GAAQC,qBAAAA,CAAsBH,OAAAA,EAASI,WAAAA,CAAYK,OAAO,CAAA;AACvG,IAAA,MAAME,OAAAA,GAAUC,gBAAAA,CAAiBZ,OAAAA,CAAQa,UAAU,EAAEH,OAAAA,EAASJ,IAAAA,CAAAA;AAE9D,IAAA,qBACIQ,IAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,oBAAA;AAAqBC,QAAAA,eAAAA,EAAejB,QAAQkB,EAAE;AAAEC,QAAAA,oBAAAA,EAAoBR,QAAQS,WAAW;;0BAClGN,IAAA,CAACC,KAAAA,EAAAA;;kCACGM,GAAA,CAACC,KAAAA,EAAAA;wBAAIN,SAAAA,EAAU,0BAAA;wBAA2BO,YAAAA,EAAW,YAAA;kCAChDZ,OAAAA,CAAQa,KAAK,CAACC,IAAI,CAAC,KAAA;;kCAExBJ,GAAA,CAACK,IAAAA,EAAAA;wBAAGV,SAAAA,EAAU,0BAAA;AAA4BL,wBAAAA,QAAAA,EAAAA,OAAAA,CAAQgB;;oBACjDhB,OAAAA,CAAQiB,QAAQ,kBAAIP,GAAA,CAACQ,GAAAA,EAAAA;wBAAEb,SAAAA,EAAU,6BAAA;AAA+BL,wBAAAA,QAAAA,EAAAA,OAAAA,CAAQiB;;kCACzEP,GAAA,CAACS,MAAAA,EAAAA;wBAAKC,0BAAAA,EAA0BpB,OAAAA,CAAQqB,OAAO,GAAG,OAAA,GAAU,SAAA;AAAYrB,wBAAAA,QAAAA,EAAAA,OAAAA,CAAQsB;;;;AAElFhC,YAAAA,CAAAA,MAAMiC,OAAO,EAAEC,UAAU,CAAA,IAAK,mBAAKd,GAAA,CAACN,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,4BAAA;AAA8Bf,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMiC;;;;AAGpG;;;;"}
@@ -0,0 +1,4 @@
1
+ import { BindingKind, ElementBinding } from '@cratis/scene.components';
2
+ import { ArcHeading } from './ArcHeading';
3
+ export declare function deriveArcHeading(properties: Record<string, unknown>, binding: ElementBinding, kind: BindingKind): ArcHeading;
4
+ //# sourceMappingURL=deriveArcHeading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deriveArcHeading.d.ts","sourceRoot":"","sources":["../../../header/deriveArcHeading.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAkB,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAsB1C,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,CAY5H"}
@@ -0,0 +1,49 @@
1
+ import { stringProperty } from '@cratis/scene.components';
2
+ import { humanizeBindingName } from './humanizeBindingName.js';
3
+
4
+ // Copyright (c) Cratis. All rights reserved.
5
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
6
+ /**
7
+ * Derives everything a page header shows from one binding and the few properties around it.
8
+ *
9
+ * This function is the entire argument for {@link ArcPageHeader} being a component at all. A screen
10
+ * template can hold a title, a subtitle and a breadcrumb trail perfectly well - they are three literals in
11
+ * a property bag, and a tree is the right place for literals. What a tree cannot do is *derive* them from
12
+ * a single binding name and a registry lookup, and that is what an Arc-bound page needs: the page is about
13
+ * `AllInvoices`, so the heading, the trail and the design-time state should all follow from saying so once.
14
+ *
15
+ * The three binding states are kept apart deliberately, because they are three different problems with
16
+ * three different fixes. No name at all means the template is incomplete. A name nothing is registered
17
+ * under means the host has not wired it - which is the *normal* state at design time, not an error. A
18
+ * resolved name means the page will really talk to a backend.
19
+ *
20
+ * @param properties The element's property bag - `title`, `subtitle` and `section` are read from it.
21
+ * @param binding What the element asked for at its binding site, and what the registry produced.
22
+ * @param kind Whether the binding was a query or a command, so the state can be described in the right words.
23
+ * @returns The derived {@link ArcHeading}.
24
+ */ function deriveArcHeading(properties, binding, kind) {
25
+ const title = stringProperty(properties, 'title') ?? (binding.name === undefined ? 'Untitled page' : humanizeBindingName(binding.name));
26
+ const section = stringProperty(properties, 'section');
27
+ return {
28
+ title,
29
+ subtitle: stringProperty(properties, 'subtitle'),
30
+ trail: section === undefined ? [
31
+ title
32
+ ] : [
33
+ section,
34
+ title
35
+ ],
36
+ bindingName: binding.name,
37
+ isBound: binding.target !== undefined,
38
+ bindingLabel: bindingLabelFor(binding, kind)
39
+ };
40
+ }
41
+ function bindingLabelFor(binding, kind) {
42
+ if (binding.name === undefined) {
43
+ return 'No binding';
44
+ }
45
+ return binding.target === undefined ? `No ${kind} registered as ${binding.name}` : `Bound to ${kind} ${binding.name}`;
46
+ }
47
+
48
+ export { deriveArcHeading };
49
+ //# sourceMappingURL=deriveArcHeading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deriveArcHeading.js","sources":["../../../header/deriveArcHeading.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingKind, ElementBinding, stringProperty } from '@cratis/scene.components';\nimport { ArcHeading } from './ArcHeading';\nimport { humanizeBindingName } from './humanizeBindingName';\n\n/**\n * Derives everything a page header shows from one binding and the few properties around it.\n *\n * This function is the entire argument for {@link ArcPageHeader} being a component at all. A screen\n * template can hold a title, a subtitle and a breadcrumb trail perfectly well - they are three literals in\n * a property bag, and a tree is the right place for literals. What a tree cannot do is *derive* them from\n * a single binding name and a registry lookup, and that is what an Arc-bound page needs: the page is about\n * `AllInvoices`, so the heading, the trail and the design-time state should all follow from saying so once.\n *\n * The three binding states are kept apart deliberately, because they are three different problems with\n * three different fixes. No name at all means the template is incomplete. A name nothing is registered\n * under means the host has not wired it - which is the *normal* state at design time, not an error. A\n * resolved name means the page will really talk to a backend.\n *\n * @param properties The element's property bag - `title`, `subtitle` and `section` are read from it.\n * @param binding What the element asked for at its binding site, and what the registry produced.\n * @param kind Whether the binding was a query or a command, so the state can be described in the right words.\n * @returns The derived {@link ArcHeading}.\n */\nexport function deriveArcHeading(properties: Record<string, unknown>, binding: ElementBinding, kind: BindingKind): ArcHeading {\n const title = stringProperty(properties, 'title') ?? (binding.name === undefined ? 'Untitled page' : humanizeBindingName(binding.name));\n const section = stringProperty(properties, 'section');\n\n return {\n title,\n subtitle: stringProperty(properties, 'subtitle'),\n trail: section === undefined ? [title] : [section, title],\n bindingName: binding.name,\n isBound: binding.target !== undefined,\n bindingLabel: bindingLabelFor(binding, kind),\n };\n}\n\nfunction bindingLabelFor(binding: ElementBinding, kind: BindingKind): string {\n if (binding.name === undefined) {\n return 'No binding';\n }\n\n return binding.target === undefined ? `No ${kind} registered as ${binding.name}` : `Bound to ${kind} ${binding.name}`;\n}\n"],"names":["deriveArcHeading","properties","binding","kind","title","stringProperty","name","undefined","humanizeBindingName","section","subtitle","trail","bindingName","isBound","target","bindingLabel","bindingLabelFor"],"mappings":";;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;AAkBC,IACM,SAASA,gBAAAA,CAAiBC,UAAmC,EAAEC,OAAuB,EAAEC,IAAiB,EAAA;AAC5G,IAAA,MAAMC,KAAAA,GAAQC,cAAAA,CAAeJ,UAAAA,EAAY,OAAA,CAAA,KAAaC,OAAAA,CAAQI,IAAI,KAAKC,SAAAA,GAAY,eAAA,GAAkBC,mBAAAA,CAAoBN,OAAAA,CAAQI,IAAI,CAAA,CAAA;IACrI,MAAMG,OAAAA,GAAUJ,eAAeJ,UAAAA,EAAY,SAAA,CAAA;IAE3C,OAAO;AACHG,QAAAA,KAAAA;AACAM,QAAAA,QAAAA,EAAUL,eAAeJ,UAAAA,EAAY,UAAA,CAAA;AACrCU,QAAAA,KAAAA,EAAOF,YAAYF,SAAAA,GAAY;AAACH,YAAAA;SAAM,GAAG;AAACK,YAAAA,OAAAA;AAASL,YAAAA;AAAM,SAAA;AACzDQ,QAAAA,WAAAA,EAAaV,QAAQI,IAAI;QACzBO,OAAAA,EAASX,OAAAA,CAAQY,MAAM,KAAKP,SAAAA;AAC5BQ,QAAAA,YAAAA,EAAcC,gBAAgBd,OAAAA,EAASC,IAAAA;AAC3C,KAAA;AACJ;AAEA,SAASa,eAAAA,CAAgBd,OAAuB,EAAEC,IAAiB,EAAA;IAC/D,IAAID,OAAAA,CAAQI,IAAI,KAAKC,SAAAA,EAAW;QAC5B,OAAO,YAAA;AACX,IAAA;IAEA,OAAOL,OAAAA,CAAQY,MAAM,KAAKP,SAAAA,GAAY,CAAC,GAAG,EAAEJ,IAAAA,CAAK,eAAe,EAAED,OAAAA,CAAQI,IAAI,CAAA,CAAE,GAAG,CAAC,SAAS,EAAEH,KAAK,CAAC,EAAED,OAAAA,CAAQI,IAAI,CAAA,CAAE;AACzH;;;;"}
@@ -0,0 +1,2 @@
1
+ export declare function humanizeBindingName(name: string): string;
2
+ //# sourceMappingURL=humanizeBindingName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"humanizeBindingName.d.ts","sourceRoot":"","sources":["../../../header/humanizeBindingName.ts"],"names":[],"mappings":"AAoBA,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWxD"}
@@ -0,0 +1,34 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * Reads an Arc binding name as a sentence: `AllInvoices` becomes `All invoices`.
5
+ *
6
+ * Arc proxy names are the C# artifact names - a `[ReadModel]`'s static query method, a `[Command]` record -
7
+ * so they arrive in PascalCase and describe exactly what the page is about. Using them as the fallback
8
+ * heading means a page template is legible before anyone has written a title, and the heading a designer
9
+ * sees at design time is the one the backend actually named.
10
+ *
11
+ * Only the boundary between a lowercase or numeric character and an uppercase one is treated as a word
12
+ * break, so a run of capitals stays together: `AllPIIRecords` reads as `All PIIRecords` rather than being
13
+ * chopped into initials. That is the right trade - a wrong word break in an acronym is much more jarring
14
+ * than a missing one. For the same reason a word is only lowered when it looks like an ordinary
15
+ * capitalized word, so an acronym keeps its shape instead of being flattened into `piirecords`.
16
+ *
17
+ * @param name The binding name as a screen wrote it.
18
+ * @returns The name as a sentence, with only the first word capitalized.
19
+ */ function humanizeBindingName(name) {
20
+ const words = name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').split(/\s+/).filter((word)=>word.length > 0);
21
+ if (words.length === 0) {
22
+ return name;
23
+ }
24
+ return [
25
+ words[0],
26
+ ...words.slice(1).map(lowered)
27
+ ].join(' ');
28
+ }
29
+ function lowered(word) {
30
+ return /^[A-Z][a-z]/.test(word) ? `${word[0].toLowerCase()}${word.slice(1)}` : word;
31
+ }
32
+
33
+ export { humanizeBindingName };
34
+ //# sourceMappingURL=humanizeBindingName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"humanizeBindingName.js","sources":["../../../header/humanizeBindingName.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * Reads an Arc binding name as a sentence: `AllInvoices` becomes `All invoices`.\n *\n * Arc proxy names are the C# artifact names - a `[ReadModel]`'s static query method, a `[Command]` record -\n * so they arrive in PascalCase and describe exactly what the page is about. Using them as the fallback\n * heading means a page template is legible before anyone has written a title, and the heading a designer\n * sees at design time is the one the backend actually named.\n *\n * Only the boundary between a lowercase or numeric character and an uppercase one is treated as a word\n * break, so a run of capitals stays together: `AllPIIRecords` reads as `All PIIRecords` rather than being\n * chopped into initials. That is the right trade - a wrong word break in an acronym is much more jarring\n * than a missing one. For the same reason a word is only lowered when it looks like an ordinary\n * capitalized word, so an acronym keeps its shape instead of being flattened into `piirecords`.\n *\n * @param name The binding name as a screen wrote it.\n * @returns The name as a sentence, with only the first word capitalized.\n */\nexport function humanizeBindingName(name: string): string {\n const words = name\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\n .split(/\\s+/)\n .filter(word => word.length > 0);\n\n if (words.length === 0) {\n return name;\n }\n\n return [words[0], ...words.slice(1).map(lowered)].join(' ');\n}\n\nfunction lowered(word: string): string {\n return /^[A-Z][a-z]/.test(word) ? `${word[0].toLowerCase()}${word.slice(1)}` : word;\n}\n"],"names":["humanizeBindingName","name","words","replace","split","filter","word","length","slice","map","lowered","join","test","toLowerCase"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;;;IAiBO,SAASA,mBAAAA,CAAoBC,IAAY,EAAA;AAC5C,IAAA,MAAMC,KAAAA,GAAQD,IAAAA,CACTE,OAAO,CAAC,sBAAsB,OAAA,CAAA,CAC9BC,KAAK,CAAC,KAAA,CAAA,CACNC,MAAM,CAACC,CAAAA,IAAAA,GAAQA,IAAAA,CAAKC,MAAM,GAAG,CAAA,CAAA;IAElC,IAAIL,KAAAA,CAAMK,MAAM,KAAK,CAAA,EAAG;QACpB,OAAON,IAAAA;AACX,IAAA;IAEA,OAAO;AAACC,QAAAA,KAAK,CAAC,CAAA,CAAE;AAAKA,QAAAA,GAAAA,KAAAA,CAAMM,KAAK,CAAC,CAAA,CAAA,CAAGC,GAAG,CAACC,OAAAA;AAAS,KAAA,CAACC,IAAI,CAAC,GAAA,CAAA;AAC3D;AAEA,SAASD,QAAQJ,IAAY,EAAA;AACzB,IAAA,OAAO,aAAA,CAAcM,IAAI,CAACN,IAAAA,CAAAA,GAAQ,GAAGA,IAAI,CAAC,CAAA,CAAE,CAACO,WAAW,EAAA,CAAA,EAAKP,IAAAA,CAAKE,KAAK,CAAC,IAAI,GAAGF,IAAAA;AACnF;;;;"}
@@ -0,0 +1,5 @@
1
+ export * from './ArcHeading';
2
+ export * from './humanizeBindingName';
3
+ export * from './deriveArcHeading';
4
+ export * from './ArcPageHeader';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../header/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './ArcHeading';
2
+ export * from './humanizeBindingName';
3
+ export * from './deriveArcHeading';
4
+ export * from './ArcPageHeader';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../header/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export * from './packageName';
2
+ export * from './ComponentName';
3
+ export * from './CompositeName';
4
+ export * from './BorrowedComponentName';
5
+ export * from './header';
6
+ export * from './templates';
7
+ export * from './gallery';
8
+ export * from './componentsBlueprintComponents';
9
+ export * from './componentsBlueprint';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,30 @@
1
+ export { componentsBlueprintName } from './packageName.js';
2
+ export { ComponentName } from './ComponentName.js';
3
+ export { CompositeName } from './CompositeName.js';
4
+ export { BorrowedComponentName } from './BorrowedComponentName.js';
5
+ export { humanizeBindingName } from './header/humanizeBindingName.js';
6
+ export { deriveArcHeading } from './header/deriveArcHeading.js';
7
+ export { ArcPageHeader } from './header/ArcPageHeader.js';
8
+ export { SampleBindingName } from './templates/SampleBindingName.js';
9
+ export { invoiceDocument, invoiceFilters, invoiceNavigationPath, invoiceSchema, invoiceVersions, statusOptions } from './templates/sampleData.js';
10
+ export { arcPageHeader, errorBoundary, icon, page, toolbar, toolbarButton, toolbarGroup, toolbarSeparator } from './templates/elements.js';
11
+ export { adjustmentColumns, columns, dataPage, dataTable, invoiceColumns, invoiceTableOptions, observableDataTable } from './templates/dataElements.js';
12
+ export { calendarField, commandForm, dropdownField, inputTextField, numberField, textAreaField } from './templates/formElements.js';
13
+ export { busyIndicatorDialog, commandDialog, dialog } from './templates/dialogElements.js';
14
+ export { dropdown, filterPanel, objectContentEditor, objectNavigationalBar, schemaEditor, timeMachine } from './templates/editorElements.js';
15
+ export { dataListPageTemplate, dataListWithDetailPageTemplate, listTemplates, observableDataListPageTemplate } from './templates/listTemplates.js';
16
+ export { dashboardPageTemplate, masterDetailPageTemplate, workspaceTemplates } from './templates/workspaceTemplates.js';
17
+ export { commandFormPageTemplate, commandTemplates } from './templates/commandTemplates.js';
18
+ export { editorTemplates, objectEditorPageTemplate, schemaEditorPageTemplate } from './templates/editorTemplates.js';
19
+ export { commandSliceSectionTemplate, dataFeatureSectionTemplate, dataModulePageTemplate, nestingChainTemplates } from './templates/nesting.js';
20
+ export { busyDialogTemplate, commandDialogTemplate, componentsDialogTemplates, confirmDialogTemplate } from './templates/dialogTemplates.js';
21
+ export { componentsPageTemplates, componentsScreenTemplates } from './templates/screenTemplates.js';
22
+ export { componentsNavigationContributions, componentsNavigationEntries, componentsNavigationGroups, entriesInGroup, groupOfScreen, labelOfScreen } from './gallery/navigation.js';
23
+ export { componentsApplicationChrome } from './gallery/applicationChrome.js';
24
+ export { componentsGalleryScreen, componentsGalleryScreens } from './gallery/screens.js';
25
+ export { componentsBlueprintCatalog, componentsBlueprintProfile, primeReactComponentNames } from './gallery/previewProfile.js';
26
+ export { GalleryScreenPreview, componentsPreviewRegistry } from './gallery/GalleryScreenPreview.js';
27
+ export { DialogTemplatePreview } from './gallery/DialogTemplatePreview.js';
28
+ export { componentsBlueprintComponents } from './componentsBlueprintComponents.js';
29
+ export { componentsBlueprint, componentsBlueprintManifest } from './componentsBlueprint.js';
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,2 @@
1
+ export declare const componentsBlueprintName = "Cratis.Blueprint.Components";
2
+ //# sourceMappingURL=packageName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packageName.d.ts","sourceRoot":"","sources":["../../packageName.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,uBAAuB,gCAAgC,CAAC"}
@@ -0,0 +1,13 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * The name this blueprint is known by inside a `ui profile`.
5
+ *
6
+ * It is not the npm package name: a profile lists Scene package names, a `PackageDependency` refers to
7
+ * one, and `componentRegistryKey` builds every registry key from this. It therefore lives on its own
8
+ * rather than inside the manifest, so the registry can key off it without importing the manifest that
9
+ * describes the registry.
10
+ */ const componentsBlueprintName = 'Cratis.Blueprint.Components';
11
+
12
+ export { componentsBlueprintName };
13
+ //# sourceMappingURL=packageName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packageName.js","sources":["../../packageName.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The name this blueprint is known by inside a `ui profile`.\n *\n * It is not the npm package name: a profile lists Scene package names, a `PackageDependency` refers to\n * one, and `componentRegistryKey` builds every registry key from this. It therefore lives on its own\n * rather than inside the manifest, so the registry can key off it without importing the manifest that\n * describes the registry.\n */\nexport const componentsBlueprintName = 'Cratis.Blueprint.Components';\n"],"names":["componentsBlueprintName"],"mappings":"AAAA;AACA;AAEA;;;;;;;IAQO,MAAMA,uBAAAA,GAA0B;;;;"}
@@ -0,0 +1,8 @@
1
+ export interface ArcHeaderOptions {
2
+ title?: string;
3
+ subtitle?: string;
4
+ section?: string;
5
+ query?: string;
6
+ command?: string;
7
+ }
8
+ //# sourceMappingURL=ArcHeaderOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcHeaderOptions.d.ts","sourceRoot":"","sources":["../../../templates/ArcHeaderOptions.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,gBAAgB;IAE7B,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ArcHeaderOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArcHeaderOptions.js","sourceRoot":"","sources":["../../../templates/ArcHeaderOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export interface ColumnDefinition {
2
+ field: string;
3
+ header: string;
4
+ }
5
+ //# sourceMappingURL=ColumnDefinition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnDefinition.d.ts","sourceRoot":"","sources":["../../../templates/ColumnDefinition.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,gBAAgB;IAE7B,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ColumnDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColumnDefinition.js","sourceRoot":"","sources":["../../../templates/ColumnDefinition.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export declare enum SampleBindingName {
2
+ AllInvoices = "AllInvoices",
3
+ InvoicesInFlight = "InvoicesInFlight",
4
+ InvoiceById = "InvoiceById",
5
+ RevenueByMonth = "RevenueByMonth",
6
+ OpenTickets = "OpenTickets",
7
+ AllAdjustments = "AllAdjustments",
8
+ RegisterInvoice = "RegisterInvoice",
9
+ RecordAdjustment = "RecordAdjustment"
10
+ }
11
+ //# sourceMappingURL=SampleBindingName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SampleBindingName.d.ts","sourceRoot":"","sources":["../../../templates/SampleBindingName.ts"],"names":[],"mappings":"AAyBA,oBAAY,iBAAiB;IAEzB,WAAW,gBAAgB;IAG3B,gBAAgB,qBAAqB;IAGrC,WAAW,gBAAgB;IAG3B,cAAc,mBAAmB;IAGjC,WAAW,gBAAgB;IAG3B,cAAc,mBAAmB;IAGjC,eAAe,oBAAoB;IAGnC,gBAAgB,qBAAqB;CACxC"}
@@ -0,0 +1,37 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * The Arc query and command names this blueprint's templates ship bound to.
5
+ *
6
+ * A template carries a binding *name*, never a class - the binding registry in `@cratis/scene.components`
7
+ * is what turns a name into the generated proxy at render time, and only a host owns those proxies. So a
8
+ * template has to write some name, and these are the ones it writes.
9
+ *
10
+ * They are defaults, not fixtures. An application picking `DataListPage` replaces `AllInvoices` with its
11
+ * own query and the page is done; nothing else about the template changes. Shipping a template with no
12
+ * name at all would have been the alternative, and it is a worse one - it renders as a diagram of a page
13
+ * rather than a page, and the thing a template most needs to prove is that it composes into something
14
+ * real.
15
+ *
16
+ * The names are deliberately in the shape Arc generates: a `[ReadModel]`'s static query method
17
+ * (`AllInvoices`), and a `[Command]` record (`RegisterInvoice`). A designer reading a preview should
18
+ * recognize them as the artifacts they would really be wiring.
19
+ *
20
+ * This is an enum of *this package's defaults*, not of every name a binding may take. The element builders
21
+ * therefore take a plain `string`, so an application can point the same builders at `AllPurchaseOrders`
22
+ * without having to widen anything - the set of Arc proxies in an application is open, and a closed type
23
+ * over it would make these builders usable only for the invoices they ship bound to.
24
+ */ var SampleBindingName = /*#__PURE__*/ function(SampleBindingName) {
25
+ /** Every invoice - the snapshot query a list page reads. */ SampleBindingName["AllInvoices"] = "AllInvoices";
26
+ /** Invoices still being processed - an observable query, so the page is live. */ SampleBindingName["InvoicesInFlight"] = "InvoicesInFlight";
27
+ /** One invoice by its id - what a detail region reads. */ SampleBindingName["InvoiceById"] = "InvoiceById";
28
+ /** Revenue aggregated by month - a dashboard widget's query. */ SampleBindingName["RevenueByMonth"] = "RevenueByMonth";
29
+ /** Open support tickets - a second dashboard widget's query. */ SampleBindingName["OpenTickets"] = "OpenTickets";
30
+ /** Every adjustment recorded against an invoice. */ SampleBindingName["AllAdjustments"] = "AllAdjustments";
31
+ /** Registers a new invoice - the command a form page submits. */ SampleBindingName["RegisterInvoice"] = "RegisterInvoice";
32
+ /** Records an adjustment against an invoice - the command a dialog submits. */ SampleBindingName["RecordAdjustment"] = "RecordAdjustment";
33
+ return SampleBindingName;
34
+ }({});
35
+
36
+ export { SampleBindingName };
37
+ //# sourceMappingURL=SampleBindingName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SampleBindingName.js","sources":["../../../templates/SampleBindingName.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The Arc query and command names this blueprint's templates ship bound to.\n *\n * A template carries a binding *name*, never a class - the binding registry in `@cratis/scene.components`\n * is what turns a name into the generated proxy at render time, and only a host owns those proxies. So a\n * template has to write some name, and these are the ones it writes.\n *\n * They are defaults, not fixtures. An application picking `DataListPage` replaces `AllInvoices` with its\n * own query and the page is done; nothing else about the template changes. Shipping a template with no\n * name at all would have been the alternative, and it is a worse one - it renders as a diagram of a page\n * rather than a page, and the thing a template most needs to prove is that it composes into something\n * real.\n *\n * The names are deliberately in the shape Arc generates: a `[ReadModel]`'s static query method\n * (`AllInvoices`), and a `[Command]` record (`RegisterInvoice`). A designer reading a preview should\n * recognize them as the artifacts they would really be wiring.\n *\n * This is an enum of *this package's defaults*, not of every name a binding may take. The element builders\n * therefore take a plain `string`, so an application can point the same builders at `AllPurchaseOrders`\n * without having to widen anything - the set of Arc proxies in an application is open, and a closed type\n * over it would make these builders usable only for the invoices they ship bound to.\n */\nexport enum SampleBindingName {\n /** Every invoice - the snapshot query a list page reads. */\n AllInvoices = 'AllInvoices',\n\n /** Invoices still being processed - an observable query, so the page is live. */\n InvoicesInFlight = 'InvoicesInFlight',\n\n /** One invoice by its id - what a detail region reads. */\n InvoiceById = 'InvoiceById',\n\n /** Revenue aggregated by month - a dashboard widget's query. */\n RevenueByMonth = 'RevenueByMonth',\n\n /** Open support tickets - a second dashboard widget's query. */\n OpenTickets = 'OpenTickets',\n\n /** Every adjustment recorded against an invoice. */\n AllAdjustments = 'AllAdjustments',\n\n /** Registers a new invoice - the command a form page submits. */\n RegisterInvoice = 'RegisterInvoice',\n\n /** Records an adjustment against an invoice - the command a dialog submits. */\n RecordAdjustment = 'RecordAdjustment',\n}\n"],"names":["SampleBindingName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;IAsBO,IAAKA,iBAAAA,iBAAAA,SAAAA,iBAAAA,EAAAA;iEACkD,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;sFAGqB,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;+DAGvB,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;qEAGM,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;qEAGA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;yDAGZ,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;sEAGa,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAA;oFAGc,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;AAtBrEA,IAAAA,OAAAA,iBAAAA;AAwBX,CAAA,CAAA,EAAA;;;;"}
@@ -0,0 +1,6 @@
1
+ export interface TableOptions {
2
+ emptyMessage: string;
3
+ dataKey: string;
4
+ globalFilterFields?: string[];
5
+ }
6
+ //# sourceMappingURL=TableOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableOptions.d.ts","sourceRoot":"","sources":["../../../templates/TableOptions.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,YAAY;IAEzB,YAAY,EAAE,MAAM,CAAC;IAGrB,OAAO,EAAE,MAAM,CAAC;IAGhB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TableOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableOptions.js","sourceRoot":"","sources":["../../../templates/TableOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { ScreenTemplate } from '@cratis/scene.model';
2
+ export declare const commandFormPageTemplate: ScreenTemplate;
3
+ export declare const commandTemplates: ScreenTemplate[];
4
+ //# sourceMappingURL=commandTemplates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandTemplates.d.ts","sourceRoot":"","sources":["../../../templates/commandTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAyBrD,eAAO,MAAM,uBAAuB,EAAE,cA2BrC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAA8B,CAAC"}
@@ -0,0 +1,79 @@
1
+ import { TemplateSlotName, column, slotLeaf, SlotName } from '@cratis/scene.blueprint.default';
2
+ import { toolbar, toolbarButton, toolbarSeparator, page, arcPageHeader } from './elements.js';
3
+ import { commandForm } from './formElements.js';
4
+ import { SampleBindingName } from './SampleBindingName.js';
5
+
6
+ // Copyright (c) Cratis. All rights reserved.
7
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
8
+ /**
9
+ * The write side: a page whose body is one command, and whose action bar submits it.
10
+ */ /**
11
+ * A command form page - a header, the generated form, and the bar that closes it.
12
+ *
13
+ * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors
14
+ * and picks a field component per property type. That is the whole reason a *template* can ship a form at
15
+ * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the
16
+ * template was written, and would go quietly wrong the first time a property was added on the backend.
17
+ * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.
18
+ *
19
+ * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the
20
+ * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.
21
+ *
22
+ * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a
23
+ * screen replacing "Register" with "Register and approve" should not have to replace the form.
24
+ */ const commandFormPageTemplate = {
25
+ name: 'CommandFormPage',
26
+ fitsSlot: SlotName.Content,
27
+ slots: [
28
+ {
29
+ name: TemplateSlotName.Header
30
+ },
31
+ {
32
+ name: TemplateSlotName.Body
33
+ },
34
+ {
35
+ name: TemplateSlotName.Actions
36
+ }
37
+ ],
38
+ arrangement: {
39
+ root: column([
40
+ slotLeaf(TemplateSlotName.Header),
41
+ slotLeaf(TemplateSlotName.Body, {
42
+ grow: 1
43
+ }),
44
+ slotLeaf(TemplateSlotName.Actions)
45
+ ], 16)
46
+ },
47
+ content: {
48
+ [TemplateSlotName.Header]: [
49
+ arcPageHeader('command-form-header', {
50
+ title: 'Register an invoice',
51
+ subtitle: 'The form follows the command, so a property added on the backend shows up here',
52
+ section: 'Billing',
53
+ command: SampleBindingName.RegisterInvoice
54
+ })
55
+ ],
56
+ [TemplateSlotName.Body]: [
57
+ page('command-form-body', '', [
58
+ commandForm('command-form', SampleBindingName.RegisterInvoice, [
59
+ 'invoiceId'
60
+ ])
61
+ ])
62
+ ],
63
+ [TemplateSlotName.Actions]: [
64
+ toolbar('command-form-actions', [
65
+ toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),
66
+ toolbarSeparator('command-form-separator'),
67
+ toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel')
68
+ ])
69
+ ]
70
+ },
71
+ displayName: 'Command form page',
72
+ description: 'A generated command form under a header that states the command, with its own action bar.'
73
+ };
74
+ /** The command-shaped templates. */ const commandTemplates = [
75
+ commandFormPageTemplate
76
+ ];
77
+
78
+ export { commandFormPageTemplate, commandTemplates };
79
+ //# sourceMappingURL=commandTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commandTemplates.js","sources":["../../../templates/commandTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { commandForm } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * The write side: a page whose body is one command, and whose action bar submits it.\n */\n\n/**\n * A command form page - a header, the generated form, and the bar that closes it.\n *\n * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors\n * and picks a field component per property type. That is the whole reason a *template* can ship a form at\n * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the\n * template was written, and would go quietly wrong the first time a property was added on the backend.\n * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.\n *\n * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the\n * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.\n *\n * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a\n * screen replacing \"Register\" with \"Register and approve\" should not have to replace the form.\n */\nexport const commandFormPageTemplate: ScreenTemplate = {\n name: 'CommandFormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('command-form-header', {\n title: 'Register an invoice',\n subtitle: 'The form follows the command, so a property added on the backend shows up here',\n section: 'Billing',\n command: SampleBindingName.RegisterInvoice,\n }),\n ],\n [TemplateSlotName.Body]: [page('command-form-body', '', [commandForm('command-form', SampleBindingName.RegisterInvoice, ['invoiceId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('command-form-actions', [\n toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),\n toolbarSeparator('command-form-separator'),\n toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","displayName","description","commandTemplates"],"mappings":";;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,iBAAiBG;AAAQ;AAAE,KAAA;IAC/GC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,MAAAA,CAAO;AAACC,YAAAA,QAAAA,CAASP,iBAAiBC,MAAM,CAAA;YAAGM,QAAAA,CAASP,gBAAAA,CAAiBE,IAAI,EAAE;gBAAEM,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAID,YAAAA,QAAAA,CAASP,iBAAiBG,OAAO;SAAE,EAAE,EAAA;AACxI,KAAA;IACAM,OAAAA,EAAS;QACL,CAACT,gBAAAA,CAAiBC,MAAM,GAAG;AACvBS,YAAAA,aAAAA,CAAc,qBAAA,EAAuB;gBACjCC,KAAAA,EAAO,qBAAA;gBACPC,QAAAA,EAAU,gFAAA;gBACVC,OAAAA,EAAS,SAAA;AACTC,gBAAAA,OAAAA,EAASC,kBAAkBC;AAC/B,aAAA;AACH,SAAA;QACD,CAAChB,gBAAAA,CAAiBE,IAAI,GAAG;AAACe,YAAAA,IAAAA,CAAK,qBAAqB,EAAA,EAAI;gBAACC,WAAAA,CAAY,cAAA,EAAgBH,iBAAAA,CAAkBC,eAAe,EAAE;AAAC,oBAAA;AAAY,iBAAA;AAAE,aAAA;AAAE,SAAA;QACzI,CAAChB,gBAAAA,CAAiBG,OAAO,GAAG;AACxBgB,YAAAA,OAAAA,CAAQ,sBAAA,EAAwB;gBAC5BC,aAAAA,CAAc,qBAAA,EAAuB,wBAAwB,aAAA,EAAe,UAAA,CAAA;gBAC5EC,gBAAAA,CAAiB,wBAAA,CAAA;gBACjBD,aAAAA,CAAc,qBAAA,EAAuB,uBAAuB,aAAA,EAAe,QAAA;AAC9E,aAAA;AACJ;AACL,KAAA;IACAE,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAMC,gBAAAA,GAAqC;AAAC9B,IAAAA;;;;;"}
@@ -0,0 +1,11 @@
1
+ import { SceneElement } from '@cratis/scene.model';
2
+ import { ColumnDefinition } from './ColumnDefinition';
3
+ import { TableOptions } from './TableOptions';
4
+ export declare function columns(id: string, definitions: ColumnDefinition[]): SceneElement[];
5
+ export declare function dataPage(id: string, query: string, options: TableOptions, definitions: ColumnDefinition[]): SceneElement;
6
+ export declare function dataTable(id: string, query: string, options: TableOptions, definitions: ColumnDefinition[]): SceneElement;
7
+ export declare function observableDataTable(id: string, query: string, options: TableOptions, definitions: ColumnDefinition[]): SceneElement;
8
+ export declare const invoiceColumns: ColumnDefinition[];
9
+ export declare const adjustmentColumns: ColumnDefinition[];
10
+ export declare const invoiceTableOptions: TableOptions;
11
+ //# sourceMappingURL=dataElements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataElements.d.ts","sourceRoot":"","sources":["../../../templates/dataElements.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAInD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAmB9C,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,YAAY,EAAE,CAQnF;AAcD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,YAAY,CAExH;AAQD,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,YAAY,CAEzH;AAUD,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,YAAY,CAEnI;AAGD,eAAO,MAAM,cAAc,EAAE,gBAAgB,EAM5C,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EAI/C,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,YAIjC,CAAC"}