@apexcura/ui-components 0.0.16-Beta16 → 0.0.16-Beta17
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/index.css +482 -0
- package/dist/index.d.mts +1 -15
- package/dist/index.d.ts +1 -15
- package/dist/index.js +81 -118
- package/dist/index.mjs +79 -113
- package/package.json +1 -1
package/dist/index.css
ADDED
|
@@ -0,0 +1,482 @@
|
|
|
1
|
+
/* src/styles/index.css */
|
|
2
|
+
*,
|
|
3
|
+
::before,
|
|
4
|
+
::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
border-width: 0;
|
|
7
|
+
border-style: solid;
|
|
8
|
+
border-color: #e5e7eb;
|
|
9
|
+
}
|
|
10
|
+
::before,
|
|
11
|
+
::after {
|
|
12
|
+
--tw-content: "";
|
|
13
|
+
}
|
|
14
|
+
html,
|
|
15
|
+
:host {
|
|
16
|
+
line-height: 1.5;
|
|
17
|
+
-webkit-text-size-adjust: 100%;
|
|
18
|
+
-moz-tab-size: 4;
|
|
19
|
+
-o-tab-size: 4;
|
|
20
|
+
tab-size: 4;
|
|
21
|
+
font-family:
|
|
22
|
+
ui-sans-serif,
|
|
23
|
+
system-ui,
|
|
24
|
+
sans-serif,
|
|
25
|
+
"Apple Color Emoji",
|
|
26
|
+
"Segoe UI Emoji",
|
|
27
|
+
"Segoe UI Symbol",
|
|
28
|
+
"Noto Color Emoji";
|
|
29
|
+
font-feature-settings: normal;
|
|
30
|
+
font-variation-settings: normal;
|
|
31
|
+
-webkit-tap-highlight-color: transparent;
|
|
32
|
+
}
|
|
33
|
+
body {
|
|
34
|
+
margin: 0;
|
|
35
|
+
line-height: inherit;
|
|
36
|
+
}
|
|
37
|
+
hr {
|
|
38
|
+
height: 0;
|
|
39
|
+
color: inherit;
|
|
40
|
+
border-top-width: 1px;
|
|
41
|
+
}
|
|
42
|
+
abbr:where([title]) {
|
|
43
|
+
-webkit-text-decoration: underline dotted;
|
|
44
|
+
text-decoration: underline dotted;
|
|
45
|
+
}
|
|
46
|
+
h1,
|
|
47
|
+
h2,
|
|
48
|
+
h3,
|
|
49
|
+
h4,
|
|
50
|
+
h5,
|
|
51
|
+
h6 {
|
|
52
|
+
font-size: inherit;
|
|
53
|
+
font-weight: inherit;
|
|
54
|
+
}
|
|
55
|
+
a {
|
|
56
|
+
color: inherit;
|
|
57
|
+
text-decoration: inherit;
|
|
58
|
+
}
|
|
59
|
+
b,
|
|
60
|
+
strong {
|
|
61
|
+
font-weight: bolder;
|
|
62
|
+
}
|
|
63
|
+
code,
|
|
64
|
+
kbd,
|
|
65
|
+
samp,
|
|
66
|
+
pre {
|
|
67
|
+
font-family:
|
|
68
|
+
ui-monospace,
|
|
69
|
+
SFMono-Regular,
|
|
70
|
+
Menlo,
|
|
71
|
+
Monaco,
|
|
72
|
+
Consolas,
|
|
73
|
+
"Liberation Mono",
|
|
74
|
+
"Courier New",
|
|
75
|
+
monospace;
|
|
76
|
+
font-feature-settings: normal;
|
|
77
|
+
font-variation-settings: normal;
|
|
78
|
+
font-size: 1em;
|
|
79
|
+
}
|
|
80
|
+
small {
|
|
81
|
+
font-size: 80%;
|
|
82
|
+
}
|
|
83
|
+
sub,
|
|
84
|
+
sup {
|
|
85
|
+
font-size: 75%;
|
|
86
|
+
line-height: 0;
|
|
87
|
+
position: relative;
|
|
88
|
+
vertical-align: baseline;
|
|
89
|
+
}
|
|
90
|
+
sub {
|
|
91
|
+
bottom: -0.25em;
|
|
92
|
+
}
|
|
93
|
+
sup {
|
|
94
|
+
top: -0.5em;
|
|
95
|
+
}
|
|
96
|
+
table {
|
|
97
|
+
text-indent: 0;
|
|
98
|
+
border-color: inherit;
|
|
99
|
+
border-collapse: collapse;
|
|
100
|
+
}
|
|
101
|
+
button,
|
|
102
|
+
input,
|
|
103
|
+
optgroup,
|
|
104
|
+
select,
|
|
105
|
+
textarea {
|
|
106
|
+
font-family: inherit;
|
|
107
|
+
font-feature-settings: inherit;
|
|
108
|
+
font-variation-settings: inherit;
|
|
109
|
+
font-size: 100%;
|
|
110
|
+
font-weight: inherit;
|
|
111
|
+
line-height: inherit;
|
|
112
|
+
letter-spacing: inherit;
|
|
113
|
+
color: inherit;
|
|
114
|
+
margin: 0;
|
|
115
|
+
padding: 0;
|
|
116
|
+
}
|
|
117
|
+
button,
|
|
118
|
+
select {
|
|
119
|
+
text-transform: none;
|
|
120
|
+
}
|
|
121
|
+
button,
|
|
122
|
+
input:where([type=button]),
|
|
123
|
+
input:where([type=reset]),
|
|
124
|
+
input:where([type=submit]) {
|
|
125
|
+
-webkit-appearance: button;
|
|
126
|
+
background-color: transparent;
|
|
127
|
+
background-image: none;
|
|
128
|
+
}
|
|
129
|
+
:-moz-focusring {
|
|
130
|
+
outline: auto;
|
|
131
|
+
}
|
|
132
|
+
:-moz-ui-invalid {
|
|
133
|
+
box-shadow: none;
|
|
134
|
+
}
|
|
135
|
+
progress {
|
|
136
|
+
vertical-align: baseline;
|
|
137
|
+
}
|
|
138
|
+
::-webkit-inner-spin-button,
|
|
139
|
+
::-webkit-outer-spin-button {
|
|
140
|
+
height: auto;
|
|
141
|
+
}
|
|
142
|
+
[type=search] {
|
|
143
|
+
-webkit-appearance: textfield;
|
|
144
|
+
outline-offset: -2px;
|
|
145
|
+
}
|
|
146
|
+
::-webkit-search-decoration {
|
|
147
|
+
-webkit-appearance: none;
|
|
148
|
+
}
|
|
149
|
+
::-webkit-file-upload-button {
|
|
150
|
+
-webkit-appearance: button;
|
|
151
|
+
font: inherit;
|
|
152
|
+
}
|
|
153
|
+
summary {
|
|
154
|
+
display: list-item;
|
|
155
|
+
}
|
|
156
|
+
blockquote,
|
|
157
|
+
dl,
|
|
158
|
+
dd,
|
|
159
|
+
h1,
|
|
160
|
+
h2,
|
|
161
|
+
h3,
|
|
162
|
+
h4,
|
|
163
|
+
h5,
|
|
164
|
+
h6,
|
|
165
|
+
hr,
|
|
166
|
+
figure,
|
|
167
|
+
p,
|
|
168
|
+
pre {
|
|
169
|
+
margin: 0;
|
|
170
|
+
}
|
|
171
|
+
fieldset {
|
|
172
|
+
margin: 0;
|
|
173
|
+
padding: 0;
|
|
174
|
+
}
|
|
175
|
+
legend {
|
|
176
|
+
padding: 0;
|
|
177
|
+
}
|
|
178
|
+
ol,
|
|
179
|
+
ul,
|
|
180
|
+
menu {
|
|
181
|
+
list-style: none;
|
|
182
|
+
margin: 0;
|
|
183
|
+
padding: 0;
|
|
184
|
+
}
|
|
185
|
+
dialog {
|
|
186
|
+
padding: 0;
|
|
187
|
+
}
|
|
188
|
+
textarea {
|
|
189
|
+
resize: vertical;
|
|
190
|
+
}
|
|
191
|
+
input::-moz-placeholder,
|
|
192
|
+
textarea::-moz-placeholder {
|
|
193
|
+
opacity: 1;
|
|
194
|
+
color: #9ca3af;
|
|
195
|
+
}
|
|
196
|
+
input::placeholder,
|
|
197
|
+
textarea::placeholder {
|
|
198
|
+
opacity: 1;
|
|
199
|
+
color: #9ca3af;
|
|
200
|
+
}
|
|
201
|
+
button,
|
|
202
|
+
[role=button] {
|
|
203
|
+
cursor: pointer;
|
|
204
|
+
}
|
|
205
|
+
:disabled {
|
|
206
|
+
cursor: default;
|
|
207
|
+
}
|
|
208
|
+
img,
|
|
209
|
+
svg,
|
|
210
|
+
video,
|
|
211
|
+
canvas,
|
|
212
|
+
audio,
|
|
213
|
+
iframe,
|
|
214
|
+
embed,
|
|
215
|
+
object {
|
|
216
|
+
display: block;
|
|
217
|
+
vertical-align: middle;
|
|
218
|
+
}
|
|
219
|
+
img,
|
|
220
|
+
video {
|
|
221
|
+
max-width: 100%;
|
|
222
|
+
height: auto;
|
|
223
|
+
}
|
|
224
|
+
[hidden] {
|
|
225
|
+
display: none;
|
|
226
|
+
}
|
|
227
|
+
*,
|
|
228
|
+
::before,
|
|
229
|
+
::after {
|
|
230
|
+
--tw-border-spacing-x: 0;
|
|
231
|
+
--tw-border-spacing-y: 0;
|
|
232
|
+
--tw-translate-x: 0;
|
|
233
|
+
--tw-translate-y: 0;
|
|
234
|
+
--tw-rotate: 0;
|
|
235
|
+
--tw-skew-x: 0;
|
|
236
|
+
--tw-skew-y: 0;
|
|
237
|
+
--tw-scale-x: 1;
|
|
238
|
+
--tw-scale-y: 1;
|
|
239
|
+
--tw-pan-x: ;
|
|
240
|
+
--tw-pan-y: ;
|
|
241
|
+
--tw-pinch-zoom: ;
|
|
242
|
+
--tw-scroll-snap-strictness: proximity;
|
|
243
|
+
--tw-gradient-from-position: ;
|
|
244
|
+
--tw-gradient-via-position: ;
|
|
245
|
+
--tw-gradient-to-position: ;
|
|
246
|
+
--tw-ordinal: ;
|
|
247
|
+
--tw-slashed-zero: ;
|
|
248
|
+
--tw-numeric-figure: ;
|
|
249
|
+
--tw-numeric-spacing: ;
|
|
250
|
+
--tw-numeric-fraction: ;
|
|
251
|
+
--tw-ring-inset: ;
|
|
252
|
+
--tw-ring-offset-width: 0px;
|
|
253
|
+
--tw-ring-offset-color: #fff;
|
|
254
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
255
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
256
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
257
|
+
--tw-shadow: 0 0 #0000;
|
|
258
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
259
|
+
--tw-blur: ;
|
|
260
|
+
--tw-brightness: ;
|
|
261
|
+
--tw-contrast: ;
|
|
262
|
+
--tw-grayscale: ;
|
|
263
|
+
--tw-hue-rotate: ;
|
|
264
|
+
--tw-invert: ;
|
|
265
|
+
--tw-saturate: ;
|
|
266
|
+
--tw-sepia: ;
|
|
267
|
+
--tw-drop-shadow: ;
|
|
268
|
+
--tw-backdrop-blur: ;
|
|
269
|
+
--tw-backdrop-brightness: ;
|
|
270
|
+
--tw-backdrop-contrast: ;
|
|
271
|
+
--tw-backdrop-grayscale: ;
|
|
272
|
+
--tw-backdrop-hue-rotate: ;
|
|
273
|
+
--tw-backdrop-invert: ;
|
|
274
|
+
--tw-backdrop-opacity: ;
|
|
275
|
+
--tw-backdrop-saturate: ;
|
|
276
|
+
--tw-backdrop-sepia: ;
|
|
277
|
+
--tw-contain-size: ;
|
|
278
|
+
--tw-contain-layout: ;
|
|
279
|
+
--tw-contain-paint: ;
|
|
280
|
+
--tw-contain-style: ;
|
|
281
|
+
}
|
|
282
|
+
::backdrop {
|
|
283
|
+
--tw-border-spacing-x: 0;
|
|
284
|
+
--tw-border-spacing-y: 0;
|
|
285
|
+
--tw-translate-x: 0;
|
|
286
|
+
--tw-translate-y: 0;
|
|
287
|
+
--tw-rotate: 0;
|
|
288
|
+
--tw-skew-x: 0;
|
|
289
|
+
--tw-skew-y: 0;
|
|
290
|
+
--tw-scale-x: 1;
|
|
291
|
+
--tw-scale-y: 1;
|
|
292
|
+
--tw-pan-x: ;
|
|
293
|
+
--tw-pan-y: ;
|
|
294
|
+
--tw-pinch-zoom: ;
|
|
295
|
+
--tw-scroll-snap-strictness: proximity;
|
|
296
|
+
--tw-gradient-from-position: ;
|
|
297
|
+
--tw-gradient-via-position: ;
|
|
298
|
+
--tw-gradient-to-position: ;
|
|
299
|
+
--tw-ordinal: ;
|
|
300
|
+
--tw-slashed-zero: ;
|
|
301
|
+
--tw-numeric-figure: ;
|
|
302
|
+
--tw-numeric-spacing: ;
|
|
303
|
+
--tw-numeric-fraction: ;
|
|
304
|
+
--tw-ring-inset: ;
|
|
305
|
+
--tw-ring-offset-width: 0px;
|
|
306
|
+
--tw-ring-offset-color: #fff;
|
|
307
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
308
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
309
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
310
|
+
--tw-shadow: 0 0 #0000;
|
|
311
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
312
|
+
--tw-blur: ;
|
|
313
|
+
--tw-brightness: ;
|
|
314
|
+
--tw-contrast: ;
|
|
315
|
+
--tw-grayscale: ;
|
|
316
|
+
--tw-hue-rotate: ;
|
|
317
|
+
--tw-invert: ;
|
|
318
|
+
--tw-saturate: ;
|
|
319
|
+
--tw-sepia: ;
|
|
320
|
+
--tw-drop-shadow: ;
|
|
321
|
+
--tw-backdrop-blur: ;
|
|
322
|
+
--tw-backdrop-brightness: ;
|
|
323
|
+
--tw-backdrop-contrast: ;
|
|
324
|
+
--tw-backdrop-grayscale: ;
|
|
325
|
+
--tw-backdrop-hue-rotate: ;
|
|
326
|
+
--tw-backdrop-invert: ;
|
|
327
|
+
--tw-backdrop-opacity: ;
|
|
328
|
+
--tw-backdrop-saturate: ;
|
|
329
|
+
--tw-backdrop-sepia: ;
|
|
330
|
+
--tw-contain-size: ;
|
|
331
|
+
--tw-contain-layout: ;
|
|
332
|
+
--tw-contain-paint: ;
|
|
333
|
+
--tw-contain-style: ;
|
|
334
|
+
}
|
|
335
|
+
.visible {
|
|
336
|
+
visibility: visible;
|
|
337
|
+
}
|
|
338
|
+
.fixed {
|
|
339
|
+
position: fixed;
|
|
340
|
+
}
|
|
341
|
+
.m-10 {
|
|
342
|
+
margin: 2.5rem;
|
|
343
|
+
}
|
|
344
|
+
.m-\[10px\] {
|
|
345
|
+
margin: 10px;
|
|
346
|
+
}
|
|
347
|
+
.flex {
|
|
348
|
+
display: flex;
|
|
349
|
+
}
|
|
350
|
+
.table {
|
|
351
|
+
display: table;
|
|
352
|
+
}
|
|
353
|
+
.grid {
|
|
354
|
+
display: grid;
|
|
355
|
+
}
|
|
356
|
+
.flex-col {
|
|
357
|
+
flex-direction: column;
|
|
358
|
+
}
|
|
359
|
+
.rounded-\[8px\] {
|
|
360
|
+
border-radius: 8px;
|
|
361
|
+
}
|
|
362
|
+
.border {
|
|
363
|
+
border-width: 1px;
|
|
364
|
+
}
|
|
365
|
+
.border-4 {
|
|
366
|
+
border-width: 4px;
|
|
367
|
+
}
|
|
368
|
+
.border-\[\#919191\] {
|
|
369
|
+
--tw-border-opacity: 1;
|
|
370
|
+
border-color: rgb(145 145 145 / var(--tw-border-opacity));
|
|
371
|
+
}
|
|
372
|
+
.border-\[\#B8A4DE\] {
|
|
373
|
+
--tw-border-opacity: 1;
|
|
374
|
+
border-color: rgb(184 164 222 / var(--tw-border-opacity));
|
|
375
|
+
}
|
|
376
|
+
.bg-\[\#E2D6F8\] {
|
|
377
|
+
--tw-bg-opacity: 1;
|
|
378
|
+
background-color: rgb(226 214 248 / var(--tw-bg-opacity));
|
|
379
|
+
}
|
|
380
|
+
.bg-\[\#F2F2F2\] {
|
|
381
|
+
--tw-bg-opacity: 1;
|
|
382
|
+
background-color: rgb(242 242 242 / var(--tw-bg-opacity));
|
|
383
|
+
}
|
|
384
|
+
.bg-green-500 {
|
|
385
|
+
--tw-bg-opacity: 1;
|
|
386
|
+
background-color: rgb(34 197 94 / var(--tw-bg-opacity));
|
|
387
|
+
}
|
|
388
|
+
.p-10 {
|
|
389
|
+
padding: 2.5rem;
|
|
390
|
+
}
|
|
391
|
+
.p-\[6px\] {
|
|
392
|
+
padding: 6px;
|
|
393
|
+
}
|
|
394
|
+
.text-center {
|
|
395
|
+
text-align: center;
|
|
396
|
+
}
|
|
397
|
+
.font-semibold {
|
|
398
|
+
font-weight: 600;
|
|
399
|
+
}
|
|
400
|
+
.italic {
|
|
401
|
+
font-style: italic;
|
|
402
|
+
}
|
|
403
|
+
.text-\[\\w-\] {
|
|
404
|
+
color: w-;
|
|
405
|
+
}
|
|
406
|
+
.text-black {
|
|
407
|
+
--tw-text-opacity: 1;
|
|
408
|
+
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
409
|
+
}
|
|
410
|
+
.text-white {
|
|
411
|
+
--tw-text-opacity: 1;
|
|
412
|
+
color: rgb(255 255 255 / var(--tw-text-opacity));
|
|
413
|
+
}
|
|
414
|
+
.shadow-\[0px_0px_1px_1px_\#919191\] {
|
|
415
|
+
--tw-shadow: 0px 0px 1px 1px #919191;
|
|
416
|
+
--tw-shadow-colored: 0px 0px 1px 1px var(--tw-shadow-color);
|
|
417
|
+
box-shadow:
|
|
418
|
+
var(--tw-ring-offset-shadow, 0 0 #0000),
|
|
419
|
+
var(--tw-ring-shadow, 0 0 #0000),
|
|
420
|
+
var(--tw-shadow);
|
|
421
|
+
}
|
|
422
|
+
.shadow-\[0px_0px_1px_1px_\#B8A4DE\] {
|
|
423
|
+
--tw-shadow: 0px 0px 1px 1px #B8A4DE;
|
|
424
|
+
--tw-shadow-colored: 0px 0px 1px 1px var(--tw-shadow-color);
|
|
425
|
+
box-shadow:
|
|
426
|
+
var(--tw-ring-offset-shadow, 0 0 #0000),
|
|
427
|
+
var(--tw-ring-shadow, 0 0 #0000),
|
|
428
|
+
var(--tw-shadow);
|
|
429
|
+
}
|
|
430
|
+
.invert {
|
|
431
|
+
--tw-invert: invert(100%);
|
|
432
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
433
|
+
}
|
|
434
|
+
.filter {
|
|
435
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
436
|
+
}
|
|
437
|
+
.bg-sky-700 .icon-active {
|
|
438
|
+
filter: brightness(0) invert(1);
|
|
439
|
+
}
|
|
440
|
+
.submit.ant-btn-default:not(:disabled):not(.ant-btn-disabled):hover {
|
|
441
|
+
color: #472D7A;
|
|
442
|
+
background-color: white;
|
|
443
|
+
border: solid 1px #472D7A;
|
|
444
|
+
}
|
|
445
|
+
.ant-radio-button-wrapper {
|
|
446
|
+
border: 1px solid #919191 !important;
|
|
447
|
+
}
|
|
448
|
+
.ant-input-affix-wrapper {
|
|
449
|
+
border: solid 1px #919191 !important;
|
|
450
|
+
width: 275px !important;
|
|
451
|
+
height: 16px !important;
|
|
452
|
+
padding: 16px !important;
|
|
453
|
+
gap: 10px !important;
|
|
454
|
+
}
|
|
455
|
+
.ant-input-outlined:hover {
|
|
456
|
+
border: solid 1px #919191 !important;
|
|
457
|
+
}
|
|
458
|
+
.ant-input-outlined:focus {
|
|
459
|
+
border: solid 1px #919191 !important;
|
|
460
|
+
}
|
|
461
|
+
.ant-input-outlined:focus-within {
|
|
462
|
+
border: solid 1px #919191 !important;
|
|
463
|
+
}
|
|
464
|
+
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before {
|
|
465
|
+
display: none !important;
|
|
466
|
+
}
|
|
467
|
+
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::after {
|
|
468
|
+
display: none !important;
|
|
469
|
+
}
|
|
470
|
+
.ant-radio-button-wrapper:not(:first-child)::before {
|
|
471
|
+
width: 0 !important;
|
|
472
|
+
}
|
|
473
|
+
.ant-radio-button-wrapper:first-child {
|
|
474
|
+
border-inline-start: 1px solid rgb(145 145 145) !important;
|
|
475
|
+
}
|
|
476
|
+
.ant-tabs-top > .ant-tabs-nav {
|
|
477
|
+
margin: 0px !important;
|
|
478
|
+
}
|
|
479
|
+
.hover\:bg-\[\#F2F2F2\]:hover {
|
|
480
|
+
--tw-bg-opacity: 1;
|
|
481
|
+
background-color: rgb(242 242 242 / var(--tw-bg-opacity));
|
|
482
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -72,14 +72,6 @@ type ElementType = {
|
|
|
72
72
|
pagination?: boolean;
|
|
73
73
|
is_detail?: boolean;
|
|
74
74
|
dateTime?: string;
|
|
75
|
-
minRows?: number;
|
|
76
|
-
maxRows?: number;
|
|
77
|
-
mode?: "multiple" | "tags" | undefined;
|
|
78
|
-
picker?: "date" | "week" | "month" | "quarter" | "year";
|
|
79
|
-
weekrange?: boolean;
|
|
80
|
-
message?: string;
|
|
81
|
-
description?: string;
|
|
82
|
-
notificationType?: 'success' | 'info' | 'warning' | 'error';
|
|
83
75
|
};
|
|
84
76
|
|
|
85
77
|
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
@@ -147,10 +139,4 @@ declare const DoubleBarChart: (props: ElementType) => React$1.JSX.Element;
|
|
|
147
139
|
|
|
148
140
|
declare const BarChart: (props: ElementType) => React$1.JSX.Element;
|
|
149
141
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
declare const ColorPickerElement: (props: ElementType) => React$1.JSX.Element;
|
|
153
|
-
|
|
154
|
-
declare const NotificationAlert: (props: ElementType) => React$1.JSX.Element;
|
|
155
|
-
|
|
156
|
-
export { AddMoreTable, BarChart, ButtonElement, CheckboxElement, CircleDonut, CkEditor, ColorPickerElement, DatePickerElement, DateRangePickerElement, DivContainer, DoubleBarChart, DropDownGroup, FileUpload, HorizontalBarChart, Image, LineChart, MultipleSelectElement, Navbar, NotificationAlert, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
|
142
|
+
export { AddMoreTable, BarChart, ButtonElement, CheckboxElement, CircleDonut, CkEditor, DatePickerElement, DateRangePickerElement, DoubleBarChart, DropDownGroup, FileUpload, HorizontalBarChart, Image, LineChart, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.d.ts
CHANGED
|
@@ -72,14 +72,6 @@ type ElementType = {
|
|
|
72
72
|
pagination?: boolean;
|
|
73
73
|
is_detail?: boolean;
|
|
74
74
|
dateTime?: string;
|
|
75
|
-
minRows?: number;
|
|
76
|
-
maxRows?: number;
|
|
77
|
-
mode?: "multiple" | "tags" | undefined;
|
|
78
|
-
picker?: "date" | "week" | "month" | "quarter" | "year";
|
|
79
|
-
weekrange?: boolean;
|
|
80
|
-
message?: string;
|
|
81
|
-
description?: string;
|
|
82
|
-
notificationType?: 'success' | 'info' | 'warning' | 'error';
|
|
83
75
|
};
|
|
84
76
|
|
|
85
77
|
declare const TextElement: (props: ElementType) => React$1.JSX.Element;
|
|
@@ -147,10 +139,4 @@ declare const DoubleBarChart: (props: ElementType) => React$1.JSX.Element;
|
|
|
147
139
|
|
|
148
140
|
declare const BarChart: (props: ElementType) => React$1.JSX.Element;
|
|
149
141
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
declare const ColorPickerElement: (props: ElementType) => React$1.JSX.Element;
|
|
153
|
-
|
|
154
|
-
declare const NotificationAlert: (props: ElementType) => React$1.JSX.Element;
|
|
155
|
-
|
|
156
|
-
export { AddMoreTable, BarChart, ButtonElement, CheckboxElement, CircleDonut, CkEditor, ColorPickerElement, DatePickerElement, DateRangePickerElement, DivContainer, DoubleBarChart, DropDownGroup, FileUpload, HorizontalBarChart, Image, LineChart, MultipleSelectElement, Navbar, NotificationAlert, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
|
142
|
+
export { AddMoreTable, BarChart, ButtonElement, CheckboxElement, CircleDonut, CkEditor, DatePickerElement, DateRangePickerElement, DoubleBarChart, DropDownGroup, FileUpload, HorizontalBarChart, Image, LineChart, MultipleSelectElement, Navbar, NumberElement, OtpElement, PasswordElement, RadioElement, SelectElement, SemiCircleDonut, Sidebar, SingleCheckbox, SingleSelectElement, SwitchElement, TableElement, TabsElement, TextElement, TextareaElement, Upload };
|
package/dist/index.js
CHANGED
|
@@ -36,10 +36,8 @@ __export(src_exports, {
|
|
|
36
36
|
CheckboxElement: () => CheckboxElement,
|
|
37
37
|
CircleDonut: () => CircleDonut,
|
|
38
38
|
CkEditor: () => CkEditor,
|
|
39
|
-
ColorPickerElement: () => ColorPickerElement,
|
|
40
39
|
DatePickerElement: () => DatePickerElement,
|
|
41
40
|
DateRangePickerElement: () => DateRangePickerElement,
|
|
42
|
-
DivContainer: () => DivContainer,
|
|
43
41
|
DoubleBarChart: () => DoubleBarChart,
|
|
44
42
|
DropDownGroup: () => DropDownGroup,
|
|
45
43
|
FileUpload: () => FileUpload,
|
|
@@ -48,7 +46,6 @@ __export(src_exports, {
|
|
|
48
46
|
LineChart: () => LineChart,
|
|
49
47
|
MultipleSelectElement: () => MultipleSelectElement,
|
|
50
48
|
Navbar: () => Navbar,
|
|
51
|
-
NotificationAlert: () => NotificationAlert,
|
|
52
49
|
NumberElement: () => NumberElement,
|
|
53
50
|
OtpElement: () => OtpElement,
|
|
54
51
|
PasswordElement: () => PasswordElement,
|
|
@@ -120,7 +117,7 @@ var PasswordElement = (props) => {
|
|
|
120
117
|
},
|
|
121
118
|
iconRender: renderVisibilityIcon,
|
|
122
119
|
visibilityToggle: {
|
|
123
|
-
visible: passwordVisible
|
|
120
|
+
visible: passwordVisible,
|
|
124
121
|
onVisibleChange: handleVisibilityToggle
|
|
125
122
|
}
|
|
126
123
|
}
|
|
@@ -168,19 +165,20 @@ var TextareaElement = (props) => {
|
|
|
168
165
|
props.onChange(e.target.value);
|
|
169
166
|
}
|
|
170
167
|
};
|
|
171
|
-
const defaultMinRows = 2;
|
|
172
|
-
const defaultMaxRows = 6;
|
|
173
168
|
return /* @__PURE__ */ import_react4.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react4.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react4.default.createElement(
|
|
174
169
|
TextArea,
|
|
175
170
|
{
|
|
176
171
|
placeholder: props.placeholder,
|
|
177
172
|
allowClear: true,
|
|
173
|
+
defaultValue: props.defaultValue,
|
|
178
174
|
disabled: props.disabled,
|
|
179
175
|
id: props.name,
|
|
180
|
-
|
|
176
|
+
status: props.status,
|
|
181
177
|
className: props.className,
|
|
178
|
+
variant: props.variant,
|
|
182
179
|
name: props.name,
|
|
183
180
|
showCount: true,
|
|
181
|
+
maxLength: props.maxLength,
|
|
184
182
|
onChange: (e) => {
|
|
185
183
|
handleChange(e);
|
|
186
184
|
}
|
|
@@ -196,9 +194,11 @@ var filterOptions = (input, option) => {
|
|
|
196
194
|
};
|
|
197
195
|
var SelectElement = (props) => {
|
|
198
196
|
const handleChange = (value) => {
|
|
197
|
+
console.log("++=====", typeof value);
|
|
199
198
|
if (props.onChange) {
|
|
200
199
|
if (typeof value === "string") {
|
|
201
200
|
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
201
|
+
console.log(filterOption2);
|
|
202
202
|
props.onChange(filterOption2);
|
|
203
203
|
} else {
|
|
204
204
|
const selectedOptions = value ? value.map((eachVal) => {
|
|
@@ -208,7 +208,7 @@ var SelectElement = (props) => {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
return /* @__PURE__ */ import_react5.default.createElement("div", { className:
|
|
211
|
+
return /* @__PURE__ */ import_react5.default.createElement("div", { className: "flex flex-col p-10 m-10" }, props.label && /* @__PURE__ */ import_react5.default.createElement("label", { htmlFor: props.name, className: "font-semibold text-default-400 text-red bg-green-500 border-4" }, props.label), /* @__PURE__ */ import_react5.default.createElement(
|
|
212
212
|
import_antd5.Select,
|
|
213
213
|
{
|
|
214
214
|
options: props.options,
|
|
@@ -217,8 +217,7 @@ var SelectElement = (props) => {
|
|
|
217
217
|
filterOption: filterOptions,
|
|
218
218
|
showSearch: true,
|
|
219
219
|
className: props.className,
|
|
220
|
-
onChange: handleChange
|
|
221
|
-
mode: props.mode
|
|
220
|
+
onChange: handleChange
|
|
222
221
|
}
|
|
223
222
|
));
|
|
224
223
|
};
|
|
@@ -233,6 +232,7 @@ var RadioElement = (props) => {
|
|
|
233
232
|
const [selectedValue, setSelectedValue] = (0, import_react6.useState)(props.value);
|
|
234
233
|
const optionType = props.optionType === "button" ? "button" : void 0;
|
|
235
234
|
const handleChange = (option) => {
|
|
235
|
+
console.log(option);
|
|
236
236
|
setSelectedValue(option);
|
|
237
237
|
setIsDisabled(true);
|
|
238
238
|
if (props.onChange) {
|
|
@@ -272,20 +272,19 @@ var RadioElement = (props) => {
|
|
|
272
272
|
var import_react7 = __toESM(require("react"));
|
|
273
273
|
var import_antd7 = require("antd");
|
|
274
274
|
var CheckboxGroup = import_antd7.Checkbox.Group;
|
|
275
|
-
var defaultCheckedList = [
|
|
275
|
+
var defaultCheckedList = [];
|
|
276
276
|
var CheckboxElement = (props) => {
|
|
277
277
|
const [checkedList, setCheckedList] = (0, import_react7.useState)(defaultCheckedList);
|
|
278
|
-
const
|
|
279
|
-
const checkAll = options.length > 0 && options.length === checkedList.length;
|
|
278
|
+
const checkAll = props.options && props.options.length === checkedList.length;
|
|
280
279
|
const handleChange = (list) => {
|
|
281
280
|
setCheckedList(list);
|
|
282
281
|
if (props.onChange) {
|
|
283
|
-
const selectedOptions = options.filter((option) => list.includes(option.value));
|
|
282
|
+
const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
|
|
284
283
|
props.onChange(selectedOptions);
|
|
285
284
|
}
|
|
286
285
|
};
|
|
287
286
|
const onHandleAllChanges = (e) => {
|
|
288
|
-
const newList = e.target.checked ? options
|
|
287
|
+
const newList = e.target.checked ? props.options : [];
|
|
289
288
|
setCheckedList(newList);
|
|
290
289
|
if (props.onChange) {
|
|
291
290
|
props.onChange(newList);
|
|
@@ -308,8 +307,8 @@ var CheckboxElement = (props) => {
|
|
|
308
307
|
disabled: props.disabled,
|
|
309
308
|
style: props.styles,
|
|
310
309
|
className: props.className,
|
|
311
|
-
options,
|
|
312
|
-
value: checkedList
|
|
310
|
+
options: props.options,
|
|
311
|
+
value: checkedList,
|
|
313
312
|
onChange: handleChange
|
|
314
313
|
}
|
|
315
314
|
));
|
|
@@ -325,6 +324,7 @@ var CkEditor = (props) => {
|
|
|
325
324
|
var import_react9 = __toESM(require("react"));
|
|
326
325
|
var import_antd8 = require("antd");
|
|
327
326
|
var onSearch = (value) => {
|
|
327
|
+
console.log("search:", value);
|
|
328
328
|
};
|
|
329
329
|
var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase());
|
|
330
330
|
var SingleSelectElement = (props) => {
|
|
@@ -605,6 +605,7 @@ var AddMoreTable = (props) => {
|
|
|
605
605
|
});
|
|
606
606
|
};
|
|
607
607
|
(0, import_react13.useEffect)(() => {
|
|
608
|
+
console.log(rows);
|
|
608
609
|
}, [rows]);
|
|
609
610
|
const renderInputElement = (element, value) => {
|
|
610
611
|
if (!element) return null;
|
|
@@ -749,9 +750,11 @@ var Navbar = (props) => {
|
|
|
749
750
|
// src/Components/TableElement.tsx
|
|
750
751
|
var import_react19 = __toESM(require("react"));
|
|
751
752
|
var import_antd13 = require("antd");
|
|
753
|
+
var import_icons5 = require("@ant-design/icons");
|
|
752
754
|
var TableElement = (props) => {
|
|
753
755
|
const { thead, tbody } = props;
|
|
754
756
|
const [dataSource, setDataSource] = (0, import_react19.useState)([]);
|
|
757
|
+
const defaultVal = props.value;
|
|
755
758
|
(0, import_react19.useEffect)(() => {
|
|
756
759
|
if (tbody) {
|
|
757
760
|
setDataSource(
|
|
@@ -763,6 +766,13 @@ var TableElement = (props) => {
|
|
|
763
766
|
);
|
|
764
767
|
}
|
|
765
768
|
}, [tbody]);
|
|
769
|
+
const handleChange = (record) => {
|
|
770
|
+
if (record) {
|
|
771
|
+
props.onChange && props.onChange(record);
|
|
772
|
+
} else {
|
|
773
|
+
props.onChange && props.onChange(defaultVal);
|
|
774
|
+
}
|
|
775
|
+
};
|
|
766
776
|
let columns = [];
|
|
767
777
|
if (thead) {
|
|
768
778
|
columns = [
|
|
@@ -789,6 +799,26 @@ var TableElement = (props) => {
|
|
|
789
799
|
}
|
|
790
800
|
}))
|
|
791
801
|
];
|
|
802
|
+
if (props.view) {
|
|
803
|
+
columns.push({
|
|
804
|
+
title: "View",
|
|
805
|
+
dataIndex: "View",
|
|
806
|
+
key: "View",
|
|
807
|
+
render: (_, record) => {
|
|
808
|
+
return /* @__PURE__ */ import_react19.default.createElement(
|
|
809
|
+
"a",
|
|
810
|
+
{
|
|
811
|
+
onClick: () => {
|
|
812
|
+
if (props.view) {
|
|
813
|
+
handleChange(record);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
/* @__PURE__ */ import_react19.default.createElement(import_icons5.EyeOutlined, null)
|
|
818
|
+
);
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
}
|
|
792
822
|
}
|
|
793
823
|
const onChangeTable = (pagination, filters, sorter, extra) => {
|
|
794
824
|
if (extra && extra.currentDataSource) {
|
|
@@ -807,6 +837,11 @@ var TableElement = (props) => {
|
|
|
807
837
|
};
|
|
808
838
|
const rowSelectionConfig = props.rowSelection ? {
|
|
809
839
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
840
|
+
console.log(
|
|
841
|
+
`selectedRowKeys: ${selectedRowKeys}`,
|
|
842
|
+
"selectedRows: ",
|
|
843
|
+
selectedRows
|
|
844
|
+
);
|
|
810
845
|
if (props.onChange) {
|
|
811
846
|
props.onChange(selectedRows);
|
|
812
847
|
}
|
|
@@ -824,6 +859,16 @@ var TableElement = (props) => {
|
|
|
824
859
|
showSizeChanger: props.count ? props.count > 10 : 0 > 10,
|
|
825
860
|
onChange: onChangePage
|
|
826
861
|
} : false,
|
|
862
|
+
onRow: (record) => {
|
|
863
|
+
return {
|
|
864
|
+
onClick: () => {
|
|
865
|
+
if (props.view) {
|
|
866
|
+
handleChange(record);
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
style: { cursor: "pointer" }
|
|
870
|
+
};
|
|
871
|
+
},
|
|
827
872
|
rowSelection: rowSelectionConfig,
|
|
828
873
|
dataSource,
|
|
829
874
|
columns,
|
|
@@ -845,9 +890,10 @@ var DatePickerElement = (props) => {
|
|
|
845
890
|
const [dateState, setDateState] = (0, import_react20.useState)("");
|
|
846
891
|
const handleChange = (date, dateString) => {
|
|
847
892
|
if (date) {
|
|
893
|
+
const formattedDate = dateString;
|
|
848
894
|
setDateState(date);
|
|
849
895
|
if (props.onChange) {
|
|
850
|
-
props.onChange(
|
|
896
|
+
props.onChange(formattedDate);
|
|
851
897
|
}
|
|
852
898
|
} else {
|
|
853
899
|
setDateState("");
|
|
@@ -865,9 +911,8 @@ var DatePickerElement = (props) => {
|
|
|
865
911
|
disabledDate,
|
|
866
912
|
placeholder: props.placeholder,
|
|
867
913
|
value: dateState,
|
|
868
|
-
format: "DD-MM-YYYY",
|
|
869
|
-
onChange: handleChange
|
|
870
|
-
picker: props.picker
|
|
914
|
+
format: { format: "DD-MM-YYYY" },
|
|
915
|
+
onChange: handleChange
|
|
871
916
|
}
|
|
872
917
|
));
|
|
873
918
|
};
|
|
@@ -876,59 +921,34 @@ var DatePickerElement = (props) => {
|
|
|
876
921
|
var import_react21 = __toESM(require("react"));
|
|
877
922
|
var import_antd15 = require("antd");
|
|
878
923
|
var import_dayjs2 = __toESM(require("dayjs"));
|
|
924
|
+
var import_moment2 = __toESM(require("moment"));
|
|
879
925
|
var DateRangePickerElement = (props) => {
|
|
880
926
|
const { value } = props;
|
|
881
927
|
const { RangePicker } = import_antd15.DatePicker;
|
|
882
928
|
const dateValues = value ? value.map((date) => (0, import_dayjs2.default)(date, "DD-MM-YYYY")) : null;
|
|
883
|
-
const today = (0, import_dayjs2.default)();
|
|
884
929
|
const handleChange = (dates, dateStrings) => {
|
|
885
930
|
if (dates) {
|
|
886
|
-
|
|
887
|
-
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
888
|
-
end = today;
|
|
889
|
-
}
|
|
890
|
-
const adjustedDates = [start, end].map(
|
|
891
|
-
(date) => date ? date.format("DD-MM-YYYY") : null
|
|
892
|
-
);
|
|
893
|
-
props.onChange && props.onChange(adjustedDates);
|
|
931
|
+
props.onChange && props.onChange(dateStrings);
|
|
894
932
|
} else {
|
|
895
933
|
props.onChange && props.onChange("");
|
|
896
934
|
}
|
|
897
935
|
};
|
|
898
|
-
|
|
899
|
-
{ label: "Last 7 Days", value: [(0, import_dayjs2.default)().
|
|
900
|
-
{ label: "Last 14 Days", value: [(0, import_dayjs2.default)().
|
|
901
|
-
{ label: "Last 30 Days", value: [(0, import_dayjs2.default)().
|
|
902
|
-
{ label: "Last 90 Days", value: [(0, import_dayjs2.default)().
|
|
936
|
+
const rangePresets = [
|
|
937
|
+
{ label: "Last 7 Days", value: [(0, import_dayjs2.default)().add(-7, "d"), (0, import_dayjs2.default)()] },
|
|
938
|
+
{ label: "Last 14 Days", value: [(0, import_dayjs2.default)().add(-14, "d"), (0, import_dayjs2.default)()] },
|
|
939
|
+
{ label: "Last 30 Days", value: [(0, import_dayjs2.default)().add(-30, "d"), (0, import_dayjs2.default)()] },
|
|
940
|
+
{ label: "Last 90 Days", value: [(0, import_dayjs2.default)().add(-90, "d"), (0, import_dayjs2.default)()] }
|
|
903
941
|
];
|
|
904
942
|
const disabledDate = (current) => {
|
|
905
|
-
|
|
906
|
-
return current && current < today.subtract(7, "d") || current > today;
|
|
907
|
-
}
|
|
908
|
-
return current && current > today;
|
|
909
|
-
};
|
|
910
|
-
const handleCalendarChange = (dates) => {
|
|
911
|
-
if (dates) {
|
|
912
|
-
let [start, end] = dates;
|
|
913
|
-
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
914
|
-
end = today;
|
|
915
|
-
}
|
|
916
|
-
const adjustedDates = [start, end].map(
|
|
917
|
-
(date) => date ? date.format("DD-MM-YYYY") : null
|
|
918
|
-
);
|
|
919
|
-
props.onChange && props.onChange(adjustedDates);
|
|
920
|
-
} else {
|
|
921
|
-
props.onChange && props.onChange("");
|
|
922
|
-
}
|
|
943
|
+
return current && current > (0, import_moment2.default)();
|
|
923
944
|
};
|
|
924
945
|
return /* @__PURE__ */ import_react21.default.createElement(import_antd15.Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ import_react21.default.createElement(
|
|
925
946
|
RangePicker,
|
|
926
947
|
{
|
|
927
948
|
disabledDate,
|
|
928
|
-
|
|
929
|
-
format: "DD-MM-YYYY",
|
|
949
|
+
presets: rangePresets,
|
|
950
|
+
format: { format: "DD-MM-YYYY" },
|
|
930
951
|
onChange: handleChange,
|
|
931
|
-
onCalendarChange: handleCalendarChange,
|
|
932
952
|
value: dateValues
|
|
933
953
|
}
|
|
934
954
|
));
|
|
@@ -1020,12 +1040,10 @@ var DropDownGroup = (props) => {
|
|
|
1020
1040
|
// src/Components/FilesUpload.tsx
|
|
1021
1041
|
var import_react25 = __toESM(require("react"));
|
|
1022
1042
|
var import_antd18 = require("antd");
|
|
1023
|
-
var
|
|
1043
|
+
var import_icons6 = require("@ant-design/icons");
|
|
1024
1044
|
var FileUpload = (props) => {
|
|
1025
1045
|
const { Dragger } = import_antd18.Upload;
|
|
1026
|
-
const [files, setFiles] = (0, import_react25.useState)(
|
|
1027
|
-
props.value && props.value.length > 0 ? props.value : []
|
|
1028
|
-
);
|
|
1046
|
+
const [files, setFiles] = (0, import_react25.useState)([]);
|
|
1029
1047
|
const handleChange = ({ fileList }) => {
|
|
1030
1048
|
setFiles(fileList);
|
|
1031
1049
|
if (props.onChange) {
|
|
@@ -1053,7 +1071,7 @@ var FileUpload = (props) => {
|
|
|
1053
1071
|
showUploadList: true,
|
|
1054
1072
|
customRequest
|
|
1055
1073
|
},
|
|
1056
|
-
/* @__PURE__ */ import_react25.default.createElement("p", null, /* @__PURE__ */ import_react25.default.createElement(
|
|
1074
|
+
/* @__PURE__ */ import_react25.default.createElement("p", null, /* @__PURE__ */ import_react25.default.createElement(import_icons6.InboxOutlined, null)),
|
|
1057
1075
|
/* @__PURE__ */ import_react25.default.createElement("p", null, "Click or drag file to upload")
|
|
1058
1076
|
));
|
|
1059
1077
|
};
|
|
@@ -1074,6 +1092,7 @@ var TabsElement = (props) => {
|
|
|
1074
1092
|
var import_react27 = __toESM(require("react"));
|
|
1075
1093
|
var import_antd20 = require("antd");
|
|
1076
1094
|
var onChange = (checked) => {
|
|
1095
|
+
console.log(`switch to ${checked}`);
|
|
1077
1096
|
};
|
|
1078
1097
|
var SwitchElement = () => /* @__PURE__ */ import_react27.default.createElement(import_antd20.Switch, { defaultChecked: true, onChange });
|
|
1079
1098
|
|
|
@@ -1084,12 +1103,12 @@ var Upload2 = (props) => {
|
|
|
1084
1103
|
const handleFileChange = (e) => {
|
|
1085
1104
|
setFile(e.target.files[0]);
|
|
1086
1105
|
if (props.onChange) {
|
|
1087
|
-
console.log(e.target.files[0]);
|
|
1088
1106
|
props.onChange(e.target.files[0]);
|
|
1089
1107
|
}
|
|
1090
1108
|
};
|
|
1091
1109
|
const handleUpload = async () => {
|
|
1092
1110
|
if (!file) {
|
|
1111
|
+
console.error("No file selected");
|
|
1093
1112
|
return;
|
|
1094
1113
|
}
|
|
1095
1114
|
};
|
|
@@ -1592,59 +1611,6 @@ var BarChart = (props) => {
|
|
|
1592
1611
|
};
|
|
1593
1612
|
return /* @__PURE__ */ import_react35.default.createElement("div", { className: props.className }, /* @__PURE__ */ import_react35.default.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ import_react35.default.createElement(import_react_chartjs_24.Bar, { data, options }));
|
|
1594
1613
|
};
|
|
1595
|
-
|
|
1596
|
-
// src/Components/DivContainer.tsx
|
|
1597
|
-
var import_react36 = __toESM(require("react"));
|
|
1598
|
-
var DivContainer = (props) => {
|
|
1599
|
-
return /* @__PURE__ */ import_react36.default.createElement("div", { className: props.className, onClick: props.onClick }, props.label);
|
|
1600
|
-
};
|
|
1601
|
-
|
|
1602
|
-
// src/Components/ColorPickerElement.tsx
|
|
1603
|
-
var import_react37 = __toESM(require("react"));
|
|
1604
|
-
var import_antd22 = require("antd");
|
|
1605
|
-
var ColorPickerElement = (props) => {
|
|
1606
|
-
const onHandleChange = (value, hex) => {
|
|
1607
|
-
console.log(hex);
|
|
1608
|
-
props.onChange && props.onChange(hex);
|
|
1609
|
-
};
|
|
1610
|
-
return /* @__PURE__ */ import_react37.default.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ import_react37.default.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ import_react37.default.createElement("br", null), /* @__PURE__ */ import_react37.default.createElement(
|
|
1611
|
-
import_antd22.ColorPicker,
|
|
1612
|
-
{
|
|
1613
|
-
className: props.className,
|
|
1614
|
-
showText: true,
|
|
1615
|
-
defaultValue: props.defaultValue,
|
|
1616
|
-
onChange: onHandleChange
|
|
1617
|
-
}
|
|
1618
|
-
));
|
|
1619
|
-
};
|
|
1620
|
-
|
|
1621
|
-
// src/Components/NotificationAlert.tsx
|
|
1622
|
-
var import_react38 = __toESM(require("react"));
|
|
1623
|
-
var import_antd23 = require("antd");
|
|
1624
|
-
var NotificationAlert = (props) => {
|
|
1625
|
-
const [api, contextHolder] = import_antd23.notification.useNotification();
|
|
1626
|
-
const openNotificationType = (pauseOnHover, type) => {
|
|
1627
|
-
api[type]({
|
|
1628
|
-
message: props.message,
|
|
1629
|
-
description: props.description,
|
|
1630
|
-
duration: 4.5,
|
|
1631
|
-
pauseOnHover
|
|
1632
|
-
});
|
|
1633
|
-
};
|
|
1634
|
-
const openNotification = (pauseOnHover) => {
|
|
1635
|
-
api.open({
|
|
1636
|
-
message: props.message,
|
|
1637
|
-
description: props.description,
|
|
1638
|
-
duration: 4.5,
|
|
1639
|
-
pauseOnHover
|
|
1640
|
-
});
|
|
1641
|
-
};
|
|
1642
|
-
const handleClick = () => {
|
|
1643
|
-
const notificationType = props.notificationType || "info";
|
|
1644
|
-
props.notificationType ? openNotificationType(true, notificationType) : openNotification(true);
|
|
1645
|
-
};
|
|
1646
|
-
return /* @__PURE__ */ import_react38.default.createElement("div", { className: props.containerClassName }, contextHolder, /* @__PURE__ */ import_react38.default.createElement(import_antd23.Button, { type: "primary", onClick: handleClick, className: props.className }, props.label));
|
|
1647
|
-
};
|
|
1648
1614
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1649
1615
|
0 && (module.exports = {
|
|
1650
1616
|
AddMoreTable,
|
|
@@ -1653,10 +1619,8 @@ var NotificationAlert = (props) => {
|
|
|
1653
1619
|
CheckboxElement,
|
|
1654
1620
|
CircleDonut,
|
|
1655
1621
|
CkEditor,
|
|
1656
|
-
ColorPickerElement,
|
|
1657
1622
|
DatePickerElement,
|
|
1658
1623
|
DateRangePickerElement,
|
|
1659
|
-
DivContainer,
|
|
1660
1624
|
DoubleBarChart,
|
|
1661
1625
|
DropDownGroup,
|
|
1662
1626
|
FileUpload,
|
|
@@ -1665,7 +1629,6 @@ var NotificationAlert = (props) => {
|
|
|
1665
1629
|
LineChart,
|
|
1666
1630
|
MultipleSelectElement,
|
|
1667
1631
|
Navbar,
|
|
1668
|
-
NotificationAlert,
|
|
1669
1632
|
NumberElement,
|
|
1670
1633
|
OtpElement,
|
|
1671
1634
|
PasswordElement,
|
package/dist/index.mjs
CHANGED
|
@@ -51,7 +51,7 @@ var PasswordElement = (props) => {
|
|
|
51
51
|
},
|
|
52
52
|
iconRender: renderVisibilityIcon,
|
|
53
53
|
visibilityToggle: {
|
|
54
|
-
visible: passwordVisible
|
|
54
|
+
visible: passwordVisible,
|
|
55
55
|
onVisibleChange: handleVisibilityToggle
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -99,19 +99,20 @@ var TextareaElement = (props) => {
|
|
|
99
99
|
props.onChange(e.target.value);
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
const defaultMinRows = 2;
|
|
103
|
-
const defaultMaxRows = 6;
|
|
104
102
|
return /* @__PURE__ */ React4.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React4.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React4.createElement(
|
|
105
103
|
TextArea,
|
|
106
104
|
{
|
|
107
105
|
placeholder: props.placeholder,
|
|
108
106
|
allowClear: true,
|
|
107
|
+
defaultValue: props.defaultValue,
|
|
109
108
|
disabled: props.disabled,
|
|
110
109
|
id: props.name,
|
|
111
|
-
|
|
110
|
+
status: props.status,
|
|
112
111
|
className: props.className,
|
|
112
|
+
variant: props.variant,
|
|
113
113
|
name: props.name,
|
|
114
114
|
showCount: true,
|
|
115
|
+
maxLength: props.maxLength,
|
|
115
116
|
onChange: (e) => {
|
|
116
117
|
handleChange(e);
|
|
117
118
|
}
|
|
@@ -127,9 +128,11 @@ var filterOptions = (input, option) => {
|
|
|
127
128
|
};
|
|
128
129
|
var SelectElement = (props) => {
|
|
129
130
|
const handleChange = (value) => {
|
|
131
|
+
console.log("++=====", typeof value);
|
|
130
132
|
if (props.onChange) {
|
|
131
133
|
if (typeof value === "string") {
|
|
132
134
|
const filterOption2 = props.options && props.options.find((eachOption) => eachOption.value === value);
|
|
135
|
+
console.log(filterOption2);
|
|
133
136
|
props.onChange(filterOption2);
|
|
134
137
|
} else {
|
|
135
138
|
const selectedOptions = value ? value.map((eachVal) => {
|
|
@@ -139,7 +142,7 @@ var SelectElement = (props) => {
|
|
|
139
142
|
}
|
|
140
143
|
}
|
|
141
144
|
};
|
|
142
|
-
return /* @__PURE__ */ React5.createElement("div", { className:
|
|
145
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "flex flex-col p-10 m-10" }, props.label && /* @__PURE__ */ React5.createElement("label", { htmlFor: props.name, className: "font-semibold text-default-400 text-red bg-green-500 border-4" }, props.label), /* @__PURE__ */ React5.createElement(
|
|
143
146
|
Select,
|
|
144
147
|
{
|
|
145
148
|
options: props.options,
|
|
@@ -148,8 +151,7 @@ var SelectElement = (props) => {
|
|
|
148
151
|
filterOption: filterOptions,
|
|
149
152
|
showSearch: true,
|
|
150
153
|
className: props.className,
|
|
151
|
-
onChange: handleChange
|
|
152
|
-
mode: props.mode
|
|
154
|
+
onChange: handleChange
|
|
153
155
|
}
|
|
154
156
|
));
|
|
155
157
|
};
|
|
@@ -164,6 +166,7 @@ var RadioElement = (props) => {
|
|
|
164
166
|
const [selectedValue, setSelectedValue] = useState2(props.value);
|
|
165
167
|
const optionType = props.optionType === "button" ? "button" : void 0;
|
|
166
168
|
const handleChange = (option) => {
|
|
169
|
+
console.log(option);
|
|
167
170
|
setSelectedValue(option);
|
|
168
171
|
setIsDisabled(true);
|
|
169
172
|
if (props.onChange) {
|
|
@@ -203,20 +206,19 @@ var RadioElement = (props) => {
|
|
|
203
206
|
import React7, { useState as useState3 } from "react";
|
|
204
207
|
import { Checkbox } from "antd";
|
|
205
208
|
var CheckboxGroup = Checkbox.Group;
|
|
206
|
-
var defaultCheckedList = [
|
|
209
|
+
var defaultCheckedList = [];
|
|
207
210
|
var CheckboxElement = (props) => {
|
|
208
211
|
const [checkedList, setCheckedList] = useState3(defaultCheckedList);
|
|
209
|
-
const
|
|
210
|
-
const checkAll = options.length > 0 && options.length === checkedList.length;
|
|
212
|
+
const checkAll = props.options && props.options.length === checkedList.length;
|
|
211
213
|
const handleChange = (list) => {
|
|
212
214
|
setCheckedList(list);
|
|
213
215
|
if (props.onChange) {
|
|
214
|
-
const selectedOptions = options.filter((option) => list.includes(option.value));
|
|
216
|
+
const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
|
|
215
217
|
props.onChange(selectedOptions);
|
|
216
218
|
}
|
|
217
219
|
};
|
|
218
220
|
const onHandleAllChanges = (e) => {
|
|
219
|
-
const newList = e.target.checked ? options
|
|
221
|
+
const newList = e.target.checked ? props.options : [];
|
|
220
222
|
setCheckedList(newList);
|
|
221
223
|
if (props.onChange) {
|
|
222
224
|
props.onChange(newList);
|
|
@@ -239,8 +241,8 @@ var CheckboxElement = (props) => {
|
|
|
239
241
|
disabled: props.disabled,
|
|
240
242
|
style: props.styles,
|
|
241
243
|
className: props.className,
|
|
242
|
-
options,
|
|
243
|
-
value: checkedList
|
|
244
|
+
options: props.options,
|
|
245
|
+
value: checkedList,
|
|
244
246
|
onChange: handleChange
|
|
245
247
|
}
|
|
246
248
|
));
|
|
@@ -256,6 +258,7 @@ var CkEditor = (props) => {
|
|
|
256
258
|
import React9 from "react";
|
|
257
259
|
import { Select as Select2 } from "antd";
|
|
258
260
|
var onSearch = (value) => {
|
|
261
|
+
console.log("search:", value);
|
|
259
262
|
};
|
|
260
263
|
var filterOption = (input, option) => (option?.label ?? "").toLowerCase().includes(input.toLowerCase());
|
|
261
264
|
var SingleSelectElement = (props) => {
|
|
@@ -536,6 +539,7 @@ var AddMoreTable = (props) => {
|
|
|
536
539
|
});
|
|
537
540
|
};
|
|
538
541
|
useEffect(() => {
|
|
542
|
+
console.log(rows);
|
|
539
543
|
}, [rows]);
|
|
540
544
|
const renderInputElement = (element, value) => {
|
|
541
545
|
if (!element) return null;
|
|
@@ -680,9 +684,11 @@ var Navbar = (props) => {
|
|
|
680
684
|
// src/Components/TableElement.tsx
|
|
681
685
|
import React19, { useState as useState5, useEffect as useEffect2 } from "react";
|
|
682
686
|
import { Table as Table2 } from "antd";
|
|
687
|
+
import { EyeOutlined } from "@ant-design/icons";
|
|
683
688
|
var TableElement = (props) => {
|
|
684
689
|
const { thead, tbody } = props;
|
|
685
690
|
const [dataSource, setDataSource] = useState5([]);
|
|
691
|
+
const defaultVal = props.value;
|
|
686
692
|
useEffect2(() => {
|
|
687
693
|
if (tbody) {
|
|
688
694
|
setDataSource(
|
|
@@ -694,6 +700,13 @@ var TableElement = (props) => {
|
|
|
694
700
|
);
|
|
695
701
|
}
|
|
696
702
|
}, [tbody]);
|
|
703
|
+
const handleChange = (record) => {
|
|
704
|
+
if (record) {
|
|
705
|
+
props.onChange && props.onChange(record);
|
|
706
|
+
} else {
|
|
707
|
+
props.onChange && props.onChange(defaultVal);
|
|
708
|
+
}
|
|
709
|
+
};
|
|
697
710
|
let columns = [];
|
|
698
711
|
if (thead) {
|
|
699
712
|
columns = [
|
|
@@ -720,6 +733,26 @@ var TableElement = (props) => {
|
|
|
720
733
|
}
|
|
721
734
|
}))
|
|
722
735
|
];
|
|
736
|
+
if (props.view) {
|
|
737
|
+
columns.push({
|
|
738
|
+
title: "View",
|
|
739
|
+
dataIndex: "View",
|
|
740
|
+
key: "View",
|
|
741
|
+
render: (_, record) => {
|
|
742
|
+
return /* @__PURE__ */ React19.createElement(
|
|
743
|
+
"a",
|
|
744
|
+
{
|
|
745
|
+
onClick: () => {
|
|
746
|
+
if (props.view) {
|
|
747
|
+
handleChange(record);
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
/* @__PURE__ */ React19.createElement(EyeOutlined, null)
|
|
752
|
+
);
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
}
|
|
723
756
|
}
|
|
724
757
|
const onChangeTable = (pagination, filters, sorter, extra) => {
|
|
725
758
|
if (extra && extra.currentDataSource) {
|
|
@@ -738,6 +771,11 @@ var TableElement = (props) => {
|
|
|
738
771
|
};
|
|
739
772
|
const rowSelectionConfig = props.rowSelection ? {
|
|
740
773
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
774
|
+
console.log(
|
|
775
|
+
`selectedRowKeys: ${selectedRowKeys}`,
|
|
776
|
+
"selectedRows: ",
|
|
777
|
+
selectedRows
|
|
778
|
+
);
|
|
741
779
|
if (props.onChange) {
|
|
742
780
|
props.onChange(selectedRows);
|
|
743
781
|
}
|
|
@@ -755,6 +793,16 @@ var TableElement = (props) => {
|
|
|
755
793
|
showSizeChanger: props.count ? props.count > 10 : 0 > 10,
|
|
756
794
|
onChange: onChangePage
|
|
757
795
|
} : false,
|
|
796
|
+
onRow: (record) => {
|
|
797
|
+
return {
|
|
798
|
+
onClick: () => {
|
|
799
|
+
if (props.view) {
|
|
800
|
+
handleChange(record);
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
style: { cursor: "pointer" }
|
|
804
|
+
};
|
|
805
|
+
},
|
|
758
806
|
rowSelection: rowSelectionConfig,
|
|
759
807
|
dataSource,
|
|
760
808
|
columns,
|
|
@@ -776,9 +824,10 @@ var DatePickerElement = (props) => {
|
|
|
776
824
|
const [dateState, setDateState] = useState6("");
|
|
777
825
|
const handleChange = (date, dateString) => {
|
|
778
826
|
if (date) {
|
|
827
|
+
const formattedDate = dateString;
|
|
779
828
|
setDateState(date);
|
|
780
829
|
if (props.onChange) {
|
|
781
|
-
props.onChange(
|
|
830
|
+
props.onChange(formattedDate);
|
|
782
831
|
}
|
|
783
832
|
} else {
|
|
784
833
|
setDateState("");
|
|
@@ -796,9 +845,8 @@ var DatePickerElement = (props) => {
|
|
|
796
845
|
disabledDate,
|
|
797
846
|
placeholder: props.placeholder,
|
|
798
847
|
value: dateState,
|
|
799
|
-
format: "DD-MM-YYYY",
|
|
800
|
-
onChange: handleChange
|
|
801
|
-
picker: props.picker
|
|
848
|
+
format: { format: "DD-MM-YYYY" },
|
|
849
|
+
onChange: handleChange
|
|
802
850
|
}
|
|
803
851
|
));
|
|
804
852
|
};
|
|
@@ -807,59 +855,34 @@ var DatePickerElement = (props) => {
|
|
|
807
855
|
import React21 from "react";
|
|
808
856
|
import { DatePicker as DatePicker2, Space } from "antd";
|
|
809
857
|
import dayjs2 from "dayjs";
|
|
858
|
+
import moment2 from "moment";
|
|
810
859
|
var DateRangePickerElement = (props) => {
|
|
811
860
|
const { value } = props;
|
|
812
861
|
const { RangePicker } = DatePicker2;
|
|
813
862
|
const dateValues = value ? value.map((date) => dayjs2(date, "DD-MM-YYYY")) : null;
|
|
814
|
-
const today = dayjs2();
|
|
815
863
|
const handleChange = (dates, dateStrings) => {
|
|
816
864
|
if (dates) {
|
|
817
|
-
|
|
818
|
-
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
819
|
-
end = today;
|
|
820
|
-
}
|
|
821
|
-
const adjustedDates = [start, end].map(
|
|
822
|
-
(date) => date ? date.format("DD-MM-YYYY") : null
|
|
823
|
-
);
|
|
824
|
-
props.onChange && props.onChange(adjustedDates);
|
|
865
|
+
props.onChange && props.onChange(dateStrings);
|
|
825
866
|
} else {
|
|
826
867
|
props.onChange && props.onChange("");
|
|
827
868
|
}
|
|
828
869
|
};
|
|
829
|
-
|
|
830
|
-
{ label: "Last 7 Days", value: [dayjs2().
|
|
831
|
-
{ label: "Last 14 Days", value: [dayjs2().
|
|
832
|
-
{ label: "Last 30 Days", value: [dayjs2().
|
|
833
|
-
{ label: "Last 90 Days", value: [dayjs2().
|
|
870
|
+
const rangePresets = [
|
|
871
|
+
{ label: "Last 7 Days", value: [dayjs2().add(-7, "d"), dayjs2()] },
|
|
872
|
+
{ label: "Last 14 Days", value: [dayjs2().add(-14, "d"), dayjs2()] },
|
|
873
|
+
{ label: "Last 30 Days", value: [dayjs2().add(-30, "d"), dayjs2()] },
|
|
874
|
+
{ label: "Last 90 Days", value: [dayjs2().add(-90, "d"), dayjs2()] }
|
|
834
875
|
];
|
|
835
876
|
const disabledDate = (current) => {
|
|
836
|
-
|
|
837
|
-
return current && current < today.subtract(7, "d") || current > today;
|
|
838
|
-
}
|
|
839
|
-
return current && current > today;
|
|
840
|
-
};
|
|
841
|
-
const handleCalendarChange = (dates) => {
|
|
842
|
-
if (dates) {
|
|
843
|
-
let [start, end] = dates;
|
|
844
|
-
if (start && start.isBefore(today) && end && end.isAfter(today)) {
|
|
845
|
-
end = today;
|
|
846
|
-
}
|
|
847
|
-
const adjustedDates = [start, end].map(
|
|
848
|
-
(date) => date ? date.format("DD-MM-YYYY") : null
|
|
849
|
-
);
|
|
850
|
-
props.onChange && props.onChange(adjustedDates);
|
|
851
|
-
} else {
|
|
852
|
-
props.onChange && props.onChange("");
|
|
853
|
-
}
|
|
877
|
+
return current && current > moment2();
|
|
854
878
|
};
|
|
855
879
|
return /* @__PURE__ */ React21.createElement(Space, { direction: "vertical", size: 12 }, /* @__PURE__ */ React21.createElement(
|
|
856
880
|
RangePicker,
|
|
857
881
|
{
|
|
858
882
|
disabledDate,
|
|
859
|
-
|
|
860
|
-
format: "DD-MM-YYYY",
|
|
883
|
+
presets: rangePresets,
|
|
884
|
+
format: { format: "DD-MM-YYYY" },
|
|
861
885
|
onChange: handleChange,
|
|
862
|
-
onCalendarChange: handleCalendarChange,
|
|
863
886
|
value: dateValues
|
|
864
887
|
}
|
|
865
888
|
));
|
|
@@ -954,9 +977,7 @@ import { Upload } from "antd";
|
|
|
954
977
|
import { InboxOutlined } from "@ant-design/icons";
|
|
955
978
|
var FileUpload = (props) => {
|
|
956
979
|
const { Dragger } = Upload;
|
|
957
|
-
const [files, setFiles] = useState8(
|
|
958
|
-
props.value && props.value.length > 0 ? props.value : []
|
|
959
|
-
);
|
|
980
|
+
const [files, setFiles] = useState8([]);
|
|
960
981
|
const handleChange = ({ fileList }) => {
|
|
961
982
|
setFiles(fileList);
|
|
962
983
|
if (props.onChange) {
|
|
@@ -1005,6 +1026,7 @@ var TabsElement = (props) => {
|
|
|
1005
1026
|
import React27 from "react";
|
|
1006
1027
|
import { Switch } from "antd";
|
|
1007
1028
|
var onChange = (checked) => {
|
|
1029
|
+
console.log(`switch to ${checked}`);
|
|
1008
1030
|
};
|
|
1009
1031
|
var SwitchElement = () => /* @__PURE__ */ React27.createElement(Switch, { defaultChecked: true, onChange });
|
|
1010
1032
|
|
|
@@ -1015,12 +1037,12 @@ var Upload2 = (props) => {
|
|
|
1015
1037
|
const handleFileChange = (e) => {
|
|
1016
1038
|
setFile(e.target.files[0]);
|
|
1017
1039
|
if (props.onChange) {
|
|
1018
|
-
console.log(e.target.files[0]);
|
|
1019
1040
|
props.onChange(e.target.files[0]);
|
|
1020
1041
|
}
|
|
1021
1042
|
};
|
|
1022
1043
|
const handleUpload = async () => {
|
|
1023
1044
|
if (!file) {
|
|
1045
|
+
console.error("No file selected");
|
|
1024
1046
|
return;
|
|
1025
1047
|
}
|
|
1026
1048
|
};
|
|
@@ -1547,59 +1569,6 @@ var BarChart = (props) => {
|
|
|
1547
1569
|
};
|
|
1548
1570
|
return /* @__PURE__ */ React35.createElement("div", { className: props.className }, /* @__PURE__ */ React35.createElement("h1", { className: props.labelClassName }, props.label), /* @__PURE__ */ React35.createElement(Bar2, { data, options }));
|
|
1549
1571
|
};
|
|
1550
|
-
|
|
1551
|
-
// src/Components/DivContainer.tsx
|
|
1552
|
-
import React36 from "react";
|
|
1553
|
-
var DivContainer = (props) => {
|
|
1554
|
-
return /* @__PURE__ */ React36.createElement("div", { className: props.className, onClick: props.onClick }, props.label);
|
|
1555
|
-
};
|
|
1556
|
-
|
|
1557
|
-
// src/Components/ColorPickerElement.tsx
|
|
1558
|
-
import React37 from "react";
|
|
1559
|
-
import { ColorPicker } from "antd";
|
|
1560
|
-
var ColorPickerElement = (props) => {
|
|
1561
|
-
const onHandleChange = (value, hex) => {
|
|
1562
|
-
console.log(hex);
|
|
1563
|
-
props.onChange && props.onChange(hex);
|
|
1564
|
-
};
|
|
1565
|
-
return /* @__PURE__ */ React37.createElement("div", { className: props.containerClassName }, props.label && /* @__PURE__ */ React37.createElement("label", { htmlFor: props.name, className: props.labelClassName }, props.label), /* @__PURE__ */ React37.createElement("br", null), /* @__PURE__ */ React37.createElement(
|
|
1566
|
-
ColorPicker,
|
|
1567
|
-
{
|
|
1568
|
-
className: props.className,
|
|
1569
|
-
showText: true,
|
|
1570
|
-
defaultValue: props.defaultValue,
|
|
1571
|
-
onChange: onHandleChange
|
|
1572
|
-
}
|
|
1573
|
-
));
|
|
1574
|
-
};
|
|
1575
|
-
|
|
1576
|
-
// src/Components/NotificationAlert.tsx
|
|
1577
|
-
import React38 from "react";
|
|
1578
|
-
import { Button as Button3, notification } from "antd";
|
|
1579
|
-
var NotificationAlert = (props) => {
|
|
1580
|
-
const [api, contextHolder] = notification.useNotification();
|
|
1581
|
-
const openNotificationType = (pauseOnHover, type) => {
|
|
1582
|
-
api[type]({
|
|
1583
|
-
message: props.message,
|
|
1584
|
-
description: props.description,
|
|
1585
|
-
duration: 4.5,
|
|
1586
|
-
pauseOnHover
|
|
1587
|
-
});
|
|
1588
|
-
};
|
|
1589
|
-
const openNotification = (pauseOnHover) => {
|
|
1590
|
-
api.open({
|
|
1591
|
-
message: props.message,
|
|
1592
|
-
description: props.description,
|
|
1593
|
-
duration: 4.5,
|
|
1594
|
-
pauseOnHover
|
|
1595
|
-
});
|
|
1596
|
-
};
|
|
1597
|
-
const handleClick = () => {
|
|
1598
|
-
const notificationType = props.notificationType || "info";
|
|
1599
|
-
props.notificationType ? openNotificationType(true, notificationType) : openNotification(true);
|
|
1600
|
-
};
|
|
1601
|
-
return /* @__PURE__ */ React38.createElement("div", { className: props.containerClassName }, contextHolder, /* @__PURE__ */ React38.createElement(Button3, { type: "primary", onClick: handleClick, className: props.className }, props.label));
|
|
1602
|
-
};
|
|
1603
1572
|
export {
|
|
1604
1573
|
AddMoreTable,
|
|
1605
1574
|
BarChart,
|
|
@@ -1607,10 +1576,8 @@ export {
|
|
|
1607
1576
|
CheckboxElement,
|
|
1608
1577
|
CircleDonut,
|
|
1609
1578
|
CkEditor,
|
|
1610
|
-
ColorPickerElement,
|
|
1611
1579
|
DatePickerElement,
|
|
1612
1580
|
DateRangePickerElement,
|
|
1613
|
-
DivContainer,
|
|
1614
1581
|
DoubleBarChart,
|
|
1615
1582
|
DropDownGroup,
|
|
1616
1583
|
FileUpload,
|
|
@@ -1619,7 +1586,6 @@ export {
|
|
|
1619
1586
|
LineChart,
|
|
1620
1587
|
MultipleSelectElement,
|
|
1621
1588
|
Navbar,
|
|
1622
|
-
NotificationAlert,
|
|
1623
1589
|
NumberElement,
|
|
1624
1590
|
OtpElement,
|
|
1625
1591
|
PasswordElement,
|