@feathery/react 2.11.0 → 2.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/elements/fields/FileUploadField/index.d.ts.map +1 -1
- package/dist/cjs/elements/fields/index.d.ts.map +1 -1
- package/dist/cjs/{fthry_FormControl.BlJZjs35.js → fthry_FormControl.D6cl6D9S.js} +1 -1
- package/dist/cjs/{fthry_InlineTooltip.BkttK4lB.js → fthry_InlineTooltip.BznYePC8.js} +2 -2
- package/dist/cjs/{fthry_Overlay.OLX1E5Mx.js → fthry_Overlay.Y_J8ccm6.js} +1 -1
- package/dist/cjs/{fthry_PaymentMethodField.xVoJ3tP3.js → fthry_PaymentMethodField.D0YALHBL.js} +4 -4
- package/dist/cjs/{fthry_Placeholder.BYhrdrmr.js → fthry_Placeholder.DLJqaPGW.js} +1 -1
- package/dist/cjs/{fthry_ShowEyeIcon.D2ndFoZG.js → fthry_ShowEyeIcon.DzvNCry-.js} +1 -1
- package/dist/cjs/{fthry_index.DVoFPw_6.js → fthry_index.5Pl_oKxb.js} +3 -3
- package/dist/cjs/{fthry_index.DU4NyVta.js → fthry_index.6K3SolcM.js} +8 -8
- package/dist/cjs/{fthry_index.Dscne3Dt.js → fthry_index.BIDjlZK9.js} +1 -1
- package/dist/cjs/{fthry_index.C91OrhDJ.js → fthry_index.BVctbQwI.js} +1 -1
- package/dist/cjs/{fthry_index.DivS5VJj.js → fthry_index.Biaf9DMR.js} +1 -1
- package/dist/cjs/{fthry_index.u1vwwO92.js → fthry_index.C-CXGg0X.js} +6 -6
- package/dist/cjs/{fthry_index.C6L3jtzR.js → fthry_index.CVdIUnnS.js} +4 -4
- package/dist/cjs/{fthry_index.CBzm-zz0.js → fthry_index.CaFboSVZ.js} +2 -2
- package/dist/cjs/{fthry_index.CxCE-XtP.js → fthry_index.Cl0pC-iC.js} +6 -6
- package/dist/cjs/{fthry_index.CBVYoHSE.js → fthry_index.DKwYIEay.js} +4 -4
- package/dist/cjs/{fthry_index.BaPWhv11.js → fthry_index.DPJLojch.js} +1 -1
- package/dist/cjs/{fthry_index.hcpwrtk6.js → fthry_index.DfjbwYs8.js} +5 -5
- package/dist/cjs/{fthry_index.Bo70vqfi.js → fthry_index.Dg3FFh_g.js} +9 -4
- package/dist/cjs/{fthry_index.KFDJ5jHx.js → fthry_index.DhP_ifSD.js} +3 -3
- package/dist/cjs/{fthry_index.Bs9hNEnE.js → fthry_index.DmHwjSeG.js} +1 -1
- package/dist/cjs/{fthry_index.DfayElGY.js → fthry_index.EMYHk8IT.js} +28 -25
- package/dist/cjs/{fthry_index.D7NIHZKl.js → fthry_index.ObOAUNgg.js} +4 -4
- package/dist/cjs/{fthry_index.ClLgzqZ3.js → fthry_index.XwO_Rbt1.js} +1 -1
- package/dist/cjs/{fthry_index.hN9N-F0_.js → fthry_index._0ok1zlZ.js} +6 -6
- package/dist/cjs/{fthry_index.Bw4tg6t2.js → fthry_index.hetQ4hFA.js} +5 -5
- package/dist/cjs/{fthry_index.CS9Y7B8-.js → fthry_index.lBGOIoJv.js} +5 -5
- package/dist/cjs/{fthry_index.gNcgXpsa.js → fthry_index.nvFgoNpW.js} +2 -2
- package/dist/cjs/{fthry_index.B-OQCs5M.js → fthry_index.uPlANshe.js} +5 -5
- package/dist/cjs/{fthry_input.BiOQUOMr.js → fthry_input.zxl6q_39.js} +1 -1
- package/dist/cjs/{fthry_script.BIB8RC3N.js → fthry_script.BR1PC2YO.js} +1 -1
- package/dist/cjs/{fthry_styles.EGpWXoMs.js → fthry_styles.8kKnpgke.js} +1 -1
- package/dist/cjs/{fthry_useElementSize.DcThHOvc.js → fthry_useElementSize.d2r6U5ah.js} +1 -1
- package/dist/cjs/{fthry_useSalesforceSync.DFczx5s3.js → fthry_useSalesforceSync.BhgCgOph.js} +1 -1
- package/dist/cjs/{fthry_webfontloader.DasBAca1.js → fthry_webfontloader.BxRwLQqw.js} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/utils/image.d.ts.map +1 -1
- package/dist/elements/fields/FileUploadField/index.d.ts.map +1 -1
- package/dist/elements/fields/index.d.ts.map +1 -1
- package/dist/esm/elements/fields/FileUploadField/index.d.ts.map +1 -1
- package/dist/esm/elements/fields/index.d.ts.map +1 -1
- package/dist/esm/{fthry_FormControl.Bvp1ol8q.js → fthry_FormControl.Dw6vin7t.js} +1 -1
- package/dist/esm/{fthry_InlineTooltip.CGcT2Q5h.js → fthry_InlineTooltip.BefepzqB.js} +2 -2
- package/dist/esm/{fthry_Overlay.BkaabwQm.js → fthry_Overlay.KSPvV_5I.js} +1 -1
- package/dist/esm/{fthry_PaymentMethodField.BxwQuSXD.js → fthry_PaymentMethodField.BUfFS7UV.js} +4 -4
- package/dist/esm/{fthry_Placeholder.BGwhXwAz.js → fthry_Placeholder.BW8tIivs.js} +1 -1
- package/dist/esm/{fthry_ShowEyeIcon.BvjO5Fwu.js → fthry_ShowEyeIcon.BKxMDQ6E.js} +1 -1
- package/dist/esm/{fthry_index.DT8ZfHHu.js → fthry_index.56gEPYOD.js} +6 -6
- package/dist/esm/{fthry_index.D3GResKv.js → fthry_index.B47QNn0m.js} +5 -5
- package/dist/esm/{fthry_index.Nu99hAd8.js → fthry_index.B6wWZFeh.js} +6 -6
- package/dist/esm/{fthry_index.CAnpWx_Z.js → fthry_index.B792Q-9f.js} +4 -4
- package/dist/esm/{fthry_index.FH2KJFfM.js → fthry_index.BLXBhPia.js} +1 -1
- package/dist/esm/{fthry_index.w1320dF7.js → fthry_index.BnK1bTAO.js} +5 -5
- package/dist/esm/{fthry_index.Bi5cCZNy.js → fthry_index.BroPvTJq.js} +2 -2
- package/dist/esm/{fthry_index.C2S4c5pF.js → fthry_index.C8W18PjB.js} +6 -6
- package/dist/esm/{fthry_index.CBNspXVR.js → fthry_index.CI9m6hZF.js} +28 -25
- package/dist/esm/{fthry_index.BOVi_Kyn.js → fthry_index.CJ32ytSR.js} +1 -1
- package/dist/esm/{fthry_index.CCw70Cjx.js → fthry_index.ClAqMRNE.js} +5 -5
- package/dist/esm/{fthry_index.BLb5-3Gk.js → fthry_index.CquWPUWD.js} +5 -5
- package/dist/esm/{fthry_index.Dbx-Pve6.js → fthry_index.Cwlyf022.js} +9 -4
- package/dist/esm/{fthry_index.CTHihuoA.js → fthry_index.D9_3XAGw.js} +8 -8
- package/dist/esm/{fthry_index.LkObY36D.js → fthry_index.DNGxrq0x.js} +4 -4
- package/dist/esm/{fthry_index.CNDhPheV.js → fthry_index.DrkBLnxc.js} +2 -2
- package/dist/esm/{fthry_index.BQa_ZCWw.js → fthry_index.Dwn_Hlhv.js} +1 -1
- package/dist/esm/{fthry_index.BbTIO7u5.js → fthry_index.DySdw1qz.js} +3 -3
- package/dist/esm/{fthry_index.CUaZkZZ2.js → fthry_index.WbUsG08Q.js} +3 -3
- package/dist/esm/{fthry_index.ptB6q5XU.js → fthry_index.bwiHR1sL.js} +1 -1
- package/dist/esm/{fthry_index.DYTH_1IR.js → fthry_index.iCgN6lqQ.js} +1 -1
- package/dist/esm/{fthry_index.BMcwXprn.js → fthry_index.o9Sz1ZZ7.js} +4 -4
- package/dist/esm/{fthry_index.B0OijNSq.js → fthry_index.zq2HD0Fd.js} +1 -1
- package/dist/esm/{fthry_input.Bw3xhju0.js → fthry_input.sAUJXmRh.js} +1 -1
- package/dist/esm/{fthry_script.LLJ5A9CG.js → fthry_script.Ddc0lRD_.js} +1 -1
- package/dist/esm/{fthry_styles.Bv1uXTuw.js → fthry_styles.3ifXNVk6.js} +1 -1
- package/dist/esm/{fthry_useElementSize.COtsWo4L.js → fthry_useElementSize.MYGhO3UW.js} +1 -1
- package/dist/esm/{fthry_useSalesforceSync.Kx93832t.js → fthry_useSalesforceSync.CLzWAPAF.js} +1 -1
- package/dist/esm/{fthry_webfontloader.DtNRbLFp.js → fthry_webfontloader.DbHsRpPk.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/utils/image.d.ts.map +1 -1
- package/dist/utils/image.d.ts.map +1 -1
- package/package.json +1 -1
- package/umd/FileUploadField.ea0067dd62b0454b7c2e.js +1 -0
- package/umd/index.js +1 -1
- package/umd/FileUploadField.11dcf999a3604cdf4ea0.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as featheryWindow, j as jsxs, a as __assign, b as jsx, _ as __read, u as useBorder, h as hoverStylesGuard, ah as isNum } from './fthry_index.
|
|
1
|
+
import { l as featheryWindow, j as jsxs, a as __assign, b as jsx, _ as __read, u as useBorder, h as hoverStylesGuard, ah as isNum } from './fthry_index.CI9m6hZF.js';
|
|
2
2
|
import { useRef, useCallback, useEffect, useState } from 'react';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom/client';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useState, useMemo } from 'react';
|
|
3
|
-
import { aq as cls, j as jsxs, m as Fragment, b as jsx, G as Global, o as css, p as __makeTemplateObject } from './fthry_index.
|
|
3
|
+
import { aq as cls, j as jsxs, m as Fragment, b as jsx, G as Global, o as css, p as __makeTemplateObject } from './fthry_index.CI9m6hZF.js';
|
|
4
4
|
import { flushSync } from 'react-dom';
|
|
5
5
|
|
|
6
6
|
function canUseDom() {
|
package/dist/esm/{fthry_useSalesforceSync.Kx93832t.js → fthry_useSalesforceSync.CLzWAPAF.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __read, c as __awaiter, d as __generator, F as FeatheryClient } from './fthry_index.
|
|
1
|
+
import { _ as __read, c as __awaiter, d as __generator, F as FeatheryClient } from './fthry_index.CI9m6hZF.js';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
function useSalesforceSync(salesforceSync, editMode) {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aw as Elements, aF as Feathery, av as Form, aD as LoginForm, aG as StyledContainer, aB as getFieldValues, ax as init, aC as renderAt, aA as setFieldValues, az as updateTheme, ay as updateUserId, aE as useAuthClient } from './fthry_index.
|
|
1
|
+
export { aw as Elements, aF as Feathery, av as Form, aD as LoginForm, aG as StyledContainer, aB as getFieldValues, ax as init, aC as renderAt, aA as setFieldValues, az as updateTheme, ay as updateUserId, aE as useAuthClient } from './fthry_index.CI9m6hZF.js';
|
|
2
2
|
import 'react-dom/client';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/utils/image.tsx"],"names":[],"mappings":";AAIA,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,QACgF,CAAC;AAE1G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/utils/image.tsx"],"names":[],"mappings":";AAIA,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,QACgF,CAAC;AAE1G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,UAc1C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,GAAG,EAAE,UAAU,aAAW,+EAWnE;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;;GAmBvE;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;;GAQpE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE;;;IAatD;AAED,eAAO,MAAM,aAAa,YAAa,GAAG,QAAQ,GAAG,SAYpD,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,GAAG,KAAG,QAAQ,MAAM,CAM/C,CAAC;AAEL,eAAO,MAAM,aAAa,WAAY,GAAG,YAExC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/utils/image.tsx"],"names":[],"mappings":";AAIA,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,QACgF,CAAC;AAE1G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/utils/image.tsx"],"names":[],"mappings":";AAIA,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,QACgF,CAAC;AAE1G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,UAc1C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,GAAG,EAAE,UAAU,aAAW,+EAWnE;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;;GAmBvE;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;;;GAQpE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE;;;IAatD;AAED,eAAO,MAAM,aAAa,YAAa,GAAG,QAAQ,GAAG,SAYpD,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,GAAG,KAAG,QAAQ,MAAM,CAM/C,CAAC;AAEL,eAAO,MAAM,aAAa,WAAY,GAAG,YAExC,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(this.webpackChunkFeathery=this.webpackChunkFeathery||[]).push([[710],{5289:(t,e,n)=>{n.r(e),n.d(e,{default:()=>y});var r=n(5944),i=n(7294),o=n(2943),a=n(1407),l=n(5467),u=n(1211),c=n(2988),s=n(9479),f=function(){return f=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},f.apply(this,arguments)},d=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function l(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,l)}u((r=r.apply(t,e||[])).next())}))},p=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}},h=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},v=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};const y=function(t){var e=this,n=t.element,y=t.responsiveStyles,g=t.required,m=void 0!==g&&g,b=t.disabled,w=void 0!==b&&b,x=t.editMode,C=t.onChange,k=void 0===C?function(){}:C,S=t.initialFiles,E=void 0===S?[]:S,Z=t.elementProps,_=void 0===Z?{}:Z,j=t.children,A=n.servar,B=""!==A.name,D=A.metadata.multiple,F=(0,i.useRef)(null),P=h((0,i.useState)([]),2),T=P[0],z=P[1],I=h((0,i.useState)(-1),2),M=I[0],H=I[1],L=h((0,i.useState)(new Set),2),O=L[0],R=L[1];(0,i.useEffect)((function(){(0,a.yD)(T)&&(0,a.yD)(E)||z((0,a.zZ)(E).filter(Boolean))}),[E]),(0,i.useEffect)((function(){R(new Set)}),[T.length]);var V=(0,o.hP)(T),W=T.length>0,X=D||!W,q=n.styles.hide_file_preview,G=v([],h(A.metadata.file_types),!1);A.metadata.custom_file_types&&G.push.apply(G,v([],h(A.metadata.custom_file_types.map((function(t){return".".concat(t)}))),!1));var J=A.max_length?1024*A.max_length:10485760,K=function(t){return d(e,void 0,void 0,(function(){var e,n,r,i,o,a,l,u;return p(this,(function(c){if(w)return[2];e=Array.from(t),D||(e=[e[0]]);try{if(e.some((function(t){return!t||!(t instanceof File)||t.size<=0})))throw new Error("Some files are invalid");!function(t){if(0!==G.length){var e=G.flatMap((function(t){return t.split(",").map((function(t){return t.trim()}))})),n=t.filter((function(t){return!e.some((function(e){return function(t,e){var n;if(e.endsWith("/*")){var r=e.split("/")[0];return t.type.startsWith(r+"/")}if(e.includes("/"))return t.type===e;var i="."+(null===(n=t.name.split(".").pop())||void 0===n?void 0:n.toLowerCase());return e.toLowerCase()===i}(t,e)}))}));if(n.length>0)throw new Error("Invalid file type. Allowed types: ".concat(G.join(", ")))}}(e),function(t){if(t.some((function(t){return t.size>J}))){var e="";if(J<1024)e="".concat(J," bytes");else if(J<=1048576){var n=Math.floor(J/1024);e="".concat(n," kb")}else{var r=Math.floor(J/1048576);e="".concat(r," mb")}throw new Error("File exceeds max size of ".concat(e))}}(e),n=q?0:T.length,e.length+n>20&&e.splice(20-n),r=e.map((function(t){return Promise.resolve(t)})),i=void 0,q?(i=r,o=0):(i=v(v([],h(T),!1),h(r),!1),o=n),z(i),k(i,o),null===(a=F.current)||void 0===a||a.setCustomValidity(""),F.current&&(F.current.value="")}catch(t){null===(l=F.current)||void 0===l||l.setCustomValidity(t.message),null===(u=F.current)||void 0===u||u.reportValidity()}return[2]}))}))},N=f(f({},u.lH),y.getTarget("img")),Q=n.properties.icon?(0,r.tZ)("img",{src:n.properties.icon,style:f(f({},N),{maxWidth:"100%",height:"auto"}),alt:""}):(0,r.tZ)(l.HC,{width:N.width&&"px"!==N.width?N.width:void 0,style:{maxHeight:"100%"}});return(0,r.BX)("div",f({css:f({display:"flex",flexWrap:"wrap",position:"relative",pointerEvents:x?"none":"auto",width:"100%",height:"100%"},y.getTarget("fc"))},_,{onDragOver:function(t){t.preventDefault(),t.stopPropagation()},onDrop:w?void 0:function(t){t.preventDefault(),t.stopPropagation();var e=t.dataTransfer.files;X&&K(e)}},{children:[j,!q&&V.map((function(t,n){var i=t.filename,o=t.thumbnail;return n<T.length?(0,r.BX)("div",f({css:f(f({position:"relative",width:"100%",maxHeight:"100%",overflow:"hidden",display:"flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box"},o?{}:{paddingLeft:"20px",paddingRight:"20px"}),y.getTarget("field")),onMouseEnter:function(){return H(n)},onMouseLeave:function(){return H(-1)}},{children:[M===n&&(0,r.tZ)("div",f({css:{position:"absolute",margin:"auto",left:0,right:0,top:0,bottom:0,width:"48px",height:"48px",borderRadius:"8px",backgroundColor:"#3E414D80",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},onClick:function(){return d(e,void 0,void 0,(function(){var t;return p(this,(function(e){switch(e.label){case 0:return t=s.Sv,[4,T[n]];case 1:return[2,t.apply(void 0,[e.sent()])]}}))}))}},{children:(0,r.tZ)(l._8,{})})),o&&!O.has(n)?(0,r.tZ)("img",{src:o,onError:function(){return R((function(t){return new Set(t).add(n)}))},style:{width:"100%",height:"100%",objectFit:"contain"},alt:i||""}):(0,r.tZ)("span",f({style:{height:"100%",width:"100%",wordBreak:"break-all",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center"}},{children:i||"File"})),(0,r.tZ)("div",f({css:{position:"absolute",top:"4px",right:"4px",color:"white",background:"#AAA",height:"16px",width:"16px",borderRadius:"50%",pointerEvents:w?"none":"auto",cursor:"pointer",display:"flex",justifyContent:"center",alignItems:"center",transition:"0.2s ease all","&:hover":{backgroundColor:"#BBB"}},role:"button","aria-label":"Clear file",onClick:function(t){var e;t.stopPropagation(),null===(e=F.current)||void 0===e||e.setCustomValidity(""),function(t){return function(){var e=(0,a.iZ)(T,t);z(e),k(e,-1)}}(n)()}},{children:(0,r.tZ)(l.Tw,{fill:"white",width:12,height:12})}))]}),n):null})),(X||q)&&(0,r.BX)("div",f({onClick:function(){var t;(X||q)&&(w||null===(t=F.current)||void 0===t||t.click())},css:f({position:"relative",pointerEvents:w?"none":"auto",cursor:"pointer",maxHeight:"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",overflow:"hidden",boxSizing:"border-box",width:"100%"},y.getTarget("ac"))},{children:[Q,B&&(0,r.tZ)("div",f({css:y.getTarget("add")},{children:A.name}))]})),(0,r.tZ)("input",{id:A.key,name:A.key,ref:F,type:"file",onChange:function(t){var e=t.target.files;e&&X&&K(e)},required:m&&!W,accept:G.join(",")||void 0,disabled:w,"aria-label":n.properties.aria_label,multiple:D,onFocus:s.ms,style:{position:"absolute",pointerEvents:"none",opacity:0,top:0,left:0,width:"100%",height:"100%",zIndex:c.rM-2}})]}))}}}]);
|