@cratis/scene.primereact 4.14.0 → 4.16.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 (85) hide show
  1. package/dist/cjs/form/PrimeCalendar.js +3 -1
  2. package/dist/cjs/form/PrimeCalendar.js.map +1 -1
  3. package/dist/cjs/form/PrimeCheckbox.js +4 -2
  4. package/dist/cjs/form/PrimeCheckbox.js.map +1 -1
  5. package/dist/cjs/form/PrimeDropdown.js +3 -1
  6. package/dist/cjs/form/PrimeDropdown.js.map +1 -1
  7. package/dist/cjs/form/PrimeInputNumber.js +3 -1
  8. package/dist/cjs/form/PrimeInputNumber.js.map +1 -1
  9. package/dist/cjs/form/PrimeInputText.js +3 -1
  10. package/dist/cjs/form/PrimeInputText.js.map +1 -1
  11. package/dist/cjs/form/PrimeInputTextarea.js +3 -1
  12. package/dist/cjs/form/PrimeInputTextarea.js.map +1 -1
  13. package/dist/cjs/form/PrimeMultiSelect.js +3 -1
  14. package/dist/cjs/form/PrimeMultiSelect.js.map +1 -1
  15. package/dist/cjs/form/PrimePassword.js +3 -1
  16. package/dist/cjs/form/PrimePassword.js.map +1 -1
  17. package/dist/cjs/form/PrimeRadioButton.js +3 -1
  18. package/dist/cjs/form/PrimeRadioButton.js.map +1 -1
  19. package/dist/cjs/form/PrimeToggleSwitch.js +4 -1
  20. package/dist/cjs/form/PrimeToggleSwitch.js.map +1 -1
  21. package/dist/cjs/inputDescriptors.js +86 -0
  22. package/dist/cjs/inputDescriptors.js.map +1 -0
  23. package/dist/cjs/primeReactDescriptors.js +2 -0
  24. package/dist/cjs/primeReactDescriptors.js.map +1 -1
  25. package/dist/esm/form/PrimeCalendar.d.ts +1 -1
  26. package/dist/esm/form/PrimeCalendar.d.ts.map +1 -1
  27. package/dist/esm/form/PrimeCalendar.js +3 -1
  28. package/dist/esm/form/PrimeCalendar.js.map +1 -1
  29. package/dist/esm/form/PrimeCheckbox.d.ts +1 -1
  30. package/dist/esm/form/PrimeCheckbox.d.ts.map +1 -1
  31. package/dist/esm/form/PrimeCheckbox.js +4 -2
  32. package/dist/esm/form/PrimeCheckbox.js.map +1 -1
  33. package/dist/esm/form/PrimeDropdown.d.ts +1 -1
  34. package/dist/esm/form/PrimeDropdown.d.ts.map +1 -1
  35. package/dist/esm/form/PrimeDropdown.js +3 -1
  36. package/dist/esm/form/PrimeDropdown.js.map +1 -1
  37. package/dist/esm/form/PrimeInputNumber.d.ts +1 -1
  38. package/dist/esm/form/PrimeInputNumber.d.ts.map +1 -1
  39. package/dist/esm/form/PrimeInputNumber.js +3 -1
  40. package/dist/esm/form/PrimeInputNumber.js.map +1 -1
  41. package/dist/esm/form/PrimeInputText.d.ts +1 -1
  42. package/dist/esm/form/PrimeInputText.d.ts.map +1 -1
  43. package/dist/esm/form/PrimeInputText.js +3 -1
  44. package/dist/esm/form/PrimeInputText.js.map +1 -1
  45. package/dist/esm/form/PrimeInputTextarea.d.ts +1 -1
  46. package/dist/esm/form/PrimeInputTextarea.d.ts.map +1 -1
  47. package/dist/esm/form/PrimeInputTextarea.js +3 -1
  48. package/dist/esm/form/PrimeInputTextarea.js.map +1 -1
  49. package/dist/esm/form/PrimeMultiSelect.d.ts +1 -1
  50. package/dist/esm/form/PrimeMultiSelect.d.ts.map +1 -1
  51. package/dist/esm/form/PrimeMultiSelect.js +3 -1
  52. package/dist/esm/form/PrimeMultiSelect.js.map +1 -1
  53. package/dist/esm/form/PrimePassword.d.ts +1 -1
  54. package/dist/esm/form/PrimePassword.d.ts.map +1 -1
  55. package/dist/esm/form/PrimePassword.js +3 -1
  56. package/dist/esm/form/PrimePassword.js.map +1 -1
  57. package/dist/esm/form/PrimeRadioButton.d.ts +1 -1
  58. package/dist/esm/form/PrimeRadioButton.d.ts.map +1 -1
  59. package/dist/esm/form/PrimeRadioButton.js +3 -1
  60. package/dist/esm/form/PrimeRadioButton.js.map +1 -1
  61. package/dist/esm/form/PrimeToggleSwitch.d.ts +1 -1
  62. package/dist/esm/form/PrimeToggleSwitch.d.ts.map +1 -1
  63. package/dist/esm/form/PrimeToggleSwitch.js +4 -1
  64. package/dist/esm/form/PrimeToggleSwitch.js.map +1 -1
  65. package/dist/esm/inputDescriptors.d.ts +3 -0
  66. package/dist/esm/inputDescriptors.d.ts.map +1 -0
  67. package/dist/esm/inputDescriptors.js +84 -0
  68. package/dist/esm/inputDescriptors.js.map +1 -0
  69. package/dist/esm/primeReactDescriptors.d.ts.map +1 -1
  70. package/dist/esm/primeReactDescriptors.js +2 -0
  71. package/dist/esm/primeReactDescriptors.js.map +1 -1
  72. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  73. package/form/PrimeCalendar.tsx +3 -2
  74. package/form/PrimeCheckbox.tsx +4 -3
  75. package/form/PrimeDropdown.tsx +3 -2
  76. package/form/PrimeInputNumber.tsx +3 -2
  77. package/form/PrimeInputText.tsx +3 -2
  78. package/form/PrimeInputTextarea.tsx +3 -2
  79. package/form/PrimeMultiSelect.tsx +3 -2
  80. package/form/PrimePassword.tsx +3 -2
  81. package/form/PrimeRadioButton.tsx +3 -2
  82. package/form/PrimeToggleSwitch.tsx +4 -2
  83. package/inputDescriptors.ts +38 -0
  84. package/package.json +7 -7
  85. package/primeReactDescriptors.ts +2 -0
