@homefile/components-v2 2.48.2 → 2.49.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.
Files changed (41) hide show
  1. package/dist/assets/locales/en/index.json +3 -3
  2. package/dist/components/onboarding/Footer.js +3 -1
  3. package/dist/components/partner/customers/PartnerCustomerCard.d.ts +2 -0
  4. package/dist/components/partner/customers/PartnerCustomerCard.js +21 -0
  5. package/dist/components/partner/customers/PartnerCustomersToolbar.d.ts +2 -0
  6. package/dist/components/partner/customers/PartnerCustomersToolbar.js +34 -0
  7. package/dist/components/partner/customers/PartnerCustomersWrapper.d.ts +2 -0
  8. package/dist/components/partner/customers/PartnerCustomersWrapper.js +6 -0
  9. package/dist/components/partner/customers/index.d.ts +3 -0
  10. package/dist/components/partner/customers/index.js +3 -0
  11. package/dist/components/partner/entityModule/PartnerEntityModuleToolbar.d.ts +2 -0
  12. package/dist/components/partner/entityModule/PartnerEntityModuleToolbar.js +21 -0
  13. package/dist/components/partner/entityModule/PartnerEntityModuleWrapper.d.ts +2 -0
  14. package/dist/components/partner/entityModule/PartnerEntityModuleWrapper.js +6 -0
  15. package/dist/components/partner/entityModule/index.d.ts +2 -0
  16. package/dist/components/partner/entityModule/index.js +2 -0
  17. package/dist/components/partner/index.d.ts +2 -0
  18. package/dist/components/partner/index.js +2 -0
  19. package/dist/components/partner/serviceTickets/PartnerServiceTicketsToolbar.js +32 -12
  20. package/dist/components/partner/serviceTickets/PartnerServiceTicketsWrapper.js +3 -4
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/interfaces/partner/customers/PartnerCustomerCard.interface.d.ts +12 -0
  24. package/dist/interfaces/partner/customers/PartnerCustomerCard.interface.js +1 -0
  25. package/dist/interfaces/partner/customers/PartnerCustomersToolbar.interface.d.ts +17 -0
  26. package/dist/interfaces/partner/customers/PartnerCustomersToolbar.interface.js +1 -0
  27. package/dist/interfaces/partner/customers/PartnerCustomersWrapper.interface.d.ts +6 -0
  28. package/dist/interfaces/partner/customers/PartnerCustomersWrapper.interface.js +1 -0
  29. package/dist/interfaces/partner/customers/index.d.ts +3 -0
  30. package/dist/interfaces/partner/customers/index.js +3 -0
  31. package/dist/interfaces/partner/entityModule/PartnerEntityModuleToolbar.interface.d.ts +21 -0
  32. package/dist/interfaces/partner/entityModule/PartnerEntityModuleToolbar.interface.js +1 -0
  33. package/dist/interfaces/partner/entityModule/PartnerEntityModuleWrapper.interface.d.ts +12 -0
  34. package/dist/interfaces/partner/entityModule/PartnerEntityModuleWrapper.interface.js +1 -0
  35. package/dist/interfaces/partner/entityModule/index.d.ts +2 -0
  36. package/dist/interfaces/partner/entityModule/index.js +2 -0
  37. package/dist/interfaces/partner/index.d.ts +2 -0
  38. package/dist/interfaces/partner/index.js +2 -0
  39. package/dist/stories/partner/PartnerCustomersWrapper.stories.d.ts +5 -0
  40. package/dist/stories/partner/PartnerCustomersWrapper.stories.js +74 -0
  41. package/package.json +1 -1
@@ -305,11 +305,11 @@
305
305
  "uploading": "Uploading"
306
306
  },
307
307
  "footer": {
308
- "copyright": "© 2025 HMFC, Inc. All Rights Reserved.",
308
+ "copyright": "HMFC, Inc. All Rights Reserved.",
309
309
  "privacyLink": "Privacy Policy",
310
- "privacyUrl": "https://homefile.cloud/privacy",
310
+ "privacyUrl": "https://homefile.com/privacy-policy",
311
311
  "termsLink": "Terms of Service",
312
- "termsUrl": "https://homefile.cloud/terms"
312
+ "termsUrl": "https://homefile.com/terms-of-service"
313
313
  },
