@salla.sa/twilight-components 2.14.312 → 2.14.313
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/{filepond-CiAt5i10.js → filepond-Cb19kTbw.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-poster-DdEJEgnf.js → filepond-plugin-file-poster-DVc66rcg.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-size-0E5awx2w.js → filepond-plugin-file-validate-size-BC6y9Sv3.js} +1 -1
- package/dist/cjs/{filepond-plugin-file-validate-type-gT-JewGH.js → filepond-plugin-file-validate-type-npctEnon.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-edit-DtBf5E5M.js → filepond-plugin-image-edit-CJrWzKcr.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-exif-orientation-DlG1UV1W.js → filepond-plugin-image-exif-orientation-CEZiujht.js} +1 -1
- package/dist/cjs/{filepond-plugin-image-preview-Dub3Jpec.js → filepond-plugin-image-preview-Bk5_ED_I.js} +1 -1
- package/dist/cjs/{index-i_mnWz5-.js → index-CeCbuoue.js} +1 -1
- package/dist/cjs/{index-BP5-4y-K.js → index-DCJLMRDw.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/salla-accordion_62.cjs.entry.js +18 -10
- package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
- package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
- package/dist/cjs/salla-apps-icons.cjs.entry.js +1 -1
- package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
- package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
- package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters-widget.cjs.entry.js +1 -1
- package/dist/cjs/salla-filters.cjs.entry.js +1 -1
- package/dist/cjs/salla-hook.cjs.entry.js +1 -1
- package/dist/cjs/salla-installment.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-loyalty-program.cjs.entry.js +1 -1
- package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
- package/dist/cjs/salla-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
- package/dist/cjs/salla-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-details.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-summary.cjs.entry.js +1 -1
- package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-orders.cjs.entry.js +1 -1
- package/dist/cjs/salla-payments.cjs.entry.js +1 -1
- package/dist/cjs/salla-price-range.cjs.entry.js +1 -1
- package/dist/cjs/salla-review-card.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews-page.cjs.entry.js +1 -1
- package/dist/cjs/salla-reviews.cjs.entry.js +1 -1
- package/dist/cjs/salla-social.cjs.entry.js +1 -1
- package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
- package/dist/cjs/salla-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
- package/dist/cjs/salla-verify.cjs.entry.js +1 -1
- package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
- package/dist/cjs/twilight.cjs.js +1 -1
- package/dist/collection/components/salla-user-menu/salla-user-menu.js +9 -1
- package/dist/components/index.js +2 -2
- package/dist/components/salla-user-menu.js +9 -1
- package/dist/esm/{filepond-aj0Vz3hN.js → filepond-9b3kZc-1.js} +1 -1
- package/dist/esm/{filepond-plugin-file-poster-lPOvqQlG.js → filepond-plugin-file-poster-CUQ3777V.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-size-CV5FbyeW.js → filepond-plugin-file-validate-size-Dfk5mlDB.js} +1 -1
- package/dist/esm/{filepond-plugin-file-validate-type-B7RUT3W_.js → filepond-plugin-file-validate-type-BPui8oQ-.js} +1 -1
- package/dist/esm/{filepond-plugin-image-edit-CXPgbHP6.js → filepond-plugin-image-edit-BHp0JfV4.js} +1 -1
- package/dist/esm/{filepond-plugin-image-exif-orientation-BKxDLyfR.js → filepond-plugin-image-exif-orientation-BZ-x6UNo.js} +1 -1
- package/dist/esm/{filepond-plugin-image-preview-B3b6dOj7.js → filepond-plugin-image-preview-D_CJzbI7.js} +1 -1
- package/dist/esm/{index-CvvOXX3k.js → index-90xXQpPV.js} +1 -1
- package/dist/esm/{index-BVJkSSs6.js → index-CtDnNMoY.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/salla-accordion_62.entry.js +18 -10
- package/dist/esm/salla-advertisement.entry.js +1 -1
- package/dist/esm/salla-app-install-alert.entry.js +1 -1
- package/dist/esm/salla-apps-icons.entry.js +1 -1
- package/dist/esm/salla-cart-item-offers.entry.js +1 -1
- package/dist/esm/salla-conditional-offer.entry.js +1 -1
- package/dist/esm/salla-contacts.entry.js +1 -1
- package/dist/esm/salla-custom-fields.entry.js +1 -1
- package/dist/esm/salla-filters-widget.entry.js +1 -1
- package/dist/esm/salla-filters.entry.js +1 -1
- package/dist/esm/salla-hook.entry.js +1 -1
- package/dist/esm/salla-installment.entry.js +1 -1
- package/dist/esm/salla-loyalty-prize-item.entry.js +1 -1
- package/dist/esm/salla-loyalty-program.entry.js +1 -1
- package/dist/esm/salla-metadata.entry.js +1 -1
- package/dist/esm/salla-notification-item.entry.js +1 -1
- package/dist/esm/salla-notifications.entry.js +1 -1
- package/dist/esm/salla-offer.entry.js +1 -1
- package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +1 -1
- package/dist/esm/salla-order-details-options.entry.js +1 -1
- package/dist/esm/salla-order-details.entry.js +1 -1
- package/dist/esm/salla-order-summary.entry.js +1 -1
- package/dist/esm/salla-order-totals-card.entry.js +1 -1
- package/dist/esm/salla-orders.entry.js +1 -1
- package/dist/esm/salla-payments.entry.js +1 -1
- package/dist/esm/salla-price-range.entry.js +1 -1
- package/dist/esm/salla-review-card.entry.js +1 -1
- package/dist/esm/salla-reviews-page.entry.js +1 -1
- package/dist/esm/salla-reviews.entry.js +1 -1
- package/dist/esm/salla-social.entry.js +1 -1
- package/dist/esm/salla-tiered-offer.entry.js +1 -1
- package/dist/esm/salla-tooltip.entry.js +1 -1
- package/dist/esm/salla-trust-badges.entry.js +1 -1
- package/dist/esm/salla-verify.entry.js +1 -1
- package/dist/esm/salla-wallet.entry.js +1 -1
- package/dist/esm/twilight.js +2 -2
- package/dist/twilight/{p-56e70b23.entry.js → p-10c954ff.entry.js} +1 -1
- package/dist/twilight/{p-b9090ce1.entry.js → p-23b0afa5.entry.js} +1 -1
- package/dist/twilight/{p-3c7c63ee.entry.js → p-257c97c7.entry.js} +1 -1
- package/dist/twilight/{p-0979d5a6.entry.js → p-2f30b7d6.entry.js} +1 -1
- package/dist/twilight/{p-b81e66b2.entry.js → p-44c0c27c.entry.js} +1 -1
- package/dist/twilight/{p-0e4a8f9f.entry.js → p-4cb3c829.entry.js} +1 -1
- package/dist/twilight/{p-3939ed34.entry.js → p-66e73a02.entry.js} +1 -1
- package/dist/twilight/{p-62e50e0c.entry.js → p-6a6ca941.entry.js} +1 -1
- package/dist/twilight/{p-3ba6d234.entry.js → p-6baecf00.entry.js} +1 -1
- package/dist/twilight/{p-da2c81c6.entry.js → p-6f1bf015.entry.js} +1 -1
- package/dist/twilight/{p-96f53e45.entry.js → p-742e5dad.entry.js} +1 -1
- package/dist/twilight/{p-a5780098.entry.js → p-751f8d64.entry.js} +1 -1
- package/dist/twilight/{p-0dcda629.entry.js → p-77dbe4d3.entry.js} +1 -1
- package/dist/twilight/{p-f4383a51.entry.js → p-7b38bcfd.entry.js} +1 -1
- package/dist/twilight/{p-5606e8dd.entry.js → p-7da316d9.entry.js} +1 -1
- package/dist/twilight/{p-7d6d19b9.entry.js → p-81cb2ef8.entry.js} +1 -1
- package/dist/twilight/{p-65ce7926.entry.js → p-9006bd13.entry.js} +1 -1
- package/dist/twilight/{p-615331d4.entry.js → p-90f48bbc.entry.js} +1 -1
- package/dist/twilight/{p-032b235d.entry.js → p-95e20ce6.entry.js} +1 -1
- package/dist/twilight/p-98dc3c50.entry.js +4 -0
- package/dist/twilight/{p-5afe6962.entry.js → p-9f895d32.entry.js} +1 -1
- package/dist/twilight/{p-CJWu6tW6.js → p-B3B6KApY.js} +1 -1
- package/dist/twilight/{p-Bf2ln7Tf.js → p-C99niCgx.js} +1 -1
- package/dist/twilight/{p-BQe0WtLQ.js → p-CSuYUYU-.js} +1 -1
- package/dist/twilight/{p-CslymsND.js → p-ChN2gm1a.js} +1 -1
- package/dist/twilight/{p-BVJkSSs6.js → p-CtDnNMoY.js} +1 -1
- package/dist/twilight/{p-CimxEIO_.js → p-Cu8zDA0W.js} +2 -2
- package/dist/twilight/{p-CtmyX8MN.js → p-RIImqj-k.js} +1 -1
- package/dist/twilight/{p-Cau1tMDQ.js → p-VBs0_gXo.js} +1 -1
- package/dist/twilight/{p-b3311168.entry.js → p-a0720857.entry.js} +1 -1
- package/dist/twilight/{p-f586994e.entry.js → p-a48db011.entry.js} +1 -1
- package/dist/twilight/{p-d46b3cb6.entry.js → p-a93459da.entry.js} +1 -1
- package/dist/twilight/{p-883a04da.entry.js → p-aad5ea17.entry.js} +1 -1
- package/dist/twilight/{p-366c2a7d.entry.js → p-abb6acb7.entry.js} +1 -1
- package/dist/twilight/{p-87fe3f74.entry.js → p-b3299eeb.entry.js} +1 -1
- package/dist/twilight/{p-41b68e9a.entry.js → p-b6834fe3.entry.js} +1 -1
- package/dist/twilight/{p-caac78a8.entry.js → p-bcae2015.entry.js} +1 -1
- package/dist/twilight/{p-eb9bf011.entry.js → p-c1f93ef4.entry.js} +1 -1
- package/dist/twilight/{p-061ec27c.entry.js → p-cfd1bd43.entry.js} +1 -1
- package/dist/twilight/{p-4657145b.entry.js → p-e32ffd30.entry.js} +2 -2
- package/dist/twilight/{p-e0c73f9b.entry.js → p-e47e36d7.entry.js} +1 -1
- package/dist/twilight/{p-e7eeebf1.entry.js → p-edc30e8d.entry.js} +1 -1
- package/dist/twilight/{p-c133896d.entry.js → p-fdda110d.entry.js} +1 -1
- package/dist/twilight/{p-DZVGmyCg.js → p-my_auvQd.js} +1 -1
- package/dist/twilight/twilight.esm.js +1 -1
- package/dist/types/components/salla-user-menu/salla-user-menu.d.ts +1 -0
- package/package.json +5 -5
- package/dist/twilight/p-7f03a939.entry.js +0 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as e}from"./p-
|
|
4
|
+
import{d as e}from"./p-CtDnNMoY.js";function t(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}var n,i,E={exports:{}},r=n?E.exports:(n=1,E.exports=(i=function(e){var t=e.addFilter,n=e.utils,i=n.Type,E=n.isString,r=n.replaceInString,T=n.guesstimateMimeType,o=n.getExtensionFromFilename,u=n.getFilenameFromURL,_=function(e,t){return e.some((function(e){return/\*$/.test(e)?(n=e,(/^[^/]+/.exec(t)||[]).pop()===n.slice(0,-2)):e===t;var n}))},a=function(e,t,n){if(0===t.length)return!0;var i=function(e){var t="";if(E(e)){var n=u(e),i=o(n);i&&(t=T(i))}else t=e.type;return t}(e);return n?new Promise((function(E,r){n(e,i).then((function(e){_(t,e)?E():r()})).catch(r)})):_(t,i)};return t("SET_ATTRIBUTE_TO_OPTION_MAP",(function(e){return Object.assign(e,{accept:"acceptedFileTypes"})})),t("ALLOW_HOPPER_ITEM",(function(e,t){var n=t.query;return!n("GET_ALLOW_FILE_TYPE_VALIDATION")||a(e,n("GET_ACCEPTED_FILE_TYPES"))})),t("LOAD_FILE",(function(e,t){var n=t.query;return new Promise((function(t,i){if(n("GET_ALLOW_FILE_TYPE_VALIDATION")){var E=n("GET_ACCEPTED_FILE_TYPES"),T=n("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),o=a(e,E,T),u=function(){var e,t=E.map((e=n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"),function(t){return null!==e[t]&&(e[t]||t)})).filter((function(e){return!1!==e})),T=t.filter((function(e,n){return t.indexOf(e)===n}));i({status:{main:n("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:r(n("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:T.join(", "),allButLastType:T.slice(0,-1).join(", "),lastType:T[t.length-1]})}})};if("boolean"==typeof o)return o?t(e):u();o.then((function(){t(e)})).catch(u)}else t(e)}))})),{options:{allowFileTypeValidation:[!0,i.BOOLEAN],acceptedFileTypes:[[],i.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",i.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",i.STRING],fileValidateTypeLabelExpectedTypesMap:[{},i.OBJECT],fileValidateTypeDetectType:[null,i.FUNCTION]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:i})),i)),T=t({__proto__:null,default:e(r)},[r]);
|
|
5
5
|
/*!
|
|
6
6
|
* FilePondPluginFileValidateType 1.2.8
|
|
7
7
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as t}from"./p-
|
|
4
|
+
import{d as t}from"./p-CtDnNMoY.js";function n(t,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(e){if("default"!==e&&!(e in t)){var r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:function(){return n[e]}})}}))})),Object.freeze(t)}var e,r={exports:{}},i=(e||(e=1,r.exports=function(){var t={type:"spring",stiffness:.5,damping:.45,mass:10},n=function(t){return-.5*(Math.cos(Math.PI*t)-1)},e=function(t){var n=Math.min(10/t.width,10/t.height),e=document.createElement("canvas"),i=e.getContext("2d"),o=e.width=Math.ceil(t.width*n),a=e.height=Math.ceil(t.height*n);i.drawImage(t,0,0,o,a);var _=null;try{_=i.getImageData(0,0,o,a).data}catch(t){return null}for(var E=_.length,u=0,I=0,c=0,T=0;T<E;T+=4)u+=_[T]*_[T],I+=_[T+1]*_[T+1],c+=_[T+2]*_[T+2];return{r:u=r(u,E),g:I=r(I,E),b:c=r(c,E)}},r=function(t,n){return Math.floor(Math.sqrt(t/(n/4)))},i=function(t,e,r,i,o){t.width=e,t.height=r;var a=t.getContext("2d"),_=.5*e,E=a.createRadialGradient(_,r+110,r-100,_,r+110,r+100);(function(t,e){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:10,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,_=1-a,E=e.join(","),u=0;u<=o;u++){var I=u/o;t.addColorStop(a+_*I,"rgba(".concat(E,", ").concat(i(I)*r,")"))}})(E,i,o,void 0,8,.4),a.save(),a.translate(-250,0),a.scale(2,1),a.fillStyle=E,a.fillRect(0,0,e,r),a.restore()},o="undefined"!=typeof navigator,a=500,_=200,E=o&&document.createElement("canvas"),u=o&&document.createElement("canvas"),I=o&&document.createElement("canvas"),c=[40,40,40],T=[196,78,71],f=[54,151,99];o&&(i(E,a,_,c,.85),i(u,a,_,T,1),i(I,a,_,f,1));var l=function(n){var r=n.utils.createView({name:"file-poster-overlay",tag:"canvas",ignoreRect:!0,create:function(t){var n,e;(e=t.root.element).width=(n=t.props.template).width,e.height=n.height,e.getContext("2d").drawImage(n,0,0)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),o=function(t){var n=t.root;n.ref.overlayShadow.opacity=1,n.ref.overlayError.opacity=0,n.ref.overlaySuccess.opacity=0},l=function(t){var n=t.root;n.ref.overlayShadow.opacity=.25,n.ref.overlayError.opacity=1};return n.utils.createView({name:"file-poster-wrapper",create:function(e){var o=e.root,l=e.props,s=o.query("GET_FILE_POSTER_ITEM_OVERLAY_SHADOW_COLOR"),O=o.query("GET_FILE_POSTER_ITEM_OVERLAY_ERROR_COLOR"),R=o.query("GET_FILE_POSTER_ITEM_OVERLAY_SUCCESS_COLOR");s&&s!==c&&i(E,a,_,c=s,.85),O&&O!==T&&i(u,a,_,T=O,1),R&&R!==f&&i(I,a,_,f=R,1);var v=function(n){return n.utils.createView({name:"file-poster",tag:"div",ignoreRect:!0,create:function(t){var n=t.root;n.ref.image=document.createElement("img"),n.element.appendChild(n.ref.image)},write:n.utils.createRoute({DID_FILE_POSTER_LOAD:function(t){var n=t.root,e=t.props,r=e.id,i=n.query("GET_ITEM",{id:e.id});if(i){var o=i.getMetadata("poster");n.ref.image.src=o,n.dispatch("DID_FILE_POSTER_DRAW",{id:r})}}}),mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:t,scaleY:t,opacity:{type:"tween",duration:750}}}})}(n);o.ref.image=o.appendChildView(o.createChildView(v,{id:l.id,scaleX:1.25,scaleY:1.25,opacity:0})),o.ref.overlayShadow=o.appendChildView(o.createChildView(r,{template:E,opacity:0})),o.ref.overlaySuccess=o.appendChildView(o.createChildView(r,{template:I,opacity:0})),o.ref.overlayError=o.appendChildView(o.createChildView(r,{template:u,opacity:0}))},write:n.utils.createRoute({DID_FILE_POSTER_LOAD:function(t){t.root.ref.overlayShadow.opacity=1},DID_FILE_POSTER_DRAW:function(t){var n=t.root.ref.image;n.scaleX=1,n.scaleY=1,n.opacity=1},DID_FILE_POSTER_CONTAINER_CREATE:function(t){var n,r,i,o=t.root,a=t.props.id,_=o.query("GET_ITEM",a);if(_){var E=_.getMetadata("poster"),u=function(t){var n=o.query("GET_FILE_POSTER_CALCULATE_AVERAGE_IMAGE_COLOR")?e(t):null;_.setMetadata("color",n,!0),o.dispatch("DID_FILE_POSTER_LOAD",{id:a,data:t})};n=E,r=function(t,n){var e,r;o.dispatch("DID_FILE_POSTER_CALCULATE_SIZE",{id:a,width:t,height:n}),(e=E,r=o.query("GET_FILE_POSTER_CROSS_ORIGIN_ATTRIBUTE_VALUE"),new Promise((function(t,n){var i=new Image;"string"==typeof crossOrigin&&(i.crossOrigin=r),i.onload=function(){t(i)},i.onerror=function(t){n(t)},i.src=e}))).then(u)},(i=new Image).onload=function(){var t=i.naturalWidth,n=i.naturalHeight;i=null,r(t,n)},i.src=n}},DID_THROW_ITEM_LOAD_ERROR:l,DID_THROW_ITEM_PROCESSING_ERROR:l,DID_THROW_ITEM_INVALID:l,DID_COMPLETE_ITEM_PROCESSING:function(t){var n=t.root;n.ref.overlayShadow.opacity=.25,n.ref.overlaySuccess.opacity=1},DID_START_ITEM_PROCESSING:o,DID_REVERT_ITEM_PROCESSING:o})})},s=function(t){var n=t.addFilter,e=t.utils,r=e.Type,i=e.createRoute,o=l(t);return n("CREATE_VIEW",(function(t){var n=t.view,e=t.query;if((0,t.is)("file")&&e("GET_ALLOW_FILE_POSTER")){var r=function(t,r){var i=r.id,a=e("GET_ITEM",i);a&&a.getMetadata("poster")&&!a.archived&&t.ref.previousPoster!==a.getMetadata("poster")&&(t.ref.previousPoster=a.getMetadata("poster"),e("GET_FILE_POSTER_FILTER_ITEM")(a)&&(t.ref.filePoster&&n.removeChildView(t.ref.filePoster),t.ref.filePoster=n.appendChildView(n.createChildView(o,{id:i})),t.dispatch("DID_FILE_POSTER_CONTAINER_CREATE",{id:i})))},a=function(t){var n=t.root,e=n.query("GET_FILE_POSTER_HEIGHT");if(e)return e;var r=n.query("GET_FILE_POSTER_MIN_HEIGHT"),i=n.query("GET_FILE_POSTER_MAX_HEIGHT");if(r&&n.ref.imageHeight<r)return r;var o=n.rect.element.width*(n.ref.imageHeight/n.ref.imageWidth);return r&&o<r?r:i&&o>i?i:o};n.registerWriter(i({DID_LOAD_ITEM:function(t){r(t.root,t.props)},DID_FILE_POSTER_CALCULATE_SIZE:function(t){var n=t.root,e=t.action;n.ref.filePoster&&(n.ref.imageWidth=e.width,n.ref.imageHeight=e.height,n.ref.shouldUpdatePanelHeight=!0,n.dispatch("KICK"))},DID_UPDATE_ITEM_METADATA:function(t){var n=t.root,e=t.props;/poster/.test(t.action.change.key)&&r(n,e)}},(function(t){var n=t.root;n.ref.filePoster&&(n.rect.element.hidden||n.ref.shouldUpdatePanelHeight&&(n.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:t.props.id,height:a({root:n})}),n.ref.shouldUpdatePanelHeight=!1))})))}})),{options:{allowFilePoster:[!0,r.BOOLEAN],filePosterHeight:[null,r.INT],filePosterMinHeight:[null,r.INT],filePosterMaxHeight:[null,r.INT],filePosterFilterItem:[function(){return!0},r.FUNCTION],filePosterCalculateAverageImageColor:[!1,r.BOOLEAN],filePosterCrossOriginAttributeValue:["Anonymous",r.STRING],filePosterItemOverlayShadowColor:[null,r.ARRAY],filePosterItemOverlayErrorColor:[null,r.ARRAY],filePosterItemOverlaySuccessColor:[null,r.ARRAY]}}};return"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:s})),s}()),r.exports),o=n({__proto__:null,default:t(i)},[i]);
|
|
5
5
|
/*!
|
|
6
6
|
* FilePondPluginFilePoster 2.5.1
|
|
7
7
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Crafted with ❤ by Salla
|
|
3
3
|
*/
|
|
4
|
-
import{d as i}from"./p-
|
|
4
|
+
import{d as i}from"./p-CtDnNMoY.js";function n(i,n){return n.forEach((function(n){n&&"string"!=typeof n&&!Array.isArray(n)&&Object.keys(n).forEach((function(t){if("default"!==t&&!(t in i)){var e=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(i,t,e.get?e:{enumerable:!0,get:function(){return n[t]}})}}))})),Object.freeze(i)}var t,e,o,E={exports:{}},r=t?E.exports:(t=1,E.exports=(e=function(i){return/^image/.test(i.type)},o=function(i){var n=i.addFilter,t=i.utils,o=t.Type,E=t.createRoute,r=t.createItemAPI,l=void 0===r?function(i){return i}:r,_=i.views.fileActionButton;n("SHOULD_REMOVE_ON_REVERT",(function(i,n){var t=n.item,o=n.query;return new Promise((function(i){var n=t.file;i(!(o("GET_ALLOW_IMAGE_EDIT")&&o("GET_IMAGE_EDIT_ALLOW_EDIT")&&e(n)))}))})),n("DID_LOAD_ITEM",(function(i,n){var t=n.query,o=n.dispatch;return new Promise((function(n,E){if(i.origin>1)n(i);else{var r=i.file;if(t("GET_ALLOW_IMAGE_EDIT")&&t("GET_IMAGE_EDIT_INSTANT_EDIT"))if(e(r)){var l=function(i,n,t){return function(e){a.shift(),e?n(i):t(i),o("KICK"),_()}},_=function(){if(a.length){var i=a[0],n=i.item;o("EDIT_ITEM",{id:n.id,handleEditorResponse:l(n,i.resolve,i.reject)})}};u({item:i,resolve:n,reject:E}),1===a.length&&_()}else n(i);else n(i)}}))})),n("DID_CREATE_ITEM",(function(i,n){var t=n.dispatch;i.extend("edit",(function(){t("EDIT_ITEM",{id:i.id})}))}));var a=[],u=function(i){return a.push(i),i};return n("CREATE_VIEW",(function(i){var n=i.is,t=i.view,o=i.query;if(o("GET_ALLOW_IMAGE_EDIT")){var r=o("GET_ALLOW_IMAGE_PREVIEW");if(n("file-info")&&!r||n("file")&&r){var a=o("GET_IMAGE_EDIT_EDITOR");if(a){a.filepondCallbackBridge||(a.outputData=!0,a.outputFile=!1,a.filepondCallbackBridge={onconfirm:a.onconfirm||function(){},oncancel:a.oncancel||function(){}});t.registerDestroyer((function(i){var n=i.root;n.ref.buttonEditItem&&n.ref.buttonEditItem.off("click",n.ref.handleEdit),n.ref.editButton&&n.ref.editButton.removeEventListener("click",n.ref.handleEdit)}));var u={EDIT_ITEM:function(i){var n=i.root,t=i.props.id,e=i.action.handleEditorResponse;a.cropAspectRatio=n.query("GET_IMAGE_CROP_ASPECT_RATIO")||a.cropAspectRatio,a.outputCanvasBackgroundColor=n.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR")||a.outputCanvasBackgroundColor;var o=n.query("GET_ITEM",t);if(o){var E=o.file,r=o.getMetadata("crop"),_=o.getMetadata("resize"),u=o.getMetadata("filter")||null,f=o.getMetadata("filters")||null,I=o.getMetadata("colors")||null,c=o.getMetadata("markup")||null,T={crop:r||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},size:_?{upscale:_.upscale,mode:_.mode,width:_.size.width,height:_.size.height}:null,filter:f?f.id||f.matrix:n.query("GET_ALLOW_IMAGE_FILTER")&&n.query("GET_IMAGE_FILTER_COLOR_MATRIX")&&!I?u:null,color:I,markup:c};a.onconfirm=function(i){var n=i.data,t=n.crop,E=n.size,r=n.filter,_=n.color,u=n.colorMatrix,f=n.markup,I={};if(t&&(I.crop=t),E){var c=(o.getMetadata("resize")||{}).size,T={width:E.width,height:E.height};T.width&&T.height||!c||(T.width=c.width,T.height=c.height),(T.width||T.height)&&(I.resize={upscale:E.upscale,mode:E.mode,size:T})}f&&(I.markup=f),I.colors=_,I.filters=r,I.filter=u,o.setMetadata(I),a.filepondCallbackBridge.onconfirm(n,l(o)),e&&(a.onclose=function(){e(!0),a.onclose=null})},a.oncancel=function(){a.filepondCallbackBridge.oncancel(l(o)),e&&(a.onclose=function(){e(!1),a.onclose=null})},a.open(E,T)}},DID_LOAD_ITEM:function(i){var n=i.root,E=i.props;if(o("GET_IMAGE_EDIT_ALLOW_EDIT")){var l=E.id,a=o("GET_ITEM",l);if(a&&e(a.file))if(n.ref.handleEdit=function(i){i.stopPropagation(),n.dispatch("EDIT_ITEM",{id:l})},r){var u=t.createChildView(_,{label:"edit",icon:o("GET_IMAGE_EDIT_ICON_EDIT"),opacity:0});u.element.classList.add("filepond--action-edit-item"),u.element.dataset.align=o("GET_STYLE_IMAGE_EDIT_BUTTON_EDIT_ITEM_POSITION"),u.on("click",n.ref.handleEdit),n.ref.buttonEditItem=t.appendChildView(u)}else{var f=t.element.querySelector(".filepond--file-info-main"),I=document.createElement("button");I.className="filepond--action-edit-item-alt",I.innerHTML=o("GET_IMAGE_EDIT_ICON_EDIT")+"<span>edit</span>",I.addEventListener("click",n.ref.handleEdit),f.appendChild(I),n.ref.editButton=I}}}};r&&(u.DID_IMAGE_PREVIEW_SHOW=function(i){var n=i.root;n.ref.buttonEditItem&&(n.ref.buttonEditItem.opacity=1)}),t.registerWriter(E(u))}}}})),{options:{allowImageEdit:[!0,o.BOOLEAN],styleImageEditButtonEditItemPosition:["bottom center",o.STRING],imageEditInstantEdit:[!1,o.BOOLEAN],imageEditAllowEdit:[!0,o.BOOLEAN],imageEditIconEdit:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M8.5 17h1.586l7-7L15.5 8.414l-7 7V17zm-1.707-2.707l8-8a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1 0 1.414l-8 8A1 1 0 0 1 10.5 19h-3a1 1 0 0 1-1-1v-3a1 1 0 0 1 .293-.707z" fill="currentColor" fill-rule="nonzero"/></svg>',o.STRING],imageEditEditor:[null,o.OBJECT]}}},"undefined"!=typeof window&&void 0!==window.document&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:o})),o)),l=n({__proto__:null,default:i(r)},[r]);
|
|
5
5
|
/*!
|
|
6
6
|
* FilePondPluginImageEdit 1.6.3
|
|
7
7
|
* Licensed under MIT, https://opensource.org/licenses/MIT/
|