jrs-react 1.2.41 → 1.2.42
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 +4 -41
- package/build/index.js +4 -41
- package/package.json +1 -1
- package/src/components/JRWindow/JRWindow.jsx +4 -16
package/build/index.es.js
CHANGED
|
@@ -4875,41 +4875,11 @@ class Slider$1 extends React__default.Component {
|
|
|
4875
4875
|
}
|
|
4876
4876
|
}
|
|
4877
4877
|
|
|
4878
|
-
function styleInject(css, ref) {
|
|
4879
|
-
if ( ref === void 0 ) ref = {};
|
|
4880
|
-
var insertAt = ref.insertAt;
|
|
4881
|
-
|
|
4882
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
4883
|
-
|
|
4884
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
4885
|
-
var style = document.createElement('style');
|
|
4886
|
-
style.type = 'text/css';
|
|
4887
|
-
|
|
4888
|
-
if (insertAt === 'top') {
|
|
4889
|
-
if (head.firstChild) {
|
|
4890
|
-
head.insertBefore(style, head.firstChild);
|
|
4891
|
-
} else {
|
|
4892
|
-
head.appendChild(style);
|
|
4893
|
-
}
|
|
4894
|
-
} else {
|
|
4895
|
-
head.appendChild(style);
|
|
4896
|
-
}
|
|
4897
|
-
|
|
4898
|
-
if (style.styleSheet) {
|
|
4899
|
-
style.styleSheet.cssText = css;
|
|
4900
|
-
} else {
|
|
4901
|
-
style.appendChild(document.createTextNode(css));
|
|
4902
|
-
}
|
|
4903
|
-
}
|
|
4904
|
-
|
|
4905
|
-
var css_248z = ".Style-module_test__LrdEc{border:1px solid red;color:red}.Style-module_withMask__LPcai{overflow:hidden!important;position:relative;user-select:none;&:after{a:#868686cc;background:#868686cc;border-radius:inherit;bottom:0;content:\"\";height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}}mask{background:#868686cc;border-radius:inherit;bottom:0;height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}";
|
|
4906
|
-
styleInject(css_248z);
|
|
4907
|
-
|
|
4908
4878
|
const StyledBackdrop = styled.div`
|
|
4909
4879
|
${({
|
|
4910
4880
|
$zIndex
|
|
4911
4881
|
}) => $zIndex != null ? `z-index:${$zIndex};` : null}
|
|
4912
|
-
background :
|
|
4882
|
+
background : rgba(0, 0, 0, 0.25);
|
|
4913
4883
|
height:100vh;
|
|
4914
4884
|
width:100vw;
|
|
4915
4885
|
position: fixed;
|
|
@@ -4971,7 +4941,7 @@ class Backdrop extends JRHTML {
|
|
|
4971
4941
|
backdropConfig = {
|
|
4972
4942
|
yo: 'div',
|
|
4973
4943
|
style: {
|
|
4974
|
-
background: '
|
|
4944
|
+
background: 'rgba(0, 0, 0, 0.25)',
|
|
4975
4945
|
height: '100%',
|
|
4976
4946
|
width: '100%',
|
|
4977
4947
|
position: 'absolute',
|
|
@@ -4981,7 +4951,6 @@ class Backdrop extends JRHTML {
|
|
|
4981
4951
|
};
|
|
4982
4952
|
show() {
|
|
4983
4953
|
this.backdrop = this.agregarHijo(this.backdropConfig);
|
|
4984
|
-
po('this.hijos', this.hijos);
|
|
4985
4954
|
}
|
|
4986
4955
|
hide() {
|
|
4987
4956
|
this.yo.removeChild(this.yo.children[this.yo.children.length - 1]);
|
|
@@ -5002,7 +4971,6 @@ class JRWindow extends JRFrame {
|
|
|
5002
4971
|
}
|
|
5003
4972
|
createBackdrop() {
|
|
5004
4973
|
if (typeof this.props.backdrop === 'string') {
|
|
5005
|
-
po('find and create backdrop', this.props.backdrop);
|
|
5006
4974
|
const target = document.getElementById(this.props.backdrop);
|
|
5007
4975
|
if (target) {
|
|
5008
4976
|
this.backdropTarget = new Backdrop({
|
|
@@ -5042,22 +5010,17 @@ class JRWindow extends JRFrame {
|
|
|
5042
5010
|
|
|
5043
5011
|
componentDidMount() {
|
|
5044
5012
|
super.componentDidMount();
|
|
5045
|
-
po('-------------------------componentDidMount-------------------------');
|
|
5046
5013
|
this.createBackdrop();
|
|
5047
|
-
// if(this.props.backdrop && this.props.open){
|
|
5048
|
-
// this.backdropTarget.show()
|
|
5049
|
-
// }
|
|
5050
|
-
|
|
5051
5014
|
if (this.props.open) {
|
|
5052
5015
|
this.open();
|
|
5053
5016
|
}
|
|
5054
5017
|
}
|
|
5055
5018
|
open() {
|
|
5056
|
-
this.backdropTarget
|
|
5019
|
+
this.backdropTarget?.show();
|
|
5057
5020
|
this.props.onOpen?.bind(this)();
|
|
5058
5021
|
}
|
|
5059
5022
|
close() {
|
|
5060
|
-
this.backdropTarget
|
|
5023
|
+
this.backdropTarget?.hide();
|
|
5061
5024
|
this.props.onClose?.bind(this)();
|
|
5062
5025
|
}
|
|
5063
5026
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
package/build/index.js
CHANGED
|
@@ -4902,41 +4902,11 @@ class Slider$1 extends React__default["default"].Component {
|
|
|
4902
4902
|
}
|
|
4903
4903
|
}
|
|
4904
4904
|
|
|
4905
|
-
function styleInject(css, ref) {
|
|
4906
|
-
if ( ref === void 0 ) ref = {};
|
|
4907
|
-
var insertAt = ref.insertAt;
|
|
4908
|
-
|
|
4909
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
4910
|
-
|
|
4911
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
4912
|
-
var style = document.createElement('style');
|
|
4913
|
-
style.type = 'text/css';
|
|
4914
|
-
|
|
4915
|
-
if (insertAt === 'top') {
|
|
4916
|
-
if (head.firstChild) {
|
|
4917
|
-
head.insertBefore(style, head.firstChild);
|
|
4918
|
-
} else {
|
|
4919
|
-
head.appendChild(style);
|
|
4920
|
-
}
|
|
4921
|
-
} else {
|
|
4922
|
-
head.appendChild(style);
|
|
4923
|
-
}
|
|
4924
|
-
|
|
4925
|
-
if (style.styleSheet) {
|
|
4926
|
-
style.styleSheet.cssText = css;
|
|
4927
|
-
} else {
|
|
4928
|
-
style.appendChild(document.createTextNode(css));
|
|
4929
|
-
}
|
|
4930
|
-
}
|
|
4931
|
-
|
|
4932
|
-
var css_248z = ".Style-module_test__LrdEc{border:1px solid red;color:red}.Style-module_withMask__LPcai{overflow:hidden!important;position:relative;user-select:none;&:after{a:#868686cc;background:#868686cc;border-radius:inherit;bottom:0;content:\"\";height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}}mask{background:#868686cc;border-radius:inherit;bottom:0;height:10000px;left:0;position:absolute;right:0;top:0;width:10000px}";
|
|
4933
|
-
styleInject(css_248z);
|
|
4934
|
-
|
|
4935
4905
|
const StyledBackdrop = styled__default["default"].div`
|
|
4936
4906
|
${({
|
|
4937
4907
|
$zIndex
|
|
4938
4908
|
}) => $zIndex != null ? `z-index:${$zIndex};` : null}
|
|
4939
|
-
background :
|
|
4909
|
+
background : rgba(0, 0, 0, 0.25);
|
|
4940
4910
|
height:100vh;
|
|
4941
4911
|
width:100vw;
|
|
4942
4912
|
position: fixed;
|
|
@@ -4998,7 +4968,7 @@ class Backdrop extends JRHTML {
|
|
|
4998
4968
|
backdropConfig = {
|
|
4999
4969
|
yo: 'div',
|
|
5000
4970
|
style: {
|
|
5001
|
-
background: '
|
|
4971
|
+
background: 'rgba(0, 0, 0, 0.25)',
|
|
5002
4972
|
height: '100%',
|
|
5003
4973
|
width: '100%',
|
|
5004
4974
|
position: 'absolute',
|
|
@@ -5008,7 +4978,6 @@ class Backdrop extends JRHTML {
|
|
|
5008
4978
|
};
|
|
5009
4979
|
show() {
|
|
5010
4980
|
this.backdrop = this.agregarHijo(this.backdropConfig);
|
|
5011
|
-
po('this.hijos', this.hijos);
|
|
5012
4981
|
}
|
|
5013
4982
|
hide() {
|
|
5014
4983
|
this.yo.removeChild(this.yo.children[this.yo.children.length - 1]);
|
|
@@ -5029,7 +4998,6 @@ class JRWindow extends JRFrame {
|
|
|
5029
4998
|
}
|
|
5030
4999
|
createBackdrop() {
|
|
5031
5000
|
if (typeof this.props.backdrop === 'string') {
|
|
5032
|
-
po('find and create backdrop', this.props.backdrop);
|
|
5033
5001
|
const target = document.getElementById(this.props.backdrop);
|
|
5034
5002
|
if (target) {
|
|
5035
5003
|
this.backdropTarget = new Backdrop({
|
|
@@ -5069,22 +5037,17 @@ class JRWindow extends JRFrame {
|
|
|
5069
5037
|
|
|
5070
5038
|
componentDidMount() {
|
|
5071
5039
|
super.componentDidMount();
|
|
5072
|
-
po('-------------------------componentDidMount-------------------------');
|
|
5073
5040
|
this.createBackdrop();
|
|
5074
|
-
// if(this.props.backdrop && this.props.open){
|
|
5075
|
-
// this.backdropTarget.show()
|
|
5076
|
-
// }
|
|
5077
|
-
|
|
5078
5041
|
if (this.props.open) {
|
|
5079
5042
|
this.open();
|
|
5080
5043
|
}
|
|
5081
5044
|
}
|
|
5082
5045
|
open() {
|
|
5083
|
-
this.backdropTarget
|
|
5046
|
+
this.backdropTarget?.show();
|
|
5084
5047
|
this.props.onOpen?.bind(this)();
|
|
5085
5048
|
}
|
|
5086
5049
|
close() {
|
|
5087
|
-
this.backdropTarget
|
|
5050
|
+
this.backdropTarget?.hide();
|
|
5088
5051
|
this.props.onClose?.bind(this)();
|
|
5089
5052
|
}
|
|
5090
5053
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
package/package.json
CHANGED
|
@@ -2,15 +2,12 @@ import React from "react";
|
|
|
2
2
|
import JRFrame from "../JRFrame/JRFrame";
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
import TitleBar from "./TitleBar";
|
|
5
|
-
import { po } from "../JRUtils";
|
|
6
5
|
import Sliders from "./Slider";
|
|
7
|
-
import style from './Style.module.css'
|
|
8
6
|
import { JRHTML } from "jrs-js";
|
|
9
|
-
import { background } from "storybook/internal/theming";
|
|
10
7
|
|
|
11
8
|
const StyledBackdrop=styled.div`
|
|
12
9
|
${({$zIndex})=>$zIndex!=null?`z-index:${$zIndex};`:null}
|
|
13
|
-
background :
|
|
10
|
+
background : rgba(0, 0, 0, 0.25);
|
|
14
11
|
height:100vh;
|
|
15
12
|
width:100vw;
|
|
16
13
|
position: fixed;
|
|
@@ -62,7 +59,7 @@ class Backdrop extends JRHTML{
|
|
|
62
59
|
backdropConfig={
|
|
63
60
|
yo:'div'
|
|
64
61
|
,style:{
|
|
65
|
-
background:'
|
|
62
|
+
background:'rgba(0, 0, 0, 0.25)'
|
|
66
63
|
,height: '100%'
|
|
67
64
|
,width: '100%'
|
|
68
65
|
,position: 'absolute'
|
|
@@ -73,7 +70,6 @@ class Backdrop extends JRHTML{
|
|
|
73
70
|
|
|
74
71
|
show(){
|
|
75
72
|
this.backdrop=this.agregarHijo(this.backdropConfig)
|
|
76
|
-
po('this.hijos',this.hijos)
|
|
77
73
|
}
|
|
78
74
|
hide(){
|
|
79
75
|
this.yo.removeChild(this.yo.children[this.yo.children.length-1])
|
|
@@ -97,7 +93,6 @@ export default class JRWindow extends JRFrame {
|
|
|
97
93
|
|
|
98
94
|
createBackdrop(){
|
|
99
95
|
if(typeof this.props.backdrop === 'string'){
|
|
100
|
-
po('find and create backdrop',this.props.backdrop)
|
|
101
96
|
const target=document.getElementById(this.props.backdrop)
|
|
102
97
|
if(target){
|
|
103
98
|
this.backdropTarget=new Backdrop({
|
|
@@ -106,9 +101,7 @@ export default class JRWindow extends JRFrame {
|
|
|
106
101
|
position: 'relative'
|
|
107
102
|
}
|
|
108
103
|
})
|
|
109
|
-
|
|
110
104
|
}
|
|
111
|
-
|
|
112
105
|
}
|
|
113
106
|
}
|
|
114
107
|
|
|
@@ -140,23 +133,18 @@ export default class JRWindow extends JRFrame {
|
|
|
140
133
|
|
|
141
134
|
componentDidMount(){
|
|
142
135
|
super.componentDidMount()
|
|
143
|
-
po('-------------------------componentDidMount-------------------------')
|
|
144
136
|
this.createBackdrop()
|
|
145
|
-
// if(this.props.backdrop && this.props.open){
|
|
146
|
-
// this.backdropTarget.show()
|
|
147
|
-
// }
|
|
148
|
-
|
|
149
137
|
if(this.props.open){
|
|
150
138
|
this.open()
|
|
151
139
|
}
|
|
152
140
|
}
|
|
153
141
|
|
|
154
142
|
open(){
|
|
155
|
-
this.backdropTarget
|
|
143
|
+
this.backdropTarget?.show()
|
|
156
144
|
this.props.onOpen?.bind(this)()
|
|
157
145
|
}
|
|
158
146
|
close(){
|
|
159
|
-
this.backdropTarget
|
|
147
|
+
this.backdropTarget?.hide()
|
|
160
148
|
this.props.onClose?.bind(this)()
|
|
161
149
|
}
|
|
162
150
|
|