@swimedge/metrics 1.1.0 → 1.1.1
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/dist/index.js +15 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -251,7 +251,7 @@ exports.METRICS_REGISTRY = {
|
|
|
251
251
|
availableFrom: { watch: true, manual: true },
|
|
252
252
|
swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
|
|
253
253
|
hasChart: true,
|
|
254
|
-
formatter: (s) => (0, exports.formatPace)(s.avgPace)
|
|
254
|
+
formatter: (s) => `${(0, exports.formatPace)(s.avgPace)}/100m`,
|
|
255
255
|
condition: (s) => !!s.avgPace,
|
|
256
256
|
},
|
|
257
257
|
poolLength: {
|
|
@@ -496,7 +496,7 @@ exports.METRICS_REGISTRY = {
|
|
|
496
496
|
description: 'Session notes',
|
|
497
497
|
isPerSession: true,
|
|
498
498
|
availableFrom: { watch: false, manual: true },
|
|
499
|
-
swimTypes: [SwimType.INDOOR],
|
|
499
|
+
swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
|
|
500
500
|
},
|
|
501
501
|
trainingTypes: {
|
|
502
502
|
key: 'trainingTypes',
|
|
@@ -508,7 +508,7 @@ exports.METRICS_REGISTRY = {
|
|
|
508
508
|
availableFrom: { watch: false, manual: true },
|
|
509
509
|
formatter: (s) => s.trainingTypes?.join(', ') || '',
|
|
510
510
|
condition: (s) => !!s.trainingTypes?.length,
|
|
511
|
-
swimTypes: [SwimType.INDOOR],
|
|
511
|
+
swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
|
|
512
512
|
},
|
|
513
513
|
perceivedEffort: {
|
|
514
514
|
key: 'perceivedEffort',
|
|
@@ -518,9 +518,19 @@ exports.METRICS_REGISTRY = {
|
|
|
518
518
|
icon: 'body-outline',
|
|
519
519
|
isPerSession: true,
|
|
520
520
|
availableFrom: { watch: false, manual: true },
|
|
521
|
-
formatter: (s) =>
|
|
521
|
+
formatter: (s) => {
|
|
522
|
+
const effortMap = {
|
|
523
|
+
1: 'Very Easy',
|
|
524
|
+
2: 'Easy',
|
|
525
|
+
3: 'Moderate',
|
|
526
|
+
4: 'Hard',
|
|
527
|
+
5: 'Very Hard'
|
|
528
|
+
};
|
|
529
|
+
const effortNum = typeof s.perceivedEffort === 'string' ? parseInt(s.perceivedEffort) : s.perceivedEffort;
|
|
530
|
+
return effortMap[effortNum] || 'Unknown';
|
|
531
|
+
},
|
|
522
532
|
condition: (s) => !!s.perceivedEffort,
|
|
523
|
-
swimTypes: [SwimType.INDOOR],
|
|
533
|
+
swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
|
|
524
534
|
},
|
|
525
535
|
equipment: {
|
|
526
536
|
key: 'equipment',
|