@wavemaker/app-rn-runtime 11.14.1-18.6428 → 11.14.1-18.6429
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/core/viewport.js +13 -8
- package/core/viewport.js.map +1 -1
- package/npm-shrinkwrap.json +7 -7
- package/package-lock.json +7 -7
- package/package.json +2 -2
package/core/viewport.js
CHANGED
|
@@ -25,18 +25,23 @@ export class ViewPort extends EventNotifier {
|
|
|
25
25
|
Dimensions.addEventListener('change', () => {
|
|
26
26
|
const dim = Dimensions.get('window');
|
|
27
27
|
const orientation = dim.width > dim.height ? SCREEN_ORIENTATION.LANDSCAPE : SCREEN_ORIENTATION.PORTRAIT;
|
|
28
|
+
const oldWidth = this.width;
|
|
29
|
+
const oldHeight = this.height;
|
|
30
|
+
const oldOrientation = this.orientation;
|
|
31
|
+
|
|
32
|
+
// Update dimensions BEFORE notifying subscribers so they get the correct values
|
|
33
|
+
this.width = dim.width;
|
|
34
|
+
this.height = dim.height;
|
|
35
|
+
this.orientation = orientation;
|
|
28
36
|
this.notify(EVENTS.SIZE_CHANGE, [{
|
|
29
|
-
width: dim.width,
|
|
30
|
-
height: dim.height
|
|
31
|
-
}, {
|
|
32
37
|
width: this.width,
|
|
33
38
|
height: this.height
|
|
39
|
+
}, {
|
|
40
|
+
width: oldWidth,
|
|
41
|
+
height: oldHeight
|
|
34
42
|
}]);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if (this.orientation != orientation) {
|
|
38
|
-
this.notify(EVENTS.ORIENTATION_CHANGE, [orientation, this.orientation]);
|
|
39
|
-
this.orientation = orientation;
|
|
43
|
+
if (oldOrientation !== orientation) {
|
|
44
|
+
this.notify(EVENTS.ORIENTATION_CHANGE, [orientation, oldOrientation]);
|
|
40
45
|
}
|
|
41
46
|
});
|
|
42
47
|
}
|
package/core/viewport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Dimensions","EventNotifier","SCREEN_ORIENTATION","LANDSCAPE","PORTRAIT","EVENTS","ORIENTATION_CHANGE","SIZE_CHANGE","ViewPort","constructor","_defineProperty","dim","get","width","height","orientation","addEventListener","notify"],"sources":["viewport.ts"],"sourcesContent":["import { Dimensions } from \"react-native\";\nimport EventNotifier from \"./event-notifier\";\n\n\nexport const SCREEN_ORIENTATION = {\n LANDSCAPE: 'LANDSCAPE',\n PORTRAIT: 'PORTRAIT'\n};\n\nexport const EVENTS = {\n ORIENTATION_CHANGE: 'orientationChange',\n SIZE_CHANGE: 'sizeChange'\n};\n\nexport class ViewPort extends EventNotifier {\n public width: number;\n public height: number;\n public orientation: string;\n public isMobileType = true;\n\n constructor() {\n super();\n const dim = Dimensions.get('window');\n this.width = dim.width;\n this.height = dim.height;\n this.orientation = this.width > this.height ? SCREEN_ORIENTATION.LANDSCAPE: SCREEN_ORIENTATION.PORTRAIT;\n Dimensions.addEventListener('change', () => {\n const dim = Dimensions.get('window');\n const orientation = dim.width > dim.height ? SCREEN_ORIENTATION.LANDSCAPE: SCREEN_ORIENTATION.PORTRAIT;\n this.notify(EVENTS.SIZE_CHANGE, [\n {width:
|
|
1
|
+
{"version":3,"names":["Dimensions","EventNotifier","SCREEN_ORIENTATION","LANDSCAPE","PORTRAIT","EVENTS","ORIENTATION_CHANGE","SIZE_CHANGE","ViewPort","constructor","_defineProperty","dim","get","width","height","orientation","addEventListener","oldWidth","oldHeight","oldOrientation","notify"],"sources":["viewport.ts"],"sourcesContent":["import { Dimensions } from \"react-native\";\nimport EventNotifier from \"./event-notifier\";\n\n\nexport const SCREEN_ORIENTATION = {\n LANDSCAPE: 'LANDSCAPE',\n PORTRAIT: 'PORTRAIT'\n};\n\nexport const EVENTS = {\n ORIENTATION_CHANGE: 'orientationChange',\n SIZE_CHANGE: 'sizeChange'\n};\n\nexport class ViewPort extends EventNotifier {\n public width: number;\n public height: number;\n public orientation: string;\n public isMobileType = true;\n\n constructor() {\n super();\n const dim = Dimensions.get('window');\n this.width = dim.width;\n this.height = dim.height;\n this.orientation = this.width > this.height ? SCREEN_ORIENTATION.LANDSCAPE: SCREEN_ORIENTATION.PORTRAIT;\n Dimensions.addEventListener('change', () => {\n const dim = Dimensions.get('window');\n const orientation = dim.width > dim.height ? SCREEN_ORIENTATION.LANDSCAPE: SCREEN_ORIENTATION.PORTRAIT;\n const oldWidth = this.width;\n const oldHeight = this.height;\n const oldOrientation = this.orientation;\n \n // Update dimensions BEFORE notifying subscribers so they get the correct values\n this.width = dim.width;\n this.height = dim.height;\n this.orientation = orientation;\n \n this.notify(EVENTS.SIZE_CHANGE, [\n {width: this.width, height: this.height}, \n {width: oldWidth, height: oldHeight}\n ]);\n \n if (oldOrientation !== orientation) {\n this.notify(EVENTS.ORIENTATION_CHANGE, [orientation, oldOrientation]);\n }\n });\n }\n}\n\nexport default new ViewPort();"],"mappings":";;;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,OAAOC,aAAa,MAAM,kBAAkB;AAG5C,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,SAAS,EAAE,WAAW;EACtBC,QAAQ,EAAE;AACd,CAAC;AAED,OAAO,MAAMC,MAAM,GAAG;EAClBC,kBAAkB,EAAE,mBAAmB;EACvCC,WAAW,EAAE;AACjB,CAAC;AAED,OAAO,MAAMC,QAAQ,SAASP,aAAa,CAAC;EAMxCQ,WAAWA,CAAA,EAAG;IACV,KAAK,CAAC,CAAC;IAACC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,uBAHU,IAAI;IAItB,MAAMC,GAAG,GAAGX,UAAU,CAACY,GAAG,CAAC,QAAQ,CAAC;IACpC,IAAI,CAACC,KAAK,GAAGF,GAAG,CAACE,KAAK;IACtB,IAAI,CAACC,MAAM,GAAGH,GAAG,CAACG,MAAM;IACxB,IAAI,CAACC,WAAW,GAAG,IAAI,CAACF,KAAK,GAAG,IAAI,CAACC,MAAM,GAAGZ,kBAAkB,CAACC,SAAS,GAAED,kBAAkB,CAACE,QAAQ;IACvGJ,UAAU,CAACgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM;MACxC,MAAML,GAAG,GAAGX,UAAU,CAACY,GAAG,CAAC,QAAQ,CAAC;MACpC,MAAMG,WAAW,GAAGJ,GAAG,CAACE,KAAK,GAAGF,GAAG,CAACG,MAAM,GAAGZ,kBAAkB,CAACC,SAAS,GAAED,kBAAkB,CAACE,QAAQ;MACtG,MAAMa,QAAQ,GAAG,IAAI,CAACJ,KAAK;MAC3B,MAAMK,SAAS,GAAG,IAAI,CAACJ,MAAM;MAC7B,MAAMK,cAAc,GAAG,IAAI,CAACJ,WAAW;;MAEvC;MACA,IAAI,CAACF,KAAK,GAAGF,GAAG,CAACE,KAAK;MACtB,IAAI,CAACC,MAAM,GAAGH,GAAG,CAACG,MAAM;MACxB,IAAI,CAACC,WAAW,GAAGA,WAAW;MAE9B,IAAI,CAACK,MAAM,CAACf,MAAM,CAACE,WAAW,EAAE,CAC5B;QAACM,KAAK,EAAE,IAAI,CAACA,KAAK;QAAEC,MAAM,EAAE,IAAI,CAACA;MAAM,CAAC,EACxC;QAACD,KAAK,EAAEI,QAAQ;QAAEH,MAAM,EAAEI;MAAS,CAAC,CACvC,CAAC;MAEF,IAAIC,cAAc,KAAKJ,WAAW,EAAE;QAChC,IAAI,CAACK,MAAM,CAACf,MAAM,CAACC,kBAAkB,EAAE,CAACS,WAAW,EAAEI,cAAc,CAAC,CAAC;MACzE;IACJ,CAAC,CAAC;EACN;AACJ;AAEA,eAAe,IAAIX,QAAQ,CAAC,CAAC","ignoreList":[]}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/app-rn-runtime",
|
|
3
|
-
"version": "11.14.1-18.
|
|
3
|
+
"version": "11.14.1-18.6429",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/app-rn-runtime",
|
|
9
|
-
"version": "11.14.1-18.
|
|
9
|
+
"version": "11.14.1-18.6429",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@expo/vector-icons": "15.0.2",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@react-navigation/drawer": "7.5.8",
|
|
21
21
|
"@react-navigation/native": "7.1.18",
|
|
22
22
|
"@react-navigation/stack": "7.4.8",
|
|
23
|
-
"@wavemaker/variables": "11.14.1-18.
|
|
23
|
+
"@wavemaker/variables": "11.14.1-18.6429",
|
|
24
24
|
"axios": "1.8.3",
|
|
25
25
|
"color": "4.2.3",
|
|
26
26
|
"cross-env": "7.0.3",
|
|
@@ -6334,8 +6334,8 @@
|
|
|
6334
6334
|
"peer": true
|
|
6335
6335
|
},
|
|
6336
6336
|
"node_modules/@wavemaker/variables": {
|
|
6337
|
-
"version": "11.14.1-18.
|
|
6338
|
-
"integrity": "sha512-
|
|
6337
|
+
"version": "11.14.1-18.6429",
|
|
6338
|
+
"integrity": "sha512-tLx/RQsdlLwz0FweSHsJyaRe03ujKrsS40minUW+/49Qw6MVS94GydCIOwh6bzNgJS3NrsXUfDg/ayxfYezbYA==",
|
|
6339
6339
|
"license": "ISC",
|
|
6340
6340
|
"dependencies": {
|
|
6341
6341
|
"@metrichor/jmespath": "^0.3.1",
|
|
@@ -12517,8 +12517,8 @@
|
|
|
12517
12517
|
}
|
|
12518
12518
|
},
|
|
12519
12519
|
"node_modules/flatted": {
|
|
12520
|
-
"version": "3.4.
|
|
12521
|
-
"integrity": "sha512-
|
|
12520
|
+
"version": "3.4.1",
|
|
12521
|
+
"integrity": "sha512-IxfVbRFVlV8V/yRaGzk0UVIcsKKHMSfYw66T/u4nTwlWteQePsxe//LjudR1AMX4tZW3WFCh3Zqa/sjlqpbURQ==",
|
|
12522
12522
|
"dev": true,
|
|
12523
12523
|
"license": "ISC"
|
|
12524
12524
|
},
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/app-rn-runtime",
|
|
3
|
-
"version": "11.14.1-18.
|
|
3
|
+
"version": "11.14.1-18.6429",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/app-rn-runtime",
|
|
9
|
-
"version": "11.14.1-18.
|
|
9
|
+
"version": "11.14.1-18.6429",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@expo/vector-icons": "15.0.2",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@react-navigation/drawer": "7.5.8",
|
|
21
21
|
"@react-navigation/native": "7.1.18",
|
|
22
22
|
"@react-navigation/stack": "7.4.8",
|
|
23
|
-
"@wavemaker/variables": "11.14.1-18.
|
|
23
|
+
"@wavemaker/variables": "11.14.1-18.6429",
|
|
24
24
|
"axios": "1.8.3",
|
|
25
25
|
"color": "4.2.3",
|
|
26
26
|
"cross-env": "7.0.3",
|
|
@@ -6334,8 +6334,8 @@
|
|
|
6334
6334
|
"peer": true
|
|
6335
6335
|
},
|
|
6336
6336
|
"node_modules/@wavemaker/variables": {
|
|
6337
|
-
"version": "11.14.1-18.
|
|
6338
|
-
"integrity": "sha512-
|
|
6337
|
+
"version": "11.14.1-18.6429",
|
|
6338
|
+
"integrity": "sha512-tLx/RQsdlLwz0FweSHsJyaRe03ujKrsS40minUW+/49Qw6MVS94GydCIOwh6bzNgJS3NrsXUfDg/ayxfYezbYA==",
|
|
6339
6339
|
"license": "ISC",
|
|
6340
6340
|
"dependencies": {
|
|
6341
6341
|
"@metrichor/jmespath": "^0.3.1",
|
|
@@ -12517,8 +12517,8 @@
|
|
|
12517
12517
|
}
|
|
12518
12518
|
},
|
|
12519
12519
|
"node_modules/flatted": {
|
|
12520
|
-
"version": "3.4.
|
|
12521
|
-
"integrity": "sha512-
|
|
12520
|
+
"version": "3.4.1",
|
|
12521
|
+
"integrity": "sha512-IxfVbRFVlV8V/yRaGzk0UVIcsKKHMSfYw66T/u4nTwlWteQePsxe//LjudR1AMX4tZW3WFCh3Zqa/sjlqpbURQ==",
|
|
12522
12522
|
"dev": true,
|
|
12523
12523
|
"license": "ISC"
|
|
12524
12524
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/app-rn-runtime",
|
|
3
|
-
"version": "11.14.1-18.
|
|
3
|
+
"version": "11.14.1-18.6429",
|
|
4
4
|
"description": "''",
|
|
5
5
|
"main": "index",
|
|
6
6
|
"module": "index",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@react-navigation/drawer": "7.5.8",
|
|
60
60
|
"@react-navigation/native": "7.1.18",
|
|
61
61
|
"@react-navigation/stack": "7.4.8",
|
|
62
|
-
"@wavemaker/variables": "11.14.1-18.
|
|
62
|
+
"@wavemaker/variables": "11.14.1-18.6429",
|
|
63
63
|
"axios": "1.8.3",
|
|
64
64
|
"color": "4.2.3",
|
|
65
65
|
"cross-env": "7.0.3",
|