@tachybase/module-cron 0.23.8
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/.turbo/turbo-build.log +14 -0
- package/README.md +1 -0
- package/client.d.ts +2 -0
- package/client.js +1 -0
- package/dist/client/components/EndsByField.d.ts +5 -0
- package/dist/client/components/FieldsSelect.d.ts +2 -0
- package/dist/client/components/OnField.d.ts +5 -0
- package/dist/client/components/RepeatField.d.ts +5 -0
- package/dist/client/components/locale/Cron.zh-CN.d.ts +34 -0
- package/dist/client/cron-jobs-table/CronJobsTable.d.ts +7 -0
- package/dist/client/cron-jobs-table/CronJobsTable.schema.d.ts +1241 -0
- package/dist/client/index.d.ts +7 -0
- package/dist/client/index.js +36 -0
- package/dist/client/locale.d.ts +3 -0
- package/dist/collections/cronJobs.d.ts +3 -0
- package/dist/collections/cronJobs.js +200 -0
- package/dist/constants.d.ts +6 -0
- package/dist/constants.js +37 -0
- package/dist/externalVersion.js +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -0
- package/dist/locale/en-US.json +36 -0
- package/dist/locale/zh-CN.json +36 -0
- package/dist/node_modules/cron-parser/LICENSE +21 -0
- package/dist/node_modules/cron-parser/lib/date.js +252 -0
- package/dist/node_modules/cron-parser/lib/expression.js +1002 -0
- package/dist/node_modules/cron-parser/lib/field_compactor.js +70 -0
- package/dist/node_modules/cron-parser/lib/field_stringify.js +58 -0
- package/dist/node_modules/cron-parser/lib/parser.js +1 -0
- package/dist/node_modules/cron-parser/package.json +1 -0
- package/dist/node_modules/cron-parser/types/common.d.ts +131 -0
- package/dist/node_modules/cron-parser/types/index.d.ts +45 -0
- package/dist/node_modules/cron-parser/types/ts3/index.d.ts +28 -0
- package/dist/server/actions/cron-jobs-controller.d.ts +4 -0
- package/dist/server/actions/cron-jobs-controller.js +94 -0
- package/dist/server/collections/cronJobs.d.ts +1 -0
- package/dist/server/collections/cronJobs.js +33 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +33 -0
- package/dist/server/model/CronJobModel.d.ts +19 -0
- package/dist/server/model/CronJobModel.js +29 -0
- package/dist/server/plugin.d.ts +11 -0
- package/dist/server/plugin.js +104 -0
- package/dist/server/service/StaticScheduleTrigger.d.ts +15 -0
- package/dist/server/service/StaticScheduleTrigger.js +298 -0
- package/dist/server/utils/index.d.ts +1 -0
- package/dist/server/utils/index.js +29 -0
- package/package.json +23 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
(function(v,d){typeof exports=="object"&&typeof module!="undefined"?d(exports,require("@tachybase/client"),require("react/jsx-runtime"),require("@tachybase/module-workflow/client"),require("@tachybase/utils/client"),require("antd"),require("react"),require("@tachybase/schema")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react/jsx-runtime","@tachybase/module-workflow/client","@tachybase/utils/client","antd","react","@tachybase/schema"],d):(v=typeof globalThis!="undefined"?globalThis:v||self,d(v["@tachybase/module-cron"]={},v["@tachybase/client"],v.jsxRuntime,v["@tachybase/module-workflow"],v["@tachybase/utils"],v.antd,v.react,v["@tachybase/schema"]))})(this,function(v,d,a,F,me,U,m,R){"use strict";var Zo=Object.defineProperty,qo=Object.defineProperties;var Uo=Object.getOwnPropertyDescriptors;var Me=Object.getOwnPropertySymbols;var mo=Object.prototype.hasOwnProperty,yo=Object.prototype.propertyIsEnumerable;var po=(v,d,a)=>d in v?Zo(v,d,{enumerable:!0,configurable:!0,writable:!0,value:a}):v[d]=a,L=(v,d)=>{for(var a in d||(d={}))mo.call(d,a)&&po(v,a,d[a]);if(Me)for(var a of Me(d))yo.call(d,a)&&po(v,a,d[a]);return v},G=(v,d)=>qo(v,Uo(d));var Pe=(v,d)=>{var a={};for(var F in v)mo.call(v,F)&&d.indexOf(F)<0&&(a[F]=v[F]);if(v!=null&&Me)for(var F of Me(v))d.indexOf(F)<0&&yo.call(v,F)&&(a[F]=v[F]);return a};var de=(v,d,a)=>new Promise((F,me)=>{var U=O=>{try{R(a.next(O))}catch(ie){me(ie)}},m=O=>{try{R(a.throw(O))}catch(ie){me(ie)}},R=O=>O.done?F(O.value):Promise.resolve(O.value).then(U,m);R((a=a.apply(v,d)).next())});const O="cron",ie="cronJobs";var Ee=(e=>(e[e.STATIC=0]="STATIC",e[e.DATE_FIELD=1]="DATE_FIELD",e))(Ee||{});const fo={dumpRules:{group:"required"},name:ie,shared:!0,createdAt:!0,updatedAt:!0,createdBy:!0,updatedBy:!0,model:"CronJobModel",fields:[{type:"bigInt",name:"id",primaryKey:!0,autoIncrement:!0},{type:"string",name:"name",required:!0,uiSchema:{title:'{{ t("Name") }}',type:"string","x-component":"Input",required:!0}},{type:"string",name:"description",uiSchema:{title:'{{ t("Description") }}',type:"string","x-component":"Input.TextArea"}},{type:"date",name:"startsOn",required:!0,uiSchema:{title:`{{t("Starts on", { ns: "${O}" })}}`,type:"datetime","x-component":"DatePicker","x-component-props":{showTime:!0},required:!0}},{type:"integer",name:"mode",required:!0,defaultValue:Ee.STATIC},{type:"date",name:"endsOn",uiSchema:{title:`{{t("Ends on", { ns: "${O}" })}}`,type:"datetime","x-component":"DatePicker","x-component-props":{showTime:!0}}},{type:"date",name:"lastTime",uiSchema:{title:`{{t("Last time", { ns: "${O}" })}}`,type:"datetime","x-component":"DatePicker","x-component-props":{showTime:!0}}},{type:"virtual",name:"nextTime",uiSchema:{title:`{{t("Next time", { ns: "${O}" })}}`,type:"datetime","x-component":"DatePicker","x-component-props":{showTime:!0}}},{type:"string",name:"repeat",required:!0,uiSchema:{title:`{{t("Repeat mode", { ns: "${O}" })}}`,type:"string","x-component":"RepeatField"}},{type:"integer",name:"limit",uiSchema:{title:`{{t("Current limit", { ns: "${O}" })}}`,type:"number","x-component":"InputNumber"}},{type:"integer",name:"allExecuted",uiSchema:{title:`{{t("Executed", { ns: "${O}" })}}`,type:"string"},defaultValue:0},{type:"integer",name:"successExecuted",defaultValue:0,uiSchema:{title:`{{t("Success executed", { ns: "${O}" })}}`,type:"string","x-component":"InputNumber"}},{type:"integer",name:"limitExecuted",defaultValue:0,uiSchema:{title:`{{t("Current times", { ns: "${O}" })}}`,type:"string","x-component":"InputNumber"}},{type:"boolean",name:"enabled",uiSchema:{title:'{{ t("Enabled") }}',type:"boolean","x-component":"Radio.Group",enum:[{label:'{{ t("On") }}',value:!0,color:"#52c41a"},{label:'{{ t("Off") }}',value:!1}]},defaultValue:!1},{name:"workflowKey",type:"string",interface:"select",uiSchema:{title:'{{ t("Workflow") }}',type:"string","x-component":"WorkflowSelect","x-component-props":{buttonAction:"customize:triggerWorkflows",noCollection:!0,label:"title",value:"key"}}}]},ye=()=>{const{i18n:e}=d.useApp();return{t:(r,o={})=>e.t(r,L({ns:O},o))}},ho=e=>d.tval(e,{ns:O});function ee(e){return d.i18n.t(e,{ns:O})}function xo(){return!0}const vo=R.observer(e=>{const s=e,{filter:t=xo}=s,r=Pe(s,["filter"]),o=d.useCompile(),{getCollectionFields:n}=d.useCollectionManager_deprecated(),{values:u}=R.useForm(),[i,c]=d.parseCollectionName(u==null?void 0:u.collection),l=n(c,i);return a.jsx(d.Select,G(L({popupMatchSelectWidth:!1},r),{options:l.filter(t).map(y=>{var b;return{label:o((b=y.uiSchema)==null?void 0:b.title),value:y.name}})}))},{displayName:"FieldsSelect"});function bo(e){return!e.hidden&&(e.uiSchema?e.type==="date":!1)}function je({value:e,onChange:t}){const r=e!=null?e:{},{t:o}=ye(),[n,u]=m.useState(r.offset?r.offset/Math.abs(r.offset):0);return a.jsxs("fieldset",{className:d.css`
|
|
2
|
+
display: flex;
|
|
3
|
+
gap: 0.5em;
|
|
4
|
+
`,children:[a.jsx(vo,{value:r.field,onChange:i=>t(G(L({},r),{field:i})),filter:bo,placeholder:o("Select field"),className:"auto-width"}),r.field?a.jsx(d.Select,{value:n,onChange:i=>{u(i),t(G(L({},r),{offset:Math.abs(r.offset)*i}))},options:[{value:0,label:ee("Exactly at")},{value:-1,label:o("Before")},{value:1,label:o("After")}],className:"auto-width"}):null,n?a.jsxs(a.Fragment,{children:[a.jsx(d.InputNumber,{value:Math.abs(r.offset),onChange:i=>t(G(L({},r),{offset:(i!=null?i:0)*n}))}),a.jsx(d.Select,{value:r.unit||864e5,onChange:i=>t(G(L({},r),{unit:i})),options:[{value:864e5,label:ee("Days")},{value:36e5,label:ee("Hours")},{value:6e4,label:ee("Minutes")},{value:1e3,label:ee("Seconds")}],className:"auto-width"})]}):null]})}function go({value:e,onChange:t}){const{t:r}=ye(),o=e!=null?typeof e=="object"&&!(e instanceof Date)?"field":"date":null;return a.jsxs("fieldset",{className:d.css`
|
|
5
|
+
display: flex;
|
|
6
|
+
gap: 0.5em;
|
|
7
|
+
`,children:[a.jsx(U.Select,{value:o,onChange:n=>{t(n?n==="field"?{}:new Date:null)},className:"auto-width",options:[{value:null,label:r("No end")},{value:"date",label:r("By custom date")}]}),o==="field"?a.jsx(je,{value:e,onChange:t}):null,o==="date"?a.jsx(U.DatePicker,{showTime:!0,value:me.dayjs(e),onChange:n=>{t(n?n.toDate():null)}}):null]})}var I=function(){return I=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},I.apply(this,arguments)};function Ve(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r}function fe(e,t,r){if(r||arguments.length===2)for(var o,n=0,u=t.length;n<u;n++)!o&&n in t||(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var wo=[{name:"@yearly",value:"0 0 1 1 *"},{name:"@annually",value:"0 0 1 1 *"},{name:"@monthly",value:"0 0 1 * *"},{name:"@weekly",value:"0 0 * * 0"},{name:"@daily",value:"0 0 * * *"},{name:"@midnight",value:"0 0 * * *"},{name:"@hourly",value:"0 * * * *"}],Q=[{type:"minutes",min:0,max:59,total:60},{type:"hours",min:0,max:23,total:24},{type:"month-days",min:1,max:31,total:31},{type:"months",min:1,max:12,total:12,alt:["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]},{type:"week-days",min:0,max:6,total:7,alt:["SUN","MON","TUE","WED","THU","FRI","SAT"]}],g={everyText:"every",emptyMonths:"every month",emptyMonthDays:"every day of the month",emptyMonthDaysShort:"day of the month",emptyWeekDays:"every day of the week",emptyWeekDaysShort:"day of the week",emptyHours:"every hour",emptyMinutes:"every minute",emptyMinutesForHourPeriod:"every",yearOption:"year",monthOption:"month",weekOption:"week",dayOption:"day",hourOption:"hour",minuteOption:"minute",rebootOption:"reboot",prefixPeriod:"Every",prefixMonths:"in",prefixMonthDays:"on",prefixWeekDays:"on",prefixWeekDaysForMonthAndYearPeriod:"and",prefixHours:"at",prefixMinutes:":",prefixMinutesForHourPeriod:"at",suffixMinutesForHourPeriod:"minute(s)",errorInvalidCron:"Invalid cron expression",clearButtonText:"Clear",weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],altWeekDays:["SUN","MON","TUE","WED","THU","FRI","SAT"],altMonths:["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"]};function Be(e,t){for(var r=[],o=e;o<=t;o++)r.push(o);return r}function he(e){return e.sort(function(t,r){return t-r}),e}function Ie(e){var t=[];return e.forEach(function(r){t.indexOf(r)<0&&t.push(r)}),t}function H(e){return Object.entries(e).filter(function(t){var r=t[0],o=t[1];return r&&o}).map(function(t){return t[0]}).join(" ")}function Je(e,t){e&&e({type:"invalid_cron",description:t.errorInvalidCron||g.errorInvalidCron})}function xe(e){var t=parseInt(e,10),r=Number(e);return t===r?r:NaN}function We(e,t,r,o,n,u,i,c,l,s,y,b,h,x){r&&r(void 0),t(!1);var p=!1;if(!e){if(o==="always"||u&&o==="for-default-value")return;p=!0}if(!p){if(c&&(c===!0||c.includes(e))){if(e==="@reboot")return void x("reboot");var k=wo.find(function(M){return M.name===e});k&&(e=k.value)}try{var A=function(M){if(typeof M!="string")throw new Error("Invalid cron string");var J=M.replace(/\s+/g," ").trim().split(" ");if(J.length===5)return J.map(function(te,ne){return function(z,P){if(z==="*"||z==="*/1")return[];var K=he(Ie(Ze(function(Z,T,q){if(q){Z=Z.toUpperCase();for(var f=0;f<q.length;f++)Z=Z.replace(q[f],"".concat(f+T))}return Z}(z,P.min,P.alt).split(",").map(function(Z){var T,q=Z.split("/");if(q.length>2)throw new Error('Invalid value "'.concat(z,' for "').concat(P.type,'"'));var f=q[0],w=q[1];T=f==="*"?Be(P.min,P.max):function(S,D,j){var V=S.split("-");if(V.length===1){var ce=xe(V[0]);if(isNaN(ce))throw new Error('Invalid value "'.concat(D,'" for ').concat(j.type));return[ce]}if(V.length===2){var Y=xe(V[0]),re=xe(V[1]);if(isNaN(Y)||isNaN(re))throw new Error('Invalid value "'.concat(D,'" for ').concat(j.type));if(re<Y)throw new Error('Max range is less than min range in "'.concat(S,'" for ').concat(j.type));return Be(Y,re)}throw new Error('Invalid value "'.concat(S,'" for ').concat(j.type))}(f,z,P);var C=function(S,D){if(S!==void 0){var j=xe(S);if(isNaN(j)||j<1)throw new Error('Invalid interval step value "'.concat(S,'" for ').concat(D.type));return j}}(w,P),W=function(S,D){if(D){var j=S[0];S=S.filter(function(V){return V%D==j%D||V===j})}return S}(T,C);return W}).flat(),P))),E=qe(K,P);if(E!==void 0)throw new Error('Value "'.concat(E,'" out of range for ').concat(P.type));return K.length===P.total?[]:K}(te,Q[ne])});throw new Error("Invalid cron string format")}(e),X=function(M){return M[3].length>0?"year":M[2].length>0?"month":M[4].length>0?"week":M[1].length>0?"day":M[0].length>0?"hour":"minute"}(A);x(X),l(A[0]),s(A[1]),y(A[2]),b(A[3]),h(A[4])}catch(M){p=!0}}p&&(n.current=e,t(!0),Je(r,i))}function Le(e,t,r,o,n,u,i){if(e==="reboot")return"@reboot";var c=function(l,s){return l.map(function(y,b){var h=Q[b];return He(ze(y,h),h,s)})}([e!=="minute"&&u?u:[],e!=="minute"&&e!=="hour"&&n?n:[],e!=="year"&&e!=="month"||!r?[]:r,e==="year"&&t?t:[],e!=="year"&&e!=="month"&&e!=="week"||!o?[]:o],i);return c.join(" ")}function He(e,t,r,o,n){var u="";if(function(c,l){return c.length===l.max-l.min+1}(e,t)||e.length===0)u="*";else{var i=function(c){if(c.length>2){var l=c[1]-c[0];if(l>1)return l}}(e);u=i&&function(c,l){for(var s=1;s<c.length;s++){var y=c[s-1];if(c[s]-y!==l)return!1}return!0}(e,i)?function(c,l,s){var y=Ue(c),b=Ke(c),h=c.length===(b-y)/s+1;return!!(y===l.min&&b+s>l.max&&h)}(e,t,i)?"*/".concat(i):"".concat(oe(Ue(e),t,r,o,n),"-").concat(oe(Ke(e),t,r,o,n),"/").concat(i):function(c){var l=[],s=null;return c.forEach(function(y,b,h){y!==h[b+1]-1?s!==null?(l.push([s,y]),s=null):l.push(y):s===null&&(s=y)}),l}(e).map(function(c){return Array.isArray(c)?"".concat(oe(c[0],t,r,o,n),"-").concat(oe(c[1],t,r,o,n)):oe(c,t,r,o,n)}).join(",")}return u}function oe(e,t,r,o,n){var u=e.toString(),i=t.type,c=t.alt,l=t.min,s=o&&(o===!0||o.includes(i)),y=n==="24-hour-clock"&&(i==="hours"||i==="minutes");if(r&&i==="week-days"||r&&i==="months"?u=c[e-l]:e<10&&(s||y)&&(u=u.padStart(2,"0")),i==="hours"&&n==="12-hour-clock"){var b=e>=12?"PM":"AM",h=e%12||12;h<10&&s&&(h=h.toString().padStart(2,"0")),u="".concat(h).concat(b)}return u}function ze(e,t){var r=he(Ie(Ze(e,t)));if(r.length===0)return r;var o=qe(r,t);if(o!==void 0)throw new Error('Value "'.concat(o,'" out of range for ').concat(t.type));return r}function Ze(e,t){return t.type==="week-days"&&(e=e.map(function(r){return r===7?0:r})),e}function qe(e,t){var r=e[0],o=e[e.length-1];return r<t.min?r:o>t.max?o:void 0}function Ue(e){return e[0]}function Ke(e){return e[e.length-1]}function le(e){var t=e.value,r=e.grid,o=r===void 0||r,n=e.optionsList,u=e.setValue,i=e.locale,c=e.className,l=e.humanizeLabels,s=e.disabled,y=e.readOnly,b=e.leadingZero,h=e.clockFormat,x=e.period,p=e.unit,k=e.periodicityOnDoubleClick,A=e.mode,X=Ve(e,["value","grid","optionsList","setValue","locale","className","humanizeLabels","disabled","readOnly","leadingZero","clockFormat","period","unit","periodicityOnDoubleClick","mode"]),M=m.useMemo(function(){if(t&&Array.isArray(t))return t.map(function(f){return f.toString()})},[t]),J=m.useMemo(function(){return n?n.map(function(f,w){return{value:(p.min===0?w:w+1).toString(),label:f}}):fe([],Array(p.total),!0).map(function(f,w){var C=p.min===0?w:w+1;return{value:C.toString(),label:oe(C,p,l,b,h)}})},[n,b,l,h]),te=JSON.stringify(i),ne=m.useCallback(function(f){var w=f.value;if(!t||t[0]!==Number(w))return a.jsx(a.Fragment,{});var C=He(ze(t,p),p,l,b,h),W=C.match(/^\*\/([0-9]+),?/)||[];return a.jsx("div",{children:W[1]?"".concat(i.everyText||g.everyText," ").concat(W[1]):C})},[t,te,l,b,h]),z=m.useCallback(function(f){var w=Array.isArray(f)?he(f):[f],C=w;t&&(C=A==="single"?[]:fe([],t,!0),w.forEach(function(W){var S=Number(W);C=t.some(function(D){return D===S})?C.filter(function(D){return D!==S}):he(fe(fe([],C,!0),[S],!1))})),C.length===p.total?u([]):u(C)},[u,t]),P=m.useCallback(function(f){if(f!==0&&f!==1){for(var w=p.total+p.min,C=[],W=p.min;W<w;W++)W%f==0&&C.push(W);var S=t&&C&&t.length===C.length&&t.every(function(j,V){return j===C[V]}),D=C.length===J.length;u(D||S?[]:C)}else u([])},[t,J,u]),K=m.useRef([]),E=m.useCallback(function(f){if(!y){var w=K.current;w.push({time:new Date().getTime(),value:Number(f)});var C=window.setTimeout(function(){k&&w.length>1&&w[w.length-1].time-w[w.length-2].time<300?w[w.length-1].value===w[w.length-2].value?P(Number(f)):z([w[w.length-2].value,w[w.length-1].value]):z(Number(f)),K.current=[]},300);return function(){window.clearTimeout(C)}}},[K,z,P,y,k]),Z=m.useCallback(function(){y||u([])},[u,y]),T=m.useMemo(function(){var f;return H(((f={"react-js-cron-select":!0,"react-js-cron-custom-select":!0})["".concat(c,"-select")]=!!c,f))},[c]),q=m.useMemo(function(){var f;return H(((f={"react-js-cron-select-dropdown":!0})["react-js-cron-select-dropdown-".concat(p.type)]=!0,f["react-js-cron-custom-select-dropdown"]=!0,f["react-js-cron-custom-select-dropdown-".concat(p.type)]=!0,f["react-js-cron-custom-select-dropdown-minutes-large"]=p.type==="minutes"&&x!=="hour"&&x!=="day",f["react-js-cron-custom-select-dropdown-minutes-medium"]=p.type==="minutes"&&(x==="day"||x==="hour"),f["react-js-cron-custom-select-dropdown-hours-twelve-hour-clock"]=p.type==="hours"&&h==="12-hour-clock",f["react-js-cron-custom-select-dropdown-grid"]=!!o,f["".concat(c,"-select-dropdown")]=!!c,f["".concat(c,"-select-dropdown-").concat(p.type)]=!!c,f))},[c,o,h,x]);return a.jsx(U.Select,I({mode:A!=="single"||k?"multiple":void 0,allowClear:!y,virtual:!1,open:!y&&void 0,value:M,onClear:Z,tagRender:ne,className:T,popupClassName:q,options:J,showSearch:!1,showArrow:!y,menuItemSelectedIcon:null,dropdownMatchSelectWidth:!1,onSelect:E,onDeselect:E,disabled:s,dropdownAlign:p.type!=="minutes"&&p.type!=="hours"||x==="day"||x==="hour"?void 0:{points:["tr","br"]},"data-testid":"custom-select-".concat(p.type)},X))}function ko(e){var t=e.value,r=e.setValue,o=e.locale,n=e.className,u=e.disabled,i=e.readOnly,c=e.leadingZero,l=e.clockFormat,s=e.period,y=e.periodicityOnDoubleClick,b=e.mode,h=m.useMemo(function(){var x;return H(((x={"react-js-cron-field":!0,"react-js-cron-hours":!0})["".concat(n,"-field")]=!!n,x["".concat(n,"-hours")]=!!n,x))},[n]);return a.jsxs("div",I({className:h},{children:[o.prefixHours!==""&&a.jsx("span",{children:o.prefixHours||g.prefixHours}),a.jsx(le,{placeholder:o.emptyHours||g.emptyHours,value:t,unit:Q[1],setValue:r,locale:o,className:n,disabled:u,readOnly:i,leadingZero:c,clockFormat:l,period:s,periodicityOnDoubleClick:y,mode:b})]}))}function Co(e){var t=e.value,r=e.setValue,o=e.locale,n=e.className,u=e.disabled,i=e.readOnly,c=e.leadingZero,l=e.clockFormat,s=e.period,y=e.periodicityOnDoubleClick,b=e.mode,h=m.useMemo(function(){var x;return H(((x={"react-js-cron-field":!0,"react-js-cron-minutes":!0})["".concat(n,"-field")]=!!n,x["".concat(n,"-minutes")]=!!n,x))},[n]);return a.jsxs("div",I({className:h},{children:[s==="hour"?o.prefixMinutesForHourPeriod!==""&&a.jsx("span",{children:o.prefixMinutesForHourPeriod||g.prefixMinutesForHourPeriod}):o.prefixMinutes!==""&&a.jsx("span",{children:o.prefixMinutes||g.prefixMinutes}),a.jsx(le,{placeholder:s==="hour"?o.emptyMinutesForHourPeriod||g.emptyMinutesForHourPeriod:o.emptyMinutes||g.emptyMinutes,value:t,unit:Q[0],setValue:r,locale:o,className:n,disabled:u,readOnly:i,leadingZero:c,clockFormat:l,period:s,periodicityOnDoubleClick:y,mode:b}),s==="hour"&&o.suffixMinutesForHourPeriod!==""&&a.jsx("span",{children:o.suffixMinutesForHourPeriod||g.suffixMinutesForHourPeriod})]}))}function Oo(e){var t=e.value,r=e.setValue,o=e.locale,n=e.className,u=e.weekDays,i=e.disabled,c=e.readOnly,l=e.leadingZero,s=e.period,y=e.periodicityOnDoubleClick,b=e.mode,h=!u||u.length===0,x=m.useMemo(function(){var A;return H(((A={"react-js-cron-field":!0,"react-js-cron-month-days":!0,"react-js-cron-month-days-placeholder":!h})["".concat(n,"-field")]=!!n,A["".concat(n,"-month-days")]=!!n,A))},[n,h]),p=JSON.stringify(o),k=m.useMemo(function(){return h?o.emptyMonthDays||g.emptyMonthDays:o.emptyMonthDaysShort||g.emptyMonthDaysShort},[h,p]);return!c||t&&t.length>0||(!t||t.length===0)&&(!u||u.length===0)?a.jsxs("div",I({className:x},{children:[o.prefixMonthDays!==""&&a.jsx("span",{children:o.prefixMonthDays||g.prefixMonthDays}),a.jsx(le,{placeholder:k,value:t,setValue:r,unit:Q[2],locale:o,className:n,disabled:i,readOnly:c,leadingZero:l,period:s,periodicityOnDoubleClick:y,mode:b})]})):null}function So(e){var t=e.value,r=e.setValue,o=e.locale,n=e.className,u=e.humanizeLabels,i=e.disabled,c=e.readOnly,l=e.period,s=e.periodicityOnDoubleClick,y=e.mode,b=o.months||g.months,h=m.useMemo(function(){var x;return H(((x={"react-js-cron-field":!0,"react-js-cron-months":!0})["".concat(n,"-field")]=!!n,x["".concat(n,"-months")]=!!n,x))},[n]);return a.jsxs("div",I({className:h},{children:[o.prefixMonths!==""&&a.jsx("span",{children:o.prefixMonths||g.prefixMonths}),a.jsx(le,{placeholder:o.emptyMonths||g.emptyMonths,optionsList:b,grid:!1,value:t,unit:I(I({},Q[3]),{alt:o.altMonths||g.altMonths}),setValue:r,locale:o,className:n,humanizeLabels:u,disabled:i,readOnly:c,period:l,periodicityOnDoubleClick:s,mode:y})]}))}function Do(e){var t=e.value,r=e.setValue,o=e.locale,n=e.className,u=e.disabled,i=e.readOnly,c=e.shortcuts,l=e.allowedPeriods,s=[];l.includes("year")&&s.push({value:"year",label:o.yearOption||g.yearOption}),l.includes("month")&&s.push({value:"month",label:o.monthOption||g.monthOption}),l.includes("week")&&s.push({value:"week",label:o.weekOption||g.weekOption}),l.includes("day")&&s.push({value:"day",label:o.dayOption||g.dayOption}),l.includes("hour")&&s.push({value:"hour",label:o.hourOption||g.hourOption}),l.includes("minute")&&s.push({value:"minute",label:o.minuteOption||g.minuteOption}),l.includes("reboot")&&c&&(c===!0||c.includes("@reboot"))&&s.push({value:"reboot",label:o.rebootOption||g.rebootOption});var y=m.useCallback(function(p){i||r(p)},[r,i]),b=m.useMemo(function(){var p;return H(((p={"react-js-cron-field":!0,"react-js-cron-period":!0})["".concat(n,"-field")]=!!n,p["".concat(n,"-period")]=!!n,p))},[n]),h=m.useMemo(function(){var p;return H(((p={"react-js-cron-select":!0,"react-js-cron-select-no-prefix":o.prefixPeriod===""})["".concat(n,"-select")]=!!n,p))},[n,o.prefixPeriod]),x=m.useMemo(function(){var p;return H(((p={"react-js-cron-select-dropdown":!0,"react-js-cron-select-dropdown-period":!0})["".concat(n,"-select-dropdown")]=!!n,p["".concat(n,"-select-dropdown-period")]=!!n,p))},[n]);return a.jsxs("div",I({className:b},{children:[o.prefixPeriod!==""&&a.jsx("span",{children:o.prefixPeriod||g.prefixPeriod}),a.jsx(U.Select,{defaultValue:t,value:t,onChange:y,options:s,className:h,popupClassName:x,disabled:u,showArrow:!i,open:!i&&void 0,"data-testid":"select-period"},JSON.stringify(o))]}))}function No(e){var t=e.value,r=e.setValue,o=e.locale,n=e.className,u=e.humanizeLabels,i=e.monthDays,c=e.disabled,l=e.readOnly,s=e.period,y=e.periodicityOnDoubleClick,b=e.mode,h=o.weekDays||g.weekDays,x=s==="week"||!i||i.length===0,p=m.useMemo(function(){var J;return H(((J={"react-js-cron-field":!0,"react-js-cron-week-days":!0,"react-js-cron-week-days-placeholder":!x})["".concat(n,"-field")]=!!n,J["".concat(n,"-week-days")]=!!n,J))},[n,x]),k=JSON.stringify(o),A=m.useMemo(function(){return x?o.emptyWeekDays||g.emptyWeekDays:o.emptyWeekDaysShort||g.emptyWeekDaysShort},[x,k]),X=s==="week"||!l||t&&t.length>0||(!t||t.length===0)&&(!i||i.length===0),M=!l||i&&i.length>0||(!i||i.length===0)&&(!t||t.length===0);return X?a.jsxs("div",I({className:p},{children:[o.prefixWeekDays!==""&&(s==="week"||!M)&&a.jsx("span",{children:o.prefixWeekDays||g.prefixWeekDays}),o.prefixWeekDaysForMonthAndYearPeriod!==""&&s!=="week"&&M&&a.jsx("span",{children:o.prefixWeekDaysForMonthAndYearPeriod||g.prefixWeekDaysForMonthAndYearPeriod}),a.jsx(le,{placeholder:A,optionsList:h,grid:!1,value:t,unit:I(I({},Q[4]),{alt:o.altWeekDays||g.altWeekDays}),setValue:r,locale:o,className:n,humanizeLabels:u,disabled:c,readOnly:l,period:s,periodicityOnDoubleClick:y,mode:b})]})):null}function Mo(e){var t=e.clearButton,r=t===void 0||t,o=e.clearButtonProps,n=o===void 0?{}:o,u=e.clearButtonAction,i=u===void 0?"fill-with-every":u,c=e.locale,l=c===void 0?g:c,s=e.value,y=s===void 0?"":s,b=e.setValue,h=e.displayError,x=h===void 0||h,p=e.onError,k=e.className,A=e.defaultPeriod,X=A===void 0?"day":A,M=e.allowEmpty,J=M===void 0?"for-default-value":M,te=e.humanizeLabels,ne=te===void 0||te,z=e.humanizeValue,P=z!==void 0&&z,K=e.disabled,E=K!==void 0&&K,Z=e.readOnly,T=Z!==void 0&&Z,q=e.leadingZero,f=q!==void 0&&q,w=e.shortcuts,C=w===void 0?["@yearly","@annually","@monthly","@weekly","@daily","@midnight","@hourly"]:w,W=e.clockFormat,S=e.periodicityOnDoubleClick,D=S===void 0||S,j=e.mode,V=j===void 0?"multiple":j,ce=e.allowedDropdowns,Y=ce===void 0?["period","months","month-days","week-days","hours","minutes"]:ce,re=e.allowedPeriods,Wo=re===void 0?["year","month","week","day","hour","minute","reboot"]:re,ae=m.useRef(y),Ae=m.useRef(X),Qe=m.useState(),_=Qe[0],ve=Qe[1],Xe=m.useState(),se=Xe[0],be=Xe[1],Re=m.useState(),ge=Re[0],we=Re[1],eo=m.useState(),ue=eo[0],ke=eo[1],oo=m.useState(),Ce=oo[0],Oe=oo[1],to=m.useState(),Se=to[0],De=to[1],no=m.useState(!1),Te=no[0],pe=no[1],ro=m.useState(!1),Ne=ro[0],ao=ro[1],Lo=function(N){var $=m.useRef(N);return m.useEffect(function(){$.current=N},[N]),$.current}(Ne),io=JSON.stringify(l);m.useEffect(function(){We(y,pe,p,J,ae,!0,l,C,De,Oe,be,we,ke,ve)},[]),m.useEffect(function(){y!==ae.current&&We(y,pe,p,J,ae,!1,l,C,De,Oe,be,we,ke,ve)},[y,ae,io,J,C]),m.useEffect(function(){if(!(_||Se||ge||se||ue||Ce)||Ne||Lo)Ne&&ao(!1);else{var N=_||Ae.current,$=Le(N,ge,se,ue,Ce,Se,P);b($,{selectedPeriod:N}),ae.current=$,p&&p(void 0),pe(!1)}},[_,se,ge,ue,Ce,Se,P,Ne]);var lo=m.useCallback(function(){be(void 0),we(void 0),ke(void 0),Oe(void 0),De(void 0);var N="",$=_!=="reboot"&&_?_:Ae.current;$!==_&&ve($),i==="fill-with-every"&&(N=Le($,void 0,void 0,void 0,void 0,void 0)),b(N,{selectedPeriod:$}),ae.current=N,ao(!0),J==="never"&&i==="empty"?(pe(!0),Je(p,l)):(p&&p(void 0),pe(!1))},[_,b,p,i]),Ho=m.useMemo(function(){var N;return H(((N={"react-js-cron":!0,"react-js-cron-error":Te&&x,"react-js-cron-disabled":E,"react-js-cron-read-only":T})["".concat(k)]=!!k,N["".concat(k,"-error")]=Te&&x&&!!k,N["".concat(k,"-disabled")]=E&&!!k,N["".concat(k,"-read-only")]=T&&!!k,N))},[k,Te,x,E,T]),Fe=n.className,co=Ve(n,["className"]),so=m.useMemo(function(){var N;return H(((N={"react-js-cron-clear-button":!0})["".concat(k,"-clear-button")]=!!k,N["".concat(Fe)]=!!Fe,N))},[k,Fe]),zo=JSON.stringify(co),uo=m.useMemo(function(){return r&&!T?a.jsx(U.Button,I({className:so,danger:!0,type:"primary",disabled:E},co,{onClick:lo},{children:l.clearButtonText||g.clearButtonText})):null},[r,T,io,so,E,zo,lo]),B=_||Ae.current;return a.jsxs("div",I({className:Ho},{children:[Y.includes("period")&&a.jsx(Do,{value:B,setValue:ve,locale:l,className:k,disabled:E,readOnly:T,shortcuts:C,allowedPeriods:Wo}),B==="reboot"?uo:a.jsxs(a.Fragment,{children:[B==="year"&&Y.includes("months")&&a.jsx(So,{value:ge,setValue:we,locale:l,className:k,humanizeLabels:ne,disabled:E,readOnly:T,period:B,periodicityOnDoubleClick:D,mode:V}),(B==="year"||B==="month")&&Y.includes("month-days")&&a.jsx(Oo,{value:se,setValue:be,locale:l,className:k,weekDays:ue,disabled:E,readOnly:T,leadingZero:f,period:B,periodicityOnDoubleClick:D,mode:V}),(B==="year"||B==="month"||B==="week")&&Y.includes("week-days")&&a.jsx(No,{value:ue,setValue:ke,locale:l,className:k,humanizeLabels:ne,monthDays:se,disabled:E,readOnly:T,period:B,periodicityOnDoubleClick:D,mode:V}),a.jsxs("div",{children:[B!=="minute"&&B!=="hour"&&Y.includes("hours")&&a.jsx(ko,{value:Ce,setValue:Oe,locale:l,className:k,disabled:E,readOnly:T,leadingZero:f,clockFormat:W,period:B,periodicityOnDoubleClick:D,mode:V}),B!=="minute"&&Y.includes("minutes")&&a.jsx(Co,{value:Se,setValue:De,locale:l,period:B,className:k,disabled:E,readOnly:T,leadingZero:f,clockFormat:W,periodicityOnDoubleClick:D,mode:V}),uo]})]})]}))}const Ao={"zh-CN":{everyText:"每",emptyMonths:"每月",emptyMonthDays:"每日(月)",emptyMonthDaysShort:"每日",emptyWeekDays:"每天(周)",emptyWeekDaysShort:"每天(周)",emptyHours:"每小时",emptyMinutes:"每分钟",emptyMinutesForHourPeriod:"每",yearOption:"年",monthOption:"月",weekOption:"周",dayOption:"天",hourOption:"小时",minuteOption:"分钟",rebootOption:"重启",prefixPeriod:"每",prefixMonths:"的",prefixMonthDays:"的",prefixWeekDays:"的",prefixWeekDaysForMonthAndYearPeriod:"或者",prefixHours:"的",prefixMinutes:":",prefixMinutesForHourPeriod:"的",suffixMinutesForHourPeriod:"分钟",errorInvalidCron:"不符合 cron 规则的表达式",clearButtonText:"清空",weekDays:["周日","周一","周二","周三","周四","周五","周六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],altWeekDays:["周日","周一","周二","周三","周四","周五","周六"],altMonths:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]}},Ye=[{value:"none",text:"No repeat"},{value:6e4,text:"By minute",unitText:"Minutes"},{value:36e5,text:"By hour",unitText:"Hours"},{value:864e5,text:"By day",unitText:"Days"},{value:6048e5,text:"By week",unitText:"Weeks"},{value:"cron",text:"Advanced"}];function $e(e){return Ye.filter(r=>!isNaN(+r.value)).reverse().find(r=>!(e%r.value))}function To(e){if(!e)return"none";if(e&&!isNaN(+e)){const t=$e(e);return t?t.value:"none"}if(typeof e=="string")return"cron"}function Fo({value:e,onChange:t}){const{t:r}=ye(),o=$e(e);return a.jsx(U.InputNumber,{value:e/o.value,onChange:n=>t(n*o.value),min:1,addonBefore:r("Every"),addonAfter:r(o.unitText),className:"auto-width"})}function Po({value:e=null,onChange:t}){const{t:r}=ye(),o=To(e),n=m.useCallback(i=>{if(i==="none"){t(null);return}if(i==="cron"){t("0 * * * * *");return}t(i)},[t]),u=Ao[localStorage.getItem("TACHYBASE_LOCALE")||"en-US"];return a.jsxs("fieldset",{className:d.css`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: ${o==="cron"?"column":"row"};
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
gap: 0.5em;
|
|
12
|
+
|
|
13
|
+
.react-js-cron {
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding: 0.5em 0.5em 0 0.5em;
|
|
16
|
+
border: 1px dashed #ccc;
|
|
17
|
+
|
|
18
|
+
.react-js-cron-field {
|
|
19
|
+
margin-bottom: 0.5em;
|
|
20
|
+
|
|
21
|
+
> span {
|
|
22
|
+
margin: 0 0.5em 0 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
> .react-js-cron-select {
|
|
26
|
+
margin: 0 0.5em 0 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.react-js-cron-week-days {
|
|
31
|
+
> span {
|
|
32
|
+
min-width: 2em;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`,children:[a.jsx(U.Select,{value:o,onChange:n,className:"auto-width",options:Ye.map(i=>({value:i.value,label:r(i.text)}))}),o&&!isNaN(+o)?a.jsx(Fo,{value:e,onChange:t}):null,o==="cron"?a.jsx(Mo,{value:e.trim().split(/\s+/).slice(1).join(" "),setValue:i=>t(`0 ${i}`),clearButton:!1,locale:u}):null]})}const _e={name:{type:"string","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"cronJobs.name","x-component-props":{}},enabled:{type:"boolean","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"cronJobs.enabled","x-component-props":{}},description:{type:"string","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"cronJobs.description","x-component-props":{}},workflowKey:{type:"string","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"cronJobs.workflowKey"},startsOn:{type:"DateTime","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"cronJobs.startsOn","x-component-props":{}},repeat:{type:"string","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"cronJobs.repeat","x-component-props":{},"x-reactions":[{target:"endsOn",fulfill:{state:{visible:"{{!!$self.value}}"}}},{target:"limit",fulfill:{state:{visible:"{{!!$self.value}}"}}}]},endsOn:{type:"DateTime","x-component":"EndsByField","x-decorator":"FormItem","x-collection-field":"cronJobs.endsOn","x-component-props":{}},limit:{type:"number","x-component":"CollectionField","x-decorator":"FormItem","x-collection-field":"cronJobs.limit","x-component-props":{}}},Eo={type:"void","x-acl-action-props":{skipScopeCheck:!0},"x-acl-action":"cronJobs:create","x-decorator":"FormBlockProvider","x-use-decorator-props":"useCreateFormBlockDecoratorProps","x-decorator-props":{dataSource:"main",collection:"cronJobs"},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useCreateFormBlockProps",properties:L({actionBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--tb-spacing)"}},properties:{submit:{title:'{{t("Submit")}}',"x-action":"submit","x-component":"Action","x-use-component-props":"useCreateActionProps","x-component-props":{type:"primary",htmlType:"submit"},type:"void"}}}},_e)}}},jo={type:"void","x-action":"create","x-acl-action":"create",title:"{{t('Add new')}}","x-component":"Action","x-decorator":"ACLActionProvider","x-component-props":{openMode:"drawer",type:"primary",component:"CreateRecordAction",icon:"PlusOutlined"},"x-align":"right","x-acl-action-props":{skipScopeCheck:!0},properties:{drawer:{type:"void",title:'{{ t("Add record") }}',"x-component":"Action.Container","x-component-props":{className:"tb-action-popup"},properties:{form:Eo}}}},Vo={type:"void",title:'{{ t("Edit") }}',"x-action":"update","x-component":"Action.Link","x-component-props":{openMode:"drawer",icon:"EditOutlined"},"x-decorator":"ACLActionProvider",properties:{drawer:{type:"void",title:'{{ t("Edit record") }}',"x-component":"Action.Container","x-component-props":{className:"tb-action-popup"},properties:{card:{type:"void","x-acl-action-props":{skipScopeCheck:!1},"x-acl-action":"cronJobs:update","x-decorator":"FormBlockProvider","x-use-decorator-props":"useEditFormBlockDecoratorProps","x-decorator-props":{action:"get",dataSource:"main",collection:"cronJobs"},"x-component":"CardItem",properties:{form:{type:"void","x-component":"FormV2","x-use-component-props":"useEditFormBlockProps",properties:L({actionBar:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--tb-spacing)"}},properties:{submit:{title:'{{ t("Submit") }}',"x-action":"submit","x-component":"Action","x-use-component-props":"useUpdateActionProps","x-component-props":{type:"primary",htmlType:"submit"},"x-action-settings":{triggerWorkflows:[],onSuccess:{manualClose:!1,redirecting:!1,successMessage:'{{t("Updated successfully")}}'},isDeltaChanged:!1},type:"void"}}}},_e)}}}}}}},Bo={type:"void",properties:{table:{type:"void","x-decorator":"TableBlockProvider","x-acl-action":"cronJobs:list","x-use-decorator-props":"useTableBlockDecoratorProps","x-decorator-props":{collection:"cronJobs",dataSource:"main",action:"list",params:{pageSize:20},rowKey:"id",showIndex:!0,dragSort:!1},"x-component":"CardItem","x-filter-targets":[],properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{style:{marginBottom:"var(--tb-spacing)"}},properties:{refresh:{type:"void",title:'{{ t("Refresh") }}',"x-action":"refresh","x-component":"Action","x-settings":"actionSettings:refresh","x-component-props":{icon:"ReloadOutlined"},"x-use-component-props":"useRefreshActionProps"},create:jo}},table:{type:"array","x-component":"TableV2","x-use-component-props":"useTableBlockProps","x-component-props":{rowKey:"id",rowSelection:{type:"checkbox"}},properties:{name:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{name:{"x-collection-field":"cronJobs.name","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0,"x-decorator":null,"x-decorator-props":{labelStyle:{display:"none"}}}}},enabled:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{enabled:{"x-collection-field":"cronJobs.enabled","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0,"x-decorator":null,"x-decorator-props":{labelStyle:{display:"none"}}}}},workflowKeyColumn:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:20},properties:{workflowKey:{"x-collection-field":"cronJobs.workflowKey","x-component":"CollectionField","x-read-pretty":!0,"x-decorator":"OpenDrawer","x-decorator-props":{component:function({children:t,onClick:r}){const o=d.useCollectionRecordData();return a.jsxs(U.Space,{size:"small",children:[t,o.workflowKey?a.jsxs(U.Button,{type:"link",onClick:r,style:{padding:0,marginLeft:"-4px"},children:["(",ee("View executions"),")"]}):null]})}},properties:{drawer:F.executionSchema}}}},lastTime:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:20},properties:{lastTime:{"x-collection-field":"cronJobs.lastTime","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0,"x-decorator":null,"x-decorator-props":{labelStyle:{display:"none"}}}}},nextTime:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column",properties:{nextTime:{"x-collection-field":"cronJobs.nextTime","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0,"x-decorator":null,"x-decorator-props":{labelStyle:{display:"none"}}}}},allExecuted:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:20},properties:{allExecuted:{"x-collection-field":"cronJobs.allExecuted","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0,"x-decorator":null,"x-decorator-props":{labelStyle:{display:"none"}}}}},limit:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:20},properties:{limit:{"x-collection-field":"cronJobs.limit","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0,"x-decorator":null,"x-decorator-props":{labelStyle:{display:"none"}}}}},limitExecuted:{type:"void","x-decorator":"TableV2.Column.Decorator","x-component":"TableV2.Column","x-component-props":{width:20},properties:{limitExecuted:{"x-collection-field":"cronJobs.limitExecuted","x-component":"CollectionField","x-component-props":{ellipsis:!0},"x-read-pretty":!0,"x-decorator":null,"x-decorator-props":{labelStyle:{display:"none"}}}}},actions:{type:"void",title:'{{ t("Actions") }}',"x-action-column":"actions","x-decorator":"TableV2.Column.ActionBar","x-component":"TableV2.Column","x-component-props":{width:100,fixed:"right"},properties:{actions:{type:"void","x-component":"Space",properties:{editAction:Vo,delete:{type:"void",title:"Delete","x-action":"destroy","x-component":"Action.Link","x-component-props":{confirm:{title:"Delete",content:"Are you sure you want to delete it?"}},"x-decorator":"ACLActionProvider","x-use-component-props":"useDestroyActionProps"},clear:{type:"void",title:ho("Clear current times"),"x-action":"clearLimit","x-component":"Action.Link","x-component-props":{confirm:{title:"Clear",content:"Are you sure you want to clear current times?"}},"x-decorator":"ACLActionProvider","x-use-component-props":()=>{const{refresh:e}=d.useDataBlockRequest(),t=d.useDataBlockResource(),r=d.useRecord();return{onClick(){return de(this,null,function*(){yield t.clearLimitExecuted({id:r.id}),e()})}}}}}}}}}}}}}},Io=o=>{var n=o,{params:e,filter:t={}}=n,r=Pe(n,["params","filter"]);const u=d.useCollectionRecordData(),i=G(L({},r),{params:G(L({},e),{filter:G(L({},e==null?void 0:e.filter),{key:u.workflowKey})})});return a.jsx(d.TableBlockProvider,L({},i))},Jo=()=>a.jsx(d.ExtendCollectionsProvider,{collections:[fo],children:a.jsx(d.SchemaComponent,{schema:Bo,name:"cron-jobs-table",components:{OnField:je,RepeatField:Po,EndsByField:go,ExecutionResourceProvider:Io,ExecutionLink:F.ExecutionLink,ExecutionStatusColumn:F.ExecutionStatusColumn,ExecutionTime:F.ExecutionTime,OpenDrawer:F.OpenDrawer}})});class Ge extends d.Plugin{afterAdd(){return de(this,null,function*(){})}beforeLoad(){return de(this,null,function*(){})}load(){return de(this,null,function*(){this.app.systemSettingsManager.add("system-services."+O,{title:this.t("Cron job"),icon:"ScheduleOutlined",Component:Jo,sort:-15})})}}v.ModuleCronJobClient=Ge,v.default=Ge,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var cronJobs_exports = {};
|
|
19
|
+
__export(cronJobs_exports, {
|
|
20
|
+
default: () => cronJobs_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(cronJobs_exports);
|
|
23
|
+
var import_constants = require("../constants");
|
|
24
|
+
var cronJobs_default = {
|
|
25
|
+
dumpRules: {
|
|
26
|
+
group: "required"
|
|
27
|
+
},
|
|
28
|
+
name: import_constants.DATABASE_CRON_JOBS,
|
|
29
|
+
shared: true,
|
|
30
|
+
createdAt: true,
|
|
31
|
+
updatedAt: true,
|
|
32
|
+
createdBy: true,
|
|
33
|
+
updatedBy: true,
|
|
34
|
+
model: "CronJobModel",
|
|
35
|
+
fields: [
|
|
36
|
+
{
|
|
37
|
+
type: "bigInt",
|
|
38
|
+
name: "id",
|
|
39
|
+
primaryKey: true,
|
|
40
|
+
autoIncrement: true
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: "string",
|
|
44
|
+
name: "name",
|
|
45
|
+
required: true,
|
|
46
|
+
uiSchema: {
|
|
47
|
+
title: '{{ t("Name") }}',
|
|
48
|
+
type: "string",
|
|
49
|
+
"x-component": "Input",
|
|
50
|
+
required: true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: "string",
|
|
55
|
+
name: "description",
|
|
56
|
+
uiSchema: {
|
|
57
|
+
title: '{{ t("Description") }}',
|
|
58
|
+
type: "string",
|
|
59
|
+
"x-component": "Input.TextArea"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: "date",
|
|
64
|
+
name: "startsOn",
|
|
65
|
+
required: true,
|
|
66
|
+
uiSchema: {
|
|
67
|
+
title: `{{t("Starts on", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
68
|
+
type: "datetime",
|
|
69
|
+
"x-component": "DatePicker",
|
|
70
|
+
"x-component-props": {
|
|
71
|
+
showTime: true
|
|
72
|
+
},
|
|
73
|
+
required: true
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: "integer",
|
|
78
|
+
name: "mode",
|
|
79
|
+
required: true,
|
|
80
|
+
defaultValue: import_constants.SCHEDULE_MODE.STATIC
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: "date",
|
|
84
|
+
name: "endsOn",
|
|
85
|
+
uiSchema: {
|
|
86
|
+
title: `{{t("Ends on", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
87
|
+
type: "datetime",
|
|
88
|
+
"x-component": "DatePicker",
|
|
89
|
+
"x-component-props": {
|
|
90
|
+
showTime: true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: "date",
|
|
96
|
+
name: "lastTime",
|
|
97
|
+
uiSchema: {
|
|
98
|
+
title: `{{t("Last time", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
99
|
+
type: "datetime",
|
|
100
|
+
"x-component": "DatePicker",
|
|
101
|
+
"x-component-props": {
|
|
102
|
+
showTime: true
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
type: "virtual",
|
|
108
|
+
name: "nextTime",
|
|
109
|
+
uiSchema: {
|
|
110
|
+
title: `{{t("Next time", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
111
|
+
type: "datetime",
|
|
112
|
+
"x-component": "DatePicker",
|
|
113
|
+
"x-component-props": {
|
|
114
|
+
showTime: true
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: "string",
|
|
120
|
+
name: "repeat",
|
|
121
|
+
required: true,
|
|
122
|
+
uiSchema: {
|
|
123
|
+
title: `{{t("Repeat mode", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
124
|
+
type: "string",
|
|
125
|
+
"x-component": "RepeatField"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: "integer",
|
|
130
|
+
name: "limit",
|
|
131
|
+
uiSchema: {
|
|
132
|
+
title: `{{t("Current limit", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
133
|
+
type: "number",
|
|
134
|
+
"x-component": "InputNumber"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
// 总执行次数,不可清空
|
|
138
|
+
{
|
|
139
|
+
type: "integer",
|
|
140
|
+
name: "allExecuted",
|
|
141
|
+
uiSchema: {
|
|
142
|
+
title: `{{t("Executed", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
143
|
+
type: "string"
|
|
144
|
+
},
|
|
145
|
+
defaultValue: 0
|
|
146
|
+
},
|
|
147
|
+
// 总执行成功次数,不可清空
|
|
148
|
+
{
|
|
149
|
+
type: "integer",
|
|
150
|
+
name: "successExecuted",
|
|
151
|
+
defaultValue: 0,
|
|
152
|
+
uiSchema: {
|
|
153
|
+
title: `{{t("Success executed", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
154
|
+
type: "string",
|
|
155
|
+
"x-component": "InputNumber"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
// 总执行次数,可清空, 用于限制执行循环次数
|
|
159
|
+
{
|
|
160
|
+
type: "integer",
|
|
161
|
+
name: "limitExecuted",
|
|
162
|
+
defaultValue: 0,
|
|
163
|
+
uiSchema: {
|
|
164
|
+
title: `{{t("Current times", { ns: "${import_constants.NAMESPACE}" })}}`,
|
|
165
|
+
type: "string",
|
|
166
|
+
"x-component": "InputNumber"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: "boolean",
|
|
171
|
+
name: "enabled",
|
|
172
|
+
uiSchema: {
|
|
173
|
+
title: '{{ t("Enabled") }}',
|
|
174
|
+
type: "boolean",
|
|
175
|
+
"x-component": "Radio.Group",
|
|
176
|
+
enum: [
|
|
177
|
+
{ label: '{{ t("On") }}', value: true, color: "#52c41a" },
|
|
178
|
+
{ label: '{{ t("Off") }}', value: false }
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
defaultValue: false
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "workflowKey",
|
|
185
|
+
type: "string",
|
|
186
|
+
interface: "select",
|
|
187
|
+
uiSchema: {
|
|
188
|
+
title: '{{ t("Workflow") }}',
|
|
189
|
+
type: "string",
|
|
190
|
+
"x-component": "WorkflowSelect",
|
|
191
|
+
"x-component-props": {
|
|
192
|
+
buttonAction: "customize:triggerWorkflows",
|
|
193
|
+
noCollection: true,
|
|
194
|
+
label: "title",
|
|
195
|
+
value: "key"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var constants_exports = {};
|
|
19
|
+
__export(constants_exports, {
|
|
20
|
+
DATABASE_CRON_JOBS: () => DATABASE_CRON_JOBS,
|
|
21
|
+
NAMESPACE: () => NAMESPACE,
|
|
22
|
+
SCHEDULE_MODE: () => SCHEDULE_MODE
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(constants_exports);
|
|
25
|
+
const NAMESPACE = "cron";
|
|
26
|
+
const DATABASE_CRON_JOBS = "cronJobs";
|
|
27
|
+
var SCHEDULE_MODE = /* @__PURE__ */ ((SCHEDULE_MODE2) => {
|
|
28
|
+
SCHEDULE_MODE2[SCHEDULE_MODE2["STATIC"] = 0] = "STATIC";
|
|
29
|
+
SCHEDULE_MODE2[SCHEDULE_MODE2["DATE_FIELD"] = 1] = "DATE_FIELD";
|
|
30
|
+
return SCHEDULE_MODE2;
|
|
31
|
+
})(SCHEDULE_MODE || {});
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
DATABASE_CRON_JOBS,
|
|
35
|
+
NAMESPACE,
|
|
36
|
+
SCHEDULE_MODE
|
|
37
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"@tachybase/client": "0.23.8",
|
|
3
|
+
"@tachybase/database": "0.23.8",
|
|
4
|
+
"@tachybase/server": "0.23.8",
|
|
5
|
+
"react": "18.3.1",
|
|
6
|
+
"@tachybase/utils": "0.23.8",
|
|
7
|
+
"antd": "5.22.5",
|
|
8
|
+
"@tachybase/schema": "0.23.8",
|
|
9
|
+
"@tachybase/module-workflow": "0.23.8",
|
|
10
|
+
"@tachybase/actions": "0.23.8"
|
|
11
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var src_exports = {};
|
|
30
|
+
__export(src_exports, {
|
|
31
|
+
default: () => import_server.default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
|
34
|
+
__reExport(src_exports, require("./server"), module.exports);
|
|
35
|
+
var import_server = __toESM(require("./server"));
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
...require("./server")
|
|
39
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Advanced": "Advanced",
|
|
3
|
+
"Are you sure you want to clear current times?": "Are you sure you want to clear current times?",
|
|
4
|
+
"By custom date": "By custom date",
|
|
5
|
+
"By day": "By day",
|
|
6
|
+
"By field": "By field",
|
|
7
|
+
"By hour": "By hour",
|
|
8
|
+
"By minute": "By minute",
|
|
9
|
+
"By month": "By month",
|
|
10
|
+
"By week": "By week",
|
|
11
|
+
"Clear current times": "Clear current times",
|
|
12
|
+
"Cron job": "Cron job",
|
|
13
|
+
"Current limit": "Current limit",
|
|
14
|
+
"Current times": "Current times",
|
|
15
|
+
"Days": "Days",
|
|
16
|
+
"End": "End",
|
|
17
|
+
"Ends on": "Ends on",
|
|
18
|
+
"Every": "Every",
|
|
19
|
+
"Exactly at": "Exactly at",
|
|
20
|
+
"Executed": "Executed",
|
|
21
|
+
"Hours": "Hours",
|
|
22
|
+
"Last time": "Last time",
|
|
23
|
+
"Minutes": "Minutes",
|
|
24
|
+
"Months": "Months",
|
|
25
|
+
"Next time": "Next time",
|
|
26
|
+
"No end": "No end",
|
|
27
|
+
"No limit": "No limit",
|
|
28
|
+
"No repeat": "No repeat",
|
|
29
|
+
"Repeat limit": "Repeat limit",
|
|
30
|
+
"Repeat mode": "Repeat mode",
|
|
31
|
+
"Seconds": "Seconds",
|
|
32
|
+
"Starts on": "Starts on",
|
|
33
|
+
"Success executed": "Success executed",
|
|
34
|
+
"View executions": "View executions",
|
|
35
|
+
"Weeks": "Weeks"
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Advanced": "高级模式",
|
|
3
|
+
"Are you sure you want to clear current times?": "确定要清空当前次数吗?",
|
|
4
|
+
"By custom date": "自定义时间",
|
|
5
|
+
"By day": "按天",
|
|
6
|
+
"By field": "数据表字段",
|
|
7
|
+
"By hour": "按小时",
|
|
8
|
+
"By minute": "按分钟",
|
|
9
|
+
"By month": "按月",
|
|
10
|
+
"By week": "按周",
|
|
11
|
+
"Clear current times": "清空当前次数",
|
|
12
|
+
"Cron job": "定时任务",
|
|
13
|
+
"Current limit": "当前限次",
|
|
14
|
+
"Current times": "当前次数",
|
|
15
|
+
"Days": "天",
|
|
16
|
+
"End": "结束",
|
|
17
|
+
"Ends on": "结束于",
|
|
18
|
+
"Every": "每",
|
|
19
|
+
"Exactly at": "当时",
|
|
20
|
+
"Executed": "总计执行次数",
|
|
21
|
+
"Hours": "小时",
|
|
22
|
+
"Last time": "上次执行时间",
|
|
23
|
+
"Minutes": "分钟",
|
|
24
|
+
"Months": "月",
|
|
25
|
+
"Next time": "下次执行",
|
|
26
|
+
"No end": "不结束",
|
|
27
|
+
"No limit": "不限",
|
|
28
|
+
"No repeat": "不重复",
|
|
29
|
+
"Repeat limit": "重复次数",
|
|
30
|
+
"Repeat mode": "重复模式",
|
|
31
|
+
"Seconds": "秒",
|
|
32
|
+
"Starts on": "开始于",
|
|
33
|
+
"Success executed": "成功执行次数",
|
|
34
|
+
"View executions": "查看执行记录",
|
|
35
|
+
"Weeks": "周"
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2016 Harri Siirak
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|