@opennsw/jsonforms-renderers 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { JSX } from 'react/jsx-runtime';
5
5
  import { LayoutProps } from '@jsonforms/core';
6
6
  import { OwnPropsOfControl } from '@jsonforms/core';
7
7
  import { RankedTester } from '@jsonforms/core';
8
+ import { ReactNode } from 'react';
8
9
  import { TesterContext } from '@jsonforms/core';
9
10
  import { UISchemaElement } from '@jsonforms/core';
10
11
 
@@ -32,6 +33,8 @@ export declare const FileControl: ComponentType<OwnPropsOfControl>;
32
33
 
33
34
  export declare const FileControlTester: (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number;
34
35
 
36
+ export declare type GetDownloadUrl = (key: string) => Promise<string>;
37
+
35
38
  export declare const GroupLayoutRenderer: ({ uischema, schema, path, renderers, cells, enabled }: LayoutProps) => JSX.Element;
36
39
 
37
40
  export declare const GroupLayoutTester: RankedTester;
@@ -64,6 +67,31 @@ export declare const TextControl: ({ data, handleChange, path, label, required,
64
67
 
65
68
  export declare const TextControlTester: RankedTester;
66
69
 
70
+ export declare interface UploadContextValue {
71
+ onUpload?: UploadHandler;
72
+ getDownloadUrl?: GetDownloadUrl;
73
+ }
74
+
75
+ export declare type UploadHandler = (file: File) => Promise<UploadResponse>;
76
+
77
+ export declare function UploadProvider({ children, onUpload, getDownloadUrl, }: {
78
+ children: ReactNode;
79
+ onUpload?: UploadHandler;
80
+ getDownloadUrl?: GetDownloadUrl;
81
+ }): JSX.Element;
82
+
83
+ /**
84
+ * Contract for upload: applications provide the implementation; the renderer
85
+ * only calls these callbacks. Keeps the package backend-agnostic (IoC) so e.g.
86
+ * OGA can move to a separate repo with its own backend/endpoints.
87
+ */
88
+ export declare interface UploadResponse {
89
+ key: string;
90
+ name?: string;
91
+ }
92
+
93
+ export declare function useUpload(): UploadContextValue | null;
94
+
67
95
  export declare const VerticalLayoutRenderer: ({ uischema, schema, path, renderers, cells, enabled }: LayoutProps) => JSX.Element;
68
96
 
69
97
  export declare const VerticalLayoutTester: RankedTester;
@@ -1 +1 @@
1
- /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-green-600:oklch(62.7% .194 149.214);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--radius-lg:.5rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.relative{position:relative}.mt-1{margin-top:calc(var(--spacing)*1)}.block{display:block}.flex{display:flex}.hidden{display:none}.h-5{height:calc(var(--spacing)*5)}.h-8{height:calc(var(--spacing)*8)}.w-5{width:calc(var(--spacing)*5)}.w-8{width:calc(var(--spacing)*8)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-300{border-color:var(--color-red-300)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-red-50{background-color:var(--color-red-50)}.p-2{padding:calc(var(--spacing)*2)}.p-6{padding:calc(var(--spacing)*6)}.text-center{text-align:center}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-green-600{color:var(--color-green-600)}.text-red-500{color:var(--color-red-500)}.opacity-60{opacity:.6}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media(hover:hover){.hover\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:underline:hover{text-decoration-line:underline}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
1
+ /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-green-600:oklch(62.7% .194 149.214);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--spacing:.25rem;--radius-lg:.5rem;--ease-in-out:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.relative{position:relative}.mt-1{margin-top:calc(var(--spacing)*1)}.block{display:block}.flex{display:flex}.hidden{display:none}.h-5{height:calc(var(--spacing)*5)}.h-8{height:calc(var(--spacing)*8)}.w-5{width:calc(var(--spacing)*5)}.w-8{width:calc(var(--spacing)*8)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-blue-500{border-color:var(--color-blue-500)}.border-gray-300{border-color:var(--color-gray-300)}.border-red-300{border-color:var(--color-red-300)}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-red-50{background-color:var(--color-red-50)}.p-2{padding:calc(var(--spacing)*2)}.p-6{padding:calc(var(--spacing)*6)}.text-center{text-align:center}.text-blue-600{color:var(--color-blue-600)}.text-gray-400{color:var(--color-gray-400)}.text-green-600{color:var(--color-green-600)}.text-red-500{color:var(--color-red-500)}.opacity-60{opacity:.6}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media(hover:hover){.hover\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:text-red-600:hover{color:var(--color-red-600)}}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("@jsonforms/core"),T=require("@jsonforms/react"),r=require("@radix-ui/themes"),z=require("react"),v=require("@radix-ui/react-icons"),B=({data:l,handleChange:u,path:t,label:p,required:h,errors:o,uischema:c,schema:i,enabled:x})=>{var g;const a=o.length===0;return e.jsx(r.Box,{mb:"4",children:e.jsxs(r.Flex,{direction:"column",gap:"1",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",htmlFor:t,children:[p," ",h&&e.jsx(r.Text,{color:"red",children:"*"})]}),e.jsx(r.TextField.Root,{value:l||"",onChange:j=>u(t,j.target.value),disabled:!x,placeholder:(g=c.options)==null?void 0:g.placeholder,color:a?void 0:"red",id:t}),!a&&o!=="is a required property"&&e.jsx(r.Text,{color:"red",size:"1",children:o}),i.description&&e.jsx(r.Text,{size:"1",color:"gray",children:i.description})]})})},D=s.rankWith(1,s.isStringControl),le=T.withJsonFormsControlProps(B),I=({data:l,handleChange:u,path:t,label:p,required:h,errors:o,uischema:c,schema:i,enabled:x})=>{var j;const a=o.length===0,g=m=>{if(m===""){u(t,void 0);return}const d=Number(m);isNaN(d)||u(t,d)};return e.jsx(r.Box,{mb:"4",children:e.jsxs(r.Flex,{direction:"column",gap:"1",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",htmlFor:t,children:[p," ",h&&e.jsx(r.Text,{color:"red",children:"*"})]}),e.jsx(r.TextField.Root,{type:"number",value:l??"",onChange:m=>g(m.target.value),disabled:!x,placeholder:(j=c.options)==null?void 0:j.placeholder,color:a?void 0:"red",id:t}),!a&&o!=="is a required property"&&e.jsx(r.Text,{color:"red",size:"1",children:o}),i.description&&e.jsx(r.Text,{size:"1",color:"gray",children:i.description})]})})},N=s.rankWith(2,s.or(s.isNumberControl,s.isIntegerControl)),ie=T.withJsonFormsControlProps(I),S=({data:l,handleChange:u,path:t,label:p,required:h,errors:o,schema:c,enabled:i})=>{const x=o.length===0;return e.jsxs(r.Box,{mb:"4",children:[e.jsxs(r.Flex,{gap:"2",align:"center",children:[e.jsx(r.Checkbox,{checked:!!l,onCheckedChange:a=>u(t,a===!0),disabled:!i,id:t}),e.jsxs(r.Text,{as:"label",size:"2",htmlFor:t,children:[p," ",h&&"*"]})]}),!x&&e.jsx(r.Text,{color:"red",size:"1",className:"block mt-1",children:o}),c.description&&e.jsx(r.Text,{size:"1",color:"gray",className:"block mt-1",children:c.description})]})},A=s.rankWith(2,s.isBooleanControl),ae=T.withJsonFormsControlProps(S),W=({data:l,handleChange:u,path:t,label:p,required:h,errors:o,schema:c,uischema:i,enabled:x})=>{var m;const a=o.length===0;let g=[];c.enum?g=c.enum.map(d=>({value:String(d),label:String(d)})):c.oneOf&&(g=c.oneOf.map(d=>({value:String(d.const),label:d.title||String(d.const)})));const j=l!==void 0?String(l):"";return e.jsx(r.Box,{mb:"4",children:e.jsxs(r.Flex,{direction:"column",gap:"1",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",htmlFor:t,children:[p," ",h&&e.jsx(r.Text,{color:"red",children:"*"})]}),e.jsxs(r.Select.Root,{value:j,onValueChange:d=>u(t,d),disabled:!x,children:[e.jsx(r.Select.Trigger,{placeholder:((m=i.options)==null?void 0:m.placeholder)||"Select an option",color:a?void 0:"red",id:t}),e.jsx(r.Select.Content,{children:g.map(d=>e.jsx(r.Select.Item,{value:d.value,children:d.label},d.value))})]}),!a&&o!=="is a required property"&&e.jsx(r.Text,{color:"red",size:"1",children:o}),c.description&&e.jsx(r.Text,{size:"1",color:"gray",children:c.description})]})})},P=s.rankWith(2,s.or(s.isEnumControl,s.isOneOfControl)),ce=T.withJsonFormsControlProps(W),V=({data:l,handleChange:u,path:t,label:p,required:h,errors:o,schema:c,enabled:i})=>{const x=o.length===0;return e.jsx(r.Box,{mb:"4",children:e.jsxs(r.Flex,{direction:"column",gap:"1",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",htmlFor:t,children:[p," ",h&&e.jsx(r.Text,{color:"red",children:"*"})]}),e.jsx(r.TextField.Root,{type:"date",value:l||"",onChange:a=>u(t,a.target.value),disabled:!i,color:x?void 0:"red",id:t}),!x&&o!=="is a required property"&&e.jsx(r.Text,{color:"red",size:"1",children:o}),c.description&&e.jsx(r.Text,{size:"1",color:"gray",children:c.description})]})})},J=s.rankWith(2,s.isDateControl),de=T.withJsonFormsControlProps(V),q=({uischema:l,schema:u,path:t,renderers:p,cells:h,enabled:o})=>{const i=l.elements;return e.jsx(r.Flex,{direction:"column",gap:"4",children:i.map((x,a)=>e.jsx(T.JsonFormsDispatch,{uischema:x,schema:u,path:t,renderers:p,cells:h,enabled:o},`${t}-${a}`))})},E=s.rankWith(1,s.uiTypeIs("VerticalLayout")),H=({uischema:l,schema:u,path:t,renderers:p,cells:h,enabled:o})=>{const i=l.elements;return e.jsx(r.Flex,{direction:"row",gap:"4",children:i.map((x,a)=>e.jsx(r.Box,{style:{flex:1},children:e.jsx(T.JsonFormsDispatch,{uischema:x,schema:u,path:t,renderers:p,cells:h,enabled:o})},`${t}-${a}`))})},O=s.rankWith(1,s.uiTypeIs("HorizontalLayout")),M=({uischema:l,schema:u,path:t,renderers:p,cells:h,enabled:o})=>{const c=l,i=c.elements;return e.jsxs(r.Card,{mb:"4",children:[c.label&&e.jsx(r.Heading,{size:"4",mb:"4",children:c.label}),e.jsx(r.Flex,{direction:"column",gap:"4",children:i.map((x,a)=>e.jsx(T.JsonFormsDispatch,{uischema:x,schema:u,path:t,renderers:p,cells:h,enabled:o},`${t}-${a}`))})]})},G=s.rankWith(1,s.uiTypeIs("Group")),U=({uischema:l,schema:u,path:t,renderers:p,cells:h,enabled:o})=>{var j;const i=l.elements.filter(m=>m.type==="Category"),[x,a]=z.useState(((j=i[0])==null?void 0:j.label)||"");if(!i.length)return null;const g=i.find(m=>m.label===x)?x:i[0].label;return e.jsxs(r.Tabs.Root,{value:g,onValueChange:a,children:[e.jsx(r.Tabs.List,{children:i.map((m,d)=>e.jsx(r.Tabs.Trigger,{value:m.label,children:m.label},`${t}-${d}`))}),e.jsx(r.Box,{pt:"3",children:i.map((m,d)=>e.jsx(r.Tabs.Content,{value:m.label,children:e.jsx(r.Flex,{direction:"column",gap:"4",children:m.elements.map((F,f)=>e.jsx(T.JsonFormsDispatch,{uischema:F,schema:u,path:t,renderers:p,cells:h,enabled:o},`${t}-${d}-${f}`))})},`${t}-${d}`))})]})},K=s.rankWith(1,s.uiTypeIs("Categorization")),ue=({data:l,handleChange:u,path:t,label:p,required:h,uischema:o,enabled:c})=>{const[i,x]=z.useState(!1),[a,g]=z.useState(null),[j,m]=z.useState(null),d=z.useRef(null),F=(o==null?void 0:o.options)||{},f=F.maxSize||5*1024*1024,y=F.accept||"image/*,application/pdf",b=c!==!1,k=()=>j||(l?"Uploaded File":null),w=n=>{if(n.size>f){const C=(f/1048576).toFixed(0);g(`File size exceeds ${C}MB limit.`);return}const se=y.split(",").map(C=>C.trim()).some(C=>C.endsWith("/*")?n.type.startsWith(C.slice(0,-1)):C.startsWith(".")?n.name.toLowerCase().endsWith(C.toLowerCase()):n.type===C);if(y!=="*"&&!se&&!y.includes("*/*")){g(`Invalid file type. Accepted types: ${y}`);return}const L=new FileReader;L.onload=()=>{const C=L.result;u(t,C),m(n.name),g(null)},L.onerror=()=>{g("Failed to read file")},L.readAsDataURL(n)},R=n=>{n.preventDefault(),n.stopPropagation(),!(!b||l)&&(n.type==="dragenter"||n.type==="dragover"?x(!0):n.type==="dragleave"&&x(!1))},re=n=>{n.preventDefault(),n.stopPropagation(),x(!1),!(!b||l)&&n.dataTransfer.files&&n.dataTransfer.files[0]&&w(n.dataTransfer.files[0])},te=n=>{n.target.files&&n.target.files[0]&&w(n.target.files[0])},oe=()=>{b&&(u(t,null),m(null),g(null),d.current&&(d.current.value=""))},ne=n=>{var $;b&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),($=d.current)==null||$.click())};return e.jsxs(r.Box,{mb:"4",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",mb:"1",className:"block",children:[p," ",h&&"*"]}),l?e.jsx(r.Card,{size:"2",variant:"surface",className:"relative group",children:e.jsxs(r.Flex,{align:"center",gap:"3",children:[e.jsx(r.Box,{className:"bg-blue-100 p-2 rounded text-blue-600",children:e.jsx(v.FileTextIcon,{width:"20",height:"20"})}),e.jsxs(r.Box,{style:{flex:1,overflow:"hidden"},children:[e.jsx(r.Text,{size:"2",weight:"bold",className:"block truncate",children:k()}),b?e.jsx(r.Text,{size:"1",color:"gray",children:"Ready to submit"}):e.jsx("a",{href:l,download:j||"document",className:"text-xs text-blue-600 hover:underline cursor-pointer",onClick:n=>n.stopPropagation(),children:"Download"})]}),e.jsxs(r.Flex,{align:"center",gap:"2",children:[e.jsx(v.CheckCircledIcon,{className:"text-green-600 w-5 h-5"}),b&&e.jsx(r.IconButton,{variant:"ghost",color:"gray",onClick:oe,className:"hover:text-red-600 transition-colors",children:e.jsx(v.Cross2Icon,{})})]})]})}):e.jsxs("div",{className:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("react"),i=require("@jsonforms/core"),C=require("@jsonforms/react"),r=require("@radix-ui/themes"),L=require("@radix-ui/react-icons"),_=f.createContext(null);function De({children:o,onUpload:l,getDownloadUrl:t}){const u={onUpload:l,getDownloadUrl:t};return e.jsx(_.Provider,{value:u,children:o})}function G(){return f.useContext(_)}const K=({data:o,handleChange:l,path:t,label:u,required:p,errors:c,uischema:a,schema:s,enabled:m})=>{var b;const d=c.length===0;return e.jsx(r.Box,{mb:"4",children:e.jsxs(r.Flex,{direction:"column",gap:"1",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",htmlFor:t,children:[u," ",p&&e.jsx(r.Text,{color:"red",children:"*"})]}),e.jsx(r.TextField.Root,{value:o||"",onChange:g=>l(t,g.target.value),disabled:!m,placeholder:(b=a.options)==null?void 0:b.placeholder,color:d?void 0:"red",id:t}),!d&&c!=="is a required property"&&e.jsx(r.Text,{color:"red",size:"1",children:c}),s.description&&e.jsx(r.Text,{size:"1",color:"gray",children:s.description})]})})},X=i.rankWith(1,i.isStringControl),Le=C.withJsonFormsControlProps(K),Z=({data:o,handleChange:l,path:t,label:u,required:p,errors:c,uischema:a,schema:s,enabled:m})=>{var g;const d=c.length===0,b=x=>{if(x===""){l(t,void 0);return}const h=Number(x);isNaN(h)||l(t,h)};return e.jsx(r.Box,{mb:"4",children:e.jsxs(r.Flex,{direction:"column",gap:"1",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",htmlFor:t,children:[u," ",p&&e.jsx(r.Text,{color:"red",children:"*"})]}),e.jsx(r.TextField.Root,{type:"number",value:o??"",onChange:x=>b(x.target.value),disabled:!m,placeholder:(g=a.options)==null?void 0:g.placeholder,color:d?void 0:"red",id:t}),!d&&c!=="is a required property"&&e.jsx(r.Text,{color:"red",size:"1",children:c}),s.description&&e.jsx(r.Text,{size:"1",color:"gray",children:s.description})]})})},Q=i.rankWith(2,i.or(i.isNumberControl,i.isIntegerControl)),Ae=C.withJsonFormsControlProps(Z),Y=({data:o,handleChange:l,path:t,label:u,required:p,errors:c,schema:a,enabled:s})=>{const m=c.length===0;return e.jsxs(r.Box,{mb:"4",children:[e.jsxs(r.Flex,{gap:"2",align:"center",children:[e.jsx(r.Checkbox,{checked:!!o,onCheckedChange:d=>l(t,d===!0),disabled:!s,id:t}),e.jsxs(r.Text,{as:"label",size:"2",htmlFor:t,children:[u," ",p&&"*"]})]}),!m&&e.jsx(r.Text,{color:"red",size:"1",className:"block mt-1",children:c}),a.description&&e.jsx(r.Text,{size:"1",color:"gray",className:"block mt-1",children:a.description})]})},ee=i.rankWith(2,i.isBooleanControl),Se=C.withJsonFormsControlProps(Y),re=({data:o,handleChange:l,path:t,label:u,required:p,errors:c,schema:a,uischema:s,enabled:m})=>{var x;const d=c.length===0;let b=[];a.enum?b=a.enum.map(h=>({value:String(h),label:String(h)})):a.oneOf&&(b=a.oneOf.map(h=>({value:String(h.const),label:h.title||String(h.const)})));const g=o!==void 0?String(o):"";return e.jsx(r.Box,{mb:"4",children:e.jsxs(r.Flex,{direction:"column",gap:"1",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",htmlFor:t,children:[u," ",p&&e.jsx(r.Text,{color:"red",children:"*"})]}),e.jsxs(r.Select.Root,{value:g,onValueChange:h=>l(t,h),disabled:!m,children:[e.jsx(r.Select.Trigger,{placeholder:((x=s.options)==null?void 0:x.placeholder)||"Select an option",color:d?void 0:"red",id:t}),e.jsx(r.Select.Content,{children:b.map(h=>e.jsx(r.Select.Item,{value:h.value,children:h.label},h.value))})]}),!d&&c!=="is a required property"&&e.jsx(r.Text,{color:"red",size:"1",children:c}),a.description&&e.jsx(r.Text,{size:"1",color:"gray",children:a.description})]})})},te=i.rankWith(2,i.or(i.isEnumControl,i.isOneOfControl)),Be=C.withJsonFormsControlProps(re),oe=({data:o,handleChange:l,path:t,label:u,required:p,errors:c,schema:a,enabled:s})=>{const m=c.length===0;return e.jsx(r.Box,{mb:"4",children:e.jsxs(r.Flex,{direction:"column",gap:"1",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",htmlFor:t,children:[u," ",p&&e.jsx(r.Text,{color:"red",children:"*"})]}),e.jsx(r.TextField.Root,{type:"date",value:o||"",onChange:d=>l(t,d.target.value),disabled:!s,color:m?void 0:"red",id:t}),!m&&c!=="is a required property"&&e.jsx(r.Text,{color:"red",size:"1",children:c}),a.description&&e.jsx(r.Text,{size:"1",color:"gray",children:a.description})]})})},ne=i.rankWith(2,i.isDateControl),Re=C.withJsonFormsControlProps(oe),se=({uischema:o,schema:l,path:t,renderers:u,cells:p,enabled:c})=>{const s=o.elements;return e.jsx(r.Flex,{direction:"column",gap:"4",children:s.map((m,d)=>e.jsx(C.JsonFormsDispatch,{uischema:m,schema:l,path:t,renderers:u,cells:p,enabled:c},`${t}-${d}`))})},le=i.rankWith(1,i.uiTypeIs("VerticalLayout")),ie=({uischema:o,schema:l,path:t,renderers:u,cells:p,enabled:c})=>{const s=o.elements;return e.jsx(r.Flex,{direction:"row",gap:"4",children:s.map((m,d)=>e.jsx(r.Box,{style:{flex:1},children:e.jsx(C.JsonFormsDispatch,{uischema:m,schema:l,path:t,renderers:u,cells:p,enabled:c})},`${t}-${d}`))})},ce=i.rankWith(1,i.uiTypeIs("HorizontalLayout")),ae=({uischema:o,schema:l,path:t,renderers:u,cells:p,enabled:c})=>{const a=o,s=a.elements;return e.jsxs(r.Card,{mb:"4",children:[a.label&&e.jsx(r.Heading,{size:"4",mb:"4",children:a.label}),e.jsx(r.Flex,{direction:"column",gap:"4",children:s.map((m,d)=>e.jsx(C.JsonFormsDispatch,{uischema:m,schema:l,path:t,renderers:u,cells:p,enabled:c},`${t}-${d}`))})]})},de=i.rankWith(1,i.uiTypeIs("Group")),ue=({uischema:o,schema:l,path:t,renderers:u,cells:p,enabled:c})=>{var g;const s=o.elements.filter(x=>x.type==="Category"),[m,d]=f.useState(((g=s[0])==null?void 0:g.label)||"");if(!s.length)return null;const b=s.find(x=>x.label===m)?m:s[0].label;return e.jsxs(r.Tabs.Root,{value:b,onValueChange:d,children:[e.jsx(r.Tabs.List,{children:s.map((x,h)=>e.jsx(r.Tabs.Trigger,{value:x.label,children:x.label},`${t}-${h}`))}),e.jsx(r.Box,{pt:"3",children:s.map((x,h)=>e.jsx(r.Tabs.Content,{value:x.label,children:e.jsx(r.Flex,{direction:"column",gap:"4",children:x.elements.map((B,w)=>e.jsx(C.JsonFormsDispatch,{uischema:B,schema:l,path:t,renderers:u,cells:p,enabled:c},`${t}-${h}-${w}`))})},`${t}-${h}`))})]})},xe=i.rankWith(1,i.uiTypeIs("Categorization")),Ue=50,he=60,A=new Map;function pe(){const o=Date.now()/1e3;for(const[l,t]of A.entries())t.expiresAt<=o+he&&A.delete(l)}function $e(o,l,t){if(pe(),A.size>=Ue){const u=A.keys().next().value;u!=null&&A.delete(u)}A.set(o,{url:l,expiresAt:t})}function E(o){return!o.startsWith("data:")}const Ie=({data:o,handleChange:l,path:t,label:u,required:p,uischema:c,enabled:a})=>{const s=G(),[m,d]=f.useState(!1),[b,g]=f.useState(null),[x,h]=f.useState(null),[B,w]=f.useState(null),[I,z]=f.useState(!1),[v,k]=f.useState(null),F=f.useRef(null),R=(c==null?void 0:c.options)||{},U=R.maxSize||5*1024*1024,S=R.accept||"image/*,application/pdf",T=a!==!1,J=f.useCallback(async(n,j)=>{pe();const D=A.get(n);if(D&&D.expiresAt>Date.now()/1e3+he){w(D.url);return}if(!(s!=null&&s.getDownloadUrl)){k("Download not configured for this application.");return}z(!0),k(null);try{const y=await s.getDownloadUrl(n);if(j!=null&&j.aborted)return;w(y),$e(n,y,Math.floor(Date.now()/1e3)+900)}catch{if(j!=null&&j.aborted)return;k("Unable to reach the server.")}finally{j!=null&&j.aborted||z(!1)}},[s]);f.useEffect(()=>{if(o&&E(o)){const n=new AbortController;return J(o,n.signal),()=>n.abort()}w(null),k(null)},[o,J]);const fe=()=>x||(o?"Uploaded File":null),[Ce,N]=f.useState(null);f.useEffect(()=>{var n;if(o&&!E(o))try{const j=o.split(","),D=((n=j[0].match(/:(.*?);/))==null?void 0:n[1])||"application/octet-stream",y=j[1],W=atob(y),O=new Array(W.length);for(let $=0;$<W.length;$++)O[$]=W.charCodeAt($);const ze=new Uint8Array(O),ke=new Blob([ze],{type:D}),M=URL.createObjectURL(ke);return N(M),()=>URL.revokeObjectURL(M)}catch(j){console.error("Failed to create blob URL:",j),N(null)}else N(null)},[o]);const q=o&&E(o)?B:Ce,H=f.useCallback(async n=>{if(n.size>U){const y=(U/1048576).toFixed(0);g(`File size exceeds ${y}MB limit.`);return}const D=S.split(",").map(y=>y.trim()).some(y=>y.endsWith("/*")?n.type.startsWith(y.slice(0,-1)):y.startsWith(".")?n.name.toLowerCase().endsWith(y.toLowerCase()):n.type===y);if(S!=="*"&&!D&&!S.includes("*/*")){g(`Invalid file type. Accepted types: ${S}`);return}if(s!=null&&s.onUpload){try{const y=await s.onUpload(n);l(t,y.key),h(y.name??n.name),g(null)}catch{g("Upload failed.")}return}g("Upload service not configured for this application.")},[S,s,U,t,l]),P=n=>{n.preventDefault(),n.stopPropagation(),!(!T||o)&&(n.type==="dragenter"||n.type==="dragover"?d(!0):n.type==="dragleave"&&d(!1))},Te=n=>{n.preventDefault(),n.stopPropagation(),d(!1),!(!T||o)&&n.dataTransfer.files&&n.dataTransfer.files[0]&&H(n.dataTransfer.files[0])},ve=n=>{n.target.files&&n.target.files[0]&&H(n.target.files[0])},Fe=()=>{T&&(l(t,null),h(null),g(null),F.current&&(F.current.value=""))},we=n=>{var j;T&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),(j=F.current)==null||j.click())};return e.jsxs(r.Box,{mb:"4",children:[e.jsxs(r.Text,{as:"label",size:"2",weight:"bold",mb:"1",className:"block",children:[u," ",p&&"*"]}),o?e.jsx(r.Card,{size:"2",variant:"surface",className:"relative group",children:e.jsxs(r.Flex,{align:"center",gap:"3",children:[e.jsx(r.Box,{className:"bg-blue-100 p-2 rounded text-blue-600",children:e.jsx(L.FileTextIcon,{width:"20",height:"20"})}),e.jsx(r.Box,{style:{flex:1,overflow:"hidden"},children:e.jsx(r.Text,{size:"2",weight:"bold",className:"block truncate",children:fe()})}),e.jsxs(r.Flex,{align:"center",gap:"3",children:[I?e.jsx(r.Text,{size:"1",color:"gray",children:"Loading..."}):v?e.jsx(r.Text,{size:"1",color:"red",children:"Error"}):e.jsx(r.Button,{variant:"soft",color:"blue",size:"1",asChild:!0,children:e.jsx("a",{href:q||"#",target:"_blank",rel:"noopener noreferrer",onClick:n=>{n.stopPropagation(),q||n.preventDefault()},children:"View"})}),e.jsxs(r.Flex,{align:"center",gap:"2",children:[e.jsx(L.CheckCircledIcon,{className:"text-green-600 w-5 h-5"}),T&&e.jsx(r.IconButton,{variant:"ghost",color:"gray",onClick:Fe,className:"hover:text-red-600 transition-colors",children:e.jsx(L.Cross2Icon,{})})]})]})]})}):e.jsxs("div",{className:`
2
2
  border-2 border-dashed rounded-lg p-6 text-center transition-all duration-200 ease-in-out
3
- ${i?"border-blue-500 bg-blue-50":"border-gray-300 hover:border-blue-400 hover:bg-gray-50"}
4
- ${a?"border-red-300 bg-red-50":""}
5
- ${b?"cursor-pointer":"opacity-60 cursor-not-allowed pointer-events-none"}
6
- `,onDragEnter:R,onDragLeave:R,onDragOver:R,onDrop:re,onClick:()=>{var n;return b&&((n=d.current)==null?void 0:n.click())},onKeyDown:ne,role:"button",tabIndex:b?0:-1,children:[e.jsx("input",{ref:d,type:"file",className:"hidden",accept:y,onChange:te,disabled:!b}),e.jsx(r.Flex,{direction:"column",align:"center",gap:"2",children:a?e.jsxs(e.Fragment,{children:[e.jsx(v.ExclamationTriangleIcon,{className:"w-8 h-8 text-red-500"}),e.jsx(r.Text,{size:"2",color:"red",weight:"medium",children:a}),e.jsx(r.Text,{size:"1",color:"gray",children:"Click to try again"})]}):e.jsxs(e.Fragment,{children:[e.jsx(v.UploadIcon,{className:"w-8 h-8 text-gray-400"}),e.jsx(r.Text,{size:"2",weight:"medium",children:"Click to upload or drag and drop"}),e.jsxs(r.Text,{size:"1",color:"gray",children:["Max ",Math.round(f/(1024*1024)),"MB"]})]})})]})]})},_=T.withJsonFormsControlProps(ue),Q=s.rankWith(3,s.formatIs("data-url")),xe=({data:l,path:u,schema:t,uischema:p,enabled:h,visible:o,addItem:c,removeItems:i,rootSchema:x})=>{const a=t.items;if(o===!1||!a||typeof a!="object"||Array.isArray(a))return null;const g=a,j=Array.isArray(l)?l:[],m=t.title||"Array Items",d=()=>{const f=s.createDefaultValue(g,x);c&&c(u,f)},F=f=>{if(i){const y=i(u,[f]);y&&y()}};return e.jsx(r.Box,{mb:"6",children:e.jsxs(r.Flex,{direction:"column",gap:"4",children:[e.jsx(r.Text,{as:"div",size:"4",weight:"bold",children:m}),j.length===0&&e.jsx(r.Box,{py:"4",px:"4",style:{backgroundColor:"var(--gray-3)",borderRadius:"var(--radius-3)"},children:e.jsx(r.Text,{size:"2",color:"gray",children:"No items have been added yet."})}),j.map((f,y)=>{var k;const b=`${u}.${y}`;return e.jsx(r.Card,{size:"3",variant:"surface",children:e.jsxs(r.Flex,{direction:"column",gap:"4",children:[e.jsxs(r.Flex,{justify:"between",align:"center",children:[e.jsxs(r.Text,{size:"3",weight:"bold",children:["Item ",y+1]}),h&&e.jsxs(r.Button,{color:"red",variant:"soft",onClick:()=>F(y),title:"Remove item",children:[e.jsx(v.TrashIcon,{}),"Remove"]})]}),e.jsx(r.Box,{children:e.jsx(T.JsonFormsDispatch,{schema:g,uischema:((k=p.options)==null?void 0:k.detail)||{type:"VerticalLayout",elements:Object.keys(g.properties||{}).map(w=>({type:"Control",scope:`#/properties/${w}`}))},path:b,enabled:h,renderers:void 0,cells:void 0})})]})},b)}),h&&e.jsx(r.Box,{mt:"2",children:e.jsxs(r.Button,{variant:"surface",onClick:d,children:[e.jsx(v.PlusIcon,{}),"Add Item"]})})]})})},X=T.withJsonFormsArrayControlProps(xe),Y=s.rankWith(2,s.and(s.uiTypeIs("Control"),s.schemaTypeIs("array"))),Z=({uischema:l,visible:u})=>{const t=l;return u===!1?null:e.jsx(r.Box,{mb:"4",children:e.jsx(r.Heading,{size:"4",children:t.text})})},ee=s.rankWith(1,s.uiTypeIs("Label")),he=[{tester:D,renderer:le},{tester:N,renderer:ie},{tester:A,renderer:ae},{tester:P,renderer:ce},{tester:J,renderer:de},{tester:E,renderer:q},{tester:O,renderer:H},{tester:G,renderer:M},{tester:K,renderer:U},{tester:Q,renderer:_},{tester:Y,renderer:X},{tester:ee,renderer:Z}];exports.ArrayControl=X;exports.ArrayControlTester=Y;exports.BooleanControl=S;exports.BooleanControlTester=A;exports.CategorizationLayoutRenderer=U;exports.CategorizationLayoutTester=K;exports.DateControl=V;exports.DateControlTester=J;exports.FileControl=_;exports.FileControlTester=Q;exports.GroupLayoutRenderer=M;exports.GroupLayoutTester=G;exports.HorizontalLayoutRenderer=H;exports.HorizontalLayoutTester=O;exports.LabelRenderer=Z;exports.LabelTester=ee;exports.NumberControl=I;exports.NumberControlTester=N;exports.SelectControl=W;exports.SelectControlTester=P;exports.TextControl=B;exports.TextControlTester=D;exports.VerticalLayoutRenderer=q;exports.VerticalLayoutTester=E;exports.radixRenderers=he;
3
+ ${m?"border-blue-500 bg-blue-50":"border-gray-300 hover:border-blue-400 hover:bg-gray-50"}
4
+ ${b?"border-red-300 bg-red-50":""}
5
+ ${T?"cursor-pointer":"opacity-60 cursor-not-allowed pointer-events-none"}
6
+ `,onDragEnter:P,onDragLeave:P,onDragOver:P,onDrop:Te,onClick:()=>{var n;return T&&((n=F.current)==null?void 0:n.click())},onKeyDown:we,role:"button",tabIndex:T?0:-1,children:[e.jsx("input",{ref:F,type:"file",style:{display:"none"},accept:S,onChange:ve,disabled:!T}),e.jsx(r.Flex,{direction:"column",align:"center",gap:"2",children:b?e.jsxs(e.Fragment,{children:[e.jsx(L.ExclamationTriangleIcon,{className:"w-8 h-8 text-red-500"}),e.jsx(r.Text,{size:"2",color:"red",weight:"medium",children:b}),e.jsx(r.Text,{size:"1",color:"gray",children:"Click to try again"})]}):e.jsxs(e.Fragment,{children:[e.jsx(L.UploadIcon,{className:"w-8 h-8 text-gray-400"}),e.jsx(r.Text,{size:"2",weight:"medium",children:"Click to upload or drag and drop"}),e.jsxs(r.Text,{size:"1",color:"gray",children:["Max ",Math.round(U/(1024*1024)),"MB"]})]})})]})]})},me=C.withJsonFormsControlProps(Ie),be=i.rankWith(3,i.or(i.formatIs("data-url"),i.formatIs("file"))),Ne=({data:o,path:l,schema:t,uischema:u,enabled:p,visible:c,addItem:a,removeItems:s,rootSchema:m,arraySchema:d})=>{const b=d?t:t.items,g=d||t;if(c===!1||!b||typeof b!="object"||Array.isArray(b))return null;const x=b,h=Array.isArray(o)?o:[],B=g.title||"Array Items",w=()=>{const z=i.createDefaultValue(x,m);a&&a(l,z)()},I=z=>{if(s){const v=s(l,[z]);v&&v()}};return e.jsx(r.Box,{mb:"6",children:e.jsxs(r.Flex,{direction:"column",gap:"4",children:[e.jsx(r.Text,{as:"div",size:"4",weight:"bold",children:B}),h.length===0&&e.jsx(r.Box,{py:"4",px:"4",style:{backgroundColor:"var(--gray-3)",borderRadius:"var(--radius-3)"},children:e.jsx(r.Text,{size:"2",color:"gray",children:"No items have been added yet."})}),h.map((z,v)=>{var F;const k=`${l}.${v}`;return e.jsx(r.Card,{size:"3",variant:"surface",children:e.jsxs(r.Flex,{direction:"column",gap:"4",children:[e.jsxs(r.Flex,{justify:"between",align:"center",children:[e.jsxs(r.Text,{size:"3",weight:"bold",children:["Item ",v+1]}),p&&e.jsxs(r.Button,{type:"button",color:"red",variant:"soft",onClick:()=>I(v),title:"Remove item",children:[e.jsx(L.TrashIcon,{}),"Remove"]})]}),e.jsx(r.Box,{children:e.jsx(C.JsonFormsDispatch,{schema:x,uischema:((F=u.options)==null?void 0:F.detail)||(x.type==="object"||x.properties?{type:"VerticalLayout",elements:Object.keys(x.properties||{}).map(R=>({type:"Control",scope:`#/properties/${R}`}))}:{type:"Control",scope:"#"}),path:k,enabled:p,renderers:void 0,cells:void 0})})]})},k)}),p&&e.jsx(r.Box,{mt:"2",children:e.jsxs(r.Button,{type:"button",variant:"surface",onClick:w,children:[e.jsx(L.PlusIcon,{}),"Add Item"]})})]})})},V=C.withJsonFormsArrayControlProps(Ne),ge=i.rankWith(3,i.isObjectArrayControl),je=({uischema:o,visible:l})=>{const t=o;return l===!1?null:e.jsx(r.Box,{mb:"4",children:e.jsx(r.Heading,{size:"4",children:t.text})})},ye=i.rankWith(1,i.uiTypeIs("Label")),Pe=i.rankWith(3,i.isPrimitiveArrayControl),We=[{tester:X,renderer:Le},{tester:Q,renderer:Ae},{tester:ee,renderer:Se},{tester:te,renderer:Be},{tester:ne,renderer:Re},{tester:le,renderer:se},{tester:ce,renderer:ie},{tester:de,renderer:ae},{tester:xe,renderer:ue},{tester:be,renderer:me},{tester:ge,renderer:V},{tester:Pe,renderer:V},{tester:ye,renderer:je}];exports.ArrayControl=V;exports.ArrayControlTester=ge;exports.BooleanControl=Y;exports.BooleanControlTester=ee;exports.CategorizationLayoutRenderer=ue;exports.CategorizationLayoutTester=xe;exports.DateControl=oe;exports.DateControlTester=ne;exports.FileControl=me;exports.FileControlTester=be;exports.GroupLayoutRenderer=ae;exports.GroupLayoutTester=de;exports.HorizontalLayoutRenderer=ie;exports.HorizontalLayoutTester=ce;exports.LabelRenderer=je;exports.LabelTester=ye;exports.NumberControl=Z;exports.NumberControlTester=Q;exports.SelectControl=re;exports.SelectControlTester=te;exports.TextControl=K;exports.TextControlTester=X;exports.UploadProvider=De;exports.VerticalLayoutRenderer=se;exports.VerticalLayoutTester=le;exports.radixRenderers=We;exports.useUpload=G;
@@ -1,330 +1,409 @@
1
- import { jsx as e, jsxs as c, Fragment as O } from "react/jsx-runtime";
2
- import { rankWith as T, isStringControl as K, or as j, isNumberControl as U, isIntegerControl as _, isBooleanControl as Q, isEnumControl as X, isOneOfControl as Y, isDateControl as Z, uiTypeIs as F, formatIs as ee, createDefaultValue as re, and as te, schemaTypeIs as oe } from "@jsonforms/core";
3
- import { withJsonFormsControlProps as N, JsonFormsDispatch as k, withJsonFormsArrayControlProps as ne } from "@jsonforms/react";
4
- import { Box as f, Flex as C, Text as s, TextField as P, Checkbox as le, Select as L, Tabs as A, Card as E, Heading as M, IconButton as ie, Button as W } from "@radix-ui/themes";
5
- import { useState as S, useRef as ce } from "react";
6
- import { FileTextIcon as se, CheckCircledIcon as ae, Cross2Icon as de, ExclamationTriangleIcon as ue, UploadIcon as he, TrashIcon as me, PlusIcon as pe } from "@radix-ui/react-icons";
7
- const ge = ({ data: n, handleChange: u, path: r, label: g, required: m, errors: t, uischema: a, schema: l, enabled: h }) => {
8
- var b;
9
- const i = t.length === 0;
10
- return /* @__PURE__ */ e(f, { mb: "4", children: /* @__PURE__ */ c(C, { direction: "column", gap: "1", children: [
11
- /* @__PURE__ */ c(s, { as: "label", size: "2", weight: "bold", htmlFor: r, children: [
12
- g,
1
+ import { jsx as e, jsxs as s, Fragment as te } from "react/jsx-runtime";
2
+ import { createContext as ye, useContext as Ce, useState as A, useRef as ve, useCallback as oe, useEffect as ne } from "react";
3
+ import { rankWith as z, isStringControl as we, or as J, isNumberControl as ze, isIntegerControl as Te, isBooleanControl as De, isEnumControl as xe, isOneOfControl as Ae, isDateControl as ke, uiTypeIs as S, formatIs as le, createDefaultValue as Fe, isObjectArrayControl as Le, isPrimitiveArrayControl as $e } from "@jsonforms/core";
4
+ import { withJsonFormsControlProps as N, JsonFormsDispatch as E, withJsonFormsArrayControlProps as Ue } from "@jsonforms/react";
5
+ import { Box as w, Flex as v, Text as c, TextField as K, Checkbox as Re, Select as j, Tabs as O, Card as X, Heading as ce, Button as G, IconButton as Ne } from "@radix-ui/themes";
6
+ import { FileTextIcon as Ie, CheckCircledIcon as Se, Cross2Icon as Ee, ExclamationTriangleIcon as Be, UploadIcon as Ve, TrashIcon as Pe, PlusIcon as je } from "@radix-ui/react-icons";
7
+ const se = ye(null);
8
+ function Fr({
9
+ children: t,
10
+ onUpload: l,
11
+ getDownloadUrl: r
12
+ }) {
13
+ const u = { onUpload: l, getDownloadUrl: r };
14
+ return /* @__PURE__ */ e(se.Provider, { value: u, children: t });
15
+ }
16
+ function Oe() {
17
+ return Ce(se);
18
+ }
19
+ const Me = ({ data: t, handleChange: l, path: r, label: u, required: m, errors: i, uischema: a, schema: n, enabled: b }) => {
20
+ var g;
21
+ const d = i.length === 0;
22
+ return /* @__PURE__ */ e(w, { mb: "4", children: /* @__PURE__ */ s(v, { direction: "column", gap: "1", children: [
23
+ /* @__PURE__ */ s(c, { as: "label", size: "2", weight: "bold", htmlFor: r, children: [
24
+ u,
13
25
  " ",
14
- m && /* @__PURE__ */ e(s, { color: "red", children: "*" })
26
+ m && /* @__PURE__ */ e(c, { color: "red", children: "*" })
15
27
  ] }),
16
28
  /* @__PURE__ */ e(
17
- P.Root,
29
+ K.Root,
18
30
  {
19
- value: n || "",
20
- onChange: (y) => u(r, y.target.value),
21
- disabled: !h,
22
- placeholder: (b = a.options) == null ? void 0 : b.placeholder,
23
- color: i ? void 0 : "red",
31
+ value: t || "",
32
+ onChange: (f) => l(r, f.target.value),
33
+ disabled: !b,
34
+ placeholder: (g = a.options) == null ? void 0 : g.placeholder,
35
+ color: d ? void 0 : "red",
24
36
  id: r
25
37
  }
26
38
  ),
27
- !i && t !== "is a required property" && /* @__PURE__ */ e(s, { color: "red", size: "1", children: t }),
28
- l.description && /* @__PURE__ */ e(s, { size: "1", color: "gray", children: l.description })
39
+ !d && i !== "is a required property" && /* @__PURE__ */ e(c, { color: "red", size: "1", children: i }),
40
+ n.description && /* @__PURE__ */ e(c, { size: "1", color: "gray", children: n.description })
29
41
  ] }) });
30
- }, be = T(
42
+ }, He = z(
31
43
  1,
32
- K
33
- ), ye = N(ge), fe = ({ data: n, handleChange: u, path: r, label: g, required: m, errors: t, uischema: a, schema: l, enabled: h }) => {
34
- var y;
35
- const i = t.length === 0, b = (p) => {
36
- if (p === "") {
37
- u(r, void 0);
44
+ we
45
+ ), We = N(Me), _e = ({ data: t, handleChange: l, path: r, label: u, required: m, errors: i, uischema: a, schema: n, enabled: b }) => {
46
+ var f;
47
+ const d = i.length === 0, g = (h) => {
48
+ if (h === "") {
49
+ l(r, void 0);
38
50
  return;
39
51
  }
40
- const d = Number(p);
41
- isNaN(d) || u(r, d);
52
+ const p = Number(h);
53
+ isNaN(p) || l(r, p);
42
54
  };
43
- return /* @__PURE__ */ e(f, { mb: "4", children: /* @__PURE__ */ c(C, { direction: "column", gap: "1", children: [
44
- /* @__PURE__ */ c(s, { as: "label", size: "2", weight: "bold", htmlFor: r, children: [
45
- g,
55
+ return /* @__PURE__ */ e(w, { mb: "4", children: /* @__PURE__ */ s(v, { direction: "column", gap: "1", children: [
56
+ /* @__PURE__ */ s(c, { as: "label", size: "2", weight: "bold", htmlFor: r, children: [
57
+ u,
46
58
  " ",
47
- m && /* @__PURE__ */ e(s, { color: "red", children: "*" })
59
+ m && /* @__PURE__ */ e(c, { color: "red", children: "*" })
48
60
  ] }),
49
61
  /* @__PURE__ */ e(
50
- P.Root,
62
+ K.Root,
51
63
  {
52
64
  type: "number",
53
- value: n ?? "",
54
- onChange: (p) => b(p.target.value),
55
- disabled: !h,
56
- placeholder: (y = a.options) == null ? void 0 : y.placeholder,
57
- color: i ? void 0 : "red",
65
+ value: t ?? "",
66
+ onChange: (h) => g(h.target.value),
67
+ disabled: !b,
68
+ placeholder: (f = a.options) == null ? void 0 : f.placeholder,
69
+ color: d ? void 0 : "red",
58
70
  id: r
59
71
  }
60
72
  ),
61
- !i && t !== "is a required property" && /* @__PURE__ */ e(s, { color: "red", size: "1", children: t }),
62
- l.description && /* @__PURE__ */ e(s, { size: "1", color: "gray", children: l.description })
73
+ !d && i !== "is a required property" && /* @__PURE__ */ e(c, { color: "red", size: "1", children: i }),
74
+ n.description && /* @__PURE__ */ e(c, { size: "1", color: "gray", children: n.description })
63
75
  ] }) });
64
- }, Ce = T(
76
+ }, qe = z(
65
77
  2,
66
- j(U, _)
67
- ), ve = N(fe), ze = ({ data: n, handleChange: u, path: r, label: g, required: m, errors: t, schema: a, enabled: l }) => {
68
- const h = t.length === 0;
69
- return /* @__PURE__ */ c(f, { mb: "4", children: [
70
- /* @__PURE__ */ c(C, { gap: "2", align: "center", children: [
78
+ J(ze, Te)
79
+ ), Ge = N(_e), Je = ({ data: t, handleChange: l, path: r, label: u, required: m, errors: i, schema: a, enabled: n }) => {
80
+ const b = i.length === 0;
81
+ return /* @__PURE__ */ s(w, { mb: "4", children: [
82
+ /* @__PURE__ */ s(v, { gap: "2", align: "center", children: [
71
83
  /* @__PURE__ */ e(
72
- le,
84
+ Re,
73
85
  {
74
- checked: !!n,
75
- onCheckedChange: (i) => u(r, i === !0),
76
- disabled: !l,
86
+ checked: !!t,
87
+ onCheckedChange: (d) => l(r, d === !0),
88
+ disabled: !n,
77
89
  id: r
78
90
  }
79
91
  ),
80
- /* @__PURE__ */ c(s, { as: "label", size: "2", htmlFor: r, children: [
81
- g,
92
+ /* @__PURE__ */ s(c, { as: "label", size: "2", htmlFor: r, children: [
93
+ u,
82
94
  " ",
83
95
  m && "*"
84
96
  ] })
85
97
  ] }),
86
- !h && /* @__PURE__ */ e(s, { color: "red", size: "1", className: "block mt-1", children: t }),
87
- a.description && /* @__PURE__ */ e(s, { size: "1", color: "gray", className: "block mt-1", children: a.description })
98
+ !b && /* @__PURE__ */ e(c, { color: "red", size: "1", className: "block mt-1", children: i }),
99
+ a.description && /* @__PURE__ */ e(c, { size: "1", color: "gray", className: "block mt-1", children: a.description })
88
100
  ] });
89
- }, Te = T(
101
+ }, Ke = z(
90
102
  2,
91
- Q
92
- ), xe = N(ze), we = ({ data: n, handleChange: u, path: r, label: g, required: m, errors: t, schema: a, uischema: l, enabled: h }) => {
93
- var p;
94
- const i = t.length === 0;
95
- let b = [];
96
- a.enum ? b = a.enum.map((d) => ({ value: String(d), label: String(d) })) : a.oneOf && (b = a.oneOf.map((d) => ({
97
- value: String(d.const),
98
- label: d.title || String(d.const)
103
+ De
104
+ ), Xe = N(Je), Ze = ({ data: t, handleChange: l, path: r, label: u, required: m, errors: i, schema: a, uischema: n, enabled: b }) => {
105
+ var h;
106
+ const d = i.length === 0;
107
+ let g = [];
108
+ a.enum ? g = a.enum.map((p) => ({ value: String(p), label: String(p) })) : a.oneOf && (g = a.oneOf.map((p) => ({
109
+ value: String(p.const),
110
+ label: p.title || String(p.const)
99
111
  })));
100
- const y = n !== void 0 ? String(n) : "";
101
- return /* @__PURE__ */ e(f, { mb: "4", children: /* @__PURE__ */ c(C, { direction: "column", gap: "1", children: [
102
- /* @__PURE__ */ c(s, { as: "label", size: "2", weight: "bold", htmlFor: r, children: [
103
- g,
112
+ const f = t !== void 0 ? String(t) : "";
113
+ return /* @__PURE__ */ e(w, { mb: "4", children: /* @__PURE__ */ s(v, { direction: "column", gap: "1", children: [
114
+ /* @__PURE__ */ s(c, { as: "label", size: "2", weight: "bold", htmlFor: r, children: [
115
+ u,
104
116
  " ",
105
- m && /* @__PURE__ */ e(s, { color: "red", children: "*" })
117
+ m && /* @__PURE__ */ e(c, { color: "red", children: "*" })
106
118
  ] }),
107
- /* @__PURE__ */ c(
108
- L.Root,
119
+ /* @__PURE__ */ s(
120
+ j.Root,
109
121
  {
110
- value: y,
111
- onValueChange: (d) => u(r, d),
112
- disabled: !h,
122
+ value: f,
123
+ onValueChange: (p) => l(r, p),
124
+ disabled: !b,
113
125
  children: [
114
126
  /* @__PURE__ */ e(
115
- L.Trigger,
127
+ j.Trigger,
116
128
  {
117
- placeholder: ((p = l.options) == null ? void 0 : p.placeholder) || "Select an option",
118
- color: i ? void 0 : "red",
129
+ placeholder: ((h = n.options) == null ? void 0 : h.placeholder) || "Select an option",
130
+ color: d ? void 0 : "red",
119
131
  id: r
120
132
  }
121
133
  ),
122
- /* @__PURE__ */ e(L.Content, { children: b.map((d) => /* @__PURE__ */ e(L.Item, { value: d.value, children: d.label }, d.value)) })
134
+ /* @__PURE__ */ e(j.Content, { children: g.map((p) => /* @__PURE__ */ e(j.Item, { value: p.value, children: p.label }, p.value)) })
123
135
  ]
124
136
  }
125
137
  ),
126
- !i && t !== "is a required property" && /* @__PURE__ */ e(s, { color: "red", size: "1", children: t }),
127
- a.description && /* @__PURE__ */ e(s, { size: "1", color: "gray", children: a.description })
138
+ !d && i !== "is a required property" && /* @__PURE__ */ e(c, { color: "red", size: "1", children: i }),
139
+ a.description && /* @__PURE__ */ e(c, { size: "1", color: "gray", children: a.description })
128
140
  ] }) });
129
- }, $e = T(
141
+ }, Qe = z(
130
142
  2,
131
- j(X, Y)
132
- ), Fe = N(we), Ne = ({ data: n, handleChange: u, path: r, label: g, required: m, errors: t, schema: a, enabled: l }) => {
133
- const h = t.length === 0;
134
- return /* @__PURE__ */ e(f, { mb: "4", children: /* @__PURE__ */ c(C, { direction: "column", gap: "1", children: [
135
- /* @__PURE__ */ c(s, { as: "label", size: "2", weight: "bold", htmlFor: r, children: [
136
- g,
143
+ J(xe, Ae)
144
+ ), Ye = N(Ze), er = ({ data: t, handleChange: l, path: r, label: u, required: m, errors: i, schema: a, enabled: n }) => {
145
+ const b = i.length === 0;
146
+ return /* @__PURE__ */ e(w, { mb: "4", children: /* @__PURE__ */ s(v, { direction: "column", gap: "1", children: [
147
+ /* @__PURE__ */ s(c, { as: "label", size: "2", weight: "bold", htmlFor: r, children: [
148
+ u,
137
149
  " ",
138
- m && /* @__PURE__ */ e(s, { color: "red", children: "*" })
150
+ m && /* @__PURE__ */ e(c, { color: "red", children: "*" })
139
151
  ] }),
140
152
  /* @__PURE__ */ e(
141
- P.Root,
153
+ K.Root,
142
154
  {
143
155
  type: "date",
144
- value: n || "",
145
- onChange: (i) => u(r, i.target.value),
146
- disabled: !l,
147
- color: h ? void 0 : "red",
156
+ value: t || "",
157
+ onChange: (d) => l(r, d.target.value),
158
+ disabled: !n,
159
+ color: b ? void 0 : "red",
148
160
  id: r
149
161
  }
150
162
  ),
151
- !h && t !== "is a required property" && /* @__PURE__ */ e(s, { color: "red", size: "1", children: t }),
152
- a.description && /* @__PURE__ */ e(s, { size: "1", color: "gray", children: a.description })
163
+ !b && i !== "is a required property" && /* @__PURE__ */ e(c, { color: "red", size: "1", children: i }),
164
+ a.description && /* @__PURE__ */ e(c, { size: "1", color: "gray", children: a.description })
153
165
  ] }) });
154
- }, ke = T(
166
+ }, rr = z(
155
167
  2,
156
- Z
157
- ), De = N(Ne), Ie = ({ uischema: n, schema: u, path: r, renderers: g, cells: m, enabled: t }) => {
158
- const l = n.elements;
159
- return /* @__PURE__ */ e(C, { direction: "column", gap: "4", children: l.map((h, i) => /* @__PURE__ */ e(
160
- k,
168
+ ke
169
+ ), tr = N(er), or = ({ uischema: t, schema: l, path: r, renderers: u, cells: m, enabled: i }) => {
170
+ const n = t.elements;
171
+ return /* @__PURE__ */ e(v, { direction: "column", gap: "4", children: n.map((b, d) => /* @__PURE__ */ e(
172
+ E,
161
173
  {
162
- uischema: h,
163
- schema: u,
174
+ uischema: b,
175
+ schema: l,
164
176
  path: r,
165
- renderers: g,
177
+ renderers: u,
166
178
  cells: m,
167
- enabled: t
179
+ enabled: i
168
180
  },
169
- `${r}-${i}`
181
+ `${r}-${d}`
170
182
  )) });
171
- }, Re = T(1, F("VerticalLayout")), Le = ({ uischema: n, schema: u, path: r, renderers: g, cells: m, enabled: t }) => {
172
- const l = n.elements;
173
- return /* @__PURE__ */ e(C, { direction: "row", gap: "4", children: l.map((h, i) => /* @__PURE__ */ e(f, { style: { flex: 1 }, children: /* @__PURE__ */ e(
174
- k,
183
+ }, nr = z(1, S("VerticalLayout")), lr = ({ uischema: t, schema: l, path: r, renderers: u, cells: m, enabled: i }) => {
184
+ const n = t.elements;
185
+ return /* @__PURE__ */ e(v, { direction: "row", gap: "4", children: n.map((b, d) => /* @__PURE__ */ e(w, { style: { flex: 1 }, children: /* @__PURE__ */ e(
186
+ E,
175
187
  {
176
- uischema: h,
177
- schema: u,
188
+ uischema: b,
189
+ schema: l,
178
190
  path: r,
179
- renderers: g,
191
+ renderers: u,
180
192
  cells: m,
181
- enabled: t
193
+ enabled: i
182
194
  }
183
- ) }, `${r}-${i}`)) });
184
- }, Ae = T(1, F("HorizontalLayout")), Se = ({ uischema: n, schema: u, path: r, renderers: g, cells: m, enabled: t }) => {
185
- const a = n, l = a.elements;
186
- return /* @__PURE__ */ c(E, { mb: "4", children: [
187
- a.label && /* @__PURE__ */ e(M, { size: "4", mb: "4", children: a.label }),
188
- /* @__PURE__ */ e(C, { direction: "column", gap: "4", children: l.map((h, i) => /* @__PURE__ */ e(
189
- k,
195
+ ) }, `${r}-${d}`)) });
196
+ }, ir = z(1, S("HorizontalLayout")), cr = ({ uischema: t, schema: l, path: r, renderers: u, cells: m, enabled: i }) => {
197
+ const a = t, n = a.elements;
198
+ return /* @__PURE__ */ s(X, { mb: "4", children: [
199
+ a.label && /* @__PURE__ */ e(ce, { size: "4", mb: "4", children: a.label }),
200
+ /* @__PURE__ */ e(v, { direction: "column", gap: "4", children: n.map((b, d) => /* @__PURE__ */ e(
201
+ E,
190
202
  {
191
- uischema: h,
192
- schema: u,
203
+ uischema: b,
204
+ schema: l,
193
205
  path: r,
194
- renderers: g,
206
+ renderers: u,
195
207
  cells: m,
196
- enabled: t
208
+ enabled: i
197
209
  },
198
- `${r}-${i}`
210
+ `${r}-${d}`
199
211
  )) })
200
212
  ] });
201
- }, Ve = T(1, F("Group")), Be = ({ uischema: n, schema: u, path: r, renderers: g, cells: m, enabled: t }) => {
202
- var y;
203
- const l = n.elements.filter((p) => p.type === "Category"), [h, i] = S(((y = l[0]) == null ? void 0 : y.label) || "");
204
- if (!l.length) return null;
205
- const b = l.find((p) => p.label === h) ? h : l[0].label;
206
- return /* @__PURE__ */ c(A.Root, { value: b, onValueChange: i, children: [
207
- /* @__PURE__ */ e(A.List, { children: l.map((p, d) => /* @__PURE__ */ e(A.Trigger, { value: p.label, children: p.label }, `${r}-${d}`)) }),
208
- /* @__PURE__ */ e(f, { pt: "3", children: l.map((p, d) => /* @__PURE__ */ e(A.Content, { value: p.label, children: /* @__PURE__ */ e(C, { direction: "column", gap: "4", children: p.elements.map(($, w) => /* @__PURE__ */ e(
209
- k,
213
+ }, sr = z(1, S("Group")), ar = ({ uischema: t, schema: l, path: r, renderers: u, cells: m, enabled: i }) => {
214
+ var f;
215
+ const n = t.elements.filter((h) => h.type === "Category"), [b, d] = A(((f = n[0]) == null ? void 0 : f.label) || "");
216
+ if (!n.length) return null;
217
+ const g = n.find((h) => h.label === b) ? b : n[0].label;
218
+ return /* @__PURE__ */ s(O.Root, { value: g, onValueChange: d, children: [
219
+ /* @__PURE__ */ e(O.List, { children: n.map((h, p) => /* @__PURE__ */ e(O.Trigger, { value: h.label, children: h.label }, `${r}-${p}`)) }),
220
+ /* @__PURE__ */ e(w, { pt: "3", children: n.map((h, p) => /* @__PURE__ */ e(O.Content, { value: h.label, children: /* @__PURE__ */ e(v, { direction: "column", gap: "4", children: h.elements.map((I, k) => /* @__PURE__ */ e(
221
+ E,
210
222
  {
211
- uischema: $,
212
- schema: u,
223
+ uischema: I,
224
+ schema: l,
213
225
  path: r,
214
- renderers: g,
226
+ renderers: u,
215
227
  cells: m,
216
- enabled: t
228
+ enabled: i
217
229
  },
218
- `${r}-${d}-${w}`
219
- )) }) }, `${r}-${d}`)) })
230
+ `${r}-${p}-${k}`
231
+ )) }) }, `${r}-${p}`)) })
220
232
  ] });
221
- }, Pe = T(1, F("Categorization")), Ee = ({ data: n, handleChange: u, path: r, label: g, required: m, uischema: t, enabled: a }) => {
222
- const [l, h] = S(!1), [i, b] = S(null), [y, p] = S(null), d = ce(null), $ = (t == null ? void 0 : t.options) || {}, w = $.maxSize || 5 * 1024 * 1024, z = $.accept || "image/*,application/pdf", v = a !== !1, D = () => y || (n ? "Uploaded File" : null), I = (o) => {
223
- if (o.size > w) {
224
- const x = (w / 1048576).toFixed(0);
225
- b(`File size exceeds ${x}MB limit.`);
233
+ }, dr = z(1, S("Categorization")), ur = 50, ae = 60, U = /* @__PURE__ */ new Map();
234
+ function de() {
235
+ const t = Date.now() / 1e3;
236
+ for (const [l, r] of U.entries())
237
+ r.expiresAt <= t + ae && U.delete(l);
238
+ }
239
+ function hr(t, l, r) {
240
+ if (de(), U.size >= ur) {
241
+ const u = U.keys().next().value;
242
+ u != null && U.delete(u);
243
+ }
244
+ U.set(t, { url: l, expiresAt: r });
245
+ }
246
+ function q(t) {
247
+ return !t.startsWith("data:");
248
+ }
249
+ const pr = ({ data: t, handleChange: l, path: r, label: u, required: m, uischema: i, enabled: a }) => {
250
+ const n = Oe(), [b, d] = A(!1), [g, f] = A(null), [h, p] = A(null), [I, k] = A(null), [M, F] = A(!1), [D, L] = A(null), x = ve(null), B = (i == null ? void 0 : i.options) || {}, V = B.maxSize || 5 * 1024 * 1024, R = B.accept || "image/*,application/pdf", T = a !== !1, Z = oe(async (o, y) => {
251
+ de();
252
+ const $ = U.get(o);
253
+ if ($ && $.expiresAt > Date.now() / 1e3 + ae) {
254
+ k($.url);
226
255
  return;
227
256
  }
228
- const J = z.split(",").map((x) => x.trim()).some((x) => x.endsWith("/*") ? o.type.startsWith(x.slice(0, -1)) : x.startsWith(".") ? o.name.toLowerCase().endsWith(x.toLowerCase()) : o.type === x);
229
- if (z !== "*" && !J && !z.includes("*/*")) {
230
- b(`Invalid file type. Accepted types: ${z}`);
257
+ if (!(n != null && n.getDownloadUrl)) {
258
+ L("Download not configured for this application.");
231
259
  return;
232
260
  }
233
- const R = new FileReader();
234
- R.onload = () => {
235
- const x = R.result;
236
- u(r, x), p(o.name), b(null);
237
- }, R.onerror = () => {
238
- b("Failed to read file");
239
- }, R.readAsDataURL(o);
240
- }, V = (o) => {
241
- o.preventDefault(), o.stopPropagation(), !(!v || n) && (o.type === "dragenter" || o.type === "dragover" ? h(!0) : o.type === "dragleave" && h(!1));
242
- }, q = (o) => {
243
- o.preventDefault(), o.stopPropagation(), h(!1), !(!v || n) && o.dataTransfer.files && o.dataTransfer.files[0] && I(o.dataTransfer.files[0]);
244
- }, H = (o) => {
245
- o.target.files && o.target.files[0] && I(o.target.files[0]);
246
- }, G = () => {
247
- v && (u(r, null), p(null), b(null), d.current && (d.current.value = ""));
261
+ F(!0), L(null);
262
+ try {
263
+ const C = await n.getDownloadUrl(o);
264
+ if (y != null && y.aborted) return;
265
+ k(C), hr(o, C, Math.floor(Date.now() / 1e3) + 900);
266
+ } catch {
267
+ if (y != null && y.aborted) return;
268
+ L("Unable to reach the server.");
269
+ } finally {
270
+ y != null && y.aborted || F(!1);
271
+ }
272
+ }, [n]);
273
+ ne(() => {
274
+ if (t && q(t)) {
275
+ const o = new AbortController();
276
+ return Z(t, o.signal), () => o.abort();
277
+ }
278
+ k(null), L(null);
279
+ }, [t, Z]);
280
+ const ue = () => h || (t ? "Uploaded File" : null), [he, H] = A(null);
281
+ ne(() => {
282
+ var o;
283
+ if (t && !q(t))
284
+ try {
285
+ const y = t.split(","), $ = ((o = y[0].match(/:(.*?);/)) == null ? void 0 : o[1]) || "application/octet-stream", C = y[1], _ = atob(C), ee = new Array(_.length);
286
+ for (let P = 0; P < _.length; P++)
287
+ ee[P] = _.charCodeAt(P);
288
+ const ge = new Uint8Array(ee), fe = new Blob([ge], { type: $ }), re = URL.createObjectURL(fe);
289
+ return H(re), () => URL.revokeObjectURL(re);
290
+ } catch (y) {
291
+ console.error("Failed to create blob URL:", y), H(null);
292
+ }
293
+ else
294
+ H(null);
295
+ }, [t]);
296
+ const Q = t && q(t) ? I : he, Y = oe(async (o) => {
297
+ if (o.size > V) {
298
+ const C = (V / 1048576).toFixed(0);
299
+ f(`File size exceeds ${C}MB limit.`);
300
+ return;
301
+ }
302
+ const $ = R.split(",").map((C) => C.trim()).some((C) => C.endsWith("/*") ? o.type.startsWith(C.slice(0, -1)) : C.startsWith(".") ? o.name.toLowerCase().endsWith(C.toLowerCase()) : o.type === C);
303
+ if (R !== "*" && !$ && !R.includes("*/*")) {
304
+ f(`Invalid file type. Accepted types: ${R}`);
305
+ return;
306
+ }
307
+ if (n != null && n.onUpload) {
308
+ try {
309
+ const C = await n.onUpload(o);
310
+ l(r, C.key), p(C.name ?? o.name), f(null);
311
+ } catch {
312
+ f("Upload failed.");
313
+ }
314
+ return;
315
+ }
316
+ f("Upload service not configured for this application.");
317
+ }, [R, n, V, r, l]), W = (o) => {
318
+ o.preventDefault(), o.stopPropagation(), !(!T || t) && (o.type === "dragenter" || o.type === "dragover" ? d(!0) : o.type === "dragleave" && d(!1));
319
+ }, pe = (o) => {
320
+ o.preventDefault(), o.stopPropagation(), d(!1), !(!T || t) && o.dataTransfer.files && o.dataTransfer.files[0] && Y(o.dataTransfer.files[0]);
321
+ }, me = (o) => {
322
+ o.target.files && o.target.files[0] && Y(o.target.files[0]);
323
+ }, be = () => {
324
+ T && (l(r, null), p(null), f(null), x.current && (x.current.value = ""));
248
325
  };
249
- return /* @__PURE__ */ c(f, { mb: "4", children: [
250
- /* @__PURE__ */ c(s, { as: "label", size: "2", weight: "bold", mb: "1", className: "block", children: [
251
- g,
326
+ return /* @__PURE__ */ s(w, { mb: "4", children: [
327
+ /* @__PURE__ */ s(c, { as: "label", size: "2", weight: "bold", mb: "1", className: "block", children: [
328
+ u,
252
329
  " ",
253
330
  m && "*"
254
331
  ] }),
255
- n ? /* @__PURE__ */ e(E, { size: "2", variant: "surface", className: "relative group", children: /* @__PURE__ */ c(C, { align: "center", gap: "3", children: [
256
- /* @__PURE__ */ e(f, { className: "bg-blue-100 p-2 rounded text-blue-600", children: /* @__PURE__ */ e(se, { width: "20", height: "20" }) }),
257
- /* @__PURE__ */ c(f, { style: { flex: 1, overflow: "hidden" }, children: [
258
- /* @__PURE__ */ e(s, { size: "2", weight: "bold", className: "block truncate", children: D() }),
259
- v ? /* @__PURE__ */ e(s, { size: "1", color: "gray", children: "Ready to submit" }) : /* @__PURE__ */ e(
332
+ t ? /* @__PURE__ */ e(X, { size: "2", variant: "surface", className: "relative group", children: /* @__PURE__ */ s(v, { align: "center", gap: "3", children: [
333
+ /* @__PURE__ */ e(w, { className: "bg-blue-100 p-2 rounded text-blue-600", children: /* @__PURE__ */ e(Ie, { width: "20", height: "20" }) }),
334
+ /* @__PURE__ */ e(w, { style: { flex: 1, overflow: "hidden" }, children: /* @__PURE__ */ e(c, { size: "2", weight: "bold", className: "block truncate", children: ue() }) }),
335
+ /* @__PURE__ */ s(v, { align: "center", gap: "3", children: [
336
+ M ? /* @__PURE__ */ e(c, { size: "1", color: "gray", children: "Loading..." }) : D ? /* @__PURE__ */ e(c, { size: "1", color: "red", children: "Error" }) : /* @__PURE__ */ e(G, { variant: "soft", color: "blue", size: "1", asChild: !0, children: /* @__PURE__ */ e(
260
337
  "a",
261
338
  {
262
- href: n,
263
- download: y || "document",
264
- className: "text-xs text-blue-600 hover:underline cursor-pointer",
265
- onClick: (o) => o.stopPropagation(),
266
- children: "Download"
267
- }
268
- )
269
- ] }),
270
- /* @__PURE__ */ c(C, { align: "center", gap: "2", children: [
271
- /* @__PURE__ */ e(ae, { className: "text-green-600 w-5 h-5" }),
272
- v && /* @__PURE__ */ e(
273
- ie,
274
- {
275
- variant: "ghost",
276
- color: "gray",
277
- onClick: G,
278
- className: "hover:text-red-600 transition-colors",
279
- children: /* @__PURE__ */ e(de, {})
339
+ href: Q || "#",
340
+ target: "_blank",
341
+ rel: "noopener noreferrer",
342
+ onClick: (o) => {
343
+ o.stopPropagation(), Q || o.preventDefault();
344
+ },
345
+ children: "View"
280
346
  }
281
- )
347
+ ) }),
348
+ /* @__PURE__ */ s(v, { align: "center", gap: "2", children: [
349
+ /* @__PURE__ */ e(Se, { className: "text-green-600 w-5 h-5" }),
350
+ T && /* @__PURE__ */ e(
351
+ Ne,
352
+ {
353
+ variant: "ghost",
354
+ color: "gray",
355
+ onClick: be,
356
+ className: "hover:text-red-600 transition-colors",
357
+ children: /* @__PURE__ */ e(Ee, {})
358
+ }
359
+ )
360
+ ] })
282
361
  ] })
283
- ] }) }) : /* @__PURE__ */ c(
362
+ ] }) }) : /* @__PURE__ */ s(
284
363
  "div",
285
364
  {
286
365
  className: `
287
366
  border-2 border-dashed rounded-lg p-6 text-center transition-all duration-200 ease-in-out
288
- ${l ? "border-blue-500 bg-blue-50" : "border-gray-300 hover:border-blue-400 hover:bg-gray-50"}
289
- ${i ? "border-red-300 bg-red-50" : ""}
290
- ${v ? "cursor-pointer" : "opacity-60 cursor-not-allowed pointer-events-none"}
367
+ ${b ? "border-blue-500 bg-blue-50" : "border-gray-300 hover:border-blue-400 hover:bg-gray-50"}
368
+ ${g ? "border-red-300 bg-red-50" : ""}
369
+ ${T ? "cursor-pointer" : "opacity-60 cursor-not-allowed pointer-events-none"}
291
370
  `,
292
- onDragEnter: V,
293
- onDragLeave: V,
294
- onDragOver: V,
295
- onDrop: q,
371
+ onDragEnter: W,
372
+ onDragLeave: W,
373
+ onDragOver: W,
374
+ onDrop: pe,
296
375
  onClick: () => {
297
376
  var o;
298
- return v && ((o = d.current) == null ? void 0 : o.click());
377
+ return T && ((o = x.current) == null ? void 0 : o.click());
299
378
  },
300
379
  onKeyDown: (o) => {
301
- var B;
302
- v && (o.key === "Enter" || o.key === " ") && (o.preventDefault(), (B = d.current) == null || B.click());
380
+ var y;
381
+ T && (o.key === "Enter" || o.key === " ") && (o.preventDefault(), (y = x.current) == null || y.click());
303
382
  },
304
383
  role: "button",
305
- tabIndex: v ? 0 : -1,
384
+ tabIndex: T ? 0 : -1,
306
385
  children: [
307
386
  /* @__PURE__ */ e(
308
387
  "input",
309
388
  {
310
- ref: d,
389
+ ref: x,
311
390
  type: "file",
312
- className: "hidden",
313
- accept: z,
314
- onChange: H,
315
- disabled: !v
391
+ style: { display: "none" },
392
+ accept: R,
393
+ onChange: me,
394
+ disabled: !T
316
395
  }
317
396
  ),
318
- /* @__PURE__ */ e(C, { direction: "column", align: "center", gap: "2", children: i ? /* @__PURE__ */ c(O, { children: [
319
- /* @__PURE__ */ e(ue, { className: "w-8 h-8 text-red-500" }),
320
- /* @__PURE__ */ e(s, { size: "2", color: "red", weight: "medium", children: i }),
321
- /* @__PURE__ */ e(s, { size: "1", color: "gray", children: "Click to try again" })
322
- ] }) : /* @__PURE__ */ c(O, { children: [
323
- /* @__PURE__ */ e(he, { className: "w-8 h-8 text-gray-400" }),
324
- /* @__PURE__ */ e(s, { size: "2", weight: "medium", children: "Click to upload or drag and drop" }),
325
- /* @__PURE__ */ c(s, { size: "1", color: "gray", children: [
397
+ /* @__PURE__ */ e(v, { direction: "column", align: "center", gap: "2", children: g ? /* @__PURE__ */ s(te, { children: [
398
+ /* @__PURE__ */ e(Be, { className: "w-8 h-8 text-red-500" }),
399
+ /* @__PURE__ */ e(c, { size: "2", color: "red", weight: "medium", children: g }),
400
+ /* @__PURE__ */ e(c, { size: "1", color: "gray", children: "Click to try again" })
401
+ ] }) : /* @__PURE__ */ s(te, { children: [
402
+ /* @__PURE__ */ e(Ve, { className: "w-8 h-8 text-gray-400" }),
403
+ /* @__PURE__ */ e(c, { size: "2", weight: "medium", children: "Click to upload or drag and drop" }),
404
+ /* @__PURE__ */ s(c, { size: "1", color: "gray", children: [
326
405
  "Max ",
327
- Math.round(w / (1024 * 1024)),
406
+ Math.round(V / (1024 * 1024)),
328
407
  "MB"
329
408
  ] })
330
409
  ] }) })
@@ -332,136 +411,148 @@ const ge = ({ data: n, handleChange: u, path: r, label: g, required: m, errors:
332
411
  }
333
412
  )
334
413
  ] });
335
- }, Oe = N(Ee), We = T(
414
+ }, mr = N(pr), br = z(
336
415
  3,
337
416
  // Rank
338
- ee("data-url")
339
- ), je = ({
340
- data: n,
341
- path: u,
417
+ J(le("data-url"), le("file"))
418
+ ), gr = ({
419
+ data: t,
420
+ path: l,
342
421
  schema: r,
343
- uischema: g,
422
+ uischema: u,
344
423
  enabled: m,
345
- visible: t,
424
+ visible: i,
346
425
  addItem: a,
347
- removeItems: l,
348
- rootSchema: h
426
+ removeItems: n,
427
+ rootSchema: b,
428
+ arraySchema: d
349
429
  }) => {
350
- const i = r.items;
351
- if (t === !1 || !i || typeof i != "object" || Array.isArray(i))
430
+ const g = d ? r : r.items, f = d || r;
431
+ if (i === !1 || !g || typeof g != "object" || Array.isArray(g))
352
432
  return null;
353
- const b = i, y = Array.isArray(n) ? n : [], p = r.title || "Array Items", d = () => {
354
- const w = re(b, h);
355
- a && a(u, w);
356
- }, $ = (w) => {
357
- if (l) {
358
- const z = l(u, [w]);
359
- z && z();
433
+ const h = g, p = Array.isArray(t) ? t : [], I = f.title || "Array Items", k = () => {
434
+ const F = Fe(h, b);
435
+ a && a(l, F)();
436
+ }, M = (F) => {
437
+ if (n) {
438
+ const D = n(l, [F]);
439
+ D && D();
360
440
  }
361
441
  };
362
- return /* @__PURE__ */ e(f, { mb: "6", children: /* @__PURE__ */ c(C, { direction: "column", gap: "4", children: [
363
- /* @__PURE__ */ e(s, { as: "div", size: "4", weight: "bold", children: p }),
364
- y.length === 0 && /* @__PURE__ */ e(f, { py: "4", px: "4", style: { backgroundColor: "var(--gray-3)", borderRadius: "var(--radius-3)" }, children: /* @__PURE__ */ e(s, { size: "2", color: "gray", children: "No items have been added yet." }) }),
365
- y.map((w, z) => {
366
- var D;
367
- const v = `${u}.${z}`;
368
- return /* @__PURE__ */ e(E, { size: "3", variant: "surface", children: /* @__PURE__ */ c(C, { direction: "column", gap: "4", children: [
369
- /* @__PURE__ */ c(C, { justify: "between", align: "center", children: [
370
- /* @__PURE__ */ c(s, { size: "3", weight: "bold", children: [
442
+ return /* @__PURE__ */ e(w, { mb: "6", children: /* @__PURE__ */ s(v, { direction: "column", gap: "4", children: [
443
+ /* @__PURE__ */ e(c, { as: "div", size: "4", weight: "bold", children: I }),
444
+ p.length === 0 && /* @__PURE__ */ e(w, { py: "4", px: "4", style: { backgroundColor: "var(--gray-3)", borderRadius: "var(--radius-3)" }, children: /* @__PURE__ */ e(c, { size: "2", color: "gray", children: "No items have been added yet." }) }),
445
+ p.map((F, D) => {
446
+ var x;
447
+ const L = `${l}.${D}`;
448
+ return /* @__PURE__ */ e(X, { size: "3", variant: "surface", children: /* @__PURE__ */ s(v, { direction: "column", gap: "4", children: [
449
+ /* @__PURE__ */ s(v, { justify: "between", align: "center", children: [
450
+ /* @__PURE__ */ s(c, { size: "3", weight: "bold", children: [
371
451
  "Item ",
372
- z + 1
452
+ D + 1
373
453
  ] }),
374
- m && /* @__PURE__ */ c(
375
- W,
454
+ m && /* @__PURE__ */ s(
455
+ G,
376
456
  {
457
+ type: "button",
377
458
  color: "red",
378
459
  variant: "soft",
379
- onClick: () => $(z),
460
+ onClick: () => M(D),
380
461
  title: "Remove item",
381
462
  children: [
382
- /* @__PURE__ */ e(me, {}),
463
+ /* @__PURE__ */ e(Pe, {}),
383
464
  "Remove"
384
465
  ]
385
466
  }
386
467
  )
387
468
  ] }),
388
- /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
389
- k,
469
+ /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(
470
+ E,
390
471
  {
391
- schema: b,
392
- uischema: ((D = g.options) == null ? void 0 : D.detail) || {
472
+ schema: h,
473
+ uischema: ((x = u.options) == null ? void 0 : x.detail) || (h.type === "object" || h.properties ? {
393
474
  type: "VerticalLayout",
394
475
  elements: Object.keys(
395
- b.properties || {}
396
- ).map((I) => ({
476
+ h.properties || {}
477
+ ).map((B) => ({
397
478
  type: "Control",
398
- scope: `#/properties/${I}`
479
+ scope: `#/properties/${B}`
399
480
  }))
400
- },
401
- path: v,
481
+ } : {
482
+ type: "Control",
483
+ scope: "#"
484
+ }),
485
+ path: L,
402
486
  enabled: m,
403
487
  renderers: void 0,
404
488
  cells: void 0
405
489
  }
406
490
  ) })
407
- ] }) }, v);
491
+ ] }) }, L);
408
492
  }),
409
- m && /* @__PURE__ */ e(f, { mt: "2", children: /* @__PURE__ */ c(
410
- W,
493
+ m && /* @__PURE__ */ e(w, { mt: "2", children: /* @__PURE__ */ s(
494
+ G,
411
495
  {
496
+ type: "button",
412
497
  variant: "surface",
413
- onClick: d,
498
+ onClick: k,
414
499
  children: [
415
- /* @__PURE__ */ e(pe, {}),
500
+ /* @__PURE__ */ e(je, {}),
416
501
  "Add Item"
417
502
  ]
418
503
  }
419
504
  ) })
420
505
  ] }) });
421
- }, Me = ne(je), qe = T(
422
- 2,
423
- te(F("Control"), oe("array"))
424
- ), He = ({ uischema: n, visible: u }) => {
425
- const r = n;
426
- return u === !1 ? null : /* @__PURE__ */ e(f, { mb: "4", children: /* @__PURE__ */ e(M, { size: "4", children: r.text }) });
427
- }, Ge = T(1, F("Label")), Ze = [
428
- { tester: be, renderer: ye },
429
- { tester: Ce, renderer: ve },
430
- { tester: Te, renderer: xe },
431
- { tester: $e, renderer: Fe },
432
- { tester: ke, renderer: De },
433
- { tester: Re, renderer: Ie },
434
- { tester: Ae, renderer: Le },
435
- { tester: Ve, renderer: Se },
436
- { tester: Pe, renderer: Be },
437
- { tester: We, renderer: Oe },
438
- { tester: qe, renderer: Me },
439
- { tester: Ge, renderer: He }
506
+ }, ie = Ue(gr), fr = z(
507
+ 3,
508
+ Le
509
+ ), yr = ({ uischema: t, visible: l }) => {
510
+ const r = t;
511
+ return l === !1 ? null : /* @__PURE__ */ e(w, { mb: "4", children: /* @__PURE__ */ e(ce, { size: "4", children: r.text }) });
512
+ }, Cr = z(1, S("Label")), vr = z(
513
+ 3,
514
+ $e
515
+ ), Lr = [
516
+ { tester: He, renderer: We },
517
+ { tester: qe, renderer: Ge },
518
+ { tester: Ke, renderer: Xe },
519
+ { tester: Qe, renderer: Ye },
520
+ { tester: rr, renderer: tr },
521
+ { tester: nr, renderer: or },
522
+ { tester: ir, renderer: lr },
523
+ { tester: sr, renderer: cr },
524
+ { tester: dr, renderer: ar },
525
+ { tester: br, renderer: mr },
526
+ { tester: fr, renderer: ie },
527
+ { tester: vr, renderer: ie },
528
+ { tester: Cr, renderer: yr }
440
529
  ];
441
530
  export {
442
- Me as ArrayControl,
443
- qe as ArrayControlTester,
444
- ze as BooleanControl,
445
- Te as BooleanControlTester,
446
- Be as CategorizationLayoutRenderer,
447
- Pe as CategorizationLayoutTester,
448
- Ne as DateControl,
449
- ke as DateControlTester,
450
- Oe as FileControl,
451
- We as FileControlTester,
452
- Se as GroupLayoutRenderer,
453
- Ve as GroupLayoutTester,
454
- Le as HorizontalLayoutRenderer,
455
- Ae as HorizontalLayoutTester,
456
- He as LabelRenderer,
457
- Ge as LabelTester,
458
- fe as NumberControl,
459
- Ce as NumberControlTester,
460
- we as SelectControl,
461
- $e as SelectControlTester,
462
- ge as TextControl,
463
- be as TextControlTester,
464
- Ie as VerticalLayoutRenderer,
465
- Re as VerticalLayoutTester,
466
- Ze as radixRenderers
531
+ ie as ArrayControl,
532
+ fr as ArrayControlTester,
533
+ Je as BooleanControl,
534
+ Ke as BooleanControlTester,
535
+ ar as CategorizationLayoutRenderer,
536
+ dr as CategorizationLayoutTester,
537
+ er as DateControl,
538
+ rr as DateControlTester,
539
+ mr as FileControl,
540
+ br as FileControlTester,
541
+ cr as GroupLayoutRenderer,
542
+ sr as GroupLayoutTester,
543
+ lr as HorizontalLayoutRenderer,
544
+ ir as HorizontalLayoutTester,
545
+ yr as LabelRenderer,
546
+ Cr as LabelTester,
547
+ _e as NumberControl,
548
+ qe as NumberControlTester,
549
+ Ze as SelectControl,
550
+ Qe as SelectControlTester,
551
+ Me as TextControl,
552
+ He as TextControlTester,
553
+ Fr as UploadProvider,
554
+ or as VerticalLayoutRenderer,
555
+ nr as VerticalLayoutTester,
556
+ Lr as radixRenderers,
557
+ Oe as useUpload
467
558
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opennsw/jsonforms-renderers",
3
- "version": "0.0.2",
3
+ "version": "0.1.0",
4
4
  "type": "module",
5
5
  "main": "dist/renderers.cjs.js",
6
6
  "module": "dist/renderers.es.js",