@@ -1 +1 @@
1
- {"version":3,"file":"primeReactDescriptors.js","sources":["../../primeReactDescriptors.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 { ComponentDescriptor, PropertyValueType } from '@cratis/scene.model';\nimport { componentRegistryKey } from '@cratis/scene.react';\nimport { chartTypeChoices } from './chart/chartTypeChoices';\nimport { legacyEnumerationChoices } from './legacyEnumerationChoices';\nimport { ChartType } from './chart';\nimport { TreeTableSelectionMode } from './data';\nimport { FileUploadMode } from './file';\n\nconst key = (name: string) => componentRegistryKey('PrimeReact', name);\n\n/** Design-time descriptors for PrimeReact controls whose authored data has structured configuration. */\nexport const primeReactDescriptors: ComponentDescriptor[] = [\n {\n component: key('chart'),\n displayName: 'Chart',\n description: 'A Chart.js chart. Legacy numeric types are rendered without changing stored data; new documents use stable type names. The host application must install chart.js.',\n properties: [\n {\n path: 'type', label: 'Type', group: 'Chart', valueType: PropertyValueType.Enum, default: ChartType.Bar,\n choices: chartTypeChoices,\n },\n { path: 'data', label: 'Data', group: 'Data', valueType: PropertyValueType.Json, description: 'The Chart.js data object, including labels and datasets in their authored order.' },\n { path: 'options', label: 'Options', group: 'Chart', valueType: PropertyValueType.Json, description: 'The Chart.js options object.' },\n { path: 'emptyLabel', label: 'No data label', group: 'Accessibility', valueType: PropertyValueType.String, default: 'No chart data', description: 'Shown instead of the chart while it has no data points. Data is never invented.' },\n { path: 'responsive', label: 'Responsive', group: 'Layout', valueType: PropertyValueType.Boolean, default: true },\n { path: 'style', label: 'Style', group: 'Layout', valueType: PropertyValueType.Json, description: 'The CSS style object applied to the chart surface.' },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('fileUpload'),\n displayName: 'File upload',\n description: 'An accessible file picker and drop zone. A host provides its upload effect, or the files are posted to the authored server URL. The URL must be on the page\\'s own origin unless the host allows another one.',\n properties: [\n {\n path: 'mode', label: 'Mode', group: 'Behavior', valueType: PropertyValueType.Enum, default: FileUploadMode.Advanced,\n choices: legacyEnumerationChoices(FileUploadMode, { [FileUploadMode.Advanced]: 'Advanced', [FileUploadMode.Basic]: 'Basic', [FileUploadMode.Auto]: 'Automatic' }),\n },\n { path: 'url', label: 'Server URL', group: 'Upload', valueType: PropertyValueType.String, description: 'Where the files are posted. Only the origin of the page, or an origin the host allows, is accepted; anything else is refused and nothing is sent.' },\n { path: 'name', label: 'Request field name', group: 'Upload', valueType: PropertyValueType.String, default: 'files' },\n { path: 'accept', label: 'Accepted MIME types', group: 'Upload', valueType: PropertyValueType.String },\n { path: 'multiple', label: 'Allow multiple files', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'maxFileSize', label: 'Maximum file size', group: 'Upload', valueType: PropertyValueType.Number, constraints: { minimum: 0, integer: true } },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('dataScroller'),\n displayName: 'Data scroller',\n description: 'A list that loads a chunk at a time as its end is reached. Items are strings, numbers or records, plus any child elements in the items slot; serialized legacy UI elements are refused.',\n properties: [\n { path: 'items', label: 'Items', group: 'Data', valueType: PropertyValueType.Json, description: 'Strings, numbers or records. A record is titled by its label, title, name, text or header field.' },\n { path: 'rows', label: 'Rows per load', group: 'Behavior', valueType: PropertyValueType.Number, default: 10, constraints: { minimum: 1, integer: true } },\n { path: 'inline', label: 'Scroll inline', group: 'Layout', valueType: PropertyValueType.Boolean, default: false, description: 'Scroll inside the control (true) or load as the page scrolls the end of the list into view (false).' },\n { path: 'scrollHeight', label: 'Inline scroll height', group: 'Layout', valueType: PropertyValueType.Number, constraints: { minimum: 1 }, description: 'The height in pixels of an inline scroller. 320 when omitted.' },\n { path: 'emptyLabel', label: 'No items label', group: 'Accessibility', valueType: PropertyValueType.String, default: 'No items to show' },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('treeTable'),\n displayName: 'Tree table',\n description: 'A hierarchical table with authored columns, selection, and optional pagination. Items are nodes (strings, numbers or records with key, label, data, children); serialized legacy UI elements are refused.',\n properties: [\n { path: 'columns', label: 'Columns', group: 'Data', valueType: PropertyValueType.Json, description: 'Column definitions with field and header, or nested column elements. Inferred from the first row when absent.' },\n { path: 'items', label: 'Items', group: 'Data', valueType: PropertyValueType.Json, description: 'The nodes: strings, numbers, or records with key, label, data, children, expanded and selectable.' },\n {\n path: 'selectionMode', label: 'Selection mode', group: 'Behavior', valueType: PropertyValueType.Enum, default: TreeTableSelectionMode.None,\n choices: legacyEnumerationChoices(TreeTableSelectionMode, { [TreeTableSelectionMode.None]: 'None', [TreeTableSelectionMode.Single]: 'Single', [TreeTableSelectionMode.Multiple]: 'Multiple', [TreeTableSelectionMode.Checkbox]: 'Checkbox' }),\n },\n { path: 'selection', label: 'Selection', group: 'Behavior', valueType: PropertyValueType.Json, description: 'The selected node keys: a key, an array of keys or { key } objects, or PrimeReact\\'s key map.' },\n { path: 'paginator', label: 'Show pagination', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'rows', label: 'Rows per page', group: 'Behavior', valueType: PropertyValueType.Number, default: 10, constraints: { minimum: 1, integer: true } },\n { path: 'emptyLabel', label: 'No records label', group: 'Accessibility', valueType: PropertyValueType.String, default: 'No records found' },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('editor'),\n displayName: 'Rich text editor',\n description: 'A rich-text HTML editor. Editing needs the host to provide Quill (QuillLoaderProvider); without it the content is shown read-only. The HTML is sanitized before it is shown.',\n properties: [\n { path: 'value', label: 'HTML value', group: 'Content', valueType: PropertyValueType.String },\n { path: 'placeholder', label: 'Placeholder', group: 'Content', valueType: PropertyValueType.String },\n { path: 'showHeader', label: 'Show toolbar', group: 'Behavior', valueType: PropertyValueType.Boolean, default: true },\n { path: 'readOnly', label: 'Read only', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('multiStateCheckbox'),\n displayName: 'Multi-state checkbox',\n description: 'An accessible button that cycles through its authored states in order, showing the current state as a checkbox-style glyph.',\n properties: [\n { path: 'value', label: 'Value', group: 'State', valueType: PropertyValueType.Json, description: 'The selected value. It may be null when the empty state is enabled.' },\n { path: 'options', label: 'Options', group: 'State', valueType: PropertyValueType.Json, description: 'The ordered state options. Each may provide label, value, and icon fields.' },\n { path: 'optionLabel', label: 'Option label field', group: 'State', valueType: PropertyValueType.String, default: 'label' },\n { path: 'optionValue', label: 'Option value field', group: 'State', valueType: PropertyValueType.String, default: 'value' },\n { path: 'empty', label: 'Allow empty state', group: 'State', valueType: PropertyValueType.Boolean, default: true },\n { path: 'emptyLabel', label: 'Empty state label', group: 'Accessibility', valueType: PropertyValueType.String, default: 'No selection' },\n { path: 'icons', label: 'Icons', group: 'Appearance', valueType: PropertyValueType.Json, description: 'Icons aligned with the options, or keyed by their values. Each is a PrimeIcons class name or a qualified icon reference. Icons inside this value are not tracked by the icon library diagnostics; use the empty state icon where a tracked icon is needed.' },\n { path: 'emptyIcon', label: 'Empty state icon', group: 'Appearance', valueType: PropertyValueType.Icon },\n { path: 'readOnly', label: 'Read only', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'disabled', label: 'Disabled', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n];\n"],"names":["key","name","componentRegistryKey","primeReactDescriptors","component","displayName","description","properties","path","label","group","valueType","PropertyValueType","Enum","default","ChartType","Bar","choices","chartTypeChoices","Json","String","Boolean","FileUploadMode","Advanced","legacyEnumerationChoices","Basic","Auto","Number","constraints","minimum","integer","TreeTableSelectionMode","None","Single","Multiple","Checkbox","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAUA,MAAMA,GAAAA,GAAM,CAACC,IAAAA,GAAiBC,gCAAAA,CAAqB,YAAA,EAAcD,IAAAA,CAAAA;AAEjE,yGACO,MAAME,qBAAAA,GAA+C;AACxD,IAAA;AACIC,QAAAA,SAAAA,EAAWJ,GAAAA,CAAI,OAAA,CAAA;QACfK,WAAAA,EAAa,OAAA;QACbC,WAAAA,EAAa,oKAAA;QACbC,UAAAA,EAAY;AACR,YAAA;gBACIC,IAAAA,EAAM,MAAA;gBAAQC,KAAAA,EAAO,MAAA;gBAAQC,KAAAA,EAAO,OAAA;AAASC,gBAAAA,SAAAA,EAAWC,8BAAkBC,IAAI;AAAEC,gBAAAA,OAAAA,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,OAAAA,EAAS;AAAM,aAAA;AAChH,YAAA;gBAAEN,IAAAA,EAAM,UAAA;gBAAYC,KAAAA,EAAO,UAAA;gBAAYC,KAAAA,EAAO,UAAA;AAAYC,gBAAAA,SAAAA,EAAWC,8BAAkBS,OAAO;gBAAEP,OAAAA,EAAS;AAAM,aAAA;AAC/G,YAAA;gBAAEN,IAAAA,EAAM,WAAA;gBAAaC,KAAAA,EAAO,iBAAA;gBAAmBC,KAAAA,EAAO,eAAA;AAAiBC,gBAAAA,SAAAA,EAAWC,8BAAkBQ;AAAO;AAC9G;AACL;;;"}
1
+ {"version":3,"file":"primeReactDescriptors.js","sources":["../../primeReactDescriptors.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 { ComponentDescriptor, PropertyValueType } from '@cratis/scene.model';\nimport { componentRegistryKey } from '@cratis/scene.react';\nimport { chartTypeChoices } from './chart/chartTypeChoices';\nimport { legacyEnumerationChoices } from './legacyEnumerationChoices';\nimport { ChartType } from './chart';\nimport { TreeTableSelectionMode } from './data';\nimport { FileUploadMode } from './file';\nimport { primeReactInputDescriptors } from './inputDescriptors';\n\nconst key = (name: string) => componentRegistryKey('PrimeReact', name);\n\n/** Design-time descriptors for PrimeReact controls whose authored data has structured configuration. */\nexport const primeReactDescriptors: ComponentDescriptor[] = [\n ...primeReactInputDescriptors,\n {\n component: key('chart'),\n displayName: 'Chart',\n description: 'A Chart.js chart. Legacy numeric types are rendered without changing stored data; new documents use stable type names. The host application must install chart.js.',\n properties: [\n {\n path: 'type', label: 'Type', group: 'Chart', valueType: PropertyValueType.Enum, default: ChartType.Bar,\n choices: chartTypeChoices,\n },\n { path: 'data', label: 'Data', group: 'Data', valueType: PropertyValueType.Json, description: 'The Chart.js data object, including labels and datasets in their authored order.' },\n { path: 'options', label: 'Options', group: 'Chart', valueType: PropertyValueType.Json, description: 'The Chart.js options object.' },\n { path: 'emptyLabel', label: 'No data label', group: 'Accessibility', valueType: PropertyValueType.String, default: 'No chart data', description: 'Shown instead of the chart while it has no data points. Data is never invented.' },\n { path: 'responsive', label: 'Responsive', group: 'Layout', valueType: PropertyValueType.Boolean, default: true },\n { path: 'style', label: 'Style', group: 'Layout', valueType: PropertyValueType.Json, description: 'The CSS style object applied to the chart surface.' },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('fileUpload'),\n displayName: 'File upload',\n description: 'An accessible file picker and drop zone. A host provides its upload effect, or the files are posted to the authored server URL. The URL must be on the page\\'s own origin unless the host allows another one.',\n properties: [\n {\n path: 'mode', label: 'Mode', group: 'Behavior', valueType: PropertyValueType.Enum, default: FileUploadMode.Advanced,\n choices: legacyEnumerationChoices(FileUploadMode, { [FileUploadMode.Advanced]: 'Advanced', [FileUploadMode.Basic]: 'Basic', [FileUploadMode.Auto]: 'Automatic' }),\n },\n { path: 'url', label: 'Server URL', group: 'Upload', valueType: PropertyValueType.String, description: 'Where the files are posted. Only the origin of the page, or an origin the host allows, is accepted; anything else is refused and nothing is sent.' },\n { path: 'name', label: 'Request field name', group: 'Upload', valueType: PropertyValueType.String, default: 'files' },\n { path: 'accept', label: 'Accepted MIME types', group: 'Upload', valueType: PropertyValueType.String },\n { path: 'multiple', label: 'Allow multiple files', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'maxFileSize', label: 'Maximum file size', group: 'Upload', valueType: PropertyValueType.Number, constraints: { minimum: 0, integer: true } },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('dataScroller'),\n displayName: 'Data scroller',\n description: 'A list that loads a chunk at a time as its end is reached. Items are strings, numbers or records, plus any child elements in the items slot; serialized legacy UI elements are refused.',\n properties: [\n { path: 'items', label: 'Items', group: 'Data', valueType: PropertyValueType.Json, description: 'Strings, numbers or records. A record is titled by its label, title, name, text or header field.' },\n { path: 'rows', label: 'Rows per load', group: 'Behavior', valueType: PropertyValueType.Number, default: 10, constraints: { minimum: 1, integer: true } },\n { path: 'inline', label: 'Scroll inline', group: 'Layout', valueType: PropertyValueType.Boolean, default: false, description: 'Scroll inside the control (true) or load as the page scrolls the end of the list into view (false).' },\n { path: 'scrollHeight', label: 'Inline scroll height', group: 'Layout', valueType: PropertyValueType.Number, constraints: { minimum: 1 }, description: 'The height in pixels of an inline scroller. 320 when omitted.' },\n { path: 'emptyLabel', label: 'No items label', group: 'Accessibility', valueType: PropertyValueType.String, default: 'No items to show' },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('treeTable'),\n displayName: 'Tree table',\n description: 'A hierarchical table with authored columns, selection, and optional pagination. Items are nodes (strings, numbers or records with key, label, data, children); serialized legacy UI elements are refused.',\n properties: [\n { path: 'columns', label: 'Columns', group: 'Data', valueType: PropertyValueType.Json, description: 'Column definitions with field and header, or nested column elements. Inferred from the first row when absent.' },\n { path: 'items', label: 'Items', group: 'Data', valueType: PropertyValueType.Json, description: 'The nodes: strings, numbers, or records with key, label, data, children, expanded and selectable.' },\n {\n path: 'selectionMode', label: 'Selection mode', group: 'Behavior', valueType: PropertyValueType.Enum, default: TreeTableSelectionMode.None,\n choices: legacyEnumerationChoices(TreeTableSelectionMode, { [TreeTableSelectionMode.None]: 'None', [TreeTableSelectionMode.Single]: 'Single', [TreeTableSelectionMode.Multiple]: 'Multiple', [TreeTableSelectionMode.Checkbox]: 'Checkbox' }),\n },\n { path: 'selection', label: 'Selection', group: 'Behavior', valueType: PropertyValueType.Json, description: 'The selected node keys: a key, an array of keys or { key } objects, or PrimeReact\\'s key map.' },\n { path: 'paginator', label: 'Show pagination', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'rows', label: 'Rows per page', group: 'Behavior', valueType: PropertyValueType.Number, default: 10, constraints: { minimum: 1, integer: true } },\n { path: 'emptyLabel', label: 'No records label', group: 'Accessibility', valueType: PropertyValueType.String, default: 'No records found' },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('editor'),\n displayName: 'Rich text editor',\n description: 'A rich-text HTML editor. Editing needs the host to provide Quill (QuillLoaderProvider); without it the content is shown read-only. The HTML is sanitized before it is shown.',\n properties: [\n { path: 'value', label: 'HTML value', group: 'Content', valueType: PropertyValueType.String },\n { path: 'placeholder', label: 'Placeholder', group: 'Content', valueType: PropertyValueType.String },\n { path: 'showHeader', label: 'Show toolbar', group: 'Behavior', valueType: PropertyValueType.Boolean, default: true },\n { path: 'readOnly', label: 'Read only', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('multiStateCheckbox'),\n displayName: 'Multi-state checkbox',\n description: 'An accessible button that cycles through its authored states in order, showing the current state as a checkbox-style glyph.',\n properties: [\n { path: 'value', label: 'Value', group: 'State', valueType: PropertyValueType.Json, description: 'The selected value. It may be null when the empty state is enabled.' },\n { path: 'options', label: 'Options', group: 'State', valueType: PropertyValueType.Json, description: 'The ordered state options. Each may provide label, value, and icon fields.' },\n { path: 'optionLabel', label: 'Option label field', group: 'State', valueType: PropertyValueType.String, default: 'label' },\n { path: 'optionValue', label: 'Option value field', group: 'State', valueType: PropertyValueType.String, default: 'value' },\n { path: 'empty', label: 'Allow empty state', group: 'State', valueType: PropertyValueType.Boolean, default: true },\n { path: 'emptyLabel', label: 'Empty state label', group: 'Accessibility', valueType: PropertyValueType.String, default: 'No selection' },\n { path: 'icons', label: 'Icons', group: 'Appearance', valueType: PropertyValueType.Json, description: 'Icons aligned with the options, or keyed by their values. Each is a PrimeIcons class name or a qualified icon reference. Icons inside this value are not tracked by the icon library diagnostics; use the empty state icon where a tracked icon is needed.' },\n { path: 'emptyIcon', label: 'Empty state icon', group: 'Appearance', valueType: PropertyValueType.Icon },\n { path: 'readOnly', label: 'Read only', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'disabled', label: 'Disabled', group: 'Behavior', valueType: PropertyValueType.Boolean, default: false },\n { path: 'ariaLabel', label: 'Accessible name', group: 'Accessibility', valueType: PropertyValueType.String },\n ],\n },\n];\n"],"names":["key","name","componentRegistryKey","primeReactDescriptors","primeReactInputDescriptors","component","displayName","description","properties","path","label","group","valueType","PropertyValueType","Enum","default","ChartType","Bar","choices","chartTypeChoices","Json","String","Boolean","FileUploadMode","Advanced","legacyEnumerationChoices","Basic","Auto","Number","constraints","minimum","integer","TreeTableSelectionMode","None","Single","Multiple","Checkbox","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAWA,MAAMA,GAAAA,GAAM,CAACC,IAAAA,GAAiBC,gCAAAA,CAAqB,YAAA,EAAcD,IAAAA,CAAAA;AAEjE,yGACO,MAAME,qBAAAA,GAA+C;AACrDC,IAAAA,GAAAA,2CAAAA;AACH,IAAA;AACIC,QAAAA,SAAAA,EAAWL,GAAAA,CAAI,OAAA,CAAA;QACfM,WAAAA,EAAa,OAAA;QACbC,WAAAA,EAAa,oKAAA;QACbC,UAAAA,EAAY;AACR,YAAA;gBACIC,IAAAA,EAAM,MAAA;gBAAQC,KAAAA,EAAO,MAAA;gBAAQC,KAAAA,EAAO,OAAA;AAASC,gBAAAA,SAAAA,EAAWC,8BAAkBC,IAAI;AAAEC,gBAAAA,OAAAA,EAASC,oBAAUC,GAAG;gBACtGC,OAAAA,EAASC;AACb,aAAA;AACA,YAAA;gBAAEV,IAAAA,EAAM,MAAA;gBAAQC,KAAAA,EAAO,MAAA;gBAAQC,KAAAA,EAAO,MAAA;AAAQC,gBAAAA,SAAAA,EAAWC,8BAAkBO,IAAI;gBAAEb,WAAAA,EAAa;AAAmF,aAAA;AACjL,YAAA;gBAAEE,IAAAA,EAAM,SAAA;gBAAWC,KAAAA,EAAO,SAAA;gBAAWC,KAAAA,EAAO,OAAA;AAASC,gB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BQ;AAAO;AAC9G;AACL;;;"}
@@ -1,3 +1,3 @@
1
1
  import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimeCalendar({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimeCalendar({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimeCalendar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeCalendar.d.ts","sourceRoot":"","sources":["../../../form/PrimeCalendar.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAiB/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAgElE"}
1
+ {"version":3,"file":"PrimeCalendar.d.ts","sourceRoot":"","sources":["../../../form/PrimeCalendar.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAiB/E,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BAiElF"}
@@ -2,6 +2,7 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { DatePicker } from 'primereact/datepicker';
4
4
  import { InputText } from 'primereact/inputtext';
5
+ import { useValueOutput } from '@cratis/scene.react';
5
6
  import { stringProperty, booleanProperty } from '../properties.js';
6
7
 
7
8
  /**
@@ -17,13 +18,14 @@ import { stringProperty, booleanProperty } from '../properties.js';
17
18
  * here and then placed one of two ways, which is how `inline` survives a version that has no `inline`
18
19
  * prop: either inside a `Panel`, which simply renders where it stands, or behind a `Portal` and a
19
20
  * `Positioner`, which anchors it to the field and escapes any clipping ancestor.
20
- */ function PrimeCalendar({ element }) {
21
+ */ function PrimeCalendar({ element, bindingOutputs }) {
21
22
  const [value, setValue] = useState(()=>{
22
23
  const seed = stringProperty(element, 'value');
23
24
  if (seed === undefined) return undefined;
24
25
  const parsed = new Date(seed);
25
26
  return Number.isNaN(parsed.getTime()) ? undefined : parsed;
26
27
  });
28
+ useValueOutput(bindingOutputs, value);
27
29
  const inline = booleanProperty(element, 'inline', false);
28
30
  const showTime = booleanProperty(element, 'showTime', false);
29
31
  const calendar = /*#__PURE__*/ jsxs(Fragment, {
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeCalendar.js","sources":["../../../form/PrimeCalendar.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 { useState } from 'react';\nimport { DatePicker } from 'primereact/datepicker';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:calendar` component - a date picker, named `DatePicker` by PrimeReact 11.\n *\n * The seed value is parsed from an ISO date string because that is what survives a round trip through a\n * Scene model's JSON properties; an unparseable one leaves the field empty rather than showing\n * \"Invalid Date\".\n *\n * v11's `DatePicker` is a composition, and the grid is the bulk of it: `Calendar` holds a `Header` (the\n * month/year title flanked by the two navigation buttons) and a `Table` whose three `TableBody` views are\n * what makes clicking the title drill from days to months to years. That whole calendar is built once\n * here and then placed one of two ways, which is how `inline` survives a version that has no `inline`\n * prop: either inside a `Panel`, which simply renders where it stands, or behind a `Portal` and a\n * `Positioner`, which anchors it to the field and escapes any clipping ancestor.\n */\nexport function PrimeCalendar({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<Date | undefined>(() => {\n const seed = stringProperty(element, 'value');\n if (seed === undefined) return undefined;\n const parsed = new Date(seed);\n return Number.isNaN(parsed.getTime()) ? undefined : parsed;\n });\n\n const inline = booleanProperty(element, 'inline', false);\n const showTime = booleanProperty(element, 'showTime', false);\n const calendar = (\n <>\n <DatePicker.Calendar>\n <DatePicker.Header>\n <DatePicker.Prev>\n <i className='pi pi-chevron-left' />\n </DatePicker.Prev>\n <DatePicker.Title>\n <DatePicker.SelectMonth />\n <DatePicker.SelectYear />\n <DatePicker.Decade />\n </DatePicker.Title>\n <DatePicker.Next>\n <i className='pi pi-chevron-right' />\n </DatePicker.Next>\n </DatePicker.Header>\n <DatePicker.Table>\n <DatePicker.TableHead />\n <DatePicker.TableBody />\n <DatePicker.TableBody view='month' />\n <DatePicker.TableBody view='year' />\n </DatePicker.Table>\n </DatePicker.Calendar>\n {showTime && <DatePicker.Time />}\n </>\n );\n\n return (\n <DatePicker.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value instanceof Date ? event.value : undefined)}\n dateFormat={stringProperty(element, 'dateFormat')}\n showTime={showTime}\n disabled={booleanProperty(element, 'disabled', false)}>\n {inline ? (\n <DatePicker.Panel>{calendar}</DatePicker.Panel>\n ) : (\n <>\n <DatePicker.Input as={InputText} placeholder={stringProperty(element, 'placeholder')} aria-label={stringProperty(element, 'ariaLabel')} />\n {booleanProperty(element, 'showIcon', true) && (\n <DatePicker.Trigger>\n <i className='pi pi-calendar' />\n </DatePicker.Trigger>\n )}\n <DatePicker.Portal>\n <DatePicker.Positioner align='start'>\n <DatePicker.Popup>{calendar}</DatePicker.Popup>\n </DatePicker.Positioner>\n </DatePicker.Portal>\n </>\n )}\n </DatePicker.Root>\n );\n}\n"],"names":["PrimeCalendar","element","value","setValue","useState","seed","stringProperty","undefined","parsed","Date","Number","isNaN","getTime","inline","booleanProperty","showTime","calendar","_jsxs","_Fragment","DatePicker","Calendar","Header","_jsx","Prev","i","className","Title","SelectMonth","SelectYear","Decade","Next","Table","TableHead","TableBody","view","Time","Root","data-scene-id","id","onValueChange","event","dateFormat","disabled","Panel","Input","as","InputText","placeholder","aria-label","Trigger","Portal","Positioner","align","Popup"],"mappings":";;;;;;AASA;;;;;;;;;;;;;AAaC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAA2B,IAAA;QAC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AAA;wBAACC,KAAAA,EAAM,OAAA;gDACzB9B,GAAA,CAACH,WAAWkC,KAAK,EAAA;AAAErC,4BAAAA,QAAAA,EAAAA;;;;;;;AAO/C;;"}
1
+ {"version":3,"file":"PrimeCalendar.js","sources":["../../../form/PrimeCalendar.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 { useState } from 'react';\nimport { DatePicker } from 'primereact/datepicker';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:calendar` component - a date picker, named `DatePicker` by PrimeReact 11.\n *\n * The seed value is parsed from an ISO date string because that is what survives a round trip through a\n * Scene model's JSON properties; an unparseable one leaves the field empty rather than showing\n * \"Invalid Date\".\n *\n * v11's `DatePicker` is a composition, and the grid is the bulk of it: `Calendar` holds a `Header` (the\n * month/year title flanked by the two navigation buttons) and a `Table` whose three `TableBody` views are\n * what makes clicking the title drill from days to months to years. That whole calendar is built once\n * here and then placed one of two ways, which is how `inline` survives a version that has no `inline`\n * prop: either inside a `Panel`, which simply renders where it stands, or behind a `Portal` and a\n * `Positioner`, which anchors it to the field and escapes any clipping ancestor.\n */\nexport function PrimeCalendar({ element, bindingOutputs }: RegisteredComponentProps) {\n const [value, setValue] = useState<Date | undefined>(() => {\n const seed = stringProperty(element, 'value');\n if (seed === undefined) return undefined;\n const parsed = new Date(seed);\n return Number.isNaN(parsed.getTime()) ? undefined : parsed;\n });\n useValueOutput(bindingOutputs, value);\n\n const inline = booleanProperty(element, 'inline', false);\n const showTime = booleanProperty(element, 'showTime', false);\n const calendar = (\n <>\n <DatePicker.Calendar>\n <DatePicker.Header>\n <DatePicker.Prev>\n <i className='pi pi-chevron-left' />\n </DatePicker.Prev>\n <DatePicker.Title>\n <DatePicker.SelectMonth />\n <DatePicker.SelectYear />\n <DatePicker.Decade />\n </DatePicker.Title>\n <DatePicker.Next>\n <i className='pi pi-chevron-right' />\n </DatePicker.Next>\n </DatePicker.Header>\n <DatePicker.Table>\n <DatePicker.TableHead />\n <DatePicker.TableBody />\n <DatePicker.TableBody view='month' />\n <DatePicker.TableBody view='year' />\n </DatePicker.Table>\n </DatePicker.Calendar>\n {showTime && <DatePicker.Time />}\n </>\n );\n\n return (\n <DatePicker.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value instanceof Date ? event.value : undefined)}\n dateFormat={stringProperty(element, 'dateFormat')}\n showTime={showTime}\n disabled={booleanProperty(element, 'disabled', false)}>\n {inline ? (\n <DatePicker.Panel>{calendar}</DatePicker.Panel>\n ) : (\n <>\n <DatePicker.Input as={InputText} placeholder={stringProperty(element, 'placeholder')} aria-label={stringProperty(element, 'ariaLabel')} />\n {booleanProperty(element, 'showIcon', true) && (\n <DatePicker.Trigger>\n <i className='pi pi-calendar' />\n </DatePicker.Trigger>\n )}\n <DatePicker.Portal>\n <DatePicker.Positioner align='start'>\n <DatePicker.Popup>{calendar}</DatePicker.Popup>\n </DatePicker.Positioner>\n </DatePicker.Portal>\n </>\n )}\n </DatePicker.Root>\n );\n}\n"],"names":["PrimeCalendar","element","bindingOutputs","value","setValue","useState","seed","stringProperty","undefined","parsed","Date","Number","isNaN","getTime","useValueOutput","inline","booleanProperty","showTime","calendar","_jsxs","_Fragment","DatePicker","Calendar","Header","_jsx","Prev","i","className","Title","SelectMonth","SelectYear","Decade","Next","Table","TableHead","TableBody","view","Time","Root","data-scene-id","id","onValueChange","event","dateFormat","disabled","Panel","Input","as","InputText","placeholder","aria-label","Trigger","Portal","Positioner","align","Popup"],"mappings":";;;;;;;AASA;;;;;;;;;;;;;AAaC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAAEC,cAAc,EAA4B,EAAA;AAC/E,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAA2B,IAAA;QACjD,MAAMC,I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AAW+B,MAAM,EAAA;4CACd5B,GAAA,CAACH,WAAWgC,UAAU,EAAA;wBAACC,KAAAA,EAAM,OAAA;gDACzB9B,GAAA,CAACH,WAAWkC,KAAK,EAAA;AAAErC,4BAAAA,QAAAA,EAAAA;;;;;;;AAO/C;;"}
@@ -1,3 +1,3 @@
1
1
  import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimeCheckbox({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimeCheckbox({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimeCheckbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeCheckbox.d.ts","sourceRoot":"","sources":["../../../form/PrimeCheckbox.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAc/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAkBlE"}
1
+ {"version":3,"file":"PrimeCheckbox.d.ts","sourceRoot":"","sources":["../../../form/PrimeCheckbox.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAc/E,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BAmBlF"}
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { Checkbox } from 'primereact/checkbox';
4
+ import { useValueOutput } from '@cratis/scene.react';
4
5
  import { booleanProperty, stringProperty } from '../properties.js';
5
6
 
6
7
  /**
@@ -13,8 +14,9 @@ import { booleanProperty, stringProperty } from '../properties.js';
13
14
  * state, `Box` is the square, and `Indicator` is what appears inside it when checked. The `checked` state
14
15
  * now arrives as `onCheckedChange` with a boolean rather than a change event whose `checked` might be
15
16
  * `undefined`, so the defensive `=== true` the v10 adapter needed is gone.
16
- */ function PrimeCheckbox({ element }) {
17
+ */ function PrimeCheckbox({ element, bindingOutputs }) {
17
18
  const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));
19
+ useValueOutput(bindingOutputs, checked);
18
20
  const label = stringProperty(element, 'label');
19
21
  return /*#__PURE__*/ jsxs("div", {
20
22
  "data-scene-id": element.id,
@@ -22,7 +24,7 @@ import { booleanProperty, stringProperty } from '../properties.js';
22
24
  children: [
23
25
  /*#__PURE__*/ jsx(Checkbox.Root, {
24
26
  inputId: element.id,
25
- "aria-label": label === undefined ? stringProperty(element, 'ariaLabel') : undefined,
27
+ ariaLabel: label === undefined ? stringProperty(element, 'ariaLabel') : undefined,
26
28
  checked: checked,
27
29
  onCheckedChange: (event)=>setChecked(event.checked),
28
30
  disabled: booleanProperty(element, 'disabled', false),
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeCheckbox.js","sources":["../../../form/PrimeCheckbox.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 { useState } from 'react';\nimport { Checkbox } from 'primereact/checkbox';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:checkbox` component.\n *\n * Rendered with its label rather than bare: an unlabeled checkbox has no accessible name and nothing to\n * click but a 20-pixel box, which is a defect in every screen that would ever use one.\n *\n * PrimeReact 11 makes the tick its own part: `Root` renders the real (visually hidden) input and owns the\n * state, `Box` is the square, and `Indicator` is what appears inside it when checked. The `checked` state\n * now arrives as `onCheckedChange` with a boolean rather than a change event whose `checked` might be\n * `undefined`, so the defensive `=== true` the v10 adapter needed is gone.\n */\nexport function PrimeCheckbox({ element }: RegisteredComponentProps) {\n const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));\n const label = stringProperty(element, 'label');\n return (\n <div data-scene-id={element.id} className='flex items-center gap-2'>\n <Checkbox.Root\n inputId={element.id}\n aria-label={label === undefined ? stringProperty(element, 'ariaLabel') : undefined}\n checked={checked}\n onCheckedChange={(event) => setChecked(event.checked)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Checkbox.Box>\n <Checkbox.Indicator />\n </Checkbox.Box>\n </Checkbox.Root>\n {label !== undefined && <label htmlFor={element.id}>{label}</label>}\n </div>\n );\n}\n"],"names":["PrimeCheckbox","element","checked","setChecked","useState","booleanProperty","label","stringProperty","_jsxs","div","data-scene-id","id","className","_jsx","Checkbox","Root","inputId","aria-label","undefined","onCheckedChange","event","disabled","Box","Indicator","htmlFor"],"mappings":";;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,OAAAA,EAASC,UAAAA,CAAW,GAAGC,QAAAA,CAASC,eAAAA,CAAgBJ,SAAS,SAAA,EAAW,KAAA,CAAA,CAAA;IAC3E,MAAMK,KAAAA,GAAQC,eAAeN,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACIO,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QAAEC,SAAAA,EAAU,yBAAA;;AACtC,0BAAAC,GAAA,CAACC,SAASC,IAAI,EAAA;AACVC,gBAAAA,OAAAA,EAASf,QAAQU,EAAE;AACnBM,gBAAAA,YAAAA,EAAYX,KAAAA,KAAUY,SAAAA,GAAYX,cAAAA,CAAeN,OAAAA,EAAS,WAAA,CAAA,GAAeiB,SAAAA;gBACzEhB,OAAAA,EAASA,OAAAA;AACTiB,gBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAUjB,UAAAA,CAAWiB,KAAAA,CAAMlB,OAAO,CAAA;gBACpDmB,QAAAA,EAAUhB,eAAAA,CAAgBJ,SAAS,UAAA,EAAY,KAAA,CAAA;wCAC/CY,GAAA,CAACC,SAASQ,GAAG,EAAA;4CACTT,GAAA,CAACC,SAASS,SAAS,EAAA,EAAA;;;AAG1BjB,YAAAA,KAAAA,KAAUY,2BAAaL,GAAA,CAACP,OAAAA,EAAAA;AAAMkB,gBAAAA,OAAAA,EAASvB,QAAQU,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGjE;;"}
1
+ {"version":3,"file":"PrimeCheckbox.js","sources":["../../../form/PrimeCheckbox.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 { useState } from 'react';\nimport { Checkbox } from 'primereact/checkbox';\nimport { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:checkbox` component.\n *\n * Rendered with its label rather than bare: an unlabeled checkbox has no accessible name and nothing to\n * click but a 20-pixel box, which is a defect in every screen that would ever use one.\n *\n * PrimeReact 11 makes the tick its own part: `Root` renders the real (visually hidden) input and owns the\n * state, `Box` is the square, and `Indicator` is what appears inside it when checked. The `checked` state\n * now arrives as `onCheckedChange` with a boolean rather than a change event whose `checked` might be\n * `undefined`, so the defensive `=== true` the v10 adapter needed is gone.\n */\nexport function PrimeCheckbox({ element, bindingOutputs }: RegisteredComponentProps) {\n const [checked, setChecked] = useState(booleanProperty(element, 'checked', false));\n useValueOutput(bindingOutputs, checked);\n const label = stringProperty(element, 'label');\n return (\n <div data-scene-id={element.id} className='flex items-center gap-2'>\n <Checkbox.Root\n inputId={element.id}\n ariaLabel={label === undefined ? stringProperty(element, 'ariaLabel') : undefined}\n checked={checked}\n onCheckedChange={(event) => setChecked(event.checked)}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Checkbox.Box>\n <Checkbox.Indicator />\n </Checkbox.Box>\n </Checkbox.Root>\n {label !== undefined && <label htmlFor={element.id}>{label}</label>}\n </div>\n );\n}\n"],"names":["PrimeCheckbox","element","bindingOutputs","checked","setChecked","useState","booleanProperty","useValueOutput","label","stringProperty","_jsxs","div","data-scene-id","id","className","_jsx","Checkbox","Root","inputId","ariaLabel","undefined","onCheckedChange","event","disabled","Box","Indicator","htmlFor"],"mappings":";;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAAEC,cAAc,EAA4B,EAAA;AAC/E,IAAA,MAAM,CAACC,OAAAA,EAASC,UAAAA,CAAW,GAAGC,QAAAA,CAASC,eAAAA,CAAgBL,SAAS,SAAA,EAAW,KAAA,CAAA,CAAA;AAC3EM,IAAAA,cAAAA,CAAeL,cAAAA,EAAgBC,OAAAA,CAAAA;IAC/B,MAAMK,KAAAA,GAAQC,eAAeR,OAAAA,EAAS,OAAA,CAAA;AACtC,IAAA,qBACIS,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeX,QAAQY,EAAE;QAAEC,SAAAA,EAAU,yBAAA;;AACtC,0BAAAC,GAAA,CAACC,SAASC,IAAI,EAAA;AACVC,gBAAAA,OAAAA,EAASjB,QAAQY,EAAE;AACnBM,gBAAAA,SAAAA,EAAWX,KAAAA,KAAUY,SAAAA,GAAYX,cAAAA,CAAeR,OAAAA,EAAS,WAAA,CAAA,GAAemB,SAAAA;gBACxEjB,OAAAA,EAASA,OAAAA;AACTkB,gBAAAA,eAAAA,EAAiB,CAACC,KAAAA,GAAUlB,UAAAA,CAAWkB,KAAAA,CAAMnB,OAAO,CAAA;gBACpDoB,QAAAA,EAAUjB,eAAAA,CAAgBL,SAAS,UAAA,EAAY,KAAA,CAAA;wCAC/Cc,GAAA,CAACC,SAASQ,GAAG,EAAA;4CACTT,GAAA,CAACC,SAASS,SAAS,EAAA,EAAA;;;AAG1BjB,YAAAA,KAAAA,KAAUY,2BAAaL,GAAA,CAACP,OAAAA,EAAAA;AAAMkB,gBAAAA,OAAAA,EAASzB,QAAQY,EAAE;AAAGL,gBAAAA,QAAAA,EAAAA;;;;AAGjE;;"}
@@ -1,3 +1,3 @@
1
1
  import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimeDropdown({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimeDropdown({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimeDropdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeDropdown.d.ts","sourceRoot":"","sources":["../../../form/PrimeDropdown.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAgB/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BA8BlE"}
1
+ {"version":3,"file":"PrimeDropdown.d.ts","sourceRoot":"","sources":["../../../form/PrimeDropdown.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAgB/E,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BA+BlF"}
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { Select } from 'primereact/select';
4
+ import { useValueOutput } from '@cratis/scene.react';
4
5
  import { stringProperty, booleanProperty, optionsProperty } from '../properties.js';
5
6
 
6
7
  /**
@@ -15,8 +16,9 @@ import { stringProperty, booleanProperty, optionsProperty } from '../properties.
15
16
  * here, and adding one would only duplicate what `optionLabel` / `optionValue` already say. The `appendTo`
16
17
  * and z-index juggling a dropdown inside a dialog used to need is gone with it: the portal stacks
17
18
  * correctly on its own.
18
- */ function PrimeDropdown({ element }) {
19
+ */ function PrimeDropdown({ element, bindingOutputs }) {
19
20
  const [value, setValue] = useState(stringProperty(element, 'value'));
21
+ useValueOutput(bindingOutputs, value);
20
22
  const placeholder = stringProperty(element, 'placeholder', 'Select');
21
23
  const filter = booleanProperty(element, 'filter', false);
22
24
  const showClear = booleanProperty(element, 'showClear', false);
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeDropdown.js","sources":["../../../form/PrimeDropdown.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 { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:dropdown` component - a single-choice select.\n *\n * Options are normalized by `optionsProperty`, so a screen may write either bare strings or\n * `{ label, value }` records and get the same result.\n *\n * PrimeReact calls this `Select`, and it is a composition rather than one component: `Root` owns the\n * value and the option model, `Trigger` is what the user clicks, and the list lives behind a `Portal` so\n * it escapes any clipping ancestor. `Select.List` renders `options` itself - there is no option mapping\n * here, and adding one would only duplicate what `optionLabel` / `optionValue` already say. The `appendTo`\n * and z-index juggling a dropdown inside a dialog used to need is gone with it: the portal stacks\n * correctly on its own.\n */\nexport function PrimeDropdown({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n const showClear = booleanProperty(element, 'showClear', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger aria-label={stringProperty(element, 'ariaLabel')}>\n <Select.Value placeholder={placeholder} />\n {showClear && <Select.Clear />}\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeDropdown","element","value","setValue","useState","stringProperty","placeholder","filter","booleanProperty","showClear","_jsxs","Select","Root","data-scene-id","id","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","aria-label","_jsx","Value","Clear","Arrow","Port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M,EAAA;wCACVJ,GAAA,CAACb,OAAOkB,UAAU,EAAA;4CACdnB,IAAA,CAACC,OAAOmB,KAAK,EAAA;;4BACRvB,MAAAA,kBAAUiB,GAAA,CAACb,OAAOoB,MAAM,EAAA;gCAACzB,WAAAA,EAAaA;;AACvC,0CAAAkB,GAAA,CAACb,OAAOqB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;"}
1
+ {"version":3,"file":"PrimeDropdown.js","sources":["../../../form/PrimeDropdown.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 { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:dropdown` component - a single-choice select.\n *\n * Options are normalized by `optionsProperty`, so a screen may write either bare strings or\n * `{ label, value }` records and get the same result.\n *\n * PrimeReact calls this `Select`, and it is a composition rather than one component: `Root` owns the\n * value and the option model, `Trigger` is what the user clicks, and the list lives behind a `Portal` so\n * it escapes any clipping ancestor. `Select.List` renders `options` itself - there is no option mapping\n * here, and adding one would only duplicate what `optionLabel` / `optionValue` already say. The `appendTo`\n * and z-index juggling a dropdown inside a dialog used to need is gone with it: the portal stacks\n * correctly on its own.\n */\nexport function PrimeDropdown({ element, bindingOutputs }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringProperty(element, 'value'));\n useValueOutput(bindingOutputs, value);\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n const showClear = booleanProperty(element, 'showClear', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger aria-label={stringProperty(element, 'ariaLabel')}>\n <Select.Value placeholder={placeholder} />\n {showClear && <Select.Clear />}\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeDropdown","element","bindingOutputs","value","setValue","useState","stringProperty","useValueOutput","placeholder","filter","booleanProperty","showClear","_jsxs","Select","Root","data-scene-id","id","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","aria-label","_jsx","Value","Clear","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;;AAQA;;;;;;;;;;;;AAYC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAAEC,cAAc,EAA4B,EAAA;AAC/E,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAAkBC,eAAeL,OAAAA,EAAS,OAAA,CAAA,CAAA;AACpEM,IAAAA,cAAAA,CAAeL,cAAAA,EAAgBC,KAAAA,CAAAA;IAC/B,MAAMK,WAAAA,GAAcF,cAAAA,CAAeL,OAAAA,EAAS,aAAA,EAAe,QAAA,CAAA;IAC3D,MAAMQ,MAAAA,GAASC,eAAAA,CAAgBT,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;IAClD,MAAMU,SAAAA,GAAYD,eAAAA,CAAgBT,OAAAA,EAAS,WAAA,EAAa,KAAA,CAAA;IACxD,qBACIW,IAAA,CAACC,OAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAed,QAAQe,EAAE;QACzBb,KAAAA,EAAOA,KAAAA;AACPc,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUd,QAAAA,CAASc,KAAAA,CAAMf,KAAK,CAAA;AAC9CgB,QAAAA,OAAAA,EAASC,gBAAgBnB,OAAAA,EAAS,SAAA,CAAA;QAClCoB,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZb,MAAAA,EAAQA,MAAAA;QACRc,QAAAA,EAAUb,eAAAA,CAAgBT,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAW,IAAA,CAACC,OAAOW,OAAO,EAAA;AAACC,gBAAAA,YAAAA,EAAYnB,eAAeL,OAAAA,EAAS,WAAA,CAAA;;AAChD,kCAAAyB,GAAA,CAACb,OAAOc,KAAK,EAAA;wBAACnB,WAAAA,EAAaA;;oBAC1BG,SAAAA,kBAAae,GAAA,CAACb,OAAOe,KAAK,EAAA,EAAA,CAAA;AAC3B,kCAAAF,GAAA,CAACb,OAAOgB,KAAK,EAAA,EAAA;;;AAEjB,0BAAAH,GAAA,CAACb,OAAOiB,MAAM,EAAA;wCACVJ,GAAA,CAACb,OAAOkB,UAAU,EAAA;4CACdnB,IAAA,CAACC,OAAOmB,KAAK,EAAA;;4BACRvB,MAAAA,kBAAUiB,GAAA,CAACb,OAAOoB,MAAM,EAAA;gCAACzB,WAAAA,EAAaA;;AACvC,0CAAAkB,GAAA,CAACb,OAAOqB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;"}
@@ -1,3 +1,3 @@
1
1
  import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimeInputNumber({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimeInputNumber({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimeInputNumber.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputNumber.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputNumber.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAc/D,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BA0BrE"}
1
+ {"version":3,"file":"PrimeInputNumber.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputNumber.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAc/E,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BA2BrF"}
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { InputNumber } from 'primereact/inputnumber';
4
+ import { useValueOutput } from '@cratis/scene.react';
4
5
  import { numberProperty, stringProperty, booleanProperty } from '../properties.js';
5
6
 
6
7
  /**
@@ -13,8 +14,9 @@ import { numberProperty, stringProperty, booleanProperty } from '../properties.j
13
14
  * formats into, which is also why `placeholder` moved onto the input rather than the root. `showButtons`
14
15
  * is no longer a flag the component interprets - the spinner is a `Group` of `Increment` and `Decrement`
15
16
  * you either render or do not - so the property now decides whether that group exists at all.
16
- */ function PrimeInputNumber({ element }) {
17
+ */ function PrimeInputNumber({ element, bindingOutputs }) {
17
18
  const [value, setValue] = useState(numberProperty(element, 'value'));
19
+ useValueOutput(bindingOutputs, value);
18
20
  const currency = stringProperty(element, 'currency');
19
21
  return /*#__PURE__*/ jsxs(InputNumber.Root, {
20
22
  "data-scene-id": element.id,
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputNumber.js","sources":["../../../form/PrimeInputNumber.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 { useState } from 'react';\nimport { InputNumber } from 'primereact/inputnumber';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputNumber` component - a numeric field with locale-aware formatting.\n *\n * `mode` and `currency` are passed straight through because that is where InputNumber earns its keep\n * over a plain text field: it formats and parses in the user's locale rather than making a screen do it.\n *\n * PrimeReact 11 splits the component in two: `Root` holds the number model and `Input` is the field it\n * formats into, which is also why `placeholder` moved onto the input rather than the root. `showButtons`\n * is no longer a flag the component interprets - the spinner is a `Group` of `Increment` and `Decrement`\n * you either render or do not - so the property now decides whether that group exists at all.\n */\nexport function PrimeInputNumber({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));\n const currency = stringProperty(element, 'currency');\n return (\n <InputNumber.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(typeof event.value === 'number' ? event.value : undefined)}\n mode={currency === undefined ? 'decimal' : 'currency'}\n currency={currency}\n min={numberProperty(element, 'min')}\n max={numberProperty(element, 'max')}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputNumber.Input placeholder={stringProperty(element, 'placeholder')} aria-label={stringProperty(element, 'ariaLabel')} />\n {booleanProperty(element, 'showButtons', false) && (\n <InputNumber.Group>\n <InputNumber.Increment>\n <i className='pi pi-chevron-up' />\n </InputNumber.Increment>\n <InputNumber.Decrement>\n <i className='pi pi-chevron-down' />\n </InputNumber.Decrement>\n </InputNumber.Group>\n )}\n </InputNumber.Root>\n );\n}\n"],"names":["PrimeInputNumber","element","value","setValue","useState","numberProperty","currency","stringProperty","_jsxs","InputNumber","Root","data-scene-id","id","onValueChange","event","undefined","mode","min","max","disabled","booleanProperty","_jsx","Input","placeholder","aria-label","Group","Increment","i","className","Decrement"],"mappings":";;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAA6BC,eAAeJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IAC/E,MAAMK,QAAAA,GAAWC,eAAeN,OAAAA,EAAS,UAAA,CAAA;IACzC,qBACIO,IAAA,CAACC,YAAYC,IAAI,EAAA;AACbC,QAAAA,eAAAA,EAAeV,QAAQW,EAAE;QACzBV,KAAAA,EAAOA,KAAAA;QACPW,aAAAA,EAAe,CAACC,KAAAA,GAAUX,QAAAA,CAAS,OAAOW,KAAAA,CAAMZ,KAAK,KAAK,QAAA,GAAWY,KAAAA,CAAMZ,KAAK,GAAGa,SAAAA,CAAAA;QACnFC,IAAAA,EAAMV,QAAAA,KAAaS,YAAY,SAAA,GAAY,UAAA;QAC3CT,QAAAA,EAAUA,QAAAA;AACVW,QAAAA,GAAAA,EAAKZ,eAAeJ,OAAAA,EAAS,KAAA,CAAA;AAC7BiB,QAAAA,GAAAA,EAAKb,eAAeJ,OAAAA,EAAS,KAAA,CAAA;QAC7BkB,QAAAA,EAAUC,eAAAA,CAAgBnB,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAoB,GAAA,CAACZ,YAAYa,KAAK,EAAA;AAACC,gBAAAA,WAAAA,EAAahB,eAAeN,OAAAA,EAAS,aAAA,CAAA;AAAgBuB,gBAAAA,YAAAA,EAAYjB,eAAeN,OAAAA,EAAS,WAAA;;AAC3GmB,YAAAA,eAAAA,CAAgBnB,OAAAA,EAAS,aAAA,EAAe,KAAA,CAAA,kBACrCO,IAAA,CAACC,YAAYgB,KAAK,EAAA;;AACd,kCAAAJ,GAAA,CAACZ,YAAYiB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAL,GAAA,CAACM,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;AAEjB,kCAAAP,GAAA,CAACZ,YAAYoB,SAAS,EAAA;AAClB,wBAAA,QAAA,gBAAAR,GAAA,CAACM,GAAAA,EAAAA;4BAAEC,SAAAA,EAAU;;;;;;;AAMrC;;"}
1
+ {"version":3,"file":"PrimeInputNumber.js","sources":["../../../form/PrimeInputNumber.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 { useState } from 'react';\nimport { InputNumber } from 'primereact/inputnumber';\nimport { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputNumber` component - a numeric field with locale-aware formatting.\n *\n * `mode` and `currency` are passed straight through because that is where InputNumber earns its keep\n * over a plain text field: it formats and parses in the user's locale rather than making a screen do it.\n *\n * PrimeReact 11 splits the component in two: `Root` holds the number model and `Input` is the field it\n * formats into, which is also why `placeholder` moved onto the input rather than the root. `showButtons`\n * is no longer a flag the component interprets - the spinner is a `Group` of `Increment` and `Decrement`\n * you either render or do not - so the property now decides whether that group exists at all.\n */\nexport function PrimeInputNumber({ element, bindingOutputs }: RegisteredComponentProps) {\n const [value, setValue] = useState<number | undefined>(numberProperty(element, 'value'));\n useValueOutput(bindingOutputs, value);\n const currency = stringProperty(element, 'currency');\n return (\n <InputNumber.Root\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(typeof event.value === 'number' ? event.value : undefined)}\n mode={currency === undefined ? 'decimal' : 'currency'}\n currency={currency}\n min={numberProperty(element, 'min')}\n max={numberProperty(element, 'max')}\n disabled={booleanProperty(element, 'disabled', false)}>\n <InputNumber.Input placeholder={stringProperty(element, 'placeholder')} aria-label={stringProperty(element, 'ariaLabel')} />\n {booleanProperty(element, 'showButtons', false) && (\n <InputNumber.Group>\n <InputNumber.Increment>\n <i className='pi pi-chevron-up' />\n </InputNumber.Increment>\n <InputNumber.Decrement>\n <i className='pi pi-chevron-down' />\n </InputNumber.Decrement>\n </InputNumber.Group>\n )}\n </InputNumber.Root>\n );\n}\n"],"names":["PrimeInputNumber","element","bindingOutputs","value","setValue","useState","numberProperty","useValueOutput","currency","stringProperty","_jsxs","InputNumber","Root","data-scene-id","id","onValueChange","event","undefined","mode","min","max","disabled","booleanProperty","_jsx","Input","placeholder","aria-label","Group","Increment","i","className","Decrement"],"mappings":";;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,cAAc,EAA4B,EAAA;AAClF,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAA6BC,eAAeL,OAAAA,EAAS,OAAA,CAAA,CAAA;AAC/EM,IAAAA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import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimeInputText({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimeInputText({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimeInputText.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputText.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputText.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAY/D,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAcnE"}
1
+ {"version":3,"file":"PrimeInputText.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputText.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAY/E,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BAenF"}
@@ -1,6 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { InputText } from 'primereact/inputtext';
4
+ import { useValueOutput } from '@cratis/scene.react';
4
5
  import { stringProperty, booleanProperty } from '../properties.js';
5
6
 
6
7
  /**
@@ -11,8 +12,9 @@ import { stringProperty, booleanProperty } from '../properties.js';
11
12
  * that state locally, seeded from the `value` property. The consequence is deliberate and worth knowing:
12
13
  * a preview is genuinely typeable instead of frozen, and the typed value is local to the rendered
13
14
  * component rather than pushed back into the model.
14
- */ function PrimeInputText({ element }) {
15
+ */ function PrimeInputText({ element, bindingOutputs }) {
15
16
  const [value, setValue] = useState(stringProperty(element, 'value', ''));
17
+ useValueOutput(bindingOutputs, value);
16
18
  return /*#__PURE__*/ jsx(InputText, {
17
19
  "data-scene-id": element.id,
18
20
  value: value,
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputText.js","sources":["../../../form/PrimeInputText.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 { useState } from 'react';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputText` component - a single-line text field.\n *\n * PrimeReact inputs are controlled, and a Scene element has nowhere to put \"what the user has typed so\n * far\" - `properties` is authored design-time configuration, not live state. The adapter therefore owns\n * that state locally, seeded from the `value` property. The consequence is deliberate and worth knowing:\n * a preview is genuinely typeable instead of frozen, and the typed value is local to the rendered\n * component rather than pushed back into the model.\n */\nexport function PrimeInputText({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputText\n data-scene-id={element.id}\n value={value}\n onChange={(event) => setValue(event.target.value)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n invalid={booleanProperty(element, 'invalid', false)}\n />\n );\n}\n"],"names":["PrimeInputText","element","value","setValue","useState","stringProperty","_jsx","InputText","data-scene-id","id","onChange","event","target","placeholder","aria-label","disabled","booleanProperty","readOnly","invalid"],"mappings":";;;;;AAQA;;;;;;;;AAQC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAA4B,EAAA;AAChE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,SAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;AAChDW,QAAAA,WAAAA,EAAaR,eAAeJ,OAAAA,EAAS,aAAA,CAAA;AACrCa,QAAAA,YAAAA,EAAYT,eAAeJ,OAAAA,EAAS,WAAA,CAAA;QACpCc,QAAAA,EAAUC,eAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CgB,QAAAA,EAAUD,eAAAA,CAAgBf,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CiB,OAAAA,EAASF,eAAAA,CAAgBf,SAAS,SAAA,EAAW,KAAA;;AAGzD;;"}
1
+ {"version":3,"file":"PrimeInputText.js","sources":["../../../form/PrimeInputText.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 { useState } from 'react';\nimport { InputText } from 'primereact/inputtext';\nimport { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputText` component - a single-line text field.\n *\n * PrimeReact inputs are controlled, and a Scene element has nowhere to put \"what the user has typed so\n * far\" - `properties` is authored design-time configuration, not live state. The adapter therefore owns\n * that state locally, seeded from the `value` property. The consequence is deliberate and worth knowing:\n * a preview is genuinely typeable instead of frozen, and the typed value is local to the rendered\n * component rather than pushed back into the model.\n */\nexport function PrimeInputText({ element, bindingOutputs }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n useValueOutput(bindingOutputs, value);\n return (\n <InputText\n data-scene-id={element.id}\n value={value}\n onChange={(event) => setValue(event.target.value)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n readOnly={booleanProperty(element, 'readOnly', false)}\n invalid={booleanProperty(element, 'invalid', false)}\n />\n );\n}\n"],"names":["PrimeInputText","element","bindingOutputs","value","setValue","useState","stringProperty","useValueOutput","_jsx","InputText","data-scene-id","id","onChange","event","target","placeholder","aria-label","disabled","booleanProperty","readOnly","invalid"],"mappings":";;;;;;AAQA;;;;;;;;AAQC,IACM,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,cAAc,EAA4B,EAAA;AAChF,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeL,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpEM,IAAAA,cAAAA,CAAeL,cAAAA,EAAgBC,KAAAA,CAAAA;AAC/B,IAAA,qBACIK,GAAA,CAACC,SAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAAUT,QAAAA,CAASS,KAAAA,CAAMC,MAAM,CAACX,KAAK,CAAA;AAChDY,QAAAA,WAAAA,EAAaT,eAAeL,OAAAA,EAAS,aAAA,CAAA;AACrCe,QAAAA,YAAAA,EAAYV,eAAeL,OAAAA,EAAS,WAAA,CAAA;QACpCgB,QAAAA,EAAUC,eAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CkB,QAAAA,EAAUD,eAAAA,CAAgBjB,SAAS,UAAA,EAAY,KAAA,CAAA;QAC/CmB,OAAAA,EAASF,eAAAA,CAAgBjB,SAAS,SAAA,EAAW,KAAA;;AAGzD;;"}
@@ -1,3 +1,3 @@
1
1
  import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimeInputTextarea({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimeInputTextarea({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimeInputTextarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputTextarea.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputTextarea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAU/D,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAevE"}
1
+ {"version":3,"file":"PrimeInputTextarea.d.ts","sourceRoot":"","sources":["../../../form/PrimeInputTextarea.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAU/E,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BAgBvF"}
@@ -1,6 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { Textarea } from 'primereact/textarea';
4
+ import { useValueOutput } from '@cratis/scene.react';
4
5
  import { stringProperty, booleanProperty, numberProperty } from '../properties.js';
5
6
 
6
7
  /**
@@ -9,8 +10,9 @@ import { stringProperty, booleanProperty, numberProperty } from '../properties.j
9
10
  * One of the few components the version change left alone beyond its name: it is still a single element
10
11
  * rather than a composition, and `rows`, `cols` and `placeholder` still reach the underlying `<textarea>`
11
12
  * untouched. Holds the typed value locally for the same reason {@link PrimeInputText} does.
12
- */ function PrimeInputTextarea({ element }) {
13
+ */ function PrimeInputTextarea({ element, bindingOutputs }) {
13
14
  const [value, setValue] = useState(stringProperty(element, 'value', ''));
15
+ useValueOutput(bindingOutputs, value);
14
16
  return /*#__PURE__*/ jsx(Textarea, {
15
17
  "data-scene-id": element.id,
16
18
  value: value,
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeInputTextarea.js","sources":["../../../form/PrimeInputTextarea.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 { ChangeEvent, useState } from 'react';\nimport { Textarea } from 'primereact/textarea';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputTextarea` component - a multi-line text field, named `Textarea` by PrimeReact 11.\n *\n * One of the few components the version change left alone beyond its name: it is still a single element\n * rather than a composition, and `rows`, `cols` and `placeholder` still reach the underlying `<textarea>`\n * untouched. Holds the typed value locally for the same reason {@link PrimeInputText} does.\n */\nexport function PrimeInputTextarea({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <Textarea\n data-scene-id={element.id}\n value={value}\n onChange={(event: ChangeEvent<HTMLTextAreaElement>) => setValue(event.target.value)}\n rows={numberProperty(element, 'rows', 4)}\n cols={numberProperty(element, 'cols')}\n autoResize={booleanProperty(element, 'autoResize', false)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimeInputTextarea","element","value","setValue","useState","stringProperty","_jsx","Textarea","data-scene-id","id","onChange","event","target","rows","numberProperty","cols","autoResize","booleanProperty","placeholder","aria-label","disabled"],"mappings":";;;;;AAQA;;;;;;AAMC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,QAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAA4CR,QAAAA,CAASQ,KAAAA,CAAMC,MAAM,CAACV,KAAK,CAAA;QAClFW,IAAAA,EAAMC,cAAAA,CAAeb,SAAS,MAAA,EAAQ,CAAA,CAAA;AACtCc,QAAAA,IAAAA,EAAMD,eAAeb,OAAAA,EAAS,MAAA,CAAA;QAC9Be,UAAAA,EAAYC,eAAAA,CAAgBhB,SAAS,YAAA,EAAc,KAAA,CAAA;AACnDiB,QAAAA,WAAAA,EAAab,eAAeJ,OAAAA,EAAS,aAAA,CAAA;AACrCkB,QAAAA,YAAAA,EAAYd,eAAeJ,OAAAA,EAAS,WAAA,CAAA;QACpCmB,QAAAA,EAAUH,eAAAA,CAAgBhB,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
1
+ {"version":3,"file":"PrimeInputTextarea.js","sources":["../../../form/PrimeInputTextarea.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 { ChangeEvent, useState } from 'react';\nimport { Textarea } from 'primereact/textarea';\nimport { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';\nimport { booleanProperty, numberProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:inputTextarea` component - a multi-line text field, named `Textarea` by PrimeReact 11.\n *\n * One of the few components the version change left alone beyond its name: it is still a single element\n * rather than a composition, and `rows`, `cols` and `placeholder` still reach the underlying `<textarea>`\n * untouched. Holds the typed value locally for the same reason {@link PrimeInputText} does.\n */\nexport function PrimeInputTextarea({ element, bindingOutputs }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n useValueOutput(bindingOutputs, value);\n return (\n <Textarea\n data-scene-id={element.id}\n value={value}\n onChange={(event: ChangeEvent<HTMLTextAreaElement>) => setValue(event.target.value)}\n rows={numberProperty(element, 'rows', 4)}\n cols={numberProperty(element, 'cols')}\n autoResize={booleanProperty(element, 'autoResize', false)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimeInputTextarea","element","bindingOutputs","value","setValue","useState","stringProperty","useValueOutput","_jsx","Textarea","data-scene-id","id","onChange","event","target","rows","numberProperty","cols","autoResize","booleanProperty","placeholder","aria-label","disabled"],"mappings":";;;;;;AAQA;;;;;;AAMC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,OAAO,EAAEC,cAAc,EAA4B,EAAA;AACpF,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeL,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpEM,IAAAA,cAAAA,CAAeL,cAAAA,EAAgBC,KAAAA,CAAAA;AAC/B,IAAA,qBACIK,GAAA,CAACC,QAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,QAAAA,EAAU,CAACC,KAAAA,GAA4CT,QAAAA,CAASS,KAAAA,CAAMC,MAAM,CAACX,KAAK,CAAA;QAClFY,IAAAA,EAAMC,cAAAA,CAAef,SAAS,MAAA,EAAQ,CAAA,CAAA;AACtCgB,QAAAA,IAAAA,EAAMD,eAAef,OAAAA,EAAS,MAAA,CAAA;QAC9BiB,UAAAA,EAAYC,eAAAA,CAAgBlB,SAAS,YAAA,EAAc,KAAA,CAAA;AACnDmB,QAAAA,WAAAA,EAAad,eAAeL,OAAAA,EAAS,aAAA,CAAA;AACrCoB,QAAAA,YAAAA,EAAYf,eAAeL,OAAAA,EAAS,WAAA,CAAA;QACpCqB,QAAAA,EAAUH,eAAAA,CAAgBlB,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
@@ -1,3 +1,3 @@
1
1
  import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimeMultiSelect({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimeMultiSelect({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimeMultiSelect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeMultiSelect.d.ts","sourceRoot":"","sources":["../../../form/PrimeMultiSelect.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAkB/D,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BA6BrE"}
1
+ {"version":3,"file":"PrimeMultiSelect.d.ts","sourceRoot":"","sources":["../../../form/PrimeMultiSelect.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAkB/E,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BA8BrF"}
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { Select } from 'primereact/select';
4
+ import { useValueOutput } from '@cratis/scene.react';
4
5
  import { stringArrayProperty, stringProperty, booleanProperty, optionsProperty } from '../properties.js';
5
6
 
6
7
  /**
@@ -17,8 +18,9 @@ import { stringArrayProperty, stringProperty, booleanProperty, optionsProperty }
17
18
  * v11 renders the selection through `Select.Value`, which joins the selected labels with commas and
18
19
  * offers no chip mode and no collapse threshold, so honoring either property would mean reimplementing
19
20
  * the value slot rather than configuring it.
20
- */ function PrimeMultiSelect({ element }) {
21
+ */ function PrimeMultiSelect({ element, bindingOutputs }) {
21
22
  const [value, setValue] = useState(stringArrayProperty(element, 'value'));
23
+ useValueOutput(bindingOutputs, value);
22
24
  const placeholder = stringProperty(element, 'placeholder', 'Select');
23
25
  const filter = booleanProperty(element, 'filter', false);
24
26
  return /*#__PURE__*/ jsxs(Select.Root, {
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeMultiSelect.js","sources":["../../../form/PrimeMultiSelect.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 { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:multiSelect` component - a multiple-choice select.\n *\n * There is no `MultiSelect` in PrimeReact 11; the capability moved onto `Select`, which takes a\n * `multiple` prop. Keeping the abstract name and re-expressing it over `Select` is the whole point of\n * having an abstract name: a screen that says `multiSelect` keeps working, and only this file knows the\n * component behind it changed.\n *\n * Two v10 properties have nowhere to go and are deliberately dropped rather than silently ignored.\n * `display` chose between a comma-separated summary and a row of chips, and `maxSelectedLabels` collapsed\n * a long selection into an \"n items selected\" label - both were features of v10's own selection renderer.\n * v11 renders the selection through `Select.Value`, which joins the selected labels with commas and\n * offers no chip mode and no collapse threshold, so honoring either property would mean reimplementing\n * the value slot rather than configuring it.\n */\nexport function PrimeMultiSelect({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringArrayProperty(element, 'value'));\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n multiple\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger>\n <Select.Value placeholder={placeholder} />\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeMultiSelect","element","value","setValue","useState","stringArrayProperty","placeholder","stringProperty","filter","booleanProperty","_jsxs","Select","Root","data-scene-id","id","multiple","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","_jsx","Value","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;AAQA;;;;;;;;;;;;;;AAcC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAAkBC,oBAAoBJ,OAAAA,EAAS,OAAA,CAAA,CAAA;IACzE,MAAMK,WAAAA,GAAcC,cAAAA,CAAeN,OAAAA,EAAS,aAAA,EAAe,QAAA,CAAA;IAC3D,MAAMO,MAAAA,GAASC,eAAAA,CAAgBR,OAAAA,EAAS,QAAA,EAAU,KAAA,CAAA;IAClD,qBACIS,IAAA,CAACC,OAAOC,IAAI,EAAA;AACRC,QAAAA,eAAAA,EAAeZ,QAAQa,EAAE;QACzBC,QAAQ,EAAA,IAAA;QACRb,KAAAA,EAAOA,KAAAA;AACPc,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUd,QAAAA,CAASc,KAAAA,CAAMf,KAAK,CAAA;AAC9CgB,QAAAA,OAAAA,EAASC,gBAAgBlB,OAAAA,EAAS,SAAA,CAAA;QAClCmB,WAAAA,EAAY,OAAA;QACZC,WAAAA,EAAY,OAAA;QACZb,MAAAA,EAAQA,MAAAA;QACRc,QAAAA,EAAUb,eAAAA,CAAgBR,SAAS,UAAA,EAAY,KAAA,CAAA;;AAC/C,0BAAAS,IAAA,CAACC,OAAOY,OAAO,EAAA;;AACX,kCAAAC,GAAA,CAACb,OAAOc,KAAK,EAAA;wBAACnB,WAAAA,EAAaA;;AAC3B,kCAAAkB,GAAA,CAACb,OAAOe,KAAK,EAAA,EAAA;;;AAEjB,0BAAAF,GAAA,CAACb,OAAOgB,MAAM,EAAA;wCACVH,GAAA,CAACb,OAAOiB,UAAU,EAAA;4CACdlB,IAAA,CAACC,OAAOkB,KAAK,EAAA;;4BACRrB,MAAAA,kBAAUgB,GAAA,CAACb,OAAOmB,MAAM,EAAA;gCAACxB,WAAAA,EAAaA;;AACvC,0CAAAkB,GAAA,CAACb,OAAOoB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;"}
1
+ {"version":3,"file":"PrimeMultiSelect.js","sources":["../../../form/PrimeMultiSelect.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 { useState } from 'react';\nimport { Select } from 'primereact/select';\nimport { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';\nimport { booleanProperty, optionsProperty, stringArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:multiSelect` component - a multiple-choice select.\n *\n * There is no `MultiSelect` in PrimeReact 11; the capability moved onto `Select`, which takes a\n * `multiple` prop. Keeping the abstract name and re-expressing it over `Select` is the whole point of\n * having an abstract name: a screen that says `multiSelect` keeps working, and only this file knows the\n * component behind it changed.\n *\n * Two v10 properties have nowhere to go and are deliberately dropped rather than silently ignored.\n * `display` chose between a comma-separated summary and a row of chips, and `maxSelectedLabels` collapsed\n * a long selection into an \"n items selected\" label - both were features of v10's own selection renderer.\n * v11 renders the selection through `Select.Value`, which joins the selected labels with commas and\n * offers no chip mode and no collapse threshold, so honoring either property would mean reimplementing\n * the value slot rather than configuring it.\n */\nexport function PrimeMultiSelect({ element, bindingOutputs }: RegisteredComponentProps) {\n const [value, setValue] = useState<unknown>(stringArrayProperty(element, 'value'));\n useValueOutput(bindingOutputs, value);\n const placeholder = stringProperty(element, 'placeholder', 'Select');\n const filter = booleanProperty(element, 'filter', false);\n return (\n <Select.Root\n data-scene-id={element.id}\n multiple\n value={value}\n onValueChange={(event) => setValue(event.value)}\n options={optionsProperty(element, 'options')}\n optionLabel='label'\n optionValue='value'\n filter={filter}\n disabled={booleanProperty(element, 'disabled', false)}>\n <Select.Trigger>\n <Select.Value placeholder={placeholder} />\n <Select.Arrow />\n </Select.Trigger>\n <Select.Portal>\n <Select.Positioner>\n <Select.Popup>\n {filter && <Select.Filter placeholder={placeholder} />}\n <Select.List />\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n );\n}\n"],"names":["PrimeMultiSelect","element","bindingOutputs","value","setValue","useState","stringArrayProperty","useValueOutput","placeholder","stringProperty","filter","booleanProperty","_jsxs","Select","Root","data-scene-id","id","multiple","onValueChange","event","options","optionsProperty","optionLabel","optionValue","disabled","Trigger","_jsx","Value","Arrow","Portal","Positioner","Popup","Filter","List"],"mappings":";;;;;;AAQA;;;;;;;;;;;;;;AA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ACvC,0CAAAkB,GAAA,CAACb,OAAOoB,IAAI,EAAA,EAAA;;;;;;;AAMpC;;"}
@@ -1,3 +1,3 @@
1
1
  import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimePassword({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimePassword({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimePassword.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimePassword.d.ts","sourceRoot":"","sources":["../../../form/PrimePassword.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAa/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAalE"}
1
+ {"version":3,"file":"PrimePassword.d.ts","sourceRoot":"","sources":["../../../form/PrimePassword.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAa/E,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BAclF"}
@@ -1,6 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { InputPassword } from 'primereact/inputpassword';
4
+ import { useValueOutput } from '@cratis/scene.react';
4
5
  import { stringProperty, booleanProperty } from '../properties.js';
5
6
 
6
7
  /**
@@ -12,8 +13,9 @@ import { stringProperty, booleanProperty } from '../properties.js';
12
13
  * control to switch on - so neither property is read here. `mask` is exposed instead, which is the one
13
14
  * knob that survived and the one an authored screen can actually mean: a preview that starts revealed.
14
15
  * A screen that needs a reveal button now owns that button, because only the screen knows where it goes.
15
- */ function PrimePassword({ element }) {
16
+ */ function PrimePassword({ element, bindingOutputs }) {
16
17
  const [value, setValue] = useState(stringProperty(element, 'value', ''));
18
+ useValueOutput(bindingOutputs, value);
17
19
  return /*#__PURE__*/ jsx(InputPassword, {
18
20
  "data-scene-id": element.id,
19
21
  value: value,
@@ -1 +1 @@
1
- {"version":3,"file":"PrimePassword.js","sources":["../../../form/PrimePassword.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 { useState } from 'react';\nimport { InputPassword } from 'primereact/inputpassword';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:password` component - a masked field, named `InputPassword` by PrimeReact 11.\n *\n * v11 pared this back to what a password field actually is: an input that renders as `type=\"password\"`\n * until something flips `mask`. The v10 `feedback` strength meter and the `toggleMask` eye button are\n * both gone from the component - there is no prompt/weak/medium/strong panel and no built-in reveal\n * control to switch on - so neither property is read here. `mask` is exposed instead, which is the one\n * knob that survived and the one an authored screen can actually mean: a preview that starts revealed.\n * A screen that needs a reveal button now owns that button, because only the screen knows where it goes.\n */\nexport function PrimePassword({ element }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n return (\n <InputPassword\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? '')}\n mask={booleanProperty(element, 'mask', true)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimePassword","element","value","setValue","useState","stringProperty","_jsx","InputPassword","data-scene-id","id","onValueChange","event","mask","booleanProperty","placeholder","aria-label","disabled"],"mappings":";;;;;AAQA;;;;;;;;;AASC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeJ,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpE,IAAA,qBACIK,GAAA,CAACC,aAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QACzBP,KAAAA,EAAOA,KAAAA;AACPQ,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUR,QAAAA,CAASQ,KAAAA,CAAMT,KAAK,IAAI,EAAA,CAAA;QAClDU,IAAAA,EAAMC,eAAAA,CAAgBZ,SAAS,MAAA,EAAQ,IAAA,CAAA;AACvCa,QAAAA,WAAAA,EAAaT,eAAeJ,OAAAA,EAAS,aAAA,CAAA;AACrCc,QAAAA,YAAAA,EAAYV,eAAeJ,OAAAA,EAAS,WAAA,CAAA;QACpCe,QAAAA,EAAUH,eAAAA,CAAgBZ,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
1
+ {"version":3,"file":"PrimePassword.js","sources":["../../../form/PrimePassword.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 { useState } from 'react';\nimport { InputPassword } from 'primereact/inputpassword';\nimport { RegisteredComponentProps, useValueOutput } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `PrimeReact:password` component - a masked field, named `InputPassword` by PrimeReact 11.\n *\n * v11 pared this back to what a password field actually is: an input that renders as `type=\"password\"`\n * until something flips `mask`. The v10 `feedback` strength meter and the `toggleMask` eye button are\n * both gone from the component - there is no prompt/weak/medium/strong panel and no built-in reveal\n * control to switch on - so neither property is read here. `mask` is exposed instead, which is the one\n * knob that survived and the one an authored screen can actually mean: a preview that starts revealed.\n * A screen that needs a reveal button now owns that button, because only the screen knows where it goes.\n */\nexport function PrimePassword({ element, bindingOutputs }: RegisteredComponentProps) {\n const [value, setValue] = useState(stringProperty(element, 'value', ''));\n useValueOutput(bindingOutputs, value);\n return (\n <InputPassword\n data-scene-id={element.id}\n value={value}\n onValueChange={(event) => setValue(event.value ?? '')}\n mask={booleanProperty(element, 'mask', true)}\n placeholder={stringProperty(element, 'placeholder')}\n aria-label={stringProperty(element, 'ariaLabel')}\n disabled={booleanProperty(element, 'disabled', false)}\n />\n );\n}\n"],"names":["PrimePassword","element","bindingOutputs","value","setValue","useState","stringProperty","useValueOutput","_jsx","InputPassword","data-scene-id","id","onValueChange","event","mask","booleanProperty","placeholder","aria-label","disabled"],"mappings":";;;;;;AAQA;;;;;;;;;AASC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAAEC,cAAc,EAA4B,EAAA;AAC/E,IAAA,MAAM,CAACC,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAASC,cAAAA,CAAeL,SAAS,OAAA,EAAS,EAAA,CAAA,CAAA;AACpEM,IAAAA,cAAAA,CAAeL,cAAAA,EAAgBC,KAAAA,CAAAA;AAC/B,IAAA,qBACIK,GAAA,CAACC,aAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeT,QAAQU,EAAE;QACzBR,KAAAA,EAAOA,KAAAA;AACPS,QAAAA,aAAAA,EAAe,CAACC,KAAAA,GAAUT,QAAAA,CAASS,KAAAA,CAAMV,KAAK,IAAI,EAAA,CAAA;QAClDW,IAAAA,EAAMC,eAAAA,CAAgBd,SAAS,MAAA,EAAQ,IAAA,CAAA;AACvCe,QAAAA,WAAAA,EAAaV,eAAeL,OAAAA,EAAS,aAAA,CAAA;AACrCgB,QAAAA,YAAAA,EAAYX,eAAeL,OAAAA,EAAS,WAAA,CAAA;QACpCiB,QAAAA,EAAUH,eAAAA,CAAgBd,SAAS,UAAA,EAAY,KAAA;;AAG3D;;"}
@@ -1,3 +1,3 @@
1
1
  import { RegisteredComponentProps } from '@cratis/scene.react';
2
- export declare function PrimeRadioButton({ element }: RegisteredComponentProps): import("react").JSX.Element;
2
+ export declare function PrimeRadioButton({ element, bindingOutputs }: RegisteredComponentProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=PrimeRadioButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimeRadioButton.d.ts","sourceRoot":"","sources":["../../../form/PrimeRadioButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAgB/D,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BA2BrE"}
1
+ {"version":3,"file":"PrimeRadioButton.d.ts","sourceRoot":"","sources":["../../../form/PrimeRadioButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAkB,MAAM,qBAAqB,CAAC;AAgB/E,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,wBAAwB,+BA4BrF"}