314
314
  "forms": {
315
315
  "addAll": "Add All",
@@ -2,5 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { t } from 'i18next';
3
3
  import { Flex, Text } from '@chakra-ui/react';
4
4
  export const Footer = () => {
5
- return (_jsxs(Flex, { w: ['container.full', 'container.sm', 'container.md'], direction: ['column', 'row'], mx: "auto", my: 4, justifyContent: ['center', 'space-between'], alignItems: "center", children: [_jsx(Text, { variant: "label", children: t('footer.copyright') }), _jsxs(Flex, { gap: 2, children: [_jsx(Text, { variant: "label", children: _jsx("a", { target: "_blank", href: t('footer.termsUrl'), children: t('footer.termsLink') }) }), _jsx(Text, { variant: "label", children: _jsx("a", { target: "_blank", href: t('footer.privacyUrl'), children: t('footer.privacyLink') }) })] })] }));
5
+ const currentDate = new Date();
6
+ const currentYear = currentDate.getFullYear();
7
+ return (_jsxs(Flex, { w: ['container.full', 'container.sm', 'container.md'], direction: ['column', 'row'], mx: "auto", my: 4, justifyContent: ['center', 'space-between'], alignItems: "center", children: [_jsx(Text, { variant: "label", children: `©${currentYear} ${t('footer.copyright')}` }), _jsxs(Flex, { gap: 2, children: [_jsx(Text, { variant: "label", children: _jsx("a", { target: "_blank", href: t('footer.termsUrl'), children: t('footer.termsLink') }) }), _jsx(Text, { variant: "label", children: _jsx("a", { target: "_blank", href: t('footer.privacyUrl'), children: t('footer.privacyLink') }) })] })] }));
6
8
  };
@@ -0,0 +1,2 @@
1
+ import { PartnerCustomerCardI } from '../../../interfaces';
2
+ export declare const PartnerCustomerCard: ({ addressLines, customerName, display, footerActionLabel, imageAlt, imageSrc, onFooterActionClick, statusColor, statusLabel, }: PartnerCustomerCardI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Container, Flex, IconButton, Image, Stack, Text, } from '@chakra-ui/react';
3
+ import { House1 } from '../../../assets/images';
4
+ import { TicketBookmark } from '../../../components';
5
+ export const PartnerCustomerCard = ({ addressLines, customerName, display = 'grid', footerActionLabel, imageAlt, imageSrc, onFooterActionClick, statusColor, statusLabel, }) => {
6
+ const isListDisplay = display === 'list';
7
+ const dividerColor = 'lightBlue.2';
8
+ const cardWidth = isListDisplay ? '100%' : '180px';
9
+ const customerTitle = customerName !== null && customerName !== void 0 ? customerName : 'Unknown Customer';
10
+ const customerAddressLines = addressLines !== null && addressLines !== void 0 ? addressLines : [];
11
+ const customerStatusColor = statusColor !== null && statusColor !== void 0 ? statusColor : 'gray.1';
12
+ const customerStatusLabel = statusLabel !== null && statusLabel !== void 0 ? statusLabel : 'Unknown';
13
+ const imageSource = imageSrc || House1;
14
+ const imageAlternativeText = imageAlt !== null && imageAlt !== void 0 ? imageAlt : customerTitle;
15
+ const renderStatus = () => (_jsxs(Flex, { align: "center", gap: "2", p: "2", children: [_jsx(Box, { boxSize: "10px", borderRadius: "full", bg: customerStatusColor, flexShrink: 0 }), _jsx(Text, { fontSize: "xs", fontWeight: "medium", textTransform: "uppercase", children: customerStatusLabel })] }));
16
+ const renderAddress = () => (_jsx(Stack, { spacing: "0.5", children: customerAddressLines.map((line) => (_jsx(Text, { fontFamily: "secondary", fontSize: "sm", lineHeight: "1.2", children: line }, line))) }));
17
+ if (isListDisplay) {
18
+ return (_jsx(Container, { variant: "launchpad", w: cardWidth, maxW: "none", mx: "0", overflow: "hidden", bg: "neutral.white", children: _jsxs(Flex, { direction: { base: 'column', md: 'row' }, align: "stretch", children: [_jsx(Box, { minW: { base: '100%', md: '140px' }, borderBottomWidth: { base: '1px', md: '0' }, borderBottomStyle: "solid", borderRightWidth: { base: '0', md: '1px' }, borderRightStyle: "solid", borderBottomColor: dividerColor, borderRightColor: dividerColor, children: renderStatus() }), _jsx(Box, { minW: { base: '100%', md: '140px' }, borderBottomWidth: { base: '1px', md: '0' }, borderBottomStyle: "solid", borderRightWidth: { base: '0', md: '1px' }, borderRightStyle: "solid", borderBottomColor: dividerColor, borderRightColor: dividerColor, children: _jsx(Image, { src: imageSource, alt: imageAlternativeText, h: { base: '160px', md: '88px' }, w: "100%", objectFit: "cover" }) }), _jsxs(Stack, { spacing: "1", p: "base", flex: "1", justify: "center", minW: "0", children: [_jsx(Text, { textTransform: "uppercase", fontWeight: "medium", children: customerTitle }), renderAddress()] }), _jsx(Flex, { p: "base", align: "center", justify: "center", borderTopWidth: { base: '1px', md: '0' }, borderTopStyle: "solid", borderLeftWidth: { base: '0', md: '1px' }, borderLeftStyle: "solid", borderTopColor: dividerColor, borderLeftColor: dividerColor, minW: { base: '100%', md: '64px' }, children: _jsx(IconButton, { "aria-label": footerActionLabel !== null && footerActionLabel !== void 0 ? footerActionLabel : 'Save customer', variant: "icon", width: "fit-content", onClick: onFooterActionClick, children: _jsx(TicketBookmark, { boxSize: "5" }) }) })] }) }));
19
+ }
20
+ return (_jsxs(Container, { variant: "launchpad", w: cardWidth, maxW: "none", mx: "0", overflow: "hidden", bg: "neutral.white", children: [renderStatus(), _jsx(Image, { src: imageSource, alt: imageAlternativeText, h: "90px", w: "100%", objectFit: "cover" }), _jsxs(Stack, { spacing: "1", p: "base", borderBottom: "1px solid", borderColor: dividerColor, children: [_jsx(Text, { textTransform: "uppercase", fontWeight: "medium", children: customerTitle }), renderAddress()] }), _jsx(Flex, { h: "40px", p: "base", align: "center", justify: "space-between", children: _jsx(IconButton, { "aria-label": footerActionLabel !== null && footerActionLabel !== void 0 ? footerActionLabel : 'Save customer', variant: "icon", width: "fit-content", onClick: onFooterActionClick, children: _jsx(TicketBookmark, { boxSize: "5" }) }) })] }));
21
+ };
@@ -0,0 +1,2 @@
1
+ import { PartnerCustomersToolbarI } from '../../../interfaces';
2
+ export declare const PartnerCustomersToolbar: ({ ageItems, initialAge, initialDisplay, initialPriority, initialStatus, newCustomerLabel, onAgeChange, onDisplayChange, onNewCustomerClick, onPriorityChange, onStatusChange, priorityItems, showNewCustomerButton, statusItems, }: PartnerCustomersToolbarI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { PartnerEntityModuleToolbar } from '../entityModule';
3
+ export const PartnerCustomersToolbar = ({ ageItems, initialAge, initialDisplay = 'grid', initialPriority, initialStatus, newCustomerLabel = 'CUSTOMER', onAgeChange, onDisplayChange, onNewCustomerClick, onPriorityChange, onStatusChange, priorityItems, showNewCustomerButton = false, statusItems, }) => {
4
+ const filters = [
5
+ {
6
+ id: 'customer-age-filter',
7
+ items: ageItems,
8
+ initialValue: initialAge,
9
+ onChange: onAgeChange,
10
+ desktopFlex: '1 1 120px',
11
+ desktopMinW: '96px',
12
+ desktopMaxW: '140px',
13
+ },
14
+ {
15
+ id: 'customer-priority-filter',
16
+ items: priorityItems,
17
+ initialValue: initialPriority,
18
+ onChange: onPriorityChange,
19
+ desktopFlex: '1 1 120px',
20
+ desktopMinW: '96px',
21
+ desktopMaxW: '140px',
22
+ },
23
+ {
24
+ id: 'customer-status-filter',
25
+ items: statusItems,
26
+ initialValue: initialStatus,
27
+ onChange: onStatusChange,
28
+ desktopFlex: '1.4 1 160px',
29
+ desktopMinW: '120px',
30
+ desktopMaxW: '200px',
31
+ },
32
+ ];
33
+ return (_jsx(PartnerEntityModuleToolbar, { ariaLabel: "Customers toolbar", filters: filters, initialDisplay: initialDisplay, newItemButtonId: "addCustomerButton", newItemLabel: newCustomerLabel, onDisplayChange: onDisplayChange, onNewItemClick: onNewCustomerClick, showNewItemButton: showNewCustomerButton }));
34
+ };
@@ -0,0 +1,2 @@
1
+ import { PartnerCustomersWrapperI } from '../../../interfaces';
2
+ export declare const PartnerCustomersWrapper: ({ children, menuItems, onHelpClick, showHelp, title, titleIcon, tooltipLabel, }: PartnerCustomersWrapperI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BillingAddress } from '../../../assets/images';
3
+ import { PartnerEntityModuleWrapper } from '../entityModule';
4
+ export const PartnerCustomersWrapper = ({ children, menuItems = [], onHelpClick, showHelp = false, title = 'Customers', titleIcon = BillingAddress, tooltipLabel = 'Customers', }) => {
5
+ return (_jsx(PartnerEntityModuleWrapper, { title: title, titleIcon: titleIcon, tooltipLabel: tooltipLabel, menuItems: menuItems, onHelpClick: onHelpClick, showHelp: showHelp, children: children }));
6
+ };
@@ -0,0 +1,3 @@
1
+ export * from './PartnerCustomerCard';
2
+ export * from './PartnerCustomersToolbar';
3
+ export * from './PartnerCustomersWrapper';
@@ -0,0 +1,3 @@
1
+ export * from './PartnerCustomerCard';
2
+ export * from './PartnerCustomersToolbar';
3
+ export * from './PartnerCustomersWrapper';
@@ -0,0 +1,2 @@
1
+ import { PartnerEntityModuleToolbarI } from '../../../interfaces';
2
+ export declare const PartnerEntityModuleToolbar: ({ ariaLabel, filters, initialDisplay, newItemAriaLabel, newItemButtonId, newItemLabel, onDisplayChange, onNewItemClick, showNewItemButton, }: PartnerEntityModuleToolbarI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Button, Flex } from '@chakra-ui/react';
3
+ import { DisplayOptionsButtons, Plus, SelectInput } from '../../../components';
4
+ export const PartnerEntityModuleToolbar = ({ ariaLabel, filters, initialDisplay = 'grid', newItemAriaLabel, newItemButtonId = 'addEntityButton', newItemLabel = 'ADD', onDisplayChange, onNewItemClick, showNewItemButton = false, }) => {
5
+ const getValue = (item) => typeof item === 'string' ? item : String(item._id);
6
+ const getDefaultNewItemAriaLabel = () => {
7
+ const sanitizedLabel = newItemLabel.trim();
8
+ if (!sanitizedLabel.length) {
9
+ return 'Create item';
10
+ }
11
+ return `Create ${sanitizedLabel.toLowerCase()}`;
12
+ };
13
+ const buttonAriaLabel = newItemAriaLabel !== null && newItemAriaLabel !== void 0 ? newItemAriaLabel : getDefaultNewItemAriaLabel();
14
+ return (_jsx(Box, { p: "base", as: "section", "aria-label": ariaLabel, children: _jsxs(Flex, { align: { base: 'stretch', md: 'center' }, justify: "space-between", direction: { base: 'column', md: 'row' }, gap: "base", children: [_jsxs(Flex, { flex: "1", minW: "0", align: { base: 'stretch', md: 'center' }, direction: { base: 'column', md: 'row' }, gap: "base", children: [showNewItemButton && (_jsx(Box, { ml: "-base", flexShrink: 0, children: _jsx(Button, { id: newItemButtonId, size: "md", onClick: onNewItemClick, leftIcon: _jsx(Plus, {}), variant: "rightRounded", w: { base: '100%', sm: 'auto' }, "aria-label": buttonAriaLabel, children: newItemLabel }) })), _jsx(Flex, { flex: "1", minW: "0", gap: "base", wrap: { base: 'wrap', md: 'nowrap' }, align: "stretch", children: filters.map((filter) => {
15
+ var _a, _b, _c;
16
+ return (_jsx(Box, { flex: {
17
+ base: '1 1 100%',
18
+ md: (_a = filter.desktopFlex) !== null && _a !== void 0 ? _a : '1 1 120px',
19
+ }, minW: { base: '100%', md: (_b = filter.desktopMinW) !== null && _b !== void 0 ? _b : '96px' }, maxW: { md: (_c = filter.desktopMaxW) !== null && _c !== void 0 ? _c : '140px' }, children: _jsx(SelectInput, { height: "md", width: "100%", handleClick: (item) => filter.onChange(getValue(item)), items: filter.items, initialValue: filter.initialValue }) }, filter.id));
20
+ }) })] }), _jsx(Box, { alignSelf: { base: 'flex-end', md: 'center' }, flexShrink: 0, children: _jsx(DisplayOptionsButtons, { displays: ['list', 'grid'], initialDisplay: initialDisplay, onDisplayClick: onDisplayChange, iconSize: 6 }) })] }) }));
21
+ };
@@ -0,0 +1,2 @@
1
+ import { PartnerEntityModuleWrapperI } from '../../../interfaces';
2
+ export declare const PartnerEntityModuleWrapper: ({ children, contentMinHeight, menuItems, onHelpClick, showHelp, title, titleIcon, tooltipLabel, }: PartnerEntityModuleWrapperI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Container } from '@chakra-ui/react';
3
+ import { ContainerHeader, MoreHorizontal, TileTooltip } from '../../../components';
4
+ export const PartnerEntityModuleWrapper = ({ children, contentMinHeight = '420px', menuItems = [], onHelpClick, showHelp = false, title, titleIcon, tooltipLabel, }) => {
5
+ return (_jsx(TileTooltip, { label: tooltipLabel, children: _jsxs(Container, { variant: "launchpad", h: "full", maxW: "none", p: "0", position: "relative", overflow: "hidden", bg: "lightBlue.1", children: [_jsx(ContainerHeader, { title: title, titleIcon: titleIcon, icon: _jsx(MoreHorizontal, { size: 38 }), menuItems: menuItems, onHelpClick: onHelpClick, showHelp: showHelp, fontWeight: "normal" }), _jsx(Box, { minH: contentMinHeight, bg: "lightBlue.1", children: children })] }) }));
6
+ };
@@ -0,0 +1,2 @@
1
+ export * from './PartnerEntityModuleWrapper';
2
+ export * from './PartnerEntityModuleToolbar';
@@ -0,0 +1,2 @@
1
+ export * from './PartnerEntityModuleWrapper';
2
+ export * from './PartnerEntityModuleToolbar';
@@ -1,11 +1,13 @@
1
1
  export * from './adminTiles';
2
2
  export * from './charts';
3
3
  export * from './customPartnerTiles';
4
+ export * from './customers';
4
5
  export * from './catalog';
5
6
  export * from './formTile';
6
7
  export * from './panel';
7
8
  export * from './popup';
8
9
  export * from './serviceTickets';
10
+ export * from './entityModule';
9
11
  export * from './Fader';
10
12
  export * from './HeaderPartnerLogo';
11
13
  export * from './PartnerAddButton';
@@ -1,11 +1,13 @@
1
1
  export * from './adminTiles';
2
2
  export * from './charts';
3
3
  export * from './customPartnerTiles';
4
+ export * from './customers';
4
5
  export * from './catalog';
5
6
  export * from './formTile';
6
7
  export * from './panel';
7
8
  export * from './popup';
8
9
  export * from './serviceTickets';
10
+ export * from './entityModule';
9
11
  export * from './Fader';
10
12
  export * from './HeaderPartnerLogo';
11
13
  export * from './PartnerAddButton';
@@ -1,14 +1,34 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Button, Flex } from '@chakra-ui/react';
3
- import { DisplayOptionsButtons, Plus, SelectInput } from '../../../components';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { PartnerEntityModuleToolbar } from '../entityModule';
4
3
  export const PartnerServiceTicketsToolbar = ({ ageItems, initialAge, initialDisplay = 'grid', initialPriority, initialStatus, newTicketLabel = 'TICKET', onAgeChange, onDisplayChange, onNewTicketClick, onPriorityChange, onStatusChange, priorityItems, showNewTicketButton = false, statusItems, }) => {
5
- const getValue = (item) => typeof item === 'string' ? item : String(item._id);
6
- const getButtonAriaLabel = () => {
7
- const sanitizedLabel = newTicketLabel.trim();
8
- if (!sanitizedLabel.length) {
9
- return 'Create service ticket';
10
- }
11
- return `Create ${sanitizedLabel.toLowerCase()}`;
12
- };
13
- return (_jsx(Box, { p: "base", as: "section", "aria-label": "Service tickets toolbar", children: _jsxs(Flex, { align: { base: 'stretch', md: 'center' }, justify: "space-between", direction: { base: 'column', md: 'row' }, gap: "base", children: [_jsxs(Flex, { flex: "1", minW: "0", align: { base: 'stretch', md: 'center' }, direction: { base: 'column', md: 'row' }, gap: "base", children: [showNewTicketButton && (_jsx(Box, { ml: "-base", flexShrink: 0, children: _jsx(Button, { id: "addServiceTicketButton", size: "md", onClick: onNewTicketClick, leftIcon: _jsx(Plus, {}), variant: "rightRounded", w: { base: '100%', sm: 'auto' }, "aria-label": getButtonAriaLabel(), children: newTicketLabel }) })), _jsxs(Flex, { flex: "1", minW: "0", gap: "base", wrap: { base: 'wrap', md: 'nowrap' }, align: "stretch", children: [_jsx(Box, { flex: { base: '1 1 100%', md: '1 1 120px' }, minW: { base: '100%', md: '96px' }, maxW: { md: '140px' }, children: _jsx(SelectInput, { height: "md", width: "100%", handleClick: (item) => onAgeChange(getValue(item)), items: ageItems, initialValue: initialAge }) }), _jsx(Box, { flex: { base: '1 1 100%', md: '1 1 120px' }, minW: { base: '100%', md: '96px' }, maxW: { md: '140px' }, children: _jsx(SelectInput, { height: "md", width: "100%", handleClick: (item) => onPriorityChange(getValue(item)), items: priorityItems, initialValue: initialPriority }) }), _jsx(Box, { flex: { base: '1 1 100%', md: '1.4 1 160px' }, minW: { base: '100%', md: '120px' }, maxW: { md: '200px' }, children: _jsx(SelectInput, { height: "md", width: "100%", handleClick: (item) => onStatusChange(getValue(item)), items: statusItems, initialValue: initialStatus }) })] })] }), _jsx(Box, { alignSelf: { base: 'flex-end', md: 'center' }, flexShrink: 0, children: _jsx(DisplayOptionsButtons, { displays: ['list', 'grid'], initialDisplay: initialDisplay, onDisplayClick: onDisplayChange, iconSize: 6 }) })] }) }));
4
+ const filters = [
5
+ {
6
+ id: 'age-filter',
7
+ items: ageItems,
8
+ initialValue: initialAge,
9
+ onChange: onAgeChange,
10
+ desktopFlex: '1 1 120px',
11
+ desktopMinW: '96px',
12
+ desktopMaxW: '140px',
13
+ },
14
+ {
15
+ id: 'priority-filter',
16
+ items: priorityItems,
17
+ initialValue: initialPriority,
18
+ onChange: onPriorityChange,
19
+ desktopFlex: '1 1 120px',
20
+ desktopMinW: '96px',
21
+ desktopMaxW: '140px',
22
+ },
23
+ {
24
+ id: 'status-filter',
25
+ items: statusItems,
26
+ initialValue: initialStatus,
27
+ onChange: onStatusChange,
28
+ desktopFlex: '1.4 1 160px',
29
+ desktopMinW: '120px',
30
+ desktopMaxW: '200px',
31
+ },
32
+ ];
33
+ return (_jsx(PartnerEntityModuleToolbar, { ariaLabel: "Service tickets toolbar", filters: filters, initialDisplay: initialDisplay, newItemButtonId: "addServiceTicketButton", newItemLabel: newTicketLabel, onDisplayChange: onDisplayChange, onNewItemClick: onNewTicketClick, showNewItemButton: showNewTicketButton }));
14
34
  };
@@ -1,7 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Container } from '@chakra-ui/react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
3
2
  import { Manager } from '../../../assets/images';
