@tap-payments/os-micro-frontend-shared 0.1.415 → 0.1.417-test.1
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/AnimatedSpinnerIcon/style.d.ts +0 -1
- package/build/components/Chip/style.d.ts +0 -1
- package/build/components/CountBadge/style.d.ts +0 -1
- package/build/components/Dialog/style.d.ts +0 -1
- package/build/components/FilterDropdown/components/MerchantsFilterItem/MerchantsFilterItem.d.ts +3 -0
- package/build/components/FilterDropdown/components/MerchantsFilterItem/MerchantsFilterItem.js +45 -0
- package/build/components/FilterDropdown/components/MerchantsFilterItem/index.d.ts +4 -0
- package/build/components/FilterDropdown/components/MerchantsFilterItem/index.js +4 -0
- package/build/components/FilterDropdown/components/MerchantsFilterItem/type.d.ts +20 -0
- package/build/components/FilterDropdown/components/MerchantsFilterItem/type.js +7 -0
- package/build/components/FilterDropdown/components/MerchantsFilterItem/utils.d.ts +5 -0
- package/build/components/FilterDropdown/components/MerchantsFilterItem/utils.js +55 -0
- package/build/components/FilterDropdown/components/index.d.ts +2 -0
- package/build/components/FilterDropdown/components/index.js +2 -0
- package/build/components/FlippingCard/style.d.ts +0 -1
- package/build/components/ImageWrapper/ImageWrapper.d.ts +0 -1
- package/build/components/JSONViewer/style.d.ts +0 -1
- package/build/components/LeftPeekRightExpandingChip/style.d.ts +0 -1
- package/build/components/RangeCalender/RangeCalender.js +7 -3
- package/build/components/RightLeftExpandingCenterChip/style.d.ts +0 -1
- package/build/components/SearchButton/styles.d.ts +0 -1
- package/build/components/StatusIcons/AuthIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -1
- package/build/components/StatusIcons/ChargeStatusIcon/style.d.ts +0 -1
- package/build/components/StatusIcons/SourceIcons/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ActionCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AgreementCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ApplicationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BalanceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DueDateCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IDButton/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IntentsStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/ReferenceCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SalesChannelCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/SegmentsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/StatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/TokenStatusCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/style.d.ts +0 -1
- package/build/components/TableHeader/FiltersRow.js +1 -6
- package/build/components/TableHeader/TableView/ViewsDropdown.js +4 -4
- package/build/components/TableHeader/TableView/ViewsMenu.d.ts +1 -1
- package/build/components/TableHeader/TableView/ViewsMenu.js +14 -27
- package/build/components/TableHeader/TableView/hooks/useViewsMenu.d.ts +15 -15
- package/build/components/TableHeader/TableView/hooks/useViewsMenu.js +93 -44
- package/build/components/TableHeader/TableView/types.d.ts +1 -1
- package/build/components/TableHeader/TableView/utils/columnState.js +2 -4
- package/build/components/TableHeader/TableView/utils/index.d.ts +1 -1
- package/build/components/TableHeader/TableView/utils/index.js +1 -1
- package/build/components/TableHeader/TableView/utils/templateToColumnsView.d.ts +9 -1
- package/build/components/TableHeader/TableView/utils/templateToColumnsView.js +31 -3
- package/build/components/TableHeader/TableView/utils/viewMenu.d.ts +2 -10
- package/build/components/TableHeader/TableView/utils/viewMenu.js +4 -4
- package/build/components/TableHeader/type.d.ts +9 -12
- package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -1
- package/build/components/TableReports/style.d.ts +0 -1
- package/build/components/VirtualTables/components/style.d.ts +0 -1
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
import { GetSourceAnimationFunction } from './type';
|
|
4
3
|
export declare const ChipStyled: import("@emotion/styled").StyledComponent<import("react").RefAttributes<unknown> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
5
4
|
variant?: import("./type").ChipVariant | undefined;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MenuItem, SelectedState, Text, TreeDropdown, TreeManager } from '../../../index.js';
|
|
3
|
+
import { useState, useMemo, useCallback, useRef } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { createTreeDefinitions } from './utils';
|
|
6
|
+
import { TreeLevel } from './type';
|
|
7
|
+
import { rightArrow } from '../../../../constants/index.js';
|
|
8
|
+
const MerchantsFilterItem = (props) => {
|
|
9
|
+
const { brands, isLoading, initialValue, onFilterChange, BrandLogoComponent } = props;
|
|
10
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
11
|
+
const [merchantSelectStatus, setMerchantSelectStatus] = useState(SelectedState.UNCHECKED);
|
|
12
|
+
const treeDropdownRef = useRef(null);
|
|
13
|
+
const open = Boolean(anchorEl);
|
|
14
|
+
const { t, i18n } = useTranslation();
|
|
15
|
+
const treeDefinition = useMemo(() => createTreeDefinitions(brands, initialValue, i18n.language), [brands, initialValue, i18n.language]);
|
|
16
|
+
const brandsTreeItems = treeDefinition.children;
|
|
17
|
+
const isDisabled = isLoading || !brandsTreeItems.length;
|
|
18
|
+
const getMerchantSelectStatus = useCallback((selectedTree) => {
|
|
19
|
+
const checkedBrands = selectedTree.filter((brand) => brand.status === SelectedState.CHECKED);
|
|
20
|
+
const indeterminateBrands = selectedTree.filter((brand) => brand.status === SelectedState.INDETERMINATE);
|
|
21
|
+
return checkedBrands.length === brandsTreeItems.length
|
|
22
|
+
? SelectedState.CHECKED
|
|
23
|
+
: indeterminateBrands.length > 0 || checkedBrands.length > 0
|
|
24
|
+
? SelectedState.INDETERMINATE
|
|
25
|
+
: SelectedState.UNCHECKED;
|
|
26
|
+
}, [brandsTreeItems]);
|
|
27
|
+
const handleTreeMounted = useCallback(({ selectedTree }) => {
|
|
28
|
+
setMerchantSelectStatus(getMerchantSelectStatus(selectedTree));
|
|
29
|
+
}, [getMerchantSelectStatus]);
|
|
30
|
+
const handleTreeChange = useCallback((nextTree) => {
|
|
31
|
+
setMerchantSelectStatus(getMerchantSelectStatus(nextTree));
|
|
32
|
+
const mids = TreeManager.filterNodesByLevelKey(nextTree, TreeLevel.MERCHANT).map(({ id }) => id);
|
|
33
|
+
onFilterChange === null || onFilterChange === void 0 ? void 0 : onFilterChange(mids);
|
|
34
|
+
}, [onFilterChange, getMerchantSelectStatus]);
|
|
35
|
+
const handleClick = useCallback(() => {
|
|
36
|
+
var _a;
|
|
37
|
+
(_a = treeDropdownRef.current) === null || _a === void 0 ? void 0 : _a.toggleAll(merchantSelectStatus !== SelectedState.CHECKED);
|
|
38
|
+
}, [merchantSelectStatus]);
|
|
39
|
+
return (_jsxs(MenuItem, Object.assign({ isSelected: merchantSelectStatus === SelectedState.CHECKED, isIndeterminate: merchantSelectStatus === SelectedState.INDETERMINATE, isDisabled: isDisabled, onMouseEnter: (e) => setAnchorEl(e.currentTarget), onMouseLeave: () => setAnchorEl(null), onClick: handleClick, sx: Object.assign(Object.assign({ maxHeight: 36, minHeight: 36, padding: '12px 8px 12px 16px' }, (open && { boxShadow: '0px 0px 16px 0px #00000021' })), (isDisabled && {
|
|
40
|
+
pointerEvents: 'none',
|
|
41
|
+
opacity: 0.5,
|
|
42
|
+
cursor: 'default',
|
|
43
|
+
})) }, { children: [_jsx(Text, Object.assign({ sx: { fontSize: '11px', flex: 1 } }, { children: t('merchant') })), brands.length > 0 && _jsx("img", { src: rightArrow, alt: "arrow", style: { height: 12 } }), !isLoading && (_jsx(TreeDropdown, { ref: treeDropdownRef, placement: "right-start", anchorEl: anchorEl, exposeOnlySelectedTree: true, treeDefinition: treeDefinition, onChange: handleTreeChange, onMounted: handleTreeMounted, IconComponent: BrandLogoComponent }))] })));
|
|
44
|
+
};
|
|
45
|
+
export default MerchantsFilterItem;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Brand } from '../../../../types/index.js';
|
|
3
|
+
export declare enum TreeLevel {
|
|
4
|
+
BRAND = "BRAND",
|
|
5
|
+
COUNTRY = "COUNTRY",
|
|
6
|
+
ENTITY = "ENTITY",
|
|
7
|
+
MERCHANT = "MERCHANT"
|
|
8
|
+
}
|
|
9
|
+
export type MerchantsFilterItemProps = {
|
|
10
|
+
brands: Brand[];
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
initialValue: string[];
|
|
13
|
+
atLeastOneMerchantSelected?: boolean | undefined;
|
|
14
|
+
showSearchInput?: boolean | undefined;
|
|
15
|
+
hideCheckbox?: boolean | undefined;
|
|
16
|
+
onFilterChange?: ((value: string[]) => void) | undefined;
|
|
17
|
+
BrandLogoComponent: React.ComponentType<{
|
|
18
|
+
fileId: string;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TreeDefinition } from '../../../index.js';
|
|
2
|
+
import { Brand } from '../../../../types/index.js';
|
|
3
|
+
export declare const ID_SEPERATOR = "/";
|
|
4
|
+
export declare const generateIdFromParts: (...args: string[]) => string;
|
|
5
|
+
export declare const createTreeDefinitions: (brands: Brand[], selectedMerchantIds: string[], language: string) => TreeDefinition;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CountryFlag, SelectedState } from '../../../index.js';
|
|
3
|
+
import { getNameText } from '../../../../utils/index.js';
|
|
4
|
+
import { TreeLevel } from './type';
|
|
5
|
+
export const ID_SEPERATOR = '/';
|
|
6
|
+
export const generateIdFromParts = (...args) => args.join(ID_SEPERATOR);
|
|
7
|
+
export const createTreeDefinitions = (brands, selectedMerchantIds, language) => {
|
|
8
|
+
const children = brands.map((brand) => {
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const entities = (_a = brand.entities) !== null && _a !== void 0 ? _a : [];
|
|
11
|
+
// level 2: unique countries per brand
|
|
12
|
+
const countries = Array.from(new Set(entities.map((entity) => entity.country).filter(Boolean)));
|
|
13
|
+
const countryNodes = countries.map((countryCode) => {
|
|
14
|
+
const entitiesInCountry = entities.filter((entity) => entity.country === countryCode);
|
|
15
|
+
// level 3: entities per country
|
|
16
|
+
const entityNodes = entitiesInCountry.map((entity) => {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
const merchants = (_a = entity.merchants) !== null && _a !== void 0 ? _a : [];
|
|
19
|
+
// level 4: merchants per entity
|
|
20
|
+
const merchantNodes = merchants.map((merchant) => ({
|
|
21
|
+
id: merchant.legacy_id,
|
|
22
|
+
label: merchant.display_name,
|
|
23
|
+
levelKey: TreeLevel.MERCHANT,
|
|
24
|
+
status: selectedMerchantIds.includes(merchant.legacy_id) ? SelectedState.CHECKED : SelectedState.UNCHECKED,
|
|
25
|
+
hintText: merchant.legacy_id,
|
|
26
|
+
}));
|
|
27
|
+
return Object.assign({ id: generateIdFromParts(brand.id, countryCode, entity.id), label: (_b = getNameText(entity.legal_name, language)) !== null && _b !== void 0 ? _b : entity.id, levelKey: TreeLevel.ENTITY, children: merchantNodes, header: 'Merchants' }, (merchantNodes.length > 10 && {
|
|
28
|
+
searchProps: {
|
|
29
|
+
getValues: (item) => [item.label, item.id],
|
|
30
|
+
},
|
|
31
|
+
}));
|
|
32
|
+
});
|
|
33
|
+
return Object.assign({ id: generateIdFromParts(brand.id, countryCode), label: countryCode, levelKey: TreeLevel.COUNTRY, children: entityNodes, header: 'Entities', iconComponent: _jsx(CountryFlag, { countryCode: countryCode, width: 14 }) }, (entityNodes.length > 10 && {
|
|
34
|
+
searchProps: {
|
|
35
|
+
getValues: (item) => [item.label, item.id],
|
|
36
|
+
},
|
|
37
|
+
}));
|
|
38
|
+
});
|
|
39
|
+
return {
|
|
40
|
+
id: brand.id,
|
|
41
|
+
label: (_b = getNameText(brand.name, language)) !== null && _b !== void 0 ? _b : brand.id,
|
|
42
|
+
levelKey: TreeLevel.BRAND,
|
|
43
|
+
children: countryNodes,
|
|
44
|
+
header: 'Countries',
|
|
45
|
+
icon: {
|
|
46
|
+
fileId: brand.logo,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
return Object.assign({ levelKey: TreeLevel.BRAND, children, header: 'Brands' }, (children.length > 10 && {
|
|
51
|
+
searchProps: {
|
|
52
|
+
getValues: (item) => [item.label, item.id],
|
|
53
|
+
},
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
@@ -2,3 +2,5 @@ export { default as MerchantItem } from './MerchantItem';
|
|
|
2
2
|
export { default as RetailersItem } from './RetailersItem';
|
|
3
3
|
export { default as CountriesItem } from './CountriesItem';
|
|
4
4
|
export { default as CurrenciesItem } from './CurrenciesItem';
|
|
5
|
+
export { default as MerchantsFilterItem } from './MerchantsFilterItem';
|
|
6
|
+
export * from './MerchantsFilterItem';
|
|
@@ -2,3 +2,5 @@ export { default as MerchantItem } from './MerchantItem';
|
|
|
2
2
|
export { default as RetailersItem } from './RetailersItem';
|
|
3
3
|
export { default as CountriesItem } from './CountriesItem';
|
|
4
4
|
export { default as CurrenciesItem } from './CurrenciesItem';
|
|
5
|
+
export { default as MerchantsFilterItem } from './MerchantsFilterItem';
|
|
6
|
+
export * from './MerchantsFilterItem';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { useEffect, useRef, useState, useCallback } from 'react';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import Collapse from '@mui/material/Collapse';
|
|
5
5
|
import Popper from '@mui/material/Popper';
|
|
@@ -40,6 +40,10 @@ function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalend
|
|
|
40
40
|
setValues(getDateRange(defaultDate));
|
|
41
41
|
}
|
|
42
42
|
}, [open]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (defaultDate)
|
|
45
|
+
setDates(getDateRange(defaultDate));
|
|
46
|
+
}, [defaultDate]);
|
|
43
47
|
useEffect(() => {
|
|
44
48
|
setSelectedTimezone(timezone);
|
|
45
49
|
}, [timezone, open]);
|
|
@@ -57,11 +61,11 @@ function RangeCalender({ defaultDate, onDateChange, mode = 'gregorian', onCalend
|
|
|
57
61
|
onCalendarGroupChange === null || onCalendarGroupChange === void 0 ? void 0 : onCalendarGroupChange(selectedGroupBy || 'day');
|
|
58
62
|
onChangeTimezone === null || onChangeTimezone === void 0 ? void 0 : onChangeTimezone(selectedTimezone);
|
|
59
63
|
};
|
|
60
|
-
const getSelectedDate = () => {
|
|
64
|
+
const getSelectedDate = useCallback(() => {
|
|
61
65
|
const startSelectedTime = dates[0].format('MMM D');
|
|
62
66
|
const endSelectedTime = dates[1] ? dates[1].format('MMM D') : dates[0].format('MMM D');
|
|
63
67
|
return startSelectedTime === endSelectedTime && !noTimezone ? startSelectedTime : `${startSelectedTime} - ${endSelectedTime}`;
|
|
64
|
-
};
|
|
68
|
+
}, [dates, noTimezone]);
|
|
65
69
|
const onChange = (newDate) => {
|
|
66
70
|
if (newDate.length < 2 || !maxDateRange) {
|
|
67
71
|
setValues(newDate);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
import { TableMode } from '../../../../types/index.js';
|
|
4
3
|
export declare const ActionCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
5
4
|
tableMode?: TableMode | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const AgreementCellContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledAgreementCardIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const CardContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledAppsCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const AppsStatusContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const AuthIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
4
3
|
export declare const AuthCellContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const PaymentSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledDownloadFileImageWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
4
3
|
isTextShown?: boolean | undefined;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const StyledSourceImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
5
4
|
export declare const SalesChannelsContainer: import("@emotion/styled").StyledComponent<{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const StyledSourceCell: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
4
3
|
export declare const ReferenceSourcesContainer: import("@emotion/styled").StyledComponent<{
|
|
5
4
|
hidden?: boolean | undefined;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
/// <reference types="react" />
|
|
3
2
|
export declare const GeographyBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
3
|
variant?: "Global" | "Regional" | "Local" | undefined;
|
|
5
4
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -15,10 +15,5 @@ export default function FiltersRow({ date, calendarMode, onDateChange, onCalenda
|
|
|
15
15
|
if (startDate && endDate) {
|
|
16
16
|
onDateChange === null || onDateChange === void 0 ? void 0 : onDateChange([startDate, endDate]);
|
|
17
17
|
}
|
|
18
|
-
}, mode: calendarMode, onCalendarModeSwitch: onCalendarModeSwitch, maxDateRange: maxDateRange, groupBy: calendarGroupBy, onCalendarGroupChange: onCalendarGroupChange, browserTimezone: browserTimezone, defaultCountryTimezone: defaultCountryTimezone, timezone: timezone, onChangeTimezone: onChangeTimezone, timezoneCountriesCodes: timezoneCountriesCodes })), isReportsButtonVisible && tableReportsComponent, onToggleTextButtonClick && isAcceptance && tableModeButton] })), onToggleViewButtonClick && (_jsx(StyledButton, { children: _jsx(Icon, { src: viewIcon, alt: "view", sx: { width: 14, height: 14 } }) })), onViewChange &&
|
|
19
|
-
(customViews ? (_jsx(ViewsMenu
|
|
20
|
-
// @todo to be moved to grouping
|
|
21
|
-
, Object.assign({
|
|
22
|
-
// @todo to be moved to grouping
|
|
23
|
-
onViewChange: onViewChange, tableMode: tableMode, lang: lang }, customViews))) : (_jsx(TableView, { onViewChange: onViewChange, setIsViewVisible: setIsViewVisible, tableViews: tableViews, setTableViews: setTableViews, resetTableViews: resetTableViews }))), rightActions && !isViewVisible && rightActions] }));
|
|
18
|
+
}, mode: calendarMode, onCalendarModeSwitch: onCalendarModeSwitch, maxDateRange: maxDateRange, groupBy: calendarGroupBy, onCalendarGroupChange: onCalendarGroupChange, browserTimezone: browserTimezone, defaultCountryTimezone: defaultCountryTimezone, timezone: timezone, onChangeTimezone: onChangeTimezone, timezoneCountriesCodes: timezoneCountriesCodes })), isReportsButtonVisible && tableReportsComponent, onToggleTextButtonClick && isAcceptance && tableModeButton] })), onToggleViewButtonClick && (_jsx(StyledButton, { children: _jsx(Icon, { src: viewIcon, alt: "view", sx: { width: 14, height: 14 } }) })), customViews ? (_jsx(ViewsMenu, Object.assign({ onViewChange: onViewChange, tableMode: tableMode, lang: lang, setTableViews: setTableViews }, customViews))) : (_jsx(TableView, { onViewChange: onViewChange, setIsViewVisible: setIsViewVisible, tableViews: tableViews, setTableViews: setTableViews, resetTableViews: resetTableViews })), rightActions && !isViewVisible && rightActions] }));
|
|
24
19
|
}
|
|
@@ -76,14 +76,14 @@ function ViewsDropdown({ open, selectedViewInfo, setSelectedViewInfo, anchorEl,
|
|
|
76
76
|
forceClose();
|
|
77
77
|
}
|
|
78
78
|
function applyAndClose() {
|
|
79
|
-
const isDefaultView = selectedViewInfo.id === (defaultTemplate === null || defaultTemplate === void 0 ? void 0 : defaultTemplate.id) || selectedViewInfo.id === 'default' || (defaultTemplate === null || defaultTemplate === void 0 ? void 0 : defaultTemplate.default) === true;
|
|
80
79
|
const colsToApply = (draftColumns === null || draftColumns === void 0 ? void 0 : draftColumns.length) ? draftColumns : defaultColumns;
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
const viewToApply = hoveredViewId ? views.find((v) => v.id === hoveredViewId) : null;
|
|
81
|
+
if (viewToApply && colsToApply.length) {
|
|
82
|
+
if (viewToApply.default && draftHasChanges) {
|
|
83
83
|
onSaveDefaultColumns === null || onSaveDefaultColumns === void 0 ? void 0 : onSaveDefaultColumns(colsToApply);
|
|
84
84
|
setShowModifiedBadge(true);
|
|
85
85
|
}
|
|
86
|
-
updateSelectedView === null || updateSelectedView === void 0 ? void 0 : updateSelectedView(Object.assign(Object.assign({},
|
|
86
|
+
updateSelectedView === null || updateSelectedView === void 0 ? void 0 : updateSelectedView(Object.assign(Object.assign({}, viewToApply), { id: String(viewToApply.id), submenu: deepCloneColumns(colsToApply), columns: colsToApply.map((c) => c.name) }));
|
|
87
87
|
}
|
|
88
88
|
setDraftColumns(null);
|
|
89
89
|
clearOriginalState();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { ViewsMenuProps } from './types';
|
|
3
|
-
declare function ViewsMenu({
|
|
3
|
+
declare function ViewsMenu({ templates, setTemplates, createTemplate, updateTemplate, deleteTemplate, onSelectedTemplateIdChange, tableMode, lang, setTableViews, }: ViewsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const _default: import("react").MemoExoticComponent<typeof ViewsMenu>;
|
|
5
5
|
export default _default;
|