@rjsf/semantic-ui 5.0.2 → 5.2.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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@rjsf/core"),t=require("semantic-ui-react"),r=require("react"),a=require("@rjsf/utils"),n=require("nanoid"),i=require("lodash/map");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(r),u=l(i);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},d.apply(this,arguments)}function s(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)t.indexOf(r=i[a])>=0||(n[r]=e[r]);return n}var c=["uiSchema","registry","color"];function m(e){var r=e.color,a=s(e,c);return o.default.createElement(t.Button,d({title:"Add Item",color:r},a,{icon:!0,size:"tiny"}),o.default.createElement(t.Icon,{name:"plus"}))}var p=["wrap","component"];function f(e){var t=e.formContext,r=e.uiSchema,n=e.options,i=void 0===n?{}:n,l=e.defaultSchemaProps,o=void 0===l?{fluid:!0,inverted:!1}:l,u=e.defaultContextProps,s=void 0===u?{}:u,c=(void 0===t?{}:t).semantic,m=a.getUiOptions(void 0===r?{}:r).semantic,p=i.semantic;return Object.assign({},d({},o),d({},s),m,p,c)}function h(e,t){void 0===t&&(t=[]);var r=e.filter(Boolean).reduce((function(e,t){return e.concat(t.trim().split(/\s+/))}),[]);return[].concat(new Set(r.filter((function(e){return!t.includes(e)})))).join(" ")}function v(e){var t=e.wrap,r=e.component,a=void 0===r?"div":r,n=s(e,p);return t?o.default.createElement(a,d({},n)):n.children}var y=function(e){return{display:"grid",gridTemplateColumns:"1fr "+(e?65:110)+"px"}};function g(e){var r=e.children,n=e.disabled,i=e.hasToolbar,l=e.hasMoveDown,u=e.hasMoveUp,s=e.hasRemove,c=e.index,m=e.onDropIndexClick,p=e.onReorderClick,f=e.readonly,h=e.uiSchema,g=e.registry,b=g.templates.ButtonTemplates,E=b.MoveDownButton,S=b.MoveUpButton,x=b.RemoveButton,F=a.getUiOptions(h).semantic,C=F.horizontalButtons,T=void 0!==C&&C,B=F.wrapItem;return o.default.createElement("div",{className:"array-item"},o.default.createElement(v,{wrap:void 0!==B&&B,component:t.Segment},o.default.createElement(t.Grid,{style:0!==c?d({},y(!T),{alignItems:"center"}):y(!T)},o.default.createElement(t.Grid.Column,{width:16,verticalAlign:"middle"},r),i&&o.default.createElement(t.Grid.Column,null,(u||l||s)&&o.default.createElement(t.Button.Group,{size:"mini",vertical:!T},(u||l)&&o.default.createElement(S,{className:"array-item-move-up",disabled:n||f||!u,onClick:p(c,c-1),uiSchema:h,registry:g}),(u||l)&&o.default.createElement(E,{className:"array-item-move-down",disabled:n||f||!l,onClick:p(c,c+1),uiSchema:h,registry:g}),s&&o.default.createElement(x,{className:"array-item-remove",disabled:n||f,onClick:m(c),uiSchema:h,registry:g}))))))}var b=["key","uiSchema"];function E(e){var t=e.uiSchema,r=e.idSchema,n=e.canAdd,i=e.className,l=e.disabled,u=e.items,c=e.onAddClick,m=e.readonly,p=e.required,v=e.schema,y=e.title,g=e.registry,E=f({uiSchema:t,formContext:e.formContext,defaultSchemaProps:{horizontalButtons:!1,wrapItem:!1}}),S={horizontalButtons:E.horizontalButtons,wrapItem:E.wrapItem},x=a.getUiOptions(t),F=a.getTemplate("ArrayFieldDescriptionTemplate",g,x),C=a.getTemplate("ArrayFieldItemTemplate",g,x),T=a.getTemplate("ArrayFieldTitleTemplate",g,x),B=g.templates.ButtonTemplates.AddButton;return o.default.createElement("div",{className:h([i,a.isFixedItems(v)?"":"sortable-form-fields"])},o.default.createElement(T,{idSchema:r,title:x.title||y,schema:v,uiSchema:t,required:p,registry:g}),o.default.createElement(F,{idSchema:r,description:x.description||v.description,schema:v,uiSchema:t,registry:g}),o.default.createElement("div",{key:"array-item-list-"+r.$id},o.default.createElement("div",{className:"row array-item-list"},u&&u.map((function(e){var t,r=e.key,n=e.uiSchema,i=void 0===n?{}:n,l=s(e,b),u=d({},i,((t={})[a.UI_OPTIONS_KEY]=d({},i[a.UI_OPTIONS_KEY],{semantic:S}),t));return o.default.createElement(C,d({key:r},l,{uiSchema:u}))}))),n&&o.default.createElement("div",{style:{marginTop:"1rem",position:"relative",textAlign:"right"}},o.default.createElement(B,{onClick:c,disabled:l||m,uiSchema:t,registry:g}))))}function S(e){var r=e.id,n=e.placeholder,i=e.label,l=e.value,u=e.required,s=e.readonly,c=e.disabled,m=e.onChange,p=e.onBlur,h=e.onFocus,v=e.autofocus,y=e.options,g=e.schema,b=e.uiSchema,E=e.formContext,S=e.registry,x=e.rawErrors,F=void 0===x?[]:x,C=a.getInputProps(g,e.type,y),T=f({uiSchema:b,formContext:E,options:y}),B=S.schemaUtils.getDisplayLabel(g,b);return o.default.createElement(o.default.Fragment,null,o.default.createElement(t.Form.Input,d({key:r,id:r,name:r,placeholder:n},C,{label:!!B&&(i||g.title),required:u,autoFocus:v,disabled:c||s,list:g.examples?a.examplesId(r):void 0},T,{value:l||0===l?l:"",error:F.length>0,onChange:function(e){var t=e.target.value;return m(""===t?y.emptyValue:t)},onBlur:function(){return p&&p(r,l)},onFocus:function(){return h&&h(r,l)},"aria-describedby":a.ariaDescribedByIds(r,!!g.examples)})),Array.isArray(g.examples)&&o.default.createElement("datalist",{id:a.examplesId(r)},g.examples.concat(g.default&&!g.examples.includes(g.default)?[g.default]:[]).map((function(e){return o.default.createElement("option",{key:e,value:e})}))))}function x(e){var t=e.description;return t?o.default.createElement("p",{id:e.id,className:"sui-description"},t):null}function F(e){var r=e.errors;return o.default.createElement(t.Message,{negative:!0},o.default.createElement(t.Message.Header,null,"Errors"),o.default.createElement(t.Message.List,null,r.map((function(e,r){return o.default.createElement(t.Message.Item,{key:"error-"+r},e.stack)}))))}var C=["icon","iconType","color","className","uiSchema","registry"];function T(e){var r=e.icon,a=e.iconType,n=e.color,i=e.className,l=s(e,C);return o.default.createElement(t.Button,d({icon:r,size:a,color:n,className:i},l))}function B(e){return o.default.createElement(T,d({title:"Move down"},e,{icon:"angle down"}))}function I(e){return o.default.createElement(T,d({title:"Move up"},e,{icon:"angle up"}))}function w(e){return o.default.createElement(T,d({title:"Remove"},e,{icon:"trash"}))}var O={options:{pointing:"above",size:"small"}};function k(e){var r=e.errors,i=e.idSchema,l=function(e){var t=e.formContext,r=void 0===t?{}:t,n=e.uiSchema,i=e.options,l=void 0===i?{}:i,o=e.defaultProps,u=void 0===o?{size:"small",pointing:"above"}:o,s=r.semantic&&r.semantic.errorOptions,c=a.getUiOptions(void 0===n?{}:n).semantic,m=c&&c.errorOptions,p=l.semantic&&l.semantic.errorOptions;return Object.assign({},d({},u),m,p,s)}({formContext:e.registry.formContext,uiSchema:e.uiSchema,defaultProps:O});return r&&r.length>0?o.default.createElement(t.Label,{id:i.$id+"__error",color:"red",pointing:l.pointing||"above",size:l.size||"small",basic:!0},o.default.createElement(t.List,{bulleted:!0},r.map((function(e){return o.default.createElement(t.List.Item,{key:n.nanoid()},e)})))):null}function A(e){var r=e.help;return r?o.default.createElement(t.Message,{size:"mini",info:!0,id:e.idSchema.$id+"__help",content:r}):null}var D=["id","children","classNames","style","displayLabel","label","errors","help","hidden","rawDescription","registry","schema","uiSchema"];function q(e){var r=e.id,n=e.children,i=e.classNames,l=e.style,u=e.displayLabel,c=e.label,m=e.errors,p=e.help,h=e.hidden,y=e.rawDescription,g=e.registry,b=e.schema,E=e.uiSchema,S=s(e,D),x=f(S),F=x.wrapLabel,C=x.wrapContent,T=a.getUiOptions(E),B=a.getTemplate("WrapIfAdditionalTemplate",g,T),I=a.getTemplate("DescriptionFieldTemplate",g,T);return h?o.default.createElement("div",{style:{display:"none"}},n):o.default.createElement(B,d({classNames:i,style:l,id:r,label:c,registry:g,schema:b,uiSchema:E},S),o.default.createElement(t.Form.Group,{key:r,widths:"equal",grouped:!0},o.default.createElement(v,{wrap:C,className:"sui-field-content"},n,u&&y&&o.default.createElement(v,{wrap:F,className:"sui-field-label"},y&&o.default.createElement(I,{id:a.descriptionId(r),description:y,schema:b,uiSchema:E,registry:g})),p,m)))}function N(e){var r=e.description,n=e.onAddClick,i=e.title,l=e.properties,u=e.disabled,d=e.readonly,s=e.required,c=e.uiSchema,m=e.schema,p=e.formData,f=e.idSchema,h=e.registry,v=a.getUiOptions(c),y=a.getTemplate("TitleFieldTemplate",h,v),g=a.getTemplate("DescriptionFieldTemplate",h,v),b=h.templates.ButtonTemplates.AddButton,E=v.title||i,S=v.description||r;return o.default.createElement(o.default.Fragment,null,E&&o.default.createElement(y,{id:a.titleId(f),title:E,required:s,schema:m,uiSchema:c,registry:h}),S&&o.default.createElement(g,{id:a.descriptionId(f),description:S,schema:m,uiSchema:c,registry:h}),l.map((function(e){return e.content})),a.canExpand(m,c,p)&&o.default.createElement(t.Grid.Column,{width:16,verticalAlign:"middle"},o.default.createElement(t.Grid.Row,null,o.default.createElement("div",{style:{marginTop:"1rem",position:"relative",textAlign:"right"}},o.default.createElement(b,{onClick:n(m),disabled:u||d,uiSchema:c,registry:h})))))}function P(e){var r=a.getSubmitButtonOptions(e.uiSchema),n=r.submitText,i=r.props;return r.norender?null:o.default.createElement(t.Button,d({type:"submit",primary:!0},void 0===i?{}:i),n)}var G={inverted:!1,dividing:!0};function M(e){var r=e.id,a=e.title,n=f({uiSchema:e.uiSchema,defaultSchemaProps:G});return a?o.default.createElement(t.Header,d({id:r},n,{as:"h5"}),a):null}function R(e){var r=e.children,n=e.classNames,i=e.style,l=e.disabled,u=e.id,d=e.label,s=e.onDropPropertyClick,c=e.onKeyChange,m=e.readonly,p=e.uiSchema,f=e.registry,h=f.templates.ButtonTemplates.RemoveButton,v=f.formContext,y=v.readonlyAsDisabled;return a.ADDITIONAL_PROPERTY_FLAG in e.schema?o.default.createElement("div",{className:n,style:i,key:u+"-key"},o.default.createElement(t.Grid,{columns:"equal"},o.default.createElement(t.Grid.Row,null,o.default.createElement(t.Grid.Column,{className:"form-additional"},o.default.createElement(t.Form.Group,{widths:"equal",grouped:!0},o.default.createElement(t.Form.Input,{className:"form-group",hasFeedback:!0,fluid:!0,htmlFor:""+u,label:d+" Key",required:e.required,defaultValue:d,disabled:l||(void 0===y||y)&&m,id:""+u,name:""+u,onBlur:m?void 0:function(e){return c(e.target.value)},style:v.wrapperStyle,type:"text"}))),o.default.createElement(t.Grid.Column,{className:"form-additional",verticalAlign:"middle"},r),o.default.createElement(t.Grid.Column,null,o.default.createElement(h,{iconType:"mini",className:"array-item-remove",disabled:l||m,onClick:s(d),uiSchema:p,registry:f}))))):o.default.createElement("div",{className:n,style:i},r)}function V(){return{ArrayFieldItemTemplate:g,ArrayFieldTemplate:E,BaseInputTemplate:S,ButtonTemplates:{AddButton:m,MoveDownButton:B,MoveUpButton:I,RemoveButton:w,SubmitButton:P},DescriptionFieldTemplate:x,ErrorListTemplate:F,FieldErrorTemplate:k,FieldHelpTemplate:A,FieldTemplate:q,ObjectFieldTemplate:N,TitleFieldTemplate:M,WrapIfAdditionalTemplate:R}}var U=V();function _(e){var r=e.id,n=e.value,i=e.disabled,l=e.readonly,u=e.label,s=e.autofocus,c=e.onChange,m=e.onBlur,p=e.onFocus,h=e.schema,v=e.rawErrors,y=void 0===v?[]:v,g=f({options:e.options,formContext:e.formContext,uiSchema:e.uiSchema,defaultSchemaProps:{inverted:!1}}),b=a.schemaRequiresTrueValue(h);return o.default.createElement(t.Form.Checkbox,d({id:r,name:r,disabled:i||l,autoFocus:s},g,{checked:void 0!==n&&("true"==n||1==n),error:y.length>0,onChange:function(e,t){return c&&c(t.checked)},onBlur:function(){return m&&m(r,n)},onFocus:function(){return p&&p(r,n)},required:b,label:u||"","aria-describedby":a.ariaDescribedByIds(r)}))}function j(e){var r=e.id,n=e.disabled,i=e.options,l=e.value,u=e.autofocus,s=e.readonly,c=e.onChange,m=e.onBlur,p=e.onFocus,h=e.formContext,v=e.schema,y=e.uiSchema,g=e.rawErrors,b=void 0===g?[]:g,E=e.registry,S=a.getTemplate("TitleFieldTemplate",E,i),x=i.enumOptions,F=i.enumDisabled,C=i.inline,T=Array.isArray(l)?l:[l],B=v.title,I=f({options:i,formContext:h,uiSchema:y,defaultSchemaProps:{inverted:!1}}),w=function(e){return function(t){c(t.target.checked?a.enumOptionsSelectValue(e,T,x):a.enumOptionsDeselectValue(e,T,x))}},O=function(){return m(r,l)},k=function(){return p(r,l)},A=C?{inline:!0}:{grouped:!0};return o.default.createElement(o.default.Fragment,null,B&&o.default.createElement(S,{id:a.titleId(r),title:B,schema:v,uiSchema:y,registry:E}),o.default.createElement(t.Form.Group,d({id:r,name:r},A),Array.isArray(x)&&x.map((function(e,i){var l=a.enumOptionsIsSelected(e.value,T),c=Array.isArray(F)&&-1!==F.indexOf(e.value);return o.default.createElement(t.Form.Checkbox,d({id:a.optionId(r,i),name:r,key:i,label:e.label},I,{checked:l,error:b.length>0,disabled:n||c||s,autoFocus:u&&0===i,onChange:w(i),onBlur:O,onFocus:k,"aria-describedby":a.ariaDescribedByIds(r)}))}))))}function z(e){var r=e.id,n=e.value,i=e.required,l=e.disabled,u=e.readonly,s=e.onChange,c=e.onBlur,m=e.onFocus,p=e.options,h=e.rawErrors,v=void 0===h?[]:h,y=p.enumOptions,g=p.enumDisabled,b=p.emptyValue,E=f({formContext:e.formContext,options:p,uiSchema:e.uiSchema}),S=function(e,t){return s(a.enumOptionsValueForIndex(t.value,y,b))},x=function(){return c(r,n)},F=function(){return m(r,n)};return o.default.createElement(t.Form.Group,d({},p.inline?{inline:!0}:{grouped:!0}),Array.isArray(y)&&y.map((function(e,s){var c=a.enumOptionsIsSelected(e.value,n),m=Array.isArray(g)&&-1!==g.indexOf(e.value);return o.default.createElement(t.Form.Field,d({required:i,control:t.Radio,id:a.optionId(r,s),name:r},E,{onFocus:F,onBlur:x,onChange:S,label:e.label,value:String(s),error:v.length>0,key:s,checked:c,disabled:l||m||u,"aria-describedby":a.ariaDescribedByIds(r)}))})))}function L(e){var r=e.id,n=e.value,i=e.required,l=e.readonly,u=e.disabled,s=e.onChange,c=e.onBlur,m=e.onFocus,p=e.options,h=e.schema,v=e.rawErrors,y=void 0===v?[]:v,g=f({formContext:e.formContext,options:p,uiSchema:e.uiSchema,defaultSchemaProps:{fluid:!0}});return o.default.createElement(o.default.Fragment,null,o.default.createElement(t.Input,d({id:r,key:r,name:r,type:"range",required:i,disabled:u||l},a.rangeSpec(h),g,{value:n||"",error:y.length>0,onChange:function(e){var t=e.target.value;return s&&s(""===t?p.emptyValue:t)},onBlur:function(){return c&&c(r,n)},onFocus:function(){return m&&m(r,n)},"aria-describedby":a.ariaDescribedByIds(r)})),o.default.createElement("span",null,n))}function W(e){var r=e.schema,n=e.id,i=e.options,l=e.label,s=e.required,c=e.disabled,m=e.readonly,p=e.value,h=e.multiple,v=e.placeholder,y=e.autofocus,g=e.onChange,b=e.onBlur,E=e.onFocus,S=e.rawErrors,x=void 0===S?[]:S,F=f({uiSchema:e.uiSchema,formContext:e.formContext,options:i,defaultSchemaProps:{inverted:"false",selection:!0,fluid:!0,scrolling:!0,upward:!1}}),C=i.enumOptions,T=i.emptyValue,B=h?[]:"",I=function(e,t){var r=t||[];return u.default(e,(function(e,t){var a=e.label;return{disabled:-1!==r.indexOf(e.value),key:a,text:a,value:String(t)}}))}(C,i.enumDisabled),w=a.enumOptionsIndexForValue(p,C,h);return o.default.createElement(t.Form.Dropdown,d({key:n,id:n,name:n,label:l||r.title,multiple:void 0!==h&&h,value:void 0===p?B:w,error:x.length>0,disabled:c,placeholder:v},F,{required:s,autoFocus:y,readOnly:m,options:I,onChange:function(e,t){return g(a.enumOptionsValueForIndex(t.value,C,T))},onBlur:function(e,t){return b(n,a.enumOptionsValueForIndex(t.target.value,C,T))},onFocus:function(e,t){return E(n,a.enumOptionsValueForIndex(t.target.value,C,T))},"aria-describedby":a.ariaDescribedByIds(n)}))}function K(e){var r=e.id,n=e.placeholder,i=e.value,l=e.required,u=e.disabled,s=e.autofocus,c=e.label,m=e.readonly,p=e.onBlur,h=e.onFocus,v=e.onChange,y=e.options,g=e.schema,b=e.uiSchema,E=e.registry,S=e.rawErrors,x=void 0===S?[]:S,F=f({formContext:e.formContext,options:y,defaultSchemaProps:{inverted:!1}}),C=E.schemaUtils.getDisplayLabel(g,b);return o.default.createElement(t.Form.TextArea,d({id:r,key:r,name:r,label:!!C&&(c||g.title),placeholder:n,autoFocus:s,required:l,disabled:u||m},F,{value:i||"",error:x.length>0,rows:y.rows||5,onChange:function(e){var t=e.target.value;return v&&v(""===t?y.emptyValue:t)},onBlur:function(){return p&&p(r,i)},onFocus:function(){return h&&h(r,i)},"aria-describedby":a.ariaDescribedByIds(r)}))}function H(){return{CheckboxWidget:_,CheckboxesWidget:j,RadioWidget:z,RangeWidget:L,SelectWidget:W,TextareaWidget:K}}var Y=H();function $(){return{templates:V(),widgets:H(),_internalFormWrapper:t.Form}}var J=$();function Q(){return e.withTheme($())}var X=Q();exports.Form=X,exports.Templates=U,exports.Theme=J,exports.Widgets=Y,exports.default=X,exports.generateForm=Q,exports.generateTemplates=V,exports.generateTheme=$,exports.generateWidgets=H;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@rjsf/core"),t=require("semantic-ui-react"),r=require("react"),a=require("@rjsf/utils"),n=require("nanoid"),i=require("lodash/map");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(r),u=l(i);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},d.apply(this,arguments)}function s(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)t.indexOf(r=i[a])>=0||(n[r]=e[r]);return n}var c=["uiSchema","registry","color"];function m(e){var r=e.registry,n=e.color,i=s(e,c);return o.default.createElement(t.Button,d({title:(0,r.translateString)(a.TranslatableString.AddItemButton),color:n},i,{icon:!0,size:"tiny"}),o.default.createElement(t.Icon,{name:"plus"}))}var p=["wrap","component"];function f(e){var t=e.formContext,r=e.uiSchema,n=e.options,i=void 0===n?{}:n,l=e.defaultSchemaProps,o=void 0===l?{fluid:!0,inverted:!1}:l,u=e.defaultContextProps,s=void 0===u?{}:u,c=(void 0===t?{}:t).semantic,m=a.getUiOptions(void 0===r?{}:r).semantic,p=i.semantic;return Object.assign({},d({},o),d({},s),m,p,c)}function h(e,t){void 0===t&&(t=[]);var r=e.filter(Boolean).reduce((function(e,t){return e.concat(t.trim().split(/\s+/))}),[]);return[].concat(new Set(r.filter((function(e){return!t.includes(e)})))).join(" ")}function v(e){var t=e.wrap,r=e.component,a=void 0===r?"div":r,n=s(e,p);return t?o.default.createElement(a,d({},n)):n.children}var g=function(e){return{display:"grid",gridTemplateColumns:"1fr "+(e?65:110)+"px"}};function y(e){var r=e.children,n=e.disabled,i=e.hasToolbar,l=e.hasMoveDown,u=e.hasMoveUp,s=e.hasRemove,c=e.index,m=e.onDropIndexClick,p=e.onReorderClick,f=e.readonly,h=e.uiSchema,y=e.registry,b=y.templates.ButtonTemplates,E=b.MoveDownButton,S=b.MoveUpButton,x=b.RemoveButton,F=a.getUiOptions(h).semantic,T=F.horizontalButtons,C=void 0!==T&&T,B=F.wrapItem;return o.default.createElement("div",{className:"array-item"},o.default.createElement(v,{wrap:void 0!==B&&B,component:t.Segment},o.default.createElement(t.Grid,{style:0!==c?d({},g(!C),{alignItems:"center"}):g(!C)},o.default.createElement(t.Grid.Column,{width:16,verticalAlign:"middle"},r),i&&o.default.createElement(t.Grid.Column,null,(u||l||s)&&o.default.createElement(t.Button.Group,{size:"mini",vertical:!C},(u||l)&&o.default.createElement(S,{className:"array-item-move-up",disabled:n||f||!u,onClick:p(c,c-1),uiSchema:h,registry:y}),(u||l)&&o.default.createElement(E,{className:"array-item-move-down",disabled:n||f||!l,onClick:p(c,c+1),uiSchema:h,registry:y}),s&&o.default.createElement(x,{className:"array-item-remove",disabled:n||f,onClick:m(c),uiSchema:h,registry:y}))))))}var b=["key","uiSchema"];function E(e){var t=e.uiSchema,r=e.idSchema,n=e.canAdd,i=e.className,l=e.disabled,u=e.items,c=e.onAddClick,m=e.readonly,p=e.required,v=e.schema,g=e.title,y=e.registry,E=f({uiSchema:t,formContext:e.formContext,defaultSchemaProps:{horizontalButtons:!1,wrapItem:!1}}),S={horizontalButtons:E.horizontalButtons,wrapItem:E.wrapItem},x=a.getUiOptions(t),F=a.getTemplate("ArrayFieldDescriptionTemplate",y,x),T=a.getTemplate("ArrayFieldItemTemplate",y,x),C=a.getTemplate("ArrayFieldTitleTemplate",y,x),B=y.templates.ButtonTemplates.AddButton;return o.default.createElement("div",{className:h([i,a.isFixedItems(v)?"":"sortable-form-fields"])},o.default.createElement(C,{idSchema:r,title:x.title||g,schema:v,uiSchema:t,required:p,registry:y}),o.default.createElement(F,{idSchema:r,description:x.description||v.description,schema:v,uiSchema:t,registry:y}),o.default.createElement("div",{key:"array-item-list-"+r.$id},o.default.createElement("div",{className:"row array-item-list"},u&&u.map((function(e){var t,r=e.key,n=e.uiSchema,i=void 0===n?{}:n,l=s(e,b),u=d({},i,((t={})[a.UI_OPTIONS_KEY]=d({},i[a.UI_OPTIONS_KEY],{semantic:S}),t));return o.default.createElement(T,d({key:r},l,{uiSchema:u}))}))),n&&o.default.createElement("div",{style:{marginTop:"1rem",position:"relative",textAlign:"right"}},o.default.createElement(B,{onClick:c,disabled:l||m,uiSchema:t,registry:y}))))}function S(e){var r=e.id,n=e.placeholder,i=e.label,l=e.value,u=e.required,s=e.readonly,c=e.disabled,m=e.onChange,p=e.onBlur,h=e.onFocus,v=e.autofocus,g=e.options,y=e.schema,b=e.uiSchema,E=e.formContext,S=e.registry,x=e.rawErrors,F=void 0===x?[]:x,T=a.getInputProps(y,e.type,g),C=f({uiSchema:b,formContext:E,options:g}),B=S.schemaUtils.getDisplayLabel(y,b);return o.default.createElement(o.default.Fragment,null,o.default.createElement(t.Form.Input,d({key:r,id:r,name:r,placeholder:n},T,{label:!!B&&(i||y.title),required:u,autoFocus:v,disabled:c||s,list:y.examples?a.examplesId(r):void 0},C,{value:l||0===l?l:"",error:F.length>0,onChange:function(e){var t=e.target.value;return m(""===t?g.emptyValue:t)},onBlur:function(){return p&&p(r,l)},onFocus:function(){return h&&h(r,l)},"aria-describedby":a.ariaDescribedByIds(r,!!y.examples)})),Array.isArray(y.examples)&&o.default.createElement("datalist",{id:a.examplesId(r)},y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map((function(e){return o.default.createElement("option",{key:e,value:e})}))))}function x(e){var t=e.description;return t?o.default.createElement("p",{id:e.id,className:"sui-description"},t):null}function F(e){var r=e.errors;return o.default.createElement(t.Message,{negative:!0},o.default.createElement(t.Message.Header,null,(0,e.registry.translateString)(a.TranslatableString.ErrorsLabel)),o.default.createElement(t.Message.List,null,r.map((function(e,r){return o.default.createElement(t.Message.Item,{key:"error-"+r},e.stack)}))))}var T=["icon","iconType","color","className","uiSchema","registry"];function C(e){var r=e.icon,a=e.iconType,n=e.color,i=e.className,l=s(e,T);return o.default.createElement(t.Button,d({icon:r,size:a,color:n,className:i},l))}function B(e){return o.default.createElement(C,d({title:(0,e.registry.translateString)(a.TranslatableString.MoveDownButton)},e,{icon:"angle down"}))}function I(e){return o.default.createElement(C,d({title:(0,e.registry.translateString)(a.TranslatableString.MoveUpButton)},e,{icon:"angle up"}))}function w(e){return o.default.createElement(C,d({title:(0,e.registry.translateString)(a.TranslatableString.RemoveButton)},e,{icon:"trash"}))}var O={options:{pointing:"above",size:"small"}};function k(e){var r=e.errors,i=e.idSchema,l=function(e){var t=e.formContext,r=void 0===t?{}:t,n=e.uiSchema,i=e.options,l=void 0===i?{}:i,o=e.defaultProps,u=void 0===o?{size:"small",pointing:"above"}:o,s=r.semantic&&r.semantic.errorOptions,c=a.getUiOptions(void 0===n?{}:n).semantic,m=c&&c.errorOptions,p=l.semantic&&l.semantic.errorOptions;return Object.assign({},d({},u),m,p,s)}({formContext:e.registry.formContext,uiSchema:e.uiSchema,defaultProps:O}),u=l.pointing,s=l.size;if(r&&r.length>0){var c=a.errorId(i);return o.default.createElement(t.Label,{id:c,color:"red",pointing:u||"above",size:s||"small",basic:!0},o.default.createElement(t.List,{bulleted:!0},r.map((function(e){return o.default.createElement(t.List.Item,{key:n.nanoid()},e)}))))}return null}function A(e){var r=e.help;if(r){var n=a.helpId(e.idSchema);return o.default.createElement(t.Message,{size:"mini",info:!0,id:n,content:r})}return null}var D=["id","children","classNames","style","displayLabel","label","errors","help","hidden","rawDescription","registry","schema","uiSchema"];function q(e){var r=e.id,n=e.children,i=e.classNames,l=e.style,u=e.displayLabel,c=e.label,m=e.errors,p=e.help,h=e.hidden,g=e.rawDescription,y=e.registry,b=e.schema,E=e.uiSchema,S=s(e,D),x=f(S),F=x.wrapLabel,T=x.wrapContent,C=a.getUiOptions(E),B=a.getTemplate("WrapIfAdditionalTemplate",y,C),I=a.getTemplate("DescriptionFieldTemplate",y,C);return h?o.default.createElement("div",{style:{display:"none"}},n):o.default.createElement(B,d({classNames:i,style:l,id:r,label:c,registry:y,schema:b,uiSchema:E},S),o.default.createElement(t.Form.Group,{key:r,widths:"equal",grouped:!0},o.default.createElement(v,{wrap:T,className:"sui-field-content"},n,u&&g&&o.default.createElement(v,{wrap:F,className:"sui-field-label"},g&&o.default.createElement(I,{id:a.descriptionId(r),description:g,schema:b,uiSchema:E,registry:y})),p,m)))}function N(e){var r=e.description,n=e.onAddClick,i=e.title,l=e.properties,u=e.disabled,d=e.readonly,s=e.required,c=e.uiSchema,m=e.schema,p=e.formData,f=e.idSchema,h=e.registry,v=a.getUiOptions(c),g=a.getTemplate("TitleFieldTemplate",h,v),y=a.getTemplate("DescriptionFieldTemplate",h,v),b=h.templates.ButtonTemplates.AddButton,E=v.title||i,S=v.description||r;return o.default.createElement(o.default.Fragment,null,E&&o.default.createElement(g,{id:a.titleId(f),title:E,required:s,schema:m,uiSchema:c,registry:h}),S&&o.default.createElement(y,{id:a.descriptionId(f),description:S,schema:m,uiSchema:c,registry:h}),l.map((function(e){return e.content})),a.canExpand(m,c,p)&&o.default.createElement(t.Grid.Column,{width:16,verticalAlign:"middle"},o.default.createElement(t.Grid.Row,null,o.default.createElement("div",{style:{marginTop:"1rem",position:"relative",textAlign:"right"}},o.default.createElement(b,{onClick:n(m),disabled:u||d,uiSchema:c,registry:h})))))}function P(e){var r=a.getSubmitButtonOptions(e.uiSchema),n=r.submitText,i=r.props;return r.norender?null:o.default.createElement(t.Button,d({type:"submit",primary:!0},void 0===i?{}:i),n)}var G={inverted:!1,dividing:!0};function L(e){var r=e.id,a=e.title,n=f({uiSchema:e.uiSchema,defaultSchemaProps:G});return a?o.default.createElement(t.Header,d({id:r},n,{as:"h5"}),a):null}function M(e){var r=e.children,n=e.classNames,i=e.style,l=e.disabled,u=e.id,d=e.label,s=e.onDropPropertyClick,c=e.onKeyChange,m=e.readonly,p=e.required,f=e.schema,h=e.uiSchema,v=e.registry,g=v.templates.ButtonTemplates.RemoveButton,y=(0,v.translateString)(a.TranslatableString.KeyLabel,[d]),b=v.formContext,E=b.readonlyAsDisabled;return a.ADDITIONAL_PROPERTY_FLAG in f?o.default.createElement("div",{className:n,style:i,key:u+"-key"},o.default.createElement(t.Grid,{columns:"equal"},o.default.createElement(t.Grid.Row,null,o.default.createElement(t.Grid.Column,{className:"form-additional"},o.default.createElement(t.Form.Group,{widths:"equal",grouped:!0},o.default.createElement(t.Form.Input,{className:"form-group",hasFeedback:!0,fluid:!0,htmlFor:""+u,label:y,required:p,defaultValue:d,disabled:l||(void 0===E||E)&&m,id:""+u,name:""+u,onBlur:m?void 0:function(e){return c(e.target.value)},style:b.wrapperStyle,type:"text"}))),o.default.createElement(t.Grid.Column,{className:"form-additional",verticalAlign:"middle"},r),o.default.createElement(t.Grid.Column,null,o.default.createElement(g,{iconType:"mini",className:"array-item-remove",disabled:l||m,onClick:s(d),uiSchema:h,registry:v}))))):o.default.createElement("div",{className:n,style:i},r)}function R(){return{ArrayFieldItemTemplate:y,ArrayFieldTemplate:E,BaseInputTemplate:S,ButtonTemplates:{AddButton:m,MoveDownButton:B,MoveUpButton:I,RemoveButton:w,SubmitButton:P},DescriptionFieldTemplate:x,ErrorListTemplate:F,FieldErrorTemplate:k,FieldHelpTemplate:A,FieldTemplate:q,ObjectFieldTemplate:N,TitleFieldTemplate:L,WrapIfAdditionalTemplate:M}}var U=R();function V(e){var r=e.id,n=e.value,i=e.disabled,l=e.readonly,u=e.label,s=e.autofocus,c=e.onChange,m=e.onBlur,p=e.onFocus,h=e.schema,v=e.rawErrors,g=void 0===v?[]:v,y=f({options:e.options,formContext:e.formContext,uiSchema:e.uiSchema,defaultSchemaProps:{inverted:!1}}),b=a.schemaRequiresTrueValue(h);return o.default.createElement(t.Form.Checkbox,d({id:r,name:r,disabled:i||l,autoFocus:s},y,{checked:void 0!==n&&("true"==n||1==n),error:g.length>0,onChange:function(e,t){return c&&c(t.checked)},onBlur:function(){return m&&m(r,n)},onFocus:function(){return p&&p(r,n)},required:b,label:u||"","aria-describedby":a.ariaDescribedByIds(r)}))}function j(e){var r=e.id,n=e.disabled,i=e.options,l=e.value,u=e.autofocus,s=e.readonly,c=e.onChange,m=e.onBlur,p=e.onFocus,h=e.formContext,v=e.schema,g=e.uiSchema,y=e.rawErrors,b=void 0===y?[]:y,E=e.registry,S=a.getTemplate("TitleFieldTemplate",E,i),x=i.enumOptions,F=i.enumDisabled,T=i.inline,C=Array.isArray(l)?l:[l],B=v.title,I=f({options:i,formContext:h,uiSchema:g,defaultSchemaProps:{inverted:!1}}),w=function(e){return function(t){c(t.target.checked?a.enumOptionsSelectValue(e,C,x):a.enumOptionsDeselectValue(e,C,x))}},O=function(){return m(r,l)},k=function(){return p(r,l)},A=T?{inline:!0}:{grouped:!0};return o.default.createElement(o.default.Fragment,null,B&&o.default.createElement(S,{id:a.titleId(r),title:B,schema:v,uiSchema:g,registry:E}),o.default.createElement(t.Form.Group,d({id:r,name:r},A),Array.isArray(x)&&x.map((function(e,i){var l=a.enumOptionsIsSelected(e.value,C),c=Array.isArray(F)&&-1!==F.indexOf(e.value);return o.default.createElement(t.Form.Checkbox,d({id:a.optionId(r,i),name:r,key:i,label:e.label},I,{checked:l,error:b.length>0,disabled:n||c||s,autoFocus:u&&0===i,onChange:w(i),onBlur:O,onFocus:k,"aria-describedby":a.ariaDescribedByIds(r)}))}))))}function z(e){var r=e.id,n=e.value,i=e.required,l=e.disabled,u=e.readonly,s=e.onChange,c=e.onBlur,m=e.onFocus,p=e.options,h=e.rawErrors,v=void 0===h?[]:h,g=p.enumOptions,y=p.enumDisabled,b=p.emptyValue,E=f({formContext:e.formContext,options:p,uiSchema:e.uiSchema}),S=function(e,t){return s(a.enumOptionsValueForIndex(t.value,g,b))},x=function(){return c(r,n)},F=function(){return m(r,n)};return o.default.createElement(t.Form.Group,d({},p.inline?{inline:!0}:{grouped:!0}),Array.isArray(g)&&g.map((function(e,s){var c=a.enumOptionsIsSelected(e.value,n),m=Array.isArray(y)&&-1!==y.indexOf(e.value);return o.default.createElement(t.Form.Field,d({required:i,control:t.Radio,id:a.optionId(r,s),name:r},E,{onFocus:F,onBlur:x,onChange:S,label:e.label,value:String(s),error:v.length>0,key:s,checked:c,disabled:l||m||u,"aria-describedby":a.ariaDescribedByIds(r)}))})))}function W(e){var r=e.id,n=e.value,i=e.required,l=e.readonly,u=e.disabled,s=e.onChange,c=e.onBlur,m=e.onFocus,p=e.options,h=e.schema,v=e.rawErrors,g=void 0===v?[]:v,y=f({formContext:e.formContext,options:p,uiSchema:e.uiSchema,defaultSchemaProps:{fluid:!0}});return o.default.createElement(o.default.Fragment,null,o.default.createElement(t.Input,d({id:r,key:r,name:r,type:"range",required:i,disabled:u||l},a.rangeSpec(h),y,{value:n||"",error:g.length>0,onChange:function(e){var t=e.target.value;return s&&s(""===t?p.emptyValue:t)},onBlur:function(){return c&&c(r,n)},onFocus:function(){return m&&m(r,n)},"aria-describedby":a.ariaDescribedByIds(r)})),o.default.createElement("span",null,n))}function _(e){var r=e.schema,n=e.id,i=e.options,l=e.label,s=e.required,c=e.disabled,m=e.readonly,p=e.value,h=e.multiple,v=e.placeholder,g=e.autofocus,y=e.onChange,b=e.onBlur,E=e.onFocus,S=e.rawErrors,x=void 0===S?[]:S,F=f({uiSchema:e.uiSchema,formContext:e.formContext,options:i,defaultSchemaProps:{inverted:"false",selection:!0,fluid:!0,scrolling:!0,upward:!1}}),T=i.enumOptions,C=i.emptyValue,B=h?[]:"",I=function(e,t){var r=t||[];return u.default(e,(function(e,t){var a=e.label;return{disabled:-1!==r.indexOf(e.value),key:a,text:a,value:String(t)}}))}(T,i.enumDisabled),w=a.enumOptionsIndexForValue(p,T,h);return o.default.createElement(t.Form.Dropdown,d({key:n,id:n,name:n,label:l||r.title,multiple:void 0!==h&&h,value:void 0===p?B:w,error:x.length>0,disabled:c,placeholder:v},F,{required:s,autoFocus:g,readOnly:m,options:I,onChange:function(e,t){return y(a.enumOptionsValueForIndex(t.value,T,C))},onBlur:function(e,t){return b(n,a.enumOptionsValueForIndex(t.target.value,T,C))},onFocus:function(e,t){return E(n,a.enumOptionsValueForIndex(t.target.value,T,C))},"aria-describedby":a.ariaDescribedByIds(n)}))}function K(e){var r=e.id,n=e.placeholder,i=e.value,l=e.required,u=e.disabled,s=e.autofocus,c=e.label,m=e.readonly,p=e.onBlur,h=e.onFocus,v=e.onChange,g=e.options,y=e.schema,b=e.uiSchema,E=e.registry,S=e.rawErrors,x=void 0===S?[]:S,F=f({formContext:e.formContext,options:g,defaultSchemaProps:{inverted:!1}}),T=E.schemaUtils.getDisplayLabel(y,b);return o.default.createElement(t.Form.TextArea,d({id:r,key:r,name:r,label:!!T&&(c||y.title),placeholder:n,autoFocus:s,required:l,disabled:u||m},F,{value:i||"",error:x.length>0,rows:g.rows||5,onChange:function(e){var t=e.target.value;return v&&v(""===t?g.emptyValue:t)},onBlur:function(){return p&&p(r,i)},onFocus:function(){return h&&h(r,i)},"aria-describedby":a.ariaDescribedByIds(r)}))}function H(){return{CheckboxWidget:V,CheckboxesWidget:j,RadioWidget:z,RangeWidget:W,SelectWidget:_,TextareaWidget:K}}var Y=H();function $(){return{templates:R(),widgets:H(),_internalFormWrapper:t.Form}}var J=$();function Q(){return e.withTheme($())}var X=Q();exports.Form=X,exports.Templates=U,exports.Theme=J,exports.Widgets=Y,exports.default=X,exports.generateForm=Q,exports.generateTemplates=R,exports.generateTheme=$,exports.generateWidgets=H;
2
2
  //# sourceMappingURL=semantic-ui.cjs.production.min.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"semantic-ui.cjs.production.min.js","sources":["../src/AddButton/AddButton.tsx","../src/util.tsx","../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx","../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx","../src/BaseInputTemplate/BaseInputTemplate.tsx","../src/DescriptionField/DescriptionField.tsx","../src/ErrorList/ErrorList.tsx","../src/IconButton/IconButton.tsx","../src/FieldErrorTemplate/FieldErrorTemplate.tsx","../src/FieldHelpTemplate/FieldHelpTemplate.tsx","../src/FieldTemplate/FieldTemplate.tsx","../src/ObjectFieldTemplate/ObjectFieldTemplate.tsx","../src/SubmitButton/SubmitButton.tsx","../src/TitleField/TitleField.tsx","../src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx","../src/Templates/Templates.ts","../src/CheckboxWidget/CheckboxWidget.tsx","../src/CheckboxesWidget/CheckboxesWidget.tsx","../src/RadioWidget/RadioWidget.tsx","../src/RangeWidget/RangeWidget.tsx","../src/SelectWidget/SelectWidget.tsx","../src/TextareaWidget/TextareaWidget.tsx","../src/Widgets/Widgets.tsx","../src/Theme/Theme.ts","../src/SemanticUIForm/SemanticUIForm.ts"],"sourcesContent":["import React from \"react\";\nimport { Button, Icon, ButtonProps } from \"semantic-ui-react\";\nimport {\n FormContextType,\n IconButtonProps,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\n\n/** The `AddButton` renders a button that represent the `Add` action on a form\n */\nexport default function AddButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ uiSchema, registry, color, ...props }: IconButtonProps<T, S, F>) {\n return (\n <Button\n title=\"Add Item\"\n color={color as ButtonProps[\"color\"]}\n {...props}\n icon\n size=\"tiny\"\n >\n <Icon name=\"plus\" />\n </Button>\n );\n}\n","import React from \"react\";\nimport {\n UiSchema,\n GenericObjectType,\n getUiOptions,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n UIOptionsType,\n} from \"@rjsf/utils\";\n\nexport type SemanticPropsTypes<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n> = {\n formContext?: F;\n uiSchema?: UiSchema<T, S, F>;\n options?: UIOptionsType<T, S, F>;\n defaultSchemaProps?: GenericObjectType;\n defaultContextProps?: GenericObjectType;\n};\n\nexport type SemanticErrorPropsType<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n> = {\n formContext?: F;\n uiSchema?: UiSchema<T, S, F>;\n options?: UIOptionsType<T, S, F>;\n defaultProps?: GenericObjectType;\n};\n\nexport type WrapProps = GenericObjectType & {\n wrap: boolean;\n component?: React.ElementType;\n};\n\n/**\n * Extract props meant for semantic UI components from props that are\n * passed to Widgets, Templates and Fields.\n * @param {Object} params\n * @param {Object?} params.formContext\n * @param {Object?} params.uiSchema\n * @param {Object?} params.options\n * @param {Object?} params.defaultSchemaProps\n * @param {Object?} params.defaultContextProps\n * @returns {any}\n */\nexport function getSemanticProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({\n formContext = {} as F,\n uiSchema = {},\n options = {},\n defaultSchemaProps = { fluid: true, inverted: false },\n defaultContextProps = {},\n}: SemanticPropsTypes<T, S, F>) {\n const formContextProps = formContext.semantic;\n const schemaProps = getUiOptions<T, S, F>(uiSchema).semantic;\n const optionProps = options.semantic;\n // formContext props should overide other props\n return Object.assign(\n {},\n { ...defaultSchemaProps },\n { ...defaultContextProps },\n schemaProps,\n optionProps,\n formContextProps\n );\n}\n\n/**\n * Extract error props meant for semantic UI components from props that are\n * passed to Widgets, Templates and Fields.\n * @param {Object} params\n * @param {Object?} params.formContext\n * @param {Object?} params.uiSchema\n * @param {Object?} params.defaultProps\n * @returns {any}\n */\nexport function getSemanticErrorProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({\n formContext = {} as F,\n uiSchema = {},\n options = {},\n defaultProps = { size: \"small\", pointing: \"above\" },\n}: SemanticErrorPropsType<T, S, F>) {\n const formContextProps =\n formContext.semantic && formContext.semantic.errorOptions;\n const semanticOptions: GenericObjectType = getUiOptions<T, S, F>(uiSchema)\n .semantic as GenericObjectType;\n const schemaProps = semanticOptions && semanticOptions.errorOptions;\n const optionProps =\n options.semantic && (options.semantic as GenericObjectType).errorOptions;\n\n return Object.assign(\n {},\n { ...defaultProps },\n schemaProps,\n optionProps,\n formContextProps\n );\n}\n\n/**\n * Combine multiple strings containing class names into a single string,\n * removing duplicates. E.g.\n * cleanClassNames('bar', 'baz bar', 'x y ', undefined)\n * // 'bar baz x y'\n * @param {Array} classNameArr\n * @param {Array} omit\n * @returns {string}\n */\nexport function cleanClassNames(\n classNameArr: Array<string | undefined>,\n omit: string[] = []\n) {\n // Split each arg on whitespace, and add it to an array. Skip false-y args\n // like \"\" and undefined.\n const classList = classNameArr\n .filter(Boolean)\n .reduce<string[]>(\n (previous, current) => previous.concat(current!.trim().split(/\\s+/)),\n []\n );\n\n // Remove any class names from omit, and make the rest unique before\n // returning them as a string\n return [...new Set(classList.filter((cn) => !omit.includes(cn)))].join(\" \");\n}\n\n/**\n *\n * @param {boolean} wrap\n * @param Component\n * @param {Object} props\n * @returns {*}\n * @constructor\n */\nexport function MaybeWrap({\n wrap,\n component: Component = \"div\",\n ...props\n}: WrapProps) {\n return wrap ? <Component {...props} /> : props.children;\n}\n","import React from \"react\";\nimport {\n ArrayFieldTemplateItemType,\n FormContextType,\n GenericObjectType,\n RJSFSchema,\n StrictRJSFSchema,\n getUiOptions,\n} from \"@rjsf/utils\";\nimport { Button, Grid, Segment } from \"semantic-ui-react\";\n\nimport { MaybeWrap } from \"../util\";\n\nconst gridStyle = (vertical: boolean) => ({\n display: \"grid\",\n gridTemplateColumns: `1fr ${vertical ? 65 : 110}px`,\n});\n\n/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.\n *\n * @param props - The `ArrayFieldTemplateItemType` props for the component\n */\nexport default function ArrayFieldItemTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: ArrayFieldTemplateItemType<T, S, F>) {\n const {\n children,\n disabled,\n hasToolbar,\n hasMoveDown,\n hasMoveUp,\n hasRemove,\n index,\n onDropIndexClick,\n onReorderClick,\n readonly,\n uiSchema,\n registry,\n } = props;\n const { MoveDownButton, MoveUpButton, RemoveButton } =\n registry.templates.ButtonTemplates;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n // Pull the semantic props out of the uiOptions that were put in via the ArrayFieldTemplate\n const { horizontalButtons = false, wrapItem = false } =\n uiOptions.semantic as GenericObjectType;\n return (\n <div className=\"array-item\">\n <MaybeWrap wrap={wrapItem} component={Segment}>\n <Grid\n style={\n index !== 0\n ? { ...gridStyle(!horizontalButtons), alignItems: \"center\" }\n : gridStyle(!horizontalButtons)\n }\n >\n <Grid.Column width={16} verticalAlign=\"middle\">\n {children}\n </Grid.Column>\n {hasToolbar && (\n <Grid.Column>\n {(hasMoveUp || hasMoveDown || hasRemove) && (\n <Button.Group size=\"mini\" vertical={!horizontalButtons}>\n {(hasMoveUp || hasMoveDown) && (\n <MoveUpButton\n className=\"array-item-move-up\"\n disabled={disabled || readonly || !hasMoveUp}\n onClick={onReorderClick(index, index - 1)}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {(hasMoveUp || hasMoveDown) && (\n <MoveDownButton\n className=\"array-item-move-down\"\n disabled={disabled || readonly || !hasMoveDown}\n onClick={onReorderClick(index, index + 1)}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {hasRemove && (\n <RemoveButton\n className=\"array-item-remove\"\n disabled={disabled || readonly}\n onClick={onDropIndexClick(index)}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </Button.Group>\n )}\n </Grid.Column>\n )}\n </Grid>\n </MaybeWrap>\n </div>\n );\n}\n","import React from \"react\";\nimport {\n getTemplate,\n getUiOptions,\n isFixedItems,\n ArrayFieldTemplateProps,\n ArrayFieldTemplateItemType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n UI_OPTIONS_KEY,\n} from \"@rjsf/utils\";\n\nimport { cleanClassNames, getSemanticProps } from \"../util\";\n\n/** The `ArrayFieldTemplate` component is the template used to render all items in an array.\n *\n * @param props - The `ArrayFieldTemplateItemType` props for the component\n */\nexport default function ArrayFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: ArrayFieldTemplateProps<T, S, F>) {\n const {\n uiSchema,\n idSchema,\n canAdd,\n className,\n // classNames, This is not part of the type, so it is likely never passed in\n disabled,\n formContext,\n items,\n onAddClick,\n // options, This is not part of the type, so it is likely never passed in\n readonly,\n required,\n schema,\n title,\n registry,\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext,\n defaultSchemaProps: { horizontalButtons: false, wrapItem: false },\n });\n const { horizontalButtons, wrapItem } = semanticProps;\n const semantic = { horizontalButtons, wrapItem };\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldDescriptionTemplate = getTemplate<\n \"ArrayFieldDescriptionTemplate\",\n T,\n S,\n F\n >(\"ArrayFieldDescriptionTemplate\", registry, uiOptions);\n const ArrayFieldItemTemplate = getTemplate<\"ArrayFieldItemTemplate\", T, S, F>(\n \"ArrayFieldItemTemplate\",\n registry,\n uiOptions\n );\n const ArrayFieldTitleTemplate = getTemplate<\n \"ArrayFieldTitleTemplate\",\n T,\n S,\n F\n >(\"ArrayFieldTitleTemplate\", registry, uiOptions);\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <div\n className={cleanClassNames([\n className,\n isFixedItems<S>(schema) ? \"\" : \"sortable-form-fields\",\n ])}\n >\n <ArrayFieldTitleTemplate\n idSchema={idSchema}\n title={uiOptions.title || title}\n schema={schema}\n uiSchema={uiSchema}\n required={required}\n registry={registry}\n />\n <ArrayFieldDescriptionTemplate\n idSchema={idSchema}\n description={uiOptions.description || schema.description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n <div key={`array-item-list-${idSchema.$id}`}>\n <div className=\"row array-item-list\">\n {items &&\n items.map(\n ({\n key,\n uiSchema: itemUiSchema = {},\n ...props\n }: ArrayFieldTemplateItemType<T, S, F>) => {\n // Merge in the semantic props from the ArrayFieldTemplate into each of the items\n const mergedUiSchema = {\n ...itemUiSchema,\n [UI_OPTIONS_KEY]: {\n ...itemUiSchema[UI_OPTIONS_KEY],\n semantic,\n },\n };\n return (\n <ArrayFieldItemTemplate\n key={key}\n {...props}\n uiSchema={mergedUiSchema}\n />\n );\n }\n )}\n </div>\n {canAdd && (\n <div\n style={{\n marginTop: \"1rem\",\n position: \"relative\",\n textAlign: \"right\",\n }}\n >\n <AddButton\n onClick={onAddClick}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n )}\n </div>\n </div>\n );\n}\n","import React from \"react\";\nimport { Form } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\nimport {\n ariaDescribedByIds,\n examplesId,\n getInputProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\n\n/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.\n * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.\n * It can be customized/overridden for other themes or individual implementations as needed.\n *\n * @param props - The `WidgetProps` for this template\n */\nexport default function BaseInputTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n placeholder,\n label,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onBlur,\n onFocus,\n autofocus,\n options,\n schema,\n uiSchema,\n formContext,\n type,\n registry,\n rawErrors = [],\n } = props;\n const inputProps = getInputProps<T, S, F>(schema, type, options);\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext,\n options,\n });\n const { schemaUtils } = registry;\n const _onChange = ({\n target: { value },\n }: React.ChangeEvent<HTMLInputElement>) =>\n onChange(value === \"\" ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);\n\n return (\n <>\n <Form.Input\n key={id}\n id={id}\n name={id}\n placeholder={placeholder}\n {...inputProps}\n label={displayLabel ? label || schema.title : false}\n required={required}\n autoFocus={autofocus}\n disabled={disabled || readonly}\n list={schema.examples ? examplesId<T>(id) : undefined}\n {...semanticProps}\n value={value || value === 0 ? value : \"\"}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}\n />\n {Array.isArray(schema.examples) && (\n <datalist id={examplesId<T>(id)}>\n {(schema.examples as string[])\n .concat(\n schema.default && !schema.examples.includes(schema.default)\n ? ([schema.default] as string[])\n : []\n )\n .map((example) => {\n return <option key={example} value={example} />;\n })}\n </datalist>\n )}\n </>\n );\n}\n","import React from \"react\";\nimport {\n DescriptionFieldProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\n\n/** The `DescriptionField` is the template to use to render the description of a field\n *\n * @param props - The `DescriptionFieldProps` for this component\n */\nexport default function DescriptionField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: DescriptionFieldProps<T, S, F>) {\n const { id, description } = props;\n if (!description) {\n return null;\n }\n return (\n <p id={id} className=\"sui-description\">\n {description}\n </p>\n );\n}\n","import React from \"react\";\nimport { Message } from \"semantic-ui-react\";\nimport {\n ErrorListProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\n\n/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`\n *\n * @param props - The `ErrorListProps` for this component\n */\nexport default function ErrorList<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ errors }: ErrorListProps<T, S, F>) {\n return (\n <Message negative>\n <Message.Header>Errors</Message.Header>\n <Message.List>\n {errors.map((error, index) => (\n <Message.Item key={`error-${index}`}>{error.stack}</Message.Item>\n ))}\n </Message.List>\n </Message>\n );\n}\n","import React from \"react\";\nimport { Button, ButtonProps } from \"semantic-ui-react\";\nimport {\n FormContextType,\n IconButtonProps,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\n\nfunction IconButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: IconButtonProps<T, S, F>) {\n const {\n icon,\n iconType,\n color,\n className,\n uiSchema,\n registry,\n ...otherProps\n } = props;\n return (\n <Button\n icon={icon}\n size={iconType as ButtonProps[\"size\"]}\n color={color as ButtonProps[\"color\"]}\n className={className}\n {...otherProps}\n />\n );\n}\n\nexport default IconButton;\n\nexport function MoveDownButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: IconButtonProps<T, S, F>) {\n return <IconButton title=\"Move down\" {...props} icon=\"angle down\" />;\n}\n\nexport function MoveUpButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: IconButtonProps<T, S, F>) {\n return <IconButton title=\"Move up\" {...props} icon=\"angle up\" />;\n}\n\nexport function RemoveButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: IconButtonProps<T, S, F>) {\n return <IconButton title=\"Remove\" {...props} icon=\"trash\" />;\n}\n","import React from \"react\";\nimport {\n FieldErrorProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\nimport { nanoid } from \"nanoid\";\nimport { Label, List } from \"semantic-ui-react\";\n\nimport { getSemanticErrorProps } from \"../util\";\n\nconst DEFAULT_OPTIONS = {\n options: {\n pointing: \"above\",\n size: \"small\",\n },\n};\n\n/** The `FieldErrorTemplate` component renders the errors local to the particular field\n *\n * @param props - The `FieldErrorProps` for the errors being rendered\n */\nexport default function FieldErrorTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ errors, idSchema, uiSchema, registry }: FieldErrorProps<T, S, F>) {\n const { formContext } = registry;\n const options = getSemanticErrorProps<T, S, F>({\n formContext,\n uiSchema,\n defaultProps: DEFAULT_OPTIONS,\n });\n const { pointing, size } = options;\n if (errors && errors.length > 0) {\n const id = `${idSchema.$id}__error`;\n return (\n <Label\n id={id}\n color=\"red\"\n pointing={pointing || \"above\"}\n size={size || \"small\"}\n basic\n >\n <List bulleted>\n {errors.map((error) => (\n <List.Item key={nanoid()}>{error}</List.Item>\n ))}\n </List>\n </Label>\n );\n }\n return null;\n}\n","import React from \"react\";\nimport { Message } from \"semantic-ui-react\";\nimport {\n FieldHelpProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\n\n/** The `FieldHelpTemplate` component renders any help desired for a field\n *\n * @param props - The `FieldHelpProps` to be rendered\n */\nexport default function FieldHelpTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: FieldHelpProps<T, S, F>) {\n const { idSchema, help } = props;\n if (help) {\n const id = `${idSchema.$id}__help`;\n return <Message size=\"mini\" info id={id} content={help} />;\n }\n return null;\n}\n","import React from \"react\";\nimport {\n FieldTemplateProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n descriptionId,\n getTemplate,\n getUiOptions,\n} from \"@rjsf/utils\";\nimport { Form } from \"semantic-ui-react\";\nimport { getSemanticProps, MaybeWrap } from \"../util\";\n\n/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field\n * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.\n *\n * @param props - The `FieldTemplateProps` for this component\n */\nexport default function FieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: FieldTemplateProps<T, S, F>) {\n const {\n id,\n children,\n classNames,\n style,\n displayLabel,\n label,\n errors,\n help,\n hidden,\n rawDescription,\n registry,\n schema,\n uiSchema,\n ...otherProps\n } = props;\n const semanticProps = getSemanticProps<T, S, F>(otherProps);\n const { wrapLabel, wrapContent } = semanticProps;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const WrapIfAdditionalTemplate = getTemplate<\n \"WrapIfAdditionalTemplate\",\n T,\n S,\n F\n >(\"WrapIfAdditionalTemplate\", registry, uiOptions);\n const DescriptionFieldTemplate = getTemplate<\n \"DescriptionFieldTemplate\",\n T,\n S,\n F\n >(\"DescriptionFieldTemplate\", registry, uiOptions);\n\n if (hidden) {\n return <div style={{ display: \"none\" }}>{children}</div>;\n }\n\n return (\n <WrapIfAdditionalTemplate\n classNames={classNames}\n style={style}\n id={id}\n label={label}\n registry={registry}\n schema={schema}\n uiSchema={uiSchema}\n {...otherProps}\n >\n <Form.Group key={id} widths=\"equal\" grouped>\n <MaybeWrap wrap={wrapContent} className=\"sui-field-content\">\n {children}\n {displayLabel && rawDescription && (\n <MaybeWrap wrap={wrapLabel} className=\"sui-field-label\">\n {rawDescription && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(id)}\n description={rawDescription}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </MaybeWrap>\n )}\n {help}\n {errors}\n </MaybeWrap>\n </Form.Group>\n </WrapIfAdditionalTemplate>\n );\n}\n","import React from \"react\";\nimport { Grid } from \"semantic-ui-react\";\nimport {\n FormContextType,\n ObjectFieldTemplateProps,\n RJSFSchema,\n StrictRJSFSchema,\n canExpand,\n descriptionId,\n getTemplate,\n getUiOptions,\n titleId,\n} from \"@rjsf/utils\";\n\n/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the\n * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all\n * the properties.\n *\n * @param props - The `ObjectFieldTemplateProps` for this component\n */\nexport default function ObjectFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: ObjectFieldTemplateProps<T, S, F>) {\n const {\n description,\n onAddClick,\n title,\n properties,\n disabled,\n readonly,\n required,\n uiSchema,\n schema,\n formData,\n idSchema,\n registry,\n } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const TitleFieldTemplate = getTemplate<\"TitleFieldTemplate\", T, S, F>(\n \"TitleFieldTemplate\",\n registry,\n uiOptions\n );\n const DescriptionFieldTemplate = getTemplate<\n \"DescriptionFieldTemplate\",\n T,\n S,\n F\n >(\"DescriptionFieldTemplate\", registry, uiOptions);\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n const fieldTitle = uiOptions.title || title;\n const fieldDescription = uiOptions.description || description;\n return (\n <>\n {fieldTitle && (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={fieldTitle}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {fieldDescription && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(idSchema)}\n description={fieldDescription}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {properties.map((prop) => prop.content)}\n {canExpand<T, S, F>(schema, uiSchema, formData) && (\n <Grid.Column width={16} verticalAlign=\"middle\">\n <Grid.Row>\n <div\n style={{\n marginTop: \"1rem\",\n position: \"relative\",\n textAlign: \"right\",\n }}\n >\n <AddButton\n onClick={onAddClick(schema)}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n </Grid.Row>\n </Grid.Column>\n )}\n </>\n );\n}\n","import React from \"react\";\nimport { Button } from \"semantic-ui-react\";\nimport {\n getSubmitButtonOptions,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n SubmitButtonProps,\n} from \"@rjsf/utils\";\n\n/** The `SubmitButton` renders a button that represent the `Submit` action on a form\n */\nexport default function SubmitButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ uiSchema }: SubmitButtonProps<T, S, F>) {\n const {\n submitText,\n norender,\n props: submitButtonProps = {},\n } = getSubmitButtonOptions<T, S, F>(uiSchema);\n if (norender) {\n return null;\n }\n return (\n <Button type=\"submit\" primary {...submitButtonProps}>\n {submitText}\n </Button>\n );\n}\n","import React from \"react\";\nimport {\n FormContextType,\n TitleFieldProps,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\nimport { Header } from \"semantic-ui-react\";\n\nimport { getSemanticProps } from \"../util\";\n\nconst DEFAULT_OPTIONS = {\n inverted: false,\n dividing: true,\n};\n\n/** The `TitleField` is the template to use to render the title of a field\n *\n * @param props - The `TitleFieldProps` for this component\n */\nexport default function TitleField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ id, title, uiSchema }: TitleFieldProps<T, S, F>) {\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n defaultSchemaProps: DEFAULT_OPTIONS,\n });\n if (!title) {\n return null;\n }\n return (\n <Header id={id} {...semanticProps} as=\"h5\">\n {title}\n </Header>\n );\n}\n","import React from \"react\";\nimport {\n ADDITIONAL_PROPERTY_FLAG,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WrapIfAdditionalTemplateProps,\n} from \"@rjsf/utils\";\nimport { Form, Grid } from \"semantic-ui-react\";\n\n/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are\n * part of an `additionalProperties` part of a schema.\n *\n * @param props - The `WrapIfAdditionalProps` for this component\n */\nexport default function WrapIfAdditionalTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WrapIfAdditionalTemplateProps<T, S, F>) {\n const {\n children,\n classNames,\n style,\n disabled,\n id,\n label,\n onDropPropertyClick,\n onKeyChange,\n readonly,\n required,\n schema,\n uiSchema,\n registry,\n } = props;\n // Button templates are not overridden in the uiSchema\n const { RemoveButton } = registry.templates.ButtonTemplates;\n const { readonlyAsDisabled = true, wrapperStyle } = registry.formContext;\n\n const keyLabel = `${label} Key`; // i18n ?\n const additional = ADDITIONAL_PROPERTY_FLAG in schema;\n\n if (!additional) {\n return (\n <div className={classNames} style={style}>\n {children}\n </div>\n );\n }\n\n const handleBlur = ({ target }: React.FocusEvent<HTMLInputElement>) =>\n onKeyChange(target.value);\n\n return (\n <div className={classNames} style={style} key={`${id}-key`}>\n <Grid columns=\"equal\">\n <Grid.Row>\n <Grid.Column className=\"form-additional\">\n <Form.Group widths=\"equal\" grouped>\n <Form.Input\n className=\"form-group\"\n hasFeedback\n fluid\n htmlFor={`${id}`}\n label={keyLabel}\n required={required}\n defaultValue={label}\n disabled={disabled || (readonlyAsDisabled && readonly)}\n id={`${id}`}\n name={`${id}`}\n onBlur={!readonly ? handleBlur : undefined}\n style={wrapperStyle}\n type=\"text\"\n ></Form.Input>\n </Form.Group>\n </Grid.Column>\n <Grid.Column className=\"form-additional\" verticalAlign=\"middle\">\n {children}\n </Grid.Column>\n <Grid.Column>\n <RemoveButton\n iconType=\"mini\"\n className=\"array-item-remove\"\n disabled={disabled || readonly}\n onClick={onDropPropertyClick(label)}\n uiSchema={uiSchema}\n registry={registry}\n />\n </Grid.Column>\n </Grid.Row>\n </Grid>\n </div>\n );\n}\n","import {\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TemplatesType,\n} from \"@rjsf/utils\";\n\nimport AddButton from \"../AddButton\";\nimport ArrayFieldItemTemplate from \"../ArrayFieldItemTemplate\";\nimport ArrayFieldTemplate from \"../ArrayFieldTemplate\";\nimport BaseInputTemplate from \"../BaseInputTemplate\";\nimport DescriptionField from \"../DescriptionField\";\nimport ErrorList from \"../ErrorList\";\nimport { MoveDownButton, MoveUpButton, RemoveButton } from \"../IconButton\";\nimport FieldErrorTemplate from \"../FieldErrorTemplate\";\nimport FieldHelpTemplate from \"../FieldHelpTemplate\";\nimport FieldTemplate from \"../FieldTemplate\";\nimport ObjectFieldTemplate from \"../ObjectFieldTemplate\";\nimport SubmitButton from \"../SubmitButton\";\nimport TitleField from \"../TitleField\";\nimport WrapIfAdditionalTemplate from \"../WrapIfAdditionalTemplate\";\n\nexport function generateTemplates<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(): Partial<TemplatesType<T, S, F>> {\n return {\n ArrayFieldItemTemplate,\n ArrayFieldTemplate,\n BaseInputTemplate,\n ButtonTemplates: {\n AddButton,\n MoveDownButton,\n MoveUpButton,\n RemoveButton,\n SubmitButton,\n },\n DescriptionFieldTemplate: DescriptionField,\n ErrorListTemplate: ErrorList,\n FieldErrorTemplate,\n FieldHelpTemplate,\n FieldTemplate,\n ObjectFieldTemplate,\n TitleFieldTemplate: TitleField,\n WrapIfAdditionalTemplate,\n };\n}\n\nexport default generateTemplates();\n","import React from \"react\";\nimport {\n ariaDescribedByIds,\n schemaRequiresTrueValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\nimport { Form, CheckboxProps } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `CheckBoxWidget` is a widget for rendering boolean properties.\n * It is typically used to represent a boolean.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function CheckboxWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n value,\n disabled,\n readonly,\n label,\n autofocus,\n onChange,\n onBlur,\n options,\n onFocus,\n formContext,\n schema,\n uiSchema,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n options,\n formContext,\n uiSchema,\n defaultSchemaProps: {\n inverted: false,\n },\n });\n // Because an unchecked checkbox will cause html5 validation to fail, only add\n // the \"required\" attribute if the field value must be \"true\", due to the\n // \"const\" or \"enum\" keywords\n const required = schemaRequiresTrueValue<S>(schema);\n const _onChange = (\n _: React.FormEvent<HTMLInputElement>,\n data: CheckboxProps\n ) => onChange && onChange(data.checked);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n const checked = value == \"true\" || value == true;\n return (\n <Form.Checkbox\n id={id}\n name={id}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n {...semanticProps}\n checked={typeof value === \"undefined\" ? false : checked}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n required={required}\n label={label || \"\"}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n","import React from \"react\";\nimport { Form } from \"semantic-ui-react\";\nimport {\n ariaDescribedByIds,\n enumOptionsDeselectValue,\n enumOptionsIsSelected,\n enumOptionsSelectValue,\n getTemplate,\n optionId,\n titleId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `CheckboxesWidget` is a widget for rendering checkbox groups.\n * It is typically used to represent an array of enums.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function CheckboxesWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n disabled,\n options,\n value,\n autofocus,\n readonly,\n onChange,\n onBlur,\n onFocus,\n formContext,\n schema,\n uiSchema,\n rawErrors = [],\n registry,\n } = props;\n const TitleFieldTemplate = getTemplate<\"TitleFieldTemplate\", T, S, F>(\n \"TitleFieldTemplate\",\n registry,\n options\n );\n const { enumOptions, enumDisabled, inline } = options;\n const checkboxesValues = Array.isArray(value) ? value : [value];\n const { title } = schema;\n const semanticProps = getSemanticProps<T, S, F>({\n options,\n formContext,\n uiSchema,\n defaultSchemaProps: {\n inverted: false,\n },\n });\n const _onChange =\n (index: number) =>\n ({ target: { checked } }: React.ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line no-shadow\n if (checked) {\n onChange(\n enumOptionsSelectValue<S>(index, checkboxesValues, enumOptions)\n );\n } else {\n onChange(\n enumOptionsDeselectValue<S>(index, checkboxesValues, enumOptions)\n );\n }\n };\n\n const _onBlur = () => onBlur(id, value);\n const _onFocus = () => onFocus(id, value);\n const inlineOption = inline ? { inline: true } : { grouped: true };\n return (\n <>\n {title && (\n <TitleFieldTemplate\n id={titleId<T>(id)}\n title={title}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n <Form.Group id={id} name={id} {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(\n option.value,\n checkboxesValues\n );\n const itemDisabled =\n Array.isArray(enumDisabled) &&\n enumDisabled.indexOf(option.value) !== -1;\n return (\n <Form.Checkbox\n id={optionId(id, index)}\n name={id}\n key={index}\n label={option.label}\n {...semanticProps}\n checked={checked}\n error={rawErrors.length > 0}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && index === 0}\n onChange={_onChange(index)}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n })}\n </Form.Group>\n </>\n );\n}\n","import React from \"react\";\nimport {\n ariaDescribedByIds,\n enumOptionsIsSelected,\n enumOptionsValueForIndex,\n optionId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\nimport { CheckboxProps, Form, Radio } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `RadioWidget` is a widget for rendering a radio group.\n * It is typically used with a string property constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RadioWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n value,\n required,\n disabled,\n readonly,\n onChange,\n onBlur,\n onFocus,\n options,\n formContext,\n uiSchema,\n rawErrors = [],\n } = props;\n const { enumOptions, enumDisabled, emptyValue } = options;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext,\n options,\n uiSchema,\n });\n const _onChange = (\n _: React.FormEvent<HTMLInputElement>,\n { value: eventValue }: CheckboxProps\n ) => {\n return onChange(\n enumOptionsValueForIndex<S>(eventValue!, enumOptions, emptyValue)\n );\n };\n\n const _onBlur = () => onBlur(id, value);\n const _onFocus = () => onFocus(id, value);\n const inlineOption = options.inline ? { inline: true } : { grouped: true };\n return (\n <Form.Group {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, value);\n const itemDisabled =\n Array.isArray(enumDisabled) &&\n enumDisabled.indexOf(option.value) !== -1;\n return (\n <Form.Field\n required={required}\n control={Radio}\n id={optionId(id, index)}\n name={id}\n {...semanticProps}\n onFocus={_onFocus}\n onBlur={_onBlur}\n onChange={_onChange}\n label={option.label}\n value={String(index)}\n error={rawErrors.length > 0}\n key={index}\n checked={checked}\n disabled={disabled || itemDisabled || readonly}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n })}\n </Form.Group>\n );\n}\n","import React from \"react\";\nimport { Input } from \"semantic-ui-react\";\nimport {\n ariaDescribedByIds,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n rangeSpec,\n} from \"@rjsf/utils\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result\n * in a div, with the value along side it.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RangeWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onBlur,\n onFocus,\n options,\n schema,\n uiSchema,\n formContext,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext,\n options,\n uiSchema,\n defaultSchemaProps: {\n fluid: true,\n },\n });\n\n // eslint-disable-next-line no-shadow\n const _onChange = ({\n target: { value },\n }: React.ChangeEvent<HTMLInputElement>) =>\n onChange && onChange(value === \"\" ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n\n return (\n <>\n <Input\n id={id}\n key={id}\n name={id}\n type=\"range\"\n required={required}\n disabled={disabled || readonly}\n {...rangeSpec<S>(schema)}\n {...semanticProps}\n value={value || \"\"}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n <span>{value}</span>\n </>\n );\n}\n","import React from \"react\";\nimport {\n ariaDescribedByIds,\n enumOptionsIndexForValue,\n enumOptionsValueForIndex,\n EnumOptionsType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n UIOptionsType,\n} from \"@rjsf/utils\";\nimport map from \"lodash/map\";\nimport { Form, DropdownProps } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\n\n/**\n * Returns and creates an array format required for semantic drop down\n * @param {array} enumOptions- array of items for the dropdown\n * @param {array} enumDisabled - array of enum option values to disable\n * @returns {*}\n */\nfunction createDefaultValueOptionsForDropDown<\n S extends StrictRJSFSchema = RJSFSchema\n>(\n enumOptions?: EnumOptionsType<S>[],\n enumDisabled?: UIOptionsType[\"enumDisabled\"]\n) {\n const disabledOptions = enumDisabled || [];\n const options = map(enumOptions, ({ label, value }, index) => ({\n disabled: disabledOptions.indexOf(value) !== -1,\n key: label,\n text: label,\n value: String(index),\n }));\n return options;\n}\n\n/** The `SelectWidget` is a widget for rendering dropdowns.\n * It is typically used with string properties constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function SelectWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n schema,\n uiSchema,\n formContext,\n id,\n options,\n label,\n required,\n disabled,\n readonly,\n value,\n multiple,\n placeholder,\n autofocus,\n onChange,\n onBlur,\n onFocus,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext,\n options,\n defaultSchemaProps: {\n inverted: \"false\",\n selection: true,\n fluid: true,\n scrolling: true,\n upward: false,\n },\n });\n const { enumDisabled, enumOptions, emptyValue: optEmptyVal } = options;\n const emptyValue = multiple ? [] : \"\";\n const dropdownOptions = createDefaultValueOptionsForDropDown<S>(\n enumOptions,\n enumDisabled\n );\n const _onChange = (\n _: React.SyntheticEvent<HTMLElement>,\n { value }: DropdownProps\n ) =>\n onChange(\n enumOptionsValueForIndex<S>(value as string[], enumOptions, optEmptyVal)\n );\n // eslint-disable-next-line no-shadow\n const _onBlur = (\n _: React.FocusEvent<HTMLElement>,\n { target: { value } }: DropdownProps\n ) => onBlur(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));\n const _onFocus = (\n _: React.FocusEvent<HTMLElement>,\n { target: { value } }: DropdownProps\n ) =>\n onFocus(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));\n const selectedIndexes = enumOptionsIndexForValue<S>(\n value,\n enumOptions,\n multiple\n );\n\n return (\n <Form.Dropdown\n key={id}\n id={id}\n name={id}\n label={label || schema.title}\n multiple={typeof multiple === \"undefined\" ? false : multiple}\n value={typeof value === \"undefined\" ? emptyValue : selectedIndexes}\n error={rawErrors.length > 0}\n disabled={disabled}\n placeholder={placeholder}\n {...semanticProps}\n required={required}\n autoFocus={autofocus}\n readOnly={readonly}\n options={dropdownOptions}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n","import React from \"react\";\nimport {\n ariaDescribedByIds,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\nimport { Form } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `TextareaWidget` is a widget for rendering input fields as textarea.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function TextareaWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n placeholder,\n value,\n required,\n disabled,\n autofocus,\n label,\n readonly,\n onBlur,\n onFocus,\n onChange,\n options,\n schema,\n uiSchema,\n formContext,\n registry,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext,\n options,\n defaultSchemaProps: { inverted: false },\n });\n const { schemaUtils } = registry;\n // eslint-disable-next-line no-shadow\n const _onChange = ({\n target: { value },\n }: React.ChangeEvent<HTMLTextAreaElement>) =>\n onChange && onChange(value === \"\" ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);\n return (\n <Form.TextArea\n id={id}\n key={id}\n name={id}\n label={displayLabel ? label || schema.title : false}\n placeholder={placeholder}\n autoFocus={autofocus}\n required={required}\n disabled={disabled || readonly}\n {...semanticProps}\n value={value || \"\"}\n error={rawErrors.length > 0}\n rows={options.rows || 5}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n","import {\n FormContextType,\n RegistryWidgetsType,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\n\nimport CheckboxWidget from \"../CheckboxWidget/CheckboxWidget\";\nimport CheckboxesWidget from \"../CheckboxesWidget/CheckboxesWidget\";\nimport RadioWidget from \"../RadioWidget/RadioWidget\";\nimport RangeWidget from \"../RangeWidget/RangeWidget\";\nimport SelectWidget from \"../SelectWidget/SelectWidget\";\nimport TextareaWidget from \"../TextareaWidget/TextareaWidget\";\n\nexport function generateWidgets<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(): RegistryWidgetsType<T, S, F> {\n return {\n CheckboxWidget,\n CheckboxesWidget,\n RadioWidget,\n RangeWidget,\n SelectWidget,\n TextareaWidget,\n };\n}\n\nexport default generateWidgets();\n","import { FormContextType, RJSFSchema, StrictRJSFSchema } from \"@rjsf/utils\";\nimport { ThemeProps } from \"@rjsf/core\";\nimport { Form as SuiForm } from \"semantic-ui-react\";\n\nimport { generateTemplates } from \"../Templates\";\nimport { generateWidgets } from \"../Widgets\";\n\nexport function generateTheme<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(): ThemeProps<T, S, F> {\n return {\n templates: generateTemplates<T, S, F>(),\n widgets: generateWidgets<T, S, F>(),\n _internalFormWrapper: SuiForm,\n };\n}\n\nexport default generateTheme();\n","import { ComponentType } from \"react\";\nimport { withTheme, FormProps } from \"@rjsf/core\";\nimport { FormContextType, RJSFSchema, StrictRJSFSchema } from \"@rjsf/utils\";\n\nimport { generateTheme } from \"../Theme\";\n\nexport function generateForm<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(): ComponentType<FormProps<T, S, F>> {\n return withTheme<T, S, F>(generateTheme<T, S, F>());\n}\n\nexport default generateForm();\n"],"names":["AddButton","_ref","uiSchema","color","props","_objectWithoutPropertiesLoose","_excluded","React","createElement","Button","_extends","title","icon","size","Icon","name","getSemanticProps","_ref$formContext","formContext","_ref$uiSchema","_ref$options","options","_ref$defaultSchemaPro","defaultSchemaProps","fluid","inverted","_ref$defaultContextPr","defaultContextProps","formContextProps","semantic","schemaProps","getUiOptions","optionProps","Object","assign","cleanClassNames","classNameArr","omit","classList","filter","Boolean","reduce","previous","current","concat","trim","split","Set","cn","includes","join","MaybeWrap","_ref3","wrap","_ref3$component","component","Component","children","gridStyle","vertical","display","gridTemplateColumns","ArrayFieldItemTemplate","disabled","hasToolbar","hasMoveDown","hasMoveUp","hasRemove","index","onDropIndexClick","onReorderClick","readonly","registry","_registry$templates$B","templates","ButtonTemplates","MoveDownButton","MoveUpButton","RemoveButton","uiOptions","_uiOptions$semantic$h","_uiOptions$semantic","horizontalButtons","_uiOptions$semantic$w","wrapItem","className","Segment","Grid","style","alignItems","Column","width","verticalAlign","Group","onClick","ArrayFieldTemplate","idSchema","canAdd","items","onAddClick","required","schema","semanticProps","ArrayFieldDescriptionTemplate","getTemplate","ArrayFieldTitleTemplate","isFixedItems","description","key","$id","map","_extends2","itemUiSchema","mergedUiSchema","UI_OPTIONS_KEY","marginTop","position","textAlign","BaseInputTemplate","id","placeholder","label","value","onChange","onBlur","onFocus","autofocus","_props$rawErrors","rawErrors","inputProps","getInputProps","type","displayLabel","schemaUtils","getDisplayLabel","Fragment","Form","Input","autoFocus","list","examples","examplesId","undefined","error","length","target","emptyValue","ariaDescribedByIds","Array","isArray","example","DescriptionField","ErrorList","errors","Message","negative","Header","List","Item","stack","IconButton","iconType","otherProps","DEFAULT_OPTIONS","pointing","FieldErrorTemplate","_ref2","_ref2$formContext","_ref2$uiSchema","_ref2$options","_ref2$defaultProps","defaultProps","errorOptions","semanticOptions","getSemanticErrorProps","Label","basic","bulleted","nanoid","FieldHelpTemplate","help","info","content","FieldTemplate","classNames","hidden","rawDescription","wrapLabel","wrapContent","WrapIfAdditionalTemplate","DescriptionFieldTemplate","widths","grouped","descriptionId","ObjectFieldTemplate","properties","formData","TitleFieldTemplate","fieldTitle","fieldDescription","titleId","prop","canExpand","Row","SubmitButton","getSubmitButtonOptions","submitText","_getSubmitButtonOptio2","_getSubmitButtonOptio","norender","primary","dividing","TitleField","as","onDropPropertyClick","onKeyChange","_registry$formContext2","_registry$formContext","readonlyAsDisabled","ADDITIONAL_PROPERTY_FLAG","columns","hasFeedback","htmlFor","defaultValue","wrapperStyle","generateTemplates","ErrorListTemplate","Templates","CheckboxWidget","schemaRequiresTrueValue","Checkbox","checked","_","data","CheckboxesWidget","enumOptions","enumDisabled","inline","checkboxesValues","_onChange","enumOptionsSelectValue","enumOptionsDeselectValue","_onBlur","_onFocus","inlineOption","option","enumOptionsIsSelected","itemDisabled","indexOf","optionId","RadioWidget","enumOptionsValueForIndex","Field","control","Radio","String","RangeWidget","rangeSpec","SelectWidget","multiple","selection","scrolling","upward","optEmptyVal","dropdownOptions","disabledOptions","text","createDefaultValueOptionsForDropDown","selectedIndexes","enumOptionsIndexForValue","Dropdown","readOnly","_ref4","TextareaWidget","TextArea","rows","generateWidgets","Widgets","generateTheme","widgets","_internalFormWrapper","SuiForm","Theme","generateForm","withTheme","SemanticUIForm"],"mappings":"+rBAWwB,SAAAA,EAI2CC,GAA/DC,IAAoBC,IAAAA,MAAUC,EAAKC,EAAAJ,EAAAK,GACrC,OACEC,UAACC,cAAAC,EAAMA,OAAAC,EAAA,CACLC,MAAM,WACNR,MAAOA,GACHC,EAAK,CACTQ,MACA,EAAAC,KAAK,SAELN,EAAAA,QAACC,cAAAM,QAAKC,KAAK,SAGjB,4BCuBgB,SAAAC,EAUcf,GAAA,IAAAgB,EAAAhB,EAL5BiB,YAAqBC,EAAAlB,EACrBC,SAAakB,EAAAnB,EACboB,QAAAA,OAAO,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAArB,EACZsB,mBAAAA,OAAqB,IAAAD,EAAA,CAAEE,OAAO,EAAMC,UAAU,GAAOH,EAAAI,EAAAzB,EACrD0B,oBAAAA,OAAmB,IAAAD,EAAG,CAAA,EAAEA,EAElBE,QANK,IAAAX,EAAG,CA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3,"file":"semantic-ui.cjs.production.min.js","sources":["../src/AddButton/AddButton.tsx","../src/util.tsx","../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx","../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx","../src/BaseInputTemplate/BaseInputTemplate.tsx","../src/DescriptionField/DescriptionField.tsx","../src/ErrorList/ErrorList.tsx","../src/IconButton/IconButton.tsx","../src/FieldErrorTemplate/FieldErrorTemplate.tsx","../src/FieldHelpTemplate/FieldHelpTemplate.tsx","../src/FieldTemplate/FieldTemplate.tsx","../src/ObjectFieldTemplate/ObjectFieldTemplate.tsx","../src/SubmitButton/SubmitButton.tsx","../src/TitleField/TitleField.tsx","../src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx","../src/Templates/Templates.ts","../src/CheckboxWidget/CheckboxWidget.tsx","../src/CheckboxesWidget/CheckboxesWidget.tsx","../src/RadioWidget/RadioWidget.tsx","../src/RangeWidget/RangeWidget.tsx","../src/SelectWidget/SelectWidget.tsx","../src/TextareaWidget/TextareaWidget.tsx","../src/Widgets/Widgets.tsx","../src/Theme/Theme.ts","../src/SemanticUIForm/SemanticUIForm.ts"],"sourcesContent":["import React from \"react\";\nimport { Button, Icon, ButtonProps } from \"semantic-ui-react\";\nimport {\n FormContextType,\n IconButtonProps,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n} from \"@rjsf/utils\";\n\n/** The `AddButton` renders a button that represent the `Add` action on a form\n */\nexport default function AddButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ uiSchema, registry, color, ...props }: IconButtonProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <Button\n title={translateString(TranslatableString.AddItemButton)}\n color={color as ButtonProps[\"color\"]}\n {...props}\n icon\n size=\"tiny\"\n >\n <Icon name=\"plus\" />\n </Button>\n );\n}\n","import React from \"react\";\nimport {\n UiSchema,\n GenericObjectType,\n getUiOptions,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n UIOptionsType,\n} from \"@rjsf/utils\";\n\nexport type SemanticPropsTypes<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n> = {\n formContext?: F;\n uiSchema?: UiSchema<T, S, F>;\n options?: UIOptionsType<T, S, F>;\n defaultSchemaProps?: GenericObjectType;\n defaultContextProps?: GenericObjectType;\n};\n\nexport type SemanticErrorPropsType<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n> = {\n formContext?: F;\n uiSchema?: UiSchema<T, S, F>;\n options?: UIOptionsType<T, S, F>;\n defaultProps?: GenericObjectType;\n};\n\nexport type WrapProps = GenericObjectType & {\n wrap: boolean;\n component?: React.ElementType;\n};\n\n/**\n * Extract props meant for semantic UI components from props that are\n * passed to Widgets, Templates and Fields.\n * @param {Object} params\n * @param {Object?} params.formContext\n * @param {Object?} params.uiSchema\n * @param {Object?} params.options\n * @param {Object?} params.defaultSchemaProps\n * @param {Object?} params.defaultContextProps\n * @returns {any}\n */\nexport function getSemanticProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({\n formContext = {} as F,\n uiSchema = {},\n options = {},\n defaultSchemaProps = { fluid: true, inverted: false },\n defaultContextProps = {},\n}: SemanticPropsTypes<T, S, F>) {\n const formContextProps = formContext.semantic;\n const schemaProps = getUiOptions<T, S, F>(uiSchema).semantic;\n const optionProps = options.semantic;\n // formContext props should overide other props\n return Object.assign(\n {},\n { ...defaultSchemaProps },\n { ...defaultContextProps },\n schemaProps,\n optionProps,\n formContextProps\n );\n}\n\n/**\n * Extract error props meant for semantic UI components from props that are\n * passed to Widgets, Templates and Fields.\n * @param {Object} params\n * @param {Object?} params.formContext\n * @param {Object?} params.uiSchema\n * @param {Object?} params.defaultProps\n * @returns {any}\n */\nexport function getSemanticErrorProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({\n formContext = {} as F,\n uiSchema = {},\n options = {},\n defaultProps = { size: \"small\", pointing: \"above\" },\n}: SemanticErrorPropsType<T, S, F>) {\n const formContextProps =\n formContext.semantic && formContext.semantic.errorOptions;\n const semanticOptions: GenericObjectType = getUiOptions<T, S, F>(uiSchema)\n .semantic as GenericObjectType;\n const schemaProps = semanticOptions && semanticOptions.errorOptions;\n const optionProps =\n options.semantic && (options.semantic as GenericObjectType).errorOptions;\n\n return Object.assign(\n {},\n { ...defaultProps },\n schemaProps,\n optionProps,\n formContextProps\n );\n}\n\n/**\n * Combine multiple strings containing class names into a single string,\n * removing duplicates. E.g.\n * cleanClassNames('bar', 'baz bar', 'x y ', undefined)\n * // 'bar baz x y'\n * @param {Array} classNameArr\n * @param {Array} omit\n * @returns {string}\n */\nexport function cleanClassNames(\n classNameArr: Array<string | undefined>,\n omit: string[] = []\n) {\n // Split each arg on whitespace, and add it to an array. Skip false-y args\n // like \"\" and undefined.\n const classList = classNameArr\n .filter(Boolean)\n .reduce<string[]>(\n (previous, current) => previous.concat(current!.trim().split(/\\s+/)),\n []\n );\n\n // Remove any class names from omit, and make the rest unique before\n // returning them as a string\n return [...new Set(classList.filter((cn) => !omit.includes(cn)))].join(\" \");\n}\n\n/**\n *\n * @param {boolean} wrap\n * @param Component\n * @param {Object} props\n * @returns {*}\n * @constructor\n */\nexport function MaybeWrap({\n wrap,\n component: Component = \"div\",\n ...props\n}: WrapProps) {\n return wrap ? <Component {...props} /> : props.children;\n}\n","import React from \"react\";\nimport {\n ArrayFieldTemplateItemType,\n FormContextType,\n GenericObjectType,\n RJSFSchema,\n StrictRJSFSchema,\n getUiOptions,\n} from \"@rjsf/utils\";\nimport { Button, Grid, Segment } from \"semantic-ui-react\";\n\nimport { MaybeWrap } from \"../util\";\n\nconst gridStyle = (vertical: boolean) => ({\n display: \"grid\",\n gridTemplateColumns: `1fr ${vertical ? 65 : 110}px`,\n});\n\n/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.\n *\n * @param props - The `ArrayFieldTemplateItemType` props for the component\n */\nexport default function ArrayFieldItemTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: ArrayFieldTemplateItemType<T, S, F>) {\n const {\n children,\n disabled,\n hasToolbar,\n hasMoveDown,\n hasMoveUp,\n hasRemove,\n index,\n onDropIndexClick,\n onReorderClick,\n readonly,\n uiSchema,\n registry,\n } = props;\n const { MoveDownButton, MoveUpButton, RemoveButton } =\n registry.templates.ButtonTemplates;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n // Pull the semantic props out of the uiOptions that were put in via the ArrayFieldTemplate\n const { horizontalButtons = false, wrapItem = false } =\n uiOptions.semantic as GenericObjectType;\n return (\n <div className=\"array-item\">\n <MaybeWrap wrap={wrapItem} component={Segment}>\n <Grid\n style={\n index !== 0\n ? { ...gridStyle(!horizontalButtons), alignItems: \"center\" }\n : gridStyle(!horizontalButtons)\n }\n >\n <Grid.Column width={16} verticalAlign=\"middle\">\n {children}\n </Grid.Column>\n {hasToolbar && (\n <Grid.Column>\n {(hasMoveUp || hasMoveDown || hasRemove) && (\n <Button.Group size=\"mini\" vertical={!horizontalButtons}>\n {(hasMoveUp || hasMoveDown) && (\n <MoveUpButton\n className=\"array-item-move-up\"\n disabled={disabled || readonly || !hasMoveUp}\n onClick={onReorderClick(index, index - 1)}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {(hasMoveUp || hasMoveDown) && (\n <MoveDownButton\n className=\"array-item-move-down\"\n disabled={disabled || readonly || !hasMoveDown}\n onClick={onReorderClick(index, index + 1)}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {hasRemove && (\n <RemoveButton\n className=\"array-item-remove\"\n disabled={disabled || readonly}\n onClick={onDropIndexClick(index)}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </Button.Group>\n )}\n </Grid.Column>\n )}\n </Grid>\n </MaybeWrap>\n </div>\n );\n}\n","import React from \"react\";\nimport {\n getTemplate,\n getUiOptions,\n isFixedItems,\n ArrayFieldTemplateProps,\n ArrayFieldTemplateItemType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n UI_OPTIONS_KEY,\n} from \"@rjsf/utils\";\n\nimport { cleanClassNames, getSemanticProps } from \"../util\";\n\n/** The `ArrayFieldTemplate` component is the template used to render all items in an array.\n *\n * @param props - The `ArrayFieldTemplateItemType` props for the component\n */\nexport default function ArrayFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: ArrayFieldTemplateProps<T, S, F>) {\n const {\n uiSchema,\n idSchema,\n canAdd,\n className,\n // classNames, This is not part of the type, so it is likely never passed in\n disabled,\n formContext,\n items,\n onAddClick,\n // options, This is not part of the type, so it is likely never passed in\n readonly,\n required,\n schema,\n title,\n registry,\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext,\n defaultSchemaProps: { horizontalButtons: false, wrapItem: false },\n });\n const { horizontalButtons, wrapItem } = semanticProps;\n const semantic = { horizontalButtons, wrapItem };\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldDescriptionTemplate = getTemplate<\n \"ArrayFieldDescriptionTemplate\",\n T,\n S,\n F\n >(\"ArrayFieldDescriptionTemplate\", registry, uiOptions);\n const ArrayFieldItemTemplate = getTemplate<\"ArrayFieldItemTemplate\", T, S, F>(\n \"ArrayFieldItemTemplate\",\n registry,\n uiOptions\n );\n const ArrayFieldTitleTemplate = getTemplate<\n \"ArrayFieldTitleTemplate\",\n T,\n S,\n F\n >(\"ArrayFieldTitleTemplate\", registry, uiOptions);\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <div\n className={cleanClassNames([\n className,\n isFixedItems<S>(schema) ? \"\" : \"sortable-form-fields\",\n ])}\n >\n <ArrayFieldTitleTemplate\n idSchema={idSchema}\n title={uiOptions.title || title}\n schema={schema}\n uiSchema={uiSchema}\n required={required}\n registry={registry}\n />\n <ArrayFieldDescriptionTemplate\n idSchema={idSchema}\n description={uiOptions.description || schema.description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n <div key={`array-item-list-${idSchema.$id}`}>\n <div className=\"row array-item-list\">\n {items &&\n items.map(\n ({\n key,\n uiSchema: itemUiSchema = {},\n ...props\n }: ArrayFieldTemplateItemType<T, S, F>) => {\n // Merge in the semantic props from the ArrayFieldTemplate into each of the items\n const mergedUiSchema = {\n ...itemUiSchema,\n [UI_OPTIONS_KEY]: {\n ...itemUiSchema[UI_OPTIONS_KEY],\n semantic,\n },\n };\n return (\n <ArrayFieldItemTemplate\n key={key}\n {...props}\n uiSchema={mergedUiSchema}\n />\n );\n }\n )}\n </div>\n {canAdd && (\n <div\n style={{\n marginTop: \"1rem\",\n position: \"relative\",\n textAlign: \"right\",\n }}\n >\n <AddButton\n onClick={onAddClick}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n )}\n </div>\n </div>\n );\n}\n","import React from \"react\";\nimport { Form } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\nimport {\n ariaDescribedByIds,\n examplesId,\n getInputProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\n\n/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.\n * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.\n * It can be customized/overridden for other themes or individual implementations as needed.\n *\n * @param props - The `WidgetProps` for this template\n */\nexport default function BaseInputTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n placeholder,\n label,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onBlur,\n onFocus,\n autofocus,\n options,\n schema,\n uiSchema,\n formContext,\n type,\n registry,\n rawErrors = [],\n } = props;\n const inputProps = getInputProps<T, S, F>(schema, type, options);\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext,\n options,\n });\n const { schemaUtils } = registry;\n const _onChange = ({\n target: { value },\n }: React.ChangeEvent<HTMLInputElement>) =>\n onChange(value === \"\" ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);\n\n return (\n <>\n <Form.Input\n key={id}\n id={id}\n name={id}\n placeholder={placeholder}\n {...inputProps}\n label={displayLabel ? label || schema.title : false}\n required={required}\n autoFocus={autofocus}\n disabled={disabled || readonly}\n list={schema.examples ? examplesId<T>(id) : undefined}\n {...semanticProps}\n value={value || value === 0 ? value : \"\"}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}\n />\n {Array.isArray(schema.examples) && (\n <datalist id={examplesId<T>(id)}>\n {(schema.examples as string[])\n .concat(\n schema.default && !schema.examples.includes(schema.default)\n ? ([schema.default] as string[])\n : []\n )\n .map((example) => {\n return <option key={example} value={example} />;\n })}\n </datalist>\n )}\n </>\n );\n}\n","import React from \"react\";\nimport {\n DescriptionFieldProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\n\n/** The `DescriptionField` is the template to use to render the description of a field\n *\n * @param props - The `DescriptionFieldProps` for this component\n */\nexport default function DescriptionField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: DescriptionFieldProps<T, S, F>) {\n const { id, description } = props;\n if (!description) {\n return null;\n }\n return (\n <p id={id} className=\"sui-description\">\n {description}\n </p>\n );\n}\n","import React from \"react\";\nimport { Message } from \"semantic-ui-react\";\nimport {\n ErrorListProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n} from \"@rjsf/utils\";\n\n/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`\n *\n * @param props - The `ErrorListProps` for this component\n */\nexport default function ErrorList<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ errors, registry }: ErrorListProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <Message negative>\n <Message.Header>\n {translateString(TranslatableString.ErrorsLabel)}\n </Message.Header>\n <Message.List>\n {errors.map((error, index) => (\n <Message.Item key={`error-${index}`}>{error.stack}</Message.Item>\n ))}\n </Message.List>\n </Message>\n );\n}\n","import React from \"react\";\nimport { Button, ButtonProps } from \"semantic-ui-react\";\nimport {\n FormContextType,\n IconButtonProps,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n} from \"@rjsf/utils\";\n\nfunction IconButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: IconButtonProps<T, S, F>) {\n const {\n icon,\n iconType,\n color,\n className,\n uiSchema,\n registry,\n ...otherProps\n } = props;\n return (\n <Button\n icon={icon}\n size={iconType as ButtonProps[\"size\"]}\n color={color as ButtonProps[\"color\"]}\n className={className}\n {...otherProps}\n />\n );\n}\n\nexport default IconButton;\n\nexport function MoveDownButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: IconButtonProps<T, S, F>) {\n const {\n registry: { translateString },\n } = props;\n return (\n <IconButton\n title={translateString(TranslatableString.MoveDownButton)}\n {...props}\n icon=\"angle down\"\n />\n );\n}\n\nexport function MoveUpButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: IconButtonProps<T, S, F>) {\n const {\n registry: { translateString },\n } = props;\n return (\n <IconButton\n title={translateString(TranslatableString.MoveUpButton)}\n {...props}\n icon=\"angle up\"\n />\n );\n}\n\nexport function RemoveButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: IconButtonProps<T, S, F>) {\n const {\n registry: { translateString },\n } = props;\n return (\n <IconButton\n title={translateString(TranslatableString.RemoveButton)}\n {...props}\n icon=\"trash\"\n />\n );\n}\n","import React from \"react\";\nimport {\n errorId,\n FieldErrorProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\nimport { nanoid } from \"nanoid\";\nimport { Label, List } from \"semantic-ui-react\";\n\nimport { getSemanticErrorProps } from \"../util\";\n\nconst DEFAULT_OPTIONS = {\n options: {\n pointing: \"above\",\n size: \"small\",\n },\n};\n\n/** The `FieldErrorTemplate` component renders the errors local to the particular field\n *\n * @param props - The `FieldErrorProps` for the errors being rendered\n */\nexport default function FieldErrorTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ errors, idSchema, uiSchema, registry }: FieldErrorProps<T, S, F>) {\n const { formContext } = registry;\n const options = getSemanticErrorProps<T, S, F>({\n formContext,\n uiSchema,\n defaultProps: DEFAULT_OPTIONS,\n });\n const { pointing, size } = options;\n if (errors && errors.length > 0) {\n const id = errorId<T>(idSchema);\n return (\n <Label\n id={id}\n color=\"red\"\n pointing={pointing || \"above\"}\n size={size || \"small\"}\n basic\n >\n <List bulleted>\n {errors.map((error) => (\n <List.Item key={nanoid()}>{error}</List.Item>\n ))}\n </List>\n </Label>\n );\n }\n return null;\n}\n","import React from \"react\";\nimport { Message } from \"semantic-ui-react\";\nimport {\n FieldHelpProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n helpId,\n} from \"@rjsf/utils\";\n\n/** The `FieldHelpTemplate` component renders any help desired for a field\n *\n * @param props - The `FieldHelpProps` to be rendered\n */\nexport default function FieldHelpTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: FieldHelpProps<T, S, F>) {\n const { idSchema, help } = props;\n if (help) {\n const id = helpId<T>(idSchema);\n return <Message size=\"mini\" info id={id} content={help} />;\n }\n return null;\n}\n","import React from \"react\";\nimport {\n FieldTemplateProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n descriptionId,\n getTemplate,\n getUiOptions,\n} from \"@rjsf/utils\";\nimport { Form } from \"semantic-ui-react\";\nimport { getSemanticProps, MaybeWrap } from \"../util\";\n\n/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field\n * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.\n *\n * @param props - The `FieldTemplateProps` for this component\n */\nexport default function FieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: FieldTemplateProps<T, S, F>) {\n const {\n id,\n children,\n classNames,\n style,\n displayLabel,\n label,\n errors,\n help,\n hidden,\n rawDescription,\n registry,\n schema,\n uiSchema,\n ...otherProps\n } = props;\n const semanticProps = getSemanticProps<T, S, F>(otherProps);\n const { wrapLabel, wrapContent } = semanticProps;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const WrapIfAdditionalTemplate = getTemplate<\n \"WrapIfAdditionalTemplate\",\n T,\n S,\n F\n >(\"WrapIfAdditionalTemplate\", registry, uiOptions);\n const DescriptionFieldTemplate = getTemplate<\n \"DescriptionFieldTemplate\",\n T,\n S,\n F\n >(\"DescriptionFieldTemplate\", registry, uiOptions);\n\n if (hidden) {\n return <div style={{ display: \"none\" }}>{children}</div>;\n }\n\n return (\n <WrapIfAdditionalTemplate\n classNames={classNames}\n style={style}\n id={id}\n label={label}\n registry={registry}\n schema={schema}\n uiSchema={uiSchema}\n {...otherProps}\n >\n <Form.Group key={id} widths=\"equal\" grouped>\n <MaybeWrap wrap={wrapContent} className=\"sui-field-content\">\n {children}\n {displayLabel && rawDescription && (\n <MaybeWrap wrap={wrapLabel} className=\"sui-field-label\">\n {rawDescription && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(id)}\n description={rawDescription}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n </MaybeWrap>\n )}\n {help}\n {errors}\n </MaybeWrap>\n </Form.Group>\n </WrapIfAdditionalTemplate>\n );\n}\n","import React from \"react\";\nimport { Grid } from \"semantic-ui-react\";\nimport {\n FormContextType,\n ObjectFieldTemplateProps,\n RJSFSchema,\n StrictRJSFSchema,\n canExpand,\n descriptionId,\n getTemplate,\n getUiOptions,\n titleId,\n} from \"@rjsf/utils\";\n\n/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the\n * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all\n * the properties.\n *\n * @param props - The `ObjectFieldTemplateProps` for this component\n */\nexport default function ObjectFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: ObjectFieldTemplateProps<T, S, F>) {\n const {\n description,\n onAddClick,\n title,\n properties,\n disabled,\n readonly,\n required,\n uiSchema,\n schema,\n formData,\n idSchema,\n registry,\n } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const TitleFieldTemplate = getTemplate<\"TitleFieldTemplate\", T, S, F>(\n \"TitleFieldTemplate\",\n registry,\n uiOptions\n );\n const DescriptionFieldTemplate = getTemplate<\n \"DescriptionFieldTemplate\",\n T,\n S,\n F\n >(\"DescriptionFieldTemplate\", registry, uiOptions);\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n const fieldTitle = uiOptions.title || title;\n const fieldDescription = uiOptions.description || description;\n return (\n <>\n {fieldTitle && (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={fieldTitle}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {fieldDescription && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(idSchema)}\n description={fieldDescription}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {properties.map((prop) => prop.content)}\n {canExpand<T, S, F>(schema, uiSchema, formData) && (\n <Grid.Column width={16} verticalAlign=\"middle\">\n <Grid.Row>\n <div\n style={{\n marginTop: \"1rem\",\n position: \"relative\",\n textAlign: \"right\",\n }}\n >\n <AddButton\n onClick={onAddClick(schema)}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n </Grid.Row>\n </Grid.Column>\n )}\n </>\n );\n}\n","import React from \"react\";\nimport { Button } from \"semantic-ui-react\";\nimport {\n getSubmitButtonOptions,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n SubmitButtonProps,\n} from \"@rjsf/utils\";\n\n/** The `SubmitButton` renders a button that represent the `Submit` action on a form\n */\nexport default function SubmitButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ uiSchema }: SubmitButtonProps<T, S, F>) {\n const {\n submitText,\n norender,\n props: submitButtonProps = {},\n } = getSubmitButtonOptions<T, S, F>(uiSchema);\n if (norender) {\n return null;\n }\n return (\n <Button type=\"submit\" primary {...submitButtonProps}>\n {submitText}\n </Button>\n );\n}\n","import React from \"react\";\nimport {\n FormContextType,\n TitleFieldProps,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\nimport { Header } from \"semantic-ui-react\";\n\nimport { getSemanticProps } from \"../util\";\n\nconst DEFAULT_OPTIONS = {\n inverted: false,\n dividing: true,\n};\n\n/** The `TitleField` is the template to use to render the title of a field\n *\n * @param props - The `TitleFieldProps` for this component\n */\nexport default function TitleField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>({ id, title, uiSchema }: TitleFieldProps<T, S, F>) {\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n defaultSchemaProps: DEFAULT_OPTIONS,\n });\n if (!title) {\n return null;\n }\n return (\n <Header id={id} {...semanticProps} as=\"h5\">\n {title}\n </Header>\n );\n}\n","import React from \"react\";\nimport {\n ADDITIONAL_PROPERTY_FLAG,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n WrapIfAdditionalTemplateProps,\n} from \"@rjsf/utils\";\nimport { Form, Grid } from \"semantic-ui-react\";\n\n/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are\n * part of an `additionalProperties` part of a schema.\n *\n * @param props - The `WrapIfAdditionalProps` for this component\n */\nexport default function WrapIfAdditionalTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WrapIfAdditionalTemplateProps<T, S, F>) {\n const {\n children,\n classNames,\n style,\n disabled,\n id,\n label,\n onDropPropertyClick,\n onKeyChange,\n readonly,\n required,\n schema,\n uiSchema,\n registry,\n } = props;\n const { templates, translateString } = registry;\n // Button templates are not overridden in the uiSchema\n const { RemoveButton } = templates.ButtonTemplates;\n const keyLabel = translateString(TranslatableString.KeyLabel, [label]);\n const { readonlyAsDisabled = true, wrapperStyle } = registry.formContext;\n\n const additional = ADDITIONAL_PROPERTY_FLAG in schema;\n\n if (!additional) {\n return (\n <div className={classNames} style={style}>\n {children}\n </div>\n );\n }\n\n const handleBlur = ({ target }: React.FocusEvent<HTMLInputElement>) =>\n onKeyChange(target.value);\n\n return (\n <div className={classNames} style={style} key={`${id}-key`}>\n <Grid columns=\"equal\">\n <Grid.Row>\n <Grid.Column className=\"form-additional\">\n <Form.Group widths=\"equal\" grouped>\n <Form.Input\n className=\"form-group\"\n hasFeedback\n fluid\n htmlFor={`${id}`}\n label={keyLabel}\n required={required}\n defaultValue={label}\n disabled={disabled || (readonlyAsDisabled && readonly)}\n id={`${id}`}\n name={`${id}`}\n onBlur={!readonly ? handleBlur : undefined}\n style={wrapperStyle}\n type=\"text\"\n ></Form.Input>\n </Form.Group>\n </Grid.Column>\n <Grid.Column className=\"form-additional\" verticalAlign=\"middle\">\n {children}\n </Grid.Column>\n <Grid.Column>\n <RemoveButton\n iconType=\"mini\"\n className=\"array-item-remove\"\n disabled={disabled || readonly}\n onClick={onDropPropertyClick(label)}\n uiSchema={uiSchema}\n registry={registry}\n />\n </Grid.Column>\n </Grid.Row>\n </Grid>\n </div>\n );\n}\n","import {\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TemplatesType,\n} from \"@rjsf/utils\";\n\nimport AddButton from \"../AddButton\";\nimport ArrayFieldItemTemplate from \"../ArrayFieldItemTemplate\";\nimport ArrayFieldTemplate from \"../ArrayFieldTemplate\";\nimport BaseInputTemplate from \"../BaseInputTemplate\";\nimport DescriptionField from \"../DescriptionField\";\nimport ErrorList from \"../ErrorList\";\nimport { MoveDownButton, MoveUpButton, RemoveButton } from \"../IconButton\";\nimport FieldErrorTemplate from \"../FieldErrorTemplate\";\nimport FieldHelpTemplate from \"../FieldHelpTemplate\";\nimport FieldTemplate from \"../FieldTemplate\";\nimport ObjectFieldTemplate from \"../ObjectFieldTemplate\";\nimport SubmitButton from \"../SubmitButton\";\nimport TitleField from \"../TitleField\";\nimport WrapIfAdditionalTemplate from \"../WrapIfAdditionalTemplate\";\n\nexport function generateTemplates<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(): Partial<TemplatesType<T, S, F>> {\n return {\n ArrayFieldItemTemplate,\n ArrayFieldTemplate,\n BaseInputTemplate,\n ButtonTemplates: {\n AddButton,\n MoveDownButton,\n MoveUpButton,\n RemoveButton,\n SubmitButton,\n },\n DescriptionFieldTemplate: DescriptionField,\n ErrorListTemplate: ErrorList,\n FieldErrorTemplate,\n FieldHelpTemplate,\n FieldTemplate,\n ObjectFieldTemplate,\n TitleFieldTemplate: TitleField,\n WrapIfAdditionalTemplate,\n };\n}\n\nexport default generateTemplates();\n","import React from \"react\";\nimport {\n ariaDescribedByIds,\n schemaRequiresTrueValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\nimport { Form, CheckboxProps } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `CheckBoxWidget` is a widget for rendering boolean properties.\n * It is typically used to represent a boolean.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function CheckboxWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n value,\n disabled,\n readonly,\n label,\n autofocus,\n onChange,\n onBlur,\n options,\n onFocus,\n formContext,\n schema,\n uiSchema,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n options,\n formContext,\n uiSchema,\n defaultSchemaProps: {\n inverted: false,\n },\n });\n // Because an unchecked checkbox will cause html5 validation to fail, only add\n // the \"required\" attribute if the field value must be \"true\", due to the\n // \"const\" or \"enum\" keywords\n const required = schemaRequiresTrueValue<S>(schema);\n const _onChange = (\n _: React.FormEvent<HTMLInputElement>,\n data: CheckboxProps\n ) => onChange && onChange(data.checked);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n const checked = value == \"true\" || value == true;\n return (\n <Form.Checkbox\n id={id}\n name={id}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n {...semanticProps}\n checked={typeof value === \"undefined\" ? false : checked}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n required={required}\n label={label || \"\"}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n","import React from \"react\";\nimport { Form } from \"semantic-ui-react\";\nimport {\n ariaDescribedByIds,\n enumOptionsDeselectValue,\n enumOptionsIsSelected,\n enumOptionsSelectValue,\n getTemplate,\n optionId,\n titleId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `CheckboxesWidget` is a widget for rendering checkbox groups.\n * It is typically used to represent an array of enums.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function CheckboxesWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n disabled,\n options,\n value,\n autofocus,\n readonly,\n onChange,\n onBlur,\n onFocus,\n formContext,\n schema,\n uiSchema,\n rawErrors = [],\n registry,\n } = props;\n const TitleFieldTemplate = getTemplate<\"TitleFieldTemplate\", T, S, F>(\n \"TitleFieldTemplate\",\n registry,\n options\n );\n const { enumOptions, enumDisabled, inline } = options;\n const checkboxesValues = Array.isArray(value) ? value : [value];\n const { title } = schema;\n const semanticProps = getSemanticProps<T, S, F>({\n options,\n formContext,\n uiSchema,\n defaultSchemaProps: {\n inverted: false,\n },\n });\n const _onChange =\n (index: number) =>\n ({ target: { checked } }: React.ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line no-shadow\n if (checked) {\n onChange(\n enumOptionsSelectValue<S>(index, checkboxesValues, enumOptions)\n );\n } else {\n onChange(\n enumOptionsDeselectValue<S>(index, checkboxesValues, enumOptions)\n );\n }\n };\n\n const _onBlur = () => onBlur(id, value);\n const _onFocus = () => onFocus(id, value);\n const inlineOption = inline ? { inline: true } : { grouped: true };\n return (\n <>\n {title && (\n <TitleFieldTemplate\n id={titleId<T>(id)}\n title={title}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n <Form.Group id={id} name={id} {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(\n option.value,\n checkboxesValues\n );\n const itemDisabled =\n Array.isArray(enumDisabled) &&\n enumDisabled.indexOf(option.value) !== -1;\n return (\n <Form.Checkbox\n id={optionId(id, index)}\n name={id}\n key={index}\n label={option.label}\n {...semanticProps}\n checked={checked}\n error={rawErrors.length > 0}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && index === 0}\n onChange={_onChange(index)}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n })}\n </Form.Group>\n </>\n );\n}\n","import React from \"react\";\nimport {\n ariaDescribedByIds,\n enumOptionsIsSelected,\n enumOptionsValueForIndex,\n optionId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\nimport { CheckboxProps, Form, Radio } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `RadioWidget` is a widget for rendering a radio group.\n * It is typically used with a string property constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RadioWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n value,\n required,\n disabled,\n readonly,\n onChange,\n onBlur,\n onFocus,\n options,\n formContext,\n uiSchema,\n rawErrors = [],\n } = props;\n const { enumOptions, enumDisabled, emptyValue } = options;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext,\n options,\n uiSchema,\n });\n const _onChange = (\n _: React.FormEvent<HTMLInputElement>,\n { value: eventValue }: CheckboxProps\n ) => {\n return onChange(\n enumOptionsValueForIndex<S>(eventValue!, enumOptions, emptyValue)\n );\n };\n\n const _onBlur = () => onBlur(id, value);\n const _onFocus = () => onFocus(id, value);\n const inlineOption = options.inline ? { inline: true } : { grouped: true };\n return (\n <Form.Group {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, value);\n const itemDisabled =\n Array.isArray(enumDisabled) &&\n enumDisabled.indexOf(option.value) !== -1;\n return (\n <Form.Field\n required={required}\n control={Radio}\n id={optionId(id, index)}\n name={id}\n {...semanticProps}\n onFocus={_onFocus}\n onBlur={_onBlur}\n onChange={_onChange}\n label={option.label}\n value={String(index)}\n error={rawErrors.length > 0}\n key={index}\n checked={checked}\n disabled={disabled || itemDisabled || readonly}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n })}\n </Form.Group>\n );\n}\n","import React from \"react\";\nimport { Input } from \"semantic-ui-react\";\nimport {\n ariaDescribedByIds,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n rangeSpec,\n} from \"@rjsf/utils\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result\n * in a div, with the value along side it.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RangeWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onBlur,\n onFocus,\n options,\n schema,\n uiSchema,\n formContext,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext,\n options,\n uiSchema,\n defaultSchemaProps: {\n fluid: true,\n },\n });\n\n // eslint-disable-next-line no-shadow\n const _onChange = ({\n target: { value },\n }: React.ChangeEvent<HTMLInputElement>) =>\n onChange && onChange(value === \"\" ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n\n return (\n <>\n <Input\n id={id}\n key={id}\n name={id}\n type=\"range\"\n required={required}\n disabled={disabled || readonly}\n {...rangeSpec<S>(schema)}\n {...semanticProps}\n value={value || \"\"}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n <span>{value}</span>\n </>\n );\n}\n","import React from \"react\";\nimport {\n ariaDescribedByIds,\n enumOptionsIndexForValue,\n enumOptionsValueForIndex,\n EnumOptionsType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n UIOptionsType,\n} from \"@rjsf/utils\";\nimport map from \"lodash/map\";\nimport { Form, DropdownProps } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\n\n/**\n * Returns and creates an array format required for semantic drop down\n * @param {array} enumOptions- array of items for the dropdown\n * @param {array} enumDisabled - array of enum option values to disable\n * @returns {*}\n */\nfunction createDefaultValueOptionsForDropDown<\n S extends StrictRJSFSchema = RJSFSchema\n>(\n enumOptions?: EnumOptionsType<S>[],\n enumDisabled?: UIOptionsType[\"enumDisabled\"]\n) {\n const disabledOptions = enumDisabled || [];\n const options = map(enumOptions, ({ label, value }, index) => ({\n disabled: disabledOptions.indexOf(value) !== -1,\n key: label,\n text: label,\n value: String(index),\n }));\n return options;\n}\n\n/** The `SelectWidget` is a widget for rendering dropdowns.\n * It is typically used with string properties constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function SelectWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n schema,\n uiSchema,\n formContext,\n id,\n options,\n label,\n required,\n disabled,\n readonly,\n value,\n multiple,\n placeholder,\n autofocus,\n onChange,\n onBlur,\n onFocus,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext,\n options,\n defaultSchemaProps: {\n inverted: \"false\",\n selection: true,\n fluid: true,\n scrolling: true,\n upward: false,\n },\n });\n const { enumDisabled, enumOptions, emptyValue: optEmptyVal } = options;\n const emptyValue = multiple ? [] : \"\";\n const dropdownOptions = createDefaultValueOptionsForDropDown<S>(\n enumOptions,\n enumDisabled\n );\n const _onChange = (\n _: React.SyntheticEvent<HTMLElement>,\n { value }: DropdownProps\n ) =>\n onChange(\n enumOptionsValueForIndex<S>(value as string[], enumOptions, optEmptyVal)\n );\n // eslint-disable-next-line no-shadow\n const _onBlur = (\n _: React.FocusEvent<HTMLElement>,\n { target: { value } }: DropdownProps\n ) => onBlur(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));\n const _onFocus = (\n _: React.FocusEvent<HTMLElement>,\n { target: { value } }: DropdownProps\n ) =>\n onFocus(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));\n const selectedIndexes = enumOptionsIndexForValue<S>(\n value,\n enumOptions,\n multiple\n );\n\n return (\n <Form.Dropdown\n key={id}\n id={id}\n name={id}\n label={label || schema.title}\n multiple={typeof multiple === \"undefined\" ? false : multiple}\n value={typeof value === \"undefined\" ? emptyValue : selectedIndexes}\n error={rawErrors.length > 0}\n disabled={disabled}\n placeholder={placeholder}\n {...semanticProps}\n required={required}\n autoFocus={autofocus}\n readOnly={readonly}\n options={dropdownOptions}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n","import React from \"react\";\nimport {\n ariaDescribedByIds,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from \"@rjsf/utils\";\nimport { Form } from \"semantic-ui-react\";\nimport { getSemanticProps } from \"../util\";\n\n/** The `TextareaWidget` is a widget for rendering input fields as textarea.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function TextareaWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n placeholder,\n value,\n required,\n disabled,\n autofocus,\n label,\n readonly,\n onBlur,\n onFocus,\n onChange,\n options,\n schema,\n uiSchema,\n formContext,\n registry,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext,\n options,\n defaultSchemaProps: { inverted: false },\n });\n const { schemaUtils } = registry;\n // eslint-disable-next-line no-shadow\n const _onChange = ({\n target: { value },\n }: React.ChangeEvent<HTMLTextAreaElement>) =>\n onChange && onChange(value === \"\" ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);\n return (\n <Form.TextArea\n id={id}\n key={id}\n name={id}\n label={displayLabel ? label || schema.title : false}\n placeholder={placeholder}\n autoFocus={autofocus}\n required={required}\n disabled={disabled || readonly}\n {...semanticProps}\n value={value || \"\"}\n error={rawErrors.length > 0}\n rows={options.rows || 5}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n","import {\n FormContextType,\n RegistryWidgetsType,\n RJSFSchema,\n StrictRJSFSchema,\n} from \"@rjsf/utils\";\n\nimport CheckboxWidget from \"../CheckboxWidget/CheckboxWidget\";\nimport CheckboxesWidget from \"../CheckboxesWidget/CheckboxesWidget\";\nimport RadioWidget from \"../RadioWidget/RadioWidget\";\nimport RangeWidget from \"../RangeWidget/RangeWidget\";\nimport SelectWidget from \"../SelectWidget/SelectWidget\";\nimport TextareaWidget from \"../TextareaWidget/TextareaWidget\";\n\nexport function generateWidgets<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(): RegistryWidgetsType<T, S, F> {\n return {\n CheckboxWidget,\n CheckboxesWidget,\n RadioWidget,\n RangeWidget,\n SelectWidget,\n TextareaWidget,\n };\n}\n\nexport default generateWidgets();\n","import { FormContextType, RJSFSchema, StrictRJSFSchema } from \"@rjsf/utils\";\nimport { ThemeProps } from \"@rjsf/core\";\nimport { Form as SuiForm } from \"semantic-ui-react\";\n\nimport { generateTemplates } from \"../Templates\";\nimport { generateWidgets } from \"../Widgets\";\n\nexport function generateTheme<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(): ThemeProps<T, S, F> {\n return {\n templates: generateTemplates<T, S, F>(),\n widgets: generateWidgets<T, S, F>(),\n _internalFormWrapper: SuiForm,\n };\n}\n\nexport default generateTheme();\n","import { ComponentType } from \"react\";\nimport { withTheme, FormProps } from \"@rjsf/core\";\nimport { FormContextType, RJSFSchema, StrictRJSFSchema } from \"@rjsf/utils\";\n\nimport { generateTheme } from \"../Theme\";\n\nexport function generateForm<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any\n>(): ComponentType<FormProps<T, S, F>> {\n return withTheme<T, S, F>(generateTheme<T, S, F>());\n}\n\nexport default generateForm();\n"],"names":["AddButton","_ref","uiSchema","registry","color","props","_objectWithoutPropertiesLoose","_excluded","React","Button","_extends","title","translateString","TranslatableString","AddItemButton","icon","size","createElement","Icon","name","getSemanticProps","_ref$formContext","formContext","_ref$uiSchema","_ref$options","options","_ref$defaultSchemaPro","defaultSchemaProps","fluid","inverted","_ref$defaultContextPr","defaultContextProps","formContextProps","semantic","schemaProps","getUiOptions","optionProps","Object","assign","cleanClassNames","classNameArr","omit","classList","filter","Boolean","reduce","previous","current","concat","trim","split","Set","cn","includes","join","MaybeWrap","_ref3","wrap","_ref3$component","component","Component","children","gridStyle","vertical","display","gridTemplateColumns","ArrayFieldItemTemplate","disabled","hasToolbar","hasMoveDown","hasMoveUp","hasRemove","index","onDropIndexClick","onReorderClick","readonly","_registry$templates$B","templates","ButtonTemplates","MoveDownButton","MoveUpButton","RemoveButton","uiOptions","_uiOptions$semantic$h","_uiOptions$semantic","horizontalButtons","_uiOptions$semantic$w","wrapItem","className","Segment","Grid","style","alignItems","Column","width","verticalAlign","Group","onClick","ArrayFieldTemplate","idSchema","canAdd","items","onAddClick","required","schema","semanticProps","ArrayFieldDescriptionTemplate","getTemplate","ArrayFieldTitleTemplate","isFixedItems","description","key","$id","map","_extends2","itemUiSchema","mergedUiSchema","UI_OPTIONS_KEY","marginTop","position","textAlign","BaseInputTemplate","id","placeholder","label","value","onChange","onBlur","onFocus","autofocus","_props$rawErrors","rawErrors","inputProps","getInputProps","type","displayLabel","schemaUtils","getDisplayLabel","Fragment","Form","Input","autoFocus","list","examples","examplesId","undefined","error","length","target","emptyValue","ariaDescribedByIds","Array","isArray","example","DescriptionField","ErrorList","errors","Message","negative","Header","ErrorsLabel","List","Item","stack","IconButton","iconType","otherProps","DEFAULT_OPTIONS","pointing","FieldErrorTemplate","_ref2","_ref2$formContext","_ref2$uiSchema","_ref2$options","_ref2$defaultProps","defaultProps","errorOptions","semanticOptions","getSemanticErrorProps","errorId","Label","basic","bulleted","nanoid","FieldHelpTemplate","help","helpId","info","content","FieldTemplate","classNames","hidden","rawDescription","wrapLabel","wrapContent","WrapIfAdditionalTemplate","DescriptionFieldTemplate","widths","grouped","descriptionId","ObjectFieldTemplate","properties","formData","TitleFieldTemplate","fieldTitle","fieldDescription","titleId","prop","canExpand","Row","SubmitButton","getSubmitButtonOptions","submitText","_getSubmitButtonOptio2","_getSubmitButtonOptio","norender","primary","dividing","TitleField","as","onDropPropertyClick","onKeyChange","keyLabel","KeyLabel","_registry$formContext2","_registry$formContext","readonlyAsDisabled","ADDITIONAL_PROPERTY_FLAG","columns","hasFeedback","htmlFor","defaultValue","wrapperStyle","generateTemplates","ErrorListTemplate","Templates","CheckboxWidget","schemaRequiresTrueValue","Checkbox","checked","_","data","CheckboxesWidget","enumOptions","enumDisabled","inline","checkboxesValues","_onChange","enumOptionsSelectValue","enumOptionsDeselectValue","_onBlur","_onFocus","inlineOption","option","enumOptionsIsSelected","itemDisabled","indexOf","optionId","RadioWidget","enumOptionsValueForIndex","Field","control","Radio","String","RangeWidget","rangeSpec","SelectWidget","multiple","selection","scrolling","upward","optEmptyVal","dropdownOptions","disabledOptions","text","createDefaultValueOptionsForDropDown","selectedIndexes","enumOptionsIndexForValue","Dropdown","readOnly","_ref4","TextareaWidget","TextArea","rows","generateWidgets","Widgets","generateTheme","widgets","_internalFormWrapper","SuiForm","Theme","generateForm","withTheme","SemanticUIForm"],"mappings":"+rBAYwB,SAAAA,EAI2CC,GAA/DC,IAAUC,IAAAA,SAAUC,IAAAA,MAAUC,EAAKC,EAAAL,EAAAM,GAErC,OACEC,wBAACC,EAAMA,OAAAC,EAAA,CACLC,OAAOC,EAHiBT,EAApBS,iBAGmBC,EAAkBA,mBAACC,eAC1CV,MAAOA,GACHC,EAAK,CACTU,MAAI,EACJC,KAAK,SAELR,EAAAA,QAACS,cAAAC,QAAKC,KAAK,SAGjB,4BCqBgB,SAAAC,EAUcnB,GAAA,IAAAoB,EAAApB,EAL5BqB,YAAqBC,EAAAtB,EACrBC,SAAasB,EAAAvB,EACbwB,QAAAA,OAAO,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAzB,EACZ0B,mBAAAA,OAAqB,IAAAD,EAAA,CAAEE,OAAO,EAAMC,UAAU,GAAOH,EAAAI,EAAA7B,EACrD8B,oB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B7CG,QAlBa,WAAH,OAASA,GAAWA,EAAQN,EAAIG,EAAM,EAmB9B,mBAAAyB,EAAkBA,mBAAI5B,KAG9C,UC3DgBkK,IAKd,MAAO,CACLhD,eAAAA,EACAM,iBAAAA,EACAgB,YAAAA,EACAM,YAAAA,EACAE,aAAAA,EACAe,eAAAA,EAEJ,CAEA,IAAAI,EAAeD,aCtBCE,IAKd,MAAO,CACLjN,UAAW4J,IACXsD,QAASH,IACTI,qBAAsBC,EAAAA,KAE1B,CAEA,IAAAC,EAAeJ,aCbCK,IAKd,OAAOC,EAASA,UAAUN,IAC5B,CAEA,IAAAO,EAAeF"}