4
- import { ContainerHeader, MoreHorizontal, TileTooltip } from '../../../components';
3
+ import { PartnerEntityModuleWrapper } from '../entityModule';
5
4
  export const PartnerServiceTicketsWrapper = ({ children, menuItems = [], onHelpClick, showHelp = false, title = 'Service Tickets', titleIcon = Manager, tooltipLabel = 'Service Tickets', }) => {
6
- return (_jsx(TileTooltip, { label: tooltipLabel, children: _jsxs(Container, { variant: "launchpad", h: "full", maxW: "none", p: "0", position: "relative", overflow: "hidden", bg: "lightBlue.1", children: [_jsx(ContainerHeader, { title: title, titleIcon: titleIcon, icon: _jsx(MoreHorizontal, { size: 38 }), menuItems: menuItems, onHelpClick: onHelpClick, showHelp: showHelp, fontWeight: "normal" }), _jsx(Box, { minH: "420px", bg: "lightBlue.1", children: children })] }) }));
5
+ return (_jsx(PartnerEntityModuleWrapper, { title: title, titleIcon: titleIcon, tooltipLabel: tooltipLabel, menuItems: menuItems, onHelpClick: onHelpClick, showHelp: showHelp, children: children }));
7
6
  };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPopup, AddPropertyRecords, Address, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AppliancesReceived, AssignableReceipts, BackendAlert, BackHeader, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ConfirmHomeDetails, ConfirmProperty, ConfirmPropertyBody, ConfirmPropertyFooter, ConfirmPropertyRecords, ContactList, ContactsContent, ContainerHeader, ControlledWizard, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EditItemName, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeAssistantTutorial, HomeAssistantWizardPanel, HomeAssistantWizardSteps, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeItemList, HomeItemManualInfo, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, HomieAddItems, HomiSms, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadApplianceAutofiler, LaunchpadAppliancePanel, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessageChatPanel, MessagePanel, MinimizedTiles, MonthlyCharge, MortgageInfo, MortgageInfoReadOnly, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewHomeDetails, NewPassword, NotBeChargedBanner, NotificationCard, Notifications, NotificationsPanel, NotificationsReminder, NpsScore, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerHomeHeader, PartnerImages, PartnerPanel, PartnerServiceCard, PartnerSidebarMenu, PasswordInput, PaymentBanner, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SearchItemLoader, SearchRecords, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, StartHomiSetup, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorDialog, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, VideoPlayer, VideoPlayerModal, ViewContactPanel, WeatherWidget, WellDone, WizardBodyPadding, WizardStepGoal, WizardSuccessHeader, WizardTextHeader, WizardValueSummary, WizardValueSummaryBody, WizardValueSummaryFooter, YtdTile, } from './components';
