jrs-react 1.2.27 → 1.2.29

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jrs-react",
3
- "version": "1.2.27",
3
+ "version": "1.2.29",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "module": "build/index.es.js",
@@ -77,7 +77,7 @@ export default class JRFrame extends JRSubmit {
77
77
  :null
78
78
  renderer(){
79
79
  return <StyledJRFrame id={this.props.id} style={this.props.style} className={`jr-frame`} >
80
- {this.mask?.()}
80
+
81
81
  <FreeType tag='div' config={this.props.start} me={this} className={'start'}/>
82
82
  <main>
83
83
  <FreeType tag='header' config={this.props.top} me={this}/>
@@ -91,6 +91,7 @@ export default class JRFrame extends JRSubmit {
91
91
  <FreeType tag='footer' config={this.props.bottom} me={this}/>
92
92
  </main>
93
93
  <FreeType tag='div' config={this.props.end} me={this} className={'end'}/>
94
+ {this.mask?.()}
94
95
  </StyledJRFrame>
95
96
  }
96
97
  }
@@ -131,7 +131,7 @@ const StyledDialogMask = styled.dialog`
131
131
 
132
132
  const StyledDivMask = styled.div`
133
133
  ${css}
134
- color: ${({theme})=>theme?.colorPrimary??'whilte'};
134
+ color: ${({theme})=>theme?.colorPrimary??'white'};
135
135
  width:100%;
136
136
  height:100%;
137
137
  position: absolute;
@@ -154,6 +154,7 @@ export default function JRDialogMask({id='jr-mask'}){
154
154
  }
155
155
 
156
156
  export function JRDivMask({id='jr-mask'}){
157
+ // po(`create JRDivMask id=${id}`)
157
158
  return <StyledDivMask id={id}>
158
159
  <div id={`${id}-msg`} >MSG</div>
159
160
  <div className="cs-loader-inner">
@@ -215,7 +216,8 @@ class Mask extends JRHTML{
215
216
 
216
217
  export function showMask(msg,maskId='jr-mask'){
217
218
  const jrMask=document.getElementById(maskId)
218
-
219
+ // po(`showMask find id=${maskId}`)
220
+ // po('jrMask',jrMask)
219
221
  if((jrMask)){
220
222
  const jrMaskMsg=document.getElementById(`${maskId}-msg`)
221
223
  if(!jrMask.maskDiv){
@@ -236,5 +238,7 @@ export function showMask(msg,maskId='jr-mask'){
236
238
  })
237
239
  }
238
240
  return jrMask.maskDiv.addMsg(msg)
241
+ }else{
242
+ console.warn(`Mask id ${maskId} not found.`)
239
243
  }
240
244
  }
@@ -36,7 +36,13 @@ export default class JRSubmit extends React.Component {
36
36
  this.#methods
37
37
  .filter((method) => this[method] && this.props[method] && this.props[method].autoRun)
38
38
  .forEach((method) => {
39
- this[method]()
39
+ if(this.props[method].autoRun===true){
40
+ this[method]()
41
+ } else if(this.props[method].autoRun>-1){
42
+ setTimeout(()=>{
43
+ this[method]()
44
+ },this.props[method].autoRun)
45
+ }
40
46
  })
41
47
  }
42
48
  get(_config = {}) {
@@ -243,13 +249,15 @@ export default class JRSubmit extends React.Component {
243
249
  }
244
250
  })()
245
251
  .then((res)=>{
246
- this.handleResponse(res,_payload,config)
252
+ // setTimeout(()=>{
253
+ this.handleResponse(res,_payload,config)
254
+ // config.removeMaskFunction?.()
255
+ // },random(2000,1000))
247
256
  })
248
257
  .catch((res)=>{
249
258
  this.handleResponse(res,_payload,config)
250
259
  })
251
260
  .finally(()=> {
252
- // setTimeout(config.removeMaskFunction??avoid,random(4000,1000))
253
261
  config.removeMaskFunction?.()
254
262
  })
255
263
  }
@@ -278,8 +286,8 @@ export default class JRSubmit extends React.Component {
278
286
  }
279
287
 
280
288
  showMessage(success,message){
281
- po('success',success)
282
- po('message',message)
289
+ // po('success',success)
290
+ // po('message',message)
283
291
  }
284
292
 
285
293
  renderer(){
@@ -43,7 +43,7 @@ export const StyledJRTable=styled.div`
43
43
  top: 0;
44
44
 
45
45
  th{
46
- xposition: relative;
46
+ position: relative;
47
47
  padding: 2px 6px;
48
48
  background: linear-gradient(180deg, rgba(227, 227, 226, 1) 0%, rgba(255, 255, 255, 1) 25%, rgba(210, 210, 210, 1) 100%);
49
49
  box-shadow: 2px 2px 2px 0 #ffffffd6 inset, -1px -1px 2px 0px #8a847dbf inset;