@qn-pandora/pandora-component 2.2.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +25 -0
- package/CHANGELOG.md +11 -0
- package/es/components/AutoComplete/style.css +4 -1
- package/es/components/Button/index.js +1 -1
- package/es/components/Button/style.css +0 -1
- package/es/components/Button/style.less +0 -1
- package/es/components/Card/index.js +2 -1
- package/es/components/Card/style.css +10 -2
- package/es/components/CheckTransformList/Item/index.js +1 -1
- package/es/components/CheckTransformList/index.js +1 -1
- package/es/components/CheckTransformList/style.css +26 -8
- package/es/components/CheckboxList/index.d.ts +1 -0
- package/es/components/CheckboxList/index.js +3 -2
- package/es/components/Collapse/Panel/index.js +2 -1
- package/es/components/Collapse/index.js +2 -1
- package/es/components/CollapsiblePanel/index.d.ts +2 -2
- package/es/components/ConfigProvider/index.js +2 -1
- package/es/components/DateTimePicker/Base/index.js +2 -2
- package/es/components/DateTimePicker/Base/style.css +7 -12
- package/es/components/DateTimePicker/DisplayInput/style.css +17 -7
- package/es/components/DateTimePicker/constants.js +1 -1
- package/es/components/DateTimePicker/index.d.ts +2 -1
- package/es/components/DateTimePicker/style.css +155 -57
- package/es/components/Input/index.js +2 -1
- package/es/components/Input/style.css +17 -7
- package/es/components/InputNumber/style.css +1 -1
- package/es/components/Menu/Option.d.ts +1 -1
- package/es/components/Menu/index.d.ts +2 -2
- package/es/components/Menu/style.css +4 -0
- package/es/components/NameLimiter/index.d.ts +3 -13
- package/es/components/NameLimiter/index.js +31 -39
- package/es/components/NameLimiter/style.css +9 -1
- package/es/components/NameLimiter/style.less +10 -1
- package/es/components/OptionList/PopoverOptionList/style.css +155 -57
- package/es/components/OptionList/index.js +2 -1
- package/es/components/OptionList/style.css +155 -57
- package/es/components/RangeInput/style.css +18 -8
- package/es/components/RemarkName/index.d.ts +0 -2
- package/es/components/RemarkName/index.js +2 -4
- package/es/components/RemarkName/style.css +9 -5
- package/es/components/RemarkName/style.less +0 -5
- package/es/components/Selector/style.css +4 -1
- package/es/components/SolidRadioGroup/index.js +7 -4
- package/es/components/SolidRadioGroup/style.css +4 -1
- package/es/components/SolidRadioGroup/style.less +5 -0
- package/es/components/Steps/index.js +2 -1
- package/es/components/Table/index.d.ts +9 -24
- package/es/components/Table/index.js +40 -8
- package/es/components/Table/style.css +10 -6
- package/es/components/Tabs/style.css +10 -2
- package/es/components/TagList/Tag/style.css +3 -3
- package/es/components/TagList/Tag/style.less +3 -3
- package/es/components/TagList/index.js +3 -2
- package/es/components/TagList/style.css +3 -3
- package/es/components/TagList/style.less +8 -8
- package/es/index.css +225 -97
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.less +1 -1
- package/es/style/theme.less +4 -3
- package/lib/components/AutoComplete/style.css +4 -1
- package/lib/components/Button/index.js +1 -1
- package/lib/components/Button/style.css +0 -1
- package/lib/components/Button/style.less +0 -1
- package/lib/components/Card/index.js +1 -1
- package/lib/components/Card/style.css +10 -2
- package/lib/components/CheckTransformList/Item/index.js +1 -1
- package/lib/components/CheckTransformList/index.js +1 -1
- package/lib/components/CheckTransformList/style.css +26 -8
- package/lib/components/CheckboxList/index.d.ts +1 -0
- package/lib/components/CheckboxList/index.js +3 -2
- package/lib/components/Collapse/Panel/index.js +2 -1
- package/lib/components/Collapse/index.js +1 -1
- package/lib/components/CollapsiblePanel/index.d.ts +2 -2
- package/lib/components/ConfigProvider/index.js +1 -1
- package/lib/components/DateTimePicker/Base/index.js +2 -2
- package/lib/components/DateTimePicker/Base/style.css +7 -12
- package/lib/components/DateTimePicker/DisplayInput/style.css +17 -7
- package/lib/components/DateTimePicker/constants.js +1 -1
- package/lib/components/DateTimePicker/index.d.ts +2 -1
- package/lib/components/DateTimePicker/style.css +155 -57
- package/lib/components/Input/index.js +1 -1
- package/lib/components/Input/style.css +17 -7
- package/lib/components/InputNumber/style.css +1 -1
- package/lib/components/Menu/Option.d.ts +1 -1
- package/lib/components/Menu/index.d.ts +2 -2
- package/lib/components/Menu/style.css +4 -0
- package/lib/components/NameLimiter/index.d.ts +3 -13
- package/lib/components/NameLimiter/index.js +31 -38
- package/lib/components/NameLimiter/style.css +9 -1
- package/lib/components/NameLimiter/style.less +10 -1
- package/lib/components/OptionList/PopoverOptionList/style.css +155 -57
- package/lib/components/OptionList/index.js +1 -1
- package/lib/components/OptionList/style.css +155 -57
- package/lib/components/RangeInput/style.css +18 -8
- package/lib/components/RemarkName/index.d.ts +0 -2
- package/lib/components/RemarkName/index.js +2 -4
- package/lib/components/RemarkName/style.css +9 -5
- package/lib/components/RemarkName/style.less +0 -5
- package/lib/components/Selector/style.css +4 -1
- package/lib/components/SolidRadioGroup/index.js +6 -3
- package/lib/components/SolidRadioGroup/style.css +4 -1
- package/lib/components/SolidRadioGroup/style.less +5 -0
- package/lib/components/Steps/index.js +1 -1
- package/lib/components/Table/index.d.ts +9 -24
- package/lib/components/Table/index.js +39 -7
- package/lib/components/Table/style.css +10 -6
- package/lib/components/Tabs/style.css +10 -2
- package/lib/components/TagList/Tag/style.css +3 -3
- package/lib/components/TagList/Tag/style.less +3 -3
- package/lib/components/TagList/index.js +2 -2
- package/lib/components/TagList/style.css +3 -3
- package/lib/components/TagList/style.less +8 -8
- package/lib/index.css +1985 -1857
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -1
- package/lib/index.less +4 -4
- package/lib/style/theme.less +4 -3
- package/package.json +24 -24
- package/es/components/NameLimiter/transformer.d.ts +0 -6
- package/es/components/NameLimiter/transformer.js +0 -84
- package/lib/components/NameLimiter/transformer.d.ts +0 -6
- package/lib/components/NameLimiter/transformer.js +0 -91
@@ -527,100 +527,198 @@
|
|
527
527
|
display: block;
|
528
528
|
width: 8.48528137px;
|
529
529
|
height: 8.48528137px;
|
530
|
+
overflow: hidden;
|
530
531
|
background: transparent;
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
532
|
+
pointer-events: none;
|
533
|
+
}
|
534
|
+
.ant-popover-arrow-content {
|
535
|
+
position: absolute;
|
536
|
+
top: 0;
|
537
|
+
right: 0;
|
538
|
+
bottom: 0;
|
539
|
+
left: 0;
|
540
|
+
display: block;
|
541
|
+
width: 6px;
|
542
|
+
height: 6px;
|
543
|
+
margin: auto;
|
544
|
+
background-color: #ffffff;
|
545
|
+
content: '';
|
546
|
+
pointer-events: auto;
|
547
|
+
}
|
548
|
+
.ant-popover-placement-top .ant-popover-arrow,
|
549
|
+
.ant-popover-placement-topLeft .ant-popover-arrow,
|
550
|
+
.ant-popover-placement-topRight .ant-popover-arrow {
|
551
|
+
bottom: 1.51471863px;
|
552
|
+
}
|
553
|
+
.ant-popover-placement-top .ant-popover-arrow-content,
|
554
|
+
.ant-popover-placement-topLeft .ant-popover-arrow-content,
|
555
|
+
.ant-popover-placement-topRight .ant-popover-arrow-content {
|
544
556
|
-webkit-box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
|
545
557
|
box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);
|
558
|
+
-webkit-transform: translateY(-4.24264069px) rotate(45deg);
|
559
|
+
transform: translateY(-4.24264069px) rotate(45deg);
|
546
560
|
}
|
547
|
-
.ant-popover-placement-top
|
561
|
+
.ant-popover-placement-top .ant-popover-arrow {
|
548
562
|
left: 50%;
|
549
|
-
-webkit-transform: translateX(-50%)
|
550
|
-
transform: translateX(-50%)
|
563
|
+
-webkit-transform: translateX(-50%);
|
564
|
+
transform: translateX(-50%);
|
551
565
|
}
|
552
|
-
.ant-popover-placement-topLeft
|
566
|
+
.ant-popover-placement-topLeft .ant-popover-arrow {
|
553
567
|
left: 16px;
|
554
568
|
}
|
555
|
-
.ant-popover-placement-topRight
|
569
|
+
.ant-popover-placement-topRight .ant-popover-arrow {
|
556
570
|
right: 16px;
|
557
571
|
}
|
558
|
-
.ant-popover-placement-right
|
559
|
-
.ant-popover-placement-rightTop
|
560
|
-
.ant-popover-placement-rightBottom
|
561
|
-
left:
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
572
|
+
.ant-popover-placement-right .ant-popover-arrow,
|
573
|
+
.ant-popover-placement-rightTop .ant-popover-arrow,
|
574
|
+
.ant-popover-placement-rightBottom .ant-popover-arrow {
|
575
|
+
left: 1.51471863px;
|
576
|
+
}
|
577
|
+
.ant-popover-placement-right .ant-popover-arrow-content,
|
578
|
+
.ant-popover-placement-rightTop .ant-popover-arrow-content,
|
579
|
+
.ant-popover-placement-rightBottom .ant-popover-arrow-content {
|
566
580
|
-webkit-box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);
|
567
581
|
box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);
|
582
|
+
-webkit-transform: translateX(4.24264069px) rotate(45deg);
|
583
|
+
transform: translateX(4.24264069px) rotate(45deg);
|
568
584
|
}
|
569
|
-
.ant-popover-placement-right
|
585
|
+
.ant-popover-placement-right .ant-popover-arrow {
|
570
586
|
top: 50%;
|
571
|
-
-webkit-transform: translateY(-50%)
|
572
|
-
transform: translateY(-50%)
|
587
|
+
-webkit-transform: translateY(-50%);
|
588
|
+
transform: translateY(-50%);
|
573
589
|
}
|
574
|
-
.ant-popover-placement-rightTop
|
590
|
+
.ant-popover-placement-rightTop .ant-popover-arrow {
|
575
591
|
top: 12px;
|
576
592
|
}
|
577
|
-
.ant-popover-placement-rightBottom
|
593
|
+
.ant-popover-placement-rightBottom .ant-popover-arrow {
|
578
594
|
bottom: 12px;
|
579
595
|
}
|
580
|
-
.ant-popover-placement-bottom
|
581
|
-
.ant-popover-placement-bottomLeft
|
582
|
-
.ant-popover-placement-bottomRight
|
583
|
-
top:
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
596
|
+
.ant-popover-placement-bottom .ant-popover-arrow,
|
597
|
+
.ant-popover-placement-bottomLeft .ant-popover-arrow,
|
598
|
+
.ant-popover-placement-bottomRight .ant-popover-arrow {
|
599
|
+
top: 1.51471863px;
|
600
|
+
}
|
601
|
+
.ant-popover-placement-bottom .ant-popover-arrow-content,
|
602
|
+
.ant-popover-placement-bottomLeft .ant-popover-arrow-content,
|
603
|
+
.ant-popover-placement-bottomRight .ant-popover-arrow-content {
|
588
604
|
-webkit-box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.06);
|
589
605
|
box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.06);
|
606
|
+
-webkit-transform: translateY(4.24264069px) rotate(45deg);
|
607
|
+
transform: translateY(4.24264069px) rotate(45deg);
|
590
608
|
}
|
591
|
-
.ant-popover-placement-bottom
|
609
|
+
.ant-popover-placement-bottom .ant-popover-arrow {
|
592
610
|
left: 50%;
|
593
|
-
-webkit-transform: translateX(-50%)
|
594
|
-
transform: translateX(-50%)
|
611
|
+
-webkit-transform: translateX(-50%);
|
612
|
+
transform: translateX(-50%);
|
595
613
|
}
|
596
|
-
.ant-popover-placement-bottomLeft
|
614
|
+
.ant-popover-placement-bottomLeft .ant-popover-arrow {
|
597
615
|
left: 16px;
|
598
616
|
}
|
599
|
-
.ant-popover-placement-bottomRight
|
617
|
+
.ant-popover-placement-bottomRight .ant-popover-arrow {
|
600
618
|
right: 16px;
|
601
619
|
}
|
602
|
-
.ant-popover-placement-left
|
603
|
-
.ant-popover-placement-leftTop
|
604
|
-
.ant-popover-placement-leftBottom
|
605
|
-
right:
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
620
|
+
.ant-popover-placement-left .ant-popover-arrow,
|
621
|
+
.ant-popover-placement-leftTop .ant-popover-arrow,
|
622
|
+
.ant-popover-placement-leftBottom .ant-popover-arrow {
|
623
|
+
right: 1.51471863px;
|
624
|
+
}
|
625
|
+
.ant-popover-placement-left .ant-popover-arrow-content,
|
626
|
+
.ant-popover-placement-leftTop .ant-popover-arrow-content,
|
627
|
+
.ant-popover-placement-leftBottom .ant-popover-arrow-content {
|
610
628
|
-webkit-box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);
|
611
629
|
box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);
|
630
|
+
-webkit-transform: translateX(-4.24264069px) rotate(45deg);
|
631
|
+
transform: translateX(-4.24264069px) rotate(45deg);
|
612
632
|
}
|
613
|
-
.ant-popover-placement-left
|
633
|
+
.ant-popover-placement-left .ant-popover-arrow {
|
614
634
|
top: 50%;
|
615
|
-
-webkit-transform: translateY(-50%)
|
616
|
-
transform: translateY(-50%)
|
635
|
+
-webkit-transform: translateY(-50%);
|
636
|
+
transform: translateY(-50%);
|
617
637
|
}
|
618
|
-
.ant-popover-placement-leftTop
|
638
|
+
.ant-popover-placement-leftTop .ant-popover-arrow {
|
619
639
|
top: 12px;
|
620
640
|
}
|
621
|
-
.ant-popover-placement-leftBottom
|
641
|
+
.ant-popover-placement-leftBottom .ant-popover-arrow {
|
622
642
|
bottom: 12px;
|
623
643
|
}
|
644
|
+
.ant-popover-pink .ant-popover-inner {
|
645
|
+
background-color: #eb2f96;
|
646
|
+
}
|
647
|
+
.ant-popover-pink .ant-popover-arrow-content {
|
648
|
+
background-color: #eb2f96;
|
649
|
+
}
|
650
|
+
.ant-popover-magenta .ant-popover-inner {
|
651
|
+
background-color: #eb2f96;
|
652
|
+
}
|
653
|
+
.ant-popover-magenta .ant-popover-arrow-content {
|
654
|
+
background-color: #eb2f96;
|
655
|
+
}
|
656
|
+
.ant-popover-red .ant-popover-inner {
|
657
|
+
background-color: #f5222d;
|
658
|
+
}
|
659
|
+
.ant-popover-red .ant-popover-arrow-content {
|
660
|
+
background-color: #f5222d;
|
661
|
+
}
|
662
|
+
.ant-popover-volcano .ant-popover-inner {
|
663
|
+
background-color: #fa541c;
|
664
|
+
}
|
665
|
+
.ant-popover-volcano .ant-popover-arrow-content {
|
666
|
+
background-color: #fa541c;
|
667
|
+
}
|
668
|
+
.ant-popover-orange .ant-popover-inner {
|
669
|
+
background-color: #fa8c16;
|
670
|
+
}
|
671
|
+
.ant-popover-orange .ant-popover-arrow-content {
|
672
|
+
background-color: #fa8c16;
|
673
|
+
}
|
674
|
+
.ant-popover-yellow .ant-popover-inner {
|
675
|
+
background-color: #fadb14;
|
676
|
+
}
|
677
|
+
.ant-popover-yellow .ant-popover-arrow-content {
|
678
|
+
background-color: #fadb14;
|
679
|
+
}
|
680
|
+
.ant-popover-gold .ant-popover-inner {
|
681
|
+
background-color: #faad14;
|
682
|
+
}
|
683
|
+
.ant-popover-gold .ant-popover-arrow-content {
|
684
|
+
background-color: #faad14;
|
685
|
+
}
|
686
|
+
.ant-popover-cyan .ant-popover-inner {
|
687
|
+
background-color: #13c2c2;
|
688
|
+
}
|
689
|
+
.ant-popover-cyan .ant-popover-arrow-content {
|
690
|
+
background-color: #13c2c2;
|
691
|
+
}
|
692
|
+
.ant-popover-lime .ant-popover-inner {
|
693
|
+
background-color: #a0d911;
|
694
|
+
}
|
695
|
+
.ant-popover-lime .ant-popover-arrow-content {
|
696
|
+
background-color: #a0d911;
|
697
|
+
}
|
698
|
+
.ant-popover-green .ant-popover-inner {
|
699
|
+
background-color: #52c41a;
|
700
|
+
}
|
701
|
+
.ant-popover-green .ant-popover-arrow-content {
|
702
|
+
background-color: #52c41a;
|
703
|
+
}
|
704
|
+
.ant-popover-blue .ant-popover-inner {
|
705
|
+
background-color: #1890ff;
|
706
|
+
}
|
707
|
+
.ant-popover-blue .ant-popover-arrow-content {
|
708
|
+
background-color: #1890ff;
|
709
|
+
}
|
710
|
+
.ant-popover-geekblue .ant-popover-inner {
|
711
|
+
background-color: #2f54eb;
|
712
|
+
}
|
713
|
+
.ant-popover-geekblue .ant-popover-arrow-content {
|
714
|
+
background-color: #2f54eb;
|
715
|
+
}
|
716
|
+
.ant-popover-purple .ant-popover-inner {
|
717
|
+
background-color: #722ed1;
|
718
|
+
}
|
719
|
+
.ant-popover-purple .ant-popover-arrow-content {
|
720
|
+
background-color: #722ed1;
|
721
|
+
}
|
624
722
|
.ant-popover-rtl {
|
625
723
|
direction: rtl;
|
626
724
|
text-align: right;
|
@@ -132,8 +132,8 @@ textarea.ant-input-affix-wrapper {
|
|
132
132
|
outline: none;
|
133
133
|
}
|
134
134
|
.ant-input-affix-wrapper > input.ant-input:focus {
|
135
|
-
-webkit-box-shadow: none;
|
136
|
-
box-shadow: none;
|
135
|
+
-webkit-box-shadow: none !important;
|
136
|
+
box-shadow: none !important;
|
137
137
|
}
|
138
138
|
.ant-input-affix-wrapper::before {
|
139
139
|
width: 0;
|
@@ -158,7 +158,7 @@ textarea.ant-input-affix-wrapper {
|
|
158
158
|
.ant-input-suffix {
|
159
159
|
margin-left: 4px;
|
160
160
|
}
|
161
|
-
.ant-input-clear-icon {
|
161
|
+
.anticon.ant-input-clear-icon {
|
162
162
|
margin: 0 4px;
|
163
163
|
color: rgba(0, 0, 0, 0.25);
|
164
164
|
font-size: 12px;
|
@@ -167,16 +167,16 @@ textarea.ant-input-affix-wrapper {
|
|
167
167
|
-webkit-transition: color 0.3s;
|
168
168
|
transition: color 0.3s;
|
169
169
|
}
|
170
|
-
.ant-input-clear-icon:hover {
|
170
|
+
.anticon.ant-input-clear-icon:hover {
|
171
171
|
color: rgba(0, 0, 0, 0.45);
|
172
172
|
}
|
173
|
-
.ant-input-clear-icon:active {
|
173
|
+
.anticon.ant-input-clear-icon:active {
|
174
174
|
color: rgba(0, 0, 0, 0.65);
|
175
175
|
}
|
176
|
-
.ant-input-clear-icon-hidden {
|
176
|
+
.anticon.ant-input-clear-icon-hidden {
|
177
177
|
visibility: hidden;
|
178
178
|
}
|
179
|
-
.ant-input-clear-icon:last-child {
|
179
|
+
.anticon.ant-input-clear-icon:last-child {
|
180
180
|
margin-right: 0;
|
181
181
|
}
|
182
182
|
.ant-input-affix-wrapper-textarea-with-clear-btn {
|
@@ -391,6 +391,16 @@ textarea.ant-input {
|
|
391
391
|
.ant-input-group-addon .ant-select-focused .ant-select-selector {
|
392
392
|
color: #7a869a;
|
393
393
|
}
|
394
|
+
.ant-input-group-addon .ant-cascader-picker {
|
395
|
+
margin: -9px -12px;
|
396
|
+
background-color: transparent;
|
397
|
+
}
|
398
|
+
.ant-input-group-addon .ant-cascader-picker .ant-cascader-input {
|
399
|
+
text-align: left;
|
400
|
+
border: 0;
|
401
|
+
-webkit-box-shadow: none;
|
402
|
+
box-shadow: none;
|
403
|
+
}
|
394
404
|
.ant-input-group > .ant-input:first-child,
|
395
405
|
.ant-input-group-addon:first-child {
|
396
406
|
border-top-right-radius: 0;
|
@@ -870,6 +880,7 @@ textarea.ant-input-number {
|
|
870
880
|
font-weight: bold;
|
871
881
|
line-height: 0;
|
872
882
|
text-align: center;
|
883
|
+
border-left: 1px solid #e5e5e5;
|
873
884
|
-webkit-transition: all 0.1s linear;
|
874
885
|
transition: all 0.1s linear;
|
875
886
|
}
|
@@ -1016,7 +1027,6 @@ textarea.ant-input-number {
|
|
1016
1027
|
width: 22px;
|
1017
1028
|
height: 100%;
|
1018
1029
|
background: #ffffff;
|
1019
|
-
border-left: 1px solid #e5e5e5;
|
1020
1030
|
border-radius: 0 2px 2px 0;
|
1021
1031
|
opacity: 0;
|
1022
1032
|
-webkit-transition: opacity 0.24s linear 0.1s;
|
@@ -11,20 +11,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
11
|
};
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
13
|
var React = __importStar(require("react"));
|
14
|
-
var style_1 = require("../../constants/style");
|
15
14
|
var NameLimiter_1 = __importDefault(require("../../components/NameLimiter"));
|
16
15
|
exports.IgnoreDesString = '由logkit';
|
17
16
|
/**
|
18
17
|
* 资源名称展示位'名称(备注)'
|
19
18
|
*/
|
20
19
|
function RemarkName(props) {
|
21
|
-
var name = props.name, remark = props.remark
|
20
|
+
var name = props.name, remark = props.remark;
|
22
21
|
var getTooltip = function () {
|
23
22
|
return remark && remark !== name && !remark.startsWith(exports.IgnoreDesString)
|
24
23
|
? name + "(" + (remark && remark.trim()) + ")"
|
25
24
|
: '';
|
26
25
|
};
|
27
|
-
return
|
28
|
-
React.createElement(NameLimiter_1.default, { name: name, title: getTooltip(), length: length })));
|
26
|
+
return React.createElement(NameLimiter_1.default, { name: name, title: getTooltip() });
|
29
27
|
}
|
30
28
|
exports.default = RemarkName;
|
@@ -262,7 +262,15 @@
|
|
262
262
|
.ant-tooltip-rtl .ant-tooltip-inner {
|
263
263
|
text-align: right;
|
264
264
|
}
|
265
|
-
.pandora-sdk-name-
|
265
|
+
.pandora-sdk-name-limit {
|
266
|
+
max-width: 100%;
|
267
|
+
display: inline-block;
|
268
|
+
vertical-align: top;
|
269
|
+
white-space: nowrap;
|
270
|
+
text-overflow: ellipsis;
|
271
|
+
overflow: hidden;
|
272
|
+
}
|
273
|
+
.pandora-sdk-name-limit-tooltip .ant-tooltip-inner {
|
266
274
|
max-width: 400px !important;
|
267
275
|
max-height: 200px !important;
|
268
276
|
overflow: auto;
|
@@ -275,7 +283,3 @@
|
|
275
283
|
.ant-btn-sm {
|
276
284
|
padding: 0 7px;
|
277
285
|
}
|
278
|
-
.pandora-sdk-remark-name {
|
279
|
-
word-break: break-all;
|
280
|
-
white-space: nowrap;
|
281
|
-
}
|
@@ -457,7 +457,7 @@
|
|
457
457
|
-webkit-font-smoothing: antialiased;
|
458
458
|
-moz-osx-font-smoothing: grayscale;
|
459
459
|
position: absolute;
|
460
|
-
top:
|
460
|
+
top: 50%;
|
461
461
|
right: 11px;
|
462
462
|
width: 12px;
|
463
463
|
height: 12px;
|
@@ -638,6 +638,9 @@
|
|
638
638
|
color: rgba(0, 0, 0, 0.25);
|
639
639
|
cursor: not-allowed;
|
640
640
|
}
|
641
|
+
.ant-select-item-option-disabled.ant-select-item-option-selected {
|
642
|
+
background-color: #f5f5f5;
|
643
|
+
}
|
641
644
|
.ant-select-item-option-grouped {
|
642
645
|
padding-left: 24px;
|
643
646
|
}
|
@@ -17,7 +17,7 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
17
17
|
var style_1 = require("../../constants/style");
|
18
18
|
var useCallback = React.useCallback, useMemo = React.useMemo;
|
19
19
|
function SolidRadioGroup(props) {
|
20
|
-
var className = props.className, buttonClassName = props.buttonClassName, value = props.value, size = props.size, onChange = props.onChange, children = props.children, _a = props.options, options = _a === void 0 ? {} : _a;
|
20
|
+
var className = props.className, buttonClassName = props.buttonClassName, value = props.value, size = props.size, onChange = props.onChange, children = props.children, disabled = props.disabled, _a = props.options, options = _a === void 0 ? {} : _a;
|
21
21
|
var handleChange = useCallback(function (e) {
|
22
22
|
if (onChange) {
|
23
23
|
onChange(e.target.value);
|
@@ -31,8 +31,11 @@ function SolidRadioGroup(props) {
|
|
31
31
|
return (React.createElement(radio_1.default.Group, { className: classnames_1.default(style_1.SDK_PREFIX + "-solid-radio-group", className), value: value, onChange: handleChange, size: size },
|
32
32
|
radioOptions.map(function (option) {
|
33
33
|
var _a;
|
34
|
-
var value = option.value, item = option.item
|
35
|
-
|
34
|
+
var value = option.value, item = option.item;
|
35
|
+
var disableRealVal = lodash_1.isUndefined(option.disabled)
|
36
|
+
? disabled
|
37
|
+
: option.disabled;
|
38
|
+
return (React.createElement(radio_1.default.Button, { key: value.toString(), value: value, disabled: disableRealVal, className: classnames_1.default((_a = {}, _a[style_1.SDK_PREFIX + "-solid-radio-item"] = !disableRealVal, _a), buttonClassName) }, item));
|
36
39
|
}),
|
37
40
|
children));
|
38
41
|
}
|
@@ -16,7 +16,6 @@
|
|
16
16
|
font-feature-settings: 'tnum';
|
17
17
|
display: inline-block;
|
18
18
|
font-size: 0;
|
19
|
-
line-height: unset;
|
20
19
|
}
|
21
20
|
.ant-radio-group .ant-badge-count {
|
22
21
|
z-index: 1;
|
@@ -399,6 +398,10 @@ span.ant-radio + * {
|
|
399
398
|
border-color: #2c6dd2 !important;
|
400
399
|
color: #2c6dd2 !important;
|
401
400
|
}
|
401
|
+
.pandora-sdk-solid-radio-group .ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled {
|
402
|
+
border-color: #bfbfbf !important;
|
403
|
+
color: #333 !important;
|
404
|
+
}
|
402
405
|
.pandora-sdk-solid-radio-group .ant-radio-button-wrapper:not(:first-child)::before {
|
403
406
|
background-color: #bfbfbf;
|
404
407
|
}
|
@@ -18,6 +18,11 @@
|
|
18
18
|
color: @theme-color !important;
|
19
19
|
}
|
20
20
|
|
21
|
+
.@{ant-prefix}-radio-button-wrapper-checked.@{ant-prefix}-radio-button-wrapper-disabled {
|
22
|
+
border-color: @input-border-color !important;
|
23
|
+
color: @heading-color!important;
|
24
|
+
}
|
25
|
+
|
21
26
|
.@{ant-prefix}-radio-button-wrapper {
|
22
27
|
&:not(:first-child) {
|
23
28
|
&::before {
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { TableProps } from 'antd/es/table';
|
3
|
+
import { TableRowSelection } from 'antd/es/table/interface';
|
3
4
|
/**
|
4
5
|
* 表格提供自定义多选, 通过 rowSelection对象的selectedRowKeys和onChange来控制多选的状态
|
5
6
|
* 需要注意的是, 当在外部进行增删改或者外部需要控制选择状态时, 例如删除之后清空全选状态, 需要受控
|
@@ -17,7 +18,7 @@ export interface IOptionItem {
|
|
17
18
|
/**
|
18
19
|
* 禁用当前操作
|
19
20
|
*/
|
20
|
-
disabled?: boolean;
|
21
|
+
disabled?: boolean | ((selectItems: any[]) => boolean);
|
21
22
|
}
|
22
23
|
export interface ITableProps<T> extends TableProps<T> {
|
23
24
|
/**
|
@@ -32,7 +33,7 @@ export interface ITableProps<T> extends TableProps<T> {
|
|
32
33
|
/**
|
33
34
|
* pandora2.0风格的表格
|
34
35
|
*/
|
35
|
-
|
36
|
+
declare class Table<T = any> extends React.Component<ITableProps<T>, any> {
|
36
37
|
static Column: typeof import("antd/lib/table/Column").default;
|
37
38
|
static ColumnTag: (props: {
|
38
39
|
tags: any[];
|
@@ -43,35 +44,19 @@ export default class Table<T = any> extends React.Component<ITableProps<T>, any>
|
|
43
44
|
checkAll: boolean;
|
44
45
|
UNSAFE_componentWillReceiveProps(nextProps: ITableProps<T>): void;
|
45
46
|
get selectedRowKeys(): React.ReactText[];
|
46
|
-
get rowSelection():
|
47
|
-
|
48
|
-
onChange: (selectedRowKeys: string[] | number[], selectedRowsOfCurrentPage: any[]) => void;
|
49
|
-
preserveSelectedRowKeys?: boolean | undefined;
|
50
|
-
type?: "checkbox" | "radio" | undefined;
|
51
|
-
defaultSelectedRowKeys?: React.ReactText[] | undefined;
|
52
|
-
getCheckboxProps?: ((record: T) => Partial<Pick<import("antd/es/checkbox").CheckboxProps, "type" | "onClick" | "className" | "id" | "style" | "tabIndex" | "children" | "onChange" | "onKeyDown" | "onKeyPress" | "onMouseEnter" | "onMouseLeave" | "autoFocus" | "disabled" | "name" | "value" | "prefixCls" | "indeterminate" | "skipGroup">>) | undefined;
|
53
|
-
onSelect?: import("antd/es/table/interface").SelectionSelectFn<T> | undefined;
|
54
|
-
onSelectMultiple?: ((selected: boolean, selectedRows: T[], changeRows: T[]) => void) | undefined;
|
55
|
-
onSelectAll?: ((selected: boolean, selectedRows: T[], changeRows: T[]) => void) | undefined;
|
56
|
-
onSelectInvert?: ((selectedRowKeys: React.ReactText[]) => void) | undefined;
|
57
|
-
onSelectNone?: (() => void) | undefined;
|
58
|
-
selections?: boolean | import("antd/es/table/hooks/useSelection").INTERNAL_SELECTION_ITEM[] | undefined;
|
59
|
-
hideSelectAll?: boolean | undefined;
|
60
|
-
fixed?: boolean | undefined;
|
61
|
-
columnWidth?: string | number | undefined;
|
62
|
-
columnTitle?: React.ReactNode;
|
63
|
-
checkStrictly?: boolean | undefined;
|
64
|
-
renderCell?: ((value: boolean, record: T, index: number, originNode: React.ReactNode) => string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("rc-table/lib/interface").RenderedCell<T> | null | undefined) | undefined;
|
65
|
-
} | undefined;
|
47
|
+
get rowSelection(): TableRowSelection<T> | undefined;
|
48
|
+
get undisabledData(): readonly T[];
|
66
49
|
get keysOfCurrentPage(): any[];
|
67
50
|
getRowKey(row: any, index: number): any;
|
68
51
|
setIndeterminate(indeterminate: boolean): void;
|
69
52
|
setCheckAll(checkAll: boolean): void;
|
70
53
|
setCheckboxStatus(selectedRowsOfCurrentPage?: T[], dataSource?: T[]): void;
|
71
|
-
handleSelectionChange(selectedRowKeys:
|
72
|
-
onRowSelectionChange(selectedRowKeys:
|
54
|
+
handleSelectionChange(selectedRowKeys: React.Key[], selectedRowsOfCurrentPage: any[]): void;
|
55
|
+
onRowSelectionChange(selectedRowKeys: React.Key[], selectedRowsOfCurrentPage: any[]): void;
|
73
56
|
handleCheckAllChange(e: any): void;
|
74
57
|
handleBatchOptionClick(option: IOptionItem): void;
|
75
58
|
getRowClassName(record: any, index: number, indent: number): string;
|
59
|
+
getDisabledStatus(option: IOptionItem): boolean | undefined;
|
76
60
|
render(): JSX.Element;
|
77
61
|
}
|
62
|
+
export default Table;
|
@@ -138,10 +138,23 @@ var Table = /** @class */ (function (_super) {
|
|
138
138
|
enumerable: true,
|
139
139
|
configurable: true
|
140
140
|
});
|
141
|
+
Object.defineProperty(Table.prototype, "undisabledData", {
|
142
|
+
get: function () {
|
143
|
+
var _a = this.props, dataSource = _a.dataSource, rowSelection = _a.rowSelection;
|
144
|
+
var getCheckboxProps = (rowSelection || {}).getCheckboxProps;
|
145
|
+
var undisabledData = dataSource || [];
|
146
|
+
if (getCheckboxProps) {
|
147
|
+
// 如果checkbox有disabled的,要去掉这些rowItem
|
148
|
+
undisabledData = undisabledData.filter(function (data) { return !getCheckboxProps(data).disabled; });
|
149
|
+
}
|
150
|
+
return undisabledData;
|
151
|
+
},
|
152
|
+
enumerable: true,
|
153
|
+
configurable: true
|
154
|
+
});
|
141
155
|
Object.defineProperty(Table.prototype, "keysOfCurrentPage", {
|
142
156
|
get: function () {
|
143
|
-
|
144
|
-
return (dataSource || []).map(this.getRowKey);
|
157
|
+
return this.undisabledData.map(this.getRowKey);
|
145
158
|
},
|
146
159
|
enumerable: true,
|
147
160
|
configurable: true
|
@@ -217,19 +230,29 @@ var Table = /** @class */ (function (_super) {
|
|
217
230
|
? rowClassName
|
218
231
|
: rowClassName(record, index, indent));
|
219
232
|
};
|
233
|
+
Table.prototype.getDisabledStatus = function (option) {
|
234
|
+
var noneSelected = this.selectedRowKeys.length === 0;
|
235
|
+
var disabled = typeof option.disabled === 'function'
|
236
|
+
? option.disabled(__spread(this.undisabledData))
|
237
|
+
: option.disabled;
|
238
|
+
return noneSelected || disabled;
|
239
|
+
};
|
220
240
|
Table.prototype.render = function () {
|
221
241
|
var _a, _b;
|
222
242
|
var _this = this;
|
223
243
|
var _c = this.props, className = _c.className, batchOptions = _c.batchOptions, scroll = _c.scroll, restProps = __rest(_c, ["className", "batchOptions", "scroll"]);
|
224
244
|
return (React.createElement("div", null,
|
225
|
-
React.createElement(antd_1.Table, __assign({ scroll: scroll }, restProps, { className: classnames_1.default(style_1.SDK_PREFIX + "-table-wrapper", (_a = {}, _a[style_1.SDK_PREFIX + "-table-scrollX"] = lodash_1.get(scroll, 'x'), _a), (_b = {}, _b[style_1.SDK_PREFIX + "-table-scrollY"] = lodash_1.get(scroll, 'y'), _b), className),
|
245
|
+
React.createElement(antd_1.Table, __assign({ scroll: scroll }, restProps, { className: classnames_1.default(style_1.SDK_PREFIX + "-table-wrapper", (_a = {}, _a[style_1.SDK_PREFIX + "-table-scrollX"] = lodash_1.get(scroll, 'x'), _a), (_b = {}, _b[style_1.SDK_PREFIX + "-table-scrollY"] = lodash_1.get(scroll, 'y'), _b), className),
|
246
|
+
// 涉及到权限
|
247
|
+
// getCheckboxProps只能放到tableBatchWrapper里,因为selectedRowKeys在那个组件计算
|
248
|
+
rowSelection: batchOptions && this.props.rowSelection
|
226
249
|
? this.rowSelection
|
227
250
|
: this.props.rowSelection, rowClassName: this.getRowClassName })),
|
228
251
|
this.props.batchOptions &&
|
229
252
|
this.props.rowSelection &&
|
230
253
|
this.props.dataSource &&
|
231
254
|
this.props.dataSource.length > 0 ? (React.createElement("div", { className: style_1.SDK_PREFIX + "-table-batch-opt" },
|
232
|
-
React.createElement(antd_1.Checkbox, { indeterminate: this.indeterminate, onChange: this.handleCheckAllChange, checked: this.checkAll, disabled: lodash_1.size(this.
|
255
|
+
React.createElement(antd_1.Checkbox, { indeterminate: this.indeterminate, onChange: this.handleCheckAllChange, checked: this.checkAll, disabled: lodash_1.size(this.undisabledData) === 0 }),
|
233
256
|
React.createElement("span", { className: style_1.SDK_PREFIX + "-table-batch-opt-label" },
|
234
257
|
"\u5DF2\u9009 ",
|
235
258
|
this.selectedRowKeys.length),
|
@@ -237,9 +260,7 @@ var Table = /** @class */ (function (_super) {
|
|
237
260
|
var _a;
|
238
261
|
return (React.createElement("span", { key: index, className: classnames_1.default((_a = {},
|
239
262
|
_a[style_1.SDK_PREFIX + "-table-batch-opt-item"] = true,
|
240
|
-
_a[style_1.SDK_PREFIX + "-table-batch-opt-disabled"] =
|
241
|
-
? _this.selectedRowKeys.length === 0
|
242
|
-
: option.disabled,
|
263
|
+
_a[style_1.SDK_PREFIX + "-table-batch-opt-disabled"] = _this.getDisabledStatus(option),
|
243
264
|
_a)), onClick: function () { return _this.handleBatchOptionClick(option); } }, option.text));
|
244
265
|
})))) : null));
|
245
266
|
};
|
@@ -263,6 +284,11 @@ var Table = /** @class */ (function (_super) {
|
|
263
284
|
__metadata("design:type", Object),
|
264
285
|
__metadata("design:paramtypes", [])
|
265
286
|
], Table.prototype, "rowSelection", null);
|
287
|
+
__decorate([
|
288
|
+
mobx_1.computed,
|
289
|
+
__metadata("design:type", Object),
|
290
|
+
__metadata("design:paramtypes", [])
|
291
|
+
], Table.prototype, "undisabledData", null);
|
266
292
|
__decorate([
|
267
293
|
mobx_1.computed,
|
268
294
|
__metadata("design:type", Object),
|
@@ -324,6 +350,12 @@ var Table = /** @class */ (function (_super) {
|
|
324
350
|
__metadata("design:paramtypes", [Object, Number, Number]),
|
325
351
|
__metadata("design:returntype", void 0)
|
326
352
|
], Table.prototype, "getRowClassName", null);
|
353
|
+
__decorate([
|
354
|
+
bind_1.default,
|
355
|
+
__metadata("design:type", Function),
|
356
|
+
__metadata("design:paramtypes", [Object]),
|
357
|
+
__metadata("design:returntype", void 0)
|
358
|
+
], Table.prototype, "getDisabledStatus", null);
|
327
359
|
Table = __decorate([
|
328
360
|
mobx_react_1.observer
|
329
361
|
], Table);
|