mautourco-components 0.2.10 → 0.2.12
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/components/atoms/Icon/Icon.d.ts +1 -1
- package/dist/components/atoms/Icon/Icon.js +1 -1
- package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.js +1 -1
- package/dist/components/atoms/Icon/icons/registry.d.ts +0 -11
- package/dist/components/atoms/Icon/icons/registry.js +27 -49
- package/dist/components/atoms/Typography/Typography.d.ts +1 -3
- package/dist/components/atoms/Typography/Typography.js +15 -3
- package/dist/components/organisms/DateTimePicker/DateTimePicker.d.ts +2 -0
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +31 -3
- package/dist/components/organisms/RoundTrip/RoundTrip.js +1 -1
- package/dist/components/organisms/TransferLine/TransferLine.js +1 -1
- package/dist/components/ui/popover.d.ts +3 -3
- package/dist/components/ui/popover.js +5 -5
- package/dist/index.d.ts +33 -41
- package/dist/index.js +20 -26
- package/dist/styles/components/typography.css +0 -1
- package/package.json +1 -6
- package/src/components/atoms/Icon/Icon.tsx +8 -2
- package/src/components/atoms/Icon/icons/ArrowRightOutlineIcon.tsx +7 -2
- package/src/components/atoms/Icon/icons/registry.tsx +28 -50
- package/src/components/atoms/Typography/Typography.tsx +30 -22
- package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +33 -2
- package/src/components/organisms/RoundTrip/RoundTrip.tsx +1 -0
- package/src/components/organisms/SearchBarTransfer/index.ts +1 -0
- package/src/components/organisms/TransferLine/TransferLine.tsx +1 -0
- package/src/components/ui/popover.tsx +10 -10
- package/src/styles/components/typography.css +0 -4
- package/dist/components/atoms/Icon/icons/AccomIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/AccomIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.d.ts +0 -8
- package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/BusIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/BusIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/Calendar2Icon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/Calendar2Icon.js +0 -36
- package/dist/components/atoms/Icon/icons/MapIcon.d.ts +0 -8
- package/dist/components/atoms/Icon/icons/MapIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/MicroIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/MicroIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/MoreVerticalIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/MoreVerticalIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/NightIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/NightIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/RowExcursion.d.ts +0 -16
- package/dist/components/atoms/Icon/icons/RowExcursion.js +0 -28
- package/dist/components/atoms/Icon/icons/StopWatchIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/StopWatchIcon.js +0 -36
- package/dist/components/atoms/Icon/icons/Utensils.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/Utensils.js +0 -36
- package/dist/components/atoms/Icon/icons/WalletIcon.d.ts +0 -12
- package/dist/components/atoms/Icon/icons/WalletIcon.js +0 -36
- package/dist/components/molecules/ActionDropdown/ActionDropdown.css +0 -2119
- package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +0 -21
- package/dist/components/molecules/ActionDropdown/ActionDropdown.js +0 -34
- package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +0 -14
- package/dist/components/molecules/DateDisplay/DateDisplay.js +0 -39
- package/dist/components/molecules/FromTo/FromTo.d.ts +0 -8
- package/dist/components/molecules/FromTo/FromTo.js +0 -24
- package/dist/components/molecules/TableServiceItem/DetailsCol.d.ts +0 -12
- package/dist/components/molecules/TableServiceItem/DetailsCol.js +0 -17
- package/dist/components/molecules/TableServiceItem/ItemCol.d.ts +0 -13
- package/dist/components/molecules/TableServiceItem/ItemCol.js +0 -24
- package/dist/components/molecules/TableServiceItem/RowAccommodation.d.ts +0 -16
- package/dist/components/molecules/TableServiceItem/RowAccommodation.js +0 -37
- package/dist/components/molecules/TableServiceItem/RowExcursion.d.ts +0 -16
- package/dist/components/molecules/TableServiceItem/RowExcursion.js +0 -22
- package/dist/components/molecules/TableServiceItem/RowOtherServices.d.ts +0 -9
- package/dist/components/molecules/TableServiceItem/RowOtherServices.js +0 -34
- package/dist/components/molecules/TableServiceItem/RowTransfer.d.ts +0 -15
- package/dist/components/molecules/TableServiceItem/RowTransfer.js +0 -37
- package/dist/components/molecules/TableServiceItem/index.d.ts +0 -17
- package/dist/components/molecules/TableServiceItem/index.js +0 -15
- package/dist/components/molecules/TextWithIcon/TextWithIcon.d.ts +0 -30
- package/dist/components/molecules/TextWithIcon/TextWithIcon.js +0 -31
- package/dist/components/molecules/TooltipDisplay/TooltipDisplay.d.ts +0 -13
- package/dist/components/molecules/TooltipDisplay/TooltipDisplay.js +0 -18
- package/dist/components/organisms/Table/Table.css +0 -2280
- package/dist/components/organisms/Table/Table.d.ts +0 -50
- package/dist/components/organisms/Table/Table.js +0 -95
- package/dist/components/organisms/Table/TableCell.d.ts +0 -15
- package/dist/components/organisms/Table/TableCell.js +0 -16
- package/dist/components/organisms/Table/columns/booking-columns.d.ts +0 -7
- package/dist/components/organisms/Table/columns/booking-columns.js +0 -83
- package/dist/components/organisms/Table/columns/detail-resume-columns.d.ts +0 -3
- package/dist/components/organisms/Table/columns/detail-resume-columns.js +0 -178
- package/dist/components/organisms/Table/columns/index.d.ts +0 -12
- package/dist/components/organisms/Table/columns/index.js +0 -9
- package/dist/components/organisms/Table/columns/quotation-columns.d.ts +0 -7
- package/dist/components/organisms/Table/columns/quotation-columns.js +0 -91
- package/dist/components/organisms/Table/constant.d.ts +0 -6
- package/dist/components/organisms/Table/constant.js +0 -24
- package/dist/components/organisms/Table/index.d.ts +0 -2
- package/dist/components/organisms/Table/index.js +0 -2
- package/dist/components/ui/tooltip.d.ts +0 -7
- package/dist/components/ui/tooltip.js +0 -42
- package/dist/types/table/action-dropdown-type.types.d.ts +0 -5
- package/dist/types/table/action-dropdown-type.types.js +0 -6
- package/dist/types/table/booking.types.d.ts +0 -16
- package/dist/types/table/booking.types.js +0 -1
- package/dist/types/table/detail-resume.types.d.ts +0 -155
- package/dist/types/table/detail-resume.types.js +0 -7
- package/dist/types/table/index.d.ts +0 -3
- package/dist/types/table/index.js +0 -3
- package/dist/types/table/quotation.types.d.ts +0 -23
- package/dist/types/table/quotation.types.js +0 -1
- package/src/components/atoms/Icon/icons/AccomIcon.tsx +0 -45
- package/src/components/atoms/Icon/icons/ArrowDownOutlineIcon.tsx +0 -41
- package/src/components/atoms/Icon/icons/BusIcon.tsx +0 -52
- package/src/components/atoms/Icon/icons/Calendar2Icon.tsx +0 -54
- package/src/components/atoms/Icon/icons/MapIcon.tsx +0 -48
- package/src/components/atoms/Icon/icons/MicroIcon.tsx +0 -45
- package/src/components/atoms/Icon/icons/MoreVerticalIcon.tsx +0 -53
- package/src/components/atoms/Icon/icons/NightIcon.tsx +0 -45
- package/src/components/atoms/Icon/icons/RowExcursion.tsx +0 -54
- package/src/components/atoms/Icon/icons/StopWatchIcon.tsx +0 -45
- package/src/components/atoms/Icon/icons/Utensils.tsx +0 -45
- package/src/components/atoms/Icon/icons/WalletIcon.tsx +0 -45
- package/src/components/molecules/ActionDropdown/ActionDropdown.css +0 -23
- package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +0 -53
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +0 -47
- package/src/components/molecules/FromTo/FromTo.tsx +0 -31
- package/src/components/molecules/TableServiceItem/DetailsCol.tsx +0 -25
- package/src/components/molecules/TableServiceItem/ItemCol.tsx +0 -68
- package/src/components/molecules/TableServiceItem/RowAccommodation.tsx +0 -56
- package/src/components/molecules/TableServiceItem/RowExcursion.tsx +0 -40
- package/src/components/molecules/TableServiceItem/RowOtherServices.tsx +0 -50
- package/src/components/molecules/TableServiceItem/RowTransfer.tsx +0 -60
- package/src/components/molecules/TableServiceItem/index.ts +0 -24
- package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +0 -62
- package/src/components/molecules/TooltipDisplay/TooltipDisplay.tsx +0 -32
- package/src/components/organisms/Table/Table.css +0 -185
- package/src/components/organisms/Table/Table.tsx +0 -273
- package/src/components/organisms/Table/TableCell.tsx +0 -40
- package/src/components/organisms/Table/columns/booking-columns.tsx +0 -118
- package/src/components/organisms/Table/columns/detail-resume-columns.tsx +0 -226
- package/src/components/organisms/Table/columns/index.ts +0 -11
- package/src/components/organisms/Table/columns/quotation-columns.tsx +0 -150
- package/src/components/organisms/Table/constant.ts +0 -31
- package/src/components/organisms/Table/index.ts +0 -2
- package/src/components/ui/tooltip.tsx +0 -45
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { PaginationProps } from '../../molecules/Pagination/Pagination';
|
|
3
|
-
import './Table.css';
|
|
4
|
-
import { ColumnType } from './TableCell';
|
|
5
|
-
export type TableRowData<T = any> = {
|
|
6
|
-
/** Unique identifier for the row */
|
|
7
|
-
id?: string;
|
|
8
|
-
/** Whether the row is visible */
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Class name for the row
|
|
12
|
-
*
|
|
13
|
-
* Available classes:
|
|
14
|
-
* - table__row-yellow: For yellow rows
|
|
15
|
-
* - table__row-border-0: For no border
|
|
16
|
-
*/
|
|
17
|
-
className?: string;
|
|
18
|
-
/** Children rows for the row */
|
|
19
|
-
children?: T[];
|
|
20
|
-
};
|
|
21
|
-
export interface TableProps<T extends TableRowData<T>> {
|
|
22
|
-
/** Columns definitions for the table */
|
|
23
|
-
columns: ColumnType<T>[];
|
|
24
|
-
/** Data for the table */
|
|
25
|
-
data: T[];
|
|
26
|
-
/** Callback function to be called when a row is clicked */
|
|
27
|
-
onClickRow?: (e: React.MouseEvent<HTMLTableRowElement>, row: T) => void;
|
|
28
|
-
/** Pagination configuration for the table */
|
|
29
|
-
pagination?: PaginationProps;
|
|
30
|
-
/** Total rows in the table */
|
|
31
|
-
totalRows?: Record<string, string | number>;
|
|
32
|
-
/** Whether the child rows are visible */
|
|
33
|
-
isGrouped?: boolean;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* A table component for displaying structured data in rows and columns. Supports customizable column definitions and data rows.
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* <Table
|
|
40
|
-
* columns={columns}
|
|
41
|
-
* data={data}
|
|
42
|
-
* pagination={pagination}
|
|
43
|
-
* onClickRow={onClickRow}
|
|
44
|
-
* />
|
|
45
|
-
*
|
|
46
|
-
* @param props TableProps<T>
|
|
47
|
-
* @returns React.ReactNode
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
export declare const Table: <T extends TableRowData<T>>(props: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { cn } from '@/src/lib/utils';
|
|
14
|
-
import { AnimatePresence, domAnimation, LazyMotion } from 'motion/react';
|
|
15
|
-
import * as motion from 'motion/react-m';
|
|
16
|
-
import { Fragment, useEffect, useRef, useState } from 'react';
|
|
17
|
-
import { Text } from '../../atoms/Typography/Typography';
|
|
18
|
-
import Pagination from '../../molecules/Pagination/Pagination';
|
|
19
|
-
import './Table.css';
|
|
20
|
-
import { TableCell } from './TableCell';
|
|
21
|
-
/**
|
|
22
|
-
* A component for displaying nested content in a table row.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* <NestedContent
|
|
26
|
-
* rowIndex={rowIndex}
|
|
27
|
-
* columns={columns}
|
|
28
|
-
* children={children}
|
|
29
|
-
* onClickRow={onClickRow}
|
|
30
|
-
* />
|
|
31
|
-
* @param NestedContentProps<T>
|
|
32
|
-
* @returns
|
|
33
|
-
*/
|
|
34
|
-
var NestedContent = function (_a) {
|
|
35
|
-
var rowIndex = _a.rowIndex, columns = _a.columns, children = _a.children, isGrouped = _a.isGrouped, onClickRow = _a.onClickRow;
|
|
36
|
-
var contentRef = useRef(null);
|
|
37
|
-
var _b = useState(0), height = _b[0], setHeight = _b[1];
|
|
38
|
-
useEffect(function () {
|
|
39
|
-
if (contentRef.current) {
|
|
40
|
-
var measuredHeight = contentRef.current.scrollHeight;
|
|
41
|
-
setHeight(measuredHeight);
|
|
42
|
-
}
|
|
43
|
-
}, [children]);
|
|
44
|
-
var Tag = isGrouped ? 'div' : motion.div;
|
|
45
|
-
return (_jsx(Tag, __assign({ ref: contentRef, initial: { height: 0, opacity: 0 }, animate: { height: height, opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: {
|
|
46
|
-
height: { duration: 0.2, ease: 'easeInOut' },
|
|
47
|
-
opacity: { duration: 0.15, ease: 'easeInOut' },
|
|
48
|
-
}, className: "table__nested-wrapper" }, { children: _jsx("table", __assign({ className: "table" }, { children: _jsx("tbody", { children: children.map(function (child, childIndex) { return (_jsx("tr", __assign({ className: cn(child.className, {
|
|
49
|
-
'table__row-clickable': onClickRow,
|
|
50
|
-
}), onClick: function (e) { return onClickRow === null || onClickRow === void 0 ? void 0 : onClickRow(e, child); } }, { children: _jsx(TableCell, { columns: columns, row: child, rowIndex: childIndex }) }), "ch-".concat(rowIndex, "-").concat(childIndex))); }) }) })) })));
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* A table component for displaying structured data in rows and columns. Supports customizable column definitions and data rows.
|
|
54
|
-
*
|
|
55
|
-
* @example
|
|
56
|
-
* <Table
|
|
57
|
-
* columns={columns}
|
|
58
|
-
* data={data}
|
|
59
|
-
* pagination={pagination}
|
|
60
|
-
* onClickRow={onClickRow}
|
|
61
|
-
* />
|
|
62
|
-
*
|
|
63
|
-
* @param props TableProps<T>
|
|
64
|
-
* @returns React.ReactNode
|
|
65
|
-
*
|
|
66
|
-
*/
|
|
67
|
-
export var Table = function (props) {
|
|
68
|
-
var columns = props.columns, data = props.data, pagination = props.pagination, isGrouped = props.isGrouped, _a = props.totalRows, totalRows = _a === void 0 ? {} : _a, onClickRow = props.onClickRow;
|
|
69
|
-
var normalizeLastColumnWidth = function () {
|
|
70
|
-
var width = columns[columns.length - 1].width;
|
|
71
|
-
if (typeof width === 'number') {
|
|
72
|
-
return "".concat(width - 10, "px");
|
|
73
|
-
}
|
|
74
|
-
return width;
|
|
75
|
-
};
|
|
76
|
-
var hasTotal = Object.keys(totalRows).length > 0;
|
|
77
|
-
return (_jsx(LazyMotion, __assign({ features: domAnimation }, { children: _jsxs("div", { children: [_jsx("div", __assign({ className: cn('table-container', { 'table-container--no-total': !hasTotal }) }, { children: _jsxs("table", __assign({ className: "table" }, { children: [_jsx("thead", __assign({ className: "table__header" }, { children: _jsx("tr", { children: columns.map(function (column, columnIndex) { return (_jsx("th", __assign({ className: column.className, style: column.width
|
|
78
|
-
? { minWidth: column.width, width: column.width }
|
|
79
|
-
: undefined }, { children: _jsx(Text, __assign({ variant: "bold", size: "sm" }, { children: column.header })) }), "hd-".concat(columnIndex))); }) }) })), _jsx("tbody", __assign({ className: "table__body" }, { children: data.map(function (row, rowIndex) {
|
|
80
|
-
var _a, _b;
|
|
81
|
-
var hasVisibleChildren = (_a = row.children) === null || _a === void 0 ? void 0 : _a.some(function (child) { return child.visible; });
|
|
82
|
-
var defaultTable = (_jsx("tr", __assign({ className: cn(row.className, {
|
|
83
|
-
'table__row-nested': (_b = row.children) === null || _b === void 0 ? void 0 : _b.length,
|
|
84
|
-
'table__row-clickable': onClickRow,
|
|
85
|
-
}), onClick: function (e) { return onClickRow === null || onClickRow === void 0 ? void 0 : onClickRow(e, row); } }, { children: _jsx(TableCell, { columns: columns, row: row, rowIndex: rowIndex }) })));
|
|
86
|
-
return (_jsx(Fragment, { children: isGrouped ? (row.children && row.children.length > 0 ? (_jsx("tr", __assign({ className: "table__row-grouped" }, { children: _jsx("td", __assign({ colSpan: columns.length }, { children: _jsx(NestedContent, { isGrouped: isGrouped, rowIndex: rowIndex, columns: columns, children: row.children || [], onClickRow: onClickRow }) })) }))) : (defaultTable)) : (_jsxs(_Fragment, { children: [defaultTable, _jsx(AnimatePresence, __assign({ initial: false }, { children: hasVisibleChildren && (_jsx("tr", __assign({ className: cn('table__no-hover', {
|
|
87
|
-
'table__row-nested': row.children && row.children.length > 0,
|
|
88
|
-
}) }, { children: _jsx("td", __assign({ colSpan: columns.length, className: "table__cell-nested" }, { children: _jsx(NestedContent, { rowIndex: rowIndex, columns: columns, children: row.children || [], onClickRow: onClickRow }) })) }), "nested-".concat(rowIndex))) }))] })) }, "rw-".concat(rowIndex)));
|
|
89
|
-
}) }))] })) })), hasTotal && (_jsx("div", __assign({ className: "table__total-container" }, { children: _jsx("table", __assign({ className: "table" }, { children: _jsx("tbody", __assign({ className: "table__total" }, { children: _jsxs("tr", { children: [_jsx("td", { colSpan: columns.length - 1 }), _jsx("td", __assign({ style: {
|
|
90
|
-
'--last-column-width': normalizeLastColumnWidth(),
|
|
91
|
-
} }, { children: _jsxs("div", __assign({ className: "relative" }, { children: [_jsxs(Text, __assign({ size: "md", variant: "bold", className: "absolute top-0 -left-3 -translate-x-full" }, { children: ["Total :", ' '] })), _jsx("div", { children: Object.entries(totalRows).map(function (_a) {
|
|
92
|
-
var currency = _a[0], total = _a[1];
|
|
93
|
-
return (_jsx("div", { children: _jsxs(Text, __assign({ size: "md", variant: "bold" }, { children: [currency, " ", total] })) }, currency));
|
|
94
|
-
}) })] })) }))] }) })) })) }))), pagination && (_jsx("div", __assign({ className: "flex justify-end mt-4" }, { children: _jsx(Pagination, __assign({}, pagination)) })))] }) })));
|
|
95
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TableRowData } from './Table';
|
|
3
|
-
export type ColumnType<T = TableRowData> = {
|
|
4
|
-
header: string;
|
|
5
|
-
key: Extract<keyof T, string> | 'actions';
|
|
6
|
-
className?: string;
|
|
7
|
-
width?: number | string;
|
|
8
|
-
cell: (value: T[Extract<keyof T, string>], rawData: T, index?: number) => React.ReactNode;
|
|
9
|
-
};
|
|
10
|
-
export interface TableCellProps<T = TableRowData> {
|
|
11
|
-
columns: ColumnType<T>[];
|
|
12
|
-
row: T;
|
|
13
|
-
rowIndex: number;
|
|
14
|
-
}
|
|
15
|
-
export declare const TableCell: <T extends TableRowData<any>>(props: TableCellProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
export var TableCell = function (props) {
|
|
14
|
-
var columns = props.columns, row = props.row, rowIndex = props.rowIndex;
|
|
15
|
-
return (_jsx(_Fragment, { children: columns.map(function (column, columnIndex) { return (_jsx("td", __assign({ style: column.width ? { minWidth: column.width, width: column.width } : undefined }, { children: column.key === 'actions' ? (_jsx("div", { children: column.cell({}, row, rowIndex) })) : (column.cell(row[column.key], row, rowIndex)) }), "cl-".concat(rowIndex, "-").concat(columnIndex))); }) }));
|
|
16
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionDropdownType } from '@/src/types/table';
|
|
2
|
-
import { BookingListItem } from '@/src/types/table/booking.types';
|
|
3
|
-
import { ColumnType } from '../TableCell';
|
|
4
|
-
export declare const bookingColumns: (params: {
|
|
5
|
-
onExpand: (value?: BookingListItem) => void;
|
|
6
|
-
onAction: (action: ActionDropdownType) => void;
|
|
7
|
-
}) => ColumnType<BookingListItem>[];
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import Button from '@/src/components/atoms/Button/Button';
|
|
14
|
-
import Chip from '@/src/components/atoms/Chip/Chip';
|
|
15
|
-
import { Text } from '@/src/components/atoms/Typography/Typography';
|
|
16
|
-
import { ActionDropdown } from '@/src/components/molecules/ActionDropdown/ActionDropdown';
|
|
17
|
-
import { DateDisplay } from '@/src/components/molecules/DateDisplay/DateDisplay';
|
|
18
|
-
import { actionDropdownData } from '../constant';
|
|
19
|
-
export var bookingColumns = function (_a) {
|
|
20
|
-
var onExpand = _a.onExpand, onAction = _a.onAction;
|
|
21
|
-
return [
|
|
22
|
-
{
|
|
23
|
-
header: 'Quote nb.',
|
|
24
|
-
key: 'booking_id',
|
|
25
|
-
width: 150,
|
|
26
|
-
cell: function (value) { return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: value }))); },
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
header: 'Client name',
|
|
30
|
-
key: 'agency_name',
|
|
31
|
-
width: 150,
|
|
32
|
-
cell: function (value) { return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: value }))); },
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
header: 'Type',
|
|
36
|
-
key: 'status',
|
|
37
|
-
width: 145,
|
|
38
|
-
cell: function (value) {
|
|
39
|
-
return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: "STD" })));
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
header: 'From → To',
|
|
44
|
-
key: 'date',
|
|
45
|
-
width: 260,
|
|
46
|
-
cell: function (value) {
|
|
47
|
-
var dates = value;
|
|
48
|
-
return _jsx(DateDisplay, { date: dates });
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
header: 'No. of services',
|
|
53
|
-
key: 'pax_details',
|
|
54
|
-
width: 350,
|
|
55
|
-
cell: function (value) {
|
|
56
|
-
var paxDetails = value;
|
|
57
|
-
var paxDetailsKeys = Object.keys(paxDetails);
|
|
58
|
-
if (paxDetailsKeys.length) {
|
|
59
|
-
return (_jsx("div", __assign({ className: "flex flex-wrap gap-2" }, { children: paxDetailsKeys.map(function (key) {
|
|
60
|
-
return (_jsx(Chip, { label: "".concat(key, " ").concat(paxDetails[key]), type: paxDetails[key] > 0
|
|
61
|
-
? 'filled'
|
|
62
|
-
: 'outline', color: "accent", size: "sm" }));
|
|
63
|
-
}) })));
|
|
64
|
-
}
|
|
65
|
-
return _jsx(_Fragment, {});
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
header: 'Created by',
|
|
70
|
-
key: 'created_by',
|
|
71
|
-
width: 160,
|
|
72
|
-
cell: function (value) { return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: value }))); },
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
header: '',
|
|
76
|
-
key: 'actions',
|
|
77
|
-
width: 232,
|
|
78
|
-
cell: function (_value, raw) {
|
|
79
|
-
return (_jsx("div", { children: _jsxs("div", __assign({ className: "flex items-center gap-x-8" }, { children: [_jsxs("div", __assign({ className: "flex items-center gap-x-3" }, { children: [_jsx(Button, __assign({ variant: "secondary", size: "sm", className: "w-[89px]" }, { children: "Proforma" })), _jsx(Button, __assign({ variant: "outline-secondary", size: "sm", className: "w-[89px]" }, { children: "Voucher" }))] })), _jsx(ActionDropdown, { data: actionDropdownData(onAction) })] })) }));
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
];
|
|
83
|
-
};
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import Chip from '@/src/components/atoms/Chip/Chip';
|
|
14
|
-
import { Text } from '@/src/components/atoms/Typography/Typography';
|
|
15
|
-
import { DateDisplay } from '@/src/components/molecules/DateDisplay/DateDisplay';
|
|
16
|
-
import { ServiceType, } from '@/src/types/table';
|
|
17
|
-
import { RowAccommodation } from '../../../molecules/TableServiceItem/RowAccommodation';
|
|
18
|
-
import { RowExcursion } from '../../../molecules/TableServiceItem/RowExcursion';
|
|
19
|
-
import { RowOtherServices } from '../../../molecules/TableServiceItem/RowOtherServices';
|
|
20
|
-
import { RowTransfer } from '../../../molecules/TableServiceItem/RowTransfer';
|
|
21
|
-
export var detailResumeColumns = function () {
|
|
22
|
-
return [
|
|
23
|
-
{
|
|
24
|
-
header: 'Item',
|
|
25
|
-
key: 'Type',
|
|
26
|
-
width: 268,
|
|
27
|
-
cell: function (value, raw) {
|
|
28
|
-
if (value === ServiceType.ACCOMMODATION) {
|
|
29
|
-
var accom = raw;
|
|
30
|
-
console.log(accom);
|
|
31
|
-
return (_jsx(RowAccommodation.FirstCol, { serviceName: accom.HotelName, offers: accom.Offers, status: accom.RoomStatus }));
|
|
32
|
-
}
|
|
33
|
-
if (value === ServiceType.EXCURSION) {
|
|
34
|
-
var excursion = raw;
|
|
35
|
-
return (_jsx(RowExcursion.FirstCol, { serviceName: excursion.ExcursionName }));
|
|
36
|
-
}
|
|
37
|
-
if (value === ServiceType.TRANSFER) {
|
|
38
|
-
var transfer = raw;
|
|
39
|
-
return (_jsx(RowTransfer.FirstCol, { serviceName: transfer.VehicleTypeName, transferType: transfer.TransferType, from: transfer.LocationFromName, to: transfer.LocationToName }));
|
|
40
|
-
}
|
|
41
|
-
if (value === ServiceType.OTHER_SERVICE) {
|
|
42
|
-
return _jsx(RowOtherServices.FirstCol, {});
|
|
43
|
-
}
|
|
44
|
-
return _jsx(_Fragment, {});
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
header: 'Details',
|
|
49
|
-
key: 'Type',
|
|
50
|
-
width: 400,
|
|
51
|
-
cell: function (value, raw, index) {
|
|
52
|
-
if (value === ServiceType.ACCOMMODATION) {
|
|
53
|
-
var accom = raw;
|
|
54
|
-
return (_jsx(RowAccommodation.DetailsCol, { data: {
|
|
55
|
-
RoomName: accom.RoomName,
|
|
56
|
-
Dates: accom.Dates,
|
|
57
|
-
ClientCategory: accom.ClientCategory,
|
|
58
|
-
MealPlan: accom.MealPlan,
|
|
59
|
-
}, index: (index || 0) + 1 }));
|
|
60
|
-
}
|
|
61
|
-
if (value === ServiceType.EXCURSION) {
|
|
62
|
-
var excursion = raw;
|
|
63
|
-
return (_jsx(RowExcursion.DetailsCol, { data: {
|
|
64
|
-
languages: excursion.AvailableLanguages,
|
|
65
|
-
duration: excursion.Duration,
|
|
66
|
-
accessibility: excursion.Accessibility,
|
|
67
|
-
transferType: excursion.TransferType,
|
|
68
|
-
} }));
|
|
69
|
-
}
|
|
70
|
-
if (value === ServiceType.TRANSFER) {
|
|
71
|
-
var transfer = raw;
|
|
72
|
-
return (_jsx(RowTransfer.DetailsCol, { data: {
|
|
73
|
-
carType: transfer.VehicleTypeName,
|
|
74
|
-
clientType: 'STD',
|
|
75
|
-
} }));
|
|
76
|
-
}
|
|
77
|
-
if (value === ServiceType.OTHER_SERVICE) {
|
|
78
|
-
return _jsx(RowOtherServices.DetailsCol, {});
|
|
79
|
-
}
|
|
80
|
-
return _jsx(_Fragment, {});
|
|
81
|
-
},
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
header: 'Date',
|
|
85
|
-
key: 'Type',
|
|
86
|
-
width: 307,
|
|
87
|
-
cell: function (value, raw) {
|
|
88
|
-
var date = [];
|
|
89
|
-
switch (value) {
|
|
90
|
-
case ServiceType.ACCOMMODATION:
|
|
91
|
-
var accom = raw;
|
|
92
|
-
date = accom.Dates;
|
|
93
|
-
break;
|
|
94
|
-
case ServiceType.EXCURSION:
|
|
95
|
-
var excursion = raw;
|
|
96
|
-
date = [excursion.ServiceDate];
|
|
97
|
-
break;
|
|
98
|
-
case ServiceType.TRANSFER:
|
|
99
|
-
var transfer = raw;
|
|
100
|
-
date = [transfer.TransferDate];
|
|
101
|
-
break;
|
|
102
|
-
case ServiceType.OTHER_SERVICE:
|
|
103
|
-
var otherService = raw;
|
|
104
|
-
date = [otherService.service_date];
|
|
105
|
-
break;
|
|
106
|
-
}
|
|
107
|
-
return _jsx(DateDisplay, { date: date });
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
header: 'No. of pax',
|
|
112
|
-
key: 'Type',
|
|
113
|
-
width: 396,
|
|
114
|
-
cell: function (value, raw) {
|
|
115
|
-
var pax = {
|
|
116
|
-
Adult: 0,
|
|
117
|
-
Teen: 0,
|
|
118
|
-
Infant: 0,
|
|
119
|
-
Child: 0,
|
|
120
|
-
};
|
|
121
|
-
switch (value) {
|
|
122
|
-
case ServiceType.ACCOMMODATION:
|
|
123
|
-
case ServiceType.EXCURSION:
|
|
124
|
-
case ServiceType.TRANSFER:
|
|
125
|
-
var item = raw;
|
|
126
|
-
pax.Adult = item.AdultCount;
|
|
127
|
-
pax.Teen = item.TeenCount;
|
|
128
|
-
pax.Infant = item.InfantCount;
|
|
129
|
-
pax.Child = item.ChildCount;
|
|
130
|
-
break;
|
|
131
|
-
case ServiceType.OTHER_SERVICE:
|
|
132
|
-
var otherService = raw;
|
|
133
|
-
pax.Adult = otherService.adult_pax;
|
|
134
|
-
pax.Teen = otherService.teen_pax;
|
|
135
|
-
pax.Infant = otherService.infant_pax;
|
|
136
|
-
pax.Child = otherService.child_pax;
|
|
137
|
-
break;
|
|
138
|
-
}
|
|
139
|
-
return (_jsx("div", __assign({ className: "flex items-center gap-x-3" }, { children: Object.keys(pax).map(function (k, index) {
|
|
140
|
-
var _a;
|
|
141
|
-
var count = (_a = pax[k]) !== null && _a !== void 0 ? _a : 0;
|
|
142
|
-
var type = count > 0 ? 'filled' : 'outline';
|
|
143
|
-
return (_jsx(Chip, { label: "".concat(k, " ").concat(count), size: "sm", color: "accent", type: type, className: "!px-3" }, "pax-".concat(index)));
|
|
144
|
-
}) })));
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
header: 'Price',
|
|
149
|
-
key: 'Type',
|
|
150
|
-
width: 299,
|
|
151
|
-
cell: function (value, raw) {
|
|
152
|
-
var total = {
|
|
153
|
-
currency: undefined,
|
|
154
|
-
total: undefined,
|
|
155
|
-
};
|
|
156
|
-
switch (value) {
|
|
157
|
-
case ServiceType.ACCOMMODATION:
|
|
158
|
-
var accom = raw;
|
|
159
|
-
total.currency = accom.Currency;
|
|
160
|
-
total.total = accom.Total;
|
|
161
|
-
break;
|
|
162
|
-
case ServiceType.EXCURSION:
|
|
163
|
-
case ServiceType.TRANSFER:
|
|
164
|
-
var item = raw;
|
|
165
|
-
total.currency = item.Currency;
|
|
166
|
-
total.total = item.TotalPrice;
|
|
167
|
-
break;
|
|
168
|
-
case ServiceType.OTHER_SERVICE:
|
|
169
|
-
var otherService = raw;
|
|
170
|
-
total.currency = otherService.currency;
|
|
171
|
-
total.total = otherService.total_price;
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
return (_jsxs(Text, __assign({ size: "sm", variant: "bold" }, { children: [total.currency, " ", total.total] })));
|
|
175
|
-
},
|
|
176
|
-
},
|
|
177
|
-
];
|
|
178
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const columns: {
|
|
2
|
-
quotation: (params: {
|
|
3
|
-
onExpand: (value?: import("../../../..").QuotationListItem | undefined) => void;
|
|
4
|
-
onAction: (action: import("../../../..").ActionDropdownType) => void;
|
|
5
|
-
}) => import("../TableCell").ColumnType<import("../../../..").QuotationListItem>[];
|
|
6
|
-
detailResume: () => import("../TableCell").ColumnType<import("../../../..").DetailResumeItem>[];
|
|
7
|
-
booking: (params: {
|
|
8
|
-
onExpand: (value?: import("../../../../types/table/booking.types").BookingListItem | undefined) => void;
|
|
9
|
-
onAction: (action: import("../../../..").ActionDropdownType) => void;
|
|
10
|
-
}) => import("../TableCell").ColumnType<import("../../../../types/table/booking.types").BookingListItem>[];
|
|
11
|
-
};
|
|
12
|
-
export { columns };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { bookingColumns } from './booking-columns';
|
|
2
|
-
import { detailResumeColumns } from './detail-resume-columns';
|
|
3
|
-
import { quotationColumns } from './quotation-columns';
|
|
4
|
-
var columns = {
|
|
5
|
-
quotation: quotationColumns,
|
|
6
|
-
detailResume: detailResumeColumns,
|
|
7
|
-
booking: bookingColumns,
|
|
8
|
-
};
|
|
9
|
-
export { columns };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ActionDropdownType } from '@/src/types/table/action-dropdown-type.types';
|
|
2
|
-
import { QuotationListItem } from '@/src/types/table/quotation.types';
|
|
3
|
-
import { ColumnType } from '../TableCell';
|
|
4
|
-
export declare const quotationColumns: (params: {
|
|
5
|
-
onExpand: (value?: QuotationListItem) => void;
|
|
6
|
-
onAction: (action: ActionDropdownType) => void;
|
|
7
|
-
}) => ColumnType<QuotationListItem>[];
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import Button from '@/src/components/atoms/Button/Button';
|
|
14
|
-
import Chip from '@/src/components/atoms/Chip/Chip';
|
|
15
|
-
import { Text } from '@/src/components/atoms/Typography/Typography';
|
|
16
|
-
import { ActionDropdown } from '@/src/components/molecules/ActionDropdown/ActionDropdown';
|
|
17
|
-
import { DateDisplay } from '@/src/components/molecules/DateDisplay/DateDisplay';
|
|
18
|
-
import { cn } from '@/src/lib/utils';
|
|
19
|
-
import { actionDropdownData, chipVariant, clientTypeMap } from '../constant';
|
|
20
|
-
export var quotationColumns = function (_a) {
|
|
21
|
-
var onExpand = _a.onExpand, onAction = _a.onAction;
|
|
22
|
-
return [
|
|
23
|
-
{
|
|
24
|
-
header: 'Quote nb.',
|
|
25
|
-
key: 'file_nb',
|
|
26
|
-
width: 150,
|
|
27
|
-
cell: function (value) { return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: value }))); },
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
header: 'Client name',
|
|
31
|
-
key: 'agency_name',
|
|
32
|
-
width: 150,
|
|
33
|
-
cell: function (value) { return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: value }))); },
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
header: 'File status',
|
|
37
|
-
key: 'status',
|
|
38
|
-
width: 160,
|
|
39
|
-
cell: function (value, raw) {
|
|
40
|
-
var isMultiple = raw.children && raw.children.length > 0;
|
|
41
|
-
return (_jsx(Chip, __assign({ color: isMultiple ? 'blue' : chipVariant[value.toLowerCase()], size: "sm" }, { children: isMultiple ? 'Multiple' : value })));
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
header: 'Type',
|
|
46
|
-
key: 'client_type',
|
|
47
|
-
width: 145,
|
|
48
|
-
cell: function (value) {
|
|
49
|
-
var clientType = clientTypeMap[value];
|
|
50
|
-
return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: clientType !== null && clientType !== void 0 ? clientType : value })));
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
header: 'From → To',
|
|
55
|
-
key: 'date',
|
|
56
|
-
width: 260,
|
|
57
|
-
cell: function (value) {
|
|
58
|
-
var dates = value;
|
|
59
|
-
return _jsx(DateDisplay, { date: dates });
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
header: 'No. of services',
|
|
64
|
-
key: 'service_count',
|
|
65
|
-
width: 350,
|
|
66
|
-
cell: function (value) {
|
|
67
|
-
var _a = value, accom_count = _a.accom_count, transfer_count = _a.transfer_count, tours_count = _a.tours_count;
|
|
68
|
-
return (_jsxs("div", __assign({ className: "flex flex-wrap gap-2" }, { children: [_jsx(Chip, { label: "Accomodation ".concat(accom_count), type: accom_count > 0 ? 'filled' : 'outline', color: "accent", size: "sm" }), _jsx(Chip, { label: "Transfer ".concat(transfer_count), type: transfer_count > 0 ? 'filled' : 'outline', color: "accent", size: "sm" }), _jsx(Chip, { label: "Excursion ".concat(tours_count), type: tours_count > 0 ? 'filled' : 'outline', color: "accent", size: "sm" })] })));
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
header: 'Created by',
|
|
73
|
-
key: 'created_by',
|
|
74
|
-
width: 160,
|
|
75
|
-
cell: function (value) { return (_jsx(Text, __assign({ variant: "medium", size: "sm" }, { children: value }))); },
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
header: '',
|
|
79
|
-
key: 'actions',
|
|
80
|
-
width: 232,
|
|
81
|
-
cell: function (_value, raw) {
|
|
82
|
-
var _a;
|
|
83
|
-
var hasChildren = raw.children && raw.children.length > 0;
|
|
84
|
-
var isExpanded = (_a = raw.children) === null || _a === void 0 ? void 0 : _a.some(function (child) { return child.visible; });
|
|
85
|
-
var buttonLabel = isExpanded ? 'See less' : 'See more';
|
|
86
|
-
var isOnRequest = raw.status.toLowerCase() === 'on request';
|
|
87
|
-
return (_jsx("div", { children: hasChildren ? (_jsx(Button, __assign({ variant: "outline-primary", size: "sm", trailingIcon: "chevron-down", className: cn('table__button', isExpanded && 'table__button-expanded'), onClick: function () { return onExpand(raw); } }, { children: buttonLabel }))) : (_jsxs("div", __assign({ className: "flex itemes-center gap-x-8" }, { children: [_jsx(Button, __assign({ variant: isOnRequest ? 'outline-secondary' : 'secondary', size: "sm", className: "table__button" }, { children: isOnRequest ? 'Request to book' : 'Book now' })), _jsx(ActionDropdown, { data: actionDropdownData(onAction) })] }))) }));
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
];
|
|
91
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ActionDropdownType } from '@/src/types/table';
|
|
2
|
-
import { ChipProps } from '../../atoms/Chip/Chip';
|
|
3
|
-
import { ActionDropdownItem } from '../../molecules/ActionDropdown/ActionDropdown';
|
|
4
|
-
export declare const actionDropdownData: (onAction: (action: ActionDropdownType) => void) => ActionDropdownItem[];
|
|
5
|
-
export declare const chipVariant: Record<string, ChipProps['color']>;
|
|
6
|
-
export declare const clientTypeMap: Record<string, string>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ActionDropdownType } from '@/src/types/table';
|
|
2
|
-
export var actionDropdownData = function (onAction) { return [
|
|
3
|
-
{
|
|
4
|
-
label: 'Add item',
|
|
5
|
-
onClick: function () { return onAction(ActionDropdownType.ADD_ITEM); },
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
label: 'Send via mail',
|
|
9
|
-
onClick: function () { return onAction(ActionDropdownType.SEND_VIA_MAIL); },
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
label: 'Delete quote',
|
|
13
|
-
onClick: function () { return onAction(ActionDropdownType.DELETE_QUOTE); },
|
|
14
|
-
},
|
|
15
|
-
]; };
|
|
16
|
-
export var chipVariant = {
|
|
17
|
-
'free sales': 'accent',
|
|
18
|
-
'on request': 'yellow',
|
|
19
|
-
};
|
|
20
|
-
export var clientTypeMap = {
|
|
21
|
-
'standard-client': 'STD',
|
|
22
|
-
honeymooners: 'HMN',
|
|
23
|
-
vip: 'VIP',
|
|
24
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|