taon 18.0.19 → 18.0.21
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/README.md +114 -118
- package/assets/shared/logo-header-admin-mode.png +0 -0
- package/assets/shared/shared_folder_info.txt +1 -1
- package/bin/start.js +279 -279
- package/bin/taon +6 -6
- package/bin/taon-debug +5 -5
- package/bin/taon-debug-brk +5 -5
- package/browser/README.md +24 -24
- package/browser/esm2022/lib/base-classes/base-abstract-entity.mjs +1 -1
- package/browser/esm2022/lib/base-classes/base-class.mjs +2 -2
- package/browser/esm2022/lib/base-classes/base-controller.mjs +3 -2
- package/browser/esm2022/lib/base-classes/base-crud-controller.mjs +1 -1
- package/browser/esm2022/lib/base-classes/base-migration.mjs +23 -0
- package/browser/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +20 -20
- package/browser/esm2022/lib/base-classes/base.mjs +5 -3
- package/browser/esm2022/lib/context-db-migrations.mjs +410 -0
- package/browser/esm2022/lib/create-context.mjs +22 -8
- package/browser/esm2022/lib/decorators/classes/controller-decorator.mjs +4 -1
- package/browser/esm2022/lib/decorators/classes/entity-decorator.mjs +4 -1
- package/browser/esm2022/lib/decorators/classes/migration-decorator.mjs +18 -0
- package/browser/esm2022/lib/decorators/classes/provider-decorator.mjs +4 -1
- package/browser/esm2022/lib/decorators/classes/repository-decorator.mjs +4 -1
- package/browser/esm2022/lib/decorators/classes/subscriber-decorator.mjs +5 -2
- package/browser/esm2022/lib/decorators/http/http-methods-decorators.mjs +1 -1
- package/browser/esm2022/lib/endpoint-context.mjs +105 -59
- package/browser/esm2022/lib/entity-process.mjs +1 -10
- package/browser/esm2022/lib/get-response-value.mjs +1 -15
- package/browser/esm2022/lib/index.mjs +4 -1
- package/browser/esm2022/lib/inject.mjs +1 -1
- package/browser/esm2022/lib/models.mjs +30 -1
- package/browser/esm2022/lib/symbols.mjs +2 -1
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/index.mjs +1 -3
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +55 -37
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +17 -21
- package/browser/esm2022/lib/ui/taon-notifications/taon-notifications.module.mjs +1 -1
- package/browser/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.component.mjs +1 -1
- package/browser/esm2022/lib/ui/taon-table/taon-table.component.mjs +1 -2
- package/browser/fesm2022/taon.mjs +701 -449
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-abstract-entity.d.ts +2 -1
- package/browser/lib/base-classes/base-class.d.ts +1 -1
- package/browser/lib/base-classes/base-context.d.ts +3 -0
- package/browser/lib/base-classes/base-controller.d.ts +2 -1
- package/browser/lib/base-classes/base-crud-controller.d.ts +1 -1
- package/browser/lib/base-classes/base-migration.d.ts +12 -0
- package/browser/lib/base-classes/base.d.ts +8 -2
- package/browser/lib/context-db-migrations.d.ts +17 -0
- package/browser/lib/create-context.d.ts +7 -4
- package/browser/lib/decorators/classes/controller-decorator.d.ts +3 -0
- package/browser/lib/decorators/classes/entity-decorator.d.ts +3 -0
- package/browser/lib/decorators/classes/migration-decorator.d.ts +8 -0
- package/browser/lib/decorators/classes/provider-decorator.d.ts +3 -0
- package/browser/lib/decorators/classes/repository-decorator.d.ts +3 -0
- package/browser/lib/decorators/classes/subscriber-decorator.d.ts +3 -0
- package/browser/lib/decorators/http/http-methods-decorators.d.ts +9 -0
- package/browser/lib/endpoint-context.d.ts +14 -7
- package/browser/lib/index.d.ts +14 -1
- package/browser/lib/models.d.ts +45 -22
- package/browser/lib/symbols.d.ts +1 -0
- package/browser/lib/ui/taon-admin-mode-configuration/index.d.ts +1 -3
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +5 -8
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +8 -8
- package/client/README.md +24 -24
- package/client/esm2022/lib/base-classes/base-abstract-entity.mjs +1 -1
- package/client/esm2022/lib/base-classes/base-class.mjs +2 -2
- package/client/esm2022/lib/base-classes/base-controller.mjs +3 -2
- package/client/esm2022/lib/base-classes/base-crud-controller.mjs +1 -1
- package/client/esm2022/lib/base-classes/base-migration.mjs +23 -0
- package/client/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +20 -20
- package/client/esm2022/lib/base-classes/base.mjs +5 -3
- package/client/esm2022/lib/context-db-migrations.mjs +410 -0
- package/client/esm2022/lib/create-context.mjs +22 -8
- package/client/esm2022/lib/decorators/classes/controller-decorator.mjs +4 -1
- package/client/esm2022/lib/decorators/classes/entity-decorator.mjs +4 -1
- package/client/esm2022/lib/decorators/classes/migration-decorator.mjs +18 -0
- package/client/esm2022/lib/decorators/classes/provider-decorator.mjs +4 -1
- package/client/esm2022/lib/decorators/classes/repository-decorator.mjs +4 -1
- package/client/esm2022/lib/decorators/classes/subscriber-decorator.mjs +5 -2
- package/client/esm2022/lib/decorators/http/http-methods-decorators.mjs +1 -1
- package/client/esm2022/lib/endpoint-context.mjs +105 -59
- package/client/esm2022/lib/entity-process.mjs +1 -10
- package/client/esm2022/lib/get-response-value.mjs +1 -15
- package/client/esm2022/lib/index.mjs +4 -1
- package/client/esm2022/lib/inject.mjs +1 -1
- package/client/esm2022/lib/models.mjs +30 -1
- package/client/esm2022/lib/symbols.mjs +2 -1
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/index.mjs +1 -3
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +55 -37
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +17 -21
- package/client/esm2022/lib/ui/taon-notifications/taon-notifications.module.mjs +1 -1
- package/client/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.component.mjs +1 -1
- package/client/esm2022/lib/ui/taon-table/taon-table.component.mjs +1 -2
- package/client/fesm2022/taon.mjs +701 -449
- package/client/fesm2022/taon.mjs.map +1 -1
- package/client/lib/base-classes/base-abstract-entity.d.ts +2 -1
- package/client/lib/base-classes/base-class.d.ts +1 -1
- package/client/lib/base-classes/base-context.d.ts +3 -0
- package/client/lib/base-classes/base-controller.d.ts +2 -1
- package/client/lib/base-classes/base-crud-controller.d.ts +1 -1
- package/client/lib/base-classes/base-migration.d.ts +12 -0
- package/client/lib/base-classes/base.d.ts +8 -2
- package/client/lib/context-db-migrations.d.ts +17 -0
- package/client/lib/create-context.d.ts +7 -4
- package/client/lib/decorators/classes/controller-decorator.d.ts +3 -0
- package/client/lib/decorators/classes/entity-decorator.d.ts +3 -0
- package/client/lib/decorators/classes/migration-decorator.d.ts +8 -0
- package/client/lib/decorators/classes/provider-decorator.d.ts +3 -0
- package/client/lib/decorators/classes/repository-decorator.d.ts +3 -0
- package/client/lib/decorators/classes/subscriber-decorator.d.ts +3 -0
- package/client/lib/decorators/http/http-methods-decorators.d.ts +9 -0
- package/client/lib/endpoint-context.d.ts +14 -7
- package/client/lib/index.d.ts +14 -1
- package/client/lib/models.d.ts +45 -22
- package/client/lib/symbols.d.ts +1 -0
- package/client/lib/ui/taon-admin-mode-configuration/index.d.ts +1 -3
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +5 -8
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +8 -8
- package/lib/base-classes/base-abstract-entity.d.ts +1 -0
- package/lib/base-classes/base-class.d.ts +1 -1
- package/lib/base-classes/base-class.js +1 -1
- package/lib/base-classes/base-context.d.ts +3 -0
- package/lib/base-classes/base-controller.d.ts +2 -1
- package/lib/base-classes/base-controller.js +2 -1
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/base-classes/base-crud-controller.d.ts +1 -1
- package/lib/base-classes/base-migration.d.ts +11 -0
- package/lib/base-classes/base-migration.js +41 -0
- package/lib/base-classes/base-migration.js.map +1 -0
- package/lib/base-classes/base-repository.js +4 -4
- package/lib/base-classes/base-repository.js.map +1 -1
- package/lib/base-classes/base-subscriber-for-entity.js +19 -19
- package/lib/base-classes/base-subscriber-for-entity.js.map +1 -1
- package/lib/base-classes/base.d.ts +8 -2
- package/lib/base-classes/base.js +4 -2
- package/lib/base-classes/base.js.map +1 -1
- package/lib/context-db-migrations.d.ts +16 -0
- package/lib/context-db-migrations.js +585 -0
- package/lib/context-db-migrations.js.map +1 -0
- package/lib/create-context.d.ts +7 -4
- package/lib/create-context.js +34 -12
- package/lib/create-context.js.map +1 -1
- package/lib/decorators/classes/controller-decorator.d.ts +3 -0
- package/lib/decorators/classes/controller-decorator.js +3 -0
- package/lib/decorators/classes/controller-decorator.js.map +1 -1
- package/lib/decorators/classes/entity-decorator.d.ts +3 -0
- package/lib/decorators/classes/entity-decorator.js +3 -0
- package/lib/decorators/classes/entity-decorator.js.map +1 -1
- package/lib/decorators/classes/migration-decorator.d.ts +7 -0
- package/lib/decorators/classes/migration-decorator.js +27 -0
- package/lib/decorators/classes/migration-decorator.js.map +1 -0
- package/lib/decorators/classes/provider-decorator.d.ts +3 -0
- package/lib/decorators/classes/provider-decorator.js +3 -0
- package/lib/decorators/classes/provider-decorator.js.map +1 -1
- package/lib/decorators/classes/repository-decorator.d.ts +3 -0
- package/lib/decorators/classes/repository-decorator.js +3 -0
- package/lib/decorators/classes/repository-decorator.js.map +1 -1
- package/lib/decorators/classes/subscriber-decorator.d.ts +3 -0
- package/lib/decorators/classes/subscriber-decorator.js +4 -1
- package/lib/decorators/classes/subscriber-decorator.js.map +1 -1
- package/lib/decorators/http/http-methods-decorators.d.ts +9 -0
- package/lib/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib/endpoint-context.d.ts +14 -7
- package/lib/endpoint-context.js +265 -220
- package/lib/endpoint-context.js.map +1 -1
- package/lib/entity-process.js +0 -9
- package/lib/entity-process.js.map +1 -1
- package/lib/get-response-value.js +14 -37
- package/lib/get-response-value.js.map +1 -1
- package/lib/index.d.ts +14 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/inject.js +0 -2
- package/lib/inject.js.map +1 -1
- package/lib/models.d.ts +45 -23
- package/lib/models.js +45 -0
- package/lib/models.js.map +1 -1
- package/lib/symbols.d.ts +1 -0
- package/lib/symbols.js +1 -0
- package/lib/symbols.js.map +1 -1
- package/lib/ui/directives/index.js +2 -2
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.d.ts +1 -3
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +4 -7
- package/lib/ui/taon-admin-mode-configuration/{models/taon-admin-mode-tabs.js → taon-admin.models.js} +1 -1
- package/lib/ui/taon-admin-mode-configuration/taon-admin.models.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +6 -6
- package/lib/ui/taon-github-fork-me-corner/index.js +2 -2
- package/lib/ui/taon-github-fork-me-ribbon/index.js +2 -2
- package/lib/ui/taon-notifications/taon-notifications.models.js +2 -2
- package/lib/ui/taon-progress-bar/index.js +2 -2
- package/lib/ui/taon-session-passcode/index.js +2 -2
- package/lib/ui/taon-table/index.js +2 -2
- package/migrations/index.d.ts +1 -0
- package/migrations/index.js +6 -0
- package/migrations/index.js.map +1 -0
- package/migrations/migrations_index._auto-generated_.d.ts +0 -0
- package/migrations/migrations_index._auto-generated_.js +4 -0
- package/migrations/migrations_index._auto-generated_.js.map +1 -0
- package/package.json +7 -7
- package/taon.jsonc +47 -47
- package/tmp-environment.json +39 -31
- package/websql/README.md +24 -24
- package/websql/esm2022/lib/base-classes/base-abstract-entity.mjs +1 -1
- package/websql/esm2022/lib/base-classes/base-class.mjs +2 -2
- package/websql/esm2022/lib/base-classes/base-controller.mjs +3 -2
- package/websql/esm2022/lib/base-classes/base-crud-controller.mjs +1 -1
- package/websql/esm2022/lib/base-classes/base-migration.mjs +23 -0
- package/websql/esm2022/lib/base-classes/base-repository.mjs +5 -5
- package/websql/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +20 -20
- package/websql/esm2022/lib/base-classes/base.mjs +5 -3
- package/websql/esm2022/lib/context-db-migrations.mjs +269 -0
- package/websql/esm2022/lib/create-context.mjs +22 -8
- package/websql/esm2022/lib/decorators/classes/controller-decorator.mjs +4 -1
- package/websql/esm2022/lib/decorators/classes/entity-decorator.mjs +4 -1
- package/websql/esm2022/lib/decorators/classes/migration-decorator.mjs +18 -0
- package/websql/esm2022/lib/decorators/classes/provider-decorator.mjs +4 -1
- package/websql/esm2022/lib/decorators/classes/repository-decorator.mjs +4 -1
- package/websql/esm2022/lib/decorators/classes/subscriber-decorator.mjs +5 -2
- package/websql/esm2022/lib/decorators/http/http-methods-decorators.mjs +1 -1
- package/websql/esm2022/lib/endpoint-context.mjs +139 -95
- package/websql/esm2022/lib/entity-process.mjs +1 -10
- package/websql/esm2022/lib/get-response-value.mjs +4 -24
- package/websql/esm2022/lib/index.mjs +4 -1
- package/websql/esm2022/lib/inject.mjs +1 -1
- package/websql/esm2022/lib/models.mjs +28 -1
- package/websql/esm2022/lib/symbols.mjs +2 -1
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/index.mjs +1 -3
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +55 -37
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin.service.mjs +17 -21
- package/websql/esm2022/lib/ui/taon-notifications/taon-notifications.module.mjs +1 -1
- package/websql/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.component.mjs +1 -1
- package/websql/esm2022/lib/ui/taon-table/taon-table.component.mjs +1 -2
- package/websql/fesm2022/taon.mjs +594 -497
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-abstract-entity.d.ts +2 -1
- package/websql/lib/base-classes/base-class.d.ts +1 -1
- package/websql/lib/base-classes/base-context.d.ts +3 -0
- package/websql/lib/base-classes/base-controller.d.ts +2 -1
- package/websql/lib/base-classes/base-crud-controller.d.ts +1 -1
- package/websql/lib/base-classes/base-migration.d.ts +12 -0
- package/websql/lib/base-classes/base.d.ts +8 -2
- package/websql/lib/context-db-migrations.d.ts +17 -0
- package/websql/lib/create-context.d.ts +7 -4
- package/websql/lib/decorators/classes/controller-decorator.d.ts +3 -0
- package/websql/lib/decorators/classes/entity-decorator.d.ts +3 -0
- package/websql/lib/decorators/classes/migration-decorator.d.ts +8 -0
- package/websql/lib/decorators/classes/provider-decorator.d.ts +3 -0
- package/websql/lib/decorators/classes/repository-decorator.d.ts +3 -0
- package/websql/lib/decorators/classes/subscriber-decorator.d.ts +3 -0
- package/websql/lib/decorators/http/http-methods-decorators.d.ts +9 -0
- package/websql/lib/endpoint-context.d.ts +14 -7
- package/websql/lib/index.d.ts +14 -1
- package/websql/lib/models.d.ts +45 -23
- package/websql/lib/symbols.d.ts +1 -0
- package/websql/lib/ui/taon-admin-mode-configuration/index.d.ts +1 -3
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.d.ts +5 -8
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin.service.d.ts +8 -8
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.mjs +0 -5
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.mjs +0 -115
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.mjs +0 -50
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.mjs +0 -5
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.mjs +0 -61
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.mjs +0 -21
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +0 -4
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +0 -32
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.mjs +0 -54
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +0 -3
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +0 -33
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +0 -16
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +0 -3
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +0 -17
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +0 -10
- package/browser/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +0 -6
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +0 -18
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +0 -17
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.mjs +0 -5
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.mjs +0 -115
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.mjs +0 -50
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.mjs +0 -5
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.mjs +0 -61
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.mjs +0 -21
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +0 -4
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +0 -32
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.mjs +0 -54
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +0 -3
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +0 -33
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +0 -16
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +0 -3
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +0 -17
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +0 -10
- package/client/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +0 -6
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +0 -18
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +0 -17
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +0 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +0 -5
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js.map +0 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +0 -29
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +0 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.d.ts +0 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +0 -5
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js.map +0 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +0 -8
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +0 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +0 -5
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js.map +0 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +0 -13
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +0 -2
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js.map +0 -1
- package/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +0 -14
- package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +0 -2
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.mjs +0 -5
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.mjs +0 -115
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.mjs +0 -50
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.mjs +0 -5
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.mjs +0 -61
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.mjs +0 -21
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.mjs +0 -4
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.mjs +0 -32
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.mjs +0 -54
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +0 -3
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +0 -33
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +0 -16
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +0 -3
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +0 -17
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +0 -10
- package/websql/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +0 -6
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +0 -18
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +0 -17
- /package/lib/ui/taon-admin-mode-configuration/{models/taon-admin-mode-tabs.d.ts → taon-admin.models.d.ts} +0 -0
package/websql/fesm2022/taon.mjs
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import * as coreHelpers from 'tnp-core/websql';
|
|
3
|
-
import { _ as _$1, Helpers, path } from 'tnp-core/websql';
|
|
3
|
+
import { _ as _$1, Helpers, UtilsMigrations, UtilsOs, path } from 'tnp-core/websql';
|
|
4
4
|
import { Models as Models$1, RestHeaders, Resource, Mapping } from 'ng2-rest/websql';
|
|
5
5
|
import * as tsorm from 'taon-typeorm/websql';
|
|
6
|
-
import { OrignalClassKey, Entity, EventSubscriber, DataSource } from 'taon-typeorm/websql';
|
|
6
|
+
import { OrignalClassKey, Entity, Table, TableIndex, EventSubscriber, DataSource } from 'taon-typeorm/websql';
|
|
7
7
|
import { SYMBOL, CLASS } from 'typescript-class-helpers/websql';
|
|
8
8
|
import * as JSON5 from 'json5';
|
|
9
9
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
10
10
|
import { MySqlQuerySource } from 'taon-type-sql/websql';
|
|
11
11
|
import { Stor } from 'taon-storage/websql';
|
|
12
|
-
import { Subject, Observable, from, interval, tap, defer, fromEvent, map, debounceTime, distinctUntilChanged, share, Subscription, takeUntil
|
|
13
|
-
import { config } from 'tnp-config/websql';
|
|
12
|
+
import { Subject, Observable, from, interval, tap, defer, fromEvent, map, debounceTime, distinctUntilChanged, share, Subscription, takeUntil } from 'rxjs';
|
|
14
13
|
import * as i0 from '@angular/core';
|
|
15
14
|
import { Injectable, inject as inject$1, EventEmitter, Directive, Input, Output, HostBinding, HostListener, Pipe, NgModule, Component, DestroyRef, Self, ViewChild, ChangeDetectorRef } from '@angular/core';
|
|
16
15
|
import { JSON10 } from 'json10/websql';
|
|
@@ -19,7 +18,7 @@ import { io } from 'socket.io-client';
|
|
|
19
18
|
import { Log, Level } from 'ng2-logger/websql';
|
|
20
19
|
import * as i1 from '@angular/platform-browser';
|
|
21
20
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
22
|
-
import * as
|
|
21
|
+
import * as i6$1 from '@angular/cdk/drag-drop';
|
|
23
22
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
24
23
|
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
25
24
|
import { CdkStepperModule } from '@angular/cdk/stepper';
|
|
@@ -28,11 +27,11 @@ import { CdkTreeModule } from '@angular/cdk/tree';
|
|
|
28
27
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
29
28
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
30
29
|
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
|
|
31
|
-
import * as
|
|
30
|
+
import * as i7 from '@angular/material/button';
|
|
32
31
|
import { MatButtonModule } from '@angular/material/button';
|
|
33
|
-
import * as
|
|
32
|
+
import * as i8 from '@angular/material/card';
|
|
34
33
|
import { MatCardModule } from '@angular/material/card';
|
|
35
|
-
import * as
|
|
34
|
+
import * as i9 from '@angular/material/checkbox';
|
|
36
35
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
37
36
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
38
37
|
import { MatStepperModule } from '@angular/material/stepper';
|
|
@@ -41,7 +40,6 @@ import { MatExpansionModule } from '@angular/material/expansion';
|
|
|
41
40
|
import { MatGridListModule } from '@angular/material/grid-list';
|
|
42
41
|
import * as i6 from '@angular/material/icon';
|
|
43
42
|
import { MatIconModule } from '@angular/material/icon';
|
|
44
|
-
import * as i11$1 from '@angular/material/list';
|
|
45
43
|
import { MatListModule } from '@angular/material/list';
|
|
46
44
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
47
45
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
@@ -55,19 +53,19 @@ import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
|
|
|
55
53
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
56
54
|
import { MatRadioModule } from '@angular/material/radio';
|
|
57
55
|
import { MatSelectModule } from '@angular/material/select';
|
|
58
|
-
import * as
|
|
56
|
+
import * as i11 from '@angular/material/sidenav';
|
|
59
57
|
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
60
58
|
import { MatSliderModule } from '@angular/material/slider';
|
|
61
59
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
62
60
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
63
61
|
import { MatSortModule } from '@angular/material/sort';
|
|
64
62
|
import { MatTableModule } from '@angular/material/table';
|
|
65
|
-
import * as
|
|
63
|
+
import * as i12 from '@angular/material/tabs';
|
|
66
64
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
67
65
|
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
68
66
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
69
67
|
import { MatTreeModule } from '@angular/material/tree';
|
|
70
|
-
import * as
|
|
68
|
+
import * as i3 from '@angular/common';
|
|
71
69
|
import { CommonModule } from '@angular/common';
|
|
72
70
|
import * as i1$1 from '@ngneat/hot-toast';
|
|
73
71
|
import * as i2 from '@angular/forms';
|
|
@@ -77,21 +75,14 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
77
75
|
import * as i1$2 from 'ngx-progressbar';
|
|
78
76
|
import { NgProgressModule } from 'ngx-progressbar';
|
|
79
77
|
import * as _ from 'lodash';
|
|
80
|
-
import * as i2$
|
|
78
|
+
import * as i2$1 from '@angular/material/form-field';
|
|
81
79
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
82
|
-
import * as i3 from '@ng-matero/extensions/grid';
|
|
80
|
+
import * as i3$1 from '@ng-matero/extensions/grid';
|
|
83
81
|
import { MtxGridModule } from '@ng-matero/extensions/grid';
|
|
84
82
|
import * as i1$3 from 'static-columns/websql';
|
|
85
83
|
import { StaticColumnsModule } from 'static-columns/websql';
|
|
86
|
-
import * as
|
|
84
|
+
import * as i5 from 'ngx-scrollbar';
|
|
87
85
|
import { NgScrollbarModule } from 'ngx-scrollbar';
|
|
88
|
-
import * as i1$4 from '@angular/router';
|
|
89
|
-
import 'brace';
|
|
90
|
-
import 'brace/mode/css';
|
|
91
|
-
import 'brace/mode/typescript';
|
|
92
|
-
import 'brace/theme/github';
|
|
93
|
-
import * as i13 from 'ngx-pipes';
|
|
94
|
-
import { NgArrayPipesModule } from 'ngx-pipes';
|
|
95
86
|
|
|
96
87
|
var Symbols;
|
|
97
88
|
(function (Symbols) {
|
|
@@ -157,6 +148,7 @@ var Symbols;
|
|
|
157
148
|
repository: `repository:options`,
|
|
158
149
|
provider: `provider:options`,
|
|
159
150
|
subscriber: `subscriber:options`,
|
|
151
|
+
migration: `migration:options`,
|
|
160
152
|
},
|
|
161
153
|
};
|
|
162
154
|
Symbols.old = {
|
|
@@ -566,6 +558,7 @@ var Models;
|
|
|
566
558
|
ClassType["REPOSITORY"] = "REPOSITORY";
|
|
567
559
|
ClassType["PROVIDER"] = "PROVIDER";
|
|
568
560
|
ClassType["SUBSCRIBER"] = "SUBSCRIBER";
|
|
561
|
+
ClassType["MIGRATION"] = "MIGRATION";
|
|
569
562
|
})(ClassType = Models.ClassType || (Models.ClassType = {}));
|
|
570
563
|
Models.ClassTypeKey = {
|
|
571
564
|
[ClassType.ENTITY]: 'entities',
|
|
@@ -573,7 +566,32 @@ var Models;
|
|
|
573
566
|
[ClassType.REPOSITORY]: 'repositories',
|
|
574
567
|
[ClassType.PROVIDER]: 'providers',
|
|
575
568
|
[ClassType.SUBSCRIBER]: 'subscribers',
|
|
569
|
+
[ClassType.MIGRATION]: 'migrations',
|
|
576
570
|
};
|
|
571
|
+
class DatabaseConfigTypeOrm {
|
|
572
|
+
}
|
|
573
|
+
Models.DatabaseConfigTypeOrm = DatabaseConfigTypeOrm;
|
|
574
|
+
class DatabaseConfig extends DatabaseConfigTypeOrm {
|
|
575
|
+
static from(databasePartialConfig) {
|
|
576
|
+
return _$1.merge(new DatabaseConfig(), databasePartialConfig);
|
|
577
|
+
}
|
|
578
|
+
get databaseConfigTypeORM() {
|
|
579
|
+
const result = _$1.cloneDeep(this);
|
|
580
|
+
if (result.recreateMode) {
|
|
581
|
+
if (result.recreateMode === 'DROP_DB+MIGRATIONS') {
|
|
582
|
+
result.synchronize = true;
|
|
583
|
+
result.dropSchema = true;
|
|
584
|
+
}
|
|
585
|
+
else if (result.recreateMode === 'PRESERVE_DATA+MIGRATIONS') {
|
|
586
|
+
result.synchronize = false;
|
|
587
|
+
result.dropSchema = false;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
delete result.recreateMode;
|
|
591
|
+
return result;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
Models.DatabaseConfig = DatabaseConfig;
|
|
577
595
|
class DecoratorAbstractOpt {
|
|
578
596
|
}
|
|
579
597
|
Models.DecoratorAbstractOpt = DecoratorAbstractOpt;
|
|
@@ -764,6 +782,9 @@ var Http;
|
|
|
764
782
|
;
|
|
765
783
|
({}); // @--end-of-file-for-module=taon lib/decorators/http/http-decorators.ts
|
|
766
784
|
|
|
785
|
+
/**
|
|
786
|
+
* Controller decorator
|
|
787
|
+
*/
|
|
767
788
|
function TaonController(options) {
|
|
768
789
|
return function (constructor) {
|
|
769
790
|
ClassHelpers.setName(constructor, options?.className);
|
|
@@ -942,7 +963,8 @@ class BaseInjector {
|
|
|
942
963
|
|
|
943
964
|
let BaseController = class BaseController extends BaseInjector {
|
|
944
965
|
/**
|
|
945
|
-
*
|
|
966
|
+
* THIS ONLY WORKS IF NO MIGRATIONS PROVIDED IN CONFIG
|
|
967
|
+
* Purpose: init example data for db.
|
|
946
968
|
*/
|
|
947
969
|
initExampleDbData() {
|
|
948
970
|
return void 0;
|
|
@@ -1176,7 +1198,7 @@ BaseCrudController = __decorate([
|
|
|
1176
1198
|
class BaseClass {
|
|
1177
1199
|
/**
|
|
1178
1200
|
* class initialization hook
|
|
1179
|
-
* taon after class
|
|
1201
|
+
* taon after class instance creation
|
|
1180
1202
|
*/
|
|
1181
1203
|
async _() { }
|
|
1182
1204
|
clone(override) {
|
|
@@ -1279,6 +1301,9 @@ BaseAbstractEntity = __decorate([
|
|
|
1279
1301
|
;
|
|
1280
1302
|
({}); // @--end-of-file-for-module=taon lib/base-classes/base-abstract-entity.ts
|
|
1281
1303
|
|
|
1304
|
+
/**
|
|
1305
|
+
* Repository decorator
|
|
1306
|
+
*/
|
|
1282
1307
|
function TaonRepository(options) {
|
|
1283
1308
|
return function (constructor) {
|
|
1284
1309
|
Reflect.defineMetadata(Symbols.metadata.options.repository, options, constructor);
|
|
@@ -1301,20 +1326,20 @@ let BaseRepository = class BaseRepository extends BaseInjector {
|
|
|
1301
1326
|
}
|
|
1302
1327
|
get dbQuery() {
|
|
1303
1328
|
if (!this.__dbQuery) {
|
|
1304
|
-
if (!this.
|
|
1329
|
+
if (!this.ctx) {
|
|
1305
1330
|
return; // TODO
|
|
1306
1331
|
throw new Error(`[BaseRepository] Context not inited for class ${ClassHelpers.getName(this)}`);
|
|
1307
1332
|
}
|
|
1308
|
-
const connection = this.
|
|
1333
|
+
const connection = this.ctx?.connection;
|
|
1309
1334
|
if (!connection) {
|
|
1310
|
-
throw new Error(`[BaseRepository] Database not inited for context ${this.
|
|
1335
|
+
throw new Error(`[BaseRepository] Database not inited for context ${this.ctx?.contextName}`);
|
|
1311
1336
|
}
|
|
1312
1337
|
this.__dbQuery = new MySqlQuerySource(connection);
|
|
1313
1338
|
}
|
|
1314
1339
|
return this.__dbQuery;
|
|
1315
1340
|
}
|
|
1316
1341
|
get connection() {
|
|
1317
|
-
return this.
|
|
1342
|
+
return this.ctx?.connection;
|
|
1318
1343
|
}
|
|
1319
1344
|
get repository() {
|
|
1320
1345
|
return this.__repository;
|
|
@@ -1719,25 +1744,19 @@ class BaseProvider extends BaseInjector {
|
|
|
1719
1744
|
;
|
|
1720
1745
|
({}); // @--end-of-file-for-module=taon lib/base-classes/base-provider.ts
|
|
1721
1746
|
|
|
1722
|
-
const globalPublicStorage = Helpers.isBrowser ? window : global;
|
|
1723
|
-
;
|
|
1724
|
-
({}); // @--end-of-file-for-module=taon lib/storage.ts
|
|
1725
|
-
|
|
1726
1747
|
const ENV$2 = Helpers.isBrowser ? window['ENV'] : global['ENV'];
|
|
1727
|
-
class
|
|
1748
|
+
class TaonAdminService {
|
|
1749
|
+
static get Instance() {
|
|
1750
|
+
return this._instance;
|
|
1751
|
+
}
|
|
1728
1752
|
constructor() {
|
|
1729
1753
|
this.scrollableEnabled = false; // TOOD false by default
|
|
1730
1754
|
this.onEditMode = new Subject();
|
|
1731
1755
|
this.onEditMode$ = this.onEditMode.asObservable();
|
|
1732
1756
|
this.enabledTabs = [];
|
|
1757
|
+
TaonAdminService._instance = this;
|
|
1733
1758
|
this.scrollableEnabled = !!ENV$2?.useGlobalNgxScrollbar;
|
|
1734
1759
|
}
|
|
1735
|
-
static get Instance() {
|
|
1736
|
-
if (!globalPublicStorage[config.frameworkNames.productionFrameworkName]) {
|
|
1737
|
-
globalPublicStorage[config.frameworkNames.productionFrameworkName] = new TaonAdmin();
|
|
1738
|
-
}
|
|
1739
|
-
return globalPublicStorage[config.frameworkNames.productionFrameworkName];
|
|
1740
|
-
}
|
|
1741
1760
|
setEditMode(value) {
|
|
1742
1761
|
this.onEditMode.next(value);
|
|
1743
1762
|
}
|
|
@@ -1753,26 +1772,26 @@ class TaonAdmin {
|
|
|
1753
1772
|
this.adminPanelIsOpen = true;
|
|
1754
1773
|
}
|
|
1755
1774
|
logout() { }
|
|
1756
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type:
|
|
1757
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type:
|
|
1775
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1776
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, providedIn: 'root' }); }
|
|
1758
1777
|
}
|
|
1759
1778
|
__decorate([
|
|
1760
|
-
Stor.property.in.localstorage.for(
|
|
1779
|
+
(Stor.property.in.localstorage.for(TaonAdminService).withDefaultValue(false)),
|
|
1761
1780
|
__metadata("design:type", Boolean)
|
|
1762
|
-
],
|
|
1781
|
+
], TaonAdminService.prototype, "adminPanelIsOpen", void 0);
|
|
1763
1782
|
__decorate([
|
|
1764
|
-
Stor.property.in.localstorage.for(
|
|
1783
|
+
(Stor.property.in.localstorage.for(TaonAdminService).withDefaultValue(false)),
|
|
1765
1784
|
__metadata("design:type", Boolean)
|
|
1766
|
-
],
|
|
1785
|
+
], TaonAdminService.prototype, "draggablePopupMode", void 0);
|
|
1767
1786
|
__decorate([
|
|
1768
|
-
Stor.property.in.localstorage.for(
|
|
1787
|
+
(Stor.property.in.localstorage.for(TaonAdminService).withDefaultValue(false)),
|
|
1769
1788
|
__metadata("design:type", Boolean)
|
|
1770
|
-
],
|
|
1789
|
+
], TaonAdminService.prototype, "draggablePopupModeFullScreen", void 0);
|
|
1771
1790
|
__decorate([
|
|
1772
|
-
Stor.property.in.localstorage.for(
|
|
1791
|
+
(Stor.property.in.localstorage.for(TaonAdminService).withDefaultValue(false)),
|
|
1773
1792
|
__metadata("design:type", Boolean)
|
|
1774
|
-
],
|
|
1775
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type:
|
|
1793
|
+
], TaonAdminService.prototype, "keepWebsqlDbDataAfterReload", void 0);
|
|
1794
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, decorators: [{
|
|
1776
1795
|
type: Injectable,
|
|
1777
1796
|
args: [{ providedIn: 'root' }]
|
|
1778
1797
|
}], ctorParameters: () => [] });
|
|
@@ -1814,12 +1833,7 @@ class DITaonContainer {
|
|
|
1814
1833
|
const getResponseValue = (response, options) => {
|
|
1815
1834
|
const { req, res } = options || {};
|
|
1816
1835
|
return new Promise(async (resolve, reject) => {
|
|
1817
|
-
|
|
1818
|
-
if (!response && response.send === undefined) {
|
|
1819
|
-
console.error('[taon] Bad response value for function');
|
|
1820
|
-
resolve(undefined);
|
|
1821
|
-
}
|
|
1822
|
-
else if (typeof response === 'function') {
|
|
1836
|
+
if (typeof response === 'function') {
|
|
1823
1837
|
const asyncResponse = response;
|
|
1824
1838
|
try {
|
|
1825
1839
|
const result = await asyncResponse(req, res);
|
|
@@ -1832,24 +1846,9 @@ const getResponseValue = (response, options) => {
|
|
|
1832
1846
|
reject(e);
|
|
1833
1847
|
}
|
|
1834
1848
|
}
|
|
1835
|
-
else
|
|
1836
|
-
|
|
1837
|
-
if (typeof response.send === 'function') {
|
|
1838
|
-
const result = response.send(req, res);
|
|
1839
|
-
resolve(result);
|
|
1840
|
-
}
|
|
1841
|
-
else {
|
|
1842
|
-
resolve(response.send);
|
|
1843
|
-
}
|
|
1844
|
-
}
|
|
1845
|
-
catch (error) {
|
|
1846
|
-
console.error('[taon] Bad synchonus function call ');
|
|
1847
|
-
Helpers.renderError(error);
|
|
1848
|
-
reject(error);
|
|
1849
|
-
}
|
|
1849
|
+
else {
|
|
1850
|
+
reject(`[taon] Not recognized type of response ${response}`);
|
|
1850
1851
|
}
|
|
1851
|
-
else
|
|
1852
|
-
reject(`[taon] Not recognized type of reposne ${response}`);
|
|
1853
1852
|
});
|
|
1854
1853
|
};
|
|
1855
1854
|
;
|
|
@@ -2785,11 +2784,279 @@ class RealtimeCore {
|
|
|
2785
2784
|
;
|
|
2786
2785
|
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-core.ts
|
|
2787
2786
|
|
|
2787
|
+
class ContextDbMigrations {
|
|
2788
|
+
constructor(ctx) {
|
|
2789
|
+
this.ctx = ctx;
|
|
2790
|
+
this.DEFAULT_MIGRATION_TABLE_NAME = 'TAON_MIGRATION_META';
|
|
2791
|
+
this.MIGRATION_STATUS_COMPLETED = 'completed';
|
|
2792
|
+
this.MIGRATION_STATUS_PENDING = 'pending';
|
|
2793
|
+
this.table = new Table({
|
|
2794
|
+
name: this.DEFAULT_MIGRATION_TABLE_NAME,
|
|
2795
|
+
columns: [
|
|
2796
|
+
{
|
|
2797
|
+
name: 'id',
|
|
2798
|
+
type: 'integer',
|
|
2799
|
+
isPrimary: true, // Mark it as the primary key
|
|
2800
|
+
isGenerated: true, // Enable auto-generation
|
|
2801
|
+
generationStrategy: 'increment', // Use auto-increment strategy
|
|
2802
|
+
},
|
|
2803
|
+
{
|
|
2804
|
+
name: 'name',
|
|
2805
|
+
type: 'varchar',
|
|
2806
|
+
length: '255',
|
|
2807
|
+
isUnique: true, // Ensure the name is unique
|
|
2808
|
+
isNullable: false, // Ensure this field is required
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
name: 'context',
|
|
2812
|
+
type: 'varchar',
|
|
2813
|
+
length: '255',
|
|
2814
|
+
isNullable: false, // Optional context for migrations (e.g., tenant or module name)
|
|
2815
|
+
},
|
|
2816
|
+
{
|
|
2817
|
+
name: 'applied_at',
|
|
2818
|
+
type: 'timestamp',
|
|
2819
|
+
default: 'CURRENT_TIMESTAMP', // Automatically set the timestamp
|
|
2820
|
+
isNullable: true,
|
|
2821
|
+
},
|
|
2822
|
+
{
|
|
2823
|
+
name: 'status',
|
|
2824
|
+
type: 'varchar',
|
|
2825
|
+
length: '50',
|
|
2826
|
+
default: `'${this.MIGRATION_STATUS_COMPLETED}'`,
|
|
2827
|
+
isNullable: false,
|
|
2828
|
+
},
|
|
2829
|
+
],
|
|
2830
|
+
});
|
|
2831
|
+
}
|
|
2832
|
+
async ensureMigrationTableExists() {
|
|
2833
|
+
if (this.ctx.remoteHost) {
|
|
2834
|
+
return;
|
|
2835
|
+
}
|
|
2836
|
+
const queryRunner = this.ctx.connection.createQueryRunner();
|
|
2837
|
+
await queryRunner.connect();
|
|
2838
|
+
await queryRunner.startTransaction();
|
|
2839
|
+
const hasTable = await queryRunner.hasTable(this.DEFAULT_MIGRATION_TABLE_NAME);
|
|
2840
|
+
if (hasTable) {
|
|
2841
|
+
this.ctx.logMigrations &&
|
|
2842
|
+
console.log(`Table ${this.DEFAULT_MIGRATION_TABLE_NAME} already exists.`);
|
|
2843
|
+
await queryRunner.release();
|
|
2844
|
+
return; // Exit early if the table exists
|
|
2845
|
+
}
|
|
2846
|
+
try {
|
|
2847
|
+
await queryRunner.createTable(this.table);
|
|
2848
|
+
await queryRunner.createIndex(this.DEFAULT_MIGRATION_TABLE_NAME, new TableIndex({
|
|
2849
|
+
name: 'IDX_NAME',
|
|
2850
|
+
columnNames: ['name'],
|
|
2851
|
+
}));
|
|
2852
|
+
await queryRunner.commitTransaction();
|
|
2853
|
+
}
|
|
2854
|
+
catch (error) {
|
|
2855
|
+
this.ctx.logMigrations &&
|
|
2856
|
+
console.error(`Transaction failed [ensureMigrationTableExists]` + `, rolling back:`, error);
|
|
2857
|
+
await queryRunner.rollbackTransaction();
|
|
2858
|
+
}
|
|
2859
|
+
finally {
|
|
2860
|
+
await queryRunner.release();
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
async revertMigrationToTimestamp(timestamp) {
|
|
2864
|
+
if (this.ctx.remoteHost) {
|
|
2865
|
+
return;
|
|
2866
|
+
}
|
|
2867
|
+
if (!UtilsMigrations.isValidTimestamp(timestamp)) {
|
|
2868
|
+
Helpers.throw(`Invalid timestamp provided for migration revert: ${timestamp}`);
|
|
2869
|
+
}
|
|
2870
|
+
const migrationsClassFns = this.ctx
|
|
2871
|
+
.getClassFunByArr(Models.ClassType.MIGRATION)
|
|
2872
|
+
.reverse();
|
|
2873
|
+
const migrationClassesInstancesToRevert = migrationsClassFns
|
|
2874
|
+
.map(classFn => {
|
|
2875
|
+
const timestampFromClassName = Number(UtilsMigrations.getTimestampFromClassName(ClassHelpers.getName(classFn)));
|
|
2876
|
+
if (timestampFromClassName <= timestamp) {
|
|
2877
|
+
return null;
|
|
2878
|
+
}
|
|
2879
|
+
return this.ctx.getInstanceBy(classFn);
|
|
2880
|
+
})
|
|
2881
|
+
.filter(f => !!f)
|
|
2882
|
+
.map(f => f)
|
|
2883
|
+
.filter(migrationInstance => migrationInstance.isReadyToRun());
|
|
2884
|
+
const queryRunner = this.ctx.connection.createQueryRunner();
|
|
2885
|
+
await queryRunner.connect();
|
|
2886
|
+
try {
|
|
2887
|
+
await queryRunner.startTransaction();
|
|
2888
|
+
const appliedMigrationsForContext = await queryRunner.query(`SELECT name FROM ${this.DEFAULT_MIGRATION_TABLE_NAME}
|
|
2889
|
+
WHERE status = $1 AND context = $2`, [this.MIGRATION_STATUS_COMPLETED, this.ctx.contextName]);
|
|
2890
|
+
const appliedMigrationsForContextNames = appliedMigrationsForContext.map(m => m.name);
|
|
2891
|
+
for (const migrationClassInstance of migrationClassesInstancesToRevert) {
|
|
2892
|
+
const migrationName = ClassHelpers.getName(migrationClassInstance);
|
|
2893
|
+
if (!appliedMigrationsForContextNames.includes(migrationName)) {
|
|
2894
|
+
this.ctx.logMigrations &&
|
|
2895
|
+
console.warn(`Skipping migration not marked as applied: ${migrationName}`);
|
|
2896
|
+
continue;
|
|
2897
|
+
}
|
|
2898
|
+
this.ctx.logMigrations &&
|
|
2899
|
+
console.log(`Reverting migration: ${migrationName} , context: ${this.ctx.contextName}`);
|
|
2900
|
+
await migrationClassInstance.down(queryRunner);
|
|
2901
|
+
await queryRunner.query(`DELETE FROM ${this.DEFAULT_MIGRATION_TABLE_NAME} WHERE name = $1`, [migrationName]);
|
|
2902
|
+
}
|
|
2903
|
+
await queryRunner.commitTransaction();
|
|
2904
|
+
this.ctx.logMigrations &&
|
|
2905
|
+
console.log('Migrations successfully reverted to the specified timestamp.');
|
|
2906
|
+
}
|
|
2907
|
+
catch (error) {
|
|
2908
|
+
this.ctx.logMigrations &&
|
|
2909
|
+
console.error('Transaction failed, rolling back:', error);
|
|
2910
|
+
await queryRunner.rollbackTransaction();
|
|
2911
|
+
}
|
|
2912
|
+
finally {
|
|
2913
|
+
await queryRunner.release();
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
async clearMigrationTable() {
|
|
2917
|
+
if (this.ctx.remoteHost) {
|
|
2918
|
+
return;
|
|
2919
|
+
}
|
|
2920
|
+
const queryRunner = this.ctx.connection.createQueryRunner();
|
|
2921
|
+
await queryRunner.connect();
|
|
2922
|
+
await queryRunner.startTransaction();
|
|
2923
|
+
try {
|
|
2924
|
+
await queryRunner.clearTable(this.DEFAULT_MIGRATION_TABLE_NAME);
|
|
2925
|
+
await queryRunner.commitTransaction();
|
|
2926
|
+
}
|
|
2927
|
+
catch (error) {
|
|
2928
|
+
this.ctx.logMigrations &&
|
|
2929
|
+
console.error('Transaction failed, rolling back:', error);
|
|
2930
|
+
await queryRunner.rollbackTransaction();
|
|
2931
|
+
}
|
|
2932
|
+
finally {
|
|
2933
|
+
await queryRunner.release();
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
async markAllMigrationsAsApplied() {
|
|
2937
|
+
if (this.ctx.remoteHost) {
|
|
2938
|
+
return;
|
|
2939
|
+
}
|
|
2940
|
+
const migrationsClassFns = this.ctx.getClassFunByArr(Models.ClassType.MIGRATION);
|
|
2941
|
+
const migrationClassesInstances = migrationsClassFns
|
|
2942
|
+
.map(classFn => this.ctx.getInstanceBy(classFn))
|
|
2943
|
+
.map(f => f)
|
|
2944
|
+
.filter(migrationInstance => migrationInstance.isReadyToRun());
|
|
2945
|
+
const queryRunner = this.ctx.connection.createQueryRunner();
|
|
2946
|
+
await queryRunner.connect();
|
|
2947
|
+
try {
|
|
2948
|
+
await queryRunner.startTransaction();
|
|
2949
|
+
const allMigrationsInDb = await queryRunner.query(`SELECT name FROM ${this.DEFAULT_MIGRATION_TABLE_NAME}`);
|
|
2950
|
+
const allMigrationInDBNames = allMigrationsInDb.map(m => m.name);
|
|
2951
|
+
for (const instance of migrationClassesInstances) {
|
|
2952
|
+
const migrationName = ClassHelpers.getName(instance);
|
|
2953
|
+
if (allMigrationInDBNames.includes(migrationName)) {
|
|
2954
|
+
this.ctx.logMigrations &&
|
|
2955
|
+
console.log(`Skipping already applied migration: ${migrationName}`);
|
|
2956
|
+
continue;
|
|
2957
|
+
}
|
|
2958
|
+
this.ctx.logMigrations &&
|
|
2959
|
+
console.log(`Marking migration as applied: ${migrationName}`);
|
|
2960
|
+
await queryRunner.query(`INSERT INTO ${this.DEFAULT_MIGRATION_TABLE_NAME} (name, status, context, applied_at) ` +
|
|
2961
|
+
`VALUES ($1, $2, $3, CURRENT_TIMESTAMP)`, [
|
|
2962
|
+
migrationName,
|
|
2963
|
+
this.MIGRATION_STATUS_COMPLETED,
|
|
2964
|
+
instance.ctx.contextName,
|
|
2965
|
+
]);
|
|
2966
|
+
}
|
|
2967
|
+
await queryRunner.query(`UPDATE ${this.DEFAULT_MIGRATION_TABLE_NAME}
|
|
2968
|
+
SET status = $1, applied_at = CURRENT_TIMESTAMP
|
|
2969
|
+
WHERE status = $2`, [this.MIGRATION_STATUS_COMPLETED, this.MIGRATION_STATUS_PENDING]);
|
|
2970
|
+
await queryRunner.commitTransaction();
|
|
2971
|
+
this.ctx.logMigrations &&
|
|
2972
|
+
console.log('All migrations marked as applied.');
|
|
2973
|
+
}
|
|
2974
|
+
catch (error) {
|
|
2975
|
+
this.ctx.logMigrations &&
|
|
2976
|
+
console.error('Failed to mark all migrations as applied, rolling back:', error);
|
|
2977
|
+
await queryRunner.rollbackTransaction();
|
|
2978
|
+
}
|
|
2979
|
+
finally {
|
|
2980
|
+
await queryRunner.release();
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
async runAllNotCompletedMigrations() {
|
|
2984
|
+
if (this.ctx.remoteHost) {
|
|
2985
|
+
return;
|
|
2986
|
+
}
|
|
2987
|
+
const migrationsClassFns = this.ctx.getClassFunByArr(Models.ClassType.MIGRATION);
|
|
2988
|
+
const migrationClassesInstances = migrationsClassFns
|
|
2989
|
+
.map(classFn => this.ctx.getInstanceBy(classFn))
|
|
2990
|
+
.map(f => f)
|
|
2991
|
+
.filter(migrationInstance => migrationInstance.isReadyToRun());
|
|
2992
|
+
const queryRunner = this.ctx.connection.createQueryRunner();
|
|
2993
|
+
await queryRunner.connect();
|
|
2994
|
+
try {
|
|
2995
|
+
await queryRunner.startTransaction();
|
|
2996
|
+
const appliedMigrationsForContext = await queryRunner.query(`SELECT name, status FROM ${this.DEFAULT_MIGRATION_TABLE_NAME} ` +
|
|
2997
|
+
`WHERE context = $1`, [this.ctx.contextName]);
|
|
2998
|
+
const pendingMigrationsForContext = appliedMigrationsForContext.filter(m => m.status === this.MIGRATION_STATUS_PENDING);
|
|
2999
|
+
for (const pendingContextMigration of pendingMigrationsForContext) {
|
|
3000
|
+
const migrationInstance = migrationClassesInstances.find(instance => ClassHelpers.getName(instance) === pendingContextMigration.name);
|
|
3001
|
+
if (!migrationInstance) {
|
|
3002
|
+
this.ctx.logMigrations &&
|
|
3003
|
+
console.warn(`Pending migration ${pendingContextMigration.name} not found in loaded migrations.`);
|
|
3004
|
+
continue;
|
|
3005
|
+
}
|
|
3006
|
+
this.ctx.logMigrations &&
|
|
3007
|
+
console.log(`Completing pending migration: ${pendingContextMigration.name}`);
|
|
3008
|
+
await migrationInstance.up(queryRunner);
|
|
3009
|
+
await queryRunner.query(`UPDATE ${this.DEFAULT_MIGRATION_TABLE_NAME}
|
|
3010
|
+
SET status = $1, applied_at = CURRENT_TIMESTAMP
|
|
3011
|
+
WHERE name = $2`, [this.MIGRATION_STATUS_COMPLETED, pendingContextMigration.name]);
|
|
3012
|
+
}
|
|
3013
|
+
for (const instance of migrationClassesInstances) {
|
|
3014
|
+
const migrationName = ClassHelpers.getName(instance);
|
|
3015
|
+
if (appliedMigrationsForContext.some(m => m.name === migrationName)) {
|
|
3016
|
+
this.ctx.logMigrations &&
|
|
3017
|
+
console.log(`Skipping already applied migration: ${migrationName}`);
|
|
3018
|
+
continue;
|
|
3019
|
+
}
|
|
3020
|
+
this.ctx.logMigrations &&
|
|
3021
|
+
console.log(`Applying new migration: ${migrationName}`);
|
|
3022
|
+
await queryRunner.query(`INSERT INTO ${this.DEFAULT_MIGRATION_TABLE_NAME} (name, status, context, applied_at) ` +
|
|
3023
|
+
`VALUES ($1, $2, $3, NULL)`, [migrationName, this.MIGRATION_STATUS_PENDING, this.ctx.contextName]);
|
|
3024
|
+
try {
|
|
3025
|
+
await instance.up(queryRunner);
|
|
3026
|
+
await queryRunner.query(`UPDATE ${this.DEFAULT_MIGRATION_TABLE_NAME} ` +
|
|
3027
|
+
`SET status = '${this.MIGRATION_STATUS_COMPLETED}', applied_at = CURRENT_TIMESTAMP ` +
|
|
3028
|
+
`WHERE name = $1`, [migrationName]);
|
|
3029
|
+
}
|
|
3030
|
+
catch (error) {
|
|
3031
|
+
this.ctx.logMigrations &&
|
|
3032
|
+
console.error(`Failed to apply migration: ${migrationName}`, error);
|
|
3033
|
+
await queryRunner.query(`DELETE FROM ${this.DEFAULT_MIGRATION_TABLE_NAME} WHERE name = $1`, [migrationName]);
|
|
3034
|
+
throw error; // Rethrow to ensure the transaction is rolled back
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
await queryRunner.commitTransaction();
|
|
3038
|
+
}
|
|
3039
|
+
catch (error) {
|
|
3040
|
+
this.ctx.logMigrations &&
|
|
3041
|
+
console.error('Transaction failed, rolling back:', error);
|
|
3042
|
+
await queryRunner.rollbackTransaction();
|
|
3043
|
+
}
|
|
3044
|
+
finally {
|
|
3045
|
+
await queryRunner.release();
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
;
|
|
3050
|
+
({}); // @--end-of-file-for-module=taon lib/context-db-migrations.ts
|
|
3051
|
+
|
|
2788
3052
|
/* eslint-disable @typescript-eslint/typedef */
|
|
2789
3053
|
class EndpointContext {
|
|
2790
3054
|
static initNgZone(ngZone) {
|
|
2791
3055
|
this.ngZone = ngZone;
|
|
2792
3056
|
}
|
|
3057
|
+
get isRunOrRevertOnlyMigrationAppStart() {
|
|
3058
|
+
return !!(this.onlyMigrationRun || this.onlyMigrationRevertToTimestamp);
|
|
3059
|
+
}
|
|
2793
3060
|
get realtimeClient() {
|
|
2794
3061
|
return this.realtime.client;
|
|
2795
3062
|
}
|
|
@@ -2820,6 +3087,12 @@ class EndpointContext {
|
|
|
2820
3087
|
}
|
|
2821
3088
|
return this.config?.logs === true;
|
|
2822
3089
|
}
|
|
3090
|
+
get logMigrations() {
|
|
3091
|
+
if (_$1.isObject(this.config?.logs)) {
|
|
3092
|
+
return !!this.config.logs.migrations;
|
|
3093
|
+
}
|
|
3094
|
+
return this.config?.logs === true;
|
|
3095
|
+
}
|
|
2823
3096
|
constructor(originalConfig, configFn) {
|
|
2824
3097
|
this.originalConfig = originalConfig;
|
|
2825
3098
|
this.configFn = configFn;
|
|
@@ -2829,6 +3102,7 @@ class EndpointContext {
|
|
|
2829
3102
|
* (with init() function )
|
|
2830
3103
|
*/
|
|
2831
3104
|
this.inited = false;
|
|
3105
|
+
this.dbMigrations = new ContextDbMigrations(this);
|
|
2832
3106
|
this.localInstaceObjSymbol = Symbol('localInstaceObjSymbol');
|
|
2833
3107
|
/**
|
|
2834
3108
|
* all instances of classes from context
|
|
@@ -2843,12 +3117,15 @@ class EndpointContext {
|
|
|
2843
3117
|
Models.ClassType.PROVIDER,
|
|
2844
3118
|
Models.ClassType.REPOSITORY,
|
|
2845
3119
|
Models.ClassType.SUBSCRIBER,
|
|
3120
|
+
Models.ClassType.MIGRATION,
|
|
2846
3121
|
];
|
|
2847
3122
|
this.allTypesfromContexts = [
|
|
2848
3123
|
...this.injectableTypesfromContexts,
|
|
2849
3124
|
Models.ClassType.ENTITY,
|
|
2850
3125
|
];
|
|
2851
3126
|
this.expressApp = {};
|
|
3127
|
+
this.onlyMigrationRun = false;
|
|
3128
|
+
this.onlyMigrationRevertToTimestamp = undefined;
|
|
2852
3129
|
this.entitiesTriggers = {};
|
|
2853
3130
|
this.cloneClassWithNewMetadata = ({ BaseClass, className, config, ctx, classType, }) => {
|
|
2854
3131
|
const cloneClass = () => {
|
|
@@ -2916,26 +3193,45 @@ class EndpointContext {
|
|
|
2916
3193
|
};
|
|
2917
3194
|
}
|
|
2918
3195
|
async init(options) {
|
|
2919
|
-
const { initFromRecrusiveContextResovle, overrideHost, overrideRemoteHost } = options || {}; // TODO use it ?
|
|
3196
|
+
const { initFromRecrusiveContextResovle, overrideHost, overrideRemoteHost, onlyMigrationRun, onlyMigrationRevertToTimestamp, } = options || {}; // TODO use it ?
|
|
2920
3197
|
this.inited = true;
|
|
3198
|
+
// @ts-ignore
|
|
3199
|
+
this.onlyMigrationRun = onlyMigrationRun;
|
|
3200
|
+
// @ts-ignore
|
|
3201
|
+
this.onlyMigrationRevertToTimestamp = onlyMigrationRevertToTimestamp;
|
|
2921
3202
|
this.config = this.configFn(ENV$1);
|
|
3203
|
+
if (_$1.isObject(this.config.database)) {
|
|
3204
|
+
this.config.database = Models.DatabaseConfig.from(this.config.database).databaseConfigTypeORM;
|
|
3205
|
+
}
|
|
2922
3206
|
if (overrideHost && overrideRemoteHost) {
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
3207
|
+
Helpers.throw(`[taon-config] You can't have overrideHost and overrideRemoteHost at the same time`);
|
|
3208
|
+
}
|
|
3209
|
+
this.config.host = !_$1.isUndefined(overrideHost)
|
|
3210
|
+
? overrideHost
|
|
3211
|
+
: this.config.host;
|
|
3212
|
+
this.config.remoteHost = !_$1.isUndefined(overrideRemoteHost)
|
|
3213
|
+
? overrideRemoteHost
|
|
3214
|
+
: this.config.remoteHost;
|
|
3215
|
+
this.config.host = this.host === null ? void 0 : this.host;
|
|
3216
|
+
this.config.remoteHost =
|
|
3217
|
+
this.remoteHost === null ? void 0 : this.remoteHost;
|
|
3218
|
+
if (this.config.host &&
|
|
3219
|
+
!this.config.host.startsWith('http://') &&
|
|
3220
|
+
!this.config.host.startsWith('https://')) {
|
|
3221
|
+
Helpers.throw(`[taon-config] Your 'host' must start with http:// or https://`);
|
|
3222
|
+
}
|
|
3223
|
+
if (this.config.remoteHost &&
|
|
3224
|
+
!this.config.remoteHost.startsWith('http://') &&
|
|
3225
|
+
!this.config.remoteHost.startsWith('https://')) {
|
|
3226
|
+
Helpers.throw(`[taon-config] Your 'remoteHost' must start with http:// or https://`);
|
|
2929
3227
|
}
|
|
2930
|
-
this.config.host = overrideHost ? overrideHost : this.config.host;
|
|
2931
|
-
this.config.remoteHost = overrideRemoteHost ? overrideRemoteHost : this.config.remoteHost;
|
|
2932
3228
|
if (this.config.host) {
|
|
2933
3229
|
this.mode = 'backend-frontend(tcp+udp)';
|
|
2934
3230
|
this.mode = 'backend-frontend(websql)';
|
|
2935
3231
|
}
|
|
2936
3232
|
if (this.config.remoteHost) {
|
|
2937
3233
|
if (this.config.host) {
|
|
2938
|
-
Helpers.
|
|
3234
|
+
Helpers.throw(`[taon] You can't have remoteHost and host at the same time`);
|
|
2939
3235
|
}
|
|
2940
3236
|
this.mode = 'remote-backend(tcp+udp)';
|
|
2941
3237
|
}
|
|
@@ -2956,7 +3252,7 @@ class EndpointContext {
|
|
|
2956
3252
|
this.databaseConfig = this.getAutoGeneratedConfig();
|
|
2957
3253
|
}
|
|
2958
3254
|
else if (_$1.isObject(this.config.database)) {
|
|
2959
|
-
this.databaseConfig = _$1.cloneDeep(this.config.database);
|
|
3255
|
+
this.databaseConfig = _$1.merge(this.getAutoGeneratedConfig(), _$1.cloneDeep(this.config.database));
|
|
2960
3256
|
}
|
|
2961
3257
|
if (this.config.session) {
|
|
2962
3258
|
this.session = _$1.cloneDeep(this.config.session);
|
|
@@ -2972,6 +3268,7 @@ class EndpointContext {
|
|
|
2972
3268
|
this.config.repositories = this.config.repositories || {};
|
|
2973
3269
|
this.config.providers = this.config.providers || {};
|
|
2974
3270
|
this.config.subscribers = this.config.subscribers || {};
|
|
3271
|
+
this.config.migrations = this.config.migrations || {};
|
|
2975
3272
|
this.config.entities = {
|
|
2976
3273
|
...(await this.getRecrusiveClassesfromContextsObj(Models.ClassType.ENTITY)),
|
|
2977
3274
|
...this.config.entities,
|
|
@@ -2992,6 +3289,10 @@ class EndpointContext {
|
|
|
2992
3289
|
...(await this.getRecrusiveClassesfromContextsObj(Models.ClassType.REPOSITORY)),
|
|
2993
3290
|
...this.config.repositories,
|
|
2994
3291
|
};
|
|
3292
|
+
this.config.migrations = {
|
|
3293
|
+
...(await this.getRecrusiveClassesfromContextsObj(Models.ClassType.MIGRATION)),
|
|
3294
|
+
...this.config.migrations,
|
|
3295
|
+
};
|
|
2995
3296
|
this.config.controllers = this.cloneClassesObjWithNewMetadata({
|
|
2996
3297
|
classesInput: this.config.controllers,
|
|
2997
3298
|
config: this.config,
|
|
@@ -3016,6 +3317,12 @@ class EndpointContext {
|
|
|
3016
3317
|
ctx: this,
|
|
3017
3318
|
classType: Models.ClassType.SUBSCRIBER,
|
|
3018
3319
|
});
|
|
3320
|
+
this.config.migrations = this.cloneClassesObjWithNewMetadata({
|
|
3321
|
+
classesInput: this.config.migrations,
|
|
3322
|
+
config: this.config,
|
|
3323
|
+
ctx: this,
|
|
3324
|
+
classType: Models.ClassType.MIGRATION,
|
|
3325
|
+
});
|
|
3019
3326
|
for (const classTypeName of this.injectableTypesfromContexts) {
|
|
3020
3327
|
this.classInstancesByNameObj[classTypeName] = {};
|
|
3021
3328
|
this.objWithClassesInstancesArr[classTypeName] = [];
|
|
@@ -3023,35 +3330,37 @@ class EndpointContext {
|
|
|
3023
3330
|
for (const classTypeName of this.injectableTypesfromContexts) {
|
|
3024
3331
|
await this.createInstances(this.config[Models.ClassTypeKey[classTypeName]], classTypeName);
|
|
3025
3332
|
}
|
|
3026
|
-
if (
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3333
|
+
if (!this.isRunOrRevertOnlyMigrationAppStart) {
|
|
3334
|
+
if (this.mode === 'backend-frontend(tcp+udp)' && !this.config.abstract) {
|
|
3335
|
+
/* */
|
|
3336
|
+
/* */
|
|
3337
|
+
/* */
|
|
3338
|
+
/* */
|
|
3339
|
+
/* */
|
|
3340
|
+
/* */
|
|
3341
|
+
/* */
|
|
3342
|
+
/* */
|
|
3343
|
+
/* */
|
|
3344
|
+
/* */
|
|
3345
|
+
/* */
|
|
3346
|
+
/* */
|
|
3347
|
+
/* */
|
|
3348
|
+
/* */
|
|
3349
|
+
/* */
|
|
3350
|
+
/* */
|
|
3351
|
+
/* */
|
|
3352
|
+
/* */
|
|
3353
|
+
/* */
|
|
3354
|
+
}
|
|
3355
|
+
if (!this.config.abstract) {
|
|
3356
|
+
this.disabledRealtime = !!this.config.disabledRealtime;
|
|
3357
|
+
/* */
|
|
3358
|
+
/* */
|
|
3359
|
+
/* */
|
|
3360
|
+
/* */
|
|
3361
|
+
/* */
|
|
3362
|
+
this.realtime = new RealtimeCore(this);
|
|
3363
|
+
}
|
|
3055
3364
|
}
|
|
3056
3365
|
if (this.config.abstract) {
|
|
3057
3366
|
this.logFramework &&
|
|
@@ -3072,73 +3381,59 @@ class EndpointContext {
|
|
|
3072
3381
|
});
|
|
3073
3382
|
}
|
|
3074
3383
|
getAutoGeneratedConfig() {
|
|
3075
|
-
let databaseConfig;
|
|
3076
|
-
if (
|
|
3384
|
+
let databaseConfig = Models.DatabaseConfig.from({});
|
|
3385
|
+
if (UtilsOs.isRunningInDocker()) {
|
|
3077
3386
|
Helpers.info('Running in docker, using in mysql database');
|
|
3078
|
-
databaseConfig = {
|
|
3079
|
-
database: `
|
|
3387
|
+
databaseConfig = Models.DatabaseConfig.from({
|
|
3388
|
+
database: `db-${this.contextName}.sqlite`,
|
|
3080
3389
|
type: 'mysql',
|
|
3081
|
-
|
|
3082
|
-
synchronize: true,
|
|
3083
|
-
dropSchema: true,
|
|
3390
|
+
recreateMode: 'PRESERVE_DATA+MIGRATIONS',
|
|
3084
3391
|
logging: this.logDb,
|
|
3085
3392
|
databasePort: 3306,
|
|
3086
3393
|
databaseHost: 'localhost',
|
|
3087
3394
|
databaseUsername: 'root',
|
|
3088
3395
|
databasePassword: 'admin',
|
|
3089
|
-
};
|
|
3396
|
+
});
|
|
3090
3397
|
}
|
|
3091
3398
|
else {
|
|
3092
3399
|
this.logFramework &&
|
|
3093
3400
|
Helpers.info(`[taon][database] Automatically resolving database config for mode ${this.mode}`);
|
|
3094
3401
|
switch (this.mode) {
|
|
3095
3402
|
case 'backend-frontend(ipc-electron)':
|
|
3096
|
-
|
|
3097
|
-
location: `
|
|
3403
|
+
databaseConfig = Models.DatabaseConfig.from({
|
|
3404
|
+
location: `db-${this.contextName}.sqlite`,
|
|
3098
3405
|
type: 'sqljs',
|
|
3099
|
-
|
|
3100
|
-
synchronize: true,
|
|
3101
|
-
dropSchema: true,
|
|
3406
|
+
recreateMode: 'DROP_DB+MIGRATIONS',
|
|
3102
3407
|
logging: this.logDb,
|
|
3103
|
-
};
|
|
3408
|
+
});
|
|
3104
3409
|
break;
|
|
3105
3410
|
case 'backend-frontend(websql-electron)':
|
|
3106
3411
|
case 'backend-frontend(websql)':
|
|
3107
|
-
|
|
3108
|
-
|
|
3412
|
+
let keepWebsqlDbDataAfterReload = false;
|
|
3413
|
+
keepWebsqlDbDataAfterReload =
|
|
3414
|
+
TaonAdminService.Instance?.keepWebsqlDbDataAfterReload; // TODO @LAST
|
|
3415
|
+
databaseConfig = databaseConfig = Models.DatabaseConfig.from({
|
|
3416
|
+
location: `db-${this.contextName}.sqlite`,
|
|
3109
3417
|
type: 'sqljs',
|
|
3110
3418
|
useLocalForage: true, // !!window['localforage'], // TODO this need to be checked in runtime
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3419
|
+
recreateMode: keepWebsqlDbDataAfterReload
|
|
3420
|
+
? 'PRESERVE_DATA+MIGRATIONS'
|
|
3421
|
+
: 'DROP_DB+MIGRATIONS',
|
|
3114
3422
|
logging: this.logDb,
|
|
3115
|
-
};
|
|
3116
|
-
let keepWebsqlDbDataAfterReload = false;
|
|
3117
|
-
keepWebsqlDbDataAfterReload =
|
|
3118
|
-
TaonAdmin.Instance.keepWebsqlDbDataAfterReload;
|
|
3119
|
-
if (keepWebsqlDbDataAfterReload) {
|
|
3120
|
-
databaseConfig.dropSchema = false;
|
|
3121
|
-
delete databaseConfig.synchronize; // false is not auto synchonize - from what I understand
|
|
3122
|
-
}
|
|
3123
|
-
else {
|
|
3124
|
-
databaseConfig.dropSchema = true;
|
|
3125
|
-
databaseConfig.synchronize = true;
|
|
3126
|
-
}
|
|
3423
|
+
});
|
|
3127
3424
|
break;
|
|
3128
3425
|
case 'backend-frontend(tcp+udp)':
|
|
3129
|
-
databaseConfig = {
|
|
3130
|
-
database: `context-db-${
|
|
3131
|
-
location: `
|
|
3426
|
+
databaseConfig = Models.DatabaseConfig.from({
|
|
3427
|
+
database: `context-db-${this.contextName}`,
|
|
3428
|
+
location: `db-${this.contextName}.sqlite`,
|
|
3132
3429
|
type: 'sqljs',
|
|
3133
|
-
|
|
3134
|
-
synchronize: true,
|
|
3135
|
-
dropSchema: true,
|
|
3430
|
+
recreateMode: 'DROP_DB+MIGRATIONS',
|
|
3136
3431
|
logging: this.logDb,
|
|
3137
|
-
};
|
|
3432
|
+
});
|
|
3138
3433
|
break;
|
|
3139
3434
|
}
|
|
3140
3435
|
}
|
|
3141
|
-
return databaseConfig;
|
|
3436
|
+
return databaseConfig.databaseConfigTypeORM;
|
|
3142
3437
|
}
|
|
3143
3438
|
get ngZone() {
|
|
3144
3439
|
return EndpointContext.ngZone;
|
|
@@ -3298,6 +3593,8 @@ class EndpointContext {
|
|
|
3298
3593
|
return this.config.repositories;
|
|
3299
3594
|
case Models.ClassType.SUBSCRIBER:
|
|
3300
3595
|
return this.config.subscribers;
|
|
3596
|
+
case Models.ClassType.MIGRATION:
|
|
3597
|
+
return this.config.migrations;
|
|
3301
3598
|
}
|
|
3302
3599
|
}
|
|
3303
3600
|
isCLassType(classType, classFn) {
|
|
@@ -3336,7 +3633,7 @@ class EndpointContext {
|
|
|
3336
3633
|
}
|
|
3337
3634
|
}
|
|
3338
3635
|
async reinitControllers() {
|
|
3339
|
-
if (this.remoteHost) {
|
|
3636
|
+
if (this.remoteHost || Object.keys(this.config.migrations).length > 0) {
|
|
3340
3637
|
return;
|
|
3341
3638
|
}
|
|
3342
3639
|
const controllers = this.getClassesInstancesArrBy(Models.ClassType.CONTROLLER);
|
|
@@ -3358,6 +3655,7 @@ class EndpointContext {
|
|
|
3358
3655
|
Models.ClassType.REPOSITORY,
|
|
3359
3656
|
Models.ClassType.CONTROLLER,
|
|
3360
3657
|
Models.ClassType.ENTITY,
|
|
3658
|
+
Models.ClassType.MIGRATION,
|
|
3361
3659
|
]) {
|
|
3362
3660
|
for (const classFun of this.getClassFunByArr(classTypeName)) {
|
|
3363
3661
|
if (_$1.isFunction(classFun._)) {
|
|
@@ -3372,6 +3670,7 @@ class EndpointContext {
|
|
|
3372
3670
|
Models.ClassType.PROVIDER,
|
|
3373
3671
|
Models.ClassType.REPOSITORY,
|
|
3374
3672
|
Models.ClassType.CONTROLLER,
|
|
3673
|
+
Models.ClassType.MIGRATION,
|
|
3375
3674
|
]) {
|
|
3376
3675
|
for (const ctrl of this.getClassesInstancesArrBy(classTypeName)) {
|
|
3377
3676
|
if (_$1.isFunction(ctrl._)) {
|
|
@@ -3455,14 +3754,10 @@ class EndpointContext {
|
|
|
3455
3754
|
if (this.remoteHost) {
|
|
3456
3755
|
return;
|
|
3457
3756
|
}
|
|
3458
|
-
const entities =
|
|
3459
|
-
? this.config.override.entities
|
|
3460
|
-
: this.getClassFunByArr(Models.ClassType.ENTITY)).map(entityFn => {
|
|
3757
|
+
const entities = this.getClassFunByArr(Models.ClassType.ENTITY).map(entityFn => {
|
|
3461
3758
|
return ClassHelpers.getOrginalClass(entityFn);
|
|
3462
3759
|
});
|
|
3463
|
-
const subscribers = this.
|
|
3464
|
-
? this.config.override.subscribers
|
|
3465
|
-
: this.getClassFunByArr(Models.ClassType.SUBSCRIBER);
|
|
3760
|
+
const subscribers = this.getClassFunByArr(Models.ClassType.SUBSCRIBER);
|
|
3466
3761
|
const dataSourceDbConfig = _$1.isObject(this.databaseConfig)
|
|
3467
3762
|
? {
|
|
3468
3763
|
type: this.databaseConfig.type,
|
|
@@ -3474,9 +3769,15 @@ class EndpointContext {
|
|
|
3474
3769
|
useLocalForage: this.databaseConfig.useLocalForage,
|
|
3475
3770
|
entities,
|
|
3476
3771
|
subscribers,
|
|
3477
|
-
synchronize: this.
|
|
3478
|
-
|
|
3479
|
-
|
|
3772
|
+
synchronize: this.isRunOrRevertOnlyMigrationAppStart
|
|
3773
|
+
? false
|
|
3774
|
+
: this.databaseConfig.synchronize,
|
|
3775
|
+
autoSave: !_$1.isNil(this.databaseConfig.autoSave)
|
|
3776
|
+
? this.databaseConfig.autoSave
|
|
3777
|
+
: !UtilsOs.isRunningInDocker(), // in docker I am using mysql or posgress
|
|
3778
|
+
dropSchema: this.isRunOrRevertOnlyMigrationAppStart
|
|
3779
|
+
? false
|
|
3780
|
+
: this.databaseConfig.dropSchema,
|
|
3480
3781
|
logging: !!this.databaseConfig.logging,
|
|
3481
3782
|
location: this.databaseConfig.location,
|
|
3482
3783
|
}
|
|
@@ -3501,7 +3802,7 @@ class EndpointContext {
|
|
|
3501
3802
|
/* */
|
|
3502
3803
|
/* */
|
|
3503
3804
|
}
|
|
3504
|
-
(this.logDb || this.logFramework)
|
|
3805
|
+
if (this.logDb || this.logFramework) {
|
|
3505
3806
|
console.info(`
|
|
3506
3807
|
|
|
3507
3808
|
CONTECTION OK for ${this.contextName} - ${this.mode}
|
|
@@ -3509,13 +3810,18 @@ class EndpointContext {
|
|
|
3509
3810
|
[taon][typeorm] db prepration done.. db initialize=${this.connection?.isInitialized}
|
|
3510
3811
|
|
|
3511
3812
|
|
|
3512
|
-
`, dataSourceDbConfig);
|
|
3813
|
+
`, dataSourceDbConfig, { 'this.connection': !!this.connection });
|
|
3814
|
+
console.log(`Database file location: ${this.connection.options.database}`);
|
|
3815
|
+
}
|
|
3513
3816
|
}
|
|
3514
3817
|
else {
|
|
3515
3818
|
Helpers.info(`[taon][typeorm] Not initing db for mode ${this.mode}`);
|
|
3516
3819
|
}
|
|
3517
3820
|
}
|
|
3518
|
-
|
|
3821
|
+
initControllers() {
|
|
3822
|
+
if (this.isRunOrRevertOnlyMigrationAppStart) {
|
|
3823
|
+
return;
|
|
3824
|
+
}
|
|
3519
3825
|
const allControllers = this.getClassFunByArr(Models.ClassType.CONTROLLER);
|
|
3520
3826
|
for (const controllerClassFn of allControllers) {
|
|
3521
3827
|
controllerClassFn[Symbols.classMethodsNames] =
|
|
@@ -3586,7 +3892,7 @@ class EndpointContext {
|
|
|
3586
3892
|
}
|
|
3587
3893
|
}
|
|
3588
3894
|
writeActiveRoutes() {
|
|
3589
|
-
if (this.remoteHost) {
|
|
3895
|
+
if (this.remoteHost || this.isRunOrRevertOnlyMigrationAppStart) {
|
|
3590
3896
|
return;
|
|
3591
3897
|
}
|
|
3592
3898
|
const contexts = [this];
|
|
@@ -4299,6 +4605,9 @@ const createContext = (configFn) => {
|
|
|
4299
4605
|
get subscribers() {
|
|
4300
4606
|
return config.subscribers;
|
|
4301
4607
|
},
|
|
4608
|
+
get migrations() {
|
|
4609
|
+
return config.migrations;
|
|
4610
|
+
},
|
|
4302
4611
|
},
|
|
4303
4612
|
get contexts() {
|
|
4304
4613
|
return config.contexts;
|
|
@@ -4319,9 +4628,9 @@ const createContext = (configFn) => {
|
|
|
4319
4628
|
return endpointContextRef;
|
|
4320
4629
|
},
|
|
4321
4630
|
/**
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4631
|
+
* only for internal use
|
|
4632
|
+
* @deprecated
|
|
4633
|
+
*/
|
|
4325
4634
|
get __refSync() {
|
|
4326
4635
|
return endpointContextRef;
|
|
4327
4636
|
},
|
|
@@ -4348,19 +4657,30 @@ const createContext = (configFn) => {
|
|
|
4348
4657
|
await endpointContextRef.initEntities();
|
|
4349
4658
|
await endpointContextRef.initSubscribers();
|
|
4350
4659
|
await endpointContextRef.initDatabaseConnection();
|
|
4351
|
-
endpointContextRef.
|
|
4660
|
+
await endpointContextRef.dbMigrations.ensureMigrationTableExists();
|
|
4661
|
+
endpointContextRef.initControllers();
|
|
4352
4662
|
endpointContextRef.startServer();
|
|
4353
4663
|
endpointContextRef.writeActiveRoutes();
|
|
4354
4664
|
await endpointContextRef.initClasses();
|
|
4355
4665
|
let keepWebsqlDbDataAfterReload = false;
|
|
4356
4666
|
keepWebsqlDbDataAfterReload =
|
|
4357
|
-
|
|
4667
|
+
TaonAdminService.Instance?.keepWebsqlDbDataAfterReload;
|
|
4358
4668
|
if (!Helpers.isNode && keepWebsqlDbDataAfterReload) {
|
|
4359
4669
|
Helpers.info(`[taon] Keep websql data after reload`);
|
|
4360
4670
|
}
|
|
4361
4671
|
else {
|
|
4362
4672
|
await endpointContextRef.reinitControllers();
|
|
4363
4673
|
}
|
|
4674
|
+
///#region TODO this may be usefull but for now
|
|
4675
|
+
if (endpointContextRef.onlyMigrationRun) {
|
|
4676
|
+
await endpointContextRef.dbMigrations.runAllNotCompletedMigrations();
|
|
4677
|
+
}
|
|
4678
|
+
else if (endpointContextRef.onlyMigrationRevertToTimestamp) {
|
|
4679
|
+
await endpointContextRef.dbMigrations.revertMigrationToTimestamp(endpointContextRef.onlyMigrationRevertToTimestamp);
|
|
4680
|
+
}
|
|
4681
|
+
else {
|
|
4682
|
+
await endpointContextRef.dbMigrations.runAllNotCompletedMigrations();
|
|
4683
|
+
}
|
|
4364
4684
|
resolve(endpointContextRef);
|
|
4365
4685
|
});
|
|
4366
4686
|
});
|
|
@@ -4376,7 +4696,7 @@ const createContext = (configFn) => {
|
|
|
4376
4696
|
},
|
|
4377
4697
|
get server() {
|
|
4378
4698
|
return endpointContextRef.realtimeServer;
|
|
4379
|
-
}
|
|
4699
|
+
},
|
|
4380
4700
|
};
|
|
4381
4701
|
},
|
|
4382
4702
|
};
|
|
@@ -4401,9 +4721,12 @@ var baseContext = /*#__PURE__*/Object.freeze({
|
|
|
4401
4721
|
BaseContext: BaseContext
|
|
4402
4722
|
});
|
|
4403
4723
|
|
|
4724
|
+
/**
|
|
4725
|
+
* Subscriber decorator
|
|
4726
|
+
*/
|
|
4404
4727
|
function TaonSubscriber(options) {
|
|
4405
4728
|
return function (constructor) {
|
|
4406
|
-
Reflect.defineMetadata(Symbols.metadata.options.
|
|
4729
|
+
Reflect.defineMetadata(Symbols.metadata.options.subscriber, options, constructor);
|
|
4407
4730
|
Reflect.defineMetadata(Symbols.metadata.className, options?.className || constructor.name, constructor);
|
|
4408
4731
|
ClassHelpers.setName(constructor, options?.className);
|
|
4409
4732
|
};
|
|
@@ -4418,133 +4741,133 @@ let BaseSubscriberForEntity = class BaseSubscriberForEntity extends BaseInjector
|
|
|
4418
4741
|
* Called after entity is loaded.
|
|
4419
4742
|
*/
|
|
4420
4743
|
afterLoad(entity) {
|
|
4421
|
-
this.
|
|
4744
|
+
this.ctx.logDb &&
|
|
4422
4745
|
console.log(`AFTER ENTITY LOADED: `, entity);
|
|
4423
4746
|
}
|
|
4424
4747
|
/**
|
|
4425
4748
|
* Called before query execution.
|
|
4426
4749
|
*/
|
|
4427
4750
|
beforeQuery(event) {
|
|
4428
|
-
this.
|
|
4751
|
+
this.ctx.logDb &&
|
|
4429
4752
|
console.log(`BEFORE QUERY: `, event.query);
|
|
4430
4753
|
}
|
|
4431
4754
|
/**
|
|
4432
4755
|
* Called after query execution.
|
|
4433
4756
|
*/
|
|
4434
4757
|
afterQuery(event) {
|
|
4435
|
-
this.
|
|
4758
|
+
this.ctx.logDb &&
|
|
4436
4759
|
console.log(`AFTER QUERY: `, event.query);
|
|
4437
4760
|
}
|
|
4438
4761
|
/**
|
|
4439
4762
|
* Called before entity insertion.
|
|
4440
4763
|
*/
|
|
4441
4764
|
beforeInsert(event) {
|
|
4442
|
-
this.
|
|
4765
|
+
this.ctx.logDb &&
|
|
4443
4766
|
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
|
|
4444
4767
|
}
|
|
4445
4768
|
/**
|
|
4446
4769
|
* Called after entity insertion.
|
|
4447
4770
|
*/
|
|
4448
4771
|
afterInsert(event) {
|
|
4449
|
-
this.
|
|
4772
|
+
this.ctx.logDb &&
|
|
4450
4773
|
console.log(`AFTER ENTITY INSERTED: `, event.entity);
|
|
4451
4774
|
}
|
|
4452
4775
|
/**
|
|
4453
4776
|
* Called before entity update.
|
|
4454
4777
|
*/
|
|
4455
4778
|
beforeUpdate(event) {
|
|
4456
|
-
this.
|
|
4779
|
+
this.ctx.logDb &&
|
|
4457
4780
|
console.log(`BEFORE ENTITY UPDATED: `, event.entity);
|
|
4458
4781
|
}
|
|
4459
4782
|
/**
|
|
4460
4783
|
* Called after entity update.
|
|
4461
4784
|
*/
|
|
4462
4785
|
afterUpdate(event) {
|
|
4463
|
-
this.
|
|
4786
|
+
this.ctx.logDb &&
|
|
4464
4787
|
console.log(`AFTER ENTITY UPDATED: `, event.entity);
|
|
4465
4788
|
}
|
|
4466
4789
|
/**
|
|
4467
4790
|
* Called before entity removal.
|
|
4468
4791
|
*/
|
|
4469
4792
|
beforeRemove(event) {
|
|
4470
|
-
this.
|
|
4793
|
+
this.ctx.logDb &&
|
|
4471
4794
|
console.log(`BEFORE ENTITY WITH ID ${event.entityId} REMOVED: `, event.entity);
|
|
4472
4795
|
}
|
|
4473
4796
|
/**
|
|
4474
4797
|
* Called after entity removal.
|
|
4475
4798
|
*/
|
|
4476
4799
|
afterRemove(event) {
|
|
4477
|
-
this.
|
|
4800
|
+
this.ctx.logDb &&
|
|
4478
4801
|
console.log(`AFTER ENTITY WITH ID ${event.entityId} REMOVED: `, event.entity);
|
|
4479
4802
|
}
|
|
4480
4803
|
/**
|
|
4481
4804
|
* Called before entity removal.
|
|
4482
4805
|
*/
|
|
4483
4806
|
beforeSoftRemove(event) {
|
|
4484
|
-
this.
|
|
4807
|
+
this.ctx.logDb &&
|
|
4485
4808
|
console.log(`BEFORE ENTITY WITH ID ${event.entityId} SOFT REMOVED: `, event.entity);
|
|
4486
4809
|
}
|
|
4487
4810
|
/**
|
|
4488
4811
|
* Called after entity removal.
|
|
4489
4812
|
*/
|
|
4490
4813
|
afterSoftRemove(event) {
|
|
4491
|
-
this.
|
|
4814
|
+
this.ctx.logDb &&
|
|
4492
4815
|
console.log(`AFTER ENTITY WITH ID ${event.entityId} SOFT REMOVED: `, event.entity);
|
|
4493
4816
|
}
|
|
4494
4817
|
/**
|
|
4495
4818
|
* Called before entity recovery.
|
|
4496
4819
|
*/
|
|
4497
4820
|
beforeRecover(event) {
|
|
4498
|
-
this.
|
|
4821
|
+
this.ctx.logDb &&
|
|
4499
4822
|
console.log(`BEFORE ENTITY WITH ID ${event.entityId} RECOVERED: `, event.entity);
|
|
4500
4823
|
}
|
|
4501
4824
|
/**
|
|
4502
4825
|
* Called after entity recovery.
|
|
4503
4826
|
*/
|
|
4504
4827
|
afterRecover(event) {
|
|
4505
|
-
this.
|
|
4828
|
+
this.ctx.logDb &&
|
|
4506
4829
|
console.log(`AFTER ENTITY WITH ID ${event.entityId} RECOVERED: `, event.entity);
|
|
4507
4830
|
}
|
|
4508
4831
|
/**
|
|
4509
4832
|
* Called before transaction start.
|
|
4510
4833
|
*/
|
|
4511
4834
|
beforeTransactionStart(event) {
|
|
4512
|
-
this.
|
|
4835
|
+
this.ctx.logDb &&
|
|
4513
4836
|
console.log(`BEFORE TRANSACTION STARTED: `, event);
|
|
4514
4837
|
}
|
|
4515
4838
|
/**
|
|
4516
4839
|
* Called after transaction start.
|
|
4517
4840
|
*/
|
|
4518
4841
|
afterTransactionStart(event) {
|
|
4519
|
-
this.
|
|
4842
|
+
this.ctx.logDb &&
|
|
4520
4843
|
console.log(`AFTER TRANSACTION STARTED: `, event);
|
|
4521
4844
|
}
|
|
4522
4845
|
/**
|
|
4523
4846
|
* Called before transaction commit.
|
|
4524
4847
|
*/
|
|
4525
4848
|
beforeTransactionCommit(event) {
|
|
4526
|
-
this.
|
|
4849
|
+
this.ctx.logDb &&
|
|
4527
4850
|
console.log(`BEFORE TRANSACTION COMMITTED: `, event);
|
|
4528
4851
|
}
|
|
4529
4852
|
/**
|
|
4530
4853
|
* Called after transaction commit.
|
|
4531
4854
|
*/
|
|
4532
4855
|
afterTransactionCommit(event) {
|
|
4533
|
-
this.
|
|
4856
|
+
this.ctx.logDb &&
|
|
4534
4857
|
console.log(`AFTER TRANSACTION COMMITTED: `, event);
|
|
4535
4858
|
}
|
|
4536
4859
|
/**
|
|
4537
4860
|
* Called before transaction rollback.
|
|
4538
4861
|
*/
|
|
4539
4862
|
beforeTransactionRollback(event) {
|
|
4540
|
-
this.
|
|
4863
|
+
this.ctx.logDb &&
|
|
4541
4864
|
console.log(`BEFORE TRANSACTION ROLLBACK: `, event);
|
|
4542
4865
|
}
|
|
4543
4866
|
/**
|
|
4544
4867
|
* Called after transaction rollback.
|
|
4545
4868
|
*/
|
|
4546
4869
|
afterTransactionRollback(event) {
|
|
4547
|
-
this.
|
|
4870
|
+
this.ctx.logDb &&
|
|
4548
4871
|
console.log(`AFTER TRANSACTION ROLLBACK: `, event);
|
|
4549
4872
|
}
|
|
4550
4873
|
};
|
|
@@ -4556,6 +4879,26 @@ BaseSubscriberForEntity = __decorate([
|
|
|
4556
4879
|
;
|
|
4557
4880
|
({}); // @--end-of-file-for-module=taon lib/base-classes/base-subscriber-for-entity.ts
|
|
4558
4881
|
|
|
4882
|
+
class BaseMigration extends BaseInjector {
|
|
4883
|
+
/**
|
|
4884
|
+
* by default is READY to run
|
|
4885
|
+
*/
|
|
4886
|
+
isReadyToRun() {
|
|
4887
|
+
return true;
|
|
4888
|
+
}
|
|
4889
|
+
getDescription() {
|
|
4890
|
+
return _$1.startCase(ClassHelpers.getName(this));
|
|
4891
|
+
}
|
|
4892
|
+
async up(queryRunner) {
|
|
4893
|
+
console.log(`Running migration UP "${ClassHelpers.getName(this)}"`);
|
|
4894
|
+
}
|
|
4895
|
+
async down(queryRunner) {
|
|
4896
|
+
console.log(`Running migration DOWN "${ClassHelpers.getName(this)}"`);
|
|
4897
|
+
}
|
|
4898
|
+
}
|
|
4899
|
+
;
|
|
4900
|
+
({}); // @--end-of-file-for-module=taon lib/base-classes/base-migration.ts
|
|
4901
|
+
|
|
4559
4902
|
var Base;
|
|
4560
4903
|
(function (Base) {
|
|
4561
4904
|
Base.Controller = BaseController;
|
|
@@ -4566,11 +4909,15 @@ var Base;
|
|
|
4566
4909
|
Base.Class = BaseClass;
|
|
4567
4910
|
Base.Repository = BaseRepository;
|
|
4568
4911
|
Base.SubscriberForEntity = BaseSubscriberForEntity;
|
|
4912
|
+
Base.Migration = BaseMigration;
|
|
4569
4913
|
Base.Context = BaseContext;
|
|
4570
4914
|
})(Base || (Base = {}));
|
|
4571
4915
|
;
|
|
4572
4916
|
({}); // @--end-of-file-for-module=taon lib/base-classes/base.ts
|
|
4573
4917
|
|
|
4918
|
+
/**
|
|
4919
|
+
* Entity decorator
|
|
4920
|
+
*/
|
|
4574
4921
|
function TaonEntity(options) {
|
|
4575
4922
|
return function (constructor) {
|
|
4576
4923
|
options = options || {};
|
|
@@ -4589,6 +4936,9 @@ class TaonEntityOptions extends Models.DecoratorAbstractOpt {
|
|
|
4589
4936
|
;
|
|
4590
4937
|
({}); // @--end-of-file-for-module=taon lib/decorators/classes/entity-decorator.ts
|
|
4591
4938
|
|
|
4939
|
+
/**
|
|
4940
|
+
* Provider decorator
|
|
4941
|
+
*/
|
|
4592
4942
|
function TaonProvider(options) {
|
|
4593
4943
|
return function (constructor) {
|
|
4594
4944
|
Reflect.defineMetadata(Symbols.metadata.options.provider, options, constructor);
|
|
@@ -4601,6 +4951,21 @@ class TaonProviderOptions extends Models.DecoratorAbstractOpt {
|
|
|
4601
4951
|
;
|
|
4602
4952
|
({}); // @--end-of-file-for-module=taon lib/decorators/classes/provider-decorator.ts
|
|
4603
4953
|
|
|
4954
|
+
/**
|
|
4955
|
+
* Migration decorator
|
|
4956
|
+
*/
|
|
4957
|
+
function TaonMigration(options) {
|
|
4958
|
+
return function (constructor) {
|
|
4959
|
+
Reflect.defineMetadata(Symbols.metadata.options.migration, options, constructor);
|
|
4960
|
+
Reflect.defineMetadata(Symbols.metadata.className, options?.className || constructor.name, constructor);
|
|
4961
|
+
ClassHelpers.setName(constructor, options?.className);
|
|
4962
|
+
};
|
|
4963
|
+
}
|
|
4964
|
+
class TaonMigrationOptions extends Models.DecoratorAbstractOpt {
|
|
4965
|
+
}
|
|
4966
|
+
;
|
|
4967
|
+
({}); // @--end-of-file-for-module=taon lib/decorators/classes/migration-decorator.ts
|
|
4968
|
+
|
|
4604
4969
|
const inject = (entity) => {
|
|
4605
4970
|
return new Proxy({}, {
|
|
4606
4971
|
get: (_, propName) => {
|
|
@@ -5329,7 +5694,6 @@ class TaonTableComponent {
|
|
|
5329
5694
|
await this.retriveData();
|
|
5330
5695
|
}
|
|
5331
5696
|
async retriveData() {
|
|
5332
|
-
// @ts-ignore
|
|
5333
5697
|
}
|
|
5334
5698
|
expansionRow(e) {
|
|
5335
5699
|
this.expansionChange.next(e);
|
|
@@ -5338,7 +5702,7 @@ class TaonTableComponent {
|
|
|
5338
5702
|
log.i('context menu event', e);
|
|
5339
5703
|
}
|
|
5340
5704
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5341
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonTableComponent, selector: "taon-table", inputs: { pageNumber: "pageNumber", pageSize: "pageSize", allowedColumns: "allowedColumns", entity: "entity", expansionTemplate: "expansionTemplate", rows: "rows", columns: "columns", pageSizeOptions: "pageSizeOptions" }, outputs: { expansionChange: "expansionChange", addingItem: "addingItem" }, viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true, static: true }], ngImport: i0, template: "<br />\n<columns-container>\n <column grow>\n <mat-form-field class=\"search-input\">\n <input matInput placeholder=\"Type to search table...\" #search />\n </mat-form-field>\n </column>\n <column [width]=\"80\">\n <button\n mat-fab\n [ngClass]=\"{ 'half-opacity': !search.value }\"\n class=\"undo-button\"\n color=\"secondary\"\n (click)=\"search.value = ''\">\n <mat-icon>close </mat-icon>\n </button>\n </column>\n\n <column [width]=\"80\">\n <button\n mat-fab\n (click)=\"addingItem.next()\"\n class=\"undo-button\"\n color=\"primary\">\n <mat-icon>add</mat-icon>\n </button>\n </column>\n</columns-container>\n\n<mtx-grid\n *ngIf=\"rows && columns\"\n [data]=\"rows\"\n [columns]=\"columns\"\n [expandable]=\"expandable\"\n [expansionTemplate]=\"expansionTemplate\"\n (expansionChange)=\"expansionRow($event)\"\n [length]=\"totalElements\"\n [loading]=\"isLoading\"\n [pageOnFront]=\"false\"\n [pageIndex]=\"pageNumber - 1\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [showPaginator]=\"showPaginator\"\n (page)=\"getNextPage($event)\">\n</mtx-grid>\n", styles: [":host{min-height:250px}.search-input{width:100%}.undo-button{margin-left:10px}.half-opacity{opacity:.2}\n"], dependencies: [{ kind: "directive", type:
|
|
5705
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonTableComponent, selector: "taon-table", inputs: { pageNumber: "pageNumber", pageSize: "pageSize", allowedColumns: "allowedColumns", entity: "entity", expansionTemplate: "expansionTemplate", rows: "rows", columns: "columns", pageSizeOptions: "pageSizeOptions" }, outputs: { expansionChange: "expansionChange", addingItem: "addingItem" }, viewQueries: [{ propertyName: "search", first: true, predicate: ["search"], descendants: true, static: true }], ngImport: i0, template: "<br />\n<columns-container>\n <column grow>\n <mat-form-field class=\"search-input\">\n <input matInput placeholder=\"Type to search table...\" #search />\n </mat-form-field>\n </column>\n <column [width]=\"80\">\n <button\n mat-fab\n [ngClass]=\"{ 'half-opacity': !search.value }\"\n class=\"undo-button\"\n color=\"secondary\"\n (click)=\"search.value = ''\">\n <mat-icon>close </mat-icon>\n </button>\n </column>\n\n <column [width]=\"80\">\n <button\n mat-fab\n (click)=\"addingItem.next()\"\n class=\"undo-button\"\n color=\"primary\">\n <mat-icon>add</mat-icon>\n </button>\n </column>\n</columns-container>\n\n<mtx-grid\n *ngIf=\"rows && columns\"\n [data]=\"rows\"\n [columns]=\"columns\"\n [expandable]=\"expandable\"\n [expansionTemplate]=\"expansionTemplate\"\n (expansionChange)=\"expansionRow($event)\"\n [length]=\"totalElements\"\n [loading]=\"isLoading\"\n [pageOnFront]=\"false\"\n [pageIndex]=\"pageNumber - 1\"\n [pageSize]=\"pageSize\"\n [pageSizeOptions]=\"pageSizeOptions\"\n [showPaginator]=\"showPaginator\"\n (page)=\"getNextPage($event)\">\n</mtx-grid>\n", styles: [":host{min-height:250px}.search-input{width:100%}.undo-button{margin-left:10px}.half-opacity{opacity:.2}\n"], dependencies: [{ kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i3$1.MtxGrid, selector: "mtx-grid", inputs: ["displayedColumns", "columns", "data", "length", "loading", "trackBy", "columnResizable", "emptyValuePlaceholder", "pageOnFront", "showPaginator", "pageDisabled", "showFirstLastButtons", "pageIndex", "pageSize", "pageSizeOptions", "hidePageSize", "paginationTemplate", "sortOnFront", "sortActive", "sortDirection", "sortDisableClear", "sortDisabled", "sortStart", "rowHover", "rowStriped", "expandable", "expansionTemplate", "multiSelectable", "multiSelectionWithClick", "rowSelectable", "hideRowSelectionCheckbox", "disableRowClickSelection", "rowSelectionFormatter", "rowClassFormatter", "rowSelected", "cellSelectable", "showToolbar", "toolbarTitle", "toolbarTemplate", "columnHideable", "columnHideableChecked", "columnSortable", "columnPinnable", "columnPinOptions", "showColumnMenuButton", "columnMenuButtonText", "columnMenuButtonType", "columnMenuButtonColor", "columnMenuButtonClass", "columnMenuButtonIcon", "showColumnMenuHeader", "columnMenuHeaderText", "columnMenuHeaderTemplate", "showColumnMenuFooter", "columnMenuFooterText", "columnMenuFooterTemplate", "noResultText", "noResultTemplate", "headerTemplate", "headerExtraTemplate", "cellTemplate", "useContentRowTemplate", "useContentHeaderRowTemplate", "useContentFooterRowTemplate", "showSummary", "summaryTemplate", "showSidebar", "sidebarTemplate", "showStatusbar", "statusbarTemplate"], outputs: ["page", "sortChange", "rowClick", "rowContextMenu", "expansionChange", "rowSelectedChange", "cellSelectedChange", "columnChange"], exportAs: ["mtxGrid"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i1$3.ColumnsComponent, selector: "columns-container" }, { kind: "component", type: i1$3.ColumnComponent, selector: "column", inputs: ["width"] }, { kind: "directive", type: i1$3.DirectiveGrow, selector: "[grow]" }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }] }); }
|
|
5342
5706
|
}
|
|
5343
5707
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableComponent, decorators: [{
|
|
5344
5708
|
type: Component,
|
|
@@ -5418,36 +5782,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
5418
5782
|
;
|
|
5419
5783
|
({}); // @--end-of-file-for-module=taon lib/ui/taon-table/index.ts
|
|
5420
5784
|
|
|
5421
|
-
class TaonAdminService {
|
|
5422
|
-
/**
|
|
5423
|
-
* @deprecated
|
|
5424
|
-
*/
|
|
5425
|
-
disableScroll() {
|
|
5426
|
-
}
|
|
5427
|
-
constructor(cdr) {
|
|
5428
|
-
this.cdr = cdr;
|
|
5429
|
-
this.admin = window['taon'];
|
|
5430
|
-
}
|
|
5431
|
-
addTab(name, template) {
|
|
5432
|
-
this.admin.cmp.tabs.push({
|
|
5433
|
-
name,
|
|
5434
|
-
template,
|
|
5435
|
-
});
|
|
5436
|
-
}
|
|
5437
|
-
init(taonAdminModeConfigurationComponent) {
|
|
5438
|
-
this.taonAdminModeConfigurationComponent =
|
|
5439
|
-
taonAdminModeConfigurationComponent;
|
|
5440
|
-
}
|
|
5441
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, deps: [{ token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5442
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, providedIn: 'root' }); }
|
|
5443
|
-
}
|
|
5444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, decorators: [{
|
|
5445
|
-
type: Injectable,
|
|
5446
|
-
args: [{ providedIn: 'root' }]
|
|
5447
|
-
}], ctorParameters: () => [{ type: i0.ApplicationRef }] });
|
|
5448
|
-
;
|
|
5449
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-control.service.ts
|
|
5450
|
-
|
|
5451
5785
|
class TaonAdminModeConfigurationComponent {
|
|
5452
5786
|
get opened() {
|
|
5453
5787
|
return !this.isIframe && this.admin.adminPanelIsOpen;
|
|
@@ -5462,13 +5796,12 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5462
5796
|
}
|
|
5463
5797
|
this.admin.adminPanelIsOpen = v;
|
|
5464
5798
|
}
|
|
5465
|
-
constructor(breakpointsService) {
|
|
5799
|
+
constructor(breakpointsService, admin) {
|
|
5466
5800
|
this.breakpointsService = breakpointsService;
|
|
5801
|
+
this.admin = admin;
|
|
5467
5802
|
this.$destroy = new Subject();
|
|
5468
5803
|
this.cdr = inject$1(ChangeDetectorRef);
|
|
5469
5804
|
this.taonAdminService = inject$1(TaonAdminService);
|
|
5470
|
-
this.tabs = [];
|
|
5471
|
-
this.admin = window['taon'];
|
|
5472
5805
|
this.isWebSQLMode = Helpers.isWebSQL;
|
|
5473
5806
|
this.hideTaonToolsInProduction = ENV.hideTaonToolsInProduction && ENV.angularProd;
|
|
5474
5807
|
this.isIframe = window.location !== window.parent.location;
|
|
@@ -5487,7 +5820,6 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5487
5820
|
this.dragPositionZero = { x: 0, y: 0 };
|
|
5488
5821
|
this.taonAdminModeConfigurationDataChanged = new EventEmitter();
|
|
5489
5822
|
this.taonAdminModeConfigurationData = {};
|
|
5490
|
-
this.admin.cmp = this;
|
|
5491
5823
|
this.breakpointsService
|
|
5492
5824
|
.listenTo()
|
|
5493
5825
|
.pipe(takeUntil(this.$destroy))
|
|
@@ -5495,14 +5827,6 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5495
5827
|
// @ts-ignore
|
|
5496
5828
|
this.isDesktop = breakpoint === 'desktop';
|
|
5497
5829
|
});
|
|
5498
|
-
this.taonAdminService.init(this);
|
|
5499
|
-
}
|
|
5500
|
-
reloadTabs() {
|
|
5501
|
-
this.reloading = true;
|
|
5502
|
-
setTimeout(() => {
|
|
5503
|
-
this.reloading = false;
|
|
5504
|
-
console.log('reloading done');
|
|
5505
|
-
});
|
|
5506
5830
|
}
|
|
5507
5831
|
async ngOnInit() {
|
|
5508
5832
|
await Stor.awaitPendingOperatios();
|
|
@@ -5526,6 +5850,16 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5526
5850
|
onResize(event) {
|
|
5527
5851
|
this.height = window.innerHeight;
|
|
5528
5852
|
}
|
|
5853
|
+
async reloadTabs() {
|
|
5854
|
+
return new Promise(resolve => {
|
|
5855
|
+
this.reloading = true;
|
|
5856
|
+
setTimeout(() => {
|
|
5857
|
+
this.reloading = false;
|
|
5858
|
+
console.log('reloading done');
|
|
5859
|
+
resolve();
|
|
5860
|
+
});
|
|
5861
|
+
});
|
|
5862
|
+
}
|
|
5529
5863
|
async toogle() {
|
|
5530
5864
|
this.opened = !this.opened;
|
|
5531
5865
|
}
|
|
@@ -5547,37 +5881,47 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5547
5881
|
scrollTabs(event) {
|
|
5548
5882
|
return;
|
|
5549
5883
|
}
|
|
5550
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationComponent, deps: [{ token: i1$3.BreakpointsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5551
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonAdminModeConfigurationComponent, selector: "app-taon-admin-mode-configuration", inputs: { taonAdminModeConfigurationData: "taonAdminModeConfigurationData" }, outputs: { taonAdminModeConfigurationDataChanged: "taonAdminModeConfigurationDataChanged" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "tabGroup", first: true, predicate: ["tabGroup"], descendants: true }], ngImport: i0, template: "<!-- #region basic global components -->\n<taon-session-passcode\n *ngIf=\"showPasscode\"\n [passcode]=\"passcode\"\n [message]=\"message\" />\n<!-- <taon-progress-bar [isDesktop]=\"isDesktop\"></taon-progress-bar> -->\n<!-- <taon-notifications></taon-notifications> -->\n<button\n mat-fab\n class=\"fab-button\"\n color=\"accent\"\n aria-label=\"Taon Admin Mode\"\n *ngIf=\"\n !admin.draggablePopupMode &&\n isDesktop &&\n !isIframe &&\n !hideTaonToolsInProduction\n \"\n (click)=\"toogle()\">\n <mat-icon>build</mat-icon>\n</button>\n<!-- #endregion -->\n\n<!-- #region small hidden button -->\n<!-- <button class=\"admin-show-button\"\n *ngIf=\"!admin.draggablePopupMode && isDesktop\"\n (click)=\"toogle()\"> Admin </button> -->\n<!-- #endregion -->\n\n<ng-template #contentNoScroll>\n <ng-content> </ng-content>\n</ng-template>\n\n<ng-template #content>\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"contentNoScroll\"></ng-container>\n </ng-scrollbar>\n</ng-template>\n\n<!-- #region admin tabs -->\n<ng-template #adminTabs>\n <div class=\"taon-header-admin-wrapper\">\n <columns-container\n class=\"taon-header-admin\"\n [ngClass]=\"{ 'draggable-column': admin.draggablePopupMode }\">\n <column width=\"200\" class=\"logo-header\">\n <img\n *ngIf=\"openedOnce\"\n src=\"assets/assets-for/taon/shared/logo-header-admin-mode.png\" />\n </column>\n\n <column grow>\n <!-- <span>Super Admin Mode</span> -->\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"\n !admin.draggablePopupModeFullScreen && !admin.draggablePopupMode\n \">\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupMode\"\n (click)=\"\n admin.draggablePopupMode = false;\n opened = false;\n wasOpenDraggablePopup = true\n \"\n class=\"admin-close-button\">\n <mat-icon>close </mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupMode\"\n (click)=\"toogle()\"\n class=\"admin-close-button\">\n <mat-icon>close</mat-icon>\n </button>\n </column>\n\n <column width=\"40\">\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>close_fullscreen</mat-icon>\n </button>\n </column>\n\n <column width=\"40\" *ngIf=\"!admin.draggablePopupModeFullScreen\">\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupMode\"\n (click)=\"admin.draggablePopupMode = true\"\n class=\"admin-close-button\">\n <mat-icon>launch</mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupMode\"\n (click)=\"admin.draggablePopupMode = false; resetDrag()\"\n class=\"admin-close-button\">\n <mat-icon style=\"transform: rotate(180deg)\">login</mat-icon>\n </button>\n </column>\n </columns-container>\n </div>\n\n <columns-container\n [ngClass]=\"{ 'draggable-column': admin.draggablePopupMode }\">\n <column grow>\n <mat-tab-group\n dynamicHeight\n (wheel)=\"scrollTabs($event)\"\n #tabGroup\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndex = $event\">\n <mat-tab label=\"DB/Cache\">\n <section>\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>WEBSQL MODE</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <mat-checkbox\n [disabled]=\"!isWebSQLMode\"\n [ngModel]=\"admin.keepWebsqlDbDataAfterReload\"\n (change)=\"\n admin.setKeepWebsqlDbDataAfterReload($event.checked)\n \">\n Don't remove data when reloading\n </mat-checkbox>\n </mat-card-content>\n </mat-card>\n </section>\n <br />\n <taon-db-admin />\n </mat-tab>\n\n <mat-tab label=\"Files\" *ngIf=\"admin.enabledTabs.includes('files')\">\n <section>\n <mat-checkbox\n [ngModel]=\"admin.filesEditMode\"\n (change)=\"admin.setEditMode($event.checked)\"\n >Edit mode</mat-checkbox\n >\n </section>\n <!-- admin.filesEditMode: {{ admin.filesEditMode }} -->\n <!-- <taon-admin-edit-mode *ngIf=\"admin.filesEditMode\">\n </taon-admin-edit-mode> -->\n <br />\n <hr *ngIf=\"admin.filesEditMode\" />\n <!-- <section>\n <button mat-raised-button>[TODO] Clear Files from browser cache </button> <br>\n <button mat-raised-button>[TODO] Start files export (as zip) </button> <br>\n <button mat-raised-button>[TODO] Import whole database (from zip) </button><br>\n </section> -->\n </mat-tab>\n <mat-tab *ngFor=\"let tab of tabs\" label=\"{{ tab.name }}\">\n <div\n class=\"full-tabs\"\n [style.height.px]=\"height - 150\"\n *ngIf=\"!isIframe\">\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n </div>\n <ng-container *ngIf=\"isIframe\">\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n </ng-container>\n </mat-tab>\n\n <!-- <mat-tab label=\"Portal\">\n <section>\n <mat-checkbox>[TODO] Maintenance Mode for whole portal</mat-checkbox>\n\n <mat-expansion-panel>\n\n <mat-expansion-panel-header>\n [TODO] Active User: 80432\n </mat-expansion-panel-header>\n <section>\n <button mat-raised-button>[TODO] Send notification to users </button><br>\n <button mat-raised-button>[TODO] Send email to users </button><br>\n </section>\n </mat-expansion-panel>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n [TODO] Enable features\n </mat-expansion-panel-header>\n <mat-checkbox>[TODO] AB testing</mat-checkbox> <br>\n <mat-checkbox>\n [TODO] Newsletter email question popup\n </mat-checkbox> <br>\n <mat-checkbox>\n [TODO] Promotion popup\n </mat-checkbox> <br>\n </mat-expansion-panel>\n </section>\n </mat-tab>\n <mat-tab label=\"User\">\n Welcome in user managements\n </mat-tab>\n <mat-tab label=\"Translations\">\n Welcome in user managements\n </mat-tab> -->\n </mat-tab-group>\n </column>\n </columns-container>\n</ng-template>\n<!-- #endregion -->\n\n<!-- #region small/mobile draggable popup windows -->\n<div\n class=\"draggable-popup-mode-window\"\n *ngIf=\"\n admin.draggablePopupMode && !admin.draggablePopupModeFullScreen && !isIframe\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPosition\"\n (cdkDragEnded)=\"moved($event)\">\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </ng-scrollbar>\n</div>\n<!-- #endregion -->\n\n<!-- #region fullscreen draggable popup window -->\n<div\n class=\"draggable-popup-mode-window-full\"\n *ngIf=\"\n admin.draggablePopupMode &&\n admin.draggablePopupModeFullScreen &&\n !isIframe &&\n !reloading\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPositionZero\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region content when not in draggable (or fullscreen draggable) popup -->\n<div\n [style.height.px]=\"height\"\n *ngIf=\"\n (isIframe ||\n !isDesktop ||\n admin.draggablePopupMode ||\n admin.draggablePopupModeFullScreen) &&\n !reloading\n \"\n style=\"width: 100%; display: block\"\n class=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"\n admin.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region draggable popup window -->\n<mat-drawer-container\n *ngIf=\"!admin.draggablePopupMode && isDesktop && !isIframe\"\n class=\"example-container\"\n [style.height.px]=\"height\"\n style=\"background-color: transparent\"\n (backdropClick)=\"opened = false\"\n [hasBackdrop]=\"false\">\n <mat-drawer #drawer style=\"width: 580px\" [opened]=\"opened\" [mode]=\"'side'\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </mat-drawer>\n <mat-drawer-content style=\"overflow: hidden\">\n <ng-container\n *ngIf=\"!admin.draggablePopupMode && !reloading\"\n [ngTemplateOutlet]=\"\n admin.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n </mat-drawer-content>\n</mat-drawer-container>\n<!-- #endregion -->\n", styles: ["section{display:block;padding:10px}section>*{margin-top:0!important;margin-bottom:10px!important}section>*:last-child{margin-bottom:0!important}:host{display:block}.draggable-column{display:block!important;width:100%!important}.admin-show-button{position:fixed;bottom:100px;left:-15px;z-index:2147483647;transform:rotate(90deg);border:0px;color:#fff;background:gray;opacity:.1;cursor:pointer}.admin-show-button:hover{opacity:1}.taon-ui-super-admin-mode{font-family:JosefinSans-Bold;text-align:right;margin-right:10px}mat-drawer{margin:0;background-color:#dcdcdc!important}.taon-header-admin-wrapper{overflow:hidden;width:100%;display:block}.taon-header-admin{background:#fff;box-shadow:0 -9px 6px 6px #000;height:47px}.taon-header-admin .logo-header img{height:18px;padding:8px;position:relative;float:left;top:7px;box-sizing:content-box;transform:scale(1.5);left:49px}.draggable-popup-mode-window{width:600px;height:500px;border:solid 1px #ccc;color:#000000de;cursor:move;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.draggable-popup-mode-window:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.draggable-popup-mode-window-full{width:100%;height:100%;overflow:scroll;color:#000000de;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important}.admin-close-button{float:right}.fab-button{position:fixed;right:110px;bottom:100px;z-index:10;background-color:#dcdcdc;color:#8f8f8f}.full-tabs{padding:10px}.mat-drawer-container-full-screen{background-color:red}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1$3.ColumnsComponent, selector: "columns-container" }, { kind: "component", type: i1$3.ColumnComponent, selector: "column", inputs: ["width"] }, { kind: "directive", type: i1$3.DirectiveGrow, selector: "[grow]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4$1.NgScrollbar, selector: "ng-scrollbar:not([externalViewport])", exportAs: ["ngScrollbar"] }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i6$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i7.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i7.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i7.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "component", type: i8.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i10.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i10.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: i11.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i11.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: TaonSessionPasscodeComponent, selector: "taon-session-passcode", inputs: ["passcode", "message"] }] }); }
|
|
5884
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationComponent, deps: [{ token: i1$3.BreakpointsService }, { token: TaonAdminService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5885
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonAdminModeConfigurationComponent, isStandalone: true, selector: "taon-admin-mode-configuration", inputs: { taonAdminModeConfigurationData: "taonAdminModeConfigurationData" }, outputs: { taonAdminModeConfigurationDataChanged: "taonAdminModeConfigurationDataChanged" }, host: { listeners: { "window:resize": "onResize($event)" } }, viewQueries: [{ propertyName: "tabGroup", first: true, predicate: ["tabGroup"], descendants: true }], ngImport: i0, template: "<!-- #region basic global components -->\n<taon-session-passcode\n *ngIf=\"showPasscode\"\n [passcode]=\"passcode\"\n [message]=\"message\" />\n<!-- <taon-progress-bar [isDesktop]=\"isDesktop\"></taon-progress-bar> -->\n<!-- <taon-notifications></taon-notifications> -->\n<button\n mat-fab\n class=\"fab-button\"\n color=\"accent\"\n aria-label=\"Taon Admin Mode\"\n *ngIf=\"\n !admin.draggablePopupMode &&\n isDesktop &&\n !isIframe &&\n !hideTaonToolsInProduction\n \"\n (click)=\"toogle()\">\n <mat-icon>build</mat-icon>\n</button>\n<!-- #endregion -->\n\n<!-- #region small hidden button -->\n<!-- <button class=\"admin-show-button\"\n *ngIf=\"!admin.draggablePopupMode && isDesktop\"\n (click)=\"toogle()\"> Admin </button> -->\n<!-- #endregion -->\n\n<ng-template #contentNoScroll>\n <ng-content> </ng-content>\n</ng-template>\n\n<ng-template #content>\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"contentNoScroll\"></ng-container>\n </ng-scrollbar>\n</ng-template>\n\n<!-- #region admin tabs -->\n<ng-template #adminTabs>\n <!-- #region admin tabs / header -->\n <div class=\"taon-header-admin-wrapper\">\n <columns-container\n class=\"taon-header-admin\"\n [ngClass]=\"{ 'draggable-column': admin.draggablePopupMode }\">\n <column\n width=\"200\"\n class=\"logo-header\">\n <img\n *ngIf=\"openedOnce\"\n src=\"assets/assets-for/taon/shared/logo-header-admin-mode.png\" />\n </column>\n\n <column grow>\n <!-- <span>Super Admin Mode</span> -->\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"\n !admin.draggablePopupModeFullScreen && !admin.draggablePopupMode\n \">\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupMode\"\n (click)=\"\n admin.draggablePopupMode = false;\n opened = false;\n wasOpenDraggablePopup = true\n \"\n class=\"admin-close-button\">\n <mat-icon>close </mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupMode\"\n (click)=\"toogle()\"\n class=\"admin-close-button\">\n <mat-icon>close</mat-icon>\n </button>\n </column>\n\n <column width=\"40\">\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>close_fullscreen</mat-icon>\n </button>\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"!admin.draggablePopupModeFullScreen\">\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupMode\"\n (click)=\"admin.draggablePopupMode = true\"\n class=\"admin-close-button\">\n <mat-icon>launch</mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupMode\"\n (click)=\"admin.draggablePopupMode = false; resetDrag()\"\n class=\"admin-close-button\">\n <mat-icon style=\"transform: rotate(180deg)\">login</mat-icon>\n </button>\n </column>\n </columns-container>\n </div>\n <!-- #endregion -->\n\n <columns-container\n [ngClass]=\"{ 'draggable-column': admin.draggablePopupMode }\">\n <column grow>\n <mat-tab-group\n dynamicHeight\n (wheel)=\"scrollTabs($event)\"\n #tabGroup\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndex = $event\">\n <mat-tab label=\"DB/Cache\">\n <section>\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>WEBSQL MODE</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <mat-checkbox\n [disabled]=\"!isWebSQLMode\"\n [ngModel]=\"admin.keepWebsqlDbDataAfterReload\"\n (change)=\"\n admin.setKeepWebsqlDbDataAfterReload($event.checked)\n \">\n Don't remove data when reloading\n </mat-checkbox>\n </mat-card-content>\n </mat-card>\n </section>\n <br />\n <taon-db-admin />\n </mat-tab>\n </mat-tab-group>\n </column>\n </columns-container>\n</ng-template>\n<!-- #endregion -->\n\n<!-- #region small/mobile draggable popup windows -->\n<div\n class=\"draggable-popup-mode-window\"\n *ngIf=\"\n admin.draggablePopupMode && !admin.draggablePopupModeFullScreen && !isIframe\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPosition\"\n (cdkDragEnded)=\"moved($event)\">\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </ng-scrollbar>\n</div>\n<!-- #endregion -->\n\n<!-- #region fullscreen draggable popup window -->\n<div\n class=\"draggable-popup-mode-window-full\"\n *ngIf=\"\n admin.draggablePopupMode &&\n admin.draggablePopupModeFullScreen &&\n !isIframe &&\n !reloading\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPositionZero\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region content when not in draggable (or fullscreen draggable) popup -->\n<div\n [style.height.px]=\"height\"\n *ngIf=\"\n (isIframe ||\n !isDesktop ||\n admin.draggablePopupMode ||\n admin.draggablePopupModeFullScreen) &&\n !reloading\n \"\n style=\"width: 100%; display: block\"\n class=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"\n admin.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region draggable popup window -->\n<mat-drawer-container\n *ngIf=\"!admin.draggablePopupMode && isDesktop && !isIframe\"\n class=\"example-container\"\n [style.height.px]=\"height\"\n style=\"background-color: transparent\"\n (backdropClick)=\"opened = false\"\n [hasBackdrop]=\"false\">\n <mat-drawer\n #drawer\n style=\"width: 580px\"\n [opened]=\"opened\"\n [mode]=\"'side'\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </mat-drawer>\n <mat-drawer-content style=\"overflow: hidden\">\n <ng-container\n *ngIf=\"!admin.draggablePopupMode && !reloading\"\n [ngTemplateOutlet]=\"\n admin.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n </mat-drawer-content>\n</mat-drawer-container>\n<!-- #endregion -->\n", styles: ["section{display:block;padding:10px}section>*{margin-top:0!important;margin-bottom:10px!important}section>*:last-child{margin-bottom:0!important}:host{display:block}.draggable-column{display:block!important;width:100%!important}.admin-show-button{position:fixed;bottom:100px;left:-15px;z-index:2147483647;transform:rotate(90deg);border:0px;color:#fff;background:gray;opacity:.1;cursor:pointer}.admin-show-button:hover{opacity:1}.taon-ui-super-admin-mode{font-family:JosefinSans-Bold;text-align:right;margin-right:10px}mat-drawer{margin:0;background-color:#dcdcdc!important}.taon-header-admin-wrapper{overflow:hidden;width:100%;display:block}.taon-header-admin{background:#fff;box-shadow:0 -9px 6px 6px #000;height:47px}.taon-header-admin .logo-header img{height:18px;padding:8px;position:relative;float:left;top:7px;box-sizing:content-box;transform:scale(1.5);left:49px}.draggable-popup-mode-window{width:600px;height:500px;border:solid 1px #ccc;color:#000000de;cursor:move;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.draggable-popup-mode-window:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.draggable-popup-mode-window-full{width:100%;height:100%;overflow:scroll;color:#000000de;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important}.admin-close-button{float:right}.fab-button{position:fixed;right:110px;bottom:100px;z-index:10;background-color:#dcdcdc;color:#8f8f8f}.full-tabs{padding:10px}.mat-drawer-container-full-screen{background-color:red}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: StaticColumnsModule }, { kind: "component", type: i1$3.ColumnsComponent, selector: "columns-container" }, { kind: "component", type: i1$3.ColumnComponent, selector: "column", inputs: ["width"] }, { kind: "directive", type: i1$3.DirectiveGrow, selector: "[grow]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgScrollbarModule }, { kind: "component", type: i5.NgScrollbar, selector: "ng-scrollbar:not([externalViewport])", exportAs: ["ngScrollbar"] }, { kind: "ngmodule", type: TaonProgressBarModule }, { kind: "ngmodule", type: TaonNotificationsModule }, { kind: "ngmodule", type: TaonFullMaterialModule }, { kind: "directive", type: i6$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i7.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }, { kind: "component", type: i8.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i8.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i8.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i8.MatCardSubtitle, selector: "mat-card-subtitle, [mat-card-subtitle], [matCardSubtitle]" }, { kind: "component", type: i9.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i11.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i11.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i11.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "component", type: i12.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i12.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: // TODO import only partial things
|
|
5886
|
+
TaonSessionPasscodeComponent, selector: "taon-session-passcode", inputs: ["passcode", "message"] }] }); }
|
|
5552
5887
|
}
|
|
5553
5888
|
__decorate([
|
|
5554
|
-
Stor.property.in.localstorage
|
|
5889
|
+
(Stor.property.in.localstorage
|
|
5555
5890
|
.for(TaonAdminModeConfigurationComponent)
|
|
5556
|
-
.withDefaultValue(0),
|
|
5891
|
+
.withDefaultValue(0)),
|
|
5557
5892
|
__metadata("design:type", Number)
|
|
5558
5893
|
], TaonAdminModeConfigurationComponent.prototype, "dragPositionX", void 0);
|
|
5559
5894
|
__decorate([
|
|
5560
|
-
Stor.property.in.localstorage
|
|
5895
|
+
(Stor.property.in.localstorage
|
|
5561
5896
|
.for(TaonAdminModeConfigurationComponent)
|
|
5562
|
-
.withDefaultValue(0),
|
|
5897
|
+
.withDefaultValue(0)),
|
|
5563
5898
|
__metadata("design:type", Number)
|
|
5564
5899
|
], TaonAdminModeConfigurationComponent.prototype, "dragPositionY", void 0);
|
|
5565
5900
|
__decorate([
|
|
5566
|
-
Stor.property.in.localstorage
|
|
5901
|
+
(Stor.property.in.localstorage
|
|
5567
5902
|
.for(TaonAdminModeConfigurationComponent)
|
|
5568
|
-
.withDefaultValue(0),
|
|
5903
|
+
.withDefaultValue(0)),
|
|
5569
5904
|
__metadata("design:type", Number)
|
|
5570
5905
|
], TaonAdminModeConfigurationComponent.prototype, "selectedIndex", void 0);
|
|
5571
5906
|
__decorate([
|
|
5572
|
-
Stor.property.in.localstorage
|
|
5907
|
+
(Stor.property.in.localstorage
|
|
5573
5908
|
.for(TaonAdminModeConfigurationComponent)
|
|
5574
|
-
.withDefaultValue(false),
|
|
5909
|
+
.withDefaultValue(false)),
|
|
5575
5910
|
__metadata("design:type", Boolean)
|
|
5576
5911
|
], TaonAdminModeConfigurationComponent.prototype, "wasOpenDraggablePopup", void 0);
|
|
5577
5912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationComponent, decorators: [{
|
|
5578
5913
|
type: Component,
|
|
5579
|
-
args: [{ selector: 'app-taon-admin-mode-configuration', template: "<!-- #region basic global components -->\n<taon-session-passcode\n *ngIf=\"showPasscode\"\n [passcode]=\"passcode\"\n [message]=\"message\" />\n<!-- <taon-progress-bar [isDesktop]=\"isDesktop\"></taon-progress-bar> -->\n<!-- <taon-notifications></taon-notifications> -->\n<button\n mat-fab\n class=\"fab-button\"\n color=\"accent\"\n aria-label=\"Taon Admin Mode\"\n *ngIf=\"\n !admin.draggablePopupMode &&\n isDesktop &&\n !isIframe &&\n !hideTaonToolsInProduction\n \"\n (click)=\"toogle()\">\n <mat-icon>build</mat-icon>\n</button>\n<!-- #endregion -->\n\n<!-- #region small hidden button -->\n<!-- <button class=\"admin-show-button\"\n *ngIf=\"!admin.draggablePopupMode && isDesktop\"\n (click)=\"toogle()\"> Admin </button> -->\n<!-- #endregion -->\n\n<ng-template #contentNoScroll>\n <ng-content> </ng-content>\n</ng-template>\n\n<ng-template #content>\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"contentNoScroll\"></ng-container>\n </ng-scrollbar>\n</ng-template>\n\n<!-- #region admin tabs -->\n<ng-template #adminTabs>\n <div class=\"taon-header-admin-wrapper\">\n <columns-container\n class=\"taon-header-admin\"\n [ngClass]=\"{ 'draggable-column': admin.draggablePopupMode }\">\n <column width=\"200\" class=\"logo-header\">\n <img\n *ngIf=\"openedOnce\"\n src=\"assets/assets-for/taon/shared/logo-header-admin-mode.png\" />\n </column>\n\n <column grow>\n <!-- <span>Super Admin Mode</span> -->\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"\n !admin.draggablePopupModeFullScreen && !admin.draggablePopupMode\n \">\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupMode\"\n (click)=\"\n admin.draggablePopupMode = false;\n opened = false;\n wasOpenDraggablePopup = true\n \"\n class=\"admin-close-button\">\n <mat-icon>close </mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupMode\"\n (click)=\"toogle()\"\n class=\"admin-close-button\">\n <mat-icon>close</mat-icon>\n </button>\n </column>\n\n <column width=\"40\">\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>close_fullscreen</mat-icon>\n </button>\n </column>\n\n <column width=\"40\" *ngIf=\"!admin.draggablePopupModeFullScreen\">\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupMode\"\n (click)=\"admin.draggablePopupMode = true\"\n class=\"admin-close-button\">\n <mat-icon>launch</mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupMode\"\n (click)=\"admin.draggablePopupMode = false; resetDrag()\"\n class=\"admin-close-button\">\n <mat-icon style=\"transform: rotate(180deg)\">login</mat-icon>\n </button>\n </column>\n </columns-container>\n </div>\n\n <columns-container\n [ngClass]=\"{ 'draggable-column': admin.draggablePopupMode }\">\n <column grow>\n <mat-tab-group\n dynamicHeight\n (wheel)=\"scrollTabs($event)\"\n #tabGroup\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndex = $event\">\n <mat-tab label=\"DB/Cache\">\n <section>\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>WEBSQL MODE</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <mat-checkbox\n [disabled]=\"!isWebSQLMode\"\n [ngModel]=\"admin.keepWebsqlDbDataAfterReload\"\n (change)=\"\n admin.setKeepWebsqlDbDataAfterReload($event.checked)\n \">\n Don't remove data when reloading\n </mat-checkbox>\n </mat-card-content>\n </mat-card>\n </section>\n <br />\n <taon-db-admin />\n </mat-tab>\n\n <mat-tab label=\"Files\" *ngIf=\"admin.enabledTabs.includes('files')\">\n <section>\n <mat-checkbox\n [ngModel]=\"admin.filesEditMode\"\n (change)=\"admin.setEditMode($event.checked)\"\n >Edit mode</mat-checkbox\n >\n </section>\n <!-- admin.filesEditMode: {{ admin.filesEditMode }} -->\n <!-- <taon-admin-edit-mode *ngIf=\"admin.filesEditMode\">\n </taon-admin-edit-mode> -->\n <br />\n <hr *ngIf=\"admin.filesEditMode\" />\n <!-- <section>\n <button mat-raised-button>[TODO] Clear Files from browser cache </button> <br>\n <button mat-raised-button>[TODO] Start files export (as zip) </button> <br>\n <button mat-raised-button>[TODO] Import whole database (from zip) </button><br>\n </section> -->\n </mat-tab>\n <mat-tab *ngFor=\"let tab of tabs\" label=\"{{ tab.name }}\">\n <div\n class=\"full-tabs\"\n [style.height.px]=\"height - 150\"\n *ngIf=\"!isIframe\">\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n </div>\n <ng-container *ngIf=\"isIframe\">\n <ng-container *ngTemplateOutlet=\"tab.template\"></ng-container>\n </ng-container>\n </mat-tab>\n\n <!-- <mat-tab label=\"Portal\">\n <section>\n <mat-checkbox>[TODO] Maintenance Mode for whole portal</mat-checkbox>\n\n <mat-expansion-panel>\n\n <mat-expansion-panel-header>\n [TODO] Active User: 80432\n </mat-expansion-panel-header>\n <section>\n <button mat-raised-button>[TODO] Send notification to users </button><br>\n <button mat-raised-button>[TODO] Send email to users </button><br>\n </section>\n </mat-expansion-panel>\n <mat-expansion-panel>\n <mat-expansion-panel-header>\n [TODO] Enable features\n </mat-expansion-panel-header>\n <mat-checkbox>[TODO] AB testing</mat-checkbox> <br>\n <mat-checkbox>\n [TODO] Newsletter email question popup\n </mat-checkbox> <br>\n <mat-checkbox>\n [TODO] Promotion popup\n </mat-checkbox> <br>\n </mat-expansion-panel>\n </section>\n </mat-tab>\n <mat-tab label=\"User\">\n Welcome in user managements\n </mat-tab>\n <mat-tab label=\"Translations\">\n Welcome in user managements\n </mat-tab> -->\n </mat-tab-group>\n </column>\n </columns-container>\n</ng-template>\n<!-- #endregion -->\n\n<!-- #region small/mobile draggable popup windows -->\n<div\n class=\"draggable-popup-mode-window\"\n *ngIf=\"\n admin.draggablePopupMode && !admin.draggablePopupModeFullScreen && !isIframe\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPosition\"\n (cdkDragEnded)=\"moved($event)\">\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </ng-scrollbar>\n</div>\n<!-- #endregion -->\n\n<!-- #region fullscreen draggable popup window -->\n<div\n class=\"draggable-popup-mode-window-full\"\n *ngIf=\"\n admin.draggablePopupMode &&\n admin.draggablePopupModeFullScreen &&\n !isIframe &&\n !reloading\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPositionZero\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region content when not in draggable (or fullscreen draggable) popup -->\n<div\n [style.height.px]=\"height\"\n *ngIf=\"\n (isIframe ||\n !isDesktop ||\n admin.draggablePopupMode ||\n admin.draggablePopupModeFullScreen) &&\n !reloading\n \"\n style=\"width: 100%; display: block\"\n class=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"\n admin.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region draggable popup window -->\n<mat-drawer-container\n *ngIf=\"!admin.draggablePopupMode && isDesktop && !isIframe\"\n class=\"example-container\"\n [style.height.px]=\"height\"\n style=\"background-color: transparent\"\n (backdropClick)=\"opened = false\"\n [hasBackdrop]=\"false\">\n <mat-drawer #drawer style=\"width: 580px\" [opened]=\"opened\" [mode]=\"'side'\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </mat-drawer>\n <mat-drawer-content style=\"overflow: hidden\">\n <ng-container\n *ngIf=\"!admin.draggablePopupMode && !reloading\"\n [ngTemplateOutlet]=\"\n admin.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n </mat-drawer-content>\n</mat-drawer-container>\n<!-- #endregion -->\n", styles: ["section{display:block;padding:10px}section>*{margin-top:0!important;margin-bottom:10px!important}section>*:last-child{margin-bottom:0!important}:host{display:block}.draggable-column{display:block!important;width:100%!important}.admin-show-button{position:fixed;bottom:100px;left:-15px;z-index:2147483647;transform:rotate(90deg);border:0px;color:#fff;background:gray;opacity:.1;cursor:pointer}.admin-show-button:hover{opacity:1}.taon-ui-super-admin-mode{font-family:JosefinSans-Bold;text-align:right;margin-right:10px}mat-drawer{margin:0;background-color:#dcdcdc!important}.taon-header-admin-wrapper{overflow:hidden;width:100%;display:block}.taon-header-admin{background:#fff;box-shadow:0 -9px 6px 6px #000;height:47px}.taon-header-admin .logo-header img{height:18px;padding:8px;position:relative;float:left;top:7px;box-sizing:content-box;transform:scale(1.5);left:49px}.draggable-popup-mode-window{width:600px;height:500px;border:solid 1px #ccc;color:#000000de;cursor:move;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.draggable-popup-mode-window:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.draggable-popup-mode-window-full{width:100%;height:100%;overflow:scroll;color:#000000de;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important}.admin-close-button{float:right}.fab-button{position:fixed;right:110px;bottom:100px;z-index:10;background-color:#dcdcdc;color:#8f8f8f}.full-tabs{padding:10px}.mat-drawer-container-full-screen{background-color:red}\n"] }]
|
|
5580
|
-
|
|
5914
|
+
args: [{ selector: 'taon-admin-mode-configuration', standalone: true, imports: [
|
|
5915
|
+
CommonModule,
|
|
5916
|
+
StaticColumnsModule,
|
|
5917
|
+
FormsModule,
|
|
5918
|
+
NgScrollbarModule,
|
|
5919
|
+
TaonProgressBarModule,
|
|
5920
|
+
TaonNotificationsModule,
|
|
5921
|
+
TaonFullMaterialModule, // TODO import only partial things
|
|
5922
|
+
TaonSessionPasscodeComponent,
|
|
5923
|
+
], template: "<!-- #region basic global components -->\n<taon-session-passcode\n *ngIf=\"showPasscode\"\n [passcode]=\"passcode\"\n [message]=\"message\" />\n<!-- <taon-progress-bar [isDesktop]=\"isDesktop\"></taon-progress-bar> -->\n<!-- <taon-notifications></taon-notifications> -->\n<button\n mat-fab\n class=\"fab-button\"\n color=\"accent\"\n aria-label=\"Taon Admin Mode\"\n *ngIf=\"\n !admin.draggablePopupMode &&\n isDesktop &&\n !isIframe &&\n !hideTaonToolsInProduction\n \"\n (click)=\"toogle()\">\n <mat-icon>build</mat-icon>\n</button>\n<!-- #endregion -->\n\n<!-- #region small hidden button -->\n<!-- <button class=\"admin-show-button\"\n *ngIf=\"!admin.draggablePopupMode && isDesktop\"\n (click)=\"toogle()\"> Admin </button> -->\n<!-- #endregion -->\n\n<ng-template #contentNoScroll>\n <ng-content> </ng-content>\n</ng-template>\n\n<ng-template #content>\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"contentNoScroll\"></ng-container>\n </ng-scrollbar>\n</ng-template>\n\n<!-- #region admin tabs -->\n<ng-template #adminTabs>\n <!-- #region admin tabs / header -->\n <div class=\"taon-header-admin-wrapper\">\n <columns-container\n class=\"taon-header-admin\"\n [ngClass]=\"{ 'draggable-column': admin.draggablePopupMode }\">\n <column\n width=\"200\"\n class=\"logo-header\">\n <img\n *ngIf=\"openedOnce\"\n src=\"assets/assets-for/taon/shared/logo-header-admin-mode.png\" />\n </column>\n\n <column grow>\n <!-- <span>Super Admin Mode</span> -->\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"\n !admin.draggablePopupModeFullScreen && !admin.draggablePopupMode\n \">\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupMode\"\n (click)=\"\n admin.draggablePopupMode = false;\n opened = false;\n wasOpenDraggablePopup = true\n \"\n class=\"admin-close-button\">\n <mat-icon>close </mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupMode\"\n (click)=\"toogle()\"\n class=\"admin-close-button\">\n <mat-icon>close</mat-icon>\n </button>\n </column>\n\n <column width=\"40\">\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupModeFullScreen\"\n class=\"admin-close-button\"\n (click)=\"toogleFullScreen()\">\n <mat-icon>close_fullscreen</mat-icon>\n </button>\n </column>\n\n <column\n width=\"40\"\n *ngIf=\"!admin.draggablePopupModeFullScreen\">\n <button\n mat-icon-button\n *ngIf=\"!admin.draggablePopupMode\"\n (click)=\"admin.draggablePopupMode = true\"\n class=\"admin-close-button\">\n <mat-icon>launch</mat-icon>\n </button>\n\n <button\n mat-icon-button\n *ngIf=\"admin.draggablePopupMode\"\n (click)=\"admin.draggablePopupMode = false; resetDrag()\"\n class=\"admin-close-button\">\n <mat-icon style=\"transform: rotate(180deg)\">login</mat-icon>\n </button>\n </column>\n </columns-container>\n </div>\n <!-- #endregion -->\n\n <columns-container\n [ngClass]=\"{ 'draggable-column': admin.draggablePopupMode }\">\n <column grow>\n <mat-tab-group\n dynamicHeight\n (wheel)=\"scrollTabs($event)\"\n #tabGroup\n [selectedIndex]=\"selectedIndex\"\n (selectedIndexChange)=\"selectedIndex = $event\">\n <mat-tab label=\"DB/Cache\">\n <section>\n <mat-card>\n <mat-card-header>\n <mat-card-subtitle>WEBSQL MODE</mat-card-subtitle>\n </mat-card-header>\n <mat-card-content>\n <mat-checkbox\n [disabled]=\"!isWebSQLMode\"\n [ngModel]=\"admin.keepWebsqlDbDataAfterReload\"\n (change)=\"\n admin.setKeepWebsqlDbDataAfterReload($event.checked)\n \">\n Don't remove data when reloading\n </mat-checkbox>\n </mat-card-content>\n </mat-card>\n </section>\n <br />\n <taon-db-admin />\n </mat-tab>\n </mat-tab-group>\n </column>\n </columns-container>\n</ng-template>\n<!-- #endregion -->\n\n<!-- #region small/mobile draggable popup windows -->\n<div\n class=\"draggable-popup-mode-window\"\n *ngIf=\"\n admin.draggablePopupMode && !admin.draggablePopupModeFullScreen && !isIframe\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPosition\"\n (cdkDragEnded)=\"moved($event)\">\n <ng-scrollbar>\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </ng-scrollbar>\n</div>\n<!-- #endregion -->\n\n<!-- #region fullscreen draggable popup window -->\n<div\n class=\"draggable-popup-mode-window-full\"\n *ngIf=\"\n admin.draggablePopupMode &&\n admin.draggablePopupModeFullScreen &&\n !isIframe &&\n !reloading\n \"\n cdkDrag\n [cdkDragFreeDragPosition]=\"dragPositionZero\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region content when not in draggable (or fullscreen draggable) popup -->\n<div\n [style.height.px]=\"height\"\n *ngIf=\"\n (isIframe ||\n !isDesktop ||\n admin.draggablePopupMode ||\n admin.draggablePopupModeFullScreen) &&\n !reloading\n \"\n style=\"width: 100%; display: block\"\n class=\"content\">\n <ng-container\n [ngTemplateOutlet]=\"\n admin.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n</div>\n<!-- #endregion -->\n\n<!-- #region draggable popup window -->\n<mat-drawer-container\n *ngIf=\"!admin.draggablePopupMode && isDesktop && !isIframe\"\n class=\"example-container\"\n [style.height.px]=\"height\"\n style=\"background-color: transparent\"\n (backdropClick)=\"opened = false\"\n [hasBackdrop]=\"false\">\n <mat-drawer\n #drawer\n style=\"width: 580px\"\n [opened]=\"opened\"\n [mode]=\"'side'\">\n <ng-container [ngTemplateOutlet]=\"adminTabs\"></ng-container>\n </mat-drawer>\n <mat-drawer-content style=\"overflow: hidden\">\n <ng-container\n *ngIf=\"!admin.draggablePopupMode && !reloading\"\n [ngTemplateOutlet]=\"\n admin.scrollableEnabled ? content : contentNoScroll\n \"></ng-container>\n </mat-drawer-content>\n</mat-drawer-container>\n<!-- #endregion -->\n", styles: ["section{display:block;padding:10px}section>*{margin-top:0!important;margin-bottom:10px!important}section>*:last-child{margin-bottom:0!important}:host{display:block}.draggable-column{display:block!important;width:100%!important}.admin-show-button{position:fixed;bottom:100px;left:-15px;z-index:2147483647;transform:rotate(90deg);border:0px;color:#fff;background:gray;opacity:.1;cursor:pointer}.admin-show-button:hover{opacity:1}.taon-ui-super-admin-mode{font-family:JosefinSans-Bold;text-align:right;margin-right:10px}mat-drawer{margin:0;background-color:#dcdcdc!important}.taon-header-admin-wrapper{overflow:hidden;width:100%;display:block}.taon-header-admin{background:#fff;box-shadow:0 -9px 6px 6px #000;height:47px}.taon-header-admin .logo-header img{height:18px;padding:8px;position:relative;float:left;top:7px;box-sizing:content-box;transform:scale(1.5);left:49px}.draggable-popup-mode-window{width:600px;height:500px;border:solid 1px #ccc;color:#000000de;cursor:move;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important;transition:box-shadow .2s cubic-bezier(0,0,.2,1);box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.draggable-popup-mode-window:active{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.draggable-popup-mode-window-full{width:100%;height:100%;overflow:scroll;color:#000000de;justify-content:center;align-items:center;background:#fff;border-radius:4px;position:fixed;z-index:105;background-color:#dcdcdc!important}.admin-close-button{float:right}.fab-button{position:fixed;right:110px;bottom:100px;z-index:10;background-color:#dcdcdc;color:#8f8f8f}.full-tabs{padding:10px}.mat-drawer-container-full-screen{background-color:red}\n"] }]
|
|
5924
|
+
}], ctorParameters: () => [{ type: i1$3.BreakpointsService }, { type: TaonAdminService }], propDecorators: { tabGroup: [{
|
|
5581
5925
|
type: ViewChild,
|
|
5582
5926
|
args: ['tabGroup']
|
|
5583
5927
|
}], taonAdminModeConfigurationDataChanged: [{
|
|
@@ -5591,254 +5935,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
5591
5935
|
;
|
|
5592
5936
|
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.ts
|
|
5593
5937
|
|
|
5594
|
-
class TaonAdminEditModeComponent {
|
|
5595
|
-
constructor(router) {
|
|
5596
|
-
this.router = router;
|
|
5597
|
-
this.inited$ = of(true);
|
|
5598
|
-
this.destroyed$ = new Subject();
|
|
5599
|
-
this.handlers = [];
|
|
5600
|
-
this.columns = [
|
|
5601
|
-
{
|
|
5602
|
-
header: 'ID',
|
|
5603
|
-
field: 'id',
|
|
5604
|
-
maxWidth: 100,
|
|
5605
|
-
showExpand: true,
|
|
5606
|
-
},
|
|
5607
|
-
{
|
|
5608
|
-
header: 'src',
|
|
5609
|
-
field: 'src',
|
|
5610
|
-
maxWidth: 250,
|
|
5611
|
-
},
|
|
5612
|
-
{
|
|
5613
|
-
header: 'Content Type',
|
|
5614
|
-
field: 'contentType',
|
|
5615
|
-
maxWidth: 120,
|
|
5616
|
-
},
|
|
5617
|
-
];
|
|
5618
|
-
this.taonAdminEditModeDataChanged = new EventEmitter();
|
|
5619
|
-
this.taonAdminEditModeData = {};
|
|
5620
|
-
}
|
|
5621
|
-
ngOnInit() {
|
|
5622
|
-
this.files = this.admin.currentFiles;
|
|
5623
|
-
this.handlers.push(this.admin.onEditMode$.subscribe(() => {
|
|
5624
|
-
this.refresFilesList();
|
|
5625
|
-
}));
|
|
5626
|
-
this.admin.onRegisterFile().pipe(takeUntil(this.destroyed$), tap(() => {
|
|
5627
|
-
this.refresFilesList();
|
|
5628
|
-
}));
|
|
5629
|
-
}
|
|
5630
|
-
ngOnDestroy() {
|
|
5631
|
-
this.handlers.forEach(h => h.unsubscribe());
|
|
5632
|
-
this.destroyed$.next(void 0);
|
|
5633
|
-
this.destroyed$.unsubscribe();
|
|
5634
|
-
}
|
|
5635
|
-
ngAfterViewInit() {
|
|
5636
|
-
//Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
|
|
5637
|
-
//Add 'implements AfterViewInit' to the class.
|
|
5638
|
-
setTimeout(() => {
|
|
5639
|
-
this.refresFilesList();
|
|
5640
|
-
}, 500);
|
|
5641
|
-
}
|
|
5642
|
-
expansionRow(e) {
|
|
5643
|
-
console.log(e);
|
|
5644
|
-
}
|
|
5645
|
-
refresFilesList() {
|
|
5646
|
-
this.files = this.admin.currentFiles;
|
|
5647
|
-
}
|
|
5648
|
-
searchFind(file) {
|
|
5649
|
-
if (!!this?.fileToSearch) {
|
|
5650
|
-
return file?.src?.search(this?.fileToSearch) !== -1;
|
|
5651
|
-
}
|
|
5652
|
-
return true;
|
|
5653
|
-
}
|
|
5654
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeComponent, deps: [{ token: i1$4.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5655
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonAdminEditModeComponent, selector: "taon-admin-edit-mode", inputs: { taonAdminEditModeData: "taonAdminEditModeData" }, outputs: { taonAdminEditModeDataChanged: "taonAdminEditModeDataChanged" }, ngImport: i0, template: "<ng-template #expansionTpl let-row>\n hello from expansion {{ row.src }}\n</ng-template>\n\n<mat-card *ngIf=\"inited$ | async\">\n <div *ngIf=\"!admin.selectedFile\">Please select file from portal to edit</div>\n <taon-file\n *ngIf=\"admin.selectedFile\"\n class=\"file-inside-admin\"\n [insideAdmin]=\"true\"\n [file]=\"admin.selectedFile\"></taon-file>\n\n <hr />\n\n <mat-tab-group\n dynamicHeight\n [selectedIndex]=\"selectedTabIndex\"\n (selectedIndexChange)=\"selectedTabIndex = $event; refresFilesList()\">\n <mat-tab label=\"General\">\n <!-- <taon-file-general-opt\n [file]=\"admin.selectedFile\"></taon-file-general-opt> -->\n </mat-tab>\n <!-- <mat-tab label=\"CSS Editing\">\n <ace [mode]=\"'css'\"\n *ngIf=\"admin.selectedFile\"\n [(value)]=\"admin.selectedFile.css\"\n [theme]=\"'github'\"\n style=\"width: 100%; height: 300px;\"></ace>\n </mat-tab> -->\n\n <mat-tab label=\"Files Picker\">\n <!-- <taon-table\n [entity]=\"entity\"\n [allowedColumns]=\"['src', 'contentType']\"\n [columns]=\"columns\"\n [expansionTemplate]=\"expansionTpl\"\n (expansionChange)=\"expansionRow($event)\">\n </taon-table> -->\n </mat-tab>\n <mat-tab label=\"File Version History\">\n <!-- <taon-table\n [entity]=\"entity\"\n [allowedColumns]=\"['src', 'contentType']\"\n [columns]=\"columns\"\n [expansionTemplate]=\"expansionTpl\"\n (expansionChange)=\"expansionRow($event)\">\n </taon-table> -->\n </mat-tab>\n <mat-tab label=\"Current File\">\n <columns-container *ngIf=\"files.length > 0\">\n <column grow>\n <mat-form-field style=\"width: 100%\">\n <input\n matInput\n [(ngModel)]=\"fileToSearch\"\n (focus)=\"refresFilesList()\"\n placeholder=\"Search by name\" />\n </mat-form-field>\n </column>\n <column [width]=\"40\">\n <button\n mat-icon-button\n (click)=\"fileToSearch = ''; refresFilesList()\"\n *ngIf=\"fileToSearch && fileToSearch?.trim() !== ''\">\n <mat-icon>backspace</mat-icon>\n </button>\n </column>\n <!-- <column [width]=\"40\">\n <button mat-icon-button (click)=\"refresFilesList();\" >\n <mat-icon >refresh</mat-icon>\n </button>\n </column> -->\n </columns-container>\n <columns-container *ngIf=\"files.length == 0\">\n <section>\n <code\n >No <taon-file/> - s components detected on this page</code\n >\n </section>\n </columns-container>\n\n <div class=\"scrollable-files-list\" *ngIf=\"files.length > 0\">\n <ng-scrollbar>\n <!-- selected: \"{{ selectedFile?.src }}\" -->\n <!-- {{ filesSelection.selectedOptions | json }} -->\n <mat-selection-list\n [multiple]=\"false\"\n #filesToSelect\n (selectionChange)=\"\n admin.selectedFile = filesToSelect.selectedOptions.hasValue()\n ? filesToSelect.selectedOptions.selected[0].value\n : null\n \">\n <mat-list-option\n *ngFor=\"let file of files | filterBy: ['src'] : fileToSearch\"\n [value]=\"file\">\n <strong *ngIf=\"file?.src === admin.selectedFile?.src\">\n {{ file.src }}\n </strong>\n <span *ngIf=\"file?.src !== admin.selectedFile?.src\">\n {{ file.src }}\n </span>\n </mat-list-option>\n </mat-selection-list>\n </ng-scrollbar>\n </div>\n </mat-tab>\n </mat-tab-group>\n</mat-card>\n", styles: [":host{display:block}.scrollable-files-list{height:150px;background:#8080801c;display:block}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$3.ColumnsComponent, selector: "columns-container" }, { kind: "component", type: i1$3.ColumnComponent, selector: "column", inputs: ["width"] }, { kind: "directive", type: i1$3.DirectiveGrow, selector: "[grow]" }, { kind: "component", type: i4$1.NgScrollbar, selector: "ng-scrollbar:not([externalViewport])", exportAs: ["ngScrollbar"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: i7.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i11$1.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i11$1.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "component", type: i11.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i11.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i13.FilterByPipe, name: "filterBy" }] }); }
|
|
5656
|
-
}
|
|
5657
|
-
__decorate([
|
|
5658
|
-
(Stor.property.in.localstorage
|
|
5659
|
-
.for(TaonAdminEditModeComponent)
|
|
5660
|
-
.withDefaultValue(0)),
|
|
5661
|
-
__metadata("design:type", Number)
|
|
5662
|
-
], TaonAdminEditModeComponent.prototype, "selectedTabIndex", void 0);
|
|
5663
|
-
__decorate([
|
|
5664
|
-
(Stor.property.in.localstorage
|
|
5665
|
-
.for(TaonAdminEditModeComponent)
|
|
5666
|
-
.withDefaultValue('')),
|
|
5667
|
-
__metadata("design:type", String)
|
|
5668
|
-
], TaonAdminEditModeComponent.prototype, "fileToSearch", void 0);
|
|
5669
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeComponent, decorators: [{
|
|
5670
|
-
type: Component,
|
|
5671
|
-
args: [{ selector: 'taon-admin-edit-mode', template: "<ng-template #expansionTpl let-row>\n hello from expansion {{ row.src }}\n</ng-template>\n\n<mat-card *ngIf=\"inited$ | async\">\n <div *ngIf=\"!admin.selectedFile\">Please select file from portal to edit</div>\n <taon-file\n *ngIf=\"admin.selectedFile\"\n class=\"file-inside-admin\"\n [insideAdmin]=\"true\"\n [file]=\"admin.selectedFile\"></taon-file>\n\n <hr />\n\n <mat-tab-group\n dynamicHeight\n [selectedIndex]=\"selectedTabIndex\"\n (selectedIndexChange)=\"selectedTabIndex = $event; refresFilesList()\">\n <mat-tab label=\"General\">\n <!-- <taon-file-general-opt\n [file]=\"admin.selectedFile\"></taon-file-general-opt> -->\n </mat-tab>\n <!-- <mat-tab label=\"CSS Editing\">\n <ace [mode]=\"'css'\"\n *ngIf=\"admin.selectedFile\"\n [(value)]=\"admin.selectedFile.css\"\n [theme]=\"'github'\"\n style=\"width: 100%; height: 300px;\"></ace>\n </mat-tab> -->\n\n <mat-tab label=\"Files Picker\">\n <!-- <taon-table\n [entity]=\"entity\"\n [allowedColumns]=\"['src', 'contentType']\"\n [columns]=\"columns\"\n [expansionTemplate]=\"expansionTpl\"\n (expansionChange)=\"expansionRow($event)\">\n </taon-table> -->\n </mat-tab>\n <mat-tab label=\"File Version History\">\n <!-- <taon-table\n [entity]=\"entity\"\n [allowedColumns]=\"['src', 'contentType']\"\n [columns]=\"columns\"\n [expansionTemplate]=\"expansionTpl\"\n (expansionChange)=\"expansionRow($event)\">\n </taon-table> -->\n </mat-tab>\n <mat-tab label=\"Current File\">\n <columns-container *ngIf=\"files.length > 0\">\n <column grow>\n <mat-form-field style=\"width: 100%\">\n <input\n matInput\n [(ngModel)]=\"fileToSearch\"\n (focus)=\"refresFilesList()\"\n placeholder=\"Search by name\" />\n </mat-form-field>\n </column>\n <column [width]=\"40\">\n <button\n mat-icon-button\n (click)=\"fileToSearch = ''; refresFilesList()\"\n *ngIf=\"fileToSearch && fileToSearch?.trim() !== ''\">\n <mat-icon>backspace</mat-icon>\n </button>\n </column>\n <!-- <column [width]=\"40\">\n <button mat-icon-button (click)=\"refresFilesList();\" >\n <mat-icon >refresh</mat-icon>\n </button>\n </column> -->\n </columns-container>\n <columns-container *ngIf=\"files.length == 0\">\n <section>\n <code\n >No <taon-file/> - s components detected on this page</code\n >\n </section>\n </columns-container>\n\n <div class=\"scrollable-files-list\" *ngIf=\"files.length > 0\">\n <ng-scrollbar>\n <!-- selected: \"{{ selectedFile?.src }}\" -->\n <!-- {{ filesSelection.selectedOptions | json }} -->\n <mat-selection-list\n [multiple]=\"false\"\n #filesToSelect\n (selectionChange)=\"\n admin.selectedFile = filesToSelect.selectedOptions.hasValue()\n ? filesToSelect.selectedOptions.selected[0].value\n : null\n \">\n <mat-list-option\n *ngFor=\"let file of files | filterBy: ['src'] : fileToSearch\"\n [value]=\"file\">\n <strong *ngIf=\"file?.src === admin.selectedFile?.src\">\n {{ file.src }}\n </strong>\n <span *ngIf=\"file?.src !== admin.selectedFile?.src\">\n {{ file.src }}\n </span>\n </mat-list-option>\n </mat-selection-list>\n </ng-scrollbar>\n </div>\n </mat-tab>\n </mat-tab-group>\n</mat-card>\n", styles: [":host{display:block}.scrollable-files-list{height:150px;background:#8080801c;display:block}\n"] }]
|
|
5672
|
-
}], ctorParameters: () => [{ type: i1$4.Router }], propDecorators: { taonAdminEditModeDataChanged: [{
|
|
5673
|
-
type: Output
|
|
5674
|
-
}], taonAdminEditModeData: [{
|
|
5675
|
-
type: Input
|
|
5676
|
-
}] } });
|
|
5677
|
-
;
|
|
5678
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.ts
|
|
5679
|
-
|
|
5680
|
-
class TaonFileGeneralOptComponent {
|
|
5681
|
-
constructor() {
|
|
5682
|
-
this.height = 100;
|
|
5683
|
-
this.handlers = [];
|
|
5684
|
-
this.fieldsOrder = [];
|
|
5685
|
-
this.fields = [
|
|
5686
|
-
{
|
|
5687
|
-
key: 'width',
|
|
5688
|
-
},
|
|
5689
|
-
{
|
|
5690
|
-
key: 'height',
|
|
5691
|
-
},
|
|
5692
|
-
{
|
|
5693
|
-
key: 'display',
|
|
5694
|
-
},
|
|
5695
|
-
{
|
|
5696
|
-
key: 'widthUnit',
|
|
5697
|
-
},
|
|
5698
|
-
{
|
|
5699
|
-
key: 'heightUnit', // @ts-ignore
|
|
5700
|
-
},
|
|
5701
|
-
{
|
|
5702
|
-
key: 'action',
|
|
5703
|
-
type: 'action',
|
|
5704
|
-
templateOptions: {
|
|
5705
|
-
label: 'Reset',
|
|
5706
|
-
icon: 'cancel',
|
|
5707
|
-
raised: true,
|
|
5708
|
-
action: () => {
|
|
5709
|
-
console.log('reset');
|
|
5710
|
-
},
|
|
5711
|
-
},
|
|
5712
|
-
},
|
|
5713
|
-
].map(f => {
|
|
5714
|
-
f.className = 'formly-field-half-size';
|
|
5715
|
-
return f;
|
|
5716
|
-
});
|
|
5717
|
-
}
|
|
5718
|
-
ngOnInit() { }
|
|
5719
|
-
ngOnDestroy() {
|
|
5720
|
-
this.handlers.forEach(h => h.unsubscribe());
|
|
5721
|
-
}
|
|
5722
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5723
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonFileGeneralOptComponent, selector: "taon-file-general-opt", inputs: { height: "height", file: "file" }, host: { properties: { "style.minHeight.px": "this.height" } }, ngImport: i0, template: "<!-- <taon-formly-form\n *ngIf=\"file\"\n [fields]=\"fields\"\n [fieldsOrder]=\"fieldsOrder\"\n [exclude]=\"['id']\"\n [(model)]=\"file.css\">\n</taon-formly-form> -->\n", styles: [":host{display:block}\n"] }); }
|
|
5724
|
-
}
|
|
5725
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptComponent, decorators: [{
|
|
5726
|
-
type: Component,
|
|
5727
|
-
args: [{ selector: 'taon-file-general-opt', template: "<!-- <taon-formly-form\n *ngIf=\"file\"\n [fields]=\"fields\"\n [fieldsOrder]=\"fieldsOrder\"\n [exclude]=\"['id']\"\n [(model)]=\"file.css\">\n</taon-formly-form> -->\n", styles: [":host{display:block}\n"] }]
|
|
5728
|
-
}], ctorParameters: () => [], propDecorators: { height: [{
|
|
5729
|
-
type: HostBinding,
|
|
5730
|
-
args: ['style.minHeight.px']
|
|
5731
|
-
}, {
|
|
5732
|
-
type: Input
|
|
5733
|
-
}], file: [{
|
|
5734
|
-
type: Input
|
|
5735
|
-
}] } });
|
|
5736
|
-
;
|
|
5737
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.ts
|
|
5738
|
-
|
|
5739
|
-
class TaonFileGeneralOptModule {
|
|
5740
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5741
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, declarations: [TaonFileGeneralOptComponent], imports: [CommonModule, TaonFullMaterialModule], exports: [TaonFileGeneralOptComponent] }); }
|
|
5742
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, imports: [CommonModule, TaonFullMaterialModule] }); }
|
|
5743
|
-
}
|
|
5744
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, decorators: [{
|
|
5745
|
-
type: NgModule,
|
|
5746
|
-
args: [{
|
|
5747
|
-
imports: [CommonModule, TaonFullMaterialModule],
|
|
5748
|
-
declarations: [TaonFileGeneralOptComponent],
|
|
5749
|
-
exports: [TaonFileGeneralOptComponent],
|
|
5750
|
-
}]
|
|
5751
|
-
}] });
|
|
5752
|
-
;
|
|
5753
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.ts
|
|
5754
|
-
|
|
5755
|
-
;
|
|
5756
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.ts
|
|
5757
|
-
|
|
5758
|
-
class TaonAdminEditModeModule {
|
|
5759
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5760
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, declarations: [TaonAdminEditModeComponent], imports: [CommonModule,
|
|
5761
|
-
StaticColumnsModule,
|
|
5762
|
-
NgScrollbarModule,
|
|
5763
|
-
TaonFileGeneralOptModule,
|
|
5764
|
-
FormsModule,
|
|
5765
|
-
NgArrayPipesModule,
|
|
5766
|
-
TaonTableModule,
|
|
5767
|
-
TaonFullMaterialModule], exports: [TaonAdminEditModeComponent] }); }
|
|
5768
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, imports: [CommonModule,
|
|
5769
|
-
StaticColumnsModule,
|
|
5770
|
-
NgScrollbarModule,
|
|
5771
|
-
TaonFileGeneralOptModule,
|
|
5772
|
-
FormsModule,
|
|
5773
|
-
NgArrayPipesModule,
|
|
5774
|
-
TaonTableModule,
|
|
5775
|
-
TaonFullMaterialModule] }); }
|
|
5776
|
-
}
|
|
5777
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, decorators: [{
|
|
5778
|
-
type: NgModule,
|
|
5779
|
-
args: [{
|
|
5780
|
-
imports: [
|
|
5781
|
-
CommonModule,
|
|
5782
|
-
StaticColumnsModule,
|
|
5783
|
-
NgScrollbarModule,
|
|
5784
|
-
TaonFileGeneralOptModule,
|
|
5785
|
-
FormsModule,
|
|
5786
|
-
NgArrayPipesModule,
|
|
5787
|
-
TaonTableModule,
|
|
5788
|
-
TaonFullMaterialModule, // TODO import only partial things
|
|
5789
|
-
],
|
|
5790
|
-
declarations: [TaonAdminEditModeComponent],
|
|
5791
|
-
exports: [TaonAdminEditModeComponent],
|
|
5792
|
-
}]
|
|
5793
|
-
}] });
|
|
5794
|
-
;
|
|
5795
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.ts
|
|
5796
|
-
|
|
5797
|
-
;
|
|
5798
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.ts
|
|
5799
|
-
|
|
5800
|
-
class TaonAdminModeConfigurationModule {
|
|
5801
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5802
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, declarations: [TaonAdminModeConfigurationComponent], imports: [CommonModule,
|
|
5803
|
-
StaticColumnsModule,
|
|
5804
|
-
FormsModule,
|
|
5805
|
-
NgScrollbarModule,
|
|
5806
|
-
TaonAdminEditModeModule,
|
|
5807
|
-
TaonProgressBarModule,
|
|
5808
|
-
TaonNotificationsModule,
|
|
5809
|
-
TaonFullMaterialModule, // TODO import only partial things
|
|
5810
|
-
TaonSessionPasscodeComponent], exports: [TaonAdminModeConfigurationComponent] }); }
|
|
5811
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, imports: [CommonModule,
|
|
5812
|
-
StaticColumnsModule,
|
|
5813
|
-
FormsModule,
|
|
5814
|
-
NgScrollbarModule,
|
|
5815
|
-
TaonAdminEditModeModule,
|
|
5816
|
-
TaonProgressBarModule,
|
|
5817
|
-
TaonNotificationsModule,
|
|
5818
|
-
TaonFullMaterialModule, // TODO import only partial things
|
|
5819
|
-
TaonSessionPasscodeComponent] }); }
|
|
5820
|
-
}
|
|
5821
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, decorators: [{
|
|
5822
|
-
type: NgModule,
|
|
5823
|
-
args: [{
|
|
5824
|
-
imports: [
|
|
5825
|
-
CommonModule,
|
|
5826
|
-
StaticColumnsModule,
|
|
5827
|
-
FormsModule,
|
|
5828
|
-
NgScrollbarModule,
|
|
5829
|
-
TaonAdminEditModeModule,
|
|
5830
|
-
TaonProgressBarModule,
|
|
5831
|
-
TaonNotificationsModule,
|
|
5832
|
-
TaonFullMaterialModule, // TODO import only partial things
|
|
5833
|
-
TaonSessionPasscodeComponent,
|
|
5834
|
-
],
|
|
5835
|
-
declarations: [TaonAdminModeConfigurationComponent],
|
|
5836
|
-
exports: [TaonAdminModeConfigurationComponent],
|
|
5837
|
-
}]
|
|
5838
|
-
}] });
|
|
5839
|
-
;
|
|
5840
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.ts
|
|
5841
|
-
|
|
5842
5938
|
;
|
|
5843
5939
|
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/index.ts
|
|
5844
5940
|
|
|
@@ -5859,6 +5955,7 @@ var Taon;
|
|
|
5859
5955
|
Taon.Provider = TaonProvider;
|
|
5860
5956
|
Taon.Repository = TaonRepository;
|
|
5861
5957
|
Taon.Subscriber = TaonSubscriber;
|
|
5958
|
+
Taon.Migration = TaonMigration;
|
|
5862
5959
|
Taon.isBrowser = coreHelpers.Helpers.isBrowser;
|
|
5863
5960
|
Taon.isNode = coreHelpers.Helpers.isNode;
|
|
5864
5961
|
Taon.isWebSQL = coreHelpers.Helpers.isWebSQL;
|
|
@@ -5895,5 +5992,5 @@ var Taon;
|
|
|
5895
5992
|
* Generated bundle index. Do not edit.
|
|
5896
5993
|
*/
|
|
5897
5994
|
|
|
5898
|
-
export { BaseContext, BaseController, BaseEntity, BaseProvider, BaseRepository, ClassHelpers, Models, SafePipe, Taon, TaonAdminModeConfigurationComponent,
|
|
5995
|
+
export { BaseContext, BaseController, BaseEntity, BaseMigration, BaseProvider, BaseRepository, ClassHelpers, Models, SafePipe, Taon, TaonAdminModeConfigurationComponent, TaonFullMaterialModule, TaonGithubForkMeCornerComponent, TaonGithubForkMeCornerModule, TaonInjectHTMLDirective, TaonLongPress, TaonNotificationOptions, TaonNotificationsComponent, TaonNotificationsModule, TaonNotificationsService, TaonProgressBarComponent, TaonProgressBarModule, TaonSessionPasscodeComponent, TaonTableComponent, TaonTableModule, createContext, inject };
|
|
5899
5996
|
//# sourceMappingURL=taon.mjs.map
|