@sprucelabs/heartwood-view-controllers 113.0.5 → 113.0.6

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/README.md CHANGED
@@ -18,4 +18,4 @@ Spruce XP Documentation
18
18
  <a href="https://developer.spruce.ai/#/"><img width="250" src="https://raw.githubusercontent.com/sprucelabsai/heartwood-view-controllers/master/docs/images/read-full-docs.png" /></a>
19
19
  </p>
20
20
  ### Dependencies
21
- [Arkit diagram here](docs/dependencies.md).
21
+ [Arkit diagram here](docs/dependencies.md).
@@ -1,14 +1,16 @@
1
1
  import { MercuryClient } from '@sprucelabs/mercury-client';
2
2
  import { LockScreenSkillViewControllerOptions } from '../skillViewControllers/LockScreen.svc';
3
- import { AppController, AppControllerLoadOptions, ControllerOptions, ViewControllerId, ViewControllerMap, ViewControllerOptions, ViewControllerPlugins } from '../types/heartwood.types';
3
+ import { AppController, AppControllerLoadOptions, ControllerOptions, ToastOptions, ViewControllerId, ViewControllerMap, ViewControllerOptions, ViewControllerPlugins } from '../types/heartwood.types';
4
4
  export default abstract class AbstractAppController implements AppController {
5
5
  static id: string;
6
6
  protected plugins: ViewControllerPlugins;
7
7
  private views;
8
8
  private renderLockScreenHandler;
9
9
  protected connectToApi: () => Promise<MercuryClient>;
10
+ private toastHandler;
10
11
  constructor(options: ViewControllerOptions);
11
12
  load(options: AppControllerLoadOptions): Promise<void>;
12
13
  protected renderLockScreen(options: LockScreenSkillViewControllerOptions): import("../skillViewControllers/LockScreen.svc").default;
14
+ protected toast(options: ToastOptions): void;
13
15
  Controller<N extends ViewControllerId, O extends ControllerOptions<N>>(id: N, options: O): ViewControllerMap[N];
14
16
  }
@@ -9,9 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  export default class AbstractAppController {
11
11
  constructor(options) {
12
- const { plugins, vcFactory, renderLockScreenHandler, connectToApi } = options;
12
+ const { plugins, vcFactory, renderLockScreenHandler, connectToApi, toastHandler, } = options;
13
13
  this.plugins = plugins;
14
14
  this.views = vcFactory;
15
+ this.toastHandler = toastHandler;
15
16
  this.renderLockScreenHandler = renderLockScreenHandler;
16
17
  this.connectToApi = connectToApi;
17
18
  }
@@ -24,6 +25,9 @@ export default class AbstractAppController {
24
25
  (_a = this.renderLockScreenHandler) === null || _a === void 0 ? void 0 : _a.call(this, controller.render());
25
26
  return controller;
26
27
  }
28
+ toast(options) {
29
+ this.toastHandler(options);
30
+ }
27
31
  Controller(id, options) {
28
32
  return this.views.Controller(id, options);
29
33
  }
@@ -6,6 +6,7 @@ export default class ViewControllerFactory {
6
6
  protected connectToApi: ConnectToApi;
7
7
  protected log?: Log;
8
8
  protected plugins: ViewControllerPlugins;
9
+ protected toastHandler: ToastHandler;
9
10
  private controllerMap;
10
11
  private renderInDialogHandler;
11
12
  private confirmHandler;
@@ -13,7 +14,6 @@ export default class ViewControllerFactory {
13
14
  private device;
14
15
  private dates;
15
16
  private maps;
16
- private toastHandler;
17
17
  private AppMap;
18
18
  private renderLockScreenHandler;
19
19
  constructor(options: ViewControllerFactoryConstructorOptions);
@@ -1,14 +1,16 @@
1
1
  import { MercuryClient } from '@sprucelabs/mercury-client';
2
2
  import { LockScreenSkillViewControllerOptions } from '../skillViewControllers/LockScreen.svc';
3
- import { AppController, AppControllerLoadOptions, ControllerOptions, ViewControllerId, ViewControllerMap, ViewControllerOptions, ViewControllerPlugins } from '../types/heartwood.types';
3
+ import { AppController, AppControllerLoadOptions, ControllerOptions, ToastOptions, ViewControllerId, ViewControllerMap, ViewControllerOptions, ViewControllerPlugins } from '../types/heartwood.types';
4
4
  export default abstract class AbstractAppController implements AppController {
5
5
  static id: string;
6
6
  protected plugins: ViewControllerPlugins;
7
7
  private views;
8
8
  private renderLockScreenHandler;
9
9
  protected connectToApi: () => Promise<MercuryClient>;
10
+ private toastHandler;
10
11
  constructor(options: ViewControllerOptions);
11
12
  load(options: AppControllerLoadOptions): Promise<void>;
12
13
  protected renderLockScreen(options: LockScreenSkillViewControllerOptions): import("../skillViewControllers/LockScreen.svc").default;
14
+ protected toast(options: ToastOptions): void;
13
15
  Controller<N extends ViewControllerId, O extends ControllerOptions<N>>(id: N, options: O): ViewControllerMap[N];
14
16
  }
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class AbstractAppController {
4
4
  constructor(options) {
5
- const { plugins, vcFactory, renderLockScreenHandler, connectToApi } = options;
5
+ const { plugins, vcFactory, renderLockScreenHandler, connectToApi, toastHandler, } = options;
6
6
  this.plugins = plugins;
7
7
  this.views = vcFactory;
8
+ this.toastHandler = toastHandler;
8
9
  this.renderLockScreenHandler = renderLockScreenHandler;
9
10
  this.connectToApi = connectToApi;
10
11
  }
@@ -14,6 +15,9 @@ class AbstractAppController {
14
15
  this.renderLockScreenHandler?.(controller.render());
15
16
  return controller;
16
17
  }
18
+ toast(options) {
19
+ this.toastHandler(options);
20
+ }
17
21
  Controller(id, options) {
18
22
  return this.views.Controller(id, options);
19
23
  }
@@ -6,6 +6,7 @@ export default class ViewControllerFactory {
6
6
  protected connectToApi: ConnectToApi;
7
7
  protected log?: Log;
8
8
  protected plugins: ViewControllerPlugins;
9
+ protected toastHandler: ToastHandler;
9
10
  private controllerMap;
10
11
  private renderInDialogHandler;
11
12
  private confirmHandler;
@@ -13,7 +14,6 @@ export default class ViewControllerFactory {
13
14
  private device;
14
15
  private dates;
15
16
  private maps;
16
- private toastHandler;
17
17
  private AppMap;
18
18
  private renderLockScreenHandler;
19
19
  constructor(options: ViewControllerFactoryConstructorOptions);
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "sideEffects": false,
14
14
  "license": "MIT",
15
15
  "description": "All the power of Heartwood in one, convenient package.",
16
- "version": "113.0.5",
16
+ "version": "113.0.6",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {