You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
3.8 KiB
1 lines
3.8 KiB
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react"));function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function a(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?r(Object(a),!0).forEach((function(t){n(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e){return e&&e.name?e.name.split("_")[1]:""}!function(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===r&&a.firstChild?a.insertBefore(n,a.firstChild):a.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".rmdp-range-picker-footer{padding:10px;text-align:left}.rtl.rmdp-range-picker-footer{direction:rtl;text-align:right}.rmdp-range-picker-footer h6{font-size:16px;margin:0;white-space:nowrap}.left.rmdp-range-picker-footer h6,.right.rmdp-range-picker-footer h6{flex-direction:row;padding-top:5px;width:100%}.rmdp-cancel{background-color:#bdbcbc;border-radius:50%;color:#fff;cursor:pointer;display:inline-block;font-family:Arial!important;font-size:16px;height:17px;line-height:19px;margin:auto 7px auto 0;text-align:center;transform:rotate(45deg);width:17px}.rtl .rmdp-cancel{margin-left:7px;margin-right:unset}.rmdp-range-picker-footer span{font-size:16px;margin-top:auto}"),exports.default=function(e){var r,n,o,i,c=e.state,d=e.handleChange,s=e.position,p=e.direction,f=void 0===p?["fa","ar"].includes(l(c.date.locale))?"rtl":"ltr":p,u=e.format,m=void 0===u?"rtl"===f?"DD MMMM":"MMMM DD":u,g=e.names,y=e.DatePicker,b=c.selectedDate,h=c.date.locale,v=null===(r=b[0])||void 0===r||null===(n=r.format)||void 0===n?void 0:n.call(r,m),x=null===(o=b[1])||void 0===o||null===(i=o.format)||void 0===i?void 0:i.call(o,m),D=["bottom","top"].includes(s),O={en:{selectedDates:"Selected Dates"+(D?":":""),from:"From:",to:"To:",selectDate:"Select Date",close:"Close",separator:"-"},fa:{selectedDates:"تاریخ انتخابی شما"+(D?":":""),from:"از:",to:"تا:",selectDate:"انتخاب کنید",close:"بستن",separator:"-"}},k=g||O[l(h)]||O.en;return t.default.createElement("div",{className:"rmdp-range-picker-footer ".concat(f," ").concat(s),style:{display:D?"block":"grid",gridTemplateRows:"auto 1fr"}},t.default.createElement("h6",{className:"rmdp-week-day"},k.selectedDates),t.default.createElement("div",{style:{display:D?"flex":"grid",gridTemplateRows:"1fr auto"}},t.default.createElement("div",{className:"rmdp-header-values",style:{flex:"1",display:D?"":"grid"}},t.default.createElement("div",{style:{display:"inline-block"}},t.default.createElement("i",{className:"rmdp-cancel",onClick:function(){return E(0)}},"+"),t.default.createElement("span",null,k.from," ",null!=v?v:k.selectDate)),D&&t.default.createElement("span",{style:{padding:"0px 10px"}},k.separator),t.default.createElement("div",{style:{display:"inline-block"}},t.default.createElement("i",{className:"rmdp-cancel",onClick:function(){return E(1)}},"+"),t.default.createElement("span",null,k.to," ",null!=x?x:k.selectDate))),y&&t.default.createElement("button",{className:"rmdp-button",onClick:function(){return y.closeCalendar()}},k.close)));function E(e){Array.isArray(b)&&(b.splice(e,1),d(b,a(a({},c),{},{selectedDate:b})))}};
|
|
|