@magicpixel/rn-mp-client-sdk 0.12.0 → 1.13.0

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.
Files changed (101) hide show
  1. package/lib/commonjs/common/app-types.js.map +1 -1
  2. package/lib/commonjs/common/constants.js +5 -26
  3. package/lib/commonjs/common/constants.js.map +1 -1
  4. package/lib/commonjs/common/data-store.js +36 -117
  5. package/lib/commonjs/common/data-store.js.map +1 -1
  6. package/lib/commonjs/common/event-bus.js +3 -10
  7. package/lib/commonjs/common/event-bus.js.map +1 -1
  8. package/lib/commonjs/common/logger.js +9 -18
  9. package/lib/commonjs/common/logger.js.map +1 -1
  10. package/lib/commonjs/common/network-service.js +4 -21
  11. package/lib/commonjs/common/network-service.js.map +1 -1
  12. package/lib/commonjs/common/reporter.js +8 -31
  13. package/lib/commonjs/common/reporter.js.map +1 -1
  14. package/lib/commonjs/common/utils.js +64 -65
  15. package/lib/commonjs/common/utils.js.map +1 -1
  16. package/lib/commonjs/coverage/lcov-report/block-navigation.js +6 -19
  17. package/lib/commonjs/coverage/lcov-report/block-navigation.js.map +1 -1
  18. package/lib/commonjs/coverage/lcov-report/prettify.js +2 -182
  19. package/lib/commonjs/coverage/lcov-report/prettify.js.map +1 -1
  20. package/lib/commonjs/coverage/lcov-report/sorter.js +64 -94
  21. package/lib/commonjs/coverage/lcov-report/sorter.js.map +1 -1
  22. package/lib/commonjs/eedl/eedl.js +207 -84
  23. package/lib/commonjs/eedl/eedl.js.map +1 -1
  24. package/lib/commonjs/index.js +104 -95
  25. package/lib/commonjs/index.js.map +1 -1
  26. package/lib/commonjs/models/geo-api-response.js +2 -0
  27. package/lib/commonjs/models/geo-api-response.js.map +1 -0
  28. package/lib/commonjs/models/mp-client-sdk.js +3 -11
  29. package/lib/commonjs/models/mp-client-sdk.js.map +1 -1
  30. package/lib/commonjs/processors/data-element.processor.js +85 -80
  31. package/lib/commonjs/processors/data-element.processor.js.map +1 -1
  32. package/lib/commonjs/processors/geo-location.processor.js +70 -0
  33. package/lib/commonjs/processors/geo-location.processor.js.map +1 -0
  34. package/lib/commonjs/processors/qc.processor.js +2 -25
  35. package/lib/commonjs/processors/qc.processor.js.map +1 -1
  36. package/lib/commonjs/processors/tag.processor.js +17 -86
  37. package/lib/commonjs/processors/tag.processor.js.map +1 -1
  38. package/lib/commonjs/processors/trans-function.processor.js +5 -23
  39. package/lib/commonjs/processors/trans-function.processor.js.map +1 -1
  40. package/lib/commonjs/processors/visit-id.processor.js +4 -50
  41. package/lib/commonjs/processors/visit-id.processor.js.map +1 -1
  42. package/lib/module/common/app-types.js.map +1 -1
  43. package/lib/module/common/constants.js +4 -22
  44. package/lib/module/common/constants.js.map +1 -1
  45. package/lib/module/common/data-store.js +35 -108
  46. package/lib/module/common/data-store.js.map +1 -1
  47. package/lib/module/common/event-bus.js +3 -6
  48. package/lib/module/common/event-bus.js.map +1 -1
  49. package/lib/module/common/logger.js +9 -16
  50. package/lib/module/common/logger.js.map +1 -1
  51. package/lib/module/common/network-service.js +4 -11
  52. package/lib/module/common/network-service.js.map +1 -1
  53. package/lib/module/common/reporter.js +8 -19
  54. package/lib/module/common/reporter.js.map +1 -1
  55. package/lib/module/common/utils.js +63 -56
  56. package/lib/module/common/utils.js.map +1 -1
  57. package/lib/module/coverage/lcov-report/block-navigation.js +6 -19
  58. package/lib/module/coverage/lcov-report/block-navigation.js.map +1 -1
  59. package/lib/module/coverage/lcov-report/prettify.js +2 -182
  60. package/lib/module/coverage/lcov-report/prettify.js.map +1 -1
  61. package/lib/module/coverage/lcov-report/sorter.js +64 -94
  62. package/lib/module/coverage/lcov-report/sorter.js.map +1 -1
  63. package/lib/module/eedl/eedl.js +206 -76
  64. package/lib/module/eedl/eedl.js.map +1 -1
  65. package/lib/module/index.js +102 -57
  66. package/lib/module/index.js.map +1 -1
  67. package/lib/module/models/geo-api-response.js +2 -0
  68. package/lib/module/models/geo-api-response.js.map +1 -0
  69. package/lib/module/models/mp-client-sdk.js +0 -5
  70. package/lib/module/models/mp-client-sdk.js.map +1 -1
  71. package/lib/module/processors/data-element.processor.js +82 -71
  72. package/lib/module/processors/data-element.processor.js.map +1 -1
  73. package/lib/module/processors/geo-location.processor.js +63 -0
  74. package/lib/module/processors/geo-location.processor.js.map +1 -0
  75. package/lib/module/processors/qc.processor.js +2 -11
  76. package/lib/module/processors/qc.processor.js.map +1 -1
  77. package/lib/module/processors/tag.processor.js +17 -57
  78. package/lib/module/processors/tag.processor.js.map +1 -1
  79. package/lib/module/processors/trans-function.processor.js +5 -12
  80. package/lib/module/processors/trans-function.processor.js.map +1 -1
  81. package/lib/module/processors/visit-id.processor.js +4 -27
  82. package/lib/module/processors/visit-id.processor.js.map +1 -1
  83. package/lib/typescript/common/app-types.d.ts +3 -0
  84. package/lib/typescript/common/constants.d.ts +1 -0
  85. package/lib/typescript/common/data-store.d.ts +8 -0
  86. package/lib/typescript/common/utils.d.ts +19 -0
  87. package/lib/typescript/eedl/eedl.d.ts +16 -5
  88. package/lib/typescript/index.d.ts +53 -0
  89. package/lib/typescript/models/geo-api-response.d.ts +12 -0
  90. package/lib/typescript/processors/data-element.processor.d.ts +10 -1
  91. package/lib/typescript/processors/geo-location.processor.d.ts +10 -0
  92. package/package.json +25 -15
  93. package/src/common/app-types.ts +3 -0
  94. package/src/common/constants.ts +2 -0
  95. package/src/common/data-store.ts +38 -0
  96. package/src/common/utils.ts +58 -0
  97. package/src/eedl/eedl.ts +241 -18
  98. package/src/index.tsx +98 -3
  99. package/src/models/geo-api-response.ts +13 -0
  100. package/src/processors/data-element.processor.ts +140 -70
  101. package/src/processors/geo-location.processor.ts +91 -0
