@melodicdev/components 2.0.0 → 2.0.2
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/assets/melodic-components.js +22 -3
- package/assets/melodic-components.js.map +1 -1
- package/assets/melodic-components.min.js +185 -163
- package/lib/components/overlays/dialog/dialog.component.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.component.js +6 -1
- package/lib/components/overlays/dialog/dialog.service.d.ts +9 -1
- package/lib/components/overlays/dialog/dialog.service.d.ts.map +1 -1
- package/lib/components/overlays/dialog/dialog.service.js +16 -1
- package/package.json +1 -1
|
@@ -830,10 +830,14 @@ var ComponentBase = class extends HTMLElement {
|
|
|
830
830
|
}
|
|
831
831
|
proto = Object.getPrototypeOf(proto);
|
|
832
832
|
}
|
|
833
|
+
const getterOnly = [];
|
|
833
834
|
const filtered = properties.filter((prop) => {
|
|
834
835
|
if (prop.startsWith("_") || prop === "elementRef" || prop === "constructor") return false;
|
|
835
836
|
const descriptor = this.getPropertyDescriptor(this._component, prop);
|
|
836
|
-
if (descriptor && descriptor.get && !descriptor.set)
|
|
837
|
+
if (descriptor && descriptor.get && !descriptor.set) {
|
|
838
|
+
getterOnly.push(prop);
|
|
839
|
+
return false;
|
|
840
|
+
}
|
|
837
841
|
const value = this._component[prop];
|
|
838
842
|
if (isSignal(value)) {
|
|
839
843
|
this._reactiveSources.push(value);
|
|
@@ -885,6 +889,15 @@ var ComponentBase = class extends HTMLElement {
|
|
|
885
889
|
configurable: true
|
|
886
890
|
});
|
|
887
891
|
}
|
|
892
|
+
for (const prop of getterOnly) {
|
|
893
|
+
if (Object.prototype.hasOwnProperty.call(this, prop)) continue;
|
|
894
|
+
Object.defineProperty(this, prop, {
|
|
895
|
+
get: () => this._component[prop],
|
|
896
|
+
set: () => {},
|
|
897
|
+
enumerable: true,
|
|
898
|
+
configurable: true
|
|
899
|
+
});
|
|
900
|
+
}
|
|
888
901
|
}
|
|
889
902
|
getPropertyDescriptor(target, prop) {
|
|
890
903
|
let current = target;
|
|
@@ -22993,6 +23006,7 @@ var DialogService = class DialogService$1 {
|
|
|
22993
23006
|
const dialogRef = new DialogRef(dialogID, dialogEl);
|
|
22994
23007
|
this._dialogs.set(dialogID, {
|
|
22995
23008
|
dialogRef,
|
|
23009
|
+
dialogEl,
|
|
22996
23010
|
dialogComponent: void 0
|
|
22997
23011
|
});
|
|
22998
23012
|
dialogEl.addEventListener("close", () => {
|
|
@@ -23001,7 +23015,11 @@ var DialogService = class DialogService$1 {
|
|
|
23001
23015
|
});
|
|
23002
23016
|
return dialogRef;
|
|
23003
23017
|
}
|
|
23004
|
-
removeDialog(dialogID) {
|
|
23018
|
+
removeDialog(dialogID, dialogEl) {
|
|
23019
|
+
if (dialogEl) {
|
|
23020
|
+
const elements = this._dialogs.get(dialogID);
|
|
23021
|
+
if (!elements || elements.dialogEl !== dialogEl) return;
|
|
23022
|
+
}
|
|
23005
23023
|
this._dialogs.delete(dialogID);
|
|
23006
23024
|
}
|
|
23007
23025
|
open(dialogComponentOrID, config) {
|
|
@@ -23057,7 +23075,8 @@ var DialogComponent = class DialogComponent$1 {
|
|
|
23057
23075
|
this._registered = true;
|
|
23058
23076
|
}
|
|
23059
23077
|
onDestroy() {
|
|
23060
|
-
|
|
23078
|
+
if (!this._registered) return;
|
|
23079
|
+
this._dialogService.removeDialog(this._dialogID, this._dialogEl);
|
|
23061
23080
|
}
|
|
23062
23081
|
open() {
|
|
23063
23082
|
this.registerDialog();
|