openstack-uicore-foundation 4.1.26 → 4.1.28
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/lib/components/extra-questions.js +1 -1
- package/lib/components/extra-questions.js.map +1 -1
- package/lib/components/free-text-search.js +1 -1
- package/lib/components/free-text-search.js.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/schedule-builder-view.js +1 -1
- package/lib/components/schedule-builder-view.js.map +1 -1
- package/lib/utils/questions-set.js +1 -1
- package/lib/utils/questions-set.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={9626:(e,t,n)=>{n.d(t,{default:()=>s});var a=n(6689),i=n.n(a),r=n(4656),o=n.n(r);class l extends i().Component{onPerformBulkAction(){let e=this.actionTypeSelect.value;""!==e&&this.props.onSelectedBulkAction(e)}render(){let{onSelectAll:e,bulkOptions:t,show:n}=this.props;return i().createElement("div",{className:"bulk-actions-selector-container"},n&&i().createElement("div",{className:"row"},i().createElement("div",{className:"col-md-8"},i().createElement("input",{type:"checkbox",onClick:e}),i().createElement("select",{ref:e=>{this.actionTypeSelect=e}},i().createElement("option",{value:""},o().translate("published_bulk_actions_selector.options.default")),t.map(((e,t)=>i().createElement("option",{key:t,value:e.value},e.label))))),i().createElement("div",{className:"col-md-4"},i().createElement("button",{onClick:this.onPerformBulkAction.bind(this),title:o().translate("published_bulk_actions_selector.titles.go"),className:"btn btn-default btn-sm"},i().createElement("i",{className:"fa fa-play"}," ",o().translate("published_bulk_actions_selector.buttons.go"))))))}}const s=l},1006:(e,t,n)=>{n.d(t,{default:()=>d});var a=n(8213),i=n.n(a),r=n(3838),o=n.n(r),l=n(6689),s=n.n(l);const c="tDZTa8dy9OMVyGAtxNOS",u="VoBl8JcsRZelj8EKGKtC",m=["value","options","onChange"],d=e=>{let{value:t,options:n,onChange:a}=e,r=o()(e,m);const l=e=>{const i=n.findIndex((e=>e.value===t));i>=0&&(e?i<n.length-1&&a(n[i+1].value):i>0&&a(n[i-1].value))},d=n.find((e=>e.value===t)).label;return s().createElement("div",i()({className:c},r),s().createElement("button",{className:"btn btn-default",onClick:()=>l(!1)},s().createElement("i",{className:"fa fa-minus"})),s().createElement("span",{className:u},d),s().createElement("button",{className:"btn btn-default",onClick:()=>l(!0)},s().createElement("i",{className:"fa fa-plus"})))}},9745:(e,t,n)=>{n.d(t,{default:()=>l});var a=n(6689),i=n.n(a),r=n(1929),o=n.n(r);const l=({days:e,currentValue:t,placeholder:n,onDayChanged:a})=>{const r=e.find((e=>e.value===t))||null;return i().createElement(o(),{placeholder:n,className:"day-selector",name:"form-field-name",value:r,onChange:e=>{a((null==e?void 0:e.value)||null)},options:e})}},1613:(e,t,n)=>{n.d(t,{default:()=>d});var a=n(8213),i=n.n(a),r=n(3838),o=n.n(r),l=n(6689),s=n.n(l),c=n(1929),u=n.n(c);const m=["venues","currentValue","placeholder","onVenueChanged"],d=e=>{let{venues:t,currentValue:n,placeholder:a,onVenueChanged:r}=e,l=o()(e,m);const c=t.find((e=>e.value.id===(null==n?void 0:n.id)))||null;return s().createElement(u(),i()({placeholder:a,className:"venues-selector",name:"form-field-name",value:c,onChange:e=>{r((null==e?void 0:e.value)||null)},options:t,optionRenderer:e=>{let t=e.value;return"SummitVenue"===t.class_name?s().createElement("span",{className:"location-option-venue"},t.name):s().createElement("span",{className:"location-option-room"},"- ",t.name)}},l))}},418:(e,t,n)=>{n.d(t,{default:()=>r});var a=n(6689),i=n.n(a);const r=({children:e,replaceNewLine:t=!1,className:n=""})=>i().createElement("span",{className:n,dangerouslySetInnerHTML:{__html:t?null==e?void 0:e.replace(/\n/g,"<br />"):e}})},8775:(e,t,n)=>{n.d(t,{DraggableItemTypes:()=>a,PixelsPerMinute:()=>o,SlotSizeOptions:()=>r,TBALocation:()=>i,bulkOptions:()=>l});const a={UNSCHEDULEEVENT:"UnScheduleEvent",SCHEDULEEVENT:"ScheduleEvent"},i={id:0,name:"TBD",class_name:"SummitVenue"},r=[1,5,10,15,30,60],o=3,l=[{value:"BULK_ACTION_EDIT",label:"Edit"},{value:"BULK_ACTION_UNPUBLISH",label:"Unpublish"}]},8575:(e,t,n)=>{n.d(t,{default:()=>r});var a=n(8362),i=n.n(a);const r=class{constructor(e,t=null){this._event=e,this._summit=t}set summit(e){this._summit=e}get summit(){return this._summit}getId(){return this._event.id}isPublished(){return this._event.hasOwnProperty("is_published")&&this._event.is_published}getMinutesDuration(e){if(this._event.hasOwnProperty("start_date")&&this._event.hasOwnProperty("end_date")&&null!=this._event.start_date&&null!=this._event.end_date){let e=i()(1e3*this._event.start_date).tz(this._summit.time_zone.name);return i()(1e3*this._event.end_date).tz(this._summit.time_zone.name).diff(e,"minutes")}return this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):e}canMove(e,t,n,a){let r=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):a;this.isPublished()&&(r=this.getMinutesDuration());let o=i().tz(t+" "+n.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name),l=i().tz(t+" "+n.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name);l=l.add(r,"minutes");for(let t of e.filter((e=>e.id!==this.getId()))){let e=i()(1e3*t.start_date).tz(this._summit.time_zone.name),n=i()(1e3*t.end_date).tz(this._summit.time_zone.name);if(e.isBefore(l)&&n.isAfter(o))return!1}return!0}calculateNewDates(e,t,n){return n=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):n,[i().tz(e+" "+t.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name),i().tz(e+" "+t.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name).add(n,"minutes")]}isValidEndDate(e){if(null==e)return!0;let t=i().tz(1e3*this._event.start_date,this._summit.time_zone.name);e=i().tz(1e3*e,this._summit.time_zone.name);let n=i().tz(1e3*this._summit.end_date,this._summit.time_zone.name);return e.isAfter(t)&&(e.isBefore(n)||e.isSame(n))}isValidStartDate(e){if(null==e)return!0;e=i().tz(1e3*e,this._summit.time_zone.name);let t=i().tz(1e3*this._event.end_date,this._summit.time_zone.name),n=i().tz(1e3*this._summit.start_date,this._summit.time_zone.name);return i().isMoment(e)&&e.isAfter(n)&&e.isBefore(t)}isValidTitle(e){return""!==e.trim()}isValid(){return this.isValidTitle(this._event.title)&&this.isValidStartDate(this._event.start_date)&&this.isValidEndDate(this._event.end_date)}}},6793:(e,t,n)=>{n.d(t,{epochToMomentTimeZone:()=>r,parseLocationHour:()=>o});var a=n(8362),i=n.n(a);n(6530);const r=(e,t)=>e?(e*=1e3,i()(e).tz(t)):e,o=e=>{let t=e.toString();return t.length<4&&(t=`0${t}`),t=t.match(/.{2}/g),t=t.join(":"),t}},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},7964:e=>{e.exports=require("react-dnd")},6405:e=>{e.exports=require("react-dom")},1929:e=>{e.exports=require("react-select")},6530:e=>{e.exports=require("urijs")}},t={};function n(a){var i=t[a];if(void 0!==i)return i.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};return(()=>{n.r(a),n.d(a,{default:()=>P});var e=n(3838),t=n.n(e),i=n(6689),r=n.n(i),o=n(9745),l=n(1613),s=n(1006),c=n(8362),u=n.n(c),m=n(7964),d=n(8775),p=n(8779),v=n.n(p);const h=require("react-bootstrap");var f=n(418);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){v()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const g=({event:e,step:t,initialTop:n,initialHeight:a,minHeight:o,maxHeight:l,canResize:s,allowResize:c,allowDrag:u,onResized:p,onUnPublishEvent:v,onEditEvent:_,onClickSelected:g,selectedPublishedEvents:b,onMoveEvent:y})=>{const[D,z]=(0,m.useDrag)((()=>({type:d.DraggableItemTypes.SCHEDULEEVENT,item:{id:e.id,title:e.title,is_published:e.is_published,start_date:e.start_date,end_date:e.end_date,duration:e.duration},collect:e=>({isDragging:e.isDragging()}),canDrag:u&&!e.static})),[e.id,e.duration,e.start_date,e.end_date]),[S,M]=(0,i.useState)({resizing:!1,type:null,lastYPos:null}),[N,Y]=(0,i.useState)({top:n,height:a}),H=(null==b?void 0:b.includes(e.id))||!1,P=!e.static,T=c&&P&&N.height>15,w=()=>r().createElement(h.Popover,{id:"popover-trigger-focus",title:e.title},r().createElement(f.default,null,e.description)),k=n=>{if(!S.resizing)return;let a=S.lastYPos,i=n.pageY,r=i-a;if(t&&t>0){let e=parseInt(Math.round(Math.abs(r)/t));if(r=Math.sign(r)*e*t,!r)return n.preventDefault(),!1}let c=N.height,u=N.top;"S"===S.type&&(c=N.height+r),"N"===S.type&&(r<0?(u=N.top-Math.abs(r),c=N.height+Math.abs(r)):(u=N.top+Math.abs(r),c=N.height-Math.abs(r))),c<o&&(c=o,i=a,u=N.top);let m="function"==typeof l?l():l;c>m&&(c=m,i=a,u=N.top),u<0&&(u=0,c=N.height,i=a),s(e.id,u,c)&&(M(E(E({},S),{},{resizing:!0,lastYPos:i})),Y({top:u,height:c})),n.preventDefault()},O=e=>{e.preventDefault(),M({type:null,lastYPos:null,resizing:!1})};return(0,i.useEffect)((()=>(S.resizing?(document.addEventListener("mousemove",k,!1),document.addEventListener("mouseup",O,!1)):(document.removeEventListener("mousemove",k,!1),document.removeEventListener("mouseup",O,!1),N.top===n&&N.height===a||p(e.id,N.top,N.height)),()=>{document.removeEventListener("mousemove",k,!1),document.removeEventListener("mouseup",O,!1)})),[S.resizing]),r().createElement("div",{className:`row schedule-event ${T?"is-resizable":""} ${P?"":"is-static"}`,"data-resizable":!0,id:`event_${e.id}`,onMouseDown:e=>{if(!e.target.getAttribute("data-resizable"))return;const t=e.target.getBoundingClientRect();let n;if(e.clientY-t.top<10)n="N";else{if(!(t.bottom-e.clientY<10))return;n="S"}M({resizing:!0,type:n,lastYPos:e.pageY}),e.preventDefault()},ref:z,style:{top:N.top,height:N.height,display:D.isDragging?"none":"block",cursor:"move"}},g&&r().createElement("div",{className:"event-select-wrapper"},r().createElement("input",{className:"select-event-btn",id:`selected_event_${e.id}`,type:"checkbox",checked:H,onChange:()=>g(e)})),r().createElement("div",{className:"col-md-12 event-container"},(()=>{let t=null;return t=e.description?r().createElement(h.OverlayTrigger,{trigger:["hover"],placement:"bottom",overlay:w()},r().createElement("div",{className:"event-content"},r().createElement("span",{className:"event-title withTooltip"},`${e.id} - ${e.title}${e.duration?` - ${e.duration/60} minutes`:""}`))):r().createElement("div",{className:"event-content"},r().createElement("span",{className:"event-title"},`${e.id} - ${e.title}${e.duration?` - ${e.duration/60} minutes`:""}`)),t})()),r().createElement("div",{className:"event-actions"},!e.static&&v&&r().createElement("i",{className:"fa fa-minus-circle event-action-btn","aria-hidden":"true",title:"unpublish event",onClick:()=>v(e)}),_&&r().createElement("i",{className:"fa fa-pencil-square-o event-action-btn",title:"edit event","aria-hidden":"true",onClick:()=>_(e)}),y&&r().createElement("i",{className:"fa fa-arrow-circle-right event-action-btn",title:"move event","aria-hidden":"true",onClick:()=>y(e)})))};var b=n(6405),y=n.n(b),D=n(8575);const z=({timeLabel:e,id:t})=>r().createElement("div",{id:t,className:"row time-slot"},r().createElement("div",{className:"col-md-12"},r().createElement("span",null,e))),S=e=>{const{currentDay:t,currentSummit:n,events:a,timeSlot:i,pixelsPerMinute:o,interval:l,canDropEvent:s,onDroppedEvent:c}=e,u=`time_slot_container_${i.format("HH_mm")}`,[p,v]=(0,m.useDrop)((()=>({accept:[d.DraggableItemTypes.UNSCHEDULEEVENT,d.DraggableItemTypes.SCHEDULEEVENT],collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()}),canDrop:(e,r)=>{if(s)return s(e,r);return new D.default(e,n).canMove(a,t,i,l)},drop:(e,t,n)=>{c(e,i)}})),[l,i]),{isOver:h,canDrop:f}=p;return r().createElement("div",{id:u,ref:v,className:"row time-slot-container",style:(()=>{const e={};return h?(e.backgroundColor=f?"green":"red",e.opacity=.5):f&&(e.backgroundColor="yellow",e.opacity=.5),e})()},r().createElement("div",{className:"col-md-12"},((e,t)=>{let n=[],a=5*t;for(var i=0;i<2;i++)n[i]=r().createElement("div",{key:i,className:"minute-container",style:{position:"relative",width:"100%",height:`${a}px`}});return n})(0,o)))},M=e=>{const t=(0,i.useRef)(),n=(0,i.useRef)(),[a,o]=(0,i.useState)([]),[l,s]=(0,i.useState)(null),c=(0,i.useRef)(null);(0,i.useEffect)((()=>{l&&(t.current.scrollTop=l,s(null))}),[l]),(0,i.useEffect)((()=>{const a=n.current/e.interval;s(t.current.scrollTop*a),E(),n.current=e.interval}),[e.interval,e.startTime,e.endTime]);const m=(t,n)=>{e.onScheduleEvent(t,e.currentDay,n)},d=(t,n,a)=>{const{events:i,currentDay:r,startTime:o,pixelsPerMinute:l,currentSummit:s}=e,{height:c}=h();if(c<n+a)return!1;const m=i.filter((e=>e.id!==t)),d=Math.floor(n/(l*(10/N))),p=Math.floor(a/(l*(10/N)));let v=u().tz(r+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);v=v.add(d,"minutes");let f=u().tz(r+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);f=f.add(d+p,"minutes");for(const e of m){const t=u()(1e3*e.start_date).tz(s.time_zone.name),n=u()(1e3*e.end_date).tz(s.time_zone.name);if(t.isBefore(f)&&n.isAfter(v))return!1}return!0},p=(t,n,a)=>{const{events:i,currentDay:r,startTime:o,pixelsPerMinute:l,currentSummit:s}=e,c=i.filter((e=>e.id===t)).shift(),m=Math.floor(n/(l*(10/N))),d=Math.floor(a/(l*(10/N)));let p=u().tz(r+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);p=p.add(m,"minutes"),e.onScheduleEvent(c,r,u()(p.format("HH:mm"),"HH:mm"),d)},v=()=>h().height,h=()=>y().findDOMNode(c.current).getBoundingClientRect(),f=t=>{const{currentDay:n,startTime:a,pixelsPerMinute:i,currentSummit:r}=e,o=u()(1e3*t.start_date).utc().tz(r.time_zone.name),l=u().tz(n+" "+a,"YYYY-MM-DD HH:mm",r.time_zone.name);return o.diff(l,"minutes")*i*(10/N)},_=t=>{const{pixelsPerMinute:n,currentSummit:a,interval:i}=e,r=u()(1e3*t.start_date).tz(a.time_zone.name);return u()(1e3*t.end_date).tz(a.time_zone.name).diff(r,"minutes")*n*(10/i)},E=()=>{const e=[];let t=!1;const n=u().tz(D,"HH:mm",P.time_zone.name),a=u().tz(M,"HH:mm",P.time_zone.name);let i=n;do{e.push(i),i=i.clone(),i.add(N,"m"),t=i.isAfter(a)}while(!t);o(e)},{events:b,startTime:D,endTime:M,interval:N,pixelsPerMinute:Y,currentDay:H,currentSummit:P,canDropEvent:T,onEditEvent:w,onUnPublishEvent:k,onClickSelected:O,selectedPublishedEvents:C}=e;return r().createElement("div",{className:"row outer-schedule-events-container",ref:t},r().createElement("div",{className:"col-md-2 no-margin no-padding"},a.map(((e,t)=>r().createElement(z,{timeLabel:e.format("HH:mm"),key:t,id:e.format("HH_mm")})))),r().createElement("div",{className:"schedule-events-container col-md-10 no-margin no-padding",ref:c},a.map(((e,t)=>r().createElement(S,{timeSlot:e,canDropEvent:T,onDroppedEvent:m,key:`timeslot-${t}`,events:b,currentSummit:P,interval:N,pixelsPerMinute:Y,currentDay:H}))),b.map(((t,n)=>r().createElement(g,{event:t,selectedPublishedEvents:C,key:`event-${t.id}-${t.start_date}-${t.end_date}-${N}`,type:"MAIN",step:5*Y,minHeight:10*Y,initialTop:f(t),initialHeight:_(t),canResize:d,allowResize:e.allowResize,allowDrag:e.allowDrag,onResized:p,maxHeight:v,onUnPublishEvent:k,onEditEvent:w,onClickSelected:O,currentDay:H,onMoveEvent:e.onMoveEvent})))))};var N=n(6793),Y=n(9626);const H=["summit","trackSpaceTime","scheduleEvents","selectedEvents","currentDay","currentVenue","slotSize","hideBulkSelect"],P=e=>{let{summit:n,trackSpaceTime:a,scheduleEvents:c,selectedEvents:u,currentDay:m,currentVenue:p,slotSize:v,hideBulkSelect:h}=e,f=t()(e,H);const _=(0,i.useMemo)((()=>((e,t,n)=>{var a,i;const r=[],o=(0,N.epochToMomentTimeZone)(e.start_date,e.time_zone_id),l=(0,N.epochToMomentTimeZone)(e.end_date,e.time_zone_id);let s=o.clone();const c=(null==t||null===(a=t.find((e=>e.location_id===(null==n?void 0:n.id))))||void 0===a||null===(i=a.allowed_timeframes)||void 0===i?void 0:i.map((t=>(0,N.epochToMomentTimeZone)(t.day,e.time_zone_id).format("YYYY-MM-DD"))))||null;do{const e={value:s.format("YYYY-MM-DD"),label:s.format("dddd Do , MMMM YYYY")};c&&0!==c.length&&!c.includes(e.value)||r.push(e),s=s.clone(),s.add(1,"day")}while(!s.isAfter(l));return r})(n,a,p)),[n.start_date,n.end_date,a,p]),E=(0,i.useMemo)((()=>((e,t)=>{const n=[{value:d.TBALocation,label:d.TBALocation.name}],a=(null==t?void 0:t.map((e=>e.location_id)))||null;return e.locations.filter((e=>{const t="SummitVenue"!==e.class_name,n=!a||a.includes(e.id);return t&&n})).forEach((e=>{const t={value:e,label:e.name};n.push(t),e.hasOwnProperty("rooms")&&e.rooms.forEach((e=>{const t={value:e,label:e.name};n.push(t)}))})),n})(n,a)),[n.locations,a]),g=d.SlotSizeOptions.map((e=>({value:e,label:`${e} min.`}))),{allowResize:b=!0,allowDrag:y=!0}=f,{open:D,close:z}=(0,i.useMemo)((()=>((e,t,n,a)=>{if(e&&t&&n){var i;const r=null===(i=n.find((e=>e.location_id===t.id)))||void 0===i?void 0:i.allowed_timeframes;if((null==r?void 0:r.length)>0){const t=null==r?void 0:r.find((t=>(0,N.epochToMomentTimeZone)(t.day,a).format("YYYY-MM-DD")===e));if(t)return{open:(0,N.parseLocationHour)(t.opening_hour),close:(0,N.parseLocationHour)(t.closing_hour)}}}return null!=t&&t.opening_hour&&null!=t&&t.closing_hour?{open:(0,N.parseLocationHour)(t.opening_hour),close:(0,N.parseLocationHour)(t.closing_hour)}:{open:"00:00",close:"23:50"}})(m,p,a,n.time_zone_id)),[m,p,a]);return(0,i.useEffect)((()=>{m&&!_.find((e=>e.value===m))&&f.onDayChanged(null)}),[p]),r().createElement("div",{className:"schedule-view-wrapper"},f.onSlotSizeChange&&r().createElement("div",{className:"row",style:{marginBottom:12,marginTop:2}},r().createElement("div",{className:"col-md-4"},r().createElement("span",null,"Slot size: "),r().createElement(s.default,{value:v,onChange:f.onSlotSizeChange,options:g,style:{display:"inline-block",marginLeft:10}}))),r().createElement("div",{className:"row"},r().createElement("div",{className:"col-md-6"},r().createElement(l.default,{onVenueChanged:f.onVenueChanged,venues:E,currentValue:p,placeholder:"Select Room"})),r().createElement("div",{className:"col-md-6"},r().createElement(o.default,{onDayChanged:f.onDayChanged,days:_,currentValue:m,placeholder:"Select Day"}))),r().createElement(Y.default,{bulkOptions:f.customBulkOptions||d.bulkOptions,onSelectAll:f.onSelectAll,onSelectedBulkAction:f.onSelectedBulkAction,show:!h&&c.length>0}),m&&p&&r().createElement(M,{startTime:D,endTime:z,currentSummit:n,interval:v,currentDay:m,pixelsPerMinute:d.PixelsPerMinute,canDropEvent:f.canDropEvent,allowResize:b,allowDrag:y,onScheduleEvent:f.onScheduleEvent,events:c,onUnPublishEvent:f.onUnPublishEvent,onEditEvent:f.onEditEvent,onClickSelected:f.onClickSelected,selectedPublishedEvents:u,onMoveEvent:f.onMoveSingleEvent}))}})(),a})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={9626:(e,t,n)=>{n.d(t,{default:()=>s});var a=n(6689),i=n.n(a),r=n(4656),o=n.n(r);class l extends i().Component{onPerformBulkAction(){let e=this.actionTypeSelect.value;""!==e&&this.props.onSelectedBulkAction(e)}render(){let{onSelectAll:e,bulkOptions:t,show:n}=this.props;return i().createElement("div",{className:"bulk-actions-selector-container"},n&&i().createElement("div",{className:"row"},i().createElement("div",{className:"col-md-8"},i().createElement("input",{type:"checkbox",onClick:e}),i().createElement("select",{ref:e=>{this.actionTypeSelect=e}},i().createElement("option",{value:""},o().translate("published_bulk_actions_selector.options.default")),t.map(((e,t)=>i().createElement("option",{key:t,value:e.value},e.label))))),i().createElement("div",{className:"col-md-4"},i().createElement("button",{onClick:this.onPerformBulkAction.bind(this),title:o().translate("published_bulk_actions_selector.titles.go"),className:"btn btn-default btn-sm"},i().createElement("i",{className:"fa fa-play"}," ",o().translate("published_bulk_actions_selector.buttons.go"))))))}}const s=l},1006:(e,t,n)=>{n.d(t,{default:()=>d});var a=n(8213),i=n.n(a),r=n(3838),o=n.n(r),l=n(6689),s=n.n(l);const c="tDZTa8dy9OMVyGAtxNOS",u="VoBl8JcsRZelj8EKGKtC",m=["value","options","onChange"],d=e=>{let{value:t,options:n,onChange:a}=e,r=o()(e,m);const l=e=>{const i=n.findIndex((e=>e.value===t));i>=0&&(e?i<n.length-1&&a(n[i+1].value):i>0&&a(n[i-1].value))},d=n.find((e=>e.value===t)).label;return s().createElement("div",i()({className:c},r),s().createElement("button",{className:"btn btn-default",onClick:()=>l(!1)},s().createElement("i",{className:"fa fa-minus"})),s().createElement("span",{className:u},d),s().createElement("button",{className:"btn btn-default",onClick:()=>l(!0)},s().createElement("i",{className:"fa fa-plus"})))}},9745:(e,t,n)=>{n.d(t,{default:()=>l});var a=n(6689),i=n.n(a),r=n(1929),o=n.n(r);const l=({days:e,currentValue:t,placeholder:n,onDayChanged:a})=>{const r=e.find((e=>e.value===t))||null;return i().createElement(o(),{placeholder:n,className:"day-selector",name:"form-field-name",value:r,onChange:e=>{a((null==e?void 0:e.value)||null)},options:e})}},1613:(e,t,n)=>{n.d(t,{default:()=>d});var a=n(8213),i=n.n(a),r=n(3838),o=n.n(r),l=n(6689),s=n.n(l),c=n(1929),u=n.n(c);const m=["venues","currentValue","placeholder","onVenueChanged"],d=e=>{let{venues:t,currentValue:n,placeholder:a,onVenueChanged:r}=e,l=o()(e,m);const c=t.find((e=>e.value.id===(null==n?void 0:n.id)))||null;return s().createElement(u(),i()({placeholder:a,className:"venues-selector",name:"form-field-name",value:c,onChange:e=>{r((null==e?void 0:e.value)||null)},options:t,optionRenderer:e=>{let t=e.value;return"SummitVenue"===t.class_name?s().createElement("span",{className:"location-option-venue"},t.name):s().createElement("span",{className:"location-option-room"},"- ",t.name)}},l))}},418:(e,t,n)=>{n.d(t,{default:()=>r});var a=n(6689),i=n.n(a);const r=({children:e,replaceNewLine:t=!1,className:n=""})=>i().createElement("span",{className:n,dangerouslySetInnerHTML:{__html:t?null==e?void 0:e.replace(/\n/g,"<br />"):e}})},8775:(e,t,n)=>{n.d(t,{DraggableItemTypes:()=>a,PixelsPerMinute:()=>o,SlotSizeOptions:()=>r,TBALocation:()=>i,bulkOptions:()=>l});const a={UNSCHEDULEEVENT:"UnScheduleEvent",SCHEDULEEVENT:"ScheduleEvent"},i={id:0,name:"TBD",class_name:"SummitVenue"},r=[1,5,10,15,30,60],o=3,l=[{value:"BULK_ACTION_EDIT",label:"Edit"},{value:"BULK_ACTION_UNPUBLISH",label:"Unpublish"}]},8575:(e,t,n)=>{n.d(t,{default:()=>r});var a=n(8362),i=n.n(a);const r=class{constructor(e,t=null){this._event=e,this._summit=t}set summit(e){this._summit=e}get summit(){return this._summit}getId(){return this._event.id}isPublished(){return this._event.hasOwnProperty("is_published")&&this._event.is_published}getMinutesDuration(e){if(this._event.hasOwnProperty("start_date")&&this._event.hasOwnProperty("end_date")&&null!=this._event.start_date&&null!=this._event.end_date){let e=i()(1e3*this._event.start_date).tz(this._summit.time_zone.name);return i()(1e3*this._event.end_date).tz(this._summit.time_zone.name).diff(e,"minutes")}return this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):e}canMove(e,t,n,a){let r=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):a;this.isPublished()&&(r=this.getMinutesDuration());let o=i().tz(t+" "+n.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name),l=i().tz(t+" "+n.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name);l=l.add(r,"minutes");for(let t of e.filter((e=>e.id!==this.getId()))){let e=i()(1e3*t.start_date).tz(this._summit.time_zone.name),n=i()(1e3*t.end_date).tz(this._summit.time_zone.name);if(e.isBefore(l)&&n.isAfter(o))return!1}return!0}calculateNewDates(e,t,n){return n=this._event.hasOwnProperty("duration")&&this._event.duration>0?parseInt(this._event.duration/60):n,[i().tz(e+" "+t.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name),i().tz(e+" "+t.format("HH:mm"),"YYYY-MM-DD HH:mm",this._summit.time_zone.name).add(n,"minutes")]}isValidEndDate(e){if(null==e)return!0;let t=i().tz(1e3*this._event.start_date,this._summit.time_zone.name);e=i().tz(1e3*e,this._summit.time_zone.name);let n=i().tz(1e3*this._summit.end_date,this._summit.time_zone.name);return e.isAfter(t)&&(e.isBefore(n)||e.isSame(n))}isValidStartDate(e){if(null==e)return!0;e=i().tz(1e3*e,this._summit.time_zone.name);let t=i().tz(1e3*this._event.end_date,this._summit.time_zone.name),n=i().tz(1e3*this._summit.start_date,this._summit.time_zone.name);return i().isMoment(e)&&e.isAfter(n)&&e.isBefore(t)}isValidTitle(e){return""!==e.trim()}isValid(){return this.isValidTitle(this._event.title)&&this.isValidStartDate(this._event.start_date)&&this.isValidEndDate(this._event.end_date)}}},6793:(e,t,n)=>{n.d(t,{epochToMomentTimeZone:()=>r,parseLocationHour:()=>o});var a=n(8362),i=n.n(a);n(6530);const r=(e,t)=>e?(e*=1e3,i()(e).tz(t)):e,o=e=>{let t=e.toString();return t.length<4&&(t=`0${t}`),t=t.match(/.{2}/g),t=t.join(":"),t}},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8213:e=>{e.exports=require("@babel/runtime/helpers/extends")},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},4656:e=>{e.exports=require("i18n-react/dist/i18n-react")},8362:e=>{e.exports=require("moment-timezone")},6689:e=>{e.exports=require("react")},7964:e=>{e.exports=require("react-dnd")},6405:e=>{e.exports=require("react-dom")},1929:e=>{e.exports=require("react-select")},6530:e=>{e.exports=require("urijs")}},t={};function n(a){var i=t[a];if(void 0!==i)return i.exports;var r=t[a]={exports:{}};return e[a](r,r.exports,n),r.exports}(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var a={};return(()=>{n.r(a),n.d(a,{default:()=>P});var e=n(3838),t=n.n(e),i=n(6689),r=n.n(i),o=n(9745),l=n(1613),s=n(1006),c=n(8362),u=n.n(c),m=n(7964),d=n(8775),p=n(8779),v=n.n(p);const h=require("react-bootstrap");var f=n(418);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){v()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const g=({event:e,step:t,initialTop:n,initialHeight:a,minHeight:o,maxHeight:l,canResize:s,allowResize:c,allowDrag:u,onResized:p,onUnPublishEvent:v,onEditEvent:_,onClickSelected:g,selectedPublishedEvents:b,onMoveEvent:y})=>{const[D,z]=(0,m.useDrag)((()=>({type:d.DraggableItemTypes.SCHEDULEEVENT,item:{id:e.id,title:e.title,is_published:e.is_published,start_date:e.start_date,end_date:e.end_date,duration:e.duration},collect:e=>({isDragging:e.isDragging()}),canDrag:u&&!e.static})),[e.id,e.duration,e.start_date,e.end_date]),[S,M]=(0,i.useState)({resizing:!1,type:null,lastYPos:null}),[N,Y]=(0,i.useState)({top:n,height:a}),H=(null==b?void 0:b.includes(e.id))||!1,P=!e.static,T=c&&P&&N.height>15,w=()=>r().createElement(h.Popover,{id:"popover-trigger-focus",title:e.title},r().createElement(f.default,null,e.description)),k=n=>{if(!S.resizing)return;let a=S.lastYPos,i=n.pageY,r=i-a;if(t&&t>0){let e=parseInt(Math.round(Math.abs(r)/t));if(r=Math.sign(r)*e*t,!r)return n.preventDefault(),!1}let c=N.height,u=N.top;"S"===S.type&&(c=N.height+r),"N"===S.type&&(r<0?(u=N.top-Math.abs(r),c=N.height+Math.abs(r)):(u=N.top+Math.abs(r),c=N.height-Math.abs(r))),c<o&&(c=o,i=a,u=N.top);let m="function"==typeof l?l():l;c>m&&(c=m,i=a,u=N.top),u<0&&(u=0,c=N.height,i=a),s(e.id,u,c)&&(M(E(E({},S),{},{resizing:!0,lastYPos:i})),Y({top:u,height:c})),n.preventDefault()},O=e=>{e.preventDefault(),M({type:null,lastYPos:null,resizing:!1})};return(0,i.useEffect)((()=>(S.resizing?(document.addEventListener("mousemove",k,!1),document.addEventListener("mouseup",O,!1)):(document.removeEventListener("mousemove",k,!1),document.removeEventListener("mouseup",O,!1),N.top===n&&N.height===a||p(e.id,N.top,N.height)),()=>{document.removeEventListener("mousemove",k,!1),document.removeEventListener("mouseup",O,!1)})),[S.resizing]),r().createElement("div",{className:`row schedule-event ${T?"is-resizable":""} ${P?"":"is-static"}`,"data-resizable":!0,id:`event_${e.id}`,onMouseDown:e=>{if(!e.target.getAttribute("data-resizable"))return;const t=e.target.getBoundingClientRect();let n;if(e.clientY-t.top<10)n="N";else{if(!(t.bottom-e.clientY<10))return;n="S"}M({resizing:!0,type:n,lastYPos:e.pageY}),e.preventDefault()},ref:z,style:{top:N.top,height:N.height,display:D.isDragging?"none":"block",cursor:"move"}},g&&r().createElement("div",{className:"event-select-wrapper"},r().createElement("input",{className:"select-event-btn",id:`selected_event_${e.id}`,type:"checkbox",checked:H,onChange:()=>g(e)})),r().createElement("div",{className:"col-md-12 event-container"},(()=>{let t=null;return t=e.description?r().createElement(h.OverlayTrigger,{trigger:["hover"],placement:"bottom",overlay:w()},r().createElement("div",{className:"event-content"},r().createElement("span",{className:"event-title withTooltip"},`${e.id} - ${e.title}${e.duration?` - ${e.duration/60} minutes`:""}`))):r().createElement("div",{className:"event-content"},r().createElement("span",{className:"event-title"},`${e.id} - ${e.title}${e.duration?` - ${e.duration/60} minutes`:""}`)),t})()),r().createElement("div",{className:"event-actions"},!e.static&&v&&r().createElement("i",{className:"fa fa-minus-circle event-action-btn","aria-hidden":"true",title:"unpublish event",onClick:()=>v(e)}),_&&r().createElement("i",{className:"fa fa-pencil-square-o event-action-btn",title:"edit event","aria-hidden":"true",onClick:()=>_(e)}),y&&r().createElement("i",{className:"fa fa-arrow-circle-right event-action-btn",title:"move event","aria-hidden":"true",onClick:()=>y(e)})))};var b=n(6405),y=n.n(b),D=n(8575);const z=({timeLabel:e,id:t})=>r().createElement("div",{id:t,className:"row time-slot"},r().createElement("div",{className:"col-md-12"},r().createElement("span",null,e))),S=e=>{const{currentDay:t,currentSummit:n,events:a,timeSlot:i,pixelsPerMinute:o,interval:l,canDropEvent:s,onDroppedEvent:c}=e,u=`time_slot_container_${i.format("HH_mm")}`,[p,v]=(0,m.useDrop)((()=>({accept:[d.DraggableItemTypes.UNSCHEDULEEVENT,d.DraggableItemTypes.SCHEDULEEVENT],collect:e=>({isOver:e.isOver(),canDrop:e.canDrop()}),canDrop:(e,r)=>{if(s)return s(e,r);return new D.default(e,n).canMove(a,t,i,l)},drop:(e,t,n)=>{c(e,i)}})),[l,i]),{isOver:h,canDrop:f}=p;return r().createElement("div",{id:u,ref:v,className:"row time-slot-container",style:(()=>{const e={};return h?(e.backgroundColor=f?"green":"red",e.opacity=.5):f&&(e.backgroundColor="yellow",e.opacity=.5),e})()},r().createElement("div",{className:"col-md-12"},((e,t)=>{let n=[],a=5*t;for(var i=0;i<2;i++)n[i]=r().createElement("div",{key:i,className:"minute-container",style:{position:"relative",width:"100%",height:`${a}px`}});return n})(0,o)))},M=e=>{const t=(0,i.useRef)(),n=(0,i.useRef)(),[a,o]=(0,i.useState)([]),[l,s]=(0,i.useState)(null),c=(0,i.useRef)(null);(0,i.useEffect)((()=>{l&&(t.current.scrollTop=l,s(null))}),[l]),(0,i.useEffect)((()=>{const a=n.current/e.interval;s(t.current.scrollTop*a),E(),n.current=e.interval}),[e.interval,e.startTime,e.endTime]);const m=(t,n)=>{e.onScheduleEvent(t,e.currentDay,n)},d=(t,n,a)=>{const{events:i,currentDay:r,startTime:o,pixelsPerMinute:l,currentSummit:s}=e,{height:c}=h();if(c<n+a)return!1;const m=i.filter((e=>e.id!==t)),d=Math.floor(n/(l*(10/N))),p=Math.floor(a/(l*(10/N)));let v=u().tz(r+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);v=v.add(d,"minutes");let f=u().tz(r+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);f=f.add(d+p,"minutes");for(const e of m){const t=u()(1e3*e.start_date).tz(s.time_zone.name),n=u()(1e3*e.end_date).tz(s.time_zone.name);if(t.isBefore(f)&&n.isAfter(v))return!1}return!0},p=(t,n,a)=>{const{events:i,currentDay:r,startTime:o,pixelsPerMinute:l,currentSummit:s}=e,c=i.filter((e=>e.id===t)).shift(),m=Math.floor(n/(l*(10/N))),d=Math.floor(a/(l*(10/N)));let p=u().tz(r+" "+o,"YYYY-MM-DD HH:mm",s.time_zone.name);p=p.add(m,"minutes"),e.onScheduleEvent(c,r,u()(p.format("HH:mm"),"HH:mm"),d)},v=()=>h().height,h=()=>y().findDOMNode(c.current).getBoundingClientRect(),f=t=>{const{currentDay:n,startTime:a,pixelsPerMinute:i,currentSummit:r}=e,o=u()(1e3*t.start_date).utc().tz(r.time_zone.name),l=u().tz(n+" "+a,"YYYY-MM-DD HH:mm",r.time_zone.name);return o.diff(l,"minutes")*i*(10/N)},_=t=>{const{pixelsPerMinute:n,currentSummit:a,interval:i}=e,r=u()(1e3*t.start_date).tz(a.time_zone.name);return u()(1e3*t.end_date).tz(a.time_zone.name).diff(r,"minutes")*n*(10/i)},E=()=>{const e=[];let t=!1;const n=u().tz(D,"HH:mm",P.time_zone.name),a=u().tz(M,"HH:mm",P.time_zone.name);let i=n;do{e.push(i),i=i.clone(),i.add(N,"m"),t=i.isAfter(a)}while(!t);o(e)},{events:b,startTime:D,endTime:M,interval:N,pixelsPerMinute:Y,currentDay:H,currentSummit:P,canDropEvent:T,onEditEvent:w,onUnPublishEvent:k,onClickSelected:O,selectedPublishedEvents:C}=e;return r().createElement("div",{className:"row outer-schedule-events-container",ref:t},r().createElement("div",{className:"col-md-2 no-margin no-padding"},a.map(((e,t)=>r().createElement(z,{timeLabel:e.format("HH:mm"),key:t,id:e.format("HH_mm")})))),r().createElement("div",{className:"schedule-events-container col-md-10 no-margin no-padding",ref:c},a.map(((e,t)=>r().createElement(S,{timeSlot:e,canDropEvent:T,onDroppedEvent:m,key:`timeslot-${t}`,events:b,currentSummit:P,interval:N,pixelsPerMinute:Y,currentDay:H}))),b.map(((t,n)=>r().createElement(g,{event:t,selectedPublishedEvents:C,key:`event-${t.id}-${t.start_date}-${t.end_date}-${N}`,type:"MAIN",step:5*Y,minHeight:10*Y,initialTop:f(t),initialHeight:_(t),canResize:d,allowResize:e.allowResize,allowDrag:e.allowDrag,onResized:p,maxHeight:v,onUnPublishEvent:k,onEditEvent:w,onClickSelected:O,currentDay:H,onMoveEvent:e.onMoveEvent})))))};var N=n(6793),Y=n(9626);const H=["summit","trackSpaceTime","scheduleEvents","selectedEvents","currentDay","currentVenue","slotSize","hideBulkSelect"],P=e=>{let{summit:n,trackSpaceTime:a,scheduleEvents:c,selectedEvents:u,currentDay:m,currentVenue:p,slotSize:v,hideBulkSelect:h}=e,f=t()(e,H);const _=(0,i.useMemo)((()=>((e,t,n)=>{var a,i;const r=[],o=(0,N.epochToMomentTimeZone)(e.start_date,e.time_zone_id),l=(0,N.epochToMomentTimeZone)(e.end_date,e.time_zone_id);let s=o.clone();const c=(null==t||null===(a=t.find((e=>e.location_id===(null==n?void 0:n.id))))||void 0===a||null===(i=a.allowed_timeframes)||void 0===i?void 0:i.map((t=>(0,N.epochToMomentTimeZone)(t.day,e.time_zone_id).format("YYYY-MM-DD"))))||null;do{const e={value:s.format("YYYY-MM-DD"),label:s.format("dddd Do , MMMM YYYY")};c&&0!==c.length&&!c.includes(e.value)||r.push(e),s=s.clone(),s.add(1,"day")}while(!s.isAfter(l));return r})(n,a,p)),[n.start_date,n.end_date,a,p]),E=(0,i.useMemo)((()=>((e,t)=>{const n=[{value:d.TBALocation,label:d.TBALocation.name}],a=(null==t?void 0:t.map((e=>e.location_id)))||null;return e.locations.filter((e=>{const t="SummitVenue"!==e.class_name,n=!a||a.includes(e.id);return t&&n})).forEach((e=>{const t={value:e,label:e.name};n.push(t),e.hasOwnProperty("rooms")&&e.rooms.forEach((e=>{const t={value:e,label:e.name};n.push(t)}))})),n})(n,a)),[n.locations,a]),g=d.SlotSizeOptions.map((e=>({value:e,label:`${e} min.`}))),{allowResize:b=!0,allowDrag:y=!0}=f,{open:D,close:z}=(0,i.useMemo)((()=>((e,t,n,a)=>{if(e&&t&&n){var i;const r=null===(i=n.find((e=>e.location_id===t.id)))||void 0===i?void 0:i.allowed_timeframes;if((null==r?void 0:r.length)>0){const t=null==r?void 0:r.find((t=>(0,N.epochToMomentTimeZone)(t.day,a).format("YYYY-MM-DD")===e));if(t)return{open:(0,N.parseLocationHour)(t.opening_hour),close:(0,N.parseLocationHour)(t.closing_hour)}}}return null!=t&&t.opening_hour&&null!=t&&t.closing_hour?{open:(0,N.parseLocationHour)(t.opening_hour),close:(0,N.parseLocationHour)(t.closing_hour)}:{open:"00:00",close:"23:50"}})(m,p,a,n.time_zone_id)),[m,p,a]);return(0,i.useEffect)((()=>{m&&!_.find((e=>e.value===m))&&f.onDayChanged(null)}),[p]),r().createElement("div",{className:"schedule-view-wrapper"},f.onSlotSizeChange&&r().createElement("div",{className:"row",style:{marginBottom:12,marginTop:2}},r().createElement("div",{className:"col-md-12"},r().createElement("span",null,"Slot size: "),r().createElement(s.default,{value:v,onChange:f.onSlotSizeChange,options:g,style:{display:"inline-block",marginLeft:10}}))),r().createElement("div",{className:"row"},r().createElement("div",{className:"col-md-6"},r().createElement(l.default,{onVenueChanged:f.onVenueChanged,venues:E,currentValue:p,placeholder:"Select Room"})),r().createElement("div",{className:"col-md-6"},r().createElement(o.default,{onDayChanged:f.onDayChanged,days:_,currentValue:m,placeholder:"Select Day"}))),r().createElement(Y.default,{bulkOptions:f.customBulkOptions||d.bulkOptions,onSelectAll:f.onSelectAll,onSelectedBulkAction:f.onSelectedBulkAction,show:!h&&c.length>0}),m&&p&&r().createElement(M,{startTime:D,endTime:z,currentSummit:n,interval:v,currentDay:m,pixelsPerMinute:d.PixelsPerMinute,canDropEvent:f.canDropEvent,allowResize:b,allowDrag:y,onScheduleEvent:f.onScheduleEvent,events:c,onUnPublishEvent:f.onUnPublishEvent,onEditEvent:f.onEditEvent,onClickSelected:f.onClickSelected,selectedPublishedEvents:u,onMoveEvent:f.onMoveSingleEvent}))}})(),a})()));
|
|
2
2
|
//# sourceMappingURL=schedule-builder-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/schedule-builder-view.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,0GCOT,MAAMC,UAA0CC,IAAAA,UAE5CC,sBACI,IAAIC,EAAqBJ,KAAKK,iBAAiBC,MACrB,KAAvBF,GACHJ,KAAKO,MAAMC,qBAAqBJ,EACnC,CAEDK,SACI,IAAI,YAAEC,EAAF,YAAeC,EAAf,KAA4BC,GAASZ,KAAKO,MAC9C,OACI,yBAAKM,UAAU,mCACVD,GACD,yB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AAMG,YACnBF,qBAAsBD,EAAMC,qBAC5BI,MAAO+Q,GAAkBH,EAAetP,OAAS,IAGpD4L,GAAc4D,GACX,kBAAC,EAAD,CACInM,UAAW4N,EACXhD,QAASiD,EACTrF,cAAe7J,EACfsB,SAAUd,EACVoJ,WAAYA,EACZI,gBAAiBnK,EAAAA,gBACjBoK,aAAc5N,EAAM4N,aACpB5E,YAAaA,EACbC,UAAWA,EACX4G,gBAAiB7P,EAAM6P,gBACvBpC,OAAQwD,EACR9H,iBAAkBnJ,EAAMmJ,iBACxBC,YAAapJ,EAAMoJ,YACnBC,gBAAiBrJ,EAAMqJ,gBACvBC,wBAAyB4H,EACzB3H,YAAavJ,EAAMyT,oBAzDnC,C","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/bulk-actions-selector/index.js","webpack://openstack-uicore-foundation/./src/components/inputs/stepped-select/index.module.less?b434","webpack://openstack-uicore-foundation/./src/components/inputs/stepped-select/index.jsx","webpack://openstack-uicore-foundation/./src/components/inputs/summit-days-select.js","webpack://openstack-uicore-foundation/./src/components/inputs/summit-venues-select.js","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/./src/components/schedule-builder-view/constants.js","webpack://openstack-uicore-foundation/./src/models/summit-event.js","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-dnd\"","webpack://openstack-uicore-foundation/external commonjs \"react-dom\"","webpack://openstack-uicore-foundation/external commonjs \"react-select\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/external commonjs \"react-bootstrap\"","webpack://openstack-uicore-foundation/./src/components/schedule-builder-view/schedule-event.js","webpack://openstack-uicore-foundation/./src/components/schedule-builder-view/schedule-event-list.js","webpack://openstack-uicore-foundation/./src/components/schedule-builder-view/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport T from \"i18n-react/dist/i18n-react\";\nimport './styles.less';\nclass ScheduleAdminsBulkActionsSelector extends React.Component {\n\n onPerformBulkAction(){\n let selectedBulkAction = this.actionTypeSelect.value;\n if(selectedBulkAction === '') return;\n this.props.onSelectedBulkAction(selectedBulkAction);\n }\n\n render(){\n let { onSelectAll, bulkOptions, show } = this.props;\n return (\n <div className=\"bulk-actions-selector-container\">\n {show &&\n <div className=\"row\">\n <div className=\"col-md-8\">\n <input type=\"checkbox\" onClick={onSelectAll}/>\n <select ref={(select) => { this.actionTypeSelect = select; }}>\n <option value=\"\">{T.translate(\"published_bulk_actions_selector.options.default\")}</option>\n {\n bulkOptions.map((option, idx) => (\n <option key={idx} value={option.value}>{option.label}</option>\n ))\n }\n </select>\n </div>\n <div className=\"col-md-4\">\n <button onClick={this.onPerformBulkAction.bind(this)} title={ T.translate(\"published_bulk_actions_selector.titles.go\")} className=\"btn btn-default btn-sm\">\n <i className=\"fa fa-play\"> {T.translate(\"published_bulk_actions_selector.buttons.go\")}</i>\n </button>\n </div>\n </div>\n }\n </div>\n )\n }\n}\n\nexport default ScheduleAdminsBulkActionsSelector;\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"tDZTa8dy9OMVyGAtxNOS\",\"valueBox\":\"VoBl8JcsRZelj8EKGKtC\"};","import React from 'react';\nimport styles from './index.module.less';\n\nexport default ({value, options, onChange, ...rest}) => {\n\n const handleChange = (increment) => {\n const currentOptionKey = options.findIndex(op => op.value === value);\n if (currentOptionKey >= 0) {\n if (increment) {\n if (currentOptionKey < options.length -1) {\n onChange(options[currentOptionKey + 1].value);\n }\n } else {\n if (currentOptionKey > 0) {\n onChange(options[currentOptionKey - 1].value);\n }\n }\n }\n };\n\n const valueLabel = options.find(op => op.value === value).label;\n\n return (\n <div className={styles.wrapper} {...rest}>\n <button className=\"btn btn-default\" onClick={() => handleChange(false)}>\n <i className=\"fa fa-minus\"/>\n </button>\n <span className={styles.valueBox}>{valueLabel}</span>\n <button className=\"btn btn-default\" onClick={() => handleChange(true)}>\n <i className=\"fa fa-plus\"/>\n </button>\n </div>\n );\n};\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport Select from 'react-select';\n\nconst SummitDaysSelect = ({ days, currentValue, placeholder, onDayChanged }) => {\n const theValue = days.find(op => op.value === currentValue) || null;\n\n const onChange = (selectedOption) => {\n onDayChanged(selectedOption?.value || null);\n };\n\n return (\n <Select\n placeholder={placeholder} //T.translate(\"schedule.placeholders.select_day\")\n className=\"day-selector\"\n name=\"form-field-name\"\n value={theValue}\n onChange={onChange}\n options={days}\n />\n );\n}\n\nexport default SummitDaysSelect;\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport Select from 'react-select';\n\nconst SummitVenuesSelect = ({venues, currentValue, placeholder, onVenueChanged, ...rest}) => {\n const parsedValue = venues.find(v => v.value.id === currentValue?.id) || null;\n const renderOption = (option) => {\n let location = option.value;\n if (location.class_name === 'SummitVenue')\n return (<span className=\"location-option-venue\">{location.name}</span>);\n return (<span className=\"location-option-room\">- {location.name}</span>);\n }\n\n const onChange = (selectedOption) => {\n onVenueChanged(selectedOption?.value || null);\n }\n\n return (\n <Select\n placeholder={placeholder}\n className=\"venues-selector\"\n name=\"form-field-name\"\n value={parsedValue}\n onChange={onChange}\n options={venues}\n optionRenderer={renderOption}\n {...rest}\n />\n );\n}\n\nexport default SummitVenuesSelect;\n","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\"}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} />\n\nexport default RawHTML;","export const DraggableItemTypes = {\n UNSCHEDULEEVENT: 'UnScheduleEvent',\n SCHEDULEEVENT: 'ScheduleEvent',\n};\n\nexport const TBALocation = {id : 0, name : 'TBD', class_name: 'SummitVenue'};\nexport const SlotSizeOptions = [1,5,10,15,30,60]; // 12 - 6 - 4 - 2 - 1\nexport const PixelsPerMinute = 3;\n\nexport const BulkActionEdit = 'BULK_ACTION_EDIT';\nexport const BulkActionPublish = 'BULK_ACTION_PUBLISH';\nexport const BulkActionUnPublish = 'BULK_ACTION_UNPUBLISH';\n\nexport const bulkOptions = [\n {value: BulkActionEdit, label: 'Edit'},\n {value: BulkActionUnPublish, label: 'Unpublish'},\n];\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport moment from 'moment-timezone'\n\nclass SummitEvent {\n\n constructor(event, summit = null){\n this._event = event;\n this._summit = summit;\n }\n\n set summit(summit){\n this._summit = summit;\n }\n\n get summit(){\n return this._summit;\n }\n\n getId(){\n return this._event.id;\n }\n\n isPublished(){\n return this._event.hasOwnProperty('is_published') && this._event.is_published;\n }\n\n getMinutesDuration(slotSize){\n\n if(this._event.hasOwnProperty('start_date') && this._event.hasOwnProperty('end_date') && this._event.start_date != null && this._event.end_date != null ) {\n let eventStartDateTime = moment(this._event.start_date * 1000).tz(this._summit.time_zone.name);\n let eventEndDateTime = moment(this._event.end_date * 1000).tz(this._summit.time_zone.name);\n return eventEndDateTime.diff(eventStartDateTime, 'minutes');\n }\n // default\n\n return this._event.hasOwnProperty('duration') && this._event.duration > 0 ? parseInt( this._event.duration / 60 ) : slotSize;\n }\n\n canMove(siblings, day, startTime, interval){\n\n let duration = this._event.hasOwnProperty('duration') && this._event.duration > 0 ? parseInt( this._event.duration / 60 ) : interval;\n // check if published to get real duration ...\n if(this.isPublished())\n duration = this.getMinutesDuration();\n\n let startDateTime = moment.tz(day+' '+ startTime.format('HH:mm'), 'YYYY-MM-DD HH:mm', this._summit.time_zone.name);\n let endDateTime = moment.tz(day+' '+ startTime.format('HH:mm'), 'YYYY-MM-DD HH:mm', this._summit.time_zone.name);\n endDateTime = endDateTime.add(duration, 'minutes');\n\n // check siblings overlap\n for (let auxEvent of siblings.filter(item => item.id !== this.getId())) {\n let auxEventStartDateTime = moment(auxEvent.start_date * 1000).tz(this._summit.time_zone.name);\n let auxEventEndDateTime = moment(auxEvent.end_date * 1000).tz(this._summit.time_zone.name);\n\n // if time segments overlap\n if(auxEventStartDateTime.isBefore(endDateTime) && auxEventEndDateTime.isAfter(startDateTime))\n return false;\n }\n\n return true;\n }\n\n calculateNewDates(day, startTime, minutes){\n\n minutes = this._event.hasOwnProperty('duration') && this._event.duration > 0 ?\n parseInt( this._event.duration / 60 ) : minutes;\n\n let newStarDateTime = moment.tz(day+' '+startTime.format('HH:mm'), 'YYYY-MM-DD HH:mm', this._summit.time_zone.name);\n let newEndDateTime = moment.tz(day+' '+startTime.format('HH:mm'), 'YYYY-MM-DD HH:mm', this._summit.time_zone.name).add(minutes, 'minutes');\n return [newStarDateTime, newEndDateTime];\n }\n\n isValidEndDate(endDate){\n if(endDate == null) return true;\n let startDate = moment.tz(this._event.start_date * 1000, this._summit.time_zone.name);\n endDate = moment.tz(endDate * 1000, this._summit.time_zone.name);\n let summitEndDate = moment.tz(this._summit.end_date * 1000, this._summit.time_zone.name);\n return endDate.isAfter(startDate) && (endDate.isBefore(summitEndDate) || endDate.isSame(summitEndDate));\n }\n\n isValidStartDate(startDate){\n if(startDate == null) return true;\n startDate = moment.tz(startDate* 1000, this._summit.time_zone.name);\n let endDate = moment.tz(this._event.end_date * 1000, this._summit.time_zone.name);\n let summitStartDate = moment.tz(this._summit.start_date * 1000, this._summit.time_zone.name);\n return moment.isMoment(startDate) && startDate.isAfter(summitStartDate) && startDate.isBefore(endDate);\n }\n\n isValidTitle(title){\n return title.trim() !== '';\n }\n\n isValid(){\n return this.isValidTitle(this._event.title)\n && this.isValidStartDate(this._event.start_date)\n && this.isValidEndDate(this._event.end_date);\n }\n\n}\n\nexport default SummitEvent;\n","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\n}\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"react\");","module.exports = require(\"react-dnd\");","module.exports = require(\"react-dom\");","module.exports = require(\"react-select\");","module.exports = require(\"urijs\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-bootstrap\");","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, {useState, useEffect} from 'react';\nimport {DraggableItemTypes} from './constants';\nimport {useDrag} from 'react-dnd';\nimport {Popover, OverlayTrigger} from 'react-bootstrap';\nimport RawHTML from '../raw-html';\n\nconst RESIZING_DIR_NORTH = 'N';\nconst RESIZING_DIR_SOUTH = 'S';\n\nconst ScheduleEvent = ({\n event,\n step,\n initialTop,\n initialHeight,\n minHeight,\n maxHeight,\n canResize,\n allowResize,\n allowDrag,\n onResized,\n onUnPublishEvent,\n onEditEvent,\n onClickSelected,\n selectedPublishedEvents,\n onMoveEvent\n }) => {\n const [collected, drag] = useDrag(() => ({\n type: DraggableItemTypes.SCHEDULEEVENT,\n item: {id: event.id, title: event.title, is_published: event.is_published, start_date: event.start_date, end_date: event.end_date, duration: event.duration},\n collect: (monitor) => ({\n isDragging: monitor.isDragging(),\n }),\n canDrag: allowDrag && !event.static\n }), [event.id, event.duration, event.start_date, event.end_date]);\n const [resizeInfo, setResizeInfo] = useState({resizing: false, type: null, lastYPos: null});\n const [size, setSize] = useState({top: initialTop, height: initialHeight});\n const isSelected = selectedPublishedEvents?.includes(event.id) || false;\n const canEdit = !event.static;\n const isResizable = allowResize && canEdit && size.height > 15;\n\n const popoverHoverFocus = () =>\n <Popover id=\"popover-trigger-focus\" title={event.title}>\n <RawHTML>{event.description}</RawHTML>\n </Popover>\n\n // resize behavior\n\n const onMouseDown = (evt) => {\n if (!evt.target.getAttribute('data-resizable')) return;\n\n const box = evt.target.getBoundingClientRect();\n\n let type;\n if (evt.clientY - box.top < 10) {\n type = RESIZING_DIR_NORTH;\n } else if (box.bottom - evt.clientY < 10) {\n type = RESIZING_DIR_SOUTH;\n } else {\n return;\n }\n\n setResizeInfo({resizing: true, type, lastYPos: evt.pageY});\n\n evt.preventDefault();\n }\n\n const onMouseMove = (evt) => {\n if (!resizeInfo.resizing) return;\n\n let lastYPos = resizeInfo.lastYPos;\n let newYPos = evt.pageY;\n let deltaY = newYPos - lastYPos;\n\n if (step && step > 0) {\n let steps = parseInt(Math.round(Math.abs(deltaY) / step));\n deltaY = Math.sign(deltaY) * steps * step;\n if (!deltaY) {\n evt.preventDefault();\n return false;\n }\n }\n\n let newHeight = size.height;\n let newTop = size.top;\n\n if (resizeInfo.type === RESIZING_DIR_SOUTH) {\n newHeight = size.height + deltaY;\n }\n\n if (resizeInfo.type === RESIZING_DIR_NORTH) {\n if (deltaY < 0) {\n newTop = size.top - Math.abs(deltaY);\n newHeight = size.height + Math.abs(deltaY);\n } else {\n newTop = size.top + Math.abs(deltaY);\n newHeight = size.height - Math.abs(deltaY);\n }\n }\n\n // check constraints\n if (newHeight < minHeight) {\n newHeight = minHeight;\n newYPos = lastYPos;\n newTop = size.top;\n }\n\n let maxHeightTmp = (typeof maxHeight === \"function\") ? maxHeight() : maxHeight;\n\n if (newHeight > maxHeightTmp) {\n newHeight = maxHeightTmp;\n newYPos = lastYPos;\n newTop = size.top;\n }\n\n if (newTop < 0) {\n newTop = 0;\n newHeight = size.height;\n newYPos = lastYPos;\n }\n\n if (canResize(event.id, newTop, newHeight)) {\n setResizeInfo({\n ...resizeInfo,\n resizing: true,\n lastYPos: newYPos\n });\n\n setSize({\n top: newTop,\n height: newHeight,\n });\n }\n\n evt.preventDefault();\n };\n\n const onMouseUp = (evt) => {\n evt.preventDefault();\n setResizeInfo({type: null, lastYPos: null, resizing: false});\n };\n \n const eventTitleBlock = () => {\n let block = null;\n \n if (event.description) {\n block = (<OverlayTrigger trigger={['hover']} placement=\"bottom\" overlay={popoverHoverFocus()}>\n <div className=\"event-content\">\n <span className=\"event-title withTooltip\">{`${event.id} - ${event.title}${event.duration ? ` - ${event.duration/60} minutes` : ''}`}</span>\n </div>\n </OverlayTrigger>);\n } else {\n block = (<div className=\"event-content\">\n <span className=\"event-title\">{`${event.id} - ${event.title}${event.duration ? ` - ${event.duration/60} minutes` : ''}`}</span>\n </div>);\n }\n \n return block;\n }\n\n // end resize behavior\n\n useEffect(() => {\n if (resizeInfo.resizing) {\n document.addEventListener('mousemove', onMouseMove, false);\n document.addEventListener('mouseup', onMouseUp, false);\n } else {\n document.removeEventListener('mousemove', onMouseMove, false);\n document.removeEventListener('mouseup', onMouseUp, false);\n\n if (size.top !== initialTop || size.height !== initialHeight) {\n onResized(event.id, size.top, size.height);\n }\n }\n\n return () => {\n document.removeEventListener('mousemove', onMouseMove, false);\n document.removeEventListener('mouseup', onMouseUp, false);\n }\n }, [resizeInfo.resizing])\n\n return (\n <div\n className={`row schedule-event ${isResizable ? 'is-resizable' : ''} ${canEdit ? '' : 'is-static'}`}\n data-resizable={true}\n id={`event_${event.id}`}\n onMouseDown={onMouseDown}\n ref={drag}\n style={{\n top: size.top,\n height: size.height,\n display: collected.isDragging ? 'none' : 'block',\n cursor: 'move',\n }}\n >\n {onClickSelected &&\n <div className=\"event-select-wrapper\">\n <input\n className=\"select-event-btn\"\n id={`selected_event_${event.id}`}\n type=\"checkbox\"\n checked={isSelected}\n onChange={() => onClickSelected(event)}\n />\n </div>\n }\n <div className=\"col-md-12 event-container\">\n {eventTitleBlock()}\n </div>\n <div className=\"event-actions\">\n {!event.static && onUnPublishEvent &&\n <i\n className=\"fa fa-minus-circle event-action-btn\"\n aria-hidden=\"true\"\n title=\"unpublish event\"\n onClick={() => onUnPublishEvent(event)}\n />\n }\n {onEditEvent &&\n <i\n className=\"fa fa-pencil-square-o event-action-btn\"\n title=\"edit event\"\n aria-hidden=\"true\"\n onClick={() => onEditEvent(event)}\n />\n }\n {onMoveEvent &&\n <i\n className=\"fa fa-arrow-circle-right event-action-btn\"\n title=\"move event\"\n aria-hidden=\"true\"\n onClick={() => onMoveEvent(event)}\n />\n }\n </div>\n </div>\n );\n}\n\nexport default ScheduleEvent;\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributschedule-event-list'ed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, {useEffect, useRef, useState} from 'react';\nimport moment from 'moment-timezone'\nimport {useDrop} from 'react-dnd'\nimport {DraggableItemTypes} from './constants';\nimport ScheduleEvent from './schedule-event';\nimport ReactDOM from 'react-dom';\nimport SummitEvent from '../../models/summit-event';\n\nconst TimeSlot = ({timeLabel, id}) => {\n return (\n <div id={id} className=\"row time-slot\">\n <div className=\"col-md-12\">\n <span>{timeLabel}</span>\n </div>\n </div>\n )\n}\n\nconst TimeSlotContainer = ( props ) => {\n const {currentDay, currentSummit, events, timeSlot, pixelsPerMinute, interval, canDropEvent, onDroppedEvent} = props;\n const divId = `time_slot_container_${timeSlot.format('HH_mm')}`;\n const [collectedProps, drop] = useDrop(() => ({\n accept: [DraggableItemTypes.UNSCHEDULEEVENT, DraggableItemTypes.SCHEDULEEVENT],\n collect: (monitor) => ({\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop()\n }),\n canDrop: (item, monitor) => {\n if (canDropEvent) return canDropEvent(item, monitor);\n const eventModel = new SummitEvent(item, currentSummit);\n return eventModel.canMove(events, currentDay, timeSlot, interval);\n },\n drop: (item, monitor, component) => {\n onDroppedEvent(item, timeSlot);\n }\n }), [interval, timeSlot]);\n const {isOver, canDrop} = collectedProps;\n\n const renderMinutesContainer = (interval, pixelsPerMinute) => {\n let minutesContainers = [];\n let container_count = 2;\n let container_height = pixelsPerMinute * 5;\n\n for (var i = 0; i < container_count; i++) {\n\n minutesContainers[i] = <div key={i} className=\"minute-container\" style={{\n position: 'relative',\n width: '100%',\n height: `${container_height}px`\n }}/>;\n }\n\n return minutesContainers;\n };\n\n const placeHolderStyle = () => {\n const style = {};\n\n if (isOver) {\n style.backgroundColor = canDrop ? 'green' : 'red';\n style.opacity = 0.5;\n } else if (canDrop) {\n style.backgroundColor = 'yellow';\n style.opacity = 0.5;\n }\n\n return style;\n }\n\n return (\n <div id={divId} ref={drop} className=\"row time-slot-container\" style={placeHolderStyle()}>\n <div className=\"col-md-12\">\n {renderMinutesContainer(interval, pixelsPerMinute)}\n </div>\n </div>\n );\n};\n\nconst ScheduleEventList = (props) => {\n const listRef = useRef();\n const prevIntervalRef = useRef();\n const [timeSlotsList, setTimeSlotsList] = useState([]);\n const [newScrollTop, setNewScrollTop] = useState(null);\n const scheduleEventContainer = useRef(null);\n \n // sets scrollbar position after interval change and render\n useEffect(() => {\n if (newScrollTop) {\n listRef.current.scrollTop = newScrollTop;\n setNewScrollTop(null);\n }\n }, [newScrollTop]);\n\n useEffect(() => {\n const slotChangeRatio = prevIntervalRef.current / props.interval;\n // set scroll pos to set scrollbar after render\n setNewScrollTop(listRef.current.scrollTop * slotChangeRatio);\n createSlots();\n prevIntervalRef.current = props.interval;\n }, [props.interval, props.startTime, props.endTime]);\n\n const onDroppedEvent = (event, startTime) => {\n props.onScheduleEvent(event, props.currentDay, startTime);\n }\n\n const canResize = (eventId, newTop, newHeight) => {\n const {events, currentDay, startTime, pixelsPerMinute, currentSummit} = props;\n const {height} = getBoundingBox();\n\n if (height < (newTop + newHeight)) {\n return false;\n }\n\n const filteredEvents = events.filter(evt => {\n return evt.id !== eventId;\n });\n // calculate new event start date, end date\n const minutes = Math.floor(newTop / (pixelsPerMinute * (10 / interval)));\n const duration = Math.floor(newHeight / (pixelsPerMinute * (10 / interval)));\n\n let startDateTime = moment.tz(currentDay + ' ' + startTime, 'YYYY-MM-DD HH:mm', currentSummit.time_zone.name);\n startDateTime = startDateTime.add(minutes, 'minutes');\n let endDateTime = moment.tz(currentDay + ' ' + startTime, 'YYYY-MM-DD HH:mm', currentSummit.time_zone.name);\n endDateTime = endDateTime.add(minutes + duration, 'minutes');\n\n for (const auxEvent of filteredEvents) {\n const auxEventStartDateTime = moment(auxEvent.start_date * 1000).tz(currentSummit.time_zone.name);\n const auxEventEndDateTime = moment(auxEvent.end_date * 1000).tz(currentSummit.time_zone.name);\n // if time segments overlap\n if (auxEventStartDateTime.isBefore(endDateTime) && auxEventEndDateTime.isAfter(startDateTime))\n return false;\n }\n\n return true;\n }\n\n const onResized = (eventId, newTop, newHeight) => {\n const {events, currentDay, startTime, pixelsPerMinute, currentSummit} = props;\n const event = events.filter(evt => {\n return evt.id === eventId;\n }).shift();\n const minutes = Math.floor(newTop / (pixelsPerMinute * (10 / interval)));\n const duration = Math.floor(newHeight / (pixelsPerMinute * (10 / interval)));\n let startDateTime = moment.tz(currentDay + ' ' + startTime, 'YYYY-MM-DD HH:mm', currentSummit.time_zone.name);\n startDateTime = startDateTime.add(minutes, 'minutes');\n\n props.onScheduleEvent(event, currentDay, moment(startDateTime.format('HH:mm'), 'HH:mm'), duration);\n }\n\n const getMaxHeight = () => {\n return getBoundingBox().height;\n }\n\n const getBoundingBox = () => {\n return ReactDOM.findDOMNode(scheduleEventContainer.current).getBoundingClientRect();\n }\n\n const calculateInitialTop = (event) => {\n const {currentDay, startTime, pixelsPerMinute, currentSummit} = props;\n const eventStartDateTime = moment(event.start_date * 1000).utc().tz(currentSummit.time_zone.name);\n const dayStartDateTime = moment.tz(currentDay + ' ' + startTime, 'YYYY-MM-DD HH:mm', currentSummit.time_zone.name);\n const minutes = eventStartDateTime.diff(dayStartDateTime, 'minutes');\n return minutes * pixelsPerMinute * (10 / interval);\n }\n\n const calculateInitialHeight = (event) => {\n const {pixelsPerMinute, currentSummit, interval} = props;\n const eventStartDateTime = moment(event.start_date * 1000).tz(currentSummit.time_zone.name);\n const eventEndDateTime = moment(event.end_date * 1000).tz(currentSummit.time_zone.name);\n const minutes = eventEndDateTime.diff(eventStartDateTime, 'minutes');\n return minutes * pixelsPerMinute * (10 / interval);\n }\n\n const createSlots = () => {\n const tmpList = [];\n let done = false;\n const startTimeTZ = moment.tz(startTime, 'HH:mm', currentSummit.time_zone.name);\n const endTimeTZ = moment.tz(endTime, 'HH:mm', currentSummit.time_zone.name);\n // create UI\n let slot = startTimeTZ;\n do {\n tmpList.push(slot);\n slot = slot.clone();\n slot.add(interval, 'm');\n done = slot.isAfter(endTimeTZ);\n } while (!done);\n\n setTimeSlotsList(tmpList);\n };\n\n const {\n events,\n startTime,\n endTime,\n interval,\n pixelsPerMinute,\n currentDay,\n currentSummit,\n canDropEvent,\n onEditEvent,\n onUnPublishEvent,\n onClickSelected,\n selectedPublishedEvents\n } = props;\n\n return (\n <div className=\"row outer-schedule-events-container\" ref={listRef}>\n <div className=\"col-md-2 no-margin no-padding\">\n {\n timeSlotsList.map((slot, idx) => (\n <TimeSlot timeLabel={slot.format(\"HH:mm\")} key={idx} id={slot.format(\"HH_mm\")}/>\n ))\n }\n </div>\n <div\n className=\"schedule-events-container col-md-10 no-margin no-padding\"\n ref={scheduleEventContainer}\n >\n {\n timeSlotsList.map((slot, idx) => (\n <TimeSlotContainer\n timeSlot={slot}\n canDropEvent={canDropEvent}\n onDroppedEvent={onDroppedEvent}\n key={`timeslot-${idx}`}\n events={events}\n currentSummit={currentSummit}\n interval={interval}\n pixelsPerMinute={pixelsPerMinute}\n currentDay={currentDay}>\n </TimeSlotContainer>\n ))\n }\n {\n events.map((event, idx) => {\n return (\n <ScheduleEvent\n event={event}\n selectedPublishedEvents={selectedPublishedEvents}\n key={`event-${event.id}-${event.start_date}-${event.end_date}-${interval}`}\n type={\"MAIN\"}\n step={pixelsPerMinute * 5}\n minHeight={(pixelsPerMinute * 10)}\n initialTop={calculateInitialTop(event)}\n initialHeight={calculateInitialHeight(event)}\n canResize={canResize}\n allowResize={props.allowResize}\n allowDrag={props.allowDrag}\n onResized={onResized}\n maxHeight={getMaxHeight}\n onUnPublishEvent={onUnPublishEvent}\n onEditEvent={onEditEvent}\n onClickSelected={onClickSelected}\n currentDay={currentDay}\n onMoveEvent={props.onMoveEvent}\n >\n </ScheduleEvent>)\n })\n }\n </div>\n </div>\n );\n}\n\nexport default ScheduleEventList;\n","import React, {useEffect, useMemo} from 'react';\nimport SummitDaysSelect from \"../inputs/summit-days-select\";\nimport SummitVenuesSelect from \"../inputs/summit-venues-select\";\nimport SteppedSelect from \"../inputs/stepped-select/index.jsx\";\nimport ScheduleEventList from \"./schedule-event-list\";\nimport {epochToMomentTimeZone} from \"../../utils/methods\";\nimport BulkActionsSelector from \"../bulk-actions-selector/index.js\";\nimport {bulkOptions, PixelsPerMinute, SlotSizeOptions, TBALocation} from \"./constants\";\nimport {parseLocationHour} from '../../utils/methods'\n\nimport './schedule-builder-view.less';\n\nconst getDaysOptions = (summit, trackSpaceTime, currentLocation) => {\n const days = [];\n const summitLocalStartDate = epochToMomentTimeZone(summit.start_date, summit.time_zone_id);\n const summitLocalEndDate = epochToMomentTimeZone(summit.end_date, summit.time_zone_id);\n let currentAuxDay = summitLocalStartDate.clone();\n const allowedDays =\n trackSpaceTime\n ?.find(sp => sp.location_id === currentLocation?.id)\n ?.allowed_timeframes?.map(\n at => epochToMomentTimeZone(at.day, summit.time_zone_id).format(\"YYYY-MM-DD\")\n ) || null;\n \n do {\n const option = {\n value: currentAuxDay.format(\"YYYY-MM-DD\"),\n label: currentAuxDay.format('dddd Do , MMMM YYYY')\n };\n \n if (!allowedDays || allowedDays.length === 0 || allowedDays.includes(option.value)) {\n days.push(option);\n }\n currentAuxDay = currentAuxDay.clone();\n currentAuxDay.add(1, 'day');\n } while (!currentAuxDay.isAfter(summitLocalEndDate));\n \n return days;\n};\n\nconst getVenuesOptions = (summit, trackSpaceTime) => {\n const venues = [{value: TBALocation, label: TBALocation.name}];\n const allowedLocationIds = trackSpaceTime?.map(st => st.location_id) || null;\n \n const locations = summit.locations.filter(loc => {\n const isNotVenue = loc.class_name !== \"SummitVenue\";\n const isAllowed = allowedLocationIds ? allowedLocationIds.includes(loc.id) : true;\n return isNotVenue && isAllowed;\n })\n \n locations.forEach(loc => {\n const option = {value: loc, label: loc.name};\n venues.push(option);\n if (loc.hasOwnProperty('rooms')) {\n loc.rooms.forEach(r => {\n const subOption = {value: r, label: r.name};\n venues.push(subOption);\n })\n }\n })\n \n return venues;\n};\n\nconst getTimeframe = (currentDay, currentLocation, trackSpaceTime, summitTZ) => {\n if (currentDay && currentLocation && trackSpaceTime) {\n const allowedDays = trackSpaceTime.find(st => st.location_id === currentLocation.id)?.allowed_timeframes;\n \n if (allowedDays?.length > 0) {\n const allowedTimeFrame = allowedDays?.find(tf => epochToMomentTimeZone(tf.day, summitTZ).format(\"YYYY-MM-DD\") === currentDay);\n if (allowedTimeFrame) {\n return {open: parseLocationHour(allowedTimeFrame.opening_hour), close: parseLocationHour(allowedTimeFrame.closing_hour)};\n }\n }\n }\n \n if (currentLocation?.opening_hour && currentLocation?.closing_hour) {\n return {open: parseLocationHour(currentLocation.opening_hour), close: parseLocationHour(currentLocation.closing_hour)};\n }\n \n return {open: \"00:00\", close: \"23:50\"};\n};\n\nconst ScheduleBuilderView = ({\n summit,\n trackSpaceTime,\n scheduleEvents,\n selectedEvents,\n currentDay,\n currentVenue,\n slotSize,\n hideBulkSelect,\n ...props\n }) => {\n const days = useMemo(() => getDaysOptions(summit, trackSpaceTime, currentVenue), [summit.start_date, summit.end_date, trackSpaceTime, currentVenue]);\n const venues = useMemo(() => getVenuesOptions(summit, trackSpaceTime), [summit.locations, trackSpaceTime]);\n const slotSizeOptions = SlotSizeOptions.map(op => ({value: op, label: `${op} min.`}));\n const {allowResize = true, allowDrag = true} = props;\n const {open, close} = useMemo(() => getTimeframe(currentDay, currentVenue, trackSpaceTime, summit.time_zone_id), [currentDay, currentVenue, trackSpaceTime]);\n \n useEffect(() => {\n // if new location doesn't allow currentDay value, reset\n if (currentDay && !days.find(op => op.value === currentDay)) {\n props.onDayChanged(null);\n }\n }, [currentVenue])\n \n return (\n <div className=\"schedule-view-wrapper\">\n {props.onSlotSizeChange &&\n <div className=\"row\" style={{marginBottom: 12, marginTop: 2}}>\n <div className=\"col-md-4\">\n <span>Slot size: </span>\n <SteppedSelect\n value={slotSize}\n onChange={props.onSlotSizeChange}\n options={slotSizeOptions}\n style={{display: 'inline-block', marginLeft: 10}}\n />\n </div>\n </div>\n }\n <div className=\"row\">\n <div className=\"col-md-6\">\n <SummitVenuesSelect\n onVenueChanged={props.onVenueChanged}\n venues={venues}\n currentValue={currentVenue}\n placeholder=\"Select Room\"\n />\n </div>\n <div className=\"col-md-6\">\n <SummitDaysSelect\n onDayChanged={props.onDayChanged}\n days={days}\n currentValue={currentDay}\n placeholder=\"Select Day\"\n />\n </div>\n </div>\n <BulkActionsSelector\n bulkOptions={props.customBulkOptions || bulkOptions}\n onSelectAll={props.onSelectAll}\n onSelectedBulkAction={props.onSelectedBulkAction}\n show={!hideBulkSelect && scheduleEvents.length > 0}\n />\n \n {currentDay && currentVenue &&\n <ScheduleEventList\n startTime={open}\n endTime={close}\n currentSummit={summit}\n interval={slotSize}\n currentDay={currentDay}\n pixelsPerMinute={PixelsPerMinute}\n canDropEvent={props.canDropEvent}\n allowResize={allowResize}\n allowDrag={allowDrag}\n onScheduleEvent={props.onScheduleEvent}\n events={scheduleEvents}\n onUnPublishEvent={props.onUnPublishEvent}\n onEditEvent={props.onEditEvent}\n onClickSelected={props.onClickSelected}\n selectedPublishedEvents={selectedEvents}\n onMoveEvent={props.onMoveSingleEvent}\n />\n }\n </div>\n );\n}\n\nexport default ScheduleBuilderView;\n"],"names":["root","factory","exports","module","define","amd","this","ScheduleAdminsBulkActionsSelector","React","onPerformBulkAction","selectedBulkAction","actionTypeSelect","value","props","onSelectedBulkAction","render","onSelectAll","bulkOptions","show","className","type","onClick","ref","select","T","map","option","idx","key","label","bind","title","options","onChange","rest","handleChange","increment","currentOptionKey","findIndex","op","length","valueLabel","find","styles","days","currentValue","placeholder","onDayChanged","theValue","name","selectedOption","venues","onVenueChanged","parsedValue","v","id","optionRenderer","location","class_name","children","replaceNewLine","dangerouslySetInnerHTML","__html","replace","DraggableItemTypes","UNSCHEDULEEVENT","SCHEDULEEVENT","TBALocation","SlotSizeOptions","PixelsPerMinute","constructor","event","summit","_event","_summit","getId","isPublished","hasOwnProperty","is_published","getMinutesDuration","slotSize","start_date","end_date","eventStartDateTime","moment","tz","time_zone","diff","duration","parseInt","canMove","siblings","day","startTime","interval","startDateTime","format","endDateTime","add","auxEvent","filter","item","auxEventStartDateTime","auxEventEndDateTime","isBefore","isAfter","calculateNewDates","minutes","isValidEndDate","endDate","startDate","summitEndDate","isSame","isValidStartDate","summitStartDate","isValidTitle","trim","isValid","epochToMomentTimeZone","atime","parseLocationHour","hour","parsedHour","toString","match","join","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","call","r","Symbol","toStringTag","step","initialTop","initialHeight","minHeight","maxHeight","canResize","allowResize","allowDrag","onResized","onUnPublishEvent","onEditEvent","onClickSelected","selectedPublishedEvents","onMoveEvent","collected","drag","useDrag","collect","monitor","isDragging","canDrag","static","resizeInfo","setResizeInfo","useState","resizing","lastYPos","size","setSize","top","height","isSelected","includes","canEdit","isResizable","popoverHoverFocus","Popover","description","onMouseMove","evt","newYPos","pageY","deltaY","steps","Math","round","abs","sign","preventDefault","newHeight","newTop","maxHeightTmp","onMouseUp","useEffect","document","addEventListener","removeEventListener","onMouseDown","target","getAttribute","box","getBoundingClientRect","clientY","bottom","style","display","cursor","checked","block","OverlayTrigger","trigger","placement","overlay","eventTitleBlock","TimeSlot","timeLabel","TimeSlotContainer","currentDay","currentSummit","events","timeSlot","pixelsPerMinute","canDropEvent","onDroppedEvent","divId","collectedProps","drop","useDrop","accept","isOver","canDrop","SummitEvent","component","backgroundColor","opacity","placeHolderStyle","minutesContainers","container_height","i","position","width","renderMinutesContainer","listRef","useRef","prevIntervalRef","timeSlotsList","setTimeSlotsList","newScrollTop","setNewScrollTop","scheduleEventContainer","current","scrollTop","slotChangeRatio","createSlots","endTime","onScheduleEvent","eventId","getBoundingBox","filteredEvents","floor","shift","getMaxHeight","ReactDOM","calculateInitialTop","utc","dayStartDateTime","calculateInitialHeight","tmpList","done","startTimeTZ","endTimeTZ","slot","push","clone","trackSpaceTime","scheduleEvents","selectedEvents","currentVenue","hideBulkSelect","useMemo","currentLocation","summitLocalStartDate","time_zone_id","summitLocalEndDate","currentAuxDay","allowedDays","sp","location_id","allowed_timeframes","at","getDaysOptions","allowedLocationIds","st","locations","loc","isNotVenue","isAllowed","forEach","rooms","subOption","getVenuesOptions","slotSizeOptions","open","close","summitTZ","allowedTimeFrame","tf","opening_hour","closing_hour","getTimeframe","onSlotSizeChange","marginBottom","marginTop","marginLeft","customBulkOptions","onMoveSingleEvent"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"components/schedule-builder-view.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,8BAA+B,GAAIH,GAChB,iBAAZC,QACdA,QAAQ,+BAAiCD,IAEzCD,EAAK,+BAAiCC,GACvC,CATD,CASGK,MAAM,I,0GCOT,MAAMC,UAA0CC,IAAAA,UAE5CC,sBACI,IAAIC,EAAqBJ,KAAKK,iBAAiBC,MACrB,KAAvBF,GACHJ,KAAKO,MAAMC,qBAAqBJ,EACnC,CAEDK,SACI,IAAI,YAAEC,EAAF,YAAeC,EAAf,KAA4BC,GAASZ,KAAKO,MAC9C,OACI,yBAAKM,UAAU,mCACVD,GACD,yBAAKC,UAAU,OACX,yBAAKA,UAAU,YACX,2BAAOC,KAAK,WAAWC,QAASL,IAChC,4BAAQM,IAAMC,IAAajB,KAAKK,iBAAmBY,CAAxB,GACvB,4BAAQX,MAAM,IAAIY,IAAAA,UAAY,oDAE1BP,EAAYQ,KAAI,CAACC,EAAQC,IACrB,4BAAQC,IAAKD,EAAKf,MAAOc,EAAOd,OAAQc,EAAOG,WAK/D,yBAAKV,UAAU,YACX,4BAAQE,QAASf,KAAKG,oBAAoBqB,KAAKxB,MAAOyB,MAAQP,IAAAA,UAAY,6CAA8CL,UAAU,0BAC9H,uBAAGA,UAAU,cAAb,IAAiCK,IAAAA,UAAY,kDAOpE,EAGL,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MyT,oBAzDnC,C","sources":["webpack://openstack-uicore-foundation/webpack/universalModuleDefinition","webpack://openstack-uicore-foundation/./src/components/bulk-actions-selector/index.js","webpack://openstack-uicore-foundation/./src/components/inputs/stepped-select/index.module.less?b434","webpack://openstack-uicore-foundation/./src/components/inputs/stepped-select/index.jsx","webpack://openstack-uicore-foundation/./src/components/inputs/summit-days-select.js","webpack://openstack-uicore-foundation/./src/components/inputs/summit-venues-select.js","webpack://openstack-uicore-foundation/./src/components/raw-html/index.js","webpack://openstack-uicore-foundation/./src/components/schedule-builder-view/constants.js","webpack://openstack-uicore-foundation/./src/models/summit-event.js","webpack://openstack-uicore-foundation/./src/utils/methods.js","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/defineProperty\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/extends\"","webpack://openstack-uicore-foundation/external commonjs \"@babel/runtime/helpers/objectWithoutProperties\"","webpack://openstack-uicore-foundation/external commonjs \"i18n-react/dist/i18n-react\"","webpack://openstack-uicore-foundation/external commonjs \"moment-timezone\"","webpack://openstack-uicore-foundation/external commonjs \"react\"","webpack://openstack-uicore-foundation/external commonjs \"react-dnd\"","webpack://openstack-uicore-foundation/external commonjs \"react-dom\"","webpack://openstack-uicore-foundation/external commonjs \"react-select\"","webpack://openstack-uicore-foundation/external commonjs \"urijs\"","webpack://openstack-uicore-foundation/webpack/bootstrap","webpack://openstack-uicore-foundation/webpack/runtime/compat get default export","webpack://openstack-uicore-foundation/webpack/runtime/define property getters","webpack://openstack-uicore-foundation/webpack/runtime/hasOwnProperty shorthand","webpack://openstack-uicore-foundation/webpack/runtime/make namespace object","webpack://openstack-uicore-foundation/external commonjs \"react-bootstrap\"","webpack://openstack-uicore-foundation/./src/components/schedule-builder-view/schedule-event.js","webpack://openstack-uicore-foundation/./src/components/schedule-builder-view/schedule-event-list.js","webpack://openstack-uicore-foundation/./src/components/schedule-builder-view/index.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"openstack-uicore-foundation\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"openstack-uicore-foundation\"] = factory();\n\telse\n\t\troot[\"openstack-uicore-foundation\"] = factory();\n})(this, () => {\nreturn ","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport T from \"i18n-react/dist/i18n-react\";\nimport './styles.less';\nclass ScheduleAdminsBulkActionsSelector extends React.Component {\n\n onPerformBulkAction(){\n let selectedBulkAction = this.actionTypeSelect.value;\n if(selectedBulkAction === '') return;\n this.props.onSelectedBulkAction(selectedBulkAction);\n }\n\n render(){\n let { onSelectAll, bulkOptions, show } = this.props;\n return (\n <div className=\"bulk-actions-selector-container\">\n {show &&\n <div className=\"row\">\n <div className=\"col-md-8\">\n <input type=\"checkbox\" onClick={onSelectAll}/>\n <select ref={(select) => { this.actionTypeSelect = select; }}>\n <option value=\"\">{T.translate(\"published_bulk_actions_selector.options.default\")}</option>\n {\n bulkOptions.map((option, idx) => (\n <option key={idx} value={option.value}>{option.label}</option>\n ))\n }\n </select>\n </div>\n <div className=\"col-md-4\">\n <button onClick={this.onPerformBulkAction.bind(this)} title={ T.translate(\"published_bulk_actions_selector.titles.go\")} className=\"btn btn-default btn-sm\">\n <i className=\"fa fa-play\"> {T.translate(\"published_bulk_actions_selector.buttons.go\")}</i>\n </button>\n </div>\n </div>\n }\n </div>\n )\n }\n}\n\nexport default ScheduleAdminsBulkActionsSelector;\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"tDZTa8dy9OMVyGAtxNOS\",\"valueBox\":\"VoBl8JcsRZelj8EKGKtC\"};","import React from 'react';\nimport styles from './index.module.less';\n\nexport default ({value, options, onChange, ...rest}) => {\n\n const handleChange = (increment) => {\n const currentOptionKey = options.findIndex(op => op.value === value);\n if (currentOptionKey >= 0) {\n if (increment) {\n if (currentOptionKey < options.length -1) {\n onChange(options[currentOptionKey + 1].value);\n }\n } else {\n if (currentOptionKey > 0) {\n onChange(options[currentOptionKey - 1].value);\n }\n }\n }\n };\n\n const valueLabel = options.find(op => op.value === value).label;\n\n return (\n <div className={styles.wrapper} {...rest}>\n <button className=\"btn btn-default\" onClick={() => handleChange(false)}>\n <i className=\"fa fa-minus\"/>\n </button>\n <span className={styles.valueBox}>{valueLabel}</span>\n <button className=\"btn btn-default\" onClick={() => handleChange(true)}>\n <i className=\"fa fa-plus\"/>\n </button>\n </div>\n );\n};\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport Select from 'react-select';\n\nconst SummitDaysSelect = ({ days, currentValue, placeholder, onDayChanged }) => {\n const theValue = days.find(op => op.value === currentValue) || null;\n\n const onChange = (selectedOption) => {\n onDayChanged(selectedOption?.value || null);\n };\n\n return (\n <Select\n placeholder={placeholder} //T.translate(\"schedule.placeholders.select_day\")\n className=\"day-selector\"\n name=\"form-field-name\"\n value={theValue}\n onChange={onChange}\n options={days}\n />\n );\n}\n\nexport default SummitDaysSelect;\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React from 'react';\nimport Select from 'react-select';\n\nconst SummitVenuesSelect = ({venues, currentValue, placeholder, onVenueChanged, ...rest}) => {\n const parsedValue = venues.find(v => v.value.id === currentValue?.id) || null;\n const renderOption = (option) => {\n let location = option.value;\n if (location.class_name === 'SummitVenue')\n return (<span className=\"location-option-venue\">{location.name}</span>);\n return (<span className=\"location-option-room\">- {location.name}</span>);\n }\n\n const onChange = (selectedOption) => {\n onVenueChanged(selectedOption?.value || null);\n }\n\n return (\n <Select\n placeholder={placeholder}\n className=\"venues-selector\"\n name=\"form-field-name\"\n value={parsedValue}\n onChange={onChange}\n options={venues}\n optionRenderer={renderOption}\n {...rest}\n />\n );\n}\n\nexport default SummitVenuesSelect;\n","import React from 'react';\n\nconst RawHTML = ({children, replaceNewLine = false, className = \"\"}) =>\n <span className={className}\n dangerouslySetInnerHTML={{ __html: replaceNewLine ? children?.replace(/\\n/g, '<br />') : children}} />\n\nexport default RawHTML;","export const DraggableItemTypes = {\n UNSCHEDULEEVENT: 'UnScheduleEvent',\n SCHEDULEEVENT: 'ScheduleEvent',\n};\n\nexport const TBALocation = {id : 0, name : 'TBD', class_name: 'SummitVenue'};\nexport const SlotSizeOptions = [1,5,10,15,30,60]; // 12 - 6 - 4 - 2 - 1\nexport const PixelsPerMinute = 3;\n\nexport const BulkActionEdit = 'BULK_ACTION_EDIT';\nexport const BulkActionPublish = 'BULK_ACTION_PUBLISH';\nexport const BulkActionUnPublish = 'BULK_ACTION_UNPUBLISH';\n\nexport const bulkOptions = [\n {value: BulkActionEdit, label: 'Edit'},\n {value: BulkActionUnPublish, label: 'Unpublish'},\n];\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport moment from 'moment-timezone'\n\nclass SummitEvent {\n\n constructor(event, summit = null){\n this._event = event;\n this._summit = summit;\n }\n\n set summit(summit){\n this._summit = summit;\n }\n\n get summit(){\n return this._summit;\n }\n\n getId(){\n return this._event.id;\n }\n\n isPublished(){\n return this._event.hasOwnProperty('is_published') && this._event.is_published;\n }\n\n getMinutesDuration(slotSize){\n\n if(this._event.hasOwnProperty('start_date') && this._event.hasOwnProperty('end_date') && this._event.start_date != null && this._event.end_date != null ) {\n let eventStartDateTime = moment(this._event.start_date * 1000).tz(this._summit.time_zone.name);\n let eventEndDateTime = moment(this._event.end_date * 1000).tz(this._summit.time_zone.name);\n return eventEndDateTime.diff(eventStartDateTime, 'minutes');\n }\n // default\n\n return this._event.hasOwnProperty('duration') && this._event.duration > 0 ? parseInt( this._event.duration / 60 ) : slotSize;\n }\n\n canMove(siblings, day, startTime, interval){\n\n let duration = this._event.hasOwnProperty('duration') && this._event.duration > 0 ? parseInt( this._event.duration / 60 ) : interval;\n // check if published to get real duration ...\n if(this.isPublished())\n duration = this.getMinutesDuration();\n\n let startDateTime = moment.tz(day+' '+ startTime.format('HH:mm'), 'YYYY-MM-DD HH:mm', this._summit.time_zone.name);\n let endDateTime = moment.tz(day+' '+ startTime.format('HH:mm'), 'YYYY-MM-DD HH:mm', this._summit.time_zone.name);\n endDateTime = endDateTime.add(duration, 'minutes');\n\n // check siblings overlap\n for (let auxEvent of siblings.filter(item => item.id !== this.getId())) {\n let auxEventStartDateTime = moment(auxEvent.start_date * 1000).tz(this._summit.time_zone.name);\n let auxEventEndDateTime = moment(auxEvent.end_date * 1000).tz(this._summit.time_zone.name);\n\n // if time segments overlap\n if(auxEventStartDateTime.isBefore(endDateTime) && auxEventEndDateTime.isAfter(startDateTime))\n return false;\n }\n\n return true;\n }\n\n calculateNewDates(day, startTime, minutes){\n\n minutes = this._event.hasOwnProperty('duration') && this._event.duration > 0 ?\n parseInt( this._event.duration / 60 ) : minutes;\n\n let newStarDateTime = moment.tz(day+' '+startTime.format('HH:mm'), 'YYYY-MM-DD HH:mm', this._summit.time_zone.name);\n let newEndDateTime = moment.tz(day+' '+startTime.format('HH:mm'), 'YYYY-MM-DD HH:mm', this._summit.time_zone.name).add(minutes, 'minutes');\n return [newStarDateTime, newEndDateTime];\n }\n\n isValidEndDate(endDate){\n if(endDate == null) return true;\n let startDate = moment.tz(this._event.start_date * 1000, this._summit.time_zone.name);\n endDate = moment.tz(endDate * 1000, this._summit.time_zone.name);\n let summitEndDate = moment.tz(this._summit.end_date * 1000, this._summit.time_zone.name);\n return endDate.isAfter(startDate) && (endDate.isBefore(summitEndDate) || endDate.isSame(summitEndDate));\n }\n\n isValidStartDate(startDate){\n if(startDate == null) return true;\n startDate = moment.tz(startDate* 1000, this._summit.time_zone.name);\n let endDate = moment.tz(this._event.end_date * 1000, this._summit.time_zone.name);\n let summitStartDate = moment.tz(this._summit.start_date * 1000, this._summit.time_zone.name);\n return moment.isMoment(startDate) && startDate.isAfter(summitStartDate) && startDate.isBefore(endDate);\n }\n\n isValidTitle(title){\n return title.trim() !== '';\n }\n\n isValid(){\n return this.isValidTitle(this._event.title)\n && this.isValidStartDate(this._event.start_date)\n && this.isValidEndDate(this._event.end_date);\n }\n\n}\n\nexport default SummitEvent;\n","/**\n * Copyright 2018 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport moment from 'moment-timezone';\nimport URI from \"urijs\";\n\nexport const findElementPos = (obj) => {\n var curtop = -70;\n if (obj.offsetParent) {\n do {\n curtop += obj.offsetTop;\n } while (obj = obj.offsetParent);\n return [curtop];\n }\n};\n\nexport const epochToMoment = (atime) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime);\n};\n\nexport const epochToMomentTimeZone = (atime, time_zone) => {\n if(!atime) return atime;\n atime = atime * 1000;\n return moment(atime).tz(time_zone);\n};\n\nexport const formatEpoch = (atime, format = 'M/D/YYYY h:mm a') => {\n if(!atime) return atime;\n return epochToMoment(atime).format(format);\n};\n\nexport const parseLocationHour = (hour) => {\n let parsedHour = hour.toString();\n if(parsedHour.length < 4) parsedHour = `0${parsedHour}`;\n parsedHour = parsedHour.match(/.{2}/g);\n parsedHour = parsedHour.join(':');\n return parsedHour;\n}\n\nexport const objectToQueryString = (obj) => {\n var str = \"\";\n for (var key in obj) {\n if (str != \"\") {\n str += \"&\";\n }\n str += key + \"=\" + encodeURIComponent(obj[key]);\n }\n\n return str;\n};\n\nexport const getBackURL = () => {\n let url = URI(window.location.href);\n let query = url.search(true);\n let fragment = url.fragment();\n let backUrl = query.hasOwnProperty('BackUrl') ? query['BackUrl'] : null;\n if(fragment != null && fragment != ''){\n backUrl += `#${fragment}`;\n }\n return backUrl;\n};\n\nexport const toSlug = (text) =>{\n text = text.toLowerCase();\n return text.replace(/[^a-zA-Z0-9]+/g,'_');\n}\n\nexport const getAuthCallback = () => {\n if(typeof window !== 'undefined') {\n return `${window.location.origin}/auth/callback`;\n }\n return null;\n};\n\nexport const getCurrentLocation = () => {\n let location = '';\n if(typeof window !== 'undefined') {\n location = window.location;\n // check if we are on iframe\n if (window.top)\n location = window.top.location;\n }\n return location;\n};\n\nexport const getOrigin = () => {\n if(typeof window !== 'undefined') {\n return window.location.origin;\n }\n return null;\n};\n\nexport const getCurrentPathName = () => {\n if(typeof window !== 'undefined') {\n return window.location.pathname;\n }\n return null;\n};\n\nexport const getCurrentHref = () => {\n if(typeof window !== 'undefined') {\n return window.location.href;\n }\n return null;\n};\n\nexport const getAllowedUserGroups = () => {\n if(typeof window !== 'undefined') {\n return window.ALLOWED_USER_GROUPS || '';\n }\n return null;\n};\n\nexport const buildAPIBaseUrl = (relativeUrl) => {\n if(typeof window !== 'undefined'){\n return `${window.API_BASE_URL}${relativeUrl}`;\n }\n return null``;\n};\n\nexport const putOnLocalStorage = (key, value) => {\n if(typeof window !== 'undefined') {\n window.localStorage.setItem(key, value);\n }\n};\n\nexport const getFromLocalStorage = (key, removeIt) => {\n if(typeof window !== 'undefined') {\n let val = window.localStorage.getItem(key);\n if(removeIt){\n console.log(`getFromLocalStorage removing key ${key}`);\n removeFromLocalStorage(key);\n }\n return val;\n }\n return null;\n};\n\nexport const removeFromLocalStorage = (key) => {\n if(typeof window !== 'undefined') {\n window.localStorage.removeItem(key);\n }\n}\n\nexport const isClearingSessionState = () => {\n if(typeof window !== 'undefined') {\n return window.clearing_session_state;\n }\n return false;\n};\n\nexport const setSessionClearingState = (val) => {\n if(typeof window !== 'undefined') {\n window.clearing_session_state = val;\n }\n};\n\nexport const getCurrentUserLanguage = () => {\n let language = 'en';\n if(typeof navigator !== 'undefined') {\n language = (navigator.languages && navigator.languages[0]) || navigator.language || navigator.userLanguage;\n }\n return language;\n};\n\nexport const scrollToError = (errors) => {\n if(Object.keys(errors).length > 0) {\n const firstError = Object.keys(errors)[0];\n const firstNode = document.getElementById(firstError);\n if (firstNode) window.scrollTo(0, findElementPos(firstNode));\n }\n};\n\nexport const hasErrors = (field, errors) => {\n if(field in errors) {\n return errors[field];\n }\n return '';\n};\n\nexport const shallowEqual = (object1, object2) => {\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n for (let key of keys1) {\n if (object1[key] !== object2[key]) {\n return false;\n }\n }\n\n return true;\n};\n\nexport const arraysEqual = (a1, a2) =>\n a1.length === a2.length && a1.every((o, idx) => shallowEqual(o, a2[idx]));\n\nexport const isEmpty = (obj) => {\n return Object.keys(obj).length === 0;\n};\n\n\nexport const base64URLEncode = (str) => {\n return str\n .toString('base64')\n .replace(/\\+/g, '-')\n .replace(/\\//g, '_')\n .replace(/=/g, '')\n}\n\nexport const retryPromise = async (\n cb,\n maxNumberOfRetries = 3\n) => {\n for (let i = 0; i < maxNumberOfRetries; i++) {\n if (await cb()) {\n return true;\n }\n }\n\n return false;\n}\n\nexport const getTimeServiceUrl = () => {\n if(typeof window !== 'undefined') {\n return window.TIMEINTERVALSINCE1970_API_URL || process.env.TIMEINTERVALSINCE1970_API_URL;\n }\n return null;\n};\n","module.exports = require(\"@babel/runtime/helpers/defineProperty\");","module.exports = require(\"@babel/runtime/helpers/extends\");","module.exports = require(\"@babel/runtime/helpers/objectWithoutProperties\");","module.exports = require(\"i18n-react/dist/i18n-react\");","module.exports = require(\"moment-timezone\");","module.exports = require(\"react\");","module.exports = require(\"react-dnd\");","module.exports = require(\"react-dom\");","module.exports = require(\"react-select\");","module.exports = require(\"urijs\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = require(\"react-bootstrap\");","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, {useState, useEffect} from 'react';\nimport {DraggableItemTypes} from './constants';\nimport {useDrag} from 'react-dnd';\nimport {Popover, OverlayTrigger} from 'react-bootstrap';\nimport RawHTML from '../raw-html';\n\nconst RESIZING_DIR_NORTH = 'N';\nconst RESIZING_DIR_SOUTH = 'S';\n\nconst ScheduleEvent = ({\n event,\n step,\n initialTop,\n initialHeight,\n minHeight,\n maxHeight,\n canResize,\n allowResize,\n allowDrag,\n onResized,\n onUnPublishEvent,\n onEditEvent,\n onClickSelected,\n selectedPublishedEvents,\n onMoveEvent\n }) => {\n const [collected, drag] = useDrag(() => ({\n type: DraggableItemTypes.SCHEDULEEVENT,\n item: {id: event.id, title: event.title, is_published: event.is_published, start_date: event.start_date, end_date: event.end_date, duration: event.duration},\n collect: (monitor) => ({\n isDragging: monitor.isDragging(),\n }),\n canDrag: allowDrag && !event.static\n }), [event.id, event.duration, event.start_date, event.end_date]);\n const [resizeInfo, setResizeInfo] = useState({resizing: false, type: null, lastYPos: null});\n const [size, setSize] = useState({top: initialTop, height: initialHeight});\n const isSelected = selectedPublishedEvents?.includes(event.id) || false;\n const canEdit = !event.static;\n const isResizable = allowResize && canEdit && size.height > 15;\n\n const popoverHoverFocus = () =>\n <Popover id=\"popover-trigger-focus\" title={event.title}>\n <RawHTML>{event.description}</RawHTML>\n </Popover>\n\n // resize behavior\n\n const onMouseDown = (evt) => {\n if (!evt.target.getAttribute('data-resizable')) return;\n\n const box = evt.target.getBoundingClientRect();\n\n let type;\n if (evt.clientY - box.top < 10) {\n type = RESIZING_DIR_NORTH;\n } else if (box.bottom - evt.clientY < 10) {\n type = RESIZING_DIR_SOUTH;\n } else {\n return;\n }\n\n setResizeInfo({resizing: true, type, lastYPos: evt.pageY});\n\n evt.preventDefault();\n }\n\n const onMouseMove = (evt) => {\n if (!resizeInfo.resizing) return;\n\n let lastYPos = resizeInfo.lastYPos;\n let newYPos = evt.pageY;\n let deltaY = newYPos - lastYPos;\n\n if (step && step > 0) {\n let steps = parseInt(Math.round(Math.abs(deltaY) / step));\n deltaY = Math.sign(deltaY) * steps * step;\n if (!deltaY) {\n evt.preventDefault();\n return false;\n }\n }\n\n let newHeight = size.height;\n let newTop = size.top;\n\n if (resizeInfo.type === RESIZING_DIR_SOUTH) {\n newHeight = size.height + deltaY;\n }\n\n if (resizeInfo.type === RESIZING_DIR_NORTH) {\n if (deltaY < 0) {\n newTop = size.top - Math.abs(deltaY);\n newHeight = size.height + Math.abs(deltaY);\n } else {\n newTop = size.top + Math.abs(deltaY);\n newHeight = size.height - Math.abs(deltaY);\n }\n }\n\n // check constraints\n if (newHeight < minHeight) {\n newHeight = minHeight;\n newYPos = lastYPos;\n newTop = size.top;\n }\n\n let maxHeightTmp = (typeof maxHeight === \"function\") ? maxHeight() : maxHeight;\n\n if (newHeight > maxHeightTmp) {\n newHeight = maxHeightTmp;\n newYPos = lastYPos;\n newTop = size.top;\n }\n\n if (newTop < 0) {\n newTop = 0;\n newHeight = size.height;\n newYPos = lastYPos;\n }\n\n if (canResize(event.id, newTop, newHeight)) {\n setResizeInfo({\n ...resizeInfo,\n resizing: true,\n lastYPos: newYPos\n });\n\n setSize({\n top: newTop,\n height: newHeight,\n });\n }\n\n evt.preventDefault();\n };\n\n const onMouseUp = (evt) => {\n evt.preventDefault();\n setResizeInfo({type: null, lastYPos: null, resizing: false});\n };\n \n const eventTitleBlock = () => {\n let block = null;\n \n if (event.description) {\n block = (<OverlayTrigger trigger={['hover']} placement=\"bottom\" overlay={popoverHoverFocus()}>\n <div className=\"event-content\">\n <span className=\"event-title withTooltip\">{`${event.id} - ${event.title}${event.duration ? ` - ${event.duration/60} minutes` : ''}`}</span>\n </div>\n </OverlayTrigger>);\n } else {\n block = (<div className=\"event-content\">\n <span className=\"event-title\">{`${event.id} - ${event.title}${event.duration ? ` - ${event.duration/60} minutes` : ''}`}</span>\n </div>);\n }\n \n return block;\n }\n\n // end resize behavior\n\n useEffect(() => {\n if (resizeInfo.resizing) {\n document.addEventListener('mousemove', onMouseMove, false);\n document.addEventListener('mouseup', onMouseUp, false);\n } else {\n document.removeEventListener('mousemove', onMouseMove, false);\n document.removeEventListener('mouseup', onMouseUp, false);\n\n if (size.top !== initialTop || size.height !== initialHeight) {\n onResized(event.id, size.top, size.height);\n }\n }\n\n return () => {\n document.removeEventListener('mousemove', onMouseMove, false);\n document.removeEventListener('mouseup', onMouseUp, false);\n }\n }, [resizeInfo.resizing])\n\n return (\n <div\n className={`row schedule-event ${isResizable ? 'is-resizable' : ''} ${canEdit ? '' : 'is-static'}`}\n data-resizable={true}\n id={`event_${event.id}`}\n onMouseDown={onMouseDown}\n ref={drag}\n style={{\n top: size.top,\n height: size.height,\n display: collected.isDragging ? 'none' : 'block',\n cursor: 'move',\n }}\n >\n {onClickSelected &&\n <div className=\"event-select-wrapper\">\n <input\n className=\"select-event-btn\"\n id={`selected_event_${event.id}`}\n type=\"checkbox\"\n checked={isSelected}\n onChange={() => onClickSelected(event)}\n />\n </div>\n }\n <div className=\"col-md-12 event-container\">\n {eventTitleBlock()}\n </div>\n <div className=\"event-actions\">\n {!event.static && onUnPublishEvent &&\n <i\n className=\"fa fa-minus-circle event-action-btn\"\n aria-hidden=\"true\"\n title=\"unpublish event\"\n onClick={() => onUnPublishEvent(event)}\n />\n }\n {onEditEvent &&\n <i\n className=\"fa fa-pencil-square-o event-action-btn\"\n title=\"edit event\"\n aria-hidden=\"true\"\n onClick={() => onEditEvent(event)}\n />\n }\n {onMoveEvent &&\n <i\n className=\"fa fa-arrow-circle-right event-action-btn\"\n title=\"move event\"\n aria-hidden=\"true\"\n onClick={() => onMoveEvent(event)}\n />\n }\n </div>\n </div>\n );\n}\n\nexport default ScheduleEvent;\n","/**\n * Copyright 2017 OpenStack Foundation\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributschedule-event-list'ed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n **/\n\nimport React, {useEffect, useRef, useState} from 'react';\nimport moment from 'moment-timezone'\nimport {useDrop} from 'react-dnd'\nimport {DraggableItemTypes} from './constants';\nimport ScheduleEvent from './schedule-event';\nimport ReactDOM from 'react-dom';\nimport SummitEvent from '../../models/summit-event';\n\nconst TimeSlot = ({timeLabel, id}) => {\n return (\n <div id={id} className=\"row time-slot\">\n <div className=\"col-md-12\">\n <span>{timeLabel}</span>\n </div>\n </div>\n )\n}\n\nconst TimeSlotContainer = ( props ) => {\n const {currentDay, currentSummit, events, timeSlot, pixelsPerMinute, interval, canDropEvent, onDroppedEvent} = props;\n const divId = `time_slot_container_${timeSlot.format('HH_mm')}`;\n const [collectedProps, drop] = useDrop(() => ({\n accept: [DraggableItemTypes.UNSCHEDULEEVENT, DraggableItemTypes.SCHEDULEEVENT],\n collect: (monitor) => ({\n isOver: monitor.isOver(),\n canDrop: monitor.canDrop()\n }),\n canDrop: (item, monitor) => {\n if (canDropEvent) return canDropEvent(item, monitor);\n const eventModel = new SummitEvent(item, currentSummit);\n return eventModel.canMove(events, currentDay, timeSlot, interval);\n },\n drop: (item, monitor, component) => {\n onDroppedEvent(item, timeSlot);\n }\n }), [interval, timeSlot]);\n const {isOver, canDrop} = collectedProps;\n\n const renderMinutesContainer = (interval, pixelsPerMinute) => {\n let minutesContainers = [];\n let container_count = 2;\n let container_height = pixelsPerMinute * 5;\n\n for (var i = 0; i < container_count; i++) {\n\n minutesContainers[i] = <div key={i} className=\"minute-container\" style={{\n position: 'relative',\n width: '100%',\n height: `${container_height}px`\n }}/>;\n }\n\n return minutesContainers;\n };\n\n const placeHolderStyle = () => {\n const style = {};\n\n if (isOver) {\n style.backgroundColor = canDrop ? 'green' : 'red';\n style.opacity = 0.5;\n } else if (canDrop) {\n style.backgroundColor = 'yellow';\n style.opacity = 0.5;\n }\n\n return style;\n }\n\n return (\n <div id={divId} ref={drop} className=\"row time-slot-container\" style={placeHolderStyle()}>\n <div className=\"col-md-12\">\n {renderMinutesContainer(interval, pixelsPerMinute)}\n </div>\n </div>\n );\n};\n\nconst ScheduleEventList = (props) => {\n const listRef = useRef();\n const prevIntervalRef = useRef();\n const [timeSlotsList, setTimeSlotsList] = useState([]);\n const [newScrollTop, setNewScrollTop] = useState(null);\n const scheduleEventContainer = useRef(null);\n \n // sets scrollbar position after interval change and render\n useEffect(() => {\n if (newScrollTop) {\n listRef.current.scrollTop = newScrollTop;\n setNewScrollTop(null);\n }\n }, [newScrollTop]);\n\n useEffect(() => {\n const slotChangeRatio = prevIntervalRef.current / props.interval;\n // set scroll pos to set scrollbar after render\n setNewScrollTop(listRef.current.scrollTop * slotChangeRatio);\n createSlots();\n prevIntervalRef.current = props.interval;\n }, [props.interval, props.startTime, props.endTime]);\n\n const onDroppedEvent = (event, startTime) => {\n props.onScheduleEvent(event, props.currentDay, startTime);\n }\n\n const canResize = (eventId, newTop, newHeight) => {\n const {events, currentDay, startTime, pixelsPerMinute, currentSummit} = props;\n const {height} = getBoundingBox();\n\n if (height < (newTop + newHeight)) {\n return false;\n }\n\n const filteredEvents = events.filter(evt => {\n return evt.id !== eventId;\n });\n // calculate new event start date, end date\n const minutes = Math.floor(newTop / (pixelsPerMinute * (10 / interval)));\n const duration = Math.floor(newHeight / (pixelsPerMinute * (10 / interval)));\n\n let startDateTime = moment.tz(currentDay + ' ' + startTime, 'YYYY-MM-DD HH:mm', currentSummit.time_zone.name);\n startDateTime = startDateTime.add(minutes, 'minutes');\n let endDateTime = moment.tz(currentDay + ' ' + startTime, 'YYYY-MM-DD HH:mm', currentSummit.time_zone.name);\n endDateTime = endDateTime.add(minutes + duration, 'minutes');\n\n for (const auxEvent of filteredEvents) {\n const auxEventStartDateTime = moment(auxEvent.start_date * 1000).tz(currentSummit.time_zone.name);\n const auxEventEndDateTime = moment(auxEvent.end_date * 1000).tz(currentSummit.time_zone.name);\n // if time segments overlap\n if (auxEventStartDateTime.isBefore(endDateTime) && auxEventEndDateTime.isAfter(startDateTime))\n return false;\n }\n\n return true;\n }\n\n const onResized = (eventId, newTop, newHeight) => {\n const {events, currentDay, startTime, pixelsPerMinute, currentSummit} = props;\n const event = events.filter(evt => {\n return evt.id === eventId;\n }).shift();\n const minutes = Math.floor(newTop / (pixelsPerMinute * (10 / interval)));\n const duration = Math.floor(newHeight / (pixelsPerMinute * (10 / interval)));\n let startDateTime = moment.tz(currentDay + ' ' + startTime, 'YYYY-MM-DD HH:mm', currentSummit.time_zone.name);\n startDateTime = startDateTime.add(minutes, 'minutes');\n\n props.onScheduleEvent(event, currentDay, moment(startDateTime.format('HH:mm'), 'HH:mm'), duration);\n }\n\n const getMaxHeight = () => {\n return getBoundingBox().height;\n }\n\n const getBoundingBox = () => {\n return ReactDOM.findDOMNode(scheduleEventContainer.current).getBoundingClientRect();\n }\n\n const calculateInitialTop = (event) => {\n const {currentDay, startTime, pixelsPerMinute, currentSummit} = props;\n const eventStartDateTime = moment(event.start_date * 1000).utc().tz(currentSummit.time_zone.name);\n const dayStartDateTime = moment.tz(currentDay + ' ' + startTime, 'YYYY-MM-DD HH:mm', currentSummit.time_zone.name);\n const minutes = eventStartDateTime.diff(dayStartDateTime, 'minutes');\n return minutes * pixelsPerMinute * (10 / interval);\n }\n\n const calculateInitialHeight = (event) => {\n const {pixelsPerMinute, currentSummit, interval} = props;\n const eventStartDateTime = moment(event.start_date * 1000).tz(currentSummit.time_zone.name);\n const eventEndDateTime = moment(event.end_date * 1000).tz(currentSummit.time_zone.name);\n const minutes = eventEndDateTime.diff(eventStartDateTime, 'minutes');\n return minutes * pixelsPerMinute * (10 / interval);\n }\n\n const createSlots = () => {\n const tmpList = [];\n let done = false;\n const startTimeTZ = moment.tz(startTime, 'HH:mm', currentSummit.time_zone.name);\n const endTimeTZ = moment.tz(endTime, 'HH:mm', currentSummit.time_zone.name);\n // create UI\n let slot = startTimeTZ;\n do {\n tmpList.push(slot);\n slot = slot.clone();\n slot.add(interval, 'm');\n done = slot.isAfter(endTimeTZ);\n } while (!done);\n\n setTimeSlotsList(tmpList);\n };\n\n const {\n events,\n startTime,\n endTime,\n interval,\n pixelsPerMinute,\n currentDay,\n currentSummit,\n canDropEvent,\n onEditEvent,\n onUnPublishEvent,\n onClickSelected,\n selectedPublishedEvents\n } = props;\n\n return (\n <div className=\"row outer-schedule-events-container\" ref={listRef}>\n <div className=\"col-md-2 no-margin no-padding\">\n {\n timeSlotsList.map((slot, idx) => (\n <TimeSlot timeLabel={slot.format(\"HH:mm\")} key={idx} id={slot.format(\"HH_mm\")}/>\n ))\n }\n </div>\n <div\n className=\"schedule-events-container col-md-10 no-margin no-padding\"\n ref={scheduleEventContainer}\n >\n {\n timeSlotsList.map((slot, idx) => (\n <TimeSlotContainer\n timeSlot={slot}\n canDropEvent={canDropEvent}\n onDroppedEvent={onDroppedEvent}\n key={`timeslot-${idx}`}\n events={events}\n currentSummit={currentSummit}\n interval={interval}\n pixelsPerMinute={pixelsPerMinute}\n currentDay={currentDay}>\n </TimeSlotContainer>\n ))\n }\n {\n events.map((event, idx) => {\n return (\n <ScheduleEvent\n event={event}\n selectedPublishedEvents={selectedPublishedEvents}\n key={`event-${event.id}-${event.start_date}-${event.end_date}-${interval}`}\n type={\"MAIN\"}\n step={pixelsPerMinute * 5}\n minHeight={(pixelsPerMinute * 10)}\n initialTop={calculateInitialTop(event)}\n initialHeight={calculateInitialHeight(event)}\n canResize={canResize}\n allowResize={props.allowResize}\n allowDrag={props.allowDrag}\n onResized={onResized}\n maxHeight={getMaxHeight}\n onUnPublishEvent={onUnPublishEvent}\n onEditEvent={onEditEvent}\n onClickSelected={onClickSelected}\n currentDay={currentDay}\n onMoveEvent={props.onMoveEvent}\n >\n </ScheduleEvent>)\n })\n }\n </div>\n </div>\n );\n}\n\nexport default ScheduleEventList;\n","import React, {useEffect, useMemo} from 'react';\nimport SummitDaysSelect from \"../inputs/summit-days-select\";\nimport SummitVenuesSelect from \"../inputs/summit-venues-select\";\nimport SteppedSelect from \"../inputs/stepped-select/index.jsx\";\nimport ScheduleEventList from \"./schedule-event-list\";\nimport {epochToMomentTimeZone} from \"../../utils/methods\";\nimport BulkActionsSelector from \"../bulk-actions-selector/index.js\";\nimport {bulkOptions, PixelsPerMinute, SlotSizeOptions, TBALocation} from \"./constants\";\nimport {parseLocationHour} from '../../utils/methods'\n\nimport './schedule-builder-view.less';\n\nconst getDaysOptions = (summit, trackSpaceTime, currentLocation) => {\n const days = [];\n const summitLocalStartDate = epochToMomentTimeZone(summit.start_date, summit.time_zone_id);\n const summitLocalEndDate = epochToMomentTimeZone(summit.end_date, summit.time_zone_id);\n let currentAuxDay = summitLocalStartDate.clone();\n const allowedDays =\n trackSpaceTime\n ?.find(sp => sp.location_id === currentLocation?.id)\n ?.allowed_timeframes?.map(\n at => epochToMomentTimeZone(at.day, summit.time_zone_id).format(\"YYYY-MM-DD\")\n ) || null;\n \n do {\n const option = {\n value: currentAuxDay.format(\"YYYY-MM-DD\"),\n label: currentAuxDay.format('dddd Do , MMMM YYYY')\n };\n \n if (!allowedDays || allowedDays.length === 0 || allowedDays.includes(option.value)) {\n days.push(option);\n }\n currentAuxDay = currentAuxDay.clone();\n currentAuxDay.add(1, 'day');\n } while (!currentAuxDay.isAfter(summitLocalEndDate));\n \n return days;\n};\n\nconst getVenuesOptions = (summit, trackSpaceTime) => {\n const venues = [{value: TBALocation, label: TBALocation.name}];\n const allowedLocationIds = trackSpaceTime?.map(st => st.location_id) || null;\n \n const locations = summit.locations.filter(loc => {\n const isNotVenue = loc.class_name !== \"SummitVenue\";\n const isAllowed = allowedLocationIds ? allowedLocationIds.includes(loc.id) : true;\n return isNotVenue && isAllowed;\n })\n \n locations.forEach(loc => {\n const option = {value: loc, label: loc.name};\n venues.push(option);\n if (loc.hasOwnProperty('rooms')) {\n loc.rooms.forEach(r => {\n const subOption = {value: r, label: r.name};\n venues.push(subOption);\n })\n }\n })\n \n return venues;\n};\n\nconst getTimeframe = (currentDay, currentLocation, trackSpaceTime, summitTZ) => {\n if (currentDay && currentLocation && trackSpaceTime) {\n const allowedDays = trackSpaceTime.find(st => st.location_id === currentLocation.id)?.allowed_timeframes;\n \n if (allowedDays?.length > 0) {\n const allowedTimeFrame = allowedDays?.find(tf => epochToMomentTimeZone(tf.day, summitTZ).format(\"YYYY-MM-DD\") === currentDay);\n if (allowedTimeFrame) {\n return {open: parseLocationHour(allowedTimeFrame.opening_hour), close: parseLocationHour(allowedTimeFrame.closing_hour)};\n }\n }\n }\n \n if (currentLocation?.opening_hour && currentLocation?.closing_hour) {\n return {open: parseLocationHour(currentLocation.opening_hour), close: parseLocationHour(currentLocation.closing_hour)};\n }\n \n return {open: \"00:00\", close: \"23:50\"};\n};\n\nconst ScheduleBuilderView = ({\n summit,\n trackSpaceTime,\n scheduleEvents,\n selectedEvents,\n currentDay,\n currentVenue,\n slotSize,\n hideBulkSelect,\n ...props\n }) => {\n const days = useMemo(() => getDaysOptions(summit, trackSpaceTime, currentVenue), [summit.start_date, summit.end_date, trackSpaceTime, currentVenue]);\n const venues = useMemo(() => getVenuesOptions(summit, trackSpaceTime), [summit.locations, trackSpaceTime]);\n const slotSizeOptions = SlotSizeOptions.map(op => ({value: op, label: `${op} min.`}));\n const {allowResize = true, allowDrag = true} = props;\n const {open, close} = useMemo(() => getTimeframe(currentDay, currentVenue, trackSpaceTime, summit.time_zone_id), [currentDay, currentVenue, trackSpaceTime]);\n \n useEffect(() => {\n // if new location doesn't allow currentDay value, reset\n if (currentDay && !days.find(op => op.value === currentDay)) {\n props.onDayChanged(null);\n }\n }, [currentVenue])\n \n return (\n <div className=\"schedule-view-wrapper\">\n {props.onSlotSizeChange &&\n <div className=\"row\" style={{marginBottom: 12, marginTop: 2}}>\n <div className=\"col-md-12\">\n <span>Slot size: </span>\n <SteppedSelect\n value={slotSize}\n onChange={props.onSlotSizeChange}\n options={slotSizeOptions}\n style={{display: 'inline-block', marginLeft: 10}}\n />\n </div>\n </div>\n }\n <div className=\"row\">\n <div className=\"col-md-6\">\n <SummitVenuesSelect\n onVenueChanged={props.onVenueChanged}\n venues={venues}\n currentValue={currentVenue}\n placeholder=\"Select Room\"\n />\n </div>\n <div className=\"col-md-6\">\n <SummitDaysSelect\n onDayChanged={props.onDayChanged}\n days={days}\n currentValue={currentDay}\n placeholder=\"Select Day\"\n />\n </div>\n </div>\n <BulkActionsSelector\n bulkOptions={props.customBulkOptions || bulkOptions}\n onSelectAll={props.onSelectAll}\n onSelectedBulkAction={props.onSelectedBulkAction}\n show={!hideBulkSelect && scheduleEvents.length > 0}\n />\n \n {currentDay && currentVenue &&\n <ScheduleEventList\n startTime={open}\n endTime={close}\n currentSummit={summit}\n interval={slotSize}\n currentDay={currentDay}\n pixelsPerMinute={PixelsPerMinute}\n canDropEvent={props.canDropEvent}\n allowResize={allowResize}\n allowDrag={allowDrag}\n onScheduleEvent={props.onScheduleEvent}\n events={scheduleEvents}\n onUnPublishEvent={props.onUnPublishEvent}\n onEditEvent={props.onEditEvent}\n onClickSelected={props.onClickSelected}\n selectedPublishedEvents={selectedEvents}\n onMoveEvent={props.onMoveSingleEvent}\n />\n }\n </div>\n );\n}\n\nexport default ScheduleBuilderView;\n"],"names":["root","factory","exports","module","define","amd","this","ScheduleAdminsBulkActionsSelector","React","onPerformBulkAction","selectedBulkAction","actionTypeSelect","value","props","onSelectedBulkAction","render","onSelectAll","bulkOptions","show","className","type","onClick","ref","select","T","map","option","idx","key","label","bind","title","options","onChange","rest","handleChange","increment","currentOptionKey","findIndex","op","length","valueLabel","find","styles","days","currentValue","placeholder","onDayChanged","theValue","name","selectedOption","venues","onVenueChanged","parsedValue","v","id","optionRenderer","location","class_name","children","replaceNewLine","dangerouslySetInnerHTML","__html","replace","DraggableItemTypes","UNSCHEDULEEVENT","SCHEDULEEVENT","TBALocation","SlotSizeOptions","PixelsPerMinute","constructor","event","summit","_event","_summit","getId","isPublished","hasOwnProperty","is_published","getMinutesDuration","slotSize","start_date","end_date","eventStartDateTime","moment","tz","time_zone","diff","duration","parseInt","canMove","siblings","day","startTime","interval","startDateTime","format","endDateTime","add","auxEvent","filter","item","auxEventStartDateTime","auxEventEndDateTime","isBefore","isAfter","calculateNewDates","minutes","isValidEndDate","endDate","startDate","summitEndDate","isSame","isValidStartDate","summitStartDate","isValidTitle","trim","isValid","epochToMomentTimeZone","atime","parseLocationHour","hour","parsedHour","toString","match","join","require","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","obj","prop","prototype","call","r","Symbol","toStringTag","step","initialTop","initialHeight","minHeight","maxHeight","canResize","allowResize","allowDrag","onResized","onUnPublishEvent","onEditEvent","onClickSelected","selectedPublishedEvents","onMoveEvent","collected","drag","useDrag","collect","monitor","isDragging","canDrag","static","resizeInfo","setResizeInfo","useState","resizing","lastYPos","size","setSize","top","height","isSelected","includes","canEdit","isResizable","popoverHoverFocus","Popover","description","onMouseMove","evt","newYPos","pageY","deltaY","steps","Math","round","abs","sign","preventDefault","newHeight","newTop","maxHeightTmp","onMouseUp","useEffect","document","addEventListener","removeEventListener","onMouseDown","target","getAttribute","box","getBoundingClientRect","clientY","bottom","style","display","cursor","checked","block","OverlayTrigger","trigger","placement","overlay","eventTitleBlock","TimeSlot","timeLabel","TimeSlotContainer","currentDay","currentSummit","events","timeSlot","pixelsPerMinute","canDropEvent","onDroppedEvent","divId","collectedProps","drop","useDrop","accept","isOver","canDrop","SummitEvent","component","backgroundColor","opacity","placeHolderStyle","minutesContainers","container_height","i","position","width","renderMinutesContainer","listRef","useRef","prevIntervalRef","timeSlotsList","setTimeSlotsList","newScrollTop","setNewScrollTop","scheduleEventContainer","current","scrollTop","slotChangeRatio","createSlots","endTime","onScheduleEvent","eventId","getBoundingBox","filteredEvents","floor","shift","getMaxHeight","ReactDOM","calculateInitialTop","utc","dayStartDateTime","calculateInitialHeight","tmpList","done","startTimeTZ","endTimeTZ","slot","push","clone","trackSpaceTime","scheduleEvents","selectedEvents","currentVenue","hideBulkSelect","useMemo","currentLocation","summitLocalStartDate","time_zone_id","summitLocalEndDate","currentAuxDay","allowedDays","sp","location_id","allowed_timeframes","at","getDaysOptions","allowedLocationIds","st","locations","loc","isNotVenue","isAllowed","forEach","rooms","subOption","getVenuesOptions","slotSizeOptions","open","close","summitTZ","allowedTimeFrame","tf","opening_hour","closing_hour","getTimeframe","onSlotSizeChange","marginBottom","marginTop","marginLeft","customBulkOptions","onMoveSingleEvent"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={6793:(e,t,s)=>{s.d(t,{toSlug:()=>i});s(8362),s(6530);const i=e=>(e=e.toLowerCase()).replace(/[^a-zA-Z0-9]+/g,"_")},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8362:e=>{e.exports=require("moment-timezone")},6530:e=>{e.exports=require("urijs")}},t={};function s(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,s),r.exports}(()=>{s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}})(),(()=>{s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var i={};return(()=>{s.r(i),s.d(i,{AllowedMultipleValueQuestionType:()=>h,AnswerValuesOperator_And:()=>_,AnswerValuesOperator_Or:()=>c,CheckBoxListQuestionType:()=>l,CheckBoxQuestionType:()=>u,ComboBoxQuestionType:()=>a,MainQuestionClassType:()=>b,RadioButtonListQuestionType:()=>p,VisibilityCondition_Equal:()=>f,VisibilityCondition_NotEqual:()=>d,Visibility_Visible:()=>y,default:()=>w});var e=s(8779),t=s.n(e),o=s(6793);function r(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function n(e){for(var s=1;s<arguments.length;s++){var i=null!=arguments[s]?arguments[s]:{};s%2?r(Object(i),!0).forEach((function(s){t()(e,s,i[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const u="CheckBox",a="ComboBox",l="CheckBoxList",p="RadioButtonList",h=[a,l,p],_="And",c="Or",f="Equal",d="NotEqual",y="Visible",b="MainQuestion";class w{constructor(e,s=[]){t()(this,"_parseQuestion",(e=>{if(this.questionByName[(0,o.toSlug)(e.name)]=e,this.questionById[parseInt(e.id)]=e,e.hasOwnProperty("sub_question_rules"))for(let t of e.sub_question_rules)this.rules[parseInt(t.id)]=t,this._parseQuestion(t.sub_question)})),t()(this,"_parseQuestions",(()=>{for(let e of this.questions)this._parseQuestion(e)})),t()(this,"_allowsValues",(e=>h.includes(e.type))),t()(this,"_allowsValue",((e,t)=>{let s=t.value.split(",").map((e=>parseInt(e)));for(let t of s)if(!e.values.map((e=>e.id)).includes(t))return!1;return!0})),t()(this,"_getAnswerFor",(e=>{let t=Number.isInteger(e)?e:e.id,s=this.answers[t]||null;return s||null})),t()(this,"_hasValue",(e=>""!==e.value)),t()(this,"_answerContains",((e,t)=>e.value.split(",").includes(t))),t()(this,"_isSubQuestionVisible",(e=>{let t=e.answer_values_operator===_;const s=this._getAnswerFor(e.parent_question_id);if(s)switch(e.visibility_condition){case f:for(let i of e.answer_values)t=e.answer_values_operator===_?t&&this._answerContains(s,i):t||this._answerContains(s,i);break;case d:for(let i of e.answer_values)t=e.answer_values_operator===_?t&&!this._answerContains(s,i):t||!this._answerContains(s,i)}else t=e.visibility_condition!==f;return e.visibility===y?t:!t})),t()(this,"_isAnswered",(e=>{const t=this._getAnswerFor(e);if(e.class===b)return!e.mandatory||!!t&&(!!this._hasValue(t)&&!(this._allowsValues(e)&&!this._allowsValue(e,t)));for(let s of e.parent_rules)if(this._isSubQuestionVisible(this.rules[s]))return!e.mandatory||!!t&&(!!this._hasValue(t)&&!(this._allowsValues(e)&&!this._allowsValue(e,t)));return!0})),t()(this,"_checkQuestion",(e=>{let t=this._isAnswered(e);if(e.hasOwnProperty("sub_question_rules"))for(let s of e.sub_question_rules)t=t&&this._checkQuestion(s.sub_question);return t})),t()(this,"_formatQuestionAnswer",(e=>{var t;let
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(this,(()=>(()=>{"use strict";var e={6793:(e,t,s)=>{s.d(t,{toSlug:()=>i});s(8362),s(6530);const i=e=>(e=e.toLowerCase()).replace(/[^a-zA-Z0-9]+/g,"_")},8779:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},8362:e=>{e.exports=require("moment-timezone")},6530:e=>{e.exports=require("urijs")}},t={};function s(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,s),r.exports}(()=>{s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t}})(),(()=>{s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var i={};return(()=>{s.r(i),s.d(i,{AllowedMultipleValueQuestionType:()=>h,AnswerValuesOperator_And:()=>_,AnswerValuesOperator_Or:()=>c,CheckBoxListQuestionType:()=>l,CheckBoxQuestionType:()=>u,ComboBoxQuestionType:()=>a,MainQuestionClassType:()=>b,RadioButtonListQuestionType:()=>p,VisibilityCondition_Equal:()=>f,VisibilityCondition_NotEqual:()=>d,Visibility_Visible:()=>y,default:()=>w});var e=s(8779),t=s.n(e),o=s(6793);function r(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function n(e){for(var s=1;s<arguments.length;s++){var i=null!=arguments[s]?arguments[s]:{};s%2?r(Object(i),!0).forEach((function(s){t()(e,s,i[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const u="CheckBox",a="ComboBox",l="CheckBoxList",p="RadioButtonList",h=[a,l,p],_="And",c="Or",f="Equal",d="NotEqual",y="Visible",b="MainQuestion";class w{constructor(e,s=[]){t()(this,"_parseQuestion",(e=>{if(this.questionByName[(0,o.toSlug)(e.name)]=e,this.questionById[parseInt(e.id)]=e,e.hasOwnProperty("sub_question_rules"))for(let t of e.sub_question_rules)this.rules[parseInt(t.id)]=t,this._parseQuestion(t.sub_question)})),t()(this,"_parseQuestions",(()=>{for(let e of this.questions)this._parseQuestion(e)})),t()(this,"_allowsValues",(e=>h.includes(e.type))),t()(this,"_allowsValue",((e,t)=>{let s=t.value.split(",").map((e=>parseInt(e)));for(let t of s)if(!e.values.map((e=>e.id)).includes(t))return!1;return!0})),t()(this,"_getAnswerFor",(e=>{let t=Number.isInteger(e)?e:e.id,s=this.answers[t]||null;return s||null})),t()(this,"_hasValue",(e=>""!==e.value)),t()(this,"_answerContains",((e,t)=>e.value.split(",").includes(t))),t()(this,"_isSubQuestionVisible",(e=>{let t=e.answer_values_operator===_;const s=this._getAnswerFor(e.parent_question_id);if(s)switch(e.visibility_condition){case f:for(let i of e.answer_values)t=e.answer_values_operator===_?t&&this._answerContains(s,i):t||this._answerContains(s,i);break;case d:for(let i of e.answer_values)t=e.answer_values_operator===_?t&&!this._answerContains(s,i):t||!this._answerContains(s,i)}else t=e.visibility_condition!==f;return e.visibility===y?t:!t})),t()(this,"_isAnswered",(e=>{const t=this._getAnswerFor(e);if(e.class===b)return!e.mandatory||!!t&&(!!this._hasValue(t)&&!(this._allowsValues(e)&&!this._allowsValue(e,t)));for(let s of e.parent_rules)if(this._isSubQuestionVisible(this.rules[s]))return!e.mandatory||!!t&&(!!this._hasValue(t)&&!(this._allowsValues(e)&&!this._allowsValue(e,t)));return!0})),t()(this,"_checkQuestion",(e=>{let t=this._isAnswered(e);if(e.hasOwnProperty("sub_question_rules"))for(let s of e.sub_question_rules)t=t&&this._checkQuestion(s.sub_question);return t})),t()(this,"_formatQuestionAnswer",(e=>{var t,s;let i={};const r=(0,o.toSlug)(e.name);let h=null===(t=this.originalAnswers.find((t=>t.question_id===e.id)))||void 0===t?void 0:t.value;if(!h&&(null==e||null===(s=e.values)||void 0===s?void 0:s.length)>0){const t=e.values.find((e=>e.is_default));t&&(h=t.id.toString())}if(h&&(e.type===u&&(h="false"!==h&&!!h),e.type!==p&&e.type!==a||(h=parseInt(h)),e.type===l&&(h=h.split(",").map((e=>parseInt(e)))||[])),i[r]=h||"",e.type===l&&""===i[r]&&(i[r]=[]),e.hasOwnProperty("sub_question_rules"))for(let t of e.sub_question_rules){let e=this._formatQuestionAnswer(t.sub_question);i=n(n({},i),e)}return i})),t()(this,"formatAnswers",(()=>{let e={};return this.questions.forEach((t=>{let s=this._formatQuestionAnswer(t);e=n(n({},e),s)})),e})),t()(this,"completed",(()=>{let e=!0;for(let t of this.questions)e=e&&this._checkQuestion(t);return e})),t()(this,"getQuestionByName",(e=>{const t=(0,o.toSlug)(e);return this.questionByName[e]||this.questionByName[t]||null})),t()(this,"getQuestionById",(e=>this.questionById[parseInt(e)]||null)),this.questions=e,this.originalAnswers=s,this.answers=[];for(let e of this.originalAnswers)this.answers[e.question_id]=e;this.questionByName={},this.questionById={},this.rules={},this._parseQuestions()}}})(),i})()));
|
|
2
2
|
//# sourceMappingURL=questions-set.js.map
|