incyclist-services 1.7.72 → 1.7.74

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.
@@ -197,7 +197,7 @@ let RidePageService = (() => {
197
197
  onMenuClose() {
198
198
  try {
199
199
  const state = this.getRideDisplay().getState();
200
- if (state === 'Finished' || this.menuProps.finished) {
200
+ if (state === 'Finished' || this.menuProps?.finished) {
201
201
  this.moveToPreviousPage();
202
202
  this.closePage();
203
203
  return;
@@ -206,7 +206,7 @@ let RidePageService = (() => {
206
206
  this.updatePageDisplay();
207
207
  }
208
208
  catch (err) {
209
- this.logError(err, 'onMenuOpen');
209
+ this.logError(err, 'onMenuClose');
210
210
  }
211
211
  }
212
212
  onPause() {
@@ -158,6 +158,8 @@ let FreeRideService = (() => {
158
158
  if (!opts?.length && from != null) {
159
159
  opts = this.addLastSegmentReverse(opts, from);
160
160
  }
161
+ if (!from)
162
+ return opts ?? [];
161
163
  opts = this.filterOptions(opts, from);
162
164
  opts = this.sortOptions(opts, from);
163
165
  return opts;
@@ -53,6 +53,7 @@ const monitoring_1 = require("../../../monitoring");
53
53
  const geo_1 = require("../../../utils/geo");
54
54
  const i18n_1 = require("../../../i18n");
55
55
  const decorators_1 = require("../../../base/decorators");
56
+ const appstate_1 = require("../../../appstate");
56
57
  exports.DEFAULT_TITLE = 'Import Route';
57
58
  exports.DEFAULT_FILTERS = [
58
59
  { name: 'Routes', extensions: ['gpx', 'epm', 'xml', 'rlv', 'pgmf'] },
@@ -79,13 +80,16 @@ let RouteCard = (() => {
79
80
  let _instanceExtraInitializers = [];
80
81
  let _getBindings_decorators;
81
82
  let _getOnlineStatusMonitoring_decorators;
83
+ let _getAppState_decorators;
82
84
  return class RouteCard extends _classSuper {
83
85
  static {
84
86
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
85
87
  _getBindings_decorators = [decorators_1.Injectable];
86
88
  _getOnlineStatusMonitoring_decorators = [decorators_1.Injectable];
89
+ _getAppState_decorators = [decorators_1.Injectable];
87
90
  __esDecorate(this, null, _getBindings_decorators, { kind: "method", name: "getBindings", static: false, private: false, access: { has: obj => "getBindings" in obj, get: obj => obj.getBindings }, metadata: _metadata }, null, _instanceExtraInitializers);
88
91
  __esDecorate(this, null, _getOnlineStatusMonitoring_decorators, { kind: "method", name: "getOnlineStatusMonitoring", static: false, private: false, access: { has: obj => "getOnlineStatusMonitoring" in obj, get: obj => obj.getOnlineStatusMonitoring }, metadata: _metadata }, null, _instanceExtraInitializers);
92
+ __esDecorate(this, null, _getAppState_decorators, { kind: "method", name: "getAppState", static: false, private: false, access: { has: obj => "getAppState" in obj, get: obj => obj.getAppState }, metadata: _metadata }, null, _instanceExtraInitializers);
89
93
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
90
94
  }
91
95
  downloadObserver = __runInitializers(this, _instanceExtraInitializers);
@@ -370,11 +374,14 @@ let RouteCard = (() => {
370
374
  }
371
375
  let showLoopOverwrite, showNextOverwrite;
372
376
  let hasWorkout = true;
377
+ let showWorkoutOption = false;
373
378
  try {
374
379
  showLoopOverwrite = this.route?.description?.isLoop;
375
380
  const next = (0, route_1.getNextVideoId)(this.route);
376
381
  showNextOverwrite = !!next;
377
382
  hasWorkout = (0, valid_1.valid)(workouts.getSelected());
383
+ const workoutsEnabled = this.isMobile() ? this.getAppState().hasFeature('MOBILE_WORKOUTS') : true;
384
+ showWorkoutOption = workoutsEnabled && !hasWorkout;
378
385
  if (showNextOverwrite) {
379
386
  const card = (0, service_1.getRouteList)().getCard(next);
380
387
  const route = card?.getData();
@@ -392,7 +399,7 @@ let RouteCard = (() => {
392
399
  const totalElevation = { value: C(this.route.description.elevation, 'elevation', { digits: 0 }), unit: uEl };
393
400
  const xScale = { value: C(1, 'distance'), unit: uDist };
394
401
  const yScale = { value: C(1, 'elevation'), unit: uEl };
395
- return { settings: uiSettings, totalDistance, totalElevation, showLoopOverwrite, showNextOverwrite, hasWorkout, canStart, videoChecking, videoMissing,
402
+ return { settings: uiSettings, totalDistance, totalElevation, showLoopOverwrite, showNextOverwrite, hasWorkout, showWorkoutOption, canStart, videoChecking, videoMissing,
396
403
  xScale, yScale,
397
404
  updateStartPos: this.updateStartPos.bind(this),
398
405
  updateMarkers: this.updateMarkers.bind(this)
@@ -909,6 +916,9 @@ let RouteCard = (() => {
909
916
  getOnlineStatusMonitoring() {
910
917
  return (0, monitoring_1.useOnlineStatusMonitoring)();
911
918
  }
919
+ getAppState() {
920
+ return (0, appstate_1.useAppState)();
921
+ }
912
922
  getRouteDownload() {
913
923
  return (0, service_2.useRouteDownload)();
914
924
  }
@@ -203,9 +203,17 @@ let OverpassApi = (() => {
203
203
  const promises = [];
204
204
  this.mirrors.forEach(mirror => {
205
205
  promises.push(this.post(mirror, query)
206
- .then((res) => res?.data)
206
+ .then((res) => {
207
+ if (res?.status >= 400) {
208
+ const err = Object.assign(new Error(`HTTP ${res.status}`), { response: res });
209
+ errors.push(this.extractErrorInfo(err, mirror));
210
+ throw err;
211
+ }
212
+ return res?.data;
213
+ })
207
214
  .catch(err => {
208
- errors.push(this.extractErrorInfo(err, mirror));
215
+ if (!errors.find(e => e.mirror === mirror))
216
+ errors.push(this.extractErrorInfo(err, mirror));
209
217
  throw err;
210
218
  }));
211
219
  });
@@ -237,6 +245,9 @@ let OverpassApi = (() => {
237
245
  }
238
246
  try {
239
247
  const res = await this.post(mirror, query);
248
+ if (res?.status >= 400) {
249
+ throw Object.assign(new Error(`HTTP ${res.status}`), { response: res });
250
+ }
240
251
  return res?.data;
241
252
  }
242
253
  catch (err) {
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./service"), exports);
18
18
  __exportStar(require("./cards"), exports);
19
+ __exportStar(require("./pageService"), exports);
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
3
+ var useValue = arguments.length > 2;
4
+ for (var i = 0; i < initializers.length; i++) {
5
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
6
+ }
7
+ return useValue ? value : void 0;
8
+ };
9
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
10
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
11
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
12
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
13
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
14
+ var _, done = false;
15
+ for (var i = decorators.length - 1; i >= 0; i--) {
16
+ var context = {};
17
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
18
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
19
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
20
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
21
+ if (kind === "accessor") {
22
+ if (result === void 0) continue;
23
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
24
+ if (_ = accept(result.get)) descriptor.get = _;
25
+ if (_ = accept(result.set)) descriptor.set = _;
26
+ if (_ = accept(result.init)) initializers.unshift(_);
27
+ }
28
+ else if (_ = accept(result)) {
29
+ if (kind === "field") initializers.unshift(_);
30
+ else descriptor[key] = _;
31
+ }
32
+ }
33
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
34
+ done = true;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.getWorkoutListPageService = exports.WorkoutListPageService = void 0;
38
+ const types_1 = require("../../base/types");
39
+ const pages_1 = require("../../base/pages");
40
+ const decorators_1 = require("../../base/decorators");
41
+ const appstate_1 = require("../../appstate");
42
+ let WorkoutListPageService = (() => {
43
+ let _classDecorators = [types_1.Singleton];
44
+ let _classDescriptor;
45
+ let _classExtraInitializers = [];
46
+ let _classThis;
47
+ let _classSuper = pages_1.IncyclistPageService;
48
+ let _instanceExtraInitializers = [];
49
+ let _getAppState_decorators;
50
+ var WorkoutListPageService = class extends _classSuper {
51
+ static { _classThis = this; }
52
+ static {
53
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
54
+ _getAppState_decorators = [decorators_1.Injectable];
55
+ __esDecorate(this, null, _getAppState_decorators, { kind: "method", name: "getAppState", static: false, private: false, access: { has: obj => "getAppState" in obj, get: obj => obj.getAppState }, metadata: _metadata }, null, _instanceExtraInitializers);
56
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
57
+ WorkoutListPageService = _classThis = _classDescriptor.value;
58
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
59
+ __runInitializers(_classThis, _classExtraInitializers);
60
+ }
61
+ constructor() {
62
+ super('WorkoutListPage');
63
+ __runInitializers(this, _instanceExtraInitializers);
64
+ }
65
+ openPage() {
66
+ try {
67
+ super.openPage();
68
+ this.logEvent({ message: 'page shown', page: 'Workouts' });
69
+ return this.getPageObserver();
70
+ }
71
+ catch (err) {
72
+ this.logError(err, 'openPage');
73
+ }
74
+ }
75
+ closePage() {
76
+ try {
77
+ this.logEvent({ message: 'page closed', page: 'Workouts' });
78
+ super.closePage();
79
+ }
80
+ catch (err) {
81
+ this.logError(err, 'closePage');
82
+ }
83
+ }
84
+ getPageDisplayProps() {
85
+ if (!this.getAppState().hasFeature('MOBILE_WORKOUTS')) {
86
+ return { pageType: 'placeholder' };
87
+ }
88
+ return { pageType: 'list' };
89
+ }
90
+ getAppState() {
91
+ return (0, appstate_1.useAppState)();
92
+ }
93
+ };
94
+ return WorkoutListPageService = _classThis;
95
+ })();
96
+ exports.WorkoutListPageService = WorkoutListPageService;
97
+ const getWorkoutListPageService = () => new WorkoutListPageService();
98
+ exports.getWorkoutListPageService = getWorkoutListPageService;
@@ -194,7 +194,7 @@ let RidePageService = (() => {
194
194
  onMenuClose() {
195
195
  try {
196
196
  const state = this.getRideDisplay().getState();
197
- if (state === 'Finished' || this.menuProps.finished) {
197
+ if (state === 'Finished' || this.menuProps?.finished) {
198
198
  this.moveToPreviousPage();
199
199
  this.closePage();
200
200
  return;
@@ -203,7 +203,7 @@ let RidePageService = (() => {
203
203
  this.updatePageDisplay();
204
204
  }
205
205
  catch (err) {
206
- this.logError(err, 'onMenuOpen');
206
+ this.logError(err, 'onMenuClose');
207
207
  }
208
208
  }
209
209
  onPause() {
@@ -152,6 +152,8 @@ let FreeRideService = (() => {
152
152
  if (!opts?.length && from != null) {
153
153
  opts = this.addLastSegmentReverse(opts, from);
154
154
  }
155
+ if (!from)
156
+ return opts ?? [];
155
157
  opts = this.filterOptions(opts, from);
156
158
  opts = this.sortOptions(opts, from);
157
159
  return opts;
@@ -50,6 +50,7 @@ import { useOnlineStatusMonitoring } from "../../../monitoring";
50
50
  import { distanceBetween } from "../../../utils/geo";
51
51
  import { getUnitConversionShortcuts } from "../../../i18n";
52
52
  import { Injectable } from "../../../base/decorators";
53
+ import { useAppState } from "../../../appstate";
53
54
  export const DEFAULT_TITLE = 'Import Route';
54
55
  export const DEFAULT_FILTERS = [
55
56
  { name: 'Routes', extensions: ['gpx', 'epm', 'xml', 'rlv', 'pgmf'] },
@@ -76,13 +77,16 @@ let RouteCard = (() => {
76
77
  let _instanceExtraInitializers = [];
77
78
  let _getBindings_decorators;
78
79
  let _getOnlineStatusMonitoring_decorators;
80
+ let _getAppState_decorators;
79
81
  return class RouteCard extends _classSuper {
80
82
  static {
81
83
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
82
84
  _getBindings_decorators = [Injectable];
83
85
  _getOnlineStatusMonitoring_decorators = [Injectable];
86
+ _getAppState_decorators = [Injectable];
84
87
  __esDecorate(this, null, _getBindings_decorators, { kind: "method", name: "getBindings", static: false, private: false, access: { has: obj => "getBindings" in obj, get: obj => obj.getBindings }, metadata: _metadata }, null, _instanceExtraInitializers);
85
88
  __esDecorate(this, null, _getOnlineStatusMonitoring_decorators, { kind: "method", name: "getOnlineStatusMonitoring", static: false, private: false, access: { has: obj => "getOnlineStatusMonitoring" in obj, get: obj => obj.getOnlineStatusMonitoring }, metadata: _metadata }, null, _instanceExtraInitializers);
89
+ __esDecorate(this, null, _getAppState_decorators, { kind: "method", name: "getAppState", static: false, private: false, access: { has: obj => "getAppState" in obj, get: obj => obj.getAppState }, metadata: _metadata }, null, _instanceExtraInitializers);
86
90
  if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
87
91
  }
88
92
  downloadObserver = __runInitializers(this, _instanceExtraInitializers);
@@ -367,11 +371,14 @@ let RouteCard = (() => {
367
371
  }
368
372
  let showLoopOverwrite, showNextOverwrite;
369
373
  let hasWorkout = true;
374
+ let showWorkoutOption = false;
370
375
  try {
371
376
  showLoopOverwrite = this.route?.description?.isLoop;
372
377
  const next = getNextVideoId(this.route);
373
378
  showNextOverwrite = !!next;
374
379
  hasWorkout = valid(workouts.getSelected());
380
+ const workoutsEnabled = this.isMobile() ? this.getAppState().hasFeature('MOBILE_WORKOUTS') : true;
381
+ showWorkoutOption = workoutsEnabled && !hasWorkout;
375
382
  if (showNextOverwrite) {
376
383
  const card = getRouteList().getCard(next);
377
384
  const route = card?.getData();
@@ -389,7 +396,7 @@ let RouteCard = (() => {
389
396
  const totalElevation = { value: C(this.route.description.elevation, 'elevation', { digits: 0 }), unit: uEl };
390
397
  const xScale = { value: C(1, 'distance'), unit: uDist };
391
398
  const yScale = { value: C(1, 'elevation'), unit: uEl };
392
- return { settings: uiSettings, totalDistance, totalElevation, showLoopOverwrite, showNextOverwrite, hasWorkout, canStart, videoChecking, videoMissing,
399
+ return { settings: uiSettings, totalDistance, totalElevation, showLoopOverwrite, showNextOverwrite, hasWorkout, showWorkoutOption, canStart, videoChecking, videoMissing,
393
400
  xScale, yScale,
394
401
  updateStartPos: this.updateStartPos.bind(this),
395
402
  updateMarkers: this.updateMarkers.bind(this)
@@ -906,6 +913,9 @@ let RouteCard = (() => {
906
913
  getOnlineStatusMonitoring() {
907
914
  return useOnlineStatusMonitoring();
908
915
  }
916
+ getAppState() {
917
+ return useAppState();
918
+ }
909
919
  getRouteDownload() {
910
920
  return useRouteDownload();
911
921
  }
@@ -197,9 +197,17 @@ let OverpassApi = (() => {
197
197
  const promises = [];
198
198
  this.mirrors.forEach(mirror => {
199
199
  promises.push(this.post(mirror, query)
200
- .then((res) => res?.data)
200
+ .then((res) => {
201
+ if (res?.status >= 400) {
202
+ const err = Object.assign(new Error(`HTTP ${res.status}`), { response: res });
203
+ errors.push(this.extractErrorInfo(err, mirror));
204
+ throw err;
205
+ }
206
+ return res?.data;
207
+ })
201
208
  .catch(err => {
202
- errors.push(this.extractErrorInfo(err, mirror));
209
+ if (!errors.find(e => e.mirror === mirror))
210
+ errors.push(this.extractErrorInfo(err, mirror));
203
211
  throw err;
204
212
  }));
205
213
  });
@@ -231,6 +239,9 @@ let OverpassApi = (() => {
231
239
  }
232
240
  try {
233
241
  const res = await this.post(mirror, query);
242
+ if (res?.status >= 400) {
243
+ throw Object.assign(new Error(`HTTP ${res.status}`), { response: res });
244
+ }
234
245
  return res?.data;
235
246
  }
236
247
  catch (err) {
@@ -1,2 +1,3 @@
1
1
  export * from './service';
2
2
  export * from './cards';
3
+ export * from './pageService';
@@ -0,0 +1,94 @@
1
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
2
+ var useValue = arguments.length > 2;
3
+ for (var i = 0; i < initializers.length; i++) {
4
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
5
+ }
6
+ return useValue ? value : void 0;
7
+ };
8
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
9
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
10
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
11
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
12
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
13
+ var _, done = false;
14
+ for (var i = decorators.length - 1; i >= 0; i--) {
15
+ var context = {};
16
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
17
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
18
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
19
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
20
+ if (kind === "accessor") {
21
+ if (result === void 0) continue;
22
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
23
+ if (_ = accept(result.get)) descriptor.get = _;
24
+ if (_ = accept(result.set)) descriptor.set = _;
25
+ if (_ = accept(result.init)) initializers.unshift(_);
26
+ }
27
+ else if (_ = accept(result)) {
28
+ if (kind === "field") initializers.unshift(_);
29
+ else descriptor[key] = _;
30
+ }
31
+ }
32
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
33
+ done = true;
34
+ };
35
+ import { Singleton } from "../../base/types";
36
+ import { IncyclistPageService } from "../../base/pages";
37
+ import { Injectable } from "../../base/decorators";
38
+ import { useAppState } from "../../appstate";
39
+ let WorkoutListPageService = (() => {
40
+ let _classDecorators = [Singleton];
41
+ let _classDescriptor;
42
+ let _classExtraInitializers = [];
43
+ let _classThis;
44
+ let _classSuper = IncyclistPageService;
45
+ let _instanceExtraInitializers = [];
46
+ let _getAppState_decorators;
47
+ var WorkoutListPageService = class extends _classSuper {
48
+ static { _classThis = this; }
49
+ static {
50
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
51
+ _getAppState_decorators = [Injectable];
52
+ __esDecorate(this, null, _getAppState_decorators, { kind: "method", name: "getAppState", static: false, private: false, access: { has: obj => "getAppState" in obj, get: obj => obj.getAppState }, metadata: _metadata }, null, _instanceExtraInitializers);
53
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
54
+ WorkoutListPageService = _classThis = _classDescriptor.value;
55
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
56
+ __runInitializers(_classThis, _classExtraInitializers);
57
+ }
58
+ constructor() {
59
+ super('WorkoutListPage');
60
+ __runInitializers(this, _instanceExtraInitializers);
61
+ }
62
+ openPage() {
63
+ try {
64
+ super.openPage();
65
+ this.logEvent({ message: 'page shown', page: 'Workouts' });
66
+ return this.getPageObserver();
67
+ }
68
+ catch (err) {
69
+ this.logError(err, 'openPage');
70
+ }
71
+ }
72
+ closePage() {
73
+ try {
74
+ this.logEvent({ message: 'page closed', page: 'Workouts' });
75
+ super.closePage();
76
+ }
77
+ catch (err) {
78
+ this.logError(err, 'closePage');
79
+ }
80
+ }
81
+ getPageDisplayProps() {
82
+ if (!this.getAppState().hasFeature('MOBILE_WORKOUTS')) {
83
+ return { pageType: 'placeholder' };
84
+ }
85
+ return { pageType: 'list' };
86
+ }
87
+ getAppState() {
88
+ return useAppState();
89
+ }
90
+ };
91
+ return WorkoutListPageService = _classThis;
92
+ })();
93
+ export { WorkoutListPageService };
94
+ export const getWorkoutListPageService = () => new WorkoutListPageService();
@@ -1,4 +1,4 @@
1
- export type FeatureToggle = 'NEW_SEARCH_UI' | 'CONTROLLERS';
1
+ export type FeatureToggle = 'NEW_SEARCH_UI' | 'CONTROLLERS' | 'MOBILE_WORKOUTS';
2
2
  export type Interfaces = 'ant' | 'ble' | 'serial' | 'wifi' | 'tcpip';
3
3
  export type BLEFeatures = {
4
4
  services: Array<string>;
@@ -114,6 +114,7 @@ export declare class RouteCard extends BaseCard implements Card<Route> {
114
114
  protected isMobile(): boolean;
115
115
  protected getBindings(): import("../../../api").IncyclistBindings;
116
116
  protected getOnlineStatusMonitoring(): import("../../../monitoring").OnlineStateMonitoringService;
117
+ protected getAppState(): import("../../../appstate").AppStateService;
117
118
  protected getRouteDownload(): import("../../download/service").RouteDownloadService;
118
119
  }
119
120
  export {};
@@ -76,6 +76,7 @@ export type RouteCardProps = {
76
76
  showLoopOverwrite: boolean;
77
77
  showNextOverwrite: boolean;
78
78
  hasWorkout?: boolean;
79
+ showWorkoutOption?: boolean;
79
80
  canStart?: boolean;
80
81
  videoMissing?: Promise<boolean>;
81
82
  videoChecking?: boolean;
@@ -1,2 +1,3 @@
1
1
  export * from './service';
2
2
  export * from './cards';
3
+ export * from './pageService';
@@ -0,0 +1,18 @@
1
+ import { IncyclistPageService } from "../../base/pages";
2
+ import { IObserver } from "../../types";
3
+ export type WorkoutListPageDisplayProps = {
4
+ pageType: 'placeholder';
5
+ } | {
6
+ pageType: 'list';
7
+ };
8
+ export interface IWorkoutListPageService {
9
+ getPageDisplayProps(): WorkoutListPageDisplayProps;
10
+ }
11
+ export declare class WorkoutListPageService extends IncyclistPageService implements IWorkoutListPageService {
12
+ constructor();
13
+ openPage(): IObserver;
14
+ closePage(): void;
15
+ getPageDisplayProps(): WorkoutListPageDisplayProps;
16
+ protected getAppState(): import("../../appstate").AppStateService;
17
+ }
18
+ export declare const getWorkoutListPageService: () => WorkoutListPageService;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "incyclist-services",
3
- "version": "1.7.72",
3
+ "version": "1.7.74",
4
4
  "peerDependencies": {
5
5
  "gd-eventlog": "^0.1.27"
6
6
  },
7
7
  "dependencies": {
8
8
  "@garmin/fitsdk": "^21.200.0",
9
9
  "axios": "^1.15.2",
10
- "incyclist-devices": "^3.0.22",
10
+ "incyclist-devices": "^3.0.23",
11
11
  "promise.any": "^2.0.6",
12
12
  "semver": "^7.7.4",
13
13
  "tcx-builder": "^1.1.1",