@mintjamsinc/ichigojs 0.1.11 → 0.1.13
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/ichigo.esm.js +29 -10
- package/dist/ichigo.esm.js.map +1 -1
- package/dist/ichigo.esm.min.js +1 -1
- package/dist/ichigo.esm.min.js.map +1 -1
- package/dist/ichigo.umd.js +29 -10
- package/dist/ichigo.umd.js.map +1 -1
- package/dist/ichigo.umd.min.js +1 -1
- package/dist/ichigo.umd.min.js.map +1 -1
- package/dist/types/ichigo/VApplication.d.ts +4 -0
- package/package.json +1 -1
package/dist/ichigo.umd.js
CHANGED
@@ -7285,8 +7285,18 @@
|
|
7285
7285
|
* @inheritdoc
|
7286
7286
|
*/
|
7287
7287
|
get domUpdater() {
|
7288
|
-
//
|
7289
|
-
|
7288
|
+
// Create and return the DOM updater
|
7289
|
+
const updater = {
|
7290
|
+
get dependentIdentifiers() {
|
7291
|
+
return [];
|
7292
|
+
},
|
7293
|
+
applyToDOM: () => {
|
7294
|
+
if (!this.#isActivated) {
|
7295
|
+
this.renderComponent();
|
7296
|
+
}
|
7297
|
+
}
|
7298
|
+
};
|
7299
|
+
return updater;
|
7290
7300
|
}
|
7291
7301
|
/**
|
7292
7302
|
* @inheritdoc
|
@@ -7304,9 +7314,7 @@
|
|
7304
7314
|
* @inheritdoc
|
7305
7315
|
*/
|
7306
7316
|
get onMount() {
|
7307
|
-
return
|
7308
|
-
this.renderComponent();
|
7309
|
-
};
|
7317
|
+
return undefined;
|
7310
7318
|
}
|
7311
7319
|
/**
|
7312
7320
|
* @inheritdoc
|
@@ -7410,10 +7418,12 @@
|
|
7410
7418
|
}
|
7411
7419
|
// Replace element with component element
|
7412
7420
|
const parent = element.parentNode;
|
7413
|
-
if (parent) {
|
7414
|
-
|
7415
|
-
|
7421
|
+
if (!parent) {
|
7422
|
+
console.error(`Element has no parent node. Component '${componentId}' cannot be mounted.`);
|
7423
|
+
return;
|
7416
7424
|
}
|
7425
|
+
parent.insertBefore(componentElement, element);
|
7426
|
+
parent.removeChild(element);
|
7417
7427
|
// Create component instance
|
7418
7428
|
const instance = component.createInstance(properties);
|
7419
7429
|
// Create and mount child application using the parent application's registries
|
@@ -7426,8 +7436,7 @@
|
|
7426
7436
|
*/
|
7427
7437
|
cleanupComponent() {
|
7428
7438
|
if (this.#childApp) {
|
7429
|
-
|
7430
|
-
// this.#childApp.unmount();
|
7439
|
+
this.#childApp.unmount();
|
7431
7440
|
this.#childApp = undefined;
|
7432
7441
|
}
|
7433
7442
|
this.#isActivated = false;
|
@@ -11213,6 +11222,16 @@
|
|
11213
11222
|
this.#vNode.update();
|
11214
11223
|
this.#logger.info('Application mounted.');
|
11215
11224
|
}
|
11225
|
+
/**
|
11226
|
+
* Unmounts the application and cleans up resources.
|
11227
|
+
*/
|
11228
|
+
unmount() {
|
11229
|
+
if (this.#vNode) {
|
11230
|
+
this.#vNode.destroy();
|
11231
|
+
this.#vNode = undefined;
|
11232
|
+
}
|
11233
|
+
this.#logger.info('Application unmounted.');
|
11234
|
+
}
|
11216
11235
|
/**
|
11217
11236
|
* Creates a child application instance with the same registries.
|
11218
11237
|
* @param options The application options for the child.
|