ods-component-lib 1.23.1 → 1.23.2
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/components/antd/currencyInput/CurrencySelect.js +21 -18
- package/dist/components/antd/currencyInput/CurrencySelect.js.map +1 -1
- package/dist/components/antd/currencyInput/OdsCurrencyInput.js +72 -61
- package/dist/components/antd/currencyInput/OdsCurrencyInput.js.map +1 -1
- package/dist/components/antd/notification/OdsNotification.js +3 -3
- package/dist/components/antd/notification/OdsNotification.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,32 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
function y({
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import i from "antd/es/select";
|
|
3
|
+
function x({
|
|
5
4
|
currencyOptions: l,
|
|
6
5
|
onSelect: t,
|
|
7
|
-
defaultValue:
|
|
6
|
+
defaultValue: r,
|
|
8
7
|
disabled: a,
|
|
9
|
-
showSymbolForCodes:
|
|
10
|
-
enableSearch:
|
|
11
|
-
...
|
|
8
|
+
showSymbolForCodes: c = [],
|
|
9
|
+
enableSearch: d = !1,
|
|
10
|
+
...o
|
|
12
11
|
}) {
|
|
13
12
|
if (!l || l.length === 0) return null;
|
|
14
|
-
const { defaultCurrencyId:
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const { defaultCurrencyId: m, defaultCurrencyCode: C, fixedCurrency: S, ...u } = o, n = d ? {
|
|
14
|
+
optionFilterProp: ["label", "title"]
|
|
15
|
+
} : void 0, f = l.map((e) => ({
|
|
16
|
+
label: c.includes(e.code) ? e.symbol : e.code,
|
|
17
|
+
value: e.id,
|
|
18
|
+
title: e.name
|
|
19
|
+
}));
|
|
20
|
+
return /* @__PURE__ */ s(
|
|
21
|
+
i,
|
|
17
22
|
{
|
|
23
|
+
showSearch: n,
|
|
18
24
|
disabled: a,
|
|
19
25
|
onSelect: (e) => t?.(e),
|
|
20
|
-
defaultValue:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} : void 0,
|
|
24
|
-
...f,
|
|
25
|
-
children: l.map((e) => /* @__PURE__ */ r(d.Option, { value: e.id, "data-code": e.code, children: /* @__PURE__ */ r(u, { placement: "right", title: e.name, children: /* @__PURE__ */ r("span", { style: { fontSize: "12px" }, children: o.includes(e.code) ? e.symbol : e.code }) }) }, e.code))
|
|
26
|
+
defaultValue: r,
|
|
27
|
+
...u,
|
|
28
|
+
options: f
|
|
26
29
|
}
|
|
27
30
|
);
|
|
28
31
|
}
|
|
29
32
|
export {
|
|
30
|
-
|
|
33
|
+
x as default
|
|
31
34
|
};
|
|
32
35
|
//# sourceMappingURL=CurrencySelect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrencySelect.js","sources":["../../../../src/components/antd/currencyInput/CurrencySelect.tsx"],"sourcesContent":["import Select from \"antd/es/select\";\r\nimport
|
|
1
|
+
{"version":3,"file":"CurrencySelect.js","sources":["../../../../src/components/antd/currencyInput/CurrencySelect.tsx"],"sourcesContent":["import Select from \"antd/es/select\";\r\nimport { CurrencySelectProps } from \"./types\";\r\nimport { DefaultOptionType } from \"antd/es/select\";\r\n\r\nfunction CurrencySelect({\r\n currencyOptions,\r\n onSelect,\r\n defaultValue,\r\n disabled,\r\n showSymbolForCodes = [],\r\n enableSearch = false,\r\n ...props\r\n}: CurrencySelectProps) {\r\n if (!currencyOptions || currencyOptions.length === 0) return null;\r\n\r\n const { defaultCurrencyId, defaultCurrencyCode, fixedCurrency, ...rest } = props;\r\n\r\n const showSearch = enableSearch\r\n ? {\r\n optionFilterProp: [\"label\", \"title\"],\r\n }\r\n : undefined;\r\n\r\n const options: DefaultOptionType[] = currencyOptions.map((option) => ({\r\n label: showSymbolForCodes.includes(option.code) ? option.symbol : option.code,\r\n value: option.id,\r\n title: option.name,\r\n }));\r\n\r\n return (\r\n <Select\r\n showSearch={showSearch}\r\n disabled={disabled}\r\n onSelect={(value) => onSelect?.(value)}\r\n defaultValue={defaultValue}\r\n {...rest}\r\n options={options}\r\n />\r\n );\r\n}\r\n\r\nexport default CurrencySelect;\r\n"],"names":["CurrencySelect","currencyOptions","onSelect","defaultValue","disabled","showSymbolForCodes","enableSearch","props","defaultCurrencyId","defaultCurrencyCode","fixedCurrency","rest","showSearch","options","option","jsx","Select","value"],"mappings":";;AAIA,SAASA,EAAe;AAAA,EACtB,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,oBAAAC,IAAqB,CAAA;AAAA,EACrB,cAAAC,IAAe;AAAA,EACf,GAAGC;AACL,GAAwB;AACtB,MAAI,CAACN,KAAmBA,EAAgB,WAAW,EAAG,QAAO;AAE7D,QAAM,EAAE,mBAAAO,GAAmB,qBAAAC,GAAqB,eAAAC,GAAe,GAAGC,MAASJ,GAErEK,IAAaN,IACf;AAAA,IACE,kBAAkB,CAAC,SAAS,OAAO;AAAA,EAAA,IAErC,QAEEO,IAA+BZ,EAAgB,IAAI,CAACa,OAAY;AAAA,IACpE,OAAOT,EAAmB,SAASS,EAAO,IAAI,IAAIA,EAAO,SAASA,EAAO;AAAA,IACzE,OAAOA,EAAO;AAAA,IACd,OAAOA,EAAO;AAAA,EAAA,EACd;AAEF,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAAJ;AAAA,MACA,UAAAR;AAAA,MACA,UAAU,CAACa,MAAUf,IAAWe,CAAK;AAAA,MACrC,cAAAd;AAAA,MACC,GAAGQ;AAAA,MACJ,SAAAE;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,83 +1,94 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Space as
|
|
6
|
-
function
|
|
7
|
-
currencySelectProps:
|
|
1
|
+
import { jsx as i, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as C } from "react";
|
|
3
|
+
import h from "antd/es/input-number";
|
|
4
|
+
import I from "./CurrencySelect.js";
|
|
5
|
+
import { Input as u, Space as N } from "antd";
|
|
6
|
+
function j({
|
|
7
|
+
currencySelectProps: a,
|
|
8
8
|
defaultValue: m = "",
|
|
9
|
-
locale:
|
|
10
|
-
dontFormatValue:
|
|
9
|
+
locale: d = "tr-TR",
|
|
10
|
+
dontFormatValue: n,
|
|
11
11
|
min: f = 0,
|
|
12
|
-
asPercentage:
|
|
13
|
-
isOnRight:
|
|
14
|
-
fractionDigits:
|
|
15
|
-
...
|
|
12
|
+
asPercentage: O,
|
|
13
|
+
isOnRight: w,
|
|
14
|
+
fractionDigits: l,
|
|
15
|
+
...t
|
|
16
16
|
}) {
|
|
17
|
-
const
|
|
18
|
-
() =>
|
|
19
|
-
(
|
|
17
|
+
const r = C(
|
|
18
|
+
() => a?.currencyOptions?.find(
|
|
19
|
+
(e) => e.id === a?.defaultCurrencyId || e.code === a?.defaultCurrencyCode
|
|
20
20
|
),
|
|
21
|
-
[
|
|
22
|
-
),
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
[a]
|
|
22
|
+
), b = C(() => O ? /* @__PURE__ */ i(u, { type: "text", readOnly: !0, disabled: a?.disabled || t.disabled, className: a?.className, value: "%" }) : !a || !a.currencyOptions || a.currencyOptions.length === 0 ? /* @__PURE__ */ i(
|
|
23
|
+
u,
|
|
24
|
+
{
|
|
25
|
+
type: "text",
|
|
26
|
+
readOnly: !0,
|
|
27
|
+
disabled: a?.disabled || t.disabled,
|
|
28
|
+
className: a?.className,
|
|
29
|
+
value: ""
|
|
30
|
+
}
|
|
31
|
+
) : a.fixedCurrency ? /* @__PURE__ */ i(
|
|
32
|
+
u,
|
|
33
|
+
{
|
|
34
|
+
type: "text",
|
|
35
|
+
readOnly: !0,
|
|
36
|
+
disabled: a?.disabled || t.disabled,
|
|
37
|
+
className: a?.className,
|
|
38
|
+
value: r?.symbol
|
|
39
|
+
}
|
|
40
|
+
) : /* @__PURE__ */ i(
|
|
41
|
+
I,
|
|
42
|
+
{
|
|
43
|
+
currencyOptions: a.currencyOptions,
|
|
44
|
+
onSelect: (e) => a?.onSelect(e),
|
|
45
|
+
value: a?.value,
|
|
46
|
+
defaultValue: r?.id,
|
|
47
|
+
...a
|
|
48
|
+
}
|
|
49
|
+
), [a, r]);
|
|
50
|
+
return w ? /* @__PURE__ */ s(N.Compact, { style: { width: t.width || "100%" }, children: [
|
|
51
|
+
/* @__PURE__ */ i(
|
|
52
|
+
h,
|
|
40
53
|
{
|
|
41
54
|
defaultValue: m,
|
|
42
55
|
min: f,
|
|
43
|
-
value:
|
|
44
|
-
onChange: (
|
|
45
|
-
formatter: (
|
|
46
|
-
parser: (
|
|
47
|
-
...
|
|
56
|
+
value: t.value,
|
|
57
|
+
onChange: (e) => t.onChange(e),
|
|
58
|
+
formatter: (e) => n ? String(e) : x(e, d, l),
|
|
59
|
+
parser: (e) => n ? e : g(e, d),
|
|
60
|
+
...t
|
|
48
61
|
}
|
|
49
62
|
),
|
|
50
|
-
|
|
51
|
-
] }) : /* @__PURE__ */
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
63
|
+
b
|
|
64
|
+
] }) : /* @__PURE__ */ s(N.Compact, { style: { width: t.width || "100%" }, children: [
|
|
65
|
+
b,
|
|
66
|
+
/* @__PURE__ */ i(
|
|
67
|
+
h,
|
|
55
68
|
{
|
|
56
69
|
defaultValue: m,
|
|
57
70
|
min: f,
|
|
58
|
-
value:
|
|
59
|
-
onChange: (
|
|
60
|
-
formatter: (
|
|
61
|
-
parser: (
|
|
62
|
-
...
|
|
71
|
+
value: t.value,
|
|
72
|
+
onChange: (e) => t.onChange(e),
|
|
73
|
+
formatter: (e) => n ? String(e) : x(e, d, l),
|
|
74
|
+
parser: (e) => n ? e : g(e, d),
|
|
75
|
+
...t
|
|
63
76
|
}
|
|
64
77
|
)
|
|
65
78
|
] });
|
|
66
79
|
}
|
|
67
|
-
const x = (
|
|
80
|
+
const x = (a, m, d) => a && new Intl.NumberFormat(
|
|
68
81
|
m,
|
|
69
|
-
|
|
70
|
-
minimumFractionDigits:
|
|
71
|
-
maximumFractionDigits:
|
|
82
|
+
d ? {
|
|
83
|
+
minimumFractionDigits: d,
|
|
84
|
+
maximumFractionDigits: d
|
|
72
85
|
} : {}
|
|
73
|
-
).format(Number(
|
|
74
|
-
if (!
|
|
75
|
-
var
|
|
76
|
-
return parseFloat(
|
|
77
|
-
r.replace(new RegExp("\\" + n, "g"), "").replace(new RegExp("\\" + a), ".")
|
|
78
|
-
);
|
|
86
|
+
).format(Number(a)), g = (a, m) => {
|
|
87
|
+
if (!a) return a;
|
|
88
|
+
var d = Intl.NumberFormat(m).format(11111).replace(/\p{Number}/gu, ""), n = Intl.NumberFormat(m).format(1.1).replace(/\p{Number}/gu, "");
|
|
89
|
+
return parseFloat(a.replace(new RegExp("\\" + d, "g"), "").replace(new RegExp("\\" + n), "."));
|
|
79
90
|
};
|
|
80
91
|
export {
|
|
81
|
-
|
|
92
|
+
j as default
|
|
82
93
|
};
|
|
83
94
|
//# sourceMappingURL=OdsCurrencyInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdsCurrencyInput.js","sources":["../../../../src/components/antd/currencyInput/OdsCurrencyInput.tsx"],"sourcesContent":["import { useMemo } from \"react\";\r\nimport InputNumber from \"antd/es/input-number\";\r\nimport { OdsCurrencyInputProps } from \"./types\";\r\nimport CurrencySelect from \"./CurrencySelect\";\r\nimport { Space } from \"antd\";\r\n\r\nfunction OdsCurrencyInput({\r\n currencySelectProps,\r\n defaultValue = \"\",\r\n locale = \"tr-TR\",\r\n dontFormatValue,\r\n min = 0,\r\n asPercentage,\r\n isOnRight,\r\n fractionDigits,\r\n ...props\r\n}: OdsCurrencyInputProps) {\r\n
|
|
1
|
+
{"version":3,"file":"OdsCurrencyInput.js","sources":["../../../../src/components/antd/currencyInput/OdsCurrencyInput.tsx"],"sourcesContent":["import { useMemo } from \"react\";\r\nimport InputNumber from \"antd/es/input-number\";\r\nimport { OdsCurrencyInputProps } from \"./types\";\r\nimport CurrencySelect from \"./CurrencySelect\";\r\nimport { Space, Input } from \"antd\";\r\n\r\nfunction OdsCurrencyInput({\r\n currencySelectProps,\r\n defaultValue = \"\",\r\n locale = \"tr-TR\",\r\n dontFormatValue,\r\n min = 0,\r\n asPercentage,\r\n isOnRight,\r\n fractionDigits,\r\n ...props\r\n}: OdsCurrencyInputProps) {\r\n const defaultCurrency = useMemo(\r\n () =>\r\n currencySelectProps?.currencyOptions?.find(\r\n (option) => option.id === currencySelectProps?.defaultCurrencyId || option.code === currencySelectProps?.defaultCurrencyCode\r\n ),\r\n [currencySelectProps]\r\n );\r\n\r\n const currencySelector = useMemo(() => {\r\n if (asPercentage) {\r\n return (\r\n <Input type=\"text\" readOnly disabled={currencySelectProps?.disabled || props.disabled} className={currencySelectProps?.className} value=\"%\" />\r\n );\r\n }\r\n\r\n if (!currencySelectProps || !currencySelectProps.currencyOptions || currencySelectProps.currencyOptions.length === 0) {\r\n return (\r\n <Input\r\n type=\"text\"\r\n readOnly\r\n disabled={currencySelectProps?.disabled || props.disabled}\r\n className={currencySelectProps?.className}\r\n value={\"\"}\r\n />\r\n );\r\n } else if (currencySelectProps.fixedCurrency) {\r\n return (\r\n <Input\r\n type=\"text\"\r\n readOnly\r\n disabled={currencySelectProps?.disabled || props.disabled}\r\n className={currencySelectProps?.className}\r\n value={defaultCurrency?.symbol}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <CurrencySelect\r\n currencyOptions={currencySelectProps.currencyOptions}\r\n onSelect={(selectedId) => currencySelectProps?.onSelect(selectedId)}\r\n value={currencySelectProps?.value}\r\n defaultValue={defaultCurrency?.id}\r\n {...currencySelectProps}\r\n />\r\n );\r\n }, [currencySelectProps, defaultCurrency]);\r\n\r\n return isOnRight ? (\r\n <Space.Compact style={{ width: props.width || \"100%\" }}>\r\n <InputNumber\r\n defaultValue={defaultValue}\r\n min={min}\r\n value={props.value}\r\n onChange={(value: number) => props.onChange(value)}\r\n formatter={(value) => (dontFormatValue ? String(value) : formatValue(value as string, locale, fractionDigits))}\r\n parser={(value) => (dontFormatValue ? value : parseValue(value, locale))}\r\n {...props}\r\n />\r\n {currencySelector}\r\n </Space.Compact>\r\n ) : (\r\n <Space.Compact style={{ width: props.width || \"100%\" }}>\r\n {currencySelector}\r\n <InputNumber\r\n defaultValue={defaultValue}\r\n min={min}\r\n value={props.value}\r\n onChange={(value: number) => props.onChange(value)}\r\n formatter={(value) => (dontFormatValue ? String(value) : formatValue(value as string, locale, fractionDigits))}\r\n parser={(value) => (dontFormatValue ? value : parseValue(value, locale))}\r\n {...props}\r\n />\r\n </Space.Compact>\r\n );\r\n}\r\n\r\nexport default OdsCurrencyInput;\r\n\r\nconst formatValue = (value?: string, locale?: string, fractionDigits?: number): string => {\r\n if (!value) return value;\r\n return new Intl.NumberFormat(\r\n locale,\r\n fractionDigits\r\n ? {\r\n minimumFractionDigits: fractionDigits,\r\n maximumFractionDigits: fractionDigits,\r\n }\r\n : {}\r\n ).format(Number(value));\r\n};\r\n\r\nconst parseValue = (stringNumber: string, locale: string) => {\r\n if (!stringNumber) return stringNumber;\r\n\r\n // @ts-ignore\r\n var thousandSeparator = Intl.NumberFormat(locale)\r\n .format(11111)\r\n .replace(/\\p{Number}/gu, \"\");\r\n // @ts-ignore\r\n var decimalSeparator = Intl.NumberFormat(locale)\r\n .format(1.1)\r\n .replace(/\\p{Number}/gu, \"\");\r\n\r\n return parseFloat(stringNumber.replace(new RegExp(\"\\\\\" + thousandSeparator, \"g\"), \"\").replace(new RegExp(\"\\\\\" + decimalSeparator), \".\"));\r\n};\r\n"],"names":["OdsCurrencyInput","currencySelectProps","defaultValue","locale","dontFormatValue","min","asPercentage","isOnRight","fractionDigits","props","defaultCurrency","useMemo","option","currencySelector","jsx","Input","CurrencySelect","selectedId","jsxs","Space","InputNumber","value","formatValue","parseValue","stringNumber","thousandSeparator","decimalSeparator"],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
const n = (t) => (
|
|
1
|
+
import i from "antd/es/notification";
|
|
2
|
+
const n = (t) => (i.open({
|
|
3
3
|
...t,
|
|
4
|
-
message: t.title ||
|
|
4
|
+
message: t.title || "",
|
|
5
5
|
description: t.content || t.description || "",
|
|
6
6
|
style: t.style || {
|
|
7
7
|
width: 600
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdsNotification.js","sources":["../../../../src/components/antd/notification/OdsNotification.tsx"],"sourcesContent":["import notification, { ArgsProps } from \"antd/es/notification\";\r\n\r\nexport interface OdsNotificationProps extends ArgsProps {\r\n title?: string;\r\n content?: string;\r\n}\r\n\r\nconst OdsNotification = (props: OdsNotificationProps) => {\r\n notification.open({\r\n ...props,\r\n message: props.title ||
|
|
1
|
+
{"version":3,"file":"OdsNotification.js","sources":["../../../../src/components/antd/notification/OdsNotification.tsx"],"sourcesContent":["import notification, { ArgsProps } from \"antd/es/notification\";\r\n\r\nexport interface OdsNotificationProps extends ArgsProps {\r\n title?: string;\r\n content?: string;\r\n}\r\n\r\nconst OdsNotification = (props: OdsNotificationProps) => {\r\n notification.open({\r\n ...props,\r\n message: props.title || \"\",\r\n description: props.content || props.description || \"\",\r\n style: props.style || {\r\n width: 600,\r\n },\r\n });\r\n\r\n return null;\r\n};\r\n\r\nexport default OdsNotification;\r\n"],"names":["OdsNotification","props","notification"],"mappings":";AAOA,MAAMA,IAAkB,CAACC,OACvBC,EAAa,KAAK;AAAA,EAChB,GAAGD;AAAA,EACH,SAASA,EAAM,SAAS;AAAA,EACxB,aAAaA,EAAM,WAAWA,EAAM,eAAe;AAAA,EACnD,OAAOA,EAAM,SAAS;AAAA,IACpB,OAAO;AAAA,EAAA;AACT,CACD,GAEM;"}
|