@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,141 @@
1
+ 'use strict';
2
+
3
+ // Copyright (c) Cratis. All rights reserved.
4
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
+ /**
6
+ * The seeded content the Arc-free composites in this package's templates render.
7
+ *
8
+ * There is a real split running through this blueprint, and it is worth naming rather than hiding. Most of
9
+ * `@cratis/components` is Arc-bound: a data page, a table, a command form and a command dialog all need a
10
+ * registered proxy and a live backend before they show anything, so at design time they are placeholders,
11
+ * and that is correct.
12
+ *
13
+ * The editors are not. A schema editor, a document editor, a navigational bar and a time machine all take
14
+ * their content from the property bag, so a template that seeds them renders as a working page with no
15
+ * backend at all. That is why the editor templates carry this data: it makes two of this package's pages
16
+ * genuinely usable in a preview, rather than eight pages of dashed boxes.
17
+ *
18
+ * The shape is an invoice throughout, matching the query and command names the other templates bind to, so
19
+ * the whole package reads as one small application rather than eight unrelated demonstrations.
20
+ */ /** A JSON schema in the shape Chronicle emits for an event type - what `schemaEditor` edits. */ const invoiceSchema = {
21
+ title: 'InvoiceRegistered',
22
+ type: 'object',
23
+ properties: {
24
+ number: {
25
+ type: 'string',
26
+ description: 'The invoice number as printed on the document.'
27
+ },
28
+ customer: {
29
+ type: 'string',
30
+ description: 'The customer the invoice is addressed to.'
31
+ },
32
+ issued: {
33
+ type: 'string',
34
+ format: 'date-time',
35
+ description: 'When the invoice was issued.'
36
+ },
37
+ amount: {
38
+ type: 'number',
39
+ description: 'The gross amount, in the invoice currency.'
40
+ },
41
+ currency: {
42
+ type: 'string',
43
+ description: 'The ISO currency code.'
44
+ }
45
+ }
46
+ };
47
+ /** One invoice as a plain document - what `objectContentEditor` renders against {@link invoiceSchema}. */ const invoiceDocument = {
48
+ number: 'INV-2043',
49
+ customer: 'Northwind Traders',
50
+ issued: '2026-01-05T09:30:00Z',
51
+ amount: 4200,
52
+ currency: 'USD'
53
+ };
54
+ /** Where in the document the navigational bar currently is. */ const invoiceNavigationPath = [
55
+ 'lines',
56
+ 'shipping'
57
+ ];
58
+ /**
59
+ * Successive versions of the invoice, for the time machine.
60
+ *
61
+ * Every entry has an id, a label and a parseable timestamp, because the adapter drops any that does not -
62
+ * a version invented at the epoch would not be a slightly wrong entry, it would silently reorder every
63
+ * real one around it.
64
+ */ const invoiceVersions = [
65
+ {
66
+ id: 'v3',
67
+ label: 'Adjustment recorded',
68
+ timestamp: '2026-01-12T14:05:00Z',
69
+ content: 'Amount reduced by 120.00 - damaged goods'
70
+ },
71
+ {
72
+ id: 'v2',
73
+ label: 'Approved',
74
+ timestamp: '2026-01-07T08:15:00Z',
75
+ content: 'Approved by Amelia Nyquist'
76
+ },
77
+ {
78
+ id: 'v1',
79
+ label: 'Registered',
80
+ timestamp: '2026-01-05T09:30:00Z',
81
+ content: 'Registered from the supplier portal'
82
+ }
83
+ ];
84
+ /** The filters the list templates offer, in the shape `filterPanel` reads. */ const invoiceFilters = [
85
+ {
86
+ key: 'status',
87
+ label: 'Status',
88
+ type: 'string',
89
+ multi: true,
90
+ options: [
91
+ {
92
+ key: 'draft',
93
+ label: 'Draft',
94
+ count: 12
95
+ },
96
+ {
97
+ key: 'approved',
98
+ label: 'Approved',
99
+ count: 44
100
+ },
101
+ {
102
+ key: 'paid',
103
+ label: 'Paid',
104
+ count: 108
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ key: 'amount',
110
+ label: 'Amount',
111
+ type: 'number',
112
+ buckets: 4
113
+ },
114
+ {
115
+ key: 'issued',
116
+ label: 'Issued',
117
+ type: 'date'
118
+ }
119
+ ];
120
+ /** The status choices a command form's dropdown offers. */ const statusOptions = [
121
+ {
122
+ label: 'Draft',
123
+ value: 'draft'
124
+ },
125
+ {
126
+ label: 'Approved',
127
+ value: 'approved'
128
+ },
129
+ {
130
+ label: 'Paid',
131
+ value: 'paid'
132
+ }
133
+ ];
134
+
135
+ exports.invoiceDocument = invoiceDocument;
136
+ exports.invoiceFilters = invoiceFilters;
137
+ exports.invoiceNavigationPath = invoiceNavigationPath;
138
+ exports.invoiceSchema = invoiceSchema;
139
+ exports.invoiceVersions = invoiceVersions;
140
+ exports.statusOptions = statusOptions;
141
+ //# sourceMappingURL=sampleData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sampleData.js","sources":["../../../templates/sampleData.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 seeded content the Arc-free composites in this package's templates render.\n *\n * There is a real split running through this blueprint, and it is worth naming rather than hiding. Most of\n * `@cratis/components` is Arc-bound: a data page, a table, a command form and a command dialog all need a\n * registered proxy and a live backend before they show anything, so at design time they are placeholders,\n * and that is correct.\n *\n * The editors are not. A schema editor, a document editor, a navigational bar and a time machine all take\n * their content from the property bag, so a template that seeds them renders as a working page with no\n * backend at all. That is why the editor templates carry this data: it makes two of this package's pages\n * genuinely usable in a preview, rather than eight pages of dashed boxes.\n *\n * The shape is an invoice throughout, matching the query and command names the other templates bind to, so\n * the whole package reads as one small application rather than eight unrelated demonstrations.\n */\n\n/** A JSON schema in the shape Chronicle emits for an event type - what `schemaEditor` edits. */\nexport const invoiceSchema: Record<string, unknown> = {\n title: 'InvoiceRegistered',\n type: 'object',\n properties: {\n number: { type: 'string', description: 'The invoice number as printed on the document.' },\n customer: { type: 'string', description: 'The customer the invoice is addressed to.' },\n issued: { type: 'string', format: 'date-time', description: 'When the invoice was issued.' },\n amount: { type: 'number', description: 'The gross amount, in the invoice currency.' },\n currency: { type: 'string', description: 'The ISO currency code.' },\n },\n};\n\n/** One invoice as a plain document - what `objectContentEditor` renders against {@link invoiceSchema}. */\nexport const invoiceDocument: Record<string, unknown> = {\n number: 'INV-2043',\n customer: 'Northwind Traders',\n issued: '2026-01-05T09:30:00Z',\n amount: 4200,\n currency: 'USD',\n};\n\n/** Where in the document the navigational bar currently is. */\nexport const invoiceNavigationPath: string[] = ['lines', 'shipping'];\n\n/**\n * Successive versions of the invoice, for the time machine.\n *\n * Every entry has an id, a label and a parseable timestamp, because the adapter drops any that does not -\n * a version invented at the epoch would not be a slightly wrong entry, it would silently reorder every\n * real one around it.\n */\nexport const invoiceVersions: Record<string, unknown>[] = [\n { id: 'v3', label: 'Adjustment recorded', timestamp: '2026-01-12T14:05:00Z', content: 'Amount reduced by 120.00 - damaged goods' },\n { id: 'v2', label: 'Approved', timestamp: '2026-01-07T08:15:00Z', content: 'Approved by Amelia Nyquist' },\n { id: 'v1', label: 'Registered', timestamp: '2026-01-05T09:30:00Z', content: 'Registered from the supplier portal' },\n];\n\n/** The filters the list templates offer, in the shape `filterPanel` reads. */\nexport const invoiceFilters: Record<string, unknown>[] = [\n {\n key: 'status',\n label: 'Status',\n type: 'string',\n multi: true,\n options: [\n { key: 'draft', label: 'Draft', count: 12 },\n { key: 'approved', label: 'Approved', count: 44 },\n { key: 'paid', label: 'Paid', count: 108 },\n ],\n },\n { key: 'amount', label: 'Amount', type: 'number', buckets: 4 },\n { key: 'issued', label: 'Issued', type: 'date' },\n];\n\n/** The status choices a command form's dropdown offers. */\nexport const statusOptions: { label: string; value: string }[] = [\n { label: 'Draft', value: 'draft' },\n { label: 'Approved', value: 'approved' },\n { label: 'Paid', value: 'paid' },\n];\n"],"names":["invoiceSchema","title","type","properties","number","description","customer","issued","format","amount","currency","invoiceDocument","invoiceNavigationPath","invoiceVersions","id","label","timestamp","content","invoiceFilters","key","multi","options","count","buckets","statusOptions","value"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;;AAeC,qGAGM,MAAMA,aAAAA,GAAyC;IAClDC,KAAAA,EAAO,mBAAA;IACPC,IAAAA,EAAM,QAAA;IACNC,UAAAA,EAAY;QACRC,MAAAA,EAAQ;YAAEF,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAAiD,SAAA;QACxFC,QAAAA,EAAU;YAAEJ,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAA4C,SAAA;QACrFE,MAAAA,EAAQ;YAAEL,IAAAA,EAAM,QAAA;YAAUM,MAAAA,EAAQ,WAAA;YAAaH,WAAAA,EAAa;AAA+B,SAAA;QAC3FI,MAAAA,EAAQ;YAAEP,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAA6C,SAAA;QACpFK,QAAAA,EAAU;YAAER,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAAyB;AACtE;AACJ;AAEA,2GACO,MAAMM,eAAAA,GAA2C;IACpDP,MAAAA,EAAQ,UAAA;IACRE,QAAAA,EAAU,mBAAA;IACVC,MAAAA,EAAQ,sBAAA;IACRE,MAAAA,EAAQ,IAAA;IACRC,QAAAA,EAAU;AACd;AAEA,gEACO,MAAME,qBAAAA,GAAkC;AAAC,IAAA,OAAA;AAAS,IAAA;;AAEzD;;;;;;UAOaC,eAAAA,GAA6C;AACtD,IAAA;QAAEC,EAAAA,EAAI,IAAA;QAAMC,KAAAA,EAAO,qBAAA;QAAuBC,SAAAA,EAAW,sBAAA;QAAwBC,OAAAA,EAAS;AAA2C,KAAA;AACjI,IAAA;QAAEH,EAAAA,EAAI,IAAA;QAAMC,KAAAA,EAAO,UAAA;QAAYC,SAAAA,EAAW,sBAAA;QAAwBC,OAAAA,EAAS;AAA6B,KAAA;AACxG,IAAA;QAAEH,EAAAA,EAAI,IAAA;QAAMC,KAAAA,EAAO,YAAA;QAAcC,SAAAA,EAAW,sBAAA;QAAwBC,OAAAA,EAAS;AAAsC;;AAGvH,+EACO,MAAMC,cAAAA,GAA4C;AACrD,IAAA;QACIC,GAAAA,EAAK,QAAA;QACLJ,KAAAA,EAAO,QAAA;QACPb,IAAAA,EAAM,QAAA;QACNkB,KAAAA,EAAO,IAAA;QACPC,OAAAA,EAAS;AACL,YAAA;gBAAEF,GAAAA,EAAK,OAAA;gBAASJ,KAAAA,EAAO,OAAA;gBAASO,KAAAA,EAAO;AAAG,aAAA;AAC1C,YAAA;gBAAEH,GAAAA,EAAK,UAAA;gBAAYJ,KAAAA,EAAO,UAAA;gBAAYO,KAAAA,EAAO;AAAG,aAAA;AAChD,YAAA;gBAAEH,GAAAA,EAAK,MAAA;gBAAQJ,KAAAA,EAAO,MAAA;gBAAQO,KAAAA,EAAO;AAAI;AAC5C;AACL,KAAA;AACA,IAAA;QAAEH,GAAAA,EAAK,QAAA;QAAUJ,KAAAA,EAAO,QAAA;QAAUb,IAAAA,EAAM,QAAA;QAAUqB,OAAAA,EAAS;AAAE,KAAA;AAC7D,IAAA;QAAEJ,GAAAA,EAAK,QAAA;QAAUJ,KAAAA,EAAO,QAAA;QAAUb,IAAAA,EAAM;AAAO;;AAGnD,4DACO,MAAMsB,aAAAA,GAAoD;AAC7D,IAAA;QAAET,KAAAA,EAAO,OAAA;QAASU,KAAAA,EAAO;AAAQ,KAAA;AACjC,IAAA;QAAEV,KAAAA,EAAO,UAAA;QAAYU,KAAAA,EAAO;AAAW,KAAA;AACvC,IAAA;QAAEV,KAAAA,EAAO,MAAA;QAAQU,KAAAA,EAAO;AAAO;;;;;;;;;;"}
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ var commandTemplates = require('./commandTemplates.js');
4
+ var editorTemplates = require('./editorTemplates.js');
5
+ var listTemplates = require('./listTemplates.js');
6
+ var nesting = require('./nesting.js');
7
+ var workspaceTemplates = require('./workspaceTemplates.js');
8
+
9
+ // Copyright (c) Cratis. All rights reserved.
10
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
11
+ /**
12
+ * The screen templates this blueprint provides.
13
+ *
14
+ * Eight whole pages that fill the application shell's `content` slot, plus the three-level chain that
15
+ * demonstrates how `fitsSlot` composes at module, feature and slice level. The list is what the manifest's
16
+ * `screenTemplates` names and what the bundle provides; `validatePackageBundle` proves the two agree.
17
+ */ const componentsScreenTemplates = [
18
+ ...listTemplates.listTemplates,
19
+ ...workspaceTemplates.workspaceTemplates,
20
+ ...commandTemplates.commandTemplates,
21
+ ...editorTemplates.editorTemplates,
22
+ ...nesting.nestingChainTemplates
23
+ ];
24
+ /**
25
+ * The eight templates that fill the application layout's own `content` slot directly.
26
+ *
27
+ * Kept apart from the nesting chain because `fitsSlot` is resolved against *the containers in scope*, and
28
+ * these two groups are never in scope together. Each of these is a whole page an application places on its
29
+ * own; the chain's three are one page assembled from three levels. Resolving them as one set would ask
30
+ * `resolveScreenTemplates` which of eight `body`-declaring templates the feature section belongs to, and it
31
+ * would rightly answer that it cannot tell.
32
+ */ const componentsPageTemplates = [
33
+ ...listTemplates.listTemplates,
34
+ ...workspaceTemplates.workspaceTemplates,
35
+ ...commandTemplates.commandTemplates,
36
+ ...editorTemplates.editorTemplates
37
+ ];
38
+
39
+ exports.componentsPageTemplates = componentsPageTemplates;
40
+ exports.componentsScreenTemplates = componentsScreenTemplates;
41
+ //# sourceMappingURL=screenTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenTemplates.js","sources":["../../../templates/screenTemplates.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 { commandTemplates } from './commandTemplates';\nimport { editorTemplates } from './editorTemplates';\nimport { listTemplates } from './listTemplates';\nimport { nestingChainTemplates } from './nesting';\nimport { workspaceTemplates } from './workspaceTemplates';\n\n/**\n * The screen templates this blueprint provides.\n *\n * Eight whole pages that fill the application shell's `content` slot, plus the three-level chain that\n * demonstrates how `fitsSlot` composes at module, feature and slice level. The list is what the manifest's\n * `screenTemplates` names and what the bundle provides; `validatePackageBundle` proves the two agree.\n */\nexport const componentsScreenTemplates: ScreenTemplate[] = [\n ...listTemplates,\n ...workspaceTemplates,\n ...commandTemplates,\n ...editorTemplates,\n ...nestingChainTemplates,\n];\n\n/**\n * The eight templates that fill the application layout's own `content` slot directly.\n *\n * Kept apart from the nesting chain because `fitsSlot` is resolved against *the containers in scope*, and\n * these two groups are never in scope together. Each of these is a whole page an application places on its\n * own; the chain's three are one page assembled from three levels. Resolving them as one set would ask\n * `resolveScreenTemplates` which of eight `body`-declaring templates the feature section belongs to, and it\n * would rightly answer that it cannot tell.\n */\nexport const componentsPageTemplates: ScreenTemplate[] = [...listTemplates, ...workspaceTemplates, ...commandTemplates, ...editorTemplates];\n"],"names":["componentsScreenTemplates","listTemplates","workspaceTemplates","commandTemplates","editorTemplates","nestingChainTemplates","componentsPageTemplates"],"mappings":";;;;;;;;AAAA;AACA;AASA;;;;;;UAOaA,yBAAAA,GAA8C;AACpDC,IAAAA,GAAAA,2BAAAA;AACAC,IAAAA,GAAAA,qCAAAA;AACAC,IAAAA,GAAAA,iCAAAA;AACAC,IAAAA,GAAAA,+BAAAA;AACAC,IAAAA,GAAAA;;AAGP;;;;;;;;UASaC,uBAAAA,GAA4C;AAAIL,IAAAA,GAAAA,2BAAAA;AAAkBC,IAAAA,GAAAA,qCAAAA;AAAuBC,IAAAA,GAAAA,iCAAAA;AAAqBC,IAAAA,GAAAA;;;;;;"}
@@ -0,0 +1,212 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
+ var dataElements = require('./dataElements.js');
6
+ var editorElements = require('./editorElements.js');
7
+ var elements = require('./elements.js');
8
+ var SampleBindingName = require('./SampleBindingName.js');
9
+
10
+ // Copyright (c) Cratis. All rights reserved.
11
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
12
+ /**
13
+ * The two whole-workspace shapes: a master-detail arrangement, and a dashboard of data widgets.
14
+ *
15
+ * Both are arrangements of *several* bindings rather than one, which is what separates them from the list
16
+ * templates. That is also what makes them the templates most worth shipping: an application can wire one
17
+ * query without help, and gets a page that looks like every other page in the product only if something
18
+ * has already decided how four of them sit together.
19
+ */ /** The columns of the revenue widget's query. */ const revenueColumns = [
20
+ {
21
+ field: 'month',
22
+ header: 'Month'
23
+ },
24
+ {
25
+ field: 'invoiced',
26
+ header: 'Invoiced'
27
+ },
28
+ {
29
+ field: 'collected',
30
+ header: 'Collected'
31
+ }
32
+ ];
33
+ /** The columns of the open-tickets widget's query. */ const ticketColumns = [
34
+ {
35
+ field: 'reference',
36
+ header: 'Reference'
37
+ },
38
+ {
39
+ field: 'subject',
40
+ header: 'Subject'
41
+ },
42
+ {
43
+ field: 'age',
44
+ header: 'Age'
45
+ }
46
+ ];
47
+ /** Table options for a widget-sized table, where there is no search box to filter across. */ const widgetTableOptions = {
48
+ emptyMessage: 'Nothing to show yet',
49
+ dataKey: 'id'
50
+ };
51
+ /**
52
+ * Master and detail: the list in the larger column, the selected record in the narrower one.
53
+ *
54
+ * The difference from `DataListWithDetailPage` is real and worth having both. That template is a whole
55
+ * `dataPage` - its own title bar, menubar and filtering - with a detail region added beside it. This one is
56
+ * a plain `dataTable` next to a detail region, which is the right shape when the page's chrome comes from
57
+ * the *feature* around it rather than from the list itself. Reaching for the wrong one shows up as a page
58
+ * with two toolbars.
59
+ *
60
+ * The grid collapses to a single column at a compact width, because a master and a detail side by side on a
61
+ * phone is the arrangement that made "master-detail does not work on mobile" a truism.
62
+ */ const masterDetailPageTemplate = {
63
+ name: 'MasterDetailPage',
64
+ fitsSlot: scene_blueprint_default.SlotName.Content,
65
+ slots: [
66
+ {
67
+ name: scene_blueprint_default.TemplateSlotName.Header
68
+ },
69
+ {
70
+ name: scene_blueprint_default.TemplateSlotName.Primary
71
+ },
72
+ {
73
+ name: scene_blueprint_default.TemplateSlotName.Secondary
74
+ }
75
+ ],
76
+ arrangement: {
77
+ root: scene_blueprint_default.column([
78
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Header),
79
+ scene_blueprint_default.grid([
80
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Primary, {
81
+ span: 2
82
+ }),
83
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Secondary)
84
+ ], 3, 16)
85
+ ]),
86
+ overrides: [
87
+ {
88
+ width: scene_model.WidthSizeClass.Compact,
89
+ root: scene_blueprint_default.column([
90
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Header),
91
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Primary),
92
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Secondary)
93
+ ], 16)
94
+ }
95
+ ]
96
+ },
97
+ content: {
98
+ [scene_blueprint_default.TemplateSlotName.Header]: [
99
+ elements.arcPageHeader('master-detail-header', {
100
+ title: 'Invoices',
101
+ subtitle: 'Pick an invoice on the left to inspect it on the right',
102
+ section: 'Billing',
103
+ query: SampleBindingName.SampleBindingName.AllInvoices
104
+ })
105
+ ],
106
+ [scene_blueprint_default.TemplateSlotName.Primary]: [
107
+ elements.page('master-detail-master', 'Invoices', [
108
+ dataElements.dataTable('master-detail-table', SampleBindingName.SampleBindingName.AllInvoices, dataElements.invoiceTableOptions, dataElements.invoiceColumns)
109
+ ])
110
+ ],
111
+ [scene_blueprint_default.TemplateSlotName.Secondary]: [
112
+ elements.page('master-detail-detail', 'Selected invoice', [
113
+ editorElements.objectContentEditor('master-detail-document', false),
114
+ editorElements.timeMachine('master-detail-history')
115
+ ])
116
+ ]
117
+ },
118
+ displayName: 'Master-detail page',
119
+ description: 'A queried list in the larger column with the selected record and its history in the narrower one.'
120
+ };
121
+ /**
122
+ * A dashboard of data widgets - four queries arranged so the page reads in the order people already read it.
123
+ *
124
+ * The composition is the one every template line settles on: a row of figures across the top, then a wide
125
+ * column and a narrow one. Copying it is the point rather than a shortcut - it is the arrangement the eye
126
+ * already knows how to scan, and a dashboard that invents its own costs the reader a moment on every visit.
127
+ *
128
+ * What this blueprint adds is that every widget is a *query*, not a picture. Each one names a proxy a host
129
+ * registers, so the dashboard is live the moment the application wires it, with nothing to replace.
130
+ */ const dashboardPageTemplate = {
131
+ name: 'DashboardPage',
132
+ fitsSlot: scene_blueprint_default.SlotName.Content,
133
+ slots: [
134
+ {
135
+ name: scene_blueprint_default.TemplateSlotName.Header
136
+ },
137
+ {
138
+ name: scene_blueprint_default.TemplateSlotName.Stats
139
+ },
140
+ {
141
+ name: scene_blueprint_default.TemplateSlotName.Primary
142
+ },
143
+ {
144
+ name: scene_blueprint_default.TemplateSlotName.Secondary
145
+ }
146
+ ],
147
+ arrangement: {
148
+ root: scene_blueprint_default.column([
149
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Header),
150
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Stats),
151
+ scene_blueprint_default.grid([
152
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Primary, {
153
+ span: 2
154
+ }),
155
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Secondary)
156
+ ], 3, 16)
157
+ ]),
158
+ overrides: [
159
+ {
160
+ width: scene_model.WidthSizeClass.Compact,
161
+ root: scene_blueprint_default.column([
162
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Header),
163
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Stats),
164
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Primary),
165
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Secondary)
166
+ ], 16)
167
+ }
168
+ ]
169
+ },
170
+ content: {
171
+ [scene_blueprint_default.TemplateSlotName.Header]: [
172
+ elements.arcPageHeader('dashboard-header', {
173
+ title: 'Billing',
174
+ subtitle: 'Four queries, arranged the way people already read a dashboard',
175
+ section: 'Operations',
176
+ query: SampleBindingName.SampleBindingName.RevenueByMonth
177
+ })
178
+ ],
179
+ [scene_blueprint_default.TemplateSlotName.Stats]: [
180
+ elements.page('dashboard-stat-revenue', 'Revenue by month', [
181
+ dataElements.dataTable('dashboard-stat-revenue-table', SampleBindingName.SampleBindingName.RevenueByMonth, widgetTableOptions, revenueColumns)
182
+ ]),
183
+ elements.page('dashboard-stat-flight', 'In flight', [
184
+ dataElements.observableDataTable('dashboard-stat-flight-table', SampleBindingName.SampleBindingName.InvoicesInFlight, widgetTableOptions, dataElements.invoiceColumns)
185
+ ]),
186
+ elements.page('dashboard-stat-tickets', 'Open tickets', [
187
+ dataElements.dataTable('dashboard-stat-tickets-table', SampleBindingName.SampleBindingName.OpenTickets, widgetTableOptions, ticketColumns)
188
+ ])
189
+ ],
190
+ [scene_blueprint_default.TemplateSlotName.Primary]: [
191
+ elements.page('dashboard-invoices', 'Recent invoices', [
192
+ dataElements.dataTable('dashboard-invoices-table', SampleBindingName.SampleBindingName.AllInvoices, dataElements.invoiceTableOptions, dataElements.invoiceColumns)
193
+ ])
194
+ ],
195
+ [scene_blueprint_default.TemplateSlotName.Secondary]: [
196
+ elements.page('dashboard-adjustments', 'Adjustments', [
197
+ dataElements.dataTable('dashboard-adjustments-table', SampleBindingName.SampleBindingName.AllAdjustments, widgetTableOptions, dataElements.adjustmentColumns)
198
+ ])
199
+ ]
200
+ },
201
+ displayName: 'Dashboard page',
202
+ description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.'
203
+ };
204
+ /** The two workspace-shaped templates. */ const workspaceTemplates = [
205
+ masterDetailPageTemplate,
206
+ dashboardPageTemplate
207
+ ];
208
+
209
+ exports.dashboardPageTemplate = dashboardPageTemplate;
210
+ exports.masterDetailPageTemplate = masterDetailPageTemplate;
211
+ exports.workspaceTemplates = workspaceTemplates;
212
+ //# sourceMappingURL=workspaceTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspaceTemplates.js","sources":["../../../templates/workspaceTemplates.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, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, grid, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { ColumnDefinition } from './ColumnDefinition';\nimport { adjustmentColumns, dataTable, invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { objectContentEditor, timeMachine } from './editorElements';\nimport { arcPageHeader, page } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { TableOptions } from './TableOptions';\n\n/**\n * The two whole-workspace shapes: a master-detail arrangement, and a dashboard of data widgets.\n *\n * Both are arrangements of *several* bindings rather than one, which is what separates them from the list\n * templates. That is also what makes them the templates most worth shipping: an application can wire one\n * query without help, and gets a page that looks like every other page in the product only if something\n * has already decided how four of them sit together.\n */\n\n/** The columns of the revenue widget's query. */\nconst revenueColumns: ColumnDefinition[] = [\n { field: 'month', header: 'Month' },\n { field: 'invoiced', header: 'Invoiced' },\n { field: 'collected', header: 'Collected' },\n];\n\n/** The columns of the open-tickets widget's query. */\nconst ticketColumns: ColumnDefinition[] = [\n { field: 'reference', header: 'Reference' },\n { field: 'subject', header: 'Subject' },\n { field: 'age', header: 'Age' },\n];\n\n/** Table options for a widget-sized table, where there is no search box to filter across. */\nconst widgetTableOptions: TableOptions = { emptyMessage: 'Nothing to show yet', dataKey: 'id' };\n\n/**\n * Master and detail: the list in the larger column, the selected record in the narrower one.\n *\n * The difference from `DataListWithDetailPage` is real and worth having both. That template is a whole\n * `dataPage` - its own title bar, menubar and filtering - with a detail region added beside it. This one is\n * a plain `dataTable` next to a detail region, which is the right shape when the page's chrome comes from\n * the *feature* around it rather than from the list itself. Reaching for the wrong one shows up as a page\n * with two toolbars.\n *\n * The grid collapses to a single column at a compact width, because a master and a detail side by side on a\n * phone is the arrangement that made \"master-detail does not work on mobile\" a truism.\n */\nexport const masterDetailPageTemplate: ScreenTemplate = {\n name: 'MasterDetailPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('master-detail-header', {\n title: 'Invoices',\n subtitle: 'Pick an invoice on the left to inspect it on the right',\n section: 'Billing',\n query: SampleBindingName.AllInvoices,\n }),\n ],\n [TemplateSlotName.Primary]: [\n page('master-detail-master', 'Invoices', [dataTable('master-detail-table', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)]),\n ],\n [TemplateSlotName.Secondary]: [\n page('master-detail-detail', 'Selected invoice', [\n objectContentEditor('master-detail-document', false),\n timeMachine('master-detail-history'),\n ]),\n ],\n },\n displayName: 'Master-detail page',\n description: 'A queried list in the larger column with the selected record and its history in the narrower one.',\n};\n\n/**\n * A dashboard of data widgets - four queries arranged so the page reads in the order people already read it.\n *\n * The composition is the one every template line settles on: a row of figures across the top, then a wide\n * column and a narrow one. Copying it is the point rather than a shortcut - it is the arrangement the eye\n * already knows how to scan, and a dashboard that invents its own costs the reader a moment on every visit.\n *\n * What this blueprint adds is that every widget is a *query*, not a picture. Each one names a proxy a host\n * registers, so the dashboard is live the moment the application wires it, with nothing to replace.\n */\nexport const dashboardPageTemplate: ScreenTemplate = {\n name: 'DashboardPage',\n fitsSlot: SlotName.Content,\n slots: [\n { name: TemplateSlotName.Header },\n { name: TemplateSlotName.Stats },\n { name: TemplateSlotName.Primary },\n { name: TemplateSlotName.Secondary },\n ],\n arrangement: {\n root: column([\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Stats),\n grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16),\n ]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column(\n [\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Stats),\n slotLeaf(TemplateSlotName.Primary),\n slotLeaf(TemplateSlotName.Secondary),\n ],\n 16,\n ),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('dashboard-header', {\n title: 'Billing',\n subtitle: 'Four queries, arranged the way people already read a dashboard',\n section: 'Operations',\n query: SampleBindingName.RevenueByMonth,\n }),\n ],\n [TemplateSlotName.Stats]: [\n page('dashboard-stat-revenue', 'Revenue by month', [\n dataTable('dashboard-stat-revenue-table', SampleBindingName.RevenueByMonth, widgetTableOptions, revenueColumns),\n ]),\n page('dashboard-stat-flight', 'In flight', [\n observableDataTable('dashboard-stat-flight-table', SampleBindingName.InvoicesInFlight, widgetTableOptions, invoiceColumns),\n ]),\n page('dashboard-stat-tickets', 'Open tickets', [\n dataTable('dashboard-stat-tickets-table', SampleBindingName.OpenTickets, widgetTableOptions, ticketColumns),\n ]),\n ],\n [TemplateSlotName.Primary]: [\n page('dashboard-invoices', 'Recent invoices', [\n dataTable('dashboard-invoices-table', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n page('dashboard-adjustments', 'Adjustments', [\n dataTable('dashboard-adjustments-table', SampleBindingName.AllAdjustments, widgetTableOptions, adjustmentColumns),\n ]),\n ],\n },\n displayName: 'Dashboard page',\n description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.',\n};\n\n/** The two workspace-shaped templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [masterDetailPageTemplate, dashboardPageTemplate];\n"],"names":["revenueColumns","field","header","ticketColumns","widgetTableOptions","emptyMessage","dataKey","masterDetailPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","arcPageHeader","title","subtitle","section","query","SampleBindingName","AllInvoices","page","dataTable","invoiceTableOptions","invoiceColumns","objectContentEditor","timeMachine","displayName","description","dashboardPageTemplate","Stats","RevenueByMonth","observableDataTable","InvoicesInFlight","OpenTickets","AllAdjustments","adjustmentColumns","workspaceTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAWA;;;;;;;sDAUA,MAAMA,cAAAA,GAAqC;AACvC,IAAA;QAAEC,KAAAA,EAAO,OAAA;QAASC,MAAAA,EAAQ;AAAQ,KAAA;AAClC,IAAA;QAAED,KAAAA,EAAO,UAAA;QAAYC,MAAAA,EAAQ;AAAW,KAAA;AACxC,IAAA;QAAED,KAAAA,EAAO,WAAA;QAAaC,MAAAA,EAAQ;AAAY;AAC7C,CAAA;AAED,uDACA,MAAMC,aAAAA,GAAoC;AACtC,IAAA;QAAEF,KAAAA,EAAO,WAAA;QAAaC,MAAAA,EAAQ;AAAY,KAAA;AAC1C,IAAA;QAAED,KAAAA,EAAO,SAAA;QAAWC,MAAAA,EAAQ;AAAU,KAAA;AACtC,IAAA;QAAED,KAAAA,EAAO,KAAA;QAAOC,MAAAA,EAAQ;AAAM;AACjC,CAAA;AAED,8FACA,MAAME,kBAAAA,GAAmC;IAAEC,YAAAA,EAAc,qBAAA;IAAuBC,OAAAA,EAAS;AAAK,CAAA;AAE9F;;;;;;;;;;;UAYaC,wBAAAA,GAA2C;IACpDC,IAAAA,EAAM,kBAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,Q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AACJ,SAAA;QACD,CAACzB,wCAAAA,CAAiBG,SAAS,GAAG;AAC1BmB,YAAAA,aAAAA,CAAK,yBAAyB,aAAA,EAAe;AACzCC,gBAAAA,sBAAAA,CAAU,6BAAA,EAA+BH,mCAAAA,CAAkBgB,cAAc,EAAE7C,kBAAAA,EAAoB8C,8BAAAA;AAClG,aAAA;AACJ;AACL,KAAA;IACAT,WAAAA,EAAa,gBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,2CACO,MAAMS,kBAAAA,GAAuC;AAAC5C,IAAAA,wBAAAA;AAA0BoC,IAAAA;;;;;;;"}
@@ -0,0 +1,4 @@
1
+ export declare enum BorrowedComponentName {
2
+ Column = "column"
3
+ }
4
+ //# sourceMappingURL=BorrowedComponentName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BorrowedComponentName.d.ts","sourceRoot":"","sources":["../../BorrowedComponentName.ts"],"names":[],"mappings":"AAkBA,oBAAY,qBAAqB;IAE7B,MAAM,WAAW;CACpB"}
@@ -0,0 +1,23 @@
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
+ * Names this blueprint's templates reference that come from neither `Cratis.Components` nor itself.
5
+ *
6
+ * There is one, and it is worth stating why rather than leaving it as a bare string in a builder.
7
+ *
8
+ * `Cratis.Components`' data table and data page take their columns as children - the library's own
9
+ * documentation says the columns arrive in the `content` slot - but the library declares no `column` name
10
+ * of its own, because its tables are `DataTableForQuery` wrapping PrimeReact's `DataTable`, and a column
11
+ * is PrimeReact's `Column`. So a template that wants a table with real columns has to name PrimeReact's,
12
+ * and this blueprint's manifest declares PrimeReact as a dependency partly for that reason.
13
+ *
14
+ * It is checked the same way every other borrowed name in this repository is: against the owning
15
+ * package's own manifest, by a spec, rather than assumed. The default blueprint learned that the hard way
16
+ * when it referenced `chart` and `fileUpload`, which neither library declares.
17
+ */ var BorrowedComponentName = /*#__PURE__*/ function(BorrowedComponentName) {
18
+ /** PrimeReact's `Column` - one column of a data table, given a `field` and a `header`. */ BorrowedComponentName["Column"] = "column";
19
+ return BorrowedComponentName;
20
+ }({});
21
+
22
+ export { BorrowedComponentName };
23
+ //# sourceMappingURL=BorrowedComponentName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BorrowedComponentName.js","sources":["../../BorrowedComponentName.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 * Names this blueprint's templates reference that come from neither `Cratis.Components` nor itself.\n *\n * There is one, and it is worth stating why rather than leaving it as a bare string in a builder.\n *\n * `Cratis.Components`' data table and data page take their columns as children - the library's own\n * documentation says the columns arrive in the `content` slot - but the library declares no `column` name\n * of its own, because its tables are `DataTableForQuery` wrapping PrimeReact's `DataTable`, and a column\n * is PrimeReact's `Column`. So a template that wants a table with real columns has to name PrimeReact's,\n * and this blueprint's manifest declares PrimeReact as a dependency partly for that reason.\n *\n * It is checked the same way every other borrowed name in this repository is: against the owning\n * package's own manifest, by a spec, rather than assumed. The default blueprint learned that the hard way\n * when it referenced `chart` and `fileUpload`, which neither library declares.\n */\nexport enum BorrowedComponentName {\n /** PrimeReact's `Column` - one column of a data table, given a `field` and a `header`. */\n Column = 'column',\n}\n"],"names":["BorrowedComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;IAeO,IAAKA,qBAAAA,iBAAAA,SAAAA,qBAAAA,EAAAA;+FACgF,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAA;AADhFA,IAAAA,OAAAA,qBAAAA;AAGX,CAAA,CAAA,EAAA;;;;"}
@@ -0,0 +1,4 @@
1
+ export declare enum ComponentName {
2
+ ArcPageHeader = "arcPageHeader"
3
+ }
4
+ //# sourceMappingURL=ComponentName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentName.d.ts","sourceRoot":"","sources":["../../ComponentName.ts"],"names":[],"mappings":"AAeA,oBAAY,aAAa;IAUrB,aAAa,kBAAkB;CAClC"}
@@ -0,0 +1,28 @@
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 bare names this package declares components under.
5
+ *
6
+ * There is exactly one, and that is the design rather than an unfinished list. This blueprint's value is
7
+ * in its **templates** - a `dataPage` already wired to a query, a `commandForm` page with its action bar -
8
+ * and a template is data a host can rearrange. A component is code it cannot. So the rule this package
9
+ * holds itself to is: register a component only when a template's content tree genuinely cannot express
10
+ * the composition, and reach for a template every other time. A blueprint whose value sat in its
11
+ * components rather than its templates would have misunderstood its job.
12
+ *
13
+ * {@link ArcPageHeader} is the one thing that clears that bar. Everything else in this package is a tree.
14
+ */ var ComponentName = /*#__PURE__*/ function(ComponentName) {
15
+ /**
16
+ * A page header that derives its heading, its subtitle and its breadcrumb trail from **one** binding
17
+ * name, and reports whether that binding is registered.
18
+ *
19
+ * A content tree cannot do this. It can hold a title, a subtitle and a trail as three literals, but
20
+ * it cannot *derive* them from a single `query`/`command` property, and it certainly cannot look that
21
+ * name up in the binding registry to say whether a host has wired it. Both are behavior at render
22
+ * time, not structure - which is exactly the line this package uses to decide what earns a component.
23
+ */ ComponentName["ArcPageHeader"] = "arcPageHeader";
24
+ return ComponentName;
25
+ }({});
26
+
27
+ export { ComponentName };
28
+ //# sourceMappingURL=ComponentName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentName.js","sources":["../../ComponentName.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 bare names this package declares components under.\n *\n * There is exactly one, and that is the design rather than an unfinished list. This blueprint's value is\n * in its **templates** - a `dataPage` already wired to a query, a `commandForm` page with its action bar -\n * and a template is data a host can rearrange. A component is code it cannot. So the rule this package\n * holds itself to is: register a component only when a template's content tree genuinely cannot express\n * the composition, and reach for a template every other time. A blueprint whose value sat in its\n * components rather than its templates would have misunderstood its job.\n *\n * {@link ArcPageHeader} is the one thing that clears that bar. Everything else in this package is a tree.\n */\nexport enum ComponentName {\n /**\n * A page header that derives its heading, its subtitle and its breadcrumb trail from **one** binding\n * name, and reports whether that binding is registered.\n *\n * A content tree cannot do this. It can hold a title, a subtitle and a trail as three literals, but\n * it cannot *derive* them from a single `query`/`command` property, and it certainly cannot look that\n * name up in the binding registry to say whether a host has wired it. Both are behavior at render\n * time, not structure - which is exactly the line this package uses to decide what earns a component.\n */\n ArcPageHeader = 'arcPageHeader',\n}\n"],"names":["ComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;IAYO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;AACR;;;;;;;;AAQC,QAAA,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;AATOA,IAAAA,OAAAA,aAAAA;AAWX,CAAA,CAAA,EAAA;;;;"}
@@ -0,0 +1,28 @@
1
+ export declare enum CompositeName {
2
+ Page = "page",
3
+ DataPage = "dataPage",
4
+ DataTable = "dataTable",
5
+ ObservableDataTable = "observableDataTable",
6
+ CommandForm = "commandForm",
7
+ InputTextField = "inputTextField",
8
+ NumberField = "numberField",
9
+ TextAreaField = "textAreaField",
10
+ DropdownField = "dropdownField",
11
+ CalendarField = "calendarField",
12
+ Dialog = "dialog",
13
+ CommandDialog = "commandDialog",
14
+ BusyIndicatorDialog = "busyIndicatorDialog",
15
+ Icon = "icon",
16
+ Dropdown = "dropdown",
17
+ ErrorBoundary = "errorBoundary",
18
+ ObjectContentEditor = "objectContentEditor",
19
+ ObjectNavigationalBar = "objectNavigationalBar",
20
+ SchemaEditor = "schemaEditor",
21
+ TimeMachine = "timeMachine",
22
+ FilterPanel = "filterPanel",
23
+ Toolbar = "toolbar",
24
+ ToolbarButton = "toolbarButton",
25
+ ToolbarGroup = "toolbarGroup",
26
+ ToolbarSeparator = "toolbarSeparator"
27
+ }
28
+ //# sourceMappingURL=CompositeName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompositeName.d.ts","sourceRoot":"","sources":["../../CompositeName.ts"],"names":[],"mappings":"AAqBA,oBAAY,aAAa;IAErB,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,SAAS,cAAc;IAGvB,mBAAmB,wBAAwB;IAG3C,WAAW,gBAAgB;IAG3B,cAAc,mBAAmB;IAGjC,WAAW,gBAAgB;IAG3B,aAAa,kBAAkB;IAG/B,aAAa,kBAAkB;IAG/B,aAAa,kBAAkB;IAG/B,MAAM,WAAW;IAGjB,aAAa,kBAAkB;IAG/B,mBAAmB,wBAAwB;IAG3C,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,aAAa,kBAAkB;IAG/B,mBAAmB,wBAAwB;IAG3C,qBAAqB,0BAA0B;IAG/C,YAAY,iBAAiB;IAG7B,WAAW,gBAAgB;IAG3B,WAAW,gBAAgB;IAG3B,OAAO,YAAY;IAGnB,aAAa,kBAAkB;IAG/B,YAAY,iBAAiB;IAG7B,gBAAgB,qBAAqB;CACxC"}
@@ -0,0 +1,50 @@
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 `Cratis.Components` names this blueprint's templates are built from.
5
+ *
6
+ * These are not this package's names - `Cratis.Components` declares every one of them, and this blueprint
7
+ * only writes them into its templates. They are collected here anyway, for two reasons.
8
+ *
9
+ * The first is the ordinary one: a bare name written inline is a magic string, and a typo in it renders as
10
+ * a dashed red box in the middle of a screen with nothing pointing back at the template that caused it.
11
+ *
12
+ * The second is what makes this worth an enum rather than a comment. A spec asserts that every member
13
+ * below appears in `cratisComponentsPackageManifest.components`, so this file is a standing check that
14
+ * this blueprint and the component library it is built from still agree. If a name is ever renamed
15
+ * upstream, that spec fails here rather than a screen failing silently in someone's application.
16
+ *
17
+ * A screen template writes bare names on purpose: `resolveComponentName` decides which active package
18
+ * wins each one against the profile's priority order, so a template that qualified its names would pin
19
+ * itself to one library and stop being a template.
20
+ */ var CompositeName = /*#__PURE__*/ function(CompositeName) {
21
+ /** The library's page primitive - a full-height column whose optional panel chrome matches everything inside it. */ CompositeName["Page"] = "page";
22
+ /** The whole list-screen composite: title bar, menubar, filterable table and optional details pane, all from one query. */ CompositeName["DataPage"] = "dataPage";
23
+ /** A table that performs a query, pages against the server, and wires filtering and sorting back into it. */ CompositeName["DataTable"] = "dataTable";
24
+ /** The live variant - an observable query, a WebSocket subscription, and a re-render when the read model changes. */ CompositeName["ObservableDataTable"] = "observableDataTable";
25
+ /** A form generated from a command's own property descriptors, so it follows the command rather than going stale. */ CompositeName["CommandForm"] = "commandForm";
26
+ /** A single-line text field bound to one command property. */ CompositeName["InputTextField"] = "inputTextField";
27
+ /** A numeric field bound to one command property. */ CompositeName["NumberField"] = "numberField";
28
+ /** A multi-line text field bound to one command property. */ CompositeName["TextAreaField"] = "textAreaField";
29
+ /** A single-selection field over a list the screen carries inline. */ CompositeName["DropdownField"] = "dropdownField";
30
+ /** A date field bound to one command property. */ CompositeName["CalendarField"] = "calendarField";
31
+ /** The Arc-aware dialog, whose result resolves through Arc's dialog context rather than through `visible` state. */ CompositeName["Dialog"] = "dialog";
32
+ /** A dialog whose confirm button *is* the command's execution - it submits, feeds validation back, and only closes on success. */ CompositeName["CommandDialog"] = "commandDialog";
33
+ /** The blocking spinner shown while a long-running command is in flight. */ CompositeName["BusyIndicatorDialog"] = "busyIndicatorDialog";
34
+ /** An icon, with the shorthand forms people actually write normalized into the class PrimeIcons expects. */ CompositeName["Icon"] = "icon";
35
+ /** A standalone selection control, not bound to a command property. */ CompositeName["Dropdown"] = "dropdown";
36
+ /** Scopes a failure to a region, so one broken widget does not take the screen with it. */ CompositeName["ErrorBoundary"] = "errorBoundary";
37
+ /** Renders an arbitrary JSON document against its schema, with a control per declared type. */ CompositeName["ObjectContentEditor"] = "objectContentEditor";
38
+ /** The trail that says where you are inside a nested document, and lets you climb back out. */ CompositeName["ObjectNavigationalBar"] = "objectNavigationalBar";
39
+ /** Edits a JSON schema as a typed property tree rather than as text. */ CompositeName["SchemaEditor"] = "schemaEditor";
40
+ /** Scrubs through successive versions of something on a timeline. */ CompositeName["TimeMachine"] = "timeMachine";
41
+ /** The filter toggle and the panel it anchors, as one placeable element. */ CompositeName["FilterPanel"] = "filterPanel";
42
+ /** The container for a tool palette, which also establishes the drag context its buttons read. */ CompositeName["Toolbar"] = "toolbar";
43
+ /** One button in a tool palette. */ CompositeName["ToolbarButton"] = "toolbarButton";
44
+ /** Related buttons kept together inside a toolbar. */ CompositeName["ToolbarGroup"] = "toolbarGroup";
45
+ /** The divider between groups of tools. */ CompositeName["ToolbarSeparator"] = "toolbarSeparator";
46
+ return CompositeName;
47
+ }({});
48
+
49
+ export { CompositeName };
50
+ //# sourceMappingURL=CompositeName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompositeName.js","sources":["../../CompositeName.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 `Cratis.Components` names this blueprint's templates are built from.\n *\n * These are not this package's names - `Cratis.Components` declares every one of them, and this blueprint\n * only writes them into its templates. They are collected here anyway, for two reasons.\n *\n * The first is the ordinary one: a bare name written inline is a magic string, and a typo in it renders as\n * a dashed red box in the middle of a screen with nothing pointing back at the template that caused it.\n *\n * The second is what makes this worth an enum rather than a comment. A spec asserts that every member\n * below appears in `cratisComponentsPackageManifest.components`, so this file is a standing check that\n * this blueprint and the component library it is built from still agree. If a name is ever renamed\n * upstream, that spec fails here rather than a screen failing silently in someone's application.\n *\n * A screen template writes bare names on purpose: `resolveComponentName` decides which active package\n * wins each one against the profile's priority order, so a template that qualified its names would pin\n * itself to one library and stop being a template.\n */\nexport enum CompositeName {\n /** The library's page primitive - a full-height column whose optional panel chrome matches everything inside it. */\n Page = 'page',\n\n /** The whole list-screen composite: title bar, menubar, filterable table and optional details pane, all from one query. */\n DataPage = 'dataPage',\n\n /** A table that performs a query, pages against the server, and wires filtering and sorting back into it. */\n DataTable = 'dataTable',\n\n /** The live variant - an observable query, a WebSocket subscription, and a re-render when the read model changes. */\n ObservableDataTable = 'observableDataTable',\n\n /** A form generated from a command's own property descriptors, so it follows the command rather than going stale. */\n CommandForm = 'commandForm',\n\n /** A single-line text field bound to one command property. */\n InputTextField = 'inputTextField',\n\n /** A numeric field bound to one command property. */\n NumberField = 'numberField',\n\n /** A multi-line text field bound to one command property. */\n TextAreaField = 'textAreaField',\n\n /** A single-selection field over a list the screen carries inline. */\n DropdownField = 'dropdownField',\n\n /** A date field bound to one command property. */\n CalendarField = 'calendarField',\n\n /** The Arc-aware dialog, whose result resolves through Arc's dialog context rather than through `visible` state. */\n Dialog = 'dialog',\n\n /** A dialog whose confirm button *is* the command's execution - it submits, feeds validation back, and only closes on success. */\n CommandDialog = 'commandDialog',\n\n /** The blocking spinner shown while a long-running command is in flight. */\n BusyIndicatorDialog = 'busyIndicatorDialog',\n\n /** An icon, with the shorthand forms people actually write normalized into the class PrimeIcons expects. */\n Icon = 'icon',\n\n /** A standalone selection control, not bound to a command property. */\n Dropdown = 'dropdown',\n\n /** Scopes a failure to a region, so one broken widget does not take the screen with it. */\n ErrorBoundary = 'errorBoundary',\n\n /** Renders an arbitrary JSON document against its schema, with a control per declared type. */\n ObjectContentEditor = 'objectContentEditor',\n\n /** The trail that says where you are inside a nested document, and lets you climb back out. */\n ObjectNavigationalBar = 'objectNavigationalBar',\n\n /** Edits a JSON schema as a typed property tree rather than as text. */\n SchemaEditor = 'schemaEditor',\n\n /** Scrubs through successive versions of something on a timeline. */\n TimeMachine = 'timeMachine',\n\n /** The filter toggle and the panel it anchors, as one placeable element. */\n FilterPanel = 'filterPanel',\n\n /** The container for a tool palette, which also establishes the drag context its buttons read. */\n Toolbar = 'toolbar',\n\n /** One button in a tool palette. */\n ToolbarButton = 'toolbarButton',\n\n /** Related buttons kept together inside a toolbar. */\n ToolbarGroup = 'toolbarGroup',\n\n /** The divider between groups of tools. */\n ToolbarSe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