taon 21.0.16 → 21.0.17

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 (40) hide show
  1. package/browser/fesm2022/taon-browser.mjs +29 -1
  2. package/browser/fesm2022/taon-browser.mjs.map +1 -1
  3. package/browser/package.json +1 -1
  4. package/browser/types/taon-browser.d.ts +9 -0
  5. package/icon-menu-taon.svg +15 -15
  6. package/lib/base-classes/base-angular-service.d.ts +9 -0
  7. package/lib/base-classes/base-angular-service.js +20 -0
  8. package/lib/base-classes/base-angular-service.js.map +1 -1
  9. package/lib/base-classes/base-electron-service.d.ts +0 -0
  10. package/lib/base-classes/base-electron-service.js +50 -0
  11. package/lib/base-classes/base-electron-service.js.map +1 -0
  12. package/lib/build-info._auto-generated_.d.ts +1 -1
  13. package/lib/build-info._auto-generated_.js +1 -1
  14. package/lib/endpoint-context.js +8 -0
  15. package/lib/endpoint-context.js.map +1 -1
  16. package/lib/env/env.angular-node-app.d.ts +2 -1
  17. package/lib/env/env.angular-node-app.js +4 -3
  18. package/lib/env/env.angular-node-app.js.map +1 -1
  19. package/lib/env/env.docs-webapp.d.ts +2 -1
  20. package/lib/env/env.docs-webapp.js +4 -3
  21. package/lib/env/env.docs-webapp.js.map +1 -1
  22. package/lib/env/env.electron-app.d.ts +2 -1
  23. package/lib/env/env.electron-app.js +4 -3
  24. package/lib/env/env.electron-app.js.map +1 -1
  25. package/lib/env/env.mobile-app.d.ts +2 -1
  26. package/lib/env/env.mobile-app.js +4 -3
  27. package/lib/env/env.mobile-app.js.map +1 -1
  28. package/lib/env/env.npm-lib-and-cli-tool.d.ts +2 -1
  29. package/lib/env/env.npm-lib-and-cli-tool.js +4 -3
  30. package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
  31. package/lib/env/env.vscode-plugin.d.ts +2 -1
  32. package/lib/env/env.vscode-plugin.js +4 -3
  33. package/lib/env/env.vscode-plugin.js.map +1 -1
  34. package/lib/ui/index.js +2 -2
  35. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  36. package/package.json +1 -1
  37. package/websql/fesm2022/taon-websql.mjs +29 -1
  38. package/websql/fesm2022/taon-websql.mjs.map +1 -1
  39. package/websql/package.json +1 -1
  40. package/websql/types/taon-websql.d.ts +9 -0
@@ -7,12 +7,13 @@ import { walk } from 'lodash-walk-object/browser';
7
7
  import { RestResponseWrapper, Models as Models$1, Resource, RestHeaders, Mapping, HttpResponseError } from 'ng2-rest/browser';
8
8
  import { Observable, from, Subject } from 'rxjs';
9
9
  import * as i0 from '@angular/core';
10
- import { InjectionToken, inject as inject$1, Injectable, ViewContainerRef, ViewChild, Component } from '@angular/core';
10
+ import { InjectionToken, inject as inject$1, PLATFORM_ID, Injectable, ViewContainerRef, ViewChild, Component } from '@angular/core';
11
11
  import { Table, OrignalClassKey, Column } from 'taon-typeorm/browser';
12
12
  export { AfterInsert, AfterLoad, AfterRecover, AfterRemove, AfterSoftRemove, AfterUpdate, BeforeInsert, BeforeRecover, BeforeRemove, BeforeSoftRemove, BeforeUpdate, Column, Connection, CreateDateColumn, Column as CustomColumn, DeleteDateColumn, Generated, Generated as GeneratedColumn, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, Repository, TreeChildren, TreeParent, UpdateDateColumn, VersionColumn, VirtualColumn } from 'taon-typeorm/browser';
13
13
  import { SYMBOL, CLASS } from 'typescript-class-helpers/browser';
14
14
  import * as JSON5 from 'json5';
15
15
  import { io } from 'socket.io-client';
16
+ import { isPlatformServer, isPlatformBrowser } from '@angular/common';
16
17
  import { __decorate, __metadata, __param } from 'tslib';
17
18
  import * as i1 from '@ngx-formly/core';
18
19
  import { FieldWrapper, FieldArrayType } from '@ngx-formly/core';
@@ -3033,6 +3034,14 @@ class EndpointContext {
3033
3034
  //#region prepare realtime
3034
3035
  if (!this.config.abstract) {
3035
3036
  this.disabledRealtime = this.config.disabledRealtime;
3037
+ if (!this.host) {
3038
+ throw `
3039
+
3040
+ host is required for context initialization..
3041
+ (Or maybe you forgot mark ${this.config.contextName} context as abstract?)
3042
+
3043
+ `;
3044
+ }
3036
3045
  /* */
3037
3046
  /* */
3038
3047
  /* */
@@ -5722,6 +5731,7 @@ class TaonBaseAngularService {
5722
5731
  //#endregion
5723
5732
  constructor() {
5724
5733
  //#region @browser
5734
+ this.platformId = inject$1(PLATFORM_ID);
5725
5735
  this.currentContext = inject$1(TAON_CONTEXT);
5726
5736
  //#region @browser
5727
5737
  this.CURRENT_HOST_BACKEND_PORT = inject$1(CURRENT_HOST_BACKEND_PORT, {
@@ -5732,6 +5742,24 @@ class TaonBaseAngularService {
5732
5742
  });
5733
5743
  // #endregion
5734
5744
  }
5745
+ /**
5746
+ * Returns true if the application is running in SSR (server-side rendering) mode only.
5747
+ */
5748
+ get isSsrPlatform() {
5749
+ //#region @browser
5750
+ return isPlatformServer(this.platformId);
5751
+ //#endregion
5752
+ return false;
5753
+ }
5754
+ /**
5755
+ * Returns true if the application is running in browser-only mode.
5756
+ */
5757
+ get isBrowserPlatform() {
5758
+ //#region @browser
5759
+ return isPlatformBrowser(this.platformId);
5760
+ //#endregion
5761
+ return false;
5762
+ }
5735
5763
  /**
5736
5764
  * @deprecated
5737
5765
  * Returns the host URL for the backend service