jrs-react 1.2.47 → 1.2.48
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/build/index.es.js +119 -118
- package/build/index.js +119 -118
- package/package.json +60 -60
- package/src/components/JRFields/JRFields.jsx +1 -0
- package/src/components/JRFrame/Slider.jsx +8 -0
- package/src/components/JRSubmit.jsx +266 -265
- package/src/components/JRWindow/JRWindow.jsx +115 -108
- package/src/components/JRWindow/TitleBar.jsx +2 -4
package/build/index.js
CHANGED
|
@@ -3821,6 +3821,7 @@ class JRSubmit extends React__default["default"].Component {
|
|
|
3821
3821
|
extraValue,
|
|
3822
3822
|
sendValue,
|
|
3823
3823
|
transformValue,
|
|
3824
|
+
responseType = 'json',
|
|
3824
3825
|
...params
|
|
3825
3826
|
}) {
|
|
3826
3827
|
const _extraValue = extraValue?.bind?.(this)() ?? extraValue;
|
|
@@ -3854,7 +3855,9 @@ class JRSubmit extends React__default["default"].Component {
|
|
|
3854
3855
|
const headers = {
|
|
3855
3856
|
authorization: `Bearer ${localStorage.getItem("accessToken")}`
|
|
3856
3857
|
};
|
|
3857
|
-
let params1 = {
|
|
3858
|
+
let params1 = {
|
|
3859
|
+
responseType
|
|
3860
|
+
};
|
|
3858
3861
|
const params2 = {};
|
|
3859
3862
|
if (method == 'get') {
|
|
3860
3863
|
if (sendValue == null || sendValue) params1.params = payload;
|
|
@@ -3991,19 +3994,23 @@ class Slider$2 extends React__default["default"].Component {
|
|
|
3991
3994
|
const ref = this.props.contenerRef.current;
|
|
3992
3995
|
let width = this.frame.x2 - clientX - this.frame.shw;
|
|
3993
3996
|
if (width < 0) width = 0;
|
|
3997
|
+
po('width', width);
|
|
3994
3998
|
ref.style.flexBasis = `${width}px`;
|
|
3995
3999
|
},
|
|
3996
4000
|
top: ({
|
|
3997
4001
|
clientY
|
|
3998
4002
|
}) => {
|
|
4003
|
+
po('top');
|
|
3999
4004
|
const ref = this.props.contenerRef.current;
|
|
4000
4005
|
let height = clientY - this.frame.y - this.frame.shh;
|
|
4006
|
+
po('height', height);
|
|
4001
4007
|
// if(width<0)width=0
|
|
4002
4008
|
ref.style.flexBasis = `${height}px`;
|
|
4003
4009
|
},
|
|
4004
4010
|
bottom: ({
|
|
4005
4011
|
clientY
|
|
4006
4012
|
}) => {
|
|
4013
|
+
po('bottom');
|
|
4007
4014
|
const ref = this.props.contenerRef.current;
|
|
4008
4015
|
let height = this.frame.w2 - clientY - this.frame.shh;
|
|
4009
4016
|
// clientY-this.frame.y-this.frame.shh
|
|
@@ -4013,6 +4020,7 @@ class Slider$2 extends React__default["default"].Component {
|
|
|
4013
4020
|
}
|
|
4014
4021
|
};
|
|
4015
4022
|
stop = e => {
|
|
4023
|
+
po('stop', this.stop);
|
|
4016
4024
|
document.body.style.cursor = 'default';
|
|
4017
4025
|
window.removeEventListener('mousemove', this.move);
|
|
4018
4026
|
window.removeEventListener('mouseup', this.stop);
|
|
@@ -4023,6 +4031,7 @@ class Slider$2 extends React__default["default"].Component {
|
|
|
4023
4031
|
start = ({
|
|
4024
4032
|
clientX
|
|
4025
4033
|
}) => {
|
|
4034
|
+
console.clear();
|
|
4026
4035
|
const ref = this.props.contenerRef.current;
|
|
4027
4036
|
const {
|
|
4028
4037
|
x,
|
|
@@ -4031,6 +4040,8 @@ class Slider$2 extends React__default["default"].Component {
|
|
|
4031
4040
|
height,
|
|
4032
4041
|
...other
|
|
4033
4042
|
} = ref.getBoundingClientRect();
|
|
4043
|
+
po('other', ref.getBoundingClientRect());
|
|
4044
|
+
po('ref.getBoundingClientRect()', this.ref.current.getBoundingClientRect());
|
|
4034
4045
|
const {
|
|
4035
4046
|
width: sw,
|
|
4036
4047
|
height: sh
|
|
@@ -4228,20 +4239,10 @@ class JRFrame extends JRSubmit {
|
|
|
4228
4239
|
}
|
|
4229
4240
|
}
|
|
4230
4241
|
|
|
4231
|
-
function _extends$1() {
|
|
4232
|
-
return _extends$1 = Object.assign ? Object.assign.bind() : function (n) {
|
|
4233
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
4234
|
-
var t = arguments[e];
|
|
4235
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
4236
|
-
}
|
|
4237
|
-
return n;
|
|
4238
|
-
}, _extends$1.apply(null, arguments);
|
|
4239
|
-
}
|
|
4240
|
-
|
|
4241
4242
|
var _path;
|
|
4242
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4243
|
+
function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
|
|
4243
4244
|
var SvgX = function SvgX(props) {
|
|
4244
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
4245
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
4245
4246
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4246
4247
|
width: 24,
|
|
4247
4248
|
height: 24,
|
|
@@ -4470,8 +4471,6 @@ class TitleBar extends React__default["default"].Component {
|
|
|
4470
4471
|
window.removeEventListener('mousemove', this.preMove);
|
|
4471
4472
|
};
|
|
4472
4473
|
start(e) {
|
|
4473
|
-
po('start', this);
|
|
4474
|
-
po('this.props.windowRef', this.props.windowRef);
|
|
4475
4474
|
e.preventDefault();
|
|
4476
4475
|
this.moved = false;
|
|
4477
4476
|
this.pos3 = e.clientX;
|
|
@@ -4496,7 +4495,7 @@ class TitleBar extends React__default["default"].Component {
|
|
|
4496
4495
|
config: this.props.title ?? '',
|
|
4497
4496
|
me: this.props.window,
|
|
4498
4497
|
className: 'title'
|
|
4499
|
-
}), /*#__PURE__*/React__default["default"].createElement("nav", null, this.props.
|
|
4498
|
+
}), /*#__PURE__*/React__default["default"].createElement("nav", null, this.props.window.props.setOpen ? /*#__PURE__*/React__default["default"].createElement(JRButton, {
|
|
4500
4499
|
icon: /*#__PURE__*/React__default["default"].createElement(SvgX, null),
|
|
4501
4500
|
className: 'danger',
|
|
4502
4501
|
onClick: e => {
|
|
@@ -4504,7 +4503,7 @@ class TitleBar extends React__default["default"].Component {
|
|
|
4504
4503
|
if (this.props.window.orgBodyOverflow != null) {
|
|
4505
4504
|
document.body.style.overflow = this.props.window.orgBodyOverflow;
|
|
4506
4505
|
}
|
|
4507
|
-
this.props.
|
|
4506
|
+
this.props.window.props.setOpen(false);
|
|
4508
4507
|
},
|
|
4509
4508
|
onMouseDown: e => {
|
|
4510
4509
|
e.stopPropagation();
|
|
@@ -4980,49 +4979,99 @@ class Backdrop extends JRHTML {
|
|
|
4980
4979
|
left: 0
|
|
4981
4980
|
}
|
|
4982
4981
|
};
|
|
4983
|
-
constructor({
|
|
4984
|
-
zIndex,
|
|
4985
|
-
fullScreen,
|
|
4986
|
-
...params
|
|
4987
|
-
}) {
|
|
4982
|
+
constructor(params) {
|
|
4988
4983
|
super(params);
|
|
4989
|
-
this.backdropConfig.style.zIndex = zIndex;
|
|
4990
|
-
this.backdropConfig.personajes = {
|
|
4991
|
-
id: params.backdropId
|
|
4992
|
-
};
|
|
4993
4984
|
Object.assign(this.backdropConfig.style, params.backdropStyle);
|
|
4994
4985
|
}
|
|
4995
4986
|
show() {
|
|
4996
|
-
this.agregarHijo(this.backdropConfig);
|
|
4987
|
+
this.backdrop = this.agregarHijo(this.backdropConfig);
|
|
4997
4988
|
}
|
|
4998
4989
|
hide() {
|
|
4999
|
-
|
|
5000
|
-
if (backdrop) {
|
|
5001
|
-
backdrop.parentNode.removeChild(backdrop);
|
|
5002
|
-
}
|
|
4990
|
+
this.yo.removeChild(this.yo.children[this.yo.children.length - 1]);
|
|
5003
4991
|
this.hijos = [];
|
|
5004
4992
|
}
|
|
5005
4993
|
}
|
|
5006
|
-
class
|
|
4994
|
+
class JRWindow extends JRFrame {
|
|
4995
|
+
// x=0
|
|
4996
|
+
// y=0
|
|
4997
|
+
// width=300
|
|
4998
|
+
// height=300
|
|
5007
4999
|
padding = 1;
|
|
5008
5000
|
thick = 5;
|
|
5009
5001
|
constructor(props) {
|
|
5010
5002
|
super(props);
|
|
5003
|
+
this.ref = /*#__PURE__*/React__default["default"].createRef();
|
|
5011
5004
|
this.titleBarRef = /*#__PURE__*/React__default["default"].createRef();
|
|
5012
5005
|
}
|
|
5006
|
+
createBackdrop() {
|
|
5007
|
+
if (typeof this.props.backdrop === 'string') {
|
|
5008
|
+
const target = document.getElementById(this.props.backdrop);
|
|
5009
|
+
if (target) {
|
|
5010
|
+
this.backdropTarget = new Backdrop({
|
|
5011
|
+
yo: target,
|
|
5012
|
+
style: {
|
|
5013
|
+
position: 'relative'
|
|
5014
|
+
},
|
|
5015
|
+
backdropStyle: this.props.backdropStyle
|
|
5016
|
+
});
|
|
5017
|
+
}
|
|
5018
|
+
}
|
|
5019
|
+
}
|
|
5020
|
+
addMaskToTarget = target => {
|
|
5021
|
+
this.mask = document.createElement('div');
|
|
5022
|
+
this.mask.style.background = '#868686cc';
|
|
5023
|
+
this.mask.style.position = 'absolute';
|
|
5024
|
+
this.mask.style.top = '0';
|
|
5025
|
+
this.mask.style.left = '0';
|
|
5026
|
+
this.mask.style.right = '0';
|
|
5027
|
+
this.mask.style.bottom = '0';
|
|
5028
|
+
this.mask.style.borderRadius = 'inherit';
|
|
5029
|
+
this.mask.style.height = '10000px';
|
|
5030
|
+
this.mask.style.width = '10000px';
|
|
5031
|
+
target.appendChild(this.mask);
|
|
5032
|
+
};
|
|
5033
|
+
removeMaskFromTarget = () => {
|
|
5034
|
+
this.mask.remove();
|
|
5035
|
+
};
|
|
5036
|
+
|
|
5037
|
+
// backdropOn(on){
|
|
5038
|
+
// const target=(typeof this.props.backdrop)==='object'
|
|
5039
|
+
// ?this.props.backdrop
|
|
5040
|
+
// :typeof this.props.backdrop ==='string'
|
|
5041
|
+
// ?document.getElementById(this.props.backdrop)
|
|
5042
|
+
// :document.body
|
|
5043
|
+
// target?.classList[on?'add':'remove']('withMask')
|
|
5044
|
+
// }
|
|
5045
|
+
|
|
5013
5046
|
componentDidMount() {
|
|
5047
|
+
super.componentDidMount();
|
|
5048
|
+
this.createBackdrop();
|
|
5014
5049
|
if (this.props.open) {
|
|
5015
|
-
this.
|
|
5016
|
-
this.props.onOpen?.bind(this.props.jrWindow)();
|
|
5050
|
+
this.open();
|
|
5017
5051
|
}
|
|
5018
5052
|
}
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5053
|
+
open() {
|
|
5054
|
+
this.backdropTarget?.show();
|
|
5055
|
+
this.props.onOpen?.bind(this)();
|
|
5056
|
+
}
|
|
5057
|
+
close() {
|
|
5058
|
+
this.backdropTarget?.hide();
|
|
5059
|
+
this.props.onClose?.bind(this)();
|
|
5060
|
+
}
|
|
5061
|
+
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
5062
|
+
if (this.props.popup === true) {
|
|
5063
|
+
if (this.props.open && prevProps.open === false) {
|
|
5064
|
+
this.open();
|
|
5065
|
+
} else if (this.props.open === false && prevProps.open) {
|
|
5066
|
+
this.close();
|
|
5067
|
+
}
|
|
5068
|
+
// if(this.props.backdrop && this.props.open!=prevProps.open){
|
|
5069
|
+
// this.backdropOn(this.props.open)
|
|
5070
|
+
// }
|
|
5022
5071
|
}
|
|
5023
5072
|
}
|
|
5024
5073
|
get xw() {
|
|
5025
|
-
let width
|
|
5074
|
+
let width;
|
|
5026
5075
|
if (this.props.width?.indexOf?.('%') > -1) {
|
|
5027
5076
|
width = this.props.width.split('%')[0] * window.innerWidth / 100;
|
|
5028
5077
|
} else {
|
|
@@ -5034,7 +5083,7 @@ class RWindow extends React__default["default"].Component {
|
|
|
5034
5083
|
};
|
|
5035
5084
|
}
|
|
5036
5085
|
get yh() {
|
|
5037
|
-
let height
|
|
5086
|
+
let height;
|
|
5038
5087
|
if (this.props.height?.indexOf?.('%') > -1) {
|
|
5039
5088
|
height = this.props.height.split('%')[0] * window.innerHeight / 100;
|
|
5040
5089
|
} else {
|
|
@@ -5045,93 +5094,34 @@ class RWindow extends React__default["default"].Component {
|
|
|
5045
5094
|
height
|
|
5046
5095
|
};
|
|
5047
5096
|
}
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
jrWindow,
|
|
5054
|
-
...props
|
|
5055
|
-
} = this.props;
|
|
5056
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledJRWindow, {
|
|
5057
|
-
$zIndex: this.props.zIndex ? this.props.zIndex + 1 : null,
|
|
5097
|
+
renderer() {
|
|
5098
|
+
return this.props.popup === true ? this.props.open ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(StyledJRWindow, {
|
|
5099
|
+
$zIndex: this.props.zIndex,
|
|
5100
|
+
rule: 'dialog',
|
|
5101
|
+
ref: this.ref,
|
|
5058
5102
|
className: `jr-window ${this.props.className ?? ''}`,
|
|
5059
|
-
ref: this.props.windowRef,
|
|
5060
5103
|
$xw: this.xw,
|
|
5061
5104
|
$yh: this.yh,
|
|
5062
5105
|
$thick: this.thick
|
|
5063
5106
|
}, /*#__PURE__*/React__default["default"].createElement("main", {
|
|
5064
5107
|
style: {
|
|
5065
|
-
zIndex:
|
|
5108
|
+
zIndex: 1
|
|
5066
5109
|
}
|
|
5067
5110
|
}, /*#__PURE__*/React__default["default"].createElement(TitleBar, {
|
|
5068
5111
|
titleBarRef: this.titleBarRef,
|
|
5069
|
-
|
|
5070
|
-
windowRef: this.props.windowRef,
|
|
5112
|
+
windowRef: this.ref,
|
|
5071
5113
|
window: this,
|
|
5072
|
-
title: title,
|
|
5114
|
+
title: this.props.title,
|
|
5073
5115
|
thick: this.thick,
|
|
5074
|
-
resizable: resizable
|
|
5075
|
-
}),
|
|
5116
|
+
resizable: this.props.resizable
|
|
5117
|
+
}), /*#__PURE__*/React__default["default"].createElement("main", null, super.renderer()), this.props.resizable !== false && /*#__PURE__*/React__default["default"].createElement(Sliders, {
|
|
5076
5118
|
thick: this.thick,
|
|
5077
|
-
windowRef: this.
|
|
5119
|
+
windowRef: this.ref,
|
|
5078
5120
|
window: this,
|
|
5079
5121
|
titleBarRef: this.titleBarRef
|
|
5080
|
-
})), this.props.backdrop
|
|
5122
|
+
})), this.props.backdrop !== false && typeof this.props.backdrop !== 'string' && /*#__PURE__*/React__default["default"].createElement(StyledBackdrop, {
|
|
5081
5123
|
$zIndex: this.props.zIndex
|
|
5082
|
-
}));
|
|
5083
|
-
}
|
|
5084
|
-
}
|
|
5085
|
-
class JRWindow extends JRFrame {
|
|
5086
|
-
constructor(props) {
|
|
5087
|
-
super(props);
|
|
5088
|
-
this.windowRef = /*#__PURE__*/React__default["default"].createRef();
|
|
5089
|
-
this.backdropId = `backdropId-${random(10000, 99999)}`;
|
|
5090
|
-
}
|
|
5091
|
-
componentDidMount() {
|
|
5092
|
-
super.componentDidMount();
|
|
5093
|
-
this.createBackdrop();
|
|
5094
|
-
}
|
|
5095
|
-
componentWillUnmount() {
|
|
5096
|
-
if (this.props.open) {
|
|
5097
|
-
this.backdropTarget?.hide();
|
|
5098
|
-
}
|
|
5099
|
-
}
|
|
5100
|
-
componentDidUpdate(prevProps, prevState) {
|
|
5101
|
-
if (prevProps.open && prevProps.open != this.props.open) {
|
|
5102
|
-
this.props.onClose?.bind(this)();
|
|
5103
|
-
}
|
|
5104
|
-
}
|
|
5105
|
-
componentWillUpdate;
|
|
5106
|
-
createBackdrop() {
|
|
5107
|
-
if (typeof this.props.backdrop === 'string') {
|
|
5108
|
-
const target = document.getElementById(this.props.backdrop);
|
|
5109
|
-
if (target) {
|
|
5110
|
-
this.backdropTarget = new Backdrop({
|
|
5111
|
-
yo: target,
|
|
5112
|
-
backdropId: this.backdropId,
|
|
5113
|
-
fullScreen: this.props.backdrop === true,
|
|
5114
|
-
zIndex: this.props.zIndex,
|
|
5115
|
-
backdropStyle: this.props.backdropStyle
|
|
5116
|
-
});
|
|
5117
|
-
if (this.props.open) {
|
|
5118
|
-
this.backdropTarget.show();
|
|
5119
|
-
}
|
|
5120
|
-
}
|
|
5121
|
-
}
|
|
5122
|
-
}
|
|
5123
|
-
renderer() {
|
|
5124
|
-
const {
|
|
5125
|
-
popup,
|
|
5126
|
-
open,
|
|
5127
|
-
xzIndex = 1,
|
|
5128
|
-
...props
|
|
5129
|
-
} = this.props;
|
|
5130
|
-
return popup === true ? open ? /*#__PURE__*/React__default["default"].createElement(RWindow, _extends$1({}, props, {
|
|
5131
|
-
jrWindow: this,
|
|
5132
|
-
open: open,
|
|
5133
|
-
windowRef: this.windowRef
|
|
5134
|
-
}), super.renderer()) : '' : super.renderer();
|
|
5124
|
+
}))) : '' : super.renderer();
|
|
5135
5125
|
}
|
|
5136
5126
|
}
|
|
5137
5127
|
|
|
@@ -5327,6 +5317,16 @@ const TFoot = ({
|
|
|
5327
5317
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("tfoot", null, trs));
|
|
5328
5318
|
};
|
|
5329
5319
|
|
|
5320
|
+
function _extends() {
|
|
5321
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
5322
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
5323
|
+
var t = arguments[e];
|
|
5324
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
5325
|
+
}
|
|
5326
|
+
return n;
|
|
5327
|
+
}, _extends.apply(null, arguments);
|
|
5328
|
+
}
|
|
5329
|
+
|
|
5330
5330
|
styled__default["default"].tbody`
|
|
5331
5331
|
th{
|
|
5332
5332
|
height:4px;
|
|
@@ -5407,7 +5407,7 @@ styled__default["default"].tr`
|
|
|
5407
5407
|
}
|
|
5408
5408
|
`;
|
|
5409
5409
|
const GroupHeader = props => {
|
|
5410
|
-
return /*#__PURE__*/React__default["default"].createElement(GroupColumns, _extends
|
|
5410
|
+
return /*#__PURE__*/React__default["default"].createElement(GroupColumns, _extends({
|
|
5411
5411
|
trClassName: 'jr-group-header'
|
|
5412
5412
|
}, props));
|
|
5413
5413
|
};
|
|
@@ -5418,7 +5418,7 @@ styled__default["default"].tr`
|
|
|
5418
5418
|
}
|
|
5419
5419
|
`;
|
|
5420
5420
|
const GroupFooter = props => {
|
|
5421
|
-
return /*#__PURE__*/React__default["default"].createElement(GroupColumns, _extends
|
|
5421
|
+
return /*#__PURE__*/React__default["default"].createElement(GroupColumns, _extends({
|
|
5422
5422
|
trClassName: 'jr-group-footer'
|
|
5423
5423
|
}, props));
|
|
5424
5424
|
};
|
|
@@ -5537,7 +5537,7 @@ const TBody = ({
|
|
|
5537
5537
|
};
|
|
5538
5538
|
return /*#__PURE__*/React__default["default"].createElement("tbody", {
|
|
5539
5539
|
key: `tbody${tbodyIndex}`
|
|
5540
|
-
}, groupData?.length > 0 && /*#__PURE__*/React__default["default"].createElement(GroupHeader, _extends
|
|
5540
|
+
}, groupData?.length > 0 && /*#__PURE__*/React__default["default"].createElement(GroupHeader, _extends({
|
|
5541
5541
|
groupData: groupData,
|
|
5542
5542
|
columns: groupHeader
|
|
5543
5543
|
}, neededProps)), groupData?.map?.((record, trIndex) => {
|
|
@@ -5551,13 +5551,13 @@ const TBody = ({
|
|
|
5551
5551
|
groupIndex: tbodyIndex
|
|
5552
5552
|
});
|
|
5553
5553
|
}
|
|
5554
|
-
}, /*#__PURE__*/React__default["default"].createElement(Tds, _extends
|
|
5554
|
+
}, /*#__PURE__*/React__default["default"].createElement(Tds, _extends({
|
|
5555
5555
|
record: record,
|
|
5556
5556
|
trIndex: trIndex
|
|
5557
5557
|
}, neededProps, {
|
|
5558
5558
|
leafColumns: leafColumns
|
|
5559
5559
|
})));
|
|
5560
|
-
}), groupData?.length > 0 && /*#__PURE__*/React__default["default"].createElement(GroupFooter, _extends
|
|
5560
|
+
}), groupData?.length > 0 && /*#__PURE__*/React__default["default"].createElement(GroupFooter, _extends({
|
|
5561
5561
|
groupData: groupData,
|
|
5562
5562
|
columns: groupFooter
|
|
5563
5563
|
}, neededProps)));
|
|
@@ -6040,6 +6040,7 @@ class JRFields extends JRWindow {
|
|
|
6040
6040
|
}, validators);
|
|
6041
6041
|
}
|
|
6042
6042
|
validate(value) {
|
|
6043
|
+
console.clear();
|
|
6043
6044
|
const validators = [];
|
|
6044
6045
|
const testValue = this.getTestValue() ?? {};
|
|
6045
6046
|
this.#validators(this.getColumns(), validators, [], testValue, value !== undefined ? value : this.getValue());
|
|
@@ -6525,7 +6526,7 @@ function JRAlertWindow({
|
|
|
6525
6526
|
...props
|
|
6526
6527
|
}) {
|
|
6527
6528
|
const [open, setOpen] = React.useState(true);
|
|
6528
|
-
return /*#__PURE__*/React__default["default"].createElement(StyledAlert, _extends
|
|
6529
|
+
return /*#__PURE__*/React__default["default"].createElement(StyledAlert, _extends({
|
|
6529
6530
|
initValue: {
|
|
6530
6531
|
message
|
|
6531
6532
|
},
|
|
@@ -6564,7 +6565,7 @@ function JRAlert(props) {
|
|
|
6564
6565
|
}
|
|
6565
6566
|
const jrAlerDiv = document.createElement('div');
|
|
6566
6567
|
container.appendChild(jrAlerDiv);
|
|
6567
|
-
client.createRoot(jrAlerDiv).render(/*#__PURE__*/React__default["default"].createElement(JRAlertWindow, _extends
|
|
6568
|
+
client.createRoot(jrAlerDiv).render(/*#__PURE__*/React__default["default"].createElement(JRAlertWindow, _extends({}, props, {
|
|
6568
6569
|
container: jrAlerDiv
|
|
6569
6570
|
})));
|
|
6570
6571
|
}
|
package/package.json
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
2
|
+
"name": "jrs-react",
|
|
3
|
+
"version": "1.2.48",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "build/index.js",
|
|
6
|
+
"module": "build/index.es.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
9
|
+
"build": "rollup -c",
|
|
10
|
+
"storybook": "storybook dev -p 6006",
|
|
11
|
+
"build-storybook": "storybook build",
|
|
12
|
+
"vite": "vite"
|
|
13
|
+
},
|
|
14
|
+
"author": "JorenLai",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
18
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
19
|
+
"@types/react": "^19.0.10",
|
|
20
|
+
"@types/react-dom": "^19.0.4",
|
|
21
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
22
|
+
"antd": "^5.12.5",
|
|
23
|
+
"axios": "^1.6.2",
|
|
24
|
+
"create-react-class": "^15.7.0",
|
|
25
|
+
"globals": "^15.15.0",
|
|
26
|
+
"jrs-js": "^0.0.0",
|
|
27
|
+
"react": "^18.2.0",
|
|
28
|
+
"react-dom": "^18.2.0",
|
|
29
|
+
"react-router-dom": "^7.4.0",
|
|
30
|
+
"styled-components": "^6.1.15",
|
|
31
|
+
"vite": "^6.2.0",
|
|
32
|
+
"vite-plugin-svgr": "^4.3.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"react": "^18.2.0",
|
|
36
|
+
"react-dom": "^18.2.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@babel/core": "^7.26.10",
|
|
40
|
+
"@chromatic-com/storybook": "^3.2.6",
|
|
41
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
42
|
+
"@storybook/addon-essentials": "^8.6.6",
|
|
43
|
+
"@storybook/addon-onboarding": "^8.6.6",
|
|
44
|
+
"@storybook/blocks": "^8.6.6",
|
|
45
|
+
"@storybook/experimental-addon-test": "^8.6.6",
|
|
46
|
+
"@storybook/react": "^8.6.6",
|
|
47
|
+
"@storybook/react-vite": "^8.6.6",
|
|
48
|
+
"@storybook/test": "^8.6.6",
|
|
49
|
+
"@svgr/rollup": "^8.1.0",
|
|
50
|
+
"@vitest/browser": "^3.0.8",
|
|
51
|
+
"@vitest/coverage-v8": "^3.0.8",
|
|
52
|
+
"prop-types": "^15.8.1",
|
|
53
|
+
"rollup": "^2.79.2",
|
|
54
|
+
"rollup-plugin-babel": "^4.4.0",
|
|
55
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
56
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
57
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
58
|
+
"storybook": "^8.6.6",
|
|
59
|
+
"vitest": "^3.0.8"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -276,6 +276,7 @@ export default class JRFields extends JRWindow {
|
|
|
276
276
|
)
|
|
277
277
|
}
|
|
278
278
|
validate(value){
|
|
279
|
+
console.clear()
|
|
279
280
|
const validators=[]
|
|
280
281
|
const testValue=this.getTestValue()??{}
|
|
281
282
|
this.#validators(this.getColumns(),validators,[],testValue,value!==undefined?value:this.getValue())
|
|
@@ -22,15 +22,19 @@ export default class Slider extends React.Component {
|
|
|
22
22
|
const ref=this.props.contenerRef.current
|
|
23
23
|
let width=this.frame.x2-clientX-this.frame.shw
|
|
24
24
|
if(width<0)width=0
|
|
25
|
+
po('width',width)
|
|
25
26
|
ref.style.flexBasis=`${width}px`
|
|
26
27
|
}
|
|
27
28
|
,top:({clientY})=>{
|
|
29
|
+
po('top')
|
|
28
30
|
const ref=this.props.contenerRef.current
|
|
29
31
|
let height=clientY-this.frame.y-this.frame.shh
|
|
32
|
+
po('height',height)
|
|
30
33
|
// if(width<0)width=0
|
|
31
34
|
ref.style.flexBasis=`${height}px`
|
|
32
35
|
}
|
|
33
36
|
,bottom:({clientY})=>{
|
|
37
|
+
po('bottom')
|
|
34
38
|
const ref=this.props.contenerRef.current
|
|
35
39
|
let height=this.frame.w2-clientY-this.frame.shh
|
|
36
40
|
// clientY-this.frame.y-this.frame.shh
|
|
@@ -40,6 +44,7 @@ export default class Slider extends React.Component {
|
|
|
40
44
|
}
|
|
41
45
|
}
|
|
42
46
|
stop=(e)=>{
|
|
47
|
+
po('stop',this.stop)
|
|
43
48
|
document.body.style.cursor='default'
|
|
44
49
|
window.removeEventListener('mousemove',this.move)
|
|
45
50
|
window.removeEventListener('mouseup',this.stop)
|
|
@@ -48,8 +53,11 @@ export default class Slider extends React.Component {
|
|
|
48
53
|
this.resize[this.props.dir](e)
|
|
49
54
|
}
|
|
50
55
|
start=({clientX})=>{
|
|
56
|
+
console.clear()
|
|
51
57
|
const ref=this.props.contenerRef.current
|
|
52
58
|
const {x,y,width,height,...other}=ref.getBoundingClientRect()
|
|
59
|
+
po('other',ref.getBoundingClientRect())
|
|
60
|
+
po('ref.getBoundingClientRect()',this.ref.current.getBoundingClientRect())
|
|
53
61
|
const {width:sw,height:sh}=this.ref.current.getBoundingClientRect()
|
|
54
62
|
this.frame={
|
|
55
63
|
x,y
|