@sprucelabs/spruce-role-utils 4.0.2 → 4.0.4
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/.spruce/schemas/roles/v2022_08_26/selectedRoleWithRequirement.schema.js +5 -10
- package/build/.spruce/schemas/schemas.types.d.ts +100 -105
- package/build/.spruce/schemas/schemas.types.js +3 -0
- package/build/esm/.spruce/schemas/roles/v2022_08_26/selectedRoleWithRequirement.schema.js +5 -10
- package/build/esm/.spruce/schemas/schemas.types.d.ts +100 -105
- package/build/esm/.spruce/schemas/schemas.types.js +3 -0
- package/build/selectingRoles/RoleSelectCard.vc.js +6 -7
- package/package.json +1 -1
|
@@ -3,13 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
|
4
4
|
const schema_1 = require("@sprucelabs/schema");
|
|
5
5
|
class RoleSelectCardViewController extends heartwood_view_controllers_1.AbstractViewController {
|
|
6
|
-
static id = 'role-select-card';
|
|
7
|
-
isLoaded = false;
|
|
8
|
-
activeCardVc;
|
|
9
|
-
changeHandler;
|
|
10
|
-
shouldIgnoreControlChanges = false;
|
|
11
6
|
constructor(options) {
|
|
12
7
|
super(options);
|
|
8
|
+
this.isLoaded = false;
|
|
9
|
+
this.shouldIgnoreControlChanges = false;
|
|
13
10
|
const { onChange } = options;
|
|
14
11
|
this.changeHandler = onChange;
|
|
15
12
|
this.activeCardVc = this.RoleListVc(options);
|
|
@@ -78,7 +75,8 @@ class RoleSelectCardViewController extends heartwood_view_controllers_1.Abstract
|
|
|
78
75
|
await this.handleDidChange();
|
|
79
76
|
}
|
|
80
77
|
async handleDidChange() {
|
|
81
|
-
|
|
78
|
+
var _a;
|
|
79
|
+
await ((_a = this.changeHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.getSelectedRoles()));
|
|
82
80
|
}
|
|
83
81
|
getIsLoaded() {
|
|
84
82
|
return this.isLoaded;
|
|
@@ -95,7 +93,7 @@ class RoleSelectCardViewController extends heartwood_view_controllers_1.Abstract
|
|
|
95
93
|
});
|
|
96
94
|
await this.activeCardVc.load();
|
|
97
95
|
this.isLoaded = true;
|
|
98
|
-
for (const select of selected
|
|
96
|
+
for (const select of selected !== null && selected !== void 0 ? selected : []) {
|
|
99
97
|
await this.enableRow(select.roleId, select.requirement);
|
|
100
98
|
}
|
|
101
99
|
}
|
|
@@ -140,4 +138,5 @@ class RoleSelectCardViewController extends heartwood_view_controllers_1.Abstract
|
|
|
140
138
|
return this.activeCardVc.render();
|
|
141
139
|
}
|
|
142
140
|
}
|
|
141
|
+
RoleSelectCardViewController.id = 'role-select-card';
|
|
143
142
|
exports.default = RoleSelectCardViewController;
|