@panoramax/web-viewer 4.0.3-develop-5497573e → 4.0.3-develop-d8c835a2
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.
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* [new SemanticsEditor()](#new_Panoramax.components.ui.SemanticsEditor_new)
|
|
11
11
|
* [.properties](#Panoramax.components.ui.SemanticsEditor+properties) : <code>Object</code>
|
|
12
12
|
* [.getDiff()](#Panoramax.components.ui.SemanticsEditor+getDiff) ⇒ <code>Array.<object></code>
|
|
13
|
+
* [.checkValidity()](#Panoramax.components.ui.SemanticsEditor+checkValidity) ⇒ <code>boolean</code>
|
|
13
14
|
* ["change"](#Panoramax.components.ui.SemanticsEditor+event_change)
|
|
14
15
|
|
|
15
16
|
<a name="new_Panoramax.components.ui.SemanticsEditor_new"></a>
|
|
@@ -62,6 +63,13 @@ Get current delta between initial tags and user changes.
|
|
|
62
63
|
|
|
63
64
|
**Kind**: instance method of [<code>SemanticsEditor</code>](#Panoramax.components.ui.SemanticsEditor)
|
|
64
65
|
**Returns**: <code>Array.<object></code> - The list of tag changes (in API format)
|
|
66
|
+
<a name="Panoramax.components.ui.SemanticsEditor+checkValidity"></a>
|
|
67
|
+
|
|
68
|
+
### semanticsEditor.checkValidity() ⇒ <code>boolean</code>
|
|
69
|
+
Check if input is having a valid value.
|
|
70
|
+
|
|
71
|
+
**Kind**: instance method of [<code>SemanticsEditor</code>](#Panoramax.components.ui.SemanticsEditor)
|
|
72
|
+
**Returns**: <code>boolean</code> - True if it's valid
|
|
65
73
|
<a name="Panoramax.components.ui.SemanticsEditor+event_change"></a>
|
|
66
74
|
|
|
67
75
|
### "change"
|
package/package.json
CHANGED
|
@@ -341,7 +341,9 @@ export default class Basic extends LitElement {
|
|
|
341
341
|
static GetJSONConverter() {
|
|
342
342
|
return {
|
|
343
343
|
fromAttribute: (value) => {
|
|
344
|
-
|
|
344
|
+
if(value === null || value === "") { return null; }
|
|
345
|
+
else if(typeof value === "object" || Array.isArray(value)) { return value; }
|
|
346
|
+
else { return JSON5.parse(value); }
|
|
345
347
|
},
|
|
346
348
|
toAttribute: (value) => JSON.stringify(value)
|
|
347
349
|
};
|
|
@@ -83,6 +83,15 @@ export default class SemanticsEditor extends LitElement {
|
|
|
83
83
|
return computeDiffTags(this._firstSemantics || [], this.semantics);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Check if input is having a valid value.
|
|
88
|
+
* @memberof Panoramax.components.ui.SemanticsEditor#
|
|
89
|
+
* @returns {boolean} True if it's valid
|
|
90
|
+
*/
|
|
91
|
+
checkValidity() {
|
|
92
|
+
return this._valid;
|
|
93
|
+
}
|
|
94
|
+
|
|
86
95
|
/** @private */
|
|
87
96
|
_onInput(e) {
|
|
88
97
|
const tarea = e.target;
|