taon 21.0.77 → 21.0.82

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 (62) hide show
  1. package/VERIFIED-BUILD-DATA.jsonc +5 -0
  2. package/bin/start.js +2 -3
  3. package/browser/fesm2022/taon-browser.mjs +169 -52
  4. package/browser/fesm2022/taon-browser.mjs.map +1 -1
  5. package/browser/package.json +1 -1
  6. package/browser/types/taon-browser.d.ts +37 -18
  7. package/browser-prod/fesm2022/taon-browser-prod.mjs +169 -52
  8. package/browser-prod/fesm2022/taon-browser-prod.mjs.map +1 -1
  9. package/browser-prod/package.json +1 -1
  10. package/browser-prod/types/taon-browser-prod.d.ts +37 -18
  11. package/cli.d.ts +2 -2
  12. package/cli.js +4 -4
  13. package/cli.js.map +1 -1
  14. package/icon-menu-taon.svg +15 -15
  15. package/lib/build-info._auto-generated_.d.ts +1 -1
  16. package/lib/build-info._auto-generated_.js +1 -1
  17. package/lib/create-context.js +4 -1
  18. package/lib/create-context.js.map +1 -1
  19. package/lib/endpoint-context.js +9 -3
  20. package/lib/endpoint-context.js.map +1 -1
  21. package/lib/global-state/taon-global-state/taon-global-state.entity.d.ts +1 -1
  22. package/lib/global-state/taon-global-state/taon-global-state.entity.js +2 -2
  23. package/lib/global-state/taon-global-state/taon-global-state.entity.js.map +1 -1
  24. package/lib/package.json +1 -1
  25. package/lib/start-cli.d.ts +7 -0
  26. package/lib/start-cli.js +46 -0
  27. package/lib/start-cli.js.map +1 -0
  28. package/lib/ui/index.js +2 -2
  29. package/lib/ui/taon-admin-mode-configuration/breakpoints.service.d.ts +8 -0
  30. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  31. package/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +33 -14
  32. package/lib-prod/base-classes/base-controller.js.map +1 -1
  33. package/lib-prod/build-info._auto-generated_.d.ts +1 -1
  34. package/lib-prod/build-info._auto-generated_.js +1 -1
  35. package/lib-prod/create-context.js +4 -1
  36. package/lib-prod/create-context.js.map +1 -1
  37. package/lib-prod/endpoint-context.js +10 -4
  38. package/lib-prod/endpoint-context.js.map +1 -1
  39. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.d.ts +1 -1
  40. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +2 -2
  41. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js.map +1 -1
  42. package/lib-prod/index.js.map +1 -1
  43. package/lib-prod/package.json +1 -1
  44. package/lib-prod/realtime/realtime-client.js.map +1 -1
  45. package/lib-prod/realtime/realtime-core.js.map +1 -1
  46. package/lib-prod/realtime/realtime-server.js.map +1 -1
  47. package/lib-prod/start-cli.d.ts +7 -0
  48. package/lib-prod/start-cli.js +43 -0
  49. package/lib-prod/start-cli.js.map +1 -0
  50. package/lib-prod/ui/index.d.ts +1 -1
  51. package/lib-prod/ui/index.js +1 -1
  52. package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +1 -1
  53. package/lib-prod/ui/taon-admin-mode-configuration/index.js +1 -1
  54. package/package.json +1 -1
  55. package/websql/fesm2022/taon-websql.mjs +190 -74
  56. package/websql/fesm2022/taon-websql.mjs.map +1 -1
  57. package/websql/package.json +1 -1
  58. package/websql/types/taon-websql.d.ts +37 -18
  59. package/websql-prod/fesm2022/taon-websql-prod.mjs +191 -75
  60. package/websql-prod/fesm2022/taon-websql-prod.mjs.map +1 -1
  61. package/websql-prod/package.json +1 -1
  62. package/websql-prod/types/taon-websql-prod.d.ts +37 -18
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taon/browser",
3
- "version": "21.0.77",
3
+ "version": "21.0.82",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.0.0",
6
6
  "@angular/core": "^21.0.0"
