@sprucelabs/spruce-location-utils 9.1.0 → 9.2.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.
- package/build/esm/types-module.d.ts +2 -2
- package/build/esm/viewControllers/LocationListCard.vc.d.ts +1 -0
- package/build/esm/viewControllers/LocationListCard.vc.js +9 -3
- package/build/types-module.d.ts +2 -2
- package/build/viewControllers/LocationListCard.vc.d.ts +1 -0
- package/build/viewControllers/LocationListCard.vc.js +9 -3
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import LocationListCardViewController, { LocationListCardViewControllerOptions } from './viewControllers/LocationListCard.vc';
|
|
2
2
|
declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
|
|
3
3
|
interface ViewControllerMap {
|
|
4
|
-
'
|
|
4
|
+
'locations.list-card': LocationListCardViewController;
|
|
5
5
|
}
|
|
6
6
|
interface ViewControllerOptionsMap {
|
|
7
|
-
'
|
|
7
|
+
'locations.list-card': LocationListCardViewControllerOptions;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -12,15 +12,21 @@ import { locationRenderer } from '@sprucelabs/spruce-skill-utils';
|
|
|
12
12
|
class LocationListCardViewController extends AbstractViewController {
|
|
13
13
|
constructor(options) {
|
|
14
14
|
super(options);
|
|
15
|
-
const { onDelete, selectedLocationId, footerButtons, currentOrganizationId, onClick, shouldRenderDeleteButtons, } = options;
|
|
15
|
+
const { id, onDelete, selectedLocationId, footerButtons, currentOrganizationId, onClick, shouldRenderDeleteButtons, } = options;
|
|
16
16
|
this.shouldRenderDeleteButtons = shouldRenderDeleteButtons !== null && shouldRenderDeleteButtons !== void 0 ? shouldRenderDeleteButtons : false;
|
|
17
17
|
this.onDeleteHandler = onDelete;
|
|
18
18
|
this.selectedLocationId = selectedLocationId;
|
|
19
19
|
this.onClickHandler = onClick;
|
|
20
|
-
this.activeRecordCardVc = this.ActiveRecordCardVc(
|
|
20
|
+
this.activeRecordCardVc = this.ActiveRecordCardVc({
|
|
21
|
+
id,
|
|
22
|
+
currentOrganizationId,
|
|
23
|
+
footerButtons,
|
|
24
|
+
});
|
|
21
25
|
}
|
|
22
|
-
ActiveRecordCardVc(
|
|
26
|
+
ActiveRecordCardVc(options) {
|
|
27
|
+
const { currentOrganizationId, footerButtons, id } = options;
|
|
23
28
|
return this.Controller('activeRecordCard', buildActiveRecordCard({
|
|
29
|
+
id,
|
|
24
30
|
header: {
|
|
25
31
|
title: 'Your locations',
|
|
26
32
|
},
|
package/build/types-module.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import LocationListCardViewController, { LocationListCardViewControllerOptions } from './viewControllers/LocationListCard.vc';
|
|
2
2
|
declare module '@sprucelabs/heartwood-view-controllers/build/types/heartwood.types' {
|
|
3
3
|
interface ViewControllerMap {
|
|
4
|
-
'
|
|
4
|
+
'locations.list-card': LocationListCardViewController;
|
|
5
5
|
}
|
|
6
6
|
interface ViewControllerOptionsMap {
|
|
7
|
-
'
|
|
7
|
+
'locations.list-card': LocationListCardViewControllerOptions;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -5,15 +5,21 @@ const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
|
|
|
5
5
|
class LocationListCardViewController extends heartwood_view_controllers_1.AbstractViewController {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
super(options);
|
|
8
|
-
const { onDelete, selectedLocationId, footerButtons, currentOrganizationId, onClick, shouldRenderDeleteButtons, } = options;
|
|
8
|
+
const { id, onDelete, selectedLocationId, footerButtons, currentOrganizationId, onClick, shouldRenderDeleteButtons, } = options;
|
|
9
9
|
this.shouldRenderDeleteButtons = shouldRenderDeleteButtons !== null && shouldRenderDeleteButtons !== void 0 ? shouldRenderDeleteButtons : false;
|
|
10
10
|
this.onDeleteHandler = onDelete;
|
|
11
11
|
this.selectedLocationId = selectedLocationId;
|
|
12
12
|
this.onClickHandler = onClick;
|
|
13
|
-
this.activeRecordCardVc = this.ActiveRecordCardVc(
|
|
13
|
+
this.activeRecordCardVc = this.ActiveRecordCardVc({
|
|
14
|
+
id,
|
|
15
|
+
currentOrganizationId,
|
|
16
|
+
footerButtons,
|
|
17
|
+
});
|
|
14
18
|
}
|
|
15
|
-
ActiveRecordCardVc(
|
|
19
|
+
ActiveRecordCardVc(options) {
|
|
20
|
+
const { currentOrganizationId, footerButtons, id } = options;
|
|
16
21
|
return this.Controller('activeRecordCard', (0, heartwood_view_controllers_1.buildActiveRecordCard)({
|
|
22
|
+
id,
|
|
17
23
|
header: {
|
|
18
24
|
title: 'Your locations',
|
|
19
25
|
},
|