@geowiki/evoland 0.16.0-dev.0 → 0.16.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Projects/Details.mjs +1 -1
- package/dist/Projects/ProjectList.mjs +1 -1
- package/dist/Projects/ProjectMap.mjs +11 -2
- package/dist/Tasks/TaskPerLocationList.mjs +1 -1
- package/dist/chunk-KGI5BCCH.mjs +11 -1
- package/dist/chunk-LGVI2HUZ.mjs +8 -1
- package/dist/chunk-Z3RFB5I2.mjs +13 -2
- package/dist/index.mjs +4 -1
- package/dist/styles.css +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ProjectDetails,b as default}from'../chunk-Z3RFB5I2.mjs';
|
|
1
|
+
export { a as ProjectDetails, b as default } from '../chunk-Z3RFB5I2.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ProjectList}from'../chunk-LGVI2HUZ.mjs';
|
|
1
|
+
export { a as ProjectList } from '../chunk-LGVI2HUZ.mjs';
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import {MapContainer,ZoomControl,TileLayer,Marker,Tooltip,useMap,useMapEvents
|
|
2
|
-
|
|
1
|
+
import { MapContainer, ZoomControl, TileLayer, Marker, Tooltip, useMap, useMapEvents } from 'react-leaflet';
|
|
2
|
+
import 'leaflet/dist/leaflet.css';
|
|
3
|
+
import { LatLngBounds, icon, LatLng, DivIcon } from 'leaflet';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { Button, Checkbox } from '@geowiki/ui';
|
|
6
|
+
import { useLocationsForProject, useRandomTasksPerLocation } from '@geowiki/core';
|
|
7
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var Z=e=>{let[k,f]=useState(4),[n,r]=useState(new LatLngBounds({lat:-90,lng:-180},{lat:90,lng:180})),[a,C]=useState(false),[u,v]=useState(Date.now()),{data:c}=useLocationsForProject({minx:n.getSouthWest().lng<-180?-180:n.getSouthWest().lng,miny:n.getSouthWest().lat<-90?-90:n.getSouthWest().lat,maxx:n.getNorthEast().lng>180?180:n.getNorthEast().lng,maxy:n.getNorthEast().lat>90?90:n.getNorthEast().lat,project_id:e.projectId,only_annotated:a}),{data:d}=useRandomTasksPerLocation({taskForReview:true,pageIdx:0,pageSize:1,locationProjectId:e.projectId}),[w,x]=useState(false),y=icon({iconUrl:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6" style="fill:'+(a?e.annotatedPinColor:e.pinColor)+';color:transparent"><path stroke-linecap="round" stroke-linejoin="round" d="M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" /><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z" /></svg>',iconSize:[25,35]});w||(r(n),x(true));function N(){let t=useMap(),m=useMapEvents({zoomend:()=>{f(m.getZoom()),r(t.getBounds());let g=Date.now();g-u>1e3&&(v(g),console.log("Call API to fetch points",g,u),r(t.getBounds()));}});return null}return jsxs("div",{children:[jsx(Button,{className:"mb-4",onClick:()=>{c?.elements.length>0?e.handleStart(false):alert("No location to annotate");},children:"Start Annotation"}),jsx(Button,{className:"mb-4 ml-4",onClick:()=>{window.location.href="/evoland/tasks?projectId="+e.projectId;},children:"View Tasks"}),jsx(Button,{className:"mb-4 ml-4",onClick:()=>{c?.elements.length>0?e.handleStart(true):alert("No location to fix annotation");},children:"Start Fixing"}),e.userRole=="admin"&&jsx(Button,{className:"mb-4 ml-4",onClick:()=>{d?.task?window.location.href=`/map?projectId=${e.projectId}&locationId=${d?.task?.location_id}&taskId=${d?.task?.task_id}&review=true`:alert("No more tasks to review");},children:"Start Targeted Review"}),jsxs("div",{className:"inline-flex px-4 py-2 float-right",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Show only annotated"}),jsx("dd",{className:"ml-2 leading-6 font-bold text-gray-700",children:jsx(Checkbox,{onClick:()=>C(!a)})})]}),jsxs(MapContainer,{center:new LatLng(.56,46.2),zoom:k,style:{height:"500px",width:"100%"},scrollWheelZoom:true,zoomControl:false,children:[jsx(ZoomControl,{position:"bottomleft"}),jsx(N,{}),jsx(TileLayer,{attribution:'\xA9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://clarity.maptiles.arcgis.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"}),c?.elements.map((t,m)=>jsx(Marker,{title:t.location_id,icon:t.location_id===null?new DivIcon({iconSize:[30,30],html:`<div class='marker-pin-outer' style="background:#00337C;"><div class='marker-pin-inner' style="background:`+(a?e.annotatedClusterColor:e.clusterColor)+`;">${t.n_locations}</div></div>`,className:"custom-div-icon"}):y,position:new LatLng(parseFloat(t.geometry.geometry.coordinates[1]),parseFloat(t.geometry.geometry.coordinates[0])),eventHandlers:{click:()=>{t.location_id!==null&&e.handleClusterExpand(t);}},children:t.location_id===null?jsxs(Tooltip,{children:["count: ",t.n_locations]}):jsx(Tooltip,{direction:"right",offset:[10,1],eventHandlers:{click:()=>{t.location_id!==null&&e.handleClusterExpand(t);}},children:a?jsx("a",{className:"text-xs",children:"Click to Open"}):jsx("a",{className:"text-xs",children:"Click to Annotate"})})},m))]})]})},D=Z;
|
|
10
|
+
|
|
11
|
+
export { D as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as TaskPerLocationList}from'../chunk-KGI5BCCH.mjs';
|
|
1
|
+
export { a as TaskPerLocationList } from '../chunk-KGI5BCCH.mjs';
|
package/dist/chunk-KGI5BCCH.mjs
CHANGED
|
@@ -1 +1,11 @@
|
|
|
1
|
-
import {useState
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useTasksPerLocation, useTaskComments, TaskStatus, TaskStatusColor } from '@geowiki/core';
|
|
3
|
+
import L from 'react-data-table-component';
|
|
4
|
+
import { OldCustomInput, Button, Tabs, TabsList, TabsTrigger } from '@geowiki/ui';
|
|
5
|
+
import B from 'next/link';
|
|
6
|
+
import { useRouter } from 'next/router';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var K=b=>{let h=useRouter(),[a,g]=useState("All");var[n,T]=useState(0);let l=10;var[c,v]=useState(),[r,u]=useState();let[s,k]=useState("-last_update_time"),o=h.query.projectId,I=[{name:"Task ID",sortField:"id",selector:e=>e.task_id,cell:e=>jsx(B,{className:"text-xs underline text-primary-600 hover:bg-primary-700",href:a=="Review"?`/map?projectId=${o}&locationId=${e.location_id}&taskId=${e.task_id}&review=true`:`/map?projectId=${o}&locationId=${e.location_id}&taskId=${e.task_id}`,target:"_blank",children:e.task_id}),sortable:true},{name:"Group",sortField:"group_name",selector:e=>e.location_group,sortable:true},{name:"Last Update",sortField:"last_update_time",selector:e=>new Date(e.last_update_time).toLocaleDateString()+" "+(new Date(e.last_update_time).getHours()<10?"0"+new Date(e.last_update_time).getHours():new Date(e.last_update_time).getHours())+":"+(new Date(e.last_update_time).getMinutes()<10?"0"+new Date(e.last_update_time).getMinutes():new Date(e.last_update_time).getMinutes()),sortable:true},{name:"User",sortField:"user_alias",selector:e=>e.user_alias,sortable:true},{name:"Project",selector:e=>e.project_id},{name:"Location",sortField:"location_id",selector:e=>e.location_id,sortable:true},{name:"Status",sortField:"status",selector:e=>e.status,cell:e=>jsx("div",{style:{backgroundColor:TaskStatusColor[e.status]},className:"rounded-lg text-xs pl-1 pr-1",children:TaskStatus[e.status]}),sortable:true},{name:"Comment",cell:(e,m)=>jsx("div",{children:y!==void 0?y.comments[m]:e.index})}],{data:d,isLoading:_}=useTasksPerLocation(s?.includes("location")?{taskForReview:a!="All",pageIdx:n,pageSize:l,locationProjectId:parseInt(o),locationOrderBy:s,search:r||null}:s?.includes("user")?{taskForReview:a!="All",pageIdx:n,pageSize:l,locationProjectId:parseInt(o),userOrderBy:s,search:r||null}:s?.includes("group")?{taskForReview:a!="All",pageIdx:n,pageSize:l,locationProjectId:parseInt(o),groupOrderBy:s.split("group_")[1],search:r||null}:{taskForReview:a!="All",pageIdx:n,pageSize:l,locationProjectId:parseInt(o),orderBy:s,search:r||null}),{data:y}=useTaskComments(d?.tasks.map(e=>e.task_id)||[]),S=e=>{var m=e-1;T(m);},C=e=>{s.includes(e.sortField)?k(s.includes("-")?e.sortField:"-"+e.sortField):k(e.sortField);},w=()=>d?.tasks,F={noRowsPerPage:true};return _?null:jsx("div",{className:" mx-auto px-2 h-auto",children:jsxs("div",{className:"items-center p-4",children:[jsx("div",{className:"flex",children:jsx("div",{className:"text-md font-semibold text-center leading-7 text-gray-900",children:"Tasks per Location"})}),jsx("div",{className:"flex",children:jsxs("div",{className:"text-md font-semibold text-center leading-7 text-gray-900 flex",children:[jsx(OldCustomInput,{name:"Search",type:"text",value:c,onKeyDown:e=>{e=="Enter"&&u(c);},onChange:e=>{v(e);}}),jsx(Button,{className:"ml-5 mt-2",onClick:()=>{u(c);},children:"Search"}),jsx(Button,{className:"ml-5 mt-2",onClick:()=>{v(""),u(null);},children:"Clear"})]})}),b.userRole=="admin"&&jsx(Tabs,{value:a,orientation:"vertical",className:"mt-2",children:jsxs(TabsList,{className:"w-30",children:[jsx(TabsTrigger,{value:"All",className:(a=="All"?"bg-primary text-secondary ":"bg-white text-primary ")+"w-full",asChild:true,children:jsx("div",{onClick:()=>g("All"),className:a=="All"?"pointer-events: none":"hover:cursor-pointer",children:"All"})}),jsx(TabsTrigger,{value:"Review",className:(a=="Review"?"bg-primary text-secondary ":"bg-white text-primary ")+"w-full",asChild:true,children:jsx("div",{onClick:()=>g("Review"),className:a=="Review"?"pointer-events: none":"hover:cursor-pointer",children:"Review"})})]})}),jsx("div",{className:"mx-auto px-4 py-5",children:jsx(L,{columns:I,data:d?.tasks??[],paginationTotalRows:d?.total_tasks,progressPending:_,paginationComponentOptions:F,pagination:true,paginationServer:true,onChangePage:S,sortFunction:w,onSort:C})})]})})};
|
|
10
|
+
|
|
11
|
+
export { K as a };
|
package/dist/chunk-LGVI2HUZ.mjs
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
import {useProjects}
|
|
1
|
+
import { useProjects } from '@geowiki/core';
|
|
2
|
+
import r from '@geowiki/map/src/store/evoland';
|
|
3
|
+
import { AuthenticationFailure } from '@geowiki/ui';
|
|
4
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var u=()=>{let s=r(),{data:i,isLoading:d,error:o}=useProjects(true,0,50);return d?null:(o?.message==="Unauthorized"&&(s.sessionTimeOut==false||s.sessionTimeOut==null)&&s.setSessionTimeOut(true),jsxs("div",{className:" mx-auto px-2 h-auto",children:[s.sessionTimeOut&&jsx(AuthenticationFailure,{}),jsx("div",{className:"md:flex md:items-center md:justify-between p-4",children:jsx("div",{className:"min-w-0 flex-1",children:jsx("h2",{className:"text-2xl font-bold text-center leading-7 text-gray-900 sm:truncate sm:text-3xl sm:tracking-tight",children:"Projects"})})}),jsx("ul",{role:"list",className:"mx-auto max-w-6xl grid grid-cols-1 gap-x-6 gap-y-8 lg:grid-cols-4 xl:gap-x-2 w-70 h-48 px-2 ",children:i?.projects?.map(t=>jsx("li",{className:"overflow-hidden border border-gray-700 ",children:jsxs("button",{onClick:()=>{location.href="/evoland/projects?projectId="+t.project_id;},className:"w-full h-auto",children:[jsx("div",{className:"flex items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-6 ",children:jsx("div",{className:"text-sm font-medium leading-6 text-gray-900",children:t.project_name})}),jsxs("dl",{className:"-my-3 divide-y divide-gray-100 px-6 py-4 text-sm leading-6",children:[jsxs("div",{className:"flex justify-between gap-x-4 py-3",children:[jsx("dt",{className:"text-gray-500",children:"Created on"}),jsx("dd",{className:"text-gray-700",children:jsx("time",{dateTime:t.creation_date,children:t.creation_date})})]}),jsxs("div",{className:"flex justify-between gap-x-4 py-3",children:[jsx("dt",{className:"text-gray-500",children:"No of Points"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:t.n_locations})})]})]})]},t.project_id)},t.project_id))})]}))};
|
|
7
|
+
|
|
8
|
+
export { u as a };
|
package/dist/chunk-Z3RFB5I2.mjs
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import {useRouter}from'next/router';import {useProjectDetails,useGroupsInProject,useProjectUsers,useProjectsPointsDownload,useLocationBulkUpload,useTaskBulkUpload,useReviewTaskBulkUpload,useProjectResultSet,useProjectStatisticsByUser,useContractStatisticsByUser,useUpdateActiveGroupInProject,downloadJSON,downloadData}from'@geowiki/core';import {TaskService}from'@geowiki/evoland-api-proxy';import {LoaderFull,DropdownMenu,DropdownMenuTrigger,DropdownMenuContent,DropdownMenuItem,OldCustomInput,PieChart}from'@geowiki/ui';import Ae from'next/dynamic';import Fe from'@geowiki/map/src/store/evoland';import {useState,useRef}from'react';import {createTask}from'@geowiki/map/src/utils/EvolandUtils';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var Ee=Ae(()=>import('./Projects/ProjectMap.mjs'),{loading:()=>jsx("p",{children:"Loading..."}),ssr:false}),Be=n=>{let v=useRouter(),i=parseInt(v.query.projectId),f=Fe(),[w,T]=useState(false),[de,ne]=useState(true),[U,M]=useState(false),[x,A]=useState(true),{data:s}=useProjectDetails(i,x),{data:d}=useGroupsInProject(i,w),{data:m}=useProjectUsers(i),{data:F}=useProjectsPointsDownload(i,U,n.userRole),[b,G]=useState(null),[u,k]=useState("2024-01-01"),[p,E]=useState(new Date().toISOString().split("T")[0]),h=useRef(null),j=useRef(null),C=useRef(null),[B,O]=useState(false),[D,V]=useState([0,"Select Group"]),[W,$]=useState(null),[q,Y]=useState(null),[J,z]=useState(null),[H,Q]=useState(null),[K,X]=useState(null),{data:Z,isLoading:ce}=useLocationBulkUpload(B,W,i,D[0]),{data:ee,isLoading:me}=useTaskBulkUpload(q,J,i),{data:te,isLoading:ue}=useReviewTaskBulkUpload(H,K,i),[I,R]=useState(false),[se,ae]=useState(false),{data:P,isLoading:pe}=useProjectResultSet(I,i,se),_=[{clusterColor:"#03C988",annotatedClusterColor:"#d5a6bd",pinColor:"brown",annotatedPinColor:"yellow"},{clusterColor:"#45818e",annotatedClusterColor:"#f1c232",pinColor:"blue",annotatedPinColor:"white"},{clusterColor:"#660000",annotatedClusterColor:"#c90076",pinColor:"green",annotatedPinColor:"indigo"},{clusterColor:"#5f6600",annotatedClusterColor:"#0068c9",pinColor:"pink",annotatedPinColor:"aqua"},{clusterColor:"#8703c9",annotatedClusterColor:"#61c900",pinColor:"orange",annotatedPinColor:"purple"}];n.userRole=="admin"&&s&&de&&(k(s?.start_date),ne(false));let{data:y}=useProjectStatisticsByUser(i,u,p,b),{data:ge}=useContractStatisticsByUser(i,u,p,b);s!==void 0&&x&&!w&&A(!x);let L=(e,o="data.xlsx")=>{g?.length==0||g?.filter(r=>r.value!==0).length==0?alert("No data to download"):downloadData(e,o);},g=[{label:"Submitted",value:y?.statistics?.reduce((e,o)=>e+o.submitted_tasks,0)},{label:"Accepted",value:y?.statistics?.reduce((e,o)=>e+o.accepted_tasks,0)},{label:"In Review",value:y?.statistics?.reduce((e,o)=>e+o.in_review_tasks,0)}],[c,ve]=useState(d?.filter(e=>e.is_active===true)[0]?(d?.filter(e=>e.is_active===true)[0]).group_id:0),{data:oe,isLoading:le}=useUpdateActiveGroupInProject(i,c,w);if(!le&&oe?.success&&(T(false),alert(oe?.success?"Active group updated successfully as "+d?.filter(e=>e.group_id==c)[0].group_name:"Please try again")),le)return jsx(LoaderFull,{});if(n.userRole=="admin"&&F&&(L(F,s?.project_name+"_locations.xlsx"),M(false)),Z&&!ce){let e=new Date(Date.now());O(false),$(null),downloadJSON(Z,"locations_uploaded_on_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".json"),V([0,"Select Group"]);}if(ee&&!me){let e=new Date(Date.now());Y(false),z(null),downloadJSON(ee,"tasks_uploaded_on_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".json");}if(te&&!ue){let e=new Date(Date.now());Q(false),X(null),downloadJSON(te,"review_tasks_uploaded_on_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".json");}if(P&&!pe){let e=new Date(Date.now());R(false),se?downloadJSON(P,s.project_name+"_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".geojson"):downloadData(P,s.project_name+"_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".csv");}return jsxs("div",{className:"bg-white lg:px-2",children:[jsxs("div",{className:"flex",children:[n.userRole=="admin"&&jsxs("div",{className:"w-[25%] flex-col",children:[jsx("div",{className:"w-50 text-md text-center font-bold tracking-tight text-gray-900 m-5 sm:text-2xl",children:"Manage"}),jsxs("fieldset",{className:"border p-4 rounded m-4",children:[jsx("legend",{children:"Upload"}),jsxs("div",{className:"flex",children:["Locations",jsxs("div",{className:"ml-5",children:[jsx("input",{ref:h,type:"file",className:"block w-full text-sm text-slate-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 file:text-violet-700 hover:file:bg-violet-100",onChange:e=>$(e.target.files[0])}),jsxs("div",{className:"flex flex-row pb-3",children:[jsxs(DropdownMenu,{children:[jsx(DropdownMenuTrigger,{className:"w-full text-sm p-2 bg-primary h-8 text-secondary",children:D[1]}),jsx(DropdownMenuContent,{children:d?.sort((e,o)=>o.is_active-e.is_active).map((e,o)=>jsx(DropdownMenuItem,{className:"text-xs",id:""+e.group_id,onSelect:()=>{V([e.group_id,e.group_name]);},children:e.group_name},o))})]}),jsx("div",{className:"w-6 h-6 ml-2",children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-6 "+(D[0]!=0&&W&&!B?"hover:cursor-pointer":"pointer-events-none"),onClick:()=>{O(true),h.current&&(h.current.value="");},children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}),jsx("title",{children:"Upload locations for selected group"})]})})]})]})]}),jsxs("div",{className:"flex pt-3",children:["Tasks",jsxs("div",{className:"ml-5 flex",children:[jsx("input",{ref:j,type:"file",className:"block w-full text-sm text-slate-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 file:text-violet-700 hover:file:bg-violet-100",onChange:e=>z(e.target.files[0])}),jsx("div",{className:"w-6 h-6 ml-1",children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-6 "+(J&&!q?"hover:cursor-pointer":"pointer-events-none"),onClick:()=>{Y(true),j.current&&(j.current.value="");},children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}),jsx("title",{children:"Upload tasks for this project"})]})})]})]}),jsxs("div",{className:"flex pt-3",children:["Review",jsxs("div",{className:"ml-5 flex",children:[jsx("input",{ref:C,type:"file",className:"block w-full text-sm text-slate-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 file:text-violet-700 hover:file:bg-violet-100",onChange:e=>X(e.target.files[0])}),jsx("div",{className:"w-6 h-6 ml-1",children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-6 "+(K&&!H?"hover:cursor-pointer":"pointer-events-none"),onClick:()=>{Q(true),C.current&&(C.current.value="");},children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}),jsx("title",{children:"Upload review tasks for this project"})]})})]})]})]}),jsxs("fieldset",{className:"border p-4 rounded m-4",children:[jsx("legend",{children:"Download"}),s?.meta_data?.QUESTIONNAIRE&&s?.meta_data?.QUESTIONNAIRE==true&&jsxs("div",{className:"flex",children:[jsx("div",{children:"Questionnaire"}),jsx("a",{className:"pl-2 w-10 underline text-primary "+(I?"pointer-events-none":"hover:cursor-pointer"),onClick:()=>{R(true),ae(false);},children:"CSV"}),jsx("a",{className:"pl-2 underline text-primary "+(I?"pointer-events-none":"hover:cursor-pointer"),onClick:()=>{R(true),ae(true);},children:"Geo Json"})]})]})]}),jsxs("div",{className:"items-center justify-center flex flex-col border-gray-200 border-2 "+(n.userRole=="admin"?"w-[55%]":"w-full"),children:[jsx("div",{className:"text-md text-center font-bold tracking-tight text-gray-900 m-5 sm:text-2xl",children:"Details"}),jsxs("div",{className:"px-4 sm:px-0 w-full",children:[jsx("div",{className:"mt-6 border-t border-gray-100 w-full",children:jsxs("dl",{className:"divide-y divide-gray-100 text-left lg:px-8 xl:px-12 ",children:[jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Title"}),jsx("dd",{className:"mt-1 leading-6 font-bold text-lg text-gray-700 sm:col-span-2 sm:mt-0",children:s?.project_name})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Id"}),jsx("dd",{title:n.userRole=="admin"?"Download all location's coordinates for this project":"",className:"mt-1 leading-6 font-bold text-gray-700 sm:col-span-2 sm:mt-0"+(n.userRole=="admin"&&!U?" underline text-primary hover:cursor-pointer":""),onClick:()=>{M(true);},children:s?.project_id})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"No of Points in group"}),jsx("dd",{className:"mt-1 leading-6 font-bold text-gray-700 sm:col-span-2 sm:mt-0",children:s?.n_locations_group})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Overall project progress"}),jsxs("dd",{className:"mt-1 sm:col-span-2 sm:mt-0 flex flex-row ",children:[jsx("div",{style:{width:(s?.proj_completed_locations||0)/(s?.n_locations||1)*100+"%"},className:"bg-primary text-xs",title:"Completed: "+s?.proj_completed_locations}),jsx("div",{style:{width:(s?.proj_submitted_locations||0)/(s?.n_locations||1)*100+"%"},className:"bg-green-300 text-xs",title:"Submitted: "+s?.proj_submitted_locations}),jsx("div",{style:{width:100-((s?.proj_completed_locations||0)+(s?.proj_submitted_locations||0))/(s?.n_locations||1)*100+"%"},className:"bg-gray-300 text-xs",title:"Remaining: "+((s?.n_locations||0)-((s?.proj_completed_locations||0)+(s?.proj_submitted_locations||0)))}),jsxs("div",{className:"text-xs flex items-center",children:[(s?.proj_completed_locations||0)+(s?.proj_submitted_locations||0),"/",s?.n_locations]})]})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Overall group progress"}),jsxs("dd",{className:"mt-1 sm:col-span-2 sm:mt-0 flex flex-row ",children:[jsx("div",{style:{width:(s?.group_completed_locations||0)/(s?.n_locations_group||1)*100+"%"},className:"bg-primary text-xs",title:"Completed: "+s?.group_completed_locations}),jsx("div",{style:{width:(s?.group_submitted_locations||0)/(s?.n_locations_group||1)*100+"%"},className:"bg-green-300 text-xs",title:"Submitted: "+s?.group_submitted_locations}),jsx("div",{style:{width:100-((s?.group_completed_locations||0)+(s?.group_submitted_locations||0))/(s?.n_locations_group||1)*100+"%"},className:"bg-gray-300 text-xs",title:"Remaining: "+((s?.n_locations_group||0)-((s?.group_completed_locations||0)+(s?.group_submitted_locations||0)))}),jsxs("div",{className:"text-xs flex items-center",children:[(s?.group_completed_locations||0)+(s?.group_submitted_locations||0),"/",s?.n_locations_group]})]})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"My progress in current group"}),jsx("dd",{className:"mt-1 leading-6 font-bold text-gray-700 sm:col-span-2 sm:mt-0",children:s?.user_contributions})]})]})}),jsxs("ul",{role:"list",className:"px-2 w-full",children:[jsxs("li",{className:"border border-gray-700 m-5 flex",children:[jsx("div",{className:"items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-4",children:jsx("div",{className:"text-sm font-semibold leading-6 text-gray-900",children:"My Statistics"})}),jsxs("dl",{className:"-my-3 divide-y divide-gray-100 px-3 py-4 text-sm leading-6 flex",children:[jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"All submissions"}),jsx("dd",{className:"text-gray-700",children:jsx("div",{className:"font-medium text-gray-900",children:Math.round((s?.user_tasks_in_review||0)+(s?.user_tasks_to_fix||0)+(s?.user_discarded_tasks||0)+(s?.user_tasks_accepted||0)+(s?.user_task_submitted||0))})})]}),jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2 ml-4",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"In Review"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.user_tasks_in_review})})]}),jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2 ml-4",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"To Fix"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.user_tasks_to_fix})})]}),jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2 ml-4",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"Discarded"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.user_discarded_tasks})})]}),jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2 ml-4",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"Accepted"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.user_tasks_accepted})})]})]})]},"userStats"),n.userRole=="admin"&&jsxs(Fragment,{children:[jsxs("li",{className:"flex border border-gray-700 m-5",children:[jsx("div",{className:"items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-4",children:jsx("div",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Project Statistics"})}),jsxs("dl",{className:"-my-3 divide-y divide-gray-100 px-6 py-4 text-sm leading-6 flex",children:[jsxs("div",{className:"flex items-center mr-2 justify-between gap-x-4 py-3",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"In Review"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.project_tasks_in_review})})]}),jsxs("div",{className:"flex items-center ml-4 mr-2 justify-between gap-x-4 py-3",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"To Fix"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.project_tasks_to_fix})})]}),jsxs("div",{className:"flex items-center ml-4 mr-2 justify-between gap-x-4 py-3",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"Accepted"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.project_tasks_accepted})})]})]})]},"projectStats"),jsxs("li",{className:"border border-gray-700 m-5 h-50 overflow-y-scroll",children:[jsx("div",{className:"flex items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-4",children:jsx("div",{className:"text-sm font-semibold leading-4 text-gray-900",children:"Groups in Project"})}),jsxs("dl",{className:"flex flex-row px-6 py-2 text-sm leading-6 bg-gray-200",children:[jsx("div",{className:"mr-2 w-full",children:jsx("dt",{className:"text-gray-500",children:"Name"})}),jsx("div",{className:"ml-2 mr-2 w-full",children:jsx("dt",{className:"text-gray-500",children:"Locations"})}),jsx("div",{className:"ml-2 w-full",children:jsx("dt",{className:"text-gray-500",children:"Status"})})]}),d?.sort((e,o)=>o.is_active-e.is_active).map((e,o)=>jsxs("dl",{className:"flex flex-row px-6 py-4 text-sm leading-6 -my-3 divide-y divide-gray-100",children:[jsx("dt",{className:"mr-2 font-medium text-gray-900 w-full",children:e.group_name}),jsx("dt",{className:"ml-2 mr-2 font-medium text-gray-900 w-full",children:e.n_locations}),jsx("dt",{className:"ml-2 font-medium text-gray-900 w-full",children:jsx("div",{className:e.is_active?"":"underline text-blue-500 hover:cursor-pointer",title:e.is_active?"":"Make this current active group",onClick:()=>{e.is_active||(T(true),A(!x),ve(e.group_id));},children:e.is_active?"Active":"Not Active"})})]},o))]},"groupsInProject")]})]})]})]}),jsxs("div",{className:"w-[20%] ml-5 flex-col",children:[jsx("div",{className:"text-md text-center font-bold tracking-tight text-gray-900 m-5 sm:text-2xl",children:"Data"}),jsxs("div",{className:"mb-2 text-xs",children:[jsxs("div",{className:"mt-1 inline-flex",children:[jsx("div",{children:"From"}),jsx(OldCustomInput,{cssClass:"h-5 flex text-xs text-black ml-1",displayText:"From",noDisplayTextAsLabel:true,type:"date",value:u,onChange:e=>{k(e.toString());}})]}),jsxs("div",{className:"inline-flex ml-1 mt-1",children:[jsx("div",{className:"w-6",children:"To"}),jsx(OldCustomInput,{cssClass:"h-5 flex text-xs text-black ml-1",displayText:"To",noDisplayTextAsLabel:true,type:"date",value:p,onChange:e=>{E(e.toString());}})]})]}),jsx("div",{className:"inline-flex",children:m&&jsxs("select",{className:"text-xs",onChange:e=>{e.target.selectedIndex!==0?(G(m[e.target.selectedIndex-1].user_alias),k(m[e.target.selectedIndex-1].contract_start_date?m[e.target.selectedIndex-1].contract_start_date:u),E(m[e.target.selectedIndex-1].contract_end_date?m[e.target.selectedIndex-1].contract_end_date:p),localStorage.setItem("searchUser",m[e.target.selectedIndex-1].user_alias)):(G(null),localStorage.removeItem("searchUser"));},children:[jsx("option",{value:"0",children:"Select User"}),m?.map((e,o)=>jsx("option",{value:e.user_id,selected:b==e.user_alias,children:e.user_alias},o))]})}),jsxs("div",{className:"ml-2 inline-flex",children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6 pt-1 hover:cursor-pointer",onClick:()=>{L(y?.statistics.map(e=>({user_id:e.user_id,user_alias:e.user_alias,submitted_tasks:e.submitted_tasks,in_review_tasks:e.in_review_tasks,accepted_tasks:e.accepted_tasks,skipped_tasks:e.skipped_tasks,user_discarded_tasks:e.user_discarded_tasks,discarded_tasks:e.discarded_tasks,to_fix_tasks:e.to_fix_tasks,all_finished_tasks:e.all_finished_tasks,min_time:e.min_time,max_time:e.max_time,mean_time:e.mean_time})),"Project_data_"+u+"_"+p+".xlsx");},children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}),jsx("title",{children:"Download Project data"})]}),n.userRole=="admin"&&jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6 pt-1 bg-primary rounded text-white hover:cursor-pointer",onClick:()=>L(ge?.statistics,"Contractual_data.xlsx"),children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}),jsx("title",{children:"Download Contractual data"})]})]}),jsxs("div",{children:[g?.length==0||g?.filter(e=>e.value!==0).length==0&&jsx("div",{className:"pt-5 text-center",children:"No Data"}),jsx(PieChart,{innerRadius:0,outerRadius:100,data:g?.filter(e=>e.value!==0)})]})]})]}),jsx("div",{className:"mx-auto max-w-screen pt-4 text-center",children:jsx(Ee,{projectId:i,userRole:n.userRole,handleClusterExpand:e=>{createTask(e.location_id,i,s.project_reference_date.toString()).then(({location:o,currentTask:r,annotation_dates:fe})=>{o&&f.setLocation(o),r?(f.setCurrentTask(r),f.setAnnotationDates(fe),v.push(`/map?projectId=${i}&locationId=${e.location_id}&taskId=${r?.task_id}`).then()):alert("No task for you on this location");});},clusterColor:_[d&&c!=0?d?.findIndex(e=>e.group_id==c):0].clusterColor,annotatedClusterColor:_[d&&c!=0?d?.findIndex(e=>e.group_id==c):0].annotatedClusterColor,pinColor:_[d&&c!=0?d?.findIndex(e=>e.group_id==c):0].pinColor,annotatedPinColor:_[d&&c!=0?d?.findIndex(e=>e.group_id==c):0].annotatedPinColor,handleStart:async e=>{let o={project_id:i,only_not_submitted:true,reference_date:s?.project_reference_date.toString(),to_fix:e};var r=await TaskService.getNextLocationNexttaskPost(o);r!=null&&(r.exists==false&&r.location==null?(alert("No more locations are left to "+(e?"fix":"annotate")+" for you"),v.push("/evoland/projects")):r.location!=null&&r.task==null?alert("Please try again"):(f.setTimerReset(true),v.push(`/map?projectId=${i}&locationId=${r.location?.location_id}&taskId=${r.task?.task_id}`).then()));}})})]})},Xe=Be;
|
|
2
|
-
|
|
1
|
+
import { useRouter } from 'next/router';
|
|
2
|
+
import { useProjectDetails, useGroupsInProject, useProjectUsers, useProjectsPointsDownload, useLocationBulkUpload, useTaskBulkUpload, useReviewTaskBulkUpload, useProjectResultSet, useProjectStatisticsByUser, useContractStatisticsByUser, useUpdateActiveGroupInProject, downloadJSON, downloadData } from '@geowiki/core';
|
|
3
|
+
import { TaskService } from '@geowiki/evoland-api-proxy';
|
|
4
|
+
import { LoaderFull, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, OldCustomInput, PieChart } from '@geowiki/ui';
|
|
5
|
+
import Ae from 'next/dynamic';
|
|
6
|
+
import Fe from '@geowiki/map/src/store/evoland';
|
|
7
|
+
import { useState, useRef } from 'react';
|
|
8
|
+
import { createTask } from '@geowiki/map/src/utils/EvolandUtils';
|
|
9
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
|
|
11
|
+
var Ee=Ae(()=>import('./Projects/ProjectMap.mjs'),{loading:()=>jsx("p",{children:"Loading..."}),ssr:false}),Be=n=>{let v=useRouter(),i=parseInt(v.query.projectId),f=Fe(),[w,T]=useState(false),[de,ne]=useState(true),[U,M]=useState(false),[x,A]=useState(true),{data:s}=useProjectDetails(i,x),{data:d}=useGroupsInProject(i,w),{data:m}=useProjectUsers(i),{data:F}=useProjectsPointsDownload(i,U,n.userRole),[b,G]=useState(null),[u,k]=useState("2024-01-01"),[p,E]=useState(new Date().toISOString().split("T")[0]),h=useRef(null),j=useRef(null),C=useRef(null),[B,O]=useState(false),[D,V]=useState([0,"Select Group"]),[W,$]=useState(null),[q,Y]=useState(null),[J,z]=useState(null),[H,Q]=useState(null),[K,X]=useState(null),{data:Z,isLoading:ce}=useLocationBulkUpload(B,W,i,D[0]),{data:ee,isLoading:me}=useTaskBulkUpload(q,J,i),{data:te,isLoading:ue}=useReviewTaskBulkUpload(H,K,i),[I,R]=useState(false),[se,ae]=useState(false),{data:P,isLoading:pe}=useProjectResultSet(I,i,se),_=[{clusterColor:"#03C988",annotatedClusterColor:"#d5a6bd",pinColor:"brown",annotatedPinColor:"yellow"},{clusterColor:"#45818e",annotatedClusterColor:"#f1c232",pinColor:"blue",annotatedPinColor:"white"},{clusterColor:"#660000",annotatedClusterColor:"#c90076",pinColor:"green",annotatedPinColor:"indigo"},{clusterColor:"#5f6600",annotatedClusterColor:"#0068c9",pinColor:"pink",annotatedPinColor:"aqua"},{clusterColor:"#8703c9",annotatedClusterColor:"#61c900",pinColor:"orange",annotatedPinColor:"purple"}];n.userRole=="admin"&&s&&de&&(k(s?.start_date),ne(false));let{data:y}=useProjectStatisticsByUser(i,u,p,b),{data:ge}=useContractStatisticsByUser(i,u,p,b);s!==void 0&&x&&!w&&A(!x);let L=(e,o="data.xlsx")=>{g?.length==0||g?.filter(r=>r.value!==0).length==0?alert("No data to download"):downloadData(e,o);},g=[{label:"Submitted",value:y?.statistics?.reduce((e,o)=>e+o.submitted_tasks,0)},{label:"Accepted",value:y?.statistics?.reduce((e,o)=>e+o.accepted_tasks,0)},{label:"In Review",value:y?.statistics?.reduce((e,o)=>e+o.in_review_tasks,0)}],[c,ve]=useState(d?.filter(e=>e.is_active===true)[0]?(d?.filter(e=>e.is_active===true)[0]).group_id:0),{data:oe,isLoading:le}=useUpdateActiveGroupInProject(i,c,w);if(!le&&oe?.success&&(T(false),alert(oe?.success?"Active group updated successfully as "+d?.filter(e=>e.group_id==c)[0].group_name:"Please try again")),le)return jsx(LoaderFull,{});if(n.userRole=="admin"&&F&&(L(F,s?.project_name+"_locations.xlsx"),M(false)),Z&&!ce){let e=new Date(Date.now());O(false),$(null),downloadJSON(Z,"locations_uploaded_on_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".json"),V([0,"Select Group"]);}if(ee&&!me){let e=new Date(Date.now());Y(false),z(null),downloadJSON(ee,"tasks_uploaded_on_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".json");}if(te&&!ue){let e=new Date(Date.now());Q(false),X(null),downloadJSON(te,"review_tasks_uploaded_on_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".json");}if(P&&!pe){let e=new Date(Date.now());R(false),se?downloadJSON(P,s.project_name+"_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".geojson"):downloadData(P,s.project_name+"_"+e.getDate()+"-"+e.getMonth()+"-"+e.getFullYear()+".csv");}return jsxs("div",{className:"bg-white lg:px-2",children:[jsxs("div",{className:"flex",children:[n.userRole=="admin"&&jsxs("div",{className:"w-[25%] flex-col",children:[jsx("div",{className:"w-50 text-md text-center font-bold tracking-tight text-gray-900 m-5 sm:text-2xl",children:"Manage"}),jsxs("fieldset",{className:"border p-4 rounded m-4",children:[jsx("legend",{children:"Upload"}),jsxs("div",{className:"flex",children:["Locations",jsxs("div",{className:"ml-5",children:[jsx("input",{ref:h,type:"file",className:"block w-full text-sm text-slate-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 file:text-violet-700 hover:file:bg-violet-100",onChange:e=>$(e.target.files[0])}),jsxs("div",{className:"flex flex-row pb-3",children:[jsxs(DropdownMenu,{children:[jsx(DropdownMenuTrigger,{className:"w-full text-sm p-2 bg-primary h-8 text-secondary",children:D[1]}),jsx(DropdownMenuContent,{children:d?.sort((e,o)=>o.is_active-e.is_active).map((e,o)=>jsx(DropdownMenuItem,{className:"text-xs",id:""+e.group_id,onSelect:()=>{V([e.group_id,e.group_name]);},children:e.group_name},o))})]}),jsx("div",{className:"w-6 h-6 ml-2",children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-6 "+(D[0]!=0&&W&&!B?"hover:cursor-pointer":"pointer-events-none"),onClick:()=>{O(true),h.current&&(h.current.value="");},children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}),jsx("title",{children:"Upload locations for selected group"})]})})]})]})]}),jsxs("div",{className:"flex pt-3",children:["Tasks",jsxs("div",{className:"ml-5 flex",children:[jsx("input",{ref:j,type:"file",className:"block w-full text-sm text-slate-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 file:text-violet-700 hover:file:bg-violet-100",onChange:e=>z(e.target.files[0])}),jsx("div",{className:"w-6 h-6 ml-1",children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-6 "+(J&&!q?"hover:cursor-pointer":"pointer-events-none"),onClick:()=>{Y(true),j.current&&(j.current.value="");},children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}),jsx("title",{children:"Upload tasks for this project"})]})})]})]}),jsxs("div",{className:"flex pt-3",children:["Review",jsxs("div",{className:"ml-5 flex",children:[jsx("input",{ref:C,type:"file",className:"block w-full text-sm text-slate-500 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 file:text-violet-700 hover:file:bg-violet-100",onChange:e=>X(e.target.files[0])}),jsx("div",{className:"w-6 h-6 ml-1",children:jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"size-6 "+(K&&!H?"hover:cursor-pointer":"pointer-events-none"),onClick:()=>{Q(true),C.current&&(C.current.value="");},children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}),jsx("title",{children:"Upload review tasks for this project"})]})})]})]})]}),jsxs("fieldset",{className:"border p-4 rounded m-4",children:[jsx("legend",{children:"Download"}),s?.meta_data?.QUESTIONNAIRE&&s?.meta_data?.QUESTIONNAIRE==true&&jsxs("div",{className:"flex",children:[jsx("div",{children:"Questionnaire"}),jsx("a",{className:"pl-2 w-10 underline text-primary "+(I?"pointer-events-none":"hover:cursor-pointer"),onClick:()=>{R(true),ae(false);},children:"CSV"}),jsx("a",{className:"pl-2 underline text-primary "+(I?"pointer-events-none":"hover:cursor-pointer"),onClick:()=>{R(true),ae(true);},children:"Geo Json"})]})]})]}),jsxs("div",{className:"items-center justify-center flex flex-col border-gray-200 border-2 "+(n.userRole=="admin"?"w-[55%]":"w-full"),children:[jsx("div",{className:"text-md text-center font-bold tracking-tight text-gray-900 m-5 sm:text-2xl",children:"Details"}),jsxs("div",{className:"px-4 sm:px-0 w-full",children:[jsx("div",{className:"mt-6 border-t border-gray-100 w-full",children:jsxs("dl",{className:"divide-y divide-gray-100 text-left lg:px-8 xl:px-12 ",children:[jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Title"}),jsx("dd",{className:"mt-1 leading-6 font-bold text-lg text-gray-700 sm:col-span-2 sm:mt-0",children:s?.project_name})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Id"}),jsx("dd",{title:n.userRole=="admin"?"Download all location's coordinates for this project":"",className:"mt-1 leading-6 font-bold text-gray-700 sm:col-span-2 sm:mt-0"+(n.userRole=="admin"&&!U?" underline text-primary hover:cursor-pointer":""),onClick:()=>{M(true);},children:s?.project_id})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"No of Points in group"}),jsx("dd",{className:"mt-1 leading-6 font-bold text-gray-700 sm:col-span-2 sm:mt-0",children:s?.n_locations_group})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Overall project progress"}),jsxs("dd",{className:"mt-1 sm:col-span-2 sm:mt-0 flex flex-row ",children:[jsx("div",{style:{width:(s?.proj_completed_locations||0)/(s?.n_locations||1)*100+"%"},className:"bg-primary text-xs",title:"Completed: "+s?.proj_completed_locations}),jsx("div",{style:{width:(s?.proj_submitted_locations||0)/(s?.n_locations||1)*100+"%"},className:"bg-green-300 text-xs",title:"Submitted: "+s?.proj_submitted_locations}),jsx("div",{style:{width:100-((s?.proj_completed_locations||0)+(s?.proj_submitted_locations||0))/(s?.n_locations||1)*100+"%"},className:"bg-gray-300 text-xs",title:"Remaining: "+((s?.n_locations||0)-((s?.proj_completed_locations||0)+(s?.proj_submitted_locations||0)))}),jsxs("div",{className:"text-xs flex items-center",children:[(s?.proj_completed_locations||0)+(s?.proj_submitted_locations||0),"/",s?.n_locations]})]})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"Overall group progress"}),jsxs("dd",{className:"mt-1 sm:col-span-2 sm:mt-0 flex flex-row ",children:[jsx("div",{style:{width:(s?.group_completed_locations||0)/(s?.n_locations_group||1)*100+"%"},className:"bg-primary text-xs",title:"Completed: "+s?.group_completed_locations}),jsx("div",{style:{width:(s?.group_submitted_locations||0)/(s?.n_locations_group||1)*100+"%"},className:"bg-green-300 text-xs",title:"Submitted: "+s?.group_submitted_locations}),jsx("div",{style:{width:100-((s?.group_completed_locations||0)+(s?.group_submitted_locations||0))/(s?.n_locations_group||1)*100+"%"},className:"bg-gray-300 text-xs",title:"Remaining: "+((s?.n_locations_group||0)-((s?.group_completed_locations||0)+(s?.group_submitted_locations||0)))}),jsxs("div",{className:"text-xs flex items-center",children:[(s?.group_completed_locations||0)+(s?.group_submitted_locations||0),"/",s?.n_locations_group]})]})]}),jsxs("div",{className:"px-4 py-2 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-0",children:[jsx("dt",{className:"text-sm leading-6 text-gray-900",children:"My progress in current group"}),jsx("dd",{className:"mt-1 leading-6 font-bold text-gray-700 sm:col-span-2 sm:mt-0",children:s?.user_contributions})]})]})}),jsxs("ul",{role:"list",className:"px-2 w-full",children:[jsxs("li",{className:"border border-gray-700 m-5 flex",children:[jsx("div",{className:"items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-4",children:jsx("div",{className:"text-sm font-semibold leading-6 text-gray-900",children:"My Statistics"})}),jsxs("dl",{className:"-my-3 divide-y divide-gray-100 px-3 py-4 text-sm leading-6 flex",children:[jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"All submissions"}),jsx("dd",{className:"text-gray-700",children:jsx("div",{className:"font-medium text-gray-900",children:Math.round((s?.user_tasks_in_review||0)+(s?.user_tasks_to_fix||0)+(s?.user_discarded_tasks||0)+(s?.user_tasks_accepted||0)+(s?.user_task_submitted||0))})})]}),jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2 ml-4",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"In Review"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.user_tasks_in_review})})]}),jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2 ml-4",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"To Fix"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.user_tasks_to_fix})})]}),jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2 ml-4",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"Discarded"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.user_discarded_tasks})})]}),jsxs("div",{className:"flex items-center justify-between gap-x-4 py-3 mr-2 ml-4",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"Accepted"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.user_tasks_accepted})})]})]})]},"userStats"),n.userRole=="admin"&&jsxs(Fragment,{children:[jsxs("li",{className:"flex border border-gray-700 m-5",children:[jsx("div",{className:"items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-4",children:jsx("div",{className:"text-sm font-semibold leading-6 text-gray-900",children:"Project Statistics"})}),jsxs("dl",{className:"-my-3 divide-y divide-gray-100 px-6 py-4 text-sm leading-6 flex",children:[jsxs("div",{className:"flex items-center mr-2 justify-between gap-x-4 py-3",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"In Review"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.project_tasks_in_review})})]}),jsxs("div",{className:"flex items-center ml-4 mr-2 justify-between gap-x-4 py-3",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"To Fix"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.project_tasks_to_fix})})]}),jsxs("div",{className:"flex items-center ml-4 mr-2 justify-between gap-x-4 py-3",children:[jsx("dt",{className:"text-gray-500 font-semibold",children:"Accepted"}),jsx("dd",{className:"flex items-start gap-x-2",children:jsx("div",{className:"font-medium text-gray-900",children:s?.project_tasks_accepted})})]})]})]},"projectStats"),jsxs("li",{className:"border border-gray-700 m-5 h-50 overflow-y-scroll",children:[jsx("div",{className:"flex items-center gap-x-4 border-b border-gray-900/5 bg-gray-50 p-4",children:jsx("div",{className:"text-sm font-semibold leading-4 text-gray-900",children:"Groups in Project"})}),jsxs("dl",{className:"flex flex-row px-6 py-2 text-sm leading-6 bg-gray-200",children:[jsx("div",{className:"mr-2 w-full",children:jsx("dt",{className:"text-gray-500",children:"Name"})}),jsx("div",{className:"ml-2 mr-2 w-full",children:jsx("dt",{className:"text-gray-500",children:"Locations"})}),jsx("div",{className:"ml-2 w-full",children:jsx("dt",{className:"text-gray-500",children:"Status"})})]}),d?.sort((e,o)=>o.is_active-e.is_active).map((e,o)=>jsxs("dl",{className:"flex flex-row px-6 py-4 text-sm leading-6 -my-3 divide-y divide-gray-100",children:[jsx("dt",{className:"mr-2 font-medium text-gray-900 w-full",children:e.group_name}),jsx("dt",{className:"ml-2 mr-2 font-medium text-gray-900 w-full",children:e.n_locations}),jsx("dt",{className:"ml-2 font-medium text-gray-900 w-full",children:jsx("div",{className:e.is_active?"":"underline text-blue-500 hover:cursor-pointer",title:e.is_active?"":"Make this current active group",onClick:()=>{e.is_active||(T(true),A(!x),ve(e.group_id));},children:e.is_active?"Active":"Not Active"})})]},o))]},"groupsInProject")]})]})]})]}),jsxs("div",{className:"w-[20%] ml-5 flex-col",children:[jsx("div",{className:"text-md text-center font-bold tracking-tight text-gray-900 m-5 sm:text-2xl",children:"Data"}),jsxs("div",{className:"mb-2 text-xs",children:[jsxs("div",{className:"mt-1 inline-flex",children:[jsx("div",{children:"From"}),jsx(OldCustomInput,{cssClass:"h-5 flex text-xs text-black ml-1",displayText:"From",noDisplayTextAsLabel:true,type:"date",value:u,onChange:e=>{k(e.toString());}})]}),jsxs("div",{className:"inline-flex ml-1 mt-1",children:[jsx("div",{className:"w-6",children:"To"}),jsx(OldCustomInput,{cssClass:"h-5 flex text-xs text-black ml-1",displayText:"To",noDisplayTextAsLabel:true,type:"date",value:p,onChange:e=>{E(e.toString());}})]})]}),jsx("div",{className:"inline-flex",children:m&&jsxs("select",{className:"text-xs",onChange:e=>{e.target.selectedIndex!==0?(G(m[e.target.selectedIndex-1].user_alias),k(m[e.target.selectedIndex-1].contract_start_date?m[e.target.selectedIndex-1].contract_start_date:u),E(m[e.target.selectedIndex-1].contract_end_date?m[e.target.selectedIndex-1].contract_end_date:p),localStorage.setItem("searchUser",m[e.target.selectedIndex-1].user_alias)):(G(null),localStorage.removeItem("searchUser"));},children:[jsx("option",{value:"0",children:"Select User"}),m?.map((e,o)=>jsx("option",{value:e.user_id,selected:b==e.user_alias,children:e.user_alias},o))]})}),jsxs("div",{className:"ml-2 inline-flex",children:[jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6 pt-1 hover:cursor-pointer",onClick:()=>{L(y?.statistics.map(e=>({user_id:e.user_id,user_alias:e.user_alias,submitted_tasks:e.submitted_tasks,in_review_tasks:e.in_review_tasks,accepted_tasks:e.accepted_tasks,skipped_tasks:e.skipped_tasks,user_discarded_tasks:e.user_discarded_tasks,discarded_tasks:e.discarded_tasks,to_fix_tasks:e.to_fix_tasks,all_finished_tasks:e.all_finished_tasks,min_time:e.min_time,max_time:e.max_time,mean_time:e.mean_time})),"Project_data_"+u+"_"+p+".xlsx");},children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}),jsx("title",{children:"Download Project data"})]}),n.userRole=="admin"&&jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6 pt-1 bg-primary rounded text-white hover:cursor-pointer",onClick:()=>L(ge?.statistics,"Contractual_data.xlsx"),children:[jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}),jsx("title",{children:"Download Contractual data"})]})]}),jsxs("div",{children:[g?.length==0||g?.filter(e=>e.value!==0).length==0&&jsx("div",{className:"pt-5 text-center",children:"No Data"}),jsx(PieChart,{innerRadius:0,outerRadius:100,data:g?.filter(e=>e.value!==0)})]})]})]}),jsx("div",{className:"mx-auto max-w-screen pt-4 text-center",children:jsx(Ee,{projectId:i,userRole:n.userRole,handleClusterExpand:e=>{createTask(e.location_id,i,s.project_reference_date.toString()).then(({location:o,currentTask:r,annotation_dates:fe})=>{o&&f.setLocation(o),r?(f.setCurrentTask(r),f.setAnnotationDates(fe),v.push(`/map?projectId=${i}&locationId=${e.location_id}&taskId=${r?.task_id}`).then()):alert("No task for you on this location");});},clusterColor:_[d&&c!=0?d?.findIndex(e=>e.group_id==c):0].clusterColor,annotatedClusterColor:_[d&&c!=0?d?.findIndex(e=>e.group_id==c):0].annotatedClusterColor,pinColor:_[d&&c!=0?d?.findIndex(e=>e.group_id==c):0].pinColor,annotatedPinColor:_[d&&c!=0?d?.findIndex(e=>e.group_id==c):0].annotatedPinColor,handleStart:async e=>{let o={project_id:i,only_not_submitted:true,reference_date:s?.project_reference_date.toString(),to_fix:e};var r=await TaskService.getNextLocationNexttaskPost(o);r!=null&&(r.exists==false&&r.location==null?(alert("No more locations are left to "+(e?"fix":"annotate")+" for you"),v.push("/evoland/projects")):r.location!=null&&r.task==null?alert("Please try again"):(f.setTimerReset(true),v.push(`/map?projectId=${i}&locationId=${r.location?.location_id}&taskId=${r.task?.task_id}`).then()));}})})]})},Xe=Be;
|
|
12
|
+
|
|
13
|
+
export { Be as a, Xe as b };
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export{a as ProjectDetails}
|
|
1
|
+
export { a as ProjectDetails } from './chunk-Z3RFB5I2.mjs';
|
|
2
|
+
export { a as ProjectList } from './chunk-LGVI2HUZ.mjs';
|
|
3
|
+
export { a as TaskPerLocationList } from './chunk-KGI5BCCH.mjs';
|
|
4
|
+
import './styles.css';
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.pointer-events-none{pointer-events:none}.float-right{float:right}.m-4{margin:1rem}.m-5{margin:1.25rem}.-my-3{margin-top:-.75rem;margin-bottom:-.75rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.
|
|
1
|
+
.pointer-events-none{pointer-events:none}.float-right{float:right}.m-4{margin:1rem}.m-5{margin:1.25rem}.-my-3{margin-top:-.75rem;margin-bottom:-.75rem}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.ml-5{margin-left:1.25rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-auto{height:auto}.w-10{width:2.5rem}.w-6{width:1.5rem}.w-\[20\%\]{width:20%}.w-\[25\%\]{width:25%}.w-\[55\%\]{width:55%}.w-full{width:100%}.min-w-0{min-width:0}.max-w-6xl{max-width:72rem}.flex-1{flex:1 1 0%}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-8{row-gap:2rem}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity))}.overflow-hidden{overflow:hidden}.overflow-y-scroll{overflow-y:scroll}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.border-gray-900\/5{border-color:#1118270d}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-300{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity))}.bg-primary{background-color:var(--primary)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-3{padding-bottom:.75rem}.pl-1{padding-left:.25rem}.pl-2{padding-left:.5rem}.pr-1{padding-right:.25rem}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.tracking-tight{letter-spacing:-.025em}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-primary{color:var(--primary)}.text-primary-600{color:var(--primary-600)}.text-secondary{color:var(--secondary)}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.underline{text-decoration-line:underline}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.file\:mr-4::file-selector-button{margin-right:1rem}.file\:rounded-full::file-selector-button{border-radius:9999px}.file\:border-0::file-selector-button{border-width:0}.file\:bg-violet-50::file-selector-button{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity))}.file\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\:py-2::file-selector-button{padding-top:.5rem;padding-bottom:.5rem}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-semibold::file-selector-button{font-weight:600}.file\:text-violet-700::file-selector-button{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity))}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:bg-primary-700:hover{background-color:var(--primary-700)}.hover\:file\:bg-violet-100::file-selector-button:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity))}@media (min-width:640px){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:mt-0{margin-top:0}.sm\:grid{display:grid}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:gap-4{gap:1rem}.sm\:truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sm\:px-0{padding-left:0;padding-right:0}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:tracking-tight{letter-spacing:-.025em}}@media (min-width:768px){.md\:flex{display:flex}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}}@media (min-width:1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-2{padding-left:.5rem;padding-right:.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width:1280px){.xl\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.xl\:px-12{padding-left:3rem;padding-right:3rem}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geowiki/evoland",
|
|
3
|
-
"version": "0.16.0-dev.
|
|
3
|
+
"version": "0.16.0-dev.2",
|
|
4
4
|
"main": "./dist/index.mjs",
|
|
5
5
|
"types": "./dist/index.d.mts",
|
|
6
6
|
"files": [
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"leaflet": "^1.9.4",
|
|
18
18
|
"react-leaflet": "^4.2.1",
|
|
19
19
|
"react-dom": "^18.2.0",
|
|
20
|
-
"@geowiki/api-proxy": "0.16.0-dev.
|
|
21
|
-
"@geowiki/core": "0.16.0-dev.
|
|
22
|
-
"@geowiki/evoland-api-proxy": "0.16.0-dev.
|
|
23
|
-
"@geowiki/
|
|
24
|
-
"@geowiki/
|
|
25
|
-
"@geowiki/ui": "0.16.0-dev.
|
|
20
|
+
"@geowiki/api-proxy": "0.16.0-dev.2",
|
|
21
|
+
"@geowiki/core": "0.16.0-dev.2",
|
|
22
|
+
"@geowiki/evoland-api-proxy": "0.16.0-dev.2",
|
|
23
|
+
"@geowiki/evoland-orval-api-proxy": "0.16.0-dev.2",
|
|
24
|
+
"@geowiki/map": "0.16.0-dev.2",
|
|
25
|
+
"@geowiki/ui": "0.16.0-dev.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@headlessui/react": "^1.7.16",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"autoprefixer": "^10.4.14",
|
|
44
44
|
"tsup": "^8.0.2",
|
|
45
45
|
"typescript": "5.4.2",
|
|
46
|
+
"eslint-config-custom": "0.0.0",
|
|
46
47
|
"tailwind-config": "0.0.0",
|
|
47
|
-
"tsconfig": "0.0.0"
|
|
48
|
-
"eslint-config-custom": "0.0.0"
|
|
48
|
+
"tsconfig": "0.0.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "tsup && tailwindcss -i src/styles.css -o dist/styles.css --minify",
|