@zealicsolutions/web-ui 1.0.44-beta-3 → 1.0.44-beta-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/molecules/Calendar/CalendarMolecule.d.ts +3 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.d.ts +3 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
@@ -2,7 +2,8 @@ import React from 'react';
|
|
2
2
|
import { EventInput, ThemeSystem } from '@fullcalendar/react';
|
3
3
|
import { ConfigurationItemInfo } from 'containers';
|
4
4
|
export interface CalendarMoleculeProps {
|
5
|
-
events
|
5
|
+
/** initial events (will be copied into internal state) */
|
6
|
+
events?: EventInput[];
|
6
7
|
resources?: any[];
|
7
8
|
initialView?: string;
|
8
9
|
enableDayGrid?: boolean;
|
@@ -27,6 +28,7 @@ export interface CalendarMoleculeProps {
|
|
27
28
|
paddingBottom?: string;
|
28
29
|
primaryColor?: string;
|
29
30
|
secondaryColor?: string;
|
31
|
+
/** callback whenever a drop creates a new event */
|
30
32
|
onEventAdd?: (e: EventInput) => void;
|
31
33
|
configurationItemInfo?: ConfigurationItemInfo;
|
32
34
|
}
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
2
2
|
import { EventInput, ThemeSystem } from '@fullcalendar/react';
|
3
3
|
import { ConfigurationItemInfo } from 'containers';
|
4
4
|
export interface CalendarMoleculeProps {
|
5
|
-
events
|
5
|
+
/** initial events (will be copied into internal state) */
|
6
|
+
events?: EventInput[];
|
6
7
|
resources?: any[];
|
7
8
|
initialView?: string;
|
8
9
|
enableDayGrid?: boolean;
|
@@ -27,6 +28,7 @@ export interface CalendarMoleculeProps {
|
|
27
28
|
paddingBottom?: string;
|
28
29
|
primaryColor?: string;
|
29
30
|
secondaryColor?: string;
|
31
|
+
/** callback whenever a drop creates a new event */
|
30
32
|
onEventAdd?: (e: EventInput) => void;
|
31
33
|
configurationItemInfo?: ConfigurationItemInfo;
|
32
34
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import{jsx as
|
1
|
+
import{__assign as e,__spreadArray as i}from"../../node_modules/tslib/tslib.es6.js";import{jsx as o}from"../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{useRef as t,useState as r,useEffect as n}from"react";import d from"../../node_modules/@fullcalendar/react/dist/index.js";import a,{Draggable as l}from"../../node_modules/@fullcalendar/interaction/index.js";import m from"../../node_modules/@fullcalendar/daygrid/index.js";import s from"../../node_modules/@fullcalendar/timegrid/index.js";import u from"../../node_modules/@fullcalendar/list/index.js";import c from"../../node_modules/@fullcalendar/timeline/index.js";import f from"../../node_modules/@fullcalendar/resource/index.js";import v from"../../node_modules/@fullcalendar/resource-timegrid/index.js";import p from"../../node_modules/@fullcalendar/resource-timeline/index.js";import g from"../../node_modules/@mui/material/Box/Box.js";var h=function(h){var b=h.events,y=void 0===b?[]:b,j=h.resources,x=h.initialView,D=void 0===x?"dayGridMonth":x,T=h.enableDayGrid,_=void 0===T||T,G=h.enableTimeGrid,k=void 0===G||G,S=h.enableList,C=void 0!==S&&S,M=h.enableTimeline,B=void 0!==M&&M,L=h.enableResourceTimeline,R=void 0!==L&&L,W=h.slotDuration,w=void 0===W?"00:15:00":W,A=h.snapDuration,N=void 0===A?"00:05:00":A,O=h.businessHours,E=h.width,H=h.height,I=void 0===H?"auto":H,V=h.backgroundColor,Y=h.themeSystem,q=void 0===Y?"standard":Y,J=h.marginLeft,K=void 0===J?"0":J,P=h.marginTop,z=void 0===P?"0":P,F=h.marginRight,Q=void 0===F?"0":F,U=h.marginBottom,X=void 0===U?"0":U,Z=h.paddingLeft,$=void 0===Z?"0":Z,ee=h.paddingTop,ie=void 0===ee?"0":ee,oe=h.paddingRight,te=void 0===oe?"0":oe,re=h.paddingBottom,ne=void 0===re?"0":re,de=h.primaryColor,ae=h.secondaryColor,le=h.onEventAdd,me=h.configurationItemInfo,se=t(null),ue=r(y),ce=ue[0],fe=ue[1];n((function(){var e=Array.from(document.querySelectorAll(".fc-event-external")).map((function(e){return new l(e,{eventData:function(){var i=JSON.parse(e.dataset.event),o=Math.floor(i.duration/60),t=i.duration%60;return{id:i.id,title:i.title,duration:"".concat(o,":").concat(t.toString().padStart(2,"0"))}}})}));return function(){e.forEach((function(e){return e.destroy()}))}}),[]);var ve=[a,m,s,u,c,f,v,p],pe={dayGridMonth:_,dayGridWeek:_,dayGridDay:_,timeGridWeek:k,timeGridDay:k,listYear:C,listMonth:C,listWeek:C,listDay:C,timelineYear:B,timelineMonth:B,timelineWeek:B,timelineDay:B,resourceTimeGridWeek:R,resourceTimeGridDay:R,resourceTimelineMonth:R,resourceTimelineWeek:R,resourceTimelineDay:R},ge=Object.entries(pe).filter((function(e){return e[0],e[1]})).map((function(e){return e[0]})).join(","),he=pe[D]?D:ge.split(",")[0]||"dayGridMonth";return o(g,e({sx:{width:E,height:I,backgroundColor:V,marginLeft:K,marginTop:z,marginRight:Q,marginBottom:X,paddingLeft:$,paddingTop:ie,paddingRight:te,paddingBottom:ne,"--fc-button-bg":de,"--fc-event-bg":ae}},me,{children:o(d,{ref:se,themeSystem:q,schedulerLicenseKey:"CC-Attribution-NonCommercial-NoDerivatives",plugins:ve,initialView:he,headerToolbar:{left:"prev,next today",center:"title",right:"".concat(ge)},editable:!0,droppable:!0,selectable:!0,businessHours:O,slotDuration:w,snapDuration:N,events:ce,resources:j,eventReceive:function(e){console.log({info:e});var o=e.event.toPlainObject(),t={id:o.id,title:o.title,start:o.startStr,end:o.endStr};fe((function(e){return i(i([],e,!0),[t],!1)})),null==le||le(t),e.event.remove()}})}))};export{h as CalendarMolecule};
|
2
2
|
//# sourceMappingURL=CalendarMolecule.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarMolecule.js","sources":["../../../../../src/molecules/Calendar/CalendarMolecule.tsx"],"sourcesContent":[null],"names":["CalendarMolecule","_a","events","resources","
|
1
|
+
{"version":3,"file":"CalendarMolecule.js","sources":["../../../../../src/molecules/Calendar/CalendarMolecule.tsx"],"sourcesContent":[null],"names":["CalendarMolecule","_a","_b","events","initialEvents","resources","_c","initialView","_d","enableDayGrid","_e","enableTimeGrid","_f","enableList","_g","enableTimeline","_h","enableResourceTimeline","_j","slotDuration","_k","snapDuration","businessHours","width","_l","height","backgroundColor","_m","themeSystem","_o","marginLeft","_p","marginTop","_q","marginRight","_r","marginBottom","_s","paddingLeft","_t","paddingTop","_u","paddingRight","_v","paddingBottom","primaryColor","secondaryColor","onEventAdd","configurationItemInfo","calendarRef","useRef","_w","useState","eventsState","setEventsState","useEffect","instances","Array","from","document","querySelectorAll","map","el","Draggable","eventData","raw","JSON","parse","dataset","event","hrs","Math","floor","duration","mins","id","title","concat","toString","padStart","forEach","inst","destroy","ALL_PLUGINS","interactionPlugin","dayGridPlugin","timeGridPlugin","listPlugin","timelinePlugin","resourcePlugin","resourceTimeGridPlugin","resourceTimelinePlugin","viewMap","dayGridMonth","dayGridWeek","dayGridDay","timeGridWeek","timeGridDay","listYear","listMonth","listWeek","listDay","timelineYear","timelineMonth","timelineWeek","timelineDay","resourceTimeGridWeek","resourceTimeGridDay","resourceTimelineMonth","resourceTimelineWeek","resourceTimelineDay","toolbarViews","Object","entries","filter","join","safeInitialView","split","_jsx","Box","__assign","sx","FullCalendar","ref","schedulerLicenseKey","plugins","headerToolbar","left","center","right","editable","droppable","selectable","eventReceive","info","console","log","e","toPlainObject","newEvt","start","startStr","end","endStr","prev","__spreadArray","remove"],"mappings":"y6BAuDO,IAAMA,EAAoD,SAACC,GAChE,IAAAC,EAAAD,EAAAE,OAAQC,OAAgB,IAAAF,EAAA,KACxBG,EAASJ,EAAAI,UACTC,gBAAAC,OAAc,IAAAD,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AAM,kBACNC,OAAQ,QACRC,MAAO,GAAGpD,OAAAkC,KAEZmB,UAAQ,EACRC,WAAS,EACTC,YAAU,EACV9G,cAAeA,EACfH,aAAcA,EACdE,aAAcA,EACdlB,OAAQkD,GACRhD,UAAWA,EACXgI,aAAc,SAACC,GACbC,QAAQC,IAAI,CAAEF,KAAIA,IAClB,IAAMG,EAAIH,EAAKjE,MAAMqE,gBACfC,EAAqB,CACzBhE,GAAI8D,EAAE9D,GACNC,MAAO6D,EAAE7D,MACTgE,MAAOH,EAAEI,SACTC,IAAKL,EAAEM,QAETzF,IAAe,SAAC0F,GAAS,OAAAC,EAAAA,EAAA,GAAID,GAAI,GAAA,CAAEL,IAAM,EAAC,IAC1C5F,UAAAA,GAAa4F,GACbL,EAAKjE,MAAM6E,cAKrB"}
|
package/dist/index.d.ts
CHANGED
@@ -1806,7 +1806,8 @@ interface AvatarMoleculeProps {
|
|
1806
1806
|
}
|
1807
1807
|
|
1808
1808
|
interface CalendarMoleculeProps {
|
1809
|
-
events
|
1809
|
+
/** initial events (will be copied into internal state) */
|
1810
|
+
events?: EventInput[];
|
1810
1811
|
resources?: any[];
|
1811
1812
|
initialView?: string;
|
1812
1813
|
enableDayGrid?: boolean;
|
@@ -1831,6 +1832,7 @@ interface CalendarMoleculeProps {
|
|
1831
1832
|
paddingBottom?: string;
|
1832
1833
|
primaryColor?: string;
|
1833
1834
|
secondaryColor?: string;
|
1835
|
+
/** callback whenever a drop creates a new event */
|
1834
1836
|
onEventAdd?: (e: EventInput) => void;
|
1835
1837
|
configurationItemInfo?: ConfigurationItemInfo$1;
|
1836
1838
|
}
|