@startinblox/core 0.19.20 → 0.19.21-beta.2
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 +40 -25
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12175,6 +12175,10 @@ const EditableMixin = {
|
|
|
12175
12175
|
valueId: {
|
|
12176
12176
|
type: String,
|
|
12177
12177
|
default: ""
|
|
12178
|
+
},
|
|
12179
|
+
buttonLabel: {
|
|
12180
|
+
type: String,
|
|
12181
|
+
default: "Modifier"
|
|
12178
12182
|
}
|
|
12179
12183
|
},
|
|
12180
12184
|
created() {
|
|
@@ -12183,10 +12187,7 @@ const EditableMixin = {
|
|
|
12183
12187
|
addEditButton(template, listTemplateAdditions) {
|
|
12184
12188
|
let newTemplate = null;
|
|
12185
12189
|
if (this.editable !== null) {
|
|
12186
|
-
newTemplate = html$1
|
|
12187
|
-
${template}
|
|
12188
|
-
<button @click=${this.activateEditableField.bind(this)}>Modifier</button>
|
|
12189
|
-
`;
|
|
12190
|
+
newTemplate = html$1`${template}<button @click=${this.activateEditableField.bind(this)}>${this.buttonLabel}</button>`;
|
|
12190
12191
|
}
|
|
12191
12192
|
const nextProcessor = listTemplateAdditions.shift();
|
|
12192
12193
|
if (nextProcessor)
|
|
@@ -12492,16 +12493,25 @@ const FormFileMixin = {
|
|
|
12492
12493
|
this.listAttributes["resetFile"] = this.resetFile.bind(this);
|
|
12493
12494
|
},
|
|
12494
12495
|
attached() {
|
|
12495
|
-
|
|
12496
|
-
|
|
12496
|
+
this.element.closest("form").addEventListener("reset", this.resetFormFile.bind(this));
|
|
12497
|
+
this.element.closest("solid-form").addEventListener("populate", this.onPopulate.bind(this));
|
|
12498
|
+
},
|
|
12499
|
+
onPopulate() {
|
|
12500
|
+
const dataHolder = this.element.querySelector("input[data-holder]");
|
|
12501
|
+
dataHolder.value = this.value;
|
|
12502
|
+
dataHolder.dispatchEvent(new Event("change"));
|
|
12503
|
+
},
|
|
12504
|
+
resetFormFile(e) {
|
|
12505
|
+
if (e.target && e.target.contains(this.element)) {
|
|
12506
|
+
if (this.initialValue !== "") {
|
|
12497
12507
|
this.value = this.initialValue;
|
|
12498
|
-
this.listAttributes["resetButtonHidden"] = true;
|
|
12499
|
-
this.planRender();
|
|
12500
|
-
const dataHolder = this.element.querySelector("input[data-holder]");
|
|
12501
|
-
dataHolder.value = this.value;
|
|
12502
|
-
dataHolder.dispatchEvent(new Event("change"));
|
|
12503
12508
|
}
|
|
12504
|
-
|
|
12509
|
+
this.listAttributes["resetButtonHidden"] = true;
|
|
12510
|
+
this.planRender();
|
|
12511
|
+
const dataHolder = this.element.querySelector("input[data-holder]");
|
|
12512
|
+
dataHolder.value = this.value;
|
|
12513
|
+
dataHolder.dispatchEvent(new Event("change"));
|
|
12514
|
+
}
|
|
12505
12515
|
},
|
|
12506
12516
|
selectFile() {
|
|
12507
12517
|
if (this.uploadUrl === null)
|
|
@@ -14076,6 +14086,11 @@ const formTemplates = {
|
|
|
14076
14086
|
name=${ifDefined(attributes.name)}
|
|
14077
14087
|
value=${value || ""}
|
|
14078
14088
|
>
|
|
14089
|
+
<a
|
|
14090
|
+
href=${value || ""}
|
|
14091
|
+
?hidden=${value === ""}
|
|
14092
|
+
>${value !== "" ? decodeURI(value.split("/").pop()) : ""}</a>
|
|
14093
|
+
|
|
14079
14094
|
<input
|
|
14080
14095
|
type="file"
|
|
14081
14096
|
id=${ifDefined(attributes.id)}
|
|
@@ -53199,12 +53214,24 @@ const SolidForm = {
|
|
|
53199
53214
|
name: "solid-form",
|
|
53200
53215
|
use: [WidgetMixin, StoreMixin, NextMixin, ValidationMixin],
|
|
53201
53216
|
attributes: {
|
|
53217
|
+
autosave: {
|
|
53218
|
+
type: Boolean,
|
|
53219
|
+
default: null
|
|
53220
|
+
},
|
|
53221
|
+
classSubmitButton: {
|
|
53222
|
+
type: String,
|
|
53223
|
+
default: void 0
|
|
53224
|
+
},
|
|
53202
53225
|
defaultWidget: {
|
|
53203
53226
|
type: String,
|
|
53204
53227
|
default: "solid-form-label-text"
|
|
53205
53228
|
},
|
|
53206
53229
|
naked: {
|
|
53207
|
-
type:
|
|
53230
|
+
type: Boolean,
|
|
53231
|
+
default: null
|
|
53232
|
+
},
|
|
53233
|
+
partial: {
|
|
53234
|
+
type: Boolean,
|
|
53208
53235
|
default: null
|
|
53209
53236
|
},
|
|
53210
53237
|
submitButton: {
|
|
@@ -53218,18 +53245,6 @@ const SolidForm = {
|
|
|
53218
53245
|
submitWidget: {
|
|
53219
53246
|
type: String,
|
|
53220
53247
|
default: null
|
|
53221
|
-
},
|
|
53222
|
-
classSubmitButton: {
|
|
53223
|
-
type: String,
|
|
53224
|
-
default: void 0
|
|
53225
|
-
},
|
|
53226
|
-
partial: {
|
|
53227
|
-
type: Boolean,
|
|
53228
|
-
default: null
|
|
53229
|
-
},
|
|
53230
|
-
autosave: {
|
|
53231
|
-
type: Boolean,
|
|
53232
|
-
default: null
|
|
53233
53248
|
}
|
|
53234
53249
|
},
|
|
53235
53250
|
initialState: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@startinblox/core",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.21-beta.2",
|
|
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",
|