@nine-lab/nine-mu 0.1.318 β 0.1.320
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
|
@@ -88,20 +88,24 @@ export class NineDiffPopup extends HTMLElement {
|
|
|
88
88
|
`;
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
-
// 3. π
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
this
|
|
95
|
-
|
|
91
|
+
// 3. π [μμ ] μ΄λ²€νΈ μμ: ν 컨ν
μ΄λ μ체μ 미리 μ΄λ²€νΈλ₯Ό κ±Έμ΄λ (λ¨ ν λ²λ§ λ±λ‘)
|
|
92
|
+
// μ€λ³΅ λ±λ‘ λ°©μ§λ₯Ό μν΄ κΈ°μ‘΄ 리μ€λκ° μλ€λ©΄ μ κ±°νκ±°λ, νΉμ μμ±μ/connectedCallbackμμ μ΅μ΄ 1νλ§ λ±λ‘ν΄λ μ’μ΅λλ€.
|
|
93
|
+
this.#tabContainer.removeEventListener('change-dirty', this._onDiffDirtyChange);
|
|
94
|
+
this._onDiffDirtyChange = (e) => {
|
|
95
|
+
const { isDirty } = e.detail;
|
|
96
|
+
trace.log("μ΄λ²€νΈ μμ κ°μ§ - IsDirty:", isDirty);
|
|
97
|
+
|
|
98
|
+
// λ²νΌ μν μ μ΄
|
|
99
|
+
const confirmBtn = this.shadowRoot.querySelector('.btn-confirm');
|
|
100
|
+
if (confirmBtn) {
|
|
101
|
+
confirmBtn.disabled = !isDirty;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
this.#tabContainer.addEventListener('change-dirty', this._onDiffDirtyChange);
|
|
96
105
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
trace.log(isDirty);
|
|
106
|
+
// 4. π λ¨ ν λ²μ μ°μ°μΌλ‘ Light DOM νΈλ¦¬μ μμ μ μ£Όμ
!
|
|
107
|
+
this.#tabContainer.innerHTML = totalTabHtml;
|
|
100
108
|
|
|
101
|
-
trace.log(this.shadowRoot.querySelector('.btn-confirm'));
|
|
102
|
-
this.shadowRoot.querySelector('.btn-confirm').disabled = !isDirty; // μμ λμμ λλ§ μ μ₯ λ²νΌ νμ±ν
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
109
|
|
|
106
110
|
|
|
107
111
|
|
|
@@ -147,15 +151,15 @@ export class NineDiffPopup extends HTMLElement {
|
|
|
147
151
|
const currentContent = diff ? diff.getAsisContents() : asis_source;
|
|
148
152
|
|
|
149
153
|
payloadList.push({
|
|
150
|
-
layer,
|
|
154
|
+
//layer,
|
|
151
155
|
fullPath: full_path,
|
|
152
|
-
packageName: this.#host?.getAttribute('package-name') || "com.ninelab.ai",
|
|
156
|
+
//packageName: this.#host?.getAttribute('package-name') || "com.ninelab.ai",
|
|
153
157
|
contents: currentContent
|
|
154
158
|
});
|
|
155
159
|
}
|
|
156
160
|
|
|
157
161
|
try {
|
|
158
|
-
await api.post(`/nine-mu/source/
|
|
162
|
+
await api.post(`/nine-mu/source/generateRealFile`, { list: payloadList });
|
|
159
163
|
await nine.alert("μμ²νμ λͺ¨λ νμΌμ μμ€ λ³κ²½ μ¬νμ΄ μ±κ³΅μ μΌλ‘ λ°μλμμ΅λλ€.");
|
|
160
164
|
this.#dialog.close();
|
|
161
165
|
} catch (error) {
|
|
@@ -74,7 +74,7 @@ export class NotificationHandler {
|
|
|
74
74
|
* μ΅μ’
μ‘°λ¦½μ΄ λλ μκ·Έλμ΄ λλ¬νμ λ λ± ν λ² νμ
μ μ΄μ΄ μΌκ΄ μ£Όμ
|
|
75
75
|
*/
|
|
76
76
|
#openDiffPopup = () => {
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
if (this.#collectedFiles.length === 0) return;
|
|
79
79
|
|
|
80
80
|
const $oldPopup = this.#owner.shadowRoot.querySelector('nine-diff-popup');
|
|
@@ -82,25 +82,19 @@ export class NotificationHandler {
|
|
|
82
82
|
$oldPopup.remove();
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
trace.log("222222");
|
|
86
85
|
// DOM μμ μ±κΈν€ νμ
μΈμ€ν΄μ€ λ μ΄μμ μΆμΆ λ° λΉλ
|
|
87
86
|
|
|
88
87
|
const $diffPopup = document.createElement('nine-diff-popup');
|
|
89
88
|
$diffPopup.setAttribute('package-name', this.#owner.getAttribute('package-name') || '');
|
|
90
89
|
|
|
91
|
-
trace.log("33333");
|
|
92
|
-
|
|
93
90
|
const container = this.#owner.shadowRoot.querySelector('.wrapper') || this.#owner.shadowRoot;
|
|
94
91
|
container.appendChild($diffPopup);
|
|
95
92
|
//document.body.appendChild($popup);
|
|
96
93
|
|
|
97
|
-
trace.log("444444");
|
|
98
|
-
|
|
99
94
|
// νμ
λ΄λΆ λ§΅ μ μ₯μμ μμ§λ λ©ν° ν μμ€ λ¦¬μ€νΈ μ£Όμ
λ° λͺ¨λ¬ λμ€νλ μ΄
|
|
100
95
|
$diffPopup.data([...this.#collectedFiles]);
|
|
101
96
|
$diffPopup.popup();
|
|
102
97
|
|
|
103
|
-
trace.log("55555");
|
|
104
98
|
// λ€μ μμ μΈμ
μ λλΉνμ¬ νΈλ€λ¬ λ΄λΆ μ μ λ²νΌ μμ μ΄κΈ°ν
|
|
105
99
|
this.#collectedFiles = [];
|
|
106
100
|
};
|