@@ -1,7 +1,7 @@
1
1
  import { withTheme } from '@rjsf/core';
2
2
  import { Button, Icon, Segment, Grid, Form, Message, Label, List, Header, Radio, Input } from 'semantic-ui-react';
3
3
  import React from 'react';
4
- import { getUiOptions, getTemplate, isFixedItems, UI_OPTIONS_KEY, getInputProps, examplesId, ariaDescribedByIds, descriptionId, titleId, canExpand, getSubmitButtonOptions, ADDITIONAL_PROPERTY_FLAG, schemaRequiresTrueValue, enumOptionsIsSelected, optionId, enumOptionsSelectValue, enumOptionsDeselectValue, enumOptionsValueForIndex, rangeSpec, enumOptionsIndexForValue } from '@rjsf/utils';
4
+ import { TranslatableString, getUiOptions, getTemplate, isFixedItems, UI_OPTIONS_KEY, getInputProps, examplesId, ariaDescribedByIds, errorId, helpId, descriptionId, titleId, canExpand, getSubmitButtonOptions, ADDITIONAL_PROPERTY_FLAG, schemaRequiresTrueValue, enumOptionsIsSelected, optionId, enumOptionsSelectValue, enumOptionsDeselectValue, enumOptionsValueForIndex, rangeSpec, enumOptionsIndexForValue } from '@rjsf/utils';
5
5
  import { nanoid } from 'nanoid';
