@cfx-dev/ui-components 4.3.3 → 4.3.4
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/main.d.ts +2 -0
- package/dist/main.js +212 -208
- package/dist/utils/formatCurrency.d.ts +5 -0
- package/dist/utils/formatCurrency.js +35 -0
- package/dist/utils/formatDate.d.ts +1 -0
- package/dist/utils/formatDate.js +13 -0
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export { getValue } from './utils/getValue';
|
|
|
4
4
|
export type { ValueOrGetter } from './utils/getValue';
|
|
5
5
|
export { useInstance, useDynamicRef, useGlobalKeyboardEvent, useKeyboardClose, useWindowResize, useOutlet, usePopoverController, useClipboardComponent, CLIPBOARD_TITLE_APPEARANCE, } from './utils/hooks';
|
|
6
6
|
export type { OutletPosition, UseClipboardProps, } from './utils/hooks';
|
|
7
|
+
export { formatDate } from './utils/formatDate';
|
|
8
|
+
export { formatCurrency } from './utils/formatCurrency';
|
|
7
9
|
export { noop, returnTrue, returnFalse, identity, invoke, } from './utils/functional';
|
|
8
10
|
export { isExternalUrl, matchLinks, matchLinkNodes, defaultLinkReplacerx, defaultLinkReplacer, linkifyx, linkify, Linkify, } from './utils/links';
|
|
9
11
|
export type { ILinkSubstitute, ILinkMatch, LinkifyProps, } from './utils/links';
|
package/dist/main.js
CHANGED
|
@@ -9,220 +9,224 @@ import { useKeyboardClose as T } from "./utils/hooks/useKeyboardClose.js";
|
|
|
9
9
|
import { useWindowResize as C } from "./utils/hooks/useWindowResize.js";
|
|
10
10
|
import { useOutlet as B } from "./utils/hooks/useOutlet.js";
|
|
11
11
|
import { CLIPBOARD_TITLE_APPEARANCE as L, useClipboardComponent as S } from "./utils/hooks/useClipboardComponent.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { default as
|
|
24
|
-
import {
|
|
25
|
-
import { default as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { default as jo } from "./components/
|
|
36
|
-
import {
|
|
37
|
-
import { default as rr } from "./components/
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import { default as yr } from "./components/
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import { default as lt } from "./components/
|
|
88
|
-
import {
|
|
89
|
-
import {
|
|
90
|
-
import {
|
|
12
|
+
import { formatDate as R } from "./utils/formatDate.js";
|
|
13
|
+
import { formatCurrency as k } from "./utils/formatCurrency.js";
|
|
14
|
+
import { identity as b, invoke as O, noop as P, returnFalse as F, returnTrue as _ } from "./utils/functional.js";
|
|
15
|
+
import { Linkify as h, defaultLinkReplacer as U, defaultLinkReplacerx as z, isExternalUrl as w, linkify as M, linkifyx as N, matchLinkNodes as G, matchLinks as V } from "./utils/links.js";
|
|
16
|
+
import { clamp as Y, clamp01 as H, minmax as W } from "./utils/math.js";
|
|
17
|
+
import { isFalseString as J, isTrueString as Q, normalizeSlashes as Z, replaceRange as j, splitByIndices as q, unicodeCharAt as $ } from "./utils/string.js";
|
|
18
|
+
import { debounce as ro, throttle as eo } from "./utils/execution.js";
|
|
19
|
+
import { getColor as ao } from "./utils/color.js";
|
|
20
|
+
import { ui as mo } from "./utils/ui/ui.js";
|
|
21
|
+
import { BorderRadiusEnum as xo, ColorEnum as no, MediaQueryEnum as lo, OffsetEnum as uo, TextSizeEnum as so, ZIndexEnum as io } from "./utils/ui/ui.types.js";
|
|
22
|
+
import { isInEnum as To } from "./utils/enum.js";
|
|
23
|
+
import { default as Co } from "./components/IconButton/IconButton.js";
|
|
24
|
+
import { Accordion as Bo, AccordionContent as Eo, AccordionHeader as Lo, AccordionItem as So, AccordionTrigger as yo } from "./components/Accordion/Accordion.js";
|
|
25
|
+
import { default as Do } from "./components/ClipboardButton/ClipboardButton.js";
|
|
26
|
+
import { default as Ao } from "./components/Checkbox/Checkbox.js";
|
|
27
|
+
import { default as Oo, ButtonContent as Po, getButtonClassName as Fo } from "./components/Button/Button.js";
|
|
28
|
+
import { ButtonBar as vo } from "./components/Button/ButtonBar.js";
|
|
29
|
+
import { LinkButton as Uo } from "./components/Button/LinkButton.js";
|
|
30
|
+
import { BurgerMenuButton as wo } from "./components/BurgerMenu/BurgerMenuButton.js";
|
|
31
|
+
import { BurgerMenu as No } from "./components/BurgerMenu/BurgerMenu.js";
|
|
32
|
+
import { default as Vo, getLinkClassName as Ko, getLinkStyles as Yo } from "./components/Link/Link.js";
|
|
33
|
+
import { default as Wo } from "./components/Link/ButtonLink.js";
|
|
34
|
+
import { Avatar as Jo } from "./components/Avatar/Avatar.js";
|
|
35
|
+
import { BACKDROP_OUTLET_ID as Zo, default as jo } from "./components/BackdropPortal/BackdropPortal.js";
|
|
36
|
+
import { Badge as $o } from "./components/Badge/Badge.js";
|
|
37
|
+
import { default as rr } from "./components/ControlBox/ControlBox.js";
|
|
38
|
+
import { default as tr } from "./components/CountryFlag/CountryFlag.js";
|
|
39
|
+
import { default as fr } from "./components/Decorate/Decorate.js";
|
|
40
|
+
import { Dot as pr } from "./components/Dot/Dot.js";
|
|
41
|
+
import { FLYOUT_OUTLET_ID as nr, Flyout as lr } from "./components/Flyout/Flyout.js";
|
|
42
|
+
import { Logos as sr } from "./components/Logos/index.js";
|
|
43
|
+
import { I as dr } from "./cfxIcons-B9nzO6TW.js";
|
|
44
|
+
import { I as Tr } from "./cfxIconsBig-BLJjMT-Y.js";
|
|
45
|
+
import { Icon as Cr } from "./components/Icon/Icon.js";
|
|
46
|
+
import { IconBig as Br } from "./components/IconBig/IconBig.js";
|
|
47
|
+
import { Indicator as Lr } from "./components/Indicator/Indicator.js";
|
|
48
|
+
import { default as yr } from "./components/InfoPanel/InfoPanel.js";
|
|
49
|
+
import { default as Dr } from "./components/Input/Input.js";
|
|
50
|
+
import { default as Ar } from "./components/Input/RichInput.js";
|
|
51
|
+
import { Interactive as Or } from "./components/Interactive/Interactive.js";
|
|
52
|
+
import { Island as Fr, IslandCorner as _r } from "./components/Island/Island.js";
|
|
53
|
+
import { default as hr } from "./components/Box/Box.js";
|
|
54
|
+
import { stringPropFormater as zr } from "./components/RSC/Box/Box.js";
|
|
55
|
+
import { Center as Mr } from "./components/Layout/Center/Center.js";
|
|
56
|
+
import { default as Gr } from "./components/Flex/Flex.js";
|
|
57
|
+
import { FlexAlignItemsEnum as Kr, FlexDirectionEnum as Yr, FlexJustifyContentEnum as Hr, FlexWrapEnum as Wr } from "./components/RSC/Flex/Flex.types.js";
|
|
58
|
+
import { FlexRestricter as Jr } from "./components/RSC/Flex/FlexRestricter.js";
|
|
59
|
+
import { Pad as Zr } from "./components/Layout/Pad/Pad.js";
|
|
60
|
+
import { Page as qr } from "./components/Layout/Page/Page.js";
|
|
61
|
+
import { R as oe } from "./Rail-CHFAf3wJ.js";
|
|
62
|
+
import { Scrollable as ee } from "./components/Scrollable/Scrollable.js";
|
|
63
|
+
import { VirtualScrollable as ae } from "./components/Scrollable/VirtualScrollable.js";
|
|
64
|
+
import { Loaf as me } from "./components/Loaf/Loaf.js";
|
|
65
|
+
import { Modal as xe } from "./components/Modal/Modal.js";
|
|
66
|
+
import { NavList as le } from "./components/NavList/NavList.js";
|
|
67
|
+
import { OVERLAY_OUTLET_ID as se, Overlay as ie } from "./components/Overlay/Overlay.js";
|
|
68
|
+
import { Popover as ce } from "./components/Popover/Popover.js";
|
|
69
|
+
import { PremiumBadge as Ie } from "./components/PremiumBadge/PremiumBadge.js";
|
|
70
|
+
import { Prose as ge } from "./components/Prose/Prose.js";
|
|
71
|
+
import { Radio as Ee } from "./components/Radio/Radio.js";
|
|
72
|
+
import { Select as Se } from "./components/Select/Select.js";
|
|
73
|
+
import { DropdownSelect as Re } from "./components/DropdownSelect/DropdownSelect.js";
|
|
74
|
+
import { Separator as ke } from "./components/Separator/Separator.js";
|
|
75
|
+
import { Shroud as be } from "./components/Shroud/Shroud.js";
|
|
76
|
+
import { Slider as Pe } from "./components/Slider/Slider.js";
|
|
77
|
+
import { Spacer as _e } from "./components/Spacer/Spacer.js";
|
|
78
|
+
import { Style as he, useContextualStyle as Ue } from "./components/Style/Style.js";
|
|
79
|
+
import { default as we } from "./components/Switch/Switch.js";
|
|
80
|
+
import { ToggleGroup as Ne } from "./components/ToggleGroup/ToggleGroup.js";
|
|
81
|
+
import { Tabular as Ve } from "./components/Tabular/Tabular.js";
|
|
82
|
+
import { DataTable as Ye, DataTableHeaderItem as He, DataTableRow as We } from "./components/DataTable/DataTable.js";
|
|
83
|
+
import { Table as Je } from "./components/Table/index.js";
|
|
84
|
+
import { DEFAULT_TEXT_COLOR as Ze, TEXT_OPACITY_MAP as je, Text as qe, TextBlock as $e, getTextOpacity as ot, textSizeResponsiveValueFormatter as rt } from "./components/Text/Text.js";
|
|
85
|
+
import { Textarea as tt } from "./components/Textarea/Textarea.js";
|
|
86
|
+
import { TITLE_OUTLET_ID as ft, Title as mt, titleGetCoords as pt, titleGetCssStyle as xt } from "./components/Title/Title.js";
|
|
87
|
+
import { default as lt } from "./components/InputDropzone/InputDropzone.js";
|
|
88
|
+
import { default as st } from "./components/InputDropzone/ItemPreview.js";
|
|
89
|
+
import { default as dt } from "./components/Skeleton/Skeleton.js";
|
|
90
|
+
import { OnScreenSensor as Tt } from "./components/OnScreenSensor.js";
|
|
91
|
+
import { Symbols as Ct } from "./components/Symbols.js";
|
|
92
|
+
import { default as Bt } from "./components/Table/TableIconButton.js";
|
|
91
93
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
94
|
+
Bo as Accordion,
|
|
95
|
+
Eo as AccordionContent,
|
|
96
|
+
Lo as AccordionHeader,
|
|
97
|
+
So as AccordionItem,
|
|
98
|
+
yo as AccordionTrigger,
|
|
99
|
+
Jo as Avatar,
|
|
100
|
+
Zo as BACKDROP_OUTLET_ID,
|
|
101
|
+
jo as BackdropPortal,
|
|
102
|
+
$o as Badge,
|
|
103
|
+
xo as BorderRadiusEnum,
|
|
104
|
+
hr as Box,
|
|
105
|
+
No as BurgerMenu,
|
|
106
|
+
wo as BurgerMenuButton,
|
|
107
|
+
Oo as Button,
|
|
108
|
+
vo as ButtonBar,
|
|
109
|
+
Po as ButtonContent,
|
|
110
|
+
Wo as ButtonLink,
|
|
109
111
|
L as CLIPBOARD_TITLE_APPEARANCE,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
112
|
+
Mr as Center,
|
|
113
|
+
Ao as Checkbox,
|
|
114
|
+
Do as ClipboardButton,
|
|
115
|
+
no as ColorEnum,
|
|
116
|
+
rr as ControlBox,
|
|
117
|
+
tr as CountryFlag,
|
|
118
|
+
Ze as DEFAULT_TEXT_COLOR,
|
|
119
|
+
Ye as DataTable,
|
|
120
|
+
He as DataTableHeaderItem,
|
|
121
|
+
We as DataTableRow,
|
|
122
|
+
fr as Decorate,
|
|
123
|
+
pr as Dot,
|
|
124
|
+
Re as DropdownSelect,
|
|
125
|
+
st as DropzoneItemPreview,
|
|
126
|
+
nr as FLYOUT_OUTLET_ID,
|
|
127
|
+
Gr as Flex,
|
|
128
|
+
Kr as FlexAlignItemsEnum,
|
|
129
|
+
Yr as FlexDirectionEnum,
|
|
130
|
+
Hr as FlexJustifyContentEnum,
|
|
131
|
+
Jr as FlexRestricter,
|
|
132
|
+
Wr as FlexWrapEnum,
|
|
133
|
+
lr as Flyout,
|
|
134
|
+
Cr as Icon,
|
|
135
|
+
Br as IconBig,
|
|
136
|
+
Co as IconButton,
|
|
137
|
+
dr as Icons,
|
|
138
|
+
Tr as IconsBig,
|
|
139
|
+
Lr as Indicator,
|
|
140
|
+
yr as InfoPanel,
|
|
141
|
+
Dr as Input,
|
|
142
|
+
lt as InputDropzone,
|
|
143
|
+
Or as Interactive,
|
|
144
|
+
Fr as Island,
|
|
145
|
+
_r as IslandCorner,
|
|
146
|
+
Vo as Link,
|
|
147
|
+
Uo as LinkButton,
|
|
148
|
+
h as Linkify,
|
|
149
|
+
me as Loaf,
|
|
150
|
+
sr as Logos,
|
|
151
|
+
lo as MediaQueryEnum,
|
|
152
|
+
xe as Modal,
|
|
153
|
+
le as NavList,
|
|
154
|
+
se as OVERLAY_OUTLET_ID,
|
|
155
|
+
uo as OffsetEnum,
|
|
156
|
+
Tt as OnScreenSensor,
|
|
157
|
+
ie as Overlay,
|
|
158
|
+
Zr as Pad,
|
|
159
|
+
qr as Page,
|
|
160
|
+
ce as Popover,
|
|
161
|
+
Ie as PremiumBadge,
|
|
162
|
+
ge as Prose,
|
|
163
|
+
Ee as Radio,
|
|
164
|
+
oe as Rail,
|
|
165
|
+
Ar as RichInput,
|
|
166
|
+
ee as Scrollable,
|
|
167
|
+
Se as Select,
|
|
168
|
+
ke as Separator,
|
|
169
|
+
be as Shroud,
|
|
170
|
+
dt as Skeleton,
|
|
171
|
+
Pe as Slider,
|
|
172
|
+
_e as Spacer,
|
|
173
|
+
he as Style,
|
|
174
|
+
we as Switch,
|
|
175
|
+
Ct as Symbols,
|
|
176
|
+
je as TEXT_OPACITY_MAP,
|
|
177
|
+
ft as TITLE_OUTLET_ID,
|
|
178
|
+
Je as Table,
|
|
179
|
+
Bt as TableIconButton,
|
|
180
|
+
Ve as Tabular,
|
|
181
|
+
qe as Text,
|
|
182
|
+
$e as TextBlock,
|
|
183
|
+
so as TextSizeEnum,
|
|
184
|
+
tt as Textarea,
|
|
185
|
+
mt as Title,
|
|
186
|
+
Ne as ToggleGroup,
|
|
187
|
+
ae as VirtualScrollable,
|
|
188
|
+
io as ZIndexEnum,
|
|
189
|
+
Y as clamp,
|
|
190
|
+
H as clamp01,
|
|
189
191
|
a as clsx,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
192
|
+
ro as debounce,
|
|
193
|
+
U as defaultLinkReplacer,
|
|
194
|
+
z as defaultLinkReplacerx,
|
|
195
|
+
k as formatCurrency,
|
|
196
|
+
R as formatDate,
|
|
197
|
+
Fo as getButtonClassName,
|
|
198
|
+
ao as getColor,
|
|
199
|
+
Ko as getLinkClassName,
|
|
200
|
+
Yo as getLinkStyles,
|
|
201
|
+
ot as getTextOpacity,
|
|
198
202
|
m as getValue,
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
203
|
+
b as identity,
|
|
204
|
+
O as invoke,
|
|
205
|
+
w as isExternalUrl,
|
|
206
|
+
J as isFalseString,
|
|
207
|
+
To as isInEnum,
|
|
208
|
+
Q as isTrueString,
|
|
209
|
+
M as linkify,
|
|
210
|
+
N as linkifyx,
|
|
211
|
+
G as matchLinkNodes,
|
|
212
|
+
V as matchLinks,
|
|
209
213
|
e as mergeRefs,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
214
|
+
W as minmax,
|
|
215
|
+
P as noop,
|
|
216
|
+
Z as normalizeSlashes,
|
|
217
|
+
j as replaceRange,
|
|
218
|
+
F as returnFalse,
|
|
219
|
+
_ as returnTrue,
|
|
220
|
+
q as splitByIndices,
|
|
221
|
+
zr as stringPropFormater,
|
|
222
|
+
rt as textSizeResponsiveValueFormatter,
|
|
223
|
+
eo as throttle,
|
|
224
|
+
pt as titleGetCoords,
|
|
225
|
+
xt as titleGetCssStyle,
|
|
226
|
+
mo as ui,
|
|
227
|
+
$ as unicodeCharAt,
|
|
224
228
|
S as useClipboardComponent,
|
|
225
|
-
|
|
229
|
+
Ue as useContextualStyle,
|
|
226
230
|
s as useDynamicRef,
|
|
227
231
|
d as useGlobalKeyboardEvent,
|
|
228
232
|
l as useInstance,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const FREE_PRICE_TEXT = "free";
|
|
2
|
+
export declare function buildCurrencySymbol(currency: string): string;
|
|
3
|
+
export declare const CURRENCY_MAP: Record<string, string>;
|
|
4
|
+
export declare function getCurrencySymbol(currency: string): string;
|
|
5
|
+
export declare const formatCurrency: (price: number, currency: string, fixToTwoDecimalsRaw?: boolean) => string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const e = "free";
|
|
2
|
+
function i(t) {
|
|
3
|
+
return 0 .toLocaleString(
|
|
4
|
+
"en-US",
|
|
5
|
+
{
|
|
6
|
+
style: "currency",
|
|
7
|
+
currency: t,
|
|
8
|
+
minimumFractionDigits: 0,
|
|
9
|
+
maximumFractionDigits: 0
|
|
10
|
+
}
|
|
11
|
+
).replace(/\d/g, "").trim();
|
|
12
|
+
}
|
|
13
|
+
const c = {
|
|
14
|
+
USD: i("USD"),
|
|
15
|
+
EUR: i("EUR")
|
|
16
|
+
};
|
|
17
|
+
function C(t) {
|
|
18
|
+
return c[t] ? c[t] : i(t);
|
|
19
|
+
}
|
|
20
|
+
const S = (t, n, r) => {
|
|
21
|
+
if (n === "")
|
|
22
|
+
return e;
|
|
23
|
+
const m = r === void 0 ? t % 100 !== 0 : r, s = C(n), o = t === 0 ? 0 : t / 100, u = m ? o.toFixed(2) : o, [l, a] = u.toString().split("."), d = [
|
|
24
|
+
l.replace(/\B(?=(\d{3})+(?!\d))/g, ","),
|
|
25
|
+
a
|
|
26
|
+
].filter(Boolean).join(".");
|
|
27
|
+
return o === 0 ? e : `${s}${d}`;
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
c as CURRENCY_MAP,
|
|
31
|
+
e as FREE_PRICE_TEXT,
|
|
32
|
+
i as buildCurrencySymbol,
|
|
33
|
+
S as formatCurrency,
|
|
34
|
+
C as getCurrencySymbol
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function formatDate(date: string | number | null | undefined, noTime?: boolean): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function r(i, e = !1) {
|
|
2
|
+
return i ? new Intl.DateTimeFormat(void 0, {
|
|
3
|
+
year: "numeric",
|
|
4
|
+
month: "2-digit",
|
|
5
|
+
day: "2-digit",
|
|
6
|
+
hour: e ? void 0 : "numeric",
|
|
7
|
+
minute: e ? void 0 : "numeric",
|
|
8
|
+
second: e ? void 0 : "numeric"
|
|
9
|
+
}).format(new Date(i)) : "N/A";
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
r as formatDate
|
|
13
|
+
};
|