@cratis/scene.components 3.5.0 → 3.7.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 (162) hide show
  1. package/README.md +56 -5
  2. package/bindings/bindingRegistry.ts +52 -4
  3. package/bindings/for_bindingRegistry/when_registering_query_identities.ts +81 -0
  4. package/bindings/for_requireArcProxy/when_mounting_bound_adapters.tsx +4 -2
  5. package/cratisComponents.ts +2 -0
  6. package/cratisComponentsPackage.ts +2 -1
  7. package/data/SingleResultRuntime.tsx +17 -3
  8. package/data/for_SceneDataTable/when_forwarding_query_arguments.tsx +19 -0
  9. package/dist/cjs/bindings/bindingRegistry.js +52 -4
  10. package/dist/cjs/bindings/bindingRegistry.js.map +1 -1
  11. package/dist/cjs/cratisComponents.js +2 -0
  12. package/dist/cjs/cratisComponents.js.map +1 -1
  13. package/dist/cjs/cratisComponentsPackage.js +2 -1
  14. package/dist/cjs/cratisComponentsPackage.js.map +1 -1
  15. package/dist/cjs/data/SingleResultRuntime.js +16 -1
  16. package/dist/cjs/data/SingleResultRuntime.js.map +1 -1
  17. package/dist/cjs/forms/CommandFormRuntime.js +81 -0
  18. package/dist/cjs/forms/CommandFormRuntime.js.map +1 -0
  19. package/dist/cjs/forms/CommandFormSubmit.js +19 -0
  20. package/dist/cjs/forms/CommandFormSubmit.js.map +1 -0
  21. package/dist/cjs/forms/ExplicitCommandField.js +109 -0
  22. package/dist/cjs/forms/ExplicitCommandField.js.map +1 -0
  23. package/dist/cjs/forms/SceneCommandForm.js +26 -21
  24. package/dist/cjs/forms/SceneCommandForm.js.map +1 -1
  25. package/dist/cjs/forms/SceneQueryInputForm.js +141 -0
  26. package/dist/cjs/forms/SceneQueryInputForm.js.map +1 -0
  27. package/dist/cjs/forms/commandInputs.js +35 -0
  28. package/dist/cjs/forms/commandInputs.js.map +1 -0
  29. package/dist/cjs/forms/queryInputs.js +50 -0
  30. package/dist/cjs/forms/queryInputs.js.map +1 -0
  31. package/dist/cjs/index.js +6 -0
  32. package/dist/cjs/index.js.map +1 -1
  33. package/dist/esm/bindings/bindingRegistry.d.ts +4 -0
  34. package/dist/esm/bindings/bindingRegistry.d.ts.map +1 -1
  35. package/dist/esm/bindings/bindingRegistry.js +49 -5
  36. package/dist/esm/bindings/bindingRegistry.js.map +1 -1
  37. package/dist/esm/bindings/for_bindingRegistry/when_registering_query_identities.d.ts +2 -0
  38. package/dist/esm/bindings/for_bindingRegistry/when_registering_query_identities.d.ts.map +1 -0
  39. package/dist/esm/bindings/for_bindingRegistry/when_registering_query_identities.js +73 -0
  40. package/dist/esm/bindings/for_bindingRegistry/when_registering_query_identities.js.map +1 -0
  41. package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.js +2 -2
  42. package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.js.map +1 -1
  43. package/dist/esm/cratisComponents.d.ts.map +1 -1
  44. package/dist/esm/cratisComponents.js +2 -0
  45. package/dist/esm/cratisComponents.js.map +1 -1
  46. package/dist/esm/cratisComponentsPackage.d.ts.map +1 -1
  47. package/dist/esm/cratisComponentsPackage.js +2 -1
  48. package/dist/esm/cratisComponentsPackage.js.map +1 -1
  49. package/dist/esm/data/SingleResultRuntime.d.ts +2 -1
  50. package/dist/esm/data/SingleResultRuntime.d.ts.map +1 -1
  51. package/dist/esm/data/SingleResultRuntime.js +16 -1
  52. package/dist/esm/data/SingleResultRuntime.js.map +1 -1
  53. package/dist/esm/data/for_SceneDataTable/when_forwarding_query_arguments.js +17 -0
  54. package/dist/esm/data/for_SceneDataTable/when_forwarding_query_arguments.js.map +1 -1
  55. package/dist/esm/for_cratisComponentsPackage/when_declaring_command_form_peers.d.ts +2 -0
  56. package/dist/esm/for_cratisComponentsPackage/when_declaring_command_form_peers.d.ts.map +1 -0
  57. package/dist/esm/for_cratisComponentsPackage/when_declaring_command_form_peers.js +16 -0
  58. package/dist/esm/for_cratisComponentsPackage/when_declaring_command_form_peers.js.map +1 -0
  59. package/dist/esm/for_cratisComponentsPackage/when_describing_query_input_form.d.ts +2 -0
  60. package/dist/esm/for_cratisComponentsPackage/when_describing_query_input_form.d.ts.map +1 -0
  61. package/dist/esm/for_cratisComponentsPackage/when_describing_query_input_form.js +14 -0
  62. package/dist/esm/for_cratisComponentsPackage/when_describing_query_input_form.js.map +1 -0
  63. package/dist/esm/forms/CommandFormRuntime.d.ts +11 -0
  64. package/dist/esm/forms/CommandFormRuntime.d.ts.map +1 -0
  65. package/dist/esm/forms/CommandFormRuntime.js +77 -0
  66. package/dist/esm/forms/CommandFormRuntime.js.map +1 -0
  67. package/dist/esm/forms/CommandFormSubmit.d.ts +6 -0
  68. package/dist/esm/forms/CommandFormSubmit.d.ts.map +1 -0
  69. package/dist/esm/forms/CommandFormSubmit.js +17 -0
  70. package/dist/esm/forms/CommandFormSubmit.js.map +1 -0
  71. package/dist/esm/forms/ExplicitCommandField.d.ts +5 -0
  72. package/dist/esm/forms/ExplicitCommandField.d.ts.map +1 -0
  73. package/dist/esm/forms/ExplicitCommandField.js +107 -0
  74. package/dist/esm/forms/ExplicitCommandField.js.map +1 -0
  75. package/dist/esm/forms/SceneCommandForm.d.ts.map +1 -1
  76. package/dist/esm/forms/SceneCommandForm.js +27 -22
  77. package/dist/esm/forms/SceneCommandForm.js.map +1 -1
  78. package/dist/esm/forms/SceneQueryInputForm.d.ts +3 -0
  79. package/dist/esm/forms/SceneQueryInputForm.d.ts.map +1 -0
  80. package/dist/esm/forms/SceneQueryInputForm.js +139 -0
  81. package/dist/esm/forms/SceneQueryInputForm.js.map +1 -0
  82. package/dist/esm/forms/commandInputs.d.ts +7 -0
  83. package/dist/esm/forms/commandInputs.d.ts.map +1 -0
  84. package/dist/esm/forms/commandInputs.js +33 -0
  85. package/dist/esm/forms/commandInputs.js.map +1 -0
  86. package/dist/esm/forms/for_SceneCommandForm/given/RecordNote.d.ts +22 -0
  87. package/dist/esm/forms/for_SceneCommandForm/given/RecordNote.d.ts.map +1 -0
  88. package/dist/esm/forms/for_SceneCommandForm/given/RecordNote.js +30 -0
  89. package/dist/esm/forms/for_SceneCommandForm/given/RecordNote.js.map +1 -0
  90. package/dist/esm/forms/for_SceneCommandForm/given/StartProject.d.ts +32 -0
  91. package/dist/esm/forms/for_SceneCommandForm/given/StartProject.d.ts.map +1 -0
  92. package/dist/esm/forms/for_SceneCommandForm/given/StartProject.js +32 -0
  93. package/dist/esm/forms/for_SceneCommandForm/given/StartProject.js.map +1 -0
  94. package/dist/esm/forms/for_SceneCommandForm/when_forwarding_to_the_lazy_runtime.d.ts +2 -0
  95. package/dist/esm/forms/for_SceneCommandForm/when_forwarding_to_the_lazy_runtime.d.ts.map +1 -0
  96. package/dist/esm/forms/for_SceneCommandForm/when_forwarding_to_the_lazy_runtime.js +66 -0
  97. package/dist/esm/forms/for_SceneCommandForm/when_forwarding_to_the_lazy_runtime.js.map +1 -0
  98. package/dist/esm/forms/for_SceneCommandForm/when_native_custom_field_errors_block_submission.d.ts +2 -0
  99. package/dist/esm/forms/for_SceneCommandForm/when_native_custom_field_errors_block_submission.d.ts.map +1 -0
  100. package/dist/esm/forms/for_SceneCommandForm/when_native_custom_field_errors_block_submission.js +26 -0
  101. package/dist/esm/forms/for_SceneCommandForm/when_native_custom_field_errors_block_submission.js.map +1 -0
  102. package/dist/esm/forms/for_SceneCommandForm/when_preserving_guid_error_ownership.d.ts +2 -0
  103. package/dist/esm/forms/for_SceneCommandForm/when_preserving_guid_error_ownership.d.ts.map +1 -0
  104. package/dist/esm/forms/for_SceneCommandForm/when_preserving_guid_error_ownership.js +44 -0
  105. package/dist/esm/forms/for_SceneCommandForm/when_preserving_guid_error_ownership.js.map +1 -0
  106. package/dist/esm/forms/for_SceneCommandForm/when_rendering_submit_in_native_context.d.ts +2 -0
  107. package/dist/esm/forms/for_SceneCommandForm/when_rendering_submit_in_native_context.d.ts.map +1 -0
  108. package/dist/esm/forms/for_SceneCommandForm/when_rendering_submit_in_native_context.js +49 -0
  109. package/dist/esm/forms/for_SceneCommandForm/when_rendering_submit_in_native_context.js.map +1 -0
  110. package/dist/esm/forms/for_SceneCommandForm/when_submitting_explicit_inputs.d.ts +2 -0
  111. package/dist/esm/forms/for_SceneCommandForm/when_submitting_explicit_inputs.d.ts.map +1 -0
  112. package/dist/esm/forms/for_SceneCommandForm/when_submitting_explicit_inputs.js +176 -0
  113. package/dist/esm/forms/for_SceneCommandForm/when_submitting_explicit_inputs.js.map +1 -0
  114. package/dist/esm/forms/for_SceneCommandForm/when_submitting_the_native_form.d.ts +2 -0
  115. package/dist/esm/forms/for_SceneCommandForm/when_submitting_the_native_form.d.ts.map +1 -0
  116. package/dist/esm/forms/for_SceneCommandForm/when_submitting_the_native_form.js +110 -0
  117. package/dist/esm/forms/for_SceneCommandForm/when_submitting_the_native_form.js.map +1 -0
  118. package/dist/esm/forms/for_SceneQueryInputForm/ProjectLookup.d.ts +26 -0
  119. package/dist/esm/forms/for_SceneQueryInputForm/ProjectLookup.d.ts.map +1 -0
  120. package/dist/esm/forms/for_SceneQueryInputForm/ProjectLookup.js +44 -0
  121. package/dist/esm/forms/for_SceneQueryInputForm/ProjectLookup.js.map +1 -0
  122. package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.d.ts +2 -0
  123. package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.d.ts.map +1 -0
  124. package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.js +175 -0
  125. package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.js.map +1 -0
  126. package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_native_queries.d.ts +2 -0
  127. package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_native_queries.d.ts.map +1 -0
  128. package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_native_queries.js +413 -0
  129. package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_native_queries.js.map +1 -0
  130. package/dist/esm/forms/index.d.ts +2 -0
  131. package/dist/esm/forms/index.d.ts.map +1 -1
  132. package/dist/esm/forms/index.js +1 -0
  133. package/dist/esm/forms/index.js.map +1 -1
  134. package/dist/esm/forms/queryInputs.d.ts +10 -0
  135. package/dist/esm/forms/queryInputs.d.ts.map +1 -0
  136. package/dist/esm/forms/queryInputs.js +47 -0
  137. package/dist/esm/forms/queryInputs.js.map +1 -0
  138. package/dist/esm/index.js +2 -1
  139. package/dist/esm/index.js.map +1 -1
  140. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  141. package/for_cratisComponentsPackage/when_declaring_command_form_peers.ts +26 -0
  142. package/for_cratisComponentsPackage/when_describing_query_input_form.ts +17 -0
  143. package/forms/CommandFormRuntime.tsx +71 -0
  144. package/forms/CommandFormSubmit.tsx +16 -0
  145. package/forms/ExplicitCommandField.tsx +86 -0
  146. package/forms/SceneCommandForm.tsx +30 -27
  147. package/forms/SceneQueryInputForm.tsx +79 -0
  148. package/forms/commandInputs.ts +29 -0
  149. package/forms/for_SceneCommandForm/given/RecordNote.ts +37 -0
  150. package/forms/for_SceneCommandForm/given/StartProject.ts +41 -0
  151. package/forms/for_SceneCommandForm/when_forwarding_to_the_lazy_runtime.tsx +69 -0
  152. package/forms/for_SceneCommandForm/when_native_custom_field_errors_block_submission.tsx +33 -0
  153. package/forms/for_SceneCommandForm/when_preserving_guid_error_ownership.tsx +50 -0
  154. package/forms/for_SceneCommandForm/when_rendering_submit_in_native_context.tsx +56 -0
  155. package/forms/for_SceneCommandForm/when_submitting_explicit_inputs.tsx +189 -0
  156. package/forms/for_SceneCommandForm/when_submitting_the_native_form.tsx +120 -0
  157. package/forms/for_SceneQueryInputForm/ProjectLookup.ts +54 -0
  158. package/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.tsx +188 -0
  159. package/forms/for_SceneQueryInputForm/when_submitting_native_queries.tsx +423 -0
  160. package/forms/index.ts +2 -0
  161. package/forms/queryInputs.ts +50 -0
  162. package/package.json +17 -13
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponents.js","sources":["../../cratisComponents.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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';\nimport { SceneDataPage, SceneFormElement, ScenePage } from './pages';\nimport { SceneDataTable, SceneObservableDataTable, SceneSingleResult } from './data';\nimport {\n SceneCalendarField,\n SceneCheckboxField,\n SceneChipsField,\n SceneColorPickerField,\n SceneCommandForm,\n SceneDropdownField,\n SceneInputTextField,\n SceneMultiSelectField,\n SceneNumberField,\n SceneRadioButtonField,\n SceneRadioGroupField,\n SceneSliderField,\n SceneTextAreaField,\n} from './forms';\nimport { SceneBusyIndicatorDialog, SceneCommandDialog, SceneConfirmationDialog, SceneDialog, SceneStepperCommandDialog } from './dialogs';\nimport { SceneDropdown, SceneErrorBoundary, SceneIcon, SceneTooltip } from './common';\nimport { SceneFilterPanel, SceneObjectContentEditor, SceneObjectNavigationalBar, SceneSchemaEditor, SceneTimeMachine } from './editors';\nimport { SceneToolbar, SceneToolbarButton, SceneToolbarGroup, SceneToolbarSeparator } from './toolbar';\n\n/**\n * The package name every component here is registered under, and the one a screen writes when it\n * qualifies a name explicitly (`Cratis.Components.table`).\n */\nexport const cratisComponentsPackageName = 'Cratis.Components';\n\n/**\n * The `Cratis.Components` package's component registry - the abstract names a screen can resolve to a\n * real `@cratis/components` component.\n *\n * Names are `lowerCamelCase` and deliberately *abstract*: a screen names `dataTable`, not\n * `DataTableForQuery`, so the same screen resolves against whichever package a profile ranks highest.\n * Two of them - `table` and `dialog` - are names `core` and `PrimeReact` also declare, and that overlap\n * is the point: a profile listing `core`, `PrimeReact`, `Cratis.Components` in that order resolves both\n * here and records the others as shadowed, which is override priority doing exactly what it exists for.\n *\n * `table` and `dataTable` are the same component under two names. `dataTable` says what it is; `table`\n * is what a screen written against the base vocabulary already says, and both should land on the\n * query-aware implementation.\n */\nexport const cratisComponents: ComponentRegistry = {\n [componentRegistryKey(cratisComponentsPackageName, 'page')]: ScenePage,\n [componentRegistryKey(cratisComponentsPackageName, 'dataPage')]: SceneDataPage,\n [componentRegistryKey(cratisComponentsPackageName, 'formElement')]: SceneFormElement,\n\n [componentRegistryKey(cratisComponentsPackageName, 'singleResult')]: SceneSingleResult,\n [componentRegistryKey(cratisComponentsPackageName, 'dataTable')]: SceneDataTable,\n [componentRegistryKey(cratisComponentsPackageName, 'table')]: SceneDataTable,\n [componentRegistryKey(cratisComponentsPackageName, 'observableDataTable')]: SceneObservableDataTable,\n\n [componentRegistryKey(cratisComponentsPackageName, 'commandForm')]: SceneCommandForm,\n [componentRegistryKey(cratisComponentsPackageName, 'inputTextField')]: SceneInputTextField,\n [componentRegistryKey(cratisComponentsPackageName, 'numberField')]: SceneNumberField,\n [componentRegistryKey(cratisComponentsPackageName, 'checkboxField')]: SceneCheckboxField,\n [componentRegistryKey(cratisComponentsPackageName, 'textAreaField')]: SceneTextAreaField,\n [componentRegistryKey(cratisComponentsPackageName, 'dropdownField')]: SceneDropdownField,\n [componentRegistryKey(cratisComponentsPackageName, 'sliderField')]: SceneSliderField,\n [componentRegistryKey(cratisComponentsPackageName, 'calendarField')]: SceneCalendarField,\n [componentRegistryKey(cratisComponentsPackageName, 'colorPickerField')]: SceneColorPickerField,\n [componentRegistryKey(cratisComponentsPackageName, 'multiSelectField')]: SceneMultiSelectField,\n [componentRegistryKey(cratisComponentsPackageName, 'chipsField')]: SceneChipsField,\n [componentRegistryKey(cratisComponentsPackageName, 'radioButtonField')]: SceneRadioButtonField,\n [componentRegistryKey(cratisComponentsPackageName, 'radioGroupField')]: SceneRadioGroupField,\n\n [componentRegistryKey(cratisComponentsPackageName, 'dialog')]: SceneDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'confirmationDialog')]: SceneConfirmationDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'busyIndicatorDialog')]: SceneBusyIndicatorDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'commandDialog')]: SceneCommandDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'stepperCommandDialog')]: SceneStepperCommandDialog,\n\n [componentRegistryKey(cratisComponentsPackageName, 'icon')]: SceneIcon,\n [componentRegistryKey(cratisComponentsPackageName, 'tooltip')]: SceneTooltip,\n [componentRegistryKey(cratisComponentsPackageName, 'dropdown')]: SceneDropdown,\n [componentRegistryKey(cratisComponentsPackageName, 'errorBoundary')]: SceneErrorBoundary,\n\n [componentRegistryKey(cratisComponentsPackageName, 'objectContentEditor')]: SceneObjectContentEditor,\n [componentRegistryKey(cratisComponentsPackageName, 'objectNavigationalBar')]: SceneObjectNavigationalBar,\n [componentRegistryKey(cratisComponentsPackageName, 'schemaEditor')]: SceneSchemaEditor,\n [componentRegistryKey(cratisComponentsPackageName, 'timeMachine')]: SceneTimeMachine,\n [componentRegistryKey(cratisComponentsPackageName, 'filterPanel')]: SceneFilterPanel,\n\n [componentRegistryKey(cratisComponentsPackageName, 'toolbar')]: SceneToolbar,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarButton')]: SceneToolbarButton,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarGroup')]: SceneToolbarGroup,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarSeparator')]: SceneToolbarSeparator,\n};\n"],"names":["cratisComponentsPackageName","cratisComponents","componentRegistryKey","ScenePage","SceneDataPage","SceneFormElement","SceneSingleResult","SceneDataTable","SceneObservableDataTable","SceneCommandForm","SceneInputTextField","SceneNumberField","SceneCheckboxField","SceneTextAreaField","SceneDropdownField","SceneSliderField","SceneCalendarField","SceneColorPickerField","SceneMultiSelectField","SceneChipsField","SceneRadioButtonField","SceneRadioGroupField","SceneDialog","SceneConfirmationDialog","SceneBusyIndicatorDialog","SceneCommandDialog","SceneStepperCommandDialog","SceneIcon","SceneTooltip","SceneDropdown","SceneErrorBoundary","SceneObjectContentEditor","SceneObjectNavigationalBar","SceneSchemaEditor","SceneTimeMachine","SceneFilterPanel","SceneToolbar","SceneToolbarButton","Sce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A,EAA6B,uBAAA,CAAA,GAA2BgC,0BAAAA;IAC9E,CAAC9B,oBAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBiC,iBAAAA;IACrE,CAAC/B,oBAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBkC,gBAAAA;IACpE,CAAChC,oBAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBmC,gBAAAA;IAEpE,CAACjC,oBAAAA,CAAqBF,2BAAAA,EAA6B,SAAA,CAAA,GAAaoC,YAAAA;IAChE,CAAClC,oBAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBqC,kBAAAA;IACtE,CAACnC,oBAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBsC,iBAAAA;IACrE,CAACpC,oBAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBuC;AAC7E;;"}
1
+ {"version":3,"file":"cratisComponents.js","sources":["../../cratisComponents.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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';\nimport { SceneDataPage, SceneFormElement, ScenePage } from './pages';\nimport { SceneDataTable, SceneObservableDataTable, SceneSingleResult } from './data';\nimport {\n SceneCalendarField,\n SceneCheckboxField,\n SceneChipsField,\n SceneColorPickerField,\n SceneCommandForm,\n SceneQueryInputForm,\n SceneDropdownField,\n SceneInputTextField,\n SceneMultiSelectField,\n SceneNumberField,\n SceneRadioButtonField,\n SceneRadioGroupField,\n SceneSliderField,\n SceneTextAreaField,\n} from './forms';\nimport { SceneBusyIndicatorDialog, SceneCommandDialog, SceneConfirmationDialog, SceneDialog, SceneStepperCommandDialog } from './dialogs';\nimport { SceneDropdown, SceneErrorBoundary, SceneIcon, SceneTooltip } from './common';\nimport { SceneFilterPanel, SceneObjectContentEditor, SceneObjectNavigationalBar, SceneSchemaEditor, SceneTimeMachine } from './editors';\nimport { SceneToolbar, SceneToolbarButton, SceneToolbarGroup, SceneToolbarSeparator } from './toolbar';\n\n/**\n * The package name every component here is registered under, and the one a screen writes when it\n * qualifies a name explicitly (`Cratis.Components.table`).\n */\nexport const cratisComponentsPackageName = 'Cratis.Components';\n\n/**\n * The `Cratis.Components` package's component registry - the abstract names a screen can resolve to a\n * real `@cratis/components` component.\n *\n * Names are `lowerCamelCase` and deliberately *abstract*: a screen names `dataTable`, not\n * `DataTableForQuery`, so the same screen resolves against whichever package a profile ranks highest.\n * Two of them - `table` and `dialog` - are names `core` and `PrimeReact` also declare, and that overlap\n * is the point: a profile listing `core`, `PrimeReact`, `Cratis.Components` in that order resolves both\n * here and records the others as shadowed, which is override priority doing exactly what it exists for.\n *\n * `table` and `dataTable` are the same component under two names. `dataTable` says what it is; `table`\n * is what a screen written against the base vocabulary already says, and both should land on the\n * query-aware implementation.\n */\nexport const cratisComponents: ComponentRegistry = {\n [componentRegistryKey(cratisComponentsPackageName, 'page')]: ScenePage,\n [componentRegistryKey(cratisComponentsPackageName, 'dataPage')]: SceneDataPage,\n [componentRegistryKey(cratisComponentsPackageName, 'formElement')]: SceneFormElement,\n\n [componentRegistryKey(cratisComponentsPackageName, 'singleResult')]: SceneSingleResult,\n [componentRegistryKey(cratisComponentsPackageName, 'dataTable')]: SceneDataTable,\n [componentRegistryKey(cratisComponentsPackageName, 'table')]: SceneDataTable,\n [componentRegistryKey(cratisComponentsPackageName, 'observableDataTable')]: SceneObservableDataTable,\n\n [componentRegistryKey(cratisComponentsPackageName, 'queryInputForm')]: SceneQueryInputForm,\n [componentRegistryKey(cratisComponentsPackageName, 'commandForm')]: SceneCommandForm,\n [componentRegistryKey(cratisComponentsPackageName, 'inputTextField')]: SceneInputTextField,\n [componentRegistryKey(cratisComponentsPackageName, 'numberField')]: SceneNumberField,\n [componentRegistryKey(cratisComponentsPackageName, 'checkboxField')]: SceneCheckboxField,\n [componentRegistryKey(cratisComponentsPackageName, 'textAreaField')]: SceneTextAreaField,\n [componentRegistryKey(cratisComponentsPackageName, 'dropdownField')]: SceneDropdownField,\n [componentRegistryKey(cratisComponentsPackageName, 'sliderField')]: SceneSliderField,\n [componentRegistryKey(cratisComponentsPackageName, 'calendarField')]: SceneCalendarField,\n [componentRegistryKey(cratisComponentsPackageName, 'colorPickerField')]: SceneColorPickerField,\n [componentRegistryKey(cratisComponentsPackageName, 'multiSelectField')]: SceneMultiSelectField,\n [componentRegistryKey(cratisComponentsPackageName, 'chipsField')]: SceneChipsField,\n [componentRegistryKey(cratisComponentsPackageName, 'radioButtonField')]: SceneRadioButtonField,\n [componentRegistryKey(cratisComponentsPackageName, 'radioGroupField')]: SceneRadioGroupField,\n\n [componentRegistryKey(cratisComponentsPackageName, 'dialog')]: SceneDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'confirmationDialog')]: SceneConfirmationDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'busyIndicatorDialog')]: SceneBusyIndicatorDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'commandDialog')]: SceneCommandDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'stepperCommandDialog')]: SceneStepperCommandDialog,\n\n [componentRegistryKey(cratisComponentsPackageName, 'icon')]: SceneIcon,\n [componentRegistryKey(cratisComponentsPackageName, 'tooltip')]: SceneTooltip,\n [componentRegistryKey(cratisComponentsPackageName, 'dropdown')]: SceneDropdown,\n [componentRegistryKey(cratisComponentsPackageName, 'errorBoundary')]: SceneErrorBoundary,\n\n [componentRegistryKey(cratisComponentsPackageName, 'objectContentEditor')]: SceneObjectContentEditor,\n [componentRegistryKey(cratisComponentsPackageName, 'objectNavigationalBar')]: SceneObjectNavigationalBar,\n [componentRegistryKey(cratisComponentsPackageName, 'schemaEditor')]: SceneSchemaEditor,\n [componentRegistryKey(cratisComponentsPackageName, 'timeMachine')]: SceneTimeMachine,\n [componentRegistryKey(cratisComponentsPackageName, 'filterPanel')]: SceneFilterPanel,\n\n [componentRegistryKey(cratisComponentsPackageName, 'toolbar')]: SceneToolbar,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarButton')]: SceneToolbarButton,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarGroup')]: SceneToolbarGroup,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarSeparator')]: SceneToolbarSeparator,\n};\n"],"names":["cratisComponentsPackageName","cratisComponents","componentRegistryKey","ScenePage","SceneDataPage","SceneFormElement","SceneSingleResult","SceneDataTable","SceneObservableDataTable","SceneQueryInputForm","SceneCommandForm","SceneInputTextField","SceneNumberField","SceneCheckboxField","SceneTextAreaField","SceneDropdownField","SceneSliderField","SceneCalendarField","SceneColorPickerField","SceneMultiSelectField","SceneChipsField","SceneRadioButtonField","SceneRadioGroupField","SceneDialog","SceneConfirmationDialog","SceneBusyIndicatorDialog","SceneCommandDialog","SceneStepperCommandDialog","SceneIcon","SceneTooltip","SceneDropdown","SceneErrorBoundary","SceneObjectContentEditor","SceneObjectNavigationalBar","SceneSchemaEditor","SceneTimeMachine","SceneFilterPanel","SceneToolbar","SceneToolbarButton","SceneToolbarGroup","SceneToolbarSeparator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA0BA;;;IAIO,MAAMA,2BAAAA,GAA8B;AAE3C;;;;;;;;;;;;;UAcaC,gBAAAA,GAAsC;IAC/C,CAACC,oBAAAA,CAAqBF,2BAAAA,EAA6B,MAAA,CAAA,GAAUG,SAAAA;IAC7D,CAACD,oBAAAA,CAAqBF,2BAAAA,EAA6B,UAAA,CAAA,GAAcI,aAAAA;IACjE,CAACF,oBAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBK,gBAAAA;IAEpE,CAACH,oBAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBM,iBAAAA;IACrE,CAACJ,oBAAAA,CAAqBF,2BAAAA,EAA6B,WAAA,CAAA,GAAeO,cAAAA;IAClE,CAAC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AAA,GAAkBuC,iBAAAA;IACrE,CAACrC,oBAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBwC;AAC7E;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsPackage.d.ts","sourceRoot":"","sources":["../../cratisComponentsPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAsBzD,eAAO,MAAM,+BAA+B,EAAE,YAqE7C,CAAC;AASF,eAAO,MAAM,uBAAuB,EAAE,kBAGrC,CAAC"}
1
+ {"version":3,"file":"cratisComponentsPackage.d.ts","sourceRoot":"","sources":["../../cratisComponentsPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAsBzD,eAAO,MAAM,+BAA+B,EAAE,YAsE7C,CAAC;AASF,eAAO,MAAM,uBAAuB,EAAE,kBAGrC,CAAC"}
@@ -40,6 +40,7 @@ import { cratisComponents, cratisComponentsPackageName } from './cratisComponent
40
40
  'dataPage',
41
41
  'formElement',
42
42
  'singleResult',
43
+ 'queryInputForm',
43
44
  'dataTable',
44
45
  'table',
45
46
  'observableDataTable',
@@ -89,7 +90,7 @@ import { cratisComponents, cratisComponentsPackageName } from './cratisComponent
89
90
  // Shipping a theme here would be this library asserting a look it was specifically built not to have.
90
91
  themes: [],
91
92
  displayName: 'Cratis Components',
92
- description: "Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true.",
93
+ description: "Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.",
93
94
  module: '@cratis/scene.components',
94
95
  license: 'MIT',
95
96
  licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'singleResult',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true.\",\n module: '@cratis/scene.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents"],"mappings":";;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,2BAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,kUAAA;IACbC,MAAAA,EAAQ,0BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY;AAChB;;"}
1
+ {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'singleResult',\n 'queryInputForm',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.\",\n module: '@cratis/scene.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents"],"mappings":";;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,2BAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,gBAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,6bAAA;IACbC,MAAAA,EAAQ,0BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY;AAChB;;"}
@@ -3,7 +3,8 @@ interface Props {
3
3
  query: BoundConstructor;
4
4
  queryArguments: Record<string, unknown>;
5
5
  resultField: string;
6
+ stringInputs?: boolean;
6
7
  }
