ods-component-lib 1.22.4 → 1.22.5
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.
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
currencyOptions:
|
|
6
|
-
onSelect:
|
|
7
|
-
defaultValue:
|
|
8
|
-
disabled:
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import t from "antd/es/select";
|
|
3
|
+
import o from "antd/es/tooltip";
|
|
4
|
+
function s({
|
|
5
|
+
currencyOptions: r,
|
|
6
|
+
onSelect: d,
|
|
7
|
+
defaultValue: c,
|
|
8
|
+
disabled: a,
|
|
9
|
+
showSymbolForCodes: i = [],
|
|
10
|
+
showSearch: m = !1,
|
|
9
11
|
...n
|
|
10
12
|
}) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
13
|
+
return !r || r.length === 0 ? null : /* @__PURE__ */ l(
|
|
14
|
+
t,
|
|
15
|
+
{
|
|
16
|
+
disabled: a,
|
|
17
|
+
onSelect: (e) => d?.(e),
|
|
18
|
+
defaultValue: c,
|
|
19
|
+
showSearch: m,
|
|
20
|
+
optionFilterProp: "data-code",
|
|
21
|
+
...n,
|
|
22
|
+
children: r.map((e) => /* @__PURE__ */ l(t.Option, { value: e.id, "data-code": e.code, children: /* @__PURE__ */ l(o, { placement: "right", title: e.name, children: /* @__PURE__ */ l("span", { style: { fontSize: "12px" }, children: i.includes(e.code) ? e.symbol : e.code }) }) }, e.code))
|
|
23
|
+
}
|
|
24
|
+
);
|
|
22
25
|
}
|
|
23
26
|
export {
|
|
24
|
-
|
|
27
|
+
s as default
|
|
25
28
|
};
|
|
26
29
|
//# 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 Tooltip from \"antd/es/tooltip\";\r\nimport { CurrencySelectProps } from \"./types\";\r\n\r\nfunction CurrencySelect({\r\n currencyOptions,\r\n onSelect,\r\n defaultValue,\r\n disabled,\r\n ...props\r\n}: CurrencySelectProps) {\r\n if (!currencyOptions || currencyOptions.length === 0) return
|
|
1
|
+
{"version":3,"file":"CurrencySelect.js","sources":["../../../../src/components/antd/currencyInput/CurrencySelect.tsx"],"sourcesContent":["import Select from \"antd/es/select\";\r\nimport Tooltip from \"antd/es/tooltip\";\r\nimport { CurrencySelectProps } from \"./types\";\r\n\r\nfunction CurrencySelect({\r\n currencyOptions,\r\n onSelect,\r\n defaultValue,\r\n disabled,\r\n showSymbolForCodes = [],\r\n showSearch = false,\r\n ...props\r\n}: CurrencySelectProps) {\r\n if (!currencyOptions || currencyOptions.length === 0) return null;\r\n\r\n return (\r\n <Select\r\n disabled={disabled}\r\n onSelect={(value) => onSelect?.(value)}\r\n defaultValue={defaultValue}\r\n showSearch={showSearch}\r\n optionFilterProp=\"data-code\"\r\n {...props}\r\n >\r\n {currencyOptions.map((option) => (\r\n <Select.Option key={option.code} value={option.id} data-code={option.code}>\r\n <Tooltip placement=\"right\" title={option.name}>\r\n <span style={{ fontSize: \"12px\" }}>{showSymbolForCodes.includes(option.code) ? option.symbol : option.code}</span>\r\n </Tooltip>\r\n </Select.Option>\r\n ))}\r\n </Select>\r\n );\r\n}\r\n\r\nexport default CurrencySelect;\r\n"],"names":["CurrencySelect","currencyOptions","onSelect","defaultValue","disabled","showSymbolForCodes","showSearch","props","jsx","Select","value","option","Tooltip"],"mappings":";;;AAIA,SAASA,EAAe;AAAA,EACtB,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,oBAAAC,IAAqB,CAAA;AAAA,EACrB,YAAAC,IAAa;AAAA,EACb,GAAGC;AACL,GAAwB;AACtB,SAAI,CAACN,KAAmBA,EAAgB,WAAW,IAAU,OAG3D,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAL;AAAA,MACA,UAAU,CAACM,MAAUR,IAAWQ,CAAK;AAAA,MACrC,cAAAP;AAAA,MACA,YAAAG;AAAA,MACA,kBAAiB;AAAA,MAChB,GAAGC;AAAA,MAEH,YAAgB,IAAI,CAACI,MACpB,gBAAAH,EAACC,EAAO,QAAP,EAAgC,OAAOE,EAAO,IAAI,aAAWA,EAAO,MACnE,4BAACC,GAAA,EAAQ,WAAU,SAAQ,OAAOD,EAAO,MACvC,UAAA,gBAAAH,EAAC,UAAK,OAAO,EAAE,UAAU,OAAA,GAAW,YAAmB,SAASG,EAAO,IAAI,IAAIA,EAAO,SAASA,EAAO,KAAA,CAAK,GAC7G,EAAA,GAHkBA,EAAO,IAI3B,CACD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -107,6 +107,8 @@ declare type CurrencySelectProps = SelectProps & {
|
|
|
107
107
|
defaultCurrencyCode?: string;
|
|
108
108
|
fixedCurrency?: boolean;
|
|
109
109
|
onSelect?: (selectedId: number | null | undefined) => void;
|
|
110
|
+
showSymbolForCodes?: string[];
|
|
111
|
+
showSearch?: boolean;
|
|
110
112
|
};
|
|
111
113
|
|
|
112
114
|
export declare const DATA_GRID_CLASSES: {
|