@tap-payments/os-micro-frontend-shared 0.1.443 → 0.1.445
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/build/components/Accordion/Accordion.d.ts +8 -0
- package/build/components/Accordion/Accordion.js +30 -0
- package/build/components/Accordion/AccordionExpandIcon.d.ts +16 -0
- package/build/components/Accordion/AccordionExpandIcon.js +8 -0
- package/build/components/Accordion/index.d.ts +4 -0
- package/build/components/Accordion/index.js +3 -0
- package/build/components/Accordion/style.d.ts +21 -0
- package/build/components/Accordion/style.js +45 -0
- package/build/components/Accordion/types.d.ts +25 -0
- package/build/components/Accordion/types.js +1 -0
- package/build/components/NoInternet/NoInternet.js +1 -1
- package/build/components/index.d.ts +1 -0
- package/build/components/index.js +1 -0
- package/build/constants/table/cell/chargeTableCellWidth.d.ts +3 -3
- package/build/constants/table/cell/chargeTableCellWidth.js +3 -3
- package/build/types/column.d.ts +1 -0
- package/build/utils/columns.d.ts +1 -0
- package/build/utils/columns.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AccordionProps } from './types';
|
|
3
|
+
declare function Accordion({ expanded, onChange, label, content, labelStartAdornment, labelEndAdornment, slotProps, disabled, expandIcon: expandIconProp, }: Readonly<AccordionProps>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare namespace Accordion {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("react").MemoExoticComponent<typeof Accordion>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { memo, useId } from 'react';
|
|
14
|
+
import { Box } from '@mui/material';
|
|
15
|
+
import AccordionExpandIcon from './AccordionExpandIcon';
|
|
16
|
+
import { AccordionDetailsStyled, AccordionRoot, AccordionLabelStyled } from './style';
|
|
17
|
+
function Accordion({ expanded, onChange, label, content, labelStartAdornment, labelEndAdornment, slotProps = {}, disabled = false, expandIcon: expandIconProp, }) {
|
|
18
|
+
var _a;
|
|
19
|
+
const id = useId();
|
|
20
|
+
const contentId = `accordion-content-${id.replace(/:/g, '')}`;
|
|
21
|
+
const labelId = `accordion-label-${id.replace(/:/g, '')}`;
|
|
22
|
+
const _b = (_a = slotProps === null || slotProps === void 0 ? void 0 : slotProps.label) !== null && _a !== void 0 ? _a : {}, { showArrow: showArrowSlotProps } = _b, labelSlotProps = __rest(_b, ["showArrow"]);
|
|
23
|
+
const showArrow = showArrowSlotProps === true || showArrowSlotProps === undefined;
|
|
24
|
+
const labelChildren = (_jsxs(_Fragment, { children: [labelStartAdornment != null && (_jsx(Box, Object.assign({ component: "span", sx: { flexShrink: 0 } }, { children: labelStartAdornment }))), _jsx(Box, Object.assign({ component: "span" }, { children: label })), labelEndAdornment != null && (_jsx(Box, Object.assign({ component: "span", sx: { flexShrink: 0, marginLeft: 'auto' } }, { children: labelEndAdornment })))] }));
|
|
25
|
+
const defaultExpandIcon = showArrow ? _jsx(AccordionExpandIcon, {}) : null;
|
|
26
|
+
const expandIcon = expandIconProp !== null && expandIconProp !== void 0 ? expandIconProp : defaultExpandIcon;
|
|
27
|
+
return (_jsxs(AccordionRoot, Object.assign({ "data-testid": "Accordion", disabled: disabled, expanded: expanded, onChange: () => onChange(!expanded) }, slotProps.root, { children: [_jsx(AccordionLabelStyled, Object.assign({ "aria-controls": contentId, "aria-expanded": expanded, expandIcon: expandIcon, id: labelId }, labelSlotProps, { children: labelChildren })), _jsx(AccordionDetailsStyled, Object.assign({ id: contentId, role: "region", "aria-labelledby": labelId }, slotProps.content, { children: content }))] })));
|
|
28
|
+
}
|
|
29
|
+
Accordion.displayName = 'Accordion';
|
|
30
|
+
export default memo(Accordion);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
/**
|
|
4
|
+
* Expand/collapse chevron icon for Accordion, matching Figma Account App Refresh design
|
|
5
|
+
* (node 981:9848 – right-pointing "greater than" chevron).
|
|
6
|
+
* Use with transform: rotate(0deg) for collapsed (point right), rotate(90deg) for expanded (point down).
|
|
7
|
+
*/
|
|
8
|
+
export interface AccordionExpandIconProps {
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
}
|
|
11
|
+
declare function AccordionExpandIcon({ sx }: Readonly<AccordionExpandIconProps>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare namespace AccordionExpandIcon {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import("react").MemoExoticComponent<typeof AccordionExpandIcon>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { Box } from '@mui/material';
|
|
4
|
+
function AccordionExpandIcon({ sx }) {
|
|
5
|
+
return (_jsx(Box, Object.assign({ component: "span", sx: Object.assign({ display: 'inline-flex', alignItems: 'center', justifyContent: 'center', transition: 'transform 0.2s ease', transform: 'rotate(180deg)' }, sx) }, { children: _jsx("svg", Object.assign({ width: "9", height: "5", viewBox: "0 0 9 5", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M0.0501709 0.427246C0.0493864 0.478467 0.0592757 0.529176 0.0784912 0.57666C0.0976579 0.623937 0.125505 0.667471 0.161499 0.703613L3.82556 4.47803C3.86116 4.51465 3.90353 4.54403 3.95056 4.56396C3.99773 4.58391 4.04876 4.59422 4.09998 4.59424C4.15123 4.59424 4.20218 4.58392 4.24939 4.56396C4.29655 4.54401 4.33969 4.51476 4.37537 4.47803L8.03845 0.703613C8.07407 0.667816 8.10232 0.625348 8.12146 0.578613C8.14069 0.531638 8.15017 0.480932 8.14978 0.430176C8.14935 0.379519 8.13942 0.329298 8.11951 0.282715C8.09956 0.236042 8.06999 0.19405 8.03357 0.158691C7.99716 0.123349 7.95384 0.0952198 7.90662 0.0766602C7.8595 0.0582058 7.80878 0.0491929 7.75818 0.050293C7.70763 0.0514427 7.65792 0.0629948 7.61169 0.0834961C7.56537 0.104067 7.52346 0.13358 7.48865 0.17041L4.09998 3.65967L0.711304 0.17041C0.65912 0.115154 0.592066 0.0759001 0.517944 0.059082C0.443585 0.0422622 0.365385 0.0481013 0.294312 0.0756836C0.22324 0.103266 0.162075 0.15178 0.11853 0.214355C0.0750125 0.276905 0.05135 0.351058 0.0501709 0.427246Z", fill: "#20232B", stroke: "#20232B", strokeWidth: "0.1" }) })) })));
|
|
6
|
+
}
|
|
7
|
+
AccordionExpandIcon.displayName = 'AccordionExpandIcon';
|
|
8
|
+
export default memo(AccordionExpandIcon);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import Accordion from './Accordion';
|
|
2
|
+
export { default as AccordionExpandIcon, type AccordionExpandIconProps } from './AccordionExpandIcon';
|
|
3
|
+
export type { AccordionProps, AccordionSlotProps, AccordionLabelSlotProps, AccordionContentSlotProps } from './types';
|
|
4
|
+
export default Accordion;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const AccordionRoot: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
children: NonNullable<import("react").ReactNode>;
|
|
4
|
+
classes?: Partial<import("@mui/material/Accordion").AccordionClasses> | undefined;
|
|
5
|
+
defaultExpanded?: boolean | undefined;
|
|
6
|
+
disabled?: boolean | undefined;
|
|
7
|
+
disableGutters?: boolean | undefined;
|
|
8
|
+
expanded?: boolean | undefined;
|
|
9
|
+
onChange?: ((event: import("react").SyntheticEvent<Element, Event>, expanded: boolean) => void) | undefined;
|
|
10
|
+
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
11
|
+
TransitionComponent?: import("react").JSXElementConstructor<import("@mui/material/transitions").TransitionProps & {
|
|
12
|
+
children?: import("react").ReactElement<any, any> | undefined;
|
|
13
|
+
}> | undefined;
|
|
14
|
+
TransitionProps?: import("@mui/material/transitions").TransitionProps | undefined;
|
|
15
|
+
} & import("@mui/material/Accordion").AccordionSlotsAndSlotProps & Omit<import("@mui/material").PaperOwnProps, "classes" | "onChange"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
16
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
17
|
+
}, "disabled" | "children" | "onChange" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "variant" | "expanded" | "square" | "elevation" | "defaultExpanded" | "disableGutters" | "TransitionComponent" | "TransitionProps" | keyof import("@mui/material/Accordion").AccordionSlotsAndSlotProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
18
|
+
export declare const AccordionLabelStyled: import("@emotion/styled").StyledComponent<import("@mui/material/AccordionSummary").AccordionSummaryOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
20
|
+
}, "disabled" | "classes" | "className" | "style" | "tabIndex" | "children" | "sx" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "expandIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
21
|
+
export declare const AccordionDetailsStyled: import("@emotion/styled").StyledComponent<import("@mui/material/AccordionDetails").AccordionDetailsProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import MuiAccordion from '@mui/material/Accordion';
|
|
2
|
+
import AccordionDetails from '@mui/material/AccordionDetails';
|
|
3
|
+
import AccordionSummary from '@mui/material/AccordionSummary';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
const LABEL_BG = '#fbfbfb';
|
|
6
|
+
const LABEL_BORDER = '#f2f2f2';
|
|
7
|
+
export const AccordionRoot = styled(MuiAccordion)(({ theme }) => ({
|
|
8
|
+
overflow: 'hidden',
|
|
9
|
+
border: `1px solid ${LABEL_BORDER}`,
|
|
10
|
+
borderWidth: 1,
|
|
11
|
+
borderRadius: theme.shape.borderRadius,
|
|
12
|
+
margin: 0,
|
|
13
|
+
background: theme.palette.background.paper,
|
|
14
|
+
'&:before': {
|
|
15
|
+
content: 'unset',
|
|
16
|
+
},
|
|
17
|
+
'&.Mui-expanded': {
|
|
18
|
+
margin: 0,
|
|
19
|
+
},
|
|
20
|
+
}));
|
|
21
|
+
export const AccordionLabelStyled = styled(AccordionSummary)(() => ({
|
|
22
|
+
background: LABEL_BG,
|
|
23
|
+
minHeight: '40px',
|
|
24
|
+
height: '40px',
|
|
25
|
+
padding: '10px',
|
|
26
|
+
'&.Mui-expanded': {
|
|
27
|
+
minHeight: '40px',
|
|
28
|
+
height: '40px',
|
|
29
|
+
},
|
|
30
|
+
'& .MuiAccordionSummary-content': {
|
|
31
|
+
margin: 0,
|
|
32
|
+
display: 'flex',
|
|
33
|
+
flexDirection: 'row',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
flexGrow: 1,
|
|
36
|
+
minWidth: 0,
|
|
37
|
+
gap: 10,
|
|
38
|
+
},
|
|
39
|
+
'& .MuiAccordionSummary-expandIconWrapper': {
|
|
40
|
+
marginLeft: 8,
|
|
41
|
+
},
|
|
42
|
+
}));
|
|
43
|
+
export const AccordionDetailsStyled = styled(AccordionDetails)(() => ({
|
|
44
|
+
borderTop: `1px solid ${LABEL_BORDER}`,
|
|
45
|
+
}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AccordionProps as MuiAccordionProps } from '@mui/material/Accordion';
|
|
3
|
+
import type { AccordionSummaryProps as MuiAccordionSummaryProps } from '@mui/material/AccordionSummary';
|
|
4
|
+
import type { AccordionDetailsProps as MuiAccordionDetailsProps } from '@mui/material/AccordionDetails';
|
|
5
|
+
export interface AccordionLabelSlotProps extends MuiAccordionSummaryProps {
|
|
6
|
+
showArrow?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface AccordionContentSlotProps extends MuiAccordionDetailsProps {
|
|
9
|
+
}
|
|
10
|
+
export interface AccordionSlotProps {
|
|
11
|
+
root?: Omit<MuiAccordionProps, 'children'>;
|
|
12
|
+
label?: AccordionLabelSlotProps;
|
|
13
|
+
content?: AccordionContentSlotProps;
|
|
14
|
+
}
|
|
15
|
+
export interface AccordionProps {
|
|
16
|
+
expanded: boolean;
|
|
17
|
+
onChange: (expanded: boolean) => void;
|
|
18
|
+
label: ReactNode;
|
|
19
|
+
content: ReactNode;
|
|
20
|
+
labelStartAdornment?: ReactNode;
|
|
21
|
+
labelEndAdornment?: ReactNode;
|
|
22
|
+
slotProps?: AccordionSlotProps;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
expandIcon?: ReactNode;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Box from '@mui/material/Box';
|
|
3
3
|
import { Container, Wrapper, ImageWrapper } from './style';
|
|
4
4
|
export default function NoInternet({ title }) {
|
|
5
|
-
return (_jsx(Container, { children: _jsxs(Wrapper, { children: [_jsx(ImageWrapper, { children: _jsxs("svg", Object.assign({ width: "15", height: "14", viewBox: "0 0 15 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("g", Object.assign({ "clip-path": "url(#clip0_4838_500791)" }, { children: _jsx("path", { d: "M12.6359 1.34444L12.6359 1.34444L1.84425 12.1361L1.84324 12.1371L1.84323 12.1371C1.80796 12.171 1.7798 12.2115 1.76041 12.2564C1.74101 12.3013 1.73076 12.3496 1.73026 12.3985C1.72977 12.4474 1.73903 12.4959 1.75751 12.5411C1.77599 12.5864 1.80332 12.6275 1.8379 12.6621C1.87247 12.6967 1.9136 12.724 1.95886 12.7425C2.00413 12.761 2.05263 12.7702 2.10153 12.7697C2.15042 12.7693 2.19872 12.759 2.2436 12.7396C2.28849 12.7202 2.32905 12.692 2.36291 12.6568L2.3639 12.6558L2.36391 12.6558L6.87107 8.1486L6.88649 8.13318L6.90794 8.12925C7.83177 7.95978 8.82148 8.22837 9.53582 8.94271C9.60683 9.01372 9.70218 9.05038 9.79508 9.05038C9.88808 9.05038 9.98396 9.01366 10.0549 8.94271L10.0553 8.94229C10.1993 8.80078 10.1999 8.5686 10.0549 8.42362C9.42924 7.79795 8.63373 7.44893 7.81425 7.36712L7.66723 7.35244L7.7717 7.24797L9.21295 5.80672L9.24408 5.77559L9.28562 5.79017C10.0624 6.06276 10.7767 6.50589 11.3758 7.10498C11.4471 7.17626 11.5402 7.21322 11.6357 7.21322C11.7275 7.21322 11.8209 7.17675 11.8957 7.10478C12.0374 6.95995 12.0372 6.72746 11.8952 6.58281C11.3154 6.00304 10.6422 5.55399 9.91133 5.24449L9.81569 5.20398L9.88914 5.13053L11.1806 3.83911L11.217 3.80262L11.2627 3.82668C11.9646 4.19662 12.6233 4.67474 13.2136 5.26497C13.2845 5.33592 13.3804 5.37265 13.4734 5.37265C13.569 5.37265 13.6615 5.33616 13.7326 5.26497C13.8776 5.11999 13.877 4.88724 13.7331 4.74574L13.7325 4.74522C13.1559 4.16612 12.5156 3.69094 11.8371 3.30814L11.7568 3.26285L11.822 3.19767L13.1556 1.8641L13.1562 1.86344C13.2093 1.81181 13.2454 1.74537 13.2601 1.67282C13.2747 1.60028 13.2671 1.525 13.2383 1.45685C13.2094 1.3887 13.1606 1.33084 13.0984 1.29086C13.0361 1.25088 12.9632 1.23062 12.8892 1.23275L12.6359 1.34444ZM12.6359 1.34444L12.6366 1.34377M12.6359 1.34444L12.6366 1.34377M12.6366 1.34377C12.7032 1.27535 12.7938 1.23554 12.8892 1.23275L12.6366 1.34377ZM1.15567 4.74574L1.1561 4.74532C2.82333 3.07809 4.99232 2.21114 7.18124 2.14706C8.13805 2.11905 9.09854 2.24422 10.0224 2.52326L9.42386 3.12232C6.7366 2.45348 3.77167 3.16849 1.67518 5.26497L1.67477 5.2654C1.53326 5.40934 1.30108 5.40996 1.1561 5.26497C1.01112 5.11999 1.01173 4.88724 1.15567 4.74574ZM2.99668 6.58304C4.18518 5.39454 5.76276 4.74246 7.44465 4.74246C7.56138 4.74246 7.67793 4.74531 7.7943 4.7519L7.05489 5.49131C5.71805 5.58262 4.47253 6.1454 3.51594 7.10481C3.37084 7.24718 3.13819 7.2465 2.99668 7.10498C2.85193 6.96023 2.85193 6.72779 2.99668 6.58304ZM6.72445 10.308C6.93012 10.1023 7.20906 9.98677 7.49991 9.98677C7.79077 9.98677 8.06971 10.1023 8.27537 10.308C8.48104 10.5136 8.59658 10.7926 8.59658 11.0834C8.59658 11.3743 8.48104 11.6532 8.27537 11.8589C8.06971 12.0646 7.79077 12.1801 7.49991 12.1801C7.20906 12.1801 6.93012 12.0646 6.72445 11.8589C6.51879 11.6532 6.40325 11.3743 6.40325 11.0834C6.40325 10.7926 6.51879 10.5136 6.72445 10.308Z", fill: "#20232B", stroke: "#20232B",
|
|
5
|
+
return (_jsx(Container, { children: _jsxs(Wrapper, { children: [_jsx(ImageWrapper, { children: _jsxs("svg", Object.assign({ width: "15", height: "14", viewBox: "0 0 15 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("g", Object.assign({ "clip-path": "url(#clip0_4838_500791)" }, { children: _jsx("path", { d: "M12.6359 1.34444L12.6359 1.34444L1.84425 12.1361L1.84324 12.1371L1.84323 12.1371C1.80796 12.171 1.7798 12.2115 1.76041 12.2564C1.74101 12.3013 1.73076 12.3496 1.73026 12.3985C1.72977 12.4474 1.73903 12.4959 1.75751 12.5411C1.77599 12.5864 1.80332 12.6275 1.8379 12.6621C1.87247 12.6967 1.9136 12.724 1.95886 12.7425C2.00413 12.761 2.05263 12.7702 2.10153 12.7697C2.15042 12.7693 2.19872 12.759 2.2436 12.7396C2.28849 12.7202 2.32905 12.692 2.36291 12.6568L2.3639 12.6558L2.36391 12.6558L6.87107 8.1486L6.88649 8.13318L6.90794 8.12925C7.83177 7.95978 8.82148 8.22837 9.53582 8.94271C9.60683 9.01372 9.70218 9.05038 9.79508 9.05038C9.88808 9.05038 9.98396 9.01366 10.0549 8.94271L10.0553 8.94229C10.1993 8.80078 10.1999 8.5686 10.0549 8.42362C9.42924 7.79795 8.63373 7.44893 7.81425 7.36712L7.66723 7.35244L7.7717 7.24797L9.21295 5.80672L9.24408 5.77559L9.28562 5.79017C10.0624 6.06276 10.7767 6.50589 11.3758 7.10498C11.4471 7.17626 11.5402 7.21322 11.6357 7.21322C11.7275 7.21322 11.8209 7.17675 11.8957 7.10478C12.0374 6.95995 12.0372 6.72746 11.8952 6.58281C11.3154 6.00304 10.6422 5.55399 9.91133 5.24449L9.81569 5.20398L9.88914 5.13053L11.1806 3.83911L11.217 3.80262L11.2627 3.82668C11.9646 4.19662 12.6233 4.67474 13.2136 5.26497C13.2845 5.33592 13.3804 5.37265 13.4734 5.37265C13.569 5.37265 13.6615 5.33616 13.7326 5.26497C13.8776 5.11999 13.877 4.88724 13.7331 4.74574L13.7325 4.74522C13.1559 4.16612 12.5156 3.69094 11.8371 3.30814L11.7568 3.26285L11.822 3.19767L13.1556 1.8641L13.1562 1.86344C13.2093 1.81181 13.2454 1.74537 13.2601 1.67282C13.2747 1.60028 13.2671 1.525 13.2383 1.45685C13.2094 1.3887 13.1606 1.33084 13.0984 1.29086C13.0361 1.25088 12.9632 1.23062 12.8892 1.23275L12.6359 1.34444ZM12.6359 1.34444L12.6366 1.34377M12.6359 1.34444L12.6366 1.34377M12.6366 1.34377C12.7032 1.27535 12.7938 1.23554 12.8892 1.23275L12.6366 1.34377ZM1.15567 4.74574L1.1561 4.74532C2.82333 3.07809 4.99232 2.21114 7.18124 2.14706C8.13805 2.11905 9.09854 2.24422 10.0224 2.52326L9.42386 3.12232C6.7366 2.45348 3.77167 3.16849 1.67518 5.26497L1.67477 5.2654C1.53326 5.40934 1.30108 5.40996 1.1561 5.26497C1.01112 5.11999 1.01173 4.88724 1.15567 4.74574ZM2.99668 6.58304C4.18518 5.39454 5.76276 4.74246 7.44465 4.74246C7.56138 4.74246 7.67793 4.74531 7.7943 4.7519L7.05489 5.49131C5.71805 5.58262 4.47253 6.1454 3.51594 7.10481C3.37084 7.24718 3.13819 7.2465 2.99668 7.10498C2.85193 6.96023 2.85193 6.72779 2.99668 6.58304ZM6.72445 10.308C6.93012 10.1023 7.20906 9.98677 7.49991 9.98677C7.79077 9.98677 8.06971 10.1023 8.27537 10.308C8.48104 10.5136 8.59658 10.7926 8.59658 11.0834C8.59658 11.3743 8.48104 11.6532 8.27537 11.8589C8.06971 12.0646 7.79077 12.1801 7.49991 12.1801C7.20906 12.1801 6.93012 12.0646 6.72445 11.8589C6.51879 11.6532 6.40325 11.3743 6.40325 11.0834C6.40325 10.7926 6.51879 10.5136 6.72445 10.308Z", fill: "#20232B", stroke: "#20232B", strokeWidth: "0.14" }) })), _jsx("defs", { children: _jsx("clipPath", Object.assign({ id: "clip0_4838_500791" }, { children: _jsx("rect", { width: "14", height: "14", fill: "white", transform: "translate(0.5)" }) })) })] })) }), _jsx(Box, { children: title })] }) }));
|
|
6
6
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as AccordionAdapter } from './AccordionAdapter';
|
|
2
|
+
export { default as Accordion, type AccordionProps, type AccordionSlotProps } from './Accordion';
|
|
2
3
|
export { default as ActionMenu, ActionMenuDropDown, ActionMenuItem, type ActionMenuProps } from './ActionMenu';
|
|
3
4
|
export { default as ActivityAreaChart, type ActivityAreaChartProps, type ChartDataPoint, ChartTooltip, type ChartTooltipProps, LoadingChart, type PayloadItem, } from './ActivityAreaChart';
|
|
4
5
|
export { default as AppWindowWrapper, type AccountHeaderProps, AccountHeaderTitle, AppWindowHeader, type AppWindowHeaderProps, type AppWindowHeaderBaseProps, AppWindow, type AccountHeaderTitleProps, type AppWindowProps, type WindowProps, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { default as AccordionAdapter } from './AccordionAdapter';
|
|
2
|
+
export { default as Accordion } from './Accordion';
|
|
2
3
|
export { default as ActionMenu, ActionMenuDropDown, ActionMenuItem } from './ActionMenu';
|
|
3
4
|
export { default as ActivityAreaChart, ChartTooltip, LoadingChart, } from './ActivityAreaChart';
|
|
4
5
|
export { default as AppWindowWrapper, AccountHeaderTitle, AppWindowHeader, AppWindow, AppWindowContext, AppWindowContextProvider, LEFT_SIDEBAR, RIGHT_SIDEBAR, VIEWER_HEIGHT, VIEWER_WIDTH, animationDuration, StyledFooter, StyledHideButton, StyledMenuLink, StyledSubmitButton, SubmitButtonWrapper, } from './AppWindowWrapper';
|
|
@@ -184,7 +184,7 @@ export declare const chargeTableCellWidth: {
|
|
|
184
184
|
readonly text: "150px";
|
|
185
185
|
readonly sheet: "170px";
|
|
186
186
|
};
|
|
187
|
-
readonly
|
|
187
|
+
readonly invoice_reference: {
|
|
188
188
|
readonly default: "185px";
|
|
189
189
|
readonly text: "180px";
|
|
190
190
|
readonly sheet: "275px";
|
|
@@ -240,9 +240,9 @@ export declare const chargeTableCellWidth: {
|
|
|
240
240
|
readonly sheet: "200px";
|
|
241
241
|
};
|
|
242
242
|
readonly meta: {
|
|
243
|
-
readonly default: "
|
|
243
|
+
readonly default: "80px";
|
|
244
244
|
readonly text: "52px";
|
|
245
|
-
readonly sheet: "
|
|
245
|
+
readonly sheet: "275px";
|
|
246
246
|
};
|
|
247
247
|
readonly action_icon: {
|
|
248
248
|
readonly default: "30px";
|
|
@@ -184,7 +184,7 @@ export const chargeTableCellWidth = {
|
|
|
184
184
|
text: '150px',
|
|
185
185
|
sheet: '170px',
|
|
186
186
|
},
|
|
187
|
-
|
|
187
|
+
invoice_reference: {
|
|
188
188
|
default: '185px',
|
|
189
189
|
text: '180px',
|
|
190
190
|
sheet: '275px',
|
|
@@ -240,9 +240,9 @@ export const chargeTableCellWidth = {
|
|
|
240
240
|
sheet: '200px',
|
|
241
241
|
},
|
|
242
242
|
meta: {
|
|
243
|
-
default: '
|
|
243
|
+
default: '80px',
|
|
244
244
|
text: '52px',
|
|
245
|
-
sheet: '
|
|
245
|
+
sheet: '275px',
|
|
246
246
|
},
|
|
247
247
|
action_icon: {
|
|
248
248
|
default: '30px',
|
package/build/types/column.d.ts
CHANGED
package/build/utils/columns.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IColumnProps, ColumnViewProps, ColumnsView } from '../types/index.js';
|
|
2
2
|
export declare function filterShownColumns(columns: IColumnProps[], tableViews: ColumnViewProps[], isCustomView?: boolean): IColumnProps<any>[];
|
|
3
|
+
export declare function getColumnOrderFromViews(tableViews: ColumnViewProps[], columnId: string): number;
|
|
3
4
|
export declare function isParameterSelected(columns: ColumnViewProps[], columnId: string, parameter: string): boolean;
|
|
4
5
|
export declare function mapDataToViews(columnData?: ColumnsView[], language?: string): ColumnViewProps[];
|
|
5
6
|
export declare function mapViewsToData(columns: ColumnViewProps[]): ColumnsView[];
|
package/build/utils/columns.js
CHANGED
|
@@ -21,6 +21,14 @@ export function filterShownColumns(columns, tableViews, isCustomView) {
|
|
|
21
21
|
return false;
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
+
export function getColumnOrderFromViews(tableViews, columnId) {
|
|
25
|
+
var _a;
|
|
26
|
+
if (columnId.toLowerCase() === 'index')
|
|
27
|
+
return 0;
|
|
28
|
+
const columnViewIndex = tableViews.findIndex((col) => { var _a; return ((_a = col.code) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === (columnId === null || columnId === void 0 ? void 0 : columnId.toLowerCase()); });
|
|
29
|
+
const currentView = tableViews[columnViewIndex];
|
|
30
|
+
return columnViewIndex >= 0 ? (_a = currentView === null || currentView === void 0 ? void 0 : currentView.sort_order) !== null && _a !== void 0 ? _a : columnViewIndex : 999;
|
|
31
|
+
}
|
|
24
32
|
export function isParameterSelected(columns, columnId, parameter) {
|
|
25
33
|
var _a, _b, _c;
|
|
26
34
|
return (((_c = (_b = (_a = columns === null || columns === void 0 ? void 0 : columns.find((view) => {
|
|
@@ -39,10 +47,12 @@ export function mapDataToViews(columnData, language) {
|
|
|
39
47
|
label: getNameText(column.name, language),
|
|
40
48
|
name: getNameText(column.name, language) || '',
|
|
41
49
|
selected: (column === null || column === void 0 ? void 0 : column.selected) !== false,
|
|
50
|
+
sort_order: column.sort_order,
|
|
42
51
|
menuItems: (_c = (_b = (_a = column.fields) === null || _a === void 0 ? void 0 : _a.map((field) => {
|
|
43
52
|
var _a, _b;
|
|
44
53
|
return (_b = (_a = field.parameters) === null || _a === void 0 ? void 0 : _a.filter((p) => !!p.code)) === null || _b === void 0 ? void 0 : _b.map((param) => {
|
|
45
54
|
return {
|
|
55
|
+
code: param.code,
|
|
46
56
|
label: startCase(param.code),
|
|
47
57
|
name: `${param.code}`,
|
|
48
58
|
selected: (param === null || param === void 0 ? void 0 : param.selected) !== false,
|
package/package.json
CHANGED