@sprucelabs/spruce-organization-utils 0.8.5 → 2.0.2

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 +1,2 @@
1
- export { default as OrgListCardViewController } from './viewControllers/OrgListCard.vc';
1
+ export { default as OrganizationListCardViewController } from './viewControllers/OrganizationListCard.vc';
2
+ export * from './types-module';
@@ -1 +1,2 @@
1
- export { default as OrgListCardViewController } from './viewControllers/OrgListCard.vc.js';
1
+ export { default as OrganizationListCardViewController } from './viewControllers/OrganizationListCard.vc.js';
2
+ export * from './types-module.js';
@@ -0,0 +1,9 @@
1
+ import OrganizationListCardViewController, { OrganizationListCardViewControllerOptions } from './viewControllers/OrganizationListCard.vc';
2
+ declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
3
+ interface ViewControllerMap {
4
+ organizationListCard: OrganizationListCardViewController;
5
+ }
6
+ interface ViewControllerOptionsMap {
7
+ organizationListCard: OrganizationListCardViewControllerOptions;
8
+ }
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -5,18 +5,19 @@ declare type Button = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Button;
5
5
  declare type Row = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ListRow;
6
6
  declare type OnDeleteHandler = (organization: Organization) => void | Promise<void>;
7
7
  declare type OnEditHandler = (organization: Organization) => void | Promise<void>;
