ninegrid2 6.1108.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.
@@ -121909,7 +121909,7 @@ class NxLayout extends HTMLElement {
121909
121909
  this.style.display = 'flex';
121910
121910
  this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
121911
121911
  this.style.width = '100%';
121912
- //this.style.height = '100%';
121912
+ this.style.height = '100%';
121913
121913
  //this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
121914
121914
 
121915
121915
  let childIndex = 0;
@@ -121962,7 +121962,7 @@ class NxLayout2 extends HTMLElement {
121962
121962
  }
121963
121963
 
121964
121964
  connectedCallback() {
121965
- this.#originalChildren = Array.from(this.children).filter(child => child.tagName.toLowerCase() !== 'nx-splitter');
121965
+ this.#originalChildren = Array.from(this.children);
121966
121966
  this.#render();
121967
121967
  }
121968
121968
 
@@ -121988,12 +121988,11 @@ class NxLayout2 extends HTMLElement {
121988
121988
  const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
121989
121989
  const numRows = columnsLayout.length;
121990
121990
 
121991
- // 메인 컨테이너를 Flexbox로 설정
121991
+ // 메인 컨테이너는 행을 세로로 배치
121992
121992
  this.style.display = 'flex';
121993
- this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
121993
+ this.style.flexDirection = 'column';
121994
121994
  this.style.width = '100%';
121995
- //this.style.height = '100%';
121996
- //this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
121995
+ this.style.gap = "4px";
121997
121996
 
121998
121997
  let childIndex = 0;
121999
121998
 
@@ -122003,33 +122002,27 @@ class NxLayout2 extends HTMLElement {
122003
122002
  // 행 래퍼 생성
122004
122003
  const rowWrapper = document.createElement('div');
122005
122004
  rowWrapper.style.display = 'flex';
122006
- rowWrapper.style.flex = "1 1 0";//`1 1 ${flexBasis}%`; // 모든 행이 균등한 높이를 갖도록 설정
122005
+ rowWrapper.style.flexDirection = 'row';
122006
+ rowWrapper.style.flex = "1 1 0";
122007
122007
  rowWrapper.style.width = '100%';
122008
- //rowWrapper.style.minWidth = '0';
122009
- //rowWrapper.style.minHeight = '0';
122010
- //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";
122011
122012
 
122012
122013
  for (let col = 0; col < numColumns; col++) {
122013
122014
  if (children[childIndex]) {
122014
122015
  const panel = children[childIndex];
122015
- panel.style.flex = '1 1 0'; // Flexbox 환경에 맞게 flex 속성 추가
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';
122016
122021
  rowWrapper.appendChild(panel);
122017
122022
  childIndex++;
122018
122023
  }
122019
- if (col < numColumns - 1) {
122020
- const splitter = document.createElement('nx-splitter');
122021
- splitter.classList.add("h");
122022
- rowWrapper.appendChild(splitter);
122023
- }
122024
122024
  }
122025
-
122026
122025
  this.appendChild(rowWrapper);
122027
-
122028
- if (row < numRows - 1) {
122029
- const splitter = document.createElement('nx-splitter');
122030
- splitter.classList.add("v");
122031
- this.appendChild(splitter);
122032
- }
122033
122026
  }
122034
122027
  }
122035
122028
  }
