@zohodesk/react-cli 1.1.15-exp.3 → 1.1.16-exp.1
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/README.md +25 -1
- package/lib/postcss-plugins/AutoPrefixer.js +48 -32
- package/lib/utils/getServerURL.js +7 -2
- package/package.json +1 -1
- package/templates/docs/index.html +2 -2
package/README.md
CHANGED
|
@@ -44,13 +44,37 @@ Now to run app
|
|
|
44
44
|
|
|
45
45
|
# Change Logs
|
|
46
46
|
|
|
47
|
-
# 1.1.
|
|
47
|
+
# 1.1.17 (27-10-2023)
|
|
48
48
|
|
|
49
49
|
**Feature:-**
|
|
50
|
+
|
|
50
51
|
- Autoprefixer plugin added to react-cli, enable by having `true` value at `app > plugins > autoPrefixer` and necessary pattern for including files in `app > patterns > autoPrefixer`
|
|
51
52
|
For more info please refer to :
|
|
52
53
|
[details](https://zgit.csez.zohocorpin.com/zohodesk/react-cli/-/blob/2.0.0/docs/AutoPrefixer.md)
|
|
54
|
+
|
|
55
|
+
**Fix :**
|
|
56
|
+
- Proptype title and component name fix done
|
|
53
57
|
|
|
58
|
+
# 1.1.16 (25-10-2023)
|
|
59
|
+
|
|
60
|
+
**Feature:-**
|
|
61
|
+
|
|
62
|
+
- Support for running devURL in a Kubernetes (k8s) environment has been added.
|
|
63
|
+
|
|
64
|
+
In order to support k8's, we need to the change the server url:-
|
|
65
|
+
|
|
66
|
+
Follow the below steps to enable support for k8's in your app:-
|
|
67
|
+
|
|
68
|
+
1.Add the following config in your react-cli.config.js file:-
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
app: {
|
|
72
|
+
server: {
|
|
73
|
+
domain : 'kubernetes'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
54
78
|
# 1.1.15
|
|
55
79
|
|
|
56
80
|
**Feature:-**
|
|
@@ -32,49 +32,57 @@ module.exports = _postcss.default.plugin('autoprefixer', prefixConfig => {
|
|
|
32
32
|
|
|
33
33
|
if (mozRule.name && prefixConfig.browsers && prefixConfig.browsers.mozilla) {
|
|
34
34
|
// custom value need to change
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (!prefixConfig && !prefixConfig.include && !prefixConfig.includes['@keyframes'] && !prefixConfig.include['@keyframes'].mozilla) {
|
|
35
|
+
if (prefixConfig.include['@keyframes'] && !prefixConfig.include['@keyframes'].mozilla && !prefixes['@keyframes'].mozilla) {
|
|
38
36
|
return;
|
|
39
37
|
}
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
mozRule.name = replacements && replacements.mozilla ? replacements.mozilla : prefixes['@keyframes'].mozilla;
|
|
40
|
+
|
|
41
|
+
if (mozRule.name !== undefined) {
|
|
42
|
+
newPrefixes.push(mozRule);
|
|
43
|
+
}
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
const chromeRule = rule.clone(); // custom value need to change
|
|
45
47
|
|
|
46
48
|
if (chromeRule.name && prefixConfig.browsers && prefixConfig.browsers.chrome) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (!prefixConfig && !prefixConfig.include && !prefixConfig.includes['@keyframes'] && !prefixConfig.include['@keyframes'].chrome) {
|
|
49
|
+
if (prefixConfig.include['@keyframes'] && !prefixConfig.include['@keyframes'].chrome && !prefixes['@keyframes'].chrome) {
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
chromeRule.name = replacements && replacements.chrome ? replacements.chrome : prefixes['@keyframes'].chrome;
|
|
54
|
+
|
|
55
|
+
if (chromeRule.name !== undefined) {
|
|
56
|
+
newPrefixes.push(chromeRule);
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
const operaRule = rule.clone(); // custom value need to change
|
|
57
61
|
|
|
58
62
|
if (operaRule.name && prefixConfig.browsers && prefixConfig.browsers.opera) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (!prefixConfig && !prefixConfig.include && !prefixConfig.includes['@keyframes'] && !prefixConfig.include['@keyframes'].opera) {
|
|
63
|
+
if (prefixConfig.include['@keyframes'] && !prefixConfig.include['@keyframes'].opera && !prefixes['@keyframes'].opera) {
|
|
62
64
|
return;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
operaRule.name = replacements && replacements.opera ? replacements.opera : prefixes['@keyframes'].opera;
|
|
68
|
+
|
|
69
|
+
if (operaRule.name !== undefined) {
|
|
70
|
+
newPrefixes.push(operaRule);
|
|
71
|
+
}
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
const ieRule = rule.clone(); // custom value need to change
|
|
69
75
|
|
|
70
76
|
if (ieRule.name && prefixConfig.browsers && prefixConfig.browsers.ie) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (!prefixConfig && !prefixConfig.include && !prefixConfig.includes['@keyframes'] && !prefixConfig.include['@keyframes'].ie) {
|
|
77
|
+
if (prefixConfig.include['@keyframes'] && !prefixConfig.include['@keyframes'].ie && !prefixes['@keyframes'].ie) {
|
|
74
78
|
return;
|
|
75
79
|
}
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
ieRule.name = replacements && replacements.ie ? replacements.ie : prefixes['@keyframes'].ie;
|
|
82
|
+
|
|
83
|
+
if (ieRule.name !== undefined) {
|
|
84
|
+
newPrefixes.push(ieRule);
|
|
85
|
+
}
|
|
78
86
|
}
|
|
79
87
|
|
|
80
88
|
rule.parent.insertAfter(rule, newPrefixes); // console.log(`${rule.name} : ${rule.params}`);
|
|
@@ -99,49 +107,57 @@ module.exports = _postcss.default.plugin('autoprefixer', prefixConfig => {
|
|
|
99
107
|
const mozDecl = decl.clone(); // custom value need to change
|
|
100
108
|
|
|
101
109
|
if (mozDecl.prop && prefixConfig.browsers && prefixConfig.browsers.mozilla) {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (!prefixConfig && !prefixConfig.include && !prefixConfig.include[decl.prop] && !prefixConfig.include[decl.prop].mozilla) {
|
|
110
|
+
if (prefixConfig.include[decl.prop] && !prefixConfig.include[decl.prop].mozilla && !prefixes[decl.prop].mozilla) {
|
|
105
111
|
return;
|
|
106
112
|
}
|
|
107
113
|
|
|
108
|
-
|
|
114
|
+
mozDecl.prop = replacements && replacements.mozilla ? replacements.mozilla : prefixes[decl.prop].mozilla;
|
|
115
|
+
|
|
116
|
+
if (mozDecl.prop !== undefined) {
|
|
117
|
+
newPrefixes.push(mozDecl);
|
|
118
|
+
}
|
|
109
119
|
}
|
|
110
120
|
|
|
111
121
|
const chromeDecl = decl.clone(); // custom value need to change
|
|
112
122
|
|
|
113
123
|
if (chromeDecl.prop && prefixConfig.browsers && prefixConfig.browsers.chrome) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (!prefixConfig && !prefixConfig.include && !prefixConfig.include[decl.prop] && !prefixConfig.include[decl.prop].chrome) {
|
|
124
|
+
if (prefixConfig.include[decl.prop] && !prefixConfig.include[decl.prop].chrome && !prefixes[decl.prop].chrome) {
|
|
117
125
|
return;
|
|
118
126
|
}
|
|
119
127
|
|
|
120
|
-
|
|
128
|
+
chromeDecl.prop = replacements && replacements.chrome ? replacements.chrome : prefixes[decl.prop].chrome;
|
|
129
|
+
|
|
130
|
+
if (chromeDecl.prop !== undefined) {
|
|
131
|
+
newPrefixes.push(chromeDecl);
|
|
132
|
+
}
|
|
121
133
|
}
|
|
122
134
|
|
|
123
135
|
const operaDecl = decl.clone(); // custom value need to change
|
|
124
136
|
|
|
125
137
|
if (operaDecl.prop && prefixConfig.browsers && prefixConfig.browsers.opera) {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
if (!prefixConfig && !prefixConfig.include && !prefixConfig.include[decl.prop] && !prefixConfig.include[decl.prop].opera) {
|
|
138
|
+
if (prefixConfig.include[decl.prop] && !prefixConfig.include[decl.prop].opera && !prefixes[decl.prop].opera) {
|
|
129
139
|
return;
|
|
130
140
|
}
|
|
131
141
|
|
|
132
|
-
|
|
142
|
+
operaDecl.prop = replacements && replacements.opera ? replacements.opera : prefixes[decl.prop].opera;
|
|
143
|
+
|
|
144
|
+
if (operaDecl.prop !== undefined) {
|
|
145
|
+
newPrefixes.push(operaDecl);
|
|
146
|
+
}
|
|
133
147
|
}
|
|
134
148
|
|
|
135
149
|
const ieDecl = decl.clone(); // custom value need to change
|
|
136
150
|
|
|
137
151
|
if (ieDecl.prop && prefixConfig.browsers && prefixConfig.browsers.ie) {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
if (!prefixConfig && !prefixConfig.include && !prefixConfig.include[decl.prop] && !prefixConfig.include[decl.prop].ie) {
|
|
152
|
+
if (prefixConfig.include[decl.prop] && !prefixConfig.include[decl.prop].ie && !prefixes[decl.prop].ie) {
|
|
141
153
|
return;
|
|
142
154
|
}
|
|
143
155
|
|
|
144
|
-
|
|
156
|
+
ieDecl.prop = replacements && replacements.ie ? replacements.ie : prefixes[decl.prop].ie;
|
|
157
|
+
|
|
158
|
+
if (ieDecl.prop !== undefined) {
|
|
159
|
+
newPrefixes.push(ieDecl);
|
|
160
|
+
}
|
|
145
161
|
}
|
|
146
162
|
|
|
147
163
|
decl.parent.insertAfter(decl, newPrefixes); // console.log(`${decl.prop} : ${decl.value}`);
|
|
@@ -5,13 +5,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const getServerURL = (serverInfo, protocol) => {
|
|
9
|
+
// eslint-disable-next-line prefer-const
|
|
9
10
|
let {
|
|
10
11
|
host,
|
|
11
12
|
domain,
|
|
12
13
|
port
|
|
13
14
|
} = serverInfo;
|
|
14
15
|
|
|
16
|
+
if (domain === 'kubernetes') {
|
|
17
|
+
return `${protocol ? `${protocol}:` : ''}//${host}`;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
if (protocol) {
|
|
16
21
|
if (protocol === 'ht' + 'tp') {
|
|
17
22
|
port = Number(port) + 1;
|
|
@@ -20,7 +25,7 @@ let getServerURL = (serverInfo, protocol) => {
|
|
|
20
25
|
return `${protocol ? `${protocol}:` : ''}//${host}.${domain}.zohocorpin.com:${Number(port) + 1}`;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
|
-
return `${protocol ? `${protocol}:` : ''}//${host}:${port}`;
|
|
28
|
+
return `${protocol ? `${protocol}:` : ''}//${host}:${Number(port) + 1}`;
|
|
24
29
|
}
|
|
25
30
|
}
|
|
26
31
|
|
package/package.json
CHANGED
|
@@ -685,7 +685,7 @@
|
|
|
685
685
|
compName ?
|
|
686
686
|
<div className="flexshrink cheader">
|
|
687
687
|
<div className="dflex flexrow flexbasis alignVertical">
|
|
688
|
-
<div className="flexshrink"><h1 className="cheadertitle">{compName && compName.split('__')[
|
|
688
|
+
<div className="flexshrink"><h1 className="cheadertitle">{compName && compName.split('__')[compName.split('__').length -1]}</h1></div>
|
|
689
689
|
<div className='flexgrow flexbasis infoTabs dflex'>
|
|
690
690
|
<span onClick={this.onTabinfo.bind(this, 'component')} className={infoTab == 'component' ? 'dotted infoactive' : 'dotted'}>Component view</span>
|
|
691
691
|
<span onClick={this.onTabinfo.bind(this, 'proptypes')} className={infoTab == 'proptypes' ? 'dotted infoactive' : 'dotted'}>PropTypes</span>
|
|
@@ -901,7 +901,7 @@
|
|
|
901
901
|
})
|
|
902
902
|
) : (
|
|
903
903
|
<div className='propsTableContainer'>
|
|
904
|
-
<div className="compName">{compName.split('
|
|
904
|
+
<div className="compName">{compName.split('__')[compName.split('__').length -1]}</div>
|
|
905
905
|
<div className="propsTable">
|
|
906
906
|
<div className="tableHeader">
|
|
907
907
|
<span className="brR">PropsName</span>
|