6
6
  import map from 'lodash-es/map';
7
7
 
@@ -36,10 +36,12 @@ var _excluded$4 = ["uiSchema", "registry", "color"];
36
36
  /** The `AddButton` renders a button that represent the `Add` action on a form
37
37
  */
38
38
  function AddButton(_ref) {
39
- var color = _ref.color,
39
+ var registry = _ref.registry,
40
+ color = _ref.color,
40
41
  props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
42
+ var translateString = registry.translateString;
41
43
  return /*#__PURE__*/React.createElement(Button, _extends({
42
- title: "Add Item",
44
+ title: translateString(TranslatableString.AddItemButton),
43
45
  color: color
44
46
  }, props, {
45
47
  icon: true,
@@ -398,10 +400,12 @@ function DescriptionField(props) {
398
400
  * @param props - The `ErrorListProps` for this component
399
401
  */
400
402
  function ErrorList(_ref) {
401
- var errors = _ref.errors;
403
+ var errors = _ref.errors,
404
+ registry = _ref.registry;
405
+ var translateString = registry.translateString;
402
406
  return /*#__PURE__*/React.createElement(Message, {
403
407
  negative: true
404
- }, /*#__PURE__*/React.createElement(Message.Header, null, "Errors"), /*#__PURE__*/React.createElement(Message.List, null, errors.map(function (error, index) {
408
+ }, /*#__PURE__*/React.createElement(Message.Header, null, translateString(TranslatableString.ErrorsLabel)), /*#__PURE__*/React.createElement(Message.List, null, errors.map(function (error, index) {
405
409
  return /*#__PURE__*/React.createElement(Message.Item, {
406
410
  key: "error-" + index
407
411
  }, error.stack);
@@ -423,22 +427,25 @@ function IconButton(props) {
423
427
  }, otherProps));
424
428
  }
425
429
  function MoveDownButton(props) {
430
+ var translateString = props.registry.translateString;
426
431
  return /*#__PURE__*/React.createElement(IconButton, _extends({
427
- title: "Move down"
432
+ title: translateString(TranslatableString.MoveDownButton)
428
433
  }, props, {
429
434
  icon: "angle down"
430
435
  }));
431
436
  }
432
437
  function MoveUpButton(props) {
438
+ var translateString = props.registry.translateString;
433
439
  return /*#__PURE__*/React.createElement(IconButton, _extends({
434
- title: "Move up"
440
+ title: translateString(TranslatableString.MoveUpButton)
435
441
  }, props, {
436
442
  icon: "angle up"
437
443
  }));
438
444
  }
439
445
  function RemoveButton(props) {
446
+ var translateString = props.registry.translateString;
440
447
  return /*#__PURE__*/React.createElement(IconButton, _extends({
441
- title: "Remove"
448
+ title: translateString(TranslatableString.RemoveButton)
442
449
  }, props, {
443
450
  icon: "trash"
444
451
  }));
@@ -468,7 +475,7 @@ function FieldErrorTemplate(_ref) {
468
475
  var pointing = options.pointing,
469
476
  size = options.size;
470
477
  if (errors && errors.length > 0) {
471
- var id = idSchema.$id + "__error";
478
+ var id = errorId(idSchema);
472
479
  return /*#__PURE__*/React.createElement(Label, {
473
480
  id: id,
474
481
  color: "red",
@@ -494,7 +501,7 @@ function FieldHelpTemplate(props) {
494
501
  var idSchema = props.idSchema,
495
502
  help = props.help;
496
503
  if (help) {
497
- var id = idSchema.$id + "__help";
504
+ var id = helpId(idSchema);
498
505
  return /*#__PURE__*/React.createElement(Message, {
499
506
  size: "mini",
500
507
  info: true,
@@ -687,13 +694,15 @@ function WrapIfAdditionalTemplate(props) {
687
694
  schema = props.schema,
688
695
  uiSchema = props.uiSchema,
689
696
  registry = props.registry;
697
+ var templates = registry.templates,
698
+ translateString = registry.translateString;
690
699
  // Button templates are not overridden in the uiSchema
691
- var RemoveButton = registry.templates.ButtonTemplates.RemoveButton;
700
+ var RemoveButton = templates.ButtonTemplates.RemoveButton;
701
+ var keyLabel = translateString(TranslatableString.KeyLabel, [label]);
692
702
  var _registry$formContext = registry.formContext,
693
703
  _registry$formContext2 = _registry$formContext.readonlyAsDisabled,
694
704
  readonlyAsDisabled = _registry$formContext2 === void 0 ? true : _registry$formContext2,
695
705
  wrapperStyle = _registry$formContext.wrapperStyle;
696
- var keyLabel = label + " Key"; // i18n ?
697
706
  var additional = (ADDITIONAL_PROPERTY_FLAG in schema);
698
707
  if (!additional) {
699
708
  return /*#__PURE__*/React.createElement("div", {