@startinblox/core 0.19.15-beta.2 → 0.19.15-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.
Files changed (2) hide show
  1. package/dist/index.js +14 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -51247,6 +51247,8 @@ const WidgetMixin = {
51247
51247
  */
51248
51248
  widgetAttributes(field, resource) {
51249
51249
  const attrs2 = { name: field };
51250
+ if (this.isAlias(field))
51251
+ field = field.split(" as ")[1];
51250
51252
  const escapedField = this.getEscapedField(field);
51251
51253
  const multipleAttributes = [
51252
51254
  "fields",
@@ -51338,8 +51340,18 @@ const WidgetMixin = {
51338
51340
  }
51339
51341
  if (value === null || value === void 0)
51340
51342
  attributes.value = "";
51341
- if (widgetMeta.type === WidgetType.USER && value["@id"]) {
51342
- attributes["data-src"] = value["@id"];
51343
+ if (widgetMeta.type === WidgetType.USER) {
51344
+ if (value["@id"]) {
51345
+ attributes["data-src"] = value["@id"];
51346
+ } else {
51347
+ try {
51348
+ let isUrl = new URL(value);
51349
+ if (isUrl)
51350
+ attributes["data-src"] = value;
51351
+ } catch (e) {
51352
+ }
51353
+ attributes["value"] = value;
51354
+ }
51343
51355
  } else {
51344
51356
  attributes["value"] = value;
51345
51357
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startinblox/core",
3
- "version": "0.19.15-beta.2",
3
+ "version": "0.19.15-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",