@startinblox/core 0.19.1-beta.1 → 0.19.1-beta.3
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/dist/index.js +15 -16
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -54372,16 +54372,8 @@ const SolidMemberDelete = {
|
|
|
54372
54372
|
Sib.register(SolidMemberDelete);
|
|
54373
54373
|
const SolidMemberAdd = {
|
|
54374
54374
|
name: "solid-member-add",
|
|
54375
|
-
use: [NextMixin, ValidationMixin, ContextMixin],
|
|
54375
|
+
use: [NextMixin, ValidationMixin, ContextMixin, StoreMixin],
|
|
54376
54376
|
attributes: {
|
|
54377
|
-
// Data Source being a group URI in that case
|
|
54378
|
-
dataSrc: {
|
|
54379
|
-
type: String,
|
|
54380
|
-
default: null,
|
|
54381
|
-
callback: function() {
|
|
54382
|
-
this.resourceId = this.dataSrc;
|
|
54383
|
-
}
|
|
54384
|
-
},
|
|
54385
54377
|
// The list of users to load
|
|
54386
54378
|
rangeUsers: {
|
|
54387
54379
|
type: String,
|
|
@@ -54398,17 +54390,24 @@ const SolidMemberAdd = {
|
|
|
54398
54390
|
if (newValue !== oldValue)
|
|
54399
54391
|
this.planRender();
|
|
54400
54392
|
}
|
|
54393
|
+
},
|
|
54394
|
+
classSubmitButton: {
|
|
54395
|
+
type: String,
|
|
54396
|
+
default: "",
|
|
54397
|
+
callback: function(newValue, oldValue) {
|
|
54398
|
+
if (newValue !== oldValue)
|
|
54399
|
+
this.planRender();
|
|
54400
|
+
}
|
|
54401
54401
|
}
|
|
54402
54402
|
},
|
|
54403
54403
|
initialState: {
|
|
54404
54404
|
renderPlanned: false
|
|
54405
54405
|
},
|
|
54406
54406
|
created() {
|
|
54407
|
+
newWidgetFactory("solid-form-dropdown-autocompletion");
|
|
54407
54408
|
this.planRender();
|
|
54408
54409
|
},
|
|
54409
54410
|
async populate() {
|
|
54410
|
-
newWidgetFactory("solid-form-dropdown-autocompletion");
|
|
54411
|
-
this.resource = await store.getData(this.resourceId);
|
|
54412
54411
|
if (!this.resource)
|
|
54413
54412
|
return;
|
|
54414
54413
|
let memberPredicate = store.getExpandedPredicate("user_set", base_context);
|
|
@@ -54427,7 +54426,7 @@ const SolidMemberAdd = {
|
|
|
54427
54426
|
}
|
|
54428
54427
|
},
|
|
54429
54428
|
async addMember(e) {
|
|
54430
|
-
if (!this.dataSrc)
|
|
54429
|
+
if (!this.dataSrc || !this.resourceId)
|
|
54431
54430
|
return;
|
|
54432
54431
|
e.preventDefault();
|
|
54433
54432
|
this.performAction();
|
|
@@ -54438,9 +54437,9 @@ const SolidMemberAdd = {
|
|
|
54438
54437
|
"@context": this.context,
|
|
54439
54438
|
"user_set": this.currentMembers
|
|
54440
54439
|
};
|
|
54441
|
-
return store.patch(currentRes, this.
|
|
54440
|
+
return store.patch(currentRes, this.resourceId).then((response) => {
|
|
54442
54441
|
if (!response) {
|
|
54443
|
-
console.warn(`Error while adding user ${this.dataTargetSrc} to group ${this.
|
|
54442
|
+
console.warn(`Error while adding user ${this.dataTargetSrc} to group ${this.resourceId}`);
|
|
54444
54443
|
return;
|
|
54445
54444
|
}
|
|
54446
54445
|
this.goToNext(null);
|
|
@@ -54468,7 +54467,7 @@ const SolidMemberAdd = {
|
|
|
54468
54467
|
<solid-ac-checker data-src="${this.dataSrc}"
|
|
54469
54468
|
permission="acl:Write"
|
|
54470
54469
|
>
|
|
54471
|
-
<form
|
|
54470
|
+
<form
|
|
54472
54471
|
src="${this.dataSrc}"
|
|
54473
54472
|
@submit="${this.addMember.bind(this)}"
|
|
54474
54473
|
>
|
|
@@ -54478,7 +54477,7 @@ const SolidMemberAdd = {
|
|
|
54478
54477
|
name="users"
|
|
54479
54478
|
@change="${this.changeSelectedUser.bind(this)}"
|
|
54480
54479
|
></solid-form-dropdown-autocompletion>
|
|
54481
|
-
<button type="submit">${this.addMemberLabel}</button>
|
|
54480
|
+
<button class="${this.classSubmitButton}" type="submit">${this.addMemberLabel}</button>
|
|
54482
54481
|
</form>
|
|
54483
54482
|
|
|
54484
54483
|
${this.getModalDialog()}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startinblox/core",
|
|
3
|
-
"version": "0.19.1-beta.
|
|
3
|
+
"version": "0.19.1-beta.3",
|
|
4
4
|
"description": "This is a series of web component respecting both the web components standards and the Linked Data Platform convention.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|