ninegrid2 6.1317.0 → 6.1320.0

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.
@@ -28511,7 +28511,10 @@ class nxDiv extends HTMLElement {
28511
28511
  if (!key || !jsonData.hasOwnProperty(key)) return;
28512
28512
 
28513
28513
  const value = jsonData[key];
28514
- if (el.tagName === "INPUT" || el.tagName === "TEXTAREA" || el.tagName === "SELECT") {
28514
+
28515
+ const inputTags = ["INPUT", "TEXTAREA", "SELECT", "NX-EDITOR"];
28516
+ console.log(el.tagName);
28517
+ if (inputTags.includes(el.tagName)) {
28515
28518
  if (el.type === "checkbox" || el.type === "radio") {
28516
28519
  const isChecked = (String(el.value) === String(value));
28517
28520
  if (el.checked !== isChecked) bChanged = true;
@@ -55190,6 +55193,14 @@ class nxEditor extends nxDiv {
55190
55193
  }
55191
55194
  }
55192
55195
 
55196
+ get value() {
55197
+ return this.#editor.getHTML();
55198
+ }
55199
+ set value(v) {
55200
+ console.log(v);
55201
+ this.#editor.commands.setContent(v || "", false);
55202
+ }
55203
+
55193
55204
  #render() {
55194
55205
  this.shadowRoot.innerHTML = `
55195
55206
  <style>
@@ -28507,7 +28507,10 @@ class nxDiv extends HTMLElement {
28507
28507
  if (!key || !jsonData.hasOwnProperty(key)) return;
28508
28508
 
28509
28509
  const value = jsonData[key];
28510
- if (el.tagName === "INPUT" || el.tagName === "TEXTAREA" || el.tagName === "SELECT") {
28510
+
28511
+ const inputTags = ["INPUT", "TEXTAREA", "SELECT", "NX-EDITOR"];
28512
+ console.log(el.tagName);
28513
+ if (inputTags.includes(el.tagName)) {
28511
28514
  if (el.type === "checkbox" || el.type === "radio") {
28512
28515
  const isChecked = (String(el.value) === String(value));
28513
28516
  if (el.checked !== isChecked) bChanged = true;
@@ -55186,6 +55189,14 @@ class nxEditor extends nxDiv {
55186
55189
  }
55187
55190
  }
55188
55191
 
55192
+ get value() {
55193
+ return this.#editor.getHTML();
55194
+ }
55195
+ set value(v) {
55196
+ console.log(v);
55197
+ this.#editor.commands.setContent(v || "", false);
55198
+ }
55199
+
55189
55200
  #render() {
55190
55201
  this.shadowRoot.innerHTML = `
55191
55202
  <style>
package/dist/nx/_nxDiv.js CHANGED
@@ -78,7 +78,10 @@ export class nxDiv extends HTMLElement {
78
78
  if (!key || !jsonData.hasOwnProperty(key)) return;
79
79
 
80
80
  const value = jsonData[key];
81
- if (el.tagName === "INPUT" || el.tagName === "TEXTAREA" || el.tagName === "SELECT") {
81
+
82
+ const inputTags = ["INPUT", "TEXTAREA", "SELECT", "NX-EDITOR"];
83
+ console.log(el.tagName)
84
+ if (inputTags.includes(el.tagName)) {
82
85
  if (el.type === "checkbox" || el.type === "radio") {
83
86
  const isChecked = (String(el.value) === String(value));
84
87
  if (el.checked !== isChecked) bChanged = true;
@@ -26,6 +26,14 @@ class nxEditor extends nxDiv {
26
26
  }
27
27
  }
28
28
 
29
+ get value() {
30
+ return this.#editor.getHTML();
31
+ }
32
+ set value(v) {
33
+ console.log(v);
34
+ this.#editor.commands.setContent(v || "", false);
35
+ }
36
+
29
37
  #render() {
30
38
  this.shadowRoot.innerHTML = `
31
39
  <style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.1317.0",
4
+ "version": "6.1320.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
package/src/nx/_nxDiv.js CHANGED
@@ -78,7 +78,10 @@ export class nxDiv extends HTMLElement {
78
78
  if (!key || !jsonData.hasOwnProperty(key)) return;
79
79
 
80
80
  const value = jsonData[key];
81
- if (el.tagName === "INPUT" || el.tagName === "TEXTAREA" || el.tagName === "SELECT") {
81
+
82
+ const inputTags = ["INPUT", "TEXTAREA", "SELECT", "NX-EDITOR"];
83
+ console.log(el.tagName)
84
+ if (inputTags.includes(el.tagName)) {
82
85
  if (el.type === "checkbox" || el.type === "radio") {
83
86
  const isChecked = (String(el.value) === String(value));
84
87
  if (el.checked !== isChecked) bChanged = true;
@@ -26,6 +26,14 @@ class nxEditor extends nxDiv {
26
26
  }
27
27
  }
28
28
 
29
+ get value() {
30
+ return this.#editor.getHTML();
31
+ }
32
+ set value(v) {
33
+ console.log(v);
34
+ this.#editor.commands.setContent(v || "", false);
35
+ }
36
+
29
37
  #render() {
30
38
  this.shadowRoot.innerHTML = `
31
39
  <style>