@adyen/adyen-platform-experience-web 1.6.1 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/adyen-platform-experience-web.css +1 -1
- package/dist/{angle-right-K64mXtoy.cjs → angle-right-B_Kz-Soi.cjs} +2 -2
- package/dist/{angle-right-K64mXtoy.cjs.map → angle-right-B_Kz-Soi.cjs.map} +1 -1
- package/dist/{checkmark-BFOfQ4U3.cjs → checkmark-Bt5aK45t.cjs} +2 -2
- package/dist/{checkmark-BFOfQ4U3.cjs.map → checkmark-Bt5aK45t.cjs.map} +1 -1
- package/dist/{checkmark-circle-fill-BV2FvQh0.cjs → checkmark-circle-fill-Dj3n3yzE.cjs} +2 -2
- package/dist/{checkmark-circle-fill-BV2FvQh0.cjs.map → checkmark-circle-fill-Dj3n3yzE.cjs.map} +1 -1
- package/dist/{checkmark-square-fill-B6rUSLy6.cjs → checkmark-square-fill-BNqyiPF6.cjs} +2 -2
- package/dist/{checkmark-square-fill-B6rUSLy6.cjs.map → checkmark-square-fill-BNqyiPF6.cjs.map} +1 -1
- package/dist/{chevron-down-Cwk2F1N2.cjs → chevron-down-DnrSOx9O.cjs} +2 -2
- package/dist/{chevron-down-Cwk2F1N2.cjs.map → chevron-down-DnrSOx9O.cjs.map} +1 -1
- package/dist/{chevron-left-3kfyOgH8.cjs → chevron-left-C_f4u0I5.cjs} +2 -2
- package/dist/{chevron-left-3kfyOgH8.cjs.map → chevron-left-C_f4u0I5.cjs.map} +1 -1
- package/dist/{chevron-right-DlSewmYP.cjs → chevron-right-Czq7FxC3.cjs} +2 -2
- package/dist/{chevron-right-DlSewmYP.cjs.map → chevron-right-Czq7FxC3.cjs.map} +1 -1
- package/dist/{chevron-up-DcHOD7ve.cjs → chevron-up-BXVWsLTn.cjs} +2 -2
- package/dist/{chevron-up-DcHOD7ve.cjs.map → chevron-up-BXVWsLTn.cjs.map} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/{copy-DmBUwp7_.cjs → copy-lj8E2K1q.cjs} +2 -2
- package/dist/{copy-DmBUwp7_.cjs.map → copy-lj8E2K1q.cjs.map} +1 -1
- package/dist/{cross-JGXC9RPo.cjs → cross-C86HY6Aq.cjs} +2 -2
- package/dist/{cross-JGXC9RPo.cjs.map → cross-C86HY6Aq.cjs.map} +1 -1
- package/dist/{cross-circle-fill-CepPVSd-.cjs → cross-circle-fill-Dn4tMQm-.cjs} +2 -2
- package/dist/{cross-circle-fill-CepPVSd-.cjs.map → cross-circle-fill-Dn4tMQm-.cjs.map} +1 -1
- package/dist/da-DK-DGZE3EGg.cjs +2 -0
- package/dist/da-DK-DGZE3EGg.cjs.map +1 -0
- package/dist/de-DE-9pv11e0L.cjs +2 -0
- package/dist/de-DE-9pv11e0L.cjs.map +1 -0
- package/dist/{download-BToMR9ry.cjs → download-Cy7xih0a.cjs} +2 -2
- package/dist/{download-BToMR9ry.cjs.map → download-Cy7xih0a.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/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/translations/da-DK.json.js +13 -9
- package/dist/es/translations/de-DE.json.js +21 -17
- package/dist/es/translations/en-US.json.js +4 -0
- package/dist/es/translations/es-ES.json.js +4 -0
- package/dist/es/translations/fi-FI.json.js +25 -21
- package/dist/es/translations/fr-FR.json.js +4 -0
- package/dist/es/translations/it-IT.json.js +13 -9
- package/dist/es/translations/nl-NL.json.js +24 -20
- package/dist/es/translations/no-NO.json.js +13 -9
- package/dist/es/translations/pt-BR.json.js +21 -17
- package/dist/es/translations/sv-SE.json.js +37 -33
- package/dist/es-ES-D6VDUzry.cjs +2 -0
- package/dist/es-ES-D6VDUzry.cjs.map +1 -0
- package/dist/{external-link-BRDaK3Bx.cjs → external-link-BjGtsB9t.cjs} +2 -2
- package/dist/{external-link-BRDaK3Bx.cjs.map → external-link-BjGtsB9t.cjs.map} +1 -1
- package/dist/fi-FI-BXENpiYZ.cjs +2 -0
- package/dist/fi-FI-BXENpiYZ.cjs.map +1 -0
- package/dist/{filter-DXSSpM1j.cjs → filter-BtmgQQnO.cjs} +2 -2
- package/dist/{filter-DXSSpM1j.cjs.map → filter-BtmgQQnO.cjs.map} +1 -1
- package/dist/fr-FR-Wdv9KpRU.cjs +2 -0
- package/dist/fr-FR-Wdv9KpRU.cjs.map +1 -0
- package/dist/index-KwnekN5q.cjs +12 -0
- package/dist/index-KwnekN5q.cjs.map +1 -0
- package/dist/{info-filled-CqqSx6ab.cjs → info-filled-qhtLEsRp.cjs} +2 -2
- package/dist/{info-filled-CqqSx6ab.cjs.map → info-filled-qhtLEsRp.cjs.map} +1 -1
- package/dist/it-IT-BilhrzQU.cjs +2 -0
- package/dist/it-IT-BilhrzQU.cjs.map +1 -0
- package/dist/{minus-circle-outline-C_OF3LwJ.cjs → minus-circle-outline-FwHPAm69.cjs} +2 -2
- package/dist/{minus-circle-outline-C_OF3LwJ.cjs.map → minus-circle-outline-FwHPAm69.cjs.map} +1 -1
- package/dist/nl-NL-sS32YCMv.cjs +2 -0
- package/dist/nl-NL-sS32YCMv.cjs.map +1 -0
- package/dist/no-NO-BI6Lh_XZ.cjs +2 -0
- package/dist/no-NO-BI6Lh_XZ.cjs.map +1 -0
- package/dist/{plus-CW8c0zs1.cjs → plus-Co9bdXpT.cjs} +2 -2
- package/dist/{plus-CW8c0zs1.cjs.map → plus-Co9bdXpT.cjs.map} +1 -1
- package/dist/{plus-circle-outline-DJ6zGU6z.cjs → plus-circle-outline-Ct17pCxc.cjs} +2 -2
- package/dist/{plus-circle-outline-DJ6zGU6z.cjs.map → plus-circle-outline-Ct17pCxc.cjs.map} +1 -1
- package/dist/pt-BR-CPgtkO1G.cjs +2 -0
- package/dist/pt-BR-CPgtkO1G.cjs.map +1 -0
- package/dist/{square-2HAeIvAR.cjs → square-DfzvBn35.cjs} +2 -2
- package/dist/{square-2HAeIvAR.cjs.map → square-DfzvBn35.cjs.map} +1 -1
- package/dist/sv-SE-iE7b_5s7.cjs +2 -0
- package/dist/sv-SE-iE7b_5s7.cjs.map +1 -0
- package/dist/{trash-can-BLQ5Pm8W.cjs → trash-can-BFPrV8YZ.cjs} +2 -2
- package/dist/{trash-can-BLQ5Pm8W.cjs.map → trash-can-BFPrV8YZ.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/StructuredList/useStructuredListItem.d.ts +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/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-C9Z9qRuS.cjs → upload-R-xiaagk.cjs} +2 -2
- package/dist/{upload-C9Z9qRuS.cjs.map → upload-R-xiaagk.cjs.map} +1 -1
- package/dist/{warning-CIRG3GTY.cjs → warning-Cf3v_UdK.cjs} +2 -2
- package/dist/{warning-CIRG3GTY.cjs.map → warning-Cf3v_UdK.cjs.map} +1 -1
- package/dist/{warning-filled-3hD1yAKv.cjs → warning-filled-BBeLyOZV.cjs} +2 -2
- package/dist/{warning-filled-3hD1yAKv.cjs.map → warning-filled-BBeLyOZV.cjs.map} +1 -1
- package/package.json +20 -43
- package/dist/da-DK-DzyB6ApY.cjs +0 -2
- package/dist/da-DK-DzyB6ApY.cjs.map +0 -1
- package/dist/de-DE-C_manCYP.cjs +0 -2
- package/dist/de-DE-C_manCYP.cjs.map +0 -1
- 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/es-ES-D4yWVVk4.cjs +0 -2
- package/dist/es-ES-D4yWVVk4.cjs.map +0 -1
- package/dist/fi-FI-ziHSaIAM.cjs +0 -2
- package/dist/fi-FI-ziHSaIAM.cjs.map +0 -1
- package/dist/fr-FR-B-twXuu4.cjs +0 -2
- package/dist/fr-FR-B-twXuu4.cjs.map +0 -1
- package/dist/index-BKTWT4wv.cjs +0 -12
- package/dist/index-BKTWT4wv.cjs.map +0 -1
- package/dist/it-IT-CNU9GJon.cjs +0 -2
- package/dist/it-IT-CNU9GJon.cjs.map +0 -1
- package/dist/nl-NL-CWr5RWqD.cjs +0 -2
- package/dist/nl-NL-CWr5RWqD.cjs.map +0 -1
- package/dist/no-NO-CU-dleiK.cjs +0 -2
- package/dist/no-NO-CU-dleiK.cjs.map +0 -1
- package/dist/pt-BR-DJUsdwmX.cjs +0 -2
- package/dist/pt-BR-DJUsdwmX.cjs.map +0 -1
- package/dist/sv-SE-Btn3_SAD.cjs +0 -2
- package/dist/sv-SE-Btn3_SAD.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
package/dist/es/components/external/TransactionDetails/components/refund/TransactionRefundAmount.js
CHANGED
|
@@ -2,19 +2,19 @@ import { jsx as t } from "../../../../../external/preact/jsx-runtime/dist/jsxRun
|
|
|
2
2
|
import { TX_DATA_CONTAINER as U, TX_DATA_INPUT_HEAD as S, TX_DATA_INPUT as $, TX_DATA_INPUT_CONTAINER_WITH_ERROR as B, TX_DATA_INPUT_CONTAINER_TEXT as q, TX_DATA_INPUT_CONTAINER_SHORT as H, TX_DATA_INPUT_CONTAINER as L } from "../constants.js";
|
|
3
3
|
import M from "classnames";
|
|
4
4
|
import { useState as R, useMemo as V, useRef as v } from "../../../../../external/preact/hooks/dist/hooks.module.js";
|
|
5
|
-
import
|
|
6
|
-
import Y from "../../../../internal/
|
|
7
|
-
import j from "../../../../internal/FormFields/InputBase.js";
|
|
5
|
+
import O from "../../../../../core/Context/useCoreContext.js";
|
|
6
|
+
import Y from "../../../../internal/FormFields/InputBase.js";
|
|
8
7
|
import h from "../../../../internal/Typography/Typography.js";
|
|
9
8
|
import { TypographyVariant as b, TypographyElement as D } from "../../../../internal/Typography/types.js";
|
|
10
|
-
import { getDecimalAmount as
|
|
11
|
-
import { ARIA_ERROR_SUFFIX as
|
|
12
|
-
import { TagVariant as
|
|
13
|
-
import { Tag as
|
|
14
|
-
import { useTransactionRefundContext as
|
|
9
|
+
import { getDecimalAmount as j, getDivider as w } from "../../../../../core/Localization/amount/amount-util.js";
|
|
10
|
+
import { ARIA_ERROR_SUFFIX as W } from "../../../../../core/Errors/constants.js";
|
|
11
|
+
import { TagVariant as k } from "../../../../internal/Tag/types.js";
|
|
12
|
+
import { Tag as z } from "../../../../internal/Tag/Tag.js";
|
|
13
|
+
import { useTransactionRefundContext as P } from "../../context/refund/context.js";
|
|
14
|
+
import { Icon as G } from "../../../../internal/Icon/Icon.js";
|
|
15
15
|
import { uniqueId as E } from "../../../../../utils/random/uniqueId.js";
|
|
16
16
|
import { boolOrFalse as J } from "../../../../../utils/value/bool.js";
|
|
17
|
-
const
|
|
17
|
+
const x = (r, n) => j(r, n).toFixed(_(n)), _ = (r) => Math.log10(w(r)), y = ({
|
|
18
18
|
currency: r,
|
|
19
19
|
disabled: n,
|
|
20
20
|
errorMessage: e,
|
|
@@ -22,7 +22,7 @@ const P = (r, n) => w(r, n).toFixed(_(n)), _ = (r) => Math.log10(W(r)), x = ({
|
|
|
22
22
|
onInput: A,
|
|
23
23
|
value: T
|
|
24
24
|
}) => {
|
|
25
|
-
const { i18n: a } =
|
|
25
|
+
const { i18n: a } = O(), i = v(E()), m = v(E()), p = e ? l ? a.get(e, { values: { amount: l } }) : a.get(e) : "";
|
|
26
26
|
return /* @__PURE__ */ t("div", { className: U, children: [
|
|
27
27
|
/* @__PURE__ */ t("div", { className: S, children: /* @__PURE__ */ t("div", { id: m.current, children: /* @__PURE__ */ t(h, { el: D.SPAN, variant: b.BODY, stronger: !0, children: a.get("refundAmount") }) }) }),
|
|
28
28
|
/* @__PURE__ */ t(
|
|
@@ -36,9 +36,9 @@ const P = (r, n) => w(r, n).toFixed(_(n)), _ = (r) => Math.log10(W(r)), x = ({
|
|
|
36
36
|
}),
|
|
37
37
|
children: [
|
|
38
38
|
/* @__PURE__ */ t("label", { htmlFor: i.current, "aria-labelledby": m.current, children: [
|
|
39
|
-
r && /* @__PURE__ */ t(
|
|
39
|
+
r && /* @__PURE__ */ t(z, { label: r, variant: k.DEFAULT }),
|
|
40
40
|
/* @__PURE__ */ t(
|
|
41
|
-
|
|
41
|
+
Y,
|
|
42
42
|
{
|
|
43
43
|
min: 0,
|
|
44
44
|
type: "number",
|
|
@@ -51,8 +51,8 @@ const P = (r, n) => w(r, n).toFixed(_(n)), _ = (r) => Math.log10(W(r)), x = ({
|
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
53
|
] }),
|
|
54
|
-
e && /* @__PURE__ */ t("div", { className: "adyen-pe-input__refund-invalid-value", id: `${i.current}${
|
|
55
|
-
/* @__PURE__ */ t(
|
|
54
|
+
e && /* @__PURE__ */ t("div", { className: "adyen-pe-input__refund-invalid-value", id: `${i.current}${W}`, children: [
|
|
55
|
+
/* @__PURE__ */ t(G, { name: "cross-circle-fill" }),
|
|
56
56
|
/* @__PURE__ */ t(h, { el: D.SPAN, variant: b.BODY, children: p })
|
|
57
57
|
] })
|
|
58
58
|
]
|
|
@@ -60,16 +60,16 @@ const P = (r, n) => w(r, n).toFixed(_(n)), _ = (r) => Math.log10(W(r)), x = ({
|
|
|
60
60
|
)
|
|
61
61
|
] });
|
|
62
62
|
}, At = () => {
|
|
63
|
-
const { availableAmount: r, currency: n } =
|
|
64
|
-
return /* @__PURE__ */ t(
|
|
63
|
+
const { availableAmount: r, currency: n } = P();
|
|
64
|
+
return /* @__PURE__ */ t(y, { currency: n, errorMessage: null, value: x(r, n), disabled: !0 });
|
|
65
65
|
}, Tt = ({ locale: r }) => {
|
|
66
|
-
const { availableAmount: n, currency: e, interactionsDisabled: l, setAmount: A } =
|
|
66
|
+
const { availableAmount: n, currency: e, interactionsDisabled: l, setAmount: A } = P(), [T, a] = R(null), [i, m] = R(`${x(n, e)}`), { i18n: p } = O(), C = V(() => {
|
|
67
67
|
const s = _(e);
|
|
68
68
|
return (o) => Math.trunc(+`${parseFloat(o)}e${s}`) || 0;
|
|
69
69
|
}, [e]), X = (s) => {
|
|
70
70
|
var I;
|
|
71
71
|
let o = s.currentTarget.value.trim();
|
|
72
|
-
const c =
|
|
72
|
+
const c = C(o);
|
|
73
73
|
let u = null;
|
|
74
74
|
c || o ? (c < 0 && (u = "noNegativeNumbersAllowed"), c > n && (u = "refundAmount.excess")) : u = "refundAmount.required";
|
|
75
75
|
const N = ((I = 1.1.toLocaleString(r).match(/\d(.*?)\d/)) == null ? void 0 : I[1]) || ".", f = o.split(N);
|
|
@@ -81,7 +81,7 @@ const P = (r, n) => w(r, n).toFixed(_(n)), _ = (r) => Math.log10(W(r)), x = ({
|
|
|
81
81
|
m(o), a(u), A(u ? 0 : c);
|
|
82
82
|
};
|
|
83
83
|
return /* @__PURE__ */ t(
|
|
84
|
-
|
|
84
|
+
y,
|
|
85
85
|
{
|
|
86
86
|
currency: e,
|
|
87
87
|
errorMessage: T,
|
|
@@ -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,
|