@sprucelabs/heartwood-view-controllers 113.0.5 → 113.0.7

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).
@@ -5,7 +5,7 @@ export default class AuthenticatorImpl implements Authenticator {
5
5
  static Class?: new (storage: Storage) => Authenticator;
6
6
  private static instance;
7
7
  private static storage;
8
- protected eventEmitter: EventEmitter<EmitterMap>;
8
+ protected eventEmitter: EventEmitter<AuthenticatorEmitterMap>;
9
9
  protected storage: Storage;
10
10
  protected constructor(storage: Storage);
11
11
  static getInstance(): Authenticator;
@@ -18,7 +18,7 @@ export default class AuthenticatorImpl implements Authenticator {
18
18
  clearSession(): void;
19
19
  addEventListener<N extends AuthenticatorEventName>(name: N, cb: AuthenticatorEventPayloads[N]): void;
20
20
  }
21
- interface EmitterMap {
21
+ export interface AuthenticatorEmitterMap {
22
22
  'did-login': {
23
23
  token: string;
24
24
  person: Person;
@@ -30,4 +30,3 @@ interface EmitterMap {
30
30
  person: Person;
31
31
  }[];
32
32
  }
33
- export {};
@@ -5,7 +5,7 @@ export default class AuthenticatorImpl implements Authenticator {
5
5
  static Class?: new (storage: Storage) => Authenticator;
6
6
  private static instance;
7
7
  private static storage;
8
- protected eventEmitter: EventEmitter<EmitterMap>;
8
+ protected eventEmitter: EventEmitter<AuthenticatorEmitterMap>;
9
9
  protected storage: Storage;
10
10
  protected constructor(storage: Storage);
11
11
  static getInstance(): Authenticator;
@@ -18,7 +18,7 @@ export default class AuthenticatorImpl implements Authenticator {
18
18
  clearSession(): void;
19
19
  addEventListener<N extends AuthenticatorEventName>(name: N, cb: AuthenticatorEventPayloads[N]): void;
20
20
  }
21
- interface EmitterMap {
21
+ export interface AuthenticatorEmitterMap {
22
22
  'did-login': {
23
23
  token: string;
24
24
  person: Person;
@@ -30,4 +30,3 @@ interface EmitterMap {
30
30
  person: Person;
31
31
  }[];
32
32
  }
33
- export {};
@@ -60,6 +60,7 @@ export { default as MockActiveRecordCard } from './tests/MockActiveRecordCard';
60
60
  export { default as lockScreenAssert } from './tests/utilities/lockScreenAssert';
61
61
  export { default as PolarAreaViewController } from './viewControllers/PolarAreaViewController.vc';
62
62
  export { default as AuthenticatorImpl } from './auth/Authenticator';
63
+ export * from './auth/Authenticator';
63
64
  export { default as buildBigForm } from './builders/buildBigForm';
64
65
  export { default as buildForm } from './builders/buildForm';
65
66
  export { default as buildSkillView } from './builders/buildSkillView';
@@ -59,6 +59,7 @@ export { default as MockActiveRecordCard } from './tests/MockActiveRecordCard.js
59
59
  export { default as lockScreenAssert } from './tests/utilities/lockScreenAssert.js';
60
60
  export { default as PolarAreaViewController } from './viewControllers/PolarAreaViewController.vc.js';
61
61
  export { default as AuthenticatorImpl } from './auth/Authenticator.js';
62
+ export * from './auth/Authenticator.js';
62
63
  export { default as buildBigForm } from './builders/buildBigForm.js';
63
64
  export { default as buildForm } from './builders/buildForm.js';
64
65
  export { default as buildSkillView } from './builders/buildSkillView.js';
@@ -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);
package/build/index.d.ts CHANGED
@@ -60,6 +60,7 @@ export { default as MockActiveRecordCard } from './tests/MockActiveRecordCard';
60
60
  export { default as lockScreenAssert } from './tests/utilities/lockScreenAssert';
61
61
  export { default as PolarAreaViewController } from './viewControllers/PolarAreaViewController.vc';
62
62
  export { default as AuthenticatorImpl } from './auth/Authenticator';
63
+ export * from './auth/Authenticator';
63
64
  export { default as buildBigForm } from './builders/buildBigForm';
64
65
  export { default as buildForm } from './builders/buildForm';
65
66
  export { default as buildSkillView } from './builders/buildSkillView';
package/build/index.js CHANGED
@@ -123,6 +123,7 @@ var PolarAreaViewController_vc_1 = require("./viewControllers/PolarAreaViewContr
123
123
  Object.defineProperty(exports, "PolarAreaViewController", { enumerable: true, get: function () { return __importDefault(PolarAreaViewController_vc_1).default; } });
124
124
  var Authenticator_1 = require("./auth/Authenticator");
125
125
  Object.defineProperty(exports, "AuthenticatorImpl", { enumerable: true, get: function () { return __importDefault(Authenticator_1).default; } });
126
+ __exportStar(require("./auth/Authenticator"), exports);
126
127
  var buildBigForm_1 = require("./builders/buildBigForm");
127
128
  Object.defineProperty(exports, "buildBigForm", { enumerable: true, get: function () { return __importDefault(buildBigForm_1).default; } });
128
129
  var buildForm_1 = require("./builders/buildForm");
@@ -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.7",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {