dtable-ui-component 0.3.2 → 0.3.4-alpha1

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.
Files changed (65) hide show
  1. package/assets/dtable-font/dtable-font.eot +0 -0
  2. package/assets/dtable-font/dtable-font.svg +319 -11
  3. package/assets/dtable-font/dtable-font.ttf +0 -0
  4. package/assets/dtable-font/dtable-font.woff +0 -0
  5. package/assets/dtable-font/dtable-font.woff2 +0 -0
  6. package/assets/dtable-font.css +630 -14
  7. package/lib/AutoNumberFormatter/index.js +2 -2
  8. package/lib/ButtonFormatter/index.js +4 -8
  9. package/lib/CTimeFormatter/index.js +2 -2
  10. package/lib/CheckboxFormatter/index.js +2 -2
  11. package/lib/CollaboratorFormatter/index.js +2 -2
  12. package/lib/CreatorFormatter/index.js +2 -2
  13. package/lib/DTableCustomizeCollaboratorSelect/index.css +1 -1
  14. package/lib/DTableSearchInput/index.js +2 -2
  15. package/lib/DateFormatter/index.js +2 -2
  16. package/lib/DigitalSignFormatter/index.js +2 -2
  17. package/lib/DurationFormatter/index.js +2 -2
  18. package/lib/EmailFormatter/index.js +2 -2
  19. package/lib/FileFormatter/index.js +4 -3
  20. package/lib/FileItemFormatter/index.js +1 -1
  21. package/lib/FormulaFormatter/index.js +24 -5
  22. package/lib/FormulaFormatter/utils.js +91 -0
  23. package/lib/GeolocationFormatter/index.js +2 -2
  24. package/lib/HtmlLongTextFormatter/index.js +2 -2
  25. package/lib/ImageFormatter/images-lazy-load.js +12 -16
  26. package/lib/ImageFormatter/index.js +2 -2
  27. package/lib/ImagePreviewerLightbox/index.js +3 -3
  28. package/lib/LastModifierFormatter/index.js +2 -2
  29. package/lib/LinkFormatter/index.js +4 -4
  30. package/lib/MTimeFormatter/index.js +2 -2
  31. package/lib/MultipleSelectFormatter/index.js +2 -2
  32. package/lib/NumberFormatter/index.js +2 -2
  33. package/lib/RateFormatter/index.js +2 -2
  34. package/lib/RowExpandFileFormatter/index.css +72 -0
  35. package/lib/RowExpandFileFormatter/index.js +59 -0
  36. package/lib/RowExpandFileFormatter/row-expand-file-item-formatter.js +125 -0
  37. package/lib/RowExpandFormatter/index.css +73 -0
  38. package/lib/RowExpandFormatter/index.js +441 -0
  39. package/lib/RowExpandImageFormatter/index.css +79 -0
  40. package/lib/RowExpandImageFormatter/index.js +127 -0
  41. package/lib/RowExpandImageFormatter/row-expand-image-item-formatter.js +128 -0
  42. package/lib/RowExpandImageFormatter/utils.js +7 -0
  43. package/lib/RowExpandLinkFormatter/collaborator-item-formatter.js +164 -0
  44. package/lib/RowExpandLinkFormatter/column-data-constants.js +20 -0
  45. package/lib/RowExpandLinkFormatter/date-utils.js +127 -0
  46. package/lib/RowExpandLinkFormatter/formula-constants.js +9 -0
  47. package/lib/RowExpandLinkFormatter/index.css +25 -0
  48. package/lib/RowExpandLinkFormatter/index.js +170 -0
  49. package/lib/RowExpandLinkFormatter/number-precision.js +116 -0
  50. package/lib/RowExpandLinkFormatter/utils.js +58 -0
  51. package/lib/RowExpandLinkFormatter/value-display-utils.js +401 -0
  52. package/lib/SimpleLongTextFormatter/index.js +2 -2
  53. package/lib/SingleSelectFormatter/index.js +2 -2
  54. package/lib/TextFormatter/index.js +2 -2
  55. package/lib/UrlFormatter/index.js +2 -2
  56. package/lib/common/delete-tip.css +16 -0
  57. package/lib/common/delete-tip.js +84 -0
  58. package/lib/common/modal-portal.js +44 -0
  59. package/lib/constants/cell-types.js +5 -1
  60. package/lib/data/dtable-value.js +2731 -0
  61. package/lib/index.js +7 -1
  62. package/lib/lang/index.js +1 -1
  63. package/lib/locals/en.js +17 -13
  64. package/lib/locals/zh-CN.js +16 -12
  65. package/package.json +5 -4
Binary file
Binary file
@@ -1,11 +1,11 @@
1
1
  @font-face {
2
2
  font-family: "dtable-font"; /* Project id 1206632 */
3
- src: url('./dtable-font/dtable-font.eot?t=1631248254616'); /* IE9 */
4
- src: url('./dtable-font/dtable-font.eot?t=1631248254616#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
- url('./dtable-font/dtable-font.woff2?t=1631248254616') format('woff2'),
6
- url('./dtable-font/dtable-font.woff?t=1631248254616') format('woff'),
7
- url('./dtable-font/dtable-font.ttf?t=1631248254616') format('truetype'),
8
- url('./dtable-font/dtable-font.svg?t=1631248254616#dtable-font') format('svg');
3
+ src: url('./dtable-font/dtable-font.eot?t=1680493637259'); /* IE9 */
4
+ src: url('./dtable-font/dtable-font.eot?t=1680493637259#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
+ url('./dtable-font/dtable-font.woff2?t=1680493637259') format('woff2'),
6
+ url('./dtable-font/dtable-font.woff?t=1680493637259') format('woff'),
7
+ url('./dtable-font/dtable-font.ttf?t=1680493637259') format('truetype'),
8
+ url('./dtable-font/dtable-font.svg?t=1680493637259#dtable-font') format('svg');
9
9
  }
10
10
 
11
11
  .dtable-font {
@@ -16,6 +16,630 @@
16
16
  -moz-osx-font-smoothing: grayscale;
17
17
  }
18
18
 
19
+ .dtable-icon-handwritten-signature-sync:before {
20
+ content: "\e7ea";
21
+ }
22
+
23
+ .dtable-icon-handwritten-signature:before {
24
+ content: "\e7eb";
25
+ }
26
+
27
+ .dtable-icon-collapse-all:before {
28
+ content: "\e7e8";
29
+ }
30
+
31
+ .dtable-icon-expand-all:before {
32
+ content: "\e7e9";
33
+ }
34
+
35
+ .dtable-icon-comment1:before {
36
+ content: "\e7e7";
37
+ }
38
+
39
+ .dtable-icon-border-style:before {
40
+ content: "\e7e6";
41
+ }
42
+
43
+ .dtable-icon-automation-rules1:before {
44
+ content: "\e7e4";
45
+ }
46
+
47
+ .dtable-icon-notification-rules:before {
48
+ content: "\e7e5";
49
+ }
50
+
51
+ .dtable-icon-app-purchase:before {
52
+ content: "\e7d7";
53
+ }
54
+
55
+ .dtable-icon-app-statistics:before {
56
+ content: "\e7d8";
57
+ }
58
+
59
+ .dtable-icon-app-address-book:before {
60
+ content: "\e7d9";
61
+ }
62
+
63
+ .dtable-icon-app-product-library:before {
64
+ content: "\e7da";
65
+ }
66
+
67
+ .dtable-icon-app-individual-bill:before {
68
+ content: "\e7db";
69
+ }
70
+
71
+ .dtable-icon-app-email:before {
72
+ content: "\e7dc";
73
+ }
74
+
75
+ .dtable-icon-app-distribution:before {
76
+ content: "\e7dd";
77
+ }
78
+
79
+ .dtable-icon-app-history1:before {
80
+ content: "\e7de";
81
+ }
82
+
83
+ .dtable-icon-app-contract:before {
84
+ content: "\e7df";
85
+ }
86
+
87
+ .dtable-icon-app-post-sale:before {
88
+ content: "\e7e0";
89
+ }
90
+
91
+ .dtable-icon-app-logistics:before {
92
+ content: "\e7e1";
93
+ }
94
+
95
+ .dtable-icon-app-invoice:before {
96
+ content: "\e7e2";
97
+ }
98
+
99
+ .dtable-icon-app-achievement-distribution:before {
100
+ content: "\e7e3";
101
+ }
102
+
103
+ .dtable-icon-underline:before {
104
+ content: "\e7d6";
105
+ }
106
+
107
+ .dtable-icon-chart:before {
108
+ content: "\e7d4";
109
+ }
110
+
111
+ .dtable-icon-text:before {
112
+ content: "\e7d5";
113
+ }
114
+
115
+ .dtable-icon-calendar1:before {
116
+ content: "\e7cc";
117
+ }
118
+
119
+ .dtable-icon-data-deduplication:before {
120
+ content: "\e7cd";
121
+ }
122
+
123
+ .dtable-icon-advanced-statistics:before {
124
+ content: "\e7ce";
125
+ }
126
+
127
+ .dtable-icon-gallery:before {
128
+ content: "\e7cf";
129
+ }
130
+
131
+ .dtable-icon-kanban:before {
132
+ content: "\e7d0";
133
+ }
134
+
135
+ .dtable-icon-page-design:before {
136
+ content: "\e7d1";
137
+ }
138
+
139
+ .dtable-icon-timeline:before {
140
+ content: "\e7d2";
141
+ }
142
+
143
+ .dtable-icon-map1:before {
144
+ content: "\e7d3";
145
+ }
146
+
147
+ .dtable-icon-upload1:before {
148
+ content: "\e7cb";
149
+ }
150
+
151
+ .dtable-icon-qr-code:before {
152
+ content: "\e7ca";
153
+ }
154
+
155
+ .dtable-icon-monitor1:before {
156
+ content: "\e7c8";
157
+ }
158
+
159
+ .dtable-icon-more:before {
160
+ content: "\e7c9";
161
+ }
162
+
163
+ .dtable-icon-italic:before {
164
+ content: "\e7c1";
165
+ }
166
+
167
+ .dtable-icon-font-color1:before {
168
+ content: "\e7c2";
169
+ }
170
+
171
+ .dtable-icon-clear-format:before {
172
+ content: "\e7c3";
173
+ }
174
+
175
+ .dtable-icon-bold:before {
176
+ content: "\e7c4";
177
+ }
178
+
179
+ .dtable-icon-display1:before {
180
+ content: "\e7c5";
181
+ }
182
+
183
+ .dtable-icon-list-ol1:before {
184
+ content: "\e7c6";
185
+ }
186
+
187
+ .dtable-icon-list-ul1:before {
188
+ content: "\e7c7";
189
+ }
190
+
191
+ .dtable-icon-activities:before {
192
+ content: "\e7c0";
193
+ }
194
+
195
+ .dtable-icon-import-from-another-table1:before {
196
+ content: "\e7bc";
197
+ }
198
+
199
+ .dtable-icon-monitor:before {
200
+ content: "\e7bd";
201
+ }
202
+
203
+ .dtable-icon-custom-color1:before {
204
+ content: "\e7be";
205
+ }
206
+
207
+ .dtable-icon-switch2:before {
208
+ content: "\e7bf";
209
+ }
210
+
211
+ .dtable-icon-justify-align:before {
212
+ content: "\e7ac";
213
+ }
214
+
215
+ .dtable-icon-font-color:before {
216
+ content: "\e7ad";
217
+ }
218
+
219
+ .dtable-icon-increase-indent:before {
220
+ content: "\e7ae";
221
+ }
222
+
223
+ .dtable-icon-decrease-indent:before {
224
+ content: "\e7af";
225
+ }
226
+
227
+ .dtable-icon-list-ol-capital-english-letters:before {
228
+ content: "\e7b0";
229
+ }
230
+
231
+ .dtable-icon-list-ol-capital-roman-numerals:before {
232
+ content: "\e7b1";
233
+ }
234
+
235
+ .dtable-icon-list-ul:before {
236
+ content: "\e7b2";
237
+ }
238
+
239
+ .dtable-icon-list-ul-black-square:before {
240
+ content: "\e7b3";
241
+ }
242
+
243
+ .dtable-icon-list-ul-hollow-circle:before {
244
+ content: "\e7b4";
245
+ }
246
+
247
+ .dtable-icon-list-ol-small-roman-numerals:before {
248
+ content: "\e7b5";
249
+ }
250
+
251
+ .dtable-icon-switch1:before {
252
+ content: "\e7b6";
253
+ }
254
+
255
+ .dtable-icon-list-ol-small-english-letters:before {
256
+ content: "\e7b7";
257
+ }
258
+
259
+ .dtable-icon-custom-color:before {
260
+ content: "\e7b8";
261
+ }
262
+
263
+ .dtable-icon-import-from-another-table:before {
264
+ content: "\e7b9";
265
+ }
266
+
267
+ .dtable-icon-list-ol-small-greek:before {
268
+ content: "\e7ba";
269
+ }
270
+
271
+ .dtable-icon-list-ol:before {
272
+ content: "\e7bb";
273
+ }
274
+
275
+ .dtable-icon-align-right:before {
276
+ content: "\e79f";
277
+ }
278
+
279
+ .dtable-icon-horizontal-center:before {
280
+ content: "\e7a5";
281
+ }
282
+
283
+ .dtable-icon-align-left:before {
284
+ content: "\e7a6";
285
+ }
286
+
287
+ .dtable-icon-bottom-alignment:before {
288
+ content: "\e7a7";
289
+ }
290
+
291
+ .dtable-icon-horizontal-distribution:before {
292
+ content: "\e7a8";
293
+ }
294
+
295
+ .dtable-icon-top-alignment:before {
296
+ content: "\e7a9";
297
+ }
298
+
299
+ .dtable-icon-vertical-center:before {
300
+ content: "\e7aa";
301
+ }
302
+
303
+ .dtable-icon-vertical-distribution:before {
304
+ content: "\e7ab";
305
+ }
306
+
307
+ .dtable-icon-novice-guide:before {
308
+ content: "\e79b";
309
+ }
310
+
311
+ .dtable-icon-wide:before {
312
+ content: "\e79c";
313
+ }
314
+
315
+ .dtable-icon-narrow1:before {
316
+ content: "\e79d";
317
+ }
318
+
319
+ .dtable-icon-choose-column:before {
320
+ content: "\e79e";
321
+ }
322
+
323
+ .dtable-icon-app-share:before {
324
+ content: "\e794";
325
+ }
326
+
327
+ .dtable-icon-app-user-management:before {
328
+ content: "\e795";
329
+ }
330
+
331
+ .dtable-icon-paused:before {
332
+ content: "\e793";
333
+ }
334
+
335
+ .dtable-icon-app-preview:before {
336
+ content: "\e792";
337
+ }
338
+
339
+ .dtable-icon-app-authority-management:before {
340
+ content: "\e78d";
341
+ }
342
+
343
+ .dtable-icon-app-settings:before {
344
+ content: "\e78e";
345
+ }
346
+
347
+ .dtable-icon-rule:before {
348
+ content: "\e78c";
349
+ }
350
+
351
+ .dtable-icon-workflow1:before {
352
+ content: "\e78b";
353
+ }
354
+
355
+ .dtable-icon-app-page:before {
356
+ content: "\e78a";
357
+ }
358
+
359
+ .dtable-icon-app-home:before {
360
+ content: "\e788";
361
+ }
362
+
363
+ .dtable-icon-app-personnel:before {
364
+ content: "\e787";
365
+ }
366
+
367
+ .dtable-icon-app-star-mark:before {
368
+ content: "\e786";
369
+ }
370
+
371
+ .dtable-icon-app-history:before {
372
+ content: "\e785";
373
+ }
374
+
375
+ .dtable-icon-app-edit:before {
376
+ content: "\e784";
377
+ }
378
+
379
+ .dtable-icon-app-folder:before {
380
+ content: "\e783";
381
+ }
382
+
383
+ .dtable-icon-app-calendar:before {
384
+ content: "\e782";
385
+ }
386
+
387
+ .dtable-icon-app-map:before {
388
+ content: "\e789";
389
+ }
390
+
391
+ .dtable-icon-app-position:before {
392
+ content: "\e781";
393
+ }
394
+
395
+ .dtable-icon-app-gallery:before {
396
+ content: "\e780";
397
+ }
398
+
399
+ .dtable-icon-automation-rules:before {
400
+ content: "\e77f";
401
+ }
402
+
403
+ .dtable-icon-dingtalk:before {
404
+ content: "\e77e";
405
+ }
406
+
407
+ .dtable-icon-delete:before {
408
+ content: "\e77d";
409
+ }
410
+
411
+ .dtable-icon-checklist-sync:before {
412
+ content: "\e767";
413
+ }
414
+
415
+ .dtable-icon-button-sync:before {
416
+ content: "\e768";
417
+ }
418
+
419
+ .dtable-icon-email-sync:before {
420
+ content: "\e769";
421
+ }
422
+
423
+ .dtable-icon-link-formulas-sync:before {
424
+ content: "\e76a";
425
+ }
426
+
427
+ .dtable-icon-location-sync:before {
428
+ content: "\e76b";
429
+ }
430
+
431
+ .dtable-icon-creation-time-sync:before {
432
+ content: "\e76c";
433
+ }
434
+
435
+ .dtable-icon-calendar-alt-solid-sync:before {
436
+ content: "\e76d";
437
+ }
438
+
439
+ .dtable-icon-multiple-selection-sync:before {
440
+ content: "\e76e";
441
+ }
442
+
443
+ .dtable-icon-collaborator-sync:before {
444
+ content: "\e76f";
445
+ }
446
+
447
+ .dtable-icon-picture-sync:before {
448
+ content: "\e770";
449
+ }
450
+
451
+ .dtable-icon-renewal-person-sync:before {
452
+ content: "\e771";
453
+ }
454
+
455
+ .dtable-icon-duration-sync:before {
456
+ content: "\e772";
457
+ }
458
+
459
+ .dtable-icon-single-election-sync:before {
460
+ content: "\e773";
461
+ }
462
+
463
+ .dtable-icon-autonumber-sync:before {
464
+ content: "\e774";
465
+ }
466
+
467
+ .dtable-icon-link-other-record-sync:before {
468
+ content: "\e775";
469
+ }
470
+
471
+ .dtable-icon-formula-sync:before {
472
+ content: "\e776";
473
+ }
474
+
475
+ .dtable-icon-single-line-text-sync:before {
476
+ content: "\e777";
477
+ }
478
+
479
+ .dtable-icon-rate-sync:before {
480
+ content: "\e778";
481
+ }
482
+
483
+ .dtable-icon-file-alt-solid-sync:before {
484
+ content: "\e779";
485
+ }
486
+
487
+ .dtable-icon-long-text-sync:before {
488
+ content: "\e77a";
489
+ }
490
+
491
+ .dtable-icon-url-sync:before {
492
+ content: "\e77b";
493
+ }
494
+
495
+ .dtable-icon-number-sync:before {
496
+ content: "\e77c";
497
+ }
498
+
499
+ .dtable-icon-periodic-sync:before {
500
+ content: "\e766";
501
+ }
502
+
503
+ .dtable-icon-table-encryption:before {
504
+ content: "\e765";
505
+ }
506
+
507
+ .dtable-icon-funnel-chart:before {
508
+ content: "\e764";
509
+ }
510
+
511
+ .dtable-icon-convert:before {
512
+ content: "\e763";
513
+ }
514
+
515
+ .dtable-icon-include-archived-records:before {
516
+ content: "\e761";
517
+ }
518
+
519
+ .dtable-icon-exclude-archived-records:before {
520
+ content: "\e762";
521
+ }
522
+
523
+ .dtable-icon-use-values:before {
524
+ content: "\e760";
525
+ }
526
+
527
+ .dtable-icon-restore:before {
528
+ content: "\e75f";
529
+ }
530
+
531
+ .dtable-icon-partially-selected:before {
532
+ content: "\e75e";
533
+ }
534
+
535
+ .dtable-icon-workflow:before {
536
+ content: "\e75d";
537
+ }
538
+
539
+ .dtable-icon-rectangular-tree-diagram:before {
540
+ content: "\e75c";
541
+ }
542
+
543
+ .dtable-icon-scan-code:before {
544
+ content: "\e75b";
545
+ }
546
+
547
+ .dtable-icon-a-qr-code:before {
548
+ content: "\e75a";
549
+ }
550
+
551
+ .dtable-icon-histogram:before {
552
+ content: "\e759";
553
+ }
554
+
555
+ .dtable-icon-bar-chart:before {
556
+ content: "\e758";
557
+ }
558
+
559
+ .dtable-icon-line-chart:before {
560
+ content: "\e757";
561
+ }
562
+
563
+ .dtable-icon-area-chart:before {
564
+ content: "\e756";
565
+ }
566
+
567
+ .dtable-icon-pie-chart:before {
568
+ content: "\e755";
569
+ }
570
+
571
+ .dtable-icon-scatter-chart:before {
572
+ content: "\e754";
573
+ }
574
+
575
+ .dtable-icon-combination-chart:before {
576
+ content: "\e753";
577
+ }
578
+
579
+ .dtable-icon-map:before {
580
+ content: "\e752";
581
+ }
582
+
583
+ .dtable-icon-heat-map:before {
584
+ content: "\e751";
585
+ }
586
+
587
+ .dtable-icon-facet-chart:before {
588
+ content: "\e750";
589
+ }
590
+
591
+ .dtable-icon-card:before {
592
+ content: "\e74f";
593
+ }
594
+
595
+ .dtable-icon-gauge:before {
596
+ content: "\e74e";
597
+ }
598
+
599
+ .dtable-icon-adjust-column:before {
600
+ content: "\e74d";
601
+ }
602
+
603
+ .dtable-icon-private-archive-view:before {
604
+ content: "\e74b";
605
+ }
606
+
607
+ .dtable-icon-private-database:before {
608
+ content: "\e74c";
609
+ }
610
+
611
+ .dtable-icon-up-move:before {
612
+ content: "\e749";
613
+ }
614
+
615
+ .dtable-icon-down-move:before {
616
+ content: "\e74a";
617
+ }
618
+
619
+ .dtable-icon-flag:before {
620
+ content: "\e748";
621
+ }
622
+
623
+ .dtable-icon-praise:before {
624
+ content: "\e747";
625
+ }
626
+
627
+ .dtable-icon-like:before {
628
+ content: "\e746";
629
+ }
630
+
631
+ .dtable-icon-mysql-database:before {
632
+ content: "\e744";
633
+ }
634
+
635
+ .dtable-icon-more-menus:before {
636
+ content: "\e745";
637
+ }
638
+
639
+ .dtable-icon-pdf:before {
640
+ content: "\e743";
641
+ }
642
+
19
643
  .dtable-icon-export-to-new-table:before {
20
644
  content: "\e742";
21
645
  }
@@ -340,10 +964,6 @@
340
964
  content: "\e6ce";
341
965
  }
342
966
 
343
- .dtable-icon-revoke1:before {
344
- content: "\e6cc";
345
- }
346
-
347
967
  .dtable-icon-star:before {
348
968
  content: "\e6cb";
349
969
  }
@@ -840,10 +1460,6 @@
840
1460
  content: "\e626";
841
1461
  }
842
1462
 
843
- .dtable-icon-delete:before {
844
- content: "\e627";
845
- }
846
-
847
1463
  .dtable-icon-drop-down:before {
848
1464
  content: "\e624";
849
1465
  }
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React from 'react';
6
- import cn from 'astro-classname';
6
+ import classnames from 'classnames';
7
7
  import './index.css';
8
8
 
9
9
  var AutoNumberFormatter = /*#__PURE__*/function (_React$Component) {
@@ -23,7 +23,7 @@ var AutoNumberFormatter = /*#__PURE__*/function (_React$Component) {
23
23
  var _this$props = this.props,
24
24
  containerClassName = _this$props.containerClassName,
25
25
  value = _this$props.value;
26
- var classname = cn('dtable-ui cell-formatter-container auto-number-formatter', containerClassName);
26
+ var classname = classnames('dtable-ui cell-formatter-container auto-number-formatter', containerClassName);
27
27
  return /*#__PURE__*/React.createElement("div", {
28
28
  className: classname
29
29
  }, value);
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
  import React from 'react';
6
- import cn from 'astro-classname';
6
+ import classnames from 'classnames';
7
7
  import './index.css';
8
8
 
9
9
  var ButtonFormatter = /*#__PURE__*/function (_React$Component) {
@@ -23,12 +23,8 @@ var ButtonFormatter = /*#__PURE__*/function (_React$Component) {
23
23
  _this = _super.call.apply(_super, [this].concat(args));
24
24
 
25
25
  _this.handleClick = function () {
26
- var _this$props$data = _this.props.data,
27
- button_type = _this$props$data.button_type,
28
- url_address = _this$props$data.url_address;
29
-
30
- if (button_type === 'open_url' && url_address) {
31
- window.open(url_address);
26
+ if (_this.props.onClickButton) {
27
+ _this.props.onClickButton(_this.props.data);
32
28
  }
33
29
  };
34
30
 
@@ -60,7 +56,7 @@ var ButtonFormatter = /*#__PURE__*/function (_React$Component) {
60
56
  color: colorOption.TEXT_COLOR
61
57
  };
62
58
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
63
- className: cn('dtable-ui cell-formatter-container button-formatter', containerClassName),
59
+ className: classnames('dtable-ui cell-formatter-container button-formatter', containerClassName),
64
60
  style: btnStyle,
65
61
  onClick: this.handleClick
66
62
  }, button_name));