react-luminus-components 1.5.19 → 2.0.1-table-d03d7058b722969c6483c37eaffda481c74264aa
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/.vite/manifest.json +26 -26
- package/dist/{FormDisabledProvider-DGZAPk9U.cjs → FormDisabledProvider-BNE4w-91.cjs} +1 -1
- package/dist/{FormDisabledProvider-Xx2Oc8Mr.js → FormDisabledProvider-Ct-odePz.js} +3 -3
- package/dist/ShortcutLinksContext-B6B_uG2X.js +39866 -0
- package/dist/ShortcutLinksContext-d3AdgJhg.cjs +334 -0
- package/dist/components/Documents/Documents.d.ts +10 -3
- package/dist/components/Documents/components/DocumentsFilesTable/DocumentsFilesTable.d.ts +11 -3
- package/dist/components/Documents/components/DocumentsFilesTable/hooks/useDocumentsFilesColumns.d.ts +2 -2
- package/dist/components/Imports/Result/Result.d.ts +5 -3
- package/dist/components/Localization/LocalizationImport/LocalizationImport.d.ts +5 -3
- package/dist/components/NotifCenter/Actions/NotificationActions.d.ts +7 -3
- package/dist/components/NotifCenter/Actions/components/HistoryTable/NotificationHistoryTable.d.ts +5 -3
- package/dist/components/NotifCenter/Users/NotificationUsers.d.ts +4 -3
- package/dist/components/NotifCenter/Users/components/EmployeeNotifTable/EmployeeNotifHistoryTable.d.ts +4 -3
- package/dist/components/common/Approvals/Delegations/ApprovalsDelegations.d.ts +7 -4
- package/dist/components/common/Approvals/Delegations/comps/DelegationsTable/DelegationsTable.d.ts +6 -3
- package/dist/components/common/PermissionsSubstitute/SubstituteTable/SubstituteTable.d.ts +6 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +5 -5
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +10 -10
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +6 -6
- package/dist/main.cjs.js +19 -19
- package/dist/main.es.js +2289 -2266
- package/dist/models/bnfTable/BnfTableWrappedProps.d.ts +70 -0
- package/dist/models/legacyBnfTable/TableDefaultConfig.d.ts +27 -0
- package/dist/{useLocalStorageState-DNw9Zo_I.cjs → useLocalStorageState-CGKmNXMv.cjs} +1 -1
- package/dist/{useLocalStorageState-DVjE5NF9.js → useLocalStorageState-DG9g_lFm.js} +1 -1
- package/dist/utils/bnfTable/bnfTableUtils.d.ts +5 -0
- package/dist/utils/bnfValueFormat/bnfValueFormat.d.ts +5 -3
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +107 -69
- package/package.json +2 -2
- package/dist/ShortcutLinksContext-BWm15pnf.js +0 -28244
- package/dist/ShortcutLinksContext-D6QD8JEU.cjs +0 -281
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { BnfTableColumnDef, BnfTableInitState, TableBoundStore } from 'tanstack-bnf-table';
|
|
3
|
+
|
|
4
|
+
type BnfTableWrappedProps<T> = {
|
|
5
|
+
columns: BnfTableColumnDef<T>[];
|
|
6
|
+
data: T[];
|
|
7
|
+
className?: string;
|
|
8
|
+
tableId?: number;
|
|
9
|
+
onRowClick?: (row: T) => void;
|
|
10
|
+
rowNavigation?: (row: T) => string;
|
|
11
|
+
idColumn?: string;
|
|
12
|
+
customRows?: {
|
|
13
|
+
selector: (row: T) => boolean;
|
|
14
|
+
className: string;
|
|
15
|
+
}[];
|
|
16
|
+
archiveHighlighting?: {
|
|
17
|
+
enable: boolean;
|
|
18
|
+
column?: string;
|
|
19
|
+
};
|
|
20
|
+
initState?: Partial<BnfTableInitState>;
|
|
21
|
+
tableStore?: TableBoundStore;
|
|
22
|
+
rowSelection?: {
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
getRowId: (row: T) => string;
|
|
25
|
+
selectedRows: Record<string, boolean>;
|
|
26
|
+
setSelectedRows: Dispatch<SetStateAction<Record<string, boolean>>>;
|
|
27
|
+
};
|
|
28
|
+
setDisplayedRows?: Dispatch<SetStateAction<T[]>>;
|
|
29
|
+
getRowProps?: (values: T) => React.HTMLAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLAnchorElement>;
|
|
30
|
+
filtering?: {
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
};
|
|
33
|
+
sorting?: {
|
|
34
|
+
enabled?: boolean;
|
|
35
|
+
};
|
|
36
|
+
pagination?: {
|
|
37
|
+
mode?: 'enabled' | 'disabled' | 'auto';
|
|
38
|
+
};
|
|
39
|
+
resizing?: {
|
|
40
|
+
mode?: 'onChange' | 'onEnd';
|
|
41
|
+
enabled?: boolean;
|
|
42
|
+
};
|
|
43
|
+
reordering?: {
|
|
44
|
+
enabled?: boolean;
|
|
45
|
+
};
|
|
46
|
+
columnPinning?: {
|
|
47
|
+
enabled?: boolean;
|
|
48
|
+
};
|
|
49
|
+
grouping?: {
|
|
50
|
+
enabled?: boolean;
|
|
51
|
+
mode?: 'reorder' | 'remove' | false;
|
|
52
|
+
};
|
|
53
|
+
expanding?: {
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
};
|
|
56
|
+
fullScreen?: {
|
|
57
|
+
enabled?: boolean;
|
|
58
|
+
};
|
|
59
|
+
sizing?: {
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
};
|
|
62
|
+
excelExport?: {
|
|
63
|
+
enabled: true;
|
|
64
|
+
excelName?: string;
|
|
65
|
+
};
|
|
66
|
+
bottomBar?: {
|
|
67
|
+
hidden?: boolean;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export default BnfTableWrappedProps;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type TableDefaultConfig = {
|
|
2
|
+
columnsOrder?: string[];
|
|
3
|
+
hiddenColumns?: string[];
|
|
4
|
+
defaultPageSize?: number;
|
|
5
|
+
defaultSort?: {
|
|
6
|
+
id: string;
|
|
7
|
+
desc: boolean;
|
|
8
|
+
} | null;
|
|
9
|
+
defaultFilters?: {
|
|
10
|
+
id: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}[];
|
|
13
|
+
fixedColumns?: {
|
|
14
|
+
left: string | null;
|
|
15
|
+
right: string | null;
|
|
16
|
+
};
|
|
17
|
+
isDense?: boolean;
|
|
18
|
+
columnWidths?: {
|
|
19
|
+
column: string;
|
|
20
|
+
width: number;
|
|
21
|
+
}[];
|
|
22
|
+
onMobile?: {
|
|
23
|
+
defaultDisplayGroup?: string;
|
|
24
|
+
showColumnNames?: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default TableDefaultConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const S=require("./ShortcutLinksContext-
|
|
1
|
+
"use strict";const S=require("./ShortcutLinksContext-d3AdgJhg.cjs"),t=require("react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const r={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},m=(e,{loadOnInit:u=r.loadOnInit,enabled:n=r.enabled,silent:a=r.silent,nullStateBeforeLoad:c=r.nullStateBeforeLoad,nullStateOnFail:i=r.nullStateOnFail,customApiUrl:o,customBearerToken:I,dataTransformer:g}=r)=>{const C=S.useAxios({silent:a,customToken:I,differentBaseUrl:o}),[O,L]=t.useState(!1),{startLoading:b,stopLoading:D}=t.useContext(S.LoadingContext),R=t.useRef(0),{isAuthenticated:q}=S.useAuth(),p=t.useCallback(s=>{b(s),L(()=>!0)},[b]),x=t.useCallback(s=>{D(s),L(()=>!1)},[D]),[$,d]=t.useState(null),l=t.useCallback(async(s,h)=>{if(!q()||n===!1)return null;!a&&p(`loadData-${e}-${h}`),c&&d(null);let k;try{const f=await C.get(e,{signal:s}),A=g?g(f.data):f.data;d(A),k=A}catch(f){throw i&&d(null),f}finally{!a&&x(`loadData-${e}-${h}`)}return k},[q,n,a,p,e,c,C,g,i,x]),w=t.useCallback(async()=>{l()},[l]),y=t.useCallback(async()=>l(),[l]);return t.useEffect(()=>{if(u===!1)return;const s=new AbortController;return l(s.signal,++R.current),()=>{s.abort()}},[l,u]),{data:$,setData:d,reloadData:w,isLoading:O,reloadDataWithReturn:y}},v=(e,u)=>{const n=t.useCallback(()=>{const o=localStorage.getItem(e);return o!=null&&o!=="undefined"?JSON.parse(o):u},[u,e]),[a,c]=t.useState(n);t.useEffect(()=>{localStorage.setItem(e,JSON.stringify(a))},[e,a]);const i=t.useCallback(()=>{c(n)},[n]);return[a,c,i]};exports.useGetApiData=m;exports.useLocalStorageState=v;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aw as J, aX as N, ar as E } from "./ShortcutLinksContext-
|
|
1
|
+
import { aw as J, aX as N, ar as E } from "./ShortcutLinksContext-B6B_uG2X.js";
|
|
2
2
|
import { useState as p, useContext as F, useRef as G, useCallback as e, useEffect as O } from "react";
|
|
3
3
|
import "react-router-dom";
|
|
4
4
|
import "react-dom";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as TableDefaultConfig } from '../../models/legacyBnfTable/TableDefaultConfig';
|
|
2
|
+
import { BnfTableInitState } from 'tanstack-bnf-table';
|
|
3
|
+
|
|
4
|
+
export declare const configToTanstackTableState: (config: TableDefaultConfig) => BnfTableInitState;
|
|
5
|
+
export declare const buildTableSearchQuery: (values: Partial<BnfTableInitState>, tableId?: string) => string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { CellContext } from 'tanstack-bnf-table';
|
|
2
|
+
|
|
3
|
+
export declare const valueTooltip: <T>(ctx: CellContext<T, unknown>) => import("react").JSX.Element;
|
|
2
4
|
/**
|
|
3
5
|
* Formats numbers to czech format separating numbers by thousands etc..
|
|
4
6
|
* @returns
|
|
5
7
|
*/
|
|
6
|
-
export declare const numFormat: (
|
|
7
|
-
export declare const dateValueFormat: (
|
|
8
|
+
export declare const numFormat: <T>(ctx: CellContext<T, unknown>) => import("react").JSX.Element;
|
|
9
|
+
export declare const dateValueFormat: <T>(ctx: CellContext<T, unknown>) => import("react").JSX.Element;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ export * from './route/apiPathUtils';
|
|
|
13
13
|
export * from './localizationUtils/localizationUtils';
|
|
14
14
|
export * from './apiUtils/apiUtils';
|
|
15
15
|
export * from './localStorage/localStorageUtils';
|
|
16
|
+
export * from './bnfTable/bnfTableUtils';
|
|
16
17
|
export { default as CommonLuminusIconsArray } from './constants/CommonLuminusIconsArray';
|
package/dist/utils.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./ShortcutLinksContext-d3AdgJhg.cjs");require("react");require("@azure/msal-browser");require("@azure/msal-react");require("react-router-dom");require("react-dom");require("react-hook-form");require("react-flexmonster");const l=require("./localStorageUtils-CBQuZzg0.cjs"),g=t=>{var r,i;return e.jsxRuntimeExports.jsx(e.SimpleTooltip,{text:((r=t.getValue())==null?void 0:r.toString())??"",placement:"bottom",children:e.jsxRuntimeExports.jsx("div",{className:"w-100 text-truncate",children:((i=t.getValue())==null?void 0:i.toString())??""})})},d=t=>{var r;return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:(r=t.getValue())==null?void 0:r.toLocaleString("cs-CZ")})},f=t=>{var a;const r=((a=t.getValue())==null?void 0:a.toString())??"",i=e.format(new Date(r),"dd.MM.yyyy");return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:r?i:""})},p=(t,r)=>{let i=!1,a=t;t[0]==="#"&&(a=t.slice(1),i=!0);let s=parseInt(a.substring(0,2),16),o=parseInt(a.substring(2,4),16),n=parseInt(a.substring(4,6),16);s+=r,o+=r,n+=r,s>255?s=255:s<0&&(s=0),o>255?o=255:o<0&&(o=0),n>255?n=255:n<0&&(n=0);const u=s.toString(16).length===1?"0"+s.toString(16):s.toString(16),m=o.toString(16).length===1?"0"+o.toString(16):o.toString(16),c=n.toString(16).length===1?"0"+n.toString(16):n.toString(16);return(i?"#":"")+u+m+c},h=t=>{const r=t.slice(3),i=[];for(let s=0;s<r.length;s+=2)i.push(r.slice(s,s+2));return`#${i.reverse().join("")}`},S=t=>typeof t.directoryName=="string"&&typeof t.directoryPath=="string"&&typeof t.directoryTranslationKey=="string"&&Array.isArray(t.files),y=async t=>{let r={status:"pending"};try{r={status:"success",data:(await t).data}}catch(i){r={status:"error",error:i}}return r},x=t=>{var r,i,a;return{columnOrder:t.columnsOrder??[],columnVisibility:Object.fromEntries((t.hiddenColumns??[]).map(s=>[s,!1])),pagination:{pageIndex:0,pageSize:t.defaultPageSize??50},columnSorting:t.defaultSort?[t.defaultSort]:[],columnFilters:t.defaultFilters??[],columnPinning:t.fixedColumns?{left:t.fixedColumns.left?[t.fixedColumns.left]:[],right:t.fixedColumns.right?[t.fixedColumns.right]:[]}:{left:[],right:[]},size:t.isDense?"sm":"md",mobileDisplayGroup:((r=t.onMobile)==null?void 0:r.defaultDisplayGroup)??"",mobileFilter:{globalFilter:""},mobileShowColumnNames:((i=t.onMobile)==null?void 0:i.showColumnNames)??!1,columnSizing:Object.fromEntries(((a=t.columnWidths)==null?void 0:a.map(s=>[s.column,s.width]))??[]),grouping:[],expanding:{},isFullScreen:!1}},F=(t,r)=>{const i=new URLSearchParams;return Object.keys(t).forEach(a=>{i.append(`BnfTable-${r||"Universal"}.${a}`,JSON.stringify(t[a]))}),i.toString()},D=["edit","delete","info","warning","check","check-simple","add","cancel","cancel-simple","danger","chevron-left","chevron-right","chevron-up","chevron-down","chevron-double-left","chevron-double-right","folder","folder-filled","file-download","file-upload","star-outline","save","link","pending","resizer-horizontal","qr-code","phone","mail","mail-envelope","dashboard","user","role","close","search","plus","minus","menu","arrow-right"];exports.atobUtf8=e.atobUtf8;exports.buildEmployeeNameString=e.buildEmployeeNameString;exports.buildOrgUnitString=e.buildOrgUnitString;exports.buildVehicleNameString=e.buildVehicleNameString;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.compareDate=e.compareDate;exports.compareDateTime=e.compareDateTime;exports.extractErrorsFromResponse=e.extractErrorsFromResponse;exports.extractFilename=e.extractFilename;exports.extractPermissionsFromResponse=e.extractPermissionsFromResponse;exports.fixNameIdNulls=e.fixNameIdNulls;exports.formatDate=e.formatDate;exports.formatDateTime=e.formatDateTime;exports.formatFileSize=e.formatFileSize;exports.getDateString=e.getDateString;exports.getDaysDifference=e.getDaysDifference;exports.getFirstDayOfMonth=e.getFirstDayOfMonth;exports.getFirstDayOfOffsetMonth=e.getFirstDayOfOffsetMonth;exports.getFirstDayOfYear=e.getFirstDayOfYear;exports.getLastDayOfMonth=e.getLastDayOfMonth;exports.getLastDayOfOffsetMonth=e.getLastDayOfOffsetMonth;exports.getLastDayOfYear=e.getLastDayOfYear;exports.hasOnlyNullValues=e.hasOnlyNullValues;exports.hookFormSetServerErrors=e.hookFormSetServerErrors;exports.isExtensionOpenable=e.isExtensionOpenable;exports.isFileOpenable=e.isFileOpenable;exports.isISODate=e.isISODate;exports.isPrimitive=e.isPrimitive;exports.isValidDate=e.isValidDate;exports.joinStrings=e.joinStrings;exports.msToStartOfNextDay=e.msToStartOfNextDay;exports.replaceNullValuesOnlyObjectsWithNulls=e.replaceNullValuesOnlyObjectsWithNulls;exports.saveFile=e.saveFile;exports.saveFileFromResponse=e.saveFileFromResponse;exports.shortenText=e.shortenText;exports.stringContains=e.stringContains;exports.stringSearchWithin=e.stringSearchWithin;exports.stringStartsWith=e.stringStartsWith;exports.trimIsoDate=e.trimIsoDate;exports.truncateText=e.truncateText;exports.urlfyArray=e.urlfyArray;exports.dumpLocalStorage=l.dumpLocalStorage;exports.generateApiPath=l.generateApiPath;exports.hookFormSetNull=l.hookFormSetNull;exports.hookFormSetNulls=l.hookFormSetNulls;exports.limitNumber=l.limitNumber;exports.restoreLocalStorage=l.restoreLocalStorage;exports.CommonLuminusIconsArray=D;exports.adjustBrightness=p;exports.buildTableSearchQuery=F;exports.configToTanstackTableState=x;exports.dateValueFormat=f;exports.isFileStructureDirectory=S;exports.numFormat=d;exports.responsePromiseWrapper=y;exports.valueTooltip=g;exports.vclToHex=h;
|
package/dist/utils.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
1
|
+
import { j as n, ao as u, U as d } from "./ShortcutLinksContext-B6B_uG2X.js";
|
|
2
|
+
import { ce as I, cc as z, cd as E, cb as M, ca as R, bV as k, bW as U, a_ as W, c1 as A, bS as B, bo as G, b6 as $, c9 as Y, cg as Z, c0 as _, bX as H, aI as J, bZ as q, aJ as K, bY as Q, b_ as X, b$ as ee, c5 as te, bm as re, c3 as se, c2 as ae, bT as oe, c4 as ie, bU as ne, ch as le, bL as ce, c6 as me, aT as ue, aZ as de, cj as ge, c7 as pe, _ as fe, c8 as he, aH as Se, cf as be, ci as ye } from "./ShortcutLinksContext-B6B_uG2X.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@azure/msal-browser";
|
|
5
5
|
import "@azure/msal-react";
|
|
@@ -7,31 +7,67 @@ import "react-router-dom";
|
|
|
7
7
|
import "react-dom";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
import "react-flexmonster";
|
|
10
|
-
import { d as
|
|
11
|
-
const F = (
|
|
12
|
-
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
10
|
+
import { d as Fe, g as De, h as Oe, a as ve, l as Ne, r as Te } from "./localStorageUtils-DBNNyBcc.js";
|
|
11
|
+
const F = (e) => {
|
|
12
|
+
var t, r;
|
|
13
|
+
return /* @__PURE__ */ n.jsx(u, { text: ((t = e.getValue()) == null ? void 0 : t.toString()) ?? "", placement: "bottom", children: /* @__PURE__ */ n.jsx("div", { className: "w-100 text-truncate", children: ((r = e.getValue()) == null ? void 0 : r.toString()) ?? "" }) });
|
|
14
|
+
}, D = (e) => {
|
|
15
|
+
var t;
|
|
16
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: (t = e.getValue()) == null ? void 0 : t.toLocaleString("cs-CZ") });
|
|
17
|
+
}, O = (e) => {
|
|
18
|
+
var a;
|
|
19
|
+
const t = ((a = e.getValue()) == null ? void 0 : a.toString()) ?? "", r = d(new Date(t), "dd.MM.yyyy");
|
|
20
|
+
return /* @__PURE__ */ n.jsx(n.Fragment, { children: t ? r : "" });
|
|
21
|
+
}, v = (e, t) => {
|
|
22
|
+
let r = !1, a = e;
|
|
23
|
+
e[0] === "#" && (a = e.slice(1), r = !0);
|
|
24
|
+
let s = parseInt(a.substring(0, 2), 16), o = parseInt(a.substring(2, 4), 16), i = parseInt(a.substring(4, 6), 16);
|
|
25
|
+
s += t, o += t, i += t, s > 255 ? s = 255 : s < 0 && (s = 0), o > 255 ? o = 255 : o < 0 && (o = 0), i > 255 ? i = 255 : i < 0 && (i = 0);
|
|
26
|
+
const l = s.toString(16).length === 1 ? "0" + s.toString(16) : s.toString(16), c = o.toString(16).length === 1 ? "0" + o.toString(16) : o.toString(16), m = i.toString(16).length === 1 ? "0" + i.toString(16) : i.toString(16);
|
|
20
27
|
return (r ? "#" : "") + l + c + m;
|
|
21
|
-
},
|
|
22
|
-
const
|
|
23
|
-
for (let
|
|
24
|
-
r.push(
|
|
28
|
+
}, N = (e) => {
|
|
29
|
+
const t = e.slice(3), r = [];
|
|
30
|
+
for (let s = 0; s < t.length; s += 2)
|
|
31
|
+
r.push(t.slice(s, s + 2));
|
|
25
32
|
return `#${r.reverse().join("")}`;
|
|
26
|
-
}, T = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files),
|
|
27
|
-
let
|
|
33
|
+
}, T = (e) => typeof e.directoryName == "string" && typeof e.directoryPath == "string" && typeof e.directoryTranslationKey == "string" && Array.isArray(e.files), C = async (e) => {
|
|
34
|
+
let t = { status: "pending" };
|
|
28
35
|
try {
|
|
29
|
-
|
|
36
|
+
t = { status: "success", data: (await e).data };
|
|
30
37
|
} catch (r) {
|
|
31
|
-
|
|
38
|
+
t = { status: "error", error: r };
|
|
32
39
|
}
|
|
33
|
-
return
|
|
34
|
-
},
|
|
40
|
+
return t;
|
|
41
|
+
}, w = (e) => {
|
|
42
|
+
var t, r, a;
|
|
43
|
+
return {
|
|
44
|
+
columnOrder: e.columnsOrder ?? [],
|
|
45
|
+
columnVisibility: Object.fromEntries((e.hiddenColumns ?? []).map((s) => [s, !1])),
|
|
46
|
+
pagination: {
|
|
47
|
+
pageIndex: 0,
|
|
48
|
+
pageSize: e.defaultPageSize ?? 50
|
|
49
|
+
},
|
|
50
|
+
columnSorting: e.defaultSort ? [e.defaultSort] : [],
|
|
51
|
+
columnFilters: e.defaultFilters ?? [],
|
|
52
|
+
columnPinning: e.fixedColumns ? {
|
|
53
|
+
left: e.fixedColumns.left ? [e.fixedColumns.left] : [],
|
|
54
|
+
right: e.fixedColumns.right ? [e.fixedColumns.right] : []
|
|
55
|
+
} : { left: [], right: [] },
|
|
56
|
+
size: e.isDense ? "sm" : "md",
|
|
57
|
+
mobileDisplayGroup: ((t = e.onMobile) == null ? void 0 : t.defaultDisplayGroup) ?? "",
|
|
58
|
+
mobileFilter: { globalFilter: "" },
|
|
59
|
+
mobileShowColumnNames: ((r = e.onMobile) == null ? void 0 : r.showColumnNames) ?? !1,
|
|
60
|
+
columnSizing: Object.fromEntries(((a = e.columnWidths) == null ? void 0 : a.map((s) => [s.column, s.width])) ?? []),
|
|
61
|
+
grouping: [],
|
|
62
|
+
expanding: {},
|
|
63
|
+
isFullScreen: !1
|
|
64
|
+
};
|
|
65
|
+
}, j = (e, t) => {
|
|
66
|
+
const r = new URLSearchParams();
|
|
67
|
+
return Object.keys(e).forEach((a) => {
|
|
68
|
+
r.append(`BnfTable-${t || "Universal"}.${a}`, JSON.stringify(e[a]));
|
|
69
|
+
}), r.toString();
|
|
70
|
+
}, V = [
|
|
35
71
|
"edit",
|
|
36
72
|
"delete",
|
|
37
73
|
"info",
|
|
@@ -72,59 +108,61 @@ const F = ({ cell: { value: e } }) => /* @__PURE__ */ i.jsx(g, { text: e, placem
|
|
|
72
108
|
"arrow-right"
|
|
73
109
|
];
|
|
74
110
|
export {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
M as
|
|
82
|
-
|
|
83
|
-
|
|
111
|
+
V as CommonLuminusIconsArray,
|
|
112
|
+
v as adjustBrightness,
|
|
113
|
+
I as atobUtf8,
|
|
114
|
+
z as buildEmployeeNameString,
|
|
115
|
+
E as buildOrgUnitString,
|
|
116
|
+
j as buildTableSearchQuery,
|
|
117
|
+
M as buildVehicleNameString,
|
|
118
|
+
R as capitalizeFirstLetter,
|
|
119
|
+
k as compareDate,
|
|
120
|
+
U as compareDateTime,
|
|
121
|
+
w as configToTanstackTableState,
|
|
84
122
|
O as dateValueFormat,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
123
|
+
Fe as dumpLocalStorage,
|
|
124
|
+
W as extractErrorsFromResponse,
|
|
125
|
+
A as extractFilename,
|
|
126
|
+
B as extractPermissionsFromResponse,
|
|
127
|
+
G as fixNameIdNulls,
|
|
128
|
+
$ as formatDate,
|
|
129
|
+
Y as formatDateTime,
|
|
130
|
+
Z as formatFileSize,
|
|
131
|
+
De as generateApiPath,
|
|
132
|
+
_ as getDateString,
|
|
133
|
+
H as getDaysDifference,
|
|
134
|
+
J as getFirstDayOfMonth,
|
|
135
|
+
q as getFirstDayOfOffsetMonth,
|
|
136
|
+
K as getFirstDayOfYear,
|
|
137
|
+
Q as getLastDayOfMonth,
|
|
138
|
+
X as getLastDayOfOffsetMonth,
|
|
139
|
+
ee as getLastDayOfYear,
|
|
140
|
+
te as hasOnlyNullValues,
|
|
141
|
+
Oe as hookFormSetNull,
|
|
142
|
+
ve as hookFormSetNulls,
|
|
143
|
+
re as hookFormSetServerErrors,
|
|
144
|
+
se as isExtensionOpenable,
|
|
145
|
+
ae as isFileOpenable,
|
|
108
146
|
T as isFileStructureDirectory,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
147
|
+
oe as isISODate,
|
|
148
|
+
ie as isPrimitive,
|
|
149
|
+
ne as isValidDate,
|
|
150
|
+
le as joinStrings,
|
|
151
|
+
Ne as limitNumber,
|
|
152
|
+
ce as msToStartOfNextDay,
|
|
115
153
|
D as numFormat,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
154
|
+
me as replaceNullValuesOnlyObjectsWithNulls,
|
|
155
|
+
C as responsePromiseWrapper,
|
|
156
|
+
Te as restoreLocalStorage,
|
|
157
|
+
ue as saveFile,
|
|
158
|
+
de as saveFileFromResponse,
|
|
121
159
|
ge as shortenText,
|
|
122
160
|
pe as stringContains,
|
|
123
161
|
fe as stringSearchWithin,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
162
|
+
he as stringStartsWith,
|
|
163
|
+
Se as trimIsoDate,
|
|
164
|
+
be as truncateText,
|
|
127
165
|
ye as urlfyArray,
|
|
128
166
|
F as valueTooltip,
|
|
129
|
-
|
|
167
|
+
N as vclToHex
|
|
130
168
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-luminus-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1-table-d03d7058b722969c6483c37eaffda481c74264aa",
|
|
4
4
|
"description": "Library of React Components reusable in Luminus projects (Fleetman, CAFM)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
"bootstrap": "^5.3.5",
|
|
61
61
|
"flexmonster": "2.9.95",
|
|
62
62
|
"react": ">=18",
|
|
63
|
-
"react-bnf-table": "^1.4.19",
|
|
64
63
|
"react-bootstrap": ">=2",
|
|
65
64
|
"react-dom": ">=18",
|
|
66
65
|
"react-flexmonster": "2.9.95",
|
|
@@ -69,6 +68,7 @@
|
|
|
69
68
|
"react-qrcode-logo": "^3.0.0",
|
|
70
69
|
"react-responsive": "^10.0.0",
|
|
71
70
|
"react-router-dom": ">=6",
|
|
71
|
+
"tanstack-bnf-table": ">=0.2.1",
|
|
72
72
|
"zod": ">=3.22.4"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|