jrs-react 1.2.6 → 1.2.8

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 CHANGED
@@ -2807,7 +2807,7 @@ function requireReact () {
2807
2807
  }
2808
2808
 
2809
2809
  var reactExports = requireReact();
2810
- var React = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
2810
+ var React$1 = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
2811
2811
 
2812
2812
  function bind(fn, thisArg) {
2813
2813
  return function wrap() {
@@ -6066,7 +6066,7 @@ const whatType = ({
6066
6066
  // const style=flexType(typeStyle,me,{},{})
6067
6067
  // return 'type'
6068
6068
  const typeStyle = typeof _typeStyle === 'function' ? _typeStyle?.bind(me)() : _typeStyle;
6069
- return /*#__PURE__*/React.createElement(type, {
6069
+ return /*#__PURE__*/React$1.createElement(type, {
6070
6070
  style: typeStyle
6071
6071
  });
6072
6072
  } else if (render) {
@@ -6217,9 +6217,9 @@ const StyledCover = styled.div`
6217
6217
  const Cover = ({
6218
6218
  children
6219
6219
  }) => {
6220
- return /*#__PURE__*/React.createElement(StyledCover, null, children);
6220
+ return /*#__PURE__*/React$1.createElement(StyledCover, null, children);
6221
6221
  };
6222
- class JRSubmit extends React.Component {
6222
+ class JRSubmit extends React$1.Component {
6223
6223
  #methods = ['get', 'post', 'put', 'patch', 'delete', 'download'];
6224
6224
  constructor(props) {
6225
6225
  super(props);
@@ -6290,6 +6290,8 @@ class JRSubmit extends React.Component {
6290
6290
  }
6291
6291
  setValue(value, reset = false) {
6292
6292
  if (this.props.onChange) {
6293
+ po('name', this.props.name);
6294
+ po('onChange', value);
6293
6295
  this.props.onChange(value);
6294
6296
  } else {
6295
6297
  this.setState({
@@ -6467,14 +6469,14 @@ class JRSubmit extends React.Component {
6467
6469
  config.callback?.bind(this)(isSuccess, response, payload);
6468
6470
  };
6469
6471
  showMessage(success, message) {
6470
- po('success', success);
6471
- po('message', message);
6472
+ // po('success',success)
6473
+ // po('message',message)
6472
6474
  }
6473
6475
  renderer() {
6474
6476
  return;
6475
6477
  }
6476
6478
  render() {
6477
- return this.props.cover != null && this.state?.lodaing ? /*#__PURE__*/React.createElement(Cover, null, flexType(this.props.cover, this, null, null)) : this.renderer();
6479
+ return this.props.cover != null && this.state?.lodaing ? /*#__PURE__*/React$1.createElement(Cover, null, flexType(this.props.cover, this, null, null)) : this.renderer();
6478
6480
  }
6479
6481
  }
6480
6482
 
@@ -6492,10 +6494,14 @@ const FreeType$1 = ({
6492
6494
  const content = config.bind(me)({
6493
6495
  setStyle
6494
6496
  });
6495
- return /*#__PURE__*/React.createElement(Tag, {
6497
+ return /*#__PURE__*/React$1.createElement(Tag, {
6496
6498
  className: className,
6497
6499
  style: style
6498
6500
  }, content);
6501
+ } else if (typeof config === 'string') {
6502
+ return /*#__PURE__*/React$1.createElement(Tag, {
6503
+ className: className
6504
+ }, config);
6499
6505
  }
6500
6506
  };
6501
6507
  const StyledJRFrame$1 = styled.div`
@@ -6513,7 +6519,7 @@ const StyledJRFrame$1 = styled.div`
6513
6519
  flex-direction: column;
6514
6520
  > *{
6515
6521
  XXborder:1px solid gray;
6516
- min-height:30px;
6522
+ XXmin-height:30px;
6517
6523
  }
6518
6524
 
6519
6525
  >header{
@@ -6535,49 +6541,45 @@ const StyledJRFrame$1 = styled.div`
6535
6541
  `;
6536
6542
  class JRFrame extends JRSubmit {
6537
6543
  renderer() {
6538
- return /*#__PURE__*/React.createElement(StyledJRFrame$1, {
6544
+ return /*#__PURE__*/React$1.createElement(StyledJRFrame$1, {
6539
6545
  style: this.props.style,
6540
6546
  className: `${this.props.className} jr-frame`
6541
- }, /*#__PURE__*/React.createElement(FreeType$1, {
6547
+ }, /*#__PURE__*/React$1.createElement(FreeType$1, {
6542
6548
  tag: "div",
6543
6549
  config: this.props.start,
6544
6550
  me: this,
6545
6551
  className: 'start'
6546
- }), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(FreeType$1, {
6552
+ }), /*#__PURE__*/React$1.createElement("main", null, /*#__PURE__*/React$1.createElement(FreeType$1, {
6547
6553
  tag: "header",
6548
6554
  config: this.props.top,
6549
6555
  me: this
6550
- }), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(FreeType$1, {
6556
+ }), /*#__PURE__*/React$1.createElement("main", null, /*#__PURE__*/React$1.createElement(FreeType$1, {
6551
6557
  tag: "div",
6552
6558
  config: this.props.left,
6553
6559
  me: this,
6554
6560
  className: 'left'
6555
- }), this.renderMe(), /*#__PURE__*/React.createElement(FreeType$1, {
6561
+ }), this.renderMe?.() ?? this.props.children, /*#__PURE__*/React$1.createElement(FreeType$1, {
6556
6562
  tag: "div",
6557
6563
  config: this.props.right,
6558
6564
  me: this,
6559
6565
  className: 'right'
6560
- })), /*#__PURE__*/React.createElement(FreeType$1, {
6566
+ })), /*#__PURE__*/React$1.createElement(FreeType$1, {
6561
6567
  tag: "footer",
6562
6568
  config: this.props.bottom,
6563
6569
  me: this
6564
- })), /*#__PURE__*/React.createElement(FreeType$1, {
6570
+ })), /*#__PURE__*/React$1.createElement(FreeType$1, {
6565
6571
  tag: "div",
6566
6572
  config: this.props.end,
6567
6573
  me: this,
6568
6574
  className: 'end'
6569
6575
  }));
6570
6576
  }
6571
- renderMe() {
6572
- return /*#__PURE__*/React.createElement("div", {
6573
- style: {
6574
- flex: 1
6575
- }
6576
- }, "Render me");
6577
- }
6577
+ // renderMe(){
6578
+ // return <div style={{flex:1}}>Render me</div>
6579
+ // }
6578
6580
  }
6579
6581
 
6580
- const StyledSlider = styled.div`
6582
+ const StyledSlider$1 = styled.div`
6581
6583
  position: absolute;
6582
6584
  top: 0;
6583
6585
  right: 0;
@@ -6592,10 +6594,10 @@ const StyledSlider = styled.div`
6592
6594
  border-right:1px dashed gray;
6593
6595
  }
6594
6596
  `;
6595
- class Slider extends React.Component {
6597
+ class Slider$1 extends React$1.Component {
6596
6598
  constructor() {
6597
6599
  super();
6598
- this.sliderRef = /*#__PURE__*/React.createRef();
6600
+ this.sliderRef = /*#__PURE__*/React$1.createRef();
6599
6601
  }
6600
6602
  stop = e => {
6601
6603
  this.sliderRef.current.classList.remove('resizing');
@@ -6644,7 +6646,7 @@ class Slider extends React.Component {
6644
6646
  }
6645
6647
  render() {
6646
6648
  const column = this.props.column;
6647
- return /*#__PURE__*/React.createElement(StyledSlider, {
6649
+ return /*#__PURE__*/React$1.createElement(StyledSlider$1, {
6648
6650
  ref: this.sliderRef,
6649
6651
  onMouseDown: e => {
6650
6652
  this.start(this.props.thRef, column);
@@ -6657,7 +6659,7 @@ const Colgroup = ({
6657
6659
  leafColumns,
6658
6660
  colGroupRef
6659
6661
  }) => {
6660
- return /*#__PURE__*/React.createElement("colgroup", {
6662
+ return /*#__PURE__*/React$1.createElement("colgroup", {
6661
6663
  ref: colGroupRef
6662
6664
  }, leafColumns?.map((_column, index) => {
6663
6665
  const {
@@ -6667,7 +6669,7 @@ const Colgroup = ({
6667
6669
  const style = {
6668
6670
  width
6669
6671
  };
6670
- return /*#__PURE__*/React.createElement("col", {
6672
+ return /*#__PURE__*/React$1.createElement("col", {
6671
6673
  style: style,
6672
6674
  key: index
6673
6675
  });
@@ -6680,13 +6682,13 @@ const Ths$1 = ({
6680
6682
  table
6681
6683
  }) => {
6682
6684
  return rowColumn?.map((column, colIndex) => {
6683
- const thRef = /*#__PURE__*/React.createRef();
6684
- return /*#__PURE__*/React.createElement("th", {
6685
+ const thRef = /*#__PURE__*/React$1.createRef();
6686
+ return /*#__PURE__*/React$1.createElement("th", {
6685
6687
  key: colIndex,
6686
6688
  ref: thRef,
6687
6689
  colSpan: column.colSpan,
6688
6690
  rowSpan: column.rowSpan ?? (column.isLeaf && deep > rowIndex ? deep - rowIndex + 1 : null)
6689
- }, flexType(column.label, table), table.props.resizableColumns === true && /*#__PURE__*/React.createElement(Slider, {
6691
+ }, flexType(column.label, table), table.props.resizableColumns === true && /*#__PURE__*/React$1.createElement(Slider$1, {
6690
6692
  table: table,
6691
6693
  thRef: thRef,
6692
6694
  column: column
@@ -6700,10 +6702,10 @@ const HeadTrs = ({
6700
6702
  }) => {
6701
6703
  const columns = Array.isArray(_columns?.[0]) ? _columns : [_columns];
6702
6704
  return columns?.map((rowColumn, rowIndex) => {
6703
- return /*#__PURE__*/React.createElement("tr", {
6705
+ return /*#__PURE__*/React$1.createElement("tr", {
6704
6706
  className: trClassName,
6705
6707
  key: rowIndex
6706
- }, /*#__PURE__*/React.createElement(Ths$1, {
6708
+ }, /*#__PURE__*/React$1.createElement(Ths$1, {
6707
6709
  deep: columns.length - 1,
6708
6710
  rowColumn: rowColumn,
6709
6711
  rowIndex: rowIndex,
@@ -6716,10 +6718,10 @@ const THead = ({
6716
6718
  leafColumns,
6717
6719
  table
6718
6720
  }) => {
6719
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement(HeadTrs, {
6721
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("thead", null, /*#__PURE__*/React$1.createElement(HeadTrs, {
6720
6722
  columns: columns,
6721
6723
  table: table
6722
- })), /*#__PURE__*/React.createElement(Colgroup, {
6724
+ })), /*#__PURE__*/React$1.createElement(Colgroup, {
6723
6725
  leafColumns: leafColumns,
6724
6726
  colGroupRef: table.colGroupRef
6725
6727
  }));
@@ -6744,7 +6746,7 @@ const FootThs = ({
6744
6746
  // }
6745
6747
  let style = flexType(column.style, table, {}, {});
6746
6748
  const content = whatType(column, table, column.label);
6747
- return /*#__PURE__*/React.createElement("th", {
6749
+ return /*#__PURE__*/React$1.createElement("th", {
6748
6750
  style: style,
6749
6751
  colSpan: column.colSpan,
6750
6752
  rowSpan: column.rowSpan
@@ -6756,24 +6758,24 @@ const TFoot = ({
6756
6758
  columns
6757
6759
  }) => {
6758
6760
  const trs = columns?.map((rowColumn, rowIndex) => {
6759
- return /*#__PURE__*/React.createElement("tr", {
6761
+ return /*#__PURE__*/React$1.createElement("tr", {
6760
6762
  key: rowIndex
6761
- }, /*#__PURE__*/React.createElement(FootThs, {
6763
+ }, /*#__PURE__*/React$1.createElement(FootThs, {
6762
6764
  columns: rowColumn,
6763
6765
  table: table
6764
6766
  }));
6765
6767
  });
6766
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("tfoot", null, trs));
6768
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("tfoot", null, trs));
6767
6769
  };
6768
6770
 
6769
- function _extends() {
6770
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
6771
+ function _extends$3() {
6772
+ return _extends$3 = Object.assign ? Object.assign.bind() : function (n) {
6771
6773
  for (var e = 1; e < arguments.length; e++) {
6772
6774
  var t = arguments[e];
6773
6775
  for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
6774
6776
  }
6775
6777
  return n;
6776
- }, _extends.apply(null, arguments);
6778
+ }, _extends$3.apply(null, arguments);
6777
6779
  }
6778
6780
 
6779
6781
  styled.tbody`
@@ -6814,7 +6816,7 @@ const Ths = ({
6814
6816
  content = column.label;
6815
6817
  }
6816
6818
  // style.textAlign=align
6817
- return /*#__PURE__*/React.createElement("th", {
6819
+ return /*#__PURE__*/React$1.createElement("th", {
6818
6820
  key: colIndex,
6819
6821
  style: {
6820
6822
  textAlign: align,
@@ -6834,10 +6836,10 @@ const GroupColumns = ({
6834
6836
  }) => {
6835
6837
  const columns = Array.isArray(_columns?.[0]) ? _columns : [_columns];
6836
6838
  return columns?.map((rowColumn, rowIndex) => {
6837
- return /*#__PURE__*/React.createElement("tr", {
6839
+ return /*#__PURE__*/React$1.createElement("tr", {
6838
6840
  className: trClassName,
6839
6841
  key: rowIndex
6840
- }, /*#__PURE__*/React.createElement(Ths, {
6842
+ }, /*#__PURE__*/React$1.createElement(Ths, {
6841
6843
  table: table,
6842
6844
  groupData: groupData,
6843
6845
  groupIndex: tbodyIndex,
@@ -6857,7 +6859,7 @@ styled.tr`
6857
6859
  }
6858
6860
  `;
6859
6861
  const GroupHeader = props => {
6860
- return /*#__PURE__*/React.createElement(GroupColumns, _extends({
6862
+ return /*#__PURE__*/React$1.createElement(GroupColumns, _extends$3({
6861
6863
  trClassName: 'jr-group-header'
6862
6864
  }, props));
6863
6865
  };
@@ -6868,7 +6870,7 @@ styled.tr`
6868
6870
  }
6869
6871
  `;
6870
6872
  const GroupFooter = props => {
6871
- return /*#__PURE__*/React.createElement(GroupColumns, _extends({
6873
+ return /*#__PURE__*/React$1.createElement(GroupColumns, _extends$3({
6872
6874
  trClassName: 'jr-group-footer'
6873
6875
  }, props));
6874
6876
  };
@@ -6915,7 +6917,7 @@ const Td = ({
6915
6917
  const typeStyle = flexType(_typeStyle, table, {
6916
6918
  record
6917
6919
  }, {});
6918
- content = /*#__PURE__*/React.createElement(type, {
6920
+ content = /*#__PURE__*/React$1.createElement(type, {
6919
6921
  onChange: _onChange ? e => {
6920
6922
  _onChange?.bind(table)(e, {
6921
6923
  value,
@@ -6943,7 +6945,7 @@ const Td = ({
6943
6945
  } else {
6944
6946
  content = value;
6945
6947
  }
6946
- return /*#__PURE__*/React.createElement("td", {
6948
+ return /*#__PURE__*/React$1.createElement("td", {
6947
6949
  colSpan: style.colSpan,
6948
6950
  rowSpan: style.rowSpan,
6949
6951
  style: {
@@ -6962,7 +6964,7 @@ const Tds = ({
6962
6964
  trIndex
6963
6965
  }) => {
6964
6966
  return leafColumns?.map((column, tdIndex) => {
6965
- return /*#__PURE__*/React.createElement(Td, {
6967
+ return /*#__PURE__*/React$1.createElement(Td, {
6966
6968
  column: column,
6967
6969
  key: tdIndex,
6968
6970
  record: record,
@@ -6987,14 +6989,14 @@ const TBody = ({
6987
6989
  table,
6988
6990
  tbodyIndex
6989
6991
  };
6990
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("tbody", {
6992
+ return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("tbody", {
6991
6993
  key: `tbody${tbodyIndex}`
6992
- }, groupData?.length > 0 && /*#__PURE__*/React.createElement(GroupHeader, _extends({
6994
+ }, groupData?.length > 0 && /*#__PURE__*/React$1.createElement(GroupHeader, _extends$3({
6993
6995
  groupData: groupData,
6994
6996
  columns: groupHeader
6995
- }, neededProps)), groupData?.map((record, trIndex) => {
6997
+ }, neededProps)), groupData?.map?.((record, trIndex) => {
6996
6998
  const onRowClick = table.props.onRowClick?.bind(table);
6997
- return /*#__PURE__*/React.createElement("tr", {
6999
+ return /*#__PURE__*/React$1.createElement("tr", {
6998
7000
  key: trIndex,
6999
7001
  onClick: () => {
7000
7002
  onRowClick?.({
@@ -7003,13 +7005,13 @@ const TBody = ({
7003
7005
  groupIndex: tbodyIndex
7004
7006
  });
7005
7007
  }
7006
- }, /*#__PURE__*/React.createElement(Tds, _extends({
7008
+ }, /*#__PURE__*/React$1.createElement(Tds, _extends$3({
7007
7009
  record: record,
7008
7010
  trIndex: trIndex
7009
7011
  }, neededProps, {
7010
7012
  leafColumns: leafColumns
7011
7013
  })));
7012
- }), groupData?.length > 0 && /*#__PURE__*/React.createElement(GroupFooter, _extends({
7014
+ }), groupData?.length > 0 && /*#__PURE__*/React$1.createElement(GroupFooter, _extends$3({
7013
7015
  groupData: groupData,
7014
7016
  columns: groupFooter
7015
7017
  }, neededProps))));
@@ -7027,7 +7029,7 @@ const TBodies = ({
7027
7029
 
7028
7030
  // po('dataSource',dataSource)
7029
7031
  return dataSource?.map((groupData, tbodyIndex, c) => {
7030
- return /*#__PURE__*/React.createElement(TBody, {
7032
+ return /*#__PURE__*/React$1.createElement(TBody, {
7031
7033
  key: `tbody${tbodyIndex}`,
7032
7034
  table: table
7033
7035
  // dataSource={dataSource}
@@ -7086,8 +7088,7 @@ const StyledJRTable = styled.div`
7086
7088
 
7087
7089
  th{
7088
7090
  position: relative;
7089
- height:24px;
7090
- padding: 4px;
7091
+ padding: 2px 6px;
7091
7092
  background: linear-gradient(180deg, rgba(227, 227, 226, 1) 0%, rgba(255, 255, 255, 1) 25%, rgba(210, 210, 210, 1) 100%);
7092
7093
  box-shadow: 2px 2px 2px 0 #ffffffd6 inset, -1px -1px 2px 0px #8a847dbf inset;
7093
7094
  color: #525252;
@@ -7176,6 +7177,711 @@ const StyledJRTable = styled.div`
7176
7177
  }
7177
7178
  `;
7178
7179
 
7180
+ var _path$1;
7181
+ function _extends$2() { return _extends$2 = 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$2.apply(null, arguments); }
7182
+ var SvgX = function SvgX(props) {
7183
+ return /*#__PURE__*/reactExports.createElement("svg", _extends$2({
7184
+ xmlns: "http://www.w3.org/2000/svg",
7185
+ width: 24,
7186
+ height: 24,
7187
+ fill: "none",
7188
+ stroke: "currentColor",
7189
+ strokeLinecap: "round",
7190
+ strokeLinejoin: "round",
7191
+ strokeWidth: 2
7192
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/reactExports.createElement("path", {
7193
+ d: "M18 6 6 18M6 6l12 12"
7194
+ })));
7195
+ };
7196
+
7197
+ var _rect;
7198
+ 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); }
7199
+ var SvgSquare = function SvgSquare(props) {
7200
+ return /*#__PURE__*/reactExports.createElement("svg", _extends$1({
7201
+ xmlns: "http://www.w3.org/2000/svg",
7202
+ width: 24,
7203
+ height: 24,
7204
+ fill: "none",
7205
+ stroke: "currentColor",
7206
+ strokeLinecap: "round",
7207
+ strokeLinejoin: "round",
7208
+ strokeWidth: 2
7209
+ }, props), _rect || (_rect = /*#__PURE__*/reactExports.createElement("rect", {
7210
+ width: 18,
7211
+ height: 18,
7212
+ x: 3,
7213
+ y: 3,
7214
+ rx: 2,
7215
+ ry: 2
7216
+ })));
7217
+ };
7218
+
7219
+ var _path;
7220
+ 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); }
7221
+ var SvgMinus = function SvgMinus(props) {
7222
+ return /*#__PURE__*/reactExports.createElement("svg", _extends({
7223
+ xmlns: "http://www.w3.org/2000/svg",
7224
+ width: 24,
7225
+ height: 24,
7226
+ fill: "none",
7227
+ stroke: "currentColor",
7228
+ strokeLinecap: "round",
7229
+ strokeLinejoin: "round",
7230
+ strokeWidth: 2
7231
+ }, props), _path || (_path = /*#__PURE__*/reactExports.createElement("path", {
7232
+ d: "M5 12h14"
7233
+ })));
7234
+ };
7235
+
7236
+ function JRButton({
7237
+ icon,
7238
+ children,
7239
+ ...props
7240
+ }) {
7241
+ return /*#__PURE__*/React.createElement("button", props, icon, children);
7242
+ }
7243
+
7244
+ const StyledTitle = styled.div`
7245
+ overflow: hidden;
7246
+ display: flex;
7247
+ border-radius: var(--jr-window-radius) var(--jr-window-radius) 0 0;
7248
+ background:rgb(214, 214, 214);
7249
+ color: black;
7250
+ &:active:hover{
7251
+ cursor: grabbing;
7252
+ }
7253
+
7254
+ -webkit-user-select: none;
7255
+ -khtml-user-select: none;
7256
+ -moz-user-select: none;
7257
+ -o-user-select: none;
7258
+ user-select: none;
7259
+
7260
+ > .title{
7261
+
7262
+ flex: 1;
7263
+ padding:2px 0 2px 8px;
7264
+ text-overflow: ellipsis;
7265
+ overflow: hidden;
7266
+ white-space: nowrap;
7267
+ }
7268
+ > nav{
7269
+ display: flex;
7270
+ align-items: anchor-center;
7271
+
7272
+
7273
+ >button{
7274
+ display:flex;
7275
+ align-items: center;
7276
+ justify-content: center;
7277
+ border: unset;
7278
+ background: unset;
7279
+ cursor: pointer;
7280
+ width:32px;
7281
+ height:32px;
7282
+ xborder:1px solid green;
7283
+ padding: 0;
7284
+ margin: 0;
7285
+ &:hover{
7286
+ background: #bbbbbb;
7287
+ color:white;
7288
+ }
7289
+ >svg{
7290
+ width:14px;
7291
+ height:14px;
7292
+ cursor: pointer;
7293
+ }
7294
+ }
7295
+ >button.danger:hover{
7296
+ background: red;
7297
+ color:white;
7298
+ }
7299
+ }
7300
+ `;
7301
+ class TitleBar extends React$1.Component {
7302
+ pos1 = 0;
7303
+ pos2 = 0;
7304
+ pos3 = 0;
7305
+ pos4 = 0;
7306
+ x = 0;
7307
+ y = 0;
7308
+ stop = e => {
7309
+ e.preventDefault();
7310
+ if (this.moved) {
7311
+ const {
7312
+ height: titleBarHeight
7313
+ } = this.props.titleBarRef.current.getBoundingClientRect();
7314
+ const {
7315
+ x,
7316
+ y,
7317
+ width,
7318
+ height
7319
+ } = this.props.windowRef.current.getBoundingClientRect();
7320
+ po('y', y);
7321
+ if (y < 1) {
7322
+ this.props.windowRef.current.style.transition = 'var(--transition-x-y), left .1s ease-in';
7323
+ this.props.windowRef.current.style.left = `${-this.props.thick}px`;
7324
+ this.props.windowRef.current.style.width = `calc(100vw + ${this.props.thick * 2}px)`; //`${window.innerWidth+(this.props.thick*2)}px`
7325
+ this.props.windowRef.current.style.height = `calc(100vh + ${this.props.thick * 2}px)`; //`${window.innerHeight+(this.props.thick*2)}px`
7326
+
7327
+ this.props.window.orgHeight = height;
7328
+ this.props.window.orgWidth = width;
7329
+ }
7330
+ if (y > window.innerHeight) this.props.windowRef.current.style.top = `${window.innerHeight - titleBarHeight}px`;
7331
+ if (x + width - this.props.thick < 0) this.props.windowRef.current.style.left = 0;
7332
+ if (x > window.innerWidth) this.props.windowRef.current.style.left = `${window.innerWidth - width}px`;
7333
+ document.body.style.cursor = 'default';
7334
+ }
7335
+ window.removeEventListener('mousemove', this.move);
7336
+ window.removeEventListener('mouseup', this.stop);
7337
+ };
7338
+ move = e => {
7339
+ e.preventDefault();
7340
+ this.moved = true;
7341
+ const {
7342
+ clientX,
7343
+ clientY
7344
+ } = e;
7345
+ const y = clientY < 1 ? 0 : clientY;
7346
+ this.pos1 = this.pos3 - clientX;
7347
+ this.pos2 = this.pos4 - y;
7348
+ this.pos3 = clientX;
7349
+ this.pos4 = y;
7350
+ const w = this.props.windowRef.current;
7351
+ this.x = w.offsetLeft - this.pos1;
7352
+ this.y = w.offsetTop - this.pos2;
7353
+ if (this.props.window.orgHeight) {
7354
+ w.style.height = `${this.props.window.orgHeight}px`;
7355
+ this.props.window.orgHeight = null;
7356
+ }
7357
+ if (this.props.window.orgWidth) {
7358
+ if (clientX > this.props.window.orgWidth) {
7359
+ this.x = clientX - this.props.window.orgWidth / 2;
7360
+ }
7361
+ w.style.width = `${this.props.window.orgWidth}px`;
7362
+ this.props.window.orgWidth = null;
7363
+ }
7364
+ this.y = this.y < -this.props.thick ? -this.props.thick : this.y;
7365
+ w.style.top = this.y + 'px';
7366
+ w.style.left = this.x + 'px';
7367
+ };
7368
+ start(e) {
7369
+ e.preventDefault();
7370
+ this.moved = false;
7371
+ this.pos3 = e.clientX;
7372
+ this.pos4 = e.clientY;
7373
+ this.props.windowRef.current.style.transition = 'var(--transition-x-y)';
7374
+ document.body.style.cursor = 'grabbing';
7375
+ window.addEventListener('mousemove', this.move);
7376
+ window.addEventListener('mouseup', this.stop);
7377
+ }
7378
+ render() {
7379
+ return /*#__PURE__*/React$1.createElement(StyledTitle, {
7380
+ ref: this.props.titleBarRef,
7381
+ draggable: "false",
7382
+ onMouseDown: e => {
7383
+ this.start(e);
7384
+ }
7385
+ }, /*#__PURE__*/React$1.createElement(FreeType$1, {
7386
+ tag: "div",
7387
+ config: this.props.title ?? '',
7388
+ me: this.props.window,
7389
+ className: 'title'
7390
+ }), /*#__PURE__*/React$1.createElement("nav", null, /*#__PURE__*/React$1.createElement(JRButton, {
7391
+ icon: /*#__PURE__*/React$1.createElement(SvgMinus, null)
7392
+ }), /*#__PURE__*/React$1.createElement(JRButton, {
7393
+ icon: /*#__PURE__*/React$1.createElement(SvgSquare, null)
7394
+ }), this.props.window.props.setOpen ? /*#__PURE__*/React$1.createElement(JRButton, {
7395
+ icon: /*#__PURE__*/React$1.createElement(SvgX, null),
7396
+ className: 'danger',
7397
+ onClick: () => {
7398
+ this.props.window.props.setOpen(false);
7399
+ }
7400
+ }) : null));
7401
+ }
7402
+ }
7403
+
7404
+ const directions = ['n', 'e', 's', 'w', 'nww', 'nnw', 'nne', 'nee', 'sse', 'see', 'sww', 'ssw'];
7405
+ class Sliders extends React$1.Component {
7406
+ render() {
7407
+ return directions.map((direction, index) => /*#__PURE__*/React$1.createElement(Slider, {
7408
+ direction: direction,
7409
+ thick: this.props.thick,
7410
+ windowRef: this.props.windowRef,
7411
+ window: this.props.window,
7412
+ titleBarRef: this.props.titleBarRef,
7413
+ key: index
7414
+ }));
7415
+ }
7416
+ }
7417
+ const StyledSlider = styled.div`
7418
+ Xborder:1px solid ${({
7419
+ $direction: {
7420
+ color
7421
+ }
7422
+ }) => color};
7423
+ Xbackground:${({
7424
+ $direction: {
7425
+ color
7426
+ }
7427
+ }) => color};
7428
+ position: absolute;
7429
+ top: ${({
7430
+ $direction: {
7431
+ top
7432
+ }
7433
+ }) => top};
7434
+ bottom: ${({
7435
+ $direction: {
7436
+ bottom
7437
+ }
7438
+ }) => bottom};
7439
+ right: ${({
7440
+ $direction: {
7441
+ right
7442
+ }
7443
+ }) => right};
7444
+ left: ${({
7445
+ $direction: {
7446
+ left
7447
+ }
7448
+ }) => left};
7449
+ height: ${({
7450
+ $direction: {
7451
+ height
7452
+ }
7453
+ }) => height};
7454
+ width: ${({
7455
+ $direction: {
7456
+ width
7457
+ }
7458
+ }) => width};
7459
+ cursor: ${({
7460
+ $direction: {
7461
+ cursor
7462
+ }
7463
+ }) => cursor};
7464
+
7465
+ -webkit-user-select: none;
7466
+ -khtml-user-select: none;
7467
+ -moz-user-select: none;
7468
+ -o-user-select: none;
7469
+ user-select: none;
7470
+
7471
+ `;
7472
+ class Slider extends React$1.Component {
7473
+ width = '3px';
7474
+ borderWidth = 'px';
7475
+ borderLong = 30;
7476
+ constructor(props) {
7477
+ super(props);
7478
+ this.sliderRef = /*#__PURE__*/React$1.createRef();
7479
+ }
7480
+ directions = {
7481
+ n: {
7482
+ top: 0,
7483
+ color: 'red',
7484
+ width: '100%',
7485
+ height: `${this.props.thick}px`,
7486
+ cursor: 'n-resize',
7487
+ resize: props => {
7488
+ this.resizeN(props);
7489
+ }
7490
+ },
7491
+ e: {
7492
+ color: 'yellow',
7493
+ right: 0,
7494
+ width: `${this.props.thick}px`,
7495
+ height: '100%',
7496
+ cursor: 'e-resize',
7497
+ resize: props => {
7498
+ this.resizeE(props);
7499
+ }
7500
+ },
7501
+ s: {
7502
+ color: 'blue',
7503
+ bottom: 0,
7504
+ width: '100%',
7505
+ height: `${this.props.thick}px`,
7506
+ cursor: 's-resize',
7507
+ resize: props => {
7508
+ this.resizeS(props);
7509
+ }
7510
+ },
7511
+ w: {
7512
+ color: 'green',
7513
+ left: 0,
7514
+ width: `${this.props.thick}px`,
7515
+ height: '100%',
7516
+ cursor: 'w-resize',
7517
+ resize: props => {
7518
+ this.resizeW(props);
7519
+ }
7520
+ },
7521
+ nw: {
7522
+ top: 0,
7523
+ left: 0,
7524
+ color: 'blue',
7525
+ width: `${this.borderLong}px`,
7526
+ height: `${this.borderLong}px`,
7527
+ cursor: 'nw-resize',
7528
+ resize: props => {
7529
+ this.resizeN(props);
7530
+ this.resizeW(props);
7531
+ }
7532
+ },
7533
+ nww: {
7534
+ top: 0,
7535
+ left: 0,
7536
+ color: 'blue',
7537
+ width: `${this.props.thick + this.borderLong}px`,
7538
+ height: `${this.props.thick}px`,
7539
+ cursor: 'nw-resize',
7540
+ resize: props => {
7541
+ this.resizeN(props);
7542
+ this.resizeW(props);
7543
+ }
7544
+ },
7545
+ nnw: {
7546
+ top: 0,
7547
+ left: 0,
7548
+ color: 'blue',
7549
+ width: `${this.props.thick}px`,
7550
+ height: `${this.props.thick + this.borderLong}px`,
7551
+ cursor: 'nw-resize',
7552
+ resize: props => {
7553
+ this.resizeN(props);
7554
+ this.resizeW(props);
7555
+ }
7556
+ },
7557
+ nne: {
7558
+ top: 0,
7559
+ right: 0,
7560
+ color: 'green',
7561
+ width: `${this.props.thick + this.borderLong}px`,
7562
+ height: `${this.props.thick}px`,
7563
+ cursor: 'ne-resize',
7564
+ resize: props => {
7565
+ this.resizeN(props);
7566
+ this.resizeE(props);
7567
+ }
7568
+ },
7569
+ nee: {
7570
+ top: 0,
7571
+ right: 0,
7572
+ color: 'green',
7573
+ width: `${this.props.thick}px`,
7574
+ height: `${this.props.thick + this.borderLong}px`,
7575
+ cursor: 'ne-resize',
7576
+ resize: props => {
7577
+ this.resizeN(props);
7578
+ this.resizeE(props);
7579
+ }
7580
+ },
7581
+ sse: {
7582
+ color: 'red',
7583
+ right: 0,
7584
+ bottom: 0,
7585
+ width: `${this.props.thick + this.borderLong}px`,
7586
+ height: `${this.props.thick}px`,
7587
+ cursor: 'se-resize',
7588
+ resize: props => {
7589
+ this.resizeS(props);
7590
+ this.resizeE(props);
7591
+ }
7592
+ },
7593
+ see: {
7594
+ color: 'red',
7595
+ right: 0,
7596
+ bottom: 0,
7597
+ width: `${this.props.thick}px`,
7598
+ height: `${this.props.thick + this.borderLong}px`,
7599
+ cursor: 'se-resize',
7600
+ resize: props => {
7601
+ this.resizeS(props);
7602
+ this.resizeE(props);
7603
+ }
7604
+ },
7605
+ ssw: {
7606
+ color: 'yellow',
7607
+ bottom: 0,
7608
+ left: 0,
7609
+ width: `${this.props.thick + this.borderLong}px`,
7610
+ height: `${this.props.thick}px`,
7611
+ cursor: 'sw-resize',
7612
+ resize: props => {
7613
+ this.resizeS(props);
7614
+ this.resizeW(props);
7615
+ }
7616
+ },
7617
+ sww: {
7618
+ color: 'yellow',
7619
+ bottom: 0,
7620
+ left: 0,
7621
+ width: `${this.props.thick}px`,
7622
+ height: `${this.props.thick + this.borderLong}px`,
7623
+ cursor: 'sw-resize',
7624
+ resize: props => {
7625
+ this.resizeS(props);
7626
+ this.resizeW(props);
7627
+ }
7628
+ }
7629
+ };
7630
+ resizeN = ({
7631
+ window,
7632
+ cursorY,
7633
+ startY,
7634
+ startHeight,
7635
+ titleBarHeight
7636
+ }) => {
7637
+ let y = cursorY - this.props.thick;
7638
+ if (y < 0) y = 0;
7639
+ let height = startHeight + (startY - y);
7640
+ if (height < titleBarHeight + this.props.thick * 2) {
7641
+ height = titleBarHeight + this.props.thick * 2;
7642
+ y = startY + startHeight - titleBarHeight - this.props.thick * 2;
7643
+ }
7644
+ window.style.top = `${y}px`;
7645
+ window.style.height = `${height}px`;
7646
+ };
7647
+ resizeE = ({
7648
+ window,
7649
+ clientX,
7650
+ left,
7651
+ titleBarHeight
7652
+ }) => {
7653
+ let width = clientX - left - this.props.thick;
7654
+ if (width < titleBarHeight) width = titleBarHeight;
7655
+ window.style.width = `${width + this.props.thick * 2}px`;
7656
+ };
7657
+ resizeS = ({
7658
+ window,
7659
+ clientY,
7660
+ top,
7661
+ titleBarHeight
7662
+ }) => {
7663
+ let height = clientY - top - this.props.thick;
7664
+ if (height < titleBarHeight) height = titleBarHeight;
7665
+ window.style.height = `${height + this.props.thick * 2}px`;
7666
+ };
7667
+ resizeW = ({
7668
+ window,
7669
+ cursorX,
7670
+ startX,
7671
+ startWidth,
7672
+ titleBarHeight
7673
+ }) => {
7674
+ let x = cursorX - this.props.thick;
7675
+ if (x < 0) x = 0;
7676
+ let width = startWidth + (startX - x);
7677
+ if (width < titleBarHeight + this.props.thick * 2) {
7678
+ width = titleBarHeight + this.props.thick * 2;
7679
+ x = startX + startWidth - titleBarHeight - this.props.thick * 2;
7680
+ }
7681
+ window.style.left = `${x}px`;
7682
+ window.style.width = `${width}px`;
7683
+ };
7684
+ stop = e => {
7685
+ e.preventDefault();
7686
+ const {
7687
+ height: titleBarHeight
7688
+ } = this.props.titleBarRef.current.getBoundingClientRect();
7689
+ const {
7690
+ x,
7691
+ y,
7692
+ width,
7693
+ height
7694
+ } = this.props.windowRef.current.getBoundingClientRect();
7695
+ this.props.windowRef.current.style.transition = 'var(--transition-x-y)';
7696
+ if (y == 0 && this.data.direction.indexOf('n') > -1) {
7697
+ this.props.window.orgHeight = height;
7698
+ this.props.windowRef.current.style.height = `${window.innerHeight}px`;
7699
+ }
7700
+ if (y > window.innerHeight) this.props.windowRef.current.style.top = `${window.innerHeight - titleBarHeight}px`;
7701
+ if (x + width - this.props.thick < 0) this.props.windowRef.current.style.left = 0;
7702
+ if (x > window.innerWidth) this.props.windowRef.current.style.left = `${window.innerWidth - width}px`;
7703
+ document.body.style.cursor = 'default';
7704
+ window.removeEventListener('mousemove', this.move);
7705
+ window.removeEventListener('mouseup', this.stop);
7706
+ };
7707
+ move = e => {
7708
+ e.preventDefault();
7709
+ const {
7710
+ clientX,
7711
+ clientY,
7712
+ x: cursorX,
7713
+ y: cursorY
7714
+ } = e;
7715
+ const window = this.props.windowRef.current;
7716
+ const {
7717
+ left,
7718
+ top
7719
+ } = window.getBoundingClientRect();
7720
+ const {
7721
+ x: startX,
7722
+ width: startWidth,
7723
+ y: startY,
7724
+ height: startHeight,
7725
+ titleBarHeight
7726
+ } = this.data;
7727
+ this.directions[this.props.direction].resize({
7728
+ window,
7729
+ titleBarHeight,
7730
+ clientX,
7731
+ cursorX,
7732
+ startX,
7733
+ startWidth,
7734
+ left,
7735
+ clientY,
7736
+ cursorY,
7737
+ startY,
7738
+ startHeight,
7739
+ top
7740
+ });
7741
+ };
7742
+ start = (e, direction) => {
7743
+ e.preventDefault();
7744
+ const {
7745
+ height: titleBarHeight
7746
+ } = this.props.titleBarRef.current.getBoundingClientRect();
7747
+ let {
7748
+ x,
7749
+ y,
7750
+ width,
7751
+ height
7752
+ } = this.props.windowRef.current.getBoundingClientRect();
7753
+ if (direction.indexOf('n') > -1) {
7754
+ if (this.props.window.orgHeight) {
7755
+ height = this.props.window.orgHeight;
7756
+ this.props.window.orgHeight = null;
7757
+ }
7758
+ } else if (direction.indexOf('s') > -1) {
7759
+ this.props.window.orgHeight = null;
7760
+ }
7761
+ this.data = {
7762
+ x,
7763
+ y,
7764
+ width,
7765
+ height,
7766
+ titleBarHeight,
7767
+ direction
7768
+ };
7769
+ this.props.windowRef.current.style.transition = 'unset';
7770
+ document.body.style.cursor = this.directions[this.props.direction].cursor;
7771
+ window.addEventListener('mousemove', this.move);
7772
+ window.addEventListener('mouseup', this.stop);
7773
+ };
7774
+ render() {
7775
+ return /*#__PURE__*/React$1.createElement(StyledSlider, {
7776
+ $direction: this.directions[this.props.direction],
7777
+ $padding: this.props.padding,
7778
+ onMouseDown: e => {
7779
+ this.start(e, this.props.direction);
7780
+ }
7781
+ });
7782
+ }
7783
+ }
7784
+
7785
+ const StyledJRWindow = styled.div`
7786
+ --jr-window-radius:3px;
7787
+ --padding-child:8px;
7788
+ --transition-x-y:height .1s ease-in, width .1s ease-in;
7789
+ xborder:1px solid gray;
7790
+ position: fixed;
7791
+ padding: ${({
7792
+ $thick
7793
+ }) => $thick}px;
7794
+ border-radius: var(--jr-window-radius);
7795
+
7796
+ top: ${({
7797
+ $y
7798
+ }) => $y}px;
7799
+ left: ${({
7800
+ $x
7801
+ }) => $x}px;
7802
+ width: ${({
7803
+ $width = 300
7804
+ }) => `${$width}px`};
7805
+ height: ${({
7806
+ $height = 300
7807
+ }) => `${$height}px`};
7808
+ overflow: hidden;
7809
+
7810
+ display: flex;
7811
+ flex-direction: column;
7812
+ overflow: hidden;
7813
+
7814
+ > main{
7815
+ border-radius: var(--jr-window-radius);
7816
+ box-shadow: 0px 0px 5px 1px gray;
7817
+ Xbackground: white;
7818
+ display: flex;
7819
+ flex-direction: column;
7820
+ overflow: hidden;
7821
+ flex:1;
7822
+ > main {
7823
+ background: white;
7824
+ Xpadding:var(--padding-child);
7825
+ overflow: overlay;
7826
+ flex:1;
7827
+ display: flex;
7828
+ }
7829
+ }
7830
+ `;
7831
+ class JRWindow extends JRFrame {
7832
+ x = 0;
7833
+ y = 0;
7834
+ width = 300;
7835
+ height = 300;
7836
+ padding = 1;
7837
+ thick = 5;
7838
+ constructor(props) {
7839
+ super(props);
7840
+ this.ref = /*#__PURE__*/React$1.createRef();
7841
+ this.titleBarRef = /*#__PURE__*/React$1.createRef();
7842
+ // if(this.props.popup===true)this.renderer=this.renderWindow
7843
+ this.init();
7844
+ }
7845
+ componentWillUpdate(prevProps, prevState, snapshot) {
7846
+ po('componentWillUpdate-------------------------');
7847
+ if (this.props.popup === true && this.props.open === true && prevProps.open === false) {
7848
+ this.props.onOpen?.bind(this)();
7849
+ }
7850
+ }
7851
+ init() {
7852
+ this.height = window.innerHeight >= (this.props.height ?? this.height) ? this.props.height ?? this.height : window.innerHeight;
7853
+ this.width = window.innerWidth >= (this.props.width ?? this.width) ? this.props.width ?? this.width : window.innerWidth;
7854
+ this.x = this.props.x ?? (window.innerWidth - (this.width ?? 300)) / 2;
7855
+ this.y = this.props.y ?? (window.innerHeight - (this.height ?? 300)) / 2;
7856
+ }
7857
+ renderer() {
7858
+ return this.props.popup === true ? this.props.open === true ? /*#__PURE__*/React$1.createElement(StyledJRWindow, {
7859
+ ref: this.ref,
7860
+ className: `jr-window ${this.props.className ?? ''}`,
7861
+ $x: this.x,
7862
+ $y: this.y,
7863
+ $width: this.width,
7864
+ $height: this.height,
7865
+ $thick: this.thick
7866
+ // onMouseDown={()=>{
7867
+ // po('onFocus')
7868
+ // this.ref.current.style.zIndex=100
7869
+ // }}
7870
+ }, /*#__PURE__*/React$1.createElement("main", null, /*#__PURE__*/React$1.createElement(TitleBar, {
7871
+ titleBarRef: this.titleBarRef,
7872
+ windowRef: this.ref,
7873
+ window: this,
7874
+ title: this.props.title,
7875
+ thick: this.thick
7876
+ }), /*#__PURE__*/React$1.createElement("main", null, super.renderer())), /*#__PURE__*/React$1.createElement(Sliders, {
7877
+ thick: this.thick,
7878
+ windowRef: this.ref,
7879
+ window: this,
7880
+ titleBarRef: this.titleBarRef
7881
+ })) : '' : super.renderer();
7882
+ }
7883
+ }
7884
+
7179
7885
  const getMapObject = (map, names) => {
7180
7886
  const name = names.shift(names);
7181
7887
  if (names.length) {
@@ -7195,13 +7901,13 @@ const setMapObject = (map, names, value) => {
7195
7901
  map[name] = value;
7196
7902
  }
7197
7903
  };
7198
- class JRTable extends JRFrame {
7904
+ class JRTable extends JRWindow {
7199
7905
  constructor(props) {
7200
7906
  super(props);
7201
- this.colGroupRef = /*#__PURE__*/React.createRef();
7907
+ this.colGroupRef = /*#__PURE__*/React$1.createRef();
7202
7908
  }
7203
7909
  UNSAFE_componentWillMount() {
7204
- this.setColumns(this.props.columns);
7910
+ this.setColumns(this.props.columns ?? []);
7205
7911
  }
7206
7912
 
7207
7913
  //------------------------------------------------------------------------------------
@@ -7215,7 +7921,7 @@ class JRTable extends JRFrame {
7215
7921
  value,
7216
7922
  onChange
7217
7923
  }) {
7218
- return /*#__PURE__*/React.createElement("checkbox", {
7924
+ return /*#__PURE__*/React$1.createElement("checkbox", {
7219
7925
  checked: value,
7220
7926
  onChange: e => {
7221
7927
  onChange(e.target.checked);
@@ -7254,7 +7960,7 @@ class JRTable extends JRFrame {
7254
7960
  value,
7255
7961
  onChange
7256
7962
  }) {
7257
- return /*#__PURE__*/React.createElement("checkbox", {
7963
+ return /*#__PURE__*/React$1.createElement("checkbox", {
7258
7964
  checked: value,
7259
7965
  onChange: e => {
7260
7966
  onChange(e.target.checked);
@@ -7264,7 +7970,7 @@ class JRTable extends JRFrame {
7264
7970
  align: 'center',
7265
7971
  name,
7266
7972
  label() {
7267
- return /*#__PURE__*/React.createElement("button", {
7973
+ return /*#__PURE__*/React$1.createElement("button", {
7268
7974
  onClick: () => {
7269
7975
  const value = this.props.delete.value ?? this.getDataSource()?.filter(record => record[name]).map(record => sendValue ? record[sendValue] : record);
7270
7976
  const callback = this.props.delete.callback ?? function (a, b, c) {
@@ -7387,25 +8093,25 @@ class JRTable extends JRFrame {
7387
8093
  }
7388
8094
  //------------------------------------------------------------------------------------
7389
8095
  renderMe() {
7390
- return /*#__PURE__*/React.createElement(StyledJRTable, {
8096
+ return /*#__PURE__*/React$1.createElement(StyledJRTable, {
7391
8097
  className: `${this.props.className ?? ''} jr-table ${this.props.onRowClick ? 'row-highlightable' : ''}`
7392
- }, /*#__PURE__*/React.createElement("table", {
8098
+ }, /*#__PURE__*/React$1.createElement("table", {
7393
8099
  className: 'jr-table-table'
7394
- }, /*#__PURE__*/React.createElement(TBodies, {
8100
+ }, /*#__PURE__*/React$1.createElement(TBodies, {
7395
8101
  table: this,
7396
8102
  leafColumns: this.state.leafColumns,
7397
8103
  groupHeader: this.props.groupHeader,
7398
8104
  groupFooter: this.props.groupFooter,
7399
8105
  dataSource: this.getDataSource(),
7400
8106
  onRowClick: this.props.onRowClick
7401
- }), /*#__PURE__*/React.createElement(TFoot, {
8107
+ }), /*#__PURE__*/React$1.createElement(TFoot, {
7402
8108
  columns: this.props.footColumns,
7403
8109
  table: this
7404
- }), /*#__PURE__*/React.createElement(THead, {
8110
+ }), /*#__PURE__*/React$1.createElement(THead, {
7405
8111
  columns: this.state.columns,
7406
8112
  leafColumns: this.state.leafColumns,
7407
8113
  table: this
7408
- })), /*#__PURE__*/React.createElement("div", {
8114
+ })), /*#__PURE__*/React$1.createElement("div", {
7409
8115
  className: 'empty'
7410
8116
  }, this.noData() && '無資料'));
7411
8117
  }
@@ -7419,7 +8125,8 @@ const StyleJRFields = styled.main`
7419
8125
  flex-direction: column;
7420
8126
  flex:1;
7421
8127
  overflow: overlay;
7422
-
8128
+ padding: 10px;
8129
+
7423
8130
  color:#525252;
7424
8131
 
7425
8132
  >.jr-grid{
@@ -7482,7 +8189,7 @@ const StyledColumn = styled.div`
7482
8189
  }
7483
8190
  }}
7484
8191
  `;
7485
- const StyledColumnLabel = styled.label`
8192
+ const StyledColumnLabel = styled.div`
7486
8193
  ${({
7487
8194
  $layout
7488
8195
  }) => {
@@ -7593,7 +8300,7 @@ function requiredValidator({
7593
8300
  };
7594
8301
  }
7595
8302
  }
7596
- class JRFields extends JRFrame {
8303
+ class JRFields extends JRWindow {
7597
8304
  UNSAFE_componentWillMount() {
7598
8305
  this.#initValidateValue();
7599
8306
  }
@@ -7753,12 +8460,12 @@ class JRFields extends JRFrame {
7753
8460
  }
7754
8461
  if (type) {
7755
8462
  const typeStyle = flexType(_typeStyle, this, null);
7756
- content = /*#__PURE__*/React.createElement(StyledColumnValue, {
8463
+ content = /*#__PURE__*/React$1.createElement(StyledColumnValue, {
7757
8464
  className: 'jr-column-value',
7758
8465
  style: {
7759
8466
  gridColumn: label == null ? 'span 2' : null
7760
8467
  }
7761
- }, /*#__PURE__*/React.createElement(type, {
8468
+ }, /*#__PURE__*/React$1.createElement(type, {
7762
8469
  value: value,
7763
8470
  onChange,
7764
8471
  record: parentValue,
@@ -7769,13 +8476,13 @@ class JRFields extends JRFrame {
7769
8476
  ...column
7770
8477
  }));
7771
8478
  } else if (column.columns) {
7772
- content = /*#__PURE__*/React.createElement(StyledGrid, {
8479
+ content = /*#__PURE__*/React$1.createElement(StyledGrid, {
7773
8480
  cols: column.cols,
7774
8481
  className: 'jr-grid',
7775
8482
  $gap: gap
7776
8483
  }, this.createColumns(value, column.columns, _parentName, fullname));
7777
8484
  } else if (name || column.render) {
7778
- content = /*#__PURE__*/React.createElement(StyledColumnValue, {
8485
+ content = /*#__PURE__*/React$1.createElement(StyledColumnValue, {
7779
8486
  className: 'jr-column-value',
7780
8487
  style: {
7781
8488
  gridColumn: label == null ? 'span 2' : null,
@@ -7788,7 +8495,8 @@ class JRFields extends JRFrame {
7788
8495
  }) : typeof value === 'object' ? JSON.stringify(value) : value);
7789
8496
  }
7790
8497
  const layout = column.labelProps?.layout === undefined ? this.props.labelProps?.layout : column.labelProps?.layout;
7791
- return /*#__PURE__*/React.createElement(StyledColumn, {
8498
+ const labelStyle = column.labelProps?.style ?? this.props.labelProps?.style ?? {};
8499
+ return /*#__PURE__*/React$1.createElement(StyledColumn, {
7792
8500
  $layout: layout,
7793
8501
  $hasLabel: label != null,
7794
8502
  key: `f${index}`,
@@ -7796,17 +8504,18 @@ class JRFields extends JRFrame {
7796
8504
  className: 'jr-column',
7797
8505
  $labelWidth: column.labelProps?.width ?? this.props.labelProps?.width ?? '120px',
7798
8506
  $valueWidth: column.valueProps?.width ?? this.props.valueProps?.width ?? '1fr'
7799
- }, label != null && /*#__PURE__*/React.createElement(StyledColumnLabel, {
8507
+ }, label != null && /*#__PURE__*/React$1.createElement(StyledColumnLabel, {
8508
+ style: labelStyle,
7800
8509
  $required: required,
7801
8510
  className: 'label',
7802
8511
  $layout: layout,
7803
8512
  $colon: column.labelProps?.colon === undefined ? this.colon : column.labelProps?.colon
7804
- }, label), content, this.props.debugMode && /*#__PURE__*/React.createElement(StyledColumnFooter, null, /*#__PURE__*/React.createElement("div", {
8513
+ }, label), content, this.props.debugMode && /*#__PURE__*/React$1.createElement(StyledColumnFooter, null, /*#__PURE__*/React$1.createElement("div", {
7805
8514
  className: "left"
7806
- }, /*#__PURE__*/React.createElement(ColumnMessage, {
8515
+ }, /*#__PURE__*/React$1.createElement(ColumnMessage, {
7807
8516
  value: this.getValidateValue(_parentName.join('.')),
7808
8517
  record: this.getValue()
7809
- })), /*#__PURE__*/React.createElement("div", {
8518
+ })), /*#__PURE__*/React$1.createElement("div", {
7810
8519
  className: "right"
7811
8520
  }))
7812
8521
  // validateValue?.[name]!==undefined && <StyledColumnFooter $layout={layout}>
@@ -7821,10 +8530,10 @@ class JRFields extends JRFrame {
7821
8530
  });
7822
8531
  }
7823
8532
  renderMe() {
7824
- return /*#__PURE__*/React.createElement(StyleJRFields, {
8533
+ return /*#__PURE__*/React$1.createElement(StyleJRFields, {
7825
8534
  className: 'jr-fields',
7826
8535
  style: this.props.typeStyle
7827
- }, /*#__PURE__*/React.createElement(StyledGrid, {
8536
+ }, /*#__PURE__*/React$1.createElement(StyledGrid, {
7828
8537
  cols: this.props.cols,
7829
8538
  style: this.props.gridStyle,
7830
8539
  className: 'jr-grid',
@@ -7886,7 +8595,7 @@ const FreeType = ({
7886
8595
  const content = config.bind(me)({
7887
8596
  setStyle
7888
8597
  });
7889
- return /*#__PURE__*/React.createElement(Tag, {
8598
+ return /*#__PURE__*/React$1.createElement(Tag, {
7890
8599
  className: className,
7891
8600
  style: style
7892
8601
  }, content);
@@ -7894,33 +8603,33 @@ const FreeType = ({
7894
8603
  };
7895
8604
  class JRTestReact extends JRSubmit {
7896
8605
  renderer() {
7897
- return /*#__PURE__*/React.createElement(StyledJRFrame, {
8606
+ return /*#__PURE__*/React$1.createElement(StyledJRFrame, {
7898
8607
  style: this.props.style,
7899
8608
  className: `${this.props.className} jr-frame`
7900
- }, /*#__PURE__*/React.createElement(FreeType, {
8609
+ }, /*#__PURE__*/React$1.createElement(FreeType, {
7901
8610
  tag: "div",
7902
8611
  config: this.props.start,
7903
8612
  me: this,
7904
8613
  className: 'start'
7905
- }), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(FreeType, {
8614
+ }), /*#__PURE__*/React$1.createElement("main", null, /*#__PURE__*/React$1.createElement(FreeType, {
7906
8615
  tag: "header",
7907
8616
  config: this.props.top,
7908
8617
  me: this
7909
- }), /*#__PURE__*/React.createElement("main", null, /*#__PURE__*/React.createElement(FreeType, {
8618
+ }), /*#__PURE__*/React$1.createElement("main", null, /*#__PURE__*/React$1.createElement(FreeType, {
7910
8619
  tag: "div",
7911
8620
  config: this.props.left,
7912
8621
  me: this,
7913
8622
  className: 'left'
7914
- }), this.renderMe(), /*#__PURE__*/React.createElement(FreeType, {
8623
+ }), this.renderMe(), /*#__PURE__*/React$1.createElement(FreeType, {
7915
8624
  tag: "div",
7916
8625
  config: this.props.right,
7917
8626
  me: this,
7918
8627
  className: 'right'
7919
- })), /*#__PURE__*/React.createElement(FreeType, {
8628
+ })), /*#__PURE__*/React$1.createElement(FreeType, {
7920
8629
  tag: "footer",
7921
8630
  config: this.props.bottom,
7922
8631
  me: this
7923
- })), /*#__PURE__*/React.createElement(FreeType, {
8632
+ })), /*#__PURE__*/React$1.createElement(FreeType, {
7924
8633
  tag: "div",
7925
8634
  config: this.props.end,
7926
8635
  me: this,
@@ -7928,7 +8637,7 @@ class JRTestReact extends JRSubmit {
7928
8637
  }));
7929
8638
  }
7930
8639
  renderMe() {
7931
- return /*#__PURE__*/React.createElement("div", {
8640
+ return /*#__PURE__*/React$1.createElement("div", {
7932
8641
  style: {
7933
8642
  flex: 1
7934
8643
  }