@rjsf/semantic-ui 5.2.1 → 5.3.1

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"),r=require("semantic-ui-react"),t=require("react/jsx-runtime"),i=require("@rjsf/utils"),n=require("nanoid"),a=require("react");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(require("lodash/map"));function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},l.apply(this,arguments)}function d(e,r){if(null==e)return{};var t,i,n={},a=Object.keys(e);for(i=0;i<a.length;i++)r.indexOf(t=a[i])>=0||(n[t]=e[t]);return n}var u=["uiSchema","registry","color"];function c(e){var n=e.registry,a=e.color,o=d(e,u);return t.jsx(r.Button,l({title:(0,n.translateString)(i.TranslatableString.AddItemButton),color:a},o,{icon:!0,size:"tiny",children:t.jsx(r.Icon,{name:"plus"})}))}var m=["wrap","component"];function p(e){var r=e.formContext,t=e.uiSchema,n=e.options,a=void 0===n?{}:n,o=e.defaultSchemaProps,s=void 0===o?{fluid:!0,inverted:!1}:o,d=e.defaultContextProps,u=void 0===d?{}:d,c=(void 0===r?{}:r).semantic,m=i.getUiOptions(void 0===t?{}:t).semantic,p=a.semantic;return Object.assign({},l({},s),l({},u),m,p,c)}function h(e,r){void 0===r&&(r=[]);var t=e.filter(Boolean).reduce((function(e,r){return e.concat(r.trim().split(/\s+/))}),[]);return[].concat(new Set(t.filter((function(e){return!r.includes(e)})))).join(" ")}function v(e){var r=e.wrap,i=e.component,n=void 0===i?"div":i,a=d(e,m);return r?t.jsx(n,l({},a)):a.children}var g=function(e){return{display:"grid",gridTemplateColumns:"1fr "+(e?65:110)+"px"}};function f(e){var n=e.children,a=e.disabled,o=e.hasToolbar,s=e.hasMoveDown,d=e.hasMoveUp,u=e.hasRemove,c=e.index,m=e.onDropIndexClick,p=e.onReorderClick,h=e.readonly,f=e.uiSchema,x=e.registry,y=x.templates.ButtonTemplates,b=y.MoveDownButton,j=y.MoveUpButton,S=y.RemoveButton,F=i.getUiOptions(f).semantic,T=F.horizontalButtons,C=void 0!==T&&T,B=F.wrapItem;return t.jsx("div",{className:"array-item",children:t.jsx(v,{wrap:void 0!==B&&B,component:r.Segment,children:t.jsxs(r.Grid,{style:0!==c?l({},g(!C),{alignItems:"center"}):g(!C),children:[t.jsx(r.Grid.Column,{width:16,verticalAlign:"middle",children:n}),o&&t.jsx(r.Grid.Column,{children:(d||s||u)&&t.jsxs(r.Button.Group,{size:"mini",vertical:!C,children:[(d||s)&&t.jsx(j,{className:"array-item-move-up",disabled:a||h||!d,onClick:p(c,c-1),uiSchema:f,registry:x}),(d||s)&&t.jsx(b,{className:"array-item-move-down",disabled:a||h||!s,onClick:p(c,c+1),uiSchema:f,registry:x}),u&&t.jsx(S,{className:"array-item-remove",disabled:a||h,onClick:m(c),uiSchema:f,registry:x})]})})]})})})}var x=["key","uiSchema"];function y(e){var r=e.uiSchema,n=e.idSchema,a=e.canAdd,o=e.className,s=e.disabled,u=e.items,c=e.onAddClick,m=e.readonly,v=e.required,g=e.schema,f=e.title,y=e.registry,b=p({uiSchema:r,formContext:e.formContext,defaultSchemaProps:{horizontalButtons:!1,wrapItem:!1}}),j={horizontalButtons:b.horizontalButtons,wrapItem:b.wrapItem},S=i.getUiOptions(r),F=i.getTemplate("ArrayFieldDescriptionTemplate",y,S),T=i.getTemplate("ArrayFieldItemTemplate",y,S),C=i.getTemplate("ArrayFieldTitleTemplate",y,S),B=y.templates.ButtonTemplates.AddButton;return t.jsxs("div",{className:h([o,i.isFixedItems(g)?"":"sortable-form-fields"]),children:[t.jsx(C,{idSchema:n,title:S.title||f,schema:g,uiSchema:r,required:v,registry:y}),t.jsx(F,{idSchema:n,description:S.description||g.description,schema:g,uiSchema:r,registry:y}),t.jsxs("div",{children:[t.jsx("div",{className:"row array-item-list",children:u&&u.map((function(e){var r,n=e.key,a=e.uiSchema,o=void 0===a?{}:a,s=d(e,x),u=l({},o,((r={})[i.UI_OPTIONS_KEY]=l({},o[i.UI_OPTIONS_KEY],{semantic:j}),r));return t.jsx(T,l({},s,{uiSchema:u}),n)}))}),a&&t.jsx("div",{style:{marginTop:"1rem",position:"relative",textAlign:"right"},children:t.jsx(B,{onClick:c,disabled:s||m,uiSchema:r,registry:y})})]},"array-item-list-"+n.$id)]})}function b(e){var n=e.id,a=e.placeholder,o=e.label,s=e.value,d=e.required,u=e.readonly,c=e.disabled,m=e.onChange,h=e.onChangeOverride,v=e.onBlur,g=e.onFocus,f=e.autofocus,x=e.options,y=e.schema,b=e.uiSchema,j=e.formContext,S=e.registry,F=e.rawErrors,T=void 0===F?[]:F,C=i.getInputProps(y,e.type,x),B=p({uiSchema:b,formContext:j,options:x}),I=S.schemaUtils.getDisplayLabel(y,b);return t.jsxs(t.Fragment,{children:[t.jsx(r.Form.Input,l({id:n,name:n,placeholder:a},C,{label:!!I&&(o||y.title),required:d,autoFocus:f,disabled:c||u,list:y.examples?i.examplesId(n):void 0},B,{value:s||0===s?s:"",error:T.length>0,onChange:h||function(e){var r=e.target.value;return m(""===r?x.emptyValue:r)},onBlur:function(){return v&&v(n,s)},onFocus:function(){return g&&g(n,s)},"aria-describedby":i.ariaDescribedByIds(n,!!y.examples)}),n),Array.isArray(y.examples)&&t.jsx("datalist",{id:i.examplesId(n),children:y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map((function(e){return t.jsx("option",{value:e},e)}))})]})}function j(e){var r=e.description;return r?t.jsx("p",{id:e.id,className:"sui-description",children:r}):null}function S(e){var n=e.errors;return t.jsxs(r.Message,{negative:!0,children:[t.jsx(r.Message.Header,{children:(0,e.registry.translateString)(i.TranslatableString.ErrorsLabel)}),t.jsx(r.Message.List,{children:n.map((function(e,i){return t.jsx(r.Message.Item,{children:e.stack},"error-"+i)}))})]})}var F=["icon","iconType","color","className","uiSchema","registry"];function T(e){var i=e.icon,n=e.iconType,a=e.color,o=e.className,s=d(e,F);return t.jsx(r.Button,l({icon:i,size:n,color:a,className:o},s))}function C(e){return t.jsx(T,l({title:(0,e.registry.translateString)(i.TranslatableString.MoveDownButton)},e,{icon:"angle down"}))}function B(e){return t.jsx(T,l({title:(0,e.registry.translateString)(i.TranslatableString.MoveUpButton)},e,{icon:"angle up"}))}function I(e){return t.jsx(T,l({title:(0,e.registry.translateString)(i.TranslatableString.RemoveButton)},e,{icon:"trash"}))}var O={options:{pointing:"above",size:"small"}};function w(e){var a=e.errors,o=e.idSchema,s=function(e){var r=e.formContext,t=void 0===r?{}:r,n=e.uiSchema,a=e.options,o=void 0===a?{}:a,s=e.defaultProps,d=void 0===s?{size:"small",pointing:"above"}:s,u=t.semantic&&t.semantic.errorOptions,c=i.getUiOptions(void 0===n?{}:n).semantic,m=c&&c.errorOptions,p=o.semantic&&o.semantic.errorOptions;return Object.assign({},l({},d),m,p,u)}({formContext:e.registry.formContext,uiSchema:e.uiSchema,defaultProps:O}),d=s.pointing,u=s.size;if(a&&a.length>0){var c=i.errorId(o);return t.jsx(r.Label,{id:c,color:"red",pointing:d||"above",size:u||"small",basic:!0,children:t.jsx(r.List,{bulleted:!0,children:a.map((function(e){return t.jsx(r.List.Item,{children:e},n.nanoid())}))})})}return null}function A(e){var n=e.help;if(n){var a=i.helpId(e.idSchema);return t.jsx(r.Message,{size:"mini",info:!0,id:a,content:n})}return null}var D=["id","children","classNames","style","displayLabel","label","errors","help","hidden","rawDescription","registry","schema","uiSchema"];function k(e){var n=e.id,a=e.children,o=e.classNames,s=e.style,u=e.displayLabel,c=e.label,m=e.errors,h=e.help,g=e.hidden,f=e.rawDescription,x=e.registry,y=e.schema,b=e.uiSchema,j=d(e,D),S=p(j),F=S.wrapLabel,T=S.wrapContent,C=i.getUiOptions(b),B=i.getTemplate("WrapIfAdditionalTemplate",x,C),I=i.getTemplate("DescriptionFieldTemplate",x,C);return g?t.jsx("div",{style:{display:"none"},children:a}):t.jsx(B,l({classNames:o,style:s,id:n,label:c,registry:x,schema:y,uiSchema:b},j,{children:t.jsx(r.Form.Group,{widths:"equal",grouped:!0,children:t.jsxs(v,{wrap:T,className:"sui-field-content",children:[a,u&&f&&t.jsx(v,{wrap:F,className:"sui-field-label",children:f&&t.jsx(I,{id:i.descriptionId(n),description:f,schema:y,uiSchema:b,registry:x})}),h,m]})},n)}))}function q(e){var n=e.description,a=e.onAddClick,o=e.title,s=e.properties,l=e.disabled,d=e.readonly,u=e.required,c=e.uiSchema,m=e.schema,p=e.formData,h=e.idSchema,v=e.registry,g=i.getUiOptions(c),f=i.getTemplate("TitleFieldTemplate",v,g),x=i.getTemplate("DescriptionFieldTemplate",v,g),y=v.templates.ButtonTemplates.AddButton,b=g.title||o,j=g.description||n;return t.jsxs(t.Fragment,{children:[b&&t.jsx(f,{id:i.titleId(h),title:b,required:u,schema:m,uiSchema:c,registry:v}),j&&t.jsx(x,{id:i.descriptionId(h),description:j,schema:m,uiSchema:c,registry:v}),s.map((function(e){return e.content})),i.canExpand(m,c,p)&&t.jsx(r.Grid.Column,{width:16,verticalAlign:"middle",children:t.jsx(r.Grid.Row,{children:t.jsx("div",{style:{marginTop:"1rem",position:"relative",textAlign:"right"},children:t.jsx(y,{onClick:a(m),disabled:l||d,uiSchema:c,registry:v})})})})]})}function N(e){var n=i.getSubmitButtonOptions(e.uiSchema),a=n.props;return n.norender?null:t.jsx(r.Button,l({type:"submit",primary:!0},void 0===a?{}:a,{children:n.submitText}))}var P={inverted:!1,dividing:!0};function G(e){var i=e.id,n=e.title,a=p({uiSchema:e.uiSchema,defaultSchemaProps:P});return n?t.jsx(r.Header,l({id:i},a,{as:"h5",children:n})):null}function E(e){var n=e.children,a=e.classNames,o=e.style,s=e.disabled,l=e.id,d=e.label,u=e.onDropPropertyClick,c=e.onKeyChange,m=e.readonly,p=e.required,h=e.schema,v=e.uiSchema,g=e.registry,f=g.templates.ButtonTemplates.RemoveButton,x=(0,g.translateString)(i.TranslatableString.KeyLabel,[d]),y=g.formContext,b=y.readonlyAsDisabled;return i.ADDITIONAL_PROPERTY_FLAG in h?t.jsx("div",{className:a,style:o,children:t.jsx(r.Grid,{columns:"equal",children:t.jsxs(r.Grid.Row,{children:[t.jsx(r.Grid.Column,{className:"form-additional",children:t.jsx(r.Form.Group,{widths:"equal",grouped:!0,children:t.jsx(r.Form.Input,{className:"form-group",hasFeedback:!0,fluid:!0,htmlFor:""+l,label:x,required:p,defaultValue:d,disabled:s||(void 0===b||b)&&m,id:""+l,name:""+l,onBlur:m?void 0:function(e){return c(e.target.value)},style:y.wrapperStyle,type:"text"})})}),t.jsx(r.Grid.Column,{className:"form-additional",verticalAlign:"middle",children:n}),t.jsx(r.Grid.Column,{children:t.jsx(f,{iconType:"mini",className:"array-item-remove",disabled:s||m,onClick:u(d),uiSchema:v,registry:g})})]})})},l+"-key"):t.jsx("div",{className:a,style:o,children:n})}function L(){return{ArrayFieldItemTemplate:f,ArrayFieldTemplate:y,BaseInputTemplate:b,ButtonTemplates:{AddButton:c,MoveDownButton:C,MoveUpButton:B,RemoveButton:I,SubmitButton:N},DescriptionFieldTemplate:j,ErrorListTemplate:S,FieldErrorTemplate:w,FieldHelpTemplate:A,FieldTemplate:k,ObjectFieldTemplate:q,TitleFieldTemplate:G,WrapIfAdditionalTemplate:E}}var M=L();function R(e){var n=e.id,a=e.value,o=e.disabled,s=e.readonly,d=e.label,u=e.autofocus,c=e.onChange,m=e.onBlur,h=e.onFocus,v=e.schema,g=e.rawErrors,f=void 0===g?[]:g,x=p({options:e.options,formContext:e.formContext,uiSchema:e.uiSchema,defaultSchemaProps:{inverted:!1}}),y=i.schemaRequiresTrueValue(v);return t.jsx(r.Form.Checkbox,l({id:n,name:n,disabled:o||s,autoFocus:u},x,{checked:void 0!==a&&("true"==a||1==a),error:f.length>0,onChange:function(e,r){return c&&c(r.checked)},onBlur:function(){return m&&m(n,a)},onFocus:function(){return h&&h(n,a)},required:y,label:d||"","aria-describedby":i.ariaDescribedByIds(n)}))}function U(e){var n=e.id,a=e.disabled,o=e.options,s=e.value,d=e.autofocus,u=e.readonly,c=e.onChange,m=e.onBlur,h=e.onFocus,v=e.formContext,g=e.schema,f=e.uiSchema,x=e.rawErrors,y=void 0===x?[]:x,b=e.registry,j=i.getTemplate("TitleFieldTemplate",b,o),S=o.enumOptions,F=o.enumDisabled,T=o.inline,C=Array.isArray(s)?s:[s],B=g.title,I=p({options:o,formContext:v,uiSchema:f,defaultSchemaProps:{inverted:!1}}),O=function(e){return function(r){c(r.target.checked?i.enumOptionsSelectValue(e,C,S):i.enumOptionsDeselectValue(e,C,S))}},w=function(){return m(n,s)},A=function(){return h(n,s)},D=T?{inline:!0}:{grouped:!0};return t.jsxs(t.Fragment,{children:[B&&t.jsx(j,{id:i.titleId(n),title:B,schema:g,uiSchema:f,registry:b}),t.jsx(r.Form.Group,l({id:n,name:n},D,{children:Array.isArray(S)&&S.map((function(e,o){var s=i.enumOptionsIsSelected(e.value,C),c=Array.isArray(F)&&-1!==F.indexOf(e.value);return t.jsx(r.Form.Checkbox,l({id:i.optionId(n,o),name:n,label:e.label},I,{checked:s,error:y.length>0,disabled:a||c||u,autoFocus:d&&0===o,onChange:O(o),onBlur:w,onFocus:A,"aria-describedby":i.ariaDescribedByIds(n)}),o)}))}))]})}function V(e){var n=e.id,o=e.value,s=e.required,d=e.disabled,u=e.readonly,c=e.onChange,m=e.onBlur,h=e.onFocus,v=e.options,g=e.rawErrors,f=void 0===g?[]:g,x=v.enumOptions,y=v.enumDisabled,b=v.emptyValue,j=p({formContext:e.formContext,options:v,uiSchema:e.uiSchema}),S=function(e,r){return c(i.enumOptionsValueForIndex(r.value,x,b))},F=function(){return m(n,o)},T=function(){return h(n,o)};return t.jsx(r.Form.Group,l({},v.inline?{inline:!0}:{grouped:!0},{children:Array.isArray(x)&&x.map((function(e,t){var c=i.enumOptionsIsSelected(e.value,o),m=Array.isArray(y)&&-1!==y.indexOf(e.value);return a.createElement(r.Form.Field,l({required:s,control:r.Radio,id:i.optionId(n,t),name:n},j,{onFocus:T,onBlur:F,onChange:S,label:e.label,value:String(t),error:f.length>0,key:t,checked:c,disabled:d||m||u,"aria-describedby":i.ariaDescribedByIds(n)}))}))}))}function z(e){var n=e.id,a=e.value,o=e.required,s=e.readonly,d=e.disabled,u=e.onChange,c=e.onBlur,m=e.onFocus,h=e.options,v=e.schema,g=e.rawErrors,f=void 0===g?[]:g,x=p({formContext:e.formContext,options:h,uiSchema:e.uiSchema,defaultSchemaProps:{fluid:!0}});return t.jsxs(t.Fragment,{children:[t.jsx(r.Input,l({id:n,name:n,type:"range",required:o,disabled:d||s},i.rangeSpec(v),x,{value:a||"",error:f.length>0,onChange:function(e){var r=e.target.value;return u&&u(""===r?h.emptyValue:r)},onBlur:function(){return c&&c(n,a)},onFocus:function(){return m&&m(n,a)},"aria-describedby":i.ariaDescribedByIds(n)}),n),t.jsx("span",{children:a})]})}function W(e){var n=e.schema,a=e.id,o=e.options,d=e.label,u=e.required,c=e.disabled,m=e.readonly,h=e.value,v=e.multiple,g=e.placeholder,f=e.autofocus,x=e.onChange,y=e.onBlur,b=e.onFocus,j=e.rawErrors,S=void 0===j?[]:j,F=p({uiSchema:e.uiSchema,formContext:e.formContext,options:o,defaultSchemaProps:{inverted:"false",selection:!0,fluid:!0,scrolling:!0,upward:!1}}),T=o.enumOptions,C=o.emptyValue,B=v?[]:"",I=function(e,r){var t=r||[];return s.default(e,(function(e,r){var i=e.label;return{disabled:-1!==t.indexOf(e.value),key:i,text:i,value:String(r)}}))}(T,o.enumDisabled),O=i.enumOptionsIndexForValue(h,T,v);return t.jsx(r.Form.Dropdown,l({id:a,name:a,label:d||n.title,multiple:void 0!==v&&v,value:void 0===h?B:O,error:S.length>0,disabled:c,placeholder:g},F,{required:u,autoFocus:f,readOnly:m,options:I,onChange:function(e,r){return x(i.enumOptionsValueForIndex(r.value,T,C))},onBlur:function(e,r){return y(a,i.enumOptionsValueForIndex(r.target.value,T,C))},onFocus:function(e,r){return b(a,i.enumOptionsValueForIndex(r.target.value,T,C))},"aria-describedby":i.ariaDescribedByIds(a)}),a)}function _(e){var n=e.id,a=e.placeholder,o=e.value,s=e.required,d=e.disabled,u=e.autofocus,c=e.label,m=e.readonly,h=e.onBlur,v=e.onFocus,g=e.onChange,f=e.options,x=e.schema,y=e.uiSchema,b=e.registry,j=e.rawErrors,S=void 0===j?[]:j,F=p({formContext:e.formContext,options:f,defaultSchemaProps:{inverted:!1}}),T=b.schemaUtils.getDisplayLabel(x,y);return t.jsx(r.Form.TextArea,l({id:n,name:n,label:!!T&&(c||x.title),placeholder:a,autoFocus:u,required:s,disabled:d||m},F,{value:o||"",error:S.length>0,rows:f.rows||5,onChange:function(e){var r=e.target.value;return g&&g(""===r?f.emptyValue:r)},onBlur:function(){return h&&h(n,o)},onFocus:function(){return v&&v(n,o)},"aria-describedby":i.ariaDescribedByIds(n)}),n)}function K(){return{CheckboxWidget:R,CheckboxesWidget:U,RadioWidget:V,RangeWidget:z,SelectWidget:W,TextareaWidget:_}}var H=K();function Y(){return{templates:L(),widgets:K(),_internalFormWrapper:r.Form}}var $=Y();function J(){return e.withTheme(Y())}var Q=J();exports.Form=Q,exports.Templates=M,exports.Theme=$,exports.Widgets=H,exports.default=Q,exports.generateForm=J,exports.generateTemplates=L,exports.generateTheme=Y,exports.generateWidgets=K;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@rjsf/core"),r=require("semantic-ui-react"),t=require("react/jsx-runtime"),i=require("@rjsf/utils"),n=require("nanoid"),a=require("react");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(require("lodash/map"));function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},l.apply(this,arguments)}function u(e,r){if(null==e)return{};var t,i,n={},a=Object.keys(e);for(i=0;i<a.length;i++)r.indexOf(t=a[i])>=0||(n[t]=e[t]);return n}var d=["uiSchema","registry","color"];function c(e){var n=e.registry,a=e.color,o=u(e,d);return t.jsx(r.Button,l({title:(0,n.translateString)(i.TranslatableString.AddItemButton),color:a},o,{icon:!0,size:"tiny",children:t.jsx(r.Icon,{name:"plus"})}))}var m=["wrap","component"];function p(e){var r=e.formContext,t=e.uiSchema,n=e.options,a=void 0===n?{}:n,o=e.defaultSchemaProps,s=void 0===o?{fluid:!0,inverted:!1}:o,u=e.defaultContextProps,d=void 0===u?{}:u,c=(void 0===r?{}:r).semantic,m=i.getUiOptions(void 0===t?{}:t).semantic,p=a.semantic;return Object.assign({},l({},s),l({},d),m,p,c)}function h(e,r){void 0===r&&(r=[]);var t=e.filter(Boolean).reduce((function(e,r){return e.concat(r.trim().split(/\s+/))}),[]);return[].concat(new Set(t.filter((function(e){return!r.includes(e)})))).join(" ")}function g(e){var r=e.wrap,i=e.component,n=void 0===i?"div":i,a=u(e,m);return r?t.jsx(n,l({},a)):a.children}function v(e){var n,a=e.children,o=e.disabled,s=e.hasToolbar,u=e.hasCopy,d=e.hasMoveDown,c=e.hasMoveUp,m=e.hasRemove,p=e.index,h=e.onCopyIndexClick,v=e.onDropIndexClick,f=e.onReorderClick,x=e.readonly,y=e.uiSchema,b=e.registry,j=b.templates.ButtonTemplates,S=j.CopyButton,C=j.MoveDownButton,F=j.MoveUpButton,T=j.RemoveButton,B=i.getUiOptions(y).semantic,I=B.horizontalButtons,O=void 0===I||I,w=B.wrapItem;return t.jsx("div",{className:"array-item",children:t.jsx(g,{wrap:void 0!==w&&w,component:r.Segment,children:t.jsxs(r.Grid,{style:l({},(n=!O,{display:"grid",gridTemplateColumns:"1fr "+(n?65:150)+"px"}),{alignItems:"center"}),children:[t.jsx(r.Grid.Column,{width:16,verticalAlign:"middle",children:a}),s&&t.jsx(r.Grid.Column,{children:(c||d||m)&&t.jsxs(r.Button.Group,{size:"mini",vertical:!O,children:[(c||d)&&t.jsx(F,{className:"array-item-move-up",disabled:o||x||!c,onClick:f(p,p-1),uiSchema:y,registry:b}),(c||d)&&t.jsx(C,{className:"array-item-move-down",disabled:o||x||!d,onClick:f(p,p+1),uiSchema:y,registry:b}),u&&t.jsx(S,{className:"array-item-copy",disabled:o||x,onClick:h(p),uiSchema:y,registry:b}),m&&t.jsx(T,{className:"array-item-remove",disabled:o||x,onClick:v(p),uiSchema:y,registry:b})]})})]})})})}var f=["key","uiSchema"];function x(e){var r=e.uiSchema,n=e.idSchema,a=e.canAdd,o=e.className,s=e.disabled,d=e.items,c=e.onAddClick,m=e.readonly,g=e.required,v=e.schema,x=e.title,y=e.registry,b=p({uiSchema:r,formContext:e.formContext,defaultSchemaProps:{horizontalButtons:!0,wrapItem:!1}}),j={horizontalButtons:b.horizontalButtons,wrapItem:b.wrapItem},S=i.getUiOptions(r),C=i.getTemplate("ArrayFieldDescriptionTemplate",y,S),F=i.getTemplate("ArrayFieldItemTemplate",y,S),T=i.getTemplate("ArrayFieldTitleTemplate",y,S),B=y.templates.ButtonTemplates.AddButton;return t.jsxs("div",{className:h([o,i.isFixedItems(v)?"":"sortable-form-fields"]),children:[t.jsx(T,{idSchema:n,title:S.title||x,schema:v,uiSchema:r,required:g,registry:y}),t.jsx(C,{idSchema:n,description:S.description||v.description,schema:v,uiSchema:r,registry:y}),t.jsxs("div",{children:[t.jsx("div",{className:"row array-item-list",children:d&&d.map((function(e){var r,n=e.key,a=e.uiSchema,o=void 0===a?{}:a,s=u(e,f),d=l({},o,((r={})[i.UI_OPTIONS_KEY]=l({},o[i.UI_OPTIONS_KEY],{semantic:j}),r));return t.jsx(F,l({},s,{uiSchema:d}),n)}))}),a&&t.jsx("div",{style:{marginTop:"1rem",position:"relative",textAlign:"right"},children:t.jsx(B,{onClick:c,disabled:s||m,uiSchema:r,registry:y})})]},"array-item-list-"+n.$id)]})}function y(e){var n=e.id,a=e.placeholder,o=e.label,s=e.value,u=e.required,d=e.readonly,c=e.disabled,m=e.onChange,h=e.onChangeOverride,g=e.onBlur,v=e.onFocus,f=e.autofocus,x=e.options,y=e.schema,b=e.uiSchema,j=e.formContext,S=e.registry,C=e.rawErrors,F=void 0===C?[]:C,T=i.getInputProps(y,e.type,x),B=p({uiSchema:b,formContext:j,options:x}),I=S.schemaUtils.getDisplayLabel(y,b);return t.jsxs(t.Fragment,{children:[t.jsx(r.Form.Input,l({id:n,name:n,placeholder:a},T,{label:!!I&&(o||y.title),required:u,autoFocus:f,disabled:c||d,list:y.examples?i.examplesId(n):void 0},B,{value:s||0===s?s:"",error:F.length>0,onChange:h||function(e){var r=e.target.value;return m(""===r?x.emptyValue:r)},onBlur:function(){return g&&g(n,s)},onFocus:function(){return v&&v(n,s)},"aria-describedby":i.ariaDescribedByIds(n,!!y.examples)}),n),Array.isArray(y.examples)&&t.jsx("datalist",{id:i.examplesId(n),children:y.examples.concat(y.default&&!y.examples.includes(y.default)?[y.default]:[]).map((function(e){return t.jsx("option",{value:e},e)}))})]})}function b(e){var r=e.description;return r?t.jsx("p",{id:e.id,className:"sui-description",children:r}):null}function j(e){var n=e.errors;return t.jsxs(r.Message,{negative:!0,children:[t.jsx(r.Message.Header,{children:(0,e.registry.translateString)(i.TranslatableString.ErrorsLabel)}),t.jsx(r.Message.List,{children:n.map((function(e,i){return t.jsx(r.Message.Item,{children:e.stack},"error-"+i)}))})]})}var S=["icon","iconType","color","className","uiSchema","registry"];function C(e){var i=e.icon,n=e.iconType,a=e.color,o=e.className,s=u(e,S);return t.jsx(r.Button,l({icon:i,size:n,color:a,className:o},s))}function F(e){return t.jsx(C,l({title:(0,e.registry.translateString)(i.TranslatableString.CopyButton)},e,{icon:"copy"}))}function T(e){return t.jsx(C,l({title:(0,e.registry.translateString)(i.TranslatableString.MoveDownButton)},e,{icon:"angle down"}))}function B(e){return t.jsx(C,l({title:(0,e.registry.translateString)(i.TranslatableString.MoveUpButton)},e,{icon:"angle up"}))}function I(e){return t.jsx(C,l({title:(0,e.registry.translateString)(i.TranslatableString.RemoveButton)},e,{icon:"trash"}))}var O={options:{pointing:"above",size:"small"}};function w(e){var a=e.errors,o=e.idSchema,s=function(e){var r=e.formContext,t=void 0===r?{}:r,n=e.uiSchema,a=e.options,o=void 0===a?{}:a,s=e.defaultProps,u=void 0===s?{size:"small",pointing:"above"}:s,d=t.semantic&&t.semantic.errorOptions,c=i.getUiOptions(void 0===n?{}:n).semantic,m=c&&c.errorOptions,p=o.semantic&&o.semantic.errorOptions;return Object.assign({},l({},u),m,p,d)}({formContext:e.registry.formContext,uiSchema:e.uiSchema,defaultProps:O}),u=s.pointing,d=s.size;if(a&&a.length>0){var c=i.errorId(o);return t.jsx(r.Label,{id:c,color:"red",pointing:u||"above",size:d||"small",basic:!0,children:t.jsx(r.List,{bulleted:!0,children:a.map((function(e){return t.jsx(r.List.Item,{children:e},n.nanoid())}))})})}return null}function A(e){var n=e.help;if(n){var a=i.helpId(e.idSchema);return t.jsx(r.Message,{size:"mini",info:!0,id:a,content:n})}return null}var k=["id","children","classNames","style","displayLabel","label","errors","help","hidden","rawDescription","registry","schema","uiSchema"];function D(e){var n=e.id,a=e.children,o=e.classNames,s=e.style,d=e.displayLabel,c=e.label,m=e.errors,h=e.help,v=e.hidden,f=e.rawDescription,x=e.registry,y=e.schema,b=e.uiSchema,j=u(e,k),S=p(j),C=S.wrapLabel,F=S.wrapContent,T=i.getUiOptions(b),B=i.getTemplate("WrapIfAdditionalTemplate",x,T),I=i.getTemplate("DescriptionFieldTemplate",x,T);return v?t.jsx("div",{style:{display:"none"},children:a}):t.jsx(B,l({classNames:o,style:s,id:n,label:c,registry:x,schema:y,uiSchema:b},j,{children:t.jsx(r.Form.Group,{widths:"equal",grouped:!0,children:t.jsxs(g,{wrap:F,className:"sui-field-content",children:[a,d&&f&&t.jsx(g,{wrap:C,className:"sui-field-label",children:f&&t.jsx(I,{id:i.descriptionId(n),description:f,schema:y,uiSchema:b,registry:x})}),h,m]})},n)}))}function q(e){var n=e.description,a=e.onAddClick,o=e.title,s=e.properties,l=e.disabled,u=e.readonly,d=e.required,c=e.uiSchema,m=e.schema,p=e.formData,h=e.idSchema,g=e.registry,v=i.getUiOptions(c),f=i.getTemplate("TitleFieldTemplate",g,v),x=i.getTemplate("DescriptionFieldTemplate",g,v),y=g.templates.ButtonTemplates.AddButton,b=v.title||o,j=v.description||n;return t.jsxs(t.Fragment,{children:[b&&t.jsx(f,{id:i.titleId(h),title:b,required:d,schema:m,uiSchema:c,registry:g}),j&&t.jsx(x,{id:i.descriptionId(h),description:j,schema:m,uiSchema:c,registry:g}),s.map((function(e){return e.content})),i.canExpand(m,c,p)&&t.jsx(r.Grid.Column,{width:16,verticalAlign:"middle",children:t.jsx(r.Grid.Row,{children:t.jsx("div",{style:{marginTop:"1rem",position:"relative",textAlign:"right"},children:t.jsx(y,{onClick:a(m),disabled:l||u,uiSchema:c,registry:g})})})})]})}function N(e){var n=i.getSubmitButtonOptions(e.uiSchema),a=n.props;return n.norender?null:t.jsx(r.Button,l({type:"submit",primary:!0},void 0===a?{}:a,{children:n.submitText}))}var P={inverted:!1,dividing:!0};function G(e){var i=e.id,n=e.title,a=p({uiSchema:e.uiSchema,defaultSchemaProps:P});return n?t.jsx(r.Header,l({id:i},a,{as:"h5",children:n})):null}function E(e){var n=e.children,a=e.classNames,o=e.style,s=e.disabled,l=e.id,u=e.label,d=e.onDropPropertyClick,c=e.onKeyChange,m=e.readonly,p=e.required,h=e.schema,g=e.uiSchema,v=e.registry,f=v.templates.ButtonTemplates.RemoveButton,x=(0,v.translateString)(i.TranslatableString.KeyLabel,[u]),y=v.formContext,b=y.readonlyAsDisabled;return i.ADDITIONAL_PROPERTY_FLAG in h?t.jsx("div",{className:a,style:o,children:t.jsx(r.Grid,{columns:"equal",children:t.jsxs(r.Grid.Row,{children:[t.jsx(r.Grid.Column,{className:"form-additional",children:t.jsx(r.Form.Group,{widths:"equal",grouped:!0,children:t.jsx(r.Form.Input,{className:"form-group",hasFeedback:!0,fluid:!0,htmlFor:""+l,label:x,required:p,defaultValue:u,disabled:s||(void 0===b||b)&&m,id:""+l,name:""+l,onBlur:m?void 0:function(e){return c(e.target.value)},style:y.wrapperStyle,type:"text"})})}),t.jsx(r.Grid.Column,{className:"form-additional",verticalAlign:"middle",children:n}),t.jsx(r.Grid.Column,{children:t.jsx(f,{iconType:"mini",className:"array-item-remove",disabled:s||m,onClick:d(u),uiSchema:g,registry:v})})]})})},l+"-key"):t.jsx("div",{className:a,style:o,children:n})}function L(){return{ArrayFieldItemTemplate:v,ArrayFieldTemplate:x,BaseInputTemplate:y,ButtonTemplates:{AddButton:c,CopyButton:F,MoveDownButton:T,MoveUpButton:B,RemoveButton:I,SubmitButton:N},DescriptionFieldTemplate:b,ErrorListTemplate:j,FieldErrorTemplate:w,FieldHelpTemplate:A,FieldTemplate:D,ObjectFieldTemplate:q,TitleFieldTemplate:G,WrapIfAdditionalTemplate:E}}var M=L();function R(e){var n=e.id,a=e.value,o=e.disabled,s=e.readonly,u=e.label,d=e.autofocus,c=e.onChange,m=e.onBlur,h=e.onFocus,g=e.schema,v=e.rawErrors,f=void 0===v?[]:v,x=p({options:e.options,formContext:e.formContext,uiSchema:e.uiSchema,defaultSchemaProps:{inverted:"false"}}),y=i.schemaRequiresTrueValue(g);return t.jsx(r.Form.Checkbox,l({id:n,name:n,disabled:o||s,autoFocus:d},x,{checked:void 0!==a&&("true"==a||1==a),error:f.length>0,onChange:function(e,r){return c&&c(r.checked)},onBlur:function(){return m&&m(n,a)},onFocus:function(){return h&&h(n,a)},required:y,label:u||"","aria-describedby":i.ariaDescribedByIds(n)}))}function U(e){var n=e.id,a=e.disabled,o=e.options,s=e.value,u=e.autofocus,d=e.readonly,c=e.onChange,m=e.onBlur,h=e.onFocus,g=e.formContext,v=e.schema,f=e.uiSchema,x=e.rawErrors,y=void 0===x?[]:x,b=e.registry,j=i.getTemplate("TitleFieldTemplate",b,o),S=o.enumOptions,C=o.enumDisabled,F=o.inline,T=Array.isArray(s)?s:[s],B=v.title,I=p({options:o,formContext:g,uiSchema:f,defaultSchemaProps:{inverted:"false"}}),O=function(e){return function(r){c(r.target.checked?i.enumOptionsSelectValue(e,T,S):i.enumOptionsDeselectValue(e,T,S))}},w=function(){return m(n,s)},A=function(){return h(n,s)},k=F?{inline:!0}:{grouped:!0};return t.jsxs(t.Fragment,{children:[B&&t.jsx(j,{id:i.titleId(n),title:B,schema:v,uiSchema:f,registry:b}),t.jsx(r.Form.Group,l({id:n,name:n},k,{children:Array.isArray(S)&&S.map((function(e,o){var s=i.enumOptionsIsSelected(e.value,T),c=Array.isArray(C)&&-1!==C.indexOf(e.value);return t.jsx(r.Form.Checkbox,l({id:i.optionId(n,o),name:n,label:e.label},I,{checked:s,error:y.length>0,disabled:a||c||d,autoFocus:u&&0===o,onChange:O(o),onBlur:w,onFocus:A,"aria-describedby":i.ariaDescribedByIds(n)}),o)}))}))]})}function V(e){var n=e.id,o=e.value,s=e.required,u=e.disabled,d=e.readonly,c=e.onChange,m=e.onBlur,h=e.onFocus,g=e.options,v=e.rawErrors,f=void 0===v?[]:v,x=g.enumOptions,y=g.enumDisabled,b=g.emptyValue,j=p({formContext:e.formContext,options:g,uiSchema:e.uiSchema}),S=function(e,r){return c(i.enumOptionsValueForIndex(r.value,x,b))},C=function(){return m(n,o)},F=function(){return h(n,o)};return t.jsx(r.Form.Group,l({},g.inline?{inline:!0}:{grouped:!0},{children:Array.isArray(x)&&x.map((function(e,t){var c=i.enumOptionsIsSelected(e.value,o),m=Array.isArray(y)&&-1!==y.indexOf(e.value);return a.createElement(r.Form.Field,l({required:s,control:r.Radio,id:i.optionId(n,t),name:n},j,{onFocus:F,onBlur:C,onChange:S,label:e.label,value:String(t),error:f.length>0,key:t,checked:c,disabled:u||m||d,"aria-describedby":i.ariaDescribedByIds(n)}))}))}))}function z(e){var n=e.id,a=e.value,o=e.required,s=e.readonly,u=e.disabled,d=e.onChange,c=e.onBlur,m=e.onFocus,h=e.options,g=e.schema,v=e.rawErrors,f=void 0===v?[]:v,x=p({formContext:e.formContext,options:h,uiSchema:e.uiSchema,defaultSchemaProps:{fluid:!0}});return t.jsxs(t.Fragment,{children:[t.jsx(r.Input,l({id:n,name:n,type:"range",required:o,disabled:u||s},i.rangeSpec(g),x,{value:a||"",error:f.length>0,onChange:function(e){var r=e.target.value;return d&&d(""===r?h.emptyValue:r)},onBlur:function(){return c&&c(n,a)},onFocus:function(){return m&&m(n,a)},"aria-describedby":i.ariaDescribedByIds(n)}),n),t.jsx("span",{children:a})]})}function W(e){var n=e.schema,a=e.id,o=e.options,u=e.label,d=e.required,c=e.disabled,m=e.readonly,h=e.value,g=e.multiple,v=e.placeholder,f=e.autofocus,x=e.onChange,y=e.onBlur,b=e.onFocus,j=e.rawErrors,S=void 0===j?[]:j,C=p({uiSchema:e.uiSchema,formContext:e.formContext,options:o,defaultSchemaProps:{inverted:"false",selection:!0,fluid:!0,scrolling:!0,upward:!1}}),F=o.enumOptions,T=o.emptyValue,B=g?[]:"",I=function(e,r){var t=r||[];return s.default(e,(function(e,r){var i=e.label;return{disabled:-1!==t.indexOf(e.value),key:i,text:i,value:String(r)}}))}(F,o.enumDisabled),O=i.enumOptionsIndexForValue(h,F,g);return t.jsx(r.Form.Dropdown,l({id:a,name:a,label:u||n.title,multiple:void 0!==g&&g,value:void 0===h?B:O,error:S.length>0,disabled:c,placeholder:v},C,{required:d,autoFocus:f,readOnly:m,options:I,onChange:function(e,r){return x(i.enumOptionsValueForIndex(r.value,F,T))},onBlur:function(e,r){return y(a,i.enumOptionsValueForIndex(r.target.value,F,T))},onFocus:function(e,r){return b(a,i.enumOptionsValueForIndex(r.target.value,F,T))},"aria-describedby":i.ariaDescribedByIds(a)}),a)}function _(e){var n=e.id,a=e.placeholder,o=e.value,s=e.required,u=e.disabled,d=e.autofocus,c=e.label,m=e.readonly,h=e.onBlur,g=e.onFocus,v=e.onChange,f=e.options,x=e.schema,y=e.uiSchema,b=e.registry,j=e.rawErrors,S=void 0===j?[]:j,C=p({formContext:e.formContext,options:f,defaultSchemaProps:{inverted:"false"}}),F=b.schemaUtils.getDisplayLabel(x,y);return t.jsx(r.Form.TextArea,l({id:n,name:n,label:!!F&&(c||x.title),placeholder:a,autoFocus:d,required:s,disabled:u||m},C,{value:o||"",error:S.length>0,rows:f.rows||5,onChange:function(e){var r=e.target.value;return v&&v(""===r?f.emptyValue:r)},onBlur:function(){return h&&h(n,o)},onFocus:function(){return g&&g(n,o)},"aria-describedby":i.ariaDescribedByIds(n)}),n)}function K(){return{CheckboxWidget:R,CheckboxesWidget:U,RadioWidget:V,RangeWidget:z,SelectWidget:W,TextareaWidget:_}}var H=K();function Y(){return{templates:L(),widgets:K(),_internalFormWrapper:r.Form}}var $=Y();function J(){return e.withTheme(Y())}var Q=J();exports.Form=Q,exports.Templates=M,exports.Theme=$,exports.Widgets=H,exports.default=Q,exports.generateForm=J,exports.generateTemplates=L,exports.generateTheme=Y,exports.generateWidgets=K;
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 { Button, Icon, ButtonProps } from 'semantic-ui-react';\nimport { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\n/** The `AddButton` renders a button that represent the `Add` action on a form\n */\nexport default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n uiSchema,\n registry,\n color,\n ...props\n}: 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 { ElementType } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = {\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?: 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\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 = formContext.semantic && formContext.semantic.errorOptions;\n const semanticOptions: GenericObjectType = getUiOptions<T, S, F>(uiSchema).semantic as GenericObjectType;\n const schemaProps = semanticOptions && semanticOptions.errorOptions;\n const optionProps = options.semantic && (options.semantic as GenericObjectType).errorOptions;\n\n return Object.assign({}, { ...defaultProps }, schemaProps, optionProps, formContextProps);\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(classNameArr: Array<string | undefined>, omit: string[] = []) {\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[]>((previous, current) => previous.concat(current!.trim().split(/\\s+/)), []);\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({ wrap, component: Component = 'div', ...props }: WrapProps) {\n return wrap ? <Component {...props} /> : props.children;\n}\n","import {\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 } = 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 } = uiOptions.semantic as GenericObjectType;\n return (\n <div className='array-item'>\n <MaybeWrap wrap={wrapItem} component={Segment}>\n <Grid\n style={\n index !== 0 ? { ...gridStyle(!horizontalButtons), alignItems: 'center' } : 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 {\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<'ArrayFieldDescriptionTemplate', T, S, F>(\n 'ArrayFieldDescriptionTemplate',\n registry,\n uiOptions\n );\n const ArrayFieldItemTemplate = getTemplate<'ArrayFieldItemTemplate', T, S, F>(\n 'ArrayFieldItemTemplate',\n registry,\n uiOptions\n );\n const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>(\n 'ArrayFieldTitleTemplate',\n registry,\n uiOptions\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <div className={cleanClassNames([className, isFixedItems<S>(schema) ? '' : 'sortable-form-fields'])}>\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(({ key, uiSchema: itemUiSchema = {}, ...props }: 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 <ArrayFieldItemTemplate key={key} {...props} uiSchema={mergedUiSchema} />;\n })}\n </div>\n {canAdd && (\n <div\n style={{\n marginTop: '1rem',\n position: 'relative',\n textAlign: 'right',\n }}\n >\n <AddButton onClick={onAddClick} disabled={disabled || readonly} uiSchema={uiSchema} registry={registry} />\n </div>\n )}\n </div>\n </div>\n );\n}\n","import { ChangeEvent } from 'react';\nimport { Form } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\nimport {\n ariaDescribedByIds,\n BaseInputTemplateProps,\n examplesId,\n getInputProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\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: BaseInputTemplateProps<T, S, F>) {\n const {\n id,\n placeholder,\n label,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onChangeOverride,\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 = ({ target: { value } }: 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={onChangeOverride || _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(schema.default && !schema.examples.includes(schema.default) ? ([schema.default] as string[]) : [])\n .map((example) => {\n return <option key={example} value={example} />;\n })}\n </datalist>\n )}\n </>\n );\n}\n","import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } 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 { Message } from 'semantic-ui-react';\nimport { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n errors,\n registry,\n}: ErrorListProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <Message negative>\n <Message.Header>{translateString(TranslatableString.ErrorsLabel)}</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 { Button, ButtonProps } from 'semantic-ui-react';\nimport { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\nfunction IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const { icon, iconType, color, className, uiSchema, registry, ...otherProps } = 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveDownButton)} {...props} icon='angle down' />;\n}\n\nexport function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveUpButton)} {...props} icon='angle up' />;\n}\n\nexport function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.RemoveButton)} {...props} icon='trash' />;\n}\n","import { errorId, FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } 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 id={id} color='red' pointing={pointing || 'above'} size={size || 'small'} basic>\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 { Message } from 'semantic-ui-react';\nimport { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema, helpId } 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 {\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<'WrapIfAdditionalTemplate', T, S, F>(\n 'WrapIfAdditionalTemplate',\n registry,\n uiOptions\n );\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n uiOptions\n );\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 { 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>('TitleFieldTemplate', registry, uiOptions);\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n uiOptions\n );\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 { Button } from 'semantic-ui-react';\nimport { getSubmitButtonOptions, FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } 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 { submitText, norender, props: submitButtonProps = {} } = 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 { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n title,\n uiSchema,\n}: 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 { FocusEvent } 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 }: FocusEvent<HTMLInputElement>) => 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 { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } 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 { FormEvent } 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 = (_: FormEvent<HTMLInputElement>, data: CheckboxProps) => 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 { ChangeEvent } 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>('TitleFieldTemplate', registry, options);\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 } }: ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line no-shadow\n if (checked) {\n onChange(enumOptionsSelectValue<S>(index, checkboxesValues, enumOptions));\n } else {\n onChange(enumOptionsDeselectValue<S>(index, checkboxesValues, enumOptions));\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 id={titleId<T>(id)} title={title} schema={schema} uiSchema={uiSchema} registry={registry} />\n )}\n <Form.Group id={id} name={id} {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, checkboxesValues);\n const itemDisabled = Array.isArray(enumDisabled) && 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 { FormEvent } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>\n) {\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 = (_: FormEvent<HTMLInputElement>, { value: eventValue }: CheckboxProps) => {\n return onChange(enumOptionsValueForIndex<S>(eventValue!, enumOptions, emptyValue));\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 = Array.isArray(enumDisabled) && 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 { ChangeEvent } from 'react';\nimport { Input } from 'semantic-ui-react';\nimport { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps, rangeSpec } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>\n) {\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 = ({ target: { value } }: 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 { FocusEvent, SyntheticEvent } 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<S extends StrictRJSFSchema = RJSFSchema>(\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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>\n) {\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>(enumOptions, enumDisabled);\n const _onChange = (_: SyntheticEvent<HTMLElement>, { value }: DropdownProps) =>\n onChange(enumOptionsValueForIndex<S>(value as string[], enumOptions, optEmptyVal));\n // eslint-disable-next-line no-shadow\n const _onBlur = (_: FocusEvent<HTMLElement>, { target: { value } }: DropdownProps) =>\n onBlur(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));\n const _onFocus = (_: FocusEvent<HTMLElement>, { target: { value } }: DropdownProps) =>\n onFocus(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));\n const selectedIndexes = enumOptionsIndexForValue<S>(value, enumOptions, multiple);\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 { ChangeEvent } from 'react';\nimport { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } 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 = ({ target: { value } }: 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 { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } 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","_jsx","jsx","Button","_extends","title","translateString","TranslatableString","AddItemButton","icon","size","children","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","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","_jsxs","jsxs","Grid","style","alignItems","Column","width","verticalAlign","Group","onClick","ArrayFieldTemplate","idSchema","canAdd","items","onAddClick","required","schema","semanticProps","ArrayFieldDescriptionTemplate","getTemplate","ArrayFieldTitleTemplate","isFixedItems","description","map","_extends2","key","itemUiSchema","mergedUiSchema","UI_OPTIONS_KEY","marginTop","position","textAlign","$id","BaseInputTemplate","id","placeholder","label","value","onChange","onChangeOverride","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","_getSubmitButtonOptio2","_getSubmitButtonOptio","norender","primary","submitText","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","_createElement","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":"mtBAKwB,SAAAA,EAKGC,GAJzBC,IACAC,IAAAA,SACAC,IAAAA,MACGC,EAAKC,EAAAL,EAAAM,GAGR,OACEC,EAAAC,IAACC,EAAMA,OAAAC,EAAA,CACLC,OAAOC,EAHiBV,EAApBU,iBAGmBC,EAAkBA,mBAACC,eAC1CX,MAAOA,GACHC,EAAK,CACTW,MAAI,EACJC,KAAK,OAELC,SAAAV,EAAAC,IAACU,OAAI,CAACC,KAAK,WAGjB,4BCuBgB,SAAAC,EAMcpB,GAAA,IAAAqB,EAAArB,EAL5BsB,YAAqBC,EAAAvB,EACrBC,SAAauB,EAAAxB,EACbyB,QAAAA,OAAO,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAA1B,EACZ2B,mBAAAA,OAAqB,IAAAD,EAAA,CAAEE,OAAO,EAAMC,UAAU,GAAOH,EAAAI,EAAA9B,EACrD+B,oBAAAA,OAAmB,IAAAD,EAAG,CAAA,EAAEA,EAElBE,QANK,IAAAX,EAAG,CAAO,EAAAA,GAMgBY,SAC/BC,EAAcC,EAAAA,kBANZ,IAAAZ,EAAG,CAAE,EAAAA,GAMuCU,SAC9CG,EAAcX,EAAQQ,SAE5B,OAAOI,OAAOC,OACZ,CAAE,EACGX,EAAAA,CAAAA,EAAAA,GACAI,EAAAA,CAAAA,EAAAA,GACLG,EACAE,EACAJ,EAEJ,UAsCgBO,EAAgBC,EAAyCC,YAAAA,IAAAA,EAAiB,IAGxF,IAAMC,EAAYF,EACfG,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N,IAC5B,CAEA,IAAAO,EAAeF"}
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 { Button, Icon, ButtonProps } from 'semantic-ui-react';\nimport { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\n/** The `AddButton` renders a button that represent the `Add` action on a form\n */\nexport default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n uiSchema,\n registry,\n color,\n ...props\n}: 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 { ElementType } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = {\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?: 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\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 = formContext.semantic && formContext.semantic.errorOptions;\n const semanticOptions: GenericObjectType = getUiOptions<T, S, F>(uiSchema).semantic as GenericObjectType;\n const schemaProps = semanticOptions && semanticOptions.errorOptions;\n const optionProps = options.semantic && (options.semantic as GenericObjectType).errorOptions;\n\n return Object.assign({}, { ...defaultProps }, schemaProps, optionProps, formContextProps);\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(classNameArr: Array<string | undefined>, omit: string[] = []) {\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[]>((previous, current) => previous.concat(current!.trim().split(/\\s+/)), []);\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({ wrap, component: Component = 'div', ...props }: WrapProps) {\n return wrap ? <Component {...props} /> : props.children;\n}\n","import {\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 : 150}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 hasCopy,\n hasMoveDown,\n hasMoveUp,\n hasRemove,\n index,\n onCopyIndexClick,\n onDropIndexClick,\n onReorderClick,\n readonly,\n uiSchema,\n registry,\n } = props;\n const { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } = 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 = true, wrapItem = false } = uiOptions.semantic as GenericObjectType;\n return (\n <div className='array-item'>\n <MaybeWrap wrap={wrapItem} component={Segment}>\n <Grid style={{ ...gridStyle(!horizontalButtons), alignItems: 'center' }}>\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 {hasCopy && (\n <CopyButton\n className='array-item-copy'\n disabled={disabled || readonly}\n onClick={onCopyIndexClick(index)}\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 {\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: true, 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<'ArrayFieldDescriptionTemplate', T, S, F>(\n 'ArrayFieldDescriptionTemplate',\n registry,\n uiOptions\n );\n const ArrayFieldItemTemplate = getTemplate<'ArrayFieldItemTemplate', T, S, F>(\n 'ArrayFieldItemTemplate',\n registry,\n uiOptions\n );\n const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>(\n 'ArrayFieldTitleTemplate',\n registry,\n uiOptions\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <div className={cleanClassNames([className, isFixedItems<S>(schema) ? '' : 'sortable-form-fields'])}>\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(({ key, uiSchema: itemUiSchema = {}, ...props }: 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 <ArrayFieldItemTemplate key={key} {...props} uiSchema={mergedUiSchema} />;\n })}\n </div>\n {canAdd && (\n <div\n style={{\n marginTop: '1rem',\n position: 'relative',\n textAlign: 'right',\n }}\n >\n <AddButton onClick={onAddClick} disabled={disabled || readonly} uiSchema={uiSchema} registry={registry} />\n </div>\n )}\n </div>\n </div>\n );\n}\n","import { ChangeEvent } from 'react';\nimport { Form } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\nimport {\n ariaDescribedByIds,\n BaseInputTemplateProps,\n examplesId,\n getInputProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\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: BaseInputTemplateProps<T, S, F>) {\n const {\n id,\n placeholder,\n label,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onChangeOverride,\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 = ({ target: { value } }: 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={onChangeOverride || _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(schema.default && !schema.examples.includes(schema.default) ? ([schema.default] as string[]) : [])\n .map((example) => {\n return <option key={example} value={example} />;\n })}\n </datalist>\n )}\n </>\n );\n}\n","import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } 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 { Message } from 'semantic-ui-react';\nimport { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n errors,\n registry,\n}: ErrorListProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <Message negative>\n <Message.Header>{translateString(TranslatableString.ErrorsLabel)}</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 { Button, ButtonProps } from 'semantic-ui-react';\nimport { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\nfunction IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const { icon, iconType, color, className, uiSchema, registry, ...otherProps } = 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 CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.CopyButton)} {...props} icon='copy' />;\n}\n\nexport function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveDownButton)} {...props} icon='angle down' />;\n}\n\nexport function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveUpButton)} {...props} icon='angle up' />;\n}\n\nexport function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.RemoveButton)} {...props} icon='trash' />;\n}\n","import { errorId, FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } 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 id={id} color='red' pointing={pointing || 'above'} size={size || 'small'} basic>\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 { Message } from 'semantic-ui-react';\nimport { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema, helpId } 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 {\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<'WrapIfAdditionalTemplate', T, S, F>(\n 'WrapIfAdditionalTemplate',\n registry,\n uiOptions\n );\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n uiOptions\n );\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 { 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>('TitleFieldTemplate', registry, uiOptions);\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n uiOptions\n );\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 { Button } from 'semantic-ui-react';\nimport { getSubmitButtonOptions, FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } 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 { submitText, norender, props: submitButtonProps = {} } = 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 { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n title,\n uiSchema,\n}: 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 { FocusEvent } 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 }: FocusEvent<HTMLInputElement>) => 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 { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } 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 { CopyButton, 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 CopyButton,\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 { FormEvent } 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 = (_: FormEvent<HTMLInputElement>, data: CheckboxProps) => 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 { ChangeEvent } 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>('TitleFieldTemplate', registry, options);\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 } }: ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line no-shadow\n if (checked) {\n onChange(enumOptionsSelectValue<S>(index, checkboxesValues, enumOptions));\n } else {\n onChange(enumOptionsDeselectValue<S>(index, checkboxesValues, enumOptions));\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 id={titleId<T>(id)} title={title} schema={schema} uiSchema={uiSchema} registry={registry} />\n )}\n <Form.Group id={id} name={id} {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, checkboxesValues);\n const itemDisabled = Array.isArray(enumDisabled) && 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 { FormEvent } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>\n) {\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 = (_: FormEvent<HTMLInputElement>, { value: eventValue }: CheckboxProps) => {\n return onChange(enumOptionsValueForIndex<S>(eventValue!, enumOptions, emptyValue));\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 = Array.isArray(enumDisabled) && 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 { ChangeEvent } from 'react';\nimport { Input } from 'semantic-ui-react';\nimport { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps, rangeSpec } 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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>\n) {\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 = ({ target: { value } }: 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 { FocusEvent, SyntheticEvent } 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<S extends StrictRJSFSchema = RJSFSchema>(\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<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>\n) {\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>(enumOptions, enumDisabled);\n const _onChange = (_: SyntheticEvent<HTMLElement>, { value }: DropdownProps) =>\n onChange(enumOptionsValueForIndex<S>(value as string[], enumOptions, optEmptyVal));\n // eslint-disable-next-line no-shadow\n const _onBlur = (_: FocusEvent<HTMLElement>, { target: { value } }: DropdownProps) =>\n onBlur(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));\n const _onFocus = (_: FocusEvent<HTMLElement>, { target: { value } }: DropdownProps) =>\n onFocus(id, enumOptionsValueForIndex<S>(value, enumOptions, optEmptyVal));\n const selectedIndexes = enumOptionsIndexForValue<S>(value, enumOptions, multiple);\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 { ChangeEvent } from 'react';\nimport { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } 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 = ({ target: { value } }: 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 { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } 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","registry","color","props","_objectWithoutPropertiesLoose","_excluded","_jsx","jsx","Button","_extends","title","translateString","TranslatableString","AddItemButton","icon","size","children","Icon","name","getSemanticProps","_ref$formContext","formContext","_ref$uiSchema","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","ArrayFieldItemTemplate","vertical","disabled","hasToolbar","hasCopy","hasMoveDown","hasMoveUp","hasRemove","index","onCopyIndexClick","onDropIndexClick","onReorderClick","readonly","_registry$templates$B","templates","ButtonTemplates","CopyButton","MoveDownButton","MoveUpButton","RemoveButton","_uiOptions$semantic","_uiOptions$semantic$h","horizontalButtons","_uiOptions$semantic$w","wrapItem","className","Segment","_jsxs","jsxs","Grid","style","display","gridTemplateColumns","alignItems","Column","width","verticalAlign","Group","onClick","ArrayFieldTemplate","idSchema","canAdd","items","onAddClick","required","schema","semanticProps","uiOptions","ArrayFieldDescriptionTemplate","getTemplate","ArrayFieldTitleTemplate","isFixedItems","description","map","_extends2","key","itemUiSchema","mergedUiSchema","UI_OPTIONS_KEY","marginTop","position","textAlign","$id","BaseInputTemplate","id","placeholder","label","value","onChange","onChangeOverride","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","_getSubmitButtonOptio","getSubmitButtonOptions","_getSubmitButtonOptio2","norender","primary","submitText","dividing","TitleField","as","onDropPropertyClick","onKeyChange","keyLabel","KeyLabel","_registry$formContext","_registry$formContext2","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","_createElement","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","SemanticU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AAYA,EAAmB,KAAVD,EAAevG,EAAQgI,WAAazB,EAAM,EAmB7DG,OAlBY,WAAH,OAASA,GAAUA,EAAON,EAAIG,EAAM,EAmB7CI,QAlBa,WAAH,OAASA,GAAWA,EAAQP,EAAIG,EAAM,EAmB9B,mBAAA0B,EAAkBA,mBAAI7B,KAdnCA,EAiBX,UCxDgBoK,IAKd,MAAO,CACLjD,eAAAA,EACAM,iBAAAA,EACAgB,YAAAA,EACAO,YAAAA,EACAE,aAAAA,EACAe,eAAAA,EAEJ,CAEA,IAAAI,EAAeD,aCjBCE,IAKd,MAAO,CACLxN,UAAWkK,IACXuD,QAASH,IACTI,qBAAsBC,EAAAA,KAE1B,CAEA,IAAAC,EAAeJ,aCbCK,IAKd,OAAOC,EAASA,UAAUN,IAC5B,CAEA,IAAAO,EAAeF"}
@@ -155,7 +155,7 @@ function MaybeWrap(_ref3) {
155
155
  var gridStyle = function gridStyle(vertical) {
156
156
  return {
157
157
  display: 'grid',
158
- gridTemplateColumns: "1fr " + (vertical ? 65 : 110) + "px"
158
+ gridTemplateColumns: "1fr " + (vertical ? 65 : 150) + "px"
159
159
  };
160
160
  };
161
161
  /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
@@ -166,16 +166,19 @@ function ArrayFieldItemTemplate(props) {
166
166
  var children = props.children,
167
167
  disabled = props.disabled,
168
168
  hasToolbar = props.hasToolbar,
169
+ hasCopy = props.hasCopy,
169
170
  hasMoveDown = props.hasMoveDown,
170
171
  hasMoveUp = props.hasMoveUp,
171
172
  hasRemove = props.hasRemove,
172
173
  index = props.index,
174
+ onCopyIndexClick = props.onCopyIndexClick,
173
175
  onDropIndexClick = props.onDropIndexClick,
174
176
  onReorderClick = props.onReorderClick,
175
177
  readonly = props.readonly,
176
178
  uiSchema = props.uiSchema,
177
179
  registry = props.registry;
178
180
  var _registry$templates$B = registry.templates.ButtonTemplates,
181
+ CopyButton = _registry$templates$B.CopyButton,
179
182
  MoveDownButton = _registry$templates$B.MoveDownButton,
180
183
  MoveUpButton = _registry$templates$B.MoveUpButton,
181
184
  RemoveButton = _registry$templates$B.RemoveButton;
@@ -183,7 +186,7 @@ function ArrayFieldItemTemplate(props) {
183
186
  // Pull the semantic props out of the uiOptions that were put in via the ArrayFieldTemplate
184
187
  var _uiOptions$semantic = uiOptions.semantic,
185
188
  _uiOptions$semantic$h = _uiOptions$semantic.horizontalButtons,
186
- horizontalButtons = _uiOptions$semantic$h === void 0 ? false : _uiOptions$semantic$h,
189
+ horizontalButtons = _uiOptions$semantic$h === void 0 ? true : _uiOptions$semantic$h,
187
190
  _uiOptions$semantic$w = _uiOptions$semantic.wrapItem,
188
191
  wrapItem = _uiOptions$semantic$w === void 0 ? false : _uiOptions$semantic$w;
189
192
  return jsx("div", {
@@ -192,9 +195,9 @@ function ArrayFieldItemTemplate(props) {
192
195
  wrap: wrapItem,
193
196
  component: Segment,
194
197
  children: jsxs(Grid, {
195
- style: index !== 0 ? _extends({}, gridStyle(!horizontalButtons), {
198
+ style: _extends({}, gridStyle(!horizontalButtons), {
196
199
  alignItems: 'center'
197
- }) : gridStyle(!horizontalButtons),
200
+ }),
198
201
  children: [jsx(Grid.Column, {
199
202
  width: 16,
200
203
  verticalAlign: 'middle',
@@ -215,6 +218,12 @@ function ArrayFieldItemTemplate(props) {
215
218
  onClick: onReorderClick(index, index + 1),
216
219
  uiSchema: uiSchema,
217
220
  registry: registry
221
+ }), hasCopy && jsx(CopyButton, {
222
+ className: 'array-item-copy',
223
+ disabled: disabled || readonly,
224
+ onClick: onCopyIndexClick(index),
225
+ uiSchema: uiSchema,
226
+ registry: registry
218
227
  }), hasRemove && jsx(RemoveButton, {
219
228
  className: 'array-item-remove',
220
229
  disabled: disabled || readonly,
@@ -252,7 +261,7 @@ function ArrayFieldTemplate(props) {
252
261
  uiSchema: uiSchema,
253
262
  formContext: formContext,
254
263
  defaultSchemaProps: {
255
- horizontalButtons: false,
264
+ horizontalButtons: true,
256
265
  wrapItem: false
257
266
  }
258
267
  });
@@ -444,6 +453,14 @@ function IconButton(props) {
444
453
  className: className
445
454
  }, otherProps));
446
455
  }
456
+ function CopyButton(props) {
457
+ var translateString = props.registry.translateString;
458
+ return jsx(IconButton, _extends({
459
+ title: translateString(TranslatableString.CopyButton)
460
+ }, props, {
461
+ icon: 'copy'
462
+ }));
463
+ }
447
464
  function MoveDownButton(props) {
448
465
  var translateString = props.registry.translateString;
449
466
  return jsx(IconButton, _extends({
@@ -802,6 +819,7 @@ function generateTemplates() {
802
819
  BaseInputTemplate: BaseInputTemplate,
803
820
  ButtonTemplates: {
804
821
  AddButton: AddButton,
822
+ CopyButton: CopyButton,
805
823
  MoveDownButton: MoveDownButton,
806
824
  MoveUpButton: MoveUpButton,
807
825
  RemoveButton: RemoveButton,
@@ -845,7 +863,7 @@ function CheckboxWidget(props) {
845
863
  formContext: formContext,
846
864
  uiSchema: uiSchema,
847
865
  defaultSchemaProps: {
848
- inverted: false
866
+ inverted: 'false'
849
867
  }
850
868
  });
851
869
  // Because an unchecked checkbox will cause html5 validation to fail, only add
@@ -911,7 +929,7 @@ function CheckboxesWidget(props) {
911
929
  formContext: formContext,
912
930
  uiSchema: uiSchema,
913
931
  defaultSchemaProps: {
914
- inverted: false
932
+ inverted: 'false'
915
933
  }
916
934
  });
917
935
  var _onChange = function _onChange(index) {
@@ -1218,7 +1236,7 @@ function TextareaWidget(props) {
1218
1236
  formContext: formContext,
1219
1237
  options: options,
1220
1238
  defaultSchemaProps: {
1221
- inverted: false
1239
+ inverted: 'false'
1222
1240
  }
1223
1241
  });
1224
1242
  var schemaUtils = registry.schemaUtils;