@nocobase/plugin-calendar 2.1.0-beta.38 → 2.1.0-beta.41
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/client-v2/{944.f4b4f1ca02f36c49.js → 944.ae8f373289233106.js} +1 -1
- package/dist/client-v2/{952.8117af037dabbb79.js → 952.2e8bdb07443a31df.js} +1 -1
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +6 -6
- package/dist/node_modules/solarlunar-es/package.json +1 -1
- package/package.json +3 -2
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_calendar_client_v2=self.webpackChunk_nocobase_plugin_calendar_client_v2||[]).push([["944"],{8381:function(e,b,t){t.d(b,{A:function(){return r}});var n={1:{1:"春节",15:"元宵"},2:{2:"龙抬头"},5:{5:"端午"},7:{7:"七夕",15:"中元"},8:{15:"中秋"},9:{9:"重阳"},12:{29:"除夕",30:"除夕"}},f={1:{1:"元旦"},2:{14:"情人节"},3:{8:"妇女节"},4:{1:"愚人节",4:"清明节"},5:{1:"劳动节",4:"青年节"},6:{1:"儿童节"},7:{1:"建党节"},8:{1:"建军节"},9:{10:"教师节"},10:{1:"国庆节"}};let c={lunarInfo:[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,28309,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42416,83315,21168,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19195,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448,84835,37744,18936,18800,25776,92326,59984,27424,108228,43744,37600,53987,51552,54615,54432,55888,23893,22176,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168,45683,26928,29495,27296,44368,84821,19296,42352,21732,53600,59752,54560,55968,92838,22224,19168,43476,42192,53584,62034,54560],solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],gan:["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],zhi:["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],animals:["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"],lunarTerm:["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"],lTermInfo:["9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","9778397bd19801ec9210c965cc920e","97b6b97bd19801ec95f8c965cc920f","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd197c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bcf97c3598082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd19801ec9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bd07f1487f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b97bd197c36c9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b70c9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","977837f0e37f149b0723b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0723b06bd","7f07e7f0e37f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f595b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e37f14998083b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14898082b0723b02d5","7f07e7f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66aa89801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e26665b66a449801e9808297c35","665f67f0e37f1489801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722"],nStr1:["日","一","二","三","四","五","六","七","八","九","十"],nStr2:["初","十","廿","卅"],nStr3:["正","二","三","四","五","六","七","八","九","十","冬","腊"],nStr4:["零","一","二","三","四","五","六","七","八","九","十"],lYearDays:function(e){var b,t=348;for(b=32768;b>8;b>>=1)t+=c.lunarInfo[e-1900]&b?1:0;return t+c.leapDays(e)},leapMonth:function(e){return 15&c.lunarInfo[e-1900]},leapDays:function(e){return c.leapMonth(e)?65536&c.lunarInfo[e-1900]?30:29:0},monthDays:function(e,b){return b>12||b<1?-1:c.lunarInfo[e-1900]&65536>>b?30:29},solarDays:function(e,b){if(b>12||b<1)return -1;var t=b-1;return 1==t?e%4==0&&e%100!=0||e%400==0?29:28:c.solarMonth[t]},toGanZhi:function(e){return c.gan[e%10]+c.zhi[e%12]},getTerm:function(e,b){if(e<1900||e>2100||b<1||b>24)return -1;var t=c.lTermInfo[e-1900],n=[parseInt("0x"+t.substr(0,5)).toString(),parseInt("0x"+t.substr(5,5)).toString(),parseInt("0x"+t.substr(10,5)).toString(),parseInt("0x"+t.substr(15,5)).toString(),parseInt("0x"+t.substr(20,5)).toString(),parseInt("0x"+t.substr(25,5)).toString()];return parseInt([n[0].substr(0,1),n[0].substr(1,2),n[0].substr(3,1),n[0].substr(4,2),n[1].substr(0,1),n[1].substr(1,2),n[1].substr(3,1),n[1].substr(4,2),n[2].substr(0,1),n[2].substr(1,2),n[2].substr(3,1),n[2].substr(4,2),n[3].substr(0,1),n[3].substr(1,2),n[3].substr(3,1),n[3].substr(4,2),n[4].substr(0,1),n[4].substr(1,2),n[4].substr(3,1),n[4].substr(4,2),n[5].substr(0,1),n[5].substr(1,2),n[5].substr(3,1),n[5].substr(4,2)][b-1])},toChinaYear:function(e){var b=parseInt((e/1e3).toString()),t=parseInt((e%1e3/100).toString()),n=parseInt((e%100/10).toString());return c.nStr4[b]+c.nStr4[t]+c.nStr4[n]+c.nStr4[e%10]+"年"},toChinaMonth:function(e){return e>12||e<1?-1:c.nStr3[e-1]+"月"},toChinaDay:function(e){var b;switch(e){case 10:b="初十";break;case 20:b="二十";break;case 30:b="三十";break;default:b=c.nStr2[Math.floor(e/10)]+c.nStr1[e%10]}return b},getAnimal:function(e){return c.animals[(e-4)%12]},solar2lunar:function(e,b,t){if(e<1900||e>2100||1900==e&&1==b&&t<31)return -1;if(e)r=new Date(e,parseInt(b.toString())-1,t);else var r=new Date;var a,o=0,l=(e=r.getFullYear(),b=r.getMonth()+1,t=r.getDate(),(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate())-Date.UTC(1900,0,31))/864e5);for(a=1900;a<2101&&l>0;a++)l-=o=c.lYearDays(a);l<0&&(l+=o,a--);var u=new Date,i=!1;u.getFullYear()==e&&u.getMonth()+1==b&&u.getDate()==t&&(i=!0);var d=r.getDay(),s=c.nStr1[d];0==d&&(d=7);var p=a,y=c.leapMonth(a),v=!1;for(a=1;a<13&&l>0;a++)y>0&&a==y+1&&0==v?(--a,v=!0,o=c.leapDays(p)):o=c.monthDays(p,a),1==v&&a==y+1&&(v=!1),l-=o;0==l&&y>0&&a==y+1&&(v?v=!1:(v=!0,--a)),l<0&&(l+=o,--a);var h=a,g=l+1,m=b-1,M=c.getTerm(e,3),w=c.toGanZhi(e-4),T=new Date(e,1,M).getTime();new Date(e,m,t).getTime()<T&&(w=c.toGanZhi(e-5));var C=c.getTerm(e,2*b-1),O=c.getTerm(e,2*b),D=c.toGanZhi(12*(e-1900)+b+11);t>=C&&(D=c.toGanZhi(12*(e-1900)+b+12));var E=!1,S="";C==t&&(E=!0,S=c.lunarTerm[2*b-2]),O==t&&(E=!0,S=c.lunarTerm[2*b-1]);var k=Date.UTC(e,m,1,0,0,0,0)/864e5+25567+10,A=c.toGanZhi(k+t-1),j=n[h]&&n[h][g]?n[h][g]:"";[2022,2025,2026,2027,2028,2029,2031,2032].includes(e)&&12===h&&29===g&&(j="除夕");var I=f[b]&&f[b][t]?f[b][t]:"";return{lYear:p,lMonth:h,lDay:g,animal:c.getAnimal(p),yearCn:c.toChinaYear(p),monthCn:(v&&y===h?"闰":"")+c.toChinaMonth(h),dayCn:c.toChinaDay(g),cYear:e,cMonth:b,cDay:t,gzYear:w,gzMonth:D,gzDay:A,isToday:i,isLeap:v,nWeek:d,ncWeek:"星期"+s,isTerm:E,term:S,lunarFestival:j,festival:I}},lunar2solar:function(e,b,t,n){var f=c.leapMonth(e);if(c.leapDays(e),n&&f!=b||2100==e&&12==b&&t>1||1900==e&&1==b&&t<31)return -1;var r=c.monthDays(e,b);if(e<1900||e>2100||t>r)return -1;for(var a=0,o=1900;o<e;o++)a+=c.lYearDays(o);var l=0,u=!1;for(o=1;o<b;o++)l=c.leapMonth(e),u||l<=o&&l>0&&(a+=c.leapDays(e),u=!0),a+=c.monthDays(e,o);n&&(a+=r);var i=new Date(864e5*(a+t-31)+Date.UTC(1900,1,30,0,0,0)),d=i.getUTCFullYear(),s=i.getUTCMonth()+1,p=i.getUTCDate();return c.solar2lunar(d,s,p)}};var r=c},971:function(e,b,t){t.r(b),t.d(b,{CalendarCollectionActionGroupModel:function(){return j},CalendarNavActionModel:function(){return P},CalendarTitleActionModel:function(){return x},CalendarTodayActionModel:function(){return I},CalendarViewSelectActionModel:function(){return _}});var n=t(7375),f=t(3485),c=t(7694),r=t(2059),a=t(9155),o=t.n(a),l=t(9488),u=t(1434),i=t(8802),d=t(9185),s=t.n(d);function p(e,b,t,n,f,c,r){try{var a=e[c](r),o=a.value}catch(e){t(e);return}a.done?b(o):Promise.resolve(o).then(n,f)}function y(e,b,t){return b=M(b),function(e,b){var t;if(b&&("object"==((t=b)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof b))return b;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,C()?Reflect.construct(b,t||[],M(e).constructor):b.apply(e,t))}function v(e,b){if(!(e instanceof b))throw TypeError("Cannot call a class as a function")}function h(e,b){for(var t=0;t<b.length;t++){var n=b[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function g(e,b,t){return b&&h(e.prototype,b),t&&h(e,t),e}function m(e,b,t){return b in e?Object.defineProperty(e,b,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[b]=t,e}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,b){if("function"!=typeof b&&null!==b)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(b&&b.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),b&&T(e,b)}function T(e,b){return(T=Object.setPrototypeOf||function(e,b){return e.__proto__=b,e})(e,b)}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}var O=new Set(["DeleteActionModel","BulkDeleteActionModel","BulkEditActionModel","BulkUpdateActionModel","ImportActionModel","ExportActionModel","PrintActionModel"]),D=new Map(["CalendarTodayActionModel","CalendarNavActionModel","CalendarTitleActionModel","CalendarViewSelectActionModel"].map(function(e,b){return[e,b]})),E=(0,c.observer)(function(){var e,b,t=(0,c.useFlowModel)(),n=(0,i.o)();if(!n)return null;var a=t.getIcon()?o().createElement(f.Icon,{type:t.getIcon()}):void 0;return o().createElement(r.Button,(e=function(e){for(var b=1;b<arguments.length;b++){var t=null!=arguments[b]?arguments[b]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(b){m(e,b,t[b])})}return e}({},t.props),b=b={icon:a,onClick:function(){return n.navigate("TODAY")}},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(b)):(function(e){var b=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);b.push.apply(b,t)}return b})(Object(b)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(b,t))}),e),t.props.children||t.getTitle())}),S=(0,c.observer)(function(){var e=(0,i.o)();return e?o().createElement(r.Button.Group,null,o().createElement(r.Button,{icon:o().createElement(n.LeftOutlined,null),onClick:function(){return e.navigate("PREV")}}),o().createElement(r.Button,{icon:o().createElement(n.RightOutlined,null),onClick:function(){return e.navigate("NEXT")}})):null}),k=(0,c.observer)(function(){var e=(0,i.o)(),b=(0,a.useMemo)(function(){return(null==e?void 0:e.showLunar)&&"day"===e.view?(0,u.pS)(s()(e.date)):null},[e]);return e?o().createElement(r.Typography.Text,{strong:!0},e.label,b?o().createElement(r.Typography.Text,{type:"secondary"}," ",b):null):null}),A=(0,c.observer)(function(){var e=(0,i.o)(),b=(0,l.k)();return e?o().createElement(r.Segmented,{value:e.view,onChange:function(b){return e.setView(b)},options:e.views.map(function(e){return{label:b("month"===e?"Month":"week"===e?"Week":"Day"),value:e}})}):null}),j=function(e){function b(){return v(this,b),y(this,b,arguments)}return w(b,e),b}(f.CollectionActionGroupModel);j.defineChildren=function(e){var b;return(b=function(){return function(e,b){var t,n,f,c={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(r,"next",{value:o(0)}),a(r,"throw",{value:o(1)}),a(r,"return",{value:o(2)}),"function"==typeof Symbol&&a(r,Symbol.iterator,{value:function(){return this}}),r;function o(a){return function(o){var l=[a,o];if(t)throw TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(c=0)),c;)try{if(t=1,n&&(f=2&l[0]?n.return:l[0]?n.throw||((f=n.return)&&f.call(n),0):n.next)&&!(f=f.call(n,l[1])).done)return f;switch(n=0,f&&(l=[2&l[0],f.value]),l[0]){case 0:case 1:f=l;break;case 4:return c.label++,{value:l[1],done:!1};case 5:c.label++,n=l[1],l=[0];continue;case 7:l=c.ops.pop(),c.trys.pop();continue;default:if(!(f=(f=c.trys).length>0&&f[f.length-1])&&(6===l[0]||2===l[0])){c=0;continue}if(3===l[0]&&(!f||l[1]>f[0]&&l[1]<f[3])){c.label=l[1];break}if(6===l[0]&&c.label<f[1]){c.label=f[1],f=l;break}if(f&&c.label<f[2]){c.label=f[2],c.ops.push(l);break}f[2]&&c.ops.pop(),c.trys.pop();continue}l=b.call(e,c)}catch(e){l=[6,e],n=0}finally{t=f=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(b){switch(b.label){case 0:return[4,f.CollectionActionGroupModel.defineChildren.call(this,e)];case 1:return[2,b.sent().filter(function(e){return!(O.has(e.useModel)||[e.key,e.useModel,"string"==typeof e.label?e.label:""].filter(Boolean).join(" ").toLowerCase().includes("print"))}).map(function(e,b){return{item:e,index:b}}).sort(function(e,b){var t=D.get(e.item.useModel),n=D.get(b.item.useModel),f=void 0!==t,c=void 0!==n;return f&&c?t-n:f?-1:c?1:e.index-b.index}).map(function(e){return e.item})]}})},function(){var e=this,t=arguments;return new Promise(function(n,f){var c=b.apply(e,t);function r(e){p(c,n,f,r,a,"next",e)}function a(e){p(c,n,f,r,a,"throw",e)}r(void 0)})}).call(this)};var I=function(e){function b(){var e;return v(this,b),e=y(this,b,arguments),m(e,"defaultProps",{type:"default",title:(0,l.M)("Today")}),e}return w(b,e),g(b,[{key:"render",value:function(){return o().createElement(E,null)}}]),b}(f.ActionModel);I.define({label:(0,l.M)("Today"),toggleable:!0,sort:10});var P=function(e){function b(){var e;return v(this,b),e=y(this,b,arguments),m(e,"enableEditTooltip",!1),m(e,"enableEditTitle",!1),m(e,"enableEditIcon",!1),m(e,"enableEditType",!1),m(e,"enableEditDanger",!1),e}return w(b,e),g(b,[{key:"render",value:function(){return o().createElement(S,null)}}]),b}(f.ActionModel);P.define({label:(0,l.M)("Turn pages"),toggleable:!0,sort:20});var x=function(e){function b(){var e;return v(this,b),e=y(this,b,arguments),m(e,"enableEditTooltip",!1),m(e,"enableEditTitle",!1),m(e,"enableEditIcon",!1),m(e,"enableEditType",!1),m(e,"enableEditDanger",!1),e}return w(b,e),g(b,[{key:"render",value:function(){return o().createElement(k,null)}}]),b}(f.ActionModel);x.define({label:(0,l.M)("Title"),toggleable:!0,sort:30});var _=function(e){function b(){var e;return v(this,b),e=y(this,b,arguments),m(e,"enableEditTooltip",!1),m(e,"enableEditTitle",!1),m(e,"enableEditIcon",!1),m(e,"enableEditType",!1),m(e,"enableEditDanger",!1),e}return w(b,e),g(b,[{key:"render",value:function(){return o().createElement(A,null)}}]),b}(f.ActionModel);_.define({label:(0,l.M)("Select view"),toggleable:!0,sort:40}),j.registerActionModels({CalendarTodayActionModel:I,CalendarNavActionModel:P,CalendarTitleActionModel:x,CalendarViewSelectActionModel:_})},8802:function(e,b,t){t.d(b,{b:function(){return c},o:function(){return r}});var n=t(9155),f=(0,n.createContext)(null);f.displayName="CalendarViewContext";var c=f.Provider,r=function(){return(0,n.useContext)(f)}},9488:function(e,b,t){t.d(b,{M:function(){return r},k:function(){return c}});var n=t(7694);function f(e){for(var b=1;b<arguments.length;b++){var t=null!=arguments[b]?arguments[b]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.forEach(function(b){var n;n=t[b],b in e?Object.defineProperty(e,b,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[b]=n})}return e}function c(){var e=(0,n.useFlowEngine)();return function(b,t){return e.context.t(b,f({ns:["calendar","client"]},t))}}function r(e,b){return(0,n.tExpr)(e,f({ns:"calendar"},b))}},1434:function(e,b,t){t.d(b,{pS:function(){return r}});var n=t(9185),f=t.n(n);t(6773);var c=t(8381),r=function(e){var b=f()(e),t=c.A.solar2lunar(b.year(),b.month()+1,b.date());return"number"!=typeof t?t.lunarFestival||t.term||t.dayCn:t}}}]);
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_calendar_client_v2=self.webpackChunk_nocobase_plugin_calendar_client_v2||[]).push([["944"],{8381:function(e,b,t){t.d(b,{A:function(){return r}});var f={1:{1:"春节",15:"元宵"},2:{2:"龙抬头"},5:{5:"端午"},7:{7:"七夕",15:"中元"},8:{15:"中秋"},9:{9:"重阳"},12:{29:"除夕",30:"除夕"}},c={1:{1:"元旦"},2:{14:"情人节"},3:{8:"妇女节"},4:{1:"愚人节",4:"清明节"},5:{1:"劳动节",4:"青年节"},6:{1:"儿童节"},7:{1:"建党节"},8:{1:"建军节"},9:{10:"教师节"},10:{1:"国庆节"}};let n={lunarInfo:[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,28309,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42416,83315,21168,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19195,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448,84835,37744,18936,18800,25776,92326,59984,27424,108228,43744,37600,53987,51552,54615,54432,55888,23893,22176,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168,45683,26928,29495,27296,44368,84821,19296,42352,21732,53600,59752,54560,55968,92838,22224,19168,43476,42192,53584,62034,54560],solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],gan:["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],zhi:["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],animals:["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"],lunarTerm:["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"],lTermInfo:["9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","9778397bd19801ec9210c965cc920e","97b6b97bd19801ec95f8c965cc920f","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd197c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bcf97c3598082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd19801ec9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bd07f1487f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b97bd197c36c9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b70c9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","977837f0e37f149b0723b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0723b06bd","7f07e7f0e37f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f595b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e37f14998083b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14898082b0723b02d5","7f07e7f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66aa89801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e26665b66a449801e9808297c35","665f67f0e37f1489801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722"],nStr1:["日","一","二","三","四","五","六","七","八","九","十"],nStr2:["初","十","廿","卅"],nStr3:["正","二","三","四","五","六","七","八","九","十","冬","腊"],nStr4:["零","一","二","三","四","五","六","七","八","九","十"],lYearDays:function(e){var b,t=348;for(b=32768;b>8;b>>=1)t+=n.lunarInfo[e-1900]&b?1:0;return t+n.leapDays(e)},leapMonth:function(e){return 15&n.lunarInfo[e-1900]},leapDays:function(e){return n.leapMonth(e)?65536&n.lunarInfo[e-1900]?30:29:0},monthDays:function(e,b){return b>12||b<1?-1:n.lunarInfo[e-1900]&65536>>b?30:29},solarDays:function(e,b){if(b>12||b<1)return -1;var t=b-1;return 1==t?e%4==0&&e%100!=0||e%400==0?29:28:n.solarMonth[t]},toGanZhi:function(e){return n.gan[e%10]+n.zhi[e%12]},getTerm:function(e,b){if(e<1900||e>2100||b<1||b>24)return -1;var t=n.lTermInfo[e-1900],f=[parseInt("0x"+t.substr(0,5)).toString(),parseInt("0x"+t.substr(5,5)).toString(),parseInt("0x"+t.substr(10,5)).toString(),parseInt("0x"+t.substr(15,5)).toString(),parseInt("0x"+t.substr(20,5)).toString(),parseInt("0x"+t.substr(25,5)).toString()];return parseInt([f[0].substr(0,1),f[0].substr(1,2),f[0].substr(3,1),f[0].substr(4,2),f[1].substr(0,1),f[1].substr(1,2),f[1].substr(3,1),f[1].substr(4,2),f[2].substr(0,1),f[2].substr(1,2),f[2].substr(3,1),f[2].substr(4,2),f[3].substr(0,1),f[3].substr(1,2),f[3].substr(3,1),f[3].substr(4,2),f[4].substr(0,1),f[4].substr(1,2),f[4].substr(3,1),f[4].substr(4,2),f[5].substr(0,1),f[5].substr(1,2),f[5].substr(3,1),f[5].substr(4,2)][b-1])},toChinaYear:function(e){var b=parseInt((e/1e3).toString()),t=parseInt((e%1e3/100).toString()),f=parseInt((e%100/10).toString());return n.nStr4[b]+n.nStr4[t]+n.nStr4[f]+n.nStr4[e%10]+"年"},toChinaMonth:function(e){return e>12||e<1?-1:n.nStr3[e-1]+"月"},toChinaDay:function(e){var b;switch(e){case 10:b="初十";break;case 20:b="二十";break;case 30:b="三十";break;default:b=n.nStr2[Math.floor(e/10)]+n.nStr1[e%10]}return b},getAnimal:function(e){return n.animals[(e-4)%12]},solar2lunar:function(e,b,t){if(e<1900||e>2100||1900==e&&1==b&&t<31)return -1;if(e)r=new Date(e,parseInt(b.toString())-1,t);else var r=new Date;var a,o=0,l=(e=r.getFullYear(),b=r.getMonth()+1,t=r.getDate(),(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate())-Date.UTC(1900,0,31))/864e5);for(a=1900;a<2101&&l>0;a++)l-=o=n.lYearDays(a);l<0&&(l+=o,a--);var i=new Date,u=!1;i.getFullYear()==e&&i.getMonth()+1==b&&i.getDate()==t&&(u=!0);var d=r.getDay(),s=n.nStr1[d];0==d&&(d=7);var p=a,y=n.leapMonth(a),v=!1;for(a=1;a<13&&l>0;a++)y>0&&a==y+1&&0==v?(--a,v=!0,o=n.leapDays(p)):o=n.monthDays(p,a),1==v&&a==y+1&&(v=!1),l-=o;0==l&&y>0&&a==y+1&&(v?v=!1:(v=!0,--a)),l<0&&(l+=o,--a);var h=a,g=l+1,m=b-1,M=n.getTerm(e,3),T=n.toGanZhi(e-4),w=new Date(e,1,M).getTime();new Date(e,m,t).getTime()<w&&(T=n.toGanZhi(e-5));var C=n.getTerm(e,2*b-1),D=n.getTerm(e,2*b),E=n.toGanZhi(12*(e-1900)+b+11);t>=C&&(E=n.toGanZhi(12*(e-1900)+b+12));var O=!1,S="";C==t&&(O=!0,S=n.lunarTerm[2*b-2]),D==t&&(O=!0,S=n.lunarTerm[2*b-1]);var A=Date.UTC(e,m,1,0,0,0,0)/864e5+25567+10,k=n.toGanZhi(A+t-1),I=f[h]&&f[h][g]?f[h][g]:"";[2022,2025,2026,2027,2028,2029,2031,2032].includes(e)&&12===h&&29===g&&(I="除夕");var j=c[b]&&c[b][t]?c[b][t]:"";return{lYear:p,lMonth:h,lDay:g,animal:n.getAnimal(p),yearCn:n.toChinaYear(p),monthCn:(v&&y===h?"闰":"")+n.toChinaMonth(h),dayCn:n.toChinaDay(g),cYear:e,cMonth:b,cDay:t,gzYear:T,gzMonth:E,gzDay:k,isToday:u,isLeap:v,nWeek:d,ncWeek:"星期"+s,isTerm:O,term:S,lunarFestival:I,festival:j}},lunar2solar:function(e,b,t,f){var c=n.leapMonth(e);if(n.leapDays(e),f&&c!=b||2100==e&&12==b&&t>1||1900==e&&1==b&&t<31)return -1;var r=n.monthDays(e,b);if(e<1900||e>2100||t>r)return -1;for(var a=0,o=1900;o<e;o++)a+=n.lYearDays(o);var l=0,i=!1;for(o=1;o<b;o++)l=n.leapMonth(e),i||l<=o&&l>0&&(a+=n.leapDays(e),i=!0),a+=n.monthDays(e,o);f&&(a+=r);var u=new Date(864e5*(a+t-31)+Date.UTC(1900,1,30,0,0,0)),d=u.getUTCFullYear(),s=u.getUTCMonth()+1,p=u.getUTCDate();return n.solar2lunar(d,s,p)}};var r=n},971:function(e,b,t){t.r(b),t.d(b,{CalendarCollectionActionGroupModel:function(){return I},CalendarNavActionModel:function(){return P},CalendarTitleActionModel:function(){return x},CalendarTodayActionModel:function(){return j},CalendarViewSelectActionModel:function(){return _}});var f=t(7375),c=t(3485),n=t(7694),r=t(2059),a=t(9155),o=t.n(a),l=t(9488),i=t(1434),u=t(8802),d=t(9185),s=t.n(d);function p(e,b,t,f,c,n,r){try{var a=e[n](r),o=a.value}catch(e){t(e);return}a.done?b(o):Promise.resolve(o).then(f,c)}function y(e,b,t){return b=M(b),function(e,b){var t;if(b&&("object"==((t=b)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof b))return b;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,C()?Reflect.construct(b,t||[],M(e).constructor):b.apply(e,t))}function v(e,b){if(!(e instanceof b))throw TypeError("Cannot call a class as a function")}function h(e,b){for(var t=0;t<b.length;t++){var f=b[t];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}function g(e,b,t){return b&&h(e.prototype,b),t&&h(e,t),e}function m(e,b,t){return b in e?Object.defineProperty(e,b,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[b]=t,e}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function T(e,b){if("function"!=typeof b&&null!==b)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(b&&b.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),b&&w(e,b)}function w(e,b){return(w=Object.setPrototypeOf||function(e,b){return e.__proto__=b,e})(e,b)}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}var D=new Set(["DeleteActionModel","BulkDeleteActionModel","BulkEditActionModel","BulkUpdateActionModel","ImportActionModel","ExportActionModel","PrintActionModel"]),E=new Map(["CalendarTodayActionModel","CalendarNavActionModel","CalendarTitleActionModel","CalendarViewSelectActionModel"].map(function(e,b){return[e,b]})),O=(0,n.observer)(function(){var e,b,t=(0,n.useFlowModel)(),f=(0,u.o)();if(!f)return null;var a=t.getIcon()?o().createElement(c.Icon,{type:t.getIcon()}):void 0;return o().createElement(r.Button,(e=function(e){for(var b=1;b<arguments.length;b++){var t=null!=arguments[b]?arguments[b]:{},f=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(f=f.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),f.forEach(function(b){m(e,b,t[b])})}return e}({},t.props),b=b={icon:a,onClick:function(){return f.navigate("TODAY")}},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(b)):(function(e){var b=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);b.push.apply(b,t)}return b})(Object(b)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(b,t))}),e),t.props.children||t.getTitle())}),S=(0,n.observer)(function(){var e=(0,u.o)();return e?o().createElement(r.Button.Group,null,o().createElement(r.Button,{icon:o().createElement(f.LeftOutlined,null),onClick:function(){return e.navigate("PREV")}}),o().createElement(r.Button,{icon:o().createElement(f.RightOutlined,null),onClick:function(){return e.navigate("NEXT")}})):null}),A=(0,n.observer)(function(){var e=(0,u.o)(),b=(0,a.useMemo)(function(){return(null==e?void 0:e.showLunar)&&"day"===e.view?(0,i.pS)(s()(e.date)):null},[e]);return e?o().createElement(r.Typography.Text,{strong:!0},e.label,b?o().createElement(r.Typography.Text,{type:"secondary"}," ",b):null):null}),k=(0,n.observer)(function(){var e=(0,u.o)(),b=(0,l.k)();return e?o().createElement(r.Segmented,{value:e.view,onChange:function(b){return e.setView(b)},options:e.views.map(function(e){return{label:b("month"===e?"Month":"week"===e?"Week":"Day"),value:e}})}):null}),I=function(e){function b(){return v(this,b),y(this,b,arguments)}return T(b,e),b}(c.CollectionActionGroupModel);I.defineChildren=function(e){var b;return(b=function(){return function(e,b){var t,f,c,n={label:0,sent:function(){if(1&c[0])throw c[1];return c[1]},trys:[],ops:[]},r=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(r,"next",{value:o(0)}),a(r,"throw",{value:o(1)}),a(r,"return",{value:o(2)}),"function"==typeof Symbol&&a(r,Symbol.iterator,{value:function(){return this}}),r;function o(a){return function(o){var l=[a,o];if(t)throw TypeError("Generator is already executing.");for(;r&&(r=0,l[0]&&(n=0)),n;)try{if(t=1,f&&(c=2&l[0]?f.return:l[0]?f.throw||((c=f.return)&&c.call(f),0):f.next)&&!(c=c.call(f,l[1])).done)return c;switch(f=0,c&&(l=[2&l[0],c.value]),l[0]){case 0:case 1:c=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,f=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(!(c=(c=n.trys).length>0&&c[c.length-1])&&(6===l[0]||2===l[0])){n=0;continue}if(3===l[0]&&(!c||l[1]>c[0]&&l[1]<c[3])){n.label=l[1];break}if(6===l[0]&&n.label<c[1]){n.label=c[1],c=l;break}if(c&&n.label<c[2]){n.label=c[2],n.ops.push(l);break}c[2]&&n.ops.pop(),n.trys.pop();continue}l=b.call(e,n)}catch(e){l=[6,e],f=0}finally{t=c=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(b){switch(b.label){case 0:return[4,c.CollectionActionGroupModel.defineChildren.call(this,e)];case 1:return[2,b.sent().filter(function(e){return!(D.has(e.useModel)||[e.key,e.useModel,"string"==typeof e.label?e.label:""].filter(Boolean).join(" ").toLowerCase().includes("print"))}).map(function(e,b){return{item:e,index:b}}).sort(function(e,b){var t=E.get(e.item.useModel),f=E.get(b.item.useModel),c=void 0!==t,n=void 0!==f;return c&&n?t-f:c?-1:n?1:e.index-b.index}).map(function(e){return e.item})]}})},function(){var e=this,t=arguments;return new Promise(function(f,c){var n=b.apply(e,t);function r(e){p(n,f,c,r,a,"next",e)}function a(e){p(n,f,c,r,a,"throw",e)}r(void 0)})}).call(this)};var j=function(e){function b(){var e;return v(this,b),e=y(this,b,arguments),m(e,"defaultProps",{type:"default",title:(0,l.M)("Today")}),e}return T(b,e),g(b,[{key:"render",value:function(){return o().createElement(O,null)}}]),b}(c.ActionModel);j.define({label:(0,l.M)("Today"),toggleable:!0,sort:10});var P=function(e){function b(){var e;return v(this,b),e=y(this,b,arguments),m(e,"enableEditTooltip",!1),m(e,"enableEditTitle",!1),m(e,"enableEditIcon",!1),m(e,"enableEditType",!1),m(e,"enableEditDanger",!1),e}return T(b,e),g(b,[{key:"render",value:function(){return o().createElement(S,null)}}]),b}(c.ActionModel);P.define({label:(0,l.M)("Turn pages"),toggleable:!0,sort:20});var x=function(e){function b(){var e;return v(this,b),e=y(this,b,arguments),m(e,"enableEditTooltip",!1),m(e,"enableEditTitle",!1),m(e,"enableEditIcon",!1),m(e,"enableEditType",!1),m(e,"enableEditDanger",!1),e}return T(b,e),g(b,[{key:"render",value:function(){return o().createElement(A,null)}}]),b}(c.ActionModel);x.define({label:(0,l.M)("Title"),toggleable:!0,sort:30});var _=function(e){function b(){var e;return v(this,b),e=y(this,b,arguments),m(e,"enableEditTooltip",!1),m(e,"enableEditTitle",!1),m(e,"enableEditIcon",!1),m(e,"enableEditType",!1),m(e,"enableEditDanger",!1),e}return T(b,e),g(b,[{key:"render",value:function(){return o().createElement(k,null)}}]),b}(c.ActionModel);_.define({label:(0,l.M)("Select view"),toggleable:!0,sort:40}),I.registerActionModels({CalendarTodayActionModel:j,CalendarNavActionModel:P,CalendarTitleActionModel:x,CalendarViewSelectActionModel:_})},8802:function(e,b,t){t.d(b,{b:function(){return n},o:function(){return r}});var f=t(9155),c=(0,f.createContext)(null);c.displayName="CalendarViewContext";var n=c.Provider,r=function(){return(0,f.useContext)(c)}},1434:function(e,b,t){t.d(b,{pS:function(){return r}});var f=t(9185),c=t.n(f);t(6773);var n=t(8381),r=function(e){var b=c()(e),t=n.A.solar2lunar(b.year(),b.month()+1,b.date());return"number"!=typeof t?t.lunarFestival||t.term||t.dayCn:t}}}]);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_calendar_client_v2=self.webpackChunk_nocobase_plugin_calendar_client_v2||[]).push([["952"],{6875:function(t,e,n){n.r(e),n.d(e,{createCalendarEventViewActionOptions:function(){return
|
|
10
|
+
"use strict";(self.webpackChunk_nocobase_plugin_calendar_client_v2=self.webpackChunk_nocobase_plugin_calendar_client_v2||[]).push([["952"],{6875:function(t,e,n){n.r(e),n.d(e,{createCalendarEventViewActionOptions:function(){return A},CalendarEventViewActionModel:function(){return E},buildCalendarSlotFormData:function(){return Y},createCalendarQuickCreateActionOptions:function(){return _},CalendarQuickCreateActionModel:function(){return x}});var r=n(3485),o=n(9185),u=n.n(o),i=n(6773),a=n(9488),c=n(7768),l=function(t,e,n,r,o,i){var a=u().tz.guess(),l=o?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD";if(!t)return t;if(e)return u()(t).startOf(r).format("YYYY-MM-DD");if(n){if(i)return(0,c.toGmt)(t);if("date"!==r)return u()(t).startOf(r).toISOString();var f=u()(t).format(l);return u()(f).tz(a,!0).toISOString()}return o?u()(t).format(l):u()(t).startOf(r).format(l)},f=n(626);function s(t,e,n,r,o,u,i){try{var a=t[u](i),c=a.value}catch(t){n(t);return}a.done?e(c):Promise.resolve(c).then(r,o)}function p(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var u=t.apply(e,n);function i(t){s(u,r,o,i,a,"next",t)}function a(t){s(u,r,o,i,a,"throw",t)}i(void 0)})}}function d(t,e,n){return e=g(e),function(t,e){var n;if(e&&("object"==((n=e)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof e))return e;if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t,P()?Reflect.construct(e,n||[],g(t).constructor):e.apply(t,n))}function v(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e,n){return e&&y(t.prototype,e),n&&y(t,n),t}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function O(t,e,n){return(O="u">typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=g(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n||t):o.value}})(t,e,n||t)}function g(t){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&j(t,e)}function w(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){h(t,e,n[e])})}return t}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function P(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(P=function(){return!!t})()}function S(t,e){var n,r,o,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),a=Object.defineProperty;return a(i,"next",{value:c(0)}),a(i,"throw",{value:c(1)}),a(i,"return",{value:c(2)}),"function"==typeof Symbol&&a(i,Symbol.iterator,{value:function(){return this}}),i;function c(a){return function(c){var l=[a,c];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return u.label++,{value:l[1],done:!1};case 5:u.label++,r=l[1],l=[0];continue;case 7:l=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){u=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){u.label=l[1];break}if(6===l[0]&&u.label<o[1]){u.label=o[1],o=l;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(l);break}o[2]&&u.ops.pop(),u.trys.pop();continue}l=e.call(t,u)}catch(t){l=[6,t],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}var _=function(t){return{uid:t,use:"CalendarQuickCreateActionModel"}},A=function(t){return{uid:t,use:"CalendarEventViewActionModel"}},k=function(t,e){if(!t||!e)return null;var n=null==(c=t.getStepParams)||null==(a=c.call(t,"fieldSettings","init"))?void 0:a.fieldPath;if(n&&(0,f.v7)(n)===e)return w({},(null==(s=t.subModels)||null==(l=s.field)?void 0:l.props)||{},(null==(p=t.props)?void 0:p["x-component-props"])||{},t.props||{});var r=Object.values(t.subModels||{}),o=!0,u=!1,i=void 0;try{for(var a,c,l,s,p,d,v=r[Symbol.iterator]();!(o=(d=v.next()).done);o=!0){var y=d.value,b=Array.isArray(y)?y:[y],h=!0,O=!1,g=void 0;try{for(var m,j=b[Symbol.iterator]();!(h=(m=j.next()).done);h=!0){var P=m.value,S=k(P,e);if(S)return S}}catch(t){O=!0,g=t}finally{try{h||null==j.return||j.return()}finally{if(O)throw g}}}}catch(t){u=!0,i=t}finally{try{o||null==v.return||v.return()}finally{if(u)throw i}}return null},D=function(t,e,n){var r,o,u,i=(0,f.v7)(n),a=k(e,i);if(a)return a;var c=i?null==t||null==(r=t.getField)?void 0:r.call(t,i):null;return c?w({},(null==(o=c.uiSchema)?void 0:o["x-component-props"])||{},(null==(u=c.getComponentProps)?void 0:u.call(c))||{}):null},M=function(t,e,n,r,o){if(r&&o){var a=D(e,n,r)||{},c=l(u()(o),a.dateOnly,a.utc,a.picker||"date",a.showTime,a.gmt);if(void 0!==c){var f=Array.isArray(r)?r:String(r).split(".");(0,i.set)(t,f,c)}}},Y=function(t){var e=t.slotInfo,n=t.collection,r=t.popupAction,o=t.fieldNames;if(!(null==e?void 0:e.start)||!n)return{};var u={},i=null==o?void 0:o.start,a=null==o?void 0:o.end,c=(0,f.v7)(i),l=(0,f.v7)(a);return M(u,n,r,i,e.start),l&&l!==c&&M(u,n,r,a,e.end||e.start),u},C=function(t){function e(){return v(this,e),d(this,e,arguments)}return m(e,t),b(e,[{key:"collection",get:function(){var t;return this.context.collection||(null==(t=this.context.blockModel)?void 0:t.collection)}},{key:"getInputArgs",value:function(){var t,n,r=O(g(e.prototype),"getInputArgs",this).call(this),o=this.collection;return t=w({},r),n=n={dataSourceKey:null==o?void 0:o.dataSourceKey,collectionName:null==o?void 0:o.name},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):(function(t){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e.push.apply(e,n)}return e})(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}),t}}]),e}(r.PopupActionModel),x=function(t){function e(){var t;return v(this,e),t=d(this,e,arguments),h(t,"defaultPopupTitle",(0,a.M)("Add new")),t}return m(e,t),b(e,[{key:"getAclActionName",value:function(){return"create"}}]),e}(C);h(x,"scene",r.ActionSceneEnum.collection),x.define({hide:!0,createModelOptions:function(){return p(function(){return S(this,function(t){return[2,_()]})})()}});var E=function(t){function e(){var t;return v(this,e),t=d(this,e,arguments),h(t,"defaultPopupTitle",(0,a.M)("Details")),t}return m(e,t),b(e,[{key:"getAclActionName",value:function(){return"view"}}]),e}(C);h(E,"scene",r.ActionSceneEnum.record),E.define({hide:!0,createModelOptions:function(){return p(function(){return S(this,function(t){return[2,A()]})})()}})},626:function(t,e,n){n.d(e,{UY:function(){return d},Yq:function(){return p},a3:function(){return s},sJ:function(){return i},uz:function(){return c},v7:function(){return a}});var r=n(9185),o=n.n(r);function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i="__calendar_view_range__",a=function(t){return Array.isArray(t)?t.join("."):t},c=function(t){return+(0!==Number(t))},l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=(t.day()-e+7)%7;return t.subtract(n,"day").startOf("day")},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=((e+6)%7-t.day()+7)%7;return t.add(n,"day").endOf("day")},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"month",n=arguments.length>2?arguments[2]:void 0,r=o()(t),u=c(n);if("day"===e)return{start:r.startOf("day").toDate(),end:r.endOf("day").toDate()};if("week"===e){var i=l(r,u);return{start:i.toDate(),end:i.add(6,"day").endOf("day").toDate()}}var a=l(r.startOf("month"),u),s=f(r.endOf("month"),u);return{start:a.toDate(),end:s.toDate()}},p=function(t){return t.format("YYYY-MM-DDTHH:mm:ss.SSSZ")},d=function(t,e){var n=a(null==t?void 0:t.start),r=a(null==t?void 0:t.end);if(!n)return null;var i=p(o()(e.start)),c=p(o()(e.end)),l=u({},n,{$gte:i,$lte:c});return r&&r!==n?{$or:[l,u({},r,{$gte:i,$lte:c}),{$and:[u({},n,{$lte:i}),u({},r,{$gte:c})]}]}:l}}}]);
|
package/dist/client-v2/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-dom"),require("@nocobase/client-v2"),require("dayjs"),require("@formily/shared"),require("react"),require("antd"),require("@ant-design/icons"),require("antd-style"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):"function"==typeof define&&define.amd?define("@nocobase/plugin-calendar/client-v2",["react-dom","@nocobase/client-v2","dayjs","@formily/shared","react","antd","@ant-design/icons","antd-style","@nocobase/flow-engine","@nocobase/utils/client","lodash"],t):"object"==typeof exports?exports["@nocobase/plugin-calendar/client-v2"]=t(require("react-dom"),require("@nocobase/client-v2"),require("dayjs"),require("@formily/shared"),require("react"),require("antd"),require("@ant-design/icons"),require("antd-style"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):e["@nocobase/plugin-calendar/client-v2"]=t(e["react-dom"],e["@nocobase/client-v2"],e.dayjs,e["@formily/shared"],e.react,e.antd,e["@ant-design/icons"],e["antd-style"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"],e.lodash)}(self,function(e,t,n,r,o,i,a,c,u,l,f){return function(){"use strict";var s,d,p,b={7375:function(e){e.exports=a},166:function(e){e.exports=r},3485:function(e){e.exports=t},7694:function(e){e.exports=u},7768:function(e){e.exports=l},2059:function(e){e.exports=i},3235:function(e){e.exports=c},9185:function(e){e.exports=n},6773:function(e){e.exports=f},9155:function(e){e.exports=o},9514:function(t){t.exports=e}},v={};function h(e){var t=v[e];if(void 0!==t)return t.exports;var n=v[e]={exports:{}};return b[e].call(n.exports,n,n.exports,h),n.exports}h.m=b,h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},g=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},h.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var n=Object.create(null);h.r(n);var r={};y=y||[null,g({}),g([]),g(g)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~y.indexOf(o);o=g(o))Object.getOwnPropertyNames(o).forEach(function(t){r[t]=function(){return e[t]}});return r.default=function(){return e},h.d(n,r),n},h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.f={},h.e=function(e){return Promise.all(Object.keys(h.f).reduce(function(t,n){return h.f[n](e,t),t},[]))},h.u=function(e){return""+e+"."+({110:"a300efc255ce18b8",701:"ab4233a614cd3e0a",82:"7b76afd4bcb77bb9",944:"f4b4f1ca02f36c49",952:"8117af037dabbb79",953:"6fd23a3f18022252"})[e]+".js"},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m={},h.l=function(e,t,n,r){if(m[e])return void m[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),c=0;c<a.length;c++){var u=a[c];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-calendar/client-v2:"+n){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,h.nc&&o.setAttribute("nonce",h.nc),o.setAttribute("data-rspack","@nocobase/plugin-calendar/client-v2:"+n),o.src=e),m[e]=[t];var l=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=m[e];if(delete m[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),i&&document.head.appendChild(o)},h.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},h.g.importScripts&&(w=h.g.location+"");var y,g,m,w,_=h.g.document;if(!w&&_&&(_.currentScript&&"SCRIPT"===_.currentScript.tagName.toUpperCase()&&(w=_.currentScript.src),!w)){var j=_.getElementsByTagName("script");if(j.length)for(var O=j.length-1;O>-1&&(!w||!/^http(s?):/.test(w));)w=j[O--].src}if(!w)throw Error("Automatic publicPath is not supported in this browser");h.p=w.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s={889:0},h.f.j=function(e,t){var n=h.o(s,e)?s[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=s[e]=[t,r]});t.push(n[2]=r);var o=h.p+h.u(e),i=Error();h.l(o,function(t){if(h.o(s,e)&&(0!==(n=s[e])&&(s[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},d=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],c=0;if(o.some(function(e){return 0!==s[e]})){for(n in i)h.o(i,n)&&(h.m[n]=i[n]);a&&a(h)}for(e&&e(t);c<o.length;c++)r=o[c],h.o(s,r)&&s[r]&&s[r][0](),s[r]=0},(p=self.webpackChunk_nocobase_plugin_calendar_client_v2=self.webpackChunk_nocobase_plugin_calendar_client_v2||[]).forEach(d.bind(null,0)),p.push=d.bind(null,p.push.bind(p));var T={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-calendar/dist/client-v2/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",o=r.indexOf("/v2/");e=o>=0?r.slice(0,o+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-calendar/dist/client-v2/"}h.p=e}(),!function(){h.r(T),h.d(T,{PluginCalendarClient:function(){return d},default:function(){return p}});var e=h(3485),t=h(9155),n=h.n(t);function r(e,t,n,r,o,i,a){try{var c=e[i](a),u=c.value}catch(e){n(e);return}c.done?t(u):Promise.resolve(u).then(r,o)}function o(e,t,n){return(o=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&c(o,n.prototype),o}).apply(null,arguments)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return o(e,arguments,a(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)})(e)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}var f=function(e){var t=e.value;return n().createElement("span",{"aria-label":"event-title"},t||"N/A")},s=function(e){return{loading:!1,getFontColor:function(t){var n,r,o=null==e||null==(r=e.uiSchema)||null==(n=r.enum)?void 0:n.find(function(e){return e.value===t});return(null==o?void 0:o.color)?"var(--ant-".concat(o.color,"-7)"):null},getBackgroundColor:function(t){var n,r,o=null==e||null==(r=e.uiSchema)||null==(n=r.enum)?void 0:n.find(function(e){return e.value===t});return(null==o?void 0:o.color)?"var(--ant-".concat(o.color,"-1)"):null}}},d=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=a(t),i(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,l()?Reflect.construct(t,r||[],a(this).constructor):t.apply(this,r)),"titleFieldInterfaces",{input:{TitleRenderer:f},select:{TitleRenderer:f},phone:{TitleRenderer:f},email:{TitleRenderer:f},radioGroup:{TitleRenderer:f}}),i(e,"colorFieldInterfaces",{select:{useGetColor:s},radioGroup:{useGetColor:s}}),i(e,"dateTimeFieldInterfaces",["date","datetime","dateOnly","datetimeNoTz","unixTimestamp","createdAt","updatedAt"]),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&c(n,e),t=[{key:"registerTitleFieldInterface",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{TitleRenderer:f};this.titleFieldInterfaces[e]=t}},{key:"getTitleFieldInterface",value:function(e){return e?this.titleFieldInterfaces[e]:this.titleFieldInterfaces}},{key:"getTitleFieldInterfaces",value:function(){return Object.keys(this.titleFieldInterfaces)}},{key:"registerDateTimeFieldInterface",value:function(e){Array.isArray(e)?this.dateTimeFieldInterfaces=this.dateTimeFieldInterfaces.concat(e):this.dateTimeFieldInterfaces.push(e)}},{key:"getDateTimeFieldInterfaces",value:function(){return this.dateTimeFieldInterfaces}},{key:"registerColorFieldInterface",value:function(e,t){this.colorFieldInterfaces[e]=t}},{key:"getColorFieldInterface",value:function(e){return this.colorFieldInterfaces[e]}},{key:"getColorFieldInterfaces",value:function(){return Object.keys(this.colorFieldInterfaces)}},{key:"load",value:function(){var e;return(e=function(){return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:u(0)}),c(a,"throw",{value:u(1)}),c(a,"return",{value:u(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function u(c){return function(u){var l=[c,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){return this.flowEngine.registerModelLoaders({CalendarBlockModel:{loader:function(){return Promise.all([h.e("701"),h.e("952"),h.e("110")]).then(h.bind(h,2245))}},CalendarCollectionActionGroupModel:{loader:function(){return h.e("944").then(h.bind(h,971))}},CalendarEventViewActionModel:{loader:function(){return h.e("952").then(h.bind(h,6875))}},CalendarNavActionModel:{loader:function(){return h.e("944").then(h.bind(h,971))}},CalendarQuickCreateActionModel:{loader:function(){return h.e("952").then(h.bind(h,6875))}},CalendarTitleActionModel:{loader:function(){return h.e("944").then(h.bind(h,971))}},CalendarTodayActionModel:{loader:function(){return h.e("944").then(h.bind(h,971))}},CalendarViewSelectActionModel:{loader:function(){return h.e("944").then(h.bind(h,971))}}}),[2]})},function(){var t=this,n=arguments;return new Promise(function(o,i){var a=e.apply(t,n);function c(e){r(a,o,i,c,u,"next",e)}function u(e){r(a,o,i,c,u,"throw",e)}c(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(u(e.Plugin)),p=d}(),T}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react-dom"),require("@nocobase/client-v2"),require("dayjs"),require("@formily/shared"),require("react"),require("antd"),require("@ant-design/icons"),require("antd-style"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):"function"==typeof define&&define.amd?define("@nocobase/plugin-calendar/client-v2",["react-dom","@nocobase/client-v2","dayjs","@formily/shared","react","antd","@ant-design/icons","antd-style","@nocobase/flow-engine","@nocobase/utils/client","lodash"],t):"object"==typeof exports?exports["@nocobase/plugin-calendar/client-v2"]=t(require("react-dom"),require("@nocobase/client-v2"),require("dayjs"),require("@formily/shared"),require("react"),require("antd"),require("@ant-design/icons"),require("antd-style"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):e["@nocobase/plugin-calendar/client-v2"]=t(e["react-dom"],e["@nocobase/client-v2"],e.dayjs,e["@formily/shared"],e.react,e.antd,e["@ant-design/icons"],e["antd-style"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"],e.lodash)}(self,function(e,t,n,r,o,i,a,c,l,u,f){return function(){"use strict";var s,d,p,b={9488:function(e,t,n){n.d(t,{M:function(){return a},k:function(){return i}});var r=n(7694);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,o({ns:["calendar","client"]},n))}}function a(e,t){return(0,r.tExpr)(e,o({ns:"calendar"},t))}},7375:function(e){e.exports=a},166:function(e){e.exports=r},3485:function(e){e.exports=t},7694:function(e){e.exports=l},7768:function(e){e.exports=u},2059:function(e){e.exports=i},3235:function(e){e.exports=c},9185:function(e){e.exports=n},6773:function(e){e.exports=f},9155:function(e){e.exports=o},9514:function(t){t.exports=e}},y={};function v(e){var t=y[e];if(void 0!==t)return t.exports;var n=y[e]={exports:{}};return b[e].call(n.exports,n,n.exports,v),n.exports}v.m=b,v.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return v.d(t,{a:t}),t},g=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},v.t=function(e,t){if(1&t&&(e=this(e)),8&t||"object"==typeof e&&e&&(4&t&&e.__esModule||16&t&&"function"==typeof e.then))return e;var n=Object.create(null);v.r(n);var r={};h=h||[null,g({}),g([]),g(g)];for(var o=2&t&&e;("object"==typeof o||"function"==typeof o)&&!~h.indexOf(o);o=g(o))Object.getOwnPropertyNames(o).forEach(function(t){r[t]=function(){return e[t]}});return r.default=function(){return e},v.d(n,r),n},v.d=function(e,t){for(var n in t)v.o(t,n)&&!v.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},v.f={},v.e=function(e){return Promise.all(Object.keys(v.f).reduce(function(t,n){return v.f[n](e,t),t},[]))},v.u=function(e){return""+e+"."+({110:"a300efc255ce18b8",701:"ab4233a614cd3e0a",82:"7b76afd4bcb77bb9",944:"ae8f373289233106",952:"2e8bdb07443a31df",953:"6fd23a3f18022252"})[e]+".js"},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),v.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m={},v.l=function(e,t,n,r){if(m[e])return void m[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),c=0;c<a.length;c++){var l=a[c];if(l.getAttribute("src")==e||l.getAttribute("data-rspack")=="@nocobase/plugin-calendar/client-v2:"+n){o=l;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,v.nc&&o.setAttribute("nonce",v.nc),o.setAttribute("data-rspack","@nocobase/plugin-calendar/client-v2:"+n),o.src=e),m[e]=[t];var u=function(t,n){o.onerror=o.onload=null,clearTimeout(f);var r=m[e];if(delete m[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=u.bind(null,o.onerror),o.onload=u.bind(null,o.onload),i&&document.head.appendChild(o)},v.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},v.g.importScripts&&(w=v.g.location+"");var h,g,m,w,_=v.g.document;if(!w&&_&&(_.currentScript&&"SCRIPT"===_.currentScript.tagName.toUpperCase()&&(w=_.currentScript.src),!w)){var O=_.getElementsByTagName("script");if(O.length)for(var j=O.length-1;j>-1&&(!w||!/^http(s?):/.test(w));)w=O[j--].src}if(!w)throw Error("Automatic publicPath is not supported in this browser");v.p=w.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s={889:0},v.f.j=function(e,t){var n=v.o(s,e)?s[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=s[e]=[t,r]});t.push(n[2]=r);var o=v.p+v.u(e),i=Error();v.l(o,function(t){if(v.o(s,e)&&(0!==(n=s[e])&&(s[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},d=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],c=0;if(o.some(function(e){return 0!==s[e]})){for(n in i)v.o(i,n)&&(v.m[n]=i[n]);a&&a(v)}for(e&&e(t);c<o.length;c++)r=o[c],v.o(s,r)&&s[r]&&s[r][0](),s[r]=0},(p=self.webpackChunk_nocobase_plugin_calendar_client_v2=self.webpackChunk_nocobase_plugin_calendar_client_v2||[]).forEach(d.bind(null,0)),p.push=d.bind(null,p.push.bind(p));var k={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src&&(e=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/")),!e){var n=window.__webpack_public_path__||"";n&&("/"!==n.charAt(n.length-1)&&(n+="/"),e=n+"static/plugins/@nocobase/plugin-calendar/dist/client-v2/")}if(!e){if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var r=window.location.pathname||"/",o=r.indexOf("/v2/");e=o>=0?r.slice(0,o+1):"/"}e&&(e=e.replace(/\/v2\/?$/,"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-calendar/dist/client-v2/"}v.p=e}(),!function(){v.r(k),v.d(k,{PluginCalendarClient:function(){return p},default:function(){return b}});var e=v(3485),t=v(9155),n=v.n(t),r=v(9488);function o(e,t,n,r,o,i,a){try{var c=e[i](a),l=c.value}catch(e){n(e);return}c.done?t(l):Promise.resolve(l).then(r,o)}function i(e,t,n){return(i=f()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&l(o,n.prototype),o}).apply(null,arguments)}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t="function"==typeof Map?new Map:void 0;return(u=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return i(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),l(n,e)})(e)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}var s=function(e){var t=e.value;return n().createElement("span",{"aria-label":"event-title"},t||"N/A")},d=function(e){return{loading:!1,getFontColor:function(t){var n,r,o=null==e||null==(r=e.uiSchema)||null==(n=r.enum)?void 0:n.find(function(e){return e.value===t});return(null==o?void 0:o.color)?"var(--ant-".concat(o.color,"-7)"):null},getBackgroundColor:function(t){var n,r,o=null==e||null==(r=e.uiSchema)||null==(n=r.enum)?void 0:n.find(function(e){return e.value===t});return(null==o?void 0:o.color)?"var(--ant-".concat(o.color,"-1)"):null}}},p=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function n(){var e,t,r;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");return t=n,r=arguments,t=c(t),a(e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(t,r||[],c(this).constructor):t.apply(this,r)),"titleFieldInterfaces",{input:{TitleRenderer:s},select:{TitleRenderer:s},phone:{TitleRenderer:s},email:{TitleRenderer:s},radioGroup:{TitleRenderer:s}}),a(e,"colorFieldInterfaces",{select:{useGetColor:d},radioGroup:{useGetColor:d}}),a(e,"dateTimeFieldInterfaces",["date","datetime","dateOnly","datetimeNoTz","unixTimestamp","createdAt","updatedAt"]),e}return n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&l(n,e),t=[{key:"registerTitleFieldInterface",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{TitleRenderer:s};this.titleFieldInterfaces[e]=t}},{key:"getTitleFieldInterface",value:function(e){return e?this.titleFieldInterfaces[e]:this.titleFieldInterfaces}},{key:"getTitleFieldInterfaces",value:function(){return Object.keys(this.titleFieldInterfaces)}},{key:"registerDateTimeFieldInterface",value:function(e){Array.isArray(e)?this.dateTimeFieldInterfaces=this.dateTimeFieldInterfaces.concat(e):this.dateTimeFieldInterfaces.push(e)}},{key:"getDateTimeFieldInterfaces",value:function(){return this.dateTimeFieldInterfaces}},{key:"registerColorFieldInterface",value:function(e,t){this.colorFieldInterfaces[e]=t}},{key:"getColorFieldInterface",value:function(e){return this.colorFieldInterfaces[e]}},{key:"getColorFieldInterfaces",value:function(){return Object.keys(this.colorFieldInterfaces)}},{key:"load",value:function(){var e;return(e=function(){var e,t;return function(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(a,"next",{value:l(0)}),c(a,"throw",{value:l(1)}),c(a,"return",{value:l(2)}),"function"==typeof Symbol&&c(a,Symbol.iterator,{value:function(){return this}}),a;function l(c){return function(l){var u=[c,l];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(n){return null==(t=this.app.pm.get("@nocobase/plugin-data-source-manager")||this.app.pm.get("data-source-manager"))||null==(e=t.registerCollectionTemplate)||e.call(t,{name:"calendar",title:(0,r.M)("Calendar collection"),order:20,color:"orange",collection:{options:{template:"calendar",createdBy:!0,updatedBy:!0,createdAt:!0,updatedAt:!0,sortable:!0},fields:[{name:"cron",type:"string",uiSchema:{type:"string",title:(0,r.M)("Repeats"),"x-component":"CronSet","x-component-props":"allowClear",enum:[{label:(0,r.M)("Daily"),value:"0 0 0 * * ?"},{label:(0,r.M)("Weekly"),value:"every_week"},{label:(0,r.M)("Monthly"),value:"every_month"},{label:(0,r.M)("Yearly"),value:"every_year"}]},interface:"select"},{name:"exclude",type:"json"}]},fieldInterfaces:{include:[]}}),this.flowEngine.registerModelLoaders({CalendarBlockModel:{loader:function(){return Promise.all([v.e("701"),v.e("952"),v.e("110")]).then(v.bind(v,2245))}},CalendarCollectionActionGroupModel:{loader:function(){return v.e("944").then(v.bind(v,971))}},CalendarEventViewActionModel:{loader:function(){return v.e("952").then(v.bind(v,6875))}},CalendarNavActionModel:{loader:function(){return v.e("944").then(v.bind(v,971))}},CalendarQuickCreateActionModel:{loader:function(){return v.e("952").then(v.bind(v,6875))}},CalendarTitleActionModel:{loader:function(){return v.e("944").then(v.bind(v,971))}},CalendarTodayActionModel:{loader:function(){return v.e("944").then(v.bind(v,971))}},CalendarViewSelectActionModel:{loader:function(){return v.e("944").then(v.bind(v,971))}}}),[2]})},function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function c(e){o(a,r,i,c,l,"next",e)}function l(e){o(a,r,i,c,l,"throw",e)}c(void 0)})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,t),n}(u(e.Plugin)),b=p}(),k}()});
|
package/dist/externalVersion.js
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "2.1.0-beta.
|
|
11
|
+
"@nocobase/client": "2.1.0-beta.41",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/flow-engine": "2.1.0-beta.
|
|
14
|
-
"@nocobase/client-v2": "2.1.0-beta.
|
|
13
|
+
"@nocobase/flow-engine": "2.1.0-beta.41",
|
|
14
|
+
"@nocobase/client-v2": "2.1.0-beta.41",
|
|
15
15
|
"react-i18next": "11.18.6",
|
|
16
|
-
"@nocobase/server": "2.1.0-beta.
|
|
16
|
+
"@nocobase/server": "2.1.0-beta.41",
|
|
17
17
|
"dayjs": "1.11.13",
|
|
18
18
|
"lodash": "4.18.1",
|
|
19
|
-
"@nocobase/test": "2.1.0-beta.
|
|
19
|
+
"@nocobase/test": "2.1.0-beta.41",
|
|
20
20
|
"@ant-design/icons": "5.6.1",
|
|
21
21
|
"@formily/react": "2.3.7",
|
|
22
22
|
"antd": "5.24.2",
|
|
@@ -25,5 +25,5 @@ module.exports = {
|
|
|
25
25
|
"@formily/core": "2.3.7",
|
|
26
26
|
"@formily/shared": "2.3.7",
|
|
27
27
|
"@formily/antd-v5": "1.2.3",
|
|
28
|
-
"@nocobase/utils": "2.1.0-beta.
|
|
28
|
+
"@nocobase/utils": "2.1.0-beta.41"
|
|
29
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"solarlunar-es","version":"1.0.9","description":"一个公历农历转化工具,支持esmodule","main":"./dist/solarlunar.cjs.js","module":"./dist/solarlunar.esm.js","types":"./dist/solarlunar.d.ts","scripts":{"build":"rollup -c","test":"mocha"},"files":["dist"],"keywords":["solarlunar","esm","公历农历转换"],"repository":{"type":"git","url":"https://github.com/qiuquanwu/solarlunar-es"},"author":"qiuquanwu","license":"ISC","devDependencies":{"@babel/core":"^7.12.10","@rollup/plugin-commonjs":"^17.1.0","@rollup/plugin-node-resolve":"^11.1.0","rollup":"^2.38.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-dts":"^4.1.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript":"^1.0.1","typescript":"^4.5.5","chai":"^4.3.6","mocha":"^9.2.1"},"_lastModified":"2026-05-
|
|
1
|
+
{"name":"solarlunar-es","version":"1.0.9","description":"一个公历农历转化工具,支持esmodule","main":"./dist/solarlunar.cjs.js","module":"./dist/solarlunar.esm.js","types":"./dist/solarlunar.d.ts","scripts":{"build":"rollup -c","test":"mocha"},"files":["dist"],"keywords":["solarlunar","esm","公历农历转换"],"repository":{"type":"git","url":"https://github.com/qiuquanwu/solarlunar-es"},"author":"qiuquanwu","license":"ISC","devDependencies":{"@babel/core":"^7.12.10","@rollup/plugin-commonjs":"^17.1.0","@rollup/plugin-node-resolve":"^11.1.0","rollup":"^2.38.1","rollup-plugin-babel":"^4.4.0","rollup-plugin-dts":"^4.1.0","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript":"^1.0.1","typescript":"^4.5.5","chai":"^4.3.6","mocha":"^9.2.1"},"_lastModified":"2026-05-30T01:29:35.675Z"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-calendar",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.41",
|
|
4
4
|
"displayName": "Calendar",
|
|
5
5
|
"displayName.ru-RU": "Календарь",
|
|
6
6
|
"displayName.zh-CN": "日历",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@nocobase/client": "2.x",
|
|
34
34
|
"@nocobase/client-v2": "2.x",
|
|
35
35
|
"@nocobase/database": "2.x",
|
|
36
|
+
"@nocobase/plugin-data-source-manager": "2.x",
|
|
36
37
|
"@nocobase/server": "2.x"
|
|
37
38
|
},
|
|
38
39
|
"repository": {
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
41
42
|
"directory": "packages/plugins/calendar"
|
|
42
43
|
},
|
|
43
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "ea3f966811146edb13c9e8016bf4cdc81597a003",
|
|
44
45
|
"keywords": [
|
|
45
46
|
"Collections",
|
|
46
47
|
"Blocks"
|