@everymatrix/player-rglimits 1.29.9 → 1.30.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-rglimits",
3
- "version": "1.29.9",
3
+ "version": "1.30.0",
4
4
  "main": "index.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "05812474414208c4e167d71e59fd31ee853939a9"
38
+ "gitHead": "b9795b320e7d96e10963f25cdea2d9300029d8d7"
39
39
  }
@@ -67,6 +67,12 @@
67
67
 
68
68
  let errorMessage:string = '';
69
69
 
70
+ const timeMap = {
71
+ daily: 0,
72
+ weekly: 1,
73
+ monthly: 2
74
+ }
75
+
70
76
  type TranslationKeys = keyof typeof TRANSLATIONS;
71
77
  Object.keys(TRANSLATIONS).forEach((item: TranslationKeys): void => {
72
78
  addNewMessages(item, TRANSLATIONS[item]);
@@ -131,7 +137,9 @@
131
137
  return;
132
138
  }
133
139
 
134
- limitPeriodList = [...new Set(limitDefinitionList.map((limit) => limit.period))];
140
+ limitPeriodList = [...new Set(limitDefinitionList.map((limit) => limit.period))].sort((a, b) => {
141
+ return timeMap[a] - timeMap[b];
142
+ });
135
143
 
136
144
  productList = getProductListByPeriod(limitDefinitionList[0].period);
137
145
  if (!productList.includes(selectedProduct)) {
@@ -640,25 +648,25 @@
640
648
  </div>
641
649
  <div class="DetailsContainer Entries">
642
650
  <div class="Row">
643
- <div class="Col">{$_('spentAmount')}:</div>
651
+ <div class="Col">{$_('spentAmount')}</div>
644
652
  <div class="Col"><span><caret-right/> {formatWithSeparator(displayedLimit.spentAmount)} {displayedLimit.limitCurrency}</span></div>
645
653
  </div>
646
654
  <div class="Row">
647
- <div class="Col">{$_('remainingAmount')}:</div>
655
+ <div class="Col">{$_('remainingAmount')}</div>
648
656
  <div class="Col"><span><caret-right/> {formatWithSeparator(displayedLimit.remainingAmount)} {displayedLimit.limitCurrency}</span></div>
649
657
  </div>
650
658
  {#if displayedLimit.formattedSchedule.isUpdated === true}
651
659
  <div class="Row">
652
- <div class="Col">{$_('futureAmount')}:</div>
660
+ <div class="Col">{$_('futureAmount')}</div>
653
661
  <div class="Col"><span><caret-right/> {formatWithSeparator(displayedLimit.formattedSchedule.updateAmount)} {displayedLimit.limitCurrency}</span></div>
654
662
  </div>
655
663
  {/if}
656
664
  <div class="Row">
657
- <div class="Col">{$_('startLabel')}:</div>
665
+ <div class="Col">{$_('startLabel')}</div>
658
666
  <div class="Col"><span><caret-right/> {dateToReadableString(displayedLimit.from)}</span></div>
659
667
  </div>
660
668
  <div class="Row">
661
- <div class="Col">{$_('resetLabel')}:</div>
669
+ <div class="Col">{$_('resetLabel')}</div>
662
670
  <div class="Col"><span><caret-right/> {dateToReadableString(displayedLimit.to)}</span></div>
663
671
  </div>
664
672
  </div>