@veeqo/transfigure 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +48 -9
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +28 -8
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +14 -49
- package/dist/index103.cjs +12 -1
- package/dist/index103.js +16 -29
- package/dist/index104.cjs +1 -19
- package/dist/index104.js +15 -23
- package/dist/index105.cjs +19 -1
- package/dist/index105.js +23 -14
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +21 -18
- package/dist/index107.cjs +1 -12
- package/dist/index107.js +24 -16
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +12 -21
- package/dist/index109.cjs +80 -1
- package/dist/index109.js +98 -24
- package/dist/index110.cjs +1 -80
- package/dist/index110.js +8 -97
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +2 -19
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +18 -7
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +7 -60
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +57 -26
- package/dist/index115.cjs +1 -13
- package/dist/index115.js +30 -17
- package/dist/index116.cjs +13 -1
- package/dist/index116.js +17 -2
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +22 -32
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +32 -22
- package/dist/index120.cjs +1 -7
- package/dist/index120.js +63 -10
- package/dist/index121.cjs +7 -1
- package/dist/index121.js +10 -63
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +2 -2
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +1 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +1 -1
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +1 -1
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +2 -2
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +8 -7
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +1 -1
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +1 -1
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +7 -7
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +13 -12
- package/dist/index94.cjs +104 -1
- package/dist/index94.js +119 -13
- package/dist/index95.cjs +1 -104
- package/dist/index95.js +65 -116
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +23 -63
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +2 -28
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +41 -2
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +9 -39
- package/dist/types.d.ts +4 -7
- package/dist/utils/getViewTheme/getViewTheme.d.ts +10 -13
- package/dist/utils/viewsAdapter/viewsAdapter.d.ts +1 -1
- package/package.json +1 -1
package/dist/index70.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var V=Object.defineProperty;var B=(b,t,s)=>t in b?V(b,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):b[t]=s;var h=(b,t,s)=>B(b,typeof t!="symbol"?t+"":t,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("mobx"),G=require("@veeqo/ui"),C=require("@internationalized/date"),q=require("lodash/isEqual"),z=require("lodash/get"),j=require("lodash/set"),K=require("qs"),m=require("./index50.cjs"),I=require("./index2.cjs"),A=require("./index72.cjs"),D=require("./index71.cjs"),L=require("./index101.cjs"),k=require("./index93.cjs"),N=require("./index79.cjs"),p=require("./index9.cjs"),_=b=>b&&b.__esModule?b:{default:b},O=_(q),H=_(z),E=_(j),T=_(K);class ${constructor(t){h(this,"defaultPageSize");h(this,"pageSize");h(this,"currentPage");h(this,"defaultFilters");h(this,"defaultArrayFilters");h(this,"defaultDateRangeFilters");h(this,"defaultNumberRangeFilters");h(this,"filters");h(this,"arrayFilters");h(this,"dateRangeFilters");h(this,"numberRangeFilters");h(this,"activeViewId");h(this,"defaultSortState");h(this,"tableStore");h(this,"isFiltersDropdownVisible");h(this,"initDefaultFilterMaps",()=>{this.defaultFilters=new Map(this.filters),this.defaultArrayFilters=new Map(this.arrayFilters),this.defaultDateRangeFilters=new Map(this.dateRangeFilters),this.defaultNumberRangeFilters=new Map(this.numberRangeFilters),this.defaultSortState={columnId:"",direction:"asc"}});h(this,"updateUrl",(t=!1)=>{try{const{SORT_FILTER_ID:s,SORTING_MODE:n}=p.BusinessLogicManager.getBusinessLogic(),e=T.default.parse(window.location.search,{ignoreQueryPrefix:!0}),u=e[s],f=e.sort_order,i=e.sort;let r="";switch(n){case I.SortingMode.CORAL:if(f&&i){const d={...this.queryParamsObject,sort:i,sort_order:f};r=`${window.location.pathname}?${T.default.stringify(d,{arrayFormat:"brackets"})}`}break;case I.SortingMode.MONOLITH:default:if(u){const d={...this.queryParamsObject,[s]:u};r=`${window.location.pathname}?${T.default.stringify(d,{arrayFormat:"brackets"})}`}}u||(r=`${window.location.pathname}?${this.queryParams}`),t?window.history.pushState({},"",r):window.history.replaceState({},"",r)}catch(s){console.log(s)}});h(this,"setCurrentPage",t=>{this.currentPage=t});h(this,"setPageSize",t=>{this.pageSize=t,this.updateUrl()});h(this,"setFilter",(t,s)=>{this.filters.set(t,s),this.setCurrentPage(1),this.updateUrl()});h(this,"clearFilter",t=>{this.filters.set(t,""),this.setCurrentPage(1),this.updateUrl()});h(this,"setArrayFilter",(t,s)=>{this.arrayFilters.set(t,s),this.setCurrentPage(1),this.updateUrl()});h(this,"clearArrayFilter",t=>{this.arrayFilters.set(t,[]),this.setCurrentPage(1),this.updateUrl()});h(this,"setRangeFilter",({key:t,range:s,dates:n})=>{s.setFilterType(t),s.setDates(n.start,n.end),this.setCurrentPage(1),this.updateUrl()});h(this,"clearRangeFilter",t=>{const s=this.dateRangeFilters.get(t);s&&(s.clear(),this.setCurrentPage(1),this.updateUrl())});h(this,"setNumberRangeFilter",({numberRange:t,gte:s,lte:n})=>{t.setGte(s),t.setLte(n),this.setCurrentPage(1),this.updateUrl()});h(this,"clearNumberRangeFilter",t=>{const s=this.numberRangeFilters.get(t);s&&(s.clear(),this.setCurrentPage(1),this.updateUrl())});h(this,"clearAllFilters",(t=!1)=>{const{SEARCH_FILTER_ID:s}=p.BusinessLogicManager.getBusinessLogic();this.filters.forEach((n,e)=>{e!==s&&this.filters.set(e,"")}),this.arrayFilters.forEach((n,e)=>this.arrayFilters.set(e,[])),this.dateRangeFilters.forEach(n=>n.clear()),this.numberRangeFilters.forEach(n=>n.clear()),this.setCurrentPage(1),t||this.updateUrl()});h(this,"clearFiltersForGroup",t=>{const{GROUP_MAP:s}=p.BusinessLogicManager.getBusinessLogic(),n=s.get(t);n&&n.fields.forEach(e=>{this.arrayFilters.has(e.id)?this.clearArrayFilter(e.id):this.dateRangeFilters.has(e.id)?this.clearRangeFilter(e.id):this.numberRangeFilters.has(e.id)?this.clearNumberRangeFilter(e.id):this.clearFilter(e.id)})});h(this,"setActiveViewId",t=>{this.activeViewId=t,this.updateUrl()});h(this,"toggleFiltersDropdownVisible",t=>{this.isFiltersDropdownVisible=t});h(this,"getFiltersForGroup",t=>{const{GROUP_MAP:s}=p.BusinessLogicManager.getBusinessLogic(),n=s.get(t);if(!n)return{};const e={};return n.fields.forEach(u=>{this.arrayFilters.has(u.id)?e[u.id]=this.arrayFilters.get(u.id):this.dateRangeFilters.has(u.id)?e[u.id]=this.dateRangeFilters.get(u.id):this.numberRangeFilters.has(u.id)?e[u.id]=this.numberRangeFilters.get(u.id):e[u.id]=this.filters.get(u.id)}),e});h(this,"initFiltersFromView",t=>{var e,u;const{PAGE_SIZE_OPTIONS:s}=p.BusinessLogicManager.getBusinessLogic();(e=t.page)!=null&&e.size&&s.includes(t.page.size)&&(this.defaultPageSize=t.page.size,this.pageSize=t.page.size),this.setCurrentPage(1),this.defaultFilters=new Map(t.filterMaps.filters),this.defaultArrayFilters=new Map(t.filterMaps.arrayFilters),this.defaultDateRangeFilters=new Map(Array.from(t.filterMaps.rangeFilters.entries()).map(([f,i])=>{const r=new A.RangeFilter(i.filterType);return i.gte&&i.lte&&r.setDates(i.gte,i.lte),[f,r]})),this.defaultNumberRangeFilters=new Map(Array.from(t.filterMaps.numberRangeFilters.entries()).map(([f,i])=>{const r=i.clone();return i.gte&&r.setGte(i.gte),i.lte&&r.setLte(i.lte),[f,r]})),this.filters=new Map(t.filterMaps.filters),this.arrayFilters=new Map(t.filterMaps.arrayFilters),this.dateRangeFilters=new Map(Array.from(t.filterMaps.rangeFilters.entries()).map(([f,i])=>{const r=new A.RangeFilter(i.filterType);return i.gte&&i.lte&&r.setDates(i.gte,i.lte),[f,r]})),this.numberRangeFilters=new Map(Array.from(t.filterMaps.numberRangeFilters.entries()).map(([f,i])=>{const r=i.clone();return i.gte&&r.setGte(i.gte),i.lte&&r.setLte(i.lte),[f,r]}));const n=L.parseSortString(t.sort);this.defaultSortState=n,(u=this.tableStore)==null||u.setSortState(n),this.activeViewId=t.id});h(this,"initFromUrl",(t=!0)=>{var S,w;const{GROUP_MAP:s,PAGE_SIZE_OPTIONS:n,PAGE_SIZE_FILTER_ID:e,SORT_FILTER_ID:u}=p.BusinessLogicManager.getBusinessLogic(),f=T.default.parse(window.location.search,{ignoreQueryPrefix:!0}),i=Array.from(s.values()).flatMap(F=>F.fields),r=new Map,d=new Map,M=new Map,v=new Map;t&&f.view&&(this.activeViewId=f.view),f[e]&&n.includes(Number(f[e]))&&(this.pageSize=Number(f[e]));const c=f.filter||{};i.forEach(F=>{const g=H.default(c,F.id);if(g!==void 0)switch(F.filterType){case m.FilterChoiceValue.CHECKBOX:Array.isArray(g)?d.set(F.id,g):g&&d.set(F.id,[g]);break;case m.FilterChoiceValue.DATE_RANGE:if(typeof g=="string"&&N.isValidDateRange(g))M.set(F.id,new A.RangeFilter(g));else if(typeof g=="object"&&g!==null){const y=g;if(y.relative&&N.isValidDateRange(y.relative))M.set(F.id,new A.RangeFilter(y.relative));else if(y.gte&&y.lte)try{const R=C.parseDate(y.gte),U=C.parseDate(y.lte),P=new A.RangeFilter("CUSTOM");P.setDates(R,U),M.set(F.id,P)}catch{M.set(F.id,new A.RangeFilter(G.DateRanges.TODAY))}}break;case m.FilterChoiceValue.NUMBER_RANGE:if(typeof g=="object"&&g!==null){const y=g,R=new D.NumberRangeFilter({filterId:F.id});y.gte!==void 0&&R.setGte(Number(y.gte)),y.lte!==void 0&&R.setLte(Number(y.lte)),v.set(F.id,R)}break;case m.FilterChoiceValue.TEXT:case m.FilterChoiceValue.NUMBER:case m.FilterChoiceValue.RADIO:(typeof g=="string"||typeof g=="number")&&r.set(F.id,String(g));break}}),this.filters=r,this.arrayFilters=d,this.dateRangeFilters=M,this.numberRangeFilters=v;const l=f[u]||f.sort,a=f.sort_order;if(a&&f.sort)(S=this.tableStore)==null||S.setSortState({columnId:f.sort,direction:a});else if(l){const F=L.parseSortString(l);F.columnId&&((w=this.tableStore)==null||w.setSortState(F))}this.updateUrl()});h(this,"discardChanges",(t=!1)=>{var e;this.pageSize=this.defaultPageSize;const{SEARCH_FILTER_ID:s}=p.BusinessLogicManager.getBusinessLogic(),n=new Map(this.defaultFilters);this.filters.has(s)&&n.set(s,this.filters.get(s)),this.filters=n,this.arrayFilters=new Map(this.defaultArrayFilters),this.dateRangeFilters.clear(),this.defaultDateRangeFilters.forEach((u,f)=>{const i=new A.RangeFilter(u.filterType);i.setDates(u.gte,u.lte),this.dateRangeFilters.set(f,i)}),this.numberRangeFilters.clear(),this.defaultNumberRangeFilters.forEach((u,f)=>{this.numberRangeFilters.set(f,u.clone())}),(e=this.tableStore)==null||e.setSortState(this.defaultSortState),this.updateUrl(t)});const{GROUP_MAP:s}=p.BusinessLogicManager.getBusinessLogic(),n=Array.from(s.values()).flatMap(e=>e.fields);this.filters=new Map(n.filter(e=>e.filterType===m.FilterChoiceValue.TEXT||e.filterType===m.FilterChoiceValue.NUMBER||e.filterType===m.FilterChoiceValue.RADIO||e.filterType===m.FilterChoiceValue.DATE_RANGE).map(e=>[e.id,""])),this.arrayFilters=new Map(n.filter(e=>e.filterType===m.FilterChoiceValue.CHECKBOX).map(e=>[e.id,[]])),this.dateRangeFilters=new Map(n.filter(e=>e.filterType===m.FilterChoiceValue.DATE_RANGE).map(e=>[e.id,new A.RangeFilter])),this.numberRangeFilters=new Map(n.filter(e=>e.filterType===m.FilterChoiceValue.NUMBER_RANGE).map(e=>{const u=new D.NumberRangeFilter({filterId:e.id});return[e.id,u]})),this.defaultArrayFilters=new Map,this.defaultFilters=new Map,this.defaultDateRangeFilters=new Map,this.defaultNumberRangeFilters=new Map,this.currentPage=1,this.pageSize=10,this.defaultPageSize=10,this.initDefaultFilterMaps(),this.isFiltersDropdownVisible=!1,this.activeViewId=void 0,this.defaultSortState={columnId:"",direction:"asc"},this.tableStore=t,o.makeObservable(this,{defaultPageSize:o.observable,pageSize:o.observable,currentPage:o.observable,defaultFilters:o.observable,defaultArrayFilters:o.observable,defaultDateRangeFilters:o.observable,defaultNumberRangeFilters:o.observable,filters:o.observable,arrayFilters:o.observable,numberRangeFilters:o.observable,dateRangeFilters:o.observable,isFiltersDropdownVisible:o.observable,activeViewId:o.observable,defaultSortState:o.observable,tableStore:o.observable.ref,setPageSize:o.action,setCurrentPage:o.action,toggleFiltersDropdownVisible:o.action,setActiveViewId:o.action,setFilter:o.action,setArrayFilter:o.action,setRangeFilter:o.action,setNumberRangeFilter:o.action,clearFilter:o.action,clearArrayFilter:o.action,clearRangeFilter:o.action,clearNumberRangeFilter:o.action,clearAllFilters:o.action,getFiltersForGroup:o.action,clearFiltersForGroup:o.action,initFromUrl:o.action,initFiltersFromView:o.action,initDefaultFilterMaps:o.action,discardChanges:o.action,updateUrl:o.action,hasActiveFilters:o.computed,activeFilterKeysList:o.computed,queryParamsObject:o.computed,queryParams:o.computed,hasUnsavedChanges:o.computed})}get hasActiveFilters(){const{GROUP_MAP:t}=p.BusinessLogicManager.getBusinessLogic(),s=Array.from(t.values()).flatMap(e=>e.fields),n=new Set(s.map(e=>e.id));return Array.from(this.filters.entries()).filter(([e])=>n.has(e)).some(([,e])=>e!=="")||Array.from(this.arrayFilters.entries()).filter(([e])=>n.has(e)).some(([,e])=>e.length>0)||Array.from(this.dateRangeFilters.entries()).filter(([e])=>n.has(e)).some(([,e])=>e.filterType!==void 0)||Array.from(this.numberRangeFilters.entries()).filter(([e])=>n.has(e)).some(([,e])=>e.isActive)}get activeFilterKeysList(){const{DATE_RANGE_FILTERS:t,NUMBER_RANGE_FILTERS:s}=p.BusinessLogicManager.getBusinessLogic(),n=Array.from(this.filters.entries()).filter(([r,d])=>d!==""&&!t.includes(r)&&!s.includes(r)).map(([r])=>r),e=Array.from(this.arrayFilters.entries()).filter(([,r])=>r.length>0).map(([r])=>r),u=Array.from(this.dateRangeFilters.entries()).filter(([,r])=>r.filterType!==void 0).map(([r])=>r),f=Array.from(this.numberRangeFilters.entries()).filter(([,r])=>r.isActive).map(([r])=>r);return[...new Set([...n,...e,...u,...f])]}get queryParamsObject(){const{DATE_RANGE_FILTERS:t,NUMBER_RANGE_FILTERS:s,PAGE_SIZE_FILTER_ID:n,PAGE_NUMBER_FILTER_ID:e}=p.BusinessLogicManager.getBusinessLogic(),u={};Array.from(this.filters.entries()).filter(([i,r])=>r!==""&&!t.includes(i)&&!s.includes(i)).forEach(([i,r])=>{E.default(u,i,r)}),Array.from(this.arrayFilters.entries()).filter(([,i])=>i.length>0).forEach(([i,r])=>{E.default(u,i,r)}),Array.from(this.dateRangeFilters.entries()).filter(([,i])=>i.filterType!==void 0).forEach(([i,r])=>{r.filterType==="CUSTOM"?E.default(u,i,{gte:r.gte.toString(),lte:r.lte.toString()}):E.default(u,i,{relative:r.filterType})}),Array.from(this.numberRangeFilters.entries()).filter(([,i])=>i.isActive).forEach(([i,r])=>{const d={};r.gte!==void 0&&(d.gte=r.gte),r.isValidLte&&(d.lte=r.lte),E.default(u,i,d)});const f={filter:u,[n]:String(this.pageSize),[e]:String(this.currentPage)};return this.activeViewId&&(f.view=this.activeViewId),f}get queryParams(){return T.default.stringify(this.queryParamsObject,{arrayFormat:"brackets"})}get hasUnsavedChanges(){if(this.activeViewId===k.ALL_VIEW_ID)return!1;if(this.defaultPageSize!==this.pageSize||this.tableStore&&(this.tableStore.sortState.columnId!==this.defaultSortState.columnId||this.tableStore.sortState.direction!==this.defaultSortState.direction))return!0;const{GROUP_MAP:t,SEARCH_FILTER_ID:s}=p.BusinessLogicManager.getBusinessLogic(),n=Array.from(t.values()).flatMap(c=>c.fields),e=new Set(n.map(c=>c.id));if(Array.from(this.filters.entries()).filter(([c])=>c!==s&&e.has(c)).some(([c,l])=>{const a=this.defaultFilters.get(c);return a===void 0&&l!==""||a!==void 0&&l!==a}))return!0;const f=Array.from(this.defaultArrayFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{const a=this.defaultArrayFilters.get(c)||[];return l.length>0||a.length>0?l.length!==a.length||!O.default(l,a):!1}),i=Array.from(this.arrayFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{const a=this.defaultArrayFilters.get(c)||[];return l.length>0||a.length>0?l.length!==a.length||!O.default(l,a):!1});if(f||i)return!0;const r=Array.from(this.numberRangeFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{const a=this.defaultNumberRangeFilters.get(c);return!l.isEqual(a)});if(Array.from(this.defaultNumberRangeFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{const a=this.numberRangeFilters.get(c);return!l.isEqual(a)})||r)return!0;const M=Array.from(this.defaultDateRangeFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{var S,w,F,g;const a=this.dateRangeFilters.get(c);return l!=null&&l.filterType&&!(a!=null&&a.filterType)||a!=null&&a.filterType&&!(l!=null&&l.filterType)||(a==null?void 0:a.filterType)!==(l==null?void 0:l.filterType)?!0:(a==null?void 0:a.filterType)==="CUSTOM"&&(l==null?void 0:l.filterType)==="CUSTOM"?((S=l.gte)==null?void 0:S.toString())!==((w=a.gte)==null?void 0:w.toString())||((F=l.lte)==null?void 0:F.toString())!==((g=a.lte)==null?void 0:g.toString()):!1});return Array.from(this.dateRangeFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{var S,w,F,g;const a=this.defaultDateRangeFilters.get(c);return l!=null&&l.filterType&&!(a!=null&&a.filterType)||a!=null&&a.filterType&&!(l!=null&&l.filterType)||(a==null?void 0:a.filterType)!==(l==null?void 0:l.filterType)?!0:(a==null?void 0:a.filterType)==="CUSTOM"&&(l==null?void 0:l.filterType)==="CUSTOM"?((S=l.gte)==null?void 0:S.toString())!==((w=a.gte)==null?void 0:w.toString())||((F=l.lte)==null?void 0:F.toString())!==((g=a.lte)==null?void 0:g.toString()):!1})||M}}exports.Filters=$;
|
|
1
|
+
"use strict";var V=Object.defineProperty;var B=(b,t,s)=>t in b?V(b,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):b[t]=s;var h=(b,t,s)=>B(b,typeof t!="symbol"?t+"":t,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("mobx"),G=require("@veeqo/ui"),C=require("@internationalized/date"),q=require("lodash/isEqual"),z=require("lodash/get"),j=require("lodash/set"),K=require("qs"),m=require("./index50.cjs"),I=require("./index2.cjs"),A=require("./index72.cjs"),D=require("./index71.cjs"),L=require("./index110.cjs"),k=require("./index108.cjs"),N=require("./index79.cjs"),p=require("./index9.cjs"),_=b=>b&&b.__esModule?b:{default:b},O=_(q),H=_(z),E=_(j),T=_(K);class ${constructor(t){h(this,"defaultPageSize");h(this,"pageSize");h(this,"currentPage");h(this,"defaultFilters");h(this,"defaultArrayFilters");h(this,"defaultDateRangeFilters");h(this,"defaultNumberRangeFilters");h(this,"filters");h(this,"arrayFilters");h(this,"dateRangeFilters");h(this,"numberRangeFilters");h(this,"activeViewId");h(this,"defaultSortState");h(this,"tableStore");h(this,"isFiltersDropdownVisible");h(this,"initDefaultFilterMaps",()=>{this.defaultFilters=new Map(this.filters),this.defaultArrayFilters=new Map(this.arrayFilters),this.defaultDateRangeFilters=new Map(this.dateRangeFilters),this.defaultNumberRangeFilters=new Map(this.numberRangeFilters),this.defaultSortState={columnId:"",direction:"asc"}});h(this,"updateUrl",(t=!1)=>{try{const{SORT_FILTER_ID:s,SORTING_MODE:n}=p.BusinessLogicManager.getBusinessLogic(),e=T.default.parse(window.location.search,{ignoreQueryPrefix:!0}),u=e[s],f=e.sort_order,i=e.sort;let r="";switch(n){case I.SortingMode.CORAL:if(f&&i){const d={...this.queryParamsObject,sort:i,sort_order:f};r=`${window.location.pathname}?${T.default.stringify(d,{arrayFormat:"brackets"})}`}break;case I.SortingMode.MONOLITH:default:if(u){const d={...this.queryParamsObject,[s]:u};r=`${window.location.pathname}?${T.default.stringify(d,{arrayFormat:"brackets"})}`}}u||(r=`${window.location.pathname}?${this.queryParams}`),t?window.history.pushState({},"",r):window.history.replaceState({},"",r)}catch(s){console.log(s)}});h(this,"setCurrentPage",t=>{this.currentPage=t});h(this,"setPageSize",t=>{this.pageSize=t,this.updateUrl()});h(this,"setFilter",(t,s)=>{this.filters.set(t,s),this.setCurrentPage(1),this.updateUrl()});h(this,"clearFilter",t=>{this.filters.set(t,""),this.setCurrentPage(1),this.updateUrl()});h(this,"setArrayFilter",(t,s)=>{this.arrayFilters.set(t,s),this.setCurrentPage(1),this.updateUrl()});h(this,"clearArrayFilter",t=>{this.arrayFilters.set(t,[]),this.setCurrentPage(1),this.updateUrl()});h(this,"setRangeFilter",({key:t,range:s,dates:n})=>{s.setFilterType(t),s.setDates(n.start,n.end),this.setCurrentPage(1),this.updateUrl()});h(this,"clearRangeFilter",t=>{const s=this.dateRangeFilters.get(t);s&&(s.clear(),this.setCurrentPage(1),this.updateUrl())});h(this,"setNumberRangeFilter",({numberRange:t,gte:s,lte:n})=>{t.setGte(s),t.setLte(n),this.setCurrentPage(1),this.updateUrl()});h(this,"clearNumberRangeFilter",t=>{const s=this.numberRangeFilters.get(t);s&&(s.clear(),this.setCurrentPage(1),this.updateUrl())});h(this,"clearAllFilters",(t=!1)=>{const{SEARCH_FILTER_ID:s}=p.BusinessLogicManager.getBusinessLogic();this.filters.forEach((n,e)=>{e!==s&&this.filters.set(e,"")}),this.arrayFilters.forEach((n,e)=>this.arrayFilters.set(e,[])),this.dateRangeFilters.forEach(n=>n.clear()),this.numberRangeFilters.forEach(n=>n.clear()),this.setCurrentPage(1),t||this.updateUrl()});h(this,"clearFiltersForGroup",t=>{const{GROUP_MAP:s}=p.BusinessLogicManager.getBusinessLogic(),n=s.get(t);n&&n.fields.forEach(e=>{this.arrayFilters.has(e.id)?this.clearArrayFilter(e.id):this.dateRangeFilters.has(e.id)?this.clearRangeFilter(e.id):this.numberRangeFilters.has(e.id)?this.clearNumberRangeFilter(e.id):this.clearFilter(e.id)})});h(this,"setActiveViewId",t=>{this.activeViewId=t,this.updateUrl()});h(this,"toggleFiltersDropdownVisible",t=>{this.isFiltersDropdownVisible=t});h(this,"getFiltersForGroup",t=>{const{GROUP_MAP:s}=p.BusinessLogicManager.getBusinessLogic(),n=s.get(t);if(!n)return{};const e={};return n.fields.forEach(u=>{this.arrayFilters.has(u.id)?e[u.id]=this.arrayFilters.get(u.id):this.dateRangeFilters.has(u.id)?e[u.id]=this.dateRangeFilters.get(u.id):this.numberRangeFilters.has(u.id)?e[u.id]=this.numberRangeFilters.get(u.id):e[u.id]=this.filters.get(u.id)}),e});h(this,"initFiltersFromView",t=>{var e,u;const{PAGE_SIZE_OPTIONS:s}=p.BusinessLogicManager.getBusinessLogic();(e=t.page)!=null&&e.size&&s.includes(t.page.size)&&(this.defaultPageSize=t.page.size,this.pageSize=t.page.size),this.setCurrentPage(1),this.defaultFilters=new Map(t.filterMaps.filters),this.defaultArrayFilters=new Map(t.filterMaps.arrayFilters),this.defaultDateRangeFilters=new Map(Array.from(t.filterMaps.rangeFilters.entries()).map(([f,i])=>{const r=new A.RangeFilter(i.filterType);return i.gte&&i.lte&&r.setDates(i.gte,i.lte),[f,r]})),this.defaultNumberRangeFilters=new Map(Array.from(t.filterMaps.numberRangeFilters.entries()).map(([f,i])=>{const r=i.clone();return i.gte&&r.setGte(i.gte),i.lte&&r.setLte(i.lte),[f,r]})),this.filters=new Map(t.filterMaps.filters),this.arrayFilters=new Map(t.filterMaps.arrayFilters),this.dateRangeFilters=new Map(Array.from(t.filterMaps.rangeFilters.entries()).map(([f,i])=>{const r=new A.RangeFilter(i.filterType);return i.gte&&i.lte&&r.setDates(i.gte,i.lte),[f,r]})),this.numberRangeFilters=new Map(Array.from(t.filterMaps.numberRangeFilters.entries()).map(([f,i])=>{const r=i.clone();return i.gte&&r.setGte(i.gte),i.lte&&r.setLte(i.lte),[f,r]}));const n=L.parseSortString(t.sort);this.defaultSortState=n,(u=this.tableStore)==null||u.setSortState(n),this.activeViewId=t.id});h(this,"initFromUrl",(t=!0)=>{var S,w;const{GROUP_MAP:s,PAGE_SIZE_OPTIONS:n,PAGE_SIZE_FILTER_ID:e,SORT_FILTER_ID:u}=p.BusinessLogicManager.getBusinessLogic(),f=T.default.parse(window.location.search,{ignoreQueryPrefix:!0}),i=Array.from(s.values()).flatMap(F=>F.fields),r=new Map,d=new Map,M=new Map,v=new Map;t&&f.view&&(this.activeViewId=f.view),f[e]&&n.includes(Number(f[e]))&&(this.pageSize=Number(f[e]));const c=f.filter||{};i.forEach(F=>{const g=H.default(c,F.id);if(g!==void 0)switch(F.filterType){case m.FilterChoiceValue.CHECKBOX:Array.isArray(g)?d.set(F.id,g):g&&d.set(F.id,[g]);break;case m.FilterChoiceValue.DATE_RANGE:if(typeof g=="string"&&N.isValidDateRange(g))M.set(F.id,new A.RangeFilter(g));else if(typeof g=="object"&&g!==null){const y=g;if(y.relative&&N.isValidDateRange(y.relative))M.set(F.id,new A.RangeFilter(y.relative));else if(y.gte&&y.lte)try{const R=C.parseDate(y.gte),U=C.parseDate(y.lte),P=new A.RangeFilter("CUSTOM");P.setDates(R,U),M.set(F.id,P)}catch{M.set(F.id,new A.RangeFilter(G.DateRanges.TODAY))}}break;case m.FilterChoiceValue.NUMBER_RANGE:if(typeof g=="object"&&g!==null){const y=g,R=new D.NumberRangeFilter({filterId:F.id});y.gte!==void 0&&R.setGte(Number(y.gte)),y.lte!==void 0&&R.setLte(Number(y.lte)),v.set(F.id,R)}break;case m.FilterChoiceValue.TEXT:case m.FilterChoiceValue.NUMBER:case m.FilterChoiceValue.RADIO:(typeof g=="string"||typeof g=="number")&&r.set(F.id,String(g));break}}),this.filters=r,this.arrayFilters=d,this.dateRangeFilters=M,this.numberRangeFilters=v;const l=f[u]||f.sort,a=f.sort_order;if(a&&f.sort)(S=this.tableStore)==null||S.setSortState({columnId:f.sort,direction:a});else if(l){const F=L.parseSortString(l);F.columnId&&((w=this.tableStore)==null||w.setSortState(F))}this.updateUrl()});h(this,"discardChanges",(t=!1)=>{var e;this.pageSize=this.defaultPageSize;const{SEARCH_FILTER_ID:s}=p.BusinessLogicManager.getBusinessLogic(),n=new Map(this.defaultFilters);this.filters.has(s)&&n.set(s,this.filters.get(s)),this.filters=n,this.arrayFilters=new Map(this.defaultArrayFilters),this.dateRangeFilters.clear(),this.defaultDateRangeFilters.forEach((u,f)=>{const i=new A.RangeFilter(u.filterType);i.setDates(u.gte,u.lte),this.dateRangeFilters.set(f,i)}),this.numberRangeFilters.clear(),this.defaultNumberRangeFilters.forEach((u,f)=>{this.numberRangeFilters.set(f,u.clone())}),(e=this.tableStore)==null||e.setSortState(this.defaultSortState),this.updateUrl(t)});const{GROUP_MAP:s}=p.BusinessLogicManager.getBusinessLogic(),n=Array.from(s.values()).flatMap(e=>e.fields);this.filters=new Map(n.filter(e=>e.filterType===m.FilterChoiceValue.TEXT||e.filterType===m.FilterChoiceValue.NUMBER||e.filterType===m.FilterChoiceValue.RADIO||e.filterType===m.FilterChoiceValue.DATE_RANGE).map(e=>[e.id,""])),this.arrayFilters=new Map(n.filter(e=>e.filterType===m.FilterChoiceValue.CHECKBOX).map(e=>[e.id,[]])),this.dateRangeFilters=new Map(n.filter(e=>e.filterType===m.FilterChoiceValue.DATE_RANGE).map(e=>[e.id,new A.RangeFilter])),this.numberRangeFilters=new Map(n.filter(e=>e.filterType===m.FilterChoiceValue.NUMBER_RANGE).map(e=>{const u=new D.NumberRangeFilter({filterId:e.id});return[e.id,u]})),this.defaultArrayFilters=new Map,this.defaultFilters=new Map,this.defaultDateRangeFilters=new Map,this.defaultNumberRangeFilters=new Map,this.currentPage=1,this.pageSize=10,this.defaultPageSize=10,this.initDefaultFilterMaps(),this.isFiltersDropdownVisible=!1,this.activeViewId=void 0,this.defaultSortState={columnId:"",direction:"asc"},this.tableStore=t,o.makeObservable(this,{defaultPageSize:o.observable,pageSize:o.observable,currentPage:o.observable,defaultFilters:o.observable,defaultArrayFilters:o.observable,defaultDateRangeFilters:o.observable,defaultNumberRangeFilters:o.observable,filters:o.observable,arrayFilters:o.observable,numberRangeFilters:o.observable,dateRangeFilters:o.observable,isFiltersDropdownVisible:o.observable,activeViewId:o.observable,defaultSortState:o.observable,tableStore:o.observable.ref,setPageSize:o.action,setCurrentPage:o.action,toggleFiltersDropdownVisible:o.action,setActiveViewId:o.action,setFilter:o.action,setArrayFilter:o.action,setRangeFilter:o.action,setNumberRangeFilter:o.action,clearFilter:o.action,clearArrayFilter:o.action,clearRangeFilter:o.action,clearNumberRangeFilter:o.action,clearAllFilters:o.action,getFiltersForGroup:o.action,clearFiltersForGroup:o.action,initFromUrl:o.action,initFiltersFromView:o.action,initDefaultFilterMaps:o.action,discardChanges:o.action,updateUrl:o.action,hasActiveFilters:o.computed,activeFilterKeysList:o.computed,queryParamsObject:o.computed,queryParams:o.computed,hasUnsavedChanges:o.computed})}get hasActiveFilters(){const{GROUP_MAP:t}=p.BusinessLogicManager.getBusinessLogic(),s=Array.from(t.values()).flatMap(e=>e.fields),n=new Set(s.map(e=>e.id));return Array.from(this.filters.entries()).filter(([e])=>n.has(e)).some(([,e])=>e!=="")||Array.from(this.arrayFilters.entries()).filter(([e])=>n.has(e)).some(([,e])=>e.length>0)||Array.from(this.dateRangeFilters.entries()).filter(([e])=>n.has(e)).some(([,e])=>e.filterType!==void 0)||Array.from(this.numberRangeFilters.entries()).filter(([e])=>n.has(e)).some(([,e])=>e.isActive)}get activeFilterKeysList(){const{DATE_RANGE_FILTERS:t,NUMBER_RANGE_FILTERS:s}=p.BusinessLogicManager.getBusinessLogic(),n=Array.from(this.filters.entries()).filter(([r,d])=>d!==""&&!t.includes(r)&&!s.includes(r)).map(([r])=>r),e=Array.from(this.arrayFilters.entries()).filter(([,r])=>r.length>0).map(([r])=>r),u=Array.from(this.dateRangeFilters.entries()).filter(([,r])=>r.filterType!==void 0).map(([r])=>r),f=Array.from(this.numberRangeFilters.entries()).filter(([,r])=>r.isActive).map(([r])=>r);return[...new Set([...n,...e,...u,...f])]}get queryParamsObject(){const{DATE_RANGE_FILTERS:t,NUMBER_RANGE_FILTERS:s,PAGE_SIZE_FILTER_ID:n,PAGE_NUMBER_FILTER_ID:e}=p.BusinessLogicManager.getBusinessLogic(),u={};Array.from(this.filters.entries()).filter(([i,r])=>r!==""&&!t.includes(i)&&!s.includes(i)).forEach(([i,r])=>{E.default(u,i,r)}),Array.from(this.arrayFilters.entries()).filter(([,i])=>i.length>0).forEach(([i,r])=>{E.default(u,i,r)}),Array.from(this.dateRangeFilters.entries()).filter(([,i])=>i.filterType!==void 0).forEach(([i,r])=>{r.filterType==="CUSTOM"?E.default(u,i,{gte:r.gte.toString(),lte:r.lte.toString()}):E.default(u,i,{relative:r.filterType})}),Array.from(this.numberRangeFilters.entries()).filter(([,i])=>i.isActive).forEach(([i,r])=>{const d={};r.gte!==void 0&&(d.gte=r.gte),r.isValidLte&&(d.lte=r.lte),E.default(u,i,d)});const f={filter:u,[n]:String(this.pageSize),[e]:String(this.currentPage)};return this.activeViewId&&(f.view=this.activeViewId),f}get queryParams(){return T.default.stringify(this.queryParamsObject,{arrayFormat:"brackets"})}get hasUnsavedChanges(){if(this.activeViewId===k.ALL_VIEW_ID)return!1;if(this.defaultPageSize!==this.pageSize||this.tableStore&&(this.tableStore.sortState.columnId!==this.defaultSortState.columnId||this.tableStore.sortState.direction!==this.defaultSortState.direction))return!0;const{GROUP_MAP:t,SEARCH_FILTER_ID:s}=p.BusinessLogicManager.getBusinessLogic(),n=Array.from(t.values()).flatMap(c=>c.fields),e=new Set(n.map(c=>c.id));if(Array.from(this.filters.entries()).filter(([c])=>c!==s&&e.has(c)).some(([c,l])=>{const a=this.defaultFilters.get(c);return a===void 0&&l!==""||a!==void 0&&l!==a}))return!0;const f=Array.from(this.defaultArrayFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{const a=this.defaultArrayFilters.get(c)||[];return l.length>0||a.length>0?l.length!==a.length||!O.default(l,a):!1}),i=Array.from(this.arrayFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{const a=this.defaultArrayFilters.get(c)||[];return l.length>0||a.length>0?l.length!==a.length||!O.default(l,a):!1});if(f||i)return!0;const r=Array.from(this.numberRangeFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{const a=this.defaultNumberRangeFilters.get(c);return!l.isEqual(a)});if(Array.from(this.defaultNumberRangeFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{const a=this.numberRangeFilters.get(c);return!l.isEqual(a)})||r)return!0;const M=Array.from(this.defaultDateRangeFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{var S,w,F,g;const a=this.dateRangeFilters.get(c);return l!=null&&l.filterType&&!(a!=null&&a.filterType)||a!=null&&a.filterType&&!(l!=null&&l.filterType)||(a==null?void 0:a.filterType)!==(l==null?void 0:l.filterType)?!0:(a==null?void 0:a.filterType)==="CUSTOM"&&(l==null?void 0:l.filterType)==="CUSTOM"?((S=l.gte)==null?void 0:S.toString())!==((w=a.gte)==null?void 0:w.toString())||((F=l.lte)==null?void 0:F.toString())!==((g=a.lte)==null?void 0:g.toString()):!1});return Array.from(this.dateRangeFilters.entries()).filter(([c])=>e.has(c)).some(([c,l])=>{var S,w,F,g;const a=this.defaultDateRangeFilters.get(c);return l!=null&&l.filterType&&!(a!=null&&a.filterType)||a!=null&&a.filterType&&!(l!=null&&l.filterType)||(a==null?void 0:a.filterType)!==(l==null?void 0:l.filterType)?!0:(a==null?void 0:a.filterType)==="CUSTOM"&&(l==null?void 0:l.filterType)==="CUSTOM"?((S=l.gte)==null?void 0:S.toString())!==((w=a.gte)==null?void 0:w.toString())||((F=l.lte)==null?void 0:F.toString())!==((g=a.lte)==null?void 0:g.toString()):!1})||M}}exports.Filters=$;
|
package/dist/index70.js
CHANGED
|
@@ -12,8 +12,8 @@ import { FilterChoiceValue as p } from "./index50.js";
|
|
|
12
12
|
import { SortingMode as C } from "./index2.js";
|
|
13
13
|
import { RangeFilter as b } from "./index72.js";
|
|
14
14
|
import { NumberRangeFilter as O } from "./index71.js";
|
|
15
|
-
import { parseSortString as U } from "./
|
|
16
|
-
import { ALL_VIEW_ID as K } from "./
|
|
15
|
+
import { parseSortString as U } from "./index110.js";
|
|
16
|
+
import { ALL_VIEW_ID as K } from "./index108.js";
|
|
17
17
|
import { isValidDateRange as L } from "./index79.js";
|
|
18
18
|
import { BusinessLogicManager as S } from "./index9.js";
|
|
19
19
|
class le {
|
package/dist/index80.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@internationalized/date"),f=require("./index72.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@internationalized/date"),f=require("./index72.cjs"),_=require("./index71.cjs"),F=require("lodash/get"),R=require("./index104.cjs"),A=require("./index9.cjs"),T=r=>r&&r.__esModule?r:{default:r},n=T(F),w=({view:r,canUpdateCustomViews:g})=>{var o,c;const{DATE_RANGE_FILTERS:a,NUMBER_RANGE_FILTERS:u,GROUP_MAP:p}=A.BusinessLogicManager.getBusinessLogic(),l=Array.from(p.values()).flatMap(e=>e.fields),s=r.filters.filter||{},{colourPalette:b,customTextColour:m}=R.getViewTheme((o=r.view_attributes)==null?void 0:o.type);return{id:r.id,label:r.title,viewFilters:s,filterMaps:{filters:new Map(l.filter(e=>!a.includes(e.id)&&!u.includes(e.id)&&e.filterType!=="checkbox").map(e=>{const t=n.default(s,e.id);return[e.id,t!==void 0&&!Array.isArray(t)&&typeof t!="object"?String(t):""]}).filter(([,e])=>e!=="")),arrayFilters:new Map(l.filter(e=>e.filterType==="checkbox").map(e=>{const t=n.default(s,e.id);return[e.id,Array.isArray(t)?t:[]]}).filter(([,e])=>e.length>0)),rangeFilters:new Map(l.filter(e=>a.includes(e.id)).map(e=>{const t=n.default(s,e.id);if(!t)return null;let i;if(typeof t=="string")i=new f.RangeFilter(t);else if(typeof t=="object"&&t.gte&&t.lte){i=new f.RangeFilter("CUSTOM");const y=d.parseDate(t.gte),M=d.parseDate(t.lte);i.setDates(y,M)}else return null;return[e.id,i]}).filter(e=>e!==null)),numberRangeFilters:new Map(l.filter(e=>u.includes(e.id)).map(e=>{const t=n.default(s,e.id);if(!t||typeof t!="object")return null;const i=new _.NumberRangeFilter({filterId:e.id});return t.lte!==void 0&&i.setLte(Number(t.lte)),t.gte!==void 0&&i.setGte(Number(t.gte)),[e.id,i]}).filter(e=>e!==null))},page:r.filters.page,editable:r.editable&&g,isShared:r.shared,columns:r.columns,sort:(c=r.filters)==null?void 0:c.sort,colourPalette:b,customTextColour:m,view_attributes:r.view_attributes}};exports.viewsAdapter=w;
|
package/dist/index80.js
CHANGED
|
@@ -2,12 +2,9 @@ import { parseDate as c } from "@internationalized/date";
|
|
|
2
2
|
import { RangeFilter as p } from "./index72.js";
|
|
3
3
|
import { NumberRangeFilter as M } from "./index71.js";
|
|
4
4
|
import n from "lodash/get";
|
|
5
|
-
import { getViewTheme as F } from "./
|
|
5
|
+
import { getViewTheme as F } from "./index104.js";
|
|
6
6
|
import { BusinessLogicManager as R } from "./index9.js";
|
|
7
|
-
const S = ({
|
|
8
|
-
view: r,
|
|
9
|
-
canUpdateCustomViews: m
|
|
10
|
-
}) => {
|
|
7
|
+
const S = ({ view: r, canUpdateCustomViews: m }) => {
|
|
11
8
|
var u, f;
|
|
12
9
|
const { DATE_RANGE_FILTERS: o, NUMBER_RANGE_FILTERS: a, GROUP_MAP: d } = R.getBusinessLogic(), s = Array.from(d.values()).flatMap((e) => e.fields), l = r.filters.filter || {}, { colourPalette: g, customTextColour: b } = F((u = r.view_attributes) == null ? void 0 : u.type);
|
|
13
10
|
return {
|
|
@@ -20,7 +17,10 @@ const S = ({
|
|
|
20
17
|
(e) => !o.includes(e.id) && !a.includes(e.id) && e.filterType !== "checkbox"
|
|
21
18
|
).map((e) => {
|
|
22
19
|
const t = n(l, e.id);
|
|
23
|
-
return [
|
|
20
|
+
return [
|
|
21
|
+
e.id,
|
|
22
|
+
t !== void 0 && !Array.isArray(t) && typeof t != "object" ? String(t) : ""
|
|
23
|
+
];
|
|
24
24
|
}).filter(([, e]) => e !== "")
|
|
25
25
|
),
|
|
26
26
|
arrayFilters: new Map(
|
|
@@ -60,7 +60,8 @@ const S = ({
|
|
|
60
60
|
columns: r.columns,
|
|
61
61
|
sort: (f = r.filters) == null ? void 0 : f.sort,
|
|
62
62
|
colourPalette: g,
|
|
63
|
-
customTextColour: b
|
|
63
|
+
customTextColour: b,
|
|
64
|
+
view_attributes: r.view_attributes
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
67
|
export {
|
package/dist/index82.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index108.cjs"),w=require("./index80.cjs"),V=({data:n,canUpdateCustomViews:l})=>{const o={fixedViews:[...i.INITIAL_VIEWS_STATE.fixedViews],customViews:[...i.INITIAL_VIEWS_STATE.customViews],viewsMap:new Map(i.INITIAL_VIEWS_STATE.viewsMap)};if(!n)return o;let u=!1;const t=n.reduce((e,s)=>{const r=w.viewsAdapter({view:s,canUpdateCustomViews:l});return e.viewsMap.set(s.id,r),s.editable?e.customViews.push(r):e.fixedViews.push(r),s.title==="All"&&(u=!0),e},o);return u&&(t.viewsMap.delete(i.ALL_VIEW_ID),t.fixedViews.shift()),t};exports.organiseViews=V;
|
package/dist/index82.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INITIAL_VIEWS_STATE as r, ALL_VIEW_ID as u } from "./
|
|
1
|
+
import { INITIAL_VIEWS_STATE as r, ALL_VIEW_ID as u } from "./index108.js";
|
|
2
2
|
import { viewsAdapter as V } from "./index80.js";
|
|
3
3
|
const p = ({ data: o, canUpdateCustomViews: w }) => {
|
|
4
4
|
const f = {
|
package/dist/index86.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index111.cjs"),s=e=>{if(!l.isError(e))return e;if(e.stack){const t=e.stack.split(`
|
|
2
2
|
`);if(t.length<=10)return e;const n=t==null?void 0:t[0],i=t==null?void 0:t.splice(9),r=[n,...i].join(`
|
|
3
3
|
`);e.stack=r}return e};exports.filterErrorStack=s;
|
package/dist/index86.js
CHANGED
package/dist/index87.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index111.cjs"),n=({customError:t,originalError:e,type:c})=>{!s.isError(e)||!s.isError(t)||(e.stack&&(e.stack=t.stack),e.name&&(e.name=`${c} (${e.name})`))};exports.injectIntoError=n;
|
package/dist/index87.js
CHANGED
package/dist/index90.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@veeqo/ui"),t=require("react"),j=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("@veeqo/ui"),t=require("react"),j=require("./index93.cjs"),o=require("./index94.cjs"),w=require("./index95.cjs"),T=require("./index96.cjs"),r=require("./index97.cjs"),D=require("./index98.cjs"),V=require("./index49.cjs"),b=require("./index99.cjs"),H=({onClose:u,columnDefinitions:I,hiddenColumns:d,visibleColumns:m,pinnedLeftColumnIds:G,pinnedRightColumnIds:f})=>{const[c,p]=t.useState(""),a=t.useMemo(()=>new Map(I.map(s=>[s.id,s])),[]),[i,C]=t.useState(()=>({[r.ColumnGroupIds.Hidden]:d,[r.ColumnGroupIds.Visible]:m})),y=t.useMemo(()=>{const s=i[r.ColumnGroupIds.Visible].map(l=>a.get(`${l}`));return b.filterColumnsBySearch(s,c)},[i,a,c]),v=t.useMemo(()=>{const s=i[r.ColumnGroupIds.Hidden].map(l=>a.get(`${l}`));return b.filterColumnsBySearch(s,c)},[i,a,c]),{isSavingColumns:h,saveColumns:M}=D.usePersistColumns({pinnedLeftColumnIds:G,pinnedRightColumnIds:f}),k=()=>{p(""),C({[r.ColumnGroupIds.Hidden]:d,[r.ColumnGroupIds.Visible]:m})},x=t.useCallback(s=>{if(p(s),!s){const l=new Set([...d,...m]);C(S=>({[r.ColumnGroupIds.Hidden]:S[r.ColumnGroupIds.Hidden].filter(g=>l.has(`${g}`)),[r.ColumnGroupIds.Visible]:S[r.ColumnGroupIds.Visible].filter(g=>l.has(`${g}`))}))}},[d,m]),q=t.useCallback(s=>{const l=a.get(`${s}`);return l?e.jsx(T.ColumnItem,{column:l,isDragOverlay:!0}):null},[a]);return e.jsx(n.Modal,{variant:"lg",style:{overflowY:"hidden"},shouldShow:!0,onClose:()=>u==null?void 0:u(),headerSlot:e.jsxs(o.HeaderContainer,{children:[e.jsxs(n.Stack,{direction:"horizontal",alignX:"between",alignY:"center",children:[e.jsxs(n.Stack,{direction:"horizontal",alignX:"start",alignY:"center",spacing:"sm",children:[e.jsx(n.ListBoardIcon,{height:n.theme.sizes.lg,width:n.theme.sizes.lg}),e.jsx(n.Text,{variant:"headingLarge",as:"h1",children:"Table management"})]}),e.jsx(n.Button,{"aria-label":"Close modal",onClick:u,variant:"flat",iconSlot:e.jsx(n.CloseIcon,{})})]}),e.jsxs(n.Text,{variant:"subheadingMedium",children:["Show, hide, or change the order of the columns in the view, so you always see the data that's most important to you. Learn more with our"," ",e.jsx(n.Anchor,{href:V.helpGuideUrls.ORDER_VIEWS_AND_TABLE_CUSTOMIZATION,target:"_blank",children:"help guide"}),"."]}),e.jsx(n.Text,{variant:"headingSmall",children:"Column management"}),e.jsx(o.ColumnSearch,{name:"column-search-query",placeholder:"Search",value:c,onChange:x,onClearClick:()=>x(""),fill:"100%"})]}),leftActions:[{label:"Reset",onClick:k,variant:"default",disabled:h}],rightActions:[{label:"Cancel",onClick:u,variant:"default",disabled:h},{label:"Save",onClick:()=>M({visibleColumns:i[r.ColumnGroupIds.Visible]}),variant:"primary",disabled:h,loading:h}],children:e.jsx(n.Stack,{spacing:"md",alignX:"stretch",children:e.jsx(n.Stack,{spacing:4,alignX:"stretch",children:e.jsx(w.DndContainer,{items:i,setItems:C,renderDragOverlay:q,children:e.jsx(o.Container,{children:e.jsxs(o.ColumnGroupsGrid,{columns:2,spacing:"xl",children:[e.jsx(j.ColumnGroup,{id:r.ColumnGroupIds.Visible,title:"Shown columns:",columns:y}),e.jsx(o.VerticalSeparator,{children:e.jsx(o.VerticalText,{children:"Drag & Drop columns"})}),e.jsx(j.ColumnGroup,{id:r.ColumnGroupIds.Hidden,title:"Hidden columns:",columns:v})]})})})})})})};exports.TableManagementModal=H;
|
package/dist/index90.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { Modal as O, Stack as h, ListBoardIcon as _, theme as v, Text as p, Button as $, CloseIcon as z, Anchor as B } from "@veeqo/ui";
|
|
3
3
|
import { useState as w, useMemo as f, useCallback as y } from "react";
|
|
4
|
-
import { ColumnGroup as V } from "./
|
|
5
|
-
import { Container as L, ColumnGroupsGrid as R, VerticalSeparator as X, VerticalText as E, HeaderContainer as Y, ColumnSearch as j } from "./
|
|
6
|
-
import { DndContainer as N } from "./
|
|
7
|
-
import { ColumnItem as Q } from "./
|
|
8
|
-
import { ColumnGroupIds as n } from "./
|
|
9
|
-
import { usePersistColumns as U } from "./
|
|
4
|
+
import { ColumnGroup as V } from "./index93.js";
|
|
5
|
+
import { Container as L, ColumnGroupsGrid as R, VerticalSeparator as X, VerticalText as E, HeaderContainer as Y, ColumnSearch as j } from "./index94.js";
|
|
6
|
+
import { DndContainer as N } from "./index95.js";
|
|
7
|
+
import { ColumnItem as Q } from "./index96.js";
|
|
8
|
+
import { ColumnGroupIds as n } from "./index97.js";
|
|
9
|
+
import { usePersistColumns as U } from "./index98.js";
|
|
10
10
|
import { helpGuideUrls as P } from "./index49.js";
|
|
11
|
-
import { filterColumnsBySearch as D } from "./
|
|
11
|
+
import { filterColumnsBySearch as D } from "./index99.js";
|
|
12
12
|
const te = ({
|
|
13
13
|
onClose: l,
|
|
14
14
|
columnDefinitions: k,
|
package/dist/index93.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("@veeqo/ui"),s=require("@dnd-kit/sortable"),a=require("./index112.cjs"),l=require("./index113.cjs"),c=require("./index96.cjs"),u=require("./index97.cjs"),d=require("./index94.cjs"),m=({id:r,title:n,columns:i})=>e.jsxs(o.Stack,{spacing:"sm",alignX:"stretch",children:[e.jsx(d.StickyText,{variant:"bodyBold",children:n}),e.jsx(s.SortableContext,{id:r,items:i,strategy:s.verticalListSortingStrategy,children:e.jsx(l.DroppableArea,{id:r,spacing:"sm",alignX:"stretch",children:i.map(t=>e.jsx(a.SortableItem,{id:t.id,children:e.jsx(c.ColumnItem,{column:t,isHidden:r===u.ColumnGroupIds.Hidden})},t.id))})})]});exports.ColumnGroup=m;
|
package/dist/index93.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Stack as n } from "@veeqo/ui";
|
|
3
|
+
import { SortableContext as p, verticalListSortingStrategy as a } from "@dnd-kit/sortable";
|
|
4
|
+
import { SortableItem as s } from "./index112.js";
|
|
5
|
+
import { DroppableArea as d } from "./index113.js";
|
|
6
|
+
import { ColumnItem as l } from "./index96.js";
|
|
7
|
+
import { ColumnGroupIds as c } from "./index97.js";
|
|
8
|
+
import { StickyText as f } from "./index94.js";
|
|
9
|
+
const I = ({ id: t, title: e, columns: o }) => /* @__PURE__ */ m(n, { spacing: "sm", alignX: "stretch", children: [
|
|
10
|
+
/* @__PURE__ */ r(f, { variant: "bodyBold", children: e }),
|
|
11
|
+
/* @__PURE__ */ r(p, { id: t, items: o, strategy: a, children: /* @__PURE__ */ r(d, { id: t, spacing: "sm", alignX: "stretch", children: o.map((i) => /* @__PURE__ */ r(s, { id: i.id, children: /* @__PURE__ */ r(l, { column: i, isHidden: t === c.Hidden }) }, i.id)) }) })
|
|
12
|
+
] });
|
|
10
13
|
export {
|
|
11
|
-
|
|
12
|
-
s as ALL_VIEW_LABEL,
|
|
13
|
-
l as INITIAL_VIEWS_STATE
|
|
14
|
+
I as ColumnGroup
|
|
14
15
|
};
|
package/dist/index94.cjs
CHANGED
|
@@ -1 +1,104 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("styled-components"),e=require("@veeqo/ui"),a=o=>o&&o.__esModule?o:{default:o},t=a(l),i=t.default.div`
|
|
2
|
+
width: 1px;
|
|
3
|
+
position: absolute;
|
|
4
|
+
left: 50%;
|
|
5
|
+
transform: translateX(-50%);
|
|
6
|
+
border-left: 1px solid ${e.theme.colors.neutral.grey.dark};
|
|
7
|
+
height: 100%;
|
|
8
|
+
margin-top: 40px;
|
|
9
|
+
`,n=t.default(e.Text)`
|
|
10
|
+
writing-mode: vertical-rl;
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 50%;
|
|
13
|
+
left: 50%;
|
|
14
|
+
transform: translate(-50%, -50%);
|
|
15
|
+
background: white;
|
|
16
|
+
padding: 30px 0;
|
|
17
|
+
text-align: center;
|
|
18
|
+
font-size: 10px;
|
|
19
|
+
color: ${e.theme.colors.neutral.ink.lightest};
|
|
20
|
+
height: max-content;
|
|
21
|
+
`,s=t.default(e.Text)`
|
|
22
|
+
position: sticky;
|
|
23
|
+
top: 0;
|
|
24
|
+
background: #ffffff;
|
|
25
|
+
padding-bottom: ${e.theme.sizes[2]};
|
|
26
|
+
z-index: 1;
|
|
27
|
+
`,d=t.default(e.Text)`
|
|
28
|
+
color: ${e.theme.colors.neutral.ink.light};
|
|
29
|
+
`,c=t.default(e.Grid)`
|
|
30
|
+
// overflow-y: auto;
|
|
31
|
+
position: unset;
|
|
32
|
+
`,r=t.default(e.VisibilityOffIcon)`
|
|
33
|
+
margin-left: auto;
|
|
34
|
+
`,u=t.default(e.Stack)`
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
padding: 8px 12px;
|
|
37
|
+
background: #ffffff;
|
|
38
|
+
border: 1px solid ${e.theme.colors.neutral.ink.lightest};
|
|
39
|
+
transition: all ease 200ms;
|
|
40
|
+
|
|
41
|
+
${({isHidden:o})=>o&&`
|
|
42
|
+
${e.Text} {
|
|
43
|
+
color: ${e.theme.colors.neutral.ink.light};
|
|
44
|
+
}
|
|
45
|
+
`}
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
color: ${e.theme.colors.secondary.blue.base};
|
|
49
|
+
background: ${e.theme.colors.neutral.grey.lightest};
|
|
50
|
+
border: 1px solid ${e.theme.colors.neutral.grey.light};
|
|
51
|
+
|
|
52
|
+
${e.Text} {
|
|
53
|
+
color: ${e.theme.colors.secondary.blue.base};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
${r} {
|
|
57
|
+
color: ${e.theme.colors.neutral.ink.light};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
${({isDragOverlay:o})=>o&&`
|
|
62
|
+
color: ${e.theme.colors.secondary.blue.base};
|
|
63
|
+
background: ${e.theme.colors.neutral.grey.lightest};
|
|
64
|
+
border: 1px solid ${e.theme.colors.neutral.grey.light};
|
|
65
|
+
cursor: grabbing;
|
|
66
|
+
|
|
67
|
+
${e.Text} {
|
|
68
|
+
color: ${e.theme.colors.secondary.blue.base};
|
|
69
|
+
}
|
|
70
|
+
`}
|
|
71
|
+
`,g=t.default.div`
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
left: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
height: 100%;
|
|
78
|
+
width: calc(100% - 2px);
|
|
79
|
+
border-radius: 4px;
|
|
80
|
+
border: 1px dashed ${e.theme.colors.neutral.grey.dark};
|
|
81
|
+
background: ${e.theme.colors.neutral.grey.lightest};
|
|
82
|
+
`,p=t.default(e.Stack)`
|
|
83
|
+
flex: 1;
|
|
84
|
+
padding: 0;
|
|
85
|
+
`,h=t.default(e.Search)`
|
|
86
|
+
input {
|
|
87
|
+
height: 40px;
|
|
88
|
+
box-sizing: border-box;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
svg {
|
|
92
|
+
width: 16px;
|
|
93
|
+
}
|
|
94
|
+
`,f=t.default.div`
|
|
95
|
+
position: relative;
|
|
96
|
+
min-height: 500px;
|
|
97
|
+
`,m=t.default(e.BaseContainer)`
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
gap: ${e.theme.sizes.base};
|
|
101
|
+
padding: ${e.theme.sizes.md};
|
|
102
|
+
`,b=t.default.dialog`
|
|
103
|
+
display: contents;
|
|
104
|
+
`;exports.ColumnGroupsGrid=c;exports.ColumnItemWrapper=u;exports.ColumnSearch=h;exports.Container=f;exports.DetailedText=d;exports.DndDragOverlayDialog=b;exports.DraggingOverlay=g;exports.DroppableAreaStack=p;exports.HeaderContainer=m;exports.StickyText=s;exports.VerticalSeparator=i;exports.VerticalText=n;exports.VisibilityOffIcon=r;
|
package/dist/index94.js
CHANGED
|
@@ -1,15 +1,121 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import r from "styled-components";
|
|
2
|
+
import { Grid as l, theme as o, Text as t, BaseContainer as n, Search as s, Stack as i, VisibilityOffIcon as a } from "@veeqo/ui";
|
|
3
|
+
const p = r.div`
|
|
4
|
+
width: 1px;
|
|
5
|
+
position: absolute;
|
|
6
|
+
left: 50%;
|
|
7
|
+
transform: translateX(-50%);
|
|
8
|
+
border-left: 1px solid ${o.colors.neutral.grey.dark};
|
|
9
|
+
height: 100%;
|
|
10
|
+
margin-top: 40px;
|
|
11
|
+
`, u = r(t)`
|
|
12
|
+
writing-mode: vertical-rl;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 50%;
|
|
15
|
+
left: 50%;
|
|
16
|
+
transform: translate(-50%, -50%);
|
|
17
|
+
background: white;
|
|
18
|
+
padding: 30px 0;
|
|
19
|
+
text-align: center;
|
|
20
|
+
font-size: 10px;
|
|
21
|
+
color: ${o.colors.neutral.ink.lightest};
|
|
22
|
+
height: max-content;
|
|
23
|
+
`, b = r(t)`
|
|
24
|
+
position: sticky;
|
|
25
|
+
top: 0;
|
|
26
|
+
background: #ffffff;
|
|
27
|
+
padding-bottom: ${o.sizes[2]};
|
|
28
|
+
z-index: 1;
|
|
29
|
+
`, f = r(t)`
|
|
30
|
+
color: ${o.colors.neutral.ink.light};
|
|
31
|
+
`, h = r(l)`
|
|
32
|
+
// overflow-y: auto;
|
|
33
|
+
position: unset;
|
|
34
|
+
`, c = r(a)`
|
|
35
|
+
margin-left: auto;
|
|
36
|
+
`, x = r(i)`
|
|
37
|
+
border-radius: 4px;
|
|
38
|
+
padding: 8px 12px;
|
|
39
|
+
background: #ffffff;
|
|
40
|
+
border: 1px solid ${o.colors.neutral.ink.lightest};
|
|
41
|
+
transition: all ease 200ms;
|
|
42
|
+
|
|
43
|
+
${({ isHidden: e }) => e && `
|
|
44
|
+
${t} {
|
|
45
|
+
color: ${o.colors.neutral.ink.light};
|
|
46
|
+
}
|
|
47
|
+
`}
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
color: ${o.colors.secondary.blue.base};
|
|
51
|
+
background: ${o.colors.neutral.grey.lightest};
|
|
52
|
+
border: 1px solid ${o.colors.neutral.grey.light};
|
|
53
|
+
|
|
54
|
+
${t} {
|
|
55
|
+
color: ${o.colors.secondary.blue.base};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
${c} {
|
|
59
|
+
color: ${o.colors.neutral.ink.light};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
${({ isDragOverlay: e }) => e && `
|
|
64
|
+
color: ${o.colors.secondary.blue.base};
|
|
65
|
+
background: ${o.colors.neutral.grey.lightest};
|
|
66
|
+
border: 1px solid ${o.colors.neutral.grey.light};
|
|
67
|
+
cursor: grabbing;
|
|
68
|
+
|
|
69
|
+
${t} {
|
|
70
|
+
color: ${o.colors.secondary.blue.base};
|
|
71
|
+
}
|
|
72
|
+
`}
|
|
73
|
+
`, $ = r.div`
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 0;
|
|
76
|
+
left: 0;
|
|
77
|
+
right: 0;
|
|
78
|
+
bottom: 0;
|
|
79
|
+
height: 100%;
|
|
80
|
+
width: calc(100% - 2px);
|
|
81
|
+
border-radius: 4px;
|
|
82
|
+
border: 1px dashed ${o.colors.neutral.grey.dark};
|
|
83
|
+
background: ${o.colors.neutral.grey.lightest};
|
|
84
|
+
`, y = r(i)`
|
|
85
|
+
flex: 1;
|
|
86
|
+
padding: 0;
|
|
87
|
+
`, m = r(s)`
|
|
88
|
+
input {
|
|
89
|
+
height: 40px;
|
|
90
|
+
box-sizing: border-box;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
svg {
|
|
94
|
+
width: 16px;
|
|
95
|
+
}
|
|
96
|
+
`, k = r.div`
|
|
97
|
+
position: relative;
|
|
98
|
+
min-height: 500px;
|
|
99
|
+
`, v = r(n)`
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
gap: ${o.sizes.base};
|
|
103
|
+
padding: ${o.sizes.md};
|
|
104
|
+
`, w = r.dialog`
|
|
105
|
+
display: contents;
|
|
106
|
+
`;
|
|
13
107
|
export {
|
|
14
|
-
|
|
108
|
+
h as ColumnGroupsGrid,
|
|
109
|
+
x as ColumnItemWrapper,
|
|
110
|
+
m as ColumnSearch,
|
|
111
|
+
k as Container,
|
|
112
|
+
f as DetailedText,
|
|
113
|
+
w as DndDragOverlayDialog,
|
|
114
|
+
$ as DraggingOverlay,
|
|
115
|
+
y as DroppableAreaStack,
|
|
116
|
+
v as HeaderContainer,
|
|
117
|
+
b as StickyText,
|
|
118
|
+
p as VerticalSeparator,
|
|
119
|
+
u as VerticalText,
|
|
120
|
+
c as VisibilityOffIcon
|
|
15
121
|
};
|
package/dist/index95.cjs
CHANGED
|
@@ -1,104 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
width: 1px;
|
|
3
|
-
position: absolute;
|
|
4
|
-
left: 50%;
|
|
5
|
-
transform: translateX(-50%);
|
|
6
|
-
border-left: 1px solid ${e.theme.colors.neutral.grey.dark};
|
|
7
|
-
height: 100%;
|
|
8
|
-
margin-top: 40px;
|
|
9
|
-
`,n=t.default(e.Text)`
|
|
10
|
-
writing-mode: vertical-rl;
|
|
11
|
-
position: absolute;
|
|
12
|
-
top: 50%;
|
|
13
|
-
left: 50%;
|
|
14
|
-
transform: translate(-50%, -50%);
|
|
15
|
-
background: white;
|
|
16
|
-
padding: 30px 0;
|
|
17
|
-
text-align: center;
|
|
18
|
-
font-size: 10px;
|
|
19
|
-
color: ${e.theme.colors.neutral.ink.lightest};
|
|
20
|
-
height: max-content;
|
|
21
|
-
`,s=t.default(e.Text)`
|
|
22
|
-
position: sticky;
|
|
23
|
-
top: 0;
|
|
24
|
-
background: #ffffff;
|
|
25
|
-
padding-bottom: ${e.theme.sizes[2]};
|
|
26
|
-
z-index: 1;
|
|
27
|
-
`,d=t.default(e.Text)`
|
|
28
|
-
color: ${e.theme.colors.neutral.ink.light};
|
|
29
|
-
`,c=t.default(e.Grid)`
|
|
30
|
-
// overflow-y: auto;
|
|
31
|
-
position: unset;
|
|
32
|
-
`,r=t.default(e.VisibilityOffIcon)`
|
|
33
|
-
margin-left: auto;
|
|
34
|
-
`,u=t.default(e.Stack)`
|
|
35
|
-
border-radius: 4px;
|
|
36
|
-
padding: 8px 12px;
|
|
37
|
-
background: #ffffff;
|
|
38
|
-
border: 1px solid ${e.theme.colors.neutral.ink.lightest};
|
|
39
|
-
transition: all ease 200ms;
|
|
40
|
-
|
|
41
|
-
${({isHidden:o})=>o&&`
|
|
42
|
-
${e.Text} {
|
|
43
|
-
color: ${e.theme.colors.neutral.ink.light};
|
|
44
|
-
}
|
|
45
|
-
`}
|
|
46
|
-
|
|
47
|
-
&:hover {
|
|
48
|
-
color: ${e.theme.colors.secondary.blue.base};
|
|
49
|
-
background: ${e.theme.colors.neutral.grey.lightest};
|
|
50
|
-
border: 1px solid ${e.theme.colors.neutral.grey.light};
|
|
51
|
-
|
|
52
|
-
${e.Text} {
|
|
53
|
-
color: ${e.theme.colors.secondary.blue.base};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
${r} {
|
|
57
|
-
color: ${e.theme.colors.neutral.ink.light};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
${({isDragOverlay:o})=>o&&`
|
|
62
|
-
color: ${e.theme.colors.secondary.blue.base};
|
|
63
|
-
background: ${e.theme.colors.neutral.grey.lightest};
|
|
64
|
-
border: 1px solid ${e.theme.colors.neutral.grey.light};
|
|
65
|
-
cursor: grabbing;
|
|
66
|
-
|
|
67
|
-
${e.Text} {
|
|
68
|
-
color: ${e.theme.colors.secondary.blue.base};
|
|
69
|
-
}
|
|
70
|
-
`}
|
|
71
|
-
`,g=t.default.div`
|
|
72
|
-
position: absolute;
|
|
73
|
-
top: 0;
|
|
74
|
-
left: 0;
|
|
75
|
-
right: 0;
|
|
76
|
-
bottom: 0;
|
|
77
|
-
height: 100%;
|
|
78
|
-
width: calc(100% - 2px);
|
|
79
|
-
border-radius: 4px;
|
|
80
|
-
border: 1px dashed ${e.theme.colors.neutral.grey.dark};
|
|
81
|
-
background: ${e.theme.colors.neutral.grey.lightest};
|
|
82
|
-
`,p=t.default(e.Stack)`
|
|
83
|
-
flex: 1;
|
|
84
|
-
padding: 0;
|
|
85
|
-
`,h=t.default(e.Search)`
|
|
86
|
-
input {
|
|
87
|
-
height: 40px;
|
|
88
|
-
box-sizing: border-box;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
svg {
|
|
92
|
-
width: 16px;
|
|
93
|
-
}
|
|
94
|
-
`,f=t.default.div`
|
|
95
|
-
position: relative;
|
|
96
|
-
min-height: 500px;
|
|
97
|
-
`,m=t.default(e.BaseContainer)`
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
gap: ${e.theme.sizes.base};
|
|
101
|
-
padding: ${e.theme.sizes.md};
|
|
102
|
-
`,b=t.default.dialog`
|
|
103
|
-
display: contents;
|
|
104
|
-
`;exports.ColumnGroupsGrid=c;exports.ColumnItemWrapper=u;exports.ColumnSearch=h;exports.Container=f;exports.DetailedText=d;exports.DndDragOverlayDialog=b;exports.DraggingOverlay=g;exports.DroppableAreaStack=p;exports.HeaderContainer=m;exports.StickyText=s;exports.VerticalSeparator=i;exports.VerticalText=n;exports.VisibilityOffIcon=r;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),e=require("@dnd-kit/core"),S=require("@dnd-kit/sortable"),h=require("./index94.cjs"),q=require("@veeqo/ui"),C=require("./index53.cjs"),E=require("./index114.cjs"),p=require("./index115.cjs"),A=require("./index12.cjs"),b=require("./index52.cjs"),x={droppable:{strategy:e.MeasuringStrategy.Always}},M={sideEffects:e.defaultDropAnimationSideEffects({styles:{active:{opacity:"0.5"}}})},j=({items:o,setItems:s,children:a,renderDragOverlay:n})=>{const{closeModal:i,openModal:l}=C.useModal(),c=e.useSensors(e.useSensor(e.PointerSensor),e.useSensor(e.KeyboardSensor,{coordinateGetter:S.sortableKeyboardCoordinates})),{activeId:t,handleDragCancel:d,handleDragEnd:u,handleDragOver:g,handleDragStart:D}=E.useDragHandlers({items:o,setItems:s}),{collisionDetectionStrategy:y}=p.useCollisionDetectionStrategy({items:o});return r.jsx(A.ErrorBoundary,{errorComponent:r.jsx(q.Alert,{variant:"error",title:"An error occurred",rightActions:[{label:"Reload",onClick:()=>{i(),l(b.ModalId.ORDERS_TABLE_MANAGEMENT)}}]}),children:r.jsxs(e.DndContext,{sensors:c,measuring:x,collisionDetection:y,onDragStart:D,onDragOver:g,onDragEnd:u,onDragCancel:d,children:[a,r.jsx(h.DndDragOverlayDialog,{open:!0,children:r.jsx(e.DragOverlay,{dropAnimation:M,zIndex:2001,children:t&&n?n(t):null})})]})})};exports.DndContainer=j;
|