@sprucelabs/spruce-location-utils 2.1.1 → 3.0.0

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.
@@ -1,2 +1,2 @@
1
1
  export { default as organizationAssert } from './tests/utilities/organizationAssert';
2
- export { default as LocationListViewController } from './viewControllers/LocationListCard.vc';
2
+ export { default as LocationListCardViewController } from './viewControllers/LocationListCard.vc';
@@ -1,2 +1,2 @@
1
1
  export { default as organizationAssert } from './tests/utilities/organizationAssert.js';
2
- export { default as LocationListViewController } from './viewControllers/LocationListCard.vc.js';
2
+ export { default as LocationListCardViewController } from './viewControllers/LocationListCard.vc.js';
@@ -0,0 +1,9 @@
1
+ import LocationListCardViewController, { LocationListCardViewControllerOptions } from './viewControllers/LocationListCard.vc';
2
+ declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
3
+ interface ViewControllerMap {
4
+ locationListCard: LocationListCardViewController;
5
+ }
6
+ interface ViewControllerOptionsMap {
7
+ locationListCard: LocationListCardViewControllerOptions;
8
+ }
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,19 +2,20 @@ import { AbstractViewController, SpruceSchemas, ViewControllerOptions, ActiveRec
2
2
  declare type Card = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Card;
3
3
  declare type Location = SpruceSchemas.Spruce.v2020_07_22.Location;
4
4
  declare type Button = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Button;
5
+ export declare type LocationListCardViewControllerOptions = {
6
+ onDelete?: (location: Location) => void;
7
+ onEdit?: (location: Location) => void;
8
+ currentOrganizationId: string;
9
+ selectedLocationId?: string;
10
+ footerButtons?: Button[];
11
+ };
5
12
  export default class LocationListCardViewController extends AbstractViewController<Card> {
6
13
  static id: string;
7
14
  private onDelete?;
8
15
  private selectedLocationId?;
9
16
  private onEdit?;
10
17
  private activeRecordCardVc;
11
- constructor(options: ViewControllerOptions & {
12
- onDelete?: (location: Location) => void;
13
- onEdit?: (location: Location) => void;
14
- currentOrganizationId: string;
15
- selectedLocationId?: string;
16
- footerButtons?: Button[];
17
- });
18
+ constructor(options: LocationListCardViewControllerOptions & ViewControllerOptions);
18
19
  private ActiveRecordCardVc;
19
20
  private buildRow;
20
21
  private handleDeleteLocation;
@@ -1,2 +1,2 @@
1
1
  export { default as organizationAssert } from './tests/utilities/organizationAssert';
2
- export { default as LocationListViewController } from './viewControllers/LocationListCard.vc';
2
+ export { default as LocationListCardViewController } from './viewControllers/LocationListCard.vc';
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LocationListViewController = exports.organizationAssert = void 0;
6
+ exports.LocationListCardViewController = exports.organizationAssert = void 0;
7
7
  var organizationAssert_1 = require("./tests/utilities/organizationAssert");
8
8
  Object.defineProperty(exports, "organizationAssert", { enumerable: true, get: function () { return __importDefault(organizationAssert_1).default; } });
9
9
  var LocationListCard_vc_1 = require("./viewControllers/LocationListCard.vc");
10
- Object.defineProperty(exports, "LocationListViewController", { enumerable: true, get: function () { return __importDefault(LocationListCard_vc_1).default; } });
10
+ Object.defineProperty(exports, "LocationListCardViewController", { enumerable: true, get: function () { return __importDefault(LocationListCard_vc_1).default; } });
@@ -0,0 +1,9 @@
1
+ import LocationListCardViewController, { LocationListCardViewControllerOptions } from './viewControllers/LocationListCard.vc';
2
+ declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
3
+ interface ViewControllerMap {
4
+ locationListCard: LocationListCardViewController;
5
+ }
6
+ interface ViewControllerOptionsMap {
7
+ locationListCard: LocationListCardViewControllerOptions;
8
+ }
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,19 +2,20 @@ import { AbstractViewController, SpruceSchemas, ViewControllerOptions, ActiveRec
2
2
  declare type Card = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Card;
3
3
  declare type Location = SpruceSchemas.Spruce.v2020_07_22.Location;
4
4
  declare type Button = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Button;
5
+ export declare type LocationListCardViewControllerOptions = {
6
+ onDelete?: (location: Location) => void;
7
+ onEdit?: (location: Location) => void;
8
+ currentOrganizationId: string;
9
+ selectedLocationId?: string;
10
+ footerButtons?: Button[];
11
+ };
5
12
  export default class LocationListCardViewController extends AbstractViewController<Card> {
6
13
  static id: string;
7
14
  private onDelete?;
8
15
  private selectedLocationId?;
9
16
  private onEdit?;
10
17
  private activeRecordCardVc;
11
- constructor(options: ViewControllerOptions & {
12
- onDelete?: (location: Location) => void;
13
- onEdit?: (location: Location) => void;
14
- currentOrganizationId: string;
15
- selectedLocationId?: string;
16
- footerButtons?: Button[];
17
- });
18
+ constructor(options: LocationListCardViewControllerOptions & ViewControllerOptions);
18
19
  private ActiveRecordCardVc;
19
20
  private buildRow;
20
21
  private handleDeleteLocation;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-location-utils",
3
3
  "description": "Location Utilities",
4
- "version": "2.1.1",
4
+ "version": "3.0.0",
5
5
  "skill": {
6
6
  "namespace": "locations"
7
7
  },
@@ -25,7 +25,11 @@
25
25
  "build/esm/tests/utilities/organizationAssert.js",
26
26
  "build/esm/tests/utilities/organizationAssert.d.ts",
27
27
  "build/esm/viewControllers/LocationListCard.vc.js",
28
- "build/esm/viewControllers/LocationListCard.vc.d.ts"
28
+ "build/esm/viewControllers/LocationListCard.vc.d.ts",
29
+ "build/types-module.js",
30
+ "build/types-module.d.ts",
31
+ "build/esm/types-module.js",
32
+ "build/esm/types-module.d.ts"
29
33
  ],
30
34
  "keywords": [],
31
35
  "scripts": {