@cratis/scene.components 3.3.1 → 3.5.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 (145) hide show
  1. package/README.md +51 -2
  2. package/bindings/ArcBoundComponents.tsx +40 -0
  3. package/bindings/BoundConstructor.ts +5 -5
  4. package/bindings/for_requireArcProxy/NativeProxies.ts +28 -0
  5. package/bindings/for_requireArcProxy/when_mounting_bound_adapters.tsx +71 -0
  6. package/bindings/for_requireArcProxy/when_previewing_without_arc.tsx +37 -0
  7. package/bindings/for_requireArcProxy/when_validating_a_proxy.ts +44 -0
  8. package/bindings/requireArcProxy.ts +24 -0
  9. package/cratisComponents.ts +2 -1
  10. package/cratisComponentsPackage.ts +2 -1
  11. package/data/SceneDataTable.tsx +12 -2
  12. package/data/SceneObservableDataTable.tsx +1 -1
  13. package/data/SceneSingleResult.tsx +29 -0
  14. package/data/SingleResultRuntime.tsx +89 -0
  15. package/data/SingleResultStatus.tsx +13 -0
  16. package/data/for_SceneDataTable/when_forwarding_query_arguments.tsx +104 -0
  17. package/data/for_SceneSingleResult/when_executing_a_native_query.tsx +290 -0
  18. package/data/for_SceneSingleResult/when_gating_the_lazy_runtime.tsx +60 -0
  19. package/data/index.ts +1 -0
  20. package/dialogs/SceneCommandDialog.tsx +1 -1
  21. package/dialogs/SceneStepperCommandDialog.tsx +1 -1
  22. package/dist/cjs/bindings/ArcBoundComponents.js +55 -0
  23. package/dist/cjs/bindings/ArcBoundComponents.js.map +1 -0
  24. package/dist/cjs/bindings/requireArcProxy.js +25 -0
  25. package/dist/cjs/bindings/requireArcProxy.js.map +1 -0
  26. package/dist/cjs/cratisComponents.js +2 -0
  27. package/dist/cjs/cratisComponents.js.map +1 -1
  28. package/dist/cjs/cratisComponentsPackage.js +2 -1
  29. package/dist/cjs/cratisComponentsPackage.js.map +1 -1
  30. package/dist/cjs/data/SceneDataTable.js +15 -1
  31. package/dist/cjs/data/SceneDataTable.js.map +1 -1
  32. package/dist/cjs/data/SceneObservableDataTable.js +1 -1
  33. package/dist/cjs/data/SceneObservableDataTable.js.map +1 -1
  34. package/dist/cjs/data/SceneSingleResult.js +41 -0
  35. package/dist/cjs/data/SceneSingleResult.js.map +1 -0
  36. package/dist/cjs/data/SingleResultRuntime.js +122 -0
  37. package/dist/cjs/data/SingleResultRuntime.js.map +1 -0
  38. package/dist/cjs/data/SingleResultStatus.js +23 -0
  39. package/dist/cjs/data/SingleResultStatus.js.map +1 -0
  40. package/dist/cjs/dialogs/SceneCommandDialog.js +1 -1
  41. package/dist/cjs/dialogs/SceneCommandDialog.js.map +1 -1
  42. package/dist/cjs/dialogs/SceneStepperCommandDialog.js +1 -1
  43. package/dist/cjs/dialogs/SceneStepperCommandDialog.js.map +1 -1
  44. package/dist/cjs/forms/fields/SceneRadioButtonField.js +4 -1
  45. package/dist/cjs/forms/fields/SceneRadioButtonField.js.map +1 -1
  46. package/dist/cjs/index.js +2 -0
  47. package/dist/cjs/index.js.map +1 -1
  48. package/dist/cjs/pages/SceneDataPage.js +1 -1
  49. package/dist/cjs/pages/SceneDataPage.js.map +1 -1
  50. package/dist/esm/bindings/ArcBoundComponents.d.ts +18 -0
  51. package/dist/esm/bindings/ArcBoundComponents.d.ts.map +1 -0
  52. package/dist/esm/bindings/ArcBoundComponents.js +49 -0
  53. package/dist/esm/bindings/ArcBoundComponents.js.map +1 -0
  54. package/dist/esm/bindings/for_requireArcProxy/NativeProxies.d.ts +25 -0
  55. package/dist/esm/bindings/for_requireArcProxy/NativeProxies.d.ts.map +1 -0
  56. package/dist/esm/bindings/for_requireArcProxy/NativeProxies.js +23 -0
  57. package/dist/esm/bindings/for_requireArcProxy/NativeProxies.js.map +1 -0
  58. package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.d.ts +2 -0
  59. package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.d.ts.map +1 -0
  60. package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.js +56 -0
  61. package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.js.map +1 -0
  62. package/dist/esm/bindings/for_requireArcProxy/when_previewing_without_arc.d.ts +2 -0
  63. package/dist/esm/bindings/for_requireArcProxy/when_previewing_without_arc.d.ts.map +1 -0
  64. package/dist/esm/bindings/for_requireArcProxy/when_previewing_without_arc.js +32 -0
  65. package/dist/esm/bindings/for_requireArcProxy/when_previewing_without_arc.js.map +1 -0
  66. package/dist/esm/bindings/for_requireArcProxy/when_validating_a_proxy.d.ts +2 -0
  67. package/dist/esm/bindings/for_requireArcProxy/when_validating_a_proxy.d.ts.map +1 -0
  68. package/dist/esm/bindings/for_requireArcProxy/when_validating_a_proxy.js +45 -0
  69. package/dist/esm/bindings/for_requireArcProxy/when_validating_a_proxy.js.map +1 -0
  70. package/dist/esm/bindings/requireArcProxy.d.ts +5 -0
  71. package/dist/esm/bindings/requireArcProxy.d.ts.map +1 -0
  72. package/dist/esm/bindings/requireArcProxy.js +23 -0
  73. package/dist/esm/bindings/requireArcProxy.js.map +1 -0
  74. package/dist/esm/cratisComponents.d.ts.map +1 -1
  75. package/dist/esm/cratisComponents.js +2 -0
  76. package/dist/esm/cratisComponents.js.map +1 -1
  77. package/dist/esm/cratisComponentsPackage.d.ts.map +1 -1
  78. package/dist/esm/cratisComponentsPackage.js +2 -1
  79. package/dist/esm/cratisComponentsPackage.js.map +1 -1
  80. package/dist/esm/data/SceneDataTable.d.ts.map +1 -1
  81. package/dist/esm/data/SceneDataTable.js +16 -2
  82. package/dist/esm/data/SceneDataTable.js.map +1 -1
  83. package/dist/esm/data/SceneObservableDataTable.js +1 -1
  84. package/dist/esm/data/SceneObservableDataTable.js.map +1 -1
  85. package/dist/esm/data/SceneSingleResult.d.ts +3 -0
  86. package/dist/esm/data/SceneSingleResult.d.ts.map +1 -0
  87. package/dist/esm/data/SceneSingleResult.js +39 -0
  88. package/dist/esm/data/SceneSingleResult.js.map +1 -0
  89. package/dist/esm/data/SingleResultRuntime.d.ts +9 -0
  90. package/dist/esm/data/SingleResultRuntime.d.ts.map +1 -0
  91. package/dist/esm/data/SingleResultRuntime.js +118 -0
  92. package/dist/esm/data/SingleResultRuntime.js.map +1 -0
  93. package/dist/esm/data/SingleResultStatus.d.ts +7 -0
  94. package/dist/esm/data/SingleResultStatus.d.ts.map +1 -0
  95. package/dist/esm/data/SingleResultStatus.js +21 -0
  96. package/dist/esm/data/SingleResultStatus.js.map +1 -0
  97. package/dist/esm/data/for_SceneDataTable/when_forwarding_query_arguments.d.ts +2 -0
  98. package/dist/esm/data/for_SceneDataTable/when_forwarding_query_arguments.d.ts.map +1 -0
  99. package/dist/esm/data/for_SceneDataTable/when_forwarding_query_arguments.js +90 -0
  100. package/dist/esm/data/for_SceneDataTable/when_forwarding_query_arguments.js.map +1 -0
  101. package/dist/esm/data/for_SceneSingleResult/when_executing_a_native_query.d.ts +2 -0
  102. package/dist/esm/data/for_SceneSingleResult/when_executing_a_native_query.d.ts.map +1 -0
  103. package/dist/esm/data/for_SceneSingleResult/when_executing_a_native_query.js +255 -0
  104. package/dist/esm/data/for_SceneSingleResult/when_executing_a_native_query.js.map +1 -0
  105. package/dist/esm/data/for_SceneSingleResult/when_gating_the_lazy_runtime.d.ts +2 -0
  106. package/dist/esm/data/for_SceneSingleResult/when_gating_the_lazy_runtime.d.ts.map +1 -0
  107. package/dist/esm/data/for_SceneSingleResult/when_gating_the_lazy_runtime.js +54 -0
  108. package/dist/esm/data/for_SceneSingleResult/when_gating_the_lazy_runtime.js.map +1 -0
  109. package/dist/esm/data/index.d.ts +1 -0
  110. package/dist/esm/data/index.d.ts.map +1 -1
  111. package/dist/esm/data/index.js +1 -0
  112. package/dist/esm/data/index.js.map +1 -1
  113. package/dist/esm/dialogs/SceneCommandDialog.js +1 -1
  114. package/dist/esm/dialogs/SceneCommandDialog.js.map +1 -1
  115. package/dist/esm/dialogs/SceneStepperCommandDialog.js +1 -1
  116. package/dist/esm/dialogs/SceneStepperCommandDialog.js.map +1 -1
  117. package/dist/esm/for_cratisComponentsPackage/when_describing_query_arguments.d.ts +2 -0
  118. package/dist/esm/for_cratisComponentsPackage/when_describing_query_arguments.d.ts.map +1 -0
  119. package/dist/esm/for_cratisComponentsPackage/when_describing_query_arguments.js +11 -0
  120. package/dist/esm/for_cratisComponentsPackage/when_describing_query_arguments.js.map +1 -0
  121. package/dist/esm/for_cratisComponentsPackage/when_describing_single_result.d.ts +2 -0
  122. package/dist/esm/for_cratisComponentsPackage/when_describing_single_result.d.ts.map +1 -0
  123. package/dist/esm/for_cratisComponentsPackage/when_describing_single_result.js +16 -0
  124. package/dist/esm/for_cratisComponentsPackage/when_describing_single_result.js.map +1 -0
  125. package/dist/esm/forms/fields/SceneRadioButtonField.d.ts.map +1 -1
  126. package/dist/esm/forms/fields/SceneRadioButtonField.js +4 -1
  127. package/dist/esm/forms/fields/SceneRadioButtonField.js.map +1 -1
  128. package/dist/esm/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.d.ts +2 -0
  129. package/dist/esm/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.d.ts.map +1 -0
  130. package/dist/esm/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.js +38 -0
  131. package/dist/esm/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.js.map +1 -0
  132. package/dist/esm/forms/fields/for_resolveFieldBinding/when_resolving_a_field_binding.js +4 -0
  133. package/dist/esm/forms/fields/for_resolveFieldBinding/when_resolving_a_field_binding.js.map +1 -1
  134. package/dist/esm/index.js +1 -0
  135. package/dist/esm/index.js.map +1 -1
  136. package/dist/esm/pages/SceneDataPage.js +1 -1
  137. package/dist/esm/pages/SceneDataPage.js.map +1 -1
  138. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  139. package/for_cratisComponentsPackage/when_describing_query_arguments.ts +15 -0
  140. package/for_cratisComponentsPackage/when_describing_single_result.ts +20 -0
  141. package/forms/fields/SceneRadioButtonField.tsx +4 -1
  142. package/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.tsx +45 -0
  143. package/forms/fields/for_resolveFieldBinding/when_resolving_a_field_binding.ts +6 -0
  144. package/package.json +20 -8
  145. package/pages/SceneDataPage.tsx +1 -1