7
- export default function SingleResultRuntime({ query, queryArguments, resultField }: Props): import("react").JSX.Element;
8
+ export default function SingleResultRuntime({ query, queryArguments, resultField, stringInputs }: Props): import("react").JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=SingleResultRuntime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SingleResultRuntime.d.ts","sourceRoot":"","sources":["../../../data/SingleResultRuntime.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,UAAU,KAAK;IACX,KAAK,EAAE,gBAAgB,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;CACvB;AAQD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,KAAK,+BAmExF"}
1
+ {"version":3,"file":"SingleResultRuntime.d.ts","sourceRoot":"","sources":["../../../data/SingleResultRuntime.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,UAAU,KAAK;IACX,KAAK,EAAE,gBAAgB,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IAEpB,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAQD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,YAAoB,EAAE,EAAE,KAAK,+BA8E9G"}
@@ -1,12 +1,13 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useContext, useMemo, useState, useEffect } from 'react';
3
3
  import { ArcContext } from '@cratis/arc.react';
4
+ import { Guid } from '@cratis/fundamentals';
4
5
  import { SingleResultStatus } from './SingleResultStatus.js';
5
6
 
6
7
  /**
7
8
  * Private execution owner. Arc owns validation, routing, HTTP and deserialization; this component
8
9
  * owns only request lifetime and presentation. No shared cache can hand B the result belonging to A.
9
- */ function SingleResultRuntime({ query, queryArguments, resultField }) {
10
+ */ function SingleResultRuntime({ query, queryArguments, resultField, stringInputs = false }) {
10
11
  const arc = useContext(ArcContext);
11
12
  const { microservice, apiBasePath, origin, httpHeadersCallback, queryVersion } = arc;
12
13
  // Identity is deliberate: hosts replace immutable committed arguments rather than mutating them.
@@ -14,6 +15,7 @@ import { SingleResultStatus } from './SingleResultStatus.js';
14
15
  query,
15
16
  queryArguments,
16
17
  resultField,
18
+ stringInputs,
17
19
  microservice,
18
20
  apiBasePath,
19
21
  origin,
@@ -23,6 +25,7 @@ import { SingleResultStatus } from './SingleResultStatus.js';
23
25
  query,
24
26
  queryArguments,
25
27
  resultField,
28
+ stringInputs,
26
29
  microservice,
27
30
  apiBasePath,
28
31
  origin,
@@ -50,6 +53,18 @@ import { SingleResultStatus } from './SingleResultStatus.js';
50
53
  });
51
54
  return;
52
55
  }
56
+ // Arc perform does not validate argument-to-descriptor types. The form supports only
57
+ // scalar String/Guid inputs, matched by exact name and constructor, never by naming
58
+ // convention. This check is lazy and form-only; singleResult's host contract is intact.
59
+ if (request.stringInputs && !Object.entries(request.queryArguments).every(([name, value])=>{
60
+ const descriptors = instance.parameterDescriptors.filter((descriptor)=>descriptor.name === name);
61
+ return typeof value === 'string' && descriptors.length === 1 && !descriptors[0].isEnumerable && (descriptors[0].type === String || descriptors[0].type === Guid);
62
+ })) {
63
+ publish({
64
+ state: 'failure'
65
+ });
66
+ return;
67
+ }
53
68
  instance.setMicroservice(request.microservice);
54
69
  instance.setApiBasePath(request.apiBasePath ?? '');
55
70
  instance.setOrigin(request.origin ?? '');
@@ -1 +1 @@
1
- {"version":3,"file":"SingleResultRuntime.js","sources":["../../../data/SingleResultRuntime.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 { useContext, useEffect, useMemo, useState } from 'react';\nimport { ArcContext } from '@cratis/arc.react';\nimport type { QueryFor } from '@cratis/arc/queries';\nimport type { BoundConstructor } from '../bindings/BoundConstructor';\nimport { SingleResultStatus } from './SingleResultStatus';\n\ninterface Props {\n query: BoundConstructor;\n queryArguments: Record<string, unknown>;\n resultField: string;\n}\n\ntype Outcome = { state: 'failure' | 'notFound' } | { state: 'success'; value: string };\n\n/**\n * Private execution owner. Arc owns validation, routing, HTTP and deserialization; this component\n * owns only request lifetime and presentation. No shared cache can hand B the result belonging to A.\n */\nexport default function SingleResultRuntime({ query, queryArguments, resultField }: Props) {\n const arc = useContext(ArcContext);\n const { microservice, apiBasePath, origin, httpHeadersCallback, queryVersion } = arc;\n // Identity is deliberate: hosts replace immutable committed arguments rather than mutating them.\n const request = useMemo(() => ({ query, queryArguments, resultField, microservice, apiBasePath, origin, httpHeadersCallback, queryVersion }),\n [query, queryArguments, resultField, microservice, apiBasePath, origin, httpHeadersCallback, queryVersion]);\n const [settled, setSettled] = useState<{ request: typeof request; outcome: Outcome }>();\n\n useEffect(() => {\n // Each effect setup is a generation, including StrictMode's setup/cleanup/setup replay.\n let current = true;\n let instance: QueryFor<unknown, Record<string, unknown>> | undefined;\n const publish = (outcome: Outcome) => {\n if (current) setSettled({ request, outcome });\n };\n const execute = async () => {\n try {\n // The registry intentionally stores constructors without an eager Arc dependency.\n instance = new request.query() as QueryFor<unknown, Record<string, unknown>>;\n if (instance.enumerable !== false) {\n publish({ state: 'failure' });\n return;\n }\n instance.setMicroservice(request.microservice);\n instance.setApiBasePath(request.apiBasePath ?? '');\n instance.setOrigin(request.origin ?? '');\n instance.setHttpHeadersCallback(request.httpHeadersCallback ?? (() => ({})));\n // Native perform validates required arguments and proxy rules before HTTP. No copying,\n // defaults, business validation, route construction or array wrapping happens here.\n const result = await instance.perform(request.queryArguments);\n if (!current) return;\n if (result.isSuccess !== true || result.isAuthorized !== true || result.isValid !== true || result.hasExceptions !== false || result.isReady === false) {\n publish({ state: 'failure' });\n return;\n }\n if (result.data === null || result.data === undefined) {\n publish({ state: 'notFound' });\n return;\n }\n if (typeof result.data !== 'object' || Array.isArray(result.data)) {\n publish({ state: 'failure' });\n return;\n }\n // Only one own data field, never a path, inherited member, getter or expression.\n const descriptor = Object.getOwnPropertyDescriptor(result.data, request.resultField);\n const value: unknown = descriptor && 'value' in descriptor ? descriptor.value : undefined;\n if (typeof value === 'string' || typeof value === 'boolean' || (typeof value === 'number' && Number.isFinite(value))) {\n publish({ state: 'success', value: String(value) });\n } else {\n publish({ state: 'failure' });\n }\n } catch {\n // Includes native AbortError rejections. Disposed generations cannot publish or leak\n // an unhandled promise, even when the HTTP boundary ignores cancellation.\n publish({ state: 'failure' });\n }\n };\n void execute();\n return () => {\n current = false;\n instance?.abortController?.abort();\n };\n }, [request]);\n\n // Mask old data during the render that changes inputs, before effect cleanup/setup runs.\n if (settled?.request !== request) return <SingleResultStatus state='loading' />;\n return <SingleResultStatus {...settled.outcome} />;\n}\n"],"names":["SingleResultRuntime","query","queryArguments","resultField","arc","useContext","ArcContext","microservice","apiBasePath","origin","httpHeadersCallback","queryVersion","request","useMemo","settled","setSettled","useState","useEffect","current","instance","publish","outcome","execute","enumerable","state","setMicroservice","setApiBasePath","setOrigin","setHttpHeadersCallback","result","perform","isSuccess","isAuthorized","isValid","hasExceptions","isReady","data","undefined","Array","isArray","descriptor","Object","getOwnPropertyDescriptor","value","Number","isFinite","String","abortController","abort","_jsx","SingleResultStatus"],"mappings":";;;;;AAiBA;;;IAIe,SAASA,mBAAAA,CAAoB,EAAEC,KAAK,EAAEC,cAAc,EAAEC,WAAW,EAAS,EAAA;AACrF,IAAA,MAAMC,MAAMC,UAAAA,CAAWC,UAAAA,CAAAA;IACvB,MAAM,EAAEC,YAAY,EAAEC,WAAW,EAAEC,MAAM,EAAEC,mBAAmB,EAAEC,YAAY,EAAE,GAAGP,GAAAA;;IAEjF,MAAMQ,OAAAA,GAAUC,OAAAA,CAAQ,KAAO;AAAEZ,YAAAA,KAAAA;AAAOC,YAAAA,cAAAA;AAAgBC,YAAAA,WAAAA;AAAaI,YAAAA,YAAAA;AAAcC,YAAAA,WAAAA;AAAaC,YAAAA,MAAAA;AAAQC,YAAAA,mBAAAA;AAAqBC,YAAAA;AAAa,SAAA,CAAA,EACtI;AAACV,QAAAA,KAAAA;AAAOC,QAAAA,cAAAA;AAAgBC,QAAAA,WAAAA;AAAaI,QAAAA,YAAAA;AAAcC,QAAAA,WAAAA;AAAaC,QAAAA,MAAAA;AAAQC,QAAAA,mBAAAA;AAAqBC,QAAAA;AAAa,KAAA,CAAA;IAC9G,MAAM,CAACG,OAAAA,EAASC,UAAA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A,EAAAA;AAC/B,QAAA,CAAA;IACJ,CAAA,EAAG;AAACpC,QAAAA;AAAQ,KAAA,CAAA;;AAGZ,IAAA,IAAIE,OAAAA,EAASF,OAAAA,KAAYA,OAAAA,EAAS,qBAAOqC,GAAA,CAACC,kBAAAA,EAAAA;QAAmB1B,KAAAA,EAAM;;AACnE,IAAA,qBAAOyB,GAAA,CAACC,kBAAAA,EAAAA;AAAoB,QAAA,GAAGpC,QAAQO;;AAC3C;;"}
1
+ {"version":3,"file":"SingleResultRuntime.js","sources":["../../../data/SingleResultRuntime.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 { useContext, useEffect, useMemo, useState } from 'react';\nimport { ArcContext } from '@cratis/arc.react';\nimport type { QueryFor } from '@cratis/arc/queries';\nimport { Guid } from '@cratis/fundamentals';\nimport type { BoundConstructor } from '../bindings/BoundConstructor';\nimport { SingleResultStatus } from './SingleResultStatus';\n\ninterface Props {\n query: BoundConstructor;\n queryArguments: Record<string, unknown>;\n resultField: string;\n /** queryInputForm alone opts into scalar String/Guid descriptor mapping; no value conversion. */\n stringInputs?: boolean;\n}\n\ntype Outcome = { state: 'failure' | 'notFound' } | { state: 'success'; value: string };\n\n/**\n * Private execution owner. Arc owns validation, routing, HTTP and deserialization; this component\n * owns only request lifetime and presentation. No shared cache can hand B the result belonging to A.\n */\nexport default function SingleResultRuntime({ query, queryArguments, resultField, stringInputs = false }: Props) {\n const arc = useContext(ArcContext);\n const { microservice, apiBasePath, origin, httpHeadersCallback, queryVersion } = arc;\n // Identity is deliberate: hosts replace immutable committed arguments rather than mutating them.\n const request = useMemo(() => ({ query, queryArguments, resultField, stringInputs, microservice, apiBasePath, origin, httpHeadersCallback, queryVersion }),\n [query, queryArguments, resultField, stringInputs, microservice, apiBasePath, origin, httpHeadersCallback, queryVersion]);\n const [settled, setSettled] = useState<{ request: typeof request; outcome: Outcome }>();\n\n useEffect(() => {\n // Each effect setup is a generation, including StrictMode's setup/cleanup/setup replay.\n let current = true;\n let instance: QueryFor<unknown, Record<string, unknown>> | undefined;\n const publish = (outcome: Outcome) => {\n if (current) setSettled({ request, outcome });\n };\n const execute = async () => {\n try {\n // The registry intentionally stores constructors without an eager Arc dependency.\n instance = new request.query() as QueryFor<unknown, Record<string, unknown>>;\n if (instance.enumerable !== false) {\n publish({ state: 'failure' });\n return;\n }\n // Arc perform does not validate argument-to-descriptor types. The form supports only\n // scalar String/Guid inputs, matched by exact name and constructor, never by naming\n // convention. This check is lazy and form-only; singleResult's host contract is intact.\n if (request.stringInputs && !Object.entries(request.queryArguments).every(([name, value]) => {\n const descriptors = instance!.parameterDescriptors.filter(descriptor => descriptor.name === name);\n return typeof value === 'string' && descriptors.length === 1 && !descriptors[0].isEnumerable\n && (descriptors[0].type === String || descriptors[0].type === Guid);\n })) {\n publish({ state: 'failure' });\n return;\n }\n instance.setMicroservice(request.microservice);\n instance.setApiBasePath(request.apiBasePath ?? '');\n instance.setOrigin(request.origin ?? '');\n instance.setHttpHeadersCallback(request.httpHeadersCallback ?? (() => ({})));\n // Native perform validates required arguments and proxy rules before HTTP. No copying,\n // defaults, business validation, route construction or array wrapping happens here.\n const result = await instance.perform(request.queryArguments);\n if (!current) return;\n if (result.isSuccess !== true || result.isAuthorized !== true || result.isValid !== true || result.hasExceptions !== false || result.isReady === false) {\n publish({ state: 'failure' });\n return;\n }\n if (result.data === null || result.data === undefined) {\n publish({ state: 'notFound' });\n return;\n }\n if (typeof result.data !== 'object' || Array.isArray(result.data)) {\n publish({ state: 'failure' });\n return;\n }\n // Only one own data field, never a path, inherited member, getter or expression.\n const descriptor = Object.getOwnPropertyDescriptor(result.data, request.resultField);\n const value: unknown = descriptor && 'value' in descriptor ? descriptor.value : undefined;\n if (typeof value === 'string' || typeof value === 'boolean' || (typeof value === 'number' && Number.isFinite(value))) {\n publish({ state: 'success', value: String(value) });\n } else {\n publish({ state: 'failure' });\n }\n } catch {\n // Includes native AbortError rejections. Disposed generations cannot publish or leak\n // an unhandled promise, even when the HTTP boundary ignores cancellation.\n publish({ state: 'failure' });\n }\n };\n void execute();\n return () => {\n current = false;\n instance?.abortController?.abort();\n };\n }, [request]);\n\n // Mask old data during the render that changes inputs, before effect cleanup/setup runs.\n if (settled?.request !== request) return <SingleResultStatus state='loading' />;\n return <SingleResultStatus {...settled.outcome} />;\n}\n"],"names":["SingleResultRuntime","query","queryArguments","resultField","stringInputs","arc","useContext","ArcContext","microservice","apiBasePath","origin","httpHeadersCallback","queryVersion","request","useMemo","settled","setSettled","useState","useEffect","current","instance","publish","outcome","execute","enumerable","state","Object","entries","every","name","value","descriptors","parameterDescriptors","filter","descriptor","length","isEnumerable","type","String","Guid","setMicroservice","setApiBasePath","setOrigin","setHttpHeadersCallback","result","perform","isSuccess","isAuthorized","isValid","hasExceptions","isReady","data","undefined","Array","isArray","getOwnPropertyDescriptor","Number","isFinite","abortController","abort","_jsx","SingleResultStatus"],"mappings":";;;;;;AAoBA;;;AAGC,IACc,SAASA,mBAAAA,CAAoB,EAAEC,KAAK,EAAEC,cAAc,EAAEC,WAAW,EAAEC,YAAAA,GAAe,KAAK,EAAS,EAAA;AAC3G,IAAA,MAAMC,MAAMC,UAAAA,CAAWC,UAAAA,CAAAA;IACvB,MAAM,EAAEC,YAAY,EAAEC,WAAW,EAAEC,MAAM,EAAEC,mBAAmB,EAAEC,YAAY,EAAE,GAAGP,GAAAA;;IAEjF,MAAMQ,OAAAA,GAAUC,OAAAA,CAAQ,KAAO;AAAEb,YAAAA,KAAAA;AAAOC,YAAAA,cAAAA;AAAgBC,YAAAA,WAAAA;AAAaC,YAAAA,YAAAA;AAAcI,YAAAA,YAAAA;AAAcC,YAAAA,WAAAA;AAAaC,YAAAA,MAAAA;AAAQC,YAAAA,mBAAAA;AAAqBC,YAAAA;AAAa,SAAA,CAAA,EACpJ;AAACX,QAAAA,KAAAA;AAAOC,QAAAA,cAAAA;AAAgBC,QAAAA,WAAAA;AAAaC,Q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
48
48
  properties.should.have.property('queryArguments').that.deep.equals({ projectId: suppliedId });
49
49
  });
50
+ it('should bridge an identity-only query to an existing table without a second legacy registration', async () => {
51
+ bindings.clearBindings();
52
+ bindings.registerQueryIdentity('InvoicesForProject', 'Invoices/ForProject', InvoicesForProject);
53
+ const queryArguments = { projectId: suppliedId };
54
+ await renderTable({ query: 'InvoicesForProject', queryArguments });
55
+ await screen.findByTestId('query-table');
56
+ (received.mock.lastCall[0].query === InvoicesForProject).should.equal(true);
57
+ (received.mock.lastCall[0].queryArguments === queryArguments).should.equal(true);
58
+ });
59
+ it('should visibly reject ambiguous identity-only tables without selecting either native proxy', async () => {
60
+ bindings.clearBindings();
61
+ bindings.registerQueryIdentity('InvoicesForProject', 'One/ForProject', InvoicesForProject);
62
+ bindings.registerQueryIdentity('InvoicesForProject', 'Two/ForProject', AnotherQuery);
63
+ await renderTable({ query: 'InvoicesForProject' });
64
+ (screen.getByText("Unresolved query binding 'InvoicesForProject' on Cratis.Components:dataTable") !== null).should.equal(true);
65
+ received.mock.calls.should.have.lengthOf(0);
66
+ });
50
67
  it('should preserve all supplied keys and values without normalization or defaults', async () => {
51
68
  const queryArguments = { projectId: suppliedId, ProjectID: 'distinct', limit: 0, enabled: false, optional: null, filter: { names: ['one'] } };
52
69
  await renderTable({ query: 'InvoicesForProject', queryArguments });
@@ -1 +1 @@
1
- {"version":3,"file":"when_forwarding_query_arguments.js","sourceRoot":"","sources":["../../../../data/for_SceneDataTable/when_forwarding_query_arguments.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,IAAI,kBAA8F,CAAC;AACnG,IAAI,YAAuC,CAAC;AAG5C,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAA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E,mBAAmB,EAAE,cAAc,EAAE,CAAC,CAAC;YAClE,CAAC,MAAM,CAAC,SAAS,CAAC,6EAA6E,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC9H,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAC5C,CAAC,MAAM,CAAC,WAAW,CAAC,wBAAwB,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"when_forwarding_query_arguments.js","sourceRoot":"","sources":["../../../../data/for_SceneDataTable/when_forwarding_query_arguments.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,IAAI,kBAA8F,CAAC;AACnG,IAAI,YAAuC,CAAC;AAG5C,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC7C,MAAM,UAAU,GAAG,6BAA6B,CAAC;IACjD,MAAM,QAAQ,GAAG,EAAE,CAAC,EAAE,EAAiD,CAAC;IACxE,IAAI,cAAiE,CAAC;IACtE,IAAI,QAAyC,CAAC;IAE9C,UAAU,CAAC,KAAK,IAAI,EAAE;QAClB,EAAE,CAAC,YAAY,EAAE,CAAC;QAClB,QAAQ,CAAC,SAAS,EAAE,CAAC;QACrB,EAAE,CAAC,MAAM,CAAC,+BAA+B,EAAE,GAAG,EAAE,CAAC,CAAC;YAC9C,iBAAiB,EAAE,CAAC,UAAmC,EAAE,EAAE;gBACvD,QAAQ,CAAC,UAAU,CAA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ACP,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=when_declaring_command_form_peers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"when_declaring_command_form_peers.d.ts","sourceRoot":"","sources":["../../../for_cratisComponentsPackage/when_declaring_command_form_peers.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { expect } from 'vitest';
3
+ const packageJson = JSON.parse(readFileSync('package.json', 'utf8'));
4
+ describe('when declaring native command form peers', () => {
5
+ it('requires the published footer and native custom-error execution contracts', () => {
6
+ expect(packageJson.name).toBe('@cratis/scene.components');
7
+ expect(packageJson.peerDependencies['@cratis/components']).toBe('^4.13.0');
8
+ expect(packageJson.peerDependencies['@cratis/arc']).toBe('^22.19.1');
9
+ expect(packageJson.peerDependencies['@cratis/arc.react']).toBe('^22.19.1');
10
+ });
11
+ it('keeps Arc optional for an unbound design-time preview', () => {
12
+ expect(packageJson.peerDependenciesMeta['@cratis/arc'].optional).toBe(true);
13
+ expect(packageJson.peerDependenciesMeta['@cratis/arc.react'].optional).toBe(true);
14
+ });
15
+ });
16
+ //# sourceMappingURL=when_declaring_command_form_peers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"when_declaring_command_form_peers.js","sourceRoot":"","sources":["../../../for_cratisComponentsPackage/when_declaring_command_form_peers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC,CAIlE,CAAC;AAEF,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;IACtD,EAAE,CAAC,2EAA2E,EAAE,GAAG,EAAE;QACjF,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;QAC1D,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC7D,MAAM,CAAC,WAAW,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5E,MAAM,CAAC,WAAW,CAAC,oBAAoB,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=when_describing_query_input_form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"when_describing_query_input_form.d.ts","sourceRoot":"","sources":["../../../for_cratisComponentsPackage/when_describing_query_input_form.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ import { expect } from 'vitest';
2
+ import { SceneQueryInputForm, cratisComponents, cratisComponentsPackageManifest, registerQueryIdentity, resolveExactQuery } from '../index';
3
+ describe('when describing the query input form public API', () => {
4
+ it('exports and registers the component advertised by the manifest', () => {
5
+ expect(cratisComponentsPackageManifest.components).toContain('queryInputForm');
6
+ expect(cratisComponents['Cratis.Components:queryInputForm']).toBe(SceneQueryInputForm);
7
+ expect(cratisComponentsPackageManifest.description).toContain('commits explicit string inputs on submit');
8
+ expect(registerQueryIdentity).toBeTypeOf('function');
9
+ expect(resolveExactQuery).toBeTypeOf('function');
10
+ const input = { parameter: 'projectId', type: 'string', label: 'Project identifier' };
11
+ expect(input.type).toBe('string');
12
+ });
13
+ });
14
+ //# sourceMappingURL=when_describing_query_input_form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"when_describing_query_input_form.js","sourceRoot":"","sources":["../../../for_cratisComponentsPackage/when_describing_query_input_form.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,+BAA+B,EAAE,qBAAqB,EAAE,iBAAiB,EAAmB,MAAM,UAAU,CAAC;AAE7J,QAAQ,CAAC,iDAAiD,EAAE,GAAG,EAAE;IAC7D,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACtE,MAAM,CAAC,+BAA+B,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;QAC/E,MAAM,CAAC,gBAAgB,CAAC,kCAAkC,CAAC,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACvF,MAAM,CAAC,+BAA+B,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,0CAA0C,CAAC,CAAC;QAC1G,MAAM,CAAC,qBAAqB,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrD,MAAM,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACjD,MAAM,KAAK,GAAe,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC;QAClG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { BoundConstructor } from '../bindings';
2
+ import type { CommandInput } from './commandInputs';
3
+ interface CommandFormRuntimeProps {
4
+ command: BoundConstructor;
5
+ inputs?: CommandInput[];
6
+ exclude?: string[];
7
+ submitLabel: string;
8
+ }
9
+ export default function CommandFormRuntime({ command, inputs, exclude, submitLabel }: CommandFormRuntimeProps): import("react").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=CommandFormRuntime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandFormRuntime.d.ts","sourceRoot":"","sources":["../../../forms/CommandFormRuntime.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,UAAU,uBAAuB;IAC7B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACvB;AA4CD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,uBAAuB,+BAS5G"}
@@ -0,0 +1,77 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { AutoCommandForm } from '@cratis/components/CommandForm';
3
+ import { CommandForm } from '@cratis/arc.react/commands';
4
+ import { Guid } from '@cratis/fundamentals';
5
+ import { CommandFormSubmit } from './CommandFormSubmit.js';
6
+ import { ExplicitCommandField } from './ExplicitCommandField.js';
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ // Runtime bindings erase the proxy's keys; the optional footer is a Components >=4.13 contract.
11
+ const NativeAutoCommandForm = AutoCommandForm;
12
+ /** Verify the whole command before mounting any native form: partial forms must never execute. */ function capability(command, inputs, exclude) {
13
+ let descriptors;
14
+ try {
15
+ descriptors = new command().propertyDescriptors;
16
+ } catch {
17
+ return 'Unable to inspect command proxy';
18
+ }
19
+ if (!Array.isArray(descriptors)) return 'Command proxy has no property descriptors';
20
+ const byName = new Map();
21
+ for (const descriptor of descriptors){
22
+ if (!descriptor || typeof descriptor.name !== 'string' || !descriptor.name || typeof descriptor.isOptional !== 'boolean' || byName.has(descriptor.name)) return 'Ambiguous or invalid command property descriptors';
23
+ byName.set(descriptor.name, descriptor);
24
+ }
25
+ if (inputs) {
26
+ for (const input of inputs){
27
+ const descriptor = byName.get(input.property);
28
+ if (!descriptor) return `Unknown command property '${input.property}'`;
29
+ if (descriptor.type !== (input.type === 'guid' ? Guid : String)) return `Command property '${input.property}' type does not match '${input.type}'`;
30
+ }
31
+ for (const descriptor of byName.values()){
32
+ if (!descriptor.isOptional && !inputs.some((input)=>input.property === descriptor.name)) return `Required command property '${descriptor.name}' has no input`;
33
+ }
34
+ } else {
35
+ for (const descriptor of byName.values()){
36
+ if (!descriptor.isOptional && (exclude?.includes(descriptor.name) || ![
37
+ String,
38
+ Number,
39
+ Boolean,
40
+ Date
41
+ ].includes(descriptor.type))) {
42
+ return `Required command property '${descriptor.name}' has no supported automatic field; declare inputs`;
43
+ }
44
+ }
45
+ }
46
+ return undefined;
47
+ }
48
+ /** Private lazy entry point: importing the Scene registry must not import Arc. */ function CommandFormRuntime({ command, inputs, exclude, submitLabel }) {
49
+ const error = capability(command, inputs, exclude);
50
+ if (error) return /*#__PURE__*/ jsx("div", {
51
+ role: "alert",
52
+ children: error
53
+ });
54
+ // The registry's never-argument constructor is erased; Arc creates this checked proxy with no args.
55
+ if (inputs) return /*#__PURE__*/ jsxs(CommandForm, {
56
+ command: command,
57
+ showTitles: false,
58
+ children: [
59
+ inputs.map((input)=>/*#__PURE__*/ jsx(ExplicitCommandField, {
60
+ input: input
61
+ }, input.property)),
62
+ /*#__PURE__*/ jsx(CommandFormSubmit, {
63
+ label: submitLabel
64
+ })
65
+ ]
66
+ });
67
+ return /*#__PURE__*/ jsx(NativeAutoCommandForm, {
68
+ command: command,
69
+ exclude: exclude,
70
+ footer: /*#__PURE__*/ jsx(CommandFormSubmit, {
71
+ label: submitLabel
72
+ })
73
+ });
74
+ }
75
+
76
+ export { CommandFormRuntime as default };
77
+ //# sourceMappingURL=CommandFormRuntime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandFormRuntime.js","sources":["../../../forms/CommandFormRuntime.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 type { ComponentType, ReactNode } from 'react';\nimport { AutoCommandForm } from '@cratis/components/CommandForm';\nimport { CommandForm } from '@cratis/arc.react/commands';\nimport { Guid } from '@cratis/fundamentals';\nimport type { BoundConstructor } from '../bindings';\nimport type { CommandInput } from './commandInputs';\nimport { CommandFormSubmit } from './CommandFormSubmit';\nimport { ExplicitCommandField } from './ExplicitCommandField';\n\ninterface CommandFormRuntimeProps {\n command: BoundConstructor;\n inputs?: CommandInput[];\n exclude?: string[];\n submitLabel: string;\n}\n\n// Runtime bindings erase the proxy's keys; the optional footer is a Components >=4.13 contract.\nconst NativeAutoCommandForm = AutoCommandForm as unknown as ComponentType<{\n command: BoundConstructor;\n exclude?: string[];\n footer?: ReactNode;\n}>;\n\ntype Descriptor = { name: string; type: unknown; isOptional: boolean };\n\n/** Verify the whole command before mounting any native form: partial forms must never execute. */\nfunction capability(command: BoundConstructor, inputs?: CommandInput[], exclude?: string[]): string | undefined {\n let descriptors: unknown;\n try { descriptors = (new command() as { propertyDescriptors?: unknown }).propertyDescriptors; }\n catch { return 'Unable to inspect command proxy'; }\n if (!Array.isArray(descriptors)) return 'Command proxy has no property descriptors';\n const byName = new Map<string, Descriptor>();\n for (const descriptor of descriptors) {\n if (!descriptor || typeof descriptor.name !== 'string' || !descriptor.name ||\n typeof descriptor.isOptional !== 'boolean' || byName.has(descriptor.name)) return 'Ambiguous or invalid command property descriptors';\n byName.set(descriptor.name, descriptor);\n }\n if (inputs) {\n for (const input of inputs) {\n const descriptor = byName.get(input.property);\n if (!descriptor) return `Unknown command property '${input.property}'`;\n if (descriptor.type !== (input.type === 'guid' ? Guid : String)) return `Command property '${input.property}' type does not match '${input.type}'`;\n }\n for (const descriptor of byName.values()) {\n if (!descriptor.isOptional && !inputs.some(input => input.property === descriptor.name)) return `Required command property '${descriptor.name}' has no input`;\n }\n } else {\n for (const descriptor of byName.values()) {\n if (!descriptor.isOptional && (exclude?.includes(descriptor.name) ||\n ![String, Number, Boolean, Date].includes(descriptor.type as typeof String))) {\n return `Required command property '${descriptor.name}' has no supported automatic field; declare inputs`;\n }\n }\n }\n return undefined;\n}\n\n/** Private lazy entry point: importing the Scene registry must not import Arc. */\nexport default function CommandFormRuntime({ command, inputs, exclude, submitLabel }: CommandFormRuntimeProps) {\n const error = capability(command, inputs, exclude);\n if (error) return <div role='alert'>{error}</div>;\n // The registry's never-argument constructor is erased; Arc creates this checked proxy with no args.\n if (inputs) return <CommandForm command={command as unknown as new () => object} showTitles={false}>\n {inputs.map(input => <ExplicitCommandField key={input.property} input={input} />)}\n <CommandFormSubmit label={submitLabel} />\n </CommandForm>;\n return <NativeAutoCommandForm command={command} exclude={exclude} footer={<CommandFormSubmit label={submitLabel} />} />;\n}\n"],"names":["NativeAutoCommandForm","AutoCommandForm","capability","command","inputs","exclude","descriptors","propertyDescriptors","Array","isArray","byName","Map","descriptor","name","isOptional","has","set","input","get","property","type","Guid","String","values","some","includes","Number","Boolean","Date","undefined","CommandFormRuntime","submitLabel","error","_jsx","div","role","_jsxs","CommandForm","showTitles","map","ExplicitCommandField","CommandFormSubmit","label","footer"],"mappings":";;;;;;;AAAA;AACA;AAkBA;AACA,MAAMA,qBAAAA,GAAwBC,eAAAA;AAQ9B,mGACA,SAASC,UAAAA,CAAWC,OAAyB,EAAEC,MAAuB,EAAEC,OAAkB,EAAA;IACtF,IAAIC,WAAAA;IACJ,IAAI;QAAEA,WAAAA,GAAe,IAAIH,OAAAA,EAAAA,CAAgDI,mBAAmB;A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BC,KAAAA,EAAOX;;;;AAE9B,IAAA,qBAAOE,GAAA,CAACjC,qBAAAA,EAAAA;QAAsBG,OAAAA,EAASA,OAAAA;QAASE,OAAAA,EAASA,OAAAA;AAASsC,QAAAA,MAAAA,gBAAQV,GAAA,CAACQ,iBAAAA,EAAAA;YAAkBC,KAAAA,EAAOX;;;AACxG;;"}
@@ -0,0 +1,6 @@
1
+ interface CommandFormSubmitProps {
2
+ label: string;
3
+ }
4
+ export declare function CommandFormSubmit({ label }: CommandFormSubmitProps): import("react").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=CommandFormSubmit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandFormSubmit.d.ts","sourceRoot":"","sources":["../../../forms/CommandFormSubmit.tsx"],"names":[],"mappings":"AAKA,UAAU,sBAAsB;IAC5B,KAAK,EAAE,MAAM,CAAC;CACjB;AAGD,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,sBAAsB,+BAKlE"}
@@ -0,0 +1,17 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useCommandFormContext } from '@cratis/arc.react/commands';
3
+
4
+ /** Internal footer child; only rendered under the native form's context. */ function CommandFormSubmit({ label }) {
5
+ const { isExecuting, isAuthorized } = useCommandFormContext();
6
+ // Do not gate on isValid: submitting untouched invalid fields must reveal native validation.
7
+ // No click handler: the containing Arc form owns submission, validation and execution.
8
+ return /*#__PURE__*/ jsx("button", {
9
+ type: "submit",
10
+ disabled: isExecuting || !isAuthorized,
11
+ "aria-busy": isExecuting,
12
+ children: label
13
+ });
14
+ }
15
+
16
+ export { CommandFormSubmit };
17
+ //# sourceMappingURL=CommandFormSubmit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandFormSubmit.js","sources":["../../../forms/CommandFormSubmit.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 { useCommandFormContext } from '@cratis/arc.react/commands';\n\ninterface CommandFormSubmitProps {\n label: string;\n}\n\n/** Internal footer child; only rendered under the native form's context. */\nexport function CommandFormSubmit({ label }: CommandFormSubmitProps) {\n const { isExecuting, isAuthorized } = useCommandFormContext();\n // Do not gate on isValid: submitting untouched invalid fields must reveal native validation.\n // No click handler: the containing Arc form owns submission, validation and execution.\n return <button type='submit' disabled={isExecuting || !isAuthorized} aria-busy={isExecuting}>{label}</button>;\n}\n"],"names":["CommandFormSubmit","label","isExecuting","isAuthorized","useCommandFormContext","_jsx","button","type","disabled","aria-busy"],"mappings":";;;AASA,6EACO,SAASA,iBAAAA,CAAkB,EAAEC,KAAK,EAA0B,EAAA;AAC/D,IAAA,MAAM,EAAEC,WAAW,EAAEC,YAAY,EAAE,GAAGC,qBAAAA,EAAAA;;;AAGtC,IAAA,qBAAOC,GAAA,CAACC,QAAAA,EAAAA;QAAOC,IAAAA,EAAK,QAAA;AAASC,QAAAA,QAAAA,EAAUN,eAAe,CAACC,YAAAA;QAAcM,WAAAA,EAAWP,WAAAA;AAAcD,QAAAA,QAAAA,EAAAA;;AAClG;;"}
@@ -0,0 +1,5 @@
1
+ import type { CommandInput } from './commandInputs';
2
+ export declare function ExplicitCommandField({ input }: {
3
+ input: CommandInput;
4
+ }): import("react").JSX.Element;
5
+ //# sourceMappingURL=ExplicitCommandField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExplicitCommandField.d.ts","sourceRoot":"","sources":["../../../forms/ExplicitCommandField.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA4EpD,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAGtE"}