taon 18.0.20 → 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-class.mjs +2 -2
- package/browser/esm2022/lib/base-classes/base-controller.mjs +3 -2
- 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 +3 -1
- package/browser/esm2022/lib/context-db-migrations.mjs +410 -0
- package/browser/esm2022/lib/create-context.mjs +17 -4
- 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/endpoint-context.mjs +83 -49
- 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 +673 -420
- package/browser/fesm2022/taon.mjs.map +1 -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-migration.d.ts +12 -0
- package/browser/lib/base-classes/base.d.ts +5 -0
- package/browser/lib/context-db-migrations.d.ts +17 -0
- package/browser/lib/create-context.d.ts +4 -1
- 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/endpoint-context.d.ts +12 -5
- package/browser/lib/index.d.ts +14 -1
- package/browser/lib/models.d.ts +44 -19
- 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-class.mjs +2 -2
- package/client/esm2022/lib/base-classes/base-controller.mjs +3 -2
- 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 +3 -1
- package/client/esm2022/lib/context-db-migrations.mjs +410 -0
- package/client/esm2022/lib/create-context.mjs +17 -4
- 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/endpoint-context.mjs +83 -49
- 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 +673 -420
- package/client/fesm2022/taon.mjs.map +1 -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-migration.d.ts +12 -0
- package/client/lib/base-classes/base.d.ts +5 -0
- package/client/lib/context-db-migrations.d.ts +17 -0
- package/client/lib/create-context.d.ts +4 -1
- 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/endpoint-context.d.ts +12 -5
- package/client/lib/index.d.ts +14 -1
- package/client/lib/models.d.ts +44 -19
- 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-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-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 +5 -0
- package/lib/base-classes/base.js +2 -0
- 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 +4 -1
- package/lib/create-context.js +30 -21
- 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/endpoint-context.d.ts +12 -5
- package/lib/endpoint-context.js +234 -189
- package/lib/endpoint-context.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 +44 -19
- 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 +32 -29
- package/websql/README.md +24 -24
- 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-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 +3 -1
- package/websql/esm2022/lib/context-db-migrations.mjs +269 -0
- package/websql/esm2022/lib/create-context.mjs +17 -4
- 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/endpoint-context.mjs +117 -85
- 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 +564 -460
- package/websql/fesm2022/taon.mjs.map +1 -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-migration.d.ts +12 -0
- package/websql/lib/base-classes/base.d.ts +5 -0
- package/websql/lib/context-db-migrations.d.ts +17 -0
- package/websql/lib/create-context.d.ts +4 -1
- 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/endpoint-context.d.ts +12 -5
- package/websql/lib/index.d.ts +14 -1
- package/websql/lib/models.d.ts +44 -19
- 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: () => [] });
|
|
@@ -2765,11 +2784,279 @@ class RealtimeCore {
|
|
|
2765
2784
|
;
|
|
2766
2785
|
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-core.ts
|
|
2767
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
|
+
|
|
2768
3052
|
/* eslint-disable @typescript-eslint/typedef */
|
|
2769
3053
|
class EndpointContext {
|
|
2770
3054
|
static initNgZone(ngZone) {
|
|
2771
3055
|
this.ngZone = ngZone;
|
|
2772
3056
|
}
|
|
3057
|
+
get isRunOrRevertOnlyMigrationAppStart() {
|
|
3058
|
+
return !!(this.onlyMigrationRun || this.onlyMigrationRevertToTimestamp);
|
|
3059
|
+
}
|
|
2773
3060
|
get realtimeClient() {
|
|
2774
3061
|
return this.realtime.client;
|
|
2775
3062
|
}
|
|
@@ -2800,6 +3087,12 @@ class EndpointContext {
|
|
|
2800
3087
|
}
|
|
2801
3088
|
return this.config?.logs === true;
|
|
2802
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
|
+
}
|
|
2803
3096
|
constructor(originalConfig, configFn) {
|
|
2804
3097
|
this.originalConfig = originalConfig;
|
|
2805
3098
|
this.configFn = configFn;
|
|
@@ -2809,6 +3102,7 @@ class EndpointContext {
|
|
|
2809
3102
|
* (with init() function )
|
|
2810
3103
|
*/
|
|
2811
3104
|
this.inited = false;
|
|
3105
|
+
this.dbMigrations = new ContextDbMigrations(this);
|
|
2812
3106
|
this.localInstaceObjSymbol = Symbol('localInstaceObjSymbol');
|
|
2813
3107
|
/**
|
|
2814
3108
|
* all instances of classes from context
|
|
@@ -2823,12 +3117,15 @@ class EndpointContext {
|
|
|
2823
3117
|
Models.ClassType.PROVIDER,
|
|
2824
3118
|
Models.ClassType.REPOSITORY,
|
|
2825
3119
|
Models.ClassType.SUBSCRIBER,
|
|
3120
|
+
Models.ClassType.MIGRATION,
|
|
2826
3121
|
];
|
|
2827
3122
|
this.allTypesfromContexts = [
|
|
2828
3123
|
...this.injectableTypesfromContexts,
|
|
2829
3124
|
Models.ClassType.ENTITY,
|
|
2830
3125
|
];
|
|
2831
3126
|
this.expressApp = {};
|
|
3127
|
+
this.onlyMigrationRun = false;
|
|
3128
|
+
this.onlyMigrationRevertToTimestamp = undefined;
|
|
2832
3129
|
this.entitiesTriggers = {};
|
|
2833
3130
|
this.cloneClassWithNewMetadata = ({ BaseClass, className, config, ctx, classType, }) => {
|
|
2834
3131
|
const cloneClass = () => {
|
|
@@ -2896,9 +3193,16 @@ class EndpointContext {
|
|
|
2896
3193
|
};
|
|
2897
3194
|
}
|
|
2898
3195
|
async init(options) {
|
|
2899
|
-
const { initFromRecrusiveContextResovle, overrideHost, overrideRemoteHost, } = options || {}; // TODO use it ?
|
|
3196
|
+
const { initFromRecrusiveContextResovle, overrideHost, overrideRemoteHost, onlyMigrationRun, onlyMigrationRevertToTimestamp, } = options || {}; // TODO use it ?
|
|
2900
3197
|
this.inited = true;
|
|
3198
|
+
// @ts-ignore
|
|
3199
|
+
this.onlyMigrationRun = onlyMigrationRun;
|
|
3200
|
+
// @ts-ignore
|
|
3201
|
+
this.onlyMigrationRevertToTimestamp = onlyMigrationRevertToTimestamp;
|
|
2901
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
|
+
}
|
|
2902
3206
|
if (overrideHost && overrideRemoteHost) {
|
|
2903
3207
|
Helpers.throw(`[taon-config] You can't have overrideHost and overrideRemoteHost at the same time`);
|
|
2904
3208
|
}
|
|
@@ -2964,6 +3268,7 @@ class EndpointContext {
|
|
|
2964
3268
|
this.config.repositories = this.config.repositories || {};
|
|
2965
3269
|
this.config.providers = this.config.providers || {};
|
|
2966
3270
|
this.config.subscribers = this.config.subscribers || {};
|
|
3271
|
+
this.config.migrations = this.config.migrations || {};
|
|
2967
3272
|
this.config.entities = {
|
|
2968
3273
|
...(await this.getRecrusiveClassesfromContextsObj(Models.ClassType.ENTITY)),
|
|
2969
3274
|
...this.config.entities,
|
|
@@ -2984,6 +3289,10 @@ class EndpointContext {
|
|
|
2984
3289
|
...(await this.getRecrusiveClassesfromContextsObj(Models.ClassType.REPOSITORY)),
|
|
2985
3290
|
...this.config.repositories,
|
|
2986
3291
|
};
|
|
3292
|
+
this.config.migrations = {
|
|
3293
|
+
...(await this.getRecrusiveClassesfromContextsObj(Models.ClassType.MIGRATION)),
|
|
3294
|
+
...this.config.migrations,
|
|
3295
|
+
};
|
|
2987
3296
|
this.config.controllers = this.cloneClassesObjWithNewMetadata({
|
|
2988
3297
|
classesInput: this.config.controllers,
|
|
2989
3298
|
config: this.config,
|
|
@@ -3008,6 +3317,12 @@ class EndpointContext {
|
|
|
3008
3317
|
ctx: this,
|
|
3009
3318
|
classType: Models.ClassType.SUBSCRIBER,
|
|
3010
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
|
+
});
|
|
3011
3326
|
for (const classTypeName of this.injectableTypesfromContexts) {
|
|
3012
3327
|
this.classInstancesByNameObj[classTypeName] = {};
|
|
3013
3328
|
this.objWithClassesInstancesArr[classTypeName] = [];
|
|
@@ -3015,35 +3330,37 @@ class EndpointContext {
|
|
|
3015
3330
|
for (const classTypeName of this.injectableTypesfromContexts) {
|
|
3016
3331
|
await this.createInstances(this.config[Models.ClassTypeKey[classTypeName]], classTypeName);
|
|
3017
3332
|
}
|
|
3018
|
-
if (
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
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
|
+
}
|
|
3047
3364
|
}
|
|
3048
3365
|
if (this.config.abstract) {
|
|
3049
3366
|
this.logFramework &&
|
|
@@ -3064,73 +3381,59 @@ class EndpointContext {
|
|
|
3064
3381
|
});
|
|
3065
3382
|
}
|
|
3066
3383
|
getAutoGeneratedConfig() {
|
|
3067
|
-
let databaseConfig;
|
|
3068
|
-
if (
|
|
3384
|
+
let databaseConfig = Models.DatabaseConfig.from({});
|
|
3385
|
+
if (UtilsOs.isRunningInDocker()) {
|
|
3069
3386
|
Helpers.info('Running in docker, using in mysql database');
|
|
3070
|
-
databaseConfig = {
|
|
3071
|
-
database: `
|
|
3387
|
+
databaseConfig = Models.DatabaseConfig.from({
|
|
3388
|
+
database: `db-${this.contextName}.sqlite`,
|
|
3072
3389
|
type: 'mysql',
|
|
3073
|
-
|
|
3074
|
-
synchronize: true,
|
|
3075
|
-
dropSchema: true,
|
|
3390
|
+
recreateMode: 'PRESERVE_DATA+MIGRATIONS',
|
|
3076
3391
|
logging: this.logDb,
|
|
3077
3392
|
databasePort: 3306,
|
|
3078
3393
|
databaseHost: 'localhost',
|
|
3079
3394
|
databaseUsername: 'root',
|
|
3080
3395
|
databasePassword: 'admin',
|
|
3081
|
-
};
|
|
3396
|
+
});
|
|
3082
3397
|
}
|
|
3083
3398
|
else {
|
|
3084
3399
|
this.logFramework &&
|
|
3085
3400
|
Helpers.info(`[taon][database] Automatically resolving database config for mode ${this.mode}`);
|
|
3086
3401
|
switch (this.mode) {
|
|
3087
3402
|
case 'backend-frontend(ipc-electron)':
|
|
3088
|
-
|
|
3089
|
-
location: `
|
|
3403
|
+
databaseConfig = Models.DatabaseConfig.from({
|
|
3404
|
+
location: `db-${this.contextName}.sqlite`,
|
|
3090
3405
|
type: 'sqljs',
|
|
3091
|
-
|
|
3092
|
-
synchronize: true,
|
|
3093
|
-
dropSchema: true,
|
|
3406
|
+
recreateMode: 'DROP_DB+MIGRATIONS',
|
|
3094
3407
|
logging: this.logDb,
|
|
3095
|
-
};
|
|
3408
|
+
});
|
|
3096
3409
|
break;
|
|
3097
3410
|
case 'backend-frontend(websql-electron)':
|
|
3098
3411
|
case 'backend-frontend(websql)':
|
|
3099
|
-
|
|
3100
|
-
|
|
3412
|
+
let keepWebsqlDbDataAfterReload = false;
|
|
3413
|
+
keepWebsqlDbDataAfterReload =
|
|
3414
|
+
TaonAdminService.Instance?.keepWebsqlDbDataAfterReload; // TODO @LAST
|
|
3415
|
+
databaseConfig = databaseConfig = Models.DatabaseConfig.from({
|
|
3416
|
+
location: `db-${this.contextName}.sqlite`,
|
|
3101
3417
|
type: 'sqljs',
|
|
3102
3418
|
useLocalForage: true, // !!window['localforage'], // TODO this need to be checked in runtime
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3419
|
+
recreateMode: keepWebsqlDbDataAfterReload
|
|
3420
|
+
? 'PRESERVE_DATA+MIGRATIONS'
|
|
3421
|
+
: 'DROP_DB+MIGRATIONS',
|
|
3106
3422
|
logging: this.logDb,
|
|
3107
|
-
};
|
|
3108
|
-
let keepWebsqlDbDataAfterReload = false;
|
|
3109
|
-
keepWebsqlDbDataAfterReload =
|
|
3110
|
-
TaonAdmin.Instance.keepWebsqlDbDataAfterReload;
|
|
3111
|
-
if (keepWebsqlDbDataAfterReload) {
|
|
3112
|
-
databaseConfig.dropSchema = false;
|
|
3113
|
-
delete databaseConfig.synchronize; // false is not auto synchonize - from what I understand
|
|
3114
|
-
}
|
|
3115
|
-
else {
|
|
3116
|
-
databaseConfig.dropSchema = true;
|
|
3117
|
-
databaseConfig.synchronize = true;
|
|
3118
|
-
}
|
|
3423
|
+
});
|
|
3119
3424
|
break;
|
|
3120
3425
|
case 'backend-frontend(tcp+udp)':
|
|
3121
|
-
databaseConfig = {
|
|
3122
|
-
database: `context-db-${
|
|
3123
|
-
location: `
|
|
3426
|
+
databaseConfig = Models.DatabaseConfig.from({
|
|
3427
|
+
database: `context-db-${this.contextName}`,
|
|
3428
|
+
location: `db-${this.contextName}.sqlite`,
|
|
3124
3429
|
type: 'sqljs',
|
|
3125
|
-
|
|
3126
|
-
synchronize: true,
|
|
3127
|
-
dropSchema: true,
|
|
3430
|
+
recreateMode: 'DROP_DB+MIGRATIONS',
|
|
3128
3431
|
logging: this.logDb,
|
|
3129
|
-
};
|
|
3432
|
+
});
|
|
3130
3433
|
break;
|
|
3131
3434
|
}
|
|
3132
3435
|
}
|
|
3133
|
-
return databaseConfig;
|
|
3436
|
+
return databaseConfig.databaseConfigTypeORM;
|
|
3134
3437
|
}
|
|
3135
3438
|
get ngZone() {
|
|
3136
3439
|
return EndpointContext.ngZone;
|
|
@@ -3290,6 +3593,8 @@ class EndpointContext {
|
|
|
3290
3593
|
return this.config.repositories;
|
|
3291
3594
|
case Models.ClassType.SUBSCRIBER:
|
|
3292
3595
|
return this.config.subscribers;
|
|
3596
|
+
case Models.ClassType.MIGRATION:
|
|
3597
|
+
return this.config.migrations;
|
|
3293
3598
|
}
|
|
3294
3599
|
}
|
|
3295
3600
|
isCLassType(classType, classFn) {
|
|
@@ -3328,7 +3633,7 @@ class EndpointContext {
|
|
|
3328
3633
|
}
|
|
3329
3634
|
}
|
|
3330
3635
|
async reinitControllers() {
|
|
3331
|
-
if (this.remoteHost) {
|
|
3636
|
+
if (this.remoteHost || Object.keys(this.config.migrations).length > 0) {
|
|
3332
3637
|
return;
|
|
3333
3638
|
}
|
|
3334
3639
|
const controllers = this.getClassesInstancesArrBy(Models.ClassType.CONTROLLER);
|
|
@@ -3350,6 +3655,7 @@ class EndpointContext {
|
|
|
3350
3655
|
Models.ClassType.REPOSITORY,
|
|
3351
3656
|
Models.ClassType.CONTROLLER,
|
|
3352
3657
|
Models.ClassType.ENTITY,
|
|
3658
|
+
Models.ClassType.MIGRATION,
|
|
3353
3659
|
]) {
|
|
3354
3660
|
for (const classFun of this.getClassFunByArr(classTypeName)) {
|
|
3355
3661
|
if (_$1.isFunction(classFun._)) {
|
|
@@ -3364,6 +3670,7 @@ class EndpointContext {
|
|
|
3364
3670
|
Models.ClassType.PROVIDER,
|
|
3365
3671
|
Models.ClassType.REPOSITORY,
|
|
3366
3672
|
Models.ClassType.CONTROLLER,
|
|
3673
|
+
Models.ClassType.MIGRATION,
|
|
3367
3674
|
]) {
|
|
3368
3675
|
for (const ctrl of this.getClassesInstancesArrBy(classTypeName)) {
|
|
3369
3676
|
if (_$1.isFunction(ctrl._)) {
|
|
@@ -3447,14 +3754,10 @@ class EndpointContext {
|
|
|
3447
3754
|
if (this.remoteHost) {
|
|
3448
3755
|
return;
|
|
3449
3756
|
}
|
|
3450
|
-
const entities =
|
|
3451
|
-
? this.config.override.entities
|
|
3452
|
-
: this.getClassFunByArr(Models.ClassType.ENTITY)).map(entityFn => {
|
|
3757
|
+
const entities = this.getClassFunByArr(Models.ClassType.ENTITY).map(entityFn => {
|
|
3453
3758
|
return ClassHelpers.getOrginalClass(entityFn);
|
|
3454
3759
|
});
|
|
3455
|
-
const subscribers = this.
|
|
3456
|
-
? this.config.override.subscribers
|
|
3457
|
-
: this.getClassFunByArr(Models.ClassType.SUBSCRIBER);
|
|
3760
|
+
const subscribers = this.getClassFunByArr(Models.ClassType.SUBSCRIBER);
|
|
3458
3761
|
const dataSourceDbConfig = _$1.isObject(this.databaseConfig)
|
|
3459
3762
|
? {
|
|
3460
3763
|
type: this.databaseConfig.type,
|
|
@@ -3466,9 +3769,15 @@ class EndpointContext {
|
|
|
3466
3769
|
useLocalForage: this.databaseConfig.useLocalForage,
|
|
3467
3770
|
entities,
|
|
3468
3771
|
subscribers,
|
|
3469
|
-
synchronize: this.
|
|
3470
|
-
|
|
3471
|
-
|
|
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,
|
|
3472
3781
|
logging: !!this.databaseConfig.logging,
|
|
3473
3782
|
location: this.databaseConfig.location,
|
|
3474
3783
|
}
|
|
@@ -3493,7 +3802,7 @@ class EndpointContext {
|
|
|
3493
3802
|
/* */
|
|
3494
3803
|
/* */
|
|
3495
3804
|
}
|
|
3496
|
-
(this.logDb || this.logFramework)
|
|
3805
|
+
if (this.logDb || this.logFramework) {
|
|
3497
3806
|
console.info(`
|
|
3498
3807
|
|
|
3499
3808
|
CONTECTION OK for ${this.contextName} - ${this.mode}
|
|
@@ -3501,13 +3810,18 @@ class EndpointContext {
|
|
|
3501
3810
|
[taon][typeorm] db prepration done.. db initialize=${this.connection?.isInitialized}
|
|
3502
3811
|
|
|
3503
3812
|
|
|
3504
|
-
`, dataSourceDbConfig);
|
|
3813
|
+
`, dataSourceDbConfig, { 'this.connection': !!this.connection });
|
|
3814
|
+
console.log(`Database file location: ${this.connection.options.database}`);
|
|
3815
|
+
}
|
|
3505
3816
|
}
|
|
3506
3817
|
else {
|
|
3507
3818
|
Helpers.info(`[taon][typeorm] Not initing db for mode ${this.mode}`);
|
|
3508
3819
|
}
|
|
3509
3820
|
}
|
|
3510
|
-
|
|
3821
|
+
initControllers() {
|
|
3822
|
+
if (this.isRunOrRevertOnlyMigrationAppStart) {
|
|
3823
|
+
return;
|
|
3824
|
+
}
|
|
3511
3825
|
const allControllers = this.getClassFunByArr(Models.ClassType.CONTROLLER);
|
|
3512
3826
|
for (const controllerClassFn of allControllers) {
|
|
3513
3827
|
controllerClassFn[Symbols.classMethodsNames] =
|
|
@@ -3578,7 +3892,7 @@ class EndpointContext {
|
|
|
3578
3892
|
}
|
|
3579
3893
|
}
|
|
3580
3894
|
writeActiveRoutes() {
|
|
3581
|
-
if (this.remoteHost) {
|
|
3895
|
+
if (this.remoteHost || this.isRunOrRevertOnlyMigrationAppStart) {
|
|
3582
3896
|
return;
|
|
3583
3897
|
}
|
|
3584
3898
|
const contexts = [this];
|
|
@@ -4291,6 +4605,9 @@ const createContext = (configFn) => {
|
|
|
4291
4605
|
get subscribers() {
|
|
4292
4606
|
return config.subscribers;
|
|
4293
4607
|
},
|
|
4608
|
+
get migrations() {
|
|
4609
|
+
return config.migrations;
|
|
4610
|
+
},
|
|
4294
4611
|
},
|
|
4295
4612
|
get contexts() {
|
|
4296
4613
|
return config.contexts;
|
|
@@ -4340,13 +4657,14 @@ const createContext = (configFn) => {
|
|
|
4340
4657
|
await endpointContextRef.initEntities();
|
|
4341
4658
|
await endpointContextRef.initSubscribers();
|
|
4342
4659
|
await endpointContextRef.initDatabaseConnection();
|
|
4343
|
-
endpointContextRef.
|
|
4660
|
+
await endpointContextRef.dbMigrations.ensureMigrationTableExists();
|
|
4661
|
+
endpointContextRef.initControllers();
|
|
4344
4662
|
endpointContextRef.startServer();
|
|
4345
4663
|
endpointContextRef.writeActiveRoutes();
|
|
4346
4664
|
await endpointContextRef.initClasses();
|
|
4347
4665
|
let keepWebsqlDbDataAfterReload = false;
|
|
4348
4666
|
keepWebsqlDbDataAfterReload =
|
|
4349
|
-
|
|
4667
|
+
TaonAdminService.Instance?.keepWebsqlDbDataAfterReload;
|
|
4350
4668
|
if (!Helpers.isNode && keepWebsqlDbDataAfterReload) {
|
|
4351
4669
|
Helpers.info(`[taon] Keep websql data after reload`);
|
|
4352
4670
|
}
|
|
@@ -4354,6 +4672,15 @@ const createContext = (configFn) => {
|
|
|
4354
4672
|
await endpointContextRef.reinitControllers();
|
|
4355
4673
|
}
|
|
4356
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
|
+
}
|
|
4357
4684
|
resolve(endpointContextRef);
|
|
4358
4685
|
});
|
|
4359
4686
|
});
|
|
@@ -4394,9 +4721,12 @@ var baseContext = /*#__PURE__*/Object.freeze({
|
|
|
4394
4721
|
BaseContext: BaseContext
|
|
4395
4722
|
});
|
|
4396
4723
|
|
|
4724
|
+
/**
|
|
4725
|
+
* Subscriber decorator
|
|
4726
|
+
*/
|
|
4397
4727
|
function TaonSubscriber(options) {
|
|
4398
4728
|
return function (constructor) {
|
|
4399
|
-
Reflect.defineMetadata(Symbols.metadata.options.
|
|
4729
|
+
Reflect.defineMetadata(Symbols.metadata.options.subscriber, options, constructor);
|
|
4400
4730
|
Reflect.defineMetadata(Symbols.metadata.className, options?.className || constructor.name, constructor);
|
|
4401
4731
|
ClassHelpers.setName(constructor, options?.className);
|
|
4402
4732
|
};
|
|
@@ -4411,133 +4741,133 @@ let BaseSubscriberForEntity = class BaseSubscriberForEntity extends BaseInjector
|
|
|
4411
4741
|
* Called after entity is loaded.
|
|
4412
4742
|
*/
|
|
4413
4743
|
afterLoad(entity) {
|
|
4414
|
-
this.
|
|
4744
|
+
this.ctx.logDb &&
|
|
4415
4745
|
console.log(`AFTER ENTITY LOADED: `, entity);
|
|
4416
4746
|
}
|
|
4417
4747
|
/**
|
|
4418
4748
|
* Called before query execution.
|
|
4419
4749
|
*/
|
|
4420
4750
|
beforeQuery(event) {
|
|
4421
|
-
this.
|
|
4751
|
+
this.ctx.logDb &&
|
|
4422
4752
|
console.log(`BEFORE QUERY: `, event.query);
|
|
4423
4753
|
}
|
|
4424
4754
|
/**
|
|
4425
4755
|
* Called after query execution.
|
|
4426
4756
|
*/
|
|
4427
4757
|
afterQuery(event) {
|
|
4428
|
-
this.
|
|
4758
|
+
this.ctx.logDb &&
|
|
4429
4759
|
console.log(`AFTER QUERY: `, event.query);
|
|
4430
4760
|
}
|
|
4431
4761
|
/**
|
|
4432
4762
|
* Called before entity insertion.
|
|
4433
4763
|
*/
|
|
4434
4764
|
beforeInsert(event) {
|
|
4435
|
-
this.
|
|
4765
|
+
this.ctx.logDb &&
|
|
4436
4766
|
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
|
|
4437
4767
|
}
|
|
4438
4768
|
/**
|
|
4439
4769
|
* Called after entity insertion.
|
|
4440
4770
|
*/
|
|
4441
4771
|
afterInsert(event) {
|
|
4442
|
-
this.
|
|
4772
|
+
this.ctx.logDb &&
|
|
4443
4773
|
console.log(`AFTER ENTITY INSERTED: `, event.entity);
|
|
4444
4774
|
}
|
|
4445
4775
|
/**
|
|
4446
4776
|
* Called before entity update.
|
|
4447
4777
|
*/
|
|
4448
4778
|
beforeUpdate(event) {
|
|
4449
|
-
this.
|
|
4779
|
+
this.ctx.logDb &&
|
|
4450
4780
|
console.log(`BEFORE ENTITY UPDATED: `, event.entity);
|
|
4451
4781
|
}
|
|
4452
4782
|
/**
|
|
4453
4783
|
* Called after entity update.
|
|
4454
4784
|
*/
|
|
4455
4785
|
afterUpdate(event) {
|
|
4456
|
-
this.
|
|
4786
|
+
this.ctx.logDb &&
|
|
4457
4787
|
console.log(`AFTER ENTITY UPDATED: `, event.entity);
|
|
4458
4788
|
}
|
|
4459
4789
|
/**
|
|
4460
4790
|
* Called before entity removal.
|
|
4461
4791
|
*/
|
|
4462
4792
|
beforeRemove(event) {
|
|
4463
|
-
this.
|
|
4793
|
+
this.ctx.logDb &&
|
|
4464
4794
|
console.log(`BEFORE ENTITY WITH ID ${event.entityId} REMOVED: `, event.entity);
|
|
4465
4795
|
}
|
|
4466
4796
|
/**
|
|
4467
4797
|
* Called after entity removal.
|
|
4468
4798
|
*/
|
|
4469
4799
|
afterRemove(event) {
|
|
4470
|
-
this.
|
|
4800
|
+
this.ctx.logDb &&
|
|
4471
4801
|
console.log(`AFTER ENTITY WITH ID ${event.entityId} REMOVED: `, event.entity);
|
|
4472
4802
|
}
|
|
4473
4803
|
/**
|
|
4474
4804
|
* Called before entity removal.
|
|
4475
4805
|
*/
|
|
4476
4806
|
beforeSoftRemove(event) {
|
|
4477
|
-
this.
|
|
4807
|
+
this.ctx.logDb &&
|
|
4478
4808
|
console.log(`BEFORE ENTITY WITH ID ${event.entityId} SOFT REMOVED: `, event.entity);
|
|
4479
4809
|
}
|
|
4480
4810
|
/**
|
|
4481
4811
|
* Called after entity removal.
|
|
4482
4812
|
*/
|
|
4483
4813
|
afterSoftRemove(event) {
|
|
4484
|
-
this.
|
|
4814
|
+
this.ctx.logDb &&
|
|
4485
4815
|
console.log(`AFTER ENTITY WITH ID ${event.entityId} SOFT REMOVED: `, event.entity);
|
|
4486
4816
|
}
|
|
4487
4817
|
/**
|
|
4488
4818
|
* Called before entity recovery.
|
|
4489
4819
|
*/
|
|
4490
4820
|
beforeRecover(event) {
|
|
4491
|
-
this.
|
|
4821
|
+
this.ctx.logDb &&
|
|
4492
4822
|
console.log(`BEFORE ENTITY WITH ID ${event.entityId} RECOVERED: `, event.entity);
|
|
4493
4823
|
}
|
|
4494
4824
|
/**
|
|
4495
4825
|
* Called after entity recovery.
|
|
4496
4826
|
*/
|
|
4497
4827
|
afterRecover(event) {
|
|
4498
|
-
this.
|
|
4828
|
+
this.ctx.logDb &&
|
|
4499
4829
|
console.log(`AFTER ENTITY WITH ID ${event.entityId} RECOVERED: `, event.entity);
|
|
4500
4830
|
}
|
|
4501
4831
|
/**
|
|
4502
4832
|
* Called before transaction start.
|
|
4503
4833
|
*/
|
|
4504
4834
|
beforeTransactionStart(event) {
|
|
4505
|
-
this.
|
|
4835
|
+
this.ctx.logDb &&
|
|
4506
4836
|
console.log(`BEFORE TRANSACTION STARTED: `, event);
|
|
4507
4837
|
}
|
|
4508
4838
|
/**
|
|
4509
4839
|
* Called after transaction start.
|
|
4510
4840
|
*/
|
|
4511
4841
|
afterTransactionStart(event) {
|
|
4512
|
-
this.
|
|
4842
|
+
this.ctx.logDb &&
|
|
4513
4843
|
console.log(`AFTER TRANSACTION STARTED: `, event);
|
|
4514
4844
|
}
|
|
4515
4845
|
/**
|
|
4516
4846
|
* Called before transaction commit.
|
|
4517
4847
|
*/
|
|
4518
4848
|
beforeTransactionCommit(event) {
|
|
4519
|
-
this.
|
|
4849
|
+
this.ctx.logDb &&
|
|
4520
4850
|
console.log(`BEFORE TRANSACTION COMMITTED: `, event);
|
|
4521
4851
|
}
|
|
4522
4852
|
/**
|
|
4523
4853
|
* Called after transaction commit.
|
|
4524
4854
|
*/
|
|
4525
4855
|
afterTransactionCommit(event) {
|
|
4526
|
-
this.
|
|
4856
|
+
this.ctx.logDb &&
|
|
4527
4857
|
console.log(`AFTER TRANSACTION COMMITTED: `, event);
|
|
4528
4858
|
}
|
|
4529
4859
|
/**
|
|
4530
4860
|
* Called before transaction rollback.
|
|
4531
4861
|
*/
|
|
4532
4862
|
beforeTransactionRollback(event) {
|
|
4533
|
-
this.
|
|
4863
|
+
this.ctx.logDb &&
|
|
4534
4864
|
console.log(`BEFORE TRANSACTION ROLLBACK: `, event);
|
|
4535
4865
|
}
|
|
4536
4866
|
/**
|
|
4537
4867
|
* Called after transaction rollback.
|
|
4538
4868
|
*/
|
|
4539
4869
|
afterTransactionRollback(event) {
|
|
4540
|
-
this.
|
|
4870
|
+
this.ctx.logDb &&
|
|
4541
4871
|
console.log(`AFTER TRANSACTION ROLLBACK: `, event);
|
|
4542
4872
|
}
|
|
4543
4873
|
};
|
|
@@ -4549,6 +4879,26 @@ BaseSubscriberForEntity = __decorate([
|
|
|
4549
4879
|
;
|
|
4550
4880
|
({}); // @--end-of-file-for-module=taon lib/base-classes/base-subscriber-for-entity.ts
|
|
4551
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
|
+
|
|
4552
4902
|
var Base;
|
|
4553
4903
|
(function (Base) {
|
|
4554
4904
|
Base.Controller = BaseController;
|
|
@@ -4559,11 +4909,15 @@ var Base;
|
|
|
4559
4909
|
Base.Class = BaseClass;
|
|
4560
4910
|
Base.Repository = BaseRepository;
|
|
4561
4911
|
Base.SubscriberForEntity = BaseSubscriberForEntity;
|
|
4912
|
+
Base.Migration = BaseMigration;
|
|
4562
4913
|
Base.Context = BaseContext;
|
|
4563
4914
|
})(Base || (Base = {}));
|
|
4564
4915
|
;
|
|
4565
4916
|
({}); // @--end-of-file-for-module=taon lib/base-classes/base.ts
|
|
4566
4917
|
|
|
4918
|
+
/**
|
|
4919
|
+
* Entity decorator
|
|
4920
|
+
*/
|
|
4567
4921
|
function TaonEntity(options) {
|
|
4568
4922
|
return function (constructor) {
|
|
4569
4923
|
options = options || {};
|
|
@@ -4582,6 +4936,9 @@ class TaonEntityOptions extends Models.DecoratorAbstractOpt {
|
|
|
4582
4936
|
;
|
|
4583
4937
|
({}); // @--end-of-file-for-module=taon lib/decorators/classes/entity-decorator.ts
|
|
4584
4938
|
|
|
4939
|
+
/**
|
|
4940
|
+
* Provider decorator
|
|
4941
|
+
*/
|
|
4585
4942
|
function TaonProvider(options) {
|
|
4586
4943
|
return function (constructor) {
|
|
4587
4944
|
Reflect.defineMetadata(Symbols.metadata.options.provider, options, constructor);
|
|
@@ -4594,6 +4951,21 @@ class TaonProviderOptions extends Models.DecoratorAbstractOpt {
|
|
|
4594
4951
|
;
|
|
4595
4952
|
({}); // @--end-of-file-for-module=taon lib/decorators/classes/provider-decorator.ts
|
|
4596
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
|
+
|
|
4597
4969
|
const inject = (entity) => {
|
|
4598
4970
|
return new Proxy({}, {
|
|
4599
4971
|
get: (_, propName) => {
|
|
@@ -5322,7 +5694,6 @@ class TaonTableComponent {
|
|
|
5322
5694
|
await this.retriveData();
|
|
5323
5695
|
}
|
|
5324
5696
|
async retriveData() {
|
|
5325
|
-
// @ts-ignore
|
|
5326
5697
|
}
|
|
5327
5698
|
expansionRow(e) {
|
|
5328
5699
|
this.expansionChange.next(e);
|
|
@@ -5331,7 +5702,7 @@ class TaonTableComponent {
|
|
|
5331
5702
|
log.i('context menu event', e);
|
|
5332
5703
|
}
|
|
5333
5704
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5334
|
-
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"] }] }); }
|
|
5335
5706
|
}
|
|
5336
5707
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableComponent, decorators: [{
|
|
5337
5708
|
type: Component,
|
|
@@ -5411,36 +5782,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
5411
5782
|
;
|
|
5412
5783
|
({}); // @--end-of-file-for-module=taon lib/ui/taon-table/index.ts
|
|
5413
5784
|
|
|
5414
|
-
class TaonAdminService {
|
|
5415
|
-
/**
|
|
5416
|
-
* @deprecated
|
|
5417
|
-
*/
|
|
5418
|
-
disableScroll() {
|
|
5419
|
-
}
|
|
5420
|
-
constructor(cdr) {
|
|
5421
|
-
this.cdr = cdr;
|
|
5422
|
-
this.admin = window['taon'];
|
|
5423
|
-
}
|
|
5424
|
-
addTab(name, template) {
|
|
5425
|
-
this.admin.cmp.tabs.push({
|
|
5426
|
-
name,
|
|
5427
|
-
template,
|
|
5428
|
-
});
|
|
5429
|
-
}
|
|
5430
|
-
init(taonAdminModeConfigurationComponent) {
|
|
5431
|
-
this.taonAdminModeConfigurationComponent =
|
|
5432
|
-
taonAdminModeConfigurationComponent;
|
|
5433
|
-
}
|
|
5434
|
-
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 }); }
|
|
5435
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, providedIn: 'root' }); }
|
|
5436
|
-
}
|
|
5437
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, decorators: [{
|
|
5438
|
-
type: Injectable,
|
|
5439
|
-
args: [{ providedIn: 'root' }]
|
|
5440
|
-
}], ctorParameters: () => [{ type: i0.ApplicationRef }] });
|
|
5441
|
-
;
|
|
5442
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-control.service.ts
|
|
5443
|
-
|
|
5444
5785
|
class TaonAdminModeConfigurationComponent {
|
|
5445
5786
|
get opened() {
|
|
5446
5787
|
return !this.isIframe && this.admin.adminPanelIsOpen;
|
|
@@ -5455,13 +5796,12 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5455
5796
|
}
|
|
5456
5797
|
this.admin.adminPanelIsOpen = v;
|
|
5457
5798
|
}
|
|
5458
|
-
constructor(breakpointsService) {
|
|
5799
|
+
constructor(breakpointsService, admin) {
|
|
5459
5800
|
this.breakpointsService = breakpointsService;
|
|
5801
|
+
this.admin = admin;
|
|
5460
5802
|
this.$destroy = new Subject();
|
|
5461
5803
|
this.cdr = inject$1(ChangeDetectorRef);
|
|
5462
5804
|
this.taonAdminService = inject$1(TaonAdminService);
|
|
5463
|
-
this.tabs = [];
|
|
5464
|
-
this.admin = window['taon'];
|
|
5465
5805
|
this.isWebSQLMode = Helpers.isWebSQL;
|
|
5466
5806
|
this.hideTaonToolsInProduction = ENV.hideTaonToolsInProduction && ENV.angularProd;
|
|
5467
5807
|
this.isIframe = window.location !== window.parent.location;
|
|
@@ -5480,7 +5820,6 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5480
5820
|
this.dragPositionZero = { x: 0, y: 0 };
|
|
5481
5821
|
this.taonAdminModeConfigurationDataChanged = new EventEmitter();
|
|
5482
5822
|
this.taonAdminModeConfigurationData = {};
|
|
5483
|
-
this.admin.cmp = this;
|
|
5484
5823
|
this.breakpointsService
|
|
5485
5824
|
.listenTo()
|
|
5486
5825
|
.pipe(takeUntil(this.$destroy))
|
|
@@ -5488,14 +5827,6 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5488
5827
|
// @ts-ignore
|
|
5489
5828
|
this.isDesktop = breakpoint === 'desktop';
|
|
5490
5829
|
});
|
|
5491
|
-
this.taonAdminService.init(this);
|
|
5492
|
-
}
|
|
5493
|
-
reloadTabs() {
|
|
5494
|
-
this.reloading = true;
|
|
5495
|
-
setTimeout(() => {
|
|
5496
|
-
this.reloading = false;
|
|
5497
|
-
console.log('reloading done');
|
|
5498
|
-
});
|
|
5499
5830
|
}
|
|
5500
5831
|
async ngOnInit() {
|
|
5501
5832
|
await Stor.awaitPendingOperatios();
|
|
@@ -5519,6 +5850,16 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5519
5850
|
onResize(event) {
|
|
5520
5851
|
this.height = window.innerHeight;
|
|
5521
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
|
+
}
|
|
5522
5863
|
async toogle() {
|
|
5523
5864
|
this.opened = !this.opened;
|
|
5524
5865
|
}
|
|
@@ -5540,37 +5881,47 @@ class TaonAdminModeConfigurationComponent {
|
|
|
5540
5881
|
scrollTabs(event) {
|
|
5541
5882
|
return;
|
|
5542
5883
|
}
|
|
5543
|
-
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 }); }
|
|
5544
|
-
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"] }] }); }
|
|
5545
5887
|
}
|
|
5546
5888
|
__decorate([
|
|
5547
|
-
Stor.property.in.localstorage
|
|
5889
|
+
(Stor.property.in.localstorage
|
|
5548
5890
|
.for(TaonAdminModeConfigurationComponent)
|
|
5549
|
-
.withDefaultValue(0),
|
|
5891
|
+
.withDefaultValue(0)),
|
|
5550
5892
|
__metadata("design:type", Number)
|
|
5551
5893
|
], TaonAdminModeConfigurationComponent.prototype, "dragPositionX", void 0);
|
|
5552
5894
|
__decorate([
|
|
5553
|
-
Stor.property.in.localstorage
|
|
5895
|
+
(Stor.property.in.localstorage
|
|
5554
5896
|
.for(TaonAdminModeConfigurationComponent)
|
|
5555
|
-
.withDefaultValue(0),
|
|
5897
|
+
.withDefaultValue(0)),
|
|
5556
5898
|
__metadata("design:type", Number)
|
|
5557
5899
|
], TaonAdminModeConfigurationComponent.prototype, "dragPositionY", void 0);
|
|
5558
5900
|
__decorate([
|
|
5559
|
-
Stor.property.in.localstorage
|
|
5901
|
+
(Stor.property.in.localstorage
|
|
5560
5902
|
.for(TaonAdminModeConfigurationComponent)
|
|
5561
|
-
.withDefaultValue(0),
|
|
5903
|
+
.withDefaultValue(0)),
|
|
5562
5904
|
__metadata("design:type", Number)
|
|
5563
5905
|
], TaonAdminModeConfigurationComponent.prototype, "selectedIndex", void 0);
|
|
5564
5906
|
__decorate([
|
|
5565
|
-
Stor.property.in.localstorage
|
|
5907
|
+
(Stor.property.in.localstorage
|
|
5566
5908
|
.for(TaonAdminModeConfigurationComponent)
|
|
5567
|
-
.withDefaultValue(false),
|
|
5909
|
+
.withDefaultValue(false)),
|
|
5568
5910
|
__metadata("design:type", Boolean)
|
|
5569
5911
|
], TaonAdminModeConfigurationComponent.prototype, "wasOpenDraggablePopup", void 0);
|
|
5570
5912
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationComponent, decorators: [{
|
|
5571
5913
|
type: Component,
|
|
5572
|
-
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"] }]
|
|
5573
|
-
|
|
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: [{
|
|
5574
5925
|
type: ViewChild,
|
|
5575
5926
|
args: ['tabGroup']
|
|
5576
5927
|
}], taonAdminModeConfigurationDataChanged: [{
|
|
@@ -5584,254 +5935,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
5584
5935
|
;
|
|
5585
5936
|
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.ts
|
|
5586
5937
|
|
|
5587
|
-
class TaonAdminEditModeComponent {
|
|
5588
|
-
constructor(router) {
|
|
5589
|
-
this.router = router;
|
|
5590
|
-
this.inited$ = of(true);
|
|
5591
|
-
this.destroyed$ = new Subject();
|
|
5592
|
-
this.handlers = [];
|
|
5593
|
-
this.columns = [
|
|
5594
|
-
{
|
|
5595
|
-
header: 'ID',
|
|
5596
|
-
field: 'id',
|
|
5597
|
-
maxWidth: 100,
|
|
5598
|
-
showExpand: true,
|
|
5599
|
-
},
|
|
5600
|
-
{
|
|
5601
|
-
header: 'src',
|
|
5602
|
-
field: 'src',
|
|
5603
|
-
maxWidth: 250,
|
|
5604
|
-
},
|
|
5605
|
-
{
|
|
5606
|
-
header: 'Content Type',
|
|
5607
|
-
field: 'contentType',
|
|
5608
|
-
maxWidth: 120,
|
|
5609
|
-
},
|
|
5610
|
-
];
|
|
5611
|
-
this.taonAdminEditModeDataChanged = new EventEmitter();
|
|
5612
|
-
this.taonAdminEditModeData = {};
|
|
5613
|
-
}
|
|
5614
|
-
ngOnInit() {
|
|
5615
|
-
this.files = this.admin.currentFiles;
|
|
5616
|
-
this.handlers.push(this.admin.onEditMode$.subscribe(() => {
|
|
5617
|
-
this.refresFilesList();
|
|
5618
|
-
}));
|
|
5619
|
-
this.admin.onRegisterFile().pipe(takeUntil(this.destroyed$), tap(() => {
|
|
5620
|
-
this.refresFilesList();
|
|
5621
|
-
}));
|
|
5622
|
-
}
|
|
5623
|
-
ngOnDestroy() {
|
|
5624
|
-
this.handlers.forEach(h => h.unsubscribe());
|
|
5625
|
-
this.destroyed$.next(void 0);
|
|
5626
|
-
this.destroyed$.unsubscribe();
|
|
5627
|
-
}
|
|
5628
|
-
ngAfterViewInit() {
|
|
5629
|
-
//Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
|
|
5630
|
-
//Add 'implements AfterViewInit' to the class.
|
|
5631
|
-
setTimeout(() => {
|
|
5632
|
-
this.refresFilesList();
|
|
5633
|
-
}, 500);
|
|
5634
|
-
}
|
|
5635
|
-
expansionRow(e) {
|
|
5636
|
-
console.log(e);
|
|
5637
|
-
}
|
|
5638
|
-
refresFilesList() {
|
|
5639
|
-
this.files = this.admin.currentFiles;
|
|
5640
|
-
}
|
|
5641
|
-
searchFind(file) {
|
|
5642
|
-
if (!!this?.fileToSearch) {
|
|
5643
|
-
return file?.src?.search(this?.fileToSearch) !== -1;
|
|
5644
|
-
}
|
|
5645
|
-
return true;
|
|
5646
|
-
}
|
|
5647
|
-
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 }); }
|
|
5648
|
-
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" }] }); }
|
|
5649
|
-
}
|
|
5650
|
-
__decorate([
|
|
5651
|
-
(Stor.property.in.localstorage
|
|
5652
|
-
.for(TaonAdminEditModeComponent)
|
|
5653
|
-
.withDefaultValue(0)),
|
|
5654
|
-
__metadata("design:type", Number)
|
|
5655
|
-
], TaonAdminEditModeComponent.prototype, "selectedTabIndex", void 0);
|
|
5656
|
-
__decorate([
|
|
5657
|
-
(Stor.property.in.localstorage
|
|
5658
|
-
.for(TaonAdminEditModeComponent)
|
|
5659
|
-
.withDefaultValue('')),
|
|
5660
|
-
__metadata("design:type", String)
|
|
5661
|
-
], TaonAdminEditModeComponent.prototype, "fileToSearch", void 0);
|
|
5662
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeComponent, decorators: [{
|
|
5663
|
-
type: Component,
|
|
5664
|
-
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"] }]
|
|
5665
|
-
}], ctorParameters: () => [{ type: i1$4.Router }], propDecorators: { taonAdminEditModeDataChanged: [{
|
|
5666
|
-
type: Output
|
|
5667
|
-
}], taonAdminEditModeData: [{
|
|
5668
|
-
type: Input
|
|
5669
|
-
}] } });
|
|
5670
|
-
;
|
|
5671
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.ts
|
|
5672
|
-
|
|
5673
|
-
class TaonFileGeneralOptComponent {
|
|
5674
|
-
constructor() {
|
|
5675
|
-
this.height = 100;
|
|
5676
|
-
this.handlers = [];
|
|
5677
|
-
this.fieldsOrder = [];
|
|
5678
|
-
this.fields = [
|
|
5679
|
-
{
|
|
5680
|
-
key: 'width',
|
|
5681
|
-
},
|
|
5682
|
-
{
|
|
5683
|
-
key: 'height',
|
|
5684
|
-
},
|
|
5685
|
-
{
|
|
5686
|
-
key: 'display',
|
|
5687
|
-
},
|
|
5688
|
-
{
|
|
5689
|
-
key: 'widthUnit',
|
|
5690
|
-
},
|
|
5691
|
-
{
|
|
5692
|
-
key: 'heightUnit', // @ts-ignore
|
|
5693
|
-
},
|
|
5694
|
-
{
|
|
5695
|
-
key: 'action',
|
|
5696
|
-
type: 'action',
|
|
5697
|
-
templateOptions: {
|
|
5698
|
-
label: 'Reset',
|
|
5699
|
-
icon: 'cancel',
|
|
5700
|
-
raised: true,
|
|
5701
|
-
action: () => {
|
|
5702
|
-
console.log('reset');
|
|
5703
|
-
},
|
|
5704
|
-
},
|
|
5705
|
-
},
|
|
5706
|
-
].map(f => {
|
|
5707
|
-
f.className = 'formly-field-half-size';
|
|
5708
|
-
return f;
|
|
5709
|
-
});
|
|
5710
|
-
}
|
|
5711
|
-
ngOnInit() { }
|
|
5712
|
-
ngOnDestroy() {
|
|
5713
|
-
this.handlers.forEach(h => h.unsubscribe());
|
|
5714
|
-
}
|
|
5715
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5716
|
-
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"] }); }
|
|
5717
|
-
}
|
|
5718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptComponent, decorators: [{
|
|
5719
|
-
type: Component,
|
|
5720
|
-
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"] }]
|
|
5721
|
-
}], ctorParameters: () => [], propDecorators: { height: [{
|
|
5722
|
-
type: HostBinding,
|
|
5723
|
-
args: ['style.minHeight.px']
|
|
5724
|
-
}, {
|
|
5725
|
-
type: Input
|
|
5726
|
-
}], file: [{
|
|
5727
|
-
type: Input
|
|
5728
|
-
}] } });
|
|
5729
|
-
;
|
|
5730
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.ts
|
|
5731
|
-
|
|
5732
|
-
class TaonFileGeneralOptModule {
|
|
5733
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5734
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, declarations: [TaonFileGeneralOptComponent], imports: [CommonModule, TaonFullMaterialModule], exports: [TaonFileGeneralOptComponent] }); }
|
|
5735
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, imports: [CommonModule, TaonFullMaterialModule] }); }
|
|
5736
|
-
}
|
|
5737
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, decorators: [{
|
|
5738
|
-
type: NgModule,
|
|
5739
|
-
args: [{
|
|
5740
|
-
imports: [CommonModule, TaonFullMaterialModule],
|
|
5741
|
-
declarations: [TaonFileGeneralOptComponent],
|
|
5742
|
-
exports: [TaonFileGeneralOptComponent],
|
|
5743
|
-
}]
|
|
5744
|
-
}] });
|
|
5745
|
-
;
|
|
5746
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.ts
|
|
5747
|
-
|
|
5748
|
-
;
|
|
5749
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.ts
|
|
5750
|
-
|
|
5751
|
-
class TaonAdminEditModeModule {
|
|
5752
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5753
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, declarations: [TaonAdminEditModeComponent], imports: [CommonModule,
|
|
5754
|
-
StaticColumnsModule,
|
|
5755
|
-
NgScrollbarModule,
|
|
5756
|
-
TaonFileGeneralOptModule,
|
|
5757
|
-
FormsModule,
|
|
5758
|
-
NgArrayPipesModule,
|
|
5759
|
-
TaonTableModule,
|
|
5760
|
-
TaonFullMaterialModule], exports: [TaonAdminEditModeComponent] }); }
|
|
5761
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, imports: [CommonModule,
|
|
5762
|
-
StaticColumnsModule,
|
|
5763
|
-
NgScrollbarModule,
|
|
5764
|
-
TaonFileGeneralOptModule,
|
|
5765
|
-
FormsModule,
|
|
5766
|
-
NgArrayPipesModule,
|
|
5767
|
-
TaonTableModule,
|
|
5768
|
-
TaonFullMaterialModule] }); }
|
|
5769
|
-
}
|
|
5770
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, decorators: [{
|
|
5771
|
-
type: NgModule,
|
|
5772
|
-
args: [{
|
|
5773
|
-
imports: [
|
|
5774
|
-
CommonModule,
|
|
5775
|
-
StaticColumnsModule,
|
|
5776
|
-
NgScrollbarModule,
|
|
5777
|
-
TaonFileGeneralOptModule,
|
|
5778
|
-
FormsModule,
|
|
5779
|
-
NgArrayPipesModule,
|
|
5780
|
-
TaonTableModule,
|
|
5781
|
-
TaonFullMaterialModule, // TODO import only partial things
|
|
5782
|
-
],
|
|
5783
|
-
declarations: [TaonAdminEditModeComponent],
|
|
5784
|
-
exports: [TaonAdminEditModeComponent],
|
|
5785
|
-
}]
|
|
5786
|
-
}] });
|
|
5787
|
-
;
|
|
5788
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.ts
|
|
5789
|
-
|
|
5790
|
-
;
|
|
5791
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.ts
|
|
5792
|
-
|
|
5793
|
-
class TaonAdminModeConfigurationModule {
|
|
5794
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5795
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, declarations: [TaonAdminModeConfigurationComponent], imports: [CommonModule,
|
|
5796
|
-
StaticColumnsModule,
|
|
5797
|
-
FormsModule,
|
|
5798
|
-
NgScrollbarModule,
|
|
5799
|
-
TaonAdminEditModeModule,
|
|
5800
|
-
TaonProgressBarModule,
|
|
5801
|
-
TaonNotificationsModule,
|
|
5802
|
-
TaonFullMaterialModule, // TODO import only partial things
|
|
5803
|
-
TaonSessionPasscodeComponent], exports: [TaonAdminModeConfigurationComponent] }); }
|
|
5804
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, imports: [CommonModule,
|
|
5805
|
-
StaticColumnsModule,
|
|
5806
|
-
FormsModule,
|
|
5807
|
-
NgScrollbarModule,
|
|
5808
|
-
TaonAdminEditModeModule,
|
|
5809
|
-
TaonProgressBarModule,
|
|
5810
|
-
TaonNotificationsModule,
|
|
5811
|
-
TaonFullMaterialModule, // TODO import only partial things
|
|
5812
|
-
TaonSessionPasscodeComponent] }); }
|
|
5813
|
-
}
|
|
5814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, decorators: [{
|
|
5815
|
-
type: NgModule,
|
|
5816
|
-
args: [{
|
|
5817
|
-
imports: [
|
|
5818
|
-
CommonModule,
|
|
5819
|
-
StaticColumnsModule,
|
|
5820
|
-
FormsModule,
|
|
5821
|
-
NgScrollbarModule,
|
|
5822
|
-
TaonAdminEditModeModule,
|
|
5823
|
-
TaonProgressBarModule,
|
|
5824
|
-
TaonNotificationsModule,
|
|
5825
|
-
TaonFullMaterialModule, // TODO import only partial things
|
|
5826
|
-
TaonSessionPasscodeComponent,
|
|
5827
|
-
],
|
|
5828
|
-
declarations: [TaonAdminModeConfigurationComponent],
|
|
5829
|
-
exports: [TaonAdminModeConfigurationComponent],
|
|
5830
|
-
}]
|
|
5831
|
-
}] });
|
|
5832
|
-
;
|
|
5833
|
-
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.ts
|
|
5834
|
-
|
|
5835
5938
|
;
|
|
5836
5939
|
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/index.ts
|
|
5837
5940
|
|
|
@@ -5852,6 +5955,7 @@ var Taon;
|
|
|
5852
5955
|
Taon.Provider = TaonProvider;
|
|
5853
5956
|
Taon.Repository = TaonRepository;
|
|
5854
5957
|
Taon.Subscriber = TaonSubscriber;
|
|
5958
|
+
Taon.Migration = TaonMigration;
|
|
5855
5959
|
Taon.isBrowser = coreHelpers.Helpers.isBrowser;
|
|
5856
5960
|
Taon.isNode = coreHelpers.Helpers.isNode;
|
|
5857
5961
|
Taon.isWebSQL = coreHelpers.Helpers.isWebSQL;
|
|
@@ -5888,5 +5992,5 @@ var Taon;
|
|
|
5888
5992
|
* Generated bundle index. Do not edit.
|
|
5889
5993
|
*/
|
|
5890
5994
|
|
|
5891
|
-
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 };
|
|
5892
5996
|
//# sourceMappingURL=taon.mjs.map
|