8
- export default class OrgListCardViewController extends AbstractViewController<Card> {
8
+ export declare type OrganizationListCardViewControllerOptions = {
9
+ onDelete?: OnDeleteHandler;
10
+ onEdit?: OnEditHandler;
11
+ footerButtons?: Button[];
12
+ selectedOrgId?: string;
13
+ };
14
+ export default class OrganizationListCardViewController extends AbstractViewController<Card> {
9
15
  static id: string;
10
16
  private activeRecordCardVc;
11
17
  private onDelete;
12
18
  private onEdit?;
13
19
  private selectedOrgId?;
14
- constructor(options: {
15
- onDelete?: OnDeleteHandler;
16
- onEdit?: OnEditHandler;
17
- footerButtons?: Button[];
18
- selectedOrgId?: string;
19
- } & ViewControllerOptions);
20
+ constructor(options: OrganizationListCardViewControllerOptions & ViewControllerOptions);
20
21
  private ActiveRecordCardVc;
21
22
  private handleClickDeleteOrg;
22
23
  buildRow(org: Organization): Row;
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { AbstractViewController, buildActiveRecordCard, } from '@sprucelabs/heartwood-view-controllers';
11
- export default class OrgListCardViewController extends AbstractViewController {
11
+ export default class OrganizationListCardViewController extends AbstractViewController {
12
12
  constructor(options) {
13
13
  super(options);
14
14
  this.onDelete = options.onDelete;
@@ -109,4 +109,4 @@ export default class OrgListCardViewController extends AbstractViewController {
109
109
  return this.activeRecordCardVc.render();
110
110
  }
111
111
  }
112
- OrgListCardViewController.id = 'org-list-card';
112
+ OrganizationListCardViewController.id = 'org-list-card';
@@ -1 +1,2 @@
1
- export { default as OrgListCardViewController } from './viewControllers/OrgListCard.vc';
1
+ export { default as OrganizationListCardViewController } from './viewControllers/OrganizationListCard.vc';
2
+ export * from './types-module';
@@ -1,8 +1,19 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
2
12
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
13
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
14
  };
5
15
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.OrgListCardViewController = void 0;
7
- var OrgListCard_vc_1 = require("./viewControllers/OrgListCard.vc");
8
- Object.defineProperty(exports, "OrgListCardViewController", { enumerable: true, get: function () { return __importDefault(OrgListCard_vc_1).default; } });
16
+ exports.OrganizationListCardViewController = void 0;
17
+ var OrganizationListCard_vc_1 = require("./viewControllers/OrganizationListCard.vc");
18
+ Object.defineProperty(exports, "OrganizationListCardViewController", { enumerable: true, get: function () { return __importDefault(OrganizationListCard_vc_1).default; } });
19
+ __exportStar(require("./types-module"), exports);
@@ -0,0 +1,9 @@
1
+ import OrganizationListCardViewController, { OrganizationListCardViewControllerOptions } from './viewControllers/OrganizationListCard.vc';
2
+ declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
3
+ interface ViewControllerMap {
4
+ organizationListCard: OrganizationListCardViewController;
5
+ }
6
+ interface ViewControllerOptionsMap {
7
+ organizationListCard: OrganizationListCardViewControllerOptions;
8
+ }
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,18 +5,19 @@ declare type Button = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Button;
5
5
  declare type Row = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ListRow;
6
6
  declare type OnDeleteHandler = (organization: Organization) => void | Promise<void>;
7
7
  declare type OnEditHandler = (organization: Organization) => void | Promise<void>;
8
- export default class OrgListCardViewController extends AbstractViewController<Card> {
8
+ export declare type OrganizationListCardViewControllerOptions = {
9
+ onDelete?: OnDeleteHandler;
10
+ onEdit?: OnEditHandler;
11
+ footerButtons?: Button[];
12
+ selectedOrgId?: string;
13
+ };
14
+ export default class OrganizationListCardViewController extends AbstractViewController<Card> {
9
15
  static id: string;
10
16
  private activeRecordCardVc;
11
17
  private onDelete;
12
18
  private onEdit?;
13
19
  private selectedOrgId?;
14
- constructor(options: {
15
- onDelete?: OnDeleteHandler;
16
- onEdit?: OnEditHandler;
17
- footerButtons?: Button[];
18
- selectedOrgId?: string;
19
- } & ViewControllerOptions);
20
+ constructor(options: OrganizationListCardViewControllerOptions & ViewControllerOptions);
20
21
  private ActiveRecordCardVc;
21
22
  private handleClickDeleteOrg;
22
23
  buildRow(org: Organization): Row;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
4
- class OrgListCardViewController extends heartwood_view_controllers_1.AbstractViewController {
4
+ class OrganizationListCardViewController extends heartwood_view_controllers_1.AbstractViewController {
5
5
  constructor(options) {
6
6
  super(options);
7
7
  this.onDelete = options.onDelete;
@@ -96,5 +96,5 @@ class OrgListCardViewController extends heartwood_view_controllers_1.AbstractVie
96
96
  return this.activeRecordCardVc.render();
97
97
  }
98
98
  }
99
- exports.default = OrgListCardViewController;
100
- OrgListCardViewController.id = 'org-list-card';
99
+ exports.default = OrganizationListCardViewController;
100
+ OrganizationListCardViewController.id = 'org-list-card';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-organization-utils",
3
3
  "description": "Support for working with organizations and Sprucebot. 📈",
4
- "version": "0.8.5",
4
+ "version": "2.0.2",
5
5
  "skill": {
6
6
  "namespace": "organization"
7
7
  },
@@ -16,12 +16,16 @@
16
16
  "files": [
17
17
  "build/index-module.js",
18
18
  "build/index-module.d.ts",
19
- "build/viewControllers/OrgListCard.vc.js",
20
- "build/viewControllers/OrgListCard.vc.d.ts",
19
+ "build/viewControllers/OrganizationListCard.vc.js",
20
+ "build/viewControllers/OrganizationListCard.vc.d.ts",
21
21
  "build/esm/index-module.js",
22
22
  "build/esm/index-module.d.ts",
23
- "build/esm/viewControllers/OrgListCard.vc.js",
24
- "build/esm/viewControllers/OrgListCard.vc.d.ts"
23
+ "build/esm/viewControllers/OrganizationListCard.vc.js",
24
+ "build/esm/viewControllers/OrganizationListCard.vc.d.ts",
25
+ "build/types-module.js",
26
+ "build/types-module.d.ts",
27
+ "build/esm/types-module.js",
28
+ "build/esm/types-module.d.ts"
25
29
  ],
26
30
  "keywords": [],
27
31
  "scripts": {
@@ -34,4 +38,4 @@
34
38
  "node": "16.x",
35
39
  "yarn": "1.x"
36
40
  }
37
- }
41
+ }