@@ -1,24 +1,24 @@
1
1
  /* eslint-disable */
2
2
  var jumpToCode = function init() {
3
3
  // Classes of code we would like to highlight in the file view
4
- var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; // Elements to highlight in the file listing view
4
+ var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
5
 
6
- var fileListingElements = ['td.pct.low']; // We don't want to select elements that are direct descendants of another match
6
+ // Elements to highlight in the file listing view
7
+ var fileListingElements = ['td.pct.low'];
7
8
 
9
+ // We don't want to select elements that are direct descendants of another match
8
10
  var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
9
- // Selecter that finds elements on the page to which we can jump
10
11
 
12
+ // Selecter that finds elements on the page to which we can jump
11
13
  var selector = fileListingElements.join(', ') + ', ' + notSelector + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
12
- // The NodeList of matching elements
13
14
 
15
+ // The NodeList of matching elements
14
16
  var missingCoverageElements = document.querySelectorAll(selector);
15
17
  var currentIndex;
16
-
17
18
  function toggleClass(index) {
18
19
  missingCoverageElements.item(currentIndex).classList.remove('highlighted');
19
20
  missingCoverageElements.item(index).classList.add('highlighted');
20
21
  }
21
-
22
22
  function makeCurrent(index) {
23
23
  toggleClass(index);
24
24
  currentIndex = index;
@@ -28,47 +28,35 @@ var jumpToCode = function init() {
28
28
  inline: 'center'
29
29
  });
30
30
  }
31
-
32
31
  function goToPrevious() {
33
32
  var nextIndex = 0;
34
-
35
33
  if (typeof currentIndex !== 'number' || currentIndex === 0) {
36
34
  nextIndex = missingCoverageElements.length - 1;
37
35
  } else if (missingCoverageElements.length > 1) {
38
36
  nextIndex = currentIndex - 1;
39
37
  }
40
-
41
38
  makeCurrent(nextIndex);
42
39
  }
43
-
44
40
  function goToNext() {
45
41
  var nextIndex = 0;
46
-
47
42
  if (typeof currentIndex === 'number' && currentIndex < missingCoverageElements.length - 1) {
48
43
  nextIndex = currentIndex + 1;
49
44
  }
50
-
51
45
  makeCurrent(nextIndex);
52
46
  }
53
-
54
47
  return function jump(event) {
55
48
  if (document.getElementById('fileSearch') === document.activeElement && document.activeElement != null) {
56
49
  // if we're currently focused on the search input, we don't want to navigate
57
50
  return;
58
51
  }
59
-
60
52
  switch (event.which) {
61
53
  case 78: // n
62
-
63
54
  case 74:
64
55
  // j
65
56
  goToNext();
66
57
  break;
67
-
68
58
  case 66: // b
69
-
70
59
  case 75: // k
71
-
72
60
  case 80:
73
61
  // p
74
62
  goToPrevious();
@@ -76,6 +64,5 @@ var jumpToCode = function init() {
76
64
  }
77
65
  };
78
66
  }();
79
-
80
67
  window.addEventListener('keydown', jumpToCode);
81
68
  //# sourceMappingURL=block-navigation.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["jumpToCode","init","missingCoverageClasses","fileListingElements","notSelector","join","selector","missingCoverageElements","document","querySelectorAll","currentIndex","toggleClass","index","item","classList","remove","add","makeCurrent","scrollIntoView","behavior","block","inline","goToPrevious","nextIndex","length","goToNext","jump","event","getElementById","activeElement","which","window","addEventListener"],"sources":["block-navigation.js"],"sourcesContent":["/* eslint-disable */\nvar jumpToCode = (function init() {\n // Classes of code we would like to highlight in the file view\n var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];\n\n // Elements to highlight in the file listing view\n var fileListingElements = ['td.pct.low'];\n\n // We don't want to select elements that are direct descendants of another match\n var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `\n\n // Selecter that finds elements on the page to which we can jump\n var selector =\n fileListingElements.join(', ') +\n ', ' +\n notSelector +\n missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`\n\n // The NodeList of matching elements\n var missingCoverageElements = document.querySelectorAll(selector);\n\n var currentIndex;\n\n function toggleClass(index) {\n missingCoverageElements\n .item(currentIndex)\n .classList.remove('highlighted');\n missingCoverageElements.item(index).classList.add('highlighted');\n }\n\n function makeCurrent(index) {\n toggleClass(index);\n currentIndex = index;\n missingCoverageElements.item(index).scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center'\n });\n }\n\n function goToPrevious() {\n var nextIndex = 0;\n if (typeof currentIndex !== 'number' || currentIndex === 0) {\n nextIndex = missingCoverageElements.length - 1;\n } else if (missingCoverageElements.length > 1) {\n nextIndex = currentIndex - 1;\n }\n\n makeCurrent(nextIndex);\n }\n\n function goToNext() {\n var nextIndex = 0;\n\n if (\n typeof currentIndex === 'number' &&\n currentIndex < missingCoverageElements.length - 1\n ) {\n nextIndex = currentIndex + 1;\n }\n\n makeCurrent(nextIndex);\n }\n\n return function jump(event) {\n if (\n document.getElementById('fileSearch') === document.activeElement &&\n document.activeElement != null\n ) {\n // if we're currently focused on the search input, we don't want to navigate\n return;\n }\n\n switch (event.which) {\n case 78: // n\n case 74: // j\n goToNext();\n break;\n case 66: // b\n case 75: // k\n case 80: // p\n goToPrevious();\n break;\n }\n };\n})();\nwindow.addEventListener('keydown', jumpToCode);\n"],"mappings":"AAAA;AACA,IAAIA,UAAU,GAAI,SAASC,IAAT,GAAgB;EAC9B;EACA,IAAIC,sBAAsB,GAAG,CAAC,aAAD,EAAgB,WAAhB,EAA6B,WAA7B,CAA7B,CAF8B,CAI9B;;EACA,IAAIC,mBAAmB,GAAG,CAAC,YAAD,CAA1B,CAL8B,CAO9B;;EACA,IAAIC,WAAW,GAAG,UAAUF,sBAAsB,CAACG,IAAvB,CAA4B,QAA5B,CAAV,GAAkD,MAApE,CAR8B,CAQ8C;EAE5E;;EACA,IAAIC,QAAQ,GACRH,mBAAmB,CAACE,IAApB,CAAyB,IAAzB,IACA,IADA,GAEAD,WAFA,GAGAF,sBAAsB,CAACG,IAAvB,CAA4B,OAAOD,WAAnC,CAJJ,CAX8B,CAeuB;EAErD;;EACA,IAAIG,uBAAuB,GAAGC,QAAQ,CAACC,gBAAT,CAA0BH,QAA1B,CAA9B;EAEA,IAAII,YAAJ;;EAEA,SAASC,WAAT,CAAqBC,KAArB,EAA4B;IACxBL,uBAAuB,CAClBM,IADL,CACUH,YADV,EAEKI,SAFL,CAEeC,MAFf,CAEsB,aAFtB;IAGAR,uBAAuB,CAACM,IAAxB,CAA6BD,KAA7B,EAAoCE,SAApC,CAA8CE,GAA9C,CAAkD,aAAlD;E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IATR;EAWH,CApBD;AAqBH,CApFgB,EAAjB;;AAqFAS,MAAM,CAACC,gBAAP,CAAwB,SAAxB,EAAmChC,UAAnC"}
1
+ {"version":3,"names":["jumpToCode","init","missingCoverageClasses","fileListingElements","notSelector","join","selector","missingCoverageElements","document","querySelectorAll","currentIndex","toggleClass","index","item","classList","remove","add","makeCurrent","scrollIntoView","behavior","block","inline","goToPrevious","nextIndex","length","goToNext","jump","event","getElementById","activeElement","which","window","addEventListener"],"sources":["block-navigation.js"],"sourcesContent":["/* eslint-disable */\nvar jumpToCode = (function init() {\n // Classes of code we would like to highlight in the file view\n var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];\n\n // Elements to highlight in the file listing view\n var fileListingElements = ['td.pct.low'];\n\n // We don't want to select elements that are direct descendants of another match\n var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `\n\n // Selecter that finds elements on the page to which we can jump\n var selector =\n fileListingElements.join(', ') +\n ', ' +\n notSelector +\n missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`\n\n // The NodeList of matching elements\n var missingCoverageElements = document.querySelectorAll(selector);\n\n var currentIndex;\n\n function toggleClass(index) {\n missingCoverageElements\n .item(currentIndex)\n .classList.remove('highlighted');\n missingCoverageElements.item(index).classList.add('highlighted');\n }\n\n function makeCurrent(index) {\n toggleClass(index);\n currentIndex = index;\n missingCoverageElements.item(index).scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center'\n });\n }\n\n function goToPrevious() {\n var nextIndex = 0;\n if (typeof currentIndex !== 'number' || currentIndex === 0) {\n nextIndex = missingCoverageElements.length - 1;\n } else if (missingCoverageElements.length > 1) {\n nextIndex = currentIndex - 1;\n }\n\n makeCurrent(nextIndex);\n }\n\n function goToNext() {\n var nextIndex = 0;\n\n if (\n typeof currentIndex === 'number' &&\n currentIndex < missingCoverageElements.length - 1\n ) {\n nextIndex = currentIndex + 1;\n }\n\n makeCurrent(nextIndex);\n }\n\n return function jump(event) {\n if (\n document.getElementById('fileSearch') === document.activeElement &&\n document.activeElement != null\n ) {\n // if we're currently focused on the search input, we don't want to navigate\n return;\n }\n\n switch (event.which) {\n case 78: // n\n case 74: // j\n goToNext();\n break;\n case 66: // b\n case 75: // k\n case 80: // p\n goToPrevious();\n break;\n }\n };\n})();\nwindow.addEventListener('keydown', jumpToCode);\n"],"mappings":"AAAA;AACA,IAAIA,UAAU,GAAI,SAASC,IAAIA,CAAA,EAAG;EAC9B;EACA,IAAIC,sBAAsB,GAAG,CAAC,aAAa,EAAE,WAAW,EAAE,WAAW,CAAC;;EAEtE;EACA,IAAIC,mBAAmB,GAAG,CAAC,YAAY,CAAC;;EAExC;EACA,IAAIC,WAAW,GAAG,OAAO,GAAGF,sBAAsB,CAACG,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,CAAC;;EAE5E;EACA,IAAIC,QAAQ,GACRH,mBAAmB,CAACE,IAAI,CAAC,IAAI,CAAC,GAC9B,IAAI,GACJD,WAAW,GACXF,sBAAsB,CAACG,IAAI,CAAC,IAAI,GAAGD,WAAW,CAAC,CAAC,CAAC;;EAErD;EACA,IAAIG,uBAAuB,GAAGC,QAAQ,CAACC,gBAAgB,CAACH,QAAQ,CAAC;EAEjE,IAAII,YAAY;EAEhB,SAASC,WAAWA,CAACC,KAAK,EAAE;IACxBL,uBAAuB,CAClBM,IAAI,CAACH,YAAY,CAAC,CAClBI,SAAS,CAACC,MAAM,CAAC,aAAa,CAAC;IACpCR,uBAAuB,CAACM,IAAI,CAACD,KAAK,CAAC,CAACE,SAAS,CAACE,GAAG,CAAC,aAAa,CAAC;EACpE;EAEA,SAASC,WAAWA,CAACL,KAAK,EAAE;IACxBD,WAAW,CAACC,KAAK,CAAC;IAClBF,YAAY,GAAGE,KAAK;IACpBL,uBAAuB,CAACM,IAAI,CAACD,KAAK,CAAC,CAACM,cAAc,CAAC;MAC/CC,QAAQ,EAAE,QA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