@nine-lab/nine-mu 0.1.317 β 0.1.319
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/nine-mu.js +23 -27
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NineDiffPopup.js +16 -12
- package/src/components/NotificationHandler.js +5 -11
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
|
|
|
@@ -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
|
-
const $
|
|
89
|
-
$
|
|
90
|
-
|
|
91
|
-
trace.log("33333");
|
|
87
|
+
const $diffPopup = document.createElement('nine-diff-popup');
|
|
88
|
+
$diffPopup.setAttribute('package-name', this.#owner.getAttribute('package-name') || '');
|
|
92
89
|
|
|
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
|
-
$
|
|
101
|
-
$
|
|
95
|
+
$diffPopup.data([...this.#collectedFiles]);
|
|
96
|
+
$diffPopup.popup();
|
|
102
97
|
|
|
103
|
-
trace.log("55555");
|
|
104
98
|
// λ€μ μμ μΈμ
μ λλΉνμ¬ νΈλ€λ¬ λ΄λΆ μ μ λ²νΌ μμ μ΄κΈ°ν
|
|
105
99
|
this.#collectedFiles = [];
|
|
106
100
|
};
|