jamespot-react-components 1.0.226 → 1.0.228
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.
|
@@ -2242,7 +2242,7 @@
|
|
|
2242
2242
|
display: flex;
|
|
2243
2243
|
justify-content: flex-end;
|
|
2244
2244
|
font-size: 12px;
|
|
2245
|
-
`;function qB(e){var t,n,r,o;const
|
|
2245
|
+
`;function qB(e){var t,n,r,o,i;const a=bl(),{field:l,fieldState:{error:s}}=bo({name:e.name,control:e.control,rules:Object.assign($B(e.rules,a)||{},{validate:e.rulesValidate}||{})}),[c,u]=(0,_.useState)("grey3"),d=e=>u(e?"yellow":"grey3"),p=(0,_.useMemo)((()=>{var t;return HB(null===(t=e.rules)||void 0===t?void 0:t.maxLength)}),[null===(t=e.rules)||void 0===t?void 0:t.maxLength]);return _.createElement(UB,{className:e.className,margin:e.margin,width:e.width},(e.label||e.helper||e.description||(null===(n=e.rules)||void 0===n?void 0:n.required)&&!e.readOnly)&&_.createElement(pj,{htmlFor:e.htmlFor||e.name,labelIsLegend:e.labelIsLegend},_.createElement(WB,{reducedWidth:!!(null===(r=e.rules)||void 0===r?void 0:r.required)},_.createElement("div",null,e.label&&a.formatMessage({id:e.label}),e.helper&&_.createElement(mj,{tooltip:e.helper,color:c}),e.description&&_.createElement(Ej,null,"string"==typeof e.description?a.formatMessage({id:e.description}):e.description)),(null===(o=e.rules)||void 0===o?void 0:o.required)&&!e.readOnly&&_.createElement(VB,{error:function(){var t;return!(!(null===(t=e.rules)||void 0===t?void 0:t.required)||!(s&&s.types&&Object.keys(s.types).includes("required")||void 0===l.value||null===l.value||""===l.value||Array.isArray(l.value)&&!l.value.length))}()},a.formatMessage({id:"GLOBAL_Form_Controls_Required"})))),_.createElement("div",{className:"input-wrapper",onFocus:()=>d(!0),onBlur:()=>d(!1)},e.renderFunction(l)),p&&(null===(i=l.value)||void 0===i?void 0:i.length)>=0&&_.createElement(GB,null,l.value.length," / ",p),_.createElement(FB,{error:s}))}var YB=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const JB=Bx.div`
|
|
2246
2246
|
display: flex;
|
|
2247
2247
|
gap: 10px;
|
|
2248
2248
|
`,KB=_.forwardRef(((e,t)=>{var{onLoading:n,showLoading:r}=e,o=YB(e,["onLoading","showLoading"]);const[i,a]=(0,_.useState)(!1);return o.name&&o.token?_.createElement(JB,null,_.createElement(NI,Object.assign({type:"file",id:o.name},o,{value:void 0,onChange:function(e){const t=o.token;e.target.files&&t&&(a(!0),null==n||n(!0),A().file.uploadMany(Array.from(e.target.files).map((e=>{var n,r;return{attrName:null!==(r=null!==(n=o.attrName)&&void 0!==n?n:o.name)&&void 0!==r?r:"",file:e,token:t}}))).then((e=>{const t=e.map((e=>e.response));o.onChange(t)})).finally((()=>{a(!1),null==n||n(!1)})))},ref:t})),i&&r&&_.createElement(gE,null)):null}));function ZB(e){return _.createElement(qB,Object.assign({},e,{renderFunction:t=>{var{value:n}=t,r=YB(t,["value"]);return _.createElement(KB,Object.assign({},e,r,{value:n}))}}))}const XB=o.p+"assets/group-background.daf782321c7f65cde0fc3d5918d27762.png",QB=Bx.div`
|
|
@@ -4386,6 +4386,7 @@
|
|
|
4386
4386
|
display: flex;
|
|
4387
4387
|
flex-direction: column;
|
|
4388
4388
|
overflow: hidden;
|
|
4389
|
+
position: relative;
|
|
4389
4390
|
`,uq=Bx.div`
|
|
4390
4391
|
position: absolute;
|
|
4391
4392
|
inset: 0;
|