incyclist-services 1.7.82 → 1.7.84

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.
@@ -14,8 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.useWorkoutCalendar = exports.WorkoutCalendarService = void 0;
17
18
  __exportStar(require("./list"), exports);
18
19
  __exportStar(require("./ride"), exports);
19
20
  __exportStar(require("./base/model"), exports);
20
21
  __exportStar(require("./base/graph"), exports);
21
22
  __exportStar(require("./page"), exports);
23
+ var calendar_1 = require("./calendar");
24
+ Object.defineProperty(exports, "WorkoutCalendarService", { enumerable: true, get: function () { return calendar_1.WorkoutCalendarService; } });
25
+ Object.defineProperty(exports, "useWorkoutCalendar", { enumerable: true, get: function () { return calendar_1.useWorkoutCalendar; } });
@@ -83,6 +83,7 @@ let WorkoutListPageService = (() => {
83
83
  importingFileName;
84
84
  importResult;
85
85
  importError;
86
+ importGeneration = 0;
86
87
  listObserver;
87
88
  listUpdateHandler = this.emitPageUpdate.bind(this);
88
89
  calendarUpdateHandler = this.emitPageUpdate.bind(this);
@@ -317,6 +318,7 @@ let WorkoutListPageService = (() => {
317
318
  }
318
319
  onImportFile(file) {
319
320
  const observer = new observer_1.Observer();
321
+ const generation = this.importGeneration = Date.now();
320
322
  try {
321
323
  this.importPhase = 'importing';
322
324
  this.importingFileName = file?.name;
@@ -324,17 +326,21 @@ let WorkoutListPageService = (() => {
324
326
  this.getWorkoutList().import(file, { showImportCards: false })
325
327
  .then(([card]) => {
326
328
  const group = this.getLastUsedImportGroup();
329
+ observer.emit('success');
330
+ if (generation !== this.importGeneration)
331
+ return;
327
332
  if (group !== DEFAULT_IMPORT_GROUP)
328
333
  card.move(group);
329
334
  this.importPhase = 'result';
330
335
  this.importResult = { id: card.getId(), workoutName: card.getTitle(), group };
331
- observer.emit('success');
332
336
  this.emitImportUpdate();
333
337
  })
334
338
  .catch((err) => {
339
+ observer.emit('error', err);
340
+ if (generation !== this.importGeneration)
341
+ return;
335
342
  this.importPhase = 'error';
336
343
  this.importError = err?.message;
337
- observer.emit('error', err);
338
344
  this.emitImportUpdate();
339
345
  });
340
346
  }
@@ -358,6 +364,7 @@ let WorkoutListPageService = (() => {
358
364
  }
359
365
  onImportClose() {
360
366
  try {
367
+ this.importGeneration = Date.now();
361
368
  delete this.importPhase;
362
369
  delete this.importingFileName;
363
370
  delete this.importResult;
@@ -41,11 +41,14 @@ const types_1 = require("../../../base/types");
41
41
  const pages_1 = require("../../../base/pages");
42
42
  const display_1 = require("../../../ride/display");
43
43
  const activities_1 = require("../../../activities");
44
+ const settings_1 = require("../../../settings");
44
45
  const service_1 = require("../service");
45
46
  const graph_1 = require("../../base/graph");
46
47
  const BACKGROUND_PAUSE_TIMEOUT_MS = 300000;
47
48
  const UPCOMING_STEPS_COUNT = 3;
48
49
  const DEFAULT_LOAD_INCREMENT = 1;
50
+ const HINTS_WORKOUT_GESTURES_KEY = 'hints.workoutRideGestures';
51
+ const LOAD_INCREMENT_SETTING_KEY = 'preferences.workouts.loadIncrement';
49
52
  let WorkoutRidePageService = (() => {
50
53
  let _classDecorators = [types_1.Singleton];
51
54
  let _classDescriptor;
@@ -56,6 +59,7 @@ let WorkoutRidePageService = (() => {
56
59
  let _getRideDisplay_decorators;
57
60
  let _getWorkoutRide_decorators;
58
61
  let _getActivityRide_decorators;
62
+ let _getUserSettings_decorators;
59
63
  var WorkoutRidePageService = class extends _classSuper {
60
64
  static { _classThis = this; }
61
65
  static {
@@ -63,9 +67,11 @@ let WorkoutRidePageService = (() => {
63
67
  _getRideDisplay_decorators = [decorators_1.Injectable];
64
68
  _getWorkoutRide_decorators = [decorators_1.Injectable];
65
69
  _getActivityRide_decorators = [decorators_1.Injectable];
70
+ _getUserSettings_decorators = [decorators_1.Injectable];
66
71
  __esDecorate(this, null, _getRideDisplay_decorators, { kind: "method", name: "getRideDisplay", static: false, private: false, access: { has: obj => "getRideDisplay" in obj, get: obj => obj.getRideDisplay }, metadata: _metadata }, null, _instanceExtraInitializers);
67
72
  __esDecorate(this, null, _getWorkoutRide_decorators, { kind: "method", name: "getWorkoutRide", static: false, private: false, access: { has: obj => "getWorkoutRide" in obj, get: obj => obj.getWorkoutRide }, metadata: _metadata }, null, _instanceExtraInitializers);
68
73
  __esDecorate(this, null, _getActivityRide_decorators, { kind: "method", name: "getActivityRide", static: false, private: false, access: { has: obj => "getActivityRide" in obj, get: obj => obj.getActivityRide }, metadata: _metadata }, null, _instanceExtraInitializers);
74
+ __esDecorate(this, null, _getUserSettings_decorators, { kind: "method", name: "getUserSettings", static: false, private: false, access: { has: obj => "getUserSettings" in obj, get: obj => obj.getUserSettings }, metadata: _metadata }, null, _instanceExtraInitializers);
69
75
  __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
70
76
  WorkoutRidePageService = _classThis = _classDescriptor.value;
71
77
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
@@ -77,6 +83,7 @@ let WorkoutRidePageService = (() => {
77
83
  backgroundTimer;
78
84
  backgroundPausedByService = false;
79
85
  menuProps = null;
86
+ gestureHintDismissed = false;
80
87
  constructor() {
81
88
  super('WorkoutRidePage');
82
89
  this.rideEventHandler['state-update'] = this.onRideStateUpdate.bind(this);
@@ -91,6 +98,7 @@ let WorkoutRidePageService = (() => {
91
98
  try {
92
99
  this.logEvent({ message: 'page shown', page: 'WorkoutRide' });
93
100
  gd_eventlog_1.EventLogger.setGlobalConfig('page', 'WorkoutRide');
101
+ this.gestureHintDismissed = false;
94
102
  super.openPage();
95
103
  try {
96
104
  const service = this.getRideDisplay();
@@ -162,7 +170,9 @@ let WorkoutRidePageService = (() => {
162
170
  title: wo.title ?? '',
163
171
  graph: this.buildGraphPlan(current, wo.ftp),
164
172
  steps: this.buildUpcomingSteps(current, wo.ftp),
165
- dashboard: this.buildDashboardLine(wo)
173
+ dashboard: this.buildDashboardLine(wo),
174
+ gestureHint: this.buildGestureHint(base.startOverlayProps === null),
175
+ loadIncrement: this.getLoadIncrement()
166
176
  };
167
177
  }
168
178
  catch (err) {
@@ -262,6 +272,15 @@ let WorkoutRidePageService = (() => {
262
272
  onDecreaseLoad() {
263
273
  this.adjustLoad(-DEFAULT_LOAD_INCREMENT);
264
274
  }
275
+ onSetLoadIncrement(value) {
276
+ try {
277
+ this.getUserSettings().set(LOAD_INCREMENT_SETTING_KEY, value);
278
+ this.updatePageDisplay();
279
+ }
280
+ catch (err) {
281
+ this.logError(err, 'onSetLoadIncrement');
282
+ }
283
+ }
265
284
  onRetryStart() {
266
285
  try {
267
286
  this.getRideDisplay().retryStart();
@@ -278,6 +297,18 @@ let WorkoutRidePageService = (() => {
278
297
  this.logError(err, 'onIgnoreStart');
279
298
  }
280
299
  }
300
+ onGestureHintDismissed({ dontShowAgain }) {
301
+ try {
302
+ this.gestureHintDismissed = true;
303
+ if (dontShowAgain) {
304
+ this.getUserSettings().set(HINTS_WORKOUT_GESTURES_KEY, true);
305
+ }
306
+ this.updatePageDisplay();
307
+ }
308
+ catch (err) {
309
+ this.logError(err, 'onGestureHintDismissed');
310
+ }
311
+ }
281
312
  onCancelStart() {
282
313
  try {
283
314
  this.rideObserver?.stop();
@@ -357,6 +388,21 @@ let WorkoutRidePageService = (() => {
357
388
  startGateProps: null
358
389
  };
359
390
  }
391
+ buildGestureHint(startOverlayCleared) {
392
+ if (this.gestureHintDismissed || !startOverlayCleared)
393
+ return null;
394
+ if (this.getElapsedActivityTime() !== 0 || this.getCurrentCadence() !== 0)
395
+ return null;
396
+ if (this.getUserSettings().get(HINTS_WORKOUT_GESTURES_KEY, false))
397
+ return null;
398
+ return { visible: true };
399
+ }
400
+ getCurrentCadence() {
401
+ return this.getActivityRide().getCurrentValues?.()?.cadence ?? 0;
402
+ }
403
+ getLoadIncrement() {
404
+ return this.getUserSettings().get(LOAD_INCREMENT_SETTING_KEY, DEFAULT_LOAD_INCREMENT);
405
+ }
360
406
  buildGraphPlan(current, ftp) {
361
407
  if (!current) {
362
408
  return { bars: [], ftp: ftp ?? 0, ftpLine: ftp ?? 0, domain: { x: [0, 0], y: [0, 0] } };
@@ -451,7 +497,9 @@ let WorkoutRidePageService = (() => {
451
497
  title: '',
452
498
  graph: { bars: [], ftp: 0, ftpLine: 0, domain: { x: [0, 0], y: [0, 0] } },
453
499
  steps: { previous: null, current: null, upcoming: [], hasMore: false },
454
- dashboard: { text: '', mode: null }
500
+ dashboard: { text: '', mode: null },
501
+ gestureHint: null,
502
+ loadIncrement: DEFAULT_LOAD_INCREMENT
455
503
  };
456
504
  }
457
505
  updatePageDisplay() {
@@ -481,6 +529,9 @@ let WorkoutRidePageService = (() => {
481
529
  getActivityRide() {
482
530
  return (0, activities_1.useActivityRide)();
483
531
  }
532
+ getUserSettings() {
533
+ return (0, settings_1.useUserSettings)();
534
+ }
484
535
  };
485
536
  return WorkoutRidePageService = _classThis;
486
537
  })();
@@ -3,3 +3,4 @@ export * from './ride';
3
3
  export * from './base/model';
4
4
  export * from './base/graph';
5
5
  export * from './page';
6
+ export { WorkoutCalendarService, useWorkoutCalendar } from './calendar';
@@ -80,6 +80,7 @@ let WorkoutListPageService = (() => {
80
80
  importingFileName;
81
81
  importResult;
82
82
  importError;
83
+ importGeneration = 0;
83
84
  listObserver;
84
85
  listUpdateHandler = this.emitPageUpdate.bind(this);
85
86
  calendarUpdateHandler = this.emitPageUpdate.bind(this);
@@ -314,6 +315,7 @@ let WorkoutListPageService = (() => {
314
315
  }
315
316
  onImportFile(file) {
316
317
  const observer = new Observer();
318
+ const generation = this.importGeneration = Date.now();
317
319
  try {
318
320
  this.importPhase = 'importing';
319
321
  this.importingFileName = file?.name;
@@ -321,17 +323,21 @@ let WorkoutListPageService = (() => {
321
323
  this.getWorkoutList().import(file, { showImportCards: false })
322
324
  .then(([card]) => {
323
325
  const group = this.getLastUsedImportGroup();
326
+ observer.emit('success');
327
+ if (generation !== this.importGeneration)
328
+ return;
324
329
  if (group !== DEFAULT_IMPORT_GROUP)
325
330
  card.move(group);
326
331
  this.importPhase = 'result';
327
332
  this.importResult = { id: card.getId(), workoutName: card.getTitle(), group };
328
- observer.emit('success');
329
333
  this.emitImportUpdate();
330
334
  })
331
335
  .catch((err) => {
336
+ observer.emit('error', err);
337
+ if (generation !== this.importGeneration)
338
+ return;
332
339
  this.importPhase = 'error';
333
340
  this.importError = err?.message;
334
- observer.emit('error', err);
335
341
  this.emitImportUpdate();
336
342
  });
337
343
  }
@@ -355,6 +361,7 @@ let WorkoutListPageService = (() => {
355
361
  }
356
362
  onImportClose() {
357
363
  try {
364
+ this.importGeneration = Date.now();
358
365
  delete this.importPhase;
359
366
  delete this.importingFileName;
360
367
  delete this.importResult;
@@ -38,11 +38,14 @@ import { Singleton } from "../../../base/types";
38
38
  import { IncyclistPageService } from "../../../base/pages";
39
39
  import { useRideDisplay } from "../../../ride/display";
40
40
  import { useActivityRide } from "../../../activities";
41
+ import { useUserSettings } from "../../../settings";
41
42
  import { useWorkoutRide } from "../service";
42
43
  import { getFlattenedSteps, getStepDuration, getStepTargetText, getWorkoutGraphSeries } from "../../base/graph";
43
44
  const BACKGROUND_PAUSE_TIMEOUT_MS = 300000;
44
45
  const UPCOMING_STEPS_COUNT = 3;
45
46
  const DEFAULT_LOAD_INCREMENT = 1;
47
+ const HINTS_WORKOUT_GESTURES_KEY = 'hints.workoutRideGestures';
48
+ const LOAD_INCREMENT_SETTING_KEY = 'preferences.workouts.loadIncrement';
46
49
  let WorkoutRidePageService = (() => {
47
50
  let _classDecorators = [Singleton];
48
51
  let _classDescriptor;
@@ -53,6 +56,7 @@ let WorkoutRidePageService = (() => {
53
56
  let _getRideDisplay_decorators;
54
57
  let _getWorkoutRide_decorators;
55
58
  let _getActivityRide_decorators;
59
+ let _getUserSettings_decorators;
56
60
  var WorkoutRidePageService = class extends _classSuper {
57
61
  static { _classThis = this; }
58
62
  static {
@@ -60,9 +64,11 @@ let WorkoutRidePageService = (() => {
60
64
  _getRideDisplay_decorators = [Injectable];
61
65
  _getWorkoutRide_decorators = [Injectable];
62
66
  _getActivityRide_decorators = [Injectable];
67
+ _getUserSettings_decorators = [Injectable];
63
68
  __esDecorate(this, null, _getRideDisplay_decorators, { kind: "method", name: "getRideDisplay", static: false, private: false, access: { has: obj => "getRideDisplay" in obj, get: obj => obj.getRideDisplay }, metadata: _metadata }, null, _instanceExtraInitializers);
64
69
  __esDecorate(this, null, _getWorkoutRide_decorators, { kind: "method", name: "getWorkoutRide", static: false, private: false, access: { has: obj => "getWorkoutRide" in obj, get: obj => obj.getWorkoutRide }, metadata: _metadata }, null, _instanceExtraInitializers);
65
70
  __esDecorate(this, null, _getActivityRide_decorators, { kind: "method", name: "getActivityRide", static: false, private: false, access: { has: obj => "getActivityRide" in obj, get: obj => obj.getActivityRide }, metadata: _metadata }, null, _instanceExtraInitializers);
71
+ __esDecorate(this, null, _getUserSettings_decorators, { kind: "method", name: "getUserSettings", static: false, private: false, access: { has: obj => "getUserSettings" in obj, get: obj => obj.getUserSettings }, metadata: _metadata }, null, _instanceExtraInitializers);
66
72
  __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
67
73
  WorkoutRidePageService = _classThis = _classDescriptor.value;
68
74
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
@@ -74,6 +80,7 @@ let WorkoutRidePageService = (() => {
74
80
  backgroundTimer;
75
81
  backgroundPausedByService = false;
76
82
  menuProps = null;
83
+ gestureHintDismissed = false;
77
84
  constructor() {
78
85
  super('WorkoutRidePage');
79
86
  this.rideEventHandler['state-update'] = this.onRideStateUpdate.bind(this);
@@ -88,6 +95,7 @@ let WorkoutRidePageService = (() => {
88
95
  try {
89
96
  this.logEvent({ message: 'page shown', page: 'WorkoutRide' });
90
97
  EventLogger.setGlobalConfig('page', 'WorkoutRide');
98
+ this.gestureHintDismissed = false;
91
99
  super.openPage();
92
100
  try {
93
101
  const service = this.getRideDisplay();
@@ -159,7 +167,9 @@ let WorkoutRidePageService = (() => {
159
167
  title: wo.title ?? '',
160
168
  graph: this.buildGraphPlan(current, wo.ftp),
161
169
  steps: this.buildUpcomingSteps(current, wo.ftp),
162
- dashboard: this.buildDashboardLine(wo)
170
+ dashboard: this.buildDashboardLine(wo),
171
+ gestureHint: this.buildGestureHint(base.startOverlayProps === null),
172
+ loadIncrement: this.getLoadIncrement()
163
173
  };
164
174
  }
165
175
  catch (err) {
@@ -259,6 +269,15 @@ let WorkoutRidePageService = (() => {
259
269
  onDecreaseLoad() {
260
270
  this.adjustLoad(-DEFAULT_LOAD_INCREMENT);
261
271
  }
272
+ onSetLoadIncrement(value) {
273
+ try {
274
+ this.getUserSettings().set(LOAD_INCREMENT_SETTING_KEY, value);
275
+ this.updatePageDisplay();
276
+ }
277
+ catch (err) {
278
+ this.logError(err, 'onSetLoadIncrement');
279
+ }
280
+ }
262
281
  onRetryStart() {
263
282
  try {
264
283
  this.getRideDisplay().retryStart();
@@ -275,6 +294,18 @@ let WorkoutRidePageService = (() => {
275
294
  this.logError(err, 'onIgnoreStart');
276
295
  }
277
296
  }
297
+ onGestureHintDismissed({ dontShowAgain }) {
298
+ try {
299
+ this.gestureHintDismissed = true;
300
+ if (dontShowAgain) {
301
+ this.getUserSettings().set(HINTS_WORKOUT_GESTURES_KEY, true);
302
+ }
303
+ this.updatePageDisplay();
304
+ }
305
+ catch (err) {
306
+ this.logError(err, 'onGestureHintDismissed');
307
+ }
308
+ }
278
309
  onCancelStart() {
279
310
  try {
280
311
  this.rideObserver?.stop();
@@ -354,6 +385,21 @@ let WorkoutRidePageService = (() => {
354
385
  startGateProps: null
355
386
  };
356
387
  }
388
+ buildGestureHint(startOverlayCleared) {
389
+ if (this.gestureHintDismissed || !startOverlayCleared)
390
+ return null;
391
+ if (this.getElapsedActivityTime() !== 0 || this.getCurrentCadence() !== 0)
392
+ return null;
393
+ if (this.getUserSettings().get(HINTS_WORKOUT_GESTURES_KEY, false))
394
+ return null;
395
+ return { visible: true };
396
+ }
397
+ getCurrentCadence() {
398
+ return this.getActivityRide().getCurrentValues?.()?.cadence ?? 0;
399
+ }
400
+ getLoadIncrement() {
401
+ return this.getUserSettings().get(LOAD_INCREMENT_SETTING_KEY, DEFAULT_LOAD_INCREMENT);
402
+ }
357
403
  buildGraphPlan(current, ftp) {
358
404
  if (!current) {
359
405
  return { bars: [], ftp: ftp ?? 0, ftpLine: ftp ?? 0, domain: { x: [0, 0], y: [0, 0] } };
@@ -448,7 +494,9 @@ let WorkoutRidePageService = (() => {
448
494
  title: '',
449
495
  graph: { bars: [], ftp: 0, ftpLine: 0, domain: { x: [0, 0], y: [0, 0] } },
450
496
  steps: { previous: null, current: null, upcoming: [], hasMore: false },
451
- dashboard: { text: '', mode: null }
497
+ dashboard: { text: '', mode: null },
498
+ gestureHint: null,
499
+ loadIncrement: DEFAULT_LOAD_INCREMENT
452
500
  };
453
501
  }
454
502
  updatePageDisplay() {
@@ -478,6 +526,9 @@ let WorkoutRidePageService = (() => {
478
526
  getActivityRide() {
479
527
  return useActivityRide();
480
528
  }
529
+ getUserSettings() {
530
+ return useUserSettings();
531
+ }
481
532
  };
482
533
  return WorkoutRidePageService = _classThis;
483
534
  })();
@@ -3,3 +3,4 @@ export * from './ride';
3
3
  export * from './base/model';
4
4
  export * from './base/graph';
5
5
  export * from './page';
6
+ export { WorkoutCalendarService, useWorkoutCalendar } from './calendar';
@@ -15,6 +15,7 @@ export declare class WorkoutListPageService extends IncyclistPageService impleme
15
15
  group: string;
16
16
  };
17
17
  protected importError: string;
18
+ protected importGeneration: number;
18
19
  protected listObserver: IObserver;
19
20
  protected listUpdateHandler: any;
20
21
  protected calendarUpdateHandler: any;
@@ -4,7 +4,7 @@ import type { CurrentRideState, RideType } from "../../../types";
4
4
  import type { WorkoutDisplayProperties } from "../types";
5
5
  import type { Workout } from "../../base/model";
6
6
  import type { StepDefinition } from "../../base/model/types";
7
- import type { IWorkoutRidePageService, WorkoutDashboardLine, WorkoutGraphActuals, WorkoutGraphPlan, WorkoutRideMenuProps, WorkoutRidePageDisplayProps, WorkoutUpcomingSteps } from "./types";
7
+ import type { IWorkoutRidePageService, WorkoutDashboardLine, WorkoutGestureHint, WorkoutGraphActuals, WorkoutGraphPlan, WorkoutRideMenuProps, WorkoutRidePageDisplayProps, WorkoutUpcomingSteps } from "./types";
8
8
  export declare class WorkoutRidePageService extends IncyclistPageService implements IWorkoutRidePageService {
9
9
  protected rideEventHandler: Record<string, any>;
10
10
  protected workoutEventHandler: Record<string, any>;
@@ -12,6 +12,7 @@ export declare class WorkoutRidePageService extends IncyclistPageService impleme
12
12
  protected backgroundTimer: NodeJS.Timeout | undefined;
13
13
  protected backgroundPausedByService: boolean;
14
14
  protected menuProps: WorkoutRideMenuProps | null;
15
+ protected gestureHintDismissed: boolean;
15
16
  constructor();
16
17
  openPage(simulate?: boolean): IObserver;
17
18
  closePage(): void;
@@ -29,8 +30,12 @@ export declare class WorkoutRidePageService extends IncyclistPageService impleme
29
30
  onStepForward(): void;
30
31
  onIncreaseLoad(): void;
31
32
  onDecreaseLoad(): void;
33
+ onSetLoadIncrement(value: number): void;
32
34
  onRetryStart(): void;
33
35
  onIgnoreStart(): void;
36
+ onGestureHintDismissed({ dontShowAgain }: {
37
+ dontShowAgain: boolean;
38
+ }): void;
34
39
  onCancelStart(): void;
35
40
  adjustLoad(deltaPct: number): void;
36
41
  protected onRideStateUpdate(state: CurrentRideState): void;
@@ -47,6 +52,9 @@ export declare class WorkoutRidePageService extends IncyclistPageService impleme
47
52
  menuProps: WorkoutRideMenuProps;
48
53
  startGateProps: any;
49
54
  };
55
+ protected buildGestureHint(startOverlayCleared: boolean): WorkoutGestureHint | null;
56
+ protected getCurrentCadence(): number;
57
+ protected getLoadIncrement(): number;
50
58
  protected buildGraphPlan(current: Workout | undefined, ftp: number): WorkoutGraphPlan;
51
59
  protected buildUpcomingSteps(current: Workout | undefined, ftp: number): WorkoutUpcomingSteps;
52
60
  protected buildDashboardLine(wo: WorkoutDisplayProperties): WorkoutDashboardLine;
@@ -65,5 +73,6 @@ export declare class WorkoutRidePageService extends IncyclistPageService impleme
65
73
  protected getRideDisplay(): import("../../../ride/display").RideDisplayService;
66
74
  protected getWorkoutRide(): import("../service").WorkoutRide;
67
75
  protected getActivityRide(): import("../../../activities").ActivityRideService;
76
+ protected getUserSettings(): import("../../../settings").UserSettingsService;
68
77
  }
69
78
  export declare const getWorkoutRidePageService: () => WorkoutRidePageService;
@@ -42,12 +42,17 @@ export interface WorkoutRideMenuProps {
42
42
  canStepBack: boolean;
43
43
  canStepForward: boolean;
44
44
  }
45
+ export interface WorkoutGestureHint {
46
+ visible: boolean;
47
+ }
45
48
  export interface WorkoutRidePageDisplayProps extends RidePageDisplayProps {
46
49
  menuProps: WorkoutRideMenuProps | null;
47
50
  graph: WorkoutGraphPlan;
48
51
  steps: WorkoutUpcomingSteps;
49
52
  dashboard: WorkoutDashboardLine;
50
53
  title: string;
54
+ gestureHint: WorkoutGestureHint | null;
55
+ loadIncrement: number;
51
56
  }
52
57
  export interface WorkoutRidePageCallbacks {
53
58
  onMenuOpen(): void;
@@ -59,9 +64,13 @@ export interface WorkoutRidePageCallbacks {
59
64
  onStepForward(): void;
60
65
  onIncreaseLoad(): void;
61
66
  onDecreaseLoad(): void;
67
+ onSetLoadIncrement(value: number): void;
62
68
  onRetryStart(): void;
63
69
  onIgnoreStart(): void;
64
70
  onCancelStart(): void;
71
+ onGestureHintDismissed(props: {
72
+ dontShowAgain: boolean;
73
+ }): void;
65
74
  }
66
75
  export interface IWorkoutRidePageService extends WorkoutRidePageCallbacks, IPageService {
67
76
  getRideObserver(): IObserver | null;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "incyclist-services",
3
- "version": "1.7.82",
3
+ "version": "1.7.84",
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.23",
10
+ "incyclist-devices": "^3.0.24",
11
11
  "promise.any": "^2.0.6",
12
12
  "semver": "^7.7.4",
13
13
  "tcx-builder": "^1.1.1",