@c8y/ngx-components 1023.96.0 → 1023.97.3

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.
Files changed (39) hide show
  1. package/alarms/index.d.ts.map +1 -1
  2. package/context-dashboard/device/view/index.d.ts +24 -1
  3. package/context-dashboard/device/view/index.d.ts.map +1 -1
  4. package/context-dashboard/index.d.ts +9 -3
  5. package/context-dashboard/index.d.ts.map +1 -1
  6. package/echart/index.d.ts.map +1 -1
  7. package/fesm2022/c8y-ngx-components-alarms.mjs +12 -5
  8. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  9. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +21 -3
  10. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs.map +1 -1
  11. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +2 -2
  12. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +25 -15
  14. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-echart.mjs +52 -36
  16. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  17. package/fesm2022/c8y-ngx-components-map.mjs +15 -0
  18. package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
  19. package/fesm2022/c8y-ngx-components-upgrade.mjs +12 -1
  20. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components.mjs +30 -5
  22. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  23. package/index.d.ts +5 -0
  24. package/index.d.ts.map +1 -1
  25. package/locales/de.po +57 -3
  26. package/locales/es.po +57 -3
  27. package/locales/fr.po +57 -3
  28. package/locales/ja_JP.po +57 -3
  29. package/locales/ko.po +57 -3
  30. package/locales/locales.pot +6 -0
  31. package/locales/nl.po +57 -3
  32. package/locales/pl.po +57 -3
  33. package/locales/pt_BR.po +57 -3
  34. package/locales/zh_CN.po +57 -3
  35. package/locales/zh_TW.po +57 -3
  36. package/map/index.d.ts.map +1 -1
  37. package/package.json +1 -1
  38. package/upgrade/index.d.ts +1 -0
  39. package/upgrade/index.d.ts.map +1 -1
@@ -5016,6 +5016,14 @@ class C8yComponentOutlet {
5016
5016
  if (this._needToReCreateComponentInstance(changes)) {
5017
5017
  this.__viewContainerRef.clear();
5018
5018
  this._componentRef = undefined;
5019
+ // Destroy the previous environment injector before creating a new one. The dynamically
5020
+ // created standalone component's own environment ("adapter" — holding its imported-module
5021
+ // providers, e.g. ngx-bootstrap's PositioningService with window 'resize'/'scroll'
5022
+ // listeners) is a CHILD of this injector, so ViewContainerRef.clear() alone does not free
5023
+ // it. Without this destroy(), every re-creation (each input change) leaks an environment
5024
+ // injector and everything it holds.
5025
+ this._newEnvInjector?.destroy();
5026
+ this._newEnvInjector = undefined;
5019
5027
  if (this.c8yComponentOutlet) {
5020
5028
  // creating a new injector ensures that the Angular Chrome extension properly shows the element hierarchy
5021
5029
  const injector = Injector.create({
@@ -23102,7 +23110,11 @@ class PluginsService {
23102
23110
  // self scoped plugins need to be added to excluded remotes
23103
23111
  // as they would be otherwise automatically added to remotes
23104
23112
  const selfScopedPlugins = this.getSelfScopedPlugins(pluginsArray, application.contextPath);
23105
- const newExcludedRemotes = this.addPluginToRemotesConfig(appConfigExcludedRemotes, selfScopedPlugins);
23113
+ const manifestPlugins = this.getManifestPlugins(pluginsArray, manifestRemotes);
23114
+ const newExcludedRemotes = this.addPluginToRemotesConfig(appConfigExcludedRemotes, [
23115
+ ...selfScopedPlugins,
23116
+ ...manifestPlugins
23117
+ ]);
23106
23118
  return await this.updateRemotesInAppConfig(application, newRemotes, newExcludedRemotes);
23107
23119
  }
23108
23120
  /**
@@ -23121,6 +23133,7 @@ class PluginsService {
23121
23133
  /**
23122
23134
  * Fetches the application manifest.
23123
23135
  * @param application Application managed object.
23136
+ * @deprecated This method is deprecated and should not be used anymore. It was used to fetch the manifest of an application to read the remotes field from it, which was needed to set the initial state of remotes for applications created before the remotes field was added to the configuration. For new applications.
23124
23137
  * @returns Returns the application manifest.
23125
23138
  */
23126
23139
  async getCumulocityJsonFile(application) {
@@ -23133,6 +23146,8 @@ class PluginsService {
23133
23146
  /**
23134
23147
  * Sets the initial state of remotes in the configuration (when it's missing), based on the list of remotes being in the application manifest.
23135
23148
  * @param application Application managed object.
23149
+ * @deprecated This method is deprecated and should not be used anymore. It was used to set the initial state of remotes for applications that were created before the remotes field was added to the configuration. For new applications,
23150
+ * remotes should be set during the application creation and there should be no need to call this method.
23136
23151
  * @returns Returns a list of remotes that has been assigned to the configuration object.
23137
23152
  */
23138
23153
  async setInitialRemotes(application) {
@@ -23141,7 +23156,7 @@ class PluginsService {
23141
23156
  const manifestRemotes = manifest.remotes;
23142
23157
  return await this.updateRemotesInAppConfig(application, manifestRemotes || {}, {});
23143
23158
  }
23144
- catch (er) {
23159
+ catch {
23145
23160
  return undefined;
23146
23161
  }
23147
23162
  }
@@ -23315,9 +23330,16 @@ class PluginsService {
23315
23330
  return (plugin.scope === PluginsExportScopes.SELF &&
23316
23331
  (!contextPath || plugin.contextPath === contextPath));
23317
23332
  }
23333
+ isManifestPlugin(plugin, remotes) {
23334
+ return (remotes.hasOwnProperty(plugin.contextPath) ||
23335
+ Object.keys(remotes).some(key => key.startsWith(`${plugin.contextPath}@`)));
23336
+ }
23318
23337
  getSelfScopedPlugins(plugins, contextPath) {
23319
23338
  return plugins.filter(plugin => this.isSelfScopedPlugin(plugin, contextPath));
23320
23339
  }
23340
+ getManifestPlugins(plugins, remotes) {
23341
+ return plugins.filter(plugin => this.isManifestPlugin(plugin, remotes));
23342
+ }
23321
23343
  getAllPluginsExceptSelfScoped(plugins, contextPath) {
23322
23344
  return plugins.filter(plugin => !this.isSelfScopedPlugin(plugin, contextPath));
23323
23345
  }
@@ -23397,9 +23419,12 @@ class PluginsService {
23397
23419
  if (!contextPath || !moduleName) {
23398
23420
  return;
23399
23421
  }
23400
- remotesCopy[contextPath]?.length >= 0
23401
- ? remotesCopy[contextPath].push(moduleName)
23402
- : (remotesCopy[contextPath] = []).push(moduleName);
23422
+ if (remotesCopy[contextPath]?.length >= 0) {
23423
+ remotesCopy[contextPath].push(moduleName);
23424
+ }
23425
+ else {
23426
+ remotesCopy[contextPath] = [moduleName];
23427
+ }
23403
23428
  remotesCopy[contextPath] = [...new Set(remotesCopy[contextPath])];
23404
23429
  });
23405
23430
  return remotesCopy;