@cagatayfdn/flora-components 0.0.71 → 0.0.73
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/dist/Accordion.css +1 -0
- package/dist/ActionButton.css +1 -0
- package/dist/AlertCard.css +1 -0
- package/dist/Autocomplete.css +1 -0
- package/dist/Button.css +1 -0
- package/dist/Card.css +1 -0
- package/dist/Checkbox.css +1 -0
- package/dist/Config.css +1 -0
- package/dist/Confirm.css +1 -0
- package/dist/ContentHeader.css +1 -0
- package/dist/Datepicker.css +1 -0
- package/dist/Divider.css +1 -0
- package/dist/DropdownList.css +1 -0
- package/dist/ErrorLogModal.css +1 -0
- package/dist/FileUpload.css +1 -0
- package/dist/FileUpload.module-bCNvwTRa.js +32 -0
- package/dist/Heading.css +1 -0
- package/dist/InfoBoxList.css +1 -0
- package/dist/InfoBoxList.module-C6t2KDOB.js +8 -0
- package/dist/InfoDate.css +1 -0
- package/dist/InfoText.css +1 -0
- package/dist/Input.css +1 -0
- package/dist/Label.css +1 -0
- package/dist/Legends.css +1 -0
- package/dist/Loading.css +1 -0
- package/dist/MenuItem-BGZHvTKI.js +53 -0
- package/dist/MenuItem.css +1 -0
- package/dist/Modal.css +1 -0
- package/dist/NoResult.css +1 -0
- package/dist/PageWrap.css +1 -0
- package/dist/Pager.css +1 -0
- package/dist/Panel.css +1 -0
- package/dist/Radio.css +1 -0
- package/dist/ResultError.css +1 -0
- package/dist/ScrollContainer.css +1 -0
- package/dist/Select-DcLZCXNo.js +1831 -0
- package/dist/Select.css +1 -0
- package/dist/Select.module-BVWgPUEN.js +20 -0
- package/dist/StatusTypography.css +1 -0
- package/dist/Stepper.css +1 -0
- package/dist/Switch.css +1 -0
- package/dist/Tab.css +1 -0
- package/dist/TableHeader-B91BXue0.js +159 -0
- package/dist/TableHeader.css +1 -0
- package/dist/Textarea.css +1 -0
- package/dist/Tooltip.css +1 -0
- package/dist/Trans-B4ILpbwK.js +343 -0
- package/dist/TypographyText.css +1 -0
- package/dist/ValidationError.css +1 -0
- package/dist/_commonjsHelpers-CT_km90n.js +30 -0
- package/dist/_isArray-CBUZFxFA.js +6 -0
- package/dist/_isString-BUpNGP_8.js +6 -0
- package/dist/_reduce-DsUCMz4O.js +148 -0
- package/dist/assets/icons/icons.js +62 -0
- package/dist/assets/images/500_error_2x.gif +0 -0
- package/dist/assets/images/oms.png +0 -0
- package/dist/components/Accordion/Accordion.js +57 -0
- package/dist/components/ActionButton/ActionButton.js +54 -0
- package/dist/components/AlertCard/AlertCard.js +29 -0
- package/dist/components/AuthUserCan/Permission.js +18 -0
- package/dist/components/AuthUserCan/index.js +23 -0
- package/dist/components/Autocomplete/Autocomplete.js +87 -0
- package/dist/components/Button/Button.js +87 -0
- package/dist/components/Card/Card.js +21 -0
- package/dist/components/Charts/Bar.js +18 -0
- package/dist/components/Charts/Legends.js +21 -0
- package/dist/components/Charts/Line.js +18 -0
- package/dist/components/Charts/Pie.js +43 -0
- package/dist/components/Charts/index.js +31 -0
- package/dist/components/Charts/types.js +1 -0
- package/dist/components/Charts/utils.js +12 -0
- package/dist/components/Checkbox/Checkbox.js +119 -0
- package/dist/components/Config/Config.js +32 -0
- package/dist/components/Confirm/Confirm.js +52 -0
- package/dist/components/ContentHeader/ContentHeader.js +75 -0
- package/dist/components/ContentLoader/ContentLoader.js +16 -0
- package/dist/components/Countdown/Countdown.js +20 -0
- package/dist/components/Datepicker/Datepicker.js +1478 -0
- package/dist/components/Divider/Divider.js +26 -0
- package/dist/components/Dropdown/DropdownList.js +90 -0
- package/dist/components/ErrorLogModal/ErrorLogModal.js +63 -0
- package/dist/components/FileUpload/FileUpload.js +237 -0
- package/dist/components/FileUpload/ImagePreview.js +19 -0
- package/dist/components/FileUpload/LengthCard.js +6 -0
- package/dist/components/FileUpload/PreviewModal.js +53 -0
- package/dist/components/Grid/Column.js +29 -0
- package/dist/components/Grid/Row.js +6 -0
- package/dist/components/Heading/Heading.js +22 -0
- package/dist/components/Icon/index.js +24 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -0
- package/dist/components/InfoBoxList/InfoBoxList.js +30 -0
- package/dist/components/InfoBoxList/helper.js +83 -0
- package/dist/components/InfoDate/InfoDate.js +19 -0
- package/dist/components/InfoText/InfoText.js +13 -0
- package/dist/components/Input/Input.js +140 -0
- package/dist/components/Label/Label.js +22 -0
- package/dist/components/Loading/Loading.js +62 -0
- package/dist/components/Modal/Modal.js +57 -0
- package/dist/components/NavigatorCard/index.js +59 -0
- package/dist/components/NoResult/NoResult.js +12 -0
- package/dist/components/Notification/Notification.js +26 -0
- package/dist/components/PageWrapper/PageWrap.js +46 -0
- package/dist/components/Pager/Pager.js +103 -0
- package/dist/components/Panel/Panel.js +69 -0
- package/dist/components/PermaLink/PermaLink.js +34 -0
- package/dist/components/Radio/Radio.js +96 -0
- package/dist/components/ResultError/ResultError.js +20 -0
- package/dist/components/ScrollContainer/ScrollContainer.js +21 -0
- package/dist/components/Select/NoData.js +10 -0
- package/dist/components/Select/OptionItem.js +19 -0
- package/dist/components/Select/Select.js +13 -0
- package/dist/components/Sidebar/MenuItem.js +9 -0
- package/dist/components/Sidebar/index.js +137 -0
- package/dist/components/StatusTypography/StatusTypography.js +51 -0
- package/dist/components/Stepper/Stepper.js +72 -0
- package/dist/components/Switch/Switch.js +79 -0
- package/dist/components/Tab/Tab.js +28 -0
- package/dist/components/Table/Table.js +201 -0
- package/dist/components/Table/TableHeader.js +14 -0
- package/dist/components/Textarea/Textarea.js +95 -0
- package/dist/components/Tooltip/Tooltip.js +1548 -0
- package/dist/components/TypographyText/TypographyText.js +87 -0
- package/dist/components/ValidationError/ValidationError.js +7 -0
- package/dist/components/index.js +125 -0
- package/dist/defineProperty-DeKy1XT0.js +37 -0
- package/dist/enums/appearance.js +14 -0
- package/dist/enums/applicationTypeSlug.js +4 -0
- package/dist/enums/index.js +27 -0
- package/dist/enums/isActiveColor.js +4 -0
- package/dist/enums/size.js +4 -0
- package/dist/enums/status.js +9 -0
- package/dist/equals-PL9KqVQf.js +119 -0
- package/dist/flatpickr-CRz1AV0e.js +59 -0
- package/dist/hooks/index.js +9 -0
- package/dist/hooks/useAauth.js +40 -0
- package/dist/hooks/useDisclosure.js +14 -0
- package/dist/hooks/useNiceModal.js +13 -0
- package/dist/i18nInstance-CiCZbaCK.js +55 -0
- package/dist/includes-8YTFrx85.js +46 -0
- package/dist/index-BHf7G3IG.js +35 -0
- package/dist/index-BJU1K2Aw.js +8003 -0
- package/dist/index-C9yacAGx.js +359 -0
- package/dist/index-CB61CB0b.js +669 -0
- package/dist/index-H7XbDVmH.js +320 -0
- package/dist/index-a0GSBrWt.js +364 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +181 -0
- package/dist/jsx-runtime-BcAkpsdy.js +631 -0
- package/dist/keys-B0bo5Q7o.js +67 -0
- package/dist/locales/en/index.js +613 -0
- package/dist/locales/i18n.js +1417 -0
- package/dist/locales/index.js +5 -0
- package/dist/locales/tr/index.js +613 -0
- package/dist/prodivers.css +6 -0
- package/dist/prodivers.js +12 -0
- package/dist/react-content-loader.es-CswLCxkm.js +90 -0
- package/dist/react-toastify.esm-BUWNP7Nm.js +808 -0
- package/dist/types/common/date.js +1 -0
- package/dist/types/common/events.js +1 -0
- package/dist/types/common/forms.js +1 -0
- package/dist/types/common/option.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/useTranslation-CnCPcxVj.js +142 -0
- package/dist/utils/date.js +413 -0
- package/dist/utils/flatpickr.js +4 -0
- package/dist/utils/helper.js +1463 -0
- package/dist/utils/index.js +21 -0
- package/dist/utils/language.js +46 -0
- package/dist/utils/validation.js +27 -0
- package/dist/utils/yup.js +2921 -0
- package/package.json +8 -2
- package/dist/index.cjs.js +0 -295
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -25008
- package/dist/index.es.js.map +0 -1
- package/dist/index.umd.js +0 -295
- package/dist/index.umd.js.map +0 -1
- package/dist/style.css +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { DividerAppearance as d } from "../../enums/appearance.js";
|
|
3
|
+
import { c as _ } from "../../index-BHf7G3IG.js";
|
|
4
|
+
import '../../Divider.css';const a = "_divider_1b99i_1", m = "_grey_1b99i_4", o = "_light_1b99i_7", i = {
|
|
5
|
+
divider: a,
|
|
6
|
+
grey: m,
|
|
7
|
+
light: o,
|
|
8
|
+
"margin-15": "_margin-15_1b99i_11",
|
|
9
|
+
"margin-30": "_margin-30_1b99i_15"
|
|
10
|
+
}, l = ({
|
|
11
|
+
appearance: r = d.GREY,
|
|
12
|
+
className: s,
|
|
13
|
+
margin: t = "15"
|
|
14
|
+
}) => /* @__PURE__ */ e.jsx(
|
|
15
|
+
"hr",
|
|
16
|
+
{
|
|
17
|
+
"data-testid": "divider",
|
|
18
|
+
className: _(i.divider, s, {
|
|
19
|
+
[i[`${r}`]]: r,
|
|
20
|
+
[i[`margin-${t}`]]: t
|
|
21
|
+
})
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
export {
|
|
25
|
+
l as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { j as o } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { useState as h, useRef as j, useEffect as k } from "react";
|
|
3
|
+
import { c as d } from "../../index-BHf7G3IG.js";
|
|
4
|
+
import N from "../Icon/index.js";
|
|
5
|
+
import g from "../PermaLink/PermaLink.js";
|
|
6
|
+
import '../../DropdownList.css';const E = "_dropdownMenu_1unwt_1", b = "_dropdownMenu__lg_1unwt_15", C = "_dropdownMenu__md_1unwt_18", L = "_dropdownMenu__sm_1unwt_21", R = "_active_1unwt_24", $ = "_icon_1unwt_55", y = "_title_1unwt_73", H = "_disabled_1unwt_85", e = {
|
|
7
|
+
dropdownMenu: E,
|
|
8
|
+
dropdownMenu__lg: b,
|
|
9
|
+
dropdownMenu__md: C,
|
|
10
|
+
dropdownMenu__sm: L,
|
|
11
|
+
active: R,
|
|
12
|
+
icon: $,
|
|
13
|
+
title: y,
|
|
14
|
+
disabled: H
|
|
15
|
+
}, B = ({
|
|
16
|
+
buttonChild: p,
|
|
17
|
+
items: m,
|
|
18
|
+
footerItem: i,
|
|
19
|
+
className: M,
|
|
20
|
+
title: l,
|
|
21
|
+
titleClass: f,
|
|
22
|
+
event: r = "hover",
|
|
23
|
+
size: _ = "lg",
|
|
24
|
+
isDisabled: c
|
|
25
|
+
}) => {
|
|
26
|
+
const [a, t] = h(!1), u = j(null), w = (n) => {
|
|
27
|
+
const s = u.current;
|
|
28
|
+
s != null && s.contains(n.target) || t(!1);
|
|
29
|
+
};
|
|
30
|
+
k(() => (document.addEventListener("mousedown", w), () => {
|
|
31
|
+
document.removeEventListener("mousedown", w);
|
|
32
|
+
}), []);
|
|
33
|
+
const v = (n) => {
|
|
34
|
+
c || n === "click" && t(!a);
|
|
35
|
+
};
|
|
36
|
+
return /* @__PURE__ */ o.jsx(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: d("h-100 d-flex align-items-center", {
|
|
40
|
+
[e.disabled]: c
|
|
41
|
+
}),
|
|
42
|
+
ref: u,
|
|
43
|
+
"data-testid": "dropdown-list",
|
|
44
|
+
children: /* @__PURE__ */ o.jsxs(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
className: d(M, e.dropdownMenu, {
|
|
48
|
+
[e.disabled]: c
|
|
49
|
+
}),
|
|
50
|
+
onMouseLeave: () => r === "hover" && t(!1),
|
|
51
|
+
onMouseEnter: () => r === "hover" && t(!0),
|
|
52
|
+
onClick: () => v(r),
|
|
53
|
+
children: [
|
|
54
|
+
p,
|
|
55
|
+
/* @__PURE__ */ o.jsx(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: d(e.dropdownMenu, {
|
|
59
|
+
[e.active]: a,
|
|
60
|
+
[e[`dropdownMenu__${_}`]]: _
|
|
61
|
+
}),
|
|
62
|
+
children: /* @__PURE__ */ o.jsxs("ul", { children: [
|
|
63
|
+
l && /* @__PURE__ */ o.jsx("li", { className: d(e.title, f), children: l }),
|
|
64
|
+
m.map((n, s) => /* @__PURE__ */ o.jsxs(
|
|
65
|
+
"li",
|
|
66
|
+
{
|
|
67
|
+
"data-testid": `dropdown-item-${s}`,
|
|
68
|
+
className: d(n.className, {
|
|
69
|
+
[e.icon]: n.icon
|
|
70
|
+
}),
|
|
71
|
+
children: [
|
|
72
|
+
n.icon && /* @__PURE__ */ o.jsx(N, { name: n.icon }),
|
|
73
|
+
n.to ? /* @__PURE__ */ o.jsx(g, { to: n.to, children: n.text }) : /* @__PURE__ */ o.jsx("a", { onClick: (x) => n.onClick && n.onClick(x), children: n.text })
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
s
|
|
77
|
+
)),
|
|
78
|
+
i && i
|
|
79
|
+
] })
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
B as default
|
|
90
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { j as o } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { N as c } from "../../index-H7XbDVmH.js";
|
|
3
|
+
import "../../index-BHf7G3IG.js";
|
|
4
|
+
import "../../hooks/useAauth.js";
|
|
5
|
+
import "../../assets/images/500_error_2x.gif";
|
|
6
|
+
import "../../locales/i18n.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import "../Tooltip/Tooltip.js";
|
|
9
|
+
import "../../react-toastify.esm-BUWNP7Nm.js";
|
|
10
|
+
import "../../utils/date.js";
|
|
11
|
+
import "../Input/Input.js";
|
|
12
|
+
import x from "../ScrollContainer/ScrollContainer.js";
|
|
13
|
+
import "../Charts/index.js";
|
|
14
|
+
import "../Checkbox/Checkbox.js";
|
|
15
|
+
import "../Confirm/Confirm.js";
|
|
16
|
+
import "../Datepicker/Datepicker.js";
|
|
17
|
+
import t from "../Divider/Divider.js";
|
|
18
|
+
import "../FileUpload/FileUpload.js";
|
|
19
|
+
import j from "../Modal/Modal.js";
|
|
20
|
+
import l from "../Grid/Column.js";
|
|
21
|
+
import _ from "../Grid/Row.js";
|
|
22
|
+
import d from "../InfoDate/InfoDate.js";
|
|
23
|
+
import "../../Select-DcLZCXNo.js";
|
|
24
|
+
import "../Switch/Switch.js";
|
|
25
|
+
import "../Textarea/Textarea.js";
|
|
26
|
+
import f from "../../hooks/useNiceModal.js";
|
|
27
|
+
import { u } from "../../useTranslation-CnCPcxVj.js";
|
|
28
|
+
import { T as h } from "../../Trans-B4ILpbwK.js";
|
|
29
|
+
import '../../ErrorLogModal.css';const M = "_realTimeLogModalStyle_2pv2e_1", g = "_customHeader_2pv2e_8", N = "_modalHeader_2pv2e_13", m = {
|
|
30
|
+
realTimeLogModalStyle: M,
|
|
31
|
+
customHeader: g,
|
|
32
|
+
modalHeader: N
|
|
33
|
+
}, v = ({ id: i, onClose: e, errors: s }) => {
|
|
34
|
+
const { t: a } = u(), [, p] = f(i), n = () => {
|
|
35
|
+
p(), e && e();
|
|
36
|
+
};
|
|
37
|
+
return /* @__PURE__ */ o.jsx(
|
|
38
|
+
j,
|
|
39
|
+
{
|
|
40
|
+
onClose: n,
|
|
41
|
+
className: m.realTimeLogModalStyle,
|
|
42
|
+
header: /* @__PURE__ */ o.jsx("div", { className: m.modalHeader, children: a("title.error_log") }),
|
|
43
|
+
children: /* @__PURE__ */ o.jsx(x, { children: s ? s.map((r) => /* @__PURE__ */ o.jsxs("div", { className: "container-fluid", children: [
|
|
44
|
+
/* @__PURE__ */ o.jsxs(_, { children: [
|
|
45
|
+
/* @__PURE__ */ o.jsxs(l, { children: [
|
|
46
|
+
/* @__PURE__ */ o.jsx("b", { children: `${a("label.created_date")}:` }),
|
|
47
|
+
/* @__PURE__ */ o.jsx(d, { date: r == null ? void 0 : r.created_date })
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ o.jsxs(l, { children: [
|
|
50
|
+
/* @__PURE__ */ o.jsx("b", { children: `${a("label.date_updated")}:` }),
|
|
51
|
+
/* @__PURE__ */ o.jsx(d, { date: r == null ? void 0 : r.update_date })
|
|
52
|
+
] })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ o.jsx(t, { className: "mt-4 mb-4" }),
|
|
55
|
+
/* @__PURE__ */ o.jsx("p", { className: "pre-line", children: r == null ? void 0 : r.log_data }),
|
|
56
|
+
/* @__PURE__ */ o.jsx(t, { className: "mt-4 mb-4" })
|
|
57
|
+
] }, r == null ? void 0 : r.id)) : /* @__PURE__ */ o.jsx(h, { i18nKey: "text.not_found", values: { dataname: "Log" } }) })
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}, X = c.create(v);
|
|
61
|
+
export {
|
|
62
|
+
X as default
|
|
63
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import Z, { useState as j, useEffect as ee } from "react";
|
|
3
|
+
import te from "../Icon/index.js";
|
|
4
|
+
import { Notification as se } from "../Notification/Notification.js";
|
|
5
|
+
import { convertToBase64 as ae } from "../../utils/helper.js";
|
|
6
|
+
import { c as p } from "../../index-BHf7G3IG.js";
|
|
7
|
+
import { Icons as re } from "../../assets/icons/icons.js";
|
|
8
|
+
import { s as t } from "../../FileUpload.module-bCNvwTRa.js";
|
|
9
|
+
import ie from "../../assets/images/oms.png";
|
|
10
|
+
import { AppearanceDirection as le, NotificationAppearanceType as ne } from "../../enums/appearance.js";
|
|
11
|
+
import { imageFormatValidation as oe } from "../../utils/validation.js";
|
|
12
|
+
import M from "../Label/Label.js";
|
|
13
|
+
import ce from "../Tooltip/Tooltip.js";
|
|
14
|
+
import me from "../ValidationError/ValidationError.js";
|
|
15
|
+
import de from "./LengthCard.js";
|
|
16
|
+
import pe from "./PreviewModal.js";
|
|
17
|
+
import { u as fe } from "../../useTranslation-CnCPcxVj.js";
|
|
18
|
+
const ue = Z.forwardRef(
|
|
19
|
+
(A, W) => {
|
|
20
|
+
var O, k;
|
|
21
|
+
const {
|
|
22
|
+
name: h,
|
|
23
|
+
label: g,
|
|
24
|
+
id: $,
|
|
25
|
+
type: N = "text",
|
|
26
|
+
size: F,
|
|
27
|
+
isDisabled: v,
|
|
28
|
+
info: C,
|
|
29
|
+
error: P,
|
|
30
|
+
appearance: x,
|
|
31
|
+
description: B,
|
|
32
|
+
className: L,
|
|
33
|
+
wrapperClassName: U,
|
|
34
|
+
height: R = "40",
|
|
35
|
+
value: i,
|
|
36
|
+
fileName: _,
|
|
37
|
+
required: V,
|
|
38
|
+
onChange: o,
|
|
39
|
+
multiple: a = !1,
|
|
40
|
+
...z
|
|
41
|
+
} = A, { t: T } = fe(), S = {
|
|
42
|
+
[t[`type__${N}`]]: N !== "text"
|
|
43
|
+
}, [c, b] = j(), [f, y] = j(), [s, u] = j([]), [q, w] = j(!1), G = p(
|
|
44
|
+
"form-group",
|
|
45
|
+
{
|
|
46
|
+
[t[`size__${F}`]]: F,
|
|
47
|
+
[t.disabled]: v,
|
|
48
|
+
[t.hidden]: N === "hidden"
|
|
49
|
+
},
|
|
50
|
+
U
|
|
51
|
+
), H = (d) => d[0] && oe(d) ? new Promise((l, r) => {
|
|
52
|
+
const m = new FileReader();
|
|
53
|
+
m.readAsDataURL(d[0]), m.onload = () => l(m.result), m.onerror = (n) => r(n);
|
|
54
|
+
}) : ie, J = async (d) => {
|
|
55
|
+
const l = d.currentTarget.files;
|
|
56
|
+
let r = [];
|
|
57
|
+
if (!(s.length + l.length > 5)) {
|
|
58
|
+
if (a && !((s == null ? void 0 : s.length) >= 5)) {
|
|
59
|
+
const m = Object.values(l);
|
|
60
|
+
for (let n = 0; n < m.length; n++)
|
|
61
|
+
r.push(
|
|
62
|
+
ae(m[n])
|
|
63
|
+
);
|
|
64
|
+
await Promise.all(r).then((n) => {
|
|
65
|
+
var E;
|
|
66
|
+
((E = s.filter(
|
|
67
|
+
(X) => n.some((Y) => X === Y)
|
|
68
|
+
)) == null ? void 0 : E.length) > 0 ? se({
|
|
69
|
+
message: T("text.duplicate_image_error"),
|
|
70
|
+
type: ne.ERROR
|
|
71
|
+
}) : (o && o([...s, ...n]), u([
|
|
72
|
+
...s || [],
|
|
73
|
+
...n
|
|
74
|
+
]), b(l));
|
|
75
|
+
});
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
l[0] && !a && (r = await H(l), o && o(r), y(r), b(l));
|
|
79
|
+
}
|
|
80
|
+
}, D = () => {
|
|
81
|
+
u([]), y(""), b(""), o && o("");
|
|
82
|
+
}, I = (d, l) => {
|
|
83
|
+
const r = d;
|
|
84
|
+
if (l && r.length == 1) {
|
|
85
|
+
D(), w(!1);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
if (l) {
|
|
89
|
+
const m = r.filter((n) => n !== l);
|
|
90
|
+
u(m), o && o(m);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (r.length == 1) {
|
|
94
|
+
D();
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
r.length >= 0 && (u(r.slice(0, -1)), o && o(r.slice(0, -1)));
|
|
98
|
+
}, K = () => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
99
|
+
/* @__PURE__ */ e.jsxs("div", { className: t.imageContainer, "data-testid": "fileupload-multipleimages", children: [
|
|
100
|
+
/* @__PURE__ */ e.jsx("img", { src: s[s.length - 1] }),
|
|
101
|
+
/* @__PURE__ */ e.jsx(
|
|
102
|
+
te,
|
|
103
|
+
{
|
|
104
|
+
name: re.Trash,
|
|
105
|
+
className: t.deleteIcon,
|
|
106
|
+
onClick: () => I(s)
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
] }),
|
|
110
|
+
/* @__PURE__ */ e.jsx("div", { className: t.lengthContainer, children: s.length > 1 && /* @__PURE__ */ e.jsx(
|
|
111
|
+
de,
|
|
112
|
+
{
|
|
113
|
+
onCardClick: () => w(!0),
|
|
114
|
+
count: s.length - 1
|
|
115
|
+
}
|
|
116
|
+
) })
|
|
117
|
+
] }), Q = (d) => {
|
|
118
|
+
d.target.value = null;
|
|
119
|
+
};
|
|
120
|
+
return ee(() => {
|
|
121
|
+
i && y(i), a && i && u(i);
|
|
122
|
+
}, [i]), /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
123
|
+
/* @__PURE__ */ e.jsxs("div", { className: G, "data-testid": "fileupload-container", children: [
|
|
124
|
+
/* @__PURE__ */ e.jsxs(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
className: p(t.container, {
|
|
128
|
+
[t[`${x}`]]: x,
|
|
129
|
+
[t.disabled]: v
|
|
130
|
+
}),
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ e.jsxs(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
className: p("d-flex", "w-100", {
|
|
136
|
+
"justify-content-between": g,
|
|
137
|
+
"justify-content-start": !g
|
|
138
|
+
}),
|
|
139
|
+
children: [
|
|
140
|
+
g && /* @__PURE__ */ e.jsx(M, { appearance: x, name: h, children: g }),
|
|
141
|
+
(C && a || C && !f && !a) && /* @__PURE__ */ e.jsxs(
|
|
142
|
+
M,
|
|
143
|
+
{
|
|
144
|
+
className: t.info,
|
|
145
|
+
appearance: x,
|
|
146
|
+
name: h,
|
|
147
|
+
children: [
|
|
148
|
+
V && "*",
|
|
149
|
+
" ",
|
|
150
|
+
C
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
/* @__PURE__ */ e.jsxs(
|
|
158
|
+
"div",
|
|
159
|
+
{
|
|
160
|
+
className: p({
|
|
161
|
+
[t.selectedFileWrap]: c || i,
|
|
162
|
+
[t.selectedFileWrap__multiple]: i || a && s.length > 0
|
|
163
|
+
}),
|
|
164
|
+
children: [
|
|
165
|
+
!a && f && /* @__PURE__ */ e.jsx("img", { src: f }),
|
|
166
|
+
a && s.length > 0 && K(),
|
|
167
|
+
/* @__PURE__ */ e.jsxs("div", { className: t.fileGroup, children: [
|
|
168
|
+
(c || _) && !a && /* @__PURE__ */ e.jsx(
|
|
169
|
+
ce,
|
|
170
|
+
{
|
|
171
|
+
id: h,
|
|
172
|
+
tooltipContent: c && ((O = c[0]) == null ? void 0 : O.name) || _,
|
|
173
|
+
ellipsis: !0,
|
|
174
|
+
direction: le.TOP,
|
|
175
|
+
children: /* @__PURE__ */ e.jsx("span", { className: t.fileName, children: c && ((k = c[0]) == null ? void 0 : k.name) || _ })
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ e.jsxs(
|
|
179
|
+
"div",
|
|
180
|
+
{
|
|
181
|
+
className: p(t.fieldWrap, {
|
|
182
|
+
[t.border__black]: !(i && !a && c),
|
|
183
|
+
[t.border__blue]: i && !a && c,
|
|
184
|
+
[t["mr-auto"]]: i && !a,
|
|
185
|
+
[t[`height-${R}`]]: R && !c && !f,
|
|
186
|
+
[t["height-40"]]: f || c,
|
|
187
|
+
[t.fieldWrap__multiple]: i && a && s.length >= 0
|
|
188
|
+
}),
|
|
189
|
+
children: [
|
|
190
|
+
/* @__PURE__ */ e.jsx(
|
|
191
|
+
"input",
|
|
192
|
+
{
|
|
193
|
+
type: "file",
|
|
194
|
+
name: h,
|
|
195
|
+
"data-testid": "fileupload-input",
|
|
196
|
+
id: $,
|
|
197
|
+
className: p(
|
|
198
|
+
t.control,
|
|
199
|
+
S,
|
|
200
|
+
L
|
|
201
|
+
),
|
|
202
|
+
disabled: v,
|
|
203
|
+
onChange: J,
|
|
204
|
+
onClick: Q,
|
|
205
|
+
ref: W,
|
|
206
|
+
multiple: a,
|
|
207
|
+
...z
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
/* @__PURE__ */ e.jsx("span", { children: i && !a ? T("button.edit") : B })
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
)
|
|
214
|
+
] })
|
|
215
|
+
]
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
P && /* @__PURE__ */ e.jsx(me, { ...P })
|
|
222
|
+
] }),
|
|
223
|
+
q && /* @__PURE__ */ e.jsx(
|
|
224
|
+
pe,
|
|
225
|
+
{
|
|
226
|
+
imagePaths: s,
|
|
227
|
+
onDelete: I,
|
|
228
|
+
onClose: () => w(!1)
|
|
229
|
+
}
|
|
230
|
+
)
|
|
231
|
+
] });
|
|
232
|
+
}
|
|
233
|
+
);
|
|
234
|
+
ue.displayName = "FileUpload";
|
|
235
|
+
export {
|
|
236
|
+
ue as default
|
|
237
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import o from "../Modal/Modal.js";
|
|
3
|
+
import { s as i } from "../../FileUpload.module-bCNvwTRa.js";
|
|
4
|
+
import { u as a } from "../../useTranslation-CnCPcxVj.js";
|
|
5
|
+
const f = ({ onClose: t, src: r }) => {
|
|
6
|
+
const { t: s } = a();
|
|
7
|
+
return /* @__PURE__ */ e.jsx(
|
|
8
|
+
o,
|
|
9
|
+
{
|
|
10
|
+
onClose: t,
|
|
11
|
+
title: s("title.preview"),
|
|
12
|
+
className: i.imagePreviewModal,
|
|
13
|
+
children: /* @__PURE__ */ e.jsx("img", { src: r })
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
f as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { j as s } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { s as e } from "../../FileUpload.module-bCNvwTRa.js";
|
|
3
|
+
const l = ({ count: t, onCardClick: a }) => /* @__PURE__ */ s.jsx("div", { "data-testid": "fileupload-lengthcard", className: e.lengthCard, onClick: a, children: /* @__PURE__ */ s.jsx("span", { children: `+ ${t}` }) });
|
|
4
|
+
export {
|
|
5
|
+
l as default
|
|
6
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { useState as a } from "react";
|
|
3
|
+
import n from "../Icon/index.js";
|
|
4
|
+
import j from "../Modal/Modal.js";
|
|
5
|
+
import { Icons as m } from "../../assets/icons/icons.js";
|
|
6
|
+
import { s as r } from "../../FileUpload.module-bCNvwTRa.js";
|
|
7
|
+
import u from "./ImagePreview.js";
|
|
8
|
+
import { u as w } from "../../useTranslation-CnCPcxVj.js";
|
|
9
|
+
const O = ({ imagePaths: i, onClose: l, onDelete: c }) => {
|
|
10
|
+
const { t: d } = w(), [p, o] = a(!1), [t, v] = a(), x = (s) => {
|
|
11
|
+
v(s), o(!0);
|
|
12
|
+
};
|
|
13
|
+
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
14
|
+
/* @__PURE__ */ e.jsx(
|
|
15
|
+
j,
|
|
16
|
+
{
|
|
17
|
+
title: d("title.edit_images"),
|
|
18
|
+
className: r.previewModal,
|
|
19
|
+
onClose: l,
|
|
20
|
+
headerClass: r.header,
|
|
21
|
+
children: /* @__PURE__ */ e.jsx("div", { className: r.pictureContainer, children: i.map((s, f) => /* @__PURE__ */ e.jsxs("div", { className: r.previewContainer, children: [
|
|
22
|
+
/* @__PURE__ */ e.jsxs("div", { className: r.preview, children: [
|
|
23
|
+
/* @__PURE__ */ e.jsx(
|
|
24
|
+
n,
|
|
25
|
+
{
|
|
26
|
+
name: m.Preview,
|
|
27
|
+
onClick: () => x(s)
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ e.jsx(
|
|
31
|
+
n,
|
|
32
|
+
{
|
|
33
|
+
name: m.Trash,
|
|
34
|
+
onClick: () => c(i, s)
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ e.jsx("img", { src: s })
|
|
39
|
+
] }, f)) })
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
p && t && /* @__PURE__ */ e.jsx(
|
|
43
|
+
u,
|
|
44
|
+
{
|
|
45
|
+
src: t,
|
|
46
|
+
onClose: () => o(!1)
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
] });
|
|
50
|
+
};
|
|
51
|
+
export {
|
|
52
|
+
O as default
|
|
53
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { j as n } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { c as $ } from "../../index-BHf7G3IG.js";
|
|
3
|
+
const p = ({
|
|
4
|
+
children: m,
|
|
5
|
+
auto: l = !1,
|
|
6
|
+
size: o,
|
|
7
|
+
sm: c,
|
|
8
|
+
md: s,
|
|
9
|
+
lg: a,
|
|
10
|
+
xl: t,
|
|
11
|
+
className: r
|
|
12
|
+
}) => {
|
|
13
|
+
const e = $(
|
|
14
|
+
{
|
|
15
|
+
col: !o && !l,
|
|
16
|
+
"col-auto": !o && l,
|
|
17
|
+
[`col-xl-${t}`]: t,
|
|
18
|
+
[`col-lg-${a}`]: a,
|
|
19
|
+
[`col-md-${s}`]: s,
|
|
20
|
+
[`col-sm-${c}`]: c,
|
|
21
|
+
[`col-${o}`]: o && !l
|
|
22
|
+
},
|
|
23
|
+
r
|
|
24
|
+
);
|
|
25
|
+
return /* @__PURE__ */ n.jsx("div", { "data-testid": "column", className: e, children: m });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
p as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { j as a } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { c as o } from "../../index-BHf7G3IG.js";
|
|
3
|
+
const m = ({ children: s, className: t }) => /* @__PURE__ */ a.jsx("div", { "data-testid": "row", className: o("row", t), children: s });
|
|
4
|
+
export {
|
|
5
|
+
m as default
|
|
6
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import o from "react";
|
|
2
|
+
import { c } from "../../index-BHf7G3IG.js";
|
|
3
|
+
import '../../Heading.css';const n = "_h2_q7ao1_10", r = "_h1_q7ao1_16", _ = {
|
|
4
|
+
h2: n,
|
|
5
|
+
h1: r
|
|
6
|
+
}, l = ({
|
|
7
|
+
children: a,
|
|
8
|
+
level: s = 2,
|
|
9
|
+
className: e
|
|
10
|
+
}) => {
|
|
11
|
+
const t = `h${s}`;
|
|
12
|
+
return o.createElement(
|
|
13
|
+
t,
|
|
14
|
+
{
|
|
15
|
+
className: c(_[t], e)
|
|
16
|
+
},
|
|
17
|
+
a
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
l as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { j as l } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { c as r } from "../../index-BHf7G3IG.js";
|
|
3
|
+
const f = (s) => {
|
|
4
|
+
const { name: t, onClick: a, style: o, isDisabled: e, className: c } = s, i = (n) => {
|
|
5
|
+
if (e)
|
|
6
|
+
return n.preventDefault();
|
|
7
|
+
a && a(n);
|
|
8
|
+
};
|
|
9
|
+
return /* @__PURE__ */ l.jsx(
|
|
10
|
+
"i",
|
|
11
|
+
{
|
|
12
|
+
...s,
|
|
13
|
+
style: o,
|
|
14
|
+
"data-testid": `icon-${t}`,
|
|
15
|
+
onClick: i,
|
|
16
|
+
className: r(`icon-${t}`, c, {
|
|
17
|
+
disabled: e
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
f as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { j as g } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import { useRef as h, useState as p, useEffect as l } from "react";
|
|
3
|
+
function E({
|
|
4
|
+
children: i,
|
|
5
|
+
hasMore: c,
|
|
6
|
+
height: f = 400,
|
|
7
|
+
loadMore: d,
|
|
8
|
+
treshold: m = 100
|
|
9
|
+
}) {
|
|
10
|
+
const t = h(null), [n, o] = p(!1), s = () => {
|
|
11
|
+
var e, r, u;
|
|
12
|
+
t.current && ((e = t == null ? void 0 : t.current) == null ? void 0 : e.scrollTop) + ((r = t == null ? void 0 : t.current) == null ? void 0 : r.clientHeight) >= ((u = t == null ? void 0 : t.current) == null ? void 0 : u.scrollHeight) - m && o(!0);
|
|
13
|
+
}, a = () => {
|
|
14
|
+
var e;
|
|
15
|
+
d(), o(!1), (e = t.current) == null || e.scroll(
|
|
16
|
+
0,
|
|
17
|
+
t.current.scrollHeight / 2
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
return l(() => {
|
|
21
|
+
n && c && setTimeout(() => a(), 300);
|
|
22
|
+
}, [n, c]), l(() => {
|
|
23
|
+
var e;
|
|
24
|
+
return (e = t.current) == null || e.addEventListener("scroll", s), () => {
|
|
25
|
+
var r;
|
|
26
|
+
return (r = t.current) == null ? void 0 : r.removeEventListener("scroll", s);
|
|
27
|
+
};
|
|
28
|
+
}, []), /* @__PURE__ */ g.jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
"data-testid": "infinitescroll",
|
|
32
|
+
ref: t,
|
|
33
|
+
style: { overflow: "auto", height: f },
|
|
34
|
+
onScroll: s,
|
|
35
|
+
children: i
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
E as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { j as t } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import m from "../ContentLoader/ContentLoader.js";
|
|
3
|
+
import x from "../NoResult/NoResult.js";
|
|
4
|
+
import p from "../TypographyText/TypographyText.js";
|
|
5
|
+
import { s as f } from "../../InfoBoxList.module-C6t2KDOB.js";
|
|
6
|
+
const y = ({
|
|
7
|
+
items: r,
|
|
8
|
+
isLoading: e,
|
|
9
|
+
className: s
|
|
10
|
+
}) => {
|
|
11
|
+
const d = r.every(({ value: o }) => o === void 0);
|
|
12
|
+
return /* @__PURE__ */ t.jsx("div", { className: s, "data-testid": "infoboxlist-container", children: d ? /* @__PURE__ */ t.jsx(x, {}) : r.map(
|
|
13
|
+
({ label: o, value: i, copy: n }) => i !== void 0 && /* @__PURE__ */ t.jsxs("div", { className: f.item, "data-testid": "infoboxlist-item", children: [
|
|
14
|
+
/* @__PURE__ */ t.jsx("div", { children: o }),
|
|
15
|
+
/* @__PURE__ */ t.jsx("div", { children: e ? /* @__PURE__ */ t.jsx(m, {}) : n ? /* @__PURE__ */ t.jsx(
|
|
16
|
+
p,
|
|
17
|
+
{
|
|
18
|
+
className: s,
|
|
19
|
+
ellipsis: !0,
|
|
20
|
+
href: `${i}`,
|
|
21
|
+
copyable: !0,
|
|
22
|
+
children: i
|
|
23
|
+
}
|
|
24
|
+
) : i })
|
|
25
|
+
] }, o + i)
|
|
26
|
+
) });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
y as default
|
|
30
|
+
};
|