1
+ export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPopup, AddPropertyRecords, Address, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AppliancesReceived, AssignableReceipts, BackendAlert, BackHeader, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ConfirmHomeDetails, ConfirmProperty, ConfirmPropertyBody, ConfirmPropertyFooter, ConfirmPropertyRecords, ContactList, ContactsContent, ContainerHeader, ControlledWizard, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EditItemName, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeAssistantTutorial, HomeAssistantWizardPanel, HomeAssistantWizardSteps, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeItemList, HomeItemManualInfo, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, HomieAddItems, HomiSms, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadApplianceAutofiler, LaunchpadAppliancePanel, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessageChatPanel, MessagePanel, MinimizedTiles, MonthlyCharge, MortgageInfo, MortgageInfoReadOnly, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewHomeDetails, NewPassword, NotBeChargedBanner, NotificationCard, Notifications, NotificationsPanel, NotificationsReminder, NpsScore, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCard, PartnerCustomerCode, PartnerCustomersToolbar, PartnerCustomersWrapper, PartnerDetails, PartnerHomeHeader, PartnerImages, PartnerPanel, PartnerServiceCard, PartnerServiceTicketCard, PartnerServiceTicketsToolbar, PartnerServiceTicketsWrapper, PartnerSidebarMenu, PasswordInput, PaymentBanner, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SearchItemLoader, SearchRecords, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, StartHomiSetup, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorDialog, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, VideoPlayer, VideoPlayerModal, ViewContactPanel, WeatherWidget, WellDone, WizardBodyPadding, WizardStepGoal, WizardSuccessHeader, WizardTextHeader, WizardValueSummary, WizardValueSummaryBody, WizardValueSummaryFooter, YtdTile, } from './components';
2
2
  export { useCustomToast, useConfirmPropertyModel } from './hooks';
