musora-content-services 1.0.132 → 1.0.133
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/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +39 -6
- package/src/contentTypeConfig.js +10 -0
- package/src/services/sanity.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.0.133](https://github.com/railroadmedia/musora-content-services/compare/v1.0.132...v1.0.133) (2024-10-10)
|
|
6
|
+
|
|
5
7
|
### [1.0.132](https://github.com/railroadmedia/musora-content-services/compare/v1.0.131...v1.0.132) (2024-10-10)
|
|
6
8
|
|
|
7
9
|
### [1.0.131](https://github.com/railroadmedia/musora-content-services/compare/v1.0.130...v1.0.131) (2024-10-10)
|
package/package.json
CHANGED
package/src/contentMetaData.js
CHANGED
|
@@ -176,13 +176,19 @@ const commonMetadata ={
|
|
|
176
176
|
name: '5 Minutes',
|
|
177
177
|
short_name: '5 MINS',
|
|
178
178
|
is_required_field: true,
|
|
179
|
-
value: 'length_in_seconds
|
|
179
|
+
value: 'length_in_seconds,-450',
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
name: '10 Minutes',
|
|
183
183
|
short_name: '10 MINS',
|
|
184
184
|
is_required_field: true,
|
|
185
|
-
value: 'length_in_seconds
|
|
185
|
+
value: 'length_in_seconds,450-750',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: '15+ Minutes',
|
|
189
|
+
short_name: '15+ MINS',
|
|
190
|
+
is_required_field: true,
|
|
191
|
+
value: 'length_in_seconds,750+',
|
|
186
192
|
},
|
|
187
193
|
{
|
|
188
194
|
name: 'Instructors',
|
|
@@ -251,25 +257,25 @@ const contentMetadata = {
|
|
|
251
257
|
name: 'Drags',
|
|
252
258
|
short_name: 'DRAGS',
|
|
253
259
|
is_required_field: true,
|
|
254
|
-
value: 'topic
|
|
260
|
+
value: 'topic,drags',
|
|
255
261
|
},
|
|
256
262
|
{
|
|
257
263
|
name: 'Flams',
|
|
258
264
|
short_name: 'FLAMS',
|
|
259
265
|
is_required_field: true,
|
|
260
|
-
value: 'topic
|
|
266
|
+
value: 'topic,flams',
|
|
261
267
|
},
|
|
262
268
|
{
|
|
263
269
|
name: 'Paradiddles',
|
|
264
270
|
short_name: 'PARADIDDLES',
|
|
265
271
|
is_required_field: true,
|
|
266
|
-
value: 'topic
|
|
272
|
+
value: 'topic,paradiddles',
|
|
267
273
|
},
|
|
268
274
|
{
|
|
269
275
|
name: 'Rolls',
|
|
270
276
|
short_name: 'ROLLS',
|
|
271
277
|
is_required_field: true,
|
|
272
|
-
value: 'topic
|
|
278
|
+
value: 'topic,rolls',
|
|
273
279
|
},
|
|
274
280
|
],
|
|
275
281
|
sortBy: 'sort',
|
|
@@ -1064,6 +1070,33 @@ const contentMetadata = {
|
|
|
1064
1070
|
hlsManifestUrl: "https://player.vimeo.com/external/578243377.m3u8?s=3def726f48a4a300420f793090e4913a48c8d1f9&oauth2_token_id=1284792283"
|
|
1065
1071
|
}
|
|
1066
1072
|
},
|
|
1073
|
+
'workout': {
|
|
1074
|
+
tabs: [
|
|
1075
|
+
{
|
|
1076
|
+
name: 'All',
|
|
1077
|
+
short_name: 'ALL',
|
|
1078
|
+
value: '',
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
name: '5 Minutes',
|
|
1082
|
+
short_name: '5 MINS',
|
|
1083
|
+
is_required_field: true,
|
|
1084
|
+
value: 'length_in_seconds,-450',
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
name: '10 Minutes',
|
|
1088
|
+
short_name: '10 MINS',
|
|
1089
|
+
is_required_field: true,
|
|
1090
|
+
value: 'length_in_seconds,450-750',
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
name: 'Instructors',
|
|
1094
|
+
short_name: 'INSTRUCTORS',
|
|
1095
|
+
is_group_by: true,
|
|
1096
|
+
value: 'instructor',
|
|
1097
|
+
},
|
|
1098
|
+
],
|
|
1099
|
+
},
|
|
1067
1100
|
}
|
|
1068
1101
|
};
|
|
1069
1102
|
|
package/src/contentTypeConfig.js
CHANGED
|
@@ -386,6 +386,16 @@ function filtersToGroq(filters, selectedFilters = []) {
|
|
|
386
386
|
return `difficulty_string == "${value}"`;
|
|
387
387
|
} else if (key === 'type' && !selectedFilters.includes(key)) {
|
|
388
388
|
return `_type == "${value}"`;
|
|
389
|
+
} else if (key === 'length_in_seconds') {
|
|
390
|
+
if (value.includes('-')) {
|
|
391
|
+
const [min, max] = value.split('-').map(Number);
|
|
392
|
+
return `(${key} > ${min} && ${key} < ${max})`;
|
|
393
|
+
} else if (value.includes('+')) {
|
|
394
|
+
const min = parseInt(value, 10);
|
|
395
|
+
return `(${key} > ${min})`;
|
|
396
|
+
} else {
|
|
397
|
+
return `${key} == ${value}`;
|
|
398
|
+
}
|
|
389
399
|
} else if (!selectedFilters.includes(key)) {
|
|
390
400
|
return ` ${key} == ${/^\d+$/.test(value) ? value : `"$${value}"`}`;
|
|
391
401
|
}
|
package/src/services/sanity.js
CHANGED
|
File without changes
|