@widergy/utilitygo-smart-bill-mobile 1.1.12 → 2.0.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 (163) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/package.json +51 -53
  3. package/src/lib/components/Advice/index.js +1 -1
  4. package/src/lib/components/Advice/styles.js +6 -6
  5. package/src/lib/components/Banner/index.js +1 -1
  6. package/src/lib/components/Banner/styles.js +3 -3
  7. package/src/lib/components/BillCalculation/components/ConceptCard/index.js +5 -5
  8. package/src/lib/components/BillCalculation/components/ConceptCard/styles.js +12 -12
  9. package/src/lib/components/BillCalculation/components/DetailModalContent/index.js +8 -8
  10. package/src/lib/components/BillCalculation/components/DetailModalContent/styles.js +12 -12
  11. package/src/lib/components/BillCalculation/index.js +6 -5
  12. package/src/lib/components/BillCalculation/styles.js +12 -12
  13. package/src/lib/components/BillSummary/components/BillRate/index.js +7 -9
  14. package/src/lib/components/BillSummary/components/BillRate/styles.js +3 -3
  15. package/src/lib/components/BillSummary/components/ConceptSummary/components/ConceptBar/index.js +4 -4
  16. package/src/lib/components/BillSummary/components/ConceptSummary/components/ConceptBar/styles.js +8 -8
  17. package/src/lib/components/BillSummary/components/ConceptSummary/components/ConceptLine/index.js +4 -5
  18. package/src/lib/components/BillSummary/components/ConceptSummary/components/ConceptLine/styles.js +8 -8
  19. package/src/lib/components/BillSummary/components/ConceptSummary/components/PieChart/index.js +4 -7
  20. package/src/lib/components/BillSummary/components/ConceptSummary/index.js +8 -8
  21. package/src/lib/components/BillSummary/components/ConceptSummary/styles.js +12 -12
  22. package/src/lib/components/BillSummary/components/Header/index.js +4 -4
  23. package/src/lib/components/BillSummary/components/Header/styles.js +7 -7
  24. package/src/lib/components/BillSummary/components/PercentageComparison/index.js +1 -1
  25. package/src/lib/components/BillSummary/components/PercentageComparison/styles.js +8 -8
  26. package/src/lib/components/BillSummary/components/PercentageComparison/utils.js +3 -3
  27. package/src/lib/components/BillSummary/components/RateCard/index.js +1 -1
  28. package/src/lib/components/BillSummary/components/RateCard/styles.js +2 -2
  29. package/src/lib/components/BillSummary/index.js +1 -1
  30. package/src/lib/components/BillSummary/styles.js +4 -4
  31. package/src/lib/components/BilledConsumption/components/ConsumptionInfo/components/InfoCard/components/ConsumptionInfoCard/index.js +5 -5
  32. package/src/lib/components/BilledConsumption/components/ConsumptionInfo/components/InfoCard/components/SettlementInfoCard/index.js +5 -5
  33. package/src/lib/components/BilledConsumption/components/ConsumptionInfo/components/InfoCard/index.js +6 -6
  34. package/src/lib/components/BilledConsumption/components/ConsumptionInfo/components/InfoCard/styles.js +21 -21
  35. package/src/lib/components/BilledConsumption/components/ConsumptionInfo/components/Line/index.js +2 -2
  36. package/src/lib/components/BilledConsumption/components/ConsumptionInfo/components/Line/styles.js +4 -4
  37. package/src/lib/components/BilledConsumption/components/ConsumptionInfo/index.js +1 -1
  38. package/src/lib/components/BilledConsumption/components/ConsumptionInfo/styles.js +2 -2
  39. package/src/lib/components/BilledConsumption/index.js +6 -6
  40. package/src/lib/components/BilledConsumption/styles.js +2 -2
  41. package/src/lib/components/BilledConsumption/utils.js +4 -4
  42. package/src/lib/components/CategoryLabel/index.js +1 -1
  43. package/src/lib/components/CategoryLabel/styles.js +2 -2
  44. package/src/lib/components/ConsumptionCard/index.js +1 -1
  45. package/src/lib/components/ConsumptionCard/styles.js +7 -7
  46. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +1 -1
  47. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/styles.js +3 -3
  48. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +2 -2
  49. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/components/Season/styles.js +3 -3
  50. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +4 -4
  51. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/constants.js +1 -1
  52. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/index.js +4 -4
  53. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/styles.js +7 -7
  54. package/src/lib/components/ConsumptionComparison/components/ComparisonTable/utils.js +18 -18
  55. package/src/lib/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +3 -3
  56. package/src/lib/components/ConsumptionComparison/components/ConsumptionAdvice/styles.js +8 -8
  57. package/src/lib/components/ConsumptionComparison/components/PercentageComparison/index.js +4 -4
  58. package/src/lib/components/ConsumptionComparison/components/PercentageComparison/styles.js +8 -8
  59. package/src/lib/components/ConsumptionComparison/components/PercentageComparison/utils.js +3 -3
  60. package/src/lib/components/ConsumptionComparison/components/SeasonAdvice/index.js +1 -1
  61. package/src/lib/components/ConsumptionComparison/components/SeasonAdvice/styles.js +4 -4
  62. package/src/lib/components/ConsumptionComparison/components/SeasonAdvice/utils.js +4 -4
  63. package/src/lib/components/ConsumptionComparison/index.js +2 -2
  64. package/src/lib/components/ConsumptionComparison/styles.js +4 -4
  65. package/src/lib/components/ConsumptionPeriod/components/ConsumptionDetail/index.js +9 -9
  66. package/src/lib/components/ConsumptionPeriod/components/ConsumptionDetail/styles.js +9 -9
  67. package/src/lib/components/ConsumptionPeriod/components/HistoryChart/components/Column/index.js +6 -6
  68. package/src/lib/components/ConsumptionPeriod/components/HistoryChart/index.js +6 -10
  69. package/src/lib/components/ConsumptionPeriod/components/HistoryChart/styles.js +5 -5
  70. package/src/lib/components/ConsumptionPeriod/components/HistoryChart/utils.js +3 -3
  71. package/src/lib/components/ConsumptionPeriod/components/LectureDetail/index.js +6 -6
  72. package/src/lib/components/ConsumptionPeriod/components/LectureDetail/styles.js +7 -7
  73. package/src/lib/components/ConsumptionPeriod/index.js +2 -2
  74. package/src/lib/components/ConsumptionPeriod/styles.js +3 -3
  75. package/src/lib/components/ConsumptionPeriod/utils.js +13 -13
  76. package/src/lib/components/DebtStatusBadge/index.js +4 -4
  77. package/src/lib/components/DebtStatusBadge/styles.js +8 -8
  78. package/src/lib/components/DigitalBillAdherenceBadge/index.js +4 -4
  79. package/src/lib/components/DigitalBillAdherenceBadge/styles.js +4 -4
  80. package/src/lib/components/ExternalLink/index.js +1 -1
  81. package/src/lib/components/IconAndDetails/index.js +2 -2
  82. package/src/lib/components/IconAndDetails/styles.js +5 -5
  83. package/src/lib/components/Magnitude/index.js +3 -3
  84. package/src/lib/components/Magnitude/styles.js +1 -1
  85. package/src/lib/components/Magnitude/utils.js +2 -2
  86. package/src/lib/components/MainBillData/components/AmountData/index.js +4 -4
  87. package/src/lib/components/MainBillData/components/AmountData/styles.js +5 -5
  88. package/src/lib/components/MainBillData/components/ConsumptionData/components/DataBySettlement/index.js +6 -6
  89. package/src/lib/components/MainBillData/components/ConsumptionData/components/DataBySettlement/styles.js +9 -9
  90. package/src/lib/components/MainBillData/components/ConsumptionData/index.js +8 -7
  91. package/src/lib/components/MainBillData/components/ConsumptionData/styles.js +9 -9
  92. package/src/lib/components/MainBillData/components/ConsumptionData/utils.js +2 -2
  93. package/src/lib/components/MainBillData/components/InitialData/index.js +4 -4
  94. package/src/lib/components/MainBillData/components/InitialData/styles.js +13 -13
  95. package/src/lib/components/MainBillData/components/MeasurementInfo/index.js +4 -4
  96. package/src/lib/components/MainBillData/components/MeasurementInfo/styles.js +6 -6
  97. package/src/lib/components/MainBillData/components/MeasurementInfo/utils.js +7 -7
  98. package/src/lib/components/MainBillData/components/OwnerData/index.js +4 -4
  99. package/src/lib/components/MainBillData/components/OwnerData/styles.js +5 -5
  100. package/src/lib/components/MainBillData/components/OwnerData/utils.js +7 -7
  101. package/src/lib/components/MainBillData/components/ParticularConditions/index.js +6 -6
  102. package/src/lib/components/MainBillData/components/ParticularConditions/styles.js +17 -17
  103. package/src/lib/components/MainBillData/index.js +3 -3
  104. package/src/lib/components/MainBillData/styles.js +2 -2
  105. package/src/lib/components/MainContainer/styles.js +2 -2
  106. package/src/lib/components/NumberWithSuperIndex/index.js +3 -3
  107. package/src/lib/components/NumberWithSuperIndex/styles.js +5 -3
  108. package/src/lib/components/PeriodCard/index.js +4 -4
  109. package/src/lib/components/PeriodCard/styles.js +7 -7
  110. package/src/lib/components/PowerConsumptionData/constants.js +1 -1
  111. package/src/lib/components/PowerConsumptionData/index.js +3 -3
  112. package/src/lib/components/PowerConsumptionData/styles.js +12 -12
  113. package/src/lib/components/PowerConsumptionGraphic/index.js +5 -5
  114. package/src/lib/components/PowerConsumptionGraphic/styles.js +17 -17
  115. package/src/lib/components/RateAndCategory/index.js +1 -1
  116. package/src/lib/components/RateAndCategory/styles.js +3 -3
  117. package/src/lib/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +2 -2
  118. package/src/lib/components/RatesDefinition/components/BillRate/components/RatePrices/styles.js +8 -8
  119. package/src/lib/components/RatesDefinition/components/BillRate/index.js +2 -2
  120. package/src/lib/components/RatesDefinition/components/BillRate/styles.js +9 -9
  121. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/styles.js +3 -3
  122. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +3 -3
  123. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/styles.js +2 -2
  124. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +4 -4
  125. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/styles.js +5 -5
  126. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +2 -2
  127. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/styles.js +1 -1
  128. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorIcon/index.js +2 -2
  129. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorIcon/styles.js +2 -2
  130. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +1 -1
  131. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.js +4 -4
  132. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +1 -1
  133. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +1 -1
  134. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/styles.js +2 -2
  135. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/index.js +1 -1
  136. package/src/lib/components/RatesDefinition/components/CategoryByConsumption/styles.js +11 -11
  137. package/src/lib/components/RatesDefinition/components/PurchasedRate/index.js +1 -1
  138. package/src/lib/components/RatesDefinition/components/PurchasedRate/styles.js +5 -5
  139. package/src/lib/components/RatesDefinition/index.js +1 -1
  140. package/src/lib/components/RatesDefinition/styles.js +2 -2
  141. package/src/lib/components/SmartBillProvider/index.js +1 -1
  142. package/src/lib/components/TicketBorder/index.js +1 -1
  143. package/src/lib/components/TicketBorder/styles.js +3 -3
  144. package/src/lib/constants/consumptions.js +4 -4
  145. package/src/lib/constants/periodicities.js +1 -1
  146. package/src/lib/constants/rates.js +1 -1
  147. package/src/lib/constants/readings.js +2 -2
  148. package/src/lib/constants/seasons.js +7 -7
  149. package/src/lib/index.js +1 -1
  150. package/src/lib/types/assetsTypes.js +1 -1
  151. package/src/lib/types/billDataTypes.js +19 -19
  152. package/src/lib/types/componentsTypes.js +2 -2
  153. package/src/lib/types/formattersTypes.js +1 -1
  154. package/src/lib/types/rateStagesTypes.js +2 -2
  155. package/src/lib/types/smartBillTypes.js +2 -2
  156. package/src/lib/types/textsTypes.js +8 -8
  157. package/src/lib/utils/billCalculation.js +1 -1
  158. package/src/lib/utils/consumptions.js +8 -8
  159. package/src/lib/utils/context.js +1 -1
  160. package/src/lib/utils/periods.js +1 -1
  161. package/src/lib/utils/readings.js +4 -4
  162. package/src/lib/utils/season.js +1 -1
  163. package/src/lib/utils/stagesGraph.js +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # [2.0.0](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/compare/v1.1.12...v2.0.0) (2023-11-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * mayor release ([#27](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/issues/27)) ([558cb86](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/commit/558cb86e2d19f1997a527685e92673811bffbff8))
7
+ * package ([#28](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/issues/28)) ([9fca7c8](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/commit/9fca7c80d92fb6b31eb7de741b7d80b3a59cefa7))
8
+ * version bump ([#26](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/issues/26)) ([b7ed4ce](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/commit/b7ed4ce2f85056827b9ca73bde4d558ee5108da3))
9
+
10
+
11
+ ### BREAKING CHANGES
12
+
13
+ * new dependencies finally
14
+ * new dependencies finally
15
+ * dependencies update
16
+ * dependencies update
17
+
1
18
  ## [1.1.12](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/compare/v1.1.11...v1.1.12) (2023-11-15)
2
19
 
3
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/utilitygo-smart-bill-mobile",
3
- "version": "1.1.12",
3
+ "version": "2.0.0",
4
4
  "description": "UtilityGO SmartBill Mobile",
5
5
  "license": "MIT",
6
6
  "main": "src/lib/index.js",
@@ -12,34 +12,41 @@
12
12
  "react-native": "*"
13
13
  },
14
14
  "devDependencies": {
15
- "@babel/cli": "^7.4.4",
16
- "@babel/core": "^7.12.9",
17
- "@babel/runtime": "^7.12.5",
18
- "@commitlint/cli": "^8.2.0",
19
- "@commitlint/config-conventional": "^8.2.0",
20
- "@react-native-community/eslint-config": "^2.0.0",
15
+ "@babel/cli": "^7.22.10",
16
+ "@babel/core": "^7.22.10",
17
+ "@babel/runtime": "^7.22.10",
18
+ "@babel/eslint-parser": "^7.22.10",
19
+ "@babel/preset-env": "^7.22.10",
20
+ "@babel/preset-react": "^7.22.5",
21
+ "@commitlint/cli": "^17.7.1",
22
+ "@commitlint/config-conventional": "^17.7.0",
21
23
  "@widergy/semantic-release-package-config": "^1.0.0",
22
- "babel-eslint": "^10.0.1",
23
- "babel-jest": "^26.6.3",
24
- "babel-plugin-module-resolver": "^4.0.0",
25
- "eslint": "7.14.0",
26
- "eslint-config-airbnb": "^17.1.0",
27
- "eslint-config-prettier": "^3.3.0",
24
+ "babel-jest": "^29.6.2",
25
+ "babel-plugin-module-resolver": "^5.0.0",
26
+ "@react-native/metro-config": "^0.72.11",
27
+ "@tsconfig/react-native": "^3.0.0",
28
+ "@types/react": "^18.0.24",
29
+ "@types/react-test-renderer": "^18.0.0",
30
+ "@react-native/eslint-config": "^0.72.2",
31
+ "eslint": "^8.47.0",
32
+ "eslint-config-airbnb": "^19.0.4",
33
+ "eslint-config-prettier": "^9.0.0",
28
34
  "eslint-import-resolver-babel-module": "^5.1.2",
29
- "eslint-plugin-import": "^2.14.0",
30
- "eslint-plugin-jsx-a11y": "^6.1.2",
31
- "eslint-plugin-prettier": "^3.0.0",
32
- "eslint-plugin-react": "^7.11.1",
33
- "husky": "^4.3.6",
34
- "jest": "^26.6.3",
35
- "lint-staged": "^10.5.3",
36
- "metro-react-native-babel-preset": "^0.66.0",
37
- "prettier": "^1.15.2",
38
- "prettier-eslint": "^8.8.2",
39
- "react": "17.0.2",
40
- "react-native": "0.65.0",
41
- "react-native-codegen": "^0.0.7",
42
- "react-test-renderer": "17.0.1",
35
+ "eslint-plugin-import": "^2.28.0",
36
+ "eslint-plugin-jsx-a11y": "^6.7.1",
37
+ "eslint-plugin-prettier": "^5.0.0",
38
+ "eslint-plugin-react": "^7.33.1",
39
+ "husky": "^8.0.0",
40
+ "jest": "^29.6.2",
41
+ "lint-staged": "^15.0.2",
42
+ "metro-react-native-babel-preset": "^0.77.0",
43
+ "prettier": "^3.0.1",
44
+ "prettier-eslint": "^15.0.1",
45
+ "prop-types": "^15.8.1",
46
+ "react": "18.2.0",
47
+ "react-native": "0.72.6",
48
+ "react-test-renderer": "18.2.0",
49
+ "typescript": "4.8.4",
43
50
  "semantic-release": "^15.13.31"
44
51
  },
45
52
  "scripts": {
@@ -50,38 +57,29 @@
50
57
  "ios": "react-native run-ios",
51
58
  "start": "react-native start",
52
59
  "test": "jest",
53
- "build": "babel src/lib --out-dir dist"
60
+ "build": "babel src/lib --out-dir dist",
61
+ "prepare": "husky install"
54
62
  },
55
63
  "dependencies": {
56
64
  "@react-native-community/art": "^1.2.0",
57
- "@react-native-community/viewpager": "^4.1.7",
58
- "@widergy/mobile-ui": "<1.0.0",
59
- "d3": "^6.2.0",
60
- "moment": "^2.29.1",
65
+ "react-native-pager-view": "^6.2.1",
66
+ "@widergy/mobile-ui": "^1.0.0",
67
+ "@widergy/web-utils": "^2.0.0",
68
+ "core-js": "3",
69
+ "d3": "^7.8.5",
70
+ "lodash": "^4.17.21",
71
+ "moment": "^2.29.4",
61
72
  "numeral": "^2.0.6",
62
- "react-native-collapsible": "^1.5.3",
63
- "react-native-document-picker": "^4.0.0",
64
- "react-native-image-picker": "^4.0.6",
65
- "react-native-image-resizer": "^1.3.0",
66
- "react-native-svg": "^12.1.0",
67
- "react-native-svg-transformer": "^0.14.3",
68
- "react-native-vector-icons": "^7.1.0"
69
- },
70
- "jest": {
71
- "preset": "react-native"
72
- },
73
- "husky": {
74
- "hooks": {
75
- "pre-commit": "yarn lint-diff && node branch-name-hook",
76
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
77
- }
73
+ "react-native-collapsible": "^1.6.1",
74
+ "react-native-document-picker": "^9.0.1",
75
+ "react-native-image-picker": "^5.0.0",
76
+ "@bam.tech/react-native-image-resizer": "^3.0.7",
77
+ "react-native-svg": "^13.0.0",
78
+ "react-native-vector-icons": "^10.0.0",
79
+ "react-native-svg-transformer": "^1.1.0",
80
+ "seamless-immutable": "^7.1.4"
78
81
  },
79
82
  "release": {
80
83
  "extends": "@widergy/semantic-release-package-config"
81
- },
82
- "commitlint": {
83
- "extends": [
84
- "@commitlint/config-conventional"
85
- ]
86
84
  }
87
85
  }
@@ -29,7 +29,7 @@ const Advice = ({ title, contentText }) => {
29
29
 
30
30
  Advice.propTypes = {
31
31
  title: string,
32
- contentText: string,
32
+ contentText: string
33
33
  };
34
34
 
35
35
  export default Advice;
@@ -7,24 +7,24 @@ export default (theme, Colors) =>
7
7
  backgroundColor: Colors.lighterPrimary,
8
8
  borderRadius: 5,
9
9
  paddingHorizontal: 10,
10
- paddingVertical: 16,
10
+ paddingVertical: 16
11
11
  },
12
12
  header: {
13
13
  alignItems: 'center',
14
14
  flexDirection: 'row',
15
15
  justifyContent: 'center',
16
- marginBottom: 10,
16
+ marginBottom: 10
17
17
  },
18
18
  icon: {
19
- marginRight: scaleUtils.horizontalScale(10),
19
+ marginRight: scaleUtils.horizontalScale(10)
20
20
  },
21
21
  adviceText: {
22
22
  marginTop: 15,
23
23
  marginBottom: 20,
24
- color: theme.ConsumptionAdvice.textColor,
24
+ color: theme.ConsumptionAdvice.textColor
25
25
  },
26
26
  titleLabel: {
27
27
  flex: 1,
28
- color: theme.ConsumptionAdvice.titleColor,
29
- },
28
+ color: theme.ConsumptionAdvice.titleColor
29
+ }
30
30
  });
@@ -19,7 +19,7 @@ const Banner = ({ image, url, style }) => (
19
19
  Banner.propTypes = {
20
20
  url: string,
21
21
  // eslint-disable-next-line react/forbid-prop-types
22
- image: any,
22
+ image: any
23
23
  };
24
24
 
25
25
  export default Banner;
@@ -7,12 +7,12 @@ export default StyleSheet.create({
7
7
  image: {
8
8
  resizeMode: 'contain',
9
9
  flex: 1,
10
- aspectRatio: 1.728,
10
+ aspectRatio: 1.728
11
11
  },
12
12
  touchable: {
13
13
  borderRadius: 4,
14
14
  flex: 1,
15
15
  width: '100%',
16
- flexDirection: 'row',
17
- },
16
+ flexDirection: 'row'
17
+ }
18
18
  });
@@ -14,7 +14,7 @@ const ConceptCard = ({ context, concept }) => {
14
14
  Touchable,
15
15
  Label,
16
16
  assets: { ArrowDown, ArrowUp },
17
- config: { showZeroConcepts },
17
+ config: { showZeroConcepts }
18
18
  } = context;
19
19
  const linesToRender = showZeroConcepts ? concept?.lines : concept?.lines?.filter(line => line.amount);
20
20
  const [collapsed, toggleCollapsed] = useTogglableState(true);
@@ -91,10 +91,10 @@ ConceptCard.propTypes = {
91
91
  shape({
92
92
  title: string,
93
93
  description: string,
94
- amount: number,
95
- }),
96
- ),
97
- }),
94
+ amount: number
95
+ })
96
+ )
97
+ })
98
98
  };
99
99
 
100
100
  export default withContext()(ConceptCard);
@@ -9,31 +9,31 @@ export default StyleSheet.create({
9
9
  padding: verticalScale(10),
10
10
  flexDirection: 'row',
11
11
  justifyContent: 'space-between',
12
- alignItems: 'center',
12
+ alignItems: 'center'
13
13
  },
14
14
  container: {
15
15
  paddingVertical: 16,
16
- paddingHorizontal: 10,
16
+ paddingHorizontal: 10
17
17
  },
18
18
  icon: {
19
- top: 1,
19
+ top: 1
20
20
  },
21
21
  conceptContainer: {
22
22
  alignItems: 'center',
23
23
  flexDirection: 'row',
24
- justifyContent: 'space-between',
24
+ justifyContent: 'space-between'
25
25
  },
26
26
  totalContainer: {
27
27
  alignItems: 'center',
28
28
  flexDirection: 'row',
29
29
  flex: 1,
30
- justifyContent: 'flex-end',
30
+ justifyContent: 'flex-end'
31
31
  },
32
32
  collapsable: {
33
- paddingRight: ICON_SIZE + ICON_MARGIN,
33
+ paddingRight: ICON_SIZE + ICON_MARGIN
34
34
  },
35
35
  decimal: {
36
- marginTop: 0,
36
+ marginTop: 0
37
37
  },
38
38
  linesContainer: {
39
39
  flexDirection: 'row',
@@ -41,17 +41,17 @@ export default StyleSheet.create({
41
41
  justifyContent: 'space-between',
42
42
  paddingTop: 24,
43
43
  marginLeft: 5,
44
- paddingRight: 17,
44
+ paddingRight: 17
45
45
  },
46
46
  conceptTitleLabel: {
47
47
  flex: 1,
48
- textAlign: 'left',
48
+ textAlign: 'left'
49
49
  },
50
50
  iconContainer: {
51
- marginLeft: 5,
51
+ marginLeft: 5
52
52
  },
53
53
  linesConcept: {
54
- flex: 1,
54
+ flex: 1
55
55
  },
56
- lineTitle: { flex: 1 },
56
+ lineTitle: { flex: 1 }
57
57
  });
@@ -13,9 +13,9 @@ const DetailModalContent = ({ onCloseModal, concepts, context }) => {
13
13
  config: {
14
14
  texts: {
15
15
  mainBillData: { conceptsDetailsModalHeader },
16
- commons: { close },
17
- },
18
- },
16
+ commons: { close }
17
+ }
18
+ }
19
19
  } = context;
20
20
  const [openedItem, setOpenedItem] = useState();
21
21
 
@@ -74,12 +74,12 @@ DetailModalContent.propTypes = {
74
74
  shape({
75
75
  title: string,
76
76
  description: string,
77
- amount: number,
78
- }),
79
- ),
80
- }),
77
+ amount: number
78
+ })
79
+ )
80
+ })
81
81
  ),
82
- onCloseModal: func,
82
+ onCloseModal: func
83
83
  };
84
84
 
85
85
  export default DetailModalContent;
@@ -6,13 +6,13 @@ export default theme =>
6
6
  StyleSheet.create({
7
7
  upperContainer: {},
8
8
  icon: {
9
- top: 1,
9
+ top: 1
10
10
  },
11
11
  header: {
12
12
  paddingHorizontal: 20,
13
13
  paddingVertical: 16,
14
14
  backgroundColor: theme.BillCalculation?.detailModal?.header,
15
- width: '100%',
15
+ width: '100%'
16
16
  },
17
17
  conceptContainer: {
18
18
  alignItems: 'center',
@@ -22,35 +22,35 @@ export default theme =>
22
22
  borderBottomColor: theme.BillCalculation?.detailModal?.border,
23
23
  borderBottomWidth: 1,
24
24
  paddingHorizontal: 18,
25
- paddingVertical: 18,
25
+ paddingVertical: 18
26
26
  },
27
27
  totalContainer: {
28
28
  alignItems: 'center',
29
29
  flexDirection: 'row',
30
30
  flex: 1,
31
- justifyContent: 'flex-end',
31
+ justifyContent: 'flex-end'
32
32
  },
33
33
  collapsable: {
34
- paddingRight: ICON_SIZE + ICON_MARGIN,
34
+ paddingRight: ICON_SIZE + ICON_MARGIN
35
35
  },
36
36
  decimal: {
37
- marginTop: 0,
37
+ marginTop: 0
38
38
  },
39
39
  linesContainer: {
40
40
  flexDirection: 'row',
41
41
  flex: 1,
42
42
  justifyContent: 'space-between',
43
- paddingHorizontal: 15,
43
+ paddingHorizontal: 15
44
44
  },
45
45
  conceptTitleLabel: {
46
46
  width: '90%',
47
- textAlign: 'left',
47
+ textAlign: 'left'
48
48
  },
49
49
  iconContainer: {
50
- marginLeft: 5,
50
+ marginLeft: 5
51
51
  },
52
52
  linesConcept: {
53
- flex: 1,
53
+ flex: 1
54
54
  },
55
55
  lineTitle: { flex: 1 },
56
56
  closeButton: {
@@ -59,6 +59,6 @@ export default theme =>
59
59
  backgroundColor: theme.BillCalculation?.detailModal?.closeButton,
60
60
  borderRadius: 4,
61
61
  marginTop: 20,
62
- alignSelf: 'center',
63
- },
62
+ alignSelf: 'center'
63
+ }
64
64
  });
@@ -19,18 +19,18 @@ const BillCalculation = ({ bill, context }) => {
19
19
  const {
20
20
  Label,
21
21
  Touchable,
22
- config: { texts },
22
+ config: { texts }
23
23
  } = context;
24
24
  const {
25
25
  texts: {
26
- mainBillData: { billedPeriod, conceptsDetailsButton },
26
+ mainBillData: { billedPeriod, conceptsDetailsButton }
27
27
  },
28
- validators: { showPeriodWithMonth },
28
+ validators: { showPeriodWithMonth }
29
29
  } = config;
30
30
  const styles = useThemedStyle(getStyles);
31
31
  const { periodicity, periodNumber, currentSettlement, totalSettlements, periodYear } = titleMapper(
32
32
  bill,
33
- texts,
33
+ texts
34
34
  );
35
35
  const { periods } = bill;
36
36
  const currentPeriod = periods.find(period => period.current);
@@ -73,6 +73,7 @@ const BillCalculation = ({ bill, context }) => {
73
73
  scrollEnabled={false}
74
74
  keyExtractor={item => item.title}
75
75
  showsVerticalScrollIndicator={false}
76
+ // eslint-disable-next-line react/no-unstable-nested-components
76
77
  ItemSeparatorComponent={() => <SeparatorBar style={styles.separatorBar} />}
77
78
  />
78
79
  </View>
@@ -107,6 +108,6 @@ const BillCalculation = ({ bill, context }) => {
107
108
  );
108
109
  };
109
110
  BillCalculation.propTypes = {
110
- bill: billDataTypes,
111
+ bill: billDataTypes
111
112
  };
112
113
  export default withContext()(BillCalculation);
@@ -3,19 +3,19 @@ import { StyleSheet } from 'react-native';
3
3
  export default (theme, colors) =>
4
4
  StyleSheet.create({
5
5
  container: {
6
- width: '100%',
6
+ width: '100%'
7
7
  },
8
8
  totalContainer: {
9
9
  alignItems: 'center',
10
10
  flexDirection: 'row',
11
- justifyContent: 'space-between',
11
+ justifyContent: 'space-between'
12
12
  },
13
13
  decimal: {
14
- marginTop: 0,
14
+ marginTop: 0
15
15
  },
16
16
  modal: {
17
17
  paddingHorizontal: 0,
18
- paddingVertical: 0,
18
+ paddingVertical: 0
19
19
  },
20
20
  upperContainer: {
21
21
  marginTop: 10,
@@ -23,7 +23,7 @@ export default (theme, colors) =>
23
23
  width: '100%',
24
24
  borderColor: '#DFDFDF',
25
25
  borderTopLeftRadius: 10,
26
- borderTopRightRadius: 10,
26
+ borderTopRightRadius: 10
27
27
  },
28
28
  header: {
29
29
  borderBottomWidth: 1,
@@ -33,7 +33,7 @@ export default (theme, colors) =>
33
33
  minWidth: '100%',
34
34
  alignItems: 'center',
35
35
  paddingHorizontal: 10,
36
- paddingVertical: 18,
36
+ paddingVertical: 18
37
37
  },
38
38
  totalAmount: {
39
39
  flexDirection: 'row',
@@ -47,17 +47,17 @@ export default (theme, colors) =>
47
47
  justifyContent: 'space-between',
48
48
  backgroundColor: colors.primary,
49
49
  borderBottomLeftRadius: 10,
50
- borderBottomRightRadius: 10,
50
+ borderBottomRightRadius: 10
51
51
  },
52
52
  headerWithDate: {
53
53
  flexDirection: 'row',
54
- justifyContent: 'space-between',
54
+ justifyContent: 'space-between'
55
55
  },
56
56
  stretchItems: {
57
- alignItems: 'stretch',
57
+ alignItems: 'stretch'
58
58
  },
59
59
  headerTitle: {
60
- fontWeight: '600',
60
+ fontWeight: '600'
61
61
  },
62
62
  openButton: {
63
63
  padding: 12,
@@ -65,6 +65,6 @@ export default (theme, colors) =>
65
65
  width: '100%',
66
66
  borderRadius: 4,
67
67
  marginTop: 20,
68
- alignSelf: 'center',
69
- },
68
+ alignSelf: 'center'
69
+ }
70
70
  });
@@ -11,11 +11,11 @@ const BillRate = ({ context, bill, theme }) => {
11
11
  const { config, Label } = context;
12
12
  const {
13
13
  texts: {
14
- ratesDefinition: { rate, category },
15
- },
14
+ ratesDefinition: { rate, category }
15
+ }
16
16
  } = config;
17
17
 
18
- const { rate: billRate } = bill?.client;
18
+ const { rate: billRate } = bill?.client || {};
19
19
 
20
20
  return (
21
21
  <View style={styles.root}>
@@ -24,11 +24,9 @@ const BillRate = ({ context, bill, theme }) => {
24
24
  {rate}
25
25
  </Label>
26
26
  <View semibold style={[styles.rateBadgeContainer, theme.noPendingDebt]}>
27
- <Label
28
- bold
29
- small
30
- style={[styles.rateBadge, theme.noPendingDebtLabel]}>{`${category} ${billRate.category ||
31
- '-'}`}</Label>
27
+ <Label bold small style={[styles.rateBadge, theme.noPendingDebtLabel]}>{`${category} ${
28
+ billRate.category || '-'
29
+ }`}</Label>
32
30
  </View>
33
31
  </View>
34
32
  <Label h1 primary>
@@ -40,7 +38,7 @@ const BillRate = ({ context, bill, theme }) => {
40
38
 
41
39
  BillRate.propTypes = {
42
40
  context: contextApiInfoTypes,
43
- bill: billDataTypes,
41
+ bill: billDataTypes
44
42
  };
45
43
 
46
44
  export default withContext(retrieveStyles)(BillRate);
@@ -15,12 +15,12 @@ export default StyleSheet.create({
15
15
  alignItems: 'center',
16
16
  justifyContent: 'space-between',
17
17
  flex: 1,
18
- width: '100%',
18
+ width: '100%'
19
19
  },
20
20
  content: {
21
- paddingHorizontal: 10,
21
+ paddingHorizontal: 10
22
22
  },
23
23
  rateBadge: { marginHorizontal: 12, marginVertical: 7 },
24
24
  rateBadgeContainer: { borderRadius: 50, marginLeft: 15 },
25
- leftContainer: { flexDirection: 'row', alignItems: 'center' },
25
+ leftContainer: { flexDirection: 'row', alignItems: 'center' }
26
26
  });
@@ -12,7 +12,7 @@ import styles, { retrieveStyles } from './styles';
12
12
  const ConceptBar = ({ context, concept = {}, percentage = 0, primaryConcept, theme, showPercentage }) => {
13
13
  const {
14
14
  Label,
15
- config: { numeral },
15
+ config: { numeral }
16
16
  } = context;
17
17
 
18
18
  return (
@@ -39,9 +39,9 @@ const ConceptBar = ({ context, concept = {}, percentage = 0, primaryConcept, the
39
39
  style={[
40
40
  styles.progressBar,
41
41
  {
42
- width: `${percentage}%`,
42
+ width: `${percentage}%`
43
43
  },
44
- theme && { backgroundColor: primaryConcept ? theme.primary : theme.gray },
44
+ theme && { backgroundColor: primaryConcept ? theme.primary : theme.gray }
45
45
  ]}
46
46
  />
47
47
  </View>
@@ -67,7 +67,7 @@ ConceptBar.propTypes = {
67
67
  concept: billDataTypes,
68
68
  percentage: string,
69
69
  primaryConcept: bool,
70
- showPercentage: bool,
70
+ showPercentage: bool
71
71
  };
72
72
 
73
73
  export default withContext(retrieveStyles)(ConceptBar);
@@ -7,27 +7,27 @@ export default StyleSheet.create({
7
7
  flex: 1,
8
8
  flexDirection: 'row',
9
9
  justifyContent: 'space-between',
10
- marginTop: 17,
10
+ marginTop: 17
11
11
  },
12
12
  progressBarContainer: {
13
- width: '60%',
13
+ width: '60%'
14
14
  },
15
15
  progressBar: {
16
16
  marginTop: 5,
17
17
  height: 10,
18
18
  backgroundColor: '#387AC9',
19
- borderRadius: 2,
19
+ borderRadius: 2
20
20
  },
21
21
  decimal: {
22
- marginTop: 0,
22
+ marginTop: 0
23
23
  },
24
24
  totalContainer: {
25
- flexDirection: 'row',
25
+ flexDirection: 'row'
26
26
  },
27
27
  percentageContainer: {
28
- marginTop: 6,
28
+ marginTop: 6
29
29
  },
30
30
  addTopMargin: {
31
- marginTop: 2,
32
- },
31
+ marginTop: 2
32
+ }
33
33
  });
@@ -11,8 +11,8 @@ const ConceptLine = ({ color, total, percentage, title, context, primaryConcept
11
11
  const {
12
12
  Label,
13
13
  config: {
14
- formatters: { percentageFormatter },
15
- },
14
+ formatters: { percentageFormatter }
15
+ }
16
16
  } = context;
17
17
  return (
18
18
  <View>
@@ -35,8 +35,7 @@ const ConceptLine = ({ color, total, percentage, title, context, primaryConcept
35
35
  </View>
36
36
  </View>
37
37
  <Label primary={primaryConcept} midGray={!primaryConcept} small style={styles.percentage}>
38
- {percentageFormatter(percentage)}
39
- {'%'}
38
+ {percentageFormatter(percentage)}%
40
39
  </Label>
41
40
  </View>
42
41
  );
@@ -46,7 +45,7 @@ ConceptLine.propTypes = {
46
45
  title: string,
47
46
  total: number,
48
47
  percentage: number,
49
- primaryConcept: bool,
48
+ primaryConcept: bool
50
49
  };
51
50
 
52
51
  export default withContext()(ConceptLine);