ninegrid2 6.1109.0 → 6.1110.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.
- package/dist/bundle.cjs.js +24 -16
- package/dist/bundle.esm.js +24 -16
- package/dist/nx/nxLayout2.js +25 -17
- package/package.json +1 -1
- package/src/nx/nxLayout2.js +25 -17
package/dist/bundle.cjs.js
CHANGED
|
@@ -121966,6 +121966,16 @@ class NxLayout2 extends HTMLElement {
|
|
|
121966
121966
|
this.#render();
|
|
121967
121967
|
}
|
|
121968
121968
|
|
|
121969
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
121970
|
+
if (this.#originalChildren && oldValue !== newValue) {
|
|
121971
|
+
this.#render();
|
|
121972
|
+
}
|
|
121973
|
+
}
|
|
121974
|
+
|
|
121975
|
+
static get observedAttributes() {
|
|
121976
|
+
return ['columns'];
|
|
121977
|
+
}
|
|
121978
|
+
|
|
121969
121979
|
#render() {
|
|
121970
121980
|
const children = this.#originalChildren;
|
|
121971
121981
|
if (!children || children.length === 0) return;
|
|
@@ -121978,13 +121988,11 @@ class NxLayout2 extends HTMLElement {
|
|
|
121978
121988
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121979
121989
|
const numRows = columnsLayout.length;
|
|
121980
121990
|
|
|
121981
|
-
// 메인
|
|
121991
|
+
// 메인 컨테이너는 행을 세로로 배치
|
|
121982
121992
|
this.style.display = 'flex';
|
|
121983
|
-
this.style.flexDirection = 'column';
|
|
121993
|
+
this.style.flexDirection = 'column';
|
|
121984
121994
|
this.style.width = '100%';
|
|
121985
|
-
this.style.gap = "4px";
|
|
121986
|
-
//this.style.height = '100%';
|
|
121987
|
-
//this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
|
|
121995
|
+
this.style.gap = "4px";
|
|
121988
121996
|
|
|
121989
121997
|
let childIndex = 0;
|
|
121990
121998
|
|
|
@@ -121994,27 +122002,27 @@ class NxLayout2 extends HTMLElement {
|
|
|
121994
122002
|
// 행 래퍼 생성
|
|
121995
122003
|
const rowWrapper = document.createElement('div');
|
|
121996
122004
|
rowWrapper.style.display = 'flex';
|
|
121997
|
-
rowWrapper.style.
|
|
122005
|
+
rowWrapper.style.flexDirection = 'row';
|
|
122006
|
+
rowWrapper.style.flex = "1 1 0";
|
|
121998
122007
|
rowWrapper.style.width = '100%';
|
|
121999
|
-
rowWrapper.style.gap = "4px";
|
|
122000
|
-
rowWrapper
|
|
122001
|
-
|
|
122002
|
-
|
|
122003
|
-
//rowWrapper.style.gap = '8px'; // Flexbox 간격 설정
|
|
122008
|
+
rowWrapper.style.gap = "4px";
|
|
122009
|
+
// ⭐⭐ rowWrapper에 flex-wrap: wrap 적용 ⭐⭐
|
|
122010
|
+
rowWrapper.style.flexWrap = "wrap";
|
|
122011
|
+
rowWrapper.style.textAlign = "left";
|
|
122004
122012
|
|
|
122005
122013
|
for (let col = 0; col < numColumns; col++) {
|
|
122006
122014
|
if (children[childIndex]) {
|
|
122007
122015
|
const panel = children[childIndex];
|
|
122008
|
-
|
|
122016
|
+
// ⭐⭐ 패널의 flex-basis를 설정하여 반응형 크기 조절 ⭐⭐
|
|
122017
|
+
const panelFlexBasis = 100 / numColumns;
|
|
122018
|
+
panel.style.flex = `1 1 ${panelFlexBasis}%`;
|
|
122019
|
+
panel.style.minWidth = '0';
|
|
122020
|
+
panel.style.minHeight = '0';
|
|
122009
122021
|
rowWrapper.appendChild(panel);
|
|
122010
122022
|
childIndex++;
|
|
122011
122023
|
}
|
|
122012
|
-
|
|
122013
122024
|
}
|
|
122014
|
-
|
|
122015
122025
|
this.appendChild(rowWrapper);
|
|
122016
|
-
|
|
122017
|
-
|
|
122018
122026
|
}
|
|
122019
122027
|
}
|
|
122020
122028
|
}
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121962,6 +121962,16 @@ class NxLayout2 extends HTMLElement {
|
|
|
121962
121962
|
this.#render();
|
|
121963
121963
|
}
|
|
121964
121964
|
|
|
121965
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
121966
|
+
if (this.#originalChildren && oldValue !== newValue) {
|
|
121967
|
+
this.#render();
|
|
121968
|
+
}
|
|
121969
|
+
}
|
|
121970
|
+
|
|
121971
|
+
static get observedAttributes() {
|
|
121972
|
+
return ['columns'];
|
|
121973
|
+
}
|
|
121974
|
+
|
|
121965
121975
|
#render() {
|
|
121966
121976
|
const children = this.#originalChildren;
|
|
121967
121977
|
if (!children || children.length === 0) return;
|
|
@@ -121974,13 +121984,11 @@ class NxLayout2 extends HTMLElement {
|
|
|
121974
121984
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121975
121985
|
const numRows = columnsLayout.length;
|
|
121976
121986
|
|
|
121977
|
-
// 메인
|
|
121987
|
+
// 메인 컨테이너는 행을 세로로 배치
|
|
121978
121988
|
this.style.display = 'flex';
|
|
121979
|
-
this.style.flexDirection = 'column';
|
|
121989
|
+
this.style.flexDirection = 'column';
|
|
121980
121990
|
this.style.width = '100%';
|
|
121981
|
-
this.style.gap = "4px";
|
|
121982
|
-
//this.style.height = '100%';
|
|
121983
|
-
//this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
|
|
121991
|
+
this.style.gap = "4px";
|
|
121984
121992
|
|
|
121985
121993
|
let childIndex = 0;
|
|
121986
121994
|
|
|
@@ -121990,27 +121998,27 @@ class NxLayout2 extends HTMLElement {
|
|
|
121990
121998
|
// 행 래퍼 생성
|
|
121991
121999
|
const rowWrapper = document.createElement('div');
|
|
121992
122000
|
rowWrapper.style.display = 'flex';
|
|
121993
|
-
rowWrapper.style.
|
|
122001
|
+
rowWrapper.style.flexDirection = 'row';
|
|
122002
|
+
rowWrapper.style.flex = "1 1 0";
|
|
121994
122003
|
rowWrapper.style.width = '100%';
|
|
121995
|
-
rowWrapper.style.gap = "4px";
|
|
121996
|
-
rowWrapper
|
|
121997
|
-
|
|
121998
|
-
|
|
121999
|
-
//rowWrapper.style.gap = '8px'; // Flexbox 간격 설정
|
|
122004
|
+
rowWrapper.style.gap = "4px";
|
|
122005
|
+
// ⭐⭐ rowWrapper에 flex-wrap: wrap 적용 ⭐⭐
|
|
122006
|
+
rowWrapper.style.flexWrap = "wrap";
|
|
122007
|
+
rowWrapper.style.textAlign = "left";
|
|
122000
122008
|
|
|
122001
122009
|
for (let col = 0; col < numColumns; col++) {
|
|
122002
122010
|
if (children[childIndex]) {
|
|
122003
122011
|
const panel = children[childIndex];
|
|
122004
|
-
|
|
122012
|
+
// ⭐⭐ 패널의 flex-basis를 설정하여 반응형 크기 조절 ⭐⭐
|
|
122013
|
+
const panelFlexBasis = 100 / numColumns;
|
|
122014
|
+
panel.style.flex = `1 1 ${panelFlexBasis}%`;
|
|
122015
|
+
panel.style.minWidth = '0';
|
|
122016
|
+
panel.style.minHeight = '0';
|
|
122005
122017
|
rowWrapper.appendChild(panel);
|
|
122006
122018
|
childIndex++;
|
|
122007
122019
|
}
|
|
122008
|
-
|
|
122009
122020
|
}
|
|
122010
|
-
|
|
122011
122021
|
this.appendChild(rowWrapper);
|
|
122012
|
-
|
|
122013
|
-
|
|
122014
122022
|
}
|
|
122015
122023
|
}
|
|
122016
122024
|
}
|
package/dist/nx/nxLayout2.js
CHANGED
|
@@ -13,6 +13,16 @@ class NxLayout2 extends HTMLElement {
|
|
|
13
13
|
this.#render();
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
17
|
+
if (this.#originalChildren && oldValue !== newValue) {
|
|
18
|
+
this.#render();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static get observedAttributes() {
|
|
23
|
+
return ['columns'];
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
#render() {
|
|
17
27
|
const children = this.#originalChildren;
|
|
18
28
|
if (!children || children.length === 0) return;
|
|
@@ -25,16 +35,14 @@ class NxLayout2 extends HTMLElement {
|
|
|
25
35
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
26
36
|
const numRows = columnsLayout.length;
|
|
27
37
|
|
|
28
|
-
// 메인
|
|
38
|
+
// 메인 컨테이너는 행을 세로로 배치
|
|
29
39
|
this.style.display = 'flex';
|
|
30
|
-
this.style.flexDirection = 'column';
|
|
40
|
+
this.style.flexDirection = 'column';
|
|
31
41
|
this.style.width = '100%';
|
|
32
|
-
this.style.gap = "4px";
|
|
33
|
-
//this.style.height = '100%';
|
|
34
|
-
//this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
|
|
42
|
+
this.style.gap = "4px";
|
|
35
43
|
|
|
36
44
|
let childIndex = 0;
|
|
37
|
-
const flexBasis = 100 / numRows;
|
|
45
|
+
const flexBasis = 100 / numRows;
|
|
38
46
|
|
|
39
47
|
for (let row = 0; row < numRows; row++) {
|
|
40
48
|
const numColumns = columnsLayout[row];
|
|
@@ -42,27 +50,27 @@ class NxLayout2 extends HTMLElement {
|
|
|
42
50
|
// 행 래퍼 생성
|
|
43
51
|
const rowWrapper = document.createElement('div');
|
|
44
52
|
rowWrapper.style.display = 'flex';
|
|
45
|
-
rowWrapper.style.
|
|
53
|
+
rowWrapper.style.flexDirection = 'row';
|
|
54
|
+
rowWrapper.style.flex = "1 1 0";
|
|
46
55
|
rowWrapper.style.width = '100%';
|
|
47
|
-
rowWrapper.style.gap = "4px";
|
|
48
|
-
rowWrapper
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
//rowWrapper.style.gap = '8px'; // Flexbox 간격 설정
|
|
56
|
+
rowWrapper.style.gap = "4px";
|
|
57
|
+
// ⭐⭐ rowWrapper에 flex-wrap: wrap 적용 ⭐⭐
|
|
58
|
+
rowWrapper.style.flexWrap = "wrap";
|
|
59
|
+
rowWrapper.style.textAlign = "left";
|
|
52
60
|
|
|
53
61
|
for (let col = 0; col < numColumns; col++) {
|
|
54
62
|
if (children[childIndex]) {
|
|
55
63
|
const panel = children[childIndex];
|
|
56
|
-
|
|
64
|
+
// ⭐⭐ 패널의 flex-basis를 설정하여 반응형 크기 조절 ⭐⭐
|
|
65
|
+
const panelFlexBasis = 100 / numColumns;
|
|
66
|
+
panel.style.flex = `1 1 ${panelFlexBasis}%`;
|
|
67
|
+
panel.style.minWidth = '0';
|
|
68
|
+
panel.style.minHeight = '0';
|
|
57
69
|
rowWrapper.appendChild(panel);
|
|
58
70
|
childIndex++;
|
|
59
71
|
}
|
|
60
|
-
|
|
61
72
|
}
|
|
62
|
-
|
|
63
73
|
this.appendChild(rowWrapper);
|
|
64
|
-
|
|
65
|
-
|
|
66
74
|
}
|
|
67
75
|
}
|
|
68
76
|
}
|
package/package.json
CHANGED
package/src/nx/nxLayout2.js
CHANGED
|
@@ -13,6 +13,16 @@ class NxLayout2 extends HTMLElement {
|
|
|
13
13
|
this.#render();
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
17
|
+
if (this.#originalChildren && oldValue !== newValue) {
|
|
18
|
+
this.#render();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static get observedAttributes() {
|
|
23
|
+
return ['columns'];
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
#render() {
|
|
17
27
|
const children = this.#originalChildren;
|
|
18
28
|
if (!children || children.length === 0) return;
|
|
@@ -25,16 +35,14 @@ class NxLayout2 extends HTMLElement {
|
|
|
25
35
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
26
36
|
const numRows = columnsLayout.length;
|
|
27
37
|
|
|
28
|
-
// 메인
|
|
38
|
+
// 메인 컨테이너는 행을 세로로 배치
|
|
29
39
|
this.style.display = 'flex';
|
|
30
|
-
this.style.flexDirection = 'column';
|
|
40
|
+
this.style.flexDirection = 'column';
|
|
31
41
|
this.style.width = '100%';
|
|
32
|
-
this.style.gap = "4px";
|
|
33
|
-
//this.style.height = '100%';
|
|
34
|
-
//this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
|
|
42
|
+
this.style.gap = "4px";
|
|
35
43
|
|
|
36
44
|
let childIndex = 0;
|
|
37
|
-
const flexBasis = 100 / numRows;
|
|
45
|
+
const flexBasis = 100 / numRows;
|
|
38
46
|
|
|
39
47
|
for (let row = 0; row < numRows; row++) {
|
|
40
48
|
const numColumns = columnsLayout[row];
|
|
@@ -42,27 +50,27 @@ class NxLayout2 extends HTMLElement {
|
|
|
42
50
|
// 행 래퍼 생성
|
|
43
51
|
const rowWrapper = document.createElement('div');
|
|
44
52
|
rowWrapper.style.display = 'flex';
|
|
45
|
-
rowWrapper.style.
|
|
53
|
+
rowWrapper.style.flexDirection = 'row';
|
|
54
|
+
rowWrapper.style.flex = "1 1 0";
|
|
46
55
|
rowWrapper.style.width = '100%';
|
|
47
|
-
rowWrapper.style.gap = "4px";
|
|
48
|
-
rowWrapper
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
//rowWrapper.style.gap = '8px'; // Flexbox 간격 설정
|
|
56
|
+
rowWrapper.style.gap = "4px";
|
|
57
|
+
// ⭐⭐ rowWrapper에 flex-wrap: wrap 적용 ⭐⭐
|
|
58
|
+
rowWrapper.style.flexWrap = "wrap";
|
|
59
|
+
rowWrapper.style.textAlign = "left";
|
|
52
60
|
|
|
53
61
|
for (let col = 0; col < numColumns; col++) {
|
|
54
62
|
if (children[childIndex]) {
|
|
55
63
|
const panel = children[childIndex];
|
|
56
|
-
|
|
64
|
+
// ⭐⭐ 패널의 flex-basis를 설정하여 반응형 크기 조절 ⭐⭐
|
|
65
|
+
const panelFlexBasis = 100 / numColumns;
|
|
66
|
+
panel.style.flex = `1 1 ${panelFlexBasis}%`;
|
|
67
|
+
panel.style.minWidth = '0';
|
|
68
|
+
panel.style.minHeight = '0';
|
|
57
69
|
rowWrapper.appendChild(panel);
|
|
58
70
|
childIndex++;
|
|
59
71
|
}
|
|
60
|
-
|
|
61
72
|
}
|
|
62
|
-
|
|
63
73
|
this.appendChild(rowWrapper);
|
|
64
|
-
|
|
65
|
-
|
|
66
74
|
}
|
|
67
75
|
}
|
|
68
76
|
}
|