@@ -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 } 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, '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","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","SceneToolbarGroup","SceneToolbarSeparator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAyBA;;;IAIO,MAAMA,2BAAAA,GAA8B;AAE3C;;;;;;;;;;;;;UAcaC,gBAAAA,GAAsC;IAC/C,CAACC,gCAAAA,CAAqBF,2BAAAA,EAA6B,MAAA,CAAA,GAAUG,mBAAAA;IAC7D,CAACD,gCAAAA,CAAqBF,2BAAAA,EAA6B,UAAA,CAAA,GAAcI,2BAAAA;IACjE,CAACF,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBK,iCAAAA;IAEpE,CAACH,gCAAAA,CAAqBF,2BAAAA,EAA6B,WAAA,CAAA,GAAeM,6BAAAA;IAClE,CAACJ,gCAAAA,CAAqBF,2BAAAA,EAA6B,OAAA,CAAA,GAAWM,6BAAAA;IAC9D,CAACJ,gCAAAA,CAAqBF,2BAAAA,EAA6B,qBAAA,CAAA,GAAyBO,iDAAAA;IAE5E,CAACL,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBQ,iCAAAA;IACpE,CAACN,gCAAAA,CAAqBF,2BAAAA,EAA6B,gBAAA,CAAA,GAAoBS,uCAAAA;IACvE,CAACP,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBU,iCAAAA;IACpE,CAACR,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBW,qCAAAA;IACtE,CAACT,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBY,qCAAAA;IACtE,CAACV,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBa,qCAAAA;IACtE,CAACX,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBc,iCAAAA;IACp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B,gCAAAA,CAAqBF,2BAAAA,EAA6B,uBAAA,CAAA,GAA2B+B,qDAAAA;IAC9E,CAAC7B,gCAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBgC,mCAAAA;IACrE,CAAC9B,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBiC,iCAAAA;IACpE,CAAC/B,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBkC,iCAAAA;IAEpE,CAAChC,gCAAAA,CAAqBF,2BAAAA,EAA6B,SAAA,CAAA,GAAamC,yBAAAA;IAChE,CAACjC,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBoC,qCAAAA;IACtE,CAAClC,gCAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBqC,mCAAAA;IACrE,CAACnC,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBsC;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 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","SceneToolbarGroup","SceneToolbarSeparator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAyBA;;;IAIO,MAAMA,2BAAAA,GAA8B;AAE3C;;;;;;;;;;;;;UAcaC,gBAAAA,GAAsC;IAC/C,CAACC,gCAAAA,CAAqBF,2BAAAA,EAA6B,MAAA,CAAA,GAAUG,mBAAAA;IAC7D,CAACD,gCAAAA,CAAqBF,2BAAAA,EAA6B,UAAA,CAAA,GAAcI,2BAAAA;IACjE,CAACF,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBK,iCAAAA;IAEpE,CAACH,gCAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBM,mCAAAA;IACrE,CAACJ,gCAAAA,CAAqBF,2BAAAA,EAA6B,WAAA,CAAA,GAAeO,6BAAAA;IAClE,CAACL,gCAAAA,CAAqBF,2BAAAA,EAA6B,OAAA,CAAA,GAAW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@@ var cratisComponents = require('./cratisComponents.js');
41
41
  'page',
42
42
  'dataPage',
43
43
  'formElement',
44
+ 'singleResult',
44
45
  'dataTable',
45
46
  'table',
