@nine-lab/nine-mu 0.1.310 → 0.1.312
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/package.json
CHANGED
|
@@ -36,7 +36,7 @@ export class NineDiffPopup extends HTMLElement {
|
|
|
36
36
|
|
|
37
37
|
<div class="footer">
|
|
38
38
|
<button class="btn btn-cancel">취소</button>
|
|
39
|
-
<button class="btn btn-confirm">모두 저장</button>
|
|
39
|
+
<button class="btn btn-confirm" disabled>모두 저장</button>
|
|
40
40
|
</div>
|
|
41
41
|
</nine-dialog>
|
|
42
42
|
`;
|
|
@@ -91,6 +91,20 @@ export class NineDiffPopup extends HTMLElement {
|
|
|
91
91
|
// 3. 🚀 단 한 번의 연산으로 Light DOM 트리에 완전 슛 주입!
|
|
92
92
|
this.#tabContainer.innerHTML = totalTabHtml;
|
|
93
93
|
|
|
94
|
+
this.#tabContainer.querySelectorAll("nine-diff").forEach((element) => {
|
|
95
|
+
trace.log(element);
|
|
96
|
+
|
|
97
|
+
element.addEventListener('change-dirty', (e) => {
|
|
98
|
+
const { isDirty } = e.detail;
|
|
99
|
+
trace.log(isDirty);
|
|
100
|
+
|
|
101
|
+
trace.log(this.shadowRoot.querySelector('.btn-confirm'));
|
|
102
|
+
this.shadowRoot.querySelector('.btn-confirm').disabled = !isDirty; // 수정되었을 때만 저장 버튼 활성화
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
94
108
|
// 4. ⚙️ 주입이 끝났으므로 nine-tab의 오리지널 기동 초기화 로직(#init)을 강제로 다시 깨웁니다.
|
|
95
109
|
if (this.#tabContainer && typeof this.#tabContainer.connectedCallback === 'function') {
|
|
96
110
|
this.#tabContainer.connectedCallback();
|
|
@@ -130,7 +144,7 @@ export class NineDiffPopup extends HTMLElement {
|
|
|
130
144
|
for (const file of this.#fileList) {
|
|
131
145
|
const { layer, full_path, asis_source } = file;
|
|
132
146
|
const diff = this.#tabContainer.shadowRoot.querySelector(`nine-diff.${layer}`);
|
|
133
|
-
const currentContent = diff ? diff.
|
|
147
|
+
const currentContent = diff ? diff.getAsisContents() : asis_source;
|
|
134
148
|
|
|
135
149
|
payloadList.push({
|
|
136
150
|
layer,
|