@teamco/ischeduler-core 2.0.17 → 2.2.0

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/index.cjs.js CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`dayjs`);c=s(c,1);let l=require(`react`);l=s(l,1);let u=require(`react/jsx-runtime`);var d=(e,t)=>Object.keys(e).find(n=>e[n]===t),f=function(e){return e.ACTIVE=`ACTIVE`,e.DEACTIVATED=`DEACTIVATED`,e.DELETED=`DELETED`,e.PROCESSING=`PROCESSING`,e.PENDING=`PENDING`,e.APPROVED=`APPROVED`,e.PUBLISHED=`PUBLISHED`,e}({}),p=function(e){return e.HOUR=`Hour`,e.DAY=`Day`,e.WEEK=`Week`,e.MONTH=`Month`,e.YEAR=`Year`,e.FOREVER=`Forever`,e}({}),m=`price`,h=`duration`,g=`discount`,_=`trialPeriod`,v=function(e){return e.USD=`USD`,e.EUR=`EUR`,e}({}),y=function(e){return e.PERCENT=`Percent`,e.FIXED=`Fixed`,e}({}),b={PERCENT:`%`,FIXED:v},x=function(e){return e.DATE=`Date`,e.NUMBER=`Number`,e.FOREVER=`Forever`,e}({}),S=function(e){return e.SUNDAY=`Sunday`,e.MONDAY=`Monday`,e.TUESDAY=`Tuesday`,e.WEDNESDAY=`Wednesday`,e.THURSDAY=`Thursday`,e.FRIDAY=`Friday`,e.SATURDAY=`Saturday`,e}({}),ee=function(e){return e.JANUARY=`January`,e.FEBRUARY=`February`,e.MARCH=`March`,e.APRIL=`April`,e.MAY=`May`,e.JUNE=`June`,e.JULY=`July`,e.AUGUST=`AUGUST`,e.SEPTEMBER=`September`,e.OCTOBER=`October`,e.NOVEMBER=`November`,e.DECEMBER=`December`,e}({}),C=function(e){return e.FIRST=`First`,e.SECOND=`Second`,e.THIRD=`Third`,e.FOURTH=`Fourth`,e.LAST=`Last`,e}({}),w=function(e){return e.SALE=`sale`,e.DISCOUNT=`discount`,e.TRIAL_DISCOUNT=`trialDiscount`,e}({}),te=function(e){return e.MONTH=`monthly`,e.YEAR=`yearly`,e.WEEK=`weekly`,e.DAY=`daily`,e}({}),ne=`scheduler`,T=[x.DATE,x.NUMBER,x.FOREVER],re=1,ie=5,E={duration:{type:`MONTH`,period:7},repeat:{weekly:{days:[d(S,Object.values(S)[1])]},monthly:{weekDay:`SECOND`,monthDay:2,type:`PERIOD`},yearly:{months:[`JANUARY`]}},range:{startedAt:(0,c.default)(new Date),endReason:{type:T[2],expiredAt:null}},status:f.PROCESSING},D={...E,type:w.SALE,[g]:null},O={...E,type:w.DISCOUNT,[g]:{type:`PERCENT`,value:1}},k={scheduler:`Scheduler`,"scheduler.info":`Scheduler Info`,"scheduler.header.title":`{{entity}} Scheduler ({{count}})`,"scheduler.result":`Occurs <strong>{{occurs}}</strong>, starting {{startAt}}.`,"scheduler.startedAt":`Started at`,"scheduler.updatedAt":`Updated at`,"scheduler.status":`Status`,"scheduler.duration":`Repeat Every`,"scheduler.occurrences":`Occurrences`,"scheduler.weekdays.sunday":`Sunday`,"scheduler.weekdays.monday":`Monday`,"scheduler.weekdays.tuesday":`Tuesday`,"scheduler.weekdays.wednesday":`Wednesday`,"scheduler.weekdays.thursday":`Thursday`,"scheduler.weekdays.friday":`Friday`,"scheduler.weekdays.saturday":`Saturday`,"scheduler.weekdays.short.sunday":`Sun`,"scheduler.weekdays.short.monday":`Mon`,"scheduler.weekdays.short.tuesday":`Tue`,"scheduler.weekdays.short.wednesday":`Wed`,"scheduler.weekdays.short.thursday":`Thu`,"scheduler.weekdays.short.friday":`Fri`,"scheduler.weekdays.short.saturday":`Sat`,"scheduler.duration.end":`End Reason`,"scheduler.duration.endDate":`End Date`,"scheduler.duration.end.day":`On this day`,"scheduler.duration.end.after":`After`,"scheduler.duration.end.no":`No end day`,"scheduler.separator.and":` and`,"scheduler.separator.on":`on`,"scheduler.separator.day":`day`,"scheduler.separator.every":`every`,"scheduler.separator.of":`of`,"scheduler.separator.the":`the`,"scheduler.day.first":`First`,"scheduler.day.second":`Second`,"scheduler.day.third":`Third`,"scheduler.day.fourth":`Fourth`,"scheduler.day.last":`Last`,"scheduler.weekday":`Weekday`,"scheduler.weekend":`Weekend Day`,"scheduler.day":`Day`,"scheduler.days":`Days`,"scheduler.week":`Week`,"scheduler.weeks":`Weeks`,"scheduler.year":`Year`,"scheduler.years":`Years`,"scheduler.monthDay":`Month Day`,"scheduler.month":`Month`,"scheduler.months":`Months`,"scheduler.months.january":`January`,"scheduler.months.february":`February`,"scheduler.months.march":`March`,"scheduler.months.april":`April`,"scheduler.months.may":`May`,"scheduler.months.june":`June`,"scheduler.months.july":`July`,"scheduler.months.august":`August`,"scheduler.months.september":`September`,"scheduler.months.october":`October`,"scheduler.months.november":`November`,"scheduler.months.december":`December`,"scheduler.months.short.january":`Jan`,"scheduler.months.short.february":`Feb`,"scheduler.months.short.march":`Mar`,"scheduler.months.short.april":`Apr`,"scheduler.months.short.may":`May`,"scheduler.months.short.june":`Jun`,"scheduler.months.short.july":`Jul`,"scheduler.months.short.august":`Aug`,"scheduler.months.short.september":`Sep`,"scheduler.months.short.october":`Oct`,"scheduler.months.short.november":`Nov`,"scheduler.months.short.december":`Dec`,"scheduler.actions.manage":`Manage Scheduler`,"scheduler.meta.assignedTo":`Assigned To`,"scheduler.meta.duration":`Duration`,"scheduler.meta.discount":`Discount`,"scheduler.meta.period":`Period`,"scheduler.limited":`The Scheduler is limited to: {{limit}}`,"scheduler.info.helper":`Set the scheduler to set a sale period.`,"table.actions":`Actions`,"actions.edit":`Edit`,"actions.delete":`Delete`,"actions.save":`Save`,"actions.update":`Update`,"actions.cancel":`Cancel`,"actions.confirm.delete":`Are you sure you want to delete this scheduler?`,"table.hideColumns":`Hide Columns`,"toolbar.refresh":`Refresh`},A=e=>(t,n)=>{let r=e[t]??k[t]??t;return n?r.replace(/\{\{(\w+)}}/g,(e,t)=>String(n[t]??``)):r},ae=(e,...t)=>[...e&&e.length>0?[...e]:[],...t],oe=(e,t=!0)=>({required:t,message:`${e} is required`}),se=(e,t=`input`)=>t===`select`?`Select ${e}`:`Enter ${e}`,j=(e,t)=>t.includes(e),M=(e,t,n)=>{let r=Array.isArray(t)?t:[t],i=e.getFieldsValue(!0),a=i;for(let e=0;e<r.length-1;e++){let t=r[e];(a[t]===void 0||a[t]===null||typeof a[t]!=`object`)&&(a[t]={}),a=a[t]}a[r[r.length-1]]=n,e.setFieldsValue(i)},N=(e,t)=>{let n=Array.isArray(t)?t:t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},P=`YYYY-MM-DD HH:mm`,F=`YYYY-MM-DD`,I=`—`,L=(e,t)=>{try{return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:t,minimumFractionDigits:0,maximumFractionDigits:2}).format(e)}catch{return`${e} ${t}`}},R=e=>(isNaN(new Date(e).getDate())&&(e=parseInt(e?.toString(),10)),new Date(e)),z=e=>e?R(e).toLocaleDateString():`—`,B=e=>e?R(e).toLocaleTimeString():`—`,V=e=>{let t;return e==null||(t=c.default.isDayjs(e)||e?.seconds&&e?.nanoseconds?e.toDate():e),t?`${z(t)} ${B(t)}`:`—`},H=(e,t)=>{let n=t||(0,c.default)().startOf(`day`);return e.isBefore(n,`day`)},U={danger:`#ff4d4f`,disabled:`#d9d9d9`,warning:`#FFBF00`,success:`#52c41a`,tags:{magenta:`magenta`,red:`red`,volcano:`volcano`,orange:`orange`,gold:`gold`,lime:`lime`,green:`green`,cyan:`cyan`,blue:`blue`,geekblue:`geekblue`,purple:`purple`,processing:`processing`,success:`success`,error:`error`,warning:`warning`,default:`default`}},W=(e,t,n,r)=>{n(`${t}${`${r(`scheduler.separator.every`)} ${K(`scheduler.day`,`scheduler.days`,e,r)}`}`)},G=(e,t,n,r)=>{let i=t.repeat?.weekly?.days,a=K(`scheduler.month`,`scheduler.months`,e,r),o=t.repeat?.monthly;if(o?.type===`DAY`)Y(t.duration.period,t,n,r,{msg:a});else if(o?.type===`PERIOD`){let e=r(`scheduler.separator.the`),t=r(`scheduler.separator.of`),s=r(`scheduler.separator.every`),c=o.weekDay;n(`${e} ${c} ${X(i,r)} ${t} ${s} ${a}`)}},ce=(e,t,n,r)=>{let i=t.repeat?.weekly?.days||[],a=K(`scheduler.week`,`scheduler.weeks`,e,r),o=r(`scheduler.separator.day`),s=r(`scheduler.separator.on`),c=r(`scheduler.separator.every`),l=i?.length===7?o:X(i,r);n(e===1?`${c} ${l}`:`${c} ${a} ${s} ${l}`)},le=(e,t,n,r)=>{let i=K(`scheduler.year`,`scheduler.years`,e,r),a=t.repeat?.yearly?.months;if(a){let e=r(`scheduler.separator.every`),o=r(`scheduler.separator.the`),s=r(`scheduler.separator.of`),c=X(a,r),l=X(t.repeat?.weekly?.days,r),u=t.duration?.period>1?` ${s} ${e} ${i}`:``;u=t.repeat?.monthly?.type===`PERIOD`?`${o} ${t.repeat?.monthly?.weekDay} ${l} ${s} ${e} ${c}`+u:`${e} ${c} ${t.repeat?.monthly?.monthDay}`+u,n(u)}},K=(e,t,n,r)=>{let i=`${n} ${r(t)}`;return n===1&&(i=r(e)),i},q=(e,t,n,r,i=``)=>{switch(e.type){case`DAY`:return W(e.period,i,n,r);case`WEEK`:return ce(e.period,t,n,r);case`MONTH`:return G(e.period,t,n,r);case`YEAR`:return le(e.period,t,n,r)}},J=(e,t)=>{let n=e=>(e<10?`0`+e:e).toString(),r=(0,c.default)(e),i=r.hour(),a=r.minute();t([r.format(`dddd`),`${r.date()} ${r.format(`MMMM`)} ${r.format(`YYYY`)}`,`at ${n(i)}:${n(a)}`].join(`, `))},Y=(e,t,n,r,i)=>{let a=r(`scheduler.separator.day`),o=r(`scheduler.separator.of`),s=r(`scheduler.separator.every`),c=`${a} ${t?.repeat?.monthly?.monthDay} ${o} ${s} `;i?.msg?n(`${c} ${i?.msg}`):q({type:t.duration.type,period:e},t,n,r,c)},X=(e=[],t)=>{let n=t(`scheduler.separator.and`),r=e.join(`, `),i=r.lastIndexOf(`,`);return i===-1?r:r.slice(0,i)+n+r.slice(i+1)},ue=({disabled:e,formRef:t,entity:n,handlers:{onSave:r,setLoading:i,setOpenDrawer:a,setConfigDrawer:o,setOnRefreshDrawer:s},options:{title:c,loading:l,schedulerType:u,isEdit:d,isDirty:f,prefix:m=[],readOnlyFields:h=[],t:g}})=>{if(e)return;let _=Object.keys(p),v=Object.keys(y);i(!0),a(!0);let b=()=>{i(!0),o({size:600,schedulerType:u,durationTypes:_,discountTypes:v,readOnlyFields:h,prefix:m,entity:n,formRef:t,title:c,isEdit:d,isDirty:f,loading:l,onSave:r,disabled:e,t:g}),i(!1)};s(b),b()},Z=(0,l.createContext)(null),de=()=>{let e=(0,l.useContext)(Z);if(!e)throw Error(`useSchedulerContext must be used within a SchedulerProvider`);return e},fe=e=>{let{schedulers:t,loading:n=!1,disabled:r=!1,locale:i,limit:a,onCreate:o,onUpdate:s,onDelete:c,permissions:d,translations:f,children:p}=e,[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)({}),v=(0,l.useMemo)(()=>({...k,...f??{}}),[f]),y=(0,l.useMemo)(()=>A(v),[v]),b=(0,l.useMemo)(()=>({schedulers:t,loading:n,disabled:r,locale:i,limit:a,t:y,permissions:{canCreate:d?.canCreate??!0,canUpdate:d?.canUpdate??!0,canDelete:d?.canDelete??!0},onCreate:o,onUpdate:s,onDelete:c,drawerOpen:m,setDrawerOpen:h,drawerConfig:g,setDrawerConfig:_}),[t,n,r,i,a,y,d,o,s,c,m,g]);return(0,u.jsx)(Z.Provider,{value:b,children:p})},Q=e=>{let t=e.key,n=e.dataIndex;return String(t||n)},pe=e=>{let t=e.title??e.label,n=Q(e);return typeof t==`string`||typeof t==`number`?String(t):n},$=(e,t)=>e.map(e=>({...e,hidden:e.concealable&&!t.includes(Q(e))})),me=(e,t=[])=>{let n=(0,l.useMemo)(()=>e.filter(e=>e.concealable).map(e=>({label:pe(e),value:Q(e)})),[e]),[r,i]=(0,l.useState)(()=>{let e=new Set(t.map(String));return n.map(e=>e.value).filter(t=>!e.has(t))});return{columnsList:n,selectedColumns:r,setSelectedColumns:i,filteredColumns:(0,l.useMemo)(()=>$(e,r),[e,r])}};exports.CDiscountTypeValues=b,exports.CEndReasonTypes=T,exports.CFirstDayIdx=re,exports.CNsDiscount=g,exports.CNsDuration=h,exports.CNsPrice=m,exports.CNsTrial=_,exports.COLORS=U,exports.CScheduler=ne,exports.DEFAULT_DATE_FORMAT=F,exports.DEFAULT_DATE_TIME_FORMAT=P,exports.DEFAULT_DISCOUNT_SCHEDULER=O,exports.DEFAULT_SALE_SCHEDULER=D,exports.DEFAULT_SCHEDULERS_LIMIT=ie,exports.ECurrency=v,exports.EDays=S,exports.EDiscountType=y,exports.EDurationTypes=p,exports.EEndReasonType=x,exports.EMonths=ee,exports.ESchedulerPrefix=w,exports.ESchedulerTypeTransform=te,exports.EStatus=f,exports.EWeekDays=C,exports.NADate=I,exports.SchedulerContext=Z,exports.SchedulerProvider=fe,exports.createTranslationFn=A,exports.defaultTranslations=k,exports.filterOutColumns=$,exports.findFieldValue=N,exports.getDisabledDate=H,exports.getKeyFromEnum=d,exports.handleChangeStartDate=J,exports.handleDurationValueChange=q,exports.handleMsg=K,exports.handleMultipleDurations=X,exports.handleSchedulerForm=ue,exports.handleSelectWeeklyDay=Y,exports.isReadOnlyField=j,exports.mergeNames=ae,exports.numberToCurrency=L,exports.placeholderField=se,exports.requiredField=oe,exports.setNestedDynamicFields=M,exports.tsToDate=z,exports.tsToLocaleDateTime=V,exports.tsToTime=B,exports.useColumnsToggle=me,exports.useSchedulerContext=de;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`dayjs`);c=s(c,1);let l=require(`react`);l=s(l,1);let u=require(`react/jsx-runtime`);var d=(e,t)=>Object.keys(e).find(n=>e[n]===t),f=function(e){return e.ACTIVE=`ACTIVE`,e.DEACTIVATED=`DEACTIVATED`,e.DELETED=`DELETED`,e.PROCESSING=`PROCESSING`,e.PENDING=`PENDING`,e.APPROVED=`APPROVED`,e.PUBLISHED=`PUBLISHED`,e}({}),p=function(e){return e.HOUR=`Hour`,e.DAY=`Day`,e.WEEK=`Week`,e.MONTH=`Month`,e.YEAR=`Year`,e.FOREVER=`Forever`,e}({}),m=`price`,h=`duration`,g=`discount`,_=`trialPeriod`,v=function(e){return e.USD=`USD`,e.EUR=`EUR`,e}({}),y=function(e){return e.PERCENT=`Percent`,e.FIXED=`Fixed`,e}({}),b={PERCENT:`%`,FIXED:v},x=function(e){return e.DATE=`Date`,e.NUMBER=`Number`,e.FOREVER=`Forever`,e}({}),S=function(e){return e.SUNDAY=`Sunday`,e.MONDAY=`Monday`,e.TUESDAY=`Tuesday`,e.WEDNESDAY=`Wednesday`,e.THURSDAY=`Thursday`,e.FRIDAY=`Friday`,e.SATURDAY=`Saturday`,e}({}),ee=function(e){return e.JANUARY=`January`,e.FEBRUARY=`February`,e.MARCH=`March`,e.APRIL=`April`,e.MAY=`May`,e.JUNE=`June`,e.JULY=`July`,e.AUGUST=`August`,e.SEPTEMBER=`September`,e.OCTOBER=`October`,e.NOVEMBER=`November`,e.DECEMBER=`December`,e}({}),C=function(e){return e.FIRST=`First`,e.SECOND=`Second`,e.THIRD=`Third`,e.FOURTH=`Fourth`,e.LAST=`Last`,e}({}),w=function(e){return e.SALE=`sale`,e.DISCOUNT=`discount`,e.TRIAL_DISCOUNT=`trialDiscount`,e}({}),te=function(e){return e.MONTH=`monthly`,e.YEAR=`yearly`,e.WEEK=`weekly`,e.DAY=`daily`,e}({}),ne=`scheduler`,T=[x.DATE,x.NUMBER,x.FOREVER],re=1,ie=5,E={duration:{type:`MONTH`,period:7},repeat:{weekly:{days:[d(S,Object.values(S)[1])]},monthly:{weekDay:`SECOND`,monthDay:2,type:`PERIOD`},yearly:{months:[`JANUARY`]}},range:{startedAt:(0,c.default)(new Date),endReason:{type:T[2],expiredAt:null}},status:f.PROCESSING},D={...E,type:w.SALE,[g]:null},O={...E,type:w.DISCOUNT,[g]:{type:`PERCENT`,value:1}},k={scheduler:`Scheduler`,"scheduler.info":`Scheduler Info`,"scheduler.header.title":`{{entity}} Scheduler ({{count}})`,"scheduler.result":`Occurs <strong>{{occurs}}</strong>, starting {{startAt}}.`,"scheduler.startedAt":`Started at`,"scheduler.updatedAt":`Updated at`,"scheduler.status":`Status`,"scheduler.duration":`Repeat Every`,"scheduler.occurrences":`Occurrences`,"scheduler.weekdays.sunday":`Sunday`,"scheduler.weekdays.monday":`Monday`,"scheduler.weekdays.tuesday":`Tuesday`,"scheduler.weekdays.wednesday":`Wednesday`,"scheduler.weekdays.thursday":`Thursday`,"scheduler.weekdays.friday":`Friday`,"scheduler.weekdays.saturday":`Saturday`,"scheduler.weekdays.short.sunday":`Sun`,"scheduler.weekdays.short.monday":`Mon`,"scheduler.weekdays.short.tuesday":`Tue`,"scheduler.weekdays.short.wednesday":`Wed`,"scheduler.weekdays.short.thursday":`Thu`,"scheduler.weekdays.short.friday":`Fri`,"scheduler.weekdays.short.saturday":`Sat`,"scheduler.duration.end":`End Reason`,"scheduler.duration.endDate":`End Date`,"scheduler.duration.end.day":`On this day`,"scheduler.duration.end.after":`After`,"scheduler.duration.end.no":`No end day`,"scheduler.separator.and":` and`,"scheduler.separator.on":`on`,"scheduler.separator.day":`day`,"scheduler.separator.every":`every`,"scheduler.separator.of":`of`,"scheduler.separator.the":`the`,"scheduler.day.first":`First`,"scheduler.day.second":`Second`,"scheduler.day.third":`Third`,"scheduler.day.fourth":`Fourth`,"scheduler.day.last":`Last`,"scheduler.weekday":`Weekday`,"scheduler.weekend":`Weekend Day`,"scheduler.day":`Day`,"scheduler.days":`Days`,"scheduler.week":`Week`,"scheduler.weeks":`Weeks`,"scheduler.year":`Year`,"scheduler.years":`Years`,"scheduler.monthDay":`Month Day`,"scheduler.month":`Month`,"scheduler.months":`Months`,"scheduler.months.january":`January`,"scheduler.months.february":`February`,"scheduler.months.march":`March`,"scheduler.months.april":`April`,"scheduler.months.may":`May`,"scheduler.months.june":`June`,"scheduler.months.july":`July`,"scheduler.months.august":`August`,"scheduler.months.september":`September`,"scheduler.months.october":`October`,"scheduler.months.november":`November`,"scheduler.months.december":`December`,"scheduler.months.short.january":`Jan`,"scheduler.months.short.february":`Feb`,"scheduler.months.short.march":`Mar`,"scheduler.months.short.april":`Apr`,"scheduler.months.short.may":`May`,"scheduler.months.short.june":`Jun`,"scheduler.months.short.july":`Jul`,"scheduler.months.short.august":`Aug`,"scheduler.months.short.september":`Sep`,"scheduler.months.short.october":`Oct`,"scheduler.months.short.november":`Nov`,"scheduler.months.short.december":`Dec`,"scheduler.actions.manage":`Manage Scheduler`,"scheduler.meta.assignedTo":`Assigned To`,"scheduler.meta.duration":`Duration`,"scheduler.meta.discount":`Discount`,"scheduler.meta.period":`Period`,"scheduler.limited":`The Scheduler is limited to: {{limit}}`,"scheduler.info.helper":`Set the scheduler to set a sale period.`,"table.actions":`Actions`,"actions.edit":`Edit`,"actions.delete":`Delete`,"actions.save":`Save`,"actions.update":`Update`,"actions.cancel":`Cancel`,"actions.confirm.delete":`Are you sure you want to delete this scheduler?`,"table.hideColumns":`Hide Columns`,"toolbar.refresh":`Refresh`},A=e=>(t,n)=>{let r=e[t]??k[t]??t;return n?r.replace(/\{\{(\w+)}}/g,(e,t)=>String(n[t]??``)):r},ae=(e,...t)=>[...e&&e.length>0?[...e]:[],...t],oe=(e,t=!0)=>({required:t,message:`${e} is required`}),se=(e,t=`input`)=>t===`select`?`Select ${e}`:`Enter ${e}`,j=(e,t)=>t.includes(e),M=(e,t,n)=>{let r=Array.isArray(t)?t:[t],i=e.getFieldsValue(!0),a=i;for(let e=0;e<r.length-1;e++){let t=r[e];(a[t]===void 0||a[t]===null||typeof a[t]!=`object`)&&(a[t]={}),a=a[t]}a[r[r.length-1]]=n,e.setFieldsValue(i)},N=(e,t)=>{let n=Array.isArray(t)?t:t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r},P=`YYYY-MM-DD HH:mm`,F=`YYYY-MM-DD`,I=`—`,L=(e,t)=>{try{return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:t,minimumFractionDigits:0,maximumFractionDigits:2}).format(e)}catch{return`${e} ${t}`}},R=e=>(isNaN(new Date(e).getDate())&&(e=parseInt(e?.toString(),10)),new Date(e)),z=e=>e?R(e).toLocaleDateString():`—`,B=e=>e?R(e).toLocaleTimeString():`—`,V=e=>{let t;return e==null||(t=c.default.isDayjs(e)||e?.seconds&&e?.nanoseconds?e.toDate():e),t?`${z(t)} ${B(t)}`:`—`},H=(e,t)=>{let n=t||(0,c.default)().startOf(`day`);return e.isBefore(n,`day`)},U={danger:`#ff4d4f`,disabled:`#d9d9d9`,warning:`#FFBF00`,success:`#52c41a`,tags:{magenta:`magenta`,red:`red`,volcano:`volcano`,orange:`orange`,gold:`gold`,lime:`lime`,green:`green`,cyan:`cyan`,blue:`blue`,geekblue:`geekblue`,purple:`purple`,processing:`processing`,success:`success`,error:`error`,warning:`warning`,default:`default`}},W=(e,t,n,r)=>{n(`${t}${`${r(`scheduler.separator.every`)} ${K(`scheduler.day`,`scheduler.days`,e,r)}`}`)},G=(e,t,n,r)=>{let i=t.repeat?.weekly?.days,a=K(`scheduler.month`,`scheduler.months`,e,r),o=t.repeat?.monthly;if(o?.type===`DAY`)Y(t.duration.period,t,n,r,{msg:a});else if(o?.type===`PERIOD`){let e=r(`scheduler.separator.the`),t=r(`scheduler.separator.of`),s=r(`scheduler.separator.every`),c=o.weekDay;n(`${e} ${c} ${X(i,r)} ${t} ${s} ${a}`)}},ce=(e,t,n,r)=>{let i=t.repeat?.weekly?.days||[],a=K(`scheduler.week`,`scheduler.weeks`,e,r),o=r(`scheduler.separator.day`),s=r(`scheduler.separator.on`),c=r(`scheduler.separator.every`),l=i?.length===7?o:X(i,r);n(e===1?`${c} ${l}`:`${c} ${a} ${s} ${l}`)},le=(e,t,n,r)=>{let i=K(`scheduler.year`,`scheduler.years`,e,r),a=t.repeat?.yearly?.months;if(a){let e=r(`scheduler.separator.every`),o=r(`scheduler.separator.the`),s=r(`scheduler.separator.of`),c=X(a,r),l=X(t.repeat?.weekly?.days,r),u=t.duration?.period>1?` ${s} ${e} ${i}`:``;u=t.repeat?.monthly?.type===`PERIOD`?`${o} ${t.repeat?.monthly?.weekDay} ${l} ${s} ${e} ${c}`+u:`${e} ${c} ${t.repeat?.monthly?.monthDay}`+u,n(u)}},K=(e,t,n,r)=>{let i=`${n} ${r(t)}`;return n===1&&(i=r(e)),i},q=(e,t,n,r,i=``)=>{switch(e.type){case`DAY`:return W(e.period,i,n,r);case`WEEK`:return ce(e.period,t,n,r);case`MONTH`:return G(e.period,t,n,r);case`YEAR`:return le(e.period,t,n,r)}},J=(e,t)=>{let n=e=>(e<10?`0`+e:e).toString(),r=(0,c.default)(e),i=r.hour(),a=r.minute();t([r.format(`dddd`),`${r.date()} ${r.format(`MMMM`)} ${r.format(`YYYY`)}`,`at ${n(i)}:${n(a)}`].join(`, `))},Y=(e,t,n,r,i)=>{let a=r(`scheduler.separator.day`),o=r(`scheduler.separator.of`),s=r(`scheduler.separator.every`),c=`${a} ${t?.repeat?.monthly?.monthDay} ${o} ${s} `;i?.msg?n(`${c} ${i?.msg}`):q({type:t.duration.type,period:e},t,n,r,c)},X=(e=[],t)=>{let n=t(`scheduler.separator.and`),r=e.join(`, `),i=r.lastIndexOf(`,`);return i===-1?r:r.slice(0,i)+n+r.slice(i+1)},ue=({disabled:e,formRef:t,entity:n,handlers:{onSave:r,setLoading:i,setOpenDrawer:a,setConfigDrawer:o,setOnRefreshDrawer:s},options:{title:c,loading:l,schedulerType:u,isEdit:d,isDirty:f,prefix:m=[],readOnlyFields:h=[],t:g}})=>{if(e)return;let _=Object.keys(p),v=Object.keys(y);i(!0),a(!0);let b=()=>{i(!0),o({size:600,schedulerType:u,durationTypes:_,discountTypes:v,readOnlyFields:h,prefix:m,entity:n,formRef:t,title:c,isEdit:d,isDirty:f,loading:l,onSave:r,disabled:e,t:g}),i(!1)};s(b),b()},Z=(0,l.createContext)(null),de=()=>{let e=(0,l.useContext)(Z);if(!e)throw Error(`useSchedulerContext must be used within a SchedulerProvider`);return e},fe=e=>{let{schedulers:t,loading:n=!1,disabled:r=!1,locale:i,limit:a,onCreate:o,onUpdate:s,onDelete:c,permissions:d,translations:f,children:p}=e,[m,h]=(0,l.useState)(!1),[g,_]=(0,l.useState)({}),v=(0,l.useMemo)(()=>({...k,...f??{}}),[f]),y=(0,l.useMemo)(()=>A(v),[v]),b=(0,l.useMemo)(()=>({schedulers:t,loading:n,disabled:r,locale:i,limit:a,t:y,permissions:{canCreate:d?.canCreate??!0,canUpdate:d?.canUpdate??!0,canDelete:d?.canDelete??!0},onCreate:o,onUpdate:s,onDelete:c,drawerOpen:m,setDrawerOpen:h,drawerConfig:g,setDrawerConfig:_}),[t,n,r,i,a,y,d,o,s,c,m,g]);return(0,u.jsx)(Z.Provider,{value:b,children:p})},Q=e=>{let t=e.key,n=e.dataIndex;return String(t||n)},pe=e=>{let t=e.title??e.label,n=Q(e);return typeof t==`string`||typeof t==`number`?String(t):n},$=(e,t)=>e.map(e=>({...e,hidden:e.concealable&&!t.includes(Q(e))})),me=(e,t=[])=>{let n=(0,l.useMemo)(()=>e.filter(e=>e.concealable).map(e=>({label:pe(e),value:Q(e)})),[e]),[r,i]=(0,l.useState)(()=>{let e=new Set(t.map(String));return n.map(e=>e.value).filter(t=>!e.has(t))});return{columnsList:n,selectedColumns:r,setSelectedColumns:i,filteredColumns:(0,l.useMemo)(()=>$(e,r),[e,r])}};exports.CDiscountTypeValues=b,exports.CEndReasonTypes=T,exports.CFirstDayIdx=re,exports.CNsDiscount=g,exports.CNsDuration=h,exports.CNsPrice=m,exports.CNsTrial=_,exports.COLORS=U,exports.CScheduler=ne,exports.DEFAULT_DATE_FORMAT=F,exports.DEFAULT_DATE_TIME_FORMAT=P,exports.DEFAULT_DISCOUNT_SCHEDULER=O,exports.DEFAULT_SALE_SCHEDULER=D,exports.DEFAULT_SCHEDULERS_LIMIT=ie,exports.ECurrency=v,exports.EDays=S,exports.EDiscountType=y,exports.EDurationTypes=p,exports.EEndReasonType=x,exports.EMonths=ee,exports.ESchedulerPrefix=w,exports.ESchedulerTypeTransform=te,exports.EStatus=f,exports.EWeekDays=C,exports.NADate=I,exports.SchedulerContext=Z,exports.SchedulerProvider=fe,exports.createTranslationFn=A,exports.defaultTranslations=k,exports.filterOutColumns=$,exports.findFieldValue=N,exports.getDisabledDate=H,exports.getKeyFromEnum=d,exports.handleChangeStartDate=J,exports.handleDurationValueChange=q,exports.handleMsg=K,exports.handleMultipleDurations=X,exports.handleSchedulerForm=ue,exports.handleSelectWeeklyDay=Y,exports.isReadOnlyField=j,exports.mergeNames=ae,exports.numberToCurrency=L,exports.placeholderField=se,exports.requiredField=oe,exports.setNestedDynamicFields=M,exports.tsToDate=z,exports.tsToLocaleDateTime=V,exports.tsToTime=B,exports.useColumnsToggle=me,exports.useSchedulerContext=de;
package/dist/index.es.js CHANGED
@@ -18,7 +18,7 @@ var o = (e, t) => Object.keys(e).find((n) => e[n] === t), s = /* @__PURE__ */ fu
18
18
  }({}), _ = /* @__PURE__ */ function(e) {
19
19
  return e.SUNDAY = "Sunday", e.MONDAY = "Monday", e.TUESDAY = "Tuesday", e.WEDNESDAY = "Wednesday", e.THURSDAY = "Thursday", e.FRIDAY = "Friday", e.SATURDAY = "Saturday", e;
20
20
  }({}), v = /* @__PURE__ */ function(e) {
21
- return e.JANUARY = "January", e.FEBRUARY = "February", e.MARCH = "March", e.APRIL = "April", e.MAY = "May", e.JUNE = "June", e.JULY = "July", e.AUGUST = "AUGUST", e.SEPTEMBER = "September", e.OCTOBER = "October", e.NOVEMBER = "November", e.DECEMBER = "December", e;
21
+ return e.JANUARY = "January", e.FEBRUARY = "February", e.MARCH = "March", e.APRIL = "April", e.MAY = "May", e.JUNE = "June", e.JULY = "July", e.AUGUST = "August", e.SEPTEMBER = "September", e.OCTOBER = "October", e.NOVEMBER = "November", e.DECEMBER = "December", e;
22
22
  }({}), y = /* @__PURE__ */ function(e) {
23
23
  return e.FIRST = "First", e.SECOND = "Second", e.THIRD = "Third", e.FOURTH = "Fourth", e.LAST = "Last", e;
24
24
  }({}), b = /* @__PURE__ */ function(e) {
@@ -64,7 +64,7 @@ export declare enum EMonths {
64
64
  MAY = "May",
65
65
  JUNE = "June",
66
66
  JULY = "July",
67
- AUGUST = "AUGUST",
67
+ AUGUST = "August",
68
68
  SEPTEMBER = "September",
69
69
  OCTOBER = "October",
70
70
  NOVEMBER = "November",
@@ -96,11 +96,18 @@ export type TSchedulerDuration = {
96
96
  type: keyof typeof EDurationTypes;
97
97
  period: number;
98
98
  };
99
- export type TSchedulerRange = {
100
- startedAt: dayjs.Dayjs | string;
99
+ /**
100
+ * Default date representation for scheduler dates. The date-bearing types below
101
+ * are generic over `D` so a consumer can specialize them (e.g. to a Firestore
102
+ * `Timestamp`) while the package's own UI components keep the `Dayjs | string`
103
+ * default.
104
+ */
105
+ export type TSchedulerDate = dayjs.Dayjs | string;
106
+ export type TSchedulerRange<D = TSchedulerDate> = {
107
+ startedAt: D;
101
108
  endReason: {
102
109
  type: EEndReasonType;
103
- expiredAt: dayjs.Dayjs | string | null;
110
+ expiredAt: D | null;
104
111
  occurrences?: number;
105
112
  };
106
113
  };
@@ -117,36 +124,36 @@ export type TSchedulerRepeat = {
117
124
  months?: (keyof typeof EMonths)[];
118
125
  };
119
126
  };
120
- export interface ISchedulerMetadata {
121
- createdAt?: string | dayjs.Dayjs;
122
- updatedAt?: string | dayjs.Dayjs;
127
+ export interface ISchedulerMetadata<D = TSchedulerDate> {
128
+ createdAt?: D;
129
+ updatedAt?: D;
123
130
  createdBy?: string;
124
131
  updatedBy?: string;
125
132
  }
126
- export interface IScheduler {
133
+ export interface IScheduler<D = TSchedulerDate> {
127
134
  id?: string;
128
135
  type: ESchedulerPrefix;
129
136
  duration: TSchedulerDuration;
130
137
  repeat: TSchedulerRepeat;
131
- range: TSchedulerRange;
138
+ range: TSchedulerRange<D>;
132
139
  discount?: TDiscount | null;
133
140
  status?: EStatus;
134
- metadata?: ISchedulerMetadata;
141
+ metadata?: ISchedulerMetadata<D>;
135
142
  }
136
143
  type TConditionalDiscount<P extends ESchedulerPrefix> = P extends ESchedulerPrefix.SALE ? {
137
144
  [CNsDiscount]?: null;
138
145
  } : {
139
146
  [CNsDiscount]?: TDiscount;
140
147
  };
141
- export type TScheduler<P extends ESchedulerPrefix> = IScheduler & TConditionalDiscount<P>;
142
- export type RequiredSchedulers = {
143
- [K in Exclude<ESchedulerPrefix, ESchedulerPrefix.TRIAL_DISCOUNT>]: TScheduler<K>[];
148
+ export type TScheduler<P extends ESchedulerPrefix, D = TSchedulerDate> = IScheduler<D> & TConditionalDiscount<P>;
149
+ export type RequiredSchedulers<D = TSchedulerDate> = {
150
+ [K in Exclude<ESchedulerPrefix, ESchedulerPrefix.TRIAL_DISCOUNT>]: TScheduler<K, D>[];
144
151
  };
145
- export type OptionalSchedulers = {
146
- [ESchedulerPrefix.TRIAL_DISCOUNT]?: TScheduler<ESchedulerPrefix.TRIAL_DISCOUNT>[];
152
+ export type OptionalSchedulers<D = TSchedulerDate> = {
153
+ [ESchedulerPrefix.TRIAL_DISCOUNT]?: TScheduler<ESchedulerPrefix.TRIAL_DISCOUNT, D>[];
147
154
  };
148
- export type TSchedulers = {
149
- [CScheduler]: RequiredSchedulers & OptionalSchedulers;
155
+ export type TSchedulers<D = TSchedulerDate> = {
156
+ [CScheduler]: RequiredSchedulers<D> & OptionalSchedulers<D>;
150
157
  };
151
158
  export interface IObjectId {
152
159
  id?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,EAC7C,SAAS,CAAC,EACV,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,KAChB,MAAM,CAAC,GAAG,SACmE,CAAC;AAMjF,oBAAY,OAAO;IACjB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,OAAO,cAAc,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAMF,eAAO,MAAM,QAAQ,UAAU,CAAC;AAChC,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,e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AAgB,EAAE,CAAC,GAAG,cAAc,IAAI,UAAU,CAAC,CAAC,CAAC,GACpF,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAE1B,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,cAAc,IAAI;KAClD,CAAC,IAAI,OAAO,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,cAAc,CAAC,GAAG,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;CACtF,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,cAAc,IAAI;IACnD,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC;CACtF,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,cAAc,IAAI;IAC5C,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC7D,CAAC;AAMF,MAAM,WAAW,SAAS;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAiCD,eAAO,MAAM,sBAAsB,EAAE,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAI7E,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAOrF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamco/ischeduler-core",
3
- "version": "2.0.17",
3
+ "version": "2.2.0",
4
4
  "description": "Headless core for iScheduler — types, utils, handlers, i18n, provider",
5
5
  "license": "MIT",
6
6
  "repository": {