ninegrid2 6.976.0 → 6.977.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 +23 -54
- package/dist/bundle.esm.js +23 -54
- package/dist/nx/nxLayout.js +23 -54
- package/package.json +1 -1
- package/src/nx/nxLayout.js +23 -54
package/dist/bundle.cjs.js
CHANGED
|
@@ -121902,7 +121902,9 @@ class NxLayout extends HTMLElement {
|
|
|
121902
121902
|
|
|
121903
121903
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
121904
121904
|
// 속성이 변경되면 레이아웃을 다시 렌더링합니다.
|
|
121905
|
-
|
|
121905
|
+
if (oldValue !== newValue) { // 값 변경이 있을 때만 실행하는 것이 효율적
|
|
121906
|
+
this.#render();
|
|
121907
|
+
}
|
|
121906
121908
|
}
|
|
121907
121909
|
|
|
121908
121910
|
static get observedAttributes() {
|
|
@@ -121910,89 +121912,56 @@ class NxLayout extends HTMLElement {
|
|
|
121910
121912
|
}
|
|
121911
121913
|
|
|
121912
121914
|
#render() {
|
|
121913
|
-
// 이전 콘텐츠를 모두 제거합니다.
|
|
121914
|
-
console.log("====================");
|
|
121915
|
-
|
|
121916
121915
|
const children = Array.from(this.children);
|
|
121916
|
+
if (children.length === 0) return;
|
|
121917
121917
|
|
|
121918
|
-
if (children.length <= 0) return;
|
|
121919
|
-
|
|
121920
|
-
//this.innerHTML = '';
|
|
121921
121918
|
// 기존 자식 노드를 안전하게 제거합니다.
|
|
121922
121919
|
while (this.firstChild) {
|
|
121923
121920
|
this.removeChild(this.firstChild);
|
|
121924
121921
|
}
|
|
121925
121922
|
|
|
121926
|
-
const
|
|
121927
|
-
const numRows =
|
|
121928
|
-
|
|
121929
|
-
|
|
121930
|
-
|
|
121923
|
+
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121924
|
+
const numRows = columnsLayout.length;
|
|
121931
121925
|
|
|
121932
|
-
|
|
121933
|
-
|
|
121934
|
-
// CSS Grid 컨테이너 스타일 설정
|
|
121935
|
-
let gridColumns = '';
|
|
121926
|
+
// CSS Grid 템플릿 설정
|
|
121936
121927
|
let gridRows = '';
|
|
121937
|
-
|
|
121938
|
-
for (let i = 0; i < numColumns; i++) {
|
|
121939
|
-
gridColumns += '1fr ';
|
|
121940
|
-
if (i < numColumns - 1) {
|
|
121941
|
-
gridColumns += '8px '; // 스플리터 너비
|
|
121942
|
-
}
|
|
121943
|
-
}
|
|
121944
|
-
|
|
121945
121928
|
for (let i = 0; i < numRows; i++) {
|
|
121946
121929
|
gridRows += '1fr ';
|
|
121947
121930
|
if (i < numRows - 1) {
|
|
121948
|
-
gridRows += '8px '; // 스플리터 높이
|
|
121931
|
+
gridRows += '8px '; // 세로 스플리터 높이
|
|
121949
121932
|
}
|
|
121950
121933
|
}
|
|
121951
121934
|
|
|
121952
121935
|
this.style.display = 'grid';
|
|
121953
121936
|
this.style.width = '100%';
|
|
121954
121937
|
this.style.height = '100%';
|
|
121955
|
-
this.style.gridTemplateColumns = gridColumns.trim();
|
|
121956
121938
|
this.style.gridTemplateRows = gridRows.trim();
|
|
121957
121939
|
|
|
121958
|
-
|
|
121959
|
-
|
|
121960
|
-
// 자식 요소를 다시 추가하고 스플리터 삽입
|
|
121961
|
-
const renderedLayout = [];
|
|
121962
|
-
let childIndex = 0;
|
|
121940
|
+
// 자식 요소와 스플리터 배치
|
|
121941
|
+
let renderedIndex = 0;
|
|
121963
121942
|
|
|
121964
121943
|
for (let row = 0; row < numRows; row++) {
|
|
121965
|
-
|
|
121966
|
-
|
|
121967
|
-
|
|
121968
|
-
|
|
121969
|
-
|
|
121970
|
-
|
|
121971
|
-
console.log(children[childIndex]);
|
|
121944
|
+
const numColumns = columnsLayout[row];
|
|
121945
|
+
let rowContent = document.createElement('div');
|
|
121946
|
+
rowContent.style.display = 'grid';
|
|
121947
|
+
rowContent.style.gridTemplateColumns = `repeat(${numColumns}, 1fr)`;
|
|
121948
|
+
rowContent.style.gap = '8px';
|
|
121972
121949
|
|
|
121973
|
-
|
|
121974
|
-
|
|
121975
|
-
|
|
121976
|
-
|
|
121977
|
-
renderedLayout.push(childWrapper);
|
|
121978
|
-
childIndex++;
|
|
121979
|
-
}
|
|
121980
|
-
|
|
121981
|
-
if (col < numColumns - 1) {
|
|
121982
|
-
const splitter = document.createElement('nx-splitter');
|
|
121983
|
-
splitter.setAttribute('direction', 'horizontal');
|
|
121984
|
-
renderedLayout.push(splitter);
|
|
121950
|
+
for (let col = 0; col < numColumns; col++) {
|
|
121951
|
+
if (children[renderedIndex]) {
|
|
121952
|
+
rowContent.appendChild(children[renderedIndex]);
|
|
121953
|
+
renderedIndex++;
|
|
121985
121954
|
}
|
|
121986
121955
|
}
|
|
121956
|
+
|
|
121957
|
+
this.appendChild(rowContent);
|
|
121958
|
+
|
|
121987
121959
|
if (row < numRows - 1) {
|
|
121988
121960
|
const splitter = document.createElement('nx-splitter');
|
|
121989
121961
|
splitter.setAttribute('direction', 'vertical');
|
|
121990
|
-
splitter
|
|
121991
|
-
renderedLayout.push(splitter);
|
|
121962
|
+
this.appendChild(splitter);
|
|
121992
121963
|
}
|
|
121993
121964
|
}
|
|
121994
|
-
|
|
121995
|
-
renderedLayout.forEach(el => this.appendChild(el));
|
|
121996
121965
|
}
|
|
121997
121966
|
}
|
|
121998
121967
|
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121898,7 +121898,9 @@ class NxLayout extends HTMLElement {
|
|
|
121898
121898
|
|
|
121899
121899
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
121900
121900
|
// 속성이 변경되면 레이아웃을 다시 렌더링합니다.
|
|
121901
|
-
|
|
121901
|
+
if (oldValue !== newValue) { // 값 변경이 있을 때만 실행하는 것이 효율적
|
|
121902
|
+
this.#render();
|
|
121903
|
+
}
|
|
121902
121904
|
}
|
|
121903
121905
|
|
|
121904
121906
|
static get observedAttributes() {
|
|
@@ -121906,89 +121908,56 @@ class NxLayout extends HTMLElement {
|
|
|
121906
121908
|
}
|
|
121907
121909
|
|
|
121908
121910
|
#render() {
|
|
121909
|
-
// 이전 콘텐츠를 모두 제거합니다.
|
|
121910
|
-
console.log("====================");
|
|
121911
|
-
|
|
121912
121911
|
const children = Array.from(this.children);
|
|
121912
|
+
if (children.length === 0) return;
|
|
121913
121913
|
|
|
121914
|
-
if (children.length <= 0) return;
|
|
121915
|
-
|
|
121916
|
-
//this.innerHTML = '';
|
|
121917
121914
|
// 기존 자식 노드를 안전하게 제거합니다.
|
|
121918
121915
|
while (this.firstChild) {
|
|
121919
121916
|
this.removeChild(this.firstChild);
|
|
121920
121917
|
}
|
|
121921
121918
|
|
|
121922
|
-
const
|
|
121923
|
-
const numRows =
|
|
121924
|
-
|
|
121925
|
-
|
|
121926
|
-
|
|
121919
|
+
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121920
|
+
const numRows = columnsLayout.length;
|
|
121927
121921
|
|
|
121928
|
-
|
|
121929
|
-
|
|
121930
|
-
// CSS Grid 컨테이너 스타일 설정
|
|
121931
|
-
let gridColumns = '';
|
|
121922
|
+
// CSS Grid 템플릿 설정
|
|
121932
121923
|
let gridRows = '';
|
|
121933
|
-
|
|
121934
|
-
for (let i = 0; i < numColumns; i++) {
|
|
121935
|
-
gridColumns += '1fr ';
|
|
121936
|
-
if (i < numColumns - 1) {
|
|
121937
|
-
gridColumns += '8px '; // 스플리터 너비
|
|
121938
|
-
}
|
|
121939
|
-
}
|
|
121940
|
-
|
|
121941
121924
|
for (let i = 0; i < numRows; i++) {
|
|
121942
121925
|
gridRows += '1fr ';
|
|
121943
121926
|
if (i < numRows - 1) {
|
|
121944
|
-
gridRows += '8px '; // 스플리터 높이
|
|
121927
|
+
gridRows += '8px '; // 세로 스플리터 높이
|
|
121945
121928
|
}
|
|
121946
121929
|
}
|
|
121947
121930
|
|
|
121948
121931
|
this.style.display = 'grid';
|
|
121949
121932
|
this.style.width = '100%';
|
|
121950
121933
|
this.style.height = '100%';
|
|
121951
|
-
this.style.gridTemplateColumns = gridColumns.trim();
|
|
121952
121934
|
this.style.gridTemplateRows = gridRows.trim();
|
|
121953
121935
|
|
|
121954
|
-
|
|
121955
|
-
|
|
121956
|
-
// 자식 요소를 다시 추가하고 스플리터 삽입
|
|
121957
|
-
const renderedLayout = [];
|
|
121958
|
-
let childIndex = 0;
|
|
121936
|
+
// 자식 요소와 스플리터 배치
|
|
121937
|
+
let renderedIndex = 0;
|
|
121959
121938
|
|
|
121960
121939
|
for (let row = 0; row < numRows; row++) {
|
|
121961
|
-
|
|
121962
|
-
|
|
121963
|
-
|
|
121964
|
-
|
|
121965
|
-
|
|
121966
|
-
|
|
121967
|
-
console.log(children[childIndex]);
|
|
121940
|
+
const numColumns = columnsLayout[row];
|
|
121941
|
+
let rowContent = document.createElement('div');
|
|
121942
|
+
rowContent.style.display = 'grid';
|
|
121943
|
+
rowContent.style.gridTemplateColumns = `repeat(${numColumns}, 1fr)`;
|
|
121944
|
+
rowContent.style.gap = '8px';
|
|
121968
121945
|
|
|
121969
|
-
|
|
121970
|
-
|
|
121971
|
-
|
|
121972
|
-
|
|
121973
|
-
renderedLayout.push(childWrapper);
|
|
121974
|
-
childIndex++;
|
|
121975
|
-
}
|
|
121976
|
-
|
|
121977
|
-
if (col < numColumns - 1) {
|
|
121978
|
-
const splitter = document.createElement('nx-splitter');
|
|
121979
|
-
splitter.setAttribute('direction', 'horizontal');
|
|
121980
|
-
renderedLayout.push(splitter);
|
|
121946
|
+
for (let col = 0; col < numColumns; col++) {
|
|
121947
|
+
if (children[renderedIndex]) {
|
|
121948
|
+
rowContent.appendChild(children[renderedIndex]);
|
|
121949
|
+
renderedIndex++;
|
|
121981
121950
|
}
|
|
121982
121951
|
}
|
|
121952
|
+
|
|
121953
|
+
this.appendChild(rowContent);
|
|
121954
|
+
|
|
121983
121955
|
if (row < numRows - 1) {
|
|
121984
121956
|
const splitter = document.createElement('nx-splitter');
|
|
121985
121957
|
splitter.setAttribute('direction', 'vertical');
|
|
121986
|
-
splitter
|
|
121987
|
-
renderedLayout.push(splitter);
|
|
121958
|
+
this.appendChild(splitter);
|
|
121988
121959
|
}
|
|
121989
121960
|
}
|
|
121990
|
-
|
|
121991
|
-
renderedLayout.forEach(el => this.appendChild(el));
|
|
121992
121961
|
}
|
|
121993
121962
|
}
|
|
121994
121963
|
|
package/dist/nx/nxLayout.js
CHANGED
|
@@ -7,7 +7,9 @@ class NxLayout extends HTMLElement {
|
|
|
7
7
|
|
|
8
8
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
9
9
|
// 속성이 변경되면 레이아웃을 다시 렌더링합니다.
|
|
10
|
-
|
|
10
|
+
if (oldValue !== newValue) { // 값 변경이 있을 때만 실행하는 것이 효율적
|
|
11
|
+
this.#render();
|
|
12
|
+
}
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
static get observedAttributes() {
|
|
@@ -15,89 +17,56 @@ class NxLayout extends HTMLElement {
|
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
#render() {
|
|
18
|
-
// 이전 콘텐츠를 모두 제거합니다.
|
|
19
|
-
console.log("====================");
|
|
20
|
-
|
|
21
20
|
const children = Array.from(this.children);
|
|
21
|
+
if (children.length === 0) return;
|
|
22
22
|
|
|
23
|
-
if (children.length <= 0) return;
|
|
24
|
-
|
|
25
|
-
//this.innerHTML = '';
|
|
26
23
|
// 기존 자식 노드를 안전하게 제거합니다.
|
|
27
24
|
while (this.firstChild) {
|
|
28
25
|
this.removeChild(this.firstChild);
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
const
|
|
32
|
-
const numRows =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
29
|
+
const numRows = columnsLayout.length;
|
|
36
30
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// CSS Grid 컨테이너 스타일 설정
|
|
40
|
-
let gridColumns = '';
|
|
31
|
+
// CSS Grid 템플릿 설정
|
|
41
32
|
let gridRows = '';
|
|
42
|
-
|
|
43
|
-
for (let i = 0; i < numColumns; i++) {
|
|
44
|
-
gridColumns += '1fr ';
|
|
45
|
-
if (i < numColumns - 1) {
|
|
46
|
-
gridColumns += '8px '; // 스플리터 너비
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
33
|
for (let i = 0; i < numRows; i++) {
|
|
51
34
|
gridRows += '1fr ';
|
|
52
35
|
if (i < numRows - 1) {
|
|
53
|
-
gridRows += '8px '; // 스플리터 높이
|
|
36
|
+
gridRows += '8px '; // 세로 스플리터 높이
|
|
54
37
|
}
|
|
55
38
|
}
|
|
56
39
|
|
|
57
40
|
this.style.display = 'grid';
|
|
58
41
|
this.style.width = '100%';
|
|
59
42
|
this.style.height = '100%';
|
|
60
|
-
this.style.gridTemplateColumns = gridColumns.trim();
|
|
61
43
|
this.style.gridTemplateRows = gridRows.trim();
|
|
62
44
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// 자식 요소를 다시 추가하고 스플리터 삽입
|
|
66
|
-
const renderedLayout = [];
|
|
67
|
-
let childIndex = 0;
|
|
45
|
+
// 자식 요소와 스플리터 배치
|
|
46
|
+
let renderedIndex = 0;
|
|
68
47
|
|
|
69
48
|
for (let row = 0; row < numRows; row++) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
console.log(children[childIndex]);
|
|
49
|
+
const numColumns = columnsLayout[row];
|
|
50
|
+
let rowContent = document.createElement('div');
|
|
51
|
+
rowContent.style.display = 'grid';
|
|
52
|
+
rowContent.style.gridTemplateColumns = `repeat(${numColumns}, 1fr)`;
|
|
53
|
+
rowContent.style.gap = '8px';
|
|
77
54
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
renderedLayout.push(childWrapper);
|
|
83
|
-
childIndex++;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (col < numColumns - 1) {
|
|
87
|
-
const splitter = document.createElement('nx-splitter');
|
|
88
|
-
splitter.setAttribute('direction', 'horizontal');
|
|
89
|
-
renderedLayout.push(splitter);
|
|
55
|
+
for (let col = 0; col < numColumns; col++) {
|
|
56
|
+
if (children[renderedIndex]) {
|
|
57
|
+
rowContent.appendChild(children[renderedIndex]);
|
|
58
|
+
renderedIndex++;
|
|
90
59
|
}
|
|
91
60
|
}
|
|
61
|
+
|
|
62
|
+
this.appendChild(rowContent);
|
|
63
|
+
|
|
92
64
|
if (row < numRows - 1) {
|
|
93
65
|
const splitter = document.createElement('nx-splitter');
|
|
94
66
|
splitter.setAttribute('direction', 'vertical');
|
|
95
|
-
splitter
|
|
96
|
-
renderedLayout.push(splitter);
|
|
67
|
+
this.appendChild(splitter);
|
|
97
68
|
}
|
|
98
69
|
}
|
|
99
|
-
|
|
100
|
-
renderedLayout.forEach(el => this.appendChild(el));
|
|
101
70
|
}
|
|
102
71
|
}
|
|
103
72
|
|
package/package.json
CHANGED
package/src/nx/nxLayout.js
CHANGED
|
@@ -7,7 +7,9 @@ class NxLayout extends HTMLElement {
|
|
|
7
7
|
|
|
8
8
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
9
9
|
// 속성이 변경되면 레이아웃을 다시 렌더링합니다.
|
|
10
|
-
|
|
10
|
+
if (oldValue !== newValue) { // 값 변경이 있을 때만 실행하는 것이 효율적
|
|
11
|
+
this.#render();
|
|
12
|
+
}
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
static get observedAttributes() {
|
|
@@ -15,89 +17,56 @@ class NxLayout extends HTMLElement {
|
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
#render() {
|
|
18
|
-
// 이전 콘텐츠를 모두 제거합니다.
|
|
19
|
-
console.log("====================");
|
|
20
|
-
|
|
21
20
|
const children = Array.from(this.children);
|
|
21
|
+
if (children.length === 0) return;
|
|
22
22
|
|
|
23
|
-
if (children.length <= 0) return;
|
|
24
|
-
|
|
25
|
-
//this.innerHTML = '';
|
|
26
23
|
// 기존 자식 노드를 안전하게 제거합니다.
|
|
27
24
|
while (this.firstChild) {
|
|
28
25
|
this.removeChild(this.firstChild);
|
|
29
26
|
}
|
|
30
27
|
|
|
31
|
-
const
|
|
32
|
-
const numRows =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
29
|
+
const numRows = columnsLayout.length;
|
|
36
30
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// CSS Grid 컨테이너 스타일 설정
|
|
40
|
-
let gridColumns = '';
|
|
31
|
+
// CSS Grid 템플릿 설정
|
|
41
32
|
let gridRows = '';
|
|
42
|
-
|
|
43
|
-
for (let i = 0; i < numColumns; i++) {
|
|
44
|
-
gridColumns += '1fr ';
|
|
45
|
-
if (i < numColumns - 1) {
|
|
46
|
-
gridColumns += '8px '; // 스플리터 너비
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
33
|
for (let i = 0; i < numRows; i++) {
|
|
51
34
|
gridRows += '1fr ';
|
|
52
35
|
if (i < numRows - 1) {
|
|
53
|
-
gridRows += '8px '; // 스플리터 높이
|
|
36
|
+
gridRows += '8px '; // 세로 스플리터 높이
|
|
54
37
|
}
|
|
55
38
|
}
|
|
56
39
|
|
|
57
40
|
this.style.display = 'grid';
|
|
58
41
|
this.style.width = '100%';
|
|
59
42
|
this.style.height = '100%';
|
|
60
|
-
this.style.gridTemplateColumns = gridColumns.trim();
|
|
61
43
|
this.style.gridTemplateRows = gridRows.trim();
|
|
62
44
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
// 자식 요소를 다시 추가하고 스플리터 삽입
|
|
66
|
-
const renderedLayout = [];
|
|
67
|
-
let childIndex = 0;
|
|
45
|
+
// 자식 요소와 스플리터 배치
|
|
46
|
+
let renderedIndex = 0;
|
|
68
47
|
|
|
69
48
|
for (let row = 0; row < numRows; row++) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
console.log(children[childIndex]);
|
|
49
|
+
const numColumns = columnsLayout[row];
|
|
50
|
+
let rowContent = document.createElement('div');
|
|
51
|
+
rowContent.style.display = 'grid';
|
|
52
|
+
rowContent.style.gridTemplateColumns = `repeat(${numColumns}, 1fr)`;
|
|
53
|
+
rowContent.style.gap = '8px';
|
|
77
54
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
renderedLayout.push(childWrapper);
|
|
83
|
-
childIndex++;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
if (col < numColumns - 1) {
|
|
87
|
-
const splitter = document.createElement('nx-splitter');
|
|
88
|
-
splitter.setAttribute('direction', 'horizontal');
|
|
89
|
-
renderedLayout.push(splitter);
|
|
55
|
+
for (let col = 0; col < numColumns; col++) {
|
|
56
|
+
if (children[renderedIndex]) {
|
|
57
|
+
rowContent.appendChild(children[renderedIndex]);
|
|
58
|
+
renderedIndex++;
|
|
90
59
|
}
|
|
91
60
|
}
|
|
61
|
+
|
|
62
|
+
this.appendChild(rowContent);
|
|
63
|
+
|
|
92
64
|
if (row < numRows - 1) {
|
|
93
65
|
const splitter = document.createElement('nx-splitter');
|
|
94
66
|
splitter.setAttribute('direction', 'vertical');
|
|
95
|
-
splitter
|
|
96
|
-
renderedLayout.push(splitter);
|
|
67
|
+
this.appendChild(splitter);
|
|
97
68
|
}
|
|
98
69
|
}
|
|
99
|
-
|
|
100
|
-
renderedLayout.forEach(el => this.appendChild(el));
|
|
101
70
|
}
|
|
102
71
|
}
|
|
103
72
|
|