46
47
  'observableDataTable',
@@ -90,7 +91,7 @@ var cratisComponents = require('./cratisComponents.js');
90
91
  // Shipping a theme here would be this library asserting a look it was specifically built not to have.
91
92
  themes: [],
92
93
  displayName: 'Cratis Components',
93
- description: "Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind.",
94
+ 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.",
94
95
  module: '@cratis/scene.components',
95
96
  license: 'MIT',
96
97
  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 '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.\",\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,4CAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,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,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,uFAAA;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 '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,4CAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,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;;;"}
@@ -4,12 +4,13 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var react = require('react');
5
5
  var BindingKind = require('../bindings/BindingKind.js');
6
6
  var resolveElementBinding = require('../bindings/resolveElementBinding.js');
7
+ var Placeholder = require('../bindings/Placeholder.js');
7
8
  var MissingBinding = require('../bindings/MissingBinding.js');
8
9
  var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
9
10
  var properties = require('../properties.js');
10
11
 
11
12
  const DataTableForQuery = /*#__PURE__*/ react.lazy(async ()=>({
12
- default: (await import('@cratis/components/DataTables')).DataTableForQuery
13
+ default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundDataTable
13
14
  }));
14
15
  /**
15
16
  * The `Cratis.Components:dataTable` component, also registered as `table` - `DataTableForQuery` from
@@ -22,6 +23,9 @@ const DataTableForQuery = /*#__PURE__*/ react.lazy(async ()=>({
22
23
  * back into it, where PrimeReact's `DataTable` is handed rows and knows nothing about where they came from.
23
24
  *
24
25
  * The `query` property names an Arc query proxy; the columns come from the `content` slot.
26
+ * Optional `queryArguments` is an explicit object forwarded unchanged to that proxy. Invalid values
27
+ * render a placeholder rather than accidentally executing a query without its arguments. This remains
28
+ * a collection table; forwarding arguments does not make optional single-result queries compatible.
25
29
  *
26
30
  * There is deliberately no `clientFiltering` property. `@cratis/components` 3.0.0 still accepts the prop
27
31
  * so existing call sites compile, but it no longer does anything - filtering is always applied to the
@@ -35,9 +39,19 @@ const DataTableForQuery = /*#__PURE__*/ react.lazy(async ()=>({
35
39
  kind: BindingKind.BindingKind.Query,
36
40
  name: name
37
41
  });
42
+ const queryArguments = properties.objectProperty(element.properties, 'queryArguments');
43
+ if (element.properties.queryArguments !== undefined && queryArguments === undefined) {
44
+ return /*#__PURE__*/ jsxRuntime.jsx(Placeholder.Placeholder, {
45
+ element: element,
46
+ problem: "Invalid queryArguments: expected an object"
47
+ });
48
+ }
38
49
  return /*#__PURE__*/ jsxRuntime.jsx(ArcRuntimeBoundary.ArcRuntimeBoundary, {
39
50
  children: /*#__PURE__*/ jsxRuntime.jsx(DataTableForQuery, {
40
51
  query: target,
52
+ ...queryArguments === undefined ? {} : {
53
+ queryArguments
54
+ },
41
55
  emptyMessage: properties.stringProperty(element.properties, 'emptyMessage') ?? '',
42
56
  dataKey: properties.stringProperty(element.properties, 'dataKey'),
43
57
  globalFilterFields: properties.stringArrayProperty(element.properties, 'globalFilterFields'),
@@ -1 +1 @@
1
- {"version":3,"file":"SceneDataTable.js","sources":["../../../data/SceneDataTable.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForQuery = lazy(async () => ({ default: (await import('@cratis/components/DataTables')).DataTableForQuery }));\n\n/**\n * The `Cratis.Components:dataTable` component, also registered as `table` - `DataTableForQuery` from\n * `@cratis/components/DataTables`.\n *\n * Registering it under the bare name `table` as well is override priority working as designed: a profile\n * listing `core`, `PrimeReact` and `Cratis.Components` in that order resolves `table` here and records\n * the other two as shadowed. That is the right outcome, because this is a strictly better `table` for a\n * Cratis application - it performs the query, pages against the server, and wires filtering and sorting\n * back into it, where PrimeReact's `DataTable` is handed rows and knows nothing about where they came from.\n *\n * The `query` property names an Arc query proxy; the columns come from the `content` slot.\n *\n * There is deliberately no `clientFiltering` property. `@cratis/components` 3.0.0 still accepts the prop\n * so existing call sites compile, but it no longer does anything - filtering is always applied to the\n * loaded page. Exposing a screen property that reads as a choice and silently is not would be worse than\n * not offering it, so a screen that set it now gets a property-not-recognized signal rather than a\n * setting that quietly stopped mattering.\n */\nexport function SceneDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForQuery\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForQuery","lazy","default","SceneDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,iBAAAA,iBAAoBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,+BAAA,CAA+B,EAAGF;KAAkB,CAAA,CAAA;AAEzH;;;;;;;;;;;;;;;;;AAiBC,IACM,SAASG,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,iBAAAA,EAAAA;YACGe,KAAAA,EAAOR,MAAAA;AACPS,YAAAA,YAAAA,EAAcC,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEC,OAAAA,EAASF,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,SAAA,CAAA;YAC5CE,kBAAAA,EAAoBC,8BAAAA,CAAoBjB,OAAAA,CAAQc,UAAU,EAAE,oBAAA,CAAA;YAC5DI,SAAAA,EAAWL,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,WAAA,CAAA;AAE7Cb,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;"}
1
+ {"version":3,"file":"SceneDataTable.js","sources":["../../../data/SceneDataTable.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { objectProperty, stringArrayProperty, stringProperty } from '../properties';\nimport { Placeholder } from '../bindings/Placeholder';\n\nconst DataTableForQuery = lazy(async () => ({ default: (await import('../bindings/ArcBoundComponents')).BoundDataTable }));\n\n/**\n * The `Cratis.Components:dataTable` component, also registered as `table` - `DataTableForQuery` from\n * `@cratis/components/DataTables`.\n *\n * Registering it under the bare name `table` as well is override priority working as designed: a profile\n * listing `core`, `PrimeReact` and `Cratis.Components` in that order resolves `table` here and records\n * the other two as shadowed. That is the right outcome, because this is a strictly better `table` for a\n * Cratis application - it performs the query, pages against the server, and wires filtering and sorting\n * back into it, where PrimeReact's `DataTable` is handed rows and knows nothing about where they came from.\n *\n * The `query` property names an Arc query proxy; the columns come from the `content` slot.\n * Optional `queryArguments` is an explicit object forwarded unchanged to that proxy. Invalid values\n * render a placeholder rather than accidentally executing a query without its arguments. This remains\n * a collection table; forwarding arguments does not make optional single-result queries compatible.\n *\n * There is deliberately no `clientFiltering` property. `@cratis/components` 3.0.0 still accepts the prop\n * so existing call sites compile, but it no longer does anything - filtering is always applied to the\n * loaded page. Exposing a screen property that reads as a choice and silently is not would be worse than\n * not offering it, so a screen that set it now gets a property-not-recognized signal rather than a\n * setting that quietly stopped mattering.\n */\nexport function SceneDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n const queryArguments = objectProperty(element.properties, 'queryArguments');\n if (element.properties.queryArguments !== undefined && queryArguments === undefined) {\n return <Placeholder element={element} problem='Invalid queryArguments: expected an object' />;\n }\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForQuery\n query={target}\n {...(queryArguments === undefined ? {} : { queryArguments })}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForQuery","lazy","default","BoundDataTable","SceneDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","queryArguments","objectProperty","properties","undefined","Placeholder","problem","ArcRuntimeBoundary","query","emptyMessage","stringProperty","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;;AASA,MAAMA,iBAAAA,iBAAoBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KAAgC,EAAGC;KAAe,CAAA,CAAA;AAEvH;;;;;;;;;;;;;;;;;;;;AAoBC,IACM,SAASC,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,MAAMQ,cAAAA,GAAiBC,yBAAAA,CAAeX,OAAAA,CAAQY,UAAU,EAAE,gBAAA,CAAA;AAC1D,IAAA,IAAIZ,QAAQY,UAAU,CAACF,cAAc,KAAKG,SAAAA,IAAaH,mBAAmBG,SAAAA,EAAW;AACjF,QAAA,qBAAON,cAAA,CAACO,uBAAAA,EAAAA;YAAYd,OAAAA,EAASA,OAAAA;YAASe,OAAAA,EAAQ;;AAClD,IAAA;AAEA,IAAA,qBACIR,cAAA,CAACS,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAT,cAAA,CAACZ,iBAAAA,EAAAA;YACGsB,KAAAA,EAAOd,MAAAA;YACN,GAAIO,cAAAA,KAAmBG,SAAAA,GAAY,EAAC,GAAI;AAAEH,gBAAAA;aAAgB;AAC3DQ,YAAAA,YAAAA,EAAcC,yBAAAA,CAAenB,OAAAA,CAAQY,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEQ,OAAAA,EAASD,yBAAAA,CAAenB,OAAAA,CAAQY,UAAU,EAAE,SAAA,CAAA;YAC5CS,kBAAAA,EAAoBC,8BAAAA,CAAoBtB,OAAAA,CAAQY,UAAU,EAAE,oBAAA,CAAA;YAC5DW,SAAAA,EAAWJ,yBAAAA,CAAenB,OAAAA,CAAQY,UAAU,EAAE,WAAA,CAAA;AAE7CX,YAAAA,QAAAA,EAAAA,KAAAA,CAAMuB;;;AAIvB;;"}
@@ -9,7 +9,7 @@ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
9
9
  var properties = require('../properties.js');
10
10
 
11
11
  const DataTableForObservableQuery = /*#__PURE__*/ react.lazy(async ()=>({
12
- default: (await import('@cratis/components/DataTables')).DataTableForObservableQuery
12
+ default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundObservableDataTable
13
13
  }));
14
14
  /**
15
15
  * The `Cratis.Components:observableDataTable` component - `DataTableForObservableQuery` from
@@ -1 +1 @@
1
- {"version":3,"file":"SceneObservableDataTable.js","sources":["../../../data/SceneObservableDataTable.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForObservableQuery = lazy(async () => ({\n default: (await import('@cratis/components/DataTables')).DataTableForObservableQuery,\n}));\n\n/**\n * The `Cratis.Components:observableDataTable` component - `DataTableForObservableQuery` from\n * `@cratis/components/DataTables`.\n *\n * A separate name rather than a flag on `dataTable`, because the distinction is in the *proxy* a host\n * registers, not in how the table is configured: an observable query opens a WebSocket subscription and\n * re-renders when the server's read model changes, and a plain query does not. A screen that names an\n * observable query here is stating that its data is live, which is a design decision worth being able to\n * read off the screen.\n *\n * As with `dataTable`, no `clientFiltering` property is exposed: `@cratis/components` 3.0.0 keeps the\n * prop for source compatibility but ignores it, and a screen property that cannot change anything is\n * worse than an absent one.\n */\nexport function SceneObservableDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForObservableQuery\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForObservableQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForObservableQuery","lazy","default","SceneObservableDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,2BAAAA,iBAA8BC,UAAAA,CAAK,WAAa;AAClDC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,+BAAA,CAA+B,EAAGF;KAC7D,CAAA,CAAA;AAEA;;;;;;;;;;;;;AAaC,IACM,SAASG,wBAAAA,CAAyB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACjF,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,2BAAAA,EAAAA;YACGe,KAAAA,EAAOR,MAAAA;AACPS,YAAAA,YAAAA,EAAcC,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEC,OAAAA,EAASF,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,SAAA,CAAA;YAC5CE,kBAAAA,EAAoBC,8BAAAA,CAAoBjB,OAAAA,CAAQc,UAAU,EAAE,oBAAA,CAAA;YAC5DI,SAAAA,EAAWL,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,WAAA,CAAA;AAE7Cb,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;"}
1
+ {"version":3,"file":"SceneObservableDataTable.js","sources":["../../../data/SceneObservableDataTable.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForObservableQuery = lazy(async () => ({\n default: (await import('../bindings/ArcBoundComponents')).BoundObservableDataTable,\n}));\n\n/**\n * The `Cratis.Components:observableDataTable` component - `DataTableForObservableQuery` from\n * `@cratis/components/DataTables`.\n *\n * A separate name rather than a flag on `dataTable`, because the distinction is in the *proxy* a host\n * registers, not in how the table is configured: an observable query opens a WebSocket subscription and\n * re-renders when the server's read model changes, and a plain query does not. A screen that names an\n * observable query here is stating that its data is live, which is a design decision worth being able to\n * read off the screen.\n *\n * As with `dataTable`, no `clientFiltering` property is exposed: `@cratis/components` 3.0.0 keeps the\n * prop for source compatibility but ignores it, and a screen property that cannot change anything is\n * worse than an absent one.\n */\nexport function SceneObservableDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForObservableQuery\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForObservableQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForObservableQuery","lazy","default","BoundObservableDataTable","SceneObservableDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,2BAAAA,iBAA8BC,UAAAA,CAAK,WAAa;AAClDC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KAAgC,EAAGC;KAC9D,CAAA,CAAA;AAEA;;;;;;;;;;;;;AAaC,IACM,SAASC,wBAAAA,CAAyB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACjF,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACZ,2BAAAA,EAAAA;YACGgB,KAAAA,EAAOR,MAAAA;AACPS,YAAAA,YAAAA,EAAcC,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEC,OAAAA,EAASF,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,SAAA,CAAA;YAC5CE,kBAAAA,EAAoBC,8BAAAA,CAAoBjB,OAAAA,CAAQc,UAAU,EAAE,oBAAA,CAAA;YAC5DI,SAAAA,EAAWL,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,WAAA,CAAA;AAE7Cb,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;"}
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('react');
5
+ var BindingKind = require('../bindings/BindingKind.js');
6
+ var resolveElementBinding = require('../bindings/resolveElementBinding.js');
7
+ var MissingBinding = require('../bindings/MissingBinding.js');
8
+ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
9
+ var properties = require('../properties.js');
10
+ var SingleResultStatus = require('./SingleResultStatus.js');
11
+
12
+ const SingleResultRuntime = /*#__PURE__*/ react.lazy(()=>Promise.resolve().then(function () { return require('./SingleResultRuntime.js'); }));
13
+ /** Read-only scalar field of an optional single model; the host owns and commits the input. */ function SceneSingleResult({ element }) {
14
+ const { name, target } = resolveElementBinding.resolveElementBinding(element, BindingKind.BindingKind.Query);
15
+ if (!target) return /*#__PURE__*/ jsxRuntime.jsx(MissingBinding.MissingBinding, {
16
+ element: element,
17
+ kind: BindingKind.BindingKind.Query,
18
+ name: name
19
+ });
20
+ // Nothing, including loading Arc, happens until the host explicitly commits its input.
21
+ if (!element.isEnabled || properties.booleanProperty(element.properties, 'enabled') !== true) {
22
+ return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
23
+ state: "idle"
24
+ });
25
+ }
26
+ const queryArguments = properties.objectProperty(element.properties, 'queryArguments');
27
+ const resultField = properties.stringProperty(element.properties, 'resultField');
28
+ if (!queryArguments || !resultField) return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
29
+ state: "failure"
30
+ });
31
+ return /*#__PURE__*/ jsxRuntime.jsx(ArcRuntimeBoundary.ArcRuntimeBoundary, {
32
+ children: /*#__PURE__*/ jsxRuntime.jsx(SingleResultRuntime, {
33
+ query: target,
34
+ queryArguments: queryArguments,
35
+ resultField: resultField
36
+ })
37
+ });
38
+ }
39
+
40
+ exports.SceneSingleResult = SceneSingleResult;
41
+ //# sourceMappingURL=SceneSingleResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SceneSingleResult.js","sources":["../../../data/SceneSingleResult.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, objectProperty, stringProperty } from '../properties';\nimport { SingleResultStatus } from './SingleResultStatus';\n\nconst SingleResultRuntime = lazy(() => import('./SingleResultRuntime'));\n\n/** Read-only scalar field of an optional single model; the host owns and commits the input. */\nexport function SceneSingleResult({ element }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n // Nothing, including loading Arc, happens until the host explicitly commits its input.\n if (!element.isEnabled || booleanProperty(element.properties, 'enabled') !== true) {\n return <SingleResultStatus state='idle' />;\n }\n\n const queryArguments = objectProperty(element.properties, 'queryArguments');\n const resultField = stringProperty(element.properties, 'resultField');\n if (!queryArguments || !resultField) return <SingleResultStatus state='failure' />;\n\n return <ArcRuntimeBoundary>\n <SingleResultRuntime query={target} queryArguments={queryArguments} resultField={resultField} />\n </ArcRuntimeBoundary>;\n}\n"],"names":["SingleResultRuntime","lazy","SceneSingleResult","element","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","isEnabled","booleanProperty","properties","SingleResultStatus","state","queryArguments","objectProperty","resultField","stringProperty","ArcRuntimeBoundary","query"],"mappings":";;;;;;;;;;;AASA,MAAMA,mBAAAA,iBAAsBC,UAAAA,CAAK,IAAM,oDAAO,0BAAA,KAAA,CAAA;AAE9C,gGACO,SAASC,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;IACnE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBH,OAAAA,EAASI,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeP,OAAAA,EAASA,OAAAA;AAASQ,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;;IAGrF,IAAI,CAACD,QAAQS,SAAS,IAAIC,2BAAgBV,OAAAA,CAAQW,UAAU,EAAE,SAAA,CAAA,KAAe,IAAA,EAAM;AAC/E,QAAA,qBAAOL,cAAA,CAACM,qCAAAA,EAAAA;YAAmBC,KAAAA,EAAM;;AACrC,IAAA;AAEA,IAAA,MAAMC,cAAAA,GAAiBC,yBAAAA,CAAef,OAAAA,CAAQW,UAAU,EAAE,gBAAA,CAAA;AAC1D,IAAA,MAAMK,WAAAA,GAAcC,yBAAAA,CAAejB,OAAAA,CAAQW,UAAU,EAAE,aAAA,CAAA;AACvD,IAAA,IAAI,CAACG,cAAAA,IAAkB,CAACE,WAAAA,EAAa,qBAAOV,cAAA,CAACM,qCAAAA,EAAAA;QAAmBC,KAAAA,EAAM;;AAEtE,IAAA,qBAAOP,cAAA,CAACY,qCAAAA,EAAAA;AACJ,QAAA,QAAA,gBAAAZ,cAAA,CAACT,mBAAAA,EAAAA;YAAoBsB,KAAAA,EAAOjB,MAAAA;YAAQY,cAAAA,EAAgBA,cAAAA;YAAgBE,WAAAA,EAAaA;;;AAEzF;;"}
@@ -0,0 +1,122 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var react = require('react');
7
+ var arc_react = require('@cratis/arc.react');
8
+ var SingleResultStatus = require('./SingleResultStatus.js');
9
+
10
+ /**
11
+ * Private execution owner. Arc owns validation, routing, HTTP and deserialization; this component
12
+ * owns only request lifetime and presentation. No shared cache can hand B the result belonging to A.
13
+ */ function SingleResultRuntime({ query, queryArguments, resultField }) {
14
+ const arc = react.useContext(arc_react.ArcContext);
15
+ const { microservice, apiBasePath, origin, httpHeadersCallback, queryVersion } = arc;
16
+ // Identity is deliberate: hosts replace immutable committed arguments rather than mutating them.
17
+ const request = react.useMemo(()=>({
18
+ query,
19
+ queryArguments,
20
+ resultField,
21
+ microservice,
22
+ apiBasePath,
23
+ origin,
24
+ httpHeadersCallback,
25
+ queryVersion
26
+ }), [
27
+ query,
28
+ queryArguments,
29
+ resultField,
30
+ microservice,
31
+ apiBasePath,
32
+ origin,
33
+ httpHeadersCallback,
34
+ queryVersion
35
+ ]);
36
+ const [settled, setSettled] = react.useState();
37
+ react.useEffect(()=>{
38
+ // Each effect setup is a generation, including StrictMode's setup/cleanup/setup replay.
39
+ let current = true;
40
+ let instance;
41
+ const publish = (outcome)=>{
42
+ if (current) setSettled({
43
+ request,
44
+ outcome
45
+ });
46
+ };
47
+ const execute = async ()=>{
48
+ try {
49
+ // The registry intentionally stores constructors without an eager Arc dependency.
50
+ instance = new request.query();
51
+ if (instance.enumerable !== false) {
52
+ publish({
53
+ state: 'failure'
54
+ });
55
+ return;
56
+ }
57
+ instance.setMicroservice(request.microservice);
58
+ instance.setApiBasePath(request.apiBasePath ?? '');
59
+ instance.setOrigin(request.origin ?? '');
60
+ instance.setHttpHeadersCallback(request.httpHeadersCallback ?? (()=>({})));
61
+ // Native perform validates required arguments and proxy rules before HTTP. No copying,
62
+ // defaults, business validation, route construction or array wrapping happens here.
63
+ const result = await instance.perform(request.queryArguments);
64
+ if (!current) return;
65
+ if (result.isSuccess !== true || result.isAuthorized !== true || result.isValid !== true || result.hasExceptions !== false || result.isReady === false) {
66
+ publish({
67
+ state: 'failure'
68
+ });
69
+ return;
70
+ }
71
+ if (result.data === null || result.data === undefined) {
72
+ publish({
73
+ state: 'notFound'
74
+ });
75
+ return;
76
+ }
77
+ if (typeof result.data !== 'object' || Array.isArray(result.data)) {
78
+ publish({
79
+ state: 'failure'
80
+ });
81
+ return;
82
+ }
83
+ // Only one own data field, never a path, inherited member, getter or expression.
84
+ const descriptor = Object.getOwnPropertyDescriptor(result.data, request.resultField);
85
+ const value = descriptor && 'value' in descriptor ? descriptor.value : undefined;
86
+ if (typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' && Number.isFinite(value)) {
87
+ publish({
88
+ state: 'success',
89
+ value: String(value)
90
+ });
91
+ } else {
92
+ publish({
93
+ state: 'failure'
94
+ });
95
+ }
96
+ } catch {
97
+ // Includes native AbortError rejections. Disposed generations cannot publish or leak
98
+ // an unhandled promise, even when the HTTP boundary ignores cancellation.
99
+ publish({
100
+ state: 'failure'
101
+ });
102
+ }
103
+ };
104
+ void execute();
105
+ return ()=>{
106
+ current = false;
107
+ instance?.abortController?.abort();
108
+ };
109
+ }, [
110
+ request
111
+ ]);
112
+ // Mask old data during the render that changes inputs, before effect cleanup/setup runs.
113
+ if (settled?.request !== request) return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
114
+ state: "loading"
115
+ });
116
+ return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
117
+ ...settled.outcome
118
+ });
119
+ }
120
+
121
+ exports.default = SingleResultRuntime;
122
+ //# sourceMappingURL=SingleResultRuntime.js.map
@@ -0,0 +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,gBAAAA,CAAWC,oBAAAA,CAAAA;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A,KAAU,SAAA,IAAc,OAAOA,KAAAA,KAAU,QAAA,IAAYC,MAAAA,CAAOC,QAAQ,CAACF,KAAAA,CAAAA,EAAS;oBAClHvB,OAAAA,CAAQ;wBAAEI,KAAAA,EAAO,SAAA;AAAWmB,wBAAAA,KAAAA,EAAOG,MAAAA,CAAOH,KAAAA;AAAO,qBAAA,CAAA;gBACrD,CAAA,MAAO;oBACHvB,OAAAA,CAAQ;wBAAEI,KAAAA,EAAO;AAAU,qBAAA,CAAA;AAC/B,gBAAA;AACJ,YAAA,CAAA,CAAE,OAAM;;;gBAGJJ,OAAAA,CAAQ;oBAAEI,KAAAA,EAAO;AAAU,iBAAA,CAAA;AAC/B,YAAA;AACJ,QAAA,CAAA;QACA,KAAKF,OAAAA,EAAAA;QACL,OAAO,IAAA;YACHJ,OAAAA,GAAU,KAAA;AACVC,YAAAA,QAAAA,EAAU4B,eAAAA,EAAiBC,KAAAA,EAAAA;AAC/B,QAAA,CAAA;IACJ,CAAA,EAAG;AAACpC,QAAAA;AAAQ,KAAA,CAAA;;AAGZ,IAAA,IAAIE,OAAAA,EAASF,OAAAA,KAAYA,OAAAA,EAAS,qBAAOqC,cAAA,CAACC,qCAAAA,EAAAA;QAAmB1B,KAAAA,EAAM;;AACnE,IAAA,qBAAOyB,cAAA,CAACC,qCAAAA,EAAAA;AAAoB,QAAA,GAAGpC,QAAQO;;AAC3C;;"}
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ const messages = {
8
+ idle: 'Idle',
9
+ loading: 'Loading',
10
+ notFound: 'Not found',
11
+ failure: 'Unable to load result',
12
+ success: ''
13
+ };
14
+ /** Internal shared presentation; never exposes query exception messages or server stack traces. */ function SingleResultStatus({ state, value }) {
15
+ return /*#__PURE__*/ jsxRuntime.jsx("span", {
16
+ role: state === 'failure' ? 'alert' : 'status',
17
+ "data-scene-single-result": state,
18
+ children: state === 'success' ? value : messages[state]
19
+ });
20
+ }
21
+
22
+ exports.SingleResultStatus = SingleResultStatus;
23
+ //# sourceMappingURL=SingleResultStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SingleResultStatus.js","sources":["../../../data/SingleResultStatus.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\ntype State = 'idle' | 'loading' | 'notFound' | 'failure' | 'success';\n\nconst messages = { idle: 'Idle', loading: 'Loading', notFound: 'Not found', failure: 'Unable to load result', success: '' };\n\n/** Internal shared presentation; never exposes query exception messages or server stack traces. */\nexport function SingleResultStatus({ state, value }: { state: State; value?: string }) {\n return <span role={state === 'failure' ? 'alert' : 'status'} data-scene-single-result={state}>\n {state === 'success' ? value : messages[state]}\n </span>;\n}\n"],"names":["messages","idle","loading","notFound","failure","success","SingleResultStatus","state","value","_jsx","span","role","data-scene-single-result"],"mappings":";;;;AAAA;AACA;AAIA,MAAMA,QAAAA,GAAW;IAAEC,IAAAA,EAAM,MAAA;IAAQC,OAAAA,EAAS,SAAA;IAAWC,QAAAA,EAAU,WAAA;IAAaC,OAAAA,EAAS,uBAAA;IAAyBC,OAAAA,EAAS;AAAG,CAAA;AAE1H,oGACO,SAASC,kBAAAA,CAAmB,EAAEC,KAAK,EAAEC,KAAK,EAAoC,EAAA;AACjF,IAAA,qBAAOC,cAAA,CAACC,MAAAA,EAAAA;QAAKC,IAAAA,EAAMJ,KAAAA,KAAU,YAAY,OAAA,GAAU,QAAA;QAAUK,0BAAAA,EAA0BL,KAAAA;AAClFA,QAAAA,QAAAA,EAAAA,KAAAA,KAAU,SAAA,GAAYC,KAAAA,GAAQR,QAAQ,CAACO,KAAAA;;AAEhD;;"}
@@ -9,7 +9,7 @@ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
9
9
  var properties = require('../properties.js');
10
10
 
11
11
  const CommandDialog = /*#__PURE__*/ react.lazy(async ()=>({
12
- default: (await import('@cratis/components/CommandDialog')).CommandDialog
12
+ default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundCommandDialog
13
13
  }));
14
14
  /**
15
15
  * The `Cratis.Components:commandDialog` component - `CommandDialog` from `@cratis/components/CommandDialog`.
@@ -1 +1 @@
1
- {"version":3,"file":"SceneCommandDialog.js","sources":["../../../dialogs/SceneCommandDialog.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, stringProperty } from '../properties';\n\nconst CommandDialog = lazy(async () => ({ default: (await import('@cratis/components/CommandDialog')).CommandDialog }));\n\n/**\n * The `Cratis.Components:commandDialog` component - `CommandDialog` from `@cratis/components/CommandDialog`.\n *\n * A dialog whose confirm button *is* the command's execution: it binds the form to the command, submits\n * on confirm, feeds the backend's validation results back onto the fields, and only closes when the\n * command succeeded. That last part is the reason to use it rather than composing `dialog` with\n * `commandForm` - a hand-composed pair has no way to keep the dialog open on a rejected command without\n * reimplementing the protocol.\n *\n * The `command` property names an Arc command proxy; the fields go in the `content` slot.\n *\n * `dismissable` and `closeAriaLabel` are here rather than on `dialog` alone because `CommandDialog`\n * forwards both to the dialog it wraps, and in `@cratis/components` 3.0.0 that forwarding actually\n * happens - 2.x accepted the two props and dropped them on the floor. `dismissable` matters more on a\n * command dialog than anywhere else: it decides whether a half-filled form can be abandoned with\n * `Escape` or a backdrop click, which is a decision about the command, not about the chrome.\n *\n * The `resizable` property this adapter used to carry is gone. It is still declared upstream so call\n * sites compile, but PrimeReact 11's headless dialog has no resize handle and nothing reads the prop.\n */\nexport function SceneCommandDialog({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Command);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Command} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <CommandDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n command={target}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n dismissable={booleanProperty(element.properties, 'dismissable')}\n okLabel={stringProperty(element.properties, 'okLabel')}\n cancelLabel={stringProperty(element.properties, 'cancelLabel')}\n closeAriaLabel={stringProperty(element.properties, 'closeAriaLabel')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </CommandDialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["CommandDialog","lazy","default","SceneCommandDialog","element","slots","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","command","visible","booleanProperty","width","dismissable","okLabel","cancelLabel","closeAriaLabel","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,kCAAA,CAAkC,EAAGF;KAAc,CAAA,CAAA;AAEpH;;;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC3E,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,OAAO,CAAA;IAC3E,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,OAAO;QAAEJ,IAAAA,EAAMA;;AAEvF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,aAAAA,EAAAA;AACGe,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,OAAAA,EAASX,MAAAA;AACTY,YAAAA,OAAAA,EAASC,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA,IAAc,IAAA;YAC3DI,KAAAA,EAAOL,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA;YAC1CK,WAAAA,EAAaF,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;YACjDM,OAAAA,EAASP,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CO,WAAAA,EAAaR,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;YAChDQ,cAAAA,EAAgBT,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,gBAAA,CAAA;YACnDS,SAAAA,EAAWV,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,WAAA,CAAA;AAE7CZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMsB;;;AAIvB;;"}
1
+ {"version":3,"file":"SceneCommandDialog.js","sources":["../../../dialogs/SceneCommandDialog.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, stringProperty } from '../properties';\n\nconst CommandDialog = lazy(async () => ({ default: (await import('../bindings/ArcBoundComponents')).BoundCommandDialog }));\n\n/**\n * The `Cratis.Components:commandDialog` component - `CommandDialog` from `@cratis/components/CommandDialog`.\n *\n * A dialog whose confirm button *is* the command's execution: it binds the form to the command, submits\n * on confirm, feeds the backend's validation results back onto the fields, and only closes when the\n * command succeeded. That last part is the reason to use it rather than composing `dialog` with\n * `commandForm` - a hand-composed pair has no way to keep the dialog open on a rejected command without\n * reimplementing the protocol.\n *\n * The `command` property names an Arc command proxy; the fields go in the `content` slot.\n *\n * `dismissable` and `closeAriaLabel` are here rather than on `dialog` alone because `CommandDialog`\n * forwards both to the dialog it wraps, and in `@cratis/components` 3.0.0 that forwarding actually\n * happens - 2.x accepted the two props and dropped them on the floor. `dismissable` matters more on a\n * command dialog than anywhere else: it decides whether a half-filled form can be abandoned with\n * `Escape` or a backdrop click, which is a decision about the command, not about the chrome.\n *\n * The `resizable` property this adapter used to carry is gone. It is still declared upstream so call\n * sites compile, but PrimeReact 11's headless dialog has no resize handle and nothing reads the prop.\n */\nexport function SceneCommandDialog({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Command);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Command} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <CommandDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n command={target}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n dismissable={booleanProperty(element.properties, 'dismissable')}\n okLabel={stringProperty(element.properties, 'okLabel')}\n cancelLabel={stringProperty(element.properties, 'cancelLabel')}\n closeAriaLabel={stringProperty(element.properties, 'closeAriaLabel')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </CommandDialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["CommandDialog","lazy","default","BoundCommandDialog","SceneCommandDialog","element","slots","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","command","visible","booleanProperty","width","dismissable","okLabel","cancelLabel","closeAriaLabel","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KAAgC,EAAGC;KAAmB,CAAA,CAAA;AAE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,7 +9,7 @@ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
9
9
  var properties = require('../properties.js');
10
10
 
11
11
  const StepperCommandDialog = /*#__PURE__*/ react.lazy(async ()=>({
12
- default: (await import('@cratis/components/CommandDialog')).StepperCommandDialog
12
+ default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundStepperCommandDialog
13
13
  }));
14
14
  /** Whether the step headers run across the top or down the side. */ const orientations = [
15
15
  'horizontal',
@@ -1 +1 @@
1
- {"version":3,"file":"SceneStepperCommandDialog.js","sources":["../../../dialogs/SceneStepperCommandDialog.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\nconst StepperCommandDialog = lazy(async () => ({\n default: (await import('@cratis/components/CommandDialog')).StepperCommandDialog,\n}));\n\n/** Whether the step headers run across the top or down the side. */\nconst orientations = ['horizontal', 'vertical'] as const;\n\n/**\n * The `Cratis.Components:stepperCommandDialog` component - `StepperCommandDialog` from\n * `@cratis/components/CommandDialog`.\n *\n * `commandDialog` split across steps, for a command with more fields than fit one screen. It stays a\n * single command: the steps partition the *fields*, not the intent, and nothing is submitted until the\n * last step - so a half-finished wizard leaves no trace, which is exactly what a command should do.\n *\n * `linear` decides whether a step can be skipped ahead of the one before it. The step panels go in the\n * `content` slot.\n */\nexport function SceneStepperCommandDialog({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Command);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Command} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <StepperCommandDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n command={target}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n linear={booleanProperty(element.properties, 'linear')}\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n okLabel={stringProperty(element.properties, 'okLabel')}\n nextLabel={stringProperty(element.properties, 'nextLabel')}\n previousLabel={stringProperty(element.properties, 'previousLabel')}\n showCancel={booleanProperty(element.properties, 'showCancel')}\n cancelLabel={stringProperty(element.properties, 'cancelLabel')}\n >\n {slots.content}\n </StepperCommandDialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["StepperCommandDialog","lazy","default","orientations","SceneStepperCommandDialog","element","slots","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","command","visible","booleanProperty","width","linear","orientation","unionProperty","okLabel","nextLabel","previousLabel","showCancel","cancelLabel","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,oBAAAA,iBAAuBC,UAAAA,CAAK,WAAa;AAC3CC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,kCAAA,CAAkC,EAAGF;KAChE,CAAA,CAAA;AAEA,qEACA,MAAMG,YAAAA,GAAe;AAAC,IAAA,YAAA;AAAc,IAAA;AAAW,CAAA;AAE/C;;;;;;;;;;AAUC,IACM,SAASC,yBAAAA,CAA0B,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAClF,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,OAAO,CAAA;IAC3E,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,OAAO;QAAEJ,IAAAA,EAAMA;;AAEvF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACZ,oBAAAA,EAAAA;AACGgB,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,OAAAA,EAASX,MAAAA;AACTY,YAAAA,OAAAA,EAASC,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA,IAAc,IAAA;YAC3DI,KAAAA,EAAOL,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA;YAC1CK,MAAAA,EAAQF,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,QAAA,CAAA;AAC5CM,YAAAA,WAAAA,EAAaC,wBAAAA,CAAcpB,OAAAA,CAAQa,UAAU,EAAE,aAAA,EAAef,YAAAA,CAAAA;YAC9DuB,OAAAA,EAAST,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CS,SAAAA,EAAWV,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,WAAA,CAAA;YAC9CU,aAAAA,EAAeX,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,eAAA,CAAA;YAClDW,UAAAA,EAAYR,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,YAAA,CAAA;YAChDY,WAAAA,EAAab,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;AAE/CZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMyB;;;AAIvB;;"}
1
+ {"version":3,"file":"SceneStepperCommandDialog.js","sources":["../../../dialogs/SceneStepperCommandDialog.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\nconst StepperCommandDialog = lazy(async () => ({\n default: (await import('../bindings/ArcBoundComponents')).BoundStepperCommandDialog,\n}));\n\n/** Whether the step headers run across the top or down the side. */\nconst orientations = ['horizontal', 'vertical'] as const;\n\n/**\n * The `Cratis.Components:stepperCommandDialog` component - `StepperCommandDialog` from\n * `@cratis/components/CommandDialog`.\n *\n * `commandDialog` split across steps, for a command with more fields than fit one screen. It stays a\n * single command: the steps partition the *fields*, not the intent, and nothing is submitted until the\n * last step - so a half-finished wizard leaves no trace, which is exactly what a command should do.\n *\n * `linear` decides whether a step can be skipped ahead of the one before it. The step panels go in the\n * `content` slot.\n */\nexport function SceneStepperCommandDialog({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Command);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Command} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <StepperCommandDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n command={target}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n linear={booleanProperty(element.properties, 'linear')}\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n okLabel={stringProperty(element.properties, 'okLabel')}\n nextLabel={stringProperty(element.properties, 'nextLabel')}\n previousLabel={stringProperty(element.properties, 'previousLabel')}\n showCancel={booleanProperty(element.properties, 'showCancel')}\n cancelLabel={stringProperty(element.properties, 'cancelLabel')}\n >\n {slots.content}\n </StepperCommandDialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["StepperCommandDialog","lazy","default","BoundStepperCommandDialog","orientations","SceneStepperCommandDialog","element","slots","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","command","visible","booleanProperty","width","linear","orientation","unionProperty","okLabel","nextLabel","previousLabel","showCancel","cancelLabel","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,oBAAAA,iBAAuBC,UAAAA,CAAK,WAAa;AAC3CC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KAAg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A,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,eAAA,CAAA;YAClDW,UAAAA,EAAYR,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,YAAA,CAAA;YAChDY,WAAAA,EAAab,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;AAE/CZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMyB;;;AAIvB;;"}
@@ -19,11 +19,14 @@ const RadioButtonField = /*#__PURE__*/ react.lazy(async ()=>({
19
19
  * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a
20
20
  * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.
21
21
  */ function SceneRadioButtonField({ element }) {
22
+ // Use the same reader as CommandFormField's binding gate; that gate owns missing-property feedback.
23
+ const name = properties.stringProperty(element.properties, 'property');
22
24
  const buttonValue = properties.stringProperty(element.properties, 'buttonValue') ?? properties.numberProperty(element.properties, 'buttonValue') ?? '';
23
25
  return /*#__PURE__*/ jsxRuntime.jsx(CommandFormField.CommandFormField, {
24
26
  element: element,
25
- children: (binding)=>/*#__PURE__*/ jsxRuntime.jsx(RadioButtonField, {
27
+ children: (binding)=>name !== undefined && /*#__PURE__*/ jsxRuntime.jsx(RadioButtonField, {
26
28
  ...binding,
29
+ name: name,
27
30
  buttonValue: buttonValue,
28
31
  label: properties.stringProperty(element.properties, 'label'),
29
32
  className: properties.stringProperty(element.properties, 'className')
@@ -1 +1 @@
1
- {"version":3,"file":"SceneRadioButtonField.js","sources":["../../../../forms/fields/SceneRadioButtonField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioButtonField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioButtonField }));\n\n/**\n * The `Cratis.Components:radioButtonField` component - `RadioButtonField` from\n * `@cratis/components/CommandForm`.\n *\n * One button of a mutually exclusive set, for a screen that needs the choices placed individually rather\n * than as a block. `buttonValue` is the value this particular button writes to the bound property, and\n * the whole set is tied together by every button naming the same `property`.\n *\n * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a\n * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.\n */\nexport function SceneRadioButtonField({ element }: RegisteredComponentProps) {\n const buttonValue = stringProperty(element.properties, 'buttonValue') ?? numberProperty(element.properties, 'buttonValue') ?? '';\n\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioButtonField\n {...binding}\n buttonValue={buttonValue}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioButtonField","lazy","default","SceneRadioButtonField","element","buttonValue","stringProperty","properties","numberProperty","_jsx","CommandFormField","binding","label","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;AAUC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;IACvE,MAAMC,WAAAA,GAAcC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,kBAAkBC,yBAAAA,CAAeJ,OAAAA,CAAQG,UAAU,EAAE,aAAA,CAAA,IAAkB,EAAA;AAE9H,IAAA,qBACIE,cAAA,CAACC,iCAAAA,EAAAA;QAAiBN,OAAAA,EAASA,OAAAA;AACtBO,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACT,gBAAAA,EAAAA;AACI,gBAAA,GAAGW,OAAO;gBACXN,WAAAA,EAAaA,WAAAA;gBACbO,KAAAA,EAAON,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA;gBAC1CM,SAAAA,EAAWP,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,WAAA;;;AAKlE;;"}
1
+ {"version":3,"file":"SceneRadioButtonField.js","sources":["../../../../forms/fields/SceneRadioButtonField.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioButtonField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioButtonField }));\n\n/**\n * The `Cratis.Components:radioButtonField` component - `RadioButtonField` from\n * `@cratis/components/CommandForm`.\n *\n * One button of a mutually exclusive set, for a screen that needs the choices placed individually rather\n * than as a block. `buttonValue` is the value this particular button writes to the bound property, and\n * the whole set is tied together by every button naming the same `property`.\n *\n * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a\n * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.\n */\nexport function SceneRadioButtonField({ element }: RegisteredComponentProps) {\n // Use the same reader as CommandFormField's binding gate; that gate owns missing-property feedback.\n const name = stringProperty(element.properties, 'property');\n const buttonValue = stringProperty(element.properties, 'buttonValue') ?? numberProperty(element.properties, 'buttonValue') ?? '';\n\n return (\n <CommandFormField element={element}>\n {binding => name !== undefined && (\n <RadioButtonField\n {...binding}\n name={name}\n buttonValue={buttonValue}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioButtonField","lazy","default","SceneRadioButtonField","element","name","stringProperty","properties","buttonValue","numberProperty","_jsx","CommandFormField","binding","undefined","label","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;AAUC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;;AAEvE,IAAA,MAAMC,IAAAA,GAAOC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,UAAA,CAAA;IAChD,MAAMC,WAAAA,GAAcF,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,kBAAkBE,yBAAAA,CAAeL,OAAAA,CAAQG,UAAU,EAAE,aAAA,CAAA,IAAkB,EAAA;AAE9H,IAAA,qBACIG,cAAA,CAACC,iCAAAA,EAAAA;QAAiBP,OAAAA,EAASA,OAAAA;kBACtBQ,CAAAA,OAAAA,GAAWP,IAAAA,KAASQ,SAAAA,kBACjBH,cAAA,CAACV,gBAAAA,EAAAA;AACI,gBAAA,GAAGY,OAAO;gBACXP,IAAAA,EAAMA,IAAAA;gBACNG,WAAAA,EAAaA,WAAAA;gBACbM,KAAAA,EAAOR,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA;gBAC1CQ,SAAAA,EAAWT,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,WAAA;;;AAKlE;;"}
package/dist/cjs/index.js CHANGED
@@ -10,6 +10,7 @@ var ArcRuntimeBoundary = require('./bindings/ArcRuntimeBoundary.js');
10
10
  var ScenePage = require('./pages/ScenePage.js');
11
11
  var SceneDataPage = require('./pages/SceneDataPage.js');
12
12
  var SceneFormElement = require('./pages/SceneFormElement.js');
13
+ var SceneSingleResult = require('./data/SceneSingleResult.js');
13
14
  var SceneDataTable = require('./data/SceneDataTable.js');
14
15
  var SceneObservableDataTable = require('./data/SceneObservableDataTable.js');
15
16
  var SceneCommandForm = require('./forms/SceneCommandForm.js');
@@ -78,6 +79,7 @@ exports.ArcRuntimeBoundary = ArcRuntimeBoundary.ArcRuntimeBoundary;
78
79
  exports.ScenePage = ScenePage.ScenePage;
79
80
  exports.SceneDataPage = SceneDataPage.SceneDataPage;
80
81
  exports.SceneFormElement = SceneFormElement.SceneFormElement;
82
+ exports.SceneSingleResult = SceneSingleResult.SceneSingleResult;
81
83
  exports.SceneDataTable = SceneDataTable.SceneDataTable;
82
84
  exports.SceneObservableDataTable = SceneObservableDataTable.SceneObservableDataTable;
83
85
  exports.SceneCommandForm = SceneCommandForm.SceneCommandForm;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
9
9
  var properties = require('../properties.js');
10
10
 
11
11
  const DataPage = /*#__PURE__*/ react.lazy(async ()=>({
12
- default: (await import('@cratis/components/DataPage')).DataPage
12
+ default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundDataPage
13
13
  }));
14
14
  /**
15
15
  * The `Cratis.Components:dataPage` component - `DataPage` from `@cratis/components/DataPage`.