@adyen/adyen-platform-experience-web 1.6.0 → 1.7.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/README.md +1 -1
- package/dist/adyen-platform-experience-web.css +1 -1
- package/dist/{angle-right-Bb55rXYe.cjs → angle-right-BYzD_-Ft.cjs} +2 -2
- package/dist/{angle-right-Bb55rXYe.cjs.map → angle-right-BYzD_-Ft.cjs.map} +1 -1
- package/dist/{checkmark-DiDm_wM9.cjs → checkmark-BvN7Hdc4.cjs} +2 -2
- package/dist/{checkmark-DiDm_wM9.cjs.map → checkmark-BvN7Hdc4.cjs.map} +1 -1
- package/dist/{checkmark-circle-fill-Cw6AyXxm.cjs → checkmark-circle-fill-B2FBCXMi.cjs} +2 -2
- package/dist/{checkmark-circle-fill-Cw6AyXxm.cjs.map → checkmark-circle-fill-B2FBCXMi.cjs.map} +1 -1
- package/dist/{checkmark-square-fill-B0JKpJWE.cjs → checkmark-square-fill-C0yzqh08.cjs} +2 -2
- package/dist/{checkmark-square-fill-B0JKpJWE.cjs.map → checkmark-square-fill-C0yzqh08.cjs.map} +1 -1
- package/dist/{chevron-down-BhSTKYlw.cjs → chevron-down-Bh5iG-g7.cjs} +2 -2
- package/dist/{chevron-down-BhSTKYlw.cjs.map → chevron-down-Bh5iG-g7.cjs.map} +1 -1
- package/dist/{chevron-left-D-GWfC1v.cjs → chevron-left-CslKDyxG.cjs} +2 -2
- package/dist/{chevron-left-D-GWfC1v.cjs.map → chevron-left-CslKDyxG.cjs.map} +1 -1
- package/dist/{chevron-right-CSehcQXv.cjs → chevron-right-B86-08tq.cjs} +2 -2
- package/dist/{chevron-right-CSehcQXv.cjs.map → chevron-right-B86-08tq.cjs.map} +1 -1
- package/dist/{chevron-up-D8g7ZBDG.cjs → chevron-up-DRKXzgCM.cjs} +2 -2
- package/dist/{chevron-up-D8g7ZBDG.cjs.map → chevron-up-DRKXzgCM.cjs.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/{copy-BOKezSIj.cjs → copy--wgagwiQ.cjs} +2 -2
- package/dist/{copy-BOKezSIj.cjs.map → copy--wgagwiQ.cjs.map} +1 -1
- package/dist/{cross-BMK10x3R.cjs → cross-BWhI1OkU.cjs} +2 -2
- package/dist/{cross-BMK10x3R.cjs.map → cross-BWhI1OkU.cjs.map} +1 -1
- package/dist/{cross-circle-fill-DzWguWQ6.cjs → cross-circle-fill-CNa1fp55.cjs} +2 -2
- package/dist/{cross-circle-fill-DzWguWQ6.cjs.map → cross-circle-fill-CNa1fp55.cjs.map} +1 -1
- package/dist/{download-DciFfoOz.cjs → download-v3aQcc7_.cjs} +2 -2
- package/dist/{download-DciFfoOz.cjs.map → download-v3aQcc7_.cjs.map} +1 -1
- package/dist/es/components/external/CapitalOverview/components/GrantActions/GrantActions.js +133 -0
- package/dist/es/components/external/CapitalOverview/components/GrantActions/constants.js +9 -0
- package/dist/es/components/external/CapitalOverview/components/GrantItem/GrantItem.js +39 -40
- package/dist/es/components/external/ReportsOverview/components/ReportsTable/ReportsTable.js +11 -11
- package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundAmount.js +19 -19
- package/dist/es/components/internal/Accordion/Accordion.js +19 -20
- package/dist/es/components/internal/Button/DownloadButton/DownloadButton.js +37 -37
- package/dist/es/components/internal/Calendar/hooks/useCalendarControlsRendering.js +18 -19
- package/dist/es/components/internal/ExpandableCard/ExpandableCard.js +47 -48
- package/dist/es/components/internal/FormFields/Select/Select.js +29 -29
- package/dist/es/components/internal/FormFields/Select/components/SelectButton.js +27 -27
- package/dist/es/components/internal/FormFields/Select/components/SelectListItem.js +27 -29
- package/dist/es/components/internal/Pagination/Pagination.js +41 -38
- package/dist/es/components/internal/Popover/Popover.js +95 -92
- package/dist/es/components/internal/Popover/types.js +2 -2
- package/dist/es/components/internal/Tooltip/Tooltip.js +28 -32
- package/dist/es/constants/dateFormats.js +19 -18
- package/dist/es/core/Http/utils.js +1 -1
- package/dist/es/core/core.js +1 -1
- package/dist/es/hooks/element/usePopoverPositioner.js +129 -89
- package/dist/es/translations/en-US.json.js +4 -0
- package/dist/{external-link-B2F_A_Cq.cjs → external-link-Y0ITwX_D.cjs} +2 -2
- package/dist/{external-link-B2F_A_Cq.cjs.map → external-link-Y0ITwX_D.cjs.map} +1 -1
- package/dist/{filter-D22HZfjz.cjs → filter-B0jf9LNT.cjs} +2 -2
- package/dist/{filter-D22HZfjz.cjs.map → filter-B0jf9LNT.cjs.map} +1 -1
- package/dist/index-CldOsFs0.cjs +12 -0
- package/dist/index-CldOsFs0.cjs.map +1 -0
- package/dist/{info-filled-DChkt5PM.cjs → info-filled-DWI7yYIK.cjs} +2 -2
- package/dist/{info-filled-DChkt5PM.cjs.map → info-filled-DWI7yYIK.cjs.map} +1 -1
- package/dist/{minus-circle-outline-o-wMYGB7.cjs → minus-circle-outline-TX4FRKCq.cjs} +2 -2
- package/dist/{minus-circle-outline-o-wMYGB7.cjs.map → minus-circle-outline-TX4FRKCq.cjs.map} +1 -1
- package/dist/{plus-IYFySo3s.cjs → plus-WkQleJCL.cjs} +2 -2
- package/dist/{plus-IYFySo3s.cjs.map → plus-WkQleJCL.cjs.map} +1 -1
- package/dist/{plus-circle-outline-CoI6-j9k.cjs → plus-circle-outline-BSbUWJEJ.cjs} +2 -2
- package/dist/{plus-circle-outline-CoI6-j9k.cjs.map → plus-circle-outline-BSbUWJEJ.cjs.map} +1 -1
- package/dist/{square-DN8rGu6b.cjs → square-wBNy5hkk.cjs} +2 -2
- package/dist/{square-DN8rGu6b.cjs.map → square-wBNy5hkk.cjs.map} +1 -1
- package/dist/{trash-can-DIrL2Xi0.cjs → trash-can-BtOHiu0D.cjs} +2 -2
- package/dist/{trash-can-DIrL2Xi0.cjs.map → trash-can-BtOHiu0D.cjs.map} +1 -1
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/types.d.ts +2 -2
- package/dist/types/components/external/CapitalOverview/components/AccountDetails/types.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantActions/GrantActions.d.ts +9 -0
- package/dist/types/components/external/CapitalOverview/components/GrantActions/GrantActions.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/GrantActions/constants.d.ts +7 -0
- package/dist/types/components/external/CapitalOverview/components/{GrantAction → GrantActions}/constants.d.ts.map +1 -1
- package/dist/types/components/external/CapitalOverview/components/GrantActions/utils.d.ts.map +1 -0
- package/dist/types/components/external/CapitalOverview/components/GrantItem/GrantItem.d.ts.map +1 -1
- package/dist/types/components/external/ReportsOverview/components/ReportsTable/ReportsTable.d.ts.map +1 -1
- package/dist/types/components/internal/Accordion/Accordion.d.ts.map +1 -1
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts +5 -21
- package/dist/types/components/internal/Button/DownloadButton/useDownload.d.ts.map +1 -1
- package/dist/types/components/internal/Calendar/hooks/useCalendarControlsRendering.d.ts.map +1 -1
- package/dist/types/components/internal/ExpandableCard/ExpandableCard.d.ts.map +1 -1
- package/dist/types/components/internal/FormFields/Select/components/SelectListItem.d.ts.map +1 -1
- package/dist/types/components/internal/Pagination/Pagination.d.ts +1 -1
- package/dist/types/components/internal/Pagination/Pagination.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/Popover.d.ts.map +1 -1
- package/dist/types/components/internal/Popover/types.d.ts +4 -2
- package/dist/types/components/internal/Popover/types.d.ts.map +1 -1
- package/dist/types/components/internal/StructuredList/useStructuredListItem.d.ts +1 -1
- package/dist/types/components/internal/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/constants/dateFormats.d.ts +1 -0
- package/dist/types/constants/dateFormats.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/context.d.ts +38 -20
- package/dist/types/core/ConfigContext/context.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts +76 -40
- package/dist/types/core/ConfigContext/session/AuthSession.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts +38 -20
- package/dist/types/core/ConfigContext/session/SetupContext.d.ts.map +1 -1
- package/dist/types/core/ConfigContext/types.d.ts +7 -1
- package/dist/types/core/ConfigContext/types.d.ts.map +1 -1
- package/dist/types/hooks/element/usePopoverPositioner.d.ts +1 -1
- package/dist/types/hooks/element/usePopoverPositioner.d.ts.map +1 -1
- package/dist/types/hooks/useTableColumns.d.ts +1 -1
- package/dist/types/translations/index.d.ts +4 -0
- package/dist/types/translations/index.d.ts.map +1 -1
- package/dist/types/types/api/endpoints.d.ts +4 -2
- package/dist/types/types/api/endpoints.d.ts.map +1 -1
- package/dist/types/types/api/models/capital.d.ts +10 -6
- package/dist/types/types/api/models/capital.d.ts.map +1 -1
- package/dist/types/types/api/resources/BalanceAccountsResource.d.ts +56 -28
- package/dist/types/types/api/resources/BalanceAccountsResource.d.ts.map +1 -1
- package/dist/types/types/api/resources/CapitalGrantOffersResource.d.ts +182 -0
- package/dist/types/types/api/resources/CapitalGrantOffersResource.d.ts.map +1 -0
- package/dist/types/types/api/resources/CapitalGrantsResource.d.ts +190 -0
- package/dist/types/types/api/resources/CapitalGrantsResource.d.ts.map +1 -0
- package/dist/types/types/api/resources/CapitalMissingActionsResource.d.ts +112 -0
- package/dist/types/types/api/resources/CapitalMissingActionsResource.d.ts.map +1 -0
- package/dist/types/types/api/resources/SetupResource.d.ts +33 -15
- package/dist/types/types/api/resources/SetupResource.d.ts.map +1 -1
- package/dist/types/utils/abort/main.d.ts +1 -2
- package/dist/types/utils/abort/main.d.ts.map +1 -1
- package/dist/{upload-deLJWgy1.cjs → upload-CwRQ9v3Y.cjs} +2 -2
- package/dist/{upload-deLJWgy1.cjs.map → upload-CwRQ9v3Y.cjs.map} +1 -1
- package/dist/{warning-DhLYlOp4.cjs → warning-DBphva9h.cjs} +2 -2
- package/dist/{warning-DhLYlOp4.cjs.map → warning-DBphva9h.cjs.map} +1 -1
- package/dist/{warning-filled-B9O_Hc7Y.cjs → warning-filled-Ctsg1oEC.cjs} +2 -2
- package/dist/{warning-filled-B9O_Hc7Y.cjs.map → warning-filled-Ctsg1oEC.cjs.map} +1 -1
- package/package.json +20 -43
- package/dist/es/components/external/CapitalOverview/components/GrantAction/GrantAction.js +0 -65
- package/dist/es/components/external/CapitalOverview/components/GrantAction/constants.js +0 -6
- package/dist/es/components/internal/SVGIcons/CheckedBox.js +0 -15
- package/dist/es/components/internal/SVGIcons/Checkmark.js +0 -17
- package/dist/es/components/internal/SVGIcons/ChevronDown.js +0 -17
- package/dist/es/components/internal/SVGIcons/ChevronLeft.js +0 -17
- package/dist/es/components/internal/SVGIcons/ChevronRight.js +0 -17
- package/dist/es/components/internal/SVGIcons/ChevronUp.js +0 -17
- package/dist/es/components/internal/SVGIcons/CloseCircle.js +0 -16
- package/dist/es/components/internal/SVGIcons/Download.js +0 -20
- package/dist/es/components/internal/SVGIcons/UncheckedBox.js +0 -9
- package/dist/es/components/internal/SVGIcons/Warning.js +0 -21
- package/dist/index-CmIP-V4s.cjs +0 -12
- package/dist/index-CmIP-V4s.cjs.map +0 -1
- package/dist/types/components/external/CapitalOverview/components/GrantAction/GrantAction.d.ts +0 -5
- package/dist/types/components/external/CapitalOverview/components/GrantAction/GrantAction.d.ts.map +0 -1
- package/dist/types/components/external/CapitalOverview/components/GrantAction/constants.d.ts +0 -4
- package/dist/types/components/external/CapitalOverview/components/GrantAction/types.d.ts +0 -7
- package/dist/types/components/external/CapitalOverview/components/GrantAction/types.d.ts.map +0 -1
- package/dist/types/components/external/CapitalOverview/components/GrantAction/utils.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/CheckedBox.d.ts +0 -10
- package/dist/types/components/internal/SVGIcons/CheckedBox.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/Checkmark.d.ts +0 -10
- package/dist/types/components/internal/SVGIcons/Checkmark.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/ChevronDown.d.ts +0 -10
- package/dist/types/components/internal/SVGIcons/ChevronDown.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts +0 -10
- package/dist/types/components/internal/SVGIcons/ChevronLeft.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts +0 -10
- package/dist/types/components/internal/SVGIcons/ChevronRight.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/ChevronUp.d.ts +0 -10
- package/dist/types/components/internal/SVGIcons/ChevronUp.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/CloseCircle.d.ts +0 -7
- package/dist/types/components/internal/SVGIcons/CloseCircle.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/Download.d.ts +0 -7
- package/dist/types/components/internal/SVGIcons/Download.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/UncheckedBox.d.ts +0 -10
- package/dist/types/components/internal/SVGIcons/UncheckedBox.d.ts.map +0 -1
- package/dist/types/components/internal/SVGIcons/Warning.d.ts +0 -7
- package/dist/types/components/internal/SVGIcons/Warning.d.ts.map +0 -1
- package/dist/types/types/api/resources/CapitalResource.d.ts +0 -255
- package/dist/types/types/api/resources/CapitalResource.d.ts.map +0 -1
- /package/dist/es/components/external/CapitalOverview/components/{GrantAction → GrantActions}/utils.js +0 -0
- /package/dist/types/components/external/CapitalOverview/components/{GrantAction → GrantActions}/utils.d.ts +0 -0
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
import { jsx as e } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
import N from "../SVGIcons/ChevronUp.js";
|
|
6
|
-
import { ACCORDION_HEADER_CLASS as O, ACCORDION_HEADER_CONTAINER_CLASS as p, ACCORDION_HEADER_CONTROLLER_CLASS as E, ACCORDION_CONTENT_CLASS as S, ACCORDION_BASE_CLASS as _ } from "./constants.js";
|
|
2
|
+
import C from "classnames";
|
|
3
|
+
import { useState as m, useRef as A, useCallback as N } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
|
+
import { ACCORDION_HEADER_CLASS as O, ACCORDION_HEADER_CONTAINER_CLASS as E, ACCORDION_HEADER_CONTROLLER_CLASS as S, ACCORDION_CONTENT_CLASS as _, ACCORDION_BASE_CLASS as p } from "./constants.js";
|
|
7
5
|
/* empty css */
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import { Icon as n } from "../Icon/Icon.js";
|
|
7
|
+
function x({ children: i, classNames: l, header: s, headerInformation: c }) {
|
|
8
|
+
var a;
|
|
9
|
+
const [o, t] = m(!1), r = A(null), d = N(() => {
|
|
10
|
+
t(!o);
|
|
12
11
|
}, [o]);
|
|
13
|
-
return /* @__PURE__ */ e("div", { className:
|
|
12
|
+
return /* @__PURE__ */ e("div", { className: C(p, l), children: [
|
|
14
13
|
/* @__PURE__ */ e("h3", { className: O, children: [
|
|
15
14
|
/* @__PURE__ */ e(
|
|
16
15
|
"button",
|
|
17
16
|
{
|
|
18
17
|
id: "accordion-controller",
|
|
19
18
|
"aria-controls": "accordion-content",
|
|
20
|
-
className:
|
|
21
|
-
onClick:
|
|
19
|
+
className: E,
|
|
20
|
+
onClick: d,
|
|
22
21
|
"aria-expanded": o,
|
|
23
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
24
|
-
|
|
25
|
-
o ? /* @__PURE__ */ e(
|
|
22
|
+
children: /* @__PURE__ */ e("div", { className: S, children: [
|
|
23
|
+
s,
|
|
24
|
+
o ? /* @__PURE__ */ e(n, { name: "chevron-up" }) : /* @__PURE__ */ e(n, { name: "chevron-down" })
|
|
26
25
|
] })
|
|
27
26
|
}
|
|
28
27
|
),
|
|
29
|
-
|
|
28
|
+
c && /* @__PURE__ */ e("div", { children: c })
|
|
30
29
|
] }),
|
|
31
30
|
/* @__PURE__ */ e(
|
|
32
31
|
"div",
|
|
@@ -34,13 +33,13 @@ function L({ children: a, classNames: c, header: n, headerInformation: i }) {
|
|
|
34
33
|
role: "region",
|
|
35
34
|
id: "accordion-content",
|
|
36
35
|
"aria-labelledby": "accordion-controller",
|
|
37
|
-
style: { maxHeight: o ? (
|
|
38
|
-
className:
|
|
39
|
-
children: /* @__PURE__ */ e("div", { ref: r, children:
|
|
36
|
+
style: { maxHeight: o ? (a = r == null ? void 0 : r.current) == null ? void 0 : a.offsetHeight : 0 },
|
|
37
|
+
className: _,
|
|
38
|
+
children: /* @__PURE__ */ e("div", { ref: r, children: i })
|
|
40
39
|
}
|
|
41
40
|
)
|
|
42
41
|
] });
|
|
43
42
|
}
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
x as default
|
|
46
45
|
};
|
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
import { jsx as o } from "../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import L from "classnames";
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
5
|
-
import { useResponsiveContainer as
|
|
6
|
-
import y from "
|
|
7
|
-
import C from "../Button.js";
|
|
3
|
+
import { useState as T, useEffect as p, useMemo as k } from "../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
|
+
import g from "../../../../core/Context/useCoreContext.js";
|
|
5
|
+
import { useResponsiveContainer as x, containerQueries as E } from "../../../../hooks/useResponsiveContainer.js";
|
|
6
|
+
import y from "../Button.js";
|
|
8
7
|
import { ButtonVariant as b } from "../types.js";
|
|
9
|
-
import
|
|
8
|
+
import I from "./useDownload.js";
|
|
10
9
|
/* empty css */
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
import N from "../../Spinner/Spinner.js";
|
|
11
|
+
import { Icon as S } from "../../Icon/Icon.js";
|
|
12
|
+
import { Fragment as U } from "../../../../external/preact/dist/preact.module.js";
|
|
13
|
+
function j({ blob: c, filename: s }) {
|
|
14
|
+
const n = document.createElement("a"), i = URL.createObjectURL(c);
|
|
15
|
+
n.href = i, n.download = s || "download";
|
|
16
16
|
const r = () => {
|
|
17
17
|
setTimeout(() => {
|
|
18
18
|
URL.revokeObjectURL(i);
|
|
19
19
|
}, 150);
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
n.addEventListener("click", r, { once: !0 }), n.click();
|
|
22
22
|
}
|
|
23
23
|
function J({
|
|
24
|
-
className:
|
|
25
|
-
disabled:
|
|
26
|
-
endpointName:
|
|
24
|
+
className: c,
|
|
25
|
+
disabled: s,
|
|
26
|
+
endpointName: n,
|
|
27
27
|
requestParams: i,
|
|
28
28
|
setError: r,
|
|
29
29
|
errorDisplay: w,
|
|
30
|
-
onDownloadRequested:
|
|
31
|
-
iconButton:
|
|
30
|
+
onDownloadRequested: l,
|
|
31
|
+
iconButton: t = !1,
|
|
32
32
|
errorMessage: h
|
|
33
33
|
}) {
|
|
34
|
-
const { i18n:
|
|
34
|
+
const { i18n: m } = g(), [f, _] = T(!1), C = x(E.down.xs), { data: u, error: e, isFetching: a } = I(n, i, f);
|
|
35
35
|
p(() => {
|
|
36
|
-
|
|
37
|
-
}, [m]), p(() => {
|
|
38
|
-
f && A(f);
|
|
36
|
+
f && _(!1);
|
|
39
37
|
}, [f]), p(() => {
|
|
40
|
-
|
|
41
|
-
}, [
|
|
38
|
+
u && j(u);
|
|
39
|
+
}, [u]), p(() => {
|
|
40
|
+
r && e && r(e);
|
|
41
|
+
}, [e, r]);
|
|
42
42
|
const v = () => {
|
|
43
|
-
_(!0),
|
|
44
|
-
},
|
|
45
|
-
return /* @__PURE__ */ o(
|
|
43
|
+
_(!0), l == null || l();
|
|
44
|
+
}, d = k(() => a ? /* @__PURE__ */ o(N, { size: "small" }) : /* @__PURE__ */ o(S, { name: "download" }), [a]), R = k(() => t ? d : a ? `${m.get("downloading")}..` : m.get("download"), [d, m, a, t]);
|
|
45
|
+
return /* @__PURE__ */ o(U, { children: [
|
|
46
46
|
/* @__PURE__ */ o(
|
|
47
47
|
"div",
|
|
48
48
|
{
|
|
49
49
|
className: L("adyen-pe-download", {
|
|
50
|
-
"adyen-pe-download-icon-button-container":
|
|
50
|
+
"adyen-pe-download-icon-button-container": t
|
|
51
51
|
}),
|
|
52
52
|
children: [
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
C ? /* @__PURE__ */ o(y, { iconButton: !0, variant: b.TERTIARY, onClick: v, children: d }) : /* @__PURE__ */ o(
|
|
54
|
+
y,
|
|
55
55
|
{
|
|
56
56
|
className: L(
|
|
57
57
|
"adyen-pe-download__button",
|
|
58
|
-
{ "adyen-pe-download__button--loading":
|
|
59
|
-
|
|
58
|
+
{ "adyen-pe-download__button--loading": a, "adyen-pe-download__button--icon": t },
|
|
59
|
+
c
|
|
60
60
|
),
|
|
61
|
-
disabled:
|
|
62
|
-
variant:
|
|
61
|
+
disabled: s || a,
|
|
62
|
+
variant: t ? b.TERTIARY : b.SECONDARY,
|
|
63
63
|
onClick: v,
|
|
64
|
-
...!
|
|
65
|
-
children:
|
|
64
|
+
...!t && { iconLeft: d },
|
|
65
|
+
children: R
|
|
66
66
|
}
|
|
67
67
|
),
|
|
68
|
-
|
|
68
|
+
e && w && /* @__PURE__ */ o("div", { className: "adyen-pe-download__error", children: w })
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
),
|
|
72
|
-
|
|
72
|
+
e && h && h(e)
|
|
73
73
|
] });
|
|
74
74
|
}
|
|
75
75
|
export {
|
|
@@ -1,41 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { ButtonVariant as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import C from "../../../../hooks/element/useDetachedRender.js";
|
|
1
|
+
import { jsx as s } from "../../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
|
+
import { ButtonVariant as c } from "../../Button/types.js";
|
|
3
|
+
import { useCallback as m } from "../../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
|
+
import f from "../../../../core/Context/useCoreContext.js";
|
|
5
|
+
import d from "../../../../hooks/element/useDetachedRender.js";
|
|
6
|
+
import { Icon as p } from "../../Icon/Icon.js";
|
|
8
7
|
import b from "../../Button/Button.js";
|
|
9
8
|
import { isFunction as h } from "../../../../utils/value/is.js";
|
|
10
|
-
const
|
|
11
|
-
const { i18n: a } =
|
|
12
|
-
return
|
|
13
|
-
|
|
9
|
+
const g = (e) => {
|
|
10
|
+
const { i18n: a } = f();
|
|
11
|
+
return d(
|
|
12
|
+
m(
|
|
14
13
|
(u, r, t) => {
|
|
15
14
|
if (!(u instanceof HTMLElement)) return null;
|
|
16
15
|
if (h(e)) return e(r, t);
|
|
17
16
|
let o, i, n;
|
|
18
17
|
switch (r) {
|
|
19
18
|
case "PREV":
|
|
20
|
-
o = "prev", i = "previous", n =
|
|
19
|
+
o = "prev", i = "previous", n = "chevron-left";
|
|
21
20
|
break;
|
|
22
21
|
case "NEXT":
|
|
23
|
-
o = i = "next", n =
|
|
22
|
+
o = i = "next", n = "chevron-right";
|
|
24
23
|
break;
|
|
25
24
|
default:
|
|
26
25
|
return null;
|
|
27
26
|
}
|
|
28
|
-
const
|
|
29
|
-
return
|
|
27
|
+
const l = t();
|
|
28
|
+
return l ? /* @__PURE__ */ s(
|
|
30
29
|
b,
|
|
31
30
|
{
|
|
32
31
|
"aria-label": a.get(`calendar.${i}Month`),
|
|
33
|
-
variant:
|
|
34
|
-
disabled: !
|
|
32
|
+
variant: c.TERTIARY,
|
|
33
|
+
disabled: !l,
|
|
35
34
|
classNameModifiers: ["circle", o],
|
|
36
35
|
iconButton: !0,
|
|
37
36
|
onClick: t,
|
|
38
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ s(p, { name: n })
|
|
39
38
|
},
|
|
40
39
|
r
|
|
41
40
|
) : null;
|
|
@@ -45,5 +44,5 @@ const w = (e) => {
|
|
|
45
44
|
);
|
|
46
45
|
};
|
|
47
46
|
export {
|
|
48
|
-
|
|
47
|
+
g as default
|
|
49
48
|
};
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s } from "../../../external/preact/jsx-runtime/dist/jsxRuntime.module.js";
|
|
2
2
|
import n from "classnames";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useClickOutside as
|
|
5
|
-
import
|
|
6
|
-
import z from "../SVGIcons/ChevronUp.js";
|
|
7
|
-
import U from "../SVGIcons/ChevronDown.js";
|
|
3
|
+
import { useState as I, useMemo as V, useCallback as x, useRef as i, useLayoutEffect as Y, useEffect as b } from "../../../external/preact/hooks/dist/hooks.module.js";
|
|
4
|
+
import { useClickOutside as w } from "../../../hooks/element/useClickOutside.js";
|
|
5
|
+
import z from "../../../core/Context/useCoreContext.js";
|
|
8
6
|
/* empty css */
|
|
9
|
-
import { CARD_HEIGHT_PROPERTY as y, BASE_CLASS as j, CONTAINER_OVERLAY_ID as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
import { CARD_HEIGHT_PROPERTY as y, BASE_CLASS as j, CONTAINER_OVERLAY_ID as p, CONTENT_CLASS as C, CONTENT_EXPANDABLE_CLASS as g, CHEVRON_CLASS as k, CONTAINER_CLASS as N, CONTAINER_BUTTON_CLASS as B, CONTAINER_FILLED_CLASS as A, CONTAINER_OVERLAY_CLASS as q, CONTAINER_IN_FLOW_CLASS as G, CONTAINER_HIDDEN_CLASS as M } from "./constants.js";
|
|
8
|
+
import { Fragment as U } from "../../../external/preact/dist/preact.module.js";
|
|
9
|
+
import D from "../BaseButton/BaseButton.js";
|
|
10
|
+
import { Icon as H } from "../Icon/Icon.js";
|
|
11
|
+
const ae = ({ renderHeader: c, children: O, filled: d, fullWidth: E, inFlow: S, ...l }) => {
|
|
12
|
+
const { i18n: _ } = z(), [e, h] = I(!1), [v, R] = I(0), t = V(() => S === !0, [S]), o = x(() => h((r) => !r), [h]), u = i(null), L = i(null), m = i(!1), T = i(e), f = w(
|
|
14
13
|
void 0,
|
|
15
|
-
|
|
14
|
+
x(() => {
|
|
16
15
|
e && (o(), m.current = !0);
|
|
17
16
|
}, [e, o])
|
|
18
17
|
);
|
|
19
|
-
return
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
}, [v,
|
|
23
|
-
if (!
|
|
24
|
-
const
|
|
25
|
-
if (!
|
|
26
|
-
const
|
|
27
|
-
for (const
|
|
28
|
-
|
|
18
|
+
return Y(() => {
|
|
19
|
+
const r = L.current;
|
|
20
|
+
r && (t ? r.style.setProperty(y, `${v}px`) : e || r.style.removeProperty(y));
|
|
21
|
+
}, [v, t, e]), b(() => {
|
|
22
|
+
if (!t) return void R(0);
|
|
23
|
+
const r = u.current;
|
|
24
|
+
if (!r) return;
|
|
25
|
+
const a = new ResizeObserver((P) => {
|
|
26
|
+
for (const F of P)
|
|
27
|
+
F.target === r && R(r.offsetHeight || 0);
|
|
29
28
|
});
|
|
30
|
-
return
|
|
31
|
-
|
|
29
|
+
return a.observe(r), () => {
|
|
30
|
+
a.unobserve(r), a.disconnect();
|
|
32
31
|
};
|
|
33
|
-
}, [
|
|
34
|
-
var
|
|
35
|
-
e ? (
|
|
36
|
-
}, [e,
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
32
|
+
}, [t]), b(() => {
|
|
33
|
+
var r, a;
|
|
34
|
+
e ? (r = f.current) == null || r.focus() : (T.current !== e && !m.current && ((a = u.current) == null || a.focus()), m.current = !1), T.current = e;
|
|
35
|
+
}, [e, f]), /* @__PURE__ */ s("div", { ref: L, className: j, children: O ? /* @__PURE__ */ s(U, { children: [
|
|
36
|
+
/* @__PURE__ */ s(
|
|
37
|
+
D,
|
|
39
38
|
{
|
|
40
|
-
className: n(N,
|
|
39
|
+
className: n(N, B, { [A]: d }),
|
|
41
40
|
disabled: e,
|
|
42
41
|
fullWidth: E,
|
|
43
|
-
"aria-controls":
|
|
42
|
+
"aria-controls": p,
|
|
44
43
|
"aria-expanded": e,
|
|
45
44
|
"aria-hidden": e,
|
|
46
45
|
onClick: o,
|
|
@@ -48,42 +47,42 @@ const ne = ({ renderHeader: c, children: O, filled: d, fullWidth: E, inFlow: S,
|
|
|
48
47
|
"data-testid": "expand-button",
|
|
49
48
|
...l,
|
|
50
49
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ s("span", { className: "adyen-pe-visually-hidden", children: _.get("expandableCard.expand") }),
|
|
51
|
+
/* @__PURE__ */ s("div", { className: n(C, g), children: c }),
|
|
52
|
+
/* @__PURE__ */ s("div", { className: k, children: /* @__PURE__ */ s(H, { name: "chevron-down" }) })
|
|
54
53
|
]
|
|
55
54
|
}
|
|
56
55
|
),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
56
|
+
/* @__PURE__ */ s(
|
|
57
|
+
D,
|
|
59
58
|
{
|
|
60
|
-
id:
|
|
61
|
-
className: n(N,
|
|
59
|
+
id: p,
|
|
60
|
+
className: n(N, B, q, {
|
|
62
61
|
[A]: d,
|
|
63
62
|
[M]: !e,
|
|
64
|
-
[G]:
|
|
63
|
+
[G]: t
|
|
65
64
|
}),
|
|
66
65
|
disabled: !e,
|
|
67
66
|
fullWidth: E,
|
|
68
|
-
"aria-controls":
|
|
67
|
+
"aria-controls": p,
|
|
69
68
|
"aria-expanded": e,
|
|
70
69
|
"aria-hidden": !e,
|
|
71
70
|
onClick: o,
|
|
72
|
-
ref:
|
|
71
|
+
ref: f,
|
|
73
72
|
"data-testid": "collapse-button",
|
|
74
73
|
...l,
|
|
75
74
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ s("span", { className: "adyen-pe-visually-hidden", children: _.get("expandableCard.collapse") }),
|
|
76
|
+
/* @__PURE__ */ s("div", { className: n(C, g), children: [
|
|
78
77
|
c,
|
|
79
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ s("div", { children: O })
|
|
80
79
|
] }),
|
|
81
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ s("div", { className: k, children: /* @__PURE__ */ s(H, { name: "chevron-up" }) })
|
|
82
81
|
]
|
|
83
82
|
}
|
|
84
83
|
)
|
|
85
|
-
] }) : /* @__PURE__ */
|
|
84
|
+
] }) : /* @__PURE__ */ s("div", { className: n(N, { [A]: d }), ...l, children: /* @__PURE__ */ s("div", { className: C, children: c }) }) });
|
|
86
85
|
};
|
|
87
86
|
export {
|
|
88
|
-
|
|
87
|
+
ae as default
|
|
89
88
|
};
|
|
@@ -37,9 +37,9 @@ const $e = ({
|
|
|
37
37
|
fitPosition: ee,
|
|
38
38
|
fixedPopoverPositioning: te
|
|
39
39
|
}) => {
|
|
40
|
-
const { resetSelection: f, select:
|
|
41
|
-
d(""), i(!1),
|
|
42
|
-
}, [f, i, d,
|
|
40
|
+
const { resetSelection: f, select: v, selection: o } = ge({ items: g, multiSelect: m, selected: H }), [n, i] = W(!1), [k, d] = W(""), E = a(null), p = a(null), h = a(null), F = a(`select-${Se()}`), I = a(), R = a(!0), C = a(!1), L = a(o), B = a(o), re = $(() => o.length, [o]), se = l(() => {
|
|
41
|
+
d(""), i(!1), n && (f(L.current), R.current = !0);
|
|
42
|
+
}, [f, i, d, n]), oe = $(
|
|
43
43
|
() => de([
|
|
44
44
|
K,
|
|
45
45
|
{ [Ee]: De(m) },
|
|
@@ -47,16 +47,16 @@ const $e = ({
|
|
|
47
47
|
w
|
|
48
48
|
]),
|
|
49
49
|
[w, O, m]
|
|
50
|
-
), { commitAction: x, commitActionButtons:
|
|
51
|
-
resetDisabled: !
|
|
50
|
+
), { commitAction: x, commitActionButtons: ne, committing: y, resetCommitAction: N } = Re({
|
|
51
|
+
resetDisabled: !o.length
|
|
52
52
|
}), c = l(() => {
|
|
53
53
|
var e;
|
|
54
54
|
d(""), i(!1), N(), R.current ? R.current = !1 : (e = h.current) == null || e.focus();
|
|
55
55
|
}, [N, i, d]), S = l(() => {
|
|
56
|
-
L.current =
|
|
57
|
-
const e = `${
|
|
56
|
+
L.current = o;
|
|
57
|
+
const e = `${o.map(({ id: t }) => t)}`;
|
|
58
58
|
P({ target: { value: e, name: _ } });
|
|
59
|
-
}, [_, P,
|
|
59
|
+
}, [_, P, o]);
|
|
60
60
|
b(() => {
|
|
61
61
|
switch (x) {
|
|
62
62
|
case U.APPLY:
|
|
@@ -74,14 +74,14 @@ const $e = ({
|
|
|
74
74
|
const t = e.currentTarget && ((r = p == null ? void 0 : p.current) != null && r.contains(e.currentTarget)) ? e.currentTarget : null;
|
|
75
75
|
if (t && !t.getAttribute("data-disabled")) {
|
|
76
76
|
const ue = t.getAttribute("data-value"), me = g.find((fe) => fe.id === ue);
|
|
77
|
-
|
|
77
|
+
v(me);
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
|
-
[g,
|
|
80
|
+
[g, v]
|
|
81
81
|
);
|
|
82
82
|
b(() => {
|
|
83
|
-
B.current !==
|
|
84
|
-
}, [c, S, m,
|
|
83
|
+
B.current !== o && (B.current = o, (!m || C.current) && (S(), c())), C.current = !1;
|
|
84
|
+
}, [c, S, m, o]), b(() => {
|
|
85
85
|
y && c();
|
|
86
86
|
}, [y, c]);
|
|
87
87
|
const ce = l(
|
|
@@ -89,11 +89,11 @@ const $e = ({
|
|
|
89
89
|
switch (e.code) {
|
|
90
90
|
case s.ESCAPE:
|
|
91
91
|
case s.TAB:
|
|
92
|
-
|
|
92
|
+
n && c(), R.current = e.key === s.TAB;
|
|
93
93
|
return;
|
|
94
94
|
case s.ENTER:
|
|
95
95
|
case s.SPACE:
|
|
96
|
-
if (u &&
|
|
96
|
+
if (u && n) {
|
|
97
97
|
if (e.key === s.ENTER)
|
|
98
98
|
if (k) A(e);
|
|
99
99
|
else break;
|
|
@@ -108,10 +108,10 @@ const $e = ({
|
|
|
108
108
|
}
|
|
109
109
|
e.preventDefault(), i(!0);
|
|
110
110
|
},
|
|
111
|
-
[c, u, A,
|
|
111
|
+
[c, u, A, n, i, k]
|
|
112
112
|
);
|
|
113
113
|
b(() => {
|
|
114
|
-
|
|
114
|
+
n && (cancelAnimationFrame(I.current), I.current = requestAnimationFrame(() => {
|
|
115
115
|
var e;
|
|
116
116
|
e: {
|
|
117
117
|
let t = (e = p.current) == null ? void 0 : e.firstElementChild, r;
|
|
@@ -128,7 +128,7 @@ const $e = ({
|
|
|
128
128
|
r && r.focus();
|
|
129
129
|
}
|
|
130
130
|
}));
|
|
131
|
-
}, [
|
|
131
|
+
}, [n]);
|
|
132
132
|
const ae = l(
|
|
133
133
|
(e) => {
|
|
134
134
|
const t = e.target;
|
|
@@ -181,20 +181,20 @@ const $e = ({
|
|
|
181
181
|
[d]
|
|
182
182
|
), le = l(
|
|
183
183
|
(e) => {
|
|
184
|
-
e.preventDefault(), i((t) => !t),
|
|
184
|
+
e.preventDefault(), i((t) => !t), n && f(L.current);
|
|
185
185
|
},
|
|
186
|
-
[i,
|
|
186
|
+
[i, n, f]
|
|
187
187
|
);
|
|
188
188
|
return b(() => {
|
|
189
189
|
var e;
|
|
190
|
-
|
|
191
|
-
}, [u,
|
|
190
|
+
n && u && ((e = E.current) == null || e.focus());
|
|
191
|
+
}, [u, n]), /* @__PURE__ */ T("div", { className: oe, children: [
|
|
192
192
|
/* @__PURE__ */ T(
|
|
193
193
|
Ae,
|
|
194
194
|
{
|
|
195
195
|
id: D ?? void 0,
|
|
196
196
|
appliedFilterNumber: re,
|
|
197
|
-
active:
|
|
197
|
+
active: o,
|
|
198
198
|
filterInputRef: E,
|
|
199
199
|
filterable: u,
|
|
200
200
|
isInvalid: X,
|
|
@@ -204,12 +204,12 @@ const $e = ({
|
|
|
204
204
|
multiSelect: m,
|
|
205
205
|
placeholder: z,
|
|
206
206
|
readonly: j,
|
|
207
|
-
selectListId:
|
|
208
|
-
showList:
|
|
207
|
+
selectListId: F.current,
|
|
208
|
+
showList: n,
|
|
209
209
|
toggleButtonRef: h,
|
|
210
210
|
toggleList: le,
|
|
211
211
|
withoutCollapseIndicator: V,
|
|
212
|
-
ariaDescribedBy: !J && D ? `${D}${pe}` :
|
|
212
|
+
ariaDescribedBy: !J && D ? `${D}${pe}` : void 0
|
|
213
213
|
}
|
|
214
214
|
),
|
|
215
215
|
/* @__PURE__ */ T(
|
|
@@ -218,17 +218,17 @@ const $e = ({
|
|
|
218
218
|
popoverClassNameModifiers: M,
|
|
219
219
|
setToTargetWidth: Q,
|
|
220
220
|
dismissPopover: se,
|
|
221
|
-
active:
|
|
222
|
-
commitActions:
|
|
221
|
+
active: o,
|
|
222
|
+
commitActions: ne,
|
|
223
223
|
items: g,
|
|
224
224
|
multiSelect: m,
|
|
225
225
|
onKeyDown: ae,
|
|
226
226
|
onSelect: A,
|
|
227
|
-
selectListId:
|
|
227
|
+
selectListId: F.current,
|
|
228
228
|
ref: p,
|
|
229
229
|
toggleButtonRef: h,
|
|
230
230
|
renderListItem: G,
|
|
231
|
-
showList:
|
|
231
|
+
showList: n,
|
|
232
232
|
showOverlay: Z,
|
|
233
233
|
textFilter: k,
|
|
234
234
|
fitPosition: ee,
|