3
3
  export { randomColor, mapApiObjectToFormFields, mapForecastToWidget, } from './utils';
4
4
  export { Ambulance, CookTop, Contacts, GuestBedroom, MagnifyingGlassReport, Message, Messages, Register, Receipts, Price, BlueFolderShared, Calendar, Create, Notes, WallDecor, } from './assets/images';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPopup, AddPropertyRecords, Address, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AppliancesReceived, AssignableReceipts, BackendAlert, BackHeader, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ConfirmHomeDetails, ConfirmProperty, ConfirmPropertyBody, ConfirmPropertyFooter, ConfirmPropertyRecords, ContactList, ContactsContent, ContainerHeader, ControlledWizard, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EditItemName, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeAssistantTutorial, HomeAssistantWizardPanel, HomeAssistantWizardSteps, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeItemList, HomeItemManualInfo, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, HomieAddItems, HomiSms, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadApplianceAutofiler, LaunchpadAppliancePanel, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessageChatPanel, MessagePanel, MinimizedTiles, MonthlyCharge, MortgageInfo, MortgageInfoReadOnly, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewHomeDetails, NewPassword, NotBeChargedBanner, NotificationCard, Notifications, NotificationsPanel, NotificationsReminder, NpsScore, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCode, PartnerDetails, PartnerHomeHeader, PartnerImages, PartnerPanel, PartnerServiceCard, PartnerSidebarMenu, PasswordInput, PaymentBanner, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SearchItemLoader, SearchRecords, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, StartHomiSetup, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorDialog, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, VideoPlayer, VideoPlayerModal, ViewContactPanel, WeatherWidget, WellDone, WizardBodyPadding, WizardStepGoal, WizardSuccessHeader, WizardTextHeader, WizardValueSummary, WizardValueSummaryBody, WizardValueSummaryFooter, YtdTile, } from './components';
1
+ export { ActivateAccount, ActiveSubscription, AddCardBanner, AddEditContactPanel, AddFolder, AddHomeContent, AddHomeItem, AddHomeItemHeader, AddMedia, AddPopup, AddPropertyRecords, Address, AddTile, AddToHomefile, AlertBanner, AphwTile, AppBar, AppliancesReceived, AssignableReceipts, BackendAlert, BackHeader, BarDivider, CancelAccount, CatalogPopup, CloudsAnimation, ConfirmHomeDetails, ConfirmProperty, ConfirmPropertyBody, ConfirmPropertyFooter, ConfirmPropertyRecords, ContactList, ContactsContent, ContainerHeader, ControlledWizard, CreateDocumentHeader, CreateHouseholdItemHeader, CreditCardContainer, CreditCardError, CustomerTile, DeleteBanner, Dialog, DisplayFiles, DisplayFilesDetail, DisplayOptions, DisplayReceipts, DocumentMenu, DocumentNameHeader, DocumentPreview, DynamicForm, EditAccountType, EditHomeBody, EditHomeFooter, EditHomeHeader, EditHomePanel, EditItemName, EmailPermissions, EmailValidation, Feedback, FileDetail, FilesUploader, FlowStep, FolderDetail, FolderDetailBody, FolderDetailContent, FolderDetailFooter, FolderDetailHeader, FolderInfo, FolderSharing, FolderTypeSelection, FooterButtons, FooterDrawer, GenericBackHeader, GroupCard, GroupsContainer, GroupsHeader, Header, HelpContent, HomeAssistant, HomeAssistantPanel, HomeAssistantTutorial, HomeAssistantWizardPanel, HomeAssistantWizardSteps, HomeBoardGrid, HomeBoardTour, HomeCard, HomeCardWithRecipent, HomeDetailsContent, HomefileMonitoring, HomeHeader, HomeItemList, HomeItemManualInfo, HomeMonitor, HomeMonitorPanel, HomeMonitorSteps, HomeSharedWith, HomieAddItems, HomiSms, InboxForwardBanner, InboxTile, ItemFormPanel, ItemFormTabs, ItemNameHeader, ItemsReviewBanner, ItemSubTypeSelect, Launchpad, LaunchpadApplianceAutofiler, LaunchpadAppliancePanel, LaunchpadAutofilerBanner, LaunchpadReceiptAutofiler, LaunchpadReceiptPanel, LaunchpadTour, LeftPanel, Loading, MediaDetailsStep, MessageChatPanel, MessagePanel, MinimizedTiles, MonthlyCharge, MortgageInfo, MortgageInfoReadOnly, MoveModal, MyHomes, MyProfileBody, MyProfileContent, MyProfileFooter, MyProfileHeader, MyProfilePanel, NewCreditCard, NewCreditCardHeader, NewHomeDetails, NewPassword, NotBeChargedBanner, NotificationCard, Notifications, NotificationsPanel, NotificationsReminder, NpsScore, Overlay, PanelHeader, PartnerActiveSubscription, PartnerCatalogPanel, PartnerContent, PartnerCustomerCard, PartnerCustomerCode, PartnerCustomersToolbar, PartnerCustomersWrapper, PartnerDetails, PartnerHomeHeader, PartnerImages, PartnerPanel, PartnerServiceCard, PartnerServiceTicketCard, PartnerServiceTicketsToolbar, PartnerServiceTicketsWrapper, PartnerSidebarMenu, PasswordInput, PaymentBanner, PaymentReceipts, PdfButton, PeopleConnected, ProfileDetailsTab, ProfilePaymentTab, ProjectList, PropertyRecords, PropertyTaxes, ReadOnlyDynamicForm, ReadOnlyImage, ReadOnlyToggle, ReceiptAutofiler, ReceiptBody, ReceiptContent, ReceiptDetails, ReceiptFilters, ReceiptFooter, ReceiptHeader, ReceiptInfos, ReceiptItem, ReceiptItems, ReceiptPDF, ReceiptsDisplayOptions, ReceiptsFiled, ReceiptsHeader, ReceiptsInfo, ReceiptsReceivedContent, RecipientForm, RecipientsToShare, RecipientTab, RecordsInputs, ResendResetPassword, ResetPassword, ReviewBanner, RightPanel, RolePermissionsTab, RoomHeader, RoomsBoardTour, RoomsMenu, RoomsMenuMobile, RoomStep, RoomVideo, SalesTax, SatisfactionTile, SearchItemLoader, SearchRecords, SectionHeader, SendCommunication, ShareContactsContent, SharedAccounts, SharedHomeContent, SharedHomeHeader, ShareHome, ShareHomeConnections, ShareHomeForm, ShineTile, ShortPartnerTile, SignIn, SignUp, SkeletonBox, StartHomiSetup, StepHeader, StorageUsed, Subscription, SubscriptionCard, SubscriptionTable, Summary, TabsHeader, TextInput, ToBeDeletedBody, ToBeDeletedContent, ToBeDeletedFooter, ToBeDeletedHeader, TourButton, Trash, TrendingValue, TrialBanner, TutorialsButton, TwoFactor, TwoFactorDialog, TwoFactorSetting, UpdateList, UserDetails, ValueMonitor, VideoPlayer, VideoPlayerModal, ViewContactPanel, WeatherWidget, WellDone, WizardBodyPadding, WizardStepGoal, WizardSuccessHeader, WizardTextHeader, WizardValueSummary, WizardValueSummaryBody, WizardValueSummaryFooter, YtdTile, } from './components';
2
2
  export { useCustomToast, useConfirmPropertyModel } from './hooks';
3
3
  export { randomColor, mapApiObjectToFormFields, mapForecastToWidget, } from './utils';
4
4
  export { Ambulance, CookTop, Contacts, GuestBedroom, MagnifyingGlassReport, Message, Messages, Register, Receipts, Price, BlueFolderShared, Calendar, Create, Notes, WallDecor, } from './assets/images';
@@ -0,0 +1,12 @@
1
+ import { DisplayOptionsType } from '../../../interfaces';
2
+ export interface PartnerCustomerCardI {
3
+ addressLines?: string[];
4
+ customerName?: string;
5
+ display?: Extract<DisplayOptionsType, 'grid' | 'list'>;
6
+ footerActionLabel?: string;
7
+ imageAlt?: string;
8
+ imageSrc?: string;
9
+ onFooterActionClick?: () => void;
10
+ statusColor?: string;
11
+ statusLabel?: string;
12
+ }
@@ -0,0 +1,17 @@
1
+ import { DisplayOptionsType, SelectItemI } from '../../../interfaces';
2
+ export interface PartnerCustomersToolbarI {
3
+ ageItems: SelectItemI<string>[];
4
+ initialAge?: string;
5
+ initialDisplay?: DisplayOptionsType;
6
+ initialPriority?: string;
7
+ initialStatus?: string;
8
+ newCustomerLabel?: string;
9
+ onAgeChange: (value: string) => void;
10
+ onDisplayChange: (display: DisplayOptionsType) => void;
11
+ onNewCustomerClick?: () => void;
12
+ onPriorityChange: (value: string) => void;
13
+ onStatusChange: (value: string) => void;
14
+ priorityItems: SelectItemI<string>[];
15
+ showNewCustomerButton?: boolean;
16
+ statusItems: SelectItemI<string>[];
17
+ }
@@ -0,0 +1,6 @@
1
+ import { PartnerEntityModuleWrapperI } from '../../../interfaces';
2
+ export interface PartnerCustomersWrapperI extends Omit<PartnerEntityModuleWrapperI, 'title' | 'titleIcon' | 'tooltipLabel'> {
3
+ title?: string;
4
+ titleIcon?: string;
5
+ tooltipLabel?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ export * from './PartnerCustomerCard.interface';
2
+ export * from './PartnerCustomersToolbar.interface';
3
+ export * from './PartnerCustomersWrapper.interface';
@@ -0,0 +1,3 @@
1
+ export * from './PartnerCustomerCard.interface';
2
+ export * from './PartnerCustomersToolbar.interface';
3
+ export * from './PartnerCustomersWrapper.interface';
@@ -0,0 +1,21 @@
1
+ import { DisplayOptionsType, SelectItemI } from '../../../interfaces';
2
+ export interface PartnerEntityModuleToolbarFilterI {
3
+ desktopFlex?: string;
4
+ desktopMaxW?: string;
5
+ desktopMinW?: string;
6
+ id: string;
7
+ initialValue?: string;
8
+ items: SelectItemI<string>[];
9
+ onChange: (value: string) => void;
10
+ }
11
+ export interface PartnerEntityModuleToolbarI {
12
+ ariaLabel: string;
13
+ filters: PartnerEntityModuleToolbarFilterI[];
14
+ initialDisplay?: DisplayOptionsType;
15
+ newItemAriaLabel?: string;
16
+ newItemButtonId?: string;
17
+ newItemLabel?: string;
18
+ onDisplayChange: (display: DisplayOptionsType) => void;
19
+ onNewItemClick?: () => void;
20
+ showNewItemButton?: boolean;
21
+ }
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { MenuItemI } from '../../../interfaces';
3
+ export interface PartnerEntityModuleWrapperI {
4
+ children?: ReactNode;
5
+ contentMinHeight?: string;
6
+ menuItems?: MenuItemI[];
7
+ onHelpClick?: () => void;
8
+ showHelp?: boolean;
9
+ title: string;
10
+ titleIcon: string;
11
+ tooltipLabel: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ export * from './PartnerEntityModuleWrapper.interface';
2
+ export * from './PartnerEntityModuleToolbar.interface';
@@ -0,0 +1,2 @@
1
+ export * from './PartnerEntityModuleWrapper.interface';
2
+ export * from './PartnerEntityModuleToolbar.interface';
@@ -1,10 +1,12 @@
1
1
  export * from './adminTiles';
2
2
  export * from './catalog';
3
3
  export * from './charts';
4
+ export * from './customers';
4
5
  export * from './formTile';
5
6
  export * from './panel';
6
7
  export * from './popup';
7
8
  export * from './serviceTickets';
9
+ export * from './entityModule';
8
10
  export * from './PartnerSidebarMenu.interface';
9
11
  export * from './HeaderPartnerLogo.interface';
10
12
  export * from './PartnerCallToAction.interface';
@@ -1,10 +1,12 @@
1
1
  export * from './adminTiles';
2
2
  export * from './catalog';
3
3
  export * from './charts';
4
+ export * from './customers';
4
5
  export * from './formTile';
5
6
  export * from './panel';
6
7
  export * from './popup';
7
8
  export * from './serviceTickets';
9
+ export * from './entityModule';
8
10
  export * from './PartnerSidebarMenu.interface';
9
11
  export * from './HeaderPartnerLogo.interface';
10
12
  export * from './PartnerCallToAction.interface';
@@ -0,0 +1,5 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { PartnerCustomersWrapperI } from '../../interfaces';
3
+ declare const _default: Meta<PartnerCustomersWrapperI>;
4
+ export default _default;
5
+ export declare const PartnerCustomersWrapperComponent: (args: PartnerCustomersWrapperI) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,74 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { Box, Stack, Wrap, WrapItem } from '@chakra-ui/react';
4
+ import { action } from '@storybook/addon-actions';
5
+ import { PartnerCustomerCard, PartnerCustomersToolbar, PartnerCustomersWrapper, } from '../../components';
6
+ import { menuMock } from '../../mocks';
7
+ const ageItems = [
8
+ { _id: 'age', name: 'Age' },
9
+ { _id: 'newest', name: 'Newest' },
10
+ { _id: 'oldest', name: 'Oldest' },
11
+ ];
12
+ const priorityItems = [
13
+ { _id: 'priority', name: 'Priority' },
14
+ { _id: 'high', name: 'High' },
15
+ { _id: 'medium', name: 'Medium' },
16
+ { _id: 'low', name: 'Low' },
17
+ ];
18
+ const statusItems = [
19
+ { _id: 'show-all', name: 'Show All' },
20
+ { _id: 'dormant', name: 'Dormant' },
21
+ { _id: 'active', name: 'Active' },
22
+ { _id: 'cancelled', name: 'Cancelled' },
23
+ { _id: 'new', name: 'New' },
24
+ ];
25
+ const customers = [
26
+ {
27
+ customerName: 'Michael Smith',
28
+ statusLabel: 'Dormant',
29
+ statusColor: 'lightBlue.8',
30
+ addressLines: ['3273 S First Street', 'Austin, TX 78742'],
31
+ onFooterActionClick: action('onFooterActionClick'),
32
+ },
33
+ {
34
+ customerName: 'Michael Smith',
35
+ statusLabel: 'Active',
36
+ statusColor: 'green.2',
37
+ addressLines: ['3273 S First Street', 'Austin, TX 78742'],
38
+ onFooterActionClick: action('onFooterActionClick'),
39
+ },
40
+ {
41
+ customerName: 'Michael Smith',
42
+ statusLabel: 'Cancelled',
43
+ statusColor: 'orange.2',
44
+ addressLines: ['3273 S First Street', 'Austin, TX 78742'],
45
+ onFooterActionClick: action('onFooterActionClick'),
46
+ },
47
+ {
48
+ customerName: 'Michael Smith',
49
+ statusLabel: 'New',
50
+ statusColor: 'violet.1',
51
+ addressLines: ['3273 S First Street', 'Austin, TX 78742'],
52
+ onFooterActionClick: action('onFooterActionClick'),
53
+ },
54
+ ];
55
+ export default {
56
+ title: 'Components/Partner/Customers',
57
+ component: PartnerCustomersWrapper,
58
+ args: {
59
+ menuItems: menuMock,
60
+ showHelp: true,
61
+ onHelpClick: action('onHelpClick'),
62
+ },
63
+ };
64
+ export const PartnerCustomersWrapperComponent = (args) => {
65
+ const [displayType, setDisplayType] = useState('grid');
66
+ const handleDisplayChange = (display) => {
67
+ if (display === 'grid' || display === 'list') {
68
+ setDisplayType(display);
69
+ }
70
+ action('onDisplayChange')(display);
71
+ };
72
+ const isListDisplay = displayType === 'list';
73
+ return (_jsx(Box, { p: ['0', 'base'], children: _jsxs(PartnerCustomersWrapper, Object.assign({}, args, { children: [_jsx(PartnerCustomersToolbar, { ageItems: ageItems, priorityItems: priorityItems, statusItems: statusItems, initialAge: "Age", initialPriority: "Priority", initialStatus: "Show All", initialDisplay: displayType, showNewCustomerButton: true, onAgeChange: action('onAgeChange'), onDisplayChange: handleDisplayChange, onNewCustomerClick: action('onNewCustomerClick'), onPriorityChange: action('onPriorityChange'), onStatusChange: action('onStatusChange') }), isListDisplay && (_jsx(Stack, { spacing: "base", p: "base", children: customers.map((customer) => (_jsx(PartnerCustomerCard, Object.assign({}, customer, { display: "list" }), `${customer.customerName}-${customer.statusLabel}`))) })), !isListDisplay && (_jsx(Wrap, { spacing: "base", p: "base", align: "start", w: "100%", children: customers.map((customer) => (_jsx(WrapItem, { children: _jsx(PartnerCustomerCard, Object.assign({}, customer, { display: "grid" })) }, `${customer.customerName}-${customer.statusLabel}`))) }))] })) }));
74
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.48.2",
3
+ "version": "2.49.1",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",