@gusto/embedded-react-sdk 0.27.0 → 0.28.0
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/CHANGELOG.md +33 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +4 -2
- package/dist/components/Common/DataView/DataCards/DataCards.js +52 -32
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +3 -2
- package/dist/components/Common/DataView/DataTable/DataTable.js +68 -53
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +4 -2
- package/dist/components/Common/DataView/DataView.js +28 -18
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +6 -1
- package/dist/components/Common/DataView/useDataView.js +34 -19
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Card/Card.d.ts +1 -1
- package/dist/components/Common/UI/Card/Card.js +10 -20
- package/dist/components/Common/UI/Card/Card.js.map +1 -1
- package/dist/components/Common/UI/Card/CardTypes.d.ts +4 -4
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -18
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/i18n/en/InformationRequests.InformationRequestList.json.js +18 -16
- package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -1
- package/dist/types/i18next.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.28.0
|
|
4
|
+
|
|
5
|
+
### Features & Enhancements
|
|
6
|
+
|
|
7
|
+
- Extend DataTable for radio selection mode
|
|
8
|
+
- Update InformationRequests empty state title and remove description
|
|
9
|
+
|
|
10
|
+
### Breaking changes
|
|
11
|
+
|
|
12
|
+
#### Card component adapter (selection props)
|
|
13
|
+
|
|
14
|
+
If you supply a custom **Card** via the [component adapter](./docs/component-adapter/component-adapter.md), update it to use the new API: the Card no longer receives `onSelect`. Selection UI (checkbox or radio) is now passed as the `action` prop.
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
// Before: Card received onSelect and rendered its own checkbox
|
|
18
|
+
Card: ({ children, menu, className, onSelect }) => (
|
|
19
|
+
<div className={className}>
|
|
20
|
+
{onSelect && <input type="checkbox" onChange={e => onSelect(e.target.checked)} />}
|
|
21
|
+
{children}
|
|
22
|
+
{menu}
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
// After: Card receives pre-rendered selection UI via action
|
|
27
|
+
Card: ({ children, menu, className, action }) => (
|
|
28
|
+
<div className={className}>
|
|
29
|
+
{action}
|
|
30
|
+
{children}
|
|
31
|
+
{menu}
|
|
32
|
+
</div>
|
|
33
|
+
)
|
|
34
|
+
```
|
|
35
|
+
|
|
3
36
|
## 0.27.0
|
|
4
37
|
|
|
5
38
|
### Features & Enhancements
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { useDataViewPropReturn } from '../useDataView';
|
|
1
|
+
import { useDataViewPropReturn, SelectionMode } from '../useDataView';
|
|
2
2
|
export type DataCardsProps<T> = {
|
|
3
3
|
columns: useDataViewPropReturn<T>['columns'];
|
|
4
4
|
data: useDataViewPropReturn<T>['data'];
|
|
5
5
|
itemMenu?: useDataViewPropReturn<T>['itemMenu'];
|
|
6
6
|
onSelect?: useDataViewPropReturn<T>['onSelect'];
|
|
7
|
+
isItemSelected?: useDataViewPropReturn<T>['isItemSelected'];
|
|
7
8
|
emptyState?: useDataViewPropReturn<T>['emptyState'];
|
|
8
9
|
footer?: useDataViewPropReturn<T>['footer'];
|
|
10
|
+
selectionMode?: SelectionMode;
|
|
9
11
|
};
|
|
10
|
-
export declare const DataCards: <T>({ data, columns, itemMenu, onSelect, emptyState, footer, }: DataCardsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const DataCards: <T>({ data, columns, itemMenu, onSelect, isItemSelected, emptyState, footer, selectionMode, }: DataCardsProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,41 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useId as g } from "react";
|
|
3
|
+
import { useTranslation as x } from "react-i18next";
|
|
4
|
+
import s from "./DataCards.module.scss.js";
|
|
5
|
+
import { Flex as L } from "../../Flex/Flex.js";
|
|
6
|
+
import { useComponentContext as N } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
+
const H = ({
|
|
8
|
+
data: d,
|
|
9
|
+
columns: p,
|
|
10
|
+
itemMenu: c,
|
|
11
|
+
onSelect: o,
|
|
12
|
+
isItemSelected: f,
|
|
13
|
+
emptyState: m,
|
|
14
|
+
footer: h,
|
|
15
|
+
selectionMode: C = "multiple"
|
|
12
16
|
}) => {
|
|
13
|
-
const i = v()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
i.
|
|
17
|
+
const i = N(), { t: u } = x("common"), v = g(), b = (e, t) => {
|
|
18
|
+
if (!o) return;
|
|
19
|
+
const r = f?.(e, t) ?? !1;
|
|
20
|
+
return C === "single" ? /* @__PURE__ */ l(
|
|
21
|
+
i.Radio,
|
|
18
22
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
" ",
|
|
27
|
-
e.render ? e.render(t) : String(t[e.key])
|
|
28
|
-
] })
|
|
29
|
-
] }, p))
|
|
23
|
+
name: v,
|
|
24
|
+
value: r,
|
|
25
|
+
onChange: () => {
|
|
26
|
+
o(e, !0);
|
|
27
|
+
},
|
|
28
|
+
label: u("card.selectRowLabel"),
|
|
29
|
+
shouldVisuallyHideLabel: !0
|
|
30
30
|
}
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
) : /* @__PURE__ */ l(
|
|
32
|
+
i.Checkbox,
|
|
33
|
+
{
|
|
34
|
+
value: r,
|
|
35
|
+
onChange: (n) => {
|
|
36
|
+
o(e, n);
|
|
37
|
+
},
|
|
38
|
+
label: u("card.selectRowLabel"),
|
|
39
|
+
shouldVisuallyHideLabel: !0
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ a("div", { role: "list", "data-testid": "data-cards", children: [
|
|
44
|
+
d.length === 0 && m && /* @__PURE__ */ l("div", { role: "listitem", children: /* @__PURE__ */ l(i.Card, { children: m() }) }),
|
|
45
|
+
d.map((e, t) => /* @__PURE__ */ l("div", { role: "listitem", children: /* @__PURE__ */ l(i.Card, { menu: c && c(e), action: b(e, t), children: p.map((r, n) => /* @__PURE__ */ a(L, { flexDirection: "column", gap: 0, children: [
|
|
46
|
+
r.title && /* @__PURE__ */ l("h5", { className: s.columnTitle, children: r.title }),
|
|
47
|
+
/* @__PURE__ */ a("div", { className: s.columnData, children: [
|
|
48
|
+
" ",
|
|
49
|
+
r.render ? r.render(e) : String(e[r.key])
|
|
50
|
+
] })
|
|
51
|
+
] }, n)) }) }, t)),
|
|
52
|
+
h && /* @__PURE__ */ l("div", { role: "listitem", children: /* @__PURE__ */ l(i.Card, { children: (() => {
|
|
53
|
+
const e = h();
|
|
54
|
+
return Object.entries(e).map(([t, r]) => /* @__PURE__ */ l("div", { className: s.footerItem, children: r }, t));
|
|
35
55
|
})() }) })
|
|
36
56
|
] });
|
|
37
57
|
};
|
|
38
58
|
export {
|
|
39
|
-
|
|
59
|
+
H as DataCards
|
|
40
60
|
};
|
|
41
61
|
//# sourceMappingURL=DataCards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataCards.js","sources":["../../../../../src/components/Common/DataView/DataCards/DataCards.tsx"],"sourcesContent":["import styles from './DataCards.module.scss'\nimport type { useDataViewPropReturn } from '@/components/Common/DataView/useDataView'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataCardsProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n}\n\nexport const DataCards = <T,>({\n data,\n columns,\n itemMenu,\n onSelect,\n emptyState,\n footer,\n}: DataCardsProps<T>) => {\n const Components = useComponentContext()\n return (\n <div role=\"list\" data-testid=\"data-cards\">\n {data.length === 0 && emptyState && (\n <div role=\"listitem\">\n <Components.Card>{emptyState()}</Components.Card>\n </div>\n )}\n {data.map((item, index) => (\n <div role=\"listitem\" key={index}>\n <Components.Card
|
|
1
|
+
{"version":3,"file":"DataCards.js","sources":["../../../../../src/components/Common/DataView/DataCards/DataCards.tsx"],"sourcesContent":["import { useId } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport styles from './DataCards.module.scss'\nimport type { useDataViewPropReturn, SelectionMode } from '@/components/Common/DataView/useDataView'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataCardsProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n isItemSelected?: useDataViewPropReturn<T>['isItemSelected']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n selectionMode?: SelectionMode\n}\n\nexport const DataCards = <T,>({\n data,\n columns,\n itemMenu,\n onSelect,\n isItemSelected,\n emptyState,\n footer,\n selectionMode = 'multiple',\n}: DataCardsProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const radioGroupName = useId()\n\n const renderAction = (item: T, index: number) => {\n if (!onSelect) return undefined\n\n const isSelected = isItemSelected?.(item, index) ?? false\n\n if (selectionMode === 'single') {\n return (\n <Components.Radio\n name={radioGroupName}\n value={isSelected}\n onChange={() => {\n onSelect(item, true)\n }}\n label={t('card.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n return (\n <Components.Checkbox\n value={isSelected}\n onChange={(checked: boolean) => {\n onSelect(item, checked)\n }}\n label={t('card.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n return (\n <div role=\"list\" data-testid=\"data-cards\">\n {data.length === 0 && emptyState && (\n <div role=\"listitem\">\n <Components.Card>{emptyState()}</Components.Card>\n </div>\n )}\n {data.map((item, index) => (\n <div role=\"listitem\" key={index}>\n <Components.Card menu={itemMenu && itemMenu(item)} action={renderAction(item, index)}>\n {columns.map((column, colIndex) => (\n <Flex key={colIndex} flexDirection=\"column\" gap={0}>\n {column.title && <h5 className={styles.columnTitle}>{column.title}</h5>}\n <div className={styles.columnData}>\n {' '}\n {column.render ? column.render(item) : String(item[column.key as keyof T])}\n </div>\n </Flex>\n ))}\n </Components.Card>\n </div>\n ))}\n {footer && (\n <div role=\"listitem\">\n <Components.Card>\n {(() => {\n const footerContent = footer()\n\n return Object.entries(footerContent).map(([key, content]) => (\n <div key={key} className={styles.footerItem}>\n {content}\n </div>\n ))\n })()}\n </Components.Card>\n </div>\n )}\n </div>\n )\n}\n"],"names":["DataCards","data","columns","itemMenu","onSelect","isItemSelected","emptyState","footer","selectionMode","Components","useComponentContext","t","useTranslation","radioGroupName","useId","renderAction","item","index","isSelected","jsx","checked","jsxs","column","colIndex","Flex","styles","footerContent","key","content"],"mappings":";;;;;;AAkBO,MAAMA,IAAY,CAAK;AAAA,EAC5B,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC,IAAgB;AAClB,MAAyB;AACvB,QAAMC,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAiBC,EAAA,GAEjBC,IAAe,CAACC,GAASC,MAAkB;AAC/C,QAAI,CAACb,EAAU;AAEf,UAAMc,IAAab,IAAiBW,GAAMC,CAAK,KAAK;AAEpD,WAAIT,MAAkB,WAElB,gBAAAW;AAAA,MAACV,EAAW;AAAA,MAAX;AAAA,QACC,MAAMI;AAAA,QACN,OAAOK;AAAA,QACP,UAAU,MAAM;AACd,UAAAd,EAASY,GAAM,EAAI;AAAA,QACrB;AAAA,QACA,OAAOL,EAAE,qBAAqB;AAAA,QAC9B,yBAAuB;AAAA,MAAA;AAAA,IAAA,IAM3B,gBAAAQ;AAAA,MAACV,EAAW;AAAA,MAAX;AAAA,QACC,OAAOS;AAAA,QACP,UAAU,CAACE,MAAqB;AAC9B,UAAAhB,EAASY,GAAMI,CAAO;AAAA,QACxB;AAAA,QACA,OAAOT,EAAE,qBAAqB;AAAA,QAC9B,yBAAuB;AAAA,MAAA;AAAA,IAAA;AAAA,EAG7B;AAEA,SACE,gBAAAU,EAAC,OAAA,EAAI,MAAK,QAAO,eAAY,cAC1B,UAAA;AAAA,IAAApB,EAAK,WAAW,KAAKK,KACpB,gBAAAa,EAAC,OAAA,EAAI,MAAK,YACR,UAAA,gBAAAA,EAACV,EAAW,MAAX,EAAiB,UAAAH,EAAA,GAAa,GACjC;AAAA,IAEDL,EAAK,IAAI,CAACe,GAAMC,MACf,gBAAAE,EAAC,OAAA,EAAI,MAAK,YACR,UAAA,gBAAAA,EAACV,EAAW,MAAX,EAAgB,MAAMN,KAAYA,EAASa,CAAI,GAAG,QAAQD,EAAaC,GAAMC,CAAK,GAChF,UAAAf,EAAQ,IAAI,CAACoB,GAAQC,MACpB,gBAAAF,EAACG,GAAA,EAAoB,eAAc,UAAS,KAAK,GAC9C,UAAA;AAAA,MAAAF,EAAO,SAAS,gBAAAH,EAAC,MAAA,EAAG,WAAWM,EAAO,aAAc,YAAO,MAAA,CAAM;AAAA,MAClE,gBAAAJ,EAAC,OAAA,EAAI,WAAWI,EAAO,YACpB,UAAA;AAAA,QAAA;AAAA,QACAH,EAAO,SAASA,EAAO,OAAON,CAAI,IAAI,OAAOA,EAAKM,EAAO,GAAc,CAAC;AAAA,MAAA,EAAA,CAC3E;AAAA,IAAA,EAAA,GALSC,CAMX,CACD,EAAA,CACH,EAAA,GAXwBN,CAY1B,CACD;AAAA,IACAV,uBACE,OAAA,EAAI,MAAK,YACR,UAAA,gBAAAY,EAACV,EAAW,MAAX,EACG,WAAA,MAAM;AACN,YAAMiB,IAAgBnB,EAAA;AAEtB,aAAO,OAAO,QAAQmB,CAAa,EAAE,IAAI,CAAC,CAACC,GAAKC,CAAO,wBACpD,OAAA,EAAc,WAAWH,EAAO,YAC9B,UAAAG,EAAA,GADOD,CAEV,CACD;AAAA,IACH,GAAA,GACF,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useDataViewPropReturn } from '../useDataView';
|
|
1
|
+
import { useDataViewPropReturn, SelectionMode } from '../useDataView';
|
|
2
2
|
import { TableProps } from '../../UI/Table/TableTypes';
|
|
3
3
|
export type DataTableProps<T> = {
|
|
4
4
|
label: string;
|
|
@@ -9,5 +9,6 @@ export type DataTableProps<T> = {
|
|
|
9
9
|
emptyState?: useDataViewPropReturn<T>['emptyState'];
|
|
10
10
|
footer?: useDataViewPropReturn<T>['footer'];
|
|
11
11
|
variant?: TableProps['variant'];
|
|
12
|
+
selectionMode?: SelectionMode;
|
|
12
13
|
};
|
|
13
|
-
export declare const DataTable: <T>({ label, data, columns, itemMenu, onSelect, emptyState, footer, variant, }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const DataTable: <T>({ label, data, columns, itemMenu, onSelect, emptyState, footer, variant, selectionMode, }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,63 +1,78 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
import { useId as v, useState as x } from "react";
|
|
3
|
+
import { useTranslation as T } from "react-i18next";
|
|
4
|
+
import { useComponentContext as V } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
|
+
import { VisuallyHidden as p } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
6
|
+
function w(i, o) {
|
|
7
|
+
if (o.render)
|
|
8
|
+
return o.render(i);
|
|
9
|
+
if (o.key) {
|
|
10
|
+
const a = o.key;
|
|
11
|
+
return String(i[a] ?? "");
|
|
11
12
|
}
|
|
12
13
|
return "";
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
-
label:
|
|
16
|
-
data:
|
|
17
|
-
columns:
|
|
15
|
+
const q = ({
|
|
16
|
+
label: i,
|
|
17
|
+
data: o,
|
|
18
|
+
columns: a,
|
|
18
19
|
itemMenu: c,
|
|
19
|
-
onSelect:
|
|
20
|
-
emptyState:
|
|
21
|
-
footer:
|
|
22
|
-
variant: b
|
|
20
|
+
onSelect: n,
|
|
21
|
+
emptyState: f,
|
|
22
|
+
footer: k,
|
|
23
|
+
variant: b,
|
|
24
|
+
selectionMode: h = "multiple"
|
|
23
25
|
}) => {
|
|
24
|
-
const
|
|
25
|
-
...
|
|
26
|
+
const u = V(), { t: d } = T("common"), C = v(), [g, m] = x(null), R = [
|
|
27
|
+
...n ? [
|
|
26
28
|
{
|
|
27
29
|
key: "select-header",
|
|
28
|
-
content: /* @__PURE__ */ l(
|
|
30
|
+
content: /* @__PURE__ */ l(p, { children: d("table.selectRowHeader") })
|
|
29
31
|
}
|
|
30
32
|
] : [],
|
|
31
|
-
...
|
|
33
|
+
...a.map((t, e) => ({
|
|
32
34
|
key: typeof t.key == "string" ? t.key : `header-${e}`,
|
|
33
35
|
content: t.title
|
|
34
36
|
})),
|
|
35
37
|
...c ? [
|
|
36
38
|
{
|
|
37
39
|
key: "actions-header",
|
|
38
|
-
content: /* @__PURE__ */ l(
|
|
40
|
+
content: /* @__PURE__ */ l(p, { children: d("table.actionsColumnHeader") })
|
|
39
41
|
}
|
|
40
42
|
] : []
|
|
41
|
-
],
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
], $ = (t, e) => {
|
|
44
|
+
m(e), n?.(t, !0);
|
|
45
|
+
}, D = (t, e) => h === "single" ? /* @__PURE__ */ l(
|
|
46
|
+
u.Radio,
|
|
47
|
+
{
|
|
48
|
+
name: C,
|
|
49
|
+
value: g === e,
|
|
50
|
+
onChange: () => {
|
|
51
|
+
$(t, e);
|
|
52
|
+
},
|
|
53
|
+
label: d("table.selectRowLabel"),
|
|
54
|
+
shouldVisuallyHideLabel: !0
|
|
55
|
+
}
|
|
56
|
+
) : /* @__PURE__ */ l(
|
|
57
|
+
u.Checkbox,
|
|
58
|
+
{
|
|
59
|
+
onChange: (r) => {
|
|
60
|
+
n?.(t, r);
|
|
61
|
+
},
|
|
62
|
+
label: d("table.selectRowLabel"),
|
|
63
|
+
shouldVisuallyHideLabel: !0
|
|
64
|
+
}
|
|
65
|
+
), H = o.map((t, e) => {
|
|
66
|
+
const r = [
|
|
67
|
+
...n ? [
|
|
44
68
|
{
|
|
45
69
|
key: `select-${e}`,
|
|
46
|
-
content:
|
|
47
|
-
p.Checkbox,
|
|
48
|
-
{
|
|
49
|
-
onChange: (o) => {
|
|
50
|
-
a(t, o);
|
|
51
|
-
},
|
|
52
|
-
label: k("table.selectRowLabel"),
|
|
53
|
-
shouldVisuallyHideLabel: !0
|
|
54
|
-
}
|
|
55
|
-
)
|
|
70
|
+
content: D(t, e)
|
|
56
71
|
}
|
|
57
72
|
] : [],
|
|
58
|
-
...
|
|
59
|
-
key: typeof
|
|
60
|
-
content:
|
|
73
|
+
...a.map((s, y) => ({
|
|
74
|
+
key: typeof s.key == "string" ? s.key : `cell-${y}`,
|
|
75
|
+
content: w(t, s)
|
|
61
76
|
})),
|
|
62
77
|
...c ? [
|
|
63
78
|
{
|
|
@@ -68,16 +83,16 @@ const F = ({
|
|
|
68
83
|
];
|
|
69
84
|
return {
|
|
70
85
|
key: `row-${e}`,
|
|
71
|
-
data:
|
|
86
|
+
data: r
|
|
72
87
|
};
|
|
73
|
-
}),
|
|
74
|
-
if (!
|
|
75
|
-
const t =
|
|
76
|
-
return
|
|
88
|
+
}), L = (() => {
|
|
89
|
+
if (!k) return;
|
|
90
|
+
const t = k(), e = [];
|
|
91
|
+
return n && e.push({
|
|
77
92
|
key: "footer-select",
|
|
78
93
|
content: ""
|
|
79
|
-
}),
|
|
80
|
-
const y = typeof
|
|
94
|
+
}), a.forEach((r, s) => {
|
|
95
|
+
const y = typeof r.key == "string" ? r.key : `column-${s}`;
|
|
81
96
|
e.push({
|
|
82
97
|
key: `footer-${y}`,
|
|
83
98
|
content: t[y] || ""
|
|
@@ -88,20 +103,20 @@ const F = ({
|
|
|
88
103
|
}), e;
|
|
89
104
|
})();
|
|
90
105
|
return /* @__PURE__ */ l(
|
|
91
|
-
|
|
106
|
+
u.Table,
|
|
92
107
|
{
|
|
93
|
-
"aria-label":
|
|
108
|
+
"aria-label": i,
|
|
94
109
|
"data-testid": "data-table",
|
|
95
|
-
headers:
|
|
96
|
-
rows:
|
|
97
|
-
footer:
|
|
98
|
-
emptyState:
|
|
110
|
+
headers: R,
|
|
111
|
+
rows: H,
|
|
112
|
+
footer: L,
|
|
113
|
+
emptyState: f ? f() : void 0,
|
|
99
114
|
variant: b,
|
|
100
|
-
hasCheckboxColumn: !!
|
|
115
|
+
hasCheckboxColumn: !!n
|
|
101
116
|
}
|
|
102
117
|
);
|
|
103
118
|
};
|
|
104
119
|
export {
|
|
105
|
-
|
|
120
|
+
q as DataTable
|
|
106
121
|
};
|
|
107
122
|
//# sourceMappingURL=DataTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.js","sources":["../../../../../src/components/Common/DataView/DataTable/DataTable.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { useDataViewPropReturn } from '../useDataView'\nimport type { TableData, TableRow, TableProps } from '../../UI/Table/TableTypes'\nimport { VisuallyHidden } from '../../VisuallyHidden'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataTableProps<T> = {\n label: string\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n variant?: TableProps['variant']\n}\n\nfunction getCellContent<T>(\n item: T,\n column: { key?: string | keyof T; render?: (item: T) => React.ReactNode },\n) {\n if (column.render) {\n return column.render(item)\n }\n\n if (column.key) {\n const key = column.key as keyof T\n return String(item[key] ?? '')\n }\n\n return ''\n}\n\nexport const DataTable = <T,>({\n label,\n data,\n columns,\n itemMenu,\n onSelect,\n emptyState,\n footer,\n variant,\n}: DataTableProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n\n const headers: TableData[] = [\n ...(onSelect\n ? [\n {\n key: 'select-header',\n content: <VisuallyHidden>{t('table.selectRowHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ...columns.map((column, index) => ({\n key: typeof column.key === 'string' ? column.key : `header-${index}`,\n content: column.title,\n })),\n ...(itemMenu\n ? [\n {\n key: 'actions-header',\n content: <VisuallyHidden>{t('table.actionsColumnHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ]\n\n const
|
|
1
|
+
{"version":3,"file":"DataTable.js","sources":["../../../../../src/components/Common/DataView/DataTable/DataTable.tsx"],"sourcesContent":["import { useId, useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport type { useDataViewPropReturn, SelectionMode } from '../useDataView'\nimport type { TableData, TableRow, TableProps } from '../../UI/Table/TableTypes'\nimport { VisuallyHidden } from '../../VisuallyHidden'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataTableProps<T> = {\n label: string\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n variant?: TableProps['variant']\n selectionMode?: SelectionMode\n}\n\nfunction getCellContent<T>(\n item: T,\n column: { key?: string | keyof T; render?: (item: T) => React.ReactNode },\n) {\n if (column.render) {\n return column.render(item)\n }\n\n if (column.key) {\n const key = column.key as keyof T\n return String(item[key] ?? '')\n }\n\n return ''\n}\n\nexport const DataTable = <T,>({\n label,\n data,\n columns,\n itemMenu,\n onSelect,\n emptyState,\n footer,\n variant,\n selectionMode = 'multiple',\n}: DataTableProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const radioGroupName = useId()\n const [selectedRadioIndex, setSelectedRadioIndex] = useState<number | null>(null)\n\n const headers: TableData[] = [\n ...(onSelect\n ? [\n {\n key: 'select-header',\n content: <VisuallyHidden>{t('table.selectRowHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ...columns.map((column, index) => ({\n key: typeof column.key === 'string' ? column.key : `header-${index}`,\n content: column.title,\n })),\n ...(itemMenu\n ? [\n {\n key: 'actions-header',\n content: <VisuallyHidden>{t('table.actionsColumnHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ]\n\n const handleRadioSelect = (item: T, rowIndex: number) => {\n setSelectedRadioIndex(rowIndex)\n onSelect?.(item, true)\n }\n\n const renderSelectionControl = (item: T, rowIndex: number) => {\n if (selectionMode === 'single') {\n return (\n <Components.Radio\n name={radioGroupName}\n value={selectedRadioIndex === rowIndex}\n onChange={() => {\n handleRadioSelect(item, rowIndex)\n }}\n label={t('table.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n return (\n <Components.Checkbox\n onChange={(checked: boolean) => {\n onSelect?.(item, checked)\n }}\n label={t('table.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n )\n }\n\n const rows: TableRow[] = data.map((item, rowIndex) => {\n const rowData: TableData[] = [\n ...(onSelect\n ? [\n {\n key: `select-${rowIndex}`,\n content: renderSelectionControl(item, rowIndex),\n },\n ]\n : []),\n ...columns.map((column, colIndex) => {\n return {\n key: typeof column.key === 'string' ? column.key : `cell-${colIndex}`,\n content: getCellContent(item, column),\n }\n }),\n ...(itemMenu\n ? [\n {\n key: `menu-${rowIndex}`,\n content: itemMenu(item),\n },\n ]\n : []),\n ]\n\n return {\n key: `row-${rowIndex}`,\n data: rowData,\n }\n })\n\n const buildFooterData = () => {\n if (!footer) return undefined\n\n const footerContent = footer()\n const footerCells: TableData[] = []\n\n // Add select column footer (empty)\n if (onSelect) {\n footerCells.push({\n key: 'footer-select',\n content: '',\n })\n }\n\n // Add data column footers\n columns.forEach((column, index) => {\n const columnKey = typeof column.key === 'string' ? column.key : `column-${index}`\n footerCells.push({\n key: `footer-${columnKey}`,\n content: footerContent[columnKey] || '',\n })\n })\n\n // Add actions column footer (empty)\n if (itemMenu) {\n footerCells.push({\n key: 'footer-actions',\n content: '',\n })\n }\n\n return footerCells\n }\n\n const footerData = buildFooterData()\n\n return (\n <Components.Table\n aria-label={label}\n data-testid=\"data-table\"\n headers={headers}\n rows={rows}\n footer={footerData}\n emptyState={emptyState ? emptyState() : undefined}\n variant={variant}\n hasCheckboxColumn={!!onSelect}\n />\n )\n}\n"],"names":["getCellContent","item","column","key","DataTable","label","data","columns","itemMenu","onSelect","emptyState","footer","variant","selectionMode","Components","useComponentContext","t","useTranslation","radioGroupName","useId","selectedRadioIndex","setSelectedRadioIndex","useState","headers","jsx","VisuallyHidden","index","handleRadioSelect","rowIndex","renderSelectionControl","checked","rows","rowData","colIndex","footerData","footerContent","footerCells","columnKey"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableProps } from '../UI/Table/TableTypes';
|
|
2
|
-
import { useDataViewPropReturn } from './useDataView';
|
|
2
|
+
import { useDataViewPropReturn, SelectionMode } from './useDataView';
|
|
3
3
|
import { useContainerBreakpointsProps } from '../../../hooks/useContainerBreakpoints/useContainerBreakpoints';
|
|
4
4
|
export type DataViewProps<T> = {
|
|
5
5
|
columns: useDataViewPropReturn<T>['columns'];
|
|
@@ -8,11 +8,13 @@ export type DataViewProps<T> = {
|
|
|
8
8
|
label: string;
|
|
9
9
|
itemMenu?: useDataViewPropReturn<T>['itemMenu'];
|
|
10
10
|
onSelect?: useDataViewPropReturn<T>['onSelect'];
|
|
11
|
+
isItemSelected?: useDataViewPropReturn<T>['isItemSelected'];
|
|
11
12
|
breakAt?: string;
|
|
12
13
|
breakpoints?: useContainerBreakpointsProps['breakpoints'];
|
|
13
14
|
footer?: useDataViewPropReturn<T>['footer'];
|
|
14
15
|
isFetching?: boolean;
|
|
15
16
|
variant?: TableProps['variant'];
|
|
16
17
|
emptyState?: useDataViewPropReturn<T>['emptyState'];
|
|
18
|
+
selectionMode?: SelectionMode;
|
|
17
19
|
};
|
|
18
|
-
export declare const DataView: <T>({ pagination, isFetching, breakAt, breakpoints: customBreakpoints, footer, variant, emptyState, ...dataViewProps }: DataViewProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const DataView: <T>({ pagination, isFetching, breakAt, breakpoints: customBreakpoints, footer, variant, emptyState, selectionMode, ...dataViewProps }: DataViewProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { PaginationControl as
|
|
4
|
-
import
|
|
5
|
-
import { DataTable as
|
|
6
|
-
import { DataCards as
|
|
7
|
-
import { useContainerBreakpoints as
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as k, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as C, useMemo as D } from "react";
|
|
3
|
+
import { PaginationControl as w } from "../PaginationControl/PaginationControl.js";
|
|
4
|
+
import x from "./DataView.module.scss.js";
|
|
5
|
+
import { DataTable as h } from "./DataTable/DataTable.js";
|
|
6
|
+
import { DataCards as j } from "./DataCards/DataCards.js";
|
|
7
|
+
import { useContainerBreakpoints as v } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
8
|
+
const P = ({
|
|
9
9
|
pagination: t,
|
|
10
10
|
isFetching: s,
|
|
11
11
|
breakAt: a = "small",
|
|
@@ -13,28 +13,38 @@ const N = ({
|
|
|
13
13
|
footer: m,
|
|
14
14
|
variant: p,
|
|
15
15
|
emptyState: c,
|
|
16
|
-
|
|
16
|
+
selectionMode: l,
|
|
17
|
+
...f
|
|
17
18
|
}) => {
|
|
18
|
-
const e =
|
|
19
|
+
const e = C(null), o = v({
|
|
19
20
|
ref: e,
|
|
20
21
|
breakpoints: i
|
|
21
|
-
}),
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
}), d = o.length > 0, r = !o.includes(a), u = D(() => r ? j : h, [r]);
|
|
23
|
+
return /* @__PURE__ */ k(
|
|
23
24
|
"div",
|
|
24
25
|
{
|
|
25
26
|
"data-testid": "data-view",
|
|
26
|
-
className:
|
|
27
|
-
ref: (
|
|
28
|
-
e.current =
|
|
27
|
+
className: x.dataViewContainer,
|
|
28
|
+
ref: (b) => {
|
|
29
|
+
e.current = b;
|
|
29
30
|
},
|
|
30
31
|
children: [
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
d && /* @__PURE__ */ n(
|
|
33
|
+
u,
|
|
34
|
+
{
|
|
35
|
+
...f,
|
|
36
|
+
footer: m,
|
|
37
|
+
variant: p,
|
|
38
|
+
emptyState: c,
|
|
39
|
+
selectionMode: l
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
t && /* @__PURE__ */ n(w, { ...t, isFetching: s })
|
|
33
43
|
]
|
|
34
44
|
}
|
|
35
45
|
);
|
|
36
46
|
};
|
|
37
47
|
export {
|
|
38
|
-
|
|
48
|
+
P as DataView
|
|
39
49
|
};
|
|
40
50
|
//# sourceMappingURL=DataView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n variant?: TableProps['variant']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n}\n\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n variant,\n emptyState,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && (\n <Component
|
|
1
|
+
{"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn, SelectionMode } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n isItemSelected?: useDataViewPropReturn<T>['isItemSelected']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n variant?: TableProps['variant']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n selectionMode?: SelectionMode\n}\n\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n variant,\n emptyState,\n selectionMode,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && (\n <Component\n {...dataViewProps}\n footer={footer}\n variant={variant}\n emptyState={emptyState}\n selectionMode={selectionMode}\n />\n )}\n {pagination && <PaginationControl {...pagination} isFetching={isFetching} />}\n </div>\n )\n}\n"],"names":["DataView","pagination","isFetching","breakAt","customBreakpoints","footer","variant","emptyState","selectionMode","dataViewProps","containerRef","useRef","breakpoints","useContainerBreakpoints","isBreakpointsDetected","isMobile","Component","useMemo","DataCards","DataTable","jsxs","styles","ref","jsx","PaginationControl"],"mappings":";;;;;;;AA2BO,MAAMA,IAAW,CAAK;AAAA,EAC3B,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAaC;AAAA,EACb,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,GAAGC;AACL,MAAwB;AACtB,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAcC,EAAwB;AAAA,IAC1C,KAAKH;AAAA,IACL,aAAaN;AAAA,EAAA,CACd,GAGKU,IAAwBF,EAAY,SAAS,GAC7CG,IAAW,CAACH,EAAY,SAAST,CAAO,GAExCa,IAAYC,EAAQ,MACjBF,IAAWG,IAAYC,GAC7B,CAACJ,CAAQ,CAAC;AAEb,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAO;AAAA,MAClB,KAAK,CAAAC,MAAO;AACV,QAAAZ,EAAa,UAAUY;AAAA,MACzB;AAAA,MAEC,UAAA;AAAA,QAAAR,KACC,gBAAAS;AAAA,UAACP;AAAA,UAAA;AAAA,YACE,GAAGP;AAAA,YACJ,QAAAJ;AAAA,YACA,SAAAC;AAAA,YACA,YAAAC;AAAA,YACA,eAAAC;AAAA,UAAA;AAAA,QAAA;AAAA,QAGHP,KAAc,gBAAAsB,EAACC,GAAA,EAAmB,GAAGvB,GAAY,YAAAC,EAAA,CAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhF;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PaginationControlProps } from '../PaginationControl/PaginationControlTypes';
|
|
2
|
+
export type SelectionMode = 'multiple' | 'single';
|
|
2
3
|
type DataViewColumn<T> = {
|
|
3
4
|
key: keyof T;
|
|
4
5
|
title: string | React.ReactNode;
|
|
@@ -15,9 +16,11 @@ export type useDataViewProp<T> = {
|
|
|
15
16
|
pagination?: PaginationControlProps;
|
|
16
17
|
itemMenu?: (item: T) => React.ReactNode;
|
|
17
18
|
onSelect?: (item: T, checked: boolean) => void;
|
|
19
|
+
isItemSelected?: (item: T, index: number) => boolean;
|
|
18
20
|
emptyState?: () => React.ReactNode;
|
|
19
21
|
footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>;
|
|
20
22
|
isFetching?: boolean;
|
|
23
|
+
selectionMode?: SelectionMode;
|
|
21
24
|
};
|
|
22
25
|
export type useDataViewPropReturn<T> = {
|
|
23
26
|
pagination?: PaginationControlProps;
|
|
@@ -25,9 +28,11 @@ export type useDataViewPropReturn<T> = {
|
|
|
25
28
|
columns: DataViewColumn<T>[];
|
|
26
29
|
itemMenu?: (item: T) => React.ReactNode;
|
|
27
30
|
onSelect?: (item: T, checked: boolean) => void;
|
|
31
|
+
isItemSelected?: (item: T, index: number) => boolean;
|
|
28
32
|
emptyState?: () => React.ReactNode;
|
|
29
33
|
footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>;
|
|
30
34
|
isFetching?: boolean;
|
|
35
|
+
selectionMode?: SelectionMode;
|
|
31
36
|
};
|
|
32
|
-
export declare const useDataView: <T>({ columns, data, itemMenu, onSelect, pagination, emptyState, footer, isFetching, }: useDataViewProp<T>) => useDataViewPropReturn<T>;
|
|
37
|
+
export declare const useDataView: <T>({ columns, data, itemMenu, onSelect, isItemSelected, pagination, emptyState, footer, isFetching, selectionMode, }: useDataViewProp<T>) => useDataViewPropReturn<T>;
|
|
33
38
|
export {};
|
|
@@ -1,24 +1,39 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
const
|
|
1
|
+
import { useMemo as D } from "react";
|
|
2
|
+
const j = ({
|
|
3
3
|
columns: r,
|
|
4
|
-
data:
|
|
5
|
-
itemMenu:
|
|
6
|
-
onSelect:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
data: w,
|
|
5
|
+
itemMenu: V,
|
|
6
|
+
onSelect: p,
|
|
7
|
+
isItemSelected: s,
|
|
8
|
+
pagination: u,
|
|
9
|
+
emptyState: P,
|
|
10
|
+
footer: a,
|
|
11
|
+
isFetching: o,
|
|
12
|
+
selectionMode: x
|
|
13
|
+
}) => D(() => ({
|
|
14
|
+
pagination: u,
|
|
15
|
+
data: w,
|
|
14
16
|
columns: r,
|
|
15
|
-
itemMenu:
|
|
16
|
-
onSelect:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
itemMenu: V,
|
|
18
|
+
onSelect: p,
|
|
19
|
+
isItemSelected: s,
|
|
20
|
+
emptyState: P,
|
|
21
|
+
footer: a,
|
|
22
|
+
isFetching: o,
|
|
23
|
+
selectionMode: x
|
|
24
|
+
}), [
|
|
25
|
+
u,
|
|
26
|
+
w,
|
|
27
|
+
r,
|
|
28
|
+
V,
|
|
29
|
+
p,
|
|
30
|
+
s,
|
|
31
|
+
P,
|
|
32
|
+
a,
|
|
33
|
+
o,
|
|
34
|
+
x
|
|
35
|
+
]);
|
|
21
36
|
export {
|
|
22
|
-
|
|
37
|
+
j as useDataView
|
|
23
38
|
};
|
|
24
39
|
//# sourceMappingURL=useDataView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDataView.js","sources":["../../../../src/components/Common/DataView/useDataView.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\ntype DataViewColumn<T> =\n | {\n key: keyof T\n title: string | React.ReactNode\n render?: (item: T) => React.ReactNode\n }\n | {\n key?: string\n title: string | React.ReactNode\n render: (item: T) => React.ReactNode\n }\n\
|
|
1
|
+
{"version":3,"file":"useDataView.js","sources":["../../../../src/components/Common/DataView/useDataView.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\nexport type SelectionMode = 'multiple' | 'single'\n\ntype DataViewColumn<T> =\n | {\n key: keyof T\n title: string | React.ReactNode\n render?: (item: T) => React.ReactNode\n }\n | {\n key?: string\n title: string | React.ReactNode\n render: (item: T) => React.ReactNode\n }\n\ntype FooterKeys<T> = keyof T | string\n\nexport type useDataViewProp<T> = {\n columns: DataViewColumn<T>[]\n data: T[]\n pagination?: PaginationControlProps\n itemMenu?: (item: T) => React.ReactNode\n onSelect?: (item: T, checked: boolean) => void\n isItemSelected?: (item: T, index: number) => boolean\n emptyState?: () => React.ReactNode\n footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>\n isFetching?: boolean\n selectionMode?: SelectionMode\n}\n\nexport type useDataViewPropReturn<T> = {\n pagination?: PaginationControlProps\n data: T[]\n columns: DataViewColumn<T>[]\n itemMenu?: (item: T) => React.ReactNode\n onSelect?: (item: T, checked: boolean) => void\n isItemSelected?: (item: T, index: number) => boolean\n emptyState?: () => React.ReactNode\n footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>\n isFetching?: boolean\n selectionMode?: SelectionMode\n}\n\nexport const useDataView = <T>({\n columns,\n data,\n itemMenu,\n onSelect,\n isItemSelected,\n pagination,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n}: useDataViewProp<T>): useDataViewPropReturn<T> => {\n const dataViewProps = useMemo(() => {\n return {\n pagination,\n data,\n columns,\n itemMenu,\n onSelect,\n isItemSelected,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n }\n }, [\n pagination,\n data,\n columns,\n itemMenu,\n onSelect,\n isItemSelected,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n ])\n\n return dataViewProps\n}\n"],"names":["useDataView","columns","data","itemMenu","onSelect","isItemSelected","pagination","emptyState","footer","isFetching","selectionMode","useMemo"],"mappings":";AA6CO,MAAMA,IAAc,CAAI;AAAA,EAC7B,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AACF,MACwBC,EAAQ,OACrB;AAAA,EACL,YAAAL;AAAA,EACA,MAAAJ;AAAA,EACA,SAAAD;AAAA,EACA,UAAAE;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAE;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,IAED;AAAA,EACDJ;AAAA,EACAJ;AAAA,EACAD;AAAA,EACAE;AAAA,EACAC;AAAA,EACAC;AAAA,EACAE;AAAA,EACAC;AAAA,EACAC;AAAA,EACAC;AAAA,CACD;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import h from "classnames";
|
|
3
|
+
import { Flex as u } from "../../Flex/Flex.js";
|
|
3
4
|
import { BreadcrumbsDefaults as k } from "./BreadcrumbsTypes.js";
|
|
4
5
|
import r from "./Breadcrumbs.module.scss.js";
|
|
5
6
|
import { applyMissingDefaults as x } from "../../../../helpers/applyMissingDefaults.js";
|
|
6
|
-
import { Flex as u } from "../../Flex/Flex.js";
|
|
7
7
|
function I(p) {
|
|
8
8
|
const f = x(p, k), {
|
|
9
9
|
className: s,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CardProps } from './CardTypes';
|
|
2
|
-
export declare function Card({
|
|
2
|
+
export declare function Card({ children, menu, className, action }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
e && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
11
|
-
c,
|
|
12
|
-
{
|
|
13
|
-
onChange: e,
|
|
14
|
-
label: t("card.selectRowLabel"),
|
|
15
|
-
shouldVisuallyHideLabel: !0
|
|
16
|
-
}
|
|
17
|
-
) }),
|
|
18
|
-
/* @__PURE__ */ r("div", { style: { flexGrow: 1, flexShrink: 1 }, children: /* @__PURE__ */ r(i, { flexDirection: "column", gap: 16, children: l }) }),
|
|
19
|
-
o && /* @__PURE__ */ r("div", { children: o })
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import a from "classnames";
|
|
3
|
+
import { Flex as d } from "../../Flex/Flex.js";
|
|
4
|
+
import c from "./Card.module.scss.js";
|
|
5
|
+
function x({ children: l, menu: i, className: o, action: e }) {
|
|
6
|
+
return /* @__PURE__ */ r("div", { className: a(c.cardContainer, o), "data-testid": "data-card", children: /* @__PURE__ */ t(d, { flexDirection: "row", gap: 8, children: [
|
|
7
|
+
e && /* @__PURE__ */ r("div", { children: e }),
|
|
8
|
+
/* @__PURE__ */ r("div", { style: { flexGrow: 1, flexShrink: 1 }, children: /* @__PURE__ */ r(d, { flexDirection: "column", gap: 16, children: l }) }),
|
|
9
|
+
i && /* @__PURE__ */ r("div", { children: i })
|
|
20
10
|
] }) });
|
|
21
11
|
}
|
|
22
12
|
export {
|
|
23
|
-
|
|
13
|
+
x as Card
|
|
24
14
|
};
|
|
25
15
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../../../src/components/Common/UI/Card/Card.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../../../src/components/Common/UI/Card/Card.tsx"],"sourcesContent":["import cn from 'classnames'\nimport { Flex } from '../../Flex/Flex'\nimport styles from './Card.module.scss'\nimport { type CardProps } from '@/components/Common/UI/Card/CardTypes'\n\nexport function Card({ children, menu, className, action }: CardProps) {\n return (\n <div className={cn(styles.cardContainer, className)} data-testid=\"data-card\">\n <Flex flexDirection=\"row\" gap={8}>\n {action && <div>{action}</div>}\n <div style={{ flexGrow: 1, flexShrink: 1 }}>\n <Flex flexDirection={'column'} gap={16}>\n {children}\n </Flex>\n </div>\n {menu && <div>{menu}</div>}\n </Flex>\n </div>\n )\n}\n"],"names":["Card","children","menu","className","action","jsx","cn","styles","jsxs","Flex"],"mappings":";;;;AAKO,SAASA,EAAK,EAAE,UAAAC,GAAU,MAAAC,GAAM,WAAAC,GAAW,QAAAC,KAAqB;AACrE,SACE,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAGC,EAAO,eAAeJ,CAAS,GAAG,eAAY,aAC/D,UAAA,gBAAAK,EAACC,GAAA,EAAK,eAAc,OAAM,KAAK,GAC5B,UAAA;AAAA,IAAAL,KAAU,gBAAAC,EAAC,SAAK,UAAAD,EAAA,CAAO;AAAA,sBACvB,OAAA,EAAI,OAAO,EAAE,UAAU,GAAG,YAAY,KACrC,UAAA,gBAAAC,EAACI,KAAK,eAAe,UAAU,KAAK,IACjC,UAAAR,GACH,GACF;AAAA,IACCC,KAAQ,gBAAAG,EAAC,OAAA,EAAK,UAAAH,EAAA,CAAK;AAAA,EAAA,EAAA,CACtB,EAAA,CACF;AAEJ;"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export interface CardProps {
|
|
3
|
-
/**
|
|
4
|
-
* Callback function when the card is selected
|
|
5
|
-
*/
|
|
6
|
-
onSelect?: (checked: boolean) => void;
|
|
7
3
|
/**
|
|
8
4
|
* Content to be displayed inside the card
|
|
9
5
|
*/
|
|
@@ -16,4 +12,8 @@ export interface CardProps {
|
|
|
16
12
|
* CSS className to be applied
|
|
17
13
|
*/
|
|
18
14
|
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Optional action element (e.g., checkbox, radio) to be displayed on the left side
|
|
17
|
+
*/
|
|
18
|
+
action?: ReactNode;
|
|
19
19
|
}
|
|
@@ -7,13 +7,13 @@ import { FileInputDefaults as K } from "./FileInputTypes.js";
|
|
|
7
7
|
import n from "./FileInput.module.scss.js";
|
|
8
8
|
import { applyMissingDefaults as L } from "../../../../helpers/applyMissingDefaults.js";
|
|
9
9
|
import { FieldLayout as O } from "../../FieldLayout/FieldLayout.js";
|
|
10
|
+
import { Flex as y } from "../../Flex/Flex.js";
|
|
10
11
|
import { ButtonIcon as R } from "../Button/ButtonIcon.js";
|
|
11
12
|
import W from "../../../../assets/icons/icon-trashcan.svg.js";
|
|
12
13
|
import Z from "../../../../assets/icons/icon-file-outline.svg.js";
|
|
13
14
|
import $ from "../../../../assets/icons/icon-file-pdf.svg.js";
|
|
14
15
|
import H from "../../../../assets/icons/icon-file-png.svg.js";
|
|
15
16
|
import V from "../../../../assets/icons/icon-file-jpg.svg.js";
|
|
16
|
-
import { Flex as y } from "../../Flex/Flex.js";
|
|
17
17
|
function Q(i) {
|
|
18
18
|
return i === "application/pdf" ? $ : i === "image/png" ? H : i === "image/jpeg" || i === "image/jpg" ? V : Z;
|
|
19
19
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import c from "classnames";
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
3
|
+
import { Flex as n } from "../../Flex/Flex.js";
|
|
4
|
+
import p from "./ProgressBar.module.scss.js";
|
|
5
5
|
import { VisuallyHidden as d } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
6
6
|
function y({
|
|
7
7
|
className: i,
|
|
@@ -13,9 +13,9 @@ function y({
|
|
|
13
13
|
const s = Math.max(1, Math.min(m, e)), l = {
|
|
14
14
|
"--g-progress-bar-width": `${s * 100 / e}%`
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */ t(
|
|
16
|
+
return /* @__PURE__ */ t(n, { flexDirection: "column", children: [
|
|
17
17
|
o && /* @__PURE__ */ r(o, {}),
|
|
18
|
-
/* @__PURE__ */ r("div", { className: c(
|
|
18
|
+
/* @__PURE__ */ r("div", { className: c(p.root, i), style: l, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("progress", { "aria-label": a, value: s, max: e }) }) })
|
|
19
19
|
] });
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
@@ -6,15 +6,15 @@ import { useComponentContext as D } from "../../../contexts/ComponentAdapter/use
|
|
|
6
6
|
import { useI18n as I } from "../../../i18n/I18n.js";
|
|
7
7
|
import { Form as O } from "../../Common/Form/Form.js";
|
|
8
8
|
import { Grid as n } from "../../Common/Grid/Grid.js";
|
|
9
|
+
import { Flex as x } from "../../Common/Flex/Flex.js";
|
|
9
10
|
import { TextInputField as l } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
10
|
-
import { NumberInputField as
|
|
11
|
+
import { NumberInputField as w } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
11
12
|
import { RadioGroupField as d } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
12
|
-
import { SwitchField as
|
|
13
|
-
import { DatePickerField as
|
|
14
|
-
import { usePlaceholderSSN as
|
|
15
|
-
import { usePlaceholderEin as
|
|
16
|
-
import { ContractorOnboardingStatus as
|
|
17
|
-
import { Flex as B } from "../../Common/Flex/Flex.js";
|
|
13
|
+
import { SwitchField as E } from "../../Common/Fields/SwitchField/SwitchField.js";
|
|
14
|
+
import { DatePickerField as j } from "../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
15
|
+
import { usePlaceholderSSN as v, normalizeSSN as G } from "../../../helpers/ssn.js";
|
|
16
|
+
import { usePlaceholderEin as z, normalizeEin as A } from "../../../helpers/federalEin.js";
|
|
17
|
+
import { ContractorOnboardingStatus as B } from "../../../shared/constants.js";
|
|
18
18
|
function re({
|
|
19
19
|
formMethods: u,
|
|
20
20
|
handleSubmit: f,
|
|
@@ -33,7 +33,7 @@ function re({
|
|
|
33
33
|
}) {
|
|
34
34
|
const a = D();
|
|
35
35
|
I("Contractor.Profile");
|
|
36
|
-
const { t: e } = T("Contractor.Profile"), q =
|
|
36
|
+
const { t: e } = T("Contractor.Profile"), q = v(t?.hasSsn ?? !1), P = z(t?.hasEin ?? !1);
|
|
37
37
|
return /* @__PURE__ */ i("section", { className: F, children: /* @__PURE__ */ i(S, { ...u, children: /* @__PURE__ */ r(O, { onSubmit: f, children: [
|
|
38
38
|
/* @__PURE__ */ r(n, { gridTemplateColumns: "1fr", gap: 24, className: "mb-8", children: [
|
|
39
39
|
/* @__PURE__ */ r("header", { children: [
|
|
@@ -42,12 +42,12 @@ function re({
|
|
|
42
42
|
] }),
|
|
43
43
|
/* @__PURE__ */ i("div", { className: C.switchFieldContainer, children: /* @__PURE__ */ r(n, { gap: 16, children: [
|
|
44
44
|
/* @__PURE__ */ i(
|
|
45
|
-
|
|
45
|
+
E,
|
|
46
46
|
{
|
|
47
47
|
name: "selfOnboarding",
|
|
48
48
|
label: e("fields.selfOnboarding.label"),
|
|
49
49
|
description: e("fields.selfOnboarding.description"),
|
|
50
|
-
isDisabled: t && t.onboardingStatus !==
|
|
50
|
+
isDisabled: t && t.onboardingStatus !== B.ADMIN_ONBOARDING_INCOMPLETE
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
53
|
p && /* @__PURE__ */ i(
|
|
@@ -81,7 +81,7 @@ function re({
|
|
|
81
81
|
name: "ssn",
|
|
82
82
|
label: e("fields.ssn.label"),
|
|
83
83
|
placeholder: q,
|
|
84
|
-
transform:
|
|
84
|
+
transform: G,
|
|
85
85
|
isRequired: !0
|
|
86
86
|
}
|
|
87
87
|
)
|
|
@@ -101,7 +101,7 @@ function re({
|
|
|
101
101
|
name: "ein",
|
|
102
102
|
label: e("fields.ein.label"),
|
|
103
103
|
placeholder: P,
|
|
104
|
-
transform:
|
|
104
|
+
transform: A,
|
|
105
105
|
isRequired: !0
|
|
106
106
|
}
|
|
107
107
|
)
|
|
@@ -116,7 +116,7 @@ function re({
|
|
|
116
116
|
}
|
|
117
117
|
),
|
|
118
118
|
h && /* @__PURE__ */ i(
|
|
119
|
-
|
|
119
|
+
w,
|
|
120
120
|
{
|
|
121
121
|
name: "hourlyRate",
|
|
122
122
|
label: e("fields.hourlyRate.label"),
|
|
@@ -126,7 +126,7 @@ function re({
|
|
|
126
126
|
}
|
|
127
127
|
),
|
|
128
128
|
/* @__PURE__ */ i(
|
|
129
|
-
|
|
129
|
+
j,
|
|
130
130
|
{
|
|
131
131
|
name: "startDate",
|
|
132
132
|
label: e("fields.startDate.label"),
|
|
@@ -135,7 +135,7 @@ function re({
|
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
] }),
|
|
138
|
-
/* @__PURE__ */ i(
|
|
138
|
+
/* @__PURE__ */ i(x, { gap: 12, justifyContent: "flex-end", children: /* @__PURE__ */ i(a.Button, { type: "submit", variant: "primary", isDisabled: o.isSubmitting, children: o.isSubmitting ? e(s ? "buttons.updating" : "buttons.creating") : e(s ? "buttons.update" : "buttons.create") }) })
|
|
139
139
|
] }) }) });
|
|
140
140
|
}
|
|
141
141
|
export {
|
package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js
CHANGED
|
@@ -5,9 +5,9 @@ import { InformationRequestStatus as s, InformationRequestType as i } from "@gus
|
|
|
5
5
|
import { BaseComponent as x } from "../../Base/Base.js";
|
|
6
6
|
import "../../Base/useBase.js";
|
|
7
7
|
import { useComponentContext as S } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
import { useComponentDictionary as T, useI18n as
|
|
9
|
-
import { DataView as
|
|
10
|
-
import { useDataView as
|
|
8
|
+
import { useComponentDictionary as T, useI18n as D } from "../../../i18n/I18n.js";
|
|
9
|
+
import { DataView as k } from "../../Common/DataView/DataView.js";
|
|
10
|
+
import { useDataView as v } from "../../Common/DataView/useDataView.js";
|
|
11
11
|
import { FlexItem as E, Flex as u } from "../../Common/Flex/Flex.js";
|
|
12
12
|
import "classnames";
|
|
13
13
|
import { informationRequestEvents as C } from "../../../shared/constants.js";
|
|
@@ -18,14 +18,14 @@ function X(r) {
|
|
|
18
18
|
}
|
|
19
19
|
function A({
|
|
20
20
|
companyId: r,
|
|
21
|
-
dictionary:
|
|
21
|
+
dictionary: f,
|
|
22
22
|
filterByPayrollBlocking: m = !1,
|
|
23
|
-
onEvent:
|
|
23
|
+
onEvent: y
|
|
24
24
|
}) {
|
|
25
|
-
T("InformationRequests.InformationRequestList",
|
|
26
|
-
const { t } = P("InformationRequests.InformationRequestList"), { Heading: R, Text: l, Button:
|
|
25
|
+
T("InformationRequests.InformationRequestList", f), D("InformationRequests.InformationRequestList");
|
|
26
|
+
const { t } = P("InformationRequests.InformationRequestList"), { Heading: R, Text: l, Button: g, Badge: c } = S(), { data: h } = w({
|
|
27
27
|
companyUuid: r
|
|
28
|
-
}),
|
|
28
|
+
}), p = (h.informationRequestList ?? []).filter((e) => {
|
|
29
29
|
const o = e.status !== s.Approved;
|
|
30
30
|
return m ? e.blockingPayroll && o : o;
|
|
31
31
|
}), I = (e) => {
|
|
@@ -50,9 +50,9 @@ function A({
|
|
|
50
50
|
default:
|
|
51
51
|
return null;
|
|
52
52
|
}
|
|
53
|
-
}, b =
|
|
54
|
-
data:
|
|
55
|
-
emptyState: () => /* @__PURE__ */ n(L, { title: t("emptyTableTitle") }),
|
|
53
|
+
}, b = v({
|
|
54
|
+
data: p,
|
|
55
|
+
emptyState: () => /* @__PURE__ */ n(L, { title: t("emptyTableTitle"), description: t("emptyTableDescription") }),
|
|
56
56
|
columns: [
|
|
57
57
|
{
|
|
58
58
|
key: "type",
|
|
@@ -63,20 +63,20 @@ function A({
|
|
|
63
63
|
key: "status",
|
|
64
64
|
title: t("columns.status"),
|
|
65
65
|
render: (e) => {
|
|
66
|
-
const o = q(e.status),
|
|
67
|
-
return !o && !
|
|
66
|
+
const o = q(e.status), d = !m && e.blockingPayroll;
|
|
67
|
+
return !o && !d ? null : /* @__PURE__ */ a(u, { gap: 8, alignItems: "center", children: [
|
|
68
68
|
o && /* @__PURE__ */ n(c, { status: o.badgeStatus, children: o.label }),
|
|
69
|
-
|
|
69
|
+
d && /* @__PURE__ */ n(c, { status: "error", children: t("status.payrollBlocking") })
|
|
70
70
|
] });
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
],
|
|
74
74
|
itemMenu: (e) => e.status === s.PendingResponse ? /* @__PURE__ */ n(
|
|
75
|
-
|
|
75
|
+
g,
|
|
76
76
|
{
|
|
77
77
|
variant: "secondary",
|
|
78
78
|
onClick: () => {
|
|
79
|
-
|
|
79
|
+
y(C.INFORMATION_REQUEST_RESPOND, {
|
|
80
80
|
requestId: e.uuid
|
|
81
81
|
});
|
|
82
82
|
},
|
|
@@ -87,9 +87,9 @@ function A({
|
|
|
87
87
|
return /* @__PURE__ */ a(u, { flexDirection: "column", gap: 20, children: [
|
|
88
88
|
/* @__PURE__ */ a(u, { flexDirection: "column", gap: 2, children: [
|
|
89
89
|
/* @__PURE__ */ n(R, { as: "h2", styledAs: "h4", children: t("title") }),
|
|
90
|
-
/* @__PURE__ */ n(l, { children: t("description") })
|
|
90
|
+
p.length > 0 && /* @__PURE__ */ n(l, { children: t("description") })
|
|
91
91
|
] }),
|
|
92
|
-
/* @__PURE__ */ n(
|
|
92
|
+
/* @__PURE__ */ n(k, { ...b, label: t("title") })
|
|
93
93
|
] });
|
|
94
94
|
}
|
|
95
95
|
export {
|
package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InformationRequestList.js","sources":["../../../../src/components/InformationRequests/InformationRequestList/InformationRequestList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api/react-query/informationRequestsGetInformationRequests'\nimport type { InformationRequest } from '@gusto/embedded-api/models/components/informationrequest'\nimport {\n InformationRequestStatus,\n InformationRequestType,\n} from '@gusto/embedded-api/models/components/informationrequest'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { EmptyData, Flex, FlexItem } from '@/components/Common'\nimport { informationRequestEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\n\ninterface InformationRequestListProps extends BaseComponentInterface<'InformationRequests.InformationRequestList'> {\n companyId: string\n filterByPayrollBlocking?: boolean\n onEvent: BaseComponentInterface['onEvent']\n}\n\nexport function InformationRequestList(props: InformationRequestListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\ntype StatusMapping = {\n label: string\n badgeStatus: BadgeProps['status']\n} | null\n\nfunction Root({\n companyId,\n dictionary,\n filterByPayrollBlocking = false,\n onEvent,\n}: InformationRequestListProps) {\n useComponentDictionary('InformationRequests.InformationRequestList', dictionary)\n useI18n('InformationRequests.InformationRequestList')\n const { t } = useTranslation('InformationRequests.InformationRequestList')\n const { Heading, Text, Button, Badge } = useComponentContext()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequests = data.informationRequestList ?? []\n\n const visibleRequests = informationRequests.filter(request => {\n const isNotApproved = request.status !== InformationRequestStatus.Approved\n\n if (filterByPayrollBlocking) {\n return request.blockingPayroll && isNotApproved\n }\n\n return isNotApproved\n })\n\n const getTypeLabel = (type: InformationRequest['type']): string => {\n switch (type) {\n case InformationRequestType.CompanyOnboarding:\n return t('types.companyOnboarding')\n case InformationRequestType.AccountProtection:\n return t('types.accountProtection')\n case InformationRequestType.PaymentRequest:\n return t('types.paymentRequest')\n case InformationRequestType.PaymentError:\n return t('types.paymentError')\n default:\n return t('types.unknown')\n }\n }\n\n const getStatusMapping = (status: InformationRequest['status']): StatusMapping => {\n switch (status) {\n case InformationRequestStatus.PendingResponse:\n return { label: t('status.incomplete'), badgeStatus: 'info' }\n case InformationRequestStatus.PendingReview:\n return { label: t('status.underReview'), badgeStatus: 'warning' }\n default:\n return null\n }\n }\n\n const dataViewProps = useDataView({\n data: visibleRequests,\n emptyState: () => <EmptyData title={t('emptyTableTitle')}
|
|
1
|
+
{"version":3,"file":"InformationRequestList.js","sources":["../../../../src/components/InformationRequests/InformationRequestList/InformationRequestList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useInformationRequestsGetInformationRequestsSuspense } from '@gusto/embedded-api/react-query/informationRequestsGetInformationRequests'\nimport type { InformationRequest } from '@gusto/embedded-api/models/components/informationrequest'\nimport {\n InformationRequestStatus,\n InformationRequestType,\n} from '@gusto/embedded-api/models/components/informationrequest'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { EmptyData, Flex, FlexItem } from '@/components/Common'\nimport { informationRequestEvents } from '@/shared/constants'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\n\ninterface InformationRequestListProps extends BaseComponentInterface<'InformationRequests.InformationRequestList'> {\n companyId: string\n filterByPayrollBlocking?: boolean\n onEvent: BaseComponentInterface['onEvent']\n}\n\nexport function InformationRequestList(props: InformationRequestListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\ntype StatusMapping = {\n label: string\n badgeStatus: BadgeProps['status']\n} | null\n\nfunction Root({\n companyId,\n dictionary,\n filterByPayrollBlocking = false,\n onEvent,\n}: InformationRequestListProps) {\n useComponentDictionary('InformationRequests.InformationRequestList', dictionary)\n useI18n('InformationRequests.InformationRequestList')\n const { t } = useTranslation('InformationRequests.InformationRequestList')\n const { Heading, Text, Button, Badge } = useComponentContext()\n\n const { data } = useInformationRequestsGetInformationRequestsSuspense({\n companyUuid: companyId,\n })\n\n const informationRequests = data.informationRequestList ?? []\n\n const visibleRequests = informationRequests.filter(request => {\n const isNotApproved = request.status !== InformationRequestStatus.Approved\n\n if (filterByPayrollBlocking) {\n return request.blockingPayroll && isNotApproved\n }\n\n return isNotApproved\n })\n\n const getTypeLabel = (type: InformationRequest['type']): string => {\n switch (type) {\n case InformationRequestType.CompanyOnboarding:\n return t('types.companyOnboarding')\n case InformationRequestType.AccountProtection:\n return t('types.accountProtection')\n case InformationRequestType.PaymentRequest:\n return t('types.paymentRequest')\n case InformationRequestType.PaymentError:\n return t('types.paymentError')\n default:\n return t('types.unknown')\n }\n }\n\n const getStatusMapping = (status: InformationRequest['status']): StatusMapping => {\n switch (status) {\n case InformationRequestStatus.PendingResponse:\n return { label: t('status.incomplete'), badgeStatus: 'info' }\n case InformationRequestStatus.PendingReview:\n return { label: t('status.underReview'), badgeStatus: 'warning' }\n default:\n return null\n }\n }\n\n const dataViewProps = useDataView({\n data: visibleRequests,\n emptyState: () => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n ),\n columns: [\n {\n key: 'type',\n title: t('columns.type'),\n render: request => (\n <FlexItem flexGrow={1}>\n <Text weight=\"medium\">{getTypeLabel(request.type)}</Text>\n </FlexItem>\n ),\n },\n {\n key: 'status',\n title: t('columns.status'),\n render: request => {\n const statusMapping = getStatusMapping(request.status)\n const showPayrollBlockingBadge = !filterByPayrollBlocking && request.blockingPayroll\n\n if (!statusMapping && !showPayrollBlockingBadge) {\n return null\n }\n\n return (\n <Flex gap={8} alignItems=\"center\">\n {statusMapping && (\n <Badge status={statusMapping.badgeStatus}>{statusMapping.label}</Badge>\n )}\n {showPayrollBlockingBadge && (\n <Badge status=\"error\">{t('status.payrollBlocking')}</Badge>\n )}\n </Flex>\n )\n },\n },\n ],\n itemMenu: request => {\n const isPendingResponse = request.status === InformationRequestStatus.PendingResponse\n if (!isPendingResponse) {\n return null\n }\n return (\n <Button\n variant=\"secondary\"\n onClick={() => {\n onEvent(informationRequestEvents.INFORMATION_REQUEST_RESPOND, {\n requestId: request.uuid,\n })\n }}\n >\n {t('cta.respond')}\n </Button>\n )\n },\n })\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('title')}\n </Heading>\n {visibleRequests.length > 0 && <Text>{t('description')}</Text>}\n </Flex>\n\n <DataView {...dataViewProps} label={t('title')} />\n </Flex>\n )\n}\n"],"names":["InformationRequestList","props","jsx","BaseComponent","Root","companyId","dictionary","filterByPayrollBlocking","onEvent","useComponentDictionary","useI18n","useTranslation","Heading","Text","Button","Badge","useComponentContext","data","useInformationRequestsGetInformationRequestsSuspense","visibleRequests","request","isNotApproved","InformationRequestStatus","getTypeLabel","type","InformationRequestType","getStatusMapping","status","dataViewProps","useDataView","EmptyData","FlexItem","statusMapping","showPayrollBlockingBadge","jsxs","Flex","informationRequestEvents","DataView"],"mappings":"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"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
const
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
4
|
-
emptyTableTitle:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
const e = "Information requests", t = "We need you to share some more information about your business. This info will be used to keep your business secure and ensure that our data about your company is correct. Please make sure to do this soon since it may otherwise impact your ability to run payroll.", o = "No information requests", n = "There are no information requests that need your response at this time.", s = { type: "Type", status: "Status" }, r = { companyOnboarding: "Company Onboarding", accountProtection: "Account Protection", paymentRequest: "Payment Request", paymentError: "Payment Error", unknown: "Information Request" }, a = { incomplete: "Incomplete", underReview: "Under review", payrollBlocking: "Payroll blocking" }, i = { respond: "Respond" }, u = {
|
|
2
|
+
title: e,
|
|
3
|
+
description: t,
|
|
4
|
+
emptyTableTitle: o,
|
|
5
|
+
emptyTableDescription: n,
|
|
6
|
+
columns: s,
|
|
7
|
+
types: r,
|
|
8
|
+
status: a,
|
|
9
|
+
cta: i
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
s as columns,
|
|
13
|
+
i as cta,
|
|
14
|
+
u as default,
|
|
15
|
+
t as description,
|
|
16
|
+
n as emptyTableDescription,
|
|
17
|
+
o as emptyTableTitle,
|
|
18
|
+
a as status,
|
|
19
|
+
e as title,
|
|
20
|
+
r as types
|
|
19
21
|
};
|
|
20
22
|
//# sourceMappingURL=InformationRequests.InformationRequestList.json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InformationRequests.InformationRequestList.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InformationRequests.InformationRequestList.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
package/dist/types/i18next.d.ts
CHANGED