@startinblox/core 0.19.1-beta.3 → 0.19.1-beta.5
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 +28 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25411,6 +25411,13 @@ const ActionMixin = {
|
|
|
25411
25411
|
callback: function(newValue) {
|
|
25412
25412
|
this.addToAttributes(newValue, "src");
|
|
25413
25413
|
}
|
|
25414
|
+
},
|
|
25415
|
+
targetSrc: {
|
|
25416
|
+
type: String,
|
|
25417
|
+
default: "",
|
|
25418
|
+
callback: function(newValue) {
|
|
25419
|
+
this.addToAttributes(newValue, "target-src");
|
|
25420
|
+
}
|
|
25414
25421
|
}
|
|
25415
25422
|
}
|
|
25416
25423
|
};
|
|
@@ -51280,7 +51287,9 @@ const WidgetMixin = {
|
|
|
51280
51287
|
"minlength",
|
|
51281
51288
|
"search-text",
|
|
51282
51289
|
"search-placeholder",
|
|
51283
|
-
"link-text"
|
|
51290
|
+
"link-text",
|
|
51291
|
+
"target-src",
|
|
51292
|
+
"data-label"
|
|
51284
51293
|
];
|
|
51285
51294
|
for (let attr of defaultAttributes)
|
|
51286
51295
|
this.addToAttributes(`${attr}-${escapedField}`, attr, attrs2);
|
|
@@ -52276,7 +52285,7 @@ const SolidDisplay = {
|
|
|
52276
52285
|
getChildAttributes() {
|
|
52277
52286
|
const attributes = {};
|
|
52278
52287
|
for (let attr of this.element.attributes) {
|
|
52279
|
-
if (attr.name.startsWith("value-") || attr.name.startsWith("label-") || attr.name.startsWith("placeholder-") || attr.name.startsWith("widget-") || attr.name.startsWith("class-") || attr.name.startsWith("multiple-") || attr.name.startsWith("editable-") || attr.name.startsWith("action-") || attr.name.startsWith("default-") || attr.name.startsWith("link-text-") || attr.name == "extra-context")
|
|
52288
|
+
if (attr.name.startsWith("value-") || attr.name.startsWith("label-") || attr.name.startsWith("placeholder-") || attr.name.startsWith("widget-") || attr.name.startsWith("class-") || attr.name.startsWith("multiple-") || attr.name.startsWith("editable-") || attr.name.startsWith("action-") || attr.name.startsWith("default-") || attr.name.startsWith("link-text-") || attr.name.startsWith("target-src-") || attr.name.startsWith("data-label-") || attr.name == "extra-context")
|
|
52280
52289
|
attributes[attr.name] = attr.value;
|
|
52281
52290
|
if (attr.name.startsWith("child-"))
|
|
52282
52291
|
attributes[attr.name.replace(/^child-/, "")] = attr.value;
|
|
@@ -53479,7 +53488,8 @@ const SolidWidget = {
|
|
|
53479
53488
|
name: this.name,
|
|
53480
53489
|
value: this.value || this.resource || "",
|
|
53481
53490
|
src: this.src,
|
|
53482
|
-
label: this.label
|
|
53491
|
+
label: this.label,
|
|
53492
|
+
targetSrc: this.targetSrc || ""
|
|
53483
53493
|
});
|
|
53484
53494
|
return tpl;
|
|
53485
53495
|
},
|
|
@@ -54272,8 +54282,9 @@ const SolidMemberDelete = {
|
|
|
54272
54282
|
type: String,
|
|
54273
54283
|
default: null,
|
|
54274
54284
|
callback: function(newValue, oldValue) {
|
|
54275
|
-
if (newValue !== oldValue)
|
|
54285
|
+
if (newValue !== oldValue) {
|
|
54276
54286
|
this.planRender();
|
|
54287
|
+
}
|
|
54277
54288
|
}
|
|
54278
54289
|
},
|
|
54279
54290
|
dataUnknownMember: {
|
|
@@ -54292,6 +54303,8 @@ const SolidMemberDelete = {
|
|
|
54292
54303
|
this.planRender();
|
|
54293
54304
|
},
|
|
54294
54305
|
async populate() {
|
|
54306
|
+
if (!this.resourceId)
|
|
54307
|
+
return;
|
|
54295
54308
|
this.resource = await store.getData(this.resourceId);
|
|
54296
54309
|
if (!this.resource)
|
|
54297
54310
|
return;
|
|
@@ -54301,7 +54314,6 @@ const SolidMemberDelete = {
|
|
|
54301
54314
|
this.currentMembers = [this.currentMembers];
|
|
54302
54315
|
}
|
|
54303
54316
|
this.isMember = this.currentMembers ? this.currentMembers.some((member) => member["@id"] === this.dataTargetSrc) : false;
|
|
54304
|
-
console.log("populate", this.dataSrc, this.dataTargetSrc, this.currentMembers, this.isMember);
|
|
54305
54317
|
},
|
|
54306
54318
|
planRender() {
|
|
54307
54319
|
if (!this.renderPlanned) {
|
|
@@ -54407,20 +54419,11 @@ const SolidMemberAdd = {
|
|
|
54407
54419
|
newWidgetFactory("solid-form-dropdown-autocompletion");
|
|
54408
54420
|
this.planRender();
|
|
54409
54421
|
},
|
|
54410
|
-
async populate() {
|
|
54411
|
-
if (!this.resource)
|
|
54412
|
-
return;
|
|
54413
|
-
let memberPredicate = store.getExpandedPredicate("user_set", base_context);
|
|
54414
|
-
this.currentMembers = await this.resource[memberPredicate];
|
|
54415
|
-
if (!Array.isArray(this.currentMembers)) {
|
|
54416
|
-
this.currentMembers = [this.currentMembers];
|
|
54417
|
-
}
|
|
54418
|
-
},
|
|
54419
54422
|
planRender() {
|
|
54420
54423
|
if (!this.renderPlanned) {
|
|
54421
54424
|
this.renderPlanned = true;
|
|
54422
54425
|
setTimeout(() => {
|
|
54423
|
-
this.
|
|
54426
|
+
this.updateDOM();
|
|
54424
54427
|
this.renderPlanned = false;
|
|
54425
54428
|
});
|
|
54426
54429
|
}
|
|
@@ -54452,17 +54455,22 @@ const SolidMemberAdd = {
|
|
|
54452
54455
|
validateModal() {
|
|
54453
54456
|
return this.addMembership();
|
|
54454
54457
|
},
|
|
54455
|
-
update() {
|
|
54456
|
-
this.render();
|
|
54457
|
-
},
|
|
54458
54458
|
changeSelectedUser(e) {
|
|
54459
54459
|
var _a;
|
|
54460
54460
|
if (!e.target || !e.target.firstElementChild)
|
|
54461
54461
|
return;
|
|
54462
54462
|
this.dataTargetSrc = (_a = e.target.firstElementChild) == null ? void 0 : _a.value;
|
|
54463
54463
|
},
|
|
54464
|
-
async
|
|
54465
|
-
|
|
54464
|
+
async populate() {
|
|
54465
|
+
console.log("Calling populate");
|
|
54466
|
+
console.trace();
|
|
54467
|
+
if (!this.resource)
|
|
54468
|
+
return;
|
|
54469
|
+
let memberPredicate = store.getExpandedPredicate("user_set", base_context);
|
|
54470
|
+
this.currentMembers = await this.resource[memberPredicate];
|
|
54471
|
+
if (!Array.isArray(this.currentMembers)) {
|
|
54472
|
+
this.currentMembers = [this.currentMembers];
|
|
54473
|
+
}
|
|
54466
54474
|
let button = html$1`
|
|
54467
54475
|
<solid-ac-checker data-src="${this.dataSrc}"
|
|
54468
54476
|
permission="acl:Write"
|
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.5",
|
|
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",
|