@@ -121905,7 +121905,7 @@ class NxLayout extends HTMLElement {
121905
121905
  this.style.display = 'flex';
121906
121906
  this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
121907
121907
  this.style.width = '100%';
121908
- //this.style.height = '100%';
121908
+ this.style.height = '100%';
121909
121909
  //this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
121910
121910
 
121911
121911
  let childIndex = 0;
@@ -121958,7 +121958,7 @@ class NxLayout2 extends HTMLElement {
121958
121958
  }
121959
121959
 
121960
121960
  connectedCallback() {
121961
- this.#originalChildren = Array.from(this.children).filter(child => child.tagName.toLowerCase() !== 'nx-splitter');
121961
+ this.#originalChildren = Array.from(this.children);
121962
121962
  this.#render();
121963
121963
  }
121964
121964
 
@@ -121984,12 +121984,11 @@ class NxLayout2 extends HTMLElement {
121984
121984
  const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
121985
121985
  const numRows = columnsLayout.length;
121986
121986
 
121987
- // 메인 컨테이너를 Flexbox로 설정
121987
+ // 메인 컨테이너는 행을 세로로 배치
121988
121988
  this.style.display = 'flex';
121989
- this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
121989
+ this.style.flexDirection = 'column';
121990
121990
  this.style.width = '100%';
121991
- //this.style.height = '100%';
121992
- //this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
121991
+ this.style.gap = "4px";
121993
121992
 
121994
121993
  let childIndex = 0;
121995
121994
 
@@ -121999,33 +121998,27 @@ class NxLayout2 extends HTMLElement {
121999
121998
  // 행 래퍼 생성
122000
121999
  const rowWrapper = document.createElement('div');
122001
122000
  rowWrapper.style.display = 'flex';
122002
- rowWrapper.style.flex = "1 1 0";//`1 1 ${flexBasis}%`; // 모든 행이 균등한 높이를 갖도록 설정
122001
+ rowWrapper.style.flexDirection = 'row';
122002
+ rowWrapper.style.flex = "1 1 0";
122003
122003
  rowWrapper.style.width = '100%';
122004
- //rowWrapper.style.minWidth = '0';
122005
- //rowWrapper.style.minHeight = '0';
122006
- //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";
122007
122008
 
122008
122009
  for (let col = 0; col < numColumns; col++) {
122009
122010
  if (children[childIndex]) {
122010
122011
  const panel = children[childIndex];
122011
- panel.style.flex = '1 1 0'; // Flexbox 환경에 맞게 flex 속성 추가
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';
122012
122017
  rowWrapper.appendChild(panel);
122013
122018
  childIndex++;
122014
122019
  }
122015
- if (col < numColumns - 1) {
122016
- const splitter = document.createElement('nx-splitter');
122017
- splitter.classList.add("h");
122018
- rowWrapper.appendChild(splitter);
122019
- }
122020
122020
  }
122021
-
122022
122021
  this.appendChild(rowWrapper);
122023
-
122024
- if (row < numRows - 1) {
122025
- const splitter = document.createElement('nx-splitter');
122026
- splitter.classList.add("v");
122027
- this.appendChild(splitter);
122028
- }
122029
122022
  }
122030
122023
  }
122031
122024
  }
@@ -39,7 +39,7 @@ class NxLayout extends HTMLElement {
39
39
  this.style.display = 'flex';
40
40
  this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
41
41
  this.style.width = '100%';
42
- //this.style.height = '100%';
42
+ this.style.height = '100%';
43
43
  //this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
44
44
 
45
45
  let childIndex = 0;
@@ -9,7 +9,7 @@ class NxLayout2 extends HTMLElement {
9
9
  }
10
10
 
11
11
  connectedCallback() {
12
- this.#originalChildren = Array.from(this.children).filter(child => child.tagName.toLowerCase() !== 'nx-splitter');
12
+ this.#originalChildren = Array.from(this.children);
13
13
  this.#render();
14
14
  }
15
15
 
@@ -35,15 +35,14 @@ class NxLayout2 extends HTMLElement {
35
35
  const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
36
36
  const numRows = columnsLayout.length;
37
37
 
38
- // 메인 컨테이너를 Flexbox로 설정
38
+ // 메인 컨테이너는 행을 세로로 배치
39
39
  this.style.display = 'flex';
40
- this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
40
+ this.style.flexDirection = 'column';
41
41
  this.style.width = '100%';
42
- //this.style.height = '100%';
43
- //this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
42
+ this.style.gap = "4px";
44
43
 
45
44
  let childIndex = 0;
46
- const flexBasis = 100 / numRows; // 각 행의 기본 높이 비율
45
+ const flexBasis = 100 / numRows;
47
46
 
48
47
  for (let row = 0; row < numRows; row++) {
49
48
  const numColumns = columnsLayout[row];
@@ -51,33 +50,27 @@ class NxLayout2 extends HTMLElement {
51
50
  // 행 래퍼 생성
52
51
  const rowWrapper = document.createElement('div');
53
52
  rowWrapper.style.display = 'flex';
54
- rowWrapper.style.flex = "1 1 0";//`1 1 ${flexBasis}%`; // 모든 행이 균등한 높이를 갖도록 설정
53
+ rowWrapper.style.flexDirection = 'row';
54
+ rowWrapper.style.flex = "1 1 0";
55
55
  rowWrapper.style.width = '100%';
56
- //rowWrapper.style.minWidth = '0';
57
- //rowWrapper.style.minHeight = '0';
58
- //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";
59
60
 
60
61
  for (let col = 0; col < numColumns; col++) {
61
62
  if (children[childIndex]) {
62
63
  const panel = children[childIndex];
63
- panel.style.flex = '1 1 0'; // Flexbox 환경에 맞게 flex 속성 추가
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';
64
69
  rowWrapper.appendChild(panel);
65
70
  childIndex++;
66
71
  }
67
- if (col < numColumns - 1) {
68
- const splitter = document.createElement('nx-splitter');
69
- splitter.classList.add("h");
70
- rowWrapper.appendChild(splitter);
71
- }
72
72
  }
73
-
74
73
  this.appendChild(rowWrapper);
75
-
76
- if (row < numRows - 1) {
77
- const splitter = document.createElement('nx-splitter');
78
- splitter.classList.add("v");
79
- this.appendChild(splitter);
80
- }
81
74
  }
82
75
  }
83
76
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ninegrid2",
3
3
  "type": "module",
4
- "version": "6.1108.0",
4
+ "version": "6.1110.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -39,7 +39,7 @@ class NxLayout extends HTMLElement {
39
39
  this.style.display = 'flex';
40
40
  this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
41
41
  this.style.width = '100%';
42
- //this.style.height = '100%';
42
+ this.style.height = '100%';
43
43
  //this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
44
44
 
45
45
  let childIndex = 0;
@@ -9,7 +9,7 @@ class NxLayout2 extends HTMLElement {
9
9
  }
10
10
 
11
11
  connectedCallback() {
12
- this.#originalChildren = Array.from(this.children).filter(child => child.tagName.toLowerCase() !== 'nx-splitter');
12
+ this.#originalChildren = Array.from(this.children);
13
13
  this.#render();
14
14
  }
15
15
 
@@ -35,15 +35,14 @@ class NxLayout2 extends HTMLElement {
35
35
  const columnsLayout = (this.getAttribute('columns') || '1').split(',').map(Number);
36
36
  const numRows = columnsLayout.length;
37
37
 
38
- // 메인 컨테이너를 Flexbox로 설정
38
+ // 메인 컨테이너는 행을 세로로 배치
39
39
  this.style.display = 'flex';
40
- this.style.flexDirection = 'column'; // 'flex-direction' 대신 CamelCase 사용
40
+ this.style.flexDirection = 'column';
41
41
  this.style.width = '100%';
42
- //this.style.height = '100%';
43
- //this.style.overflow = 'hidden'; // 부모 요소에 스크롤 방지
42
+ this.style.gap = "4px";
44
43
 
45
44
  let childIndex = 0;
46
- const flexBasis = 100 / numRows; // 각 행의 기본 높이 비율
45
+ const flexBasis = 100 / numRows;
47
46
 
48
47
  for (let row = 0; row < numRows; row++) {
49
48
  const numColumns = columnsLayout[row];
@@ -51,33 +50,27 @@ class NxLayout2 extends HTMLElement {
51
50
  // 행 래퍼 생성
52
51
  const rowWrapper = document.createElement('div');
53
52
  rowWrapper.style.display = 'flex';
54
- rowWrapper.style.flex = "1 1 0";//`1 1 ${flexBasis}%`; // 모든 행이 균등한 높이를 갖도록 설정
53
+ rowWrapper.style.flexDirection = 'row';
54
+ rowWrapper.style.flex = "1 1 0";
55
55
  rowWrapper.style.width = '100%';
56
- //rowWrapper.style.minWidth = '0';
57
- //rowWrapper.style.minHeight = '0';
58
- //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";
59
60
 
60
61
  for (let col = 0; col < numColumns; col++) {
61
62
  if (children[childIndex]) {
62
63
  const panel = children[childIndex];
63
- panel.style.flex = '1 1 0'; // Flexbox 환경에 맞게 flex 속성 추가
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';
64
69
  rowWrapper.appendChild(panel);
65
70
  childIndex++;
66
71
  }
67
- if (col < numColumns - 1) {
68
- const splitter = document.createElement('nx-splitter');
69
- splitter.classList.add("h");
70
- rowWrapper.appendChild(splitter);
71
- }
72
72
  }
73
-
74
73
  this.appendChild(rowWrapper);
75
-
76
- if (row < numRows - 1) {
77
- const splitter = document.createElement('nx-splitter');
78
- splitter.classList.add("v");
79
- this.appendChild(splitter);
80
- }
81
74
  }
82
75
  }
83
76
  }