@@ -9,10 +9,9 @@ import { DataSource, Repository, SaveOptions, DeepPartial, QueryDeepPartialEntit
9
9
  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';
10
10
  import { CoreModels } from 'tnp-core/browser';
11
11
  import { MySqlQuerySource } from 'taon-type-sql/browser';
12
- import * as rxjs from 'rxjs';
13
12
  import { Observable, Subscriber } from 'rxjs';
14
13
  import * as i0 from '@angular/core';
15
- import { InjectionToken, ViewContainerRef } from '@angular/core';
14
+ import { InjectionToken, ViewContainerRef, WritableSignal, TemplateRef } from '@angular/core';
16
15
  import { AxiosResponse } from 'axios';
17
16
  import * as _ngx_formly_core from '@ngx-formly/core';
18
17
  import { FieldWrapper, FieldArrayType, FormlyFormBuilder, FormlyFieldConfig } from '@ngx-formly/core';
@@ -20,6 +19,7 @@ import * as Electron from 'electron';
20
19
  import { ipcRenderer } from 'electron';
21
20
  import { ServerOptions, Server as Server$1, DefaultEventsMap } from 'socket.io';
22
21
  import { io, Socket } from 'socket.io-client';
22
+ import { StorSignal } from 'taon-storage/browser';
23
23
  import * as multer from 'multer';
24
24
 
25
25
  declare abstract class TaonBaseCustomRepository extends TaonBaseInjector {
@@ -1973,26 +1973,45 @@ declare function Cookie(name: string, expireInSecond?: number): (target: any, pr
1973
1973
  declare function Header(name?: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
1974
1974
  declare function Body(name?: string): (target: any, propertyKey: string | symbol, parameterIndex: number) => void;
1975
1975
 
1976
- declare class TaonAdminService {
1976
+ declare enum TaonAdminPanelMode {
1977
+ NONE = "NONE",
1978
+ ICON = "ICON",
1979
+ POPUP = "POPUP",
1980
+ SIDE = "SIDE",
1981
+ FULL_SCREEN = "FULL_SCREEN"
1982
+ }
1983
+ interface TaonAdminTab {
1984
+ name: string;
1985
+ templateOrIframeLink?: string | TemplateRef<any>;
1986
+ }
1987
+ declare class TaonAdmin {
1977
1988
  private static _instance;
1978
- static get Instance(): TaonAdminService;
1979
- scrollableEnabled: boolean;
1980
- private onEditMode;
1981
- onEditMode$: rxjs.Observable<unknown>;
1982
- adminPanelIsOpen: boolean;
1983
- draggablePopupMode: boolean;
1984
- draggablePopupModeFullScreen: boolean;
1989
+ static init(): void;
1990
+ static get Instance(): TaonAdmin;
1991
+ private constructor();
1992
+ additionalTabs: WritableSignal<TaonAdminTab[]>;
1993
+ adminPanelMode: StorSignal<TaonAdminPanelMode>;
1985
1994
  /**
1986
1995
  * Property used in taon
1987
1996
  */
1988
- keepWebsqlDbDataAfterReload: boolean;
1997
+ keepWebsqlDbDataAfterReload: StorSignal<boolean>;
1998
+ }
1999
+ declare class TaonAdminService {
2000
+ readonly isIframe: boolean;
2001
+ private breakpointsService;
1989
2002
  constructor();
1990
- setEditMode(value: boolean): void;
1991
- setKeepWebsqlDbDataAfterReload(value: boolean): void;
1992
- enabledTabs: any[];
1993
- hide(): void;
2003
+ isDesktop: WritableSignal<boolean>;
2004
+ get adminPanelMode(): StorSignal<TaonAdminPanelMode>;
2005
+ get keepWebsqlDbDataAfterReload(): StorSignal<boolean>;
2006
+ get additionalTabs(): WritableSignal<TaonAdminTab[]>;
2007
+ admin(): void;
1994
2008
  show(): void;
1995
- logout(): void;
2009
+ hide(): void;
2010
+ private devTapCount;
2011
+ private devTapTimeout;
2012
+ enableDeveloperIf5Timetap(): void;
2013
+ static ɵfac: i0.ɵɵFactoryDeclaration<TaonAdminService, never>;
2014
+ static ɵprov: i0.ɵɵInjectableDeclaration<TaonAdminService>;
1996
2015
  }
1997
2016
 
1998
2017
  declare namespace Taon {
@@ -2169,5 +2188,5 @@ declare const TAON_FLATTEN_MAPPING: {
2169
2188
  };
2170
2189
  };
2171
2190
 
2172
- export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeModels, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, StringColumn, Symbols, TAON_CONTEXT, TAON_FLATTEN_MAPPING, Taon, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Validators, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
2173
- export type { AbstractEntityOmitKeys, FormlyArrayTransformFn, FormlyEntityType, FormlyInputType, MigrationStatus, MulterFileUploadResponse, TaonAdditionalMiddlewareMethodInfo, TaonContext, TaonEntityKeysToOmit, TaonHttpDecoratorOptions, TaonMiddlewareFunction, TaonMiddlewareInheritanceObj };
2191
+ export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeModels, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, StringColumn, Symbols, TAON_CONTEXT, TAON_FLATTEN_MAPPING, Taon, TaonAdmin, TaonAdminPanelMode, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Validators, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
2192
+ export type { AbstractEntityOmitKeys, FormlyArrayTransformFn, FormlyEntityType, FormlyInputType, MigrationStatus, MulterFileUploadResponse, TaonAdditionalMiddlewareMethodInfo, TaonAdminTab, TaonContext, TaonEntityKeysToOmit, TaonHttpDecoratorOptions, TaonMiddlewareFunction, TaonMiddlewareInheritanceObj };
@@ -6,15 +6,17 @@ import { walk } from 'lodash-walk-object/browser-prod';
6
6
  import { RestResponseWrapper, Resource__NS__globalInterceptors, Resource__NS__methodsInterceptors, HttpResponse, RestHeaders, Resource__NS__create, decodeMappingForHeaderJson, Resource__NS__Cookies, DefaultMapping, DefaultModel, HttpResponseError } from 'ng2-rest/browser-prod';
7
7
  import { Observable, from, Subject } from 'rxjs';
8
8
  import * as i0 from '@angular/core';
9
- import { InjectionToken, inject as inject$1, PLATFORM_ID, Injectable, ViewContainerRef, ViewChild, Component } from '@angular/core';
9
+ import { InjectionToken, Injectable, signal, inject as inject$1, PLATFORM_ID, ViewContainerRef, ViewChild, Component } from '@angular/core';
10
10
  import { Table, Column } from 'taon-typeorm/browser-prod';
11
11
  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-prod';
12
12
  import { CLASS__NS__getName, CLASS__NS__setName, CLASS__NS__getBy } from 'typescript-class-helpers/browser-prod';
13
13
  import * as JSON5 from 'json5';
14
14
  import { io } from 'socket.io-client';
15
+ import { TaonStor__NS__inLocalstorage } from 'taon-storage/browser-prod';
16
+ import * as i1 from '@angular/cdk/layout';
15
17
  import { isPlatformServer, isPlatformBrowser } from '@angular/common';
16
18
  import { __decorate, __param, __metadata } from 'tslib';
17
- import * as i1 from '@ngx-formly/core';
19
+ import * as i1$1 from '@ngx-formly/core';
18
20
  import { FieldWrapper, FieldArrayType } from '@ngx-formly/core';
19
21
 
20
22
  const TaonEntityKeysToOmitArr = [
@@ -3188,6 +3190,8 @@ class EndpointContext {
3188
3190
  /* */
3189
3191
  /* */
3190
3192
  /* */
3193
+ /* */
3194
+ /* */
3191
3195
  return (void 0);
3192
3196
  }
3193
3197
  //#endregion
@@ -3483,6 +3487,11 @@ class EndpointContext {
3483
3487
  /* */
3484
3488
  /* */
3485
3489
  /* */
3490
+ /* */
3491
+ /* */
3492
+ /* */
3493
+ /* */
3494
+ /* */
3486
3495
  for (const classTypeName of [
3487
3496
  Models__NS__ClassType.MIDDLEWARE,
3488
3497
  Models__NS__ClassType.PROVIDER,
@@ -5091,52 +5100,6 @@ instead
5091
5100
  }
5092
5101
  }
5093
5102
 
5094
- //#region import
5095
- //#endregion
5096
- const ENV = globalThis['ENV'];
5097
- // @Injectable({ providedIn: 'root' }) TODO make it angular service
5098
- class TaonAdminService {
5099
- static get Instance() {
5100
- if (!this._instance) {
5101
- this._instance = new TaonAdminService();
5102
- }
5103
- return this._instance;
5104
- }
5105
- //#endregion
5106
- //#endregion
5107
- //#region constructor
5108
- constructor() {
5109
- //#endregion
5110
- //#region fields & getters
5111
- this.scrollableEnabled = false; // TOOD false by default
5112
- this.onEditMode = new Subject();
5113
- this.onEditMode$ = this.onEditMode.asObservable();
5114
- this.enabledTabs = [];
5115
- TaonAdminService._instance = this;
5116
- this.scrollableEnabled = !!ENV?.useGlobalNgxScrollbar;
5117
- }
5118
- //#endregion
5119
- //#region methods
5120
- setEditMode(value) {
5121
- this.onEditMode.next(value);
5122
- }
5123
- setKeepWebsqlDbDataAfterReload(value) {
5124
- // if (value && !this.keepWebsqlDbDataAfterReload) {
5125
- // this.firstTimeKeepWebsqlDbDataTrue = true;
5126
- // }
5127
- this.keepWebsqlDbDataAfterReload = value;
5128
- }
5129
- hide() {
5130
- this.draggablePopupMode = false;
5131
- this.adminPanelIsOpen = false;
5132
- }
5133
- show() {
5134
- this.draggablePopupMode = false;
5135
- this.adminPanelIsOpen = true;
5136
- }
5137
- logout() { }
5138
- }
5139
-
5140
5103
  class ContextsEndpointStorage {
5141
5104
  constructor() {
5142
5105
  this.SPECIAL_APP_READY_MESSAGE = CoreModels__NS__SPECIAL_APP_READY_MESSAGE;
@@ -5168,6 +5131,159 @@ class ContextsEndpointStorage {
5168
5131
  // TODO QUICK_FIX @LAST encapsulate this => move to separate package
5169
5132
  globalThis['$$$ContextsEndpointStorage$$$'] = ContextsEndpointStorage.Instance;
5170
5133
 
5134
+ //#region imports
5135
+ //#endregion
5136
+ const BRK = {
5137
+ mobile: '(max-width: 599.98px)',
5138
+ // tablet: obsvious
5139
+ desktop: '(min-width: 840.00px)',
5140
+ };
5141
+ class BreakpointsService {
5142
+ listenTo() {
5143
+ setTimeout(() => {
5144
+ this.sub.next(this.current);
5145
+ });
5146
+ return this.sub.asObservable();
5147
+ }
5148
+ constructor(breakpointObserver) {
5149
+ this.sub = new Subject();
5150
+ breakpointObserver.observe([BRK.mobile, BRK.desktop]).subscribe(state => {
5151
+ if (!___NS__isUndefined([BRK.mobile].find(f => state.breakpoints[f]))) {
5152
+ this.current = 'mobile';
5153
+ this.sub.next('mobile');
5154
+ }
5155
+ else if (!___NS__isUndefined([BRK.desktop].find(f => state.breakpoints[f]))) {
5156
+ this.current = 'desktop';
5157
+ this.sub.next('desktop');
5158
+ }
5159
+ else {
5160
+ this.current = 'tablet';
5161
+ this.sub.next('tablet');
5162
+ }
5163
+ });
5164
+ setTimeout(() => {
5165
+ if (breakpointObserver.isMatched([BRK.mobile])) {
5166
+ this.current = 'mobile';
5167
+ this.sub.next('mobile');
5168
+ }
5169
+ else if (breakpointObserver.isMatched([BRK.desktop])) {
5170
+ this.current = 'desktop';
5171
+ this.sub.next('desktop');
5172
+ }
5173
+ else {
5174
+ this.current = 'tablet';
5175
+ this.sub.next('tablet');
5176
+ }
5177
+ });
5178
+ }
5179
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: BreakpointsService, deps: [{ token: i1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable }); }
5180
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: BreakpointsService, providedIn: 'root' }); }
5181
+ }
5182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: BreakpointsService, decorators: [{
5183
+ type: Injectable,
5184
+ args: [{ providedIn: 'root' }]
5185
+ }], ctorParameters: () => [{ type: i1.BreakpointObserver }] });
5186
+
5187
+ //#region import
5188
+ //#endregion
5189
+ var TaonAdminPanelMode;
5190
+ (function (TaonAdminPanelMode) {
5191
+ TaonAdminPanelMode["NONE"] = "NONE";
5192
+ TaonAdminPanelMode["ICON"] = "ICON";
5193
+ TaonAdminPanelMode["POPUP"] = "POPUP";
5194
+ TaonAdminPanelMode["SIDE"] = "SIDE";
5195
+ TaonAdminPanelMode["FULL_SCREEN"] = "FULL_SCREEN";
5196
+ })(TaonAdminPanelMode || (TaonAdminPanelMode = {}));
5197
+ class TaonAdmin {
5198
+ static init() {
5199
+ TaonAdmin.Instance;
5200
+ }
5201
+ static get Instance() {
5202
+ if (!this._instance) {
5203
+ this._instance = new TaonAdmin();
5204
+ }
5205
+ return this._instance;
5206
+ }
5207
+ constructor() {
5208
+ this.additionalTabs = signal([], ...(ngDevMode ? [{ debugName: "additionalTabs" }] : []));
5209
+ //#region fields & getters / admin panel mode
5210
+ this.adminPanelMode = TaonStor__NS__inLocalstorage({
5211
+ defaultValue: TaonAdminPanelMode.NONE,
5212
+ keyOrPath: 'adminPanelMode',
5213
+ }, TaonAdminService);
5214
+ //#endregion
5215
+ //#region fields & getters / keep websql database data after reload
5216
+ /**
5217
+ * Property used in taon
5218
+ */
5219
+ this.keepWebsqlDbDataAfterReload = TaonStor__NS__inLocalstorage({
5220
+ defaultValue: false,
5221
+ keyOrPath: 'keepWebsqlDbDataAfterReload',
5222
+ }, TaonAdminService);
5223
+ // console.log('TAON ADMIN INSTANCE CREATED');
5224
+ }
5225
+ }
5226
+ //#region @browser
5227
+ //#endregion
5228
+ class TaonAdminService {
5229
+ constructor() {
5230
+ //#region singleton + constructor
5231
+ this.isIframe = window.location !== window.parent.location;
5232
+ this.breakpointsService = inject$1(BreakpointsService);
5233
+ //#endregion
5234
+ this.isDesktop = signal(true, ...(ngDevMode ? [{ debugName: "isDesktop" }] : []));
5235
+ this.devTapCount = 0;
5236
+ window['Taon'] = this;
5237
+ window['taon'] = this;
5238
+ this.breakpointsService.listenTo().subscribe(breakpoint => {
5239
+ // console.log({ breakpoint });
5240
+ this.isDesktop.set(breakpoint === 'desktop');
5241
+ if (this.isDesktop()) {
5242
+ //
5243
+ }
5244
+ else {
5245
+ this.adminPanelMode.set(TaonAdminPanelMode.NONE);
5246
+ }
5247
+ });
5248
+ }
5249
+ get adminPanelMode() {
5250
+ return TaonAdmin.Instance.adminPanelMode;
5251
+ }
5252
+ get keepWebsqlDbDataAfterReload() {
5253
+ return TaonAdmin.Instance.keepWebsqlDbDataAfterReload;
5254
+ }
5255
+ get additionalTabs() {
5256
+ return TaonAdmin.Instance.additionalTabs;
5257
+ }
5258
+ admin() {
5259
+ this.adminPanelMode.set(TaonAdminPanelMode.FULL_SCREEN);
5260
+ }
5261
+ show() {
5262
+ this.adminPanelMode.set(TaonAdminPanelMode.POPUP);
5263
+ }
5264
+ hide() {
5265
+ this.adminPanelMode.set(TaonAdminPanelMode.NONE);
5266
+ }
5267
+ enableDeveloperIf5Timetap() {
5268
+ this.devTapCount++;
5269
+ // reset timer every tap
5270
+ clearTimeout(this.devTapTimeout);
5271
+ this.devTapTimeout = setTimeout(() => {
5272
+ this.devTapCount = 0;
5273
+ }, 2000); // 2s window to complete taps
5274
+ if (this.devTapCount >= 5) {
5275
+ this.devTapCount = 0;
5276
+ this.show();
5277
+ }
5278
+ }
5279
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonAdminService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5280
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonAdminService, providedIn: 'root' }); }
5281
+ }
5282
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: TaonAdminService, decorators: [{
5283
+ type: Injectable,
5284
+ args: [{ providedIn: 'root' }]
5285
+ }], ctorParameters: () => [] });
5286
+
5171
5287
  //#region imports
5172
5288
  //#endregion
5173
5289
  /**
@@ -5305,7 +5421,8 @@ const createContextFn = (configFn, cloneOptions) => {
5305
5421
  //#region @browser
5306
5422
  let keepWebsqlDbDataAfterReload = false;
5307
5423
  keepWebsqlDbDataAfterReload =
5308
- TaonAdminService.Instance?.keepWebsqlDbDataAfterReload;
5424
+ TaonAdmin.Instance?.keepWebsqlDbDataAfterReload();
5425
+ // console.log({ keepWebsqlDbDataAfterReload });
5309
5426
  if (keepWebsqlDbDataAfterReload) {
5310
5427
  !UtilsOs__NS__isRunningInCliMode() &&
5311
5428
  Helpers__NS__info(`[taon] Keeping websql data after reload ` +
@@ -7851,7 +7968,7 @@ class RepeatTypeComponent extends FieldArrayType {
7851
7968
  // @ts-ignore
7852
7969
  super(builder);
7853
7970
  }
7854
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: RepeatTypeComponent, deps: [{ token: i1.FormlyFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
7971
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.9", ngImport: i0, type: RepeatTypeComponent, deps: [{ token: i1$1.FormlyFormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
7855
7972
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.9", type: RepeatTypeComponent, isStandalone: false, selector: "formly-repeat-section", usesInheritance: true, ngImport: i0, template: `
7856
7973
  <div *ngIf="field.fieldGroup && field.fieldGroup.length === 0">
7857
7974
  Press button to add new element...
@@ -7917,7 +8034,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.9", ngImpor
7917
8034
  </button>
7918
8035
  </div>
7919
8036
  `, styles: [":host{display:block;padding:5px;margin-bottom:5px;border:1px solid gray}formly-group{display:block;border:1px dashed gray;margin-bottom:5px;padding:5px}.taon-formly-array{padding:5px;background:#fff}\n"] }]
7920
- }], ctorParameters: () => [{ type: i1.FormlyFormBuilder }] });
8037
+ }], ctorParameters: () => [{ type: i1$1.FormlyFormBuilder }] });
7921
8038
 
7922
8039
  function findTypeForEntity(entity, isArray = false) {
7923
8040
  if (!___NS__isArray(RegisterComponentType.prototype.types)) {
@@ -8436,5 +8553,5 @@ const TAON_FLATTEN_MAPPING = {
8436
8553
  * Generated bundle index. Do not edit.
8437
8554
  */
8438
8555
 
8439
- export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers__NS__asyncHandler, ClassHelpers__NS__ensureClassConfig, ClassHelpers__NS__ensureMethodConfig, ClassHelpers__NS__getClassConfig, ClassHelpers__NS__getClassFnFromObject, ClassHelpers__NS__getControllerConfigs, ClassHelpers__NS__getFullInternalName, ClassHelpers__NS__getMethodsNames, ClassHelpers__NS__getName, ClassHelpers__NS__getOrginalClass, ClassHelpers__NS__getUniqueKey, ClassHelpers__NS__hasParentClassWithName, ClassHelpers__NS__isContextClassObject, ClassHelpers__NS__setName, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models__NS__ClassType, Models__NS__ClassTypeKey, Models__NS__DatabaseConfig, Models__NS__DatabaseConfigTypeOrm, Models__NS__DatabasesFolder, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, StringColumn, Symbols__NS__REALTIME, Symbols__NS__classMethodsNames, Symbols__NS__ctxInClassOrClassObj, Symbols__NS__fullClassNameStaticProperty, Symbols__NS__metadata, Symbols__NS__old, Symbols__NS__orignalClassClonesObj, TAON_CONTEXT, TAON_FLATTEN_MAPPING, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers__NS__defaultType, TaonHelpers__NS__fillUpTo, TaonHelpers__NS__firstStringOrElemFromArray, TaonHelpers__NS__getExpressPath, TaonHelpers__NS__ipcKeyNameRequest, TaonHelpers__NS__ipcKeyNameResponse, TaonHelpers__NS__isGoodPath, TaonHelpers__NS__isPlainFileOrFolder, TaonHelpers__NS__parseJSONwithStringJSONs, TaonHelpers__NS__tryTransformParam, TaonHelpers__NS__websqlMocks, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Taon__NS__createContext, Taon__NS__createContextTemplate, Taon__NS__error, Taon__NS__getResponseValue, Taon__NS__init, Taon__NS__inject, Taon__NS__isBrowser, Taon__NS__isElectron, Taon__NS__isNode, Taon__NS__isWebSQL, Taon__NS__removeLoader, Validators__NS__checkIfMethodsWithReponseTYpeAlowed, Validators__NS__classNameVlidation, Validators__NS__preventUndefinedModel, Validators__NS__validateClassFunctions, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
8556
+ export { BaseTaonClassesNames, Body, BooleanColumn, CURRENT_HOST_BACKEND_PORT, CURRENT_HOST_URL, ClassHelpers__NS__asyncHandler, ClassHelpers__NS__ensureClassConfig, ClassHelpers__NS__ensureMethodConfig, ClassHelpers__NS__getClassConfig, ClassHelpers__NS__getClassFnFromObject, ClassHelpers__NS__getControllerConfigs, ClassHelpers__NS__getFullInternalName, ClassHelpers__NS__getMethodsNames, ClassHelpers__NS__getName, ClassHelpers__NS__getOrginalClass, ClassHelpers__NS__getUniqueKey, ClassHelpers__NS__hasParentClassWithName, ClassHelpers__NS__isContextClassObject, ClassHelpers__NS__setName, ContextDbMigrations, ContextsEndpointStorage, ControllerConfig, Cookie, DELETE, DITaonContainer, DateTimeColumn, DecimalNumberColumn, DecoratorAbstractOpt, EndpointContext, EntityProcess, FormlyHorizontalWrapper, GET, HEAD, HTML, Header, MethodConfig, MockNamespaceIpc, MockServerIpc, MockSocketIpc, Models__NS__ClassType, Models__NS__ClassTypeKey, Models__NS__DatabaseConfig, Models__NS__DatabaseConfigTypeOrm, Models__NS__DatabasesFolder, NumberColumn, PATCH, POST, PUT, ParamConfig, Path, Query, RealtimeClient, RealtimeCore, RealtimeServer, RealtimeStrategy, RealtimeStrategyIpc, RealtimeStrategyMock, RealtimeStrategySocketIO, RealtimeSubsManager, RegisterComponentType, RegisterComponentTypeForEntity, RepeatTypeComponent, SimpleJsonColumn, String100Column, String200Column, String20Column, String45Column, String500Column, StringColumn, Symbols__NS__REALTIME, Symbols__NS__classMethodsNames, Symbols__NS__ctxInClassOrClassObj, Symbols__NS__fullClassNameStaticProperty, Symbols__NS__metadata, Symbols__NS__old, Symbols__NS__orignalClassClonesObj, TAON_CONTEXT, TAON_FLATTEN_MAPPING, TaonAdmin, TaonAdminPanelMode, TaonAdminService, TaonBaseAbstractEntity, TaonBaseAngularService, TaonBaseClass, TaonBaseContext, TaonBaseController, TaonBaseCrudController, TaonBaseCustomRepository, TaonBaseEntity, TaonBaseFileUploadMiddleware, TaonBaseInjector, TaonBaseMiddleware, TaonBaseMigration, TaonBaseProvider, TaonBaseRepository, TaonBaseSubscriberForEntity, TaonController, TaonControllerOptions, TaonEntity, TaonEntityKeysToOmitArr, TaonEntityOptions, TaonHelpers__NS__defaultType, TaonHelpers__NS__fillUpTo, TaonHelpers__NS__firstStringOrElemFromArray, TaonHelpers__NS__getExpressPath, TaonHelpers__NS__ipcKeyNameRequest, TaonHelpers__NS__ipcKeyNameResponse, TaonHelpers__NS__isGoodPath, TaonHelpers__NS__isPlainFileOrFolder, TaonHelpers__NS__parseJSONwithStringJSONs, TaonHelpers__NS__tryTransformParam, TaonHelpers__NS__websqlMocks, TaonMiddleware, TaonMiddlewareOptions, TaonMigration, TaonMigrationOptions, TaonProvider, TaonProviderOptions, TaonRepository, TaonRepositoryOptions, TaonRestResponseWrapper, TaonSubscriber, TaonSubscriberOptions, TaonTempDatabasesFolder, TaonTempRoutesFolder, Taon__NS__createContext, Taon__NS__createContextTemplate, Taon__NS__error, Taon__NS__getResponseValue, Taon__NS__init, Taon__NS__inject, Taon__NS__isBrowser, Taon__NS__isElectron, Taon__NS__isNode, Taon__NS__isWebSQL, Taon__NS__removeLoader, Validators__NS__checkIfMethodsWithReponseTYpeAlowed, Validators__NS__classNameVlidation, Validators__NS__preventUndefinedModel, Validators__NS__validateClassFunctions, apiPrefix, cloneObj, controllerConfigFrom, createContext, createContextTemplate, findTypeForEntity, getFromlyConfigFor, getRegisteredComponents, getResponseValue, getTransformFunction, inject, singleTransform, typeFromEntity, typeFromName };
8440
8557
  //# sourceMappingURL=taon-browser-prod.mjs.map