ninegrid2 6.978.0 → 6.980.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 +20 -21
- package/dist/bundle.esm.js +20 -21
- package/dist/nx/nxLayout.js +20 -21
- package/package.json +1 -1
- package/src/nx/nxLayout.js +20 -21
package/dist/bundle.cjs.js
CHANGED
|
@@ -121908,7 +121908,7 @@ class NxLayout extends HTMLElement {
|
|
|
121908
121908
|
}
|
|
121909
121909
|
|
|
121910
121910
|
static get observedAttributes() {
|
|
121911
|
-
return ['columns'
|
|
121911
|
+
return ['columns'];
|
|
121912
121912
|
}
|
|
121913
121913
|
|
|
121914
121914
|
#render() {
|
|
@@ -121923,51 +121923,50 @@ class NxLayout extends HTMLElement {
|
|
|
121923
121923
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121924
121924
|
const numRows = columnsLayout.length;
|
|
121925
121925
|
|
|
121926
|
-
console.log(columnsLayout);
|
|
121927
|
-
|
|
121928
|
-
// CSS Grid 템플릿 설정
|
|
121929
|
-
let gridRows = '';
|
|
121930
|
-
for (let i = 0; i < numRows; i++) {
|
|
121931
|
-
gridRows += '1fr ';
|
|
121932
|
-
if (i < numRows - 1) {
|
|
121933
|
-
gridRows += '8px '; // 세로 스플리터 높이
|
|
121934
|
-
}
|
|
121935
|
-
}
|
|
121936
|
-
|
|
121937
121926
|
this.style.display = 'grid';
|
|
121938
121927
|
this.style.width = '100%';
|
|
121939
121928
|
this.style.height = '100%';
|
|
121940
|
-
this.style.gridTemplateRows =
|
|
121929
|
+
this.style.gridTemplateRows = `repeat(${numRows * 2 - 1}, 1fr)`;
|
|
121930
|
+
this.style.gridAutoRows = `8px`;
|
|
121931
|
+
this.style.gridTemplateRows = `repeat(${numRows}, 1fr) `;
|
|
121941
121932
|
|
|
121942
|
-
// 자식 요소와 스플리터 배치
|
|
121943
121933
|
let renderedIndex = 0;
|
|
121944
121934
|
|
|
121945
121935
|
for (let row = 0; row < numRows; row++) {
|
|
121946
121936
|
const numColumns = columnsLayout[row];
|
|
121947
|
-
|
|
121948
|
-
|
|
121949
|
-
|
|
121950
|
-
|
|
121937
|
+
const rowWrapper = document.createElement('div');
|
|
121938
|
+
rowWrapper.style.display = 'grid';
|
|
121939
|
+
rowWrapper.style.gridTemplateColumns = `repeat(${numColumns * 2 - 1}, 1fr)`;
|
|
121940
|
+
rowWrapper.style.gridAutoColumns = `8px`;
|
|
121941
|
+
rowWrapper.style.height = '100%';
|
|
121951
121942
|
|
|
121952
121943
|
for (let col = 0; col < numColumns; col++) {
|
|
121953
121944
|
if (children[renderedIndex]) {
|
|
121954
|
-
|
|
121945
|
+
rowWrapper.appendChild(children[renderedIndex]);
|
|
121955
121946
|
renderedIndex++;
|
|
121956
121947
|
}
|
|
121948
|
+
|
|
121949
|
+
if (col < numColumns - 1) {
|
|
121950
|
+
const splitter = document.createElement('nx-splitter');
|
|
121951
|
+
splitter.setAttribute('direction', 'horizontal');
|
|
121952
|
+
splitter.style.gridColumn = `${col * 2 + 2} / span 1`;
|
|
121953
|
+
rowWrapper.appendChild(splitter);
|
|
121954
|
+
}
|
|
121957
121955
|
}
|
|
121958
121956
|
|
|
121959
|
-
this.appendChild(
|
|
121957
|
+
this.appendChild(rowWrapper);
|
|
121960
121958
|
|
|
121961
121959
|
if (row < numRows - 1) {
|
|
121962
121960
|
const splitter = document.createElement('nx-splitter');
|
|
121963
121961
|
splitter.setAttribute('direction', 'vertical');
|
|
121962
|
+
splitter.style.gridRow = `${row * 2 + 2} / span 1`;
|
|
121963
|
+
splitter.style.gridColumn = `1 / -1`;
|
|
121964
121964
|
this.appendChild(splitter);
|
|
121965
121965
|
}
|
|
121966
121966
|
}
|
|
121967
121967
|
}
|
|
121968
121968
|
}
|
|
121969
121969
|
|
|
121970
|
-
// 커스텀 엘리먼트를 등록
|
|
121971
121970
|
customElements.define('nx-layout', NxLayout);
|
|
121972
121971
|
|
|
121973
121972
|
class aiSettings extends HTMLElement
|
package/dist/bundle.esm.js
CHANGED
|
@@ -121904,7 +121904,7 @@ class NxLayout extends HTMLElement {
|
|
|
121904
121904
|
}
|
|
121905
121905
|
|
|
121906
121906
|
static get observedAttributes() {
|
|
121907
|
-
return ['columns'
|
|
121907
|
+
return ['columns'];
|
|
121908
121908
|
}
|
|
121909
121909
|
|
|
121910
121910
|
#render() {
|
|
@@ -121919,51 +121919,50 @@ class NxLayout extends HTMLElement {
|
|
|
121919
121919
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
121920
121920
|
const numRows = columnsLayout.length;
|
|
121921
121921
|
|
|
121922
|
-
console.log(columnsLayout);
|
|
121923
|
-
|
|
121924
|
-
// CSS Grid 템플릿 설정
|
|
121925
|
-
let gridRows = '';
|
|
121926
|
-
for (let i = 0; i < numRows; i++) {
|
|
121927
|
-
gridRows += '1fr ';
|
|
121928
|
-
if (i < numRows - 1) {
|
|
121929
|
-
gridRows += '8px '; // 세로 스플리터 높이
|
|
121930
|
-
}
|
|
121931
|
-
}
|
|
121932
|
-
|
|
121933
121922
|
this.style.display = 'grid';
|
|
121934
121923
|
this.style.width = '100%';
|
|
121935
121924
|
this.style.height = '100%';
|
|
121936
|
-
this.style.gridTemplateRows =
|
|
121925
|
+
this.style.gridTemplateRows = `repeat(${numRows * 2 - 1}, 1fr)`;
|
|
121926
|
+
this.style.gridAutoRows = `8px`;
|
|
121927
|
+
this.style.gridTemplateRows = `repeat(${numRows}, 1fr) `;
|
|
121937
121928
|
|
|
121938
|
-
// 자식 요소와 스플리터 배치
|
|
121939
121929
|
let renderedIndex = 0;
|
|
121940
121930
|
|
|
121941
121931
|
for (let row = 0; row < numRows; row++) {
|
|
121942
121932
|
const numColumns = columnsLayout[row];
|
|
121943
|
-
|
|
121944
|
-
|
|
121945
|
-
|
|
121946
|
-
|
|
121933
|
+
const rowWrapper = document.createElement('div');
|
|
121934
|
+
rowWrapper.style.display = 'grid';
|
|
121935
|
+
rowWrapper.style.gridTemplateColumns = `repeat(${numColumns * 2 - 1}, 1fr)`;
|
|
121936
|
+
rowWrapper.style.gridAutoColumns = `8px`;
|
|
121937
|
+
rowWrapper.style.height = '100%';
|
|
121947
121938
|
|
|
121948
121939
|
for (let col = 0; col < numColumns; col++) {
|
|
121949
121940
|
if (children[renderedIndex]) {
|
|
121950
|
-
|
|
121941
|
+
rowWrapper.appendChild(children[renderedIndex]);
|
|
121951
121942
|
renderedIndex++;
|
|
121952
121943
|
}
|
|
121944
|
+
|
|
121945
|
+
if (col < numColumns - 1) {
|
|
121946
|
+
const splitter = document.createElement('nx-splitter');
|
|
121947
|
+
splitter.setAttribute('direction', 'horizontal');
|
|
121948
|
+
splitter.style.gridColumn = `${col * 2 + 2} / span 1`;
|
|
121949
|
+
rowWrapper.appendChild(splitter);
|
|
121950
|
+
}
|
|
121953
121951
|
}
|
|
121954
121952
|
|
|
121955
|
-
this.appendChild(
|
|
121953
|
+
this.appendChild(rowWrapper);
|
|
121956
121954
|
|
|
121957
121955
|
if (row < numRows - 1) {
|
|
121958
121956
|
const splitter = document.createElement('nx-splitter');
|
|
121959
121957
|
splitter.setAttribute('direction', 'vertical');
|
|
121958
|
+
splitter.style.gridRow = `${row * 2 + 2} / span 1`;
|
|
121959
|
+
splitter.style.gridColumn = `1 / -1`;
|
|
121960
121960
|
this.appendChild(splitter);
|
|
121961
121961
|
}
|
|
121962
121962
|
}
|
|
121963
121963
|
}
|
|
121964
121964
|
}
|
|
121965
121965
|
|
|
121966
|
-
// 커스텀 엘리먼트를 등록
|
|
121967
121966
|
customElements.define('nx-layout', NxLayout);
|
|
121968
121967
|
|
|
121969
121968
|
class aiSettings extends HTMLElement
|
package/dist/nx/nxLayout.js
CHANGED
|
@@ -13,7 +13,7 @@ class NxLayout extends HTMLElement {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
static get observedAttributes() {
|
|
16
|
-
return ['columns'
|
|
16
|
+
return ['columns'];
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
#render() {
|
|
@@ -28,49 +28,48 @@ class NxLayout extends HTMLElement {
|
|
|
28
28
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
29
29
|
const numRows = columnsLayout.length;
|
|
30
30
|
|
|
31
|
-
console.log(columnsLayout);
|
|
32
|
-
|
|
33
|
-
// CSS Grid 템플릿 설정
|
|
34
|
-
let gridRows = '';
|
|
35
|
-
for (let i = 0; i < numRows; i++) {
|
|
36
|
-
gridRows += '1fr ';
|
|
37
|
-
if (i < numRows - 1) {
|
|
38
|
-
gridRows += '8px '; // 세로 스플리터 높이
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
31
|
this.style.display = 'grid';
|
|
43
32
|
this.style.width = '100%';
|
|
44
33
|
this.style.height = '100%';
|
|
45
|
-
this.style.gridTemplateRows =
|
|
34
|
+
this.style.gridTemplateRows = `repeat(${numRows * 2 - 1}, 1fr)`;
|
|
35
|
+
this.style.gridAutoRows = `8px`;
|
|
36
|
+
this.style.gridTemplateRows = `repeat(${numRows}, 1fr) `;
|
|
46
37
|
|
|
47
|
-
// 자식 요소와 스플리터 배치
|
|
48
38
|
let renderedIndex = 0;
|
|
49
39
|
|
|
50
40
|
for (let row = 0; row < numRows; row++) {
|
|
51
41
|
const numColumns = columnsLayout[row];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
const rowWrapper = document.createElement('div');
|
|
43
|
+
rowWrapper.style.display = 'grid';
|
|
44
|
+
rowWrapper.style.gridTemplateColumns = `repeat(${numColumns * 2 - 1}, 1fr)`;
|
|
45
|
+
rowWrapper.style.gridAutoColumns = `8px`;
|
|
46
|
+
rowWrapper.style.height = '100%';
|
|
56
47
|
|
|
57
48
|
for (let col = 0; col < numColumns; col++) {
|
|
58
49
|
if (children[renderedIndex]) {
|
|
59
|
-
|
|
50
|
+
rowWrapper.appendChild(children[renderedIndex]);
|
|
60
51
|
renderedIndex++;
|
|
61
52
|
}
|
|
53
|
+
|
|
54
|
+
if (col < numColumns - 1) {
|
|
55
|
+
const splitter = document.createElement('nx-splitter');
|
|
56
|
+
splitter.setAttribute('direction', 'horizontal');
|
|
57
|
+
splitter.style.gridColumn = `${col * 2 + 2} / span 1`;
|
|
58
|
+
rowWrapper.appendChild(splitter);
|
|
59
|
+
}
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
this.appendChild(
|
|
62
|
+
this.appendChild(rowWrapper);
|
|
65
63
|
|
|
66
64
|
if (row < numRows - 1) {
|
|
67
65
|
const splitter = document.createElement('nx-splitter');
|
|
68
66
|
splitter.setAttribute('direction', 'vertical');
|
|
67
|
+
splitter.style.gridRow = `${row * 2 + 2} / span 1`;
|
|
68
|
+
splitter.style.gridColumn = `1 / -1`;
|
|
69
69
|
this.appendChild(splitter);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
// 커스텀 엘리먼트를 등록
|
|
76
75
|
customElements.define('nx-layout', NxLayout);
|
package/package.json
CHANGED
package/src/nx/nxLayout.js
CHANGED
|
@@ -13,7 +13,7 @@ class NxLayout extends HTMLElement {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
static get observedAttributes() {
|
|
16
|
-
return ['columns'
|
|
16
|
+
return ['columns'];
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
#render() {
|
|
@@ -28,49 +28,48 @@ class NxLayout extends HTMLElement {
|
|
|
28
28
|
const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
|
|
29
29
|
const numRows = columnsLayout.length;
|
|
30
30
|
|
|
31
|
-
console.log(columnsLayout);
|
|
32
|
-
|
|
33
|
-
// CSS Grid 템플릿 설정
|
|
34
|
-
let gridRows = '';
|
|
35
|
-
for (let i = 0; i < numRows; i++) {
|
|
36
|
-
gridRows += '1fr ';
|
|
37
|
-
if (i < numRows - 1) {
|
|
38
|
-
gridRows += '8px '; // 세로 스플리터 높이
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
31
|
this.style.display = 'grid';
|
|
43
32
|
this.style.width = '100%';
|
|
44
33
|
this.style.height = '100%';
|
|
45
|
-
this.style.gridTemplateRows =
|
|
34
|
+
this.style.gridTemplateRows = `repeat(${numRows * 2 - 1}, 1fr)`;
|
|
35
|
+
this.style.gridAutoRows = `8px`;
|
|
36
|
+
this.style.gridTemplateRows = `repeat(${numRows}, 1fr) `;
|
|
46
37
|
|
|
47
|
-
// 자식 요소와 스플리터 배치
|
|
48
38
|
let renderedIndex = 0;
|
|
49
39
|
|
|
50
40
|
for (let row = 0; row < numRows; row++) {
|
|
51
41
|
const numColumns = columnsLayout[row];
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
42
|
+
const rowWrapper = document.createElement('div');
|
|
43
|
+
rowWrapper.style.display = 'grid';
|
|
44
|
+
rowWrapper.style.gridTemplateColumns = `repeat(${numColumns * 2 - 1}, 1fr)`;
|
|
45
|
+
rowWrapper.style.gridAutoColumns = `8px`;
|
|
46
|
+
rowWrapper.style.height = '100%';
|
|
56
47
|
|
|
57
48
|
for (let col = 0; col < numColumns; col++) {
|
|
58
49
|
if (children[renderedIndex]) {
|
|
59
|
-
|
|
50
|
+
rowWrapper.appendChild(children[renderedIndex]);
|
|
60
51
|
renderedIndex++;
|
|
61
52
|
}
|
|
53
|
+
|
|
54
|
+
if (col < numColumns - 1) {
|
|
55
|
+
const splitter = document.createElement('nx-splitter');
|
|
56
|
+
splitter.setAttribute('direction', 'horizontal');
|
|
57
|
+
splitter.style.gridColumn = `${col * 2 + 2} / span 1`;
|
|
58
|
+
rowWrapper.appendChild(splitter);
|
|
59
|
+
}
|
|
62
60
|
}
|
|
63
61
|
|
|
64
|
-
this.appendChild(
|
|
62
|
+
this.appendChild(rowWrapper);
|
|
65
63
|
|
|
66
64
|
if (row < numRows - 1) {
|
|
67
65
|
const splitter = document.createElement('nx-splitter');
|
|
68
66
|
splitter.setAttribute('direction', 'vertical');
|
|
67
|
+
splitter.style.gridRow = `${row * 2 + 2} / span 1`;
|
|
68
|
+
splitter.style.gridColumn = `1 / -1`;
|
|
69
69
|
this.appendChild(splitter);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
// 커스텀 엘리먼트를 등록
|
|
76
75
|
customElements.define('nx-layout', NxLayout);
|