@designcrowd/fe-shared-lib 1.2.17-ml-currency-2 → 1.2.17

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/Dockerfile CHANGED
@@ -29,7 +29,7 @@ COPY .npmignore ./
29
29
  RUN npm run bundle-translation
30
30
 
31
31
  RUN mkdir artifacts
32
- RUN npm publish --otp=752654 || (touch artifacts/npm_publish_failed && exit 1)
32
+ RUN npm publish || (touch artifacts/npm_publish_failed && exit 1)
33
33
  RUN cp package.json artifacts/
34
34
 
35
35
  ENTRYPOINT ["/bin/echo", "Nothing to do."]
@@ -643,6 +643,10 @@ video {
643
643
  margin-top: 0px;
644
644
  margin-bottom: 0px;
645
645
  }
646
+ .tw-my-1 {
647
+ margin-top: 0.25rem;
648
+ margin-bottom: 0.25rem;
649
+ }
646
650
  .tw-my-10 {
647
651
  margin-top: 2.5rem;
648
652
  margin-bottom: 2.5rem;
@@ -719,6 +723,9 @@ video {
719
723
  .tw-ml-auto {
720
724
  margin-left: auto;
721
725
  }
726
+ .tw-mr-1 {
727
+ margin-right: 0.25rem;
728
+ }
722
729
  .tw-mr-2 {
723
730
  margin-right: 0.5rem;
724
731
  }
@@ -827,6 +834,10 @@ video {
827
834
  .tw-h-auto {
828
835
  height: auto;
829
836
  }
837
+ .tw-h-fit {
838
+ height: -moz-fit-content;
839
+ height: fit-content;
840
+ }
830
841
  .tw-h-full {
831
842
  height: 100%;
832
843
  }
@@ -842,9 +853,6 @@ video {
842
853
  .tw-max-h-screen {
843
854
  max-height: 100vh;
844
855
  }
845
- .tw-w-1\/3 {
846
- width: 33.333333%;
847
- }
848
856
  .tw-w-10 {
849
857
  width: 2.5rem;
850
858
  }
@@ -1013,6 +1021,9 @@ video {
1013
1021
  .tw-animate-spin {
1014
1022
  animation: tw-spin 1s linear infinite;
1015
1023
  }
1024
+ .\!tw-cursor-not-allowed {
1025
+ cursor: not-allowed !important;
1026
+ }
1016
1027
  .tw-cursor-not-allowed {
1017
1028
  cursor: not-allowed;
1018
1029
  }
@@ -1446,6 +1457,17 @@ video {
1446
1457
  .tw-bg-opacity-80 {
1447
1458
  --tw-bg-opacity: 0.8;
1448
1459
  }
1460
+ .tw-bg-gradient-to-t {
1461
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1462
+ }
1463
+ .tw-from-\[\#d946ef\] {
1464
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1465
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1466
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1467
+ }
1468
+ .tw-to-\[\#8b5cf6\] {
1469
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1470
+ }
1449
1471
  .tw-bg-no-repeat {
1450
1472
  background-repeat: no-repeat;
1451
1473
  }
@@ -2023,6 +2045,10 @@ video {
2023
2045
  --tw-bg-opacity: 1;
2024
2046
  background-color: rgb(0 121 172 / var(--tw-bg-opacity));
2025
2047
  }
2048
+ .hover\:tw-bg-primary-100:hover {
2049
+ --tw-bg-opacity: 1;
2050
+ background-color: rgb(252 209 217 / var(--tw-bg-opacity));
2051
+ }
2026
2052
  .hover\:tw-bg-primary-400:hover {
2027
2053
  --tw-bg-opacity: 1;
2028
2054
  background-color: rgb(245 73 101 / var(--tw-bg-opacity));
@@ -2087,6 +2113,10 @@ video {
2087
2113
  --tw-shadow-color: #0097D7 !important;
2088
2114
  --tw-shadow: var(--tw-shadow-colored) !important;
2089
2115
  }
2116
+ .hover\:tw-brightness-\[0\.85\]:hover {
2117
+ --tw-brightness: brightness(0.85);
2118
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2119
+ }
2090
2120
  .focus\:tw-border-error-600:focus {
2091
2121
  --tw-border-opacity: 1;
2092
2122
  border-color: rgb(194 22 50 / var(--tw-border-opacity));
@@ -2229,6 +2259,10 @@ video {
2229
2259
  margin-left: 1rem;
2230
2260
  }
2231
2261
 
2262
+ .md\:tw-mr-2 {
2263
+ margin-right: 0.5rem;
2264
+ }
2265
+
2232
2266
  .md\:tw-mt-0 {
2233
2267
  margin-top: 0px;
2234
2268
  }
@@ -643,6 +643,10 @@ video {
643
643
  margin-top: 0px;
644
644
  margin-bottom: 0px;
645
645
  }
646
+ .tw-my-1 {
647
+ margin-top: 0.25rem;
648
+ margin-bottom: 0.25rem;
649
+ }
646
650
  .tw-my-10 {
647
651
  margin-top: 2.5rem;
648
652
  margin-bottom: 2.5rem;
@@ -719,6 +723,9 @@ video {
719
723
  .tw-ml-auto {
720
724
  margin-left: auto;
721
725
  }
726
+ .tw-mr-1 {
727
+ margin-right: 0.25rem;
728
+ }
722
729
  .tw-mr-2 {
723
730
  margin-right: 0.5rem;
724
731
  }
@@ -827,6 +834,10 @@ video {
827
834
  .tw-h-auto {
828
835
  height: auto;
829
836
  }
837
+ .tw-h-fit {
838
+ height: -moz-fit-content;
839
+ height: fit-content;
840
+ }
830
841
  .tw-h-full {
831
842
  height: 100%;
832
843
  }
@@ -842,9 +853,6 @@ video {
842
853
  .tw-max-h-screen {
843
854
  max-height: 100vh;
844
855
  }
845
- .tw-w-1\/3 {
846
- width: 33.333333%;
847
- }
848
856
  .tw-w-10 {
849
857
  width: 2.5rem;
850
858
  }
@@ -1013,6 +1021,9 @@ video {
1013
1021
  .tw-animate-spin {
1014
1022
  animation: tw-spin 1s linear infinite;
1015
1023
  }
1024
+ .\!tw-cursor-not-allowed {
1025
+ cursor: not-allowed !important;
1026
+ }
1016
1027
  .tw-cursor-not-allowed {
1017
1028
  cursor: not-allowed;
1018
1029
  }
@@ -1294,6 +1305,17 @@ video {
1294
1305
  .tw-bg-opacity-80 {
1295
1306
  --tw-bg-opacity: 0.8;
1296
1307
  }
1308
+ .tw-bg-gradient-to-t {
1309
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1310
+ }
1311
+ .tw-from-\[\#d946ef\] {
1312
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1313
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1314
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1315
+ }
1316
+ .tw-to-\[\#8b5cf6\] {
1317
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1318
+ }
1297
1319
  .tw-bg-no-repeat {
1298
1320
  background-repeat: no-repeat;
1299
1321
  }
@@ -1791,6 +1813,10 @@ video {
1791
1813
  --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);
1792
1814
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1793
1815
  }
1816
+ .hover\:tw-brightness-\[0\.85\]:hover {
1817
+ --tw-brightness: brightness(0.85);
1818
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1819
+ }
1794
1820
  .focus\:tw-border-grayscale-600:focus {
1795
1821
  --tw-border-opacity: 1;
1796
1822
  border-color: rgb(94 94 94 / var(--tw-border-opacity));
@@ -1917,6 +1943,10 @@ video {
1917
1943
  margin-left: 1rem;
1918
1944
  }
1919
1945
 
1946
+ .md\:tw-mr-2 {
1947
+ margin-right: 0.5rem;
1948
+ }
1949
+
1920
1950
  .md\:tw-mt-0 {
1921
1951
  margin-top: 0px;
1922
1952
  }
@@ -643,6 +643,10 @@ video {
643
643
  margin-top: 0px;
644
644
  margin-bottom: 0px;
645
645
  }
646
+ .tw-my-1 {
647
+ margin-top: 0.25rem;
648
+ margin-bottom: 0.25rem;
649
+ }
646
650
  .tw-my-10 {
647
651
  margin-top: 2.5rem;
648
652
  margin-bottom: 2.5rem;
@@ -719,6 +723,9 @@ video {
719
723
  .tw-ml-auto {
720
724
  margin-left: auto;
721
725
  }
726
+ .tw-mr-1 {
727
+ margin-right: 0.25rem;
728
+ }
722
729
  .tw-mr-2 {
723
730
  margin-right: 0.5rem;
724
731
  }
@@ -827,6 +834,10 @@ video {
827
834
  .tw-h-auto {
828
835
  height: auto;
829
836
  }
837
+ .tw-h-fit {
838
+ height: -moz-fit-content;
839
+ height: fit-content;
840
+ }
830
841
  .tw-h-full {
831
842
  height: 100%;
832
843
  }
@@ -842,9 +853,6 @@ video {
842
853
  .tw-max-h-screen {
843
854
  max-height: 100vh;
844
855
  }
845
- .tw-w-1\/3 {
846
- width: 33.333333%;
847
- }
848
856
  .tw-w-10 {
849
857
  width: 2.5rem;
850
858
  }
@@ -1013,6 +1021,9 @@ video {
1013
1021
  .tw-animate-spin {
1014
1022
  animation: tw-spin 1s linear infinite;
1015
1023
  }
1024
+ .\!tw-cursor-not-allowed {
1025
+ cursor: not-allowed !important;
1026
+ }
1016
1027
  .tw-cursor-not-allowed {
1017
1028
  cursor: not-allowed;
1018
1029
  }
@@ -1446,6 +1457,17 @@ video {
1446
1457
  .tw-bg-opacity-80 {
1447
1458
  --tw-bg-opacity: 0.8;
1448
1459
  }
1460
+ .tw-bg-gradient-to-t {
1461
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1462
+ }
1463
+ .tw-from-\[\#d946ef\] {
1464
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1465
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1466
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1467
+ }
1468
+ .tw-to-\[\#8b5cf6\] {
1469
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1470
+ }
1449
1471
  .tw-bg-no-repeat {
1450
1472
  background-repeat: no-repeat;
1451
1473
  }
@@ -2023,6 +2045,10 @@ video {
2023
2045
  --tw-bg-opacity: 1;
2024
2046
  background-color: rgb(0 129 191 / var(--tw-bg-opacity));
2025
2047
  }
2048
+ .hover\:tw-bg-primary-100:hover {
2049
+ --tw-bg-opacity: 1;
2050
+ background-color: rgb(226 238 213 / var(--tw-bg-opacity));
2051
+ }
2026
2052
  .hover\:tw-bg-primary-400:hover {
2027
2053
  --tw-bg-opacity: 1;
2028
2054
  background-color: rgb(140 189 89 / var(--tw-bg-opacity));
@@ -2087,6 +2113,10 @@ video {
2087
2113
  --tw-shadow-color: #00A1EF !important;
2088
2114
  --tw-shadow: var(--tw-shadow-colored) !important;
2089
2115
  }
2116
+ .hover\:tw-brightness-\[0\.85\]:hover {
2117
+ --tw-brightness: brightness(0.85);
2118
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2119
+ }
2090
2120
  .focus\:tw-border-error-600:focus {
2091
2121
  --tw-border-opacity: 1;
2092
2122
  border-color: rgb(186 24 79 / var(--tw-border-opacity));
@@ -2229,6 +2259,10 @@ video {
2229
2259
  margin-left: 1rem;
2230
2260
  }
2231
2261
 
2262
+ .md\:tw-mr-2 {
2263
+ margin-right: 0.5rem;
2264
+ }
2265
+
2232
2266
  .md\:tw-mt-0 {
2233
2267
  margin-top: 0px;
2234
2268
  }
@@ -643,6 +643,10 @@ video {
643
643
  margin-top: 0px;
644
644
  margin-bottom: 0px;
645
645
  }
646
+ .tw-my-1 {
647
+ margin-top: 0.25rem;
648
+ margin-bottom: 0.25rem;
649
+ }
646
650
  .tw-my-10 {
647
651
  margin-top: 2.5rem;
648
652
  margin-bottom: 2.5rem;
@@ -719,6 +723,9 @@ video {
719
723
  .tw-ml-auto {
720
724
  margin-left: auto;
721
725
  }
726
+ .tw-mr-1 {
727
+ margin-right: 0.25rem;
728
+ }
722
729
  .tw-mr-2 {
723
730
  margin-right: 0.5rem;
724
731
  }
@@ -827,6 +834,10 @@ video {
827
834
  .tw-h-auto {
828
835
  height: auto;
829
836
  }
837
+ .tw-h-fit {
838
+ height: -moz-fit-content;
839
+ height: fit-content;
840
+ }
830
841
  .tw-h-full {
831
842
  height: 100%;
832
843
  }
@@ -842,9 +853,6 @@ video {
842
853
  .tw-max-h-screen {
843
854
  max-height: 100vh;
844
855
  }
845
- .tw-w-1\/3 {
846
- width: 33.333333%;
847
- }
848
856
  .tw-w-10 {
849
857
  width: 2.5rem;
850
858
  }
@@ -1013,6 +1021,9 @@ video {
1013
1021
  .tw-animate-spin {
1014
1022
  animation: tw-spin 1s linear infinite;
1015
1023
  }
1024
+ .\!tw-cursor-not-allowed {
1025
+ cursor: not-allowed !important;
1026
+ }
1016
1027
  .tw-cursor-not-allowed {
1017
1028
  cursor: not-allowed;
1018
1029
  }
@@ -1446,6 +1457,17 @@ video {
1446
1457
  .tw-bg-opacity-80 {
1447
1458
  --tw-bg-opacity: 0.8;
1448
1459
  }
1460
+ .tw-bg-gradient-to-t {
1461
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1462
+ }
1463
+ .tw-from-\[\#d946ef\] {
1464
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1465
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1466
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1467
+ }
1468
+ .tw-to-\[\#8b5cf6\] {
1469
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1470
+ }
1449
1471
  .tw-bg-no-repeat {
1450
1472
  background-repeat: no-repeat;
1451
1473
  }
@@ -2023,6 +2045,10 @@ video {
2023
2045
  --tw-bg-opacity: 1;
2024
2046
  background-color: rgb(50 71 197 / var(--tw-bg-opacity));
2025
2047
  }
2048
+ .hover\:tw-bg-primary-100:hover {
2049
+ --tw-bg-opacity: 1;
2050
+ background-color: rgb(236 238 254 / var(--tw-bg-opacity));
2051
+ }
2026
2052
  .hover\:tw-bg-primary-400:hover {
2027
2053
  --tw-bg-opacity: 1;
2028
2054
  background-color: rgb(121 139 249 / var(--tw-bg-opacity));
@@ -2087,6 +2113,10 @@ video {
2087
2113
  --tw-shadow-color: #3f59f6 !important;
2088
2114
  --tw-shadow: var(--tw-shadow-colored) !important;
2089
2115
  }
2116
+ .hover\:tw-brightness-\[0\.85\]:hover {
2117
+ --tw-brightness: brightness(0.85);
2118
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2119
+ }
2090
2120
  .focus\:tw-border-error-600:focus {
2091
2121
  --tw-border-opacity: 1;
2092
2122
  border-color: rgb(182 58 42 / var(--tw-border-opacity));
@@ -2229,6 +2259,10 @@ video {
2229
2259
  margin-left: 1rem;
2230
2260
  }
2231
2261
 
2262
+ .md\:tw-mr-2 {
2263
+ margin-right: 0.5rem;
2264
+ }
2265
+
2232
2266
  .md\:tw-mt-0 {
2233
2267
  margin-top: 0px;
2234
2268
  }
@@ -643,6 +643,10 @@ video {
643
643
  margin-top: 0px;
644
644
  margin-bottom: 0px;
645
645
  }
646
+ .tw-my-1 {
647
+ margin-top: 0.25rem;
648
+ margin-bottom: 0.25rem;
649
+ }
646
650
  .tw-my-10 {
647
651
  margin-top: 2.5rem;
648
652
  margin-bottom: 2.5rem;
@@ -719,6 +723,9 @@ video {
719
723
  .tw-ml-auto {
720
724
  margin-left: auto;
721
725
  }
726
+ .tw-mr-1 {
727
+ margin-right: 0.25rem;
728
+ }
722
729
  .tw-mr-2 {
723
730
  margin-right: 0.5rem;
724
731
  }
@@ -827,6 +834,10 @@ video {
827
834
  .tw-h-auto {
828
835
  height: auto;
829
836
  }
837
+ .tw-h-fit {
838
+ height: -moz-fit-content;
839
+ height: fit-content;
840
+ }
830
841
  .tw-h-full {
831
842
  height: 100%;
832
843
  }
@@ -842,9 +853,6 @@ video {
842
853
  .tw-max-h-screen {
843
854
  max-height: 100vh;
844
855
  }
845
- .tw-w-1\/3 {
846
- width: 33.333333%;
847
- }
848
856
  .tw-w-10 {
849
857
  width: 2.5rem;
850
858
  }
@@ -1013,6 +1021,9 @@ video {
1013
1021
  .tw-animate-spin {
1014
1022
  animation: tw-spin 1s linear infinite;
1015
1023
  }
1024
+ .\!tw-cursor-not-allowed {
1025
+ cursor: not-allowed !important;
1026
+ }
1016
1027
  .tw-cursor-not-allowed {
1017
1028
  cursor: not-allowed;
1018
1029
  }
@@ -1446,6 +1457,17 @@ video {
1446
1457
  .tw-bg-opacity-80 {
1447
1458
  --tw-bg-opacity: 0.8;
1448
1459
  }
1460
+ .tw-bg-gradient-to-t {
1461
+ background-image: linear-gradient(to top, var(--tw-gradient-stops));
1462
+ }
1463
+ .tw-from-\[\#d946ef\] {
1464
+ --tw-gradient-from: #d946ef var(--tw-gradient-from-position);
1465
+ --tw-gradient-to: rgb(217 70 239 / 0) var(--tw-gradient-to-position);
1466
+ --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
1467
+ }
1468
+ .tw-to-\[\#8b5cf6\] {
1469
+ --tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position);
1470
+ }
1449
1471
  .tw-bg-no-repeat {
1450
1472
  background-repeat: no-repeat;
1451
1473
  }
@@ -2023,6 +2045,10 @@ video {
2023
2045
  --tw-bg-opacity: 1;
2024
2046
  background-color: rgb(14 121 188 / var(--tw-bg-opacity));
2025
2047
  }
2048
+ .hover\:tw-bg-primary-100:hover {
2049
+ --tw-bg-opacity: 1;
2050
+ background-color: rgb(207 234 251 / var(--tw-bg-opacity));
2051
+ }
2026
2052
  .hover\:tw-bg-primary-400:hover {
2027
2053
  --tw-bg-opacity: 1;
2028
2054
  background-color: rgb(65 172 239 / var(--tw-bg-opacity));
@@ -2087,6 +2113,10 @@ video {
2087
2113
  --tw-shadow-color: #1197EB !important;
2088
2114
  --tw-shadow: var(--tw-shadow-colored) !important;
2089
2115
  }
2116
+ .hover\:tw-brightness-\[0\.85\]:hover {
2117
+ --tw-brightness: brightness(0.85);
2118
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
2119
+ }
2090
2120
  .focus\:tw-border-error-600:focus {
2091
2121
  --tw-border-opacity: 1;
2092
2122
  border-color: rgb(195 50 48 / var(--tw-border-opacity));
@@ -2229,6 +2259,10 @@ video {
2229
2259
  margin-left: 1rem;
2230
2260
  }
2231
2261
 
2262
+ .md\:tw-mr-2 {
2263
+ margin-right: 0.5rem;
2264
+ }
2265
+
2232
2266
  .md\:tw-mt-0 {
2233
2267
  margin-top: 0px;
2234
2268
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@designcrowd/fe-shared-lib",
3
- "version": "1.2.17-ml-currency-2",
3
+ "version": "1.2.17",
4
4
  "scripts": {
5
5
  "start": "run-p storybook watch:translation",
6
6
  "build": "npm run build:css --production",
@@ -14,72 +14,12 @@ export const audCurrency = {
14
14
  abbreviation: 'AU',
15
15
  };
16
16
 
17
- export const gbpCurrency = {
18
- id: 3,
19
- name: 'British Pound',
20
- iso4127Code: 'GBP',
21
- symbol: '£',
22
- abbreviation: 'UK',
23
- };
24
-
25
17
  export const euroCurrency = {
26
- id: 4,
18
+ id: 999,
27
19
  name: 'Euro',
28
20
  iso4127Code: 'EUR',
29
21
  symbol: '€',
30
22
  abbreviation: 'EU',
31
23
  };
32
24
 
33
- export const inrCurrency = {
34
- id: 5,
35
- name: 'Indian Rupee',
36
- iso4127Code: 'INR',
37
- symbol: '₹',
38
- abbreviation: 'IN',
39
- };
40
-
41
- export const phpCurrency = {
42
- id: 6,
43
- name: 'Philippine Peso',
44
- iso4127Code: 'PHP',
45
- symbol: '₱',
46
- abbreviation: 'PH',
47
- };
48
-
49
- export const brlCurrency = {
50
- id: 7,
51
- name: 'Brazilian Real',
52
- iso4127Code: 'BRL',
53
- symbol: 'R$',
54
- abbreviation: 'R',
55
- };
56
-
57
- export const mxnCurrency = {
58
- id: 8,
59
- name: 'Mexican Peso',
60
- iso4127Code: 'MXN',
61
- symbol: 'MX$',
62
- abbreviation: 'MX',
63
- };
64
-
65
- export const zarCurrency = {
66
- id: 9,
67
- name: 'South African Rand',
68
- iso4127Code: 'ZAR',
69
- symbol: 'R',
70
- abbreviation: 'R',
71
- };
72
-
73
- export const currencies = [
74
- usdCurrency,
75
- audCurrency,
76
- gbpCurrency,
77
- euroCurrency,
78
- inrCurrency,
79
- phpCurrency,
80
- brlCurrency,
81
- mxnCurrency,
82
- zarCurrency,
83
- ];
84
-
85
- export const locales = [ 'en_US', 'fr_FR', 'es_ES', 'pt_PT', 'de-DE']
25
+ export const currencies = [usdCurrency, audCurrency, euroCurrency];
@@ -1,8 +1,5 @@
1
1
  import Price from './Price.vue';
2
- import { currencies, locales } from './Price.fixtures';
3
- import {setSharedLibLocaleAsync} from "../../../useSharedLibTranslate";
4
-
5
- await setSharedLibLocaleAsync();
2
+ import { currencies } from './Price.fixtures';
6
3
 
7
4
  // noinspection JSUnusedGlobalSymbols
8
5
  export default {
@@ -10,7 +7,6 @@ export default {
10
7
  component: Price,
11
8
  args: {
12
9
  currencyName: currencies[0].name,
13
- locale: locales[0]
14
10
  },
15
11
  argTypes: {
16
12
  amount: {
@@ -20,10 +16,6 @@ export default {
20
16
  control: { type: 'select' },
21
17
  options: currencies.map((x) => x.name),
22
18
  },
23
- locale: {
24
- control: { type: 'select' },
25
- options: locales,
26
- },
27
19
  },
28
20
  };
29
21
 
@@ -39,16 +31,12 @@ export const Sample = {
39
31
  selectedCurrency() {
40
32
  return currencies.find((x) => x.name === this.args.currencyName);
41
33
  },
42
- selectedLocale() {
43
- return locales.find((x) => x === this.args.locale);
44
- },
45
34
  },
46
35
  template: `
47
36
  <span>
48
37
  <price
49
38
  v-bind="args"
50
39
  :currency="selectedCurrency"
51
- :locale="selectedLocale"
52
40
  />
53
41
  </span>
54
42
  `,
@@ -71,9 +59,6 @@ export const WithFraction = {
71
59
  selectedCurrency() {
72
60
  return currencies.find((x) => x.name === this.args.currencyName);
73
61
  },
74
- selectedLocale() {
75
- return locales.find((x) => x === this.args.locale);
76
- },
77
62
  },
78
63
  template: `
79
64
  <span>
@@ -81,7 +66,7 @@ export const WithFraction = {
81
66
  v-bind="args"
82
67
  :currency="selectedCurrency"
83
68
  fraction="2"
84
- :locale="selectedLocale"
69
+ :show-abbreviation="true"
85
70
  />
86
71
  </span>
87
72
  `,
@@ -104,9 +89,6 @@ export const AlwaysShowFractionOn = {
104
89
  selectedCurrency() {
105
90
  return currencies.find((x) => x.name === this.args.currencyName);
106
91
  },
107
- selectedLocale() {
108
- return locales.find((x) => x === this.args.locale);
109
- },
110
92
  },
111
93
  template: `
112
94
  <span>
@@ -115,7 +97,7 @@ export const AlwaysShowFractionOn = {
115
97
  :always-show-fraction="true"
116
98
  :currency="selectedCurrency"
117
99
  fraction="2"
118
- :locale="selectedLocale"
100
+ :show-abbreviation="true"
119
101
  />
120
102
  </span>
121
103
  `,
@@ -146,7 +128,7 @@ export const AlwaysShowFractionOff = {
146
128
  :always-show-fraction="false"
147
129
  :currency="selectedCurrency"
148
130
  fraction="2"
149
- :locale="selectedLocale"
131
+ :show-abbreviation="true"
150
132
  />
151
133
  </span>
152
134
  `,
@@ -169,9 +151,6 @@ export const WithSuffix = {
169
151
  selectedCurrency() {
170
152
  return currencies.find((x) => x.name === this.args.currencyName);
171
153
  },
172
- selectedLocale() {
173
- return locales.find((x) => x === this.args.locale);
174
- },
175
154
  },
176
155
  template: `
177
156
  <span>
@@ -180,8 +159,8 @@ export const WithSuffix = {
180
159
  :always-show-fraction="true"
181
160
  :currency="selectedCurrency"
182
161
  fraction="2"
162
+ :show-abbreviation="true"
183
163
  :suffix="suffix"
184
- :locale="selectedLocale"
185
164
  />
186
165
  </span>
187
166
  `,
@@ -192,35 +171,3 @@ export const WithSuffix = {
192
171
  suffix: '/yr',
193
172
  },
194
173
  };
195
-
196
- export const WithLocale = {
197
- render: (args, { argTypes }) => {
198
- return {
199
- components: { Price },
200
- props: Object.keys(argTypes),
201
- setup() {
202
- return { args };
203
- },
204
- computed: {
205
- selectedCurrency() {
206
- return currencies.find((x) => x.name === this.args.currencyName);
207
- },
208
- selectedLocale() {
209
- return locales.find((x) => x === this.args.locale);
210
- },
211
- },
212
- template: `
213
- <span>
214
- <price
215
- v-bind="args"
216
- :currency="selectedCurrency"
217
- :locale="selectedLocale"
218
- />
219
- </span>
220
- `,
221
- };
222
- },
223
- args: {
224
- amount: 22.0,
225
- },
226
- };
@@ -5,8 +5,7 @@
5
5
  </span>
6
6
  </template>
7
7
  <script>
8
-
9
- import { priceTr, formatCurrency } from "../../../useSharedLibTranslate";
8
+ import { priceTr } from '../../../useSharedLibTranslate';
10
9
 
11
10
  export default {
12
11
  props: {
@@ -25,11 +24,6 @@ export default {
25
24
  required: false,
26
25
  default: null,
27
26
  },
28
- locale: {
29
- type: String,
30
- required: false,
31
- default: null,
32
- },
33
27
  fraction: {
34
28
  type: [Number, String],
35
29
  required: false,
@@ -72,21 +66,6 @@ export default {
72
66
  return this.free;
73
67
  }
74
68
 
75
- if (this.locale != null)
76
- {
77
- const formattedCurrency = formatCurrency(
78
- this.amount,
79
- this.locale,
80
- this.currency,
81
- this.fraction,
82
- this.showAbbreviation
83
- );
84
-
85
- if (formattedCurrency) {
86
- return formattedCurrency;
87
- }
88
- }
89
-
90
69
  const parsedAmount = Number.parseFloat(this.amount);
91
70
 
92
71
  if (Number.isNaN(parsedAmount)) {
@@ -102,10 +81,10 @@ export default {
102
81
  return parsedAmount.toFixed(this.fraction);
103
82
  },
104
83
  currencyAbbreviation() {
105
- return this.showAbbreviation && this.amount && !this.locale > 0 ? this.currency?.abbreviation?.trim() : '';
84
+ return this.showAbbreviation && this.amount > 0 ? this.currency?.abbreviation?.trim() : '';
106
85
  },
107
86
  currencySymbol() {
108
- if (!this.amount || this.amount === 0 || this.locale) {
87
+ if (!this.amount || this.amount === 0) {
109
88
  return '';
110
89
  }
111
90
 
@@ -67,42 +67,6 @@ const getCurrentLocale = () => {
67
67
  return i18next.language || 'en-US';
68
68
  };
69
69
 
70
- const formatCurrency = (amount, locale, currency, fraction = 0, showAbbreviation = false) => {
71
- let localeAmount = i18next.t('{{val, currency}}', {
72
- ns: 'fe-shared-lib',
73
- val: amount,
74
- currency: currency.iso4127Code,
75
- locale: locale,
76
- maximumFractionDigits: fraction,
77
- useGrouping: false,
78
- });
79
-
80
- // i18next always uses iso code for ZAR, prefer symbol over iso code
81
- if (localeAmount.includes(currency.iso4127Code)) {
82
- return localeAmount.replace(currency.iso4127Code, currency.symbol);
83
- }
84
-
85
- // show abbreviation locale logic
86
- // note: showAbbreviaton is only passed as true for symbol = "$"
87
- if (currency.symbol.trim() !== '$') {
88
- return localeAmount;
89
- }
90
-
91
- // AUD edge case for en_US
92
- if (currency.iso4127Code === 'AUD') {
93
- localeAmount = localeAmount.replace('A$', currency.symbol);
94
- }
95
-
96
- if (showAbbreviation && !localeAmount.includes(currency.abbreviation)) {
97
- return `${currency?.abbreviation}${localeAmount}`;
98
-
99
- } else if (!showAbbreviation && localeAmount.includes(currency.abbreviation)) {
100
- return localeAmount.replace(currency.abbreviation, '');
101
- }
102
-
103
- return localeAmount;
104
- }
105
-
106
70
  export {
107
71
  setSharedLibLocaleAsync,
108
72
  getCurrentLocale,
@@ -117,5 +81,4 @@ export {
117
81
  uploadYourLogoTr,
118
82
  sharedPaymentConfigTr,
119
83
  priceTr,
120
- formatCurrency,
121
84
  };