@zat-design/sisyphus-react 3.4.4 → 3.4.5-beta.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/babel.config.js +3 -0
- package/dist/index.esm.css +63 -18
- package/dist/less.esm.css +63 -18
- package/es/ProConfigProvider/index.js +0 -3
- package/es/ProEditTable/components/RenderField/index.js +3 -2
- package/es/ProEditTable/index.js +13 -2
- package/es/ProEditTable/propsType.d.ts +1 -0
- package/es/ProEditTable/utils/index.js +7 -1
- package/es/ProEnum/components/Group.js +7 -1
- package/es/ProEnum/style/index.less +3 -2
- package/es/ProForm/components/combination/FormList/index.js +5 -5
- package/es/ProForm/components/combination/GroupCopy/component/ComRender.d.ts +14 -0
- package/es/ProForm/components/combination/GroupCopy/component/ComRender.js +36 -0
- package/es/ProForm/components/combination/GroupCopy/index.d.ts +10 -0
- package/es/ProForm/components/combination/GroupCopy/index.js +84 -0
- package/es/ProForm/components/combination/GroupCopy/propsType.d.ts +47 -0
- package/es/ProForm/components/combination/GroupCopy/propsType.js +1 -0
- package/es/ProForm/components/combination/GroupCopy/style/index.less +131 -0
- package/es/ProForm/components/combination/GroupCopy/utils.d.ts +53 -0
- package/es/ProForm/components/combination/GroupCopy/utils.js +180 -0
- package/es/ProForm/components/combination/ProModalSelect/index.js +22 -18
- package/es/ProForm/components/index.js +1 -0
- package/es/ProForm/components/render/Render.js +2 -2
- package/es/ProForm/components/render/propsType.d.ts +1 -1
- package/es/ProIcon/config/index.d.ts +14 -0
- package/es/ProIcon/config/index.js +17 -1
- package/es/ProIcon/index.js +102 -20
- package/es/ProIcon/propsTypes.d.ts +19 -0
- package/es/ProIcon/utils/index.d.ts +1 -0
- package/es/ProIcon/utils/index.js +23 -0
- package/es/ProLayout/components/ProCollapse/index.js +6 -3
- package/es/ProStep/components/Step/index.js +5 -4
- package/es/ProStep/style/index.less +20 -0
- package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/es/ProThemeTools/component/PrdTools/index.js +24 -4
- package/es/ProThemeTools/component/PrdTools/style/index.less +56 -48
- package/es/ProTreeModal/index.js +11 -15
- package/es/ProWaterMark/__snapshots__/index.test.tsx.snap +7 -0
- package/es/global.less +38 -2
- package/jest.config.js +8 -0
- package/lib/ProConfigProvider/index.js +0 -3
- package/lib/ProEditTable/components/RenderField/index.js +3 -2
- package/lib/ProEditTable/index.js +13 -2
- package/lib/ProEditTable/propsType.d.ts +1 -0
- package/lib/ProEditTable/utils/index.js +7 -1
- package/lib/ProEnum/components/Group.js +6 -0
- package/lib/ProEnum/style/index.less +3 -2
- package/lib/ProForm/components/combination/FormList/index.js +5 -5
- package/lib/ProForm/components/combination/GroupCopy/component/ComRender.d.ts +14 -0
- package/lib/ProForm/components/combination/GroupCopy/component/ComRender.js +44 -0
- package/lib/ProForm/components/combination/GroupCopy/index.d.ts +10 -0
- package/lib/ProForm/components/combination/GroupCopy/index.js +91 -0
- package/lib/ProForm/components/combination/GroupCopy/propsType.d.ts +47 -0
- package/lib/ProForm/components/combination/GroupCopy/propsType.js +5 -0
- package/lib/ProForm/components/combination/GroupCopy/style/index.less +131 -0
- package/lib/ProForm/components/combination/GroupCopy/utils.d.ts +53 -0
- package/lib/ProForm/components/combination/GroupCopy/utils.js +187 -0
- package/lib/ProForm/components/combination/ProModalSelect/index.js +23 -19
- package/lib/ProForm/components/render/Render.js +2 -2
- package/lib/ProForm/components/render/propsType.d.ts +1 -1
- package/lib/ProIcon/config/index.d.ts +14 -0
- package/lib/ProIcon/config/index.js +18 -2
- package/lib/ProIcon/index.js +99 -19
- package/lib/ProIcon/propsTypes.d.ts +19 -0
- package/lib/ProIcon/utils/index.d.ts +1 -0
- package/lib/ProIcon/utils/index.js +29 -0
- package/lib/ProLayout/components/ProCollapse/index.js +6 -3
- package/lib/ProStep/components/Step/index.js +5 -4
- package/lib/ProStep/style/index.less +20 -0
- package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
- package/lib/ProThemeTools/component/PrdTools/index.js +24 -4
- package/lib/ProThemeTools/component/PrdTools/style/index.less +56 -48
- package/lib/ProTreeModal/index.js +11 -15
- package/lib/ProWaterMark/__snapshots__/index.test.tsx.snap +7 -0
- package/lib/global.less +38 -2
- package/package.json +6 -2
- package/test/__mocks__/fileMock.js +0 -0
- package/test/__mocks__/styleMock.js +0 -0
package/babel.config.js
ADDED
package/dist/index.esm.css
CHANGED
|
@@ -1459,6 +1459,44 @@
|
|
|
1459
1459
|
font-size: var(--zaui-font-size-lg, 16px);
|
|
1460
1460
|
border-bottom: 1px solid var(--zaui-line, #dddddd);
|
|
1461
1461
|
}
|
|
1462
|
+
.pro-step > .step-menu > .anticon {
|
|
1463
|
+
display: -webkit-box;
|
|
1464
|
+
display: -webkit-flex;
|
|
1465
|
+
display: -ms-flexbox;
|
|
1466
|
+
display: flex;
|
|
1467
|
+
-webkit-box-align: center;
|
|
1468
|
+
-webkit-align-items: center;
|
|
1469
|
+
-ms-flex-align: center;
|
|
1470
|
+
align-items: center;
|
|
1471
|
+
-webkit-box-pack: center;
|
|
1472
|
+
-webkit-justify-content: center;
|
|
1473
|
+
-ms-flex-pack: center;
|
|
1474
|
+
justify-content: center;
|
|
1475
|
+
width: 48px;
|
|
1476
|
+
height: 24px;
|
|
1477
|
+
}
|
|
1478
|
+
.pro-step > .step-menu > .anticon > .menu-icon {
|
|
1479
|
+
width: auto !important;
|
|
1480
|
+
height: auto !important;
|
|
1481
|
+
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
1482
|
+
fill: var(--zaui-brand, #006aff);
|
|
1483
|
+
}
|
|
1484
|
+
.pro-step > .step-menu > .anticon > .menu-icon > div {
|
|
1485
|
+
display: -webkit-box;
|
|
1486
|
+
display: -webkit-flex;
|
|
1487
|
+
display: -ms-flexbox;
|
|
1488
|
+
display: flex;
|
|
1489
|
+
-webkit-box-align: center;
|
|
1490
|
+
-webkit-align-items: center;
|
|
1491
|
+
-ms-flex-align: center;
|
|
1492
|
+
align-items: center;
|
|
1493
|
+
-webkit-box-pack: center;
|
|
1494
|
+
-webkit-justify-content: center;
|
|
1495
|
+
-ms-flex-pack: center;
|
|
1496
|
+
justify-content: center;
|
|
1497
|
+
width: 48px;
|
|
1498
|
+
height: 24px;
|
|
1499
|
+
}
|
|
1462
1500
|
.pro-step > .step-menu > .menu-icon {
|
|
1463
1501
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
1464
1502
|
fill: var(--zaui-brand, #006aff);
|
|
@@ -4409,20 +4447,20 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4409
4447
|
gap: var(--zaui-space-size-sm, 8px) !important;
|
|
4410
4448
|
}
|
|
4411
4449
|
.pro-theme-prd-tools-drawer p {
|
|
4412
|
-
padding-left: 12px;
|
|
4413
4450
|
position: relative;
|
|
4414
4451
|
margin-bottom: var(--zaui-space-size-md, 16px);
|
|
4452
|
+
padding-left: 12px;
|
|
4415
4453
|
font-size: var(--zaui-font-size, 14px);
|
|
4416
4454
|
}
|
|
4417
4455
|
.pro-theme-prd-tools-drawer p:before {
|
|
4418
|
-
content: '';
|
|
4419
4456
|
position: absolute;
|
|
4420
|
-
left: 0;
|
|
4421
4457
|
top: 4px;
|
|
4458
|
+
left: 0;
|
|
4422
4459
|
width: 4px;
|
|
4423
4460
|
height: 14px;
|
|
4424
4461
|
background: var(--zaui-brand, #006aff);
|
|
4425
4462
|
border-radius: var(zaui-border-radius-card, 4px);
|
|
4463
|
+
content: '';
|
|
4426
4464
|
}
|
|
4427
4465
|
.pro-theme-prd-tools-drawer .pro-theme-color {
|
|
4428
4466
|
display: -webkit-box;
|
|
@@ -4431,25 +4469,25 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4431
4469
|
display: flex;
|
|
4432
4470
|
}
|
|
4433
4471
|
.pro-theme-prd-tools-drawer .pro-theme-color li {
|
|
4434
|
-
width: 38px;
|
|
4435
|
-
height: 38px;
|
|
4436
|
-
border-radius: 50%;
|
|
4437
|
-
background: #fff;
|
|
4438
4472
|
display: -webkit-box;
|
|
4439
4473
|
display: -webkit-flex;
|
|
4440
4474
|
display: -ms-flexbox;
|
|
4441
4475
|
display: flex;
|
|
4442
|
-
-webkit-box-pack: center;
|
|
4443
|
-
-webkit-justify-content: center;
|
|
4444
|
-
-ms-flex-pack: center;
|
|
4445
|
-
justify-content: center;
|
|
4446
4476
|
-webkit-box-align: center;
|
|
4447
4477
|
-webkit-align-items: center;
|
|
4448
4478
|
-ms-flex-align: center;
|
|
4449
4479
|
align-items: center;
|
|
4450
|
-
|
|
4451
|
-
|
|
4480
|
+
-webkit-box-pack: center;
|
|
4481
|
+
-webkit-justify-content: center;
|
|
4482
|
+
-ms-flex-pack: center;
|
|
4483
|
+
justify-content: center;
|
|
4484
|
+
width: 38px;
|
|
4485
|
+
height: 38px;
|
|
4452
4486
|
margin-right: 34px;
|
|
4487
|
+
color: #fff;
|
|
4488
|
+
background: #fff;
|
|
4489
|
+
border: 6px solid #fff;
|
|
4490
|
+
border-radius: 50%;
|
|
4453
4491
|
}
|
|
4454
4492
|
.pro-theme-prd-tools-drawer .pro-theme-color li span {
|
|
4455
4493
|
font-size: var(--zaui-font-size, 14px);
|
|
@@ -4477,35 +4515,42 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4477
4515
|
border-color: #ffecdd;
|
|
4478
4516
|
}
|
|
4479
4517
|
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(4) {
|
|
4480
|
-
margin-right: 0;
|
|
4481
4518
|
background: #a00f20;
|
|
4482
4519
|
}
|
|
4483
4520
|
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(4).active,
|
|
4484
4521
|
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(4):hover {
|
|
4485
4522
|
border-color: #f2dbdb;
|
|
4486
4523
|
}
|
|
4524
|
+
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(5) {
|
|
4525
|
+
margin-right: 0;
|
|
4526
|
+
background: #31af96;
|
|
4527
|
+
}
|
|
4528
|
+
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(5).active,
|
|
4529
|
+
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(5):hover {
|
|
4530
|
+
border-color: #f2dbdb;
|
|
4531
|
+
}
|
|
4487
4532
|
.pro-theme-prd-tools-drawer .anticon-question-circle {
|
|
4488
4533
|
color: var(--zaui-brand, #006aff);
|
|
4489
4534
|
}
|
|
4490
4535
|
.pro-theme-prd-tools-drawer .copy-btn {
|
|
4491
4536
|
position: absolute;
|
|
4492
|
-
width: calc(100% - 64px);
|
|
4493
4537
|
bottom: 20px;
|
|
4494
4538
|
left: 32px;
|
|
4495
4539
|
z-index: 10;
|
|
4540
|
+
width: calc(100% - 64px);
|
|
4496
4541
|
}
|
|
4497
4542
|
.pro-theme-prd-tools-drawer .pro-theme-tools-box {
|
|
4498
4543
|
display: -webkit-box;
|
|
4499
4544
|
display: -webkit-flex;
|
|
4500
4545
|
display: -ms-flexbox;
|
|
4501
4546
|
display: flex;
|
|
4547
|
+
-webkit-flex-wrap: wrap;
|
|
4548
|
+
-ms-flex-wrap: wrap;
|
|
4549
|
+
flex-wrap: wrap;
|
|
4502
4550
|
-webkit-box-pack: justify;
|
|
4503
4551
|
-webkit-justify-content: space-between;
|
|
4504
4552
|
-ms-flex-pack: justify;
|
|
4505
4553
|
justify-content: space-between;
|
|
4506
|
-
-webkit-flex-wrap: wrap;
|
|
4507
|
-
-ms-flex-wrap: wrap;
|
|
4508
|
-
flex-wrap: wrap;
|
|
4509
4554
|
}
|
|
4510
4555
|
.pro-theme-prd-tools-drawer .pro-theme-tools-space {
|
|
4511
4556
|
margin-bottom: 24px;
|
package/dist/less.esm.css
CHANGED
|
@@ -1459,6 +1459,44 @@
|
|
|
1459
1459
|
font-size: var(--zaui-font-size-lg, 16px);
|
|
1460
1460
|
border-bottom: 1px solid var(--zaui-line, #dddddd);
|
|
1461
1461
|
}
|
|
1462
|
+
.pro-step > .step-menu > .anticon {
|
|
1463
|
+
display: -webkit-box;
|
|
1464
|
+
display: -webkit-flex;
|
|
1465
|
+
display: -ms-flexbox;
|
|
1466
|
+
display: flex;
|
|
1467
|
+
-webkit-box-align: center;
|
|
1468
|
+
-webkit-align-items: center;
|
|
1469
|
+
-ms-flex-align: center;
|
|
1470
|
+
align-items: center;
|
|
1471
|
+
-webkit-box-pack: center;
|
|
1472
|
+
-webkit-justify-content: center;
|
|
1473
|
+
-ms-flex-pack: center;
|
|
1474
|
+
justify-content: center;
|
|
1475
|
+
width: 48px;
|
|
1476
|
+
height: 24px;
|
|
1477
|
+
}
|
|
1478
|
+
.pro-step > .step-menu > .anticon > .menu-icon {
|
|
1479
|
+
width: auto !important;
|
|
1480
|
+
height: auto !important;
|
|
1481
|
+
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
1482
|
+
fill: var(--zaui-brand, #006aff);
|
|
1483
|
+
}
|
|
1484
|
+
.pro-step > .step-menu > .anticon > .menu-icon > div {
|
|
1485
|
+
display: -webkit-box;
|
|
1486
|
+
display: -webkit-flex;
|
|
1487
|
+
display: -ms-flexbox;
|
|
1488
|
+
display: flex;
|
|
1489
|
+
-webkit-box-align: center;
|
|
1490
|
+
-webkit-align-items: center;
|
|
1491
|
+
-ms-flex-align: center;
|
|
1492
|
+
align-items: center;
|
|
1493
|
+
-webkit-box-pack: center;
|
|
1494
|
+
-webkit-justify-content: center;
|
|
1495
|
+
-ms-flex-pack: center;
|
|
1496
|
+
justify-content: center;
|
|
1497
|
+
width: 48px;
|
|
1498
|
+
height: 24px;
|
|
1499
|
+
}
|
|
1462
1500
|
.pro-step > .step-menu > .menu-icon {
|
|
1463
1501
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
|
1464
1502
|
fill: var(--zaui-brand, #006aff);
|
|
@@ -4409,20 +4447,20 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4409
4447
|
gap: var(--zaui-space-size-sm, 8px) !important;
|
|
4410
4448
|
}
|
|
4411
4449
|
.pro-theme-prd-tools-drawer p {
|
|
4412
|
-
padding-left: 12px;
|
|
4413
4450
|
position: relative;
|
|
4414
4451
|
margin-bottom: var(--zaui-space-size-md, 16px);
|
|
4452
|
+
padding-left: 12px;
|
|
4415
4453
|
font-size: var(--zaui-font-size, 14px);
|
|
4416
4454
|
}
|
|
4417
4455
|
.pro-theme-prd-tools-drawer p:before {
|
|
4418
|
-
content: '';
|
|
4419
4456
|
position: absolute;
|
|
4420
|
-
left: 0;
|
|
4421
4457
|
top: 4px;
|
|
4458
|
+
left: 0;
|
|
4422
4459
|
width: 4px;
|
|
4423
4460
|
height: 14px;
|
|
4424
4461
|
background: var(--zaui-brand, #006aff);
|
|
4425
4462
|
border-radius: var(zaui-border-radius-card, 4px);
|
|
4463
|
+
content: '';
|
|
4426
4464
|
}
|
|
4427
4465
|
.pro-theme-prd-tools-drawer .pro-theme-color {
|
|
4428
4466
|
display: -webkit-box;
|
|
@@ -4431,25 +4469,25 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4431
4469
|
display: flex;
|
|
4432
4470
|
}
|
|
4433
4471
|
.pro-theme-prd-tools-drawer .pro-theme-color li {
|
|
4434
|
-
width: 38px;
|
|
4435
|
-
height: 38px;
|
|
4436
|
-
border-radius: 50%;
|
|
4437
|
-
background: #fff;
|
|
4438
4472
|
display: -webkit-box;
|
|
4439
4473
|
display: -webkit-flex;
|
|
4440
4474
|
display: -ms-flexbox;
|
|
4441
4475
|
display: flex;
|
|
4442
|
-
-webkit-box-pack: center;
|
|
4443
|
-
-webkit-justify-content: center;
|
|
4444
|
-
-ms-flex-pack: center;
|
|
4445
|
-
justify-content: center;
|
|
4446
4476
|
-webkit-box-align: center;
|
|
4447
4477
|
-webkit-align-items: center;
|
|
4448
4478
|
-ms-flex-align: center;
|
|
4449
4479
|
align-items: center;
|
|
4450
|
-
|
|
4451
|
-
|
|
4480
|
+
-webkit-box-pack: center;
|
|
4481
|
+
-webkit-justify-content: center;
|
|
4482
|
+
-ms-flex-pack: center;
|
|
4483
|
+
justify-content: center;
|
|
4484
|
+
width: 38px;
|
|
4485
|
+
height: 38px;
|
|
4452
4486
|
margin-right: 34px;
|
|
4487
|
+
color: #fff;
|
|
4488
|
+
background: #fff;
|
|
4489
|
+
border: 6px solid #fff;
|
|
4490
|
+
border-radius: 50%;
|
|
4453
4491
|
}
|
|
4454
4492
|
.pro-theme-prd-tools-drawer .pro-theme-color li span {
|
|
4455
4493
|
font-size: var(--zaui-font-size, 14px);
|
|
@@ -4477,35 +4515,42 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
|
4477
4515
|
border-color: #ffecdd;
|
|
4478
4516
|
}
|
|
4479
4517
|
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(4) {
|
|
4480
|
-
margin-right: 0;
|
|
4481
4518
|
background: #a00f20;
|
|
4482
4519
|
}
|
|
4483
4520
|
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(4).active,
|
|
4484
4521
|
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(4):hover {
|
|
4485
4522
|
border-color: #f2dbdb;
|
|
4486
4523
|
}
|
|
4524
|
+
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(5) {
|
|
4525
|
+
margin-right: 0;
|
|
4526
|
+
background: #31af96;
|
|
4527
|
+
}
|
|
4528
|
+
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(5).active,
|
|
4529
|
+
.pro-theme-prd-tools-drawer .pro-theme-color li:nth-child(5):hover {
|
|
4530
|
+
border-color: #f2dbdb;
|
|
4531
|
+
}
|
|
4487
4532
|
.pro-theme-prd-tools-drawer .anticon-question-circle {
|
|
4488
4533
|
color: var(--zaui-brand, #006aff);
|
|
4489
4534
|
}
|
|
4490
4535
|
.pro-theme-prd-tools-drawer .copy-btn {
|
|
4491
4536
|
position: absolute;
|
|
4492
|
-
width: calc(100% - 64px);
|
|
4493
4537
|
bottom: 20px;
|
|
4494
4538
|
left: 32px;
|
|
4495
4539
|
z-index: 10;
|
|
4540
|
+
width: calc(100% - 64px);
|
|
4496
4541
|
}
|
|
4497
4542
|
.pro-theme-prd-tools-drawer .pro-theme-tools-box {
|
|
4498
4543
|
display: -webkit-box;
|
|
4499
4544
|
display: -webkit-flex;
|
|
4500
4545
|
display: -ms-flexbox;
|
|
4501
4546
|
display: flex;
|
|
4547
|
+
-webkit-flex-wrap: wrap;
|
|
4548
|
+
-ms-flex-wrap: wrap;
|
|
4549
|
+
flex-wrap: wrap;
|
|
4502
4550
|
-webkit-box-pack: justify;
|
|
4503
4551
|
-webkit-justify-content: space-between;
|
|
4504
4552
|
-ms-flex-pack: justify;
|
|
4505
4553
|
justify-content: space-between;
|
|
4506
|
-
-webkit-flex-wrap: wrap;
|
|
4507
|
-
-ms-flex-wrap: wrap;
|
|
4508
|
-
flex-wrap: wrap;
|
|
4509
4554
|
}
|
|
4510
4555
|
.pro-theme-prd-tools-drawer .pro-theme-tools-space {
|
|
4511
4556
|
margin-bottom: 24px;
|
|
@@ -53,9 +53,6 @@ var reducer = function reducer(state, action) {
|
|
|
53
53
|
case 'setWithLocal':
|
|
54
54
|
{
|
|
55
55
|
var _state = merge({}, state, action.payload);
|
|
56
|
-
var localConfigStr = localStorage.getItem('localConfig');
|
|
57
|
-
var localConfig = JSON.parse(localConfigStr || '{}');
|
|
58
|
-
localStorage.setItem('localConfig', JSON.stringify(merge(localConfig, action.payload)));
|
|
59
56
|
return _state;
|
|
60
57
|
}
|
|
61
58
|
case 'setProEnum':
|
|
@@ -74,7 +74,8 @@ var RenderField = function RenderField(_ref) {
|
|
|
74
74
|
originalValues = config.originalValues,
|
|
75
75
|
formNamePath = config.namePath,
|
|
76
76
|
_config$originalDiffT = config.originalDiffTip,
|
|
77
|
-
originalDiffTip = _config$originalDiffT === void 0 ? true : _config$originalDiffT
|
|
77
|
+
originalDiffTip = _config$originalDiffT === void 0 ? true : _config$originalDiffT,
|
|
78
|
+
rowDisabled = config.rowDisabled;
|
|
78
79
|
var _fieldProps = fieldProps || formItemProps || {};
|
|
79
80
|
var _rules = rules || [];
|
|
80
81
|
var _required = required;
|
|
@@ -99,7 +100,7 @@ var RenderField = function RenderField(_ref) {
|
|
|
99
100
|
isEditable = isEditable(currentValue, rowData, options);
|
|
100
101
|
}
|
|
101
102
|
// 是否只读文本
|
|
102
|
-
var isView = !isEditable || (record === null || record === void 0 ? void 0 : record['is-view']) || config.isView || virtualKey && !isEditing;
|
|
103
|
+
var isView = !isEditable || (record === null || record === void 0 ? void 0 : record['is-view']) || config.isView || virtualKey && !isEditing || (rowDisabled === null || rowDisabled === void 0 ? void 0 : rowDisabled(record));
|
|
103
104
|
// 只读文本时,采用当前formItem的name,单行编辑时,使用生成的虚拟的name
|
|
104
105
|
var baseName = isView ? name : namePath;
|
|
105
106
|
var TargetComponent;
|
package/es/ProEditTable/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
11
11
|
import "antd/es/form/style";
|
|
12
12
|
import _Form from "antd/es/form";
|
|
13
13
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
14
|
-
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey"];
|
|
14
|
+
var _excluded = ["value", "onChange", "className", "columns", "type", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "originalValues", "originalDiffTip", "rowKey", "rowDisabled"];
|
|
15
15
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
16
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
17
17
|
import { get, isArray } from 'lodash';
|
|
@@ -51,6 +51,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
51
51
|
originalValues = _ref.originalValues,
|
|
52
52
|
originalDiffTip = _ref.originalDiffTip,
|
|
53
53
|
rowKey = _ref.rowKey,
|
|
54
|
+
rowDisabled = _ref.rowDisabled,
|
|
54
55
|
resetProps = _objectWithoutProperties(_ref, _excluded);
|
|
55
56
|
// 上下文form
|
|
56
57
|
var contentForm = _Form.useFormInstance();
|
|
@@ -159,7 +160,8 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
159
160
|
page: page,
|
|
160
161
|
originalValues: originalValues,
|
|
161
162
|
originalDiffTip: originalDiffTip,
|
|
162
|
-
prefixCls: prefixCls
|
|
163
|
+
prefixCls: prefixCls,
|
|
164
|
+
rowDisabled: rowDisabled
|
|
163
165
|
};
|
|
164
166
|
// 编辑行设置下样式
|
|
165
167
|
var _rowClassName = function _rowClassName(record) {
|
|
@@ -180,6 +182,15 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
|
180
182
|
selectedRowKeys: selectedRowKeys,
|
|
181
183
|
selectedRows: selectedRows
|
|
182
184
|
});
|
|
185
|
+
},
|
|
186
|
+
getCheckboxProps: function getCheckboxProps(record) {
|
|
187
|
+
if (rowDisabled) {
|
|
188
|
+
var _disabled = rowDisabled(record);
|
|
189
|
+
return {
|
|
190
|
+
disabled: _disabled
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
return {};
|
|
183
194
|
}
|
|
184
195
|
}, rowSelection);
|
|
185
196
|
// 判断是否禁止添加、批量删除
|
|
@@ -32,7 +32,8 @@ var getActionColumn = function getActionColumn(config) {
|
|
|
32
32
|
validateKeys = config.validateKeys,
|
|
33
33
|
actionWidth = config.actionWidth,
|
|
34
34
|
actionProps = config.actionProps,
|
|
35
|
-
page = config.page
|
|
35
|
+
page = config.page,
|
|
36
|
+
rowDisabled = config.rowDisabled;
|
|
36
37
|
var pageNum = tools.calc(page.pageNum, '-', 1);
|
|
37
38
|
var firstIndex = tools.calc(pageNum, '*', page.pageSize);
|
|
38
39
|
// actionProps配置为false 默认不插入
|
|
@@ -184,6 +185,11 @@ var getActionColumn = function getActionColumn(config) {
|
|
|
184
185
|
fixed: 'right',
|
|
185
186
|
width: actionWidth || (virtualKey ? '120px' : '60px'),
|
|
186
187
|
render: function render(text, record, index) {
|
|
188
|
+
var _rowDisabled;
|
|
189
|
+
var _disabled = (_rowDisabled = rowDisabled === null || rowDisabled === void 0 ? void 0 : rowDisabled(record)) !== null && _rowDisabled !== void 0 ? _rowDisabled : false;
|
|
190
|
+
if (_disabled) {
|
|
191
|
+
return '';
|
|
192
|
+
}
|
|
187
193
|
return _jsx(_Space, {
|
|
188
194
|
size: "middle",
|
|
189
195
|
children: actionBtns.map(function (btnConfig) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
3
|
import classNames from 'classnames';
|
|
3
|
-
import { useEffect, useRef } from 'react';
|
|
4
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
5
|
var Group = function Group(props) {
|
|
5
6
|
var value = props.value,
|
|
6
7
|
onChange = props.onChange,
|
|
@@ -10,12 +11,17 @@ var Group = function Group(props) {
|
|
|
10
11
|
disabled = props.disabled,
|
|
11
12
|
_props$allowClear = props.allowClear,
|
|
12
13
|
allowClear = _props$allowClear === void 0 ? true : _props$allowClear;
|
|
14
|
+
var _useState = useState(false),
|
|
15
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
16
|
+
refresh = _useState2[0],
|
|
17
|
+
setRefresh = _useState2[1];
|
|
13
18
|
var idx = useRef(-1);
|
|
14
19
|
useEffect(function () {
|
|
15
20
|
var index = dataSource.findIndex(function (item) {
|
|
16
21
|
return item[fieldValue] === value;
|
|
17
22
|
});
|
|
18
23
|
idx.current = index;
|
|
24
|
+
setRefresh(!refresh);
|
|
19
25
|
}, [value]);
|
|
20
26
|
var handleClick = function handleClick(val, index) {
|
|
21
27
|
if (value === val) {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
&-group-root-disabled {
|
|
11
11
|
color: rgba(0, 0, 0, 0.25);
|
|
12
|
-
.pro-enum-group-item{
|
|
12
|
+
.pro-enum-group-item {
|
|
13
13
|
cursor: not-allowed !important;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -52,8 +52,9 @@
|
|
|
52
52
|
&::after {
|
|
53
53
|
position: absolute;
|
|
54
54
|
top: var(--zaui-space-size-sm);
|
|
55
|
-
right:
|
|
55
|
+
right: -2px;
|
|
56
56
|
bottom: var(--zaui-space-size-sm);
|
|
57
|
+
z-index: 1;
|
|
57
58
|
width: 1px;
|
|
58
59
|
background: var(--zaui-brand);
|
|
59
60
|
opacity: 0.7;
|
|
@@ -23,7 +23,8 @@ var FormList = function FormList(props, ref) {
|
|
|
23
23
|
mode = _props$mode === void 0 ? 'line' : _props$mode,
|
|
24
24
|
meta = props.meta,
|
|
25
25
|
_props$span = props.span,
|
|
26
|
-
span = _props$span === void 0 ? 8 : _props$span
|
|
26
|
+
span = _props$span === void 0 ? 8 : _props$span,
|
|
27
|
+
disabled = props.disabled;
|
|
27
28
|
var _fields = fields.map(function (item) {
|
|
28
29
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
29
30
|
key: String(item.key)
|
|
@@ -32,8 +33,7 @@ var FormList = function FormList(props, ref) {
|
|
|
32
33
|
var _ref = ProForm.useFieldProps() || {},
|
|
33
34
|
form = _ref.form,
|
|
34
35
|
name = _ref.name,
|
|
35
|
-
isView = _ref.isView
|
|
36
|
-
disabled = _ref.disabled;
|
|
36
|
+
isView = _ref.isView;
|
|
37
37
|
var errors = meta.errors;
|
|
38
38
|
var _namePath = toArray(name);
|
|
39
39
|
var processColumns = useCallback(function (fieldName, namePath) {
|
|
@@ -89,7 +89,7 @@ var FormList = function FormList(props, ref) {
|
|
|
89
89
|
var _columns = processColumns(index, namePath);
|
|
90
90
|
return mode === 'block' ? _jsx(BlockFields, _objectSpread(_objectSpread({}, props), {}, {
|
|
91
91
|
columns: _columns,
|
|
92
|
-
disabled: disabled
|
|
92
|
+
disabled: disabled,
|
|
93
93
|
isView: isView,
|
|
94
94
|
namePath: namePath,
|
|
95
95
|
index: index,
|
|
@@ -103,7 +103,7 @@ var FormList = function FormList(props, ref) {
|
|
|
103
103
|
}, props), {}, {
|
|
104
104
|
mode: mode,
|
|
105
105
|
columns: _columns,
|
|
106
|
-
disabled: disabled
|
|
106
|
+
disabled: disabled,
|
|
107
107
|
isView: isView,
|
|
108
108
|
namePath: namePath,
|
|
109
109
|
index: index,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
type: string;
|
|
4
|
+
component: React.ReactElement;
|
|
5
|
+
value: any;
|
|
6
|
+
onChange: any;
|
|
7
|
+
disabled: any;
|
|
8
|
+
confirm: any;
|
|
9
|
+
fieldProps: any;
|
|
10
|
+
contextProps: any;
|
|
11
|
+
}
|
|
12
|
+
/** 渲染组件 */
|
|
13
|
+
declare const ComRender: React.FC<Props>;
|
|
14
|
+
export default ComRender;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["type", "confirm", "component", "fieldProps", "contextProps"];
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import ConfirmWrapper from '@/ProForm/components/render/ConfirmWrapper';
|
|
7
|
+
import { FieldProvider } from '@/ProForm/utils/useFieldProps';
|
|
8
|
+
import * as componentMap from '../../../../../index';
|
|
9
|
+
/** 渲染组件 */
|
|
10
|
+
var ComRender = function ComRender(props) {
|
|
11
|
+
var type = props.type,
|
|
12
|
+
confirm = props.confirm,
|
|
13
|
+
component = props.component,
|
|
14
|
+
fieldProps = props.fieldProps,
|
|
15
|
+
contextProps = props.contextProps,
|
|
16
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
17
|
+
var TypeComponent = componentMap[type];
|
|
18
|
+
var componentProps = _objectSpread(_objectSpread({}, fieldProps), rest);
|
|
19
|
+
var Component;
|
|
20
|
+
if (confirm) {
|
|
21
|
+
Component = _jsx(ConfirmWrapper, _objectSpread(_objectSpread({
|
|
22
|
+
confirm: confirm
|
|
23
|
+
}, componentProps), {}, {
|
|
24
|
+
children: component || _jsx(TypeComponent, _objectSpread({}, componentProps))
|
|
25
|
+
}));
|
|
26
|
+
} else {
|
|
27
|
+
Component = component ? ( /*#__PURE__*/React.cloneElement(component, _objectSpread({}, componentProps))) : _jsx(TypeComponent, _objectSpread({}, componentProps));
|
|
28
|
+
}
|
|
29
|
+
return _jsx(FieldProvider, {
|
|
30
|
+
value: _objectSpread(_objectSpread({}, contextProps), {}, {
|
|
31
|
+
type: type
|
|
32
|
+
}),
|
|
33
|
+
children: Component
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export default ComRender;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GroupProps } from './propsType';
|
|
3
|
+
/**
|
|
4
|
+
* 1. 外层过滤FormItem相关属性, 但是子元素上的 required [disabled] [show] rules [fieldProps] [component] 需要取到并
|
|
5
|
+
* 2.
|
|
6
|
+
*
|
|
7
|
+
* render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
|
|
8
|
+
*/
|
|
9
|
+
declare const GroupCopy: React.FC<GroupProps>;
|
|
10
|
+
export default GroupCopy;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import "antd/es/space/style";
|
|
3
|
+
import _Space from "antd/es/space";
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
|
+
import { omit } from 'lodash';
|
|
9
|
+
import classnames from 'classnames';
|
|
10
|
+
import { insertSeparator, transformColumns } from './utils';
|
|
11
|
+
import ProForm from '../../../../ProForm';
|
|
12
|
+
import ComRender from './component/ComRender';
|
|
13
|
+
/**
|
|
14
|
+
* 1. 外层过滤FormItem相关属性, 但是子元素上的 required [disabled] [show] rules [fieldProps] [component] 需要取到并
|
|
15
|
+
* 2.
|
|
16
|
+
*
|
|
17
|
+
* render内部能力 show, component, value, onChange, disabled, clearNotShow, fieldProps
|
|
18
|
+
*/
|
|
19
|
+
var GroupCopy = function GroupCopy(props) {
|
|
20
|
+
var children = props.children,
|
|
21
|
+
className = props.className,
|
|
22
|
+
_props$space = props.space,
|
|
23
|
+
space = _props$space === void 0 ? {
|
|
24
|
+
size: 12
|
|
25
|
+
} : _props$space,
|
|
26
|
+
value = props.value,
|
|
27
|
+
onChange = props.onChange;
|
|
28
|
+
var contextProps = ProForm.useFieldProps() || {};
|
|
29
|
+
var names = contextProps.names,
|
|
30
|
+
name = contextProps.name,
|
|
31
|
+
form = contextProps.form,
|
|
32
|
+
namePath = contextProps.namePath,
|
|
33
|
+
index = contextProps.index;
|
|
34
|
+
var _value = value && _toConsumableArray(value) || [];
|
|
35
|
+
var _option = React.useRef([]);
|
|
36
|
+
// 组合onChange
|
|
37
|
+
var handleChange = function handleChange(value, option, index) {
|
|
38
|
+
_value[index] = value;
|
|
39
|
+
_option.current[index] = option;
|
|
40
|
+
onChange(_value, _option.current);
|
|
41
|
+
};
|
|
42
|
+
var columns = useMemo(function () {
|
|
43
|
+
var columnsProps = transformColumns({
|
|
44
|
+
columns: children,
|
|
45
|
+
name: name,
|
|
46
|
+
names: names,
|
|
47
|
+
onChange: handleChange,
|
|
48
|
+
namePath: namePath,
|
|
49
|
+
form: form,
|
|
50
|
+
index: index,
|
|
51
|
+
value: _value
|
|
52
|
+
});
|
|
53
|
+
return insertSeparator(columnsProps, space);
|
|
54
|
+
}, [name, value, children, space, names, namePath, index]);
|
|
55
|
+
var _className = classnames(_defineProperty({
|
|
56
|
+
'pro-group': true,
|
|
57
|
+
'pro-group-diy-width': columns.some(function (item) {
|
|
58
|
+
var _item$fieldProps, _item$fieldProps$styl;
|
|
59
|
+
return item === null || item === void 0 ? void 0 : (_item$fieldProps = item.fieldProps) === null || _item$fieldProps === void 0 ? void 0 : (_item$fieldProps$styl = _item$fieldProps.style) === null || _item$fieldProps$styl === void 0 ? void 0 : _item$fieldProps$styl.width;
|
|
60
|
+
}),
|
|
61
|
+
'pro-group-width-auto': columns.some(function (item) {
|
|
62
|
+
return ['Radio', 'Checkbox', 'Switch'].includes(item.type);
|
|
63
|
+
})
|
|
64
|
+
}, "".concat(className), className));
|
|
65
|
+
return _jsx("div", {
|
|
66
|
+
className: _className,
|
|
67
|
+
children: space.compact || (space === null || space === void 0 ? void 0 : space.separator) ? _jsx(_Space.Compact, {
|
|
68
|
+
children: columns.map(function (column) {
|
|
69
|
+
return _jsx(ComRender, _objectSpread({
|
|
70
|
+
contextProps: contextProps
|
|
71
|
+
}, column));
|
|
72
|
+
})
|
|
73
|
+
}) : _jsx(_Space, _objectSpread(_objectSpread({
|
|
74
|
+
align: "start"
|
|
75
|
+
}, omit(space, ['separator', 'compact'])), {}, {
|
|
76
|
+
children: columns.map(function (column, index) {
|
|
77
|
+
return _jsx(ComRender, _objectSpread({
|
|
78
|
+
contextProps: contextProps
|
|
79
|
+
}, column));
|
|
80
|
+
})
|
|
81
|
+
}))
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
export default GroupCopy;
|