taon 18.0.17 → 18.0.19
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 +6 -3
- package/assets/shared/shared_folder_info.txt +1 -1
- package/browser/esm2022/lib/base-classes/base-injector.mjs +8 -1
- package/browser/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +39 -20
- package/browser/esm2022/lib/base-classes/base.mjs +1 -3
- package/browser/esm2022/lib/create-context.mjs +24 -3
- package/browser/esm2022/lib/decorators/classes/subscriber-decorator.mjs +3 -29
- package/browser/esm2022/lib/decorators/http/http-decorators.mjs +3 -1
- package/browser/esm2022/lib/endpoint-context.mjs +36 -136
- package/browser/esm2022/lib/entity-process.mjs +3 -3
- package/browser/esm2022/lib/helpers/class-helpers.mjs +2 -2
- package/browser/esm2022/lib/index.mjs +2 -14
- package/browser/esm2022/lib/inject.mjs +4 -38
- package/browser/esm2022/lib/models.mjs +1 -1
- package/browser/esm2022/lib/realtime/realtime-client.mjs +32 -20
- package/browser/esm2022/lib/realtime/realtime-core.mjs +15 -7
- package/browser/esm2022/lib/realtime/realtime-server.mjs +34 -16
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +198 -29
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +206 -10
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +3 -7
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +6 -2
- package/browser/esm2022/lib/realtime/realtime-subs-manager.mjs +10 -8
- package/browser/esm2022/lib/realtime/realtime.models.mjs +1 -1
- package/browser/esm2022/lib/symbols.mjs +45 -38
- package/browser/esm2022/lib/ui/directives/index.mjs +6 -0
- package/browser/esm2022/lib/ui/directives/safe.pipe.mjs +43 -0
- package/browser/esm2022/lib/ui/directives/taon-inject-html.directive.mjs +24 -0
- package/browser/esm2022/lib/ui/directives/taon-long-press.directive.mjs +120 -0
- package/browser/esm2022/lib/ui/index.mjs +12 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.mjs +5 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.mjs +115 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.mjs +50 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.mjs +5 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.mjs +61 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.mjs +21 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/index.mjs +6 -0
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +14 -3
- package/browser/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.mjs +54 -0
- package/browser/esm2022/lib/ui/taon-full-material.module.mjs +179 -0
- package/browser/esm2022/lib/ui/taon-github-fork-me-corner/index.mjs +5 -0
- package/browser/esm2022/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.mjs +18 -0
- package/browser/esm2022/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.mjs +21 -0
- package/browser/esm2022/lib/ui/taon-notifications/index.mjs +7 -0
- package/browser/esm2022/lib/ui/taon-notifications/taon-notifications.component.mjs +25 -0
- package/browser/esm2022/lib/ui/taon-notifications/taon-notifications.models.mjs +5 -0
- package/browser/esm2022/lib/ui/taon-notifications/taon-notifications.module.mjs +21 -0
- package/browser/esm2022/lib/ui/taon-notifications/taon-notifications.service.mjs +48 -0
- package/browser/esm2022/lib/ui/taon-progress-bar/index.mjs +5 -0
- package/browser/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.component.mjs +98 -0
- package/browser/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.module.mjs +22 -0
- package/browser/esm2022/lib/ui/taon-session-passcode/index.mjs +4 -0
- package/browser/esm2022/lib/ui/taon-session-passcode/taon-session-passcode.component.mjs +120 -0
- package/browser/esm2022/lib/ui/taon-table/index.mjs +5 -0
- package/browser/esm2022/lib/ui/taon-table/taon-table.component.mjs +161 -0
- package/browser/esm2022/lib/ui/taon-table/taon-table.module.mjs +57 -0
- package/browser/fesm2022/taon.mjs +2004 -636
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-context.d.ts +8 -1
- package/browser/lib/base-classes/base-injector.d.ts +5 -0
- package/browser/lib/base-classes/base.d.ts +8 -3
- package/browser/lib/create-context.d.ts +17 -1
- package/browser/lib/decorators/classes/subscriber-decorator.d.ts +2 -2
- package/browser/lib/decorators/http/http-decorators.d.ts +2 -0
- package/browser/lib/endpoint-context.d.ts +3 -2
- package/browser/lib/helpers/class-helpers.d.ts +1 -1
- package/browser/lib/index.d.ts +25 -16
- package/browser/lib/inject.d.ts +1 -8
- package/browser/lib/models.d.ts +17 -9
- package/browser/lib/realtime/realtime-client.d.ts +8 -2
- package/browser/lib/realtime/realtime-core.d.ts +6 -6
- package/browser/lib/realtime/realtime-server.d.ts +9 -4
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +71 -12
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +4 -4
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +2 -3
- package/browser/lib/realtime/realtime-strategy/realtime-strategy.d.ts +4 -5
- package/browser/lib/realtime/realtime.models.d.ts +1 -0
- package/browser/lib/symbols.d.ts +30 -36
- package/browser/lib/ui/directives/index.d.ts +4 -0
- package/browser/lib/ui/directives/safe.pipe.d.ts +11 -0
- package/browser/lib/ui/directives/taon-inject-html.directive.d.ts +10 -0
- package/browser/lib/ui/directives/taon-long-press.directive.d.ts +26 -0
- package/browser/lib/ui/index.d.ts +10 -0
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +3 -0
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +33 -0
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +16 -0
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +3 -0
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +17 -0
- package/browser/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +10 -0
- package/browser/lib/ui/taon-admin-mode-configuration/index.d.ts +4 -0
- package/browser/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +17 -0
- package/browser/lib/ui/taon-full-material.module.d.ts +47 -0
- package/browser/lib/ui/taon-github-fork-me-corner/index.d.ts +3 -0
- package/browser/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.d.ts +7 -0
- package/browser/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.d.ts +9 -0
- package/browser/lib/ui/taon-notifications/index.d.ts +5 -0
- package/browser/lib/ui/taon-notifications/taon-notifications.component.d.ts +13 -0
- package/browser/lib/ui/taon-notifications/taon-notifications.models.d.ts +7 -0
- package/browser/lib/ui/taon-notifications/taon-notifications.module.d.ts +8 -0
- package/browser/lib/ui/taon-notifications/taon-notifications.service.d.ts +15 -0
- package/browser/lib/ui/taon-progress-bar/index.d.ts +3 -0
- package/browser/lib/ui/taon-progress-bar/taon-progress-bar.component.d.ts +19 -0
- package/browser/lib/ui/taon-progress-bar/taon-progress-bar.module.d.ts +10 -0
- package/browser/lib/ui/taon-session-passcode/index.d.ts +2 -0
- package/browser/lib/ui/taon-session-passcode/taon-session-passcode.component.d.ts +39 -0
- package/browser/lib/ui/taon-table/index.d.ts +3 -0
- package/browser/lib/ui/taon-table/taon-table.component.d.ts +37 -0
- package/browser/lib/ui/taon-table/taon-table.module.d.ts +17 -0
- package/client/esm2022/lib/base-classes/base-injector.mjs +8 -1
- package/client/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +39 -20
- package/client/esm2022/lib/base-classes/base.mjs +1 -3
- package/client/esm2022/lib/create-context.mjs +24 -3
- package/client/esm2022/lib/decorators/classes/subscriber-decorator.mjs +3 -29
- package/client/esm2022/lib/decorators/http/http-decorators.mjs +3 -1
- package/client/esm2022/lib/endpoint-context.mjs +36 -136
- package/client/esm2022/lib/entity-process.mjs +3 -3
- package/client/esm2022/lib/helpers/class-helpers.mjs +2 -2
- package/client/esm2022/lib/index.mjs +2 -14
- package/client/esm2022/lib/inject.mjs +4 -38
- package/client/esm2022/lib/models.mjs +1 -1
- package/client/esm2022/lib/realtime/realtime-client.mjs +32 -20
- package/client/esm2022/lib/realtime/realtime-core.mjs +15 -7
- package/client/esm2022/lib/realtime/realtime-server.mjs +34 -16
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +198 -29
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +206 -10
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +3 -7
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +6 -2
- package/client/esm2022/lib/realtime/realtime-subs-manager.mjs +10 -8
- package/client/esm2022/lib/realtime/realtime.models.mjs +1 -1
- package/client/esm2022/lib/symbols.mjs +45 -38
- package/client/esm2022/lib/ui/directives/index.mjs +6 -0
- package/client/esm2022/lib/ui/directives/safe.pipe.mjs +43 -0
- package/client/esm2022/lib/ui/directives/taon-inject-html.directive.mjs +24 -0
- package/client/esm2022/lib/ui/directives/taon-long-press.directive.mjs +120 -0
- package/client/esm2022/lib/ui/index.mjs +12 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.mjs +5 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.mjs +115 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.mjs +50 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.mjs +5 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.mjs +61 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.mjs +21 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/index.mjs +6 -0
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +14 -3
- package/client/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.mjs +54 -0
- package/client/esm2022/lib/ui/taon-full-material.module.mjs +179 -0
- package/client/esm2022/lib/ui/taon-github-fork-me-corner/index.mjs +5 -0
- package/client/esm2022/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.mjs +18 -0
- package/client/esm2022/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.mjs +21 -0
- package/client/esm2022/lib/ui/taon-notifications/index.mjs +7 -0
- package/client/esm2022/lib/ui/taon-notifications/taon-notifications.component.mjs +25 -0
- package/client/esm2022/lib/ui/taon-notifications/taon-notifications.models.mjs +5 -0
- package/client/esm2022/lib/ui/taon-notifications/taon-notifications.module.mjs +21 -0
- package/client/esm2022/lib/ui/taon-notifications/taon-notifications.service.mjs +48 -0
- package/client/esm2022/lib/ui/taon-progress-bar/index.mjs +5 -0
- package/client/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.component.mjs +98 -0
- package/client/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.module.mjs +22 -0
- package/client/esm2022/lib/ui/taon-session-passcode/index.mjs +4 -0
- package/client/esm2022/lib/ui/taon-session-passcode/taon-session-passcode.component.mjs +120 -0
- package/client/esm2022/lib/ui/taon-table/index.mjs +5 -0
- package/client/esm2022/lib/ui/taon-table/taon-table.component.mjs +161 -0
- package/client/esm2022/lib/ui/taon-table/taon-table.module.mjs +57 -0
- package/client/fesm2022/taon.mjs +2004 -636
- package/client/fesm2022/taon.mjs.map +1 -1
- package/client/lib/base-classes/base-context.d.ts +8 -1
- package/client/lib/base-classes/base-injector.d.ts +5 -0
- package/client/lib/base-classes/base.d.ts +8 -3
- package/client/lib/create-context.d.ts +17 -1
- package/client/lib/decorators/classes/subscriber-decorator.d.ts +2 -2
- package/client/lib/decorators/http/http-decorators.d.ts +2 -0
- package/client/lib/endpoint-context.d.ts +3 -2
- package/client/lib/helpers/class-helpers.d.ts +1 -1
- package/client/lib/index.d.ts +25 -16
- package/client/lib/inject.d.ts +1 -8
- package/client/lib/models.d.ts +17 -9
- package/client/lib/realtime/realtime-client.d.ts +8 -2
- package/client/lib/realtime/realtime-core.d.ts +6 -6
- package/client/lib/realtime/realtime-server.d.ts +9 -4
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +71 -12
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +4 -4
- package/client/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +2 -3
- package/client/lib/realtime/realtime-strategy/realtime-strategy.d.ts +4 -5
- package/client/lib/realtime/realtime.models.d.ts +1 -0
- package/client/lib/symbols.d.ts +30 -36
- package/client/lib/ui/directives/index.d.ts +4 -0
- package/client/lib/ui/directives/safe.pipe.d.ts +11 -0
- package/client/lib/ui/directives/taon-inject-html.directive.d.ts +10 -0
- package/client/lib/ui/directives/taon-long-press.directive.d.ts +26 -0
- package/client/lib/ui/index.d.ts +10 -0
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +3 -0
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +33 -0
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +16 -0
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +3 -0
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +17 -0
- package/client/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +10 -0
- package/client/lib/ui/taon-admin-mode-configuration/index.d.ts +4 -0
- package/client/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +17 -0
- package/client/lib/ui/taon-full-material.module.d.ts +47 -0
- package/client/lib/ui/taon-github-fork-me-corner/index.d.ts +3 -0
- package/client/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.d.ts +7 -0
- package/client/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.d.ts +9 -0
- package/client/lib/ui/taon-notifications/index.d.ts +5 -0
- package/client/lib/ui/taon-notifications/taon-notifications.component.d.ts +13 -0
- package/client/lib/ui/taon-notifications/taon-notifications.models.d.ts +7 -0
- package/client/lib/ui/taon-notifications/taon-notifications.module.d.ts +8 -0
- package/client/lib/ui/taon-notifications/taon-notifications.service.d.ts +15 -0
- package/client/lib/ui/taon-progress-bar/index.d.ts +3 -0
- package/client/lib/ui/taon-progress-bar/taon-progress-bar.component.d.ts +19 -0
- package/client/lib/ui/taon-progress-bar/taon-progress-bar.module.d.ts +10 -0
- package/client/lib/ui/taon-session-passcode/index.d.ts +2 -0
- package/client/lib/ui/taon-session-passcode/taon-session-passcode.component.d.ts +39 -0
- package/client/lib/ui/taon-table/index.d.ts +3 -0
- package/client/lib/ui/taon-table/taon-table.component.d.ts +37 -0
- package/client/lib/ui/taon-table/taon-table.module.d.ts +17 -0
- package/lib/base-classes/base-context.d.ts +8 -1
- package/lib/base-classes/base-injector.d.ts +5 -0
- package/lib/base-classes/base-injector.js +11 -0
- package/lib/base-classes/base-injector.js.map +1 -1
- package/lib/base-classes/base-subscriber-for-entity.js +38 -19
- package/lib/base-classes/base-subscriber-for-entity.js.map +1 -1
- package/lib/base-classes/base.d.ts +8 -3
- package/lib/base-classes/base.js +0 -2
- package/lib/base-classes/base.js.map +1 -1
- package/lib/create-context.d.ts +17 -1
- package/lib/create-context.js +21 -10
- package/lib/create-context.js.map +1 -1
- package/lib/decorators/classes/subscriber-decorator.d.ts +1 -1
- package/lib/decorators/classes/subscriber-decorator.js +7 -58
- package/lib/decorators/classes/subscriber-decorator.js.map +1 -1
- package/lib/decorators/http/http-decorators.d.ts +3 -1
- package/lib/decorators/http/http-decorators.js +2 -0
- package/lib/decorators/http/http-decorators.js.map +1 -1
- package/lib/endpoint-context.d.ts +3 -2
- package/lib/endpoint-context.js +169 -106
- package/lib/endpoint-context.js.map +1 -1
- package/lib/entity-process.js +2 -2
- package/lib/entity-process.js.map +1 -1
- package/lib/formly/formly-repeat-component.js +1 -1
- package/lib/formly/formly-repeat-component.js.map +1 -1
- package/lib/helpers/class-helpers.d.ts +1 -1
- package/lib/helpers/class-helpers.js +2 -2
- package/lib/helpers/class-helpers.js.map +1 -1
- package/lib/index.d.ts +25 -16
- package/lib/index.js +1 -17
- package/lib/index.js.map +1 -1
- package/lib/inject.d.ts +3 -7
- package/lib/inject.js +57 -42
- package/lib/inject.js.map +1 -1
- package/lib/models.d.ts +17 -9
- package/lib/models.js.map +1 -1
- package/lib/realtime/realtime-client.d.ts +8 -2
- package/lib/realtime/realtime-client.js +36 -21
- package/lib/realtime/realtime-client.js.map +1 -1
- package/lib/realtime/realtime-core.d.ts +6 -6
- package/lib/realtime/realtime-core.js +17 -6
- package/lib/realtime/realtime-core.js.map +1 -1
- package/lib/realtime/realtime-server.d.ts +9 -4
- package/lib/realtime/realtime-server.js +98 -76
- package/lib/realtime/realtime-server.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +71 -11
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js +301 -40
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +4 -4
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.js +358 -14
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +3 -3
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js +10 -14
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy.d.ts +4 -5
- package/lib/realtime/realtime-strategy/realtime-strategy.js +9 -2
- package/lib/realtime/realtime-strategy/realtime-strategy.js.map +1 -1
- package/lib/realtime/realtime-subs-manager.js +10 -8
- package/lib/realtime/realtime-subs-manager.js.map +1 -1
- package/lib/realtime/realtime.models.d.ts +1 -0
- package/lib/symbols.d.ts +30 -36
- package/lib/symbols.js +63 -39
- package/lib/symbols.js.map +1 -1
- package/lib/ui/directives/index.d.ts +3 -4
- package/lib/ui/directives/index.js +2 -2
- package/lib/ui/index.d.ts +9 -0
- package/lib/ui/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +3 -5
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +2 -3
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +1 -2
- package/lib/ui/taon-admin-mode-configuration/index.d.ts +0 -1
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- 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-progress-bar/taon-progress-bar.component.d.ts +1 -0
- package/lib/ui/taon-session-passcode/index.js +2 -2
- package/lib/ui/taon-table/index.d.ts +2 -0
- package/lib/ui/taon-table/index.js +5 -0
- package/lib/ui/taon-table/index.js.map +1 -0
- package/lib/ui/taon-table/taon-table.component.d.ts +33 -0
- package/lib/ui/taon-table/taon-table.module.d.ts +2 -0
- package/package.json +10 -8
- package/tmp-environment.json +34 -30
- package/websql/esm2022/lib/base-classes/base-injector.mjs +8 -1
- package/websql/esm2022/lib/base-classes/base-subscriber-for-entity.mjs +39 -20
- package/websql/esm2022/lib/base-classes/base.mjs +1 -3
- package/websql/esm2022/lib/create-context.mjs +24 -3
- package/websql/esm2022/lib/decorators/classes/subscriber-decorator.mjs +3 -29
- package/websql/esm2022/lib/decorators/http/http-decorators.mjs +3 -1
- package/websql/esm2022/lib/endpoint-context.mjs +48 -24
- package/websql/esm2022/lib/entity-process.mjs +3 -3
- package/websql/esm2022/lib/helpers/class-helpers.mjs +2 -2
- package/websql/esm2022/lib/index.mjs +2 -14
- package/websql/esm2022/lib/inject.mjs +4 -38
- package/websql/esm2022/lib/models.mjs +1 -1
- package/websql/esm2022/lib/realtime/realtime-client.mjs +32 -20
- package/websql/esm2022/lib/realtime/realtime-core.mjs +15 -7
- package/websql/esm2022/lib/realtime/realtime-server.mjs +90 -72
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc.mjs +200 -30
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock.mjs +206 -10
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-socket-io.mjs +3 -7
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy.mjs +6 -2
- package/websql/esm2022/lib/realtime/realtime-subs-manager.mjs +10 -8
- package/websql/esm2022/lib/realtime/realtime.models.mjs +1 -1
- package/websql/esm2022/lib/symbols.mjs +45 -38
- package/websql/esm2022/lib/ui/directives/index.mjs +6 -0
- package/websql/esm2022/lib/ui/directives/safe.pipe.mjs +43 -0
- package/websql/esm2022/lib/ui/directives/taon-inject-html.directive.mjs +24 -0
- package/websql/esm2022/lib/ui/directives/taon-long-press.directive.mjs +120 -0
- package/websql/esm2022/lib/ui/index.mjs +12 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.mjs +5 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.mjs +115 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.mjs +50 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.mjs +5 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.mjs +61 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.mjs +21 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/index.mjs +6 -0
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.mjs +14 -3
- package/websql/esm2022/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.mjs +54 -0
- package/websql/esm2022/lib/ui/taon-full-material.module.mjs +179 -0
- package/websql/esm2022/lib/ui/taon-github-fork-me-corner/index.mjs +5 -0
- package/websql/esm2022/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.mjs +18 -0
- package/websql/esm2022/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.mjs +21 -0
- package/websql/esm2022/lib/ui/taon-notifications/index.mjs +7 -0
- package/websql/esm2022/lib/ui/taon-notifications/taon-notifications.component.mjs +25 -0
- package/websql/esm2022/lib/ui/taon-notifications/taon-notifications.models.mjs +5 -0
- package/websql/esm2022/lib/ui/taon-notifications/taon-notifications.module.mjs +21 -0
- package/websql/esm2022/lib/ui/taon-notifications/taon-notifications.service.mjs +48 -0
- package/websql/esm2022/lib/ui/taon-progress-bar/index.mjs +5 -0
- package/websql/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.component.mjs +50 -0
- package/websql/esm2022/lib/ui/taon-progress-bar/taon-progress-bar.module.mjs +22 -0
- package/websql/esm2022/lib/ui/taon-session-passcode/index.mjs +4 -0
- package/websql/esm2022/lib/ui/taon-session-passcode/taon-session-passcode.component.mjs +120 -0
- package/websql/esm2022/lib/ui/taon-table/index.mjs +5 -0
- package/websql/esm2022/lib/ui/taon-table/taon-table.component.mjs +161 -0
- package/websql/esm2022/lib/ui/taon-table/taon-table.module.mjs +57 -0
- package/websql/fesm2022/taon.mjs +2140 -836
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-context.d.ts +8 -1
- package/websql/lib/base-classes/base-injector.d.ts +5 -0
- package/websql/lib/base-classes/base.d.ts +8 -3
- package/websql/lib/create-context.d.ts +17 -1
- package/websql/lib/decorators/classes/subscriber-decorator.d.ts +2 -2
- package/websql/lib/decorators/http/http-decorators.d.ts +2 -0
- package/websql/lib/endpoint-context.d.ts +3 -2
- package/websql/lib/helpers/class-helpers.d.ts +1 -1
- package/websql/lib/index.d.ts +25 -16
- package/websql/lib/inject.d.ts +1 -8
- package/websql/lib/models.d.ts +17 -9
- package/websql/lib/realtime/realtime-client.d.ts +8 -2
- package/websql/lib/realtime/realtime-core.d.ts +6 -6
- package/websql/lib/realtime/realtime-server.d.ts +9 -4
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +71 -12
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock.d.ts +4 -4
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +2 -3
- package/websql/lib/realtime/realtime-strategy/realtime-strategy.d.ts +4 -5
- package/websql/lib/realtime/realtime.models.d.ts +1 -0
- package/websql/lib/symbols.d.ts +30 -36
- package/websql/lib/ui/directives/index.d.ts +4 -0
- package/websql/lib/ui/directives/safe.pipe.d.ts +11 -0
- package/websql/lib/ui/directives/taon-inject-html.directive.d.ts +10 -0
- package/websql/lib/ui/directives/taon-long-press.directive.d.ts +26 -0
- package/websql/lib/ui/index.d.ts +10 -0
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +3 -0
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +33 -0
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +16 -0
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +3 -0
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +17 -0
- package/websql/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +10 -0
- package/websql/lib/ui/taon-admin-mode-configuration/index.d.ts +4 -0
- package/websql/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +17 -0
- package/websql/lib/ui/taon-full-material.module.d.ts +47 -0
- package/websql/lib/ui/taon-github-fork-me-corner/index.d.ts +3 -0
- package/websql/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.d.ts +7 -0
- package/websql/lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.d.ts +9 -0
- package/websql/lib/ui/taon-notifications/index.d.ts +5 -0
- package/websql/lib/ui/taon-notifications/taon-notifications.component.d.ts +13 -0
- package/websql/lib/ui/taon-notifications/taon-notifications.models.d.ts +7 -0
- package/websql/lib/ui/taon-notifications/taon-notifications.module.d.ts +8 -0
- package/websql/lib/ui/taon-notifications/taon-notifications.service.d.ts +15 -0
- package/websql/lib/ui/taon-progress-bar/index.d.ts +3 -0
- package/websql/lib/ui/taon-progress-bar/taon-progress-bar.component.d.ts +19 -0
- package/websql/lib/ui/taon-progress-bar/taon-progress-bar.module.d.ts +10 -0
- package/websql/lib/ui/taon-session-passcode/index.d.ts +2 -0
- package/websql/lib/ui/taon-session-passcode/taon-session-passcode.component.d.ts +39 -0
- package/websql/lib/ui/taon-table/index.d.ts +3 -0
- package/websql/lib/ui/taon-table/taon-table.component.d.ts +37 -0
- package/websql/lib/ui/taon-table/taon-table.module.d.ts +17 -0
- package/browser/esm2022/lib/base-classes/base-subscriber.mjs +0 -27
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +0 -98
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +0 -45
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +0 -40
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +0 -25
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +0 -4
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +0 -5
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +0 -50
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +0 -48
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +0 -35
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +0 -43
- package/browser/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +0 -4
- package/browser/lib/base-classes/base-subscriber.d.ts +0 -5
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +0 -22
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +0 -17
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +0 -11
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +0 -11
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +0 -14
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +0 -3
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +0 -17
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +0 -18
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +0 -12
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +0 -14
- package/browser/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +0 -12
- package/client/esm2022/lib/base-classes/base-subscriber.mjs +0 -27
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +0 -98
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +0 -45
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +0 -40
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +0 -25
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +0 -4
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +0 -5
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +0 -50
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +0 -48
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +0 -35
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +0 -43
- package/client/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +0 -4
- package/client/lib/base-classes/base-subscriber.d.ts +0 -5
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +0 -22
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +0 -17
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +0 -11
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +0 -11
- package/client/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +0 -14
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +0 -3
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +0 -17
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +0 -18
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +0 -12
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +0 -14
- package/client/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +0 -12
- package/lib/base-classes/base-subscriber.d.ts +0 -4
- package/lib/base-classes/base-subscriber.js +0 -25
- package/lib/base-classes/base-subscriber.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.d.ts +0 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js +0 -5
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +0 -22
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js +0 -139
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +0 -16
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js +0 -68
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +0 -10
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js +0 -56
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +0 -10
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js +0 -50
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +0 -13
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js +0 -3
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +0 -2
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js +0 -6
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +0 -16
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js +0 -54
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +0 -17
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js +0 -52
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +0 -11
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js +0 -39
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +0 -13
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js +0 -46
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js.map +0 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +0 -11
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js +0 -3
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js.map +0 -1
- package/websql/esm2022/lib/base-classes/base-subscriber.mjs +0 -27
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.mjs +0 -98
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.mjs +0 -45
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.mjs +0 -40
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.mjs +0 -25
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.mjs +0 -4
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.mjs +0 -5
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.mjs +0 -50
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.mjs +0 -48
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.mjs +0 -35
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.mjs +0 -43
- package/websql/esm2022/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.mjs +0 -4
- package/websql/lib/base-classes/base-subscriber.d.ts +0 -5
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +0 -22
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +0 -17
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +0 -11
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +0 -11
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +0 -14
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +0 -3
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +0 -17
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +0 -18
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +0 -12
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +0 -14
- package/websql/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +0 -12
- /package/lib/ui/directives/{firedev-inject-html.directive.d.ts → taon-inject-html.directive.d.ts} +0 -0
- /package/lib/ui/directives/{firedev-long-press.directive.d.ts → taon-long-press.directive.d.ts} +0 -0
- /package/lib/{realtime/realtime-strategy/realtime-strategy-ipc-models → ui}/index.js.map +0 -0
- /package/lib/ui/{toan-full-material.module.d.ts → taon-full-material.module.d.ts} +0 -0
|
@@ -1,19 +1,95 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
2
|
import * as coreHelpers from 'tnp-core/browser';
|
|
3
|
-
import { _, Helpers } from 'tnp-core/browser';
|
|
3
|
+
import { _ as _$1, Helpers } from 'tnp-core/browser';
|
|
4
4
|
import { Models as Models$1, RestHeaders, Resource, Mapping } from 'ng2-rest/browser';
|
|
5
5
|
import { OrignalClassKey } from 'taon-typeorm/browser';
|
|
6
6
|
import { SYMBOL, CLASS } from 'typescript-class-helpers/browser';
|
|
7
7
|
import * as JSON5 from 'json5';
|
|
8
8
|
import { __decorate, __param, __metadata } from 'tslib';
|
|
9
9
|
import { JSON10 } from 'json10/browser';
|
|
10
|
-
import { Observable, from, Subject } from 'rxjs';
|
|
10
|
+
import { Observable, from, Subject, interval, tap, defer, fromEvent, map, debounceTime, distinctUntilChanged, share, Subscription, takeUntil, of } from 'rxjs';
|
|
11
11
|
import axios from 'axios';
|
|
12
12
|
import { io } from 'socket.io-client';
|
|
13
13
|
import { Stor } from 'taon-storage/browser';
|
|
14
14
|
import { config } from 'tnp-config/browser';
|
|
15
15
|
import * as i0 from '@angular/core';
|
|
16
|
-
import { Injectable, inject as inject$1 } from '@angular/core';
|
|
16
|
+
import { Injectable, inject as inject$1, EventEmitter, Directive, Input, Output, HostBinding, HostListener, Pipe, NgModule, Component, DestroyRef, Self, ViewChild, ChangeDetectorRef } from '@angular/core';
|
|
17
|
+
import { Log, Level } from 'ng2-logger/browser';
|
|
18
|
+
import * as i1 from '@angular/platform-browser';
|
|
19
|
+
import { A11yModule } from '@angular/cdk/a11y';
|
|
20
|
+
import * as i5 from '@angular/cdk/drag-drop';
|
|
21
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
22
|
+
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
23
|
+
import { CdkStepperModule } from '@angular/cdk/stepper';
|
|
24
|
+
import { CdkTableModule } from '@angular/cdk/table';
|
|
25
|
+
import { CdkTreeModule } from '@angular/cdk/tree';
|
|
26
|
+
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
27
|
+
import { MatBadgeModule } from '@angular/material/badge';
|
|
28
|
+
import { MatBottomSheetModule } from '@angular/material/bottom-sheet';
|
|
29
|
+
import * as i6$1 from '@angular/material/button';
|
|
30
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
31
|
+
import * as i7 from '@angular/material/card';
|
|
32
|
+
import { MatCardModule } from '@angular/material/card';
|
|
33
|
+
import * as i8 from '@angular/material/checkbox';
|
|
34
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
35
|
+
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
36
|
+
import { MatStepperModule } from '@angular/material/stepper';
|
|
37
|
+
import { MatDialogModule } from '@angular/material/dialog';
|
|
38
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
39
|
+
import { MatGridListModule } from '@angular/material/grid-list';
|
|
40
|
+
import * as i6 from '@angular/material/icon';
|
|
41
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
42
|
+
import * as i11$1 from '@angular/material/list';
|
|
43
|
+
import { MatListModule } from '@angular/material/list';
|
|
44
|
+
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
45
|
+
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
46
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
47
|
+
import { MatChipsModule } from '@angular/material/chips';
|
|
48
|
+
import { MatDividerModule } from '@angular/material/divider';
|
|
49
|
+
import * as i4 from '@angular/material/input';
|
|
50
|
+
import { MatInputModule } from '@angular/material/input';
|
|
51
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
52
|
+
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
|
|
53
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
54
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
55
|
+
import { MatSelectModule } from '@angular/material/select';
|
|
56
|
+
import * as i10 from '@angular/material/sidenav';
|
|
57
|
+
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
58
|
+
import { MatSliderModule } from '@angular/material/slider';
|
|
59
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
60
|
+
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
61
|
+
import { MatSortModule } from '@angular/material/sort';
|
|
62
|
+
import { MatTableModule } from '@angular/material/table';
|
|
63
|
+
import * as i11 from '@angular/material/tabs';
|
|
64
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
65
|
+
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
66
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
67
|
+
import { MatTreeModule } from '@angular/material/tree';
|
|
68
|
+
import * as i2$1 from '@angular/common';
|
|
69
|
+
import { CommonModule } from '@angular/common';
|
|
70
|
+
import * as i1$1 from '@ngneat/hot-toast';
|
|
71
|
+
import * as i2 from '@angular/forms';
|
|
72
|
+
import { FormGroup, FormControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
73
|
+
import { PasswordModule } from 'primeng/password';
|
|
74
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
75
|
+
import * as i1$2 from 'ngx-progressbar';
|
|
76
|
+
import { NgProgressModule } from 'ngx-progressbar';
|
|
77
|
+
import * as _ from 'lodash';
|
|
78
|
+
import * as i2$2 from '@angular/material/form-field';
|
|
79
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
80
|
+
import * as i3 from '@ng-matero/extensions/grid';
|
|
81
|
+
import { MtxGridModule } from '@ng-matero/extensions/grid';
|
|
82
|
+
import * as i1$3 from 'static-columns/browser';
|
|
83
|
+
import { StaticColumnsModule } from 'static-columns/browser';
|
|
84
|
+
import * as i4$1 from 'ngx-scrollbar';
|
|
85
|
+
import { NgScrollbarModule } from 'ngx-scrollbar';
|
|
86
|
+
import * as i1$4 from '@angular/router';
|
|
87
|
+
import 'brace';
|
|
88
|
+
import 'brace/mode/css';
|
|
89
|
+
import 'brace/mode/typescript';
|
|
90
|
+
import 'brace/theme/github';
|
|
91
|
+
import * as i13 from 'ngx-pipes';
|
|
92
|
+
import { NgArrayPipesModule } from 'ngx-pipes';
|
|
17
93
|
|
|
18
94
|
var Symbols;
|
|
19
95
|
(function (Symbols) {
|
|
@@ -23,45 +99,52 @@ var Symbols;
|
|
|
23
99
|
Symbols.orignalClass = OrignalClassKey;
|
|
24
100
|
Symbols.orignalClassClonesObj = `$$originalClassClonesObj$$`;
|
|
25
101
|
Symbols.classMethodsNames = `$$classMethodsNames$$`;
|
|
26
|
-
|
|
27
|
-
|
|
102
|
+
/**
|
|
103
|
+
* for backendSocket.in(ROOM_NAME).emit(EVENT)
|
|
104
|
+
*
|
|
105
|
+
* Room names are uniqe..
|
|
106
|
+
* here I am limiting number of event for clients.
|
|
107
|
+
*/
|
|
108
|
+
class Realtime {
|
|
109
|
+
constructor() {
|
|
110
|
+
this.KEYroomSubscribe = `roomSubscribe`;
|
|
111
|
+
this.KEYroomUnsubscribe = `roomUnsubscribe`;
|
|
112
|
+
}
|
|
113
|
+
NAMESPACE(contextName) {
|
|
114
|
+
return `${contextName}-taonRealtimeNsp`;
|
|
115
|
+
}
|
|
28
116
|
TABLE_CHANGE(contextName, tableName) {
|
|
29
117
|
return `${contextName}:listentablename${tableName}`;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
ENTITY_UPDATE_EVENTS: (contextName) => `${contextName}:roomUnsubscribeEntityEvents`,
|
|
61
|
-
ENTITY_PROPERTY_UPDATE_EVENTS: (contextName) => `${contextName}:roomUnsubscribeEntityPropertyEvents`,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
};
|
|
118
|
+
}
|
|
119
|
+
ROOM_NAME_CUSTOM(contextName, customEvent) {
|
|
120
|
+
return `${contextName}:CustomRoomEvent${customEvent}`;
|
|
121
|
+
}
|
|
122
|
+
ROOM_SUBSCRIBE_CUSTOM(contextName) {
|
|
123
|
+
return `${contextName}:${this.KEYroomSubscribe}CustomRoomEvent`;
|
|
124
|
+
}
|
|
125
|
+
ROOM_UNSUBSCRIBE_CUSTOM(contextName) {
|
|
126
|
+
return `${contextName}:${this.KEYroomUnsubscribe}CustomRoomEvent`;
|
|
127
|
+
}
|
|
128
|
+
ROOM_NAME_UPDATE_ENTITY(contextName, className, entityId) {
|
|
129
|
+
return `${contextName}:room${_$1.camelCase(className)}${entityId}`.toLowerCase();
|
|
130
|
+
}
|
|
131
|
+
ROOM_SUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName) {
|
|
132
|
+
return `${contextName}:${this.KEYroomSubscribe}EntityEvents`;
|
|
133
|
+
}
|
|
134
|
+
ROOM_UNSUBSCRIBE_ENTITY_UPDATE_EVENTS(contextName) {
|
|
135
|
+
return `${contextName}:${this.KEYroomUnsubscribe}EntityEvents`;
|
|
136
|
+
}
|
|
137
|
+
ROOM_NAME_UPDATE_ENTITY_PROPERTY(contextName, className, property, entityId) {
|
|
138
|
+
return `${contextName}:room${_$1.camelCase(className)}${_$1.camelCase(property)}${entityId}`.toLowerCase();
|
|
139
|
+
}
|
|
140
|
+
ROOM_SUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName) {
|
|
141
|
+
return `${contextName}:${this.KEYroomSubscribe}EntityPropertyEvents`;
|
|
142
|
+
}
|
|
143
|
+
ROOM_UNSUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(contextName) {
|
|
144
|
+
return `${contextName}:${this.KEYroomUnsubscribe}EntityPropertyEvents`;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
Symbols.REALTIME = new Realtime();
|
|
65
148
|
Symbols.metadata = {
|
|
66
149
|
className: `class:realname`,
|
|
67
150
|
options: {
|
|
@@ -105,7 +188,7 @@ var Validators;
|
|
|
105
188
|
(function (Validators) {
|
|
106
189
|
Validators.classNameVlidation = (className, target) => {
|
|
107
190
|
setTimeout(() => {
|
|
108
|
-
if (_.isUndefined(className)) {
|
|
191
|
+
if (_$1.isUndefined(className)) {
|
|
109
192
|
throw `[Taon]
|
|
110
193
|
Please provide "className" property for each Controller and Entity:
|
|
111
194
|
|
|
@@ -125,7 +208,7 @@ var Validators;
|
|
|
125
208
|
`;
|
|
126
209
|
}
|
|
127
210
|
});
|
|
128
|
-
return _.isUndefined(className) ? target.name : className;
|
|
211
|
+
return _$1.isUndefined(className) ? target.name : className;
|
|
129
212
|
};
|
|
130
213
|
Validators.checkIfMethodsWithReponseTYpeAlowed = (methods, current) => {
|
|
131
214
|
const defaultResponseType = 'text or JSON';
|
|
@@ -148,8 +231,8 @@ var Validators;
|
|
|
148
231
|
}
|
|
149
232
|
};
|
|
150
233
|
Validators.validateClassFunctions = (controllers, entities, proviers, repositories) => {
|
|
151
|
-
if (_.isArray(controllers) &&
|
|
152
|
-
controllers.filter(f => !_.isFunction(f)).length > 0) {
|
|
234
|
+
if (_$1.isArray(controllers) &&
|
|
235
|
+
controllers.filter(f => !_$1.isFunction(f)).length > 0) {
|
|
153
236
|
console.error('controllers', controllers);
|
|
154
237
|
throw `
|
|
155
238
|
|
|
@@ -157,8 +240,8 @@ var Validators;
|
|
|
157
240
|
|
|
158
241
|
`;
|
|
159
242
|
}
|
|
160
|
-
if (_.isArray(entities) &&
|
|
161
|
-
entities.filter(f => !_.isFunction(f)).length > 0) {
|
|
243
|
+
if (_$1.isArray(entities) &&
|
|
244
|
+
entities.filter(f => !_$1.isFunction(f)).length > 0) {
|
|
162
245
|
console.error('entites', entities);
|
|
163
246
|
throw `
|
|
164
247
|
|
|
@@ -168,7 +251,7 @@ var Validators;
|
|
|
168
251
|
}
|
|
169
252
|
};
|
|
170
253
|
Validators.preventUndefinedModel = (model, id) => {
|
|
171
|
-
if (_.isUndefined(model)) {
|
|
254
|
+
if (_$1.isUndefined(model)) {
|
|
172
255
|
throw `Bad update by id, config, id: ${id}`;
|
|
173
256
|
}
|
|
174
257
|
};
|
|
@@ -179,7 +262,7 @@ var Validators;
|
|
|
179
262
|
var TaonHelpers;
|
|
180
263
|
(function (TaonHelpers) {
|
|
181
264
|
TaonHelpers.fillUpTo = (s, nCharacters) => {
|
|
182
|
-
return _.times(nCharacters, n => {
|
|
265
|
+
return _$1.times(nCharacters, n => {
|
|
183
266
|
if (s.charAt(n)) {
|
|
184
267
|
return s.charAt(n);
|
|
185
268
|
}
|
|
@@ -227,7 +310,7 @@ var TaonHelpers;
|
|
|
227
310
|
return {};
|
|
228
311
|
};
|
|
229
312
|
TaonHelpers.parseJSONwithStringJSONs = (object, waring = false) => {
|
|
230
|
-
if (!_.isObject(object)) {
|
|
313
|
+
if (!_$1.isObject(object)) {
|
|
231
314
|
if (waring) {
|
|
232
315
|
console.error(`
|
|
233
316
|
parseJSONwithStringJSONs(...)
|
|
@@ -236,7 +319,7 @@ var TaonHelpers;
|
|
|
236
319
|
}
|
|
237
320
|
return object;
|
|
238
321
|
}
|
|
239
|
-
let res = _.cloneDeep(object);
|
|
322
|
+
let res = _$1.cloneDeep(object);
|
|
240
323
|
Object.keys(res).forEach(key => {
|
|
241
324
|
let isJson = false;
|
|
242
325
|
try {
|
|
@@ -301,7 +384,7 @@ var ClassHelpers;
|
|
|
301
384
|
* TODO - repalce in every place when getting class fn from object
|
|
302
385
|
*/
|
|
303
386
|
ClassHelpers.getClassFnFromObject = (json) => {
|
|
304
|
-
if (_.isUndefined(json) || _.isNull(json)) {
|
|
387
|
+
if (_$1.isUndefined(json) || _$1.isNull(json)) {
|
|
305
388
|
return;
|
|
306
389
|
}
|
|
307
390
|
if (json.constructor) {
|
|
@@ -341,26 +424,26 @@ var ClassHelpers;
|
|
|
341
424
|
: classFnOrObject?.constructor[Symbols.fullClassNameStaticProperty]) ||
|
|
342
425
|
void 0);
|
|
343
426
|
};
|
|
344
|
-
ClassHelpers.
|
|
345
|
-
const classFn = _.isFunction(classFnOrObject)
|
|
427
|
+
ClassHelpers.getUniqueKey = (classFnOrObject) => {
|
|
428
|
+
const classFn = _$1.isFunction(classFnOrObject)
|
|
346
429
|
? classFnOrObject
|
|
347
430
|
: classFnOrObject.constructor;
|
|
348
431
|
const config = Reflect.getMetadata(Symbols.metadata.options.controller, classFn);
|
|
349
432
|
return config.uniqueKeyProp;
|
|
350
433
|
};
|
|
351
434
|
ClassHelpers.isContextClassObject = (obj) => {
|
|
352
|
-
if (!_.isObject(obj) ||
|
|
353
|
-
_.isArray(obj) ||
|
|
354
|
-
_.isRegExp(obj) ||
|
|
355
|
-
_.isBuffer(obj) ||
|
|
356
|
-
_.isArrayBuffer(obj)) {
|
|
435
|
+
if (!_$1.isObject(obj) ||
|
|
436
|
+
_$1.isArray(obj) ||
|
|
437
|
+
_$1.isRegExp(obj) ||
|
|
438
|
+
_$1.isBuffer(obj) ||
|
|
439
|
+
_$1.isArrayBuffer(obj)) {
|
|
357
440
|
return false;
|
|
358
441
|
}
|
|
359
|
-
if (_.isDate(obj)) {
|
|
442
|
+
if (_$1.isDate(obj)) {
|
|
360
443
|
return true;
|
|
361
444
|
}
|
|
362
445
|
const className = ClassHelpers.getName(obj);
|
|
363
|
-
return _.isString(className) && className !== 'Object';
|
|
446
|
+
return _$1.isString(className) && className !== 'Object';
|
|
364
447
|
};
|
|
365
448
|
ClassHelpers.setName = (target, className) => {
|
|
366
449
|
Validators.classNameVlidation(className, target);
|
|
@@ -372,7 +455,7 @@ var ClassHelpers;
|
|
|
372
455
|
}
|
|
373
456
|
targets.push(target);
|
|
374
457
|
let targetProto = Object.getPrototypeOf(target);
|
|
375
|
-
if (_.isFunction(targetProto) &&
|
|
458
|
+
if (_$1.isFunction(targetProto) &&
|
|
376
459
|
ClassHelpers.getName(targetProto) === className) {
|
|
377
460
|
return true;
|
|
378
461
|
}
|
|
@@ -380,7 +463,7 @@ var ClassHelpers;
|
|
|
380
463
|
};
|
|
381
464
|
ClassHelpers.getControllerConfig = (target) => {
|
|
382
465
|
const classMetadataOptions = Reflect.getMetadata(Symbols.metadata.options.controller, target);
|
|
383
|
-
const classMetadata = _.merge(new Models.ControllerConfig(), classMetadataOptions);
|
|
466
|
+
const classMetadata = _$1.merge(new Models.ControllerConfig(), classMetadataOptions);
|
|
384
467
|
const methodNames = ClassHelpers.getMethodsNames(target); // Object.getOwnPropertyNames(target.prototype);
|
|
385
468
|
for (const methodName of methodNames) {
|
|
386
469
|
const methodMetadata = Reflect.getMetadata(Symbols.metadata.options.controllerMethod, target, methodName);
|
|
@@ -415,7 +498,7 @@ var ClassHelpers;
|
|
|
415
498
|
if (!classOrClassInstance) {
|
|
416
499
|
return allMethodsNames;
|
|
417
500
|
}
|
|
418
|
-
const isClassFunction = _.isFunction(classOrClassInstance);
|
|
501
|
+
const isClassFunction = _$1.isFunction(classOrClassInstance);
|
|
419
502
|
const classFun = isClassFunction
|
|
420
503
|
? classOrClassInstance
|
|
421
504
|
: Object.getPrototypeOf(classOrClassInstance);
|
|
@@ -423,7 +506,7 @@ var ClassHelpers;
|
|
|
423
506
|
? classOrClassInstance?.prototype
|
|
424
507
|
: classOrClassInstance;
|
|
425
508
|
const prototypeObj = Object.getPrototypeOf(objectToCheck || {});
|
|
426
|
-
const properties = _.uniq([
|
|
509
|
+
const properties = _$1.uniq([
|
|
427
510
|
...Object.getOwnPropertyNames(objectToCheck || {}),
|
|
428
511
|
...Object.getOwnPropertyNames(prototypeObj || {}),
|
|
429
512
|
...Object.keys(objectToCheck || {}),
|
|
@@ -440,13 +523,13 @@ var ClassHelpers;
|
|
|
440
523
|
return ClassHelpers.getMethodsNames(Object.getPrototypeOf(classFun), allMethodsNames);
|
|
441
524
|
};
|
|
442
525
|
ClassHelpers.getControllerConfigs = (target, configs = [], callerTarget) => {
|
|
443
|
-
if (!_.isFunction(target)) {
|
|
526
|
+
if (!_$1.isFunction(target)) {
|
|
444
527
|
throw `[typescript-class-helper][getClassConfig] Cannot get class config from: ${target}`;
|
|
445
528
|
}
|
|
446
529
|
let config;
|
|
447
530
|
const parentClass = Object.getPrototypeOf(target);
|
|
448
531
|
const parentName = parentClass ? ClassHelpers.getName(parentClass) : void 0;
|
|
449
|
-
const isValidParent = _.isFunction(parentClass) && parentName !== '';
|
|
532
|
+
const isValidParent = _$1.isFunction(parentClass) && parentName !== '';
|
|
450
533
|
config = ClassHelpers.getControllerConfig(target);
|
|
451
534
|
configs.push(config);
|
|
452
535
|
return isValidParent
|
|
@@ -455,7 +538,7 @@ var ClassHelpers;
|
|
|
455
538
|
};
|
|
456
539
|
ClassHelpers.getCalculatedPathFor = (target) => {
|
|
457
540
|
const configs = ClassHelpers.getControllerConfigs(target);
|
|
458
|
-
const parentscalculatedPath = _.slice(configs, 1)
|
|
541
|
+
const parentscalculatedPath = _$1.slice(configs, 1)
|
|
459
542
|
.reverse()
|
|
460
543
|
.map(bc => {
|
|
461
544
|
if (TaonHelpers.isGoodPath(bc.path)) {
|
|
@@ -570,7 +653,7 @@ const metaReq = (method, path, target, propertyKey, descriptor, pathOrOptions, p
|
|
|
570
653
|
if (methodConfig.parameters.hasOwnProperty(key)) {
|
|
571
654
|
const element = methodConfig.parameters[key];
|
|
572
655
|
if (element.paramType === 'Path' &&
|
|
573
|
-
_.isString(element.paramName) &&
|
|
656
|
+
_$1.isString(element.paramName) &&
|
|
574
657
|
element.paramName.trim().length > 0) {
|
|
575
658
|
paramsPathConcatedPath += `/${element.paramName}/:${element.paramName}`;
|
|
576
659
|
}
|
|
@@ -673,6 +756,7 @@ var Http;
|
|
|
673
756
|
Http.DELETE = DELETE;
|
|
674
757
|
Http.PATCH = PATCH;
|
|
675
758
|
Http.HEAD = HEAD;
|
|
759
|
+
Http.Response = Models$1.HttpResponse;
|
|
676
760
|
let Param;
|
|
677
761
|
(function (Param) {
|
|
678
762
|
Param.Query = Query;
|
|
@@ -715,11 +799,18 @@ class BaseInjector {
|
|
|
715
799
|
}
|
|
716
800
|
}
|
|
717
801
|
/**
|
|
802
|
+
* @deprecated use ctx instead
|
|
718
803
|
* Current endpoint context
|
|
719
804
|
*/
|
|
720
805
|
get __endpoint_context__() {
|
|
721
806
|
return this[Symbols.ctxInClassOrClassObj];
|
|
722
807
|
}
|
|
808
|
+
/**
|
|
809
|
+
* get current endpoint context
|
|
810
|
+
*/
|
|
811
|
+
get ctx() {
|
|
812
|
+
return this.__endpoint_context__;
|
|
813
|
+
}
|
|
723
814
|
/**
|
|
724
815
|
* inject crud repo for entity
|
|
725
816
|
*/
|
|
@@ -847,7 +938,7 @@ class BaseInjector {
|
|
|
847
938
|
}
|
|
848
939
|
clone(override) {
|
|
849
940
|
const classFn = ClassHelpers.getClassFnFromObject(this);
|
|
850
|
-
const result = _.merge(new classFn(), _.merge(_.cloneDeep(this), override));
|
|
941
|
+
const result = _$1.merge(new classFn(), _$1.merge(_$1.cloneDeep(this), override));
|
|
851
942
|
return result;
|
|
852
943
|
}
|
|
853
944
|
}
|
|
@@ -873,7 +964,7 @@ BaseController = __decorate([
|
|
|
873
964
|
*/
|
|
874
965
|
let BaseCrudController = class BaseCrudController extends BaseController {
|
|
875
966
|
async _() {
|
|
876
|
-
if (!_.isFunction(this.entityClassResolveFn)) {
|
|
967
|
+
if (!_$1.isFunction(this.entityClassResolveFn)) {
|
|
877
968
|
Helpers.warn(`Skipping initing CRUD controller ${ClassHelpers.getName(this)} because entityClassResolveFn is not provided.`);
|
|
878
969
|
return;
|
|
879
970
|
}
|
|
@@ -1137,7 +1228,7 @@ class BaseClass {
|
|
|
1137
1228
|
async _() { }
|
|
1138
1229
|
clone(override) {
|
|
1139
1230
|
const classFn = ClassHelpers.getClassFnFromObject(this);
|
|
1140
|
-
const result = _.merge(new classFn(), _.merge(_.cloneDeep(this), override));
|
|
1231
|
+
const result = _$1.merge(new classFn(), _$1.merge(_$1.cloneDeep(this), override));
|
|
1141
1232
|
return result;
|
|
1142
1233
|
}
|
|
1143
1234
|
}
|
|
@@ -1774,7 +1865,7 @@ const getResponseValue = (response, options) => {
|
|
|
1774
1865
|
;
|
|
1775
1866
|
({}); // @--end-of-file-for-module=taon lib/get-response-value.ts
|
|
1776
1867
|
|
|
1777
|
-
const ENV$
|
|
1868
|
+
const ENV$2 = Helpers.isBrowser ? window['ENV'] : global['ENV'];
|
|
1778
1869
|
;
|
|
1779
1870
|
({}); // @--end-of-file-for-module=taon lib/env.ts
|
|
1780
1871
|
|
|
@@ -1796,17 +1887,19 @@ class RealtimeSubsManager {
|
|
|
1796
1887
|
return;
|
|
1797
1888
|
}
|
|
1798
1889
|
if (!this.isListening) {
|
|
1799
|
-
const subscribeEvent = Symbols.REALTIME.ROOM_NAME.SUBSCRIBE.CUSTOM(this.options.core.ctx.contextName);
|
|
1800
1890
|
this.isListening = true;
|
|
1801
1891
|
if (this.options.customEvent) {
|
|
1892
|
+
const subscribeEvent = Symbols.REALTIME.ROOM_SUBSCRIBE_CUSTOM(this.options.core.ctx.contextName);
|
|
1802
1893
|
realtime.emit(subscribeEvent, this.options.roomName);
|
|
1803
1894
|
}
|
|
1804
1895
|
else {
|
|
1805
|
-
if (_.isString(this.options.property)) {
|
|
1806
|
-
|
|
1896
|
+
if (_$1.isString(this.options.property)) {
|
|
1897
|
+
const subscribeEvent = Symbols.REALTIME.ROOM_SUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(this.options.core.ctx.contextName);
|
|
1898
|
+
realtime.emit(subscribeEvent, this.options.roomName);
|
|
1807
1899
|
}
|
|
1808
1900
|
else {
|
|
1809
|
-
|
|
1901
|
+
const subscribeEvent = Symbols.REALTIME.ROOM_SUBSCRIBE_ENTITY_UPDATE_EVENTS(this.options.core.ctx.contextName);
|
|
1902
|
+
realtime.emit(subscribeEvent, this.options.roomName);
|
|
1810
1903
|
}
|
|
1811
1904
|
}
|
|
1812
1905
|
realtime.on(this.options.roomName, data => {
|
|
@@ -1822,16 +1915,16 @@ class RealtimeSubsManager {
|
|
|
1822
1915
|
if (this.observers.length === 0) {
|
|
1823
1916
|
this.isListening = false;
|
|
1824
1917
|
const { core, customEvent, roomName, property } = this.options;
|
|
1825
|
-
const realtime = core.
|
|
1918
|
+
const realtime = core.socketFE;
|
|
1826
1919
|
if (customEvent) {
|
|
1827
|
-
realtime.emit(Symbols.REALTIME.
|
|
1920
|
+
realtime.emit(Symbols.REALTIME.ROOM_UNSUBSCRIBE_CUSTOM(this.options.core.ctx.contextName), roomName);
|
|
1828
1921
|
}
|
|
1829
1922
|
else {
|
|
1830
|
-
if (_.isString(property)) {
|
|
1831
|
-
realtime.emit(Symbols.REALTIME.
|
|
1923
|
+
if (_$1.isString(property)) {
|
|
1924
|
+
realtime.emit(Symbols.REALTIME.ROOM_UNSUBSCRIBE_ENTITY_PROPERTY_UPDATE_EVENTS(this.options.core.ctx.contextName), roomName);
|
|
1832
1925
|
}
|
|
1833
1926
|
else {
|
|
1834
|
-
realtime.emit(Symbols.REALTIME.
|
|
1927
|
+
realtime.emit(Symbols.REALTIME.ROOM_UNSUBSCRIBE_ENTITY_UPDATE_EVENTS(this.options.core.ctx.contextName), roomName);
|
|
1835
1928
|
}
|
|
1836
1929
|
}
|
|
1837
1930
|
}
|
|
@@ -1858,7 +1951,7 @@ class RealtimeSubsManager {
|
|
|
1858
1951
|
class RealtimeClient {
|
|
1859
1952
|
constructor(core) {
|
|
1860
1953
|
this.core = core;
|
|
1861
|
-
this.
|
|
1954
|
+
this.subsManagers = {};
|
|
1862
1955
|
this.core = core;
|
|
1863
1956
|
if (!core.ctx.disabledRealtime) {
|
|
1864
1957
|
this.init();
|
|
@@ -1873,20 +1966,24 @@ class RealtimeClient {
|
|
|
1873
1966
|
console.info('[CLIENT] NAMESPACE GLOBAL ', nspPath.global.href + ` host: ${this.core.ctx.host}`);
|
|
1874
1967
|
this.core.ctx.logRealtime &&
|
|
1875
1968
|
console.info('[CLIENT] NAMESPACE REALTIME', nspPath.realtime.href + ` host: ${this.core.ctx.host}`);
|
|
1876
|
-
this.core.
|
|
1969
|
+
this.core.conectSocketFE = this.core.strategy.ioClient(nspPath.global.origin, {
|
|
1877
1970
|
path: nspPath.global.pathname,
|
|
1878
1971
|
});
|
|
1879
|
-
if (this.core.
|
|
1880
|
-
this.core.
|
|
1881
|
-
|
|
1972
|
+
if (this.core.conectSocketFE.on) {
|
|
1973
|
+
this.core.conectSocketFE.on('connect', () => {
|
|
1974
|
+
this.core.ctx.logRealtime &&
|
|
1975
|
+
console.info(`[CLIENT] connected to GLOBAL namespace ${nspPath.global.pathname}` +
|
|
1976
|
+
` of host: ${this.core.ctx.host}`);
|
|
1882
1977
|
});
|
|
1883
1978
|
}
|
|
1884
|
-
this.core.
|
|
1979
|
+
this.core.socketFE = this.core.strategy.ioClient(nspPath.realtime.origin, {
|
|
1885
1980
|
path: nspPath.realtime.pathname,
|
|
1886
1981
|
});
|
|
1887
|
-
if (this.core.
|
|
1888
|
-
this.core.
|
|
1889
|
-
|
|
1982
|
+
if (this.core.socketFE.on) {
|
|
1983
|
+
this.core.socketFE.on('connect', () => {
|
|
1984
|
+
this.core.ctx.logRealtime &&
|
|
1985
|
+
console.info(`[CLIENT] connected to REALTIME namespace ${nspPath.realtime.pathname}` +
|
|
1986
|
+
` host: ${this.core.ctx.host}`);
|
|
1890
1987
|
});
|
|
1891
1988
|
}
|
|
1892
1989
|
}
|
|
@@ -1901,7 +1998,7 @@ class RealtimeClient {
|
|
|
1901
1998
|
options = options || {};
|
|
1902
1999
|
const { property, customEvent } = options;
|
|
1903
2000
|
const className = !customEvent && ClassHelpers.getName(entityClassFn);
|
|
1904
|
-
if (_.isString(property)) {
|
|
2001
|
+
if (_$1.isString(property)) {
|
|
1905
2002
|
if (property.trim() === '') {
|
|
1906
2003
|
throw new Error(`[Taon][listenChangesEntity.. incorect property '' for ${className}`);
|
|
1907
2004
|
}
|
|
@@ -1921,12 +2018,12 @@ to use socket realtime connection;
|
|
|
1921
2018
|
}
|
|
1922
2019
|
let roomName;
|
|
1923
2020
|
if (customEvent) {
|
|
1924
|
-
roomName = Symbols.REALTIME.
|
|
2021
|
+
roomName = Symbols.REALTIME.ROOM_NAME_CUSTOM(this.core.ctx.contextName, customEvent);
|
|
1925
2022
|
}
|
|
1926
2023
|
else {
|
|
1927
|
-
roomName = _.isString(property)
|
|
1928
|
-
? Symbols.REALTIME.
|
|
1929
|
-
: Symbols.REALTIME.
|
|
2024
|
+
roomName = _$1.isString(property)
|
|
2025
|
+
? Symbols.REALTIME.ROOM_NAME_UPDATE_ENTITY_PROPERTY(this.core.ctx.contextName, className, property, idOrUniqValue)
|
|
2026
|
+
: Symbols.REALTIME.ROOM_NAME_UPDATE_ENTITY(this.core.ctx.contextName, className, idOrUniqValue);
|
|
1930
2027
|
}
|
|
1931
2028
|
const roomSubOptions = {
|
|
1932
2029
|
core: this.core,
|
|
@@ -1934,13 +2031,13 @@ to use socket realtime connection;
|
|
|
1934
2031
|
roomName,
|
|
1935
2032
|
customEvent,
|
|
1936
2033
|
};
|
|
1937
|
-
const subManagerId = this.
|
|
1938
|
-
if (!this.
|
|
1939
|
-
this.
|
|
2034
|
+
const subManagerId = this.getUniqueIdentifierForConnection(roomSubOptions);
|
|
2035
|
+
if (!this.subsManagers[subManagerId]) {
|
|
2036
|
+
this.subsManagers[subManagerId] = new RealtimeSubsManager(roomSubOptions);
|
|
1940
2037
|
}
|
|
1941
|
-
const inst = this.
|
|
2038
|
+
const inst = this.subsManagers[subManagerId];
|
|
1942
2039
|
inst.add(observer);
|
|
1943
|
-
inst.startListenIfNotStarted(this.core.
|
|
2040
|
+
inst.startListenIfNotStarted(this.core.socketFE);
|
|
1944
2041
|
return () => {
|
|
1945
2042
|
inst.remove(observer);
|
|
1946
2043
|
};
|
|
@@ -1963,7 +2060,7 @@ to use socket realtime connection;
|
|
|
1963
2060
|
*/
|
|
1964
2061
|
listenChangesEntityObj(entity, options) {
|
|
1965
2062
|
const classFn = ClassHelpers.getClassFnFromObject(entity);
|
|
1966
|
-
const uniqueKey = ClassHelpers.
|
|
2063
|
+
const uniqueKey = ClassHelpers.getUniqueKey(classFn);
|
|
1967
2064
|
return this.listenChangesEntity(classFn, entity[uniqueKey], options);
|
|
1968
2065
|
}
|
|
1969
2066
|
listenChangesCustomEvent(customEvent) {
|
|
@@ -1971,7 +2068,15 @@ to use socket realtime connection;
|
|
|
1971
2068
|
customEvent,
|
|
1972
2069
|
});
|
|
1973
2070
|
}
|
|
1974
|
-
|
|
2071
|
+
/**
|
|
2072
|
+
* Trigger custom event on backend
|
|
2073
|
+
* @param customEvent global event name
|
|
2074
|
+
* @param dataToPush
|
|
2075
|
+
*/
|
|
2076
|
+
triggerCustomEvent(customEvent, dataToPush) {
|
|
2077
|
+
this.core.socketFE.emit(customEvent, dataToPush);
|
|
2078
|
+
}
|
|
2079
|
+
getUniqueIdentifierForConnection(options) {
|
|
1975
2080
|
const url = new URL(options.core.ctx.host);
|
|
1976
2081
|
return `${this.core.ctx.contextName}:${url.origin}|${options.roomName}|${options.property}|${options.customEvent}`;
|
|
1977
2082
|
}
|
|
@@ -1979,11 +2084,9 @@ to use socket realtime connection;
|
|
|
1979
2084
|
;
|
|
1980
2085
|
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-client.ts
|
|
1981
2086
|
|
|
1982
|
-
const SOCKET_EVENT_DEBOUNCE = 500;
|
|
1983
2087
|
class RealtimeServer {
|
|
1984
2088
|
constructor(core) {
|
|
1985
2089
|
this.core = core;
|
|
1986
|
-
this.jobs = {};
|
|
1987
2090
|
this.core = core;
|
|
1988
2091
|
if (!core.ctx.disabledRealtime) {
|
|
1989
2092
|
/* */
|
|
@@ -2141,8 +2244,6 @@ class RealtimeServer {
|
|
|
2141
2244
|
/* */
|
|
2142
2245
|
/* */
|
|
2143
2246
|
/* */
|
|
2144
|
-
}
|
|
2145
|
-
triggerChanges(entityObjOrClass, property, valueOfUniquPropery, customEvent, customEventData) {
|
|
2146
2247
|
/* */
|
|
2147
2248
|
/* */
|
|
2148
2249
|
/* */
|
|
@@ -2157,6 +2258,11 @@ class RealtimeServer {
|
|
|
2157
2258
|
/* */
|
|
2158
2259
|
/* */
|
|
2159
2260
|
/* */
|
|
2261
|
+
}
|
|
2262
|
+
triggerChanges(entityObjOrClass, property, valueOfUniqueProperty, customEvent, customEventData) {
|
|
2263
|
+
/* */
|
|
2264
|
+
/* */
|
|
2265
|
+
/* */
|
|
2160
2266
|
/* */
|
|
2161
2267
|
/* */
|
|
2162
2268
|
/* */
|
|
@@ -2212,21 +2318,21 @@ class RealtimeServer {
|
|
|
2212
2318
|
/* */
|
|
2213
2319
|
/* */
|
|
2214
2320
|
}
|
|
2215
|
-
|
|
2321
|
+
triggerEntityChanges(entityObjOrClass, idToTrigger) {
|
|
2216
2322
|
if (this.core.ctx.disabledRealtime) {
|
|
2217
2323
|
const className = ClassHelpers.getName(entityObjOrClass);
|
|
2218
|
-
console.warn(`[Taon][
|
|
2324
|
+
console.warn(`[Taon][TriggerEntityChanges] Entity "${className}' is not realtime`);
|
|
2219
2325
|
return;
|
|
2220
2326
|
}
|
|
2221
2327
|
this.triggerChanges(entityObjOrClass, void 0, idToTrigger);
|
|
2222
2328
|
}
|
|
2223
|
-
|
|
2329
|
+
triggerEntityPropertyChanges(entityObjOrClass, property, idToTrigger) {
|
|
2224
2330
|
if (this.core.ctx.disabledRealtime) {
|
|
2225
2331
|
const className = ClassHelpers.getName(entityObjOrClass);
|
|
2226
|
-
console.warn(`[Taon][
|
|
2332
|
+
console.warn(`[Taon][TriggerEntityPropertyChanges][property=${property}] Entity "${className}' is not realtime`);
|
|
2227
2333
|
return;
|
|
2228
2334
|
}
|
|
2229
|
-
if (_.isArray(property)) {
|
|
2335
|
+
if (_$1.isArray(property)) {
|
|
2230
2336
|
property.forEach(propertyFromArr => {
|
|
2231
2337
|
this.triggerChanges(entityObjOrClass, propertyFromArr, idToTrigger);
|
|
2232
2338
|
});
|
|
@@ -2235,16 +2341,33 @@ class RealtimeServer {
|
|
|
2235
2341
|
this.triggerChanges(entityObjOrClass, property, idToTrigger);
|
|
2236
2342
|
}
|
|
2237
2343
|
}
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
}
|
|
2241
|
-
trigggerEntityTableChanges(entityClass) {
|
|
2242
|
-
const className = ClassHelpers.getName(entityClass);
|
|
2344
|
+
triggerEntityTableChanges(entityClassOrInstance) {
|
|
2345
|
+
const className = ClassHelpers.getName(entityClassOrInstance);
|
|
2243
2346
|
if (this.core.ctx.disabledRealtime) {
|
|
2244
|
-
console.warn(`[Taon][
|
|
2347
|
+
console.warn(`[Taon][TriggerEntityTableChanges] Entity "${className}' is not realtime`);
|
|
2245
2348
|
return;
|
|
2246
2349
|
}
|
|
2247
|
-
this.triggerChanges(
|
|
2350
|
+
this.triggerChanges(entityClassOrInstance, void 0, void 0, Symbols.REALTIME.TABLE_CHANGE(this.core.ctx.contextName, className));
|
|
2351
|
+
}
|
|
2352
|
+
triggerCustomEvent(customEvent, dataToPush) {
|
|
2353
|
+
this.triggerChanges(void 0, void 0, void 0, customEvent, dataToPush);
|
|
2354
|
+
}
|
|
2355
|
+
/**
|
|
2356
|
+
* Listen to custom events from users
|
|
2357
|
+
* @param customEvent global event name
|
|
2358
|
+
*/
|
|
2359
|
+
listenChangesCustomEvent(customEvent) {
|
|
2360
|
+
/* */
|
|
2361
|
+
/* */
|
|
2362
|
+
/* */
|
|
2363
|
+
/* */
|
|
2364
|
+
/* */
|
|
2365
|
+
/* */
|
|
2366
|
+
/* */
|
|
2367
|
+
/* */
|
|
2368
|
+
/* */
|
|
2369
|
+
/* */
|
|
2370
|
+
return (void 0);
|
|
2248
2371
|
}
|
|
2249
2372
|
}
|
|
2250
2373
|
;
|
|
@@ -2254,106 +2377,49 @@ class RealtimeStrategy {
|
|
|
2254
2377
|
constructor(ctx) {
|
|
2255
2378
|
this.ctx = ctx;
|
|
2256
2379
|
}
|
|
2257
|
-
|
|
2380
|
+
get ioClient() {
|
|
2381
|
+
throw new Error('Not implemented');
|
|
2382
|
+
}
|
|
2383
|
+
ioServer(url, opt) {
|
|
2384
|
+
throw new Error('Not implemented');
|
|
2258
2385
|
}
|
|
2259
2386
|
}
|
|
2260
2387
|
;
|
|
2261
2388
|
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-strategy/realtime-strategy.ts
|
|
2262
2389
|
|
|
2263
|
-
class
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
}
|
|
2269
|
-
on(eventName, callback) {
|
|
2270
|
-
if (!this.listeners[eventName]) {
|
|
2271
|
-
this.listeners[eventName] = [];
|
|
2272
|
-
}
|
|
2273
|
-
this.listeners[eventName].push(callback);
|
|
2274
|
-
const listenToEvent = `(${this.name}) "${eventName}"`;
|
|
2275
|
-
this.ipcRenderer.on(listenToEvent, callback);
|
|
2276
|
-
if (eventName === 'connect') {
|
|
2277
|
-
this.emit('connection');
|
|
2278
|
-
}
|
|
2279
|
-
else {
|
|
2280
|
-
this.emit(eventName);
|
|
2281
|
-
}
|
|
2282
|
-
}
|
|
2283
|
-
off(event, callback) {
|
|
2284
|
-
if (!this.listeners[event])
|
|
2285
|
-
return;
|
|
2286
|
-
if (callback) {
|
|
2287
|
-
this.listeners[event] = this.listeners[event].filter(listener => listener !== callback);
|
|
2288
|
-
}
|
|
2289
|
-
else {
|
|
2290
|
-
delete this.listeners[event];
|
|
2390
|
+
class MockServerIpc {
|
|
2391
|
+
static { this.serverByContextName = new Map(); }
|
|
2392
|
+
static from(contextName) {
|
|
2393
|
+
if (!MockServerIpc.serverByContextName.has(contextName)) {
|
|
2394
|
+
MockServerIpc.serverByContextName.set(contextName, new MockServerIpc(contextName));
|
|
2291
2395
|
}
|
|
2292
|
-
|
|
2293
|
-
this.ipcRenderer.removeListener(removeListener, callback);
|
|
2294
|
-
}
|
|
2295
|
-
emit(event, ...args) {
|
|
2296
|
-
const emitEvent = `(${this.name}) "${event}"`;
|
|
2297
|
-
this.ipcRenderer.send(emitEvent, ...args);
|
|
2396
|
+
return MockServerIpc.serverByContextName.get(contextName);
|
|
2298
2397
|
}
|
|
2299
|
-
}
|
|
2300
|
-
;
|
|
2301
|
-
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.ts
|
|
2302
|
-
|
|
2303
|
-
class IpcRendererWrapper {
|
|
2304
2398
|
constructor(contextName) {
|
|
2305
2399
|
this.contextName = contextName;
|
|
2306
|
-
this.
|
|
2307
|
-
|
|
2308
|
-
};
|
|
2309
|
-
this.connected = false;
|
|
2400
|
+
this.namespacesByName = new Map();
|
|
2401
|
+
MockServerIpc.serverByContextName.set(contextName, this);
|
|
2310
2402
|
}
|
|
2311
2403
|
of(namespace) {
|
|
2312
|
-
if (!this.
|
|
2313
|
-
this.
|
|
2404
|
+
if (!this.namespacesByName.has(namespace)) {
|
|
2405
|
+
this.namespacesByName.set(namespace, new MockNamespaceIpc(namespace, this));
|
|
2314
2406
|
}
|
|
2315
|
-
return this.
|
|
2316
|
-
}
|
|
2317
|
-
on(event, callback) {
|
|
2318
|
-
this.namespaces['/'].on(event, callback);
|
|
2319
|
-
}
|
|
2320
|
-
emit(event, ...args) {
|
|
2321
|
-
this.namespaces['/'].emit(event, ...args);
|
|
2407
|
+
return this.namespacesByName.get(namespace);
|
|
2322
2408
|
}
|
|
2323
2409
|
}
|
|
2324
|
-
|
|
2325
|
-
(
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
establishConnection() {
|
|
2336
|
-
throw new Error('Method not implemented.');
|
|
2337
|
-
}
|
|
2338
|
-
constructor(ctx) {
|
|
2339
|
-
super(ctx);
|
|
2340
|
-
this.ctx = ctx;
|
|
2341
|
-
this.contextsServers = {};
|
|
2342
|
-
this.contextsIO = {};
|
|
2343
|
-
}
|
|
2344
|
-
get io() {
|
|
2345
|
-
return ((__, { path: namespacePath }) => {
|
|
2346
|
-
if (this.contextsIO[namespacePath]) {
|
|
2347
|
-
return this.contextsIO[namespacePath];
|
|
2348
|
-
}
|
|
2349
|
-
const wrap = new IpcRendererWrapper(this.ctx.contextName);
|
|
2350
|
-
const nsp = wrap.of(namespacePath);
|
|
2351
|
-
this.contextsIO[namespacePath] = nsp;
|
|
2352
|
-
return nsp;
|
|
2353
|
-
});
|
|
2354
|
-
return void 0;
|
|
2410
|
+
class MockNamespaceIpc {
|
|
2411
|
+
constructor(
|
|
2412
|
+
/**
|
|
2413
|
+
* Namespace name
|
|
2414
|
+
*/
|
|
2415
|
+
name, server) {
|
|
2416
|
+
this.name = name;
|
|
2417
|
+
this.server = server;
|
|
2418
|
+
this.electronClients = new Set();
|
|
2419
|
+
this.roomsByRoomName = {};
|
|
2420
|
+
this.namespaceEventHandlers = {};
|
|
2355
2421
|
}
|
|
2356
|
-
|
|
2422
|
+
on(eventName, callback) {
|
|
2357
2423
|
/* */
|
|
2358
2424
|
/* */
|
|
2359
2425
|
/* */
|
|
@@ -2365,189 +2431,375 @@ class RealtimeStrategyIpc extends RealtimeStrategy {
|
|
|
2365
2431
|
/* */
|
|
2366
2432
|
/* */
|
|
2367
2433
|
/* */
|
|
2368
|
-
|
|
2434
|
+
/* */
|
|
2435
|
+
/* */
|
|
2436
|
+
/* */
|
|
2437
|
+
/* */
|
|
2438
|
+
/* */
|
|
2439
|
+
/* */
|
|
2440
|
+
/* */
|
|
2441
|
+
/* */
|
|
2442
|
+
/* */
|
|
2443
|
+
/* */
|
|
2444
|
+
/* */
|
|
2445
|
+
/* */
|
|
2446
|
+
/* */
|
|
2447
|
+
/* */
|
|
2448
|
+
/* */
|
|
2449
|
+
/* */
|
|
2450
|
+
/* */
|
|
2451
|
+
/* */
|
|
2452
|
+
return (void 0);
|
|
2369
2453
|
}
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2454
|
+
off(event, callback) {
|
|
2455
|
+
/* */
|
|
2456
|
+
/* */
|
|
2457
|
+
/* */
|
|
2458
|
+
/* */
|
|
2459
|
+
/* */
|
|
2460
|
+
/* */
|
|
2461
|
+
/* */
|
|
2462
|
+
/* */
|
|
2463
|
+
/* */
|
|
2464
|
+
/* */
|
|
2465
|
+
/* */
|
|
2466
|
+
/* */
|
|
2467
|
+
return (void 0);
|
|
2380
2468
|
}
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2469
|
+
emit(eventName, ...args) {
|
|
2470
|
+
/* */
|
|
2471
|
+
/* */
|
|
2472
|
+
/* */
|
|
2473
|
+
/* */
|
|
2474
|
+
/* */
|
|
2475
|
+
/* */
|
|
2476
|
+
/* */
|
|
2477
|
+
/* */
|
|
2478
|
+
/* */
|
|
2479
|
+
return (void 0);
|
|
2385
2480
|
}
|
|
2386
|
-
|
|
2387
|
-
|
|
2481
|
+
to(roomName) {
|
|
2482
|
+
const electronClientsInroom = this.roomsByRoomName[roomName];
|
|
2483
|
+
return new RoomEmitterIpc(electronClientsInroom, this.name, true);
|
|
2388
2484
|
}
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
if (this.rooms[room]) {
|
|
2393
|
-
this.rooms[room].forEach(socket => socket.emit(event, data));
|
|
2394
|
-
}
|
|
2395
|
-
}
|
|
2396
|
-
};
|
|
2485
|
+
in(roomName) {
|
|
2486
|
+
const electronClientsInroom = this.roomsByRoomName[roomName];
|
|
2487
|
+
return new RoomEmitterIpc(electronClientsInroom, this.name, false);
|
|
2397
2488
|
}
|
|
2398
|
-
|
|
2399
|
-
if (!this.
|
|
2400
|
-
this.
|
|
2489
|
+
join(webContents, roomName) {
|
|
2490
|
+
if (!this.roomsByRoomName[roomName]) {
|
|
2491
|
+
this.roomsByRoomName[roomName] = new Set();
|
|
2401
2492
|
}
|
|
2402
|
-
this.
|
|
2493
|
+
this.roomsByRoomName[roomName].add(webContents);
|
|
2403
2494
|
}
|
|
2404
|
-
|
|
2405
|
-
if (this.
|
|
2406
|
-
this.
|
|
2407
|
-
if (this.
|
|
2408
|
-
delete this.
|
|
2495
|
+
leave(webContents, roomName) {
|
|
2496
|
+
if (this.roomsByRoomName[roomName]) {
|
|
2497
|
+
this.roomsByRoomName[roomName].delete(webContents);
|
|
2498
|
+
if (this.roomsByRoomName[roomName].size === 0) {
|
|
2499
|
+
delete this.roomsByRoomName[roomName];
|
|
2409
2500
|
}
|
|
2410
2501
|
}
|
|
2411
2502
|
}
|
|
2412
|
-
|
|
2413
|
-
this.
|
|
2503
|
+
path() {
|
|
2504
|
+
return this.name;
|
|
2414
2505
|
}
|
|
2415
|
-
|
|
2416
|
-
this
|
|
2506
|
+
get nsp() {
|
|
2507
|
+
const self = this;
|
|
2508
|
+
return {
|
|
2509
|
+
get name() {
|
|
2510
|
+
return self.name;
|
|
2511
|
+
},
|
|
2512
|
+
};
|
|
2417
2513
|
}
|
|
2418
2514
|
}
|
|
2419
|
-
|
|
2420
|
-
(
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
this.
|
|
2426
|
-
this.
|
|
2427
|
-
this.
|
|
2515
|
+
class RoomEmitterIpc {
|
|
2516
|
+
constructor(electronClients,
|
|
2517
|
+
/**
|
|
2518
|
+
* namespace name
|
|
2519
|
+
*/
|
|
2520
|
+
name, includeSender = false, sender = null) {
|
|
2521
|
+
this.electronClients = electronClients;
|
|
2522
|
+
this.name = name;
|
|
2523
|
+
this.includeSender = includeSender;
|
|
2524
|
+
this.sender = sender;
|
|
2525
|
+
}
|
|
2526
|
+
emit(eventName, ...args) {
|
|
2527
|
+
const emitEvent = `(${this.name}) "${eventName}"`;
|
|
2528
|
+
this.electronClients?.forEach(webContents => {
|
|
2529
|
+
webContents.send(emitEvent, ...args);
|
|
2530
|
+
});
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
class MockSocketIpc {
|
|
2534
|
+
get name() {
|
|
2535
|
+
return this.namespaceName;
|
|
2428
2536
|
}
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2537
|
+
/**
|
|
2538
|
+
* @param namespaceName instead url for ipc
|
|
2539
|
+
*/
|
|
2540
|
+
constructor(namespaceName) {
|
|
2541
|
+
this.namespaceName = namespaceName;
|
|
2542
|
+
this.socketEventHandlers = {};
|
|
2543
|
+
this.ipcRenderer = window.require('electron').ipcRenderer;
|
|
2544
|
+
}
|
|
2545
|
+
on(eventName, callback) {
|
|
2546
|
+
if (!this.socketEventHandlers[eventName]) {
|
|
2547
|
+
this.socketEventHandlers[eventName] = new Set();
|
|
2548
|
+
}
|
|
2549
|
+
this.socketEventHandlers[eventName].add(callback);
|
|
2550
|
+
const listenToEvent = `(${this.name}) "${eventName}"`;
|
|
2551
|
+
this.ipcRenderer.on(listenToEvent, (rendereEvent, data) => {
|
|
2552
|
+
callback(data);
|
|
2553
|
+
});
|
|
2554
|
+
if (eventName === 'connect') {
|
|
2555
|
+
const connectionEventKey = `(${this.name}) "connection"`;
|
|
2556
|
+
this.ipcRenderer.send(connectionEventKey, this.name);
|
|
2432
2557
|
}
|
|
2433
|
-
this.listeners[event].push(callback);
|
|
2434
2558
|
}
|
|
2435
2559
|
off(event, callback) {
|
|
2436
|
-
if (!this.
|
|
2560
|
+
if (!this.socketEventHandlers[event]) {
|
|
2437
2561
|
return;
|
|
2562
|
+
}
|
|
2438
2563
|
if (callback) {
|
|
2439
|
-
this.
|
|
2564
|
+
this.socketEventHandlers[event].delete(callback);
|
|
2440
2565
|
}
|
|
2441
2566
|
else {
|
|
2442
|
-
delete this.
|
|
2567
|
+
delete this.socketEventHandlers[event];
|
|
2443
2568
|
}
|
|
2569
|
+
const removeListener = `(${this.name}) "${event}"`;
|
|
2570
|
+
this.ipcRenderer.removeListener(removeListener, data => {
|
|
2571
|
+
callback(data);
|
|
2572
|
+
});
|
|
2444
2573
|
}
|
|
2445
|
-
emit(event,
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2574
|
+
emit(event, ...args) {
|
|
2575
|
+
const emitEvent = `(${this.name}) "${event}"`;
|
|
2576
|
+
this.ipcRenderer.send(emitEvent, ...args);
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
/**
|
|
2580
|
+
* Purpose:
|
|
2581
|
+
* - backend-browser communication between 2 processes in electron mode
|
|
2582
|
+
*/
|
|
2583
|
+
class RealtimeStrategyIpc extends RealtimeStrategy {
|
|
2584
|
+
toString() {
|
|
2585
|
+
return 'ipc';
|
|
2449
2586
|
}
|
|
2450
|
-
|
|
2451
|
-
|
|
2587
|
+
constructor(ctx) {
|
|
2588
|
+
super(ctx);
|
|
2589
|
+
this.ctx = ctx;
|
|
2452
2590
|
}
|
|
2453
|
-
|
|
2454
|
-
|
|
2591
|
+
ioServer(__, opt) {
|
|
2592
|
+
const namespace = opt?.path || '/';
|
|
2593
|
+
const server = MockServerIpc.from(this.ctx.contextName);
|
|
2594
|
+
return server.of(namespace);
|
|
2455
2595
|
}
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2596
|
+
get ioClient() {
|
|
2597
|
+
const clientIo = (__, opt) => {
|
|
2598
|
+
const namespace = opt?.path || '/';
|
|
2599
|
+
return new MockSocketIpc(namespace);
|
|
2600
|
+
};
|
|
2601
|
+
return clientIo;
|
|
2460
2602
|
}
|
|
2461
2603
|
}
|
|
2462
2604
|
;
|
|
2463
|
-
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-strategy/realtime-strategy-
|
|
2605
|
+
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-strategy/realtime-strategy-ipc.ts
|
|
2464
2606
|
|
|
2465
2607
|
class MockServer {
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
};
|
|
2471
|
-
}
|
|
2472
|
-
of(namespace) {
|
|
2473
|
-
if (!this.namespaces[namespace]) {
|
|
2474
|
-
this.namespaces[namespace] = new MockNamespace(namespace, this.contextName);
|
|
2608
|
+
static { this.serverByUrl = new Map(); }
|
|
2609
|
+
static from(url) {
|
|
2610
|
+
if (!MockServer.serverByUrl.has(url)) {
|
|
2611
|
+
MockServer.serverByUrl.set(url, new MockServer(url));
|
|
2475
2612
|
}
|
|
2476
|
-
return
|
|
2613
|
+
return MockServer.serverByUrl.get(url);
|
|
2477
2614
|
}
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
this.namespaces['/'].on('connection', callback);
|
|
2481
|
-
}
|
|
2615
|
+
get allServers() {
|
|
2616
|
+
return Array.from(MockServer.serverByUrl.values());
|
|
2482
2617
|
}
|
|
2483
|
-
|
|
2484
|
-
this.
|
|
2618
|
+
constructor(url) {
|
|
2619
|
+
this.url = url;
|
|
2620
|
+
this.namespacesByName = new Map();
|
|
2621
|
+
MockServer.serverByUrl.set(url, this);
|
|
2485
2622
|
}
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2623
|
+
of(namespace) {
|
|
2624
|
+
if (!this.namespacesByName.has(namespace)) {
|
|
2625
|
+
this.namespacesByName.set(namespace, new MockNamespace(namespace, this));
|
|
2626
|
+
}
|
|
2627
|
+
return this.namespacesByName.get(namespace);
|
|
2628
|
+
}
|
|
2629
|
+
path() {
|
|
2630
|
+
return this.url;
|
|
2493
2631
|
}
|
|
2494
2632
|
}
|
|
2495
|
-
|
|
2496
|
-
(
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
this.
|
|
2502
|
-
this.
|
|
2503
|
-
|
|
2633
|
+
class MockNamespace {
|
|
2634
|
+
constructor(
|
|
2635
|
+
/**
|
|
2636
|
+
* unique namespace name
|
|
2637
|
+
*/
|
|
2638
|
+
name, server) {
|
|
2639
|
+
this.name = name;
|
|
2640
|
+
this.server = server;
|
|
2641
|
+
/**
|
|
2642
|
+
* All sockets connected to this namespace
|
|
2643
|
+
*/
|
|
2644
|
+
this.allSocketsForNamespace = new Set();
|
|
2645
|
+
/**
|
|
2646
|
+
* Rooms and their sockets
|
|
2647
|
+
*/
|
|
2648
|
+
this.socketByRoomName = {};
|
|
2649
|
+
/**
|
|
2650
|
+
* Event handlers for this namespace
|
|
2651
|
+
*/
|
|
2652
|
+
this.namespaceEventHandlers = {};
|
|
2504
2653
|
}
|
|
2505
|
-
on(
|
|
2506
|
-
if (!this.
|
|
2507
|
-
this.
|
|
2654
|
+
on(eventName, handler) {
|
|
2655
|
+
if (!this.namespaceEventHandlers[eventName]) {
|
|
2656
|
+
this.namespaceEventHandlers[eventName] =
|
|
2657
|
+
new Set();
|
|
2508
2658
|
}
|
|
2509
|
-
this.
|
|
2510
|
-
|
|
2511
|
-
off(event, callback) {
|
|
2512
|
-
if (!this.listeners[event])
|
|
2513
|
-
return;
|
|
2514
|
-
if (callback) {
|
|
2515
|
-
this.listeners[event] = this.listeners[event].filter(listener => listener !== callback);
|
|
2659
|
+
if (!this.namespaceEventHandlers[eventName].has(handler)) {
|
|
2660
|
+
this.namespaceEventHandlers[eventName].add(handler);
|
|
2516
2661
|
}
|
|
2517
|
-
|
|
2518
|
-
|
|
2662
|
+
if (eventName === 'connection') {
|
|
2663
|
+
setTimeout(() => {
|
|
2664
|
+
this.emit('connection', this);
|
|
2665
|
+
});
|
|
2519
2666
|
}
|
|
2520
2667
|
}
|
|
2521
|
-
emit(event,
|
|
2522
|
-
this.
|
|
2523
|
-
|
|
2524
|
-
|
|
2668
|
+
emit(event, ...args) {
|
|
2669
|
+
this.allSocketsForNamespace?.forEach(socket => {
|
|
2670
|
+
socket.emit(event, ...args);
|
|
2671
|
+
});
|
|
2672
|
+
}
|
|
2673
|
+
connect(socket) {
|
|
2674
|
+
this.allSocketsForNamespace.add(socket);
|
|
2675
|
+
socket.namespaceInstance = this;
|
|
2676
|
+
}
|
|
2677
|
+
to(roomName) {
|
|
2678
|
+
const socketsInRoom = this.socketByRoomName[roomName];
|
|
2679
|
+
return new RoomEmitter(socketsInRoom, true);
|
|
2680
|
+
}
|
|
2681
|
+
in(roomName) {
|
|
2682
|
+
const socketsInRoom = this.socketByRoomName[roomName];
|
|
2683
|
+
return new RoomEmitter(socketsInRoom, false);
|
|
2684
|
+
}
|
|
2685
|
+
joinRoom(roomName, socket) {
|
|
2686
|
+
if (!this.socketByRoomName[roomName]) {
|
|
2687
|
+
this.socketByRoomName[roomName] = new Set();
|
|
2525
2688
|
}
|
|
2689
|
+
this.socketByRoomName[roomName].add(socket);
|
|
2526
2690
|
}
|
|
2527
|
-
|
|
2528
|
-
this.
|
|
2529
|
-
|
|
2691
|
+
leaveRoom(roomName, socket) {
|
|
2692
|
+
const roomSockets = this.socketByRoomName[roomName];
|
|
2693
|
+
if (roomSockets) {
|
|
2694
|
+
this.socketByRoomName[roomName].delete(socket);
|
|
2695
|
+
}
|
|
2530
2696
|
}
|
|
2531
|
-
|
|
2532
|
-
this
|
|
2697
|
+
get nsp() {
|
|
2698
|
+
const self = this;
|
|
2699
|
+
return {
|
|
2700
|
+
get name() {
|
|
2701
|
+
return self.name;
|
|
2702
|
+
},
|
|
2703
|
+
};
|
|
2533
2704
|
}
|
|
2534
|
-
|
|
2535
|
-
this.
|
|
2705
|
+
path() {
|
|
2706
|
+
return this.name;
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
class RoomEmitter {
|
|
2710
|
+
constructor(sockets, includeSender = false, sender = null) {
|
|
2711
|
+
this.sockets = sockets;
|
|
2712
|
+
this.includeSender = includeSender;
|
|
2713
|
+
this.sender = sender;
|
|
2714
|
+
}
|
|
2715
|
+
emit(event, ...args) {
|
|
2716
|
+
this.sockets?.forEach(socket => {
|
|
2717
|
+
if (this.includeSender || socket !== this.sender) {
|
|
2718
|
+
socket.emit(event, ...args);
|
|
2719
|
+
}
|
|
2720
|
+
});
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
class MockSocket {
|
|
2724
|
+
get id() {
|
|
2725
|
+
return this.nsp.name;
|
|
2726
|
+
}
|
|
2727
|
+
constructor(url, opts) {
|
|
2728
|
+
this.url = url;
|
|
2729
|
+
this.socketEventHandlers = {};
|
|
2730
|
+
// @ts-ignore
|
|
2731
|
+
const [baseUrl, namespace] = [url, opts.path || '/'];
|
|
2732
|
+
const namespaceName = namespace || '/';
|
|
2733
|
+
const server = MockServer.from(url);
|
|
2734
|
+
const ns = server.of(namespaceName);
|
|
2735
|
+
ns.connect(this);
|
|
2736
|
+
}
|
|
2737
|
+
get nsp() {
|
|
2738
|
+
const self = this;
|
|
2739
|
+
return {
|
|
2740
|
+
get name() {
|
|
2741
|
+
return self.namespaceInstance?.name;
|
|
2742
|
+
},
|
|
2743
|
+
};
|
|
2744
|
+
}
|
|
2745
|
+
path() {
|
|
2746
|
+
return this.namespaceInstance?.name;
|
|
2747
|
+
}
|
|
2748
|
+
on(eventName, handler) {
|
|
2749
|
+
if (!this.socketEventHandlers[eventName]) {
|
|
2750
|
+
this.socketEventHandlers[eventName] =
|
|
2751
|
+
new Set();
|
|
2752
|
+
}
|
|
2753
|
+
this.socketEventHandlers[eventName].add(handler);
|
|
2754
|
+
if (eventName === 'connect') {
|
|
2755
|
+
setTimeout(() => {
|
|
2756
|
+
this.emit('connect');
|
|
2757
|
+
});
|
|
2758
|
+
}
|
|
2759
|
+
}
|
|
2760
|
+
emit(eventName, ...args) {
|
|
2761
|
+
eventName = eventName || '';
|
|
2762
|
+
if (eventName.includes(`:${Symbols.REALTIME.KEYroomSubscribe}`)) {
|
|
2763
|
+
const room = args[0];
|
|
2764
|
+
this.join(room);
|
|
2765
|
+
}
|
|
2766
|
+
else if (eventName.includes(`:${Symbols.REALTIME.KEYroomUnsubscribe}`)) {
|
|
2767
|
+
const room = args[0];
|
|
2768
|
+
this.leave(room);
|
|
2769
|
+
}
|
|
2770
|
+
else {
|
|
2771
|
+
if (this.namespaceInstance) {
|
|
2772
|
+
const namespaceEventHandlers = this.namespaceInstance.namespaceEventHandlers[eventName] || [];
|
|
2773
|
+
for (const namespaceEventHandler of namespaceEventHandlers) {
|
|
2774
|
+
if (namespaceEventHandler) {
|
|
2775
|
+
namespaceEventHandler(...args);
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
const allSocketsForNamespaceExceptCurrent = Array.from(this.namespaceInstance.allSocketsForNamespace.values()).filter(socket => socket !== this);
|
|
2779
|
+
for (const socket of allSocketsForNamespaceExceptCurrent) {
|
|
2780
|
+
const socketEventHandlers = socket.socketEventHandlers[eventName];
|
|
2781
|
+
for (const socketEventHandler of socketEventHandlers) {
|
|
2782
|
+
if (socketEventHandler) {
|
|
2783
|
+
socketEventHandler(...args);
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
const socketEventHandlers = this.socketEventHandlers[eventName] || [];
|
|
2788
|
+
for (const clientHandler of socketEventHandlers) {
|
|
2789
|
+
if (clientHandler) {
|
|
2790
|
+
clientHandler(...args);
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
join(roomName) {
|
|
2797
|
+
this.namespaceInstance.joinRoom(roomName, this);
|
|
2798
|
+
}
|
|
2799
|
+
leave(roomName) {
|
|
2800
|
+
this.namespaceInstance.leaveRoom(roomName, this);
|
|
2536
2801
|
}
|
|
2537
2802
|
}
|
|
2538
|
-
function mockIo(server) {
|
|
2539
|
-
return (namespace = '/') => {
|
|
2540
|
-
const socketId = Math.random().toString(36).substring(2);
|
|
2541
|
-
const serverSocket = server.connect(socketId, namespace);
|
|
2542
|
-
return new MockClientSocket(serverSocket, server.contextName);
|
|
2543
|
-
};
|
|
2544
|
-
}
|
|
2545
|
-
;
|
|
2546
|
-
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.ts
|
|
2547
|
-
|
|
2548
|
-
;
|
|
2549
|
-
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.ts
|
|
2550
|
-
|
|
2551
2803
|
/**
|
|
2552
2804
|
* Purpose:
|
|
2553
2805
|
* - browser-browser communication mock (in websql mode)
|
|
@@ -2560,15 +2812,15 @@ class RealtimeStrategyMock extends RealtimeStrategy {
|
|
|
2560
2812
|
super(ctx);
|
|
2561
2813
|
this.ctx = ctx;
|
|
2562
2814
|
}
|
|
2563
|
-
|
|
2564
|
-
|
|
2815
|
+
ioServer(url, opt) {
|
|
2816
|
+
const server = MockServer.from(url || this.ctx.uri.origin);
|
|
2817
|
+
return server.of(opt?.path || '/');
|
|
2565
2818
|
}
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
throw new Error('Method not implemented.');
|
|
2819
|
+
get ioClient() {
|
|
2820
|
+
const clientIo = (uri, opts) => {
|
|
2821
|
+
return new MockSocket(uri || this.ctx.uri.origin, opts);
|
|
2822
|
+
};
|
|
2823
|
+
return clientIo;
|
|
2572
2824
|
}
|
|
2573
2825
|
}
|
|
2574
2826
|
;
|
|
@@ -2587,18 +2839,14 @@ class RealtimeStrategySocketIO extends RealtimeStrategy {
|
|
|
2587
2839
|
super(ctx);
|
|
2588
2840
|
this.ctx = ctx;
|
|
2589
2841
|
}
|
|
2590
|
-
|
|
2842
|
+
ioServer(...args) {
|
|
2591
2843
|
/* */
|
|
2592
2844
|
/* */
|
|
2593
2845
|
return (void 0);
|
|
2594
2846
|
}
|
|
2595
|
-
|
|
2596
|
-
get io() {
|
|
2847
|
+
get ioClient() {
|
|
2597
2848
|
return io;
|
|
2598
2849
|
}
|
|
2599
|
-
establishConnection() {
|
|
2600
|
-
throw new Error('Method not implemented.');
|
|
2601
|
-
}
|
|
2602
2850
|
}
|
|
2603
2851
|
;
|
|
2604
2852
|
({}); // @--end-of-file-for-module=taon lib/realtime/realtime-strategy/realtime-strategy-socket-io.ts
|
|
@@ -2625,14 +2873,22 @@ class RealtimeCore {
|
|
|
2625
2873
|
'OPTIONS',
|
|
2626
2874
|
'HEAD',
|
|
2627
2875
|
];
|
|
2876
|
+
this.ctx = ctx;
|
|
2628
2877
|
this.strategy = this.resolveStrategy();
|
|
2629
|
-
ctx.
|
|
2878
|
+
this.ctx.logRealtime &&
|
|
2630
2879
|
console.log(`[taon] realtime strategy: ${this.strategy}`);
|
|
2631
|
-
|
|
2632
|
-
|
|
2880
|
+
if (Helpers.isWebSQL) {
|
|
2881
|
+
this.server = new RealtimeServer(this);
|
|
2882
|
+
this.client = new RealtimeClient(this);
|
|
2883
|
+
}
|
|
2884
|
+
else {
|
|
2885
|
+
this.client = new RealtimeClient(this);
|
|
2886
|
+
this.server = new RealtimeServer(this);
|
|
2887
|
+
}
|
|
2633
2888
|
}
|
|
2634
2889
|
resolveStrategy() {
|
|
2635
|
-
if (this.ctx.mode === 'backend-frontend(websql)'
|
|
2890
|
+
if (this.ctx.mode === 'backend-frontend(websql)' ||
|
|
2891
|
+
this.ctx.mode === 'backend-frontend(websql-electron)') {
|
|
2636
2892
|
return new RealtimeStrategyMock(this.ctx);
|
|
2637
2893
|
}
|
|
2638
2894
|
if (this.ctx.mode === 'backend-frontend(ipc-electron)') {
|
|
@@ -2645,11 +2901,11 @@ class RealtimeCore {
|
|
|
2645
2901
|
let nsp = namespace ? namespace : '';
|
|
2646
2902
|
nsp = nsp === '/' ? '' : nsp;
|
|
2647
2903
|
const pathname = uri.pathname !== '/' ? uri.pathname : '';
|
|
2648
|
-
let prefix = `taonContext
|
|
2904
|
+
let prefix = `taonContext`;
|
|
2649
2905
|
if (Helpers.isElectron) {
|
|
2650
2906
|
prefix = ``;
|
|
2651
2907
|
}
|
|
2652
|
-
const href = `${uri.origin}${pathname}/${prefix}${nsp}`;
|
|
2908
|
+
const href = `${uri.origin}${pathname}/${prefix}${prefix && nsp ? '-' + nsp : nsp}`;
|
|
2653
2909
|
return new URL(href);
|
|
2654
2910
|
}
|
|
2655
2911
|
}
|
|
@@ -2661,11 +2917,6 @@ class EndpointContext {
|
|
|
2661
2917
|
static initNgZone(ngZone) {
|
|
2662
2918
|
this.ngZone = ngZone;
|
|
2663
2919
|
}
|
|
2664
|
-
static findForTraget(classFnOrObject) {
|
|
2665
|
-
const obj = ClassHelpers.getClassFnFromObject(classFnOrObject) || {};
|
|
2666
|
-
return (classFnOrObject[Symbols.ctxInClassOrClassObj] ||
|
|
2667
|
-
obj[Symbols.ctxInClassOrClassObj]);
|
|
2668
|
-
}
|
|
2669
2920
|
get realtimeClient() {
|
|
2670
2921
|
return this.realtime.client;
|
|
2671
2922
|
}
|
|
@@ -2673,25 +2924,25 @@ class EndpointContext {
|
|
|
2673
2924
|
return this.realtime.server;
|
|
2674
2925
|
}
|
|
2675
2926
|
get logHttp() {
|
|
2676
|
-
if (_.isObject(this.config?.logs)) {
|
|
2927
|
+
if (_$1.isObject(this.config?.logs)) {
|
|
2677
2928
|
return !!this.config.logs.http;
|
|
2678
2929
|
}
|
|
2679
2930
|
return this.config?.logs === true;
|
|
2680
2931
|
}
|
|
2681
2932
|
get logRealtime() {
|
|
2682
|
-
if (_.isObject(this.config?.logs)) {
|
|
2933
|
+
if (_$1.isObject(this.config?.logs)) {
|
|
2683
2934
|
return !!this.config.logs.realtime;
|
|
2684
2935
|
}
|
|
2685
2936
|
return this.config?.logs === true;
|
|
2686
2937
|
}
|
|
2687
2938
|
get logFramework() {
|
|
2688
|
-
if (_.isObject(this.config?.logs)) {
|
|
2939
|
+
if (_$1.isObject(this.config?.logs)) {
|
|
2689
2940
|
return !!this.config.logs.framework;
|
|
2690
2941
|
}
|
|
2691
2942
|
return this.config?.logs === true;
|
|
2692
2943
|
}
|
|
2693
2944
|
get logDb() {
|
|
2694
|
-
if (_.isObject(this.config?.logs)) {
|
|
2945
|
+
if (_$1.isObject(this.config?.logs)) {
|
|
2695
2946
|
return !!this.config.logs.db;
|
|
2696
2947
|
}
|
|
2697
2948
|
return this.config?.logs === true;
|
|
@@ -2792,9 +3043,19 @@ class EndpointContext {
|
|
|
2792
3043
|
};
|
|
2793
3044
|
}
|
|
2794
3045
|
async init(options) {
|
|
2795
|
-
const { initFromRecrusiveContextResovle } = options || {}; // TODO use it ?
|
|
3046
|
+
const { initFromRecrusiveContextResovle, overrideHost, overrideRemoteHost } = options || {}; // TODO use it ?
|
|
2796
3047
|
this.inited = true;
|
|
2797
|
-
this.config = this.configFn(ENV$
|
|
3048
|
+
this.config = this.configFn(ENV$2);
|
|
3049
|
+
if (overrideHost && overrideRemoteHost) {
|
|
3050
|
+
if (Helpers.isWebSQL) {
|
|
3051
|
+
throw new Error(`You can't have overrideHost and overrideRemoteHost at the same time`);
|
|
3052
|
+
}
|
|
3053
|
+
Helpers.error(`You can't have overrideHost and overrideRemoteHost at the same time`, false, true);
|
|
3054
|
+
/* */
|
|
3055
|
+
/* */
|
|
3056
|
+
}
|
|
3057
|
+
this.config.host = overrideHost ? overrideHost : this.config.host;
|
|
3058
|
+
this.config.remoteHost = overrideRemoteHost ? overrideRemoteHost : this.config.remoteHost;
|
|
2798
3059
|
if (this.config.host) {
|
|
2799
3060
|
this.mode = 'backend-frontend(tcp+udp)';
|
|
2800
3061
|
/* */
|
|
@@ -2807,7 +3068,12 @@ class EndpointContext {
|
|
|
2807
3068
|
this.mode = 'remote-backend(tcp+udp)';
|
|
2808
3069
|
}
|
|
2809
3070
|
if (this.config.useIpcWhenElectron && Helpers.isElectron) {
|
|
2810
|
-
|
|
3071
|
+
if (Helpers.isWebSQL) {
|
|
3072
|
+
this.mode = 'backend-frontend(websql-electron)';
|
|
3073
|
+
}
|
|
3074
|
+
else {
|
|
3075
|
+
this.mode = 'backend-frontend(ipc-electron)';
|
|
3076
|
+
}
|
|
2811
3077
|
}
|
|
2812
3078
|
if (!this.mode && !this.config.abstract) {
|
|
2813
3079
|
Helpers.error(`[taon] Context "${this.contextName}": You need to provide host or remoteHost or useIpcWhenElectron`, false, true);
|
|
@@ -2817,11 +3083,11 @@ class EndpointContext {
|
|
|
2817
3083
|
if (this.config.database === true) {
|
|
2818
3084
|
this.databaseConfig = this.getAutoGeneratedConfig();
|
|
2819
3085
|
}
|
|
2820
|
-
else if (_.isObject(this.config.database)) {
|
|
2821
|
-
this.databaseConfig = _.cloneDeep(this.config.database);
|
|
3086
|
+
else if (_$1.isObject(this.config.database)) {
|
|
3087
|
+
this.databaseConfig = _$1.cloneDeep(this.config.database);
|
|
2822
3088
|
}
|
|
2823
3089
|
if (this.config.session) {
|
|
2824
|
-
this.session = _.cloneDeep(this.config.session);
|
|
3090
|
+
this.session = _$1.cloneDeep(this.config.session);
|
|
2825
3091
|
const oneHour = 1000 * 60 * 60 * 1; // 24;
|
|
2826
3092
|
if (!this.session.cookieMaxAge) {
|
|
2827
3093
|
this.session.cookieMaxAge = oneHour;
|
|
@@ -3015,6 +3281,7 @@ class EndpointContext {
|
|
|
3015
3281
|
/* */
|
|
3016
3282
|
/* */
|
|
3017
3283
|
/* */
|
|
3284
|
+
/* */
|
|
3018
3285
|
return (void 0);
|
|
3019
3286
|
}
|
|
3020
3287
|
get ngZone() {
|
|
@@ -3035,6 +3302,9 @@ class EndpointContext {
|
|
|
3035
3302
|
/* */
|
|
3036
3303
|
/* */
|
|
3037
3304
|
/* */
|
|
3305
|
+
/* */
|
|
3306
|
+
/* */
|
|
3307
|
+
/* */
|
|
3038
3308
|
return (void 0);
|
|
3039
3309
|
}
|
|
3040
3310
|
displayRoutes(app) {
|
|
@@ -3148,8 +3418,8 @@ class EndpointContext {
|
|
|
3148
3418
|
return this.inject(ctor, { localInstance: false });
|
|
3149
3419
|
}
|
|
3150
3420
|
checkIfContextInitialized() {
|
|
3151
|
-
if (_.isUndefined(this.config)) {
|
|
3152
|
-
throw new Error(`Please check if your context has been
|
|
3421
|
+
if (_$1.isUndefined(this.config)) {
|
|
3422
|
+
throw new Error(`Please check if your context has been initialized.
|
|
3153
3423
|
|
|
3154
3424
|
|
|
3155
3425
|
await Context.initialize();
|
|
@@ -3210,9 +3480,12 @@ class EndpointContext {
|
|
|
3210
3480
|
}
|
|
3211
3481
|
}
|
|
3212
3482
|
async reinitControllers() {
|
|
3483
|
+
if (this.remoteHost) {
|
|
3484
|
+
return;
|
|
3485
|
+
}
|
|
3213
3486
|
const controllers = this.getClassesInstancesArrBy(Models.ClassType.CONTROLLER);
|
|
3214
3487
|
for (const ctrl of controllers) {
|
|
3215
|
-
if (_.isFunction(ctrl.initExampleDbData)) {
|
|
3488
|
+
if (_$1.isFunction(ctrl.initExampleDbData)) {
|
|
3216
3489
|
await Helpers.runSyncOrAsync({
|
|
3217
3490
|
functionFn: ctrl.initExampleDbData,
|
|
3218
3491
|
context: ctrl,
|
|
@@ -3221,6 +3494,9 @@ class EndpointContext {
|
|
|
3221
3494
|
}
|
|
3222
3495
|
}
|
|
3223
3496
|
async initClasses() {
|
|
3497
|
+
if (this.remoteHost) {
|
|
3498
|
+
return;
|
|
3499
|
+
}
|
|
3224
3500
|
for (const classTypeName of [
|
|
3225
3501
|
Models.ClassType.PROVIDER,
|
|
3226
3502
|
Models.ClassType.REPOSITORY,
|
|
@@ -3228,7 +3504,7 @@ class EndpointContext {
|
|
|
3228
3504
|
Models.ClassType.ENTITY,
|
|
3229
3505
|
]) {
|
|
3230
3506
|
for (const classFun of this.getClassFunByArr(classTypeName)) {
|
|
3231
|
-
if (_.isFunction(classFun._)) {
|
|
3507
|
+
if (_$1.isFunction(classFun._)) {
|
|
3232
3508
|
await Helpers.runSyncOrAsync({
|
|
3233
3509
|
functionFn: classFun._,
|
|
3234
3510
|
context: classFun,
|
|
@@ -3242,7 +3518,7 @@ class EndpointContext {
|
|
|
3242
3518
|
Models.ClassType.CONTROLLER,
|
|
3243
3519
|
]) {
|
|
3244
3520
|
for (const ctrl of this.getClassesInstancesArrBy(classTypeName)) {
|
|
3245
|
-
if (_.isFunction(ctrl._)) {
|
|
3521
|
+
if (_$1.isFunction(ctrl._)) {
|
|
3246
3522
|
await Helpers.runSyncOrAsync({
|
|
3247
3523
|
functionFn: ctrl._,
|
|
3248
3524
|
context: ctrl,
|
|
@@ -3288,11 +3564,6 @@ class EndpointContext {
|
|
|
3288
3564
|
return this.uri?.origin;
|
|
3289
3565
|
}
|
|
3290
3566
|
async initSubscribers() {
|
|
3291
|
-
return; // TODO
|
|
3292
|
-
/* */
|
|
3293
|
-
/* */
|
|
3294
|
-
/* */
|
|
3295
|
-
/* */
|
|
3296
3567
|
/* */
|
|
3297
3568
|
/* */
|
|
3298
3569
|
/* */
|
|
@@ -3310,103 +3581,8 @@ class EndpointContext {
|
|
|
3310
3581
|
/* */
|
|
3311
3582
|
/* */
|
|
3312
3583
|
return (void 0);
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
/* */
|
|
3316
|
-
/* */
|
|
3317
|
-
/* */
|
|
3318
|
-
/* */
|
|
3319
|
-
/* */
|
|
3320
|
-
/* */
|
|
3321
|
-
/* */
|
|
3322
|
-
/* */
|
|
3323
|
-
/* */
|
|
3324
|
-
/* */
|
|
3325
|
-
/* */
|
|
3326
|
-
/* */
|
|
3327
|
-
/* */
|
|
3328
|
-
/* */
|
|
3329
|
-
/* */
|
|
3330
|
-
/* */
|
|
3331
|
-
/* */
|
|
3332
|
-
/* */
|
|
3333
|
-
/* */
|
|
3334
|
-
/* */
|
|
3335
|
-
/* */
|
|
3336
|
-
/* */
|
|
3337
|
-
/* */
|
|
3338
|
-
/* */
|
|
3339
|
-
/* */
|
|
3340
|
-
/* */
|
|
3341
|
-
/* */
|
|
3342
|
-
/* */
|
|
3343
|
-
/* */
|
|
3344
|
-
/* */
|
|
3345
|
-
/* */
|
|
3346
|
-
/* */
|
|
3347
|
-
/* */
|
|
3348
|
-
/* */
|
|
3349
|
-
/* */
|
|
3350
|
-
/* */
|
|
3351
|
-
/* */
|
|
3352
|
-
/* */
|
|
3353
|
-
/* */
|
|
3354
|
-
/* */
|
|
3355
|
-
/* */
|
|
3356
|
-
/* */
|
|
3357
|
-
/* */
|
|
3358
|
-
/* */
|
|
3359
|
-
/* */
|
|
3360
|
-
/* */
|
|
3361
|
-
/* */
|
|
3362
|
-
/* */
|
|
3363
|
-
/* */
|
|
3364
|
-
/* */
|
|
3365
|
-
/* */
|
|
3366
|
-
/* */
|
|
3367
|
-
/* */
|
|
3368
|
-
/* */
|
|
3369
|
-
/* */
|
|
3370
|
-
/* */
|
|
3371
|
-
/* */
|
|
3372
|
-
/* */
|
|
3373
|
-
/* */
|
|
3374
|
-
/* */
|
|
3375
|
-
/* */
|
|
3376
|
-
/* */
|
|
3377
|
-
/* */
|
|
3378
|
-
/* */
|
|
3379
|
-
/* */
|
|
3380
|
-
/* */
|
|
3381
|
-
/* */
|
|
3382
|
-
/* */
|
|
3383
|
-
/* */
|
|
3384
|
-
/* */
|
|
3385
|
-
/* */
|
|
3386
|
-
/* */
|
|
3387
|
-
/* */
|
|
3388
|
-
/* */
|
|
3389
|
-
/* */
|
|
3390
|
-
/* */
|
|
3391
|
-
/* */
|
|
3392
|
-
/* */
|
|
3393
|
-
/* */
|
|
3394
|
-
/* */
|
|
3395
|
-
/* */
|
|
3396
|
-
/* */
|
|
3397
|
-
/* */
|
|
3398
|
-
/* */
|
|
3399
|
-
/* */
|
|
3400
|
-
/* */
|
|
3401
|
-
/* */
|
|
3402
|
-
/* */
|
|
3403
|
-
/* */
|
|
3404
|
-
/* */
|
|
3405
|
-
/* */
|
|
3406
|
-
/* */
|
|
3407
|
-
/* */
|
|
3408
|
-
/* */
|
|
3409
|
-
/* */
|
|
3584
|
+
}
|
|
3585
|
+
async initEntities() {
|
|
3410
3586
|
/* */
|
|
3411
3587
|
/* */
|
|
3412
3588
|
/* */
|
|
@@ -3437,35 +3613,12 @@ class EndpointContext {
|
|
|
3437
3613
|
/* */
|
|
3438
3614
|
/* */
|
|
3439
3615
|
}
|
|
3440
|
-
async
|
|
3441
|
-
/* */
|
|
3442
|
-
/* */
|
|
3443
|
-
/* */
|
|
3444
|
-
/* */
|
|
3445
|
-
/* */
|
|
3446
|
-
/* */
|
|
3447
|
-
/* */
|
|
3448
|
-
/* */
|
|
3449
|
-
/* */
|
|
3450
|
-
/* */
|
|
3451
|
-
/* */
|
|
3452
|
-
/* */
|
|
3453
|
-
/* */
|
|
3454
|
-
/* */
|
|
3455
|
-
/* */
|
|
3456
|
-
/* */
|
|
3457
|
-
/* */
|
|
3458
|
-
/* */
|
|
3459
|
-
/* */
|
|
3460
|
-
/* */
|
|
3461
|
-
/* */
|
|
3616
|
+
async initDatabaseConnection() {
|
|
3462
3617
|
/* */
|
|
3463
3618
|
/* */
|
|
3464
3619
|
/* */
|
|
3465
3620
|
/* */
|
|
3466
3621
|
/* */
|
|
3467
|
-
}
|
|
3468
|
-
async initDatabaseConnection() {
|
|
3469
3622
|
/* */
|
|
3470
3623
|
/* */
|
|
3471
3624
|
/* */
|
|
@@ -3557,7 +3710,7 @@ class EndpointContext {
|
|
|
3557
3710
|
ClassHelpers.getMethodsNames(controllerClassFn);
|
|
3558
3711
|
const configs = ClassHelpers.getControllerConfigs(controllerClassFn);
|
|
3559
3712
|
const classConfig = configs[0];
|
|
3560
|
-
const parentscalculatedPath = _.slice(configs, 1)
|
|
3713
|
+
const parentscalculatedPath = _$1.slice(configs, 1)
|
|
3561
3714
|
.reverse()
|
|
3562
3715
|
.map(bc => {
|
|
3563
3716
|
if (TaonHelpers.isGoodPath(bc.path)) {
|
|
@@ -3575,13 +3728,13 @@ class EndpointContext {
|
|
|
3575
3728
|
.replace(/\/\//g, '/')
|
|
3576
3729
|
.split('/')
|
|
3577
3730
|
.reduce((acc, bc) => {
|
|
3578
|
-
return _.last(acc) === bc ? acc : [...acc, bc];
|
|
3731
|
+
return _$1.last(acc) === bc ? acc : [...acc, bc];
|
|
3579
3732
|
}, [])
|
|
3580
3733
|
.join('/');
|
|
3581
3734
|
}
|
|
3582
|
-
_.slice(configs, 1).forEach(bc => {
|
|
3735
|
+
_$1.slice(configs, 1).forEach(bc => {
|
|
3583
3736
|
const alreadyIs = classConfig.methods;
|
|
3584
|
-
const toMerge = _.cloneDeep(bc.methods);
|
|
3737
|
+
const toMerge = _$1.cloneDeep(bc.methods);
|
|
3585
3738
|
for (const key in toMerge) {
|
|
3586
3739
|
if (toMerge.hasOwnProperty(key) && !alreadyIs[key]) {
|
|
3587
3740
|
const element = toMerge[key];
|
|
@@ -3630,6 +3783,9 @@ class EndpointContext {
|
|
|
3630
3783
|
}
|
|
3631
3784
|
}
|
|
3632
3785
|
writeActiveRoutes() {
|
|
3786
|
+
if (this.remoteHost) {
|
|
3787
|
+
return;
|
|
3788
|
+
}
|
|
3633
3789
|
const contexts = [this];
|
|
3634
3790
|
/* */
|
|
3635
3791
|
/* */
|
|
@@ -3668,7 +3824,7 @@ class EndpointContext {
|
|
|
3668
3824
|
/* */
|
|
3669
3825
|
return (void 0);
|
|
3670
3826
|
}
|
|
3671
|
-
|
|
3827
|
+
initMiddlewares() {
|
|
3672
3828
|
/* */
|
|
3673
3829
|
/* */
|
|
3674
3830
|
/* */
|
|
@@ -4081,7 +4237,7 @@ class EndpointContext {
|
|
|
4081
4237
|
method: methodConfig.type,
|
|
4082
4238
|
url: `${ctx.uri.origin}${'' // TODO express path
|
|
4083
4239
|
}${methodConfig.path} `,
|
|
4084
|
-
}, Helpers.isBlob(body) || _.isString(body)
|
|
4240
|
+
}, Helpers.isBlob(body) || _$1.isString(body)
|
|
4085
4241
|
? body
|
|
4086
4242
|
: JSON.stringify(body), RestHeaders.from(headers), void 0, () => body);
|
|
4087
4243
|
resolve(res);
|
|
@@ -4307,7 +4463,7 @@ class EndpointContext {
|
|
|
4307
4463
|
if (mapping) {
|
|
4308
4464
|
rest.headers.set(Symbols.old.MAPPING_CONFIG_HEADER_QUERY_PARAMS, JSON.stringify(mapping));
|
|
4309
4465
|
}
|
|
4310
|
-
queryParams = _.cloneDeep(param);
|
|
4466
|
+
queryParams = _$1.cloneDeep(param);
|
|
4311
4467
|
}
|
|
4312
4468
|
}
|
|
4313
4469
|
if (currentParam.paramType === 'Header') {
|
|
@@ -4389,14 +4545,14 @@ const globalPublicStorage = Helpers.isBrowser ? window : global;
|
|
|
4389
4545
|
;
|
|
4390
4546
|
({}); // @--end-of-file-for-module=taon lib/storage.ts
|
|
4391
4547
|
|
|
4392
|
-
const ENV = Helpers.isBrowser ? window['ENV'] : global['ENV'];
|
|
4548
|
+
const ENV$1 = Helpers.isBrowser ? window['ENV'] : global['ENV'];
|
|
4393
4549
|
class TaonAdmin {
|
|
4394
4550
|
constructor() {
|
|
4395
4551
|
this.scrollableEnabled = false; // TOOD false by default
|
|
4396
4552
|
this.onEditMode = new Subject();
|
|
4397
4553
|
this.onEditMode$ = this.onEditMode.asObservable();
|
|
4398
4554
|
this.enabledTabs = [];
|
|
4399
|
-
this.scrollableEnabled = !!ENV?.useGlobalNgxScrollbar;
|
|
4555
|
+
this.scrollableEnabled = !!ENV$1?.useGlobalNgxScrollbar;
|
|
4400
4556
|
}
|
|
4401
4557
|
static get Instance() {
|
|
4402
4558
|
if (!globalPublicStorage[config.frameworkNames.productionFrameworkName]) {
|
|
@@ -4446,7 +4602,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
4446
4602
|
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin.service.ts
|
|
4447
4603
|
|
|
4448
4604
|
const createContext = (configFn) => {
|
|
4449
|
-
let config = configFn(ENV$
|
|
4605
|
+
let config = configFn(ENV$2);
|
|
4450
4606
|
const endpointContextRef = new EndpointContext(config, configFn);
|
|
4451
4607
|
const res = {
|
|
4452
4608
|
types: {
|
|
@@ -4470,6 +4626,7 @@ const createContext = (configFn) => {
|
|
|
4470
4626
|
return config.contextName;
|
|
4471
4627
|
},
|
|
4472
4628
|
/**
|
|
4629
|
+
* @deprecated
|
|
4473
4630
|
* - get reference to internal context
|
|
4474
4631
|
*/
|
|
4475
4632
|
async __ref() {
|
|
@@ -4480,6 +4637,10 @@ const createContext = (configFn) => {
|
|
|
4480
4637
|
}
|
|
4481
4638
|
return endpointContextRef;
|
|
4482
4639
|
},
|
|
4640
|
+
/**
|
|
4641
|
+
* only for internal use
|
|
4642
|
+
* @deprecated
|
|
4643
|
+
*/
|
|
4483
4644
|
get __refSync() {
|
|
4484
4645
|
return endpointContextRef;
|
|
4485
4646
|
},
|
|
@@ -4494,10 +4655,12 @@ const createContext = (configFn) => {
|
|
|
4494
4655
|
* - create controller instances for context
|
|
4495
4656
|
* - init database (if enable) + migation scripts
|
|
4496
4657
|
*/
|
|
4497
|
-
initialize: async () => {
|
|
4658
|
+
initialize: async (overrideOptions) => {
|
|
4498
4659
|
return await new Promise(async (resolve, reject) => {
|
|
4499
4660
|
setTimeout(async () => {
|
|
4500
|
-
await endpointContextRef.init(
|
|
4661
|
+
await endpointContextRef.init({
|
|
4662
|
+
...overrideOptions,
|
|
4663
|
+
});
|
|
4501
4664
|
if (config.abstract) {
|
|
4502
4665
|
throw new Error(`Abstract context can not be initialized`);
|
|
4503
4666
|
}
|
|
@@ -4522,6 +4685,20 @@ const createContext = (configFn) => {
|
|
|
4522
4685
|
});
|
|
4523
4686
|
});
|
|
4524
4687
|
},
|
|
4688
|
+
/**
|
|
4689
|
+
* realtime communication with server
|
|
4690
|
+
* Udp socket.io (or ipc) based.
|
|
4691
|
+
*/
|
|
4692
|
+
get realtime() {
|
|
4693
|
+
return {
|
|
4694
|
+
get client() {
|
|
4695
|
+
return endpointContextRef.realtimeClient;
|
|
4696
|
+
},
|
|
4697
|
+
get server() {
|
|
4698
|
+
return endpointContextRef.realtimeServer;
|
|
4699
|
+
}
|
|
4700
|
+
};
|
|
4701
|
+
},
|
|
4525
4702
|
};
|
|
4526
4703
|
return res;
|
|
4527
4704
|
};
|
|
@@ -4544,172 +4721,151 @@ var baseContext = /*#__PURE__*/Object.freeze({
|
|
|
4544
4721
|
BaseContext: BaseContext
|
|
4545
4722
|
});
|
|
4546
4723
|
|
|
4547
|
-
class TaonSubscriberOptions extends Models.DecoratorAbstractOpt {
|
|
4548
|
-
}
|
|
4549
4724
|
function TaonSubscriber(options) {
|
|
4550
4725
|
return function (constructor) {
|
|
4551
4726
|
Reflect.defineMetadata(Symbols.metadata.options.repository, options, constructor);
|
|
4552
4727
|
Reflect.defineMetadata(Symbols.metadata.className, options?.className || constructor.name, constructor);
|
|
4553
4728
|
ClassHelpers.setName(constructor, options?.className);
|
|
4554
|
-
return class extends constructor {
|
|
4555
|
-
constructor(...args) {
|
|
4556
|
-
super(...args);
|
|
4557
|
-
const methodNamesAll = ClassHelpers.getMethodsNames(constructor.prototype);
|
|
4558
|
-
const methodNames = methodNamesAll.filter(m => {
|
|
4559
|
-
return (!['__trigger_event__', 'clone'].includes(m) &&
|
|
4560
|
-
!m.startsWith('_') &&
|
|
4561
|
-
!m.startsWith('inject'));
|
|
4562
|
-
});
|
|
4563
|
-
methodNames.forEach(methodName => {
|
|
4564
|
-
const originalMethod = this[methodName];
|
|
4565
|
-
this[methodName] = async (...methodArgs) => {
|
|
4566
|
-
const result = originalMethod.apply(this, methodArgs);
|
|
4567
|
-
if (result instanceof Promise) {
|
|
4568
|
-
await result;
|
|
4569
|
-
}
|
|
4570
|
-
if (options.allowedEvents === undefined ||
|
|
4571
|
-
options.allowedEvents.includes(methodName)) {
|
|
4572
|
-
// @ts-ignore
|
|
4573
|
-
this.__trigger_event__(methodName);
|
|
4574
|
-
}
|
|
4575
|
-
return result;
|
|
4576
|
-
};
|
|
4577
|
-
});
|
|
4578
|
-
}
|
|
4579
|
-
};
|
|
4580
4729
|
};
|
|
4581
4730
|
}
|
|
4731
|
+
class TaonSubscriberOptions extends Models.DecoratorAbstractOpt {
|
|
4732
|
+
}
|
|
4582
4733
|
;
|
|
4583
4734
|
({}); // @--end-of-file-for-module=taon lib/decorators/classes/subscriber-decorator.ts
|
|
4584
4735
|
|
|
4585
|
-
let BaseSubscriber = class BaseSubscriber extends BaseInjector {
|
|
4586
|
-
__trigger_event__(eventName) {
|
|
4587
|
-
const ctx = this.__endpoint_context__;
|
|
4588
|
-
console.log('Trigger event', eventName, ctx);
|
|
4589
|
-
}
|
|
4590
|
-
};
|
|
4591
|
-
BaseSubscriber = __decorate([
|
|
4592
|
-
TaonSubscriber({
|
|
4593
|
-
className: 'BaseSubscriber',
|
|
4594
|
-
})
|
|
4595
|
-
], BaseSubscriber);
|
|
4596
|
-
;
|
|
4597
|
-
({}); // @--end-of-file-for-module=taon lib/base-classes/base-subscriber.ts
|
|
4598
|
-
|
|
4599
4736
|
let BaseSubscriberForEntity = class BaseSubscriberForEntity extends BaseInjector {
|
|
4600
4737
|
/**
|
|
4601
4738
|
* Called after entity is loaded.
|
|
4602
4739
|
*/
|
|
4603
4740
|
afterLoad(entity) {
|
|
4604
|
-
|
|
4741
|
+
this.__endpoint_context__.logDb &&
|
|
4742
|
+
console.log(`AFTER ENTITY LOADED: `, entity);
|
|
4605
4743
|
}
|
|
4606
4744
|
/**
|
|
4607
4745
|
* Called before query execution.
|
|
4608
4746
|
*/
|
|
4609
4747
|
beforeQuery(event) {
|
|
4610
|
-
|
|
4748
|
+
this.__endpoint_context__.logDb &&
|
|
4749
|
+
console.log(`BEFORE QUERY: `, event.query);
|
|
4611
4750
|
}
|
|
4612
4751
|
/**
|
|
4613
4752
|
* Called after query execution.
|
|
4614
4753
|
*/
|
|
4615
4754
|
afterQuery(event) {
|
|
4616
|
-
|
|
4755
|
+
this.__endpoint_context__.logDb &&
|
|
4756
|
+
console.log(`AFTER QUERY: `, event.query);
|
|
4617
4757
|
}
|
|
4618
4758
|
/**
|
|
4619
4759
|
* Called before entity insertion.
|
|
4620
4760
|
*/
|
|
4621
4761
|
beforeInsert(event) {
|
|
4622
|
-
|
|
4762
|
+
this.__endpoint_context__.logDb &&
|
|
4763
|
+
console.log(`BEFORE ENTITY INSERTED: `, event.entity);
|
|
4623
4764
|
}
|
|
4624
4765
|
/**
|
|
4625
4766
|
* Called after entity insertion.
|
|
4626
4767
|
*/
|
|
4627
4768
|
afterInsert(event) {
|
|
4628
|
-
|
|
4769
|
+
this.__endpoint_context__.logDb &&
|
|
4770
|
+
console.log(`AFTER ENTITY INSERTED: `, event.entity);
|
|
4629
4771
|
}
|
|
4630
4772
|
/**
|
|
4631
4773
|
* Called before entity update.
|
|
4632
4774
|
*/
|
|
4633
4775
|
beforeUpdate(event) {
|
|
4634
|
-
|
|
4776
|
+
this.__endpoint_context__.logDb &&
|
|
4777
|
+
console.log(`BEFORE ENTITY UPDATED: `, event.entity);
|
|
4635
4778
|
}
|
|
4636
4779
|
/**
|
|
4637
4780
|
* Called after entity update.
|
|
4638
4781
|
*/
|
|
4639
4782
|
afterUpdate(event) {
|
|
4640
|
-
|
|
4783
|
+
this.__endpoint_context__.logDb &&
|
|
4784
|
+
console.log(`AFTER ENTITY UPDATED: `, event.entity);
|
|
4641
4785
|
}
|
|
4642
4786
|
/**
|
|
4643
4787
|
* Called before entity removal.
|
|
4644
4788
|
*/
|
|
4645
4789
|
beforeRemove(event) {
|
|
4646
|
-
|
|
4790
|
+
this.__endpoint_context__.logDb &&
|
|
4791
|
+
console.log(`BEFORE ENTITY WITH ID ${event.entityId} REMOVED: `, event.entity);
|
|
4647
4792
|
}
|
|
4648
4793
|
/**
|
|
4649
4794
|
* Called after entity removal.
|
|
4650
4795
|
*/
|
|
4651
4796
|
afterRemove(event) {
|
|
4652
|
-
|
|
4797
|
+
this.__endpoint_context__.logDb &&
|
|
4798
|
+
console.log(`AFTER ENTITY WITH ID ${event.entityId} REMOVED: `, event.entity);
|
|
4653
4799
|
}
|
|
4654
4800
|
/**
|
|
4655
4801
|
* Called before entity removal.
|
|
4656
4802
|
*/
|
|
4657
4803
|
beforeSoftRemove(event) {
|
|
4658
|
-
|
|
4804
|
+
this.__endpoint_context__.logDb &&
|
|
4805
|
+
console.log(`BEFORE ENTITY WITH ID ${event.entityId} SOFT REMOVED: `, event.entity);
|
|
4659
4806
|
}
|
|
4660
4807
|
/**
|
|
4661
4808
|
* Called after entity removal.
|
|
4662
4809
|
*/
|
|
4663
4810
|
afterSoftRemove(event) {
|
|
4664
|
-
|
|
4811
|
+
this.__endpoint_context__.logDb &&
|
|
4812
|
+
console.log(`AFTER ENTITY WITH ID ${event.entityId} SOFT REMOVED: `, event.entity);
|
|
4665
4813
|
}
|
|
4666
4814
|
/**
|
|
4667
4815
|
* Called before entity recovery.
|
|
4668
4816
|
*/
|
|
4669
4817
|
beforeRecover(event) {
|
|
4670
|
-
|
|
4818
|
+
this.__endpoint_context__.logDb &&
|
|
4819
|
+
console.log(`BEFORE ENTITY WITH ID ${event.entityId} RECOVERED: `, event.entity);
|
|
4671
4820
|
}
|
|
4672
4821
|
/**
|
|
4673
4822
|
* Called after entity recovery.
|
|
4674
4823
|
*/
|
|
4675
4824
|
afterRecover(event) {
|
|
4676
|
-
|
|
4825
|
+
this.__endpoint_context__.logDb &&
|
|
4826
|
+
console.log(`AFTER ENTITY WITH ID ${event.entityId} RECOVERED: `, event.entity);
|
|
4677
4827
|
}
|
|
4678
4828
|
/**
|
|
4679
4829
|
* Called before transaction start.
|
|
4680
4830
|
*/
|
|
4681
4831
|
beforeTransactionStart(event) {
|
|
4682
|
-
|
|
4832
|
+
this.__endpoint_context__.logDb &&
|
|
4833
|
+
console.log(`BEFORE TRANSACTION STARTED: `, event);
|
|
4683
4834
|
}
|
|
4684
4835
|
/**
|
|
4685
4836
|
* Called after transaction start.
|
|
4686
4837
|
*/
|
|
4687
4838
|
afterTransactionStart(event) {
|
|
4688
|
-
|
|
4839
|
+
this.__endpoint_context__.logDb &&
|
|
4840
|
+
console.log(`AFTER TRANSACTION STARTED: `, event);
|
|
4689
4841
|
}
|
|
4690
4842
|
/**
|
|
4691
4843
|
* Called before transaction commit.
|
|
4692
4844
|
*/
|
|
4693
4845
|
beforeTransactionCommit(event) {
|
|
4694
|
-
|
|
4846
|
+
this.__endpoint_context__.logDb &&
|
|
4847
|
+
console.log(`BEFORE TRANSACTION COMMITTED: `, event);
|
|
4695
4848
|
}
|
|
4696
4849
|
/**
|
|
4697
4850
|
* Called after transaction commit.
|
|
4698
4851
|
*/
|
|
4699
4852
|
afterTransactionCommit(event) {
|
|
4700
|
-
|
|
4853
|
+
this.__endpoint_context__.logDb &&
|
|
4854
|
+
console.log(`AFTER TRANSACTION COMMITTED: `, event);
|
|
4701
4855
|
}
|
|
4702
4856
|
/**
|
|
4703
4857
|
* Called before transaction rollback.
|
|
4704
4858
|
*/
|
|
4705
4859
|
beforeTransactionRollback(event) {
|
|
4706
|
-
|
|
4860
|
+
this.__endpoint_context__.logDb &&
|
|
4861
|
+
console.log(`BEFORE TRANSACTION ROLLBACK: `, event);
|
|
4707
4862
|
}
|
|
4708
4863
|
/**
|
|
4709
4864
|
* Called after transaction rollback.
|
|
4710
4865
|
*/
|
|
4711
4866
|
afterTransactionRollback(event) {
|
|
4712
|
-
|
|
4867
|
+
this.__endpoint_context__.logDb &&
|
|
4868
|
+
console.log(`AFTER TRANSACTION ROLLBACK: `, event);
|
|
4713
4869
|
}
|
|
4714
4870
|
};
|
|
4715
4871
|
BaseSubscriberForEntity = __decorate([
|
|
@@ -4729,7 +4885,6 @@ var Base;
|
|
|
4729
4885
|
Base.Provider = BaseProvider;
|
|
4730
4886
|
Base.Class = BaseClass;
|
|
4731
4887
|
Base.Repository = BaseRepository;
|
|
4732
|
-
Base.Subscriber = BaseSubscriber;
|
|
4733
4888
|
Base.SubscriberForEntity = BaseSubscriberForEntity;
|
|
4734
4889
|
Base.Context = BaseContext;
|
|
4735
4890
|
})(Base || (Base = {}));
|
|
@@ -4743,7 +4898,7 @@ function TaonEntity(options) {
|
|
|
4743
4898
|
options = options || {};
|
|
4744
4899
|
options.uniqueKeyProp = options.uniqueKeyProp || 'id';
|
|
4745
4900
|
ClassHelpers.setName(constructor, options?.className);
|
|
4746
|
-
Mapping.DefaultModelWithMapping(options?.defaultModelValues || {}, _.merge(options?.defaultModelMapping || {}, (options?.defaultModelMappingDeep || {})))(constructor);
|
|
4901
|
+
Mapping.DefaultModelWithMapping(options?.defaultModelValues || {}, _$1.merge(options?.defaultModelMapping || {}, (options?.defaultModelMappingDeep || {})))(constructor);
|
|
4747
4902
|
Mapping.DefaultModelWithMapping(void 0, {})(constructor);
|
|
4748
4903
|
Reflect.defineMetadata(Symbols.metadata.options.entity, options, constructor);
|
|
4749
4904
|
Reflect.defineMetadata(Symbols.metadata.className, options?.className || constructor.name, constructor);
|
|
@@ -4797,73 +4952,1286 @@ const inject = (entity) => {
|
|
|
4797
4952
|
},
|
|
4798
4953
|
});
|
|
4799
4954
|
};
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
const proxiedObservable = new Proxy(obs, {
|
|
4806
|
-
get(target, prop, receiver) {
|
|
4807
|
-
if (prop === 'subscribe') {
|
|
4808
|
-
return (...args) => {
|
|
4809
|
-
if (isFirstSubscription) {
|
|
4810
|
-
isFirstSubscription = false;
|
|
4811
|
-
const subscriberClassFN = subscriberClassResolveFn();
|
|
4812
|
-
const ctx = subscriberClassFN[Symbols.ctxInClassOrClassObj];
|
|
4813
|
-
if (!ctx) {
|
|
4814
|
-
throw new Error(`You are trying to inject class without context. Use context like this;
|
|
4815
|
-
|
|
4816
|
-
Taon.injectSubscriberEvents( ()=> ` +
|
|
4817
|
-
`MyContext.getInstance(${subscriberClassFN?.name}), '${eventName}' )
|
|
4818
|
-
|
|
4955
|
+
/**
|
|
4956
|
+
* TODO
|
|
4957
|
+
*/
|
|
4958
|
+
;
|
|
4959
|
+
({}); // @--end-of-file-for-module=taon lib/inject.ts
|
|
4819
4960
|
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4961
|
+
const log$1 = Log.create(`[taon-helpers] long-press`, Level.__NOTHING);
|
|
4962
|
+
class TaonLongPress {
|
|
4963
|
+
constructor() {
|
|
4964
|
+
this.pressDuration = 1000;
|
|
4965
|
+
this.onLongPress = new EventEmitter();
|
|
4966
|
+
this.onLongPressing = new EventEmitter();
|
|
4967
|
+
this.onLongPressEnd = new EventEmitter();
|
|
4968
|
+
this.mouseX = 0;
|
|
4969
|
+
this.mouseY = 0;
|
|
4970
|
+
this.allowTrigger = false;
|
|
4971
|
+
this.triggerEnd = _$1.debounce(() => {
|
|
4972
|
+
this.endPress();
|
|
4973
|
+
}, 500);
|
|
4974
|
+
}
|
|
4975
|
+
get press() {
|
|
4976
|
+
return this.pressing;
|
|
4977
|
+
}
|
|
4978
|
+
get longPress() {
|
|
4979
|
+
return this.longPressing;
|
|
4980
|
+
}
|
|
4981
|
+
onMouseDown(event) {
|
|
4982
|
+
log$1.d(`MOUSE DOWN `);
|
|
4983
|
+
if (event.which !== 1)
|
|
4984
|
+
return;
|
|
4985
|
+
this.allowTrigger = true;
|
|
4986
|
+
this.mouseX = event.clientX;
|
|
4987
|
+
this.mouseY = event.clientY;
|
|
4988
|
+
this.pressing = true;
|
|
4989
|
+
this.longPressing = false;
|
|
4990
|
+
this.timeout = setTimeout(() => {
|
|
4991
|
+
if (this.allowTrigger) {
|
|
4992
|
+
this.longPressing = true;
|
|
4993
|
+
log$1.d(`long pressing start pressDuration:${this.pressDuration} `);
|
|
4994
|
+
this.onLongPress.emit(event);
|
|
4995
|
+
this.loop(event);
|
|
4830
4996
|
}
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
}
|
|
4834
|
-
|
|
4835
|
-
|
|
4997
|
+
}, this.pressDuration);
|
|
4998
|
+
this.loop(event);
|
|
4999
|
+
}
|
|
5000
|
+
onMouseMove(event) {
|
|
5001
|
+
if (this.pressing && !this.longPressing) {
|
|
5002
|
+
const xThres = event.clientX - this.mouseX > 10;
|
|
5003
|
+
const yThres = event.clientY - this.mouseY > 10;
|
|
5004
|
+
if (xThres || yThres) {
|
|
5005
|
+
this.endPress();
|
|
5006
|
+
}
|
|
5007
|
+
}
|
|
5008
|
+
}
|
|
5009
|
+
loop(event) {
|
|
5010
|
+
if (this.longPressing) {
|
|
5011
|
+
this.timeout = setTimeout(() => {
|
|
5012
|
+
log$1.d(`emil longpressing`);
|
|
5013
|
+
this.triggerEnd();
|
|
5014
|
+
this.onLongPressing.emit(event);
|
|
5015
|
+
this.loop(event);
|
|
5016
|
+
}, 50);
|
|
5017
|
+
}
|
|
5018
|
+
}
|
|
5019
|
+
endPress(emit = true) {
|
|
5020
|
+
this.allowTrigger = false;
|
|
5021
|
+
clearTimeout(this.timeout);
|
|
5022
|
+
this.longPressing = false;
|
|
5023
|
+
this.pressing = false;
|
|
5024
|
+
if (emit) {
|
|
5025
|
+
log$1.d(`EMIT END`);
|
|
5026
|
+
this.onLongPressEnd.emit(true);
|
|
5027
|
+
}
|
|
5028
|
+
else {
|
|
5029
|
+
log$1.d(`NOT EMIT END`);
|
|
5030
|
+
}
|
|
5031
|
+
}
|
|
5032
|
+
onMouseUp() {
|
|
5033
|
+
this.endPress(false);
|
|
5034
|
+
}
|
|
5035
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonLongPress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5036
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.5", type: TaonLongPress, isStandalone: true, selector: "[taonLongPress]", inputs: { pressDuration: "pressDuration" }, outputs: { onLongPress: "onLongPress", onLongPressing: "onLongPressing", onLongPressEnd: "onLongPressEnd" }, host: { listeners: { "mousedown": "onMouseDown($event)", "mousemove": "onMouseMove($event)", "mouseup": "onMouseUp()" }, properties: { "class.press": "this.press", "class.longpress": "this.longPress" } }, ngImport: i0 }); }
|
|
5037
|
+
}
|
|
5038
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonLongPress, decorators: [{
|
|
5039
|
+
type: Directive,
|
|
5040
|
+
args: [{
|
|
5041
|
+
selector: '[taonLongPress]',
|
|
5042
|
+
standalone: true,
|
|
5043
|
+
}]
|
|
5044
|
+
}], propDecorators: { pressDuration: [{
|
|
5045
|
+
type: Input
|
|
5046
|
+
}], onLongPress: [{
|
|
5047
|
+
type: Output
|
|
5048
|
+
}], onLongPressing: [{
|
|
5049
|
+
type: Output
|
|
5050
|
+
}], onLongPressEnd: [{
|
|
5051
|
+
type: Output
|
|
5052
|
+
}], press: [{
|
|
5053
|
+
type: HostBinding,
|
|
5054
|
+
args: ['class.press']
|
|
5055
|
+
}], longPress: [{
|
|
5056
|
+
type: HostBinding,
|
|
5057
|
+
args: ['class.longpress']
|
|
5058
|
+
}], onMouseDown: [{
|
|
5059
|
+
type: HostListener,
|
|
5060
|
+
args: ['mousedown', ['$event']]
|
|
5061
|
+
}], onMouseMove: [{
|
|
5062
|
+
type: HostListener,
|
|
5063
|
+
args: ['mousemove', ['$event']]
|
|
5064
|
+
}], onMouseUp: [{
|
|
5065
|
+
type: HostListener,
|
|
5066
|
+
args: ['mouseup']
|
|
5067
|
+
}] } });
|
|
4836
5068
|
;
|
|
4837
|
-
({}); // @--end-of-file-for-module=taon lib/
|
|
5069
|
+
({}); // @--end-of-file-for-module=taon lib/ui/directives/taon-long-press.directive.ts
|
|
4838
5070
|
|
|
5071
|
+
class TaonInjectHTMLDirective {
|
|
5072
|
+
set taonInjectHTML(content) {
|
|
5073
|
+
this.host.nativeElement.innerHTML = content;
|
|
5074
|
+
}
|
|
5075
|
+
constructor(host) {
|
|
5076
|
+
this.host = host;
|
|
5077
|
+
}
|
|
5078
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonInjectHTMLDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5079
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.5", type: TaonInjectHTMLDirective, isStandalone: true, selector: "[taonInjectHTML]", inputs: { taonInjectHTML: "taonInjectHTML" }, ngImport: i0 }); }
|
|
5080
|
+
}
|
|
5081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonInjectHTMLDirective, decorators: [{
|
|
5082
|
+
type: Directive,
|
|
5083
|
+
args: [{
|
|
5084
|
+
selector: '[taonInjectHTML]',
|
|
5085
|
+
standalone: true,
|
|
5086
|
+
}]
|
|
5087
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { taonInjectHTML: [{
|
|
5088
|
+
type: Input
|
|
5089
|
+
}] } });
|
|
4839
5090
|
;
|
|
4840
|
-
({}); // @--end-of-file-for-module=taon lib/
|
|
5091
|
+
({}); // @--end-of-file-for-module=taon lib/ui/directives/taon-inject-html.directive.ts
|
|
4841
5092
|
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
5093
|
+
/* */
|
|
5094
|
+
/* */
|
|
5095
|
+
/* */
|
|
5096
|
+
/* */
|
|
5097
|
+
/* */
|
|
5098
|
+
/* */
|
|
5099
|
+
class SafePipe {
|
|
5100
|
+
constructor(sanitizer) {
|
|
5101
|
+
this.sanitizer = sanitizer;
|
|
5102
|
+
}
|
|
5103
|
+
transform(value, type) {
|
|
5104
|
+
switch (type) {
|
|
5105
|
+
case 'html':
|
|
5106
|
+
return this.sanitizer.bypassSecurityTrustHtml(value);
|
|
5107
|
+
case 'style':
|
|
5108
|
+
return this.sanitizer.bypassSecurityTrustStyle(value);
|
|
5109
|
+
case 'script':
|
|
5110
|
+
return this.sanitizer.bypassSecurityTrustScript(value);
|
|
5111
|
+
case 'url':
|
|
5112
|
+
return this.sanitizer.bypassSecurityTrustUrl(value);
|
|
5113
|
+
case 'resourceUrl':
|
|
5114
|
+
return this.sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
5115
|
+
default:
|
|
5116
|
+
throw new Error(`Invalid safe type specified: ${type}`);
|
|
5117
|
+
}
|
|
5118
|
+
}
|
|
5119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5120
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: SafePipe, isStandalone: true, name: "safe" }); }
|
|
5121
|
+
}
|
|
5122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SafePipe, decorators: [{
|
|
5123
|
+
type: Pipe,
|
|
5124
|
+
args: [{
|
|
5125
|
+
name: 'safe',
|
|
5126
|
+
standalone: true,
|
|
5127
|
+
}]
|
|
5128
|
+
}], ctorParameters: () => [{ type: i1.DomSanitizer }] });
|
|
5129
|
+
;
|
|
5130
|
+
({}); // @--end-of-file-for-module=taon lib/ui/directives/safe.pipe.ts
|
|
5131
|
+
|
|
5132
|
+
;
|
|
5133
|
+
({}); // @--end-of-file-for-module=taon lib/ui/directives/index.ts
|
|
5134
|
+
|
|
5135
|
+
class TaonFullMaterialModule {
|
|
5136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFullMaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5137
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonFullMaterialModule, exports: [A11yModule,
|
|
5138
|
+
CdkStepperModule,
|
|
5139
|
+
CdkTableModule,
|
|
5140
|
+
CdkTreeModule,
|
|
5141
|
+
DragDropModule,
|
|
5142
|
+
MatAutocompleteModule,
|
|
5143
|
+
MatBadgeModule,
|
|
5144
|
+
MatBottomSheetModule,
|
|
5145
|
+
MatButtonModule,
|
|
5146
|
+
MatButtonToggleModule,
|
|
5147
|
+
MatCardModule,
|
|
5148
|
+
MatCheckboxModule,
|
|
5149
|
+
MatChipsModule,
|
|
5150
|
+
MatStepperModule,
|
|
5151
|
+
MatDatepickerModule,
|
|
5152
|
+
MatDialogModule,
|
|
5153
|
+
MatDividerModule,
|
|
5154
|
+
MatExpansionModule,
|
|
5155
|
+
MatGridListModule,
|
|
5156
|
+
MatIconModule,
|
|
5157
|
+
MatInputModule,
|
|
5158
|
+
MatListModule,
|
|
5159
|
+
MatMenuModule,
|
|
5160
|
+
MatNativeDateModule,
|
|
5161
|
+
MatPaginatorModule,
|
|
5162
|
+
MatProgressBarModule,
|
|
5163
|
+
MatProgressSpinnerModule,
|
|
5164
|
+
MatRadioModule,
|
|
5165
|
+
MatRippleModule,
|
|
5166
|
+
MatSelectModule,
|
|
5167
|
+
MatSidenavModule,
|
|
5168
|
+
MatSliderModule,
|
|
5169
|
+
MatSlideToggleModule,
|
|
5170
|
+
MatSnackBarModule,
|
|
5171
|
+
MatSortModule,
|
|
5172
|
+
MatTableModule,
|
|
5173
|
+
MatTabsModule,
|
|
5174
|
+
MatToolbarModule,
|
|
5175
|
+
MatTooltipModule,
|
|
5176
|
+
MatTreeModule,
|
|
5177
|
+
ScrollingModule] }); }
|
|
5178
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFullMaterialModule, imports: [A11yModule,
|
|
5179
|
+
CdkStepperModule,
|
|
5180
|
+
CdkTableModule,
|
|
5181
|
+
CdkTreeModule,
|
|
5182
|
+
DragDropModule,
|
|
5183
|
+
MatAutocompleteModule,
|
|
5184
|
+
MatBadgeModule,
|
|
5185
|
+
MatBottomSheetModule,
|
|
5186
|
+
MatButtonModule,
|
|
5187
|
+
MatButtonToggleModule,
|
|
5188
|
+
MatCardModule,
|
|
5189
|
+
MatCheckboxModule,
|
|
5190
|
+
MatChipsModule,
|
|
5191
|
+
MatStepperModule,
|
|
5192
|
+
MatDatepickerModule,
|
|
5193
|
+
MatDialogModule,
|
|
5194
|
+
MatDividerModule,
|
|
5195
|
+
MatExpansionModule,
|
|
5196
|
+
MatGridListModule,
|
|
5197
|
+
MatIconModule,
|
|
5198
|
+
MatInputModule,
|
|
5199
|
+
MatListModule,
|
|
5200
|
+
MatMenuModule,
|
|
5201
|
+
MatNativeDateModule,
|
|
5202
|
+
MatPaginatorModule,
|
|
5203
|
+
MatProgressBarModule,
|
|
5204
|
+
MatProgressSpinnerModule,
|
|
5205
|
+
MatRadioModule,
|
|
5206
|
+
MatRippleModule,
|
|
5207
|
+
MatSelectModule,
|
|
5208
|
+
MatSidenavModule,
|
|
5209
|
+
MatSliderModule,
|
|
5210
|
+
MatSlideToggleModule,
|
|
5211
|
+
MatSnackBarModule,
|
|
5212
|
+
MatSortModule,
|
|
5213
|
+
MatTableModule,
|
|
5214
|
+
MatTabsModule,
|
|
5215
|
+
MatToolbarModule,
|
|
5216
|
+
MatTooltipModule,
|
|
5217
|
+
MatTreeModule,
|
|
5218
|
+
ScrollingModule] }); }
|
|
5219
|
+
}
|
|
5220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFullMaterialModule, decorators: [{
|
|
5221
|
+
type: NgModule,
|
|
5222
|
+
args: [{
|
|
5223
|
+
exports: [
|
|
5224
|
+
A11yModule,
|
|
5225
|
+
CdkStepperModule,
|
|
5226
|
+
CdkTableModule,
|
|
5227
|
+
CdkTreeModule,
|
|
5228
|
+
DragDropModule,
|
|
5229
|
+
MatAutocompleteModule,
|
|
5230
|
+
MatBadgeModule,
|
|
5231
|
+
MatBottomSheetModule,
|
|
5232
|
+
MatButtonModule,
|
|
5233
|
+
MatButtonToggleModule,
|
|
5234
|
+
MatCardModule,
|
|
5235
|
+
MatCheckboxModule,
|
|
5236
|
+
MatChipsModule,
|
|
5237
|
+
MatStepperModule,
|
|
5238
|
+
MatDatepickerModule,
|
|
5239
|
+
MatDialogModule,
|
|
5240
|
+
MatDividerModule,
|
|
5241
|
+
MatExpansionModule,
|
|
5242
|
+
MatGridListModule,
|
|
5243
|
+
MatIconModule,
|
|
5244
|
+
MatInputModule,
|
|
5245
|
+
MatListModule,
|
|
5246
|
+
MatMenuModule,
|
|
5247
|
+
MatNativeDateModule,
|
|
5248
|
+
MatPaginatorModule,
|
|
5249
|
+
MatProgressBarModule,
|
|
5250
|
+
MatProgressSpinnerModule,
|
|
5251
|
+
MatRadioModule,
|
|
5252
|
+
MatRippleModule,
|
|
5253
|
+
MatSelectModule,
|
|
5254
|
+
MatSidenavModule,
|
|
5255
|
+
MatSliderModule,
|
|
5256
|
+
MatSlideToggleModule,
|
|
5257
|
+
MatSnackBarModule,
|
|
5258
|
+
MatSortModule,
|
|
5259
|
+
MatTableModule,
|
|
5260
|
+
MatTabsModule,
|
|
5261
|
+
MatToolbarModule,
|
|
5262
|
+
MatTooltipModule,
|
|
5263
|
+
MatTreeModule,
|
|
5264
|
+
ScrollingModule,
|
|
5265
|
+
],
|
|
5266
|
+
}]
|
|
5267
|
+
}] });
|
|
5268
|
+
;
|
|
5269
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-full-material.module.ts
|
|
5270
|
+
|
|
5271
|
+
class TaonGithubForkMeCornerComponent {
|
|
5272
|
+
constructor() {
|
|
5273
|
+
this.url = 'https://github.com';
|
|
5274
|
+
}
|
|
5275
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonGithubForkMeCornerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5276
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonGithubForkMeCornerComponent, selector: "taon-github-fork-me-corner", inputs: { url: "url" }, ngImport: i0, template: "<a href=\"{{ url }}\" class=\"github-corner\" aria-label=\"View source on GitHub\"\n ><svg\n width=\"80\"\n height=\"80\"\n viewBox=\"0 0 250 250\"\n style=\"\n fill: #151513;\n color: #fff;\n position: absolute;\n top: 0;\n border: 0;\n right: 0;\n \"\n aria-hidden=\"true\">\n <path d=\"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z\"></path>\n <path\n d=\"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2\"\n fill=\"currentColor\"\n style=\"transform-origin: 130px 106px\"\n class=\"octo-arm\"></path>\n <path\n d=\"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z\"\n fill=\"currentColor\"\n class=\"octo-body\"></path>\n </svg>\n</a>\n", styles: ["a{opacity:.7}a:hover{opacity:1}.github-corner:hover .octo-arm{opacity:1;animation:octocat-wave .56s ease-in-out}@keyframes octocat-wave{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width: 500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave .56s ease-in-out}}\n"] }); }
|
|
5277
|
+
}
|
|
5278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonGithubForkMeCornerComponent, decorators: [{
|
|
5279
|
+
type: Component,
|
|
5280
|
+
args: [{ selector: 'taon-github-fork-me-corner', template: "<a href=\"{{ url }}\" class=\"github-corner\" aria-label=\"View source on GitHub\"\n ><svg\n width=\"80\"\n height=\"80\"\n viewBox=\"0 0 250 250\"\n style=\"\n fill: #151513;\n color: #fff;\n position: absolute;\n top: 0;\n border: 0;\n right: 0;\n \"\n aria-hidden=\"true\">\n <path d=\"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z\"></path>\n <path\n d=\"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2\"\n fill=\"currentColor\"\n style=\"transform-origin: 130px 106px\"\n class=\"octo-arm\"></path>\n <path\n d=\"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z\"\n fill=\"currentColor\"\n class=\"octo-body\"></path>\n </svg>\n</a>\n", styles: ["a{opacity:.7}a:hover{opacity:1}.github-corner:hover .octo-arm{opacity:1;animation:octocat-wave .56s ease-in-out}@keyframes octocat-wave{0%,to{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width: 500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave .56s ease-in-out}}\n"] }]
|
|
5281
|
+
}], propDecorators: { url: [{
|
|
5282
|
+
type: Input
|
|
5283
|
+
}] } });
|
|
5284
|
+
;
|
|
5285
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.component.ts
|
|
5286
|
+
|
|
5287
|
+
class TaonGithubForkMeCornerModule {
|
|
5288
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonGithubForkMeCornerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5289
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonGithubForkMeCornerModule, declarations: [TaonGithubForkMeCornerComponent], imports: [CommonModule], exports: [TaonGithubForkMeCornerComponent] }); }
|
|
5290
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonGithubForkMeCornerModule, imports: [CommonModule] }); }
|
|
5291
|
+
}
|
|
5292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonGithubForkMeCornerModule, decorators: [{
|
|
5293
|
+
type: NgModule,
|
|
5294
|
+
args: [{
|
|
5295
|
+
imports: [CommonModule],
|
|
5296
|
+
exports: [TaonGithubForkMeCornerComponent],
|
|
5297
|
+
declarations: [TaonGithubForkMeCornerComponent],
|
|
5298
|
+
providers: [],
|
|
5299
|
+
}]
|
|
5300
|
+
}] });
|
|
5301
|
+
;
|
|
5302
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-github-fork-me-corner/taon-github-fork-me-corner.module.ts
|
|
5303
|
+
|
|
5304
|
+
;
|
|
5305
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-github-fork-me-corner/index.ts
|
|
5306
|
+
|
|
5307
|
+
/* */
|
|
5308
|
+
/* */
|
|
5309
|
+
class TaonNotificationsService {
|
|
5310
|
+
constructor(toast) {
|
|
5311
|
+
this.toast = toast;
|
|
5312
|
+
}
|
|
5313
|
+
options(type, options) {
|
|
5314
|
+
if (_$1.isString(options)) {
|
|
5315
|
+
options = {
|
|
5316
|
+
// @ts-ignore
|
|
5317
|
+
title: options,
|
|
5318
|
+
};
|
|
5319
|
+
}
|
|
5320
|
+
return options;
|
|
5321
|
+
}
|
|
5322
|
+
success(options) {
|
|
5323
|
+
const opt = this.options('success', options);
|
|
5324
|
+
return this.toast.success(opt.title);
|
|
5325
|
+
}
|
|
5326
|
+
error(options) {
|
|
5327
|
+
const opt = this.options('error', options);
|
|
5328
|
+
return this.toast.error(opt.title);
|
|
5329
|
+
}
|
|
5330
|
+
warn(options) {
|
|
5331
|
+
const opt = this.options('warning', options);
|
|
5332
|
+
return this.toast.warning(opt.title);
|
|
5333
|
+
}
|
|
5334
|
+
info(options) {
|
|
5335
|
+
const opt = this.options('info', options);
|
|
5336
|
+
return this.toast.info(opt.title);
|
|
5337
|
+
}
|
|
5338
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsService, deps: [{ token: i1$1.HotToastService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5339
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsService, providedIn: 'root' }); }
|
|
5340
|
+
}
|
|
5341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsService, decorators: [{
|
|
5342
|
+
type: Injectable,
|
|
5343
|
+
args: [{
|
|
5344
|
+
providedIn: 'root',
|
|
5345
|
+
}]
|
|
5346
|
+
}], ctorParameters: () => [{ type: i1$1.HotToastService }] });
|
|
5347
|
+
;
|
|
5348
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-notifications/taon-notifications.service.ts
|
|
5349
|
+
|
|
5350
|
+
class TaonNotificationsComponent {
|
|
5351
|
+
constructor(notification) {
|
|
5352
|
+
this.notification = notification;
|
|
5353
|
+
}
|
|
5354
|
+
ngOnInit() { }
|
|
5355
|
+
init(subscribtionsArray, template, callback) {
|
|
5356
|
+
subscribtionsArray.push(Resource.listenErrors.subscribe(err => {
|
|
5357
|
+
this.notification.error(err.msg);
|
|
5358
|
+
}));
|
|
5359
|
+
}
|
|
5360
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsComponent, deps: [{ token: TaonNotificationsService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5361
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonNotificationsComponent, selector: "taon-notifications", ngImport: i0, template: "<!-- <p>\n notyfications works!\n</p> -->\n", styles: [":host{position:absolute;width:0px;height:0px}\n"] }); }
|
|
5362
|
+
}
|
|
5363
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsComponent, decorators: [{
|
|
5364
|
+
type: Component,
|
|
5365
|
+
args: [{ selector: 'taon-notifications', template: "<!-- <p>\n notyfications works!\n</p> -->\n", styles: [":host{position:absolute;width:0px;height:0px}\n"] }]
|
|
5366
|
+
}], ctorParameters: () => [{ type: TaonNotificationsService }] });
|
|
5367
|
+
;
|
|
5368
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-notifications/taon-notifications.component.ts
|
|
5369
|
+
|
|
5370
|
+
class TaonNotificationOptions {
|
|
5371
|
+
}
|
|
5372
|
+
;
|
|
5373
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-notifications/taon-notifications.models.ts
|
|
5374
|
+
|
|
5375
|
+
class TaonNotificationsModule {
|
|
5376
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5377
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsModule, declarations: [TaonNotificationsComponent], exports: [TaonNotificationsComponent] }); }
|
|
5378
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsModule, providers: [TaonNotificationsService] }); }
|
|
5379
|
+
}
|
|
5380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonNotificationsModule, decorators: [{
|
|
5381
|
+
type: NgModule,
|
|
5382
|
+
args: [{
|
|
5383
|
+
imports: [],
|
|
5384
|
+
exports: [TaonNotificationsComponent],
|
|
5385
|
+
declarations: [TaonNotificationsComponent],
|
|
5386
|
+
providers: [TaonNotificationsService],
|
|
5387
|
+
}]
|
|
5388
|
+
}] });
|
|
5389
|
+
;
|
|
5390
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-notifications/taon-notifications.module.ts
|
|
5391
|
+
|
|
5392
|
+
;
|
|
5393
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-notifications/index.ts
|
|
5394
|
+
|
|
5395
|
+
class TaonSessionPasscodeComponent {
|
|
5396
|
+
constructor(element, domSanitizer, cdr) {
|
|
5397
|
+
this.element = element;
|
|
5398
|
+
this.domSanitizer = domSanitizer;
|
|
5399
|
+
this.cdr = cdr;
|
|
5400
|
+
this.destroyRef = inject$1(DestroyRef);
|
|
5401
|
+
this.display = 'none';
|
|
5402
|
+
this.form = new FormGroup({
|
|
5403
|
+
passcode: new FormControl(),
|
|
5404
|
+
});
|
|
5405
|
+
}
|
|
5406
|
+
ngOnInit() {
|
|
5407
|
+
if (!this.passcode) {
|
|
5408
|
+
this.passcode = '123456';
|
|
5409
|
+
}
|
|
5410
|
+
if (!this.message) {
|
|
5411
|
+
this.message = `
|
|
5412
|
+
This website is only for testing purpose. Please type passcode bellow to see content.
|
|
5413
|
+
|
|
5414
|
+
`;
|
|
5415
|
+
}
|
|
5416
|
+
this.safeMessage = this.domSanitizer.bypassSecurityTrustHtml(this.message);
|
|
5417
|
+
if (this.lastPasscode?.toString() === this.passcode?.toString()) {
|
|
5418
|
+
this.hide();
|
|
5419
|
+
}
|
|
5420
|
+
else {
|
|
5421
|
+
this.show();
|
|
5422
|
+
this.focus();
|
|
5423
|
+
}
|
|
5424
|
+
interval(1000)
|
|
5425
|
+
.pipe(takeUntilDestroyed(this.destroyRef), tap(() => {
|
|
5426
|
+
this.focus();
|
|
5427
|
+
}))
|
|
5428
|
+
.subscribe();
|
|
5429
|
+
}
|
|
5430
|
+
submit({ passcode }) {
|
|
5431
|
+
if (this.isPasscodeOK(passcode || '')) {
|
|
5432
|
+
this.hide();
|
|
5433
|
+
}
|
|
5434
|
+
else {
|
|
5435
|
+
this.clear();
|
|
5436
|
+
}
|
|
5437
|
+
}
|
|
5438
|
+
isPasscodeOK(passcode) {
|
|
5439
|
+
this.lastPasscode = passcode.toString();
|
|
5440
|
+
return this.passcode.toString() === passcode;
|
|
5441
|
+
}
|
|
5442
|
+
ngAfterViewInit() { }
|
|
5443
|
+
focus() {
|
|
5444
|
+
this.element.nativeElement.querySelector('input')?.focus();
|
|
5445
|
+
}
|
|
5446
|
+
hide() {
|
|
5447
|
+
this.display = 'none';
|
|
5448
|
+
}
|
|
5449
|
+
show() {
|
|
5450
|
+
this.display = 'block';
|
|
5451
|
+
}
|
|
5452
|
+
clear() {
|
|
5453
|
+
this.form.controls.passcode.setValue('');
|
|
5454
|
+
}
|
|
5455
|
+
onKeyup(event) {
|
|
5456
|
+
if (this.isPasscodeOK(event.target.value || '')) {
|
|
5457
|
+
this.hide();
|
|
5458
|
+
return;
|
|
5459
|
+
}
|
|
5460
|
+
const key = event.keyCode || event.charCode;
|
|
5461
|
+
if (key === 8 || key === 46 || this.lastPasscode?.length > 5) {
|
|
5462
|
+
this.clear();
|
|
5463
|
+
}
|
|
5464
|
+
}
|
|
5465
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonSessionPasscodeComponent, deps: [{ token: i0.ElementRef, self: true }, { token: i1.DomSanitizer }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5466
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonSessionPasscodeComponent, isStandalone: true, selector: "taon-session-passcode", inputs: { passcode: "passcode", message: "message" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<form\n [formGroup]=\"form\"\n content=\"notranslate\"\n autocomplete=\"off\"\n (click)=\"focus()\"\n (ngSubmit)=\"submit(form.value)\"\n class=\"flex flex-column align-items-center w-full h-full\">\n <div class=\"flex align-content-center w-full justify-content-center mt-8\">\n <p\n class=\"p-3\"\n style=\"max-width: 400px; min-height: 100px\"\n [innerHtml]=\"safeMessage\"></p>\n </div>\n <input\n type=\"password\"\n class=\"text-5xl md:text-8xl pointer-events-none\"\n #taonpasscode\n (keyup)=\"onKeyup($event)\"\n formControlName=\"passcode\" />\n <!-- placeholder=\"Enter passcode\" -->\n</form>\n", styles: [":host{position:fixed;background-color:#9f9f9f57;z-index:99999;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px);width:100%;height:100%;display:none}input{background:#fff;border-radius:6px;outline:0px;border:0px;color:gray;text-align:center;width:500px}\n"], dependencies: [{ kind: "ngmodule", type: PasswordModule }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }] }); }
|
|
5467
|
+
}
|
|
5468
|
+
__decorate([
|
|
5469
|
+
(Stor.property.in.localstorage
|
|
5470
|
+
.for(TaonSessionPasscodeComponent)
|
|
5471
|
+
.withDefaultValue('')),
|
|
5472
|
+
__metadata("design:type", String)
|
|
5473
|
+
], TaonSessionPasscodeComponent.prototype, "lastPasscode", void 0);
|
|
5474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonSessionPasscodeComponent, decorators: [{
|
|
5475
|
+
type: Component,
|
|
5476
|
+
args: [{ selector: 'taon-session-passcode', standalone: true, imports: [PasswordModule, CommonModule, ReactiveFormsModule, FormsModule], template: "<form\n [formGroup]=\"form\"\n content=\"notranslate\"\n autocomplete=\"off\"\n (click)=\"focus()\"\n (ngSubmit)=\"submit(form.value)\"\n class=\"flex flex-column align-items-center w-full h-full\">\n <div class=\"flex align-content-center w-full justify-content-center mt-8\">\n <p\n class=\"p-3\"\n style=\"max-width: 400px; min-height: 100px\"\n [innerHtml]=\"safeMessage\"></p>\n </div>\n <input\n type=\"password\"\n class=\"text-5xl md:text-8xl pointer-events-none\"\n #taonpasscode\n (keyup)=\"onKeyup($event)\"\n formControlName=\"passcode\" />\n <!-- placeholder=\"Enter passcode\" -->\n</form>\n", styles: [":host{position:fixed;background-color:#9f9f9f57;z-index:99999;-webkit-backdrop-filter:blur(50px);backdrop-filter:blur(50px);width:100%;height:100%;display:none}input{background:#fff;border-radius:6px;outline:0px;border:0px;color:gray;text-align:center;width:500px}\n"] }]
|
|
5477
|
+
}], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
|
|
5478
|
+
type: Self
|
|
5479
|
+
}] }, { type: i1.DomSanitizer }, { type: i0.ChangeDetectorRef }], propDecorators: { passcode: [{
|
|
5480
|
+
type: Input
|
|
5481
|
+
}], message: [{
|
|
5482
|
+
type: Input
|
|
5483
|
+
}], display: [{
|
|
5484
|
+
type: HostBinding,
|
|
5485
|
+
args: ['style.display']
|
|
5486
|
+
}] } });
|
|
5487
|
+
;
|
|
5488
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-session-passcode/taon-session-passcode.component.ts
|
|
5489
|
+
|
|
5490
|
+
;
|
|
5491
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-session-passcode/index.ts
|
|
5492
|
+
|
|
5493
|
+
const calculatePercentage = (loaded, total) => Math.floor(loaded * 1.0) / total;
|
|
5494
|
+
class TaonProgressBarComponent {
|
|
5495
|
+
constructor() {
|
|
5496
|
+
this.handlers = [];
|
|
5497
|
+
this.options = _$1.merge({
|
|
5498
|
+
min: 8,
|
|
5499
|
+
max: 100,
|
|
5500
|
+
speed: 200,
|
|
5501
|
+
trickleSpeed: 300,
|
|
5502
|
+
debounceTime: 0,
|
|
5503
|
+
ease: 'linear',
|
|
5504
|
+
spinnerPosition: 'right',
|
|
5505
|
+
direction: 'ltr+',
|
|
5506
|
+
color: 'gray',
|
|
5507
|
+
fixed: true,
|
|
5508
|
+
meteor: true,
|
|
5509
|
+
spinner: true,
|
|
5510
|
+
thick: false,
|
|
5511
|
+
}, _$1.get(ENV, `plugins['ngx-progressbar']`));
|
|
5512
|
+
}
|
|
5513
|
+
ngOnInit() { }
|
|
5514
|
+
ngOnDestroy() {
|
|
5515
|
+
this.handlers.forEach(h => h.unsubscribe());
|
|
5516
|
+
}
|
|
5517
|
+
ngAfterViewInit() {
|
|
5518
|
+
this.loadProgressBar(void 0, axios);
|
|
5519
|
+
}
|
|
5520
|
+
loadProgressBar(config, instance = axios) {
|
|
5521
|
+
/* */
|
|
5522
|
+
/* */
|
|
5523
|
+
/* */
|
|
5524
|
+
/* */
|
|
5525
|
+
/* */
|
|
5526
|
+
/* */
|
|
5527
|
+
/* */
|
|
5528
|
+
/* */
|
|
5529
|
+
/* */
|
|
5530
|
+
/* */
|
|
5531
|
+
/* */
|
|
5532
|
+
/* */
|
|
5533
|
+
/* */
|
|
5534
|
+
/* */
|
|
5535
|
+
/* */
|
|
5536
|
+
/* */
|
|
5537
|
+
/* */
|
|
5538
|
+
/* */
|
|
5539
|
+
/* */
|
|
5540
|
+
/* */
|
|
5541
|
+
/* */
|
|
5542
|
+
/* */
|
|
5543
|
+
/* */
|
|
5544
|
+
/* */
|
|
5545
|
+
/* */
|
|
5546
|
+
/* */
|
|
5547
|
+
/* */
|
|
5548
|
+
/* */
|
|
5549
|
+
/* */
|
|
5550
|
+
/* */
|
|
5551
|
+
/* */
|
|
5552
|
+
/* */
|
|
5553
|
+
/* */
|
|
5554
|
+
/* */
|
|
5555
|
+
/* */
|
|
5556
|
+
/* */
|
|
5557
|
+
/* */
|
|
5558
|
+
/* */
|
|
5559
|
+
/* */
|
|
5560
|
+
/* */
|
|
5561
|
+
/* */
|
|
5562
|
+
/* */
|
|
5563
|
+
/* */
|
|
5564
|
+
/* */
|
|
5565
|
+
/* */
|
|
5566
|
+
/* */
|
|
5567
|
+
/* */
|
|
5568
|
+
/* */
|
|
5569
|
+
}
|
|
5570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: TaonProgressBarComponent, selector: "taon-progress-bar", inputs: { isDesktop: "isDesktop" }, viewQueries: [{ propertyName: "labProgress", first: true, predicate: ["labProgress"], descendants: true }], ngImport: i0, template: "<ng-progress\n #labProgress\n id=\"lab\"\n [meteor]=\"options.meteor\"\n [color]=\"options.color\"\n [min]=\"options.min\"\n [max]=\"options.max\"\n [speed]=\"options.speed\"\n [spinner]=\"\n options.spinner &&\n (!admin.adminPanelIsOpen ||\n (admin.adminPanelIsOpen && (admin.draggablePopupMode || !isDesktop)))\n \"\n [spinnerPosition]=\"options.spinnerPosition\"\n [direction]=\"options.direction\"\n [trickleSpeed]=\"options.trickleSpeed\"\n [debounceTime]=\"options.debounceTime\"\n [ease]=\"options.ease\"\n [thick]=\"options.thick\"\n [fixed]=\"options.fixed\">\n</ng-progress>\n<!-- (started)=\"onProgressStarted()\"\n (completed)=\"onProgressCompleted()\" -->\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "component", type: i1$2.NgProgressComponent, selector: "ng-progress", inputs: ["id", "min", "max", "ease", "color", "speed", "thick", "fixed", "meteor", "spinner", "trickleSpeed", "debounceTime", "trickleFunc", "spinnerPosition", "direction"], outputs: ["started", "completed"] }] }); }
|
|
5572
|
+
}
|
|
5573
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonProgressBarComponent, decorators: [{
|
|
5574
|
+
type: Component,
|
|
5575
|
+
args: [{ selector: 'taon-progress-bar', template: "<ng-progress\n #labProgress\n id=\"lab\"\n [meteor]=\"options.meteor\"\n [color]=\"options.color\"\n [min]=\"options.min\"\n [max]=\"options.max\"\n [speed]=\"options.speed\"\n [spinner]=\"\n options.spinner &&\n (!admin.adminPanelIsOpen ||\n (admin.adminPanelIsOpen && (admin.draggablePopupMode || !isDesktop)))\n \"\n [spinnerPosition]=\"options.spinnerPosition\"\n [direction]=\"options.direction\"\n [trickleSpeed]=\"options.trickleSpeed\"\n [debounceTime]=\"options.debounceTime\"\n [ease]=\"options.ease\"\n [thick]=\"options.thick\"\n [fixed]=\"options.fixed\">\n</ng-progress>\n<!-- (started)=\"onProgressStarted()\"\n (completed)=\"onProgressCompleted()\" -->\n", styles: [":host{display:block}\n"] }]
|
|
5576
|
+
}], ctorParameters: () => [], propDecorators: { labProgress: [{
|
|
5577
|
+
type: ViewChild,
|
|
5578
|
+
args: ['labProgress']
|
|
5579
|
+
}], isDesktop: [{
|
|
5580
|
+
type: Input
|
|
5581
|
+
}] } });
|
|
5582
|
+
;
|
|
5583
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-progress-bar/taon-progress-bar.component.ts
|
|
5584
|
+
|
|
5585
|
+
class TaonProgressBarModule {
|
|
5586
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5587
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonProgressBarModule, declarations: [TaonProgressBarComponent], imports: [CommonModule, i1$2.NgProgressModule], exports: [TaonProgressBarComponent] }); }
|
|
5588
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonProgressBarModule, imports: [CommonModule, NgProgressModule.withConfig({})] }); }
|
|
5589
|
+
}
|
|
5590
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonProgressBarModule, decorators: [{
|
|
5591
|
+
type: NgModule,
|
|
5592
|
+
args: [{
|
|
5593
|
+
imports: [CommonModule, NgProgressModule.withConfig({})],
|
|
5594
|
+
declarations: [TaonProgressBarComponent],
|
|
5595
|
+
exports: [TaonProgressBarComponent],
|
|
5596
|
+
}]
|
|
5597
|
+
}] });
|
|
5598
|
+
;
|
|
5599
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-progress-bar/taon-progress-bar.module.ts
|
|
5600
|
+
|
|
5601
|
+
;
|
|
5602
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-progress-bar/index.ts
|
|
5603
|
+
|
|
5604
|
+
const log = Log.create('Table wrapper', Level.__NOTHING);
|
|
5605
|
+
const defaultColumns = [
|
|
5606
|
+
{
|
|
5607
|
+
header: 'ID',
|
|
5608
|
+
field: 'id',
|
|
5609
|
+
},
|
|
5610
|
+
{
|
|
5611
|
+
header: 'NAME',
|
|
5612
|
+
field: 'name',
|
|
5613
|
+
},
|
|
5614
|
+
];
|
|
5615
|
+
class TaonTableComponent {
|
|
5616
|
+
constructor() {
|
|
5617
|
+
this.pageNumber = 1;
|
|
5618
|
+
this.pageSize = 5;
|
|
5619
|
+
this.allowedColumns = [];
|
|
5620
|
+
this.rows = _.times(20, id => {
|
|
5621
|
+
return {
|
|
5622
|
+
id,
|
|
5623
|
+
name: `Amazing ${id} row `,
|
|
5624
|
+
};
|
|
5625
|
+
});
|
|
5626
|
+
this.columns = defaultColumns;
|
|
5627
|
+
this.pageSizeOptions = [5, 10, 20];
|
|
5628
|
+
this.expansionChange = new EventEmitter();
|
|
5629
|
+
this.addingItem = new EventEmitter();
|
|
5630
|
+
this.searchInputChange$ = defer(() => fromEvent(this.search?.nativeElement, 'keyup')).pipe(map(c => c.target['value']), debounceTime(500), distinctUntilChanged(), share(), tap(data => {
|
|
5631
|
+
console.log({ data });
|
|
5632
|
+
}));
|
|
5633
|
+
this.expandable = false;
|
|
5634
|
+
this.showPaginator = true;
|
|
5635
|
+
this.isLoading = false;
|
|
5636
|
+
this.totalElements = 100;
|
|
5637
|
+
this.sub = new Subscription();
|
|
5638
|
+
}
|
|
5639
|
+
async ngOnInit() {
|
|
5640
|
+
if (_.isString(this.entity)) {
|
|
5641
|
+
this.entity = CLASS.getBy(this.entity);
|
|
5642
|
+
}
|
|
5643
|
+
this.sub.add(this.searchInputChange$.subscribe());
|
|
5644
|
+
if (!!this.entity) {
|
|
5645
|
+
this.rows = [];
|
|
5646
|
+
}
|
|
5647
|
+
this.expandable = !!this.expansionTemplate;
|
|
5648
|
+
log.i('this.columns,', this.columns);
|
|
5649
|
+
const columnsConfigSameAsDefault = _.isEqual(this.columns, defaultColumns);
|
|
5650
|
+
const entityClass = this.entity;
|
|
5651
|
+
if (entityClass && columnsConfigSameAsDefault) {
|
|
5652
|
+
log.i('this.crud.entity', CLASS.describeProperites(entityClass));
|
|
5653
|
+
try {
|
|
5654
|
+
const props = CLASS.describeProperites(entityClass);
|
|
5655
|
+
let columns = props
|
|
5656
|
+
.filter(prop => this.allowedColumns.length > 0
|
|
5657
|
+
? this.allowedColumns.includes(prop)
|
|
5658
|
+
: true)
|
|
5659
|
+
.map(prop => {
|
|
5660
|
+
return {
|
|
5661
|
+
header: _.upperCase(prop),
|
|
5662
|
+
field: prop,
|
|
5663
|
+
};
|
|
5664
|
+
});
|
|
5665
|
+
const extra = this.allowedColumns.filter(f => !props.includes(f));
|
|
5666
|
+
columns = [
|
|
5667
|
+
...columns,
|
|
5668
|
+
...extra.map(prop => {
|
|
5669
|
+
return {
|
|
5670
|
+
header: _.upperCase(prop),
|
|
5671
|
+
field: prop,
|
|
5672
|
+
};
|
|
5673
|
+
}),
|
|
5674
|
+
];
|
|
5675
|
+
if (!this.expandable) {
|
|
5676
|
+
for (let index = 0; index < columns.length; index++) {
|
|
5677
|
+
const col = columns[index];
|
|
5678
|
+
delete col.showExpand;
|
|
5679
|
+
}
|
|
5680
|
+
}
|
|
5681
|
+
this.columns = columns;
|
|
5682
|
+
}
|
|
5683
|
+
catch (error) {
|
|
5684
|
+
console.error(error);
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
else {
|
|
5688
|
+
}
|
|
5689
|
+
if (!this.entity) {
|
|
5690
|
+
this.showPaginator = false;
|
|
5691
|
+
}
|
|
5692
|
+
await this.retriveData();
|
|
5693
|
+
}
|
|
5694
|
+
ngOnDestroy() {
|
|
5695
|
+
this.sub.unsubscribe();
|
|
5696
|
+
}
|
|
5697
|
+
async getNextPage(e) {
|
|
5698
|
+
this.pageNumber = e.pageIndex + 1;
|
|
5699
|
+
this.pageSize = e.pageSize;
|
|
5700
|
+
await this.retriveData();
|
|
5701
|
+
}
|
|
5702
|
+
async retriveData() {
|
|
5703
|
+
// @ts-ignore
|
|
5704
|
+
}
|
|
5705
|
+
expansionRow(e) {
|
|
5706
|
+
this.expansionChange.next(e);
|
|
5707
|
+
}
|
|
5708
|
+
onTableContextMenu(e) {
|
|
5709
|
+
log.i('context menu event', e);
|
|
5710
|
+
}
|
|
5711
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5712
|
+
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: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i3.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: i6$1.MatFabButton, selector: "button[mat-fab]", inputs: ["extended"], exportAs: ["matButton"] }] }); }
|
|
5713
|
+
}
|
|
5714
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableComponent, decorators: [{
|
|
5715
|
+
type: Component,
|
|
5716
|
+
args: [{ selector: 'taon-table', 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"] }]
|
|
5717
|
+
}], ctorParameters: () => [], propDecorators: { pageNumber: [{
|
|
5718
|
+
type: Input
|
|
5719
|
+
}], pageSize: [{
|
|
5720
|
+
type: Input
|
|
5721
|
+
}], allowedColumns: [{
|
|
5722
|
+
type: Input
|
|
5723
|
+
}], entity: [{
|
|
5724
|
+
type: Input
|
|
5725
|
+
}], expansionTemplate: [{
|
|
5726
|
+
type: Input
|
|
5727
|
+
}], rows: [{
|
|
5728
|
+
type: Input
|
|
5729
|
+
}], columns: [{
|
|
5730
|
+
type: Input
|
|
5731
|
+
}], pageSizeOptions: [{
|
|
5732
|
+
type: Input
|
|
5733
|
+
}], expansionChange: [{
|
|
5734
|
+
type: Output
|
|
5735
|
+
}], addingItem: [{
|
|
5736
|
+
type: Output
|
|
5737
|
+
}], search: [{
|
|
5738
|
+
type: ViewChild,
|
|
5739
|
+
args: ['search', { static: true }]
|
|
5740
|
+
}] } });
|
|
5741
|
+
;
|
|
5742
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-table/taon-table.component.ts
|
|
5743
|
+
|
|
5744
|
+
class TaonTableModule {
|
|
5745
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
5746
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonTableModule, declarations: [TaonTableComponent], imports: [CommonModule,
|
|
5747
|
+
MatSelectModule,
|
|
5748
|
+
MtxGridModule,
|
|
5749
|
+
MatFormFieldModule,
|
|
5750
|
+
MatInputModule,
|
|
5751
|
+
StaticColumnsModule,
|
|
5752
|
+
MatIconModule,
|
|
5753
|
+
MatButtonModule,
|
|
5754
|
+
FormsModule,
|
|
5755
|
+
ReactiveFormsModule], exports: [TaonTableComponent] }); }
|
|
5756
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableModule, imports: [CommonModule,
|
|
5757
|
+
MatSelectModule,
|
|
5758
|
+
MtxGridModule,
|
|
5759
|
+
MatFormFieldModule,
|
|
5760
|
+
MatInputModule,
|
|
5761
|
+
StaticColumnsModule,
|
|
5762
|
+
MatIconModule,
|
|
5763
|
+
MatButtonModule,
|
|
5764
|
+
FormsModule,
|
|
5765
|
+
ReactiveFormsModule] }); }
|
|
5766
|
+
}
|
|
5767
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonTableModule, decorators: [{
|
|
5768
|
+
type: NgModule,
|
|
5769
|
+
args: [{
|
|
5770
|
+
imports: [
|
|
5771
|
+
CommonModule,
|
|
5772
|
+
MatSelectModule,
|
|
5773
|
+
MtxGridModule,
|
|
5774
|
+
MatFormFieldModule,
|
|
5775
|
+
MatInputModule,
|
|
5776
|
+
StaticColumnsModule,
|
|
5777
|
+
MatIconModule,
|
|
5778
|
+
MatButtonModule,
|
|
5779
|
+
FormsModule,
|
|
5780
|
+
ReactiveFormsModule,
|
|
5781
|
+
],
|
|
5782
|
+
exports: [TaonTableComponent],
|
|
5783
|
+
declarations: [TaonTableComponent],
|
|
5784
|
+
}]
|
|
5785
|
+
}] });
|
|
5786
|
+
;
|
|
5787
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-table/taon-table.module.ts
|
|
5788
|
+
|
|
5789
|
+
;
|
|
5790
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-table/index.ts
|
|
5791
|
+
|
|
5792
|
+
class TaonAdminService {
|
|
4852
5793
|
/**
|
|
4853
5794
|
* @deprecated
|
|
4854
5795
|
*/
|
|
5796
|
+
disableScroll() {
|
|
5797
|
+
}
|
|
5798
|
+
constructor(cdr) {
|
|
5799
|
+
this.cdr = cdr;
|
|
5800
|
+
this.admin = window['taon'];
|
|
5801
|
+
}
|
|
5802
|
+
addTab(name, template) {
|
|
5803
|
+
this.admin.cmp.tabs.push({
|
|
5804
|
+
name,
|
|
5805
|
+
template,
|
|
5806
|
+
});
|
|
5807
|
+
}
|
|
5808
|
+
init(taonAdminModeConfigurationComponent) {
|
|
5809
|
+
this.taonAdminModeConfigurationComponent =
|
|
5810
|
+
taonAdminModeConfigurationComponent;
|
|
5811
|
+
}
|
|
5812
|
+
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 }); }
|
|
5813
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, providedIn: 'root' }); }
|
|
5814
|
+
}
|
|
5815
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminService, decorators: [{
|
|
5816
|
+
type: Injectable,
|
|
5817
|
+
args: [{ providedIn: 'root' }]
|
|
5818
|
+
}], ctorParameters: () => [{ type: i0.ApplicationRef }] });
|
|
5819
|
+
;
|
|
5820
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-control.service.ts
|
|
5821
|
+
|
|
5822
|
+
class TaonAdminModeConfigurationComponent {
|
|
5823
|
+
get opened() {
|
|
5824
|
+
return !this.isIframe && this.admin.adminPanelIsOpen;
|
|
5825
|
+
}
|
|
5826
|
+
set opened(v) {
|
|
5827
|
+
if (v && !this.openedOnce) {
|
|
5828
|
+
this.openedOnce = true;
|
|
5829
|
+
}
|
|
5830
|
+
if (this.wasOpenDraggablePopup) {
|
|
5831
|
+
this.wasOpenDraggablePopup = false;
|
|
5832
|
+
this.admin.draggablePopupMode = true;
|
|
5833
|
+
}
|
|
5834
|
+
this.admin.adminPanelIsOpen = v;
|
|
5835
|
+
}
|
|
5836
|
+
constructor(breakpointsService) {
|
|
5837
|
+
this.breakpointsService = breakpointsService;
|
|
5838
|
+
this.$destroy = new Subject();
|
|
5839
|
+
this.cdr = inject$1(ChangeDetectorRef);
|
|
5840
|
+
this.taonAdminService = inject$1(TaonAdminService);
|
|
5841
|
+
this.tabs = [];
|
|
5842
|
+
this.admin = window['taon'];
|
|
5843
|
+
this.isWebSQLMode = Helpers.isWebSQL;
|
|
5844
|
+
this.hideTaonToolsInProduction = ENV.hideTaonToolsInProduction && ENV.angularProd;
|
|
5845
|
+
this.isIframe = window.location !== window.parent.location;
|
|
5846
|
+
this.height = 100;
|
|
5847
|
+
this.openedOnce = false;
|
|
5848
|
+
this.reloading = false;
|
|
5849
|
+
this.showPasscode = _$1.isString(ENV.passcode) || _$1.isObject(ENV.passcode);
|
|
5850
|
+
this.passcode = _$1.isString(ENV.passcode)
|
|
5851
|
+
? ENV.passcode
|
|
5852
|
+
: _$1.isObject(ENV.passcode)
|
|
5853
|
+
? ENV.passcode.code
|
|
5854
|
+
: '';
|
|
5855
|
+
this.message = _$1.isObject(ENV.passcode)
|
|
5856
|
+
? ENV.passcode.message
|
|
5857
|
+
: void 0;
|
|
5858
|
+
this.dragPositionZero = { x: 0, y: 0 };
|
|
5859
|
+
this.taonAdminModeConfigurationDataChanged = new EventEmitter();
|
|
5860
|
+
this.taonAdminModeConfigurationData = {};
|
|
5861
|
+
this.admin.cmp = this;
|
|
5862
|
+
this.breakpointsService
|
|
5863
|
+
.listenTo()
|
|
5864
|
+
.pipe(takeUntil(this.$destroy))
|
|
5865
|
+
.subscribe(breakpoint => {
|
|
5866
|
+
// @ts-ignore
|
|
5867
|
+
this.isDesktop = breakpoint === 'desktop';
|
|
5868
|
+
});
|
|
5869
|
+
this.taonAdminService.init(this);
|
|
5870
|
+
}
|
|
5871
|
+
reloadTabs() {
|
|
5872
|
+
this.reloading = true;
|
|
5873
|
+
setTimeout(() => {
|
|
5874
|
+
this.reloading = false;
|
|
5875
|
+
console.log('reloading done');
|
|
5876
|
+
});
|
|
5877
|
+
}
|
|
5878
|
+
async ngOnInit() {
|
|
5879
|
+
await Stor.awaitPendingOperatios();
|
|
5880
|
+
this.dragPosition = { x: this.dragPositionX, y: this.dragPositionY };
|
|
5881
|
+
this.openedOnce = this.opened;
|
|
5882
|
+
}
|
|
5883
|
+
ngAfterViewInit() {
|
|
5884
|
+
//Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
|
|
5885
|
+
//Add 'implements AfterViewInit' to the class.
|
|
5886
|
+
setTimeout(() => {
|
|
5887
|
+
this.height = window.innerHeight;
|
|
5888
|
+
if (this.admin.draggablePopupMode) {
|
|
5889
|
+
this.reloadTabs();
|
|
5890
|
+
}
|
|
5891
|
+
});
|
|
5892
|
+
}
|
|
5893
|
+
ngOnDestroy() {
|
|
5894
|
+
this.$destroy.next(void 0);
|
|
5895
|
+
this.$destroy.complete();
|
|
5896
|
+
}
|
|
5897
|
+
onResize(event) {
|
|
5898
|
+
this.height = window.innerHeight;
|
|
5899
|
+
}
|
|
5900
|
+
async toogle() {
|
|
5901
|
+
this.opened = !this.opened;
|
|
5902
|
+
}
|
|
5903
|
+
async toogleFullScreen() {
|
|
5904
|
+
this.admin.draggablePopupMode = true;
|
|
5905
|
+
this.admin.draggablePopupModeFullScreen =
|
|
5906
|
+
!this.admin.draggablePopupModeFullScreen;
|
|
5907
|
+
this.resetDrag();
|
|
5908
|
+
}
|
|
5909
|
+
resetDrag() {
|
|
5910
|
+
this.dragPositionX = 0;
|
|
5911
|
+
this.dragPositionY = 0;
|
|
5912
|
+
this.dragPosition = { x: this.dragPositionX, y: this.dragPositionY };
|
|
5913
|
+
}
|
|
5914
|
+
moved(c) {
|
|
5915
|
+
this.dragPositionX += c.distance.x;
|
|
5916
|
+
this.dragPositionY += c.distance.y;
|
|
5917
|
+
}
|
|
5918
|
+
scrollTabs(event) {
|
|
5919
|
+
return;
|
|
5920
|
+
}
|
|
5921
|
+
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 }); }
|
|
5922
|
+
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"] }] }); }
|
|
5923
|
+
}
|
|
5924
|
+
__decorate([
|
|
5925
|
+
Stor.property.in.localstorage
|
|
5926
|
+
.for(TaonAdminModeConfigurationComponent)
|
|
5927
|
+
.withDefaultValue(0),
|
|
5928
|
+
__metadata("design:type", Number)
|
|
5929
|
+
], TaonAdminModeConfigurationComponent.prototype, "dragPositionX", void 0);
|
|
5930
|
+
__decorate([
|
|
5931
|
+
Stor.property.in.localstorage
|
|
5932
|
+
.for(TaonAdminModeConfigurationComponent)
|
|
5933
|
+
.withDefaultValue(0),
|
|
5934
|
+
__metadata("design:type", Number)
|
|
5935
|
+
], TaonAdminModeConfigurationComponent.prototype, "dragPositionY", void 0);
|
|
5936
|
+
__decorate([
|
|
5937
|
+
Stor.property.in.localstorage
|
|
5938
|
+
.for(TaonAdminModeConfigurationComponent)
|
|
5939
|
+
.withDefaultValue(0),
|
|
5940
|
+
__metadata("design:type", Number)
|
|
5941
|
+
], TaonAdminModeConfigurationComponent.prototype, "selectedIndex", void 0);
|
|
5942
|
+
__decorate([
|
|
5943
|
+
Stor.property.in.localstorage
|
|
5944
|
+
.for(TaonAdminModeConfigurationComponent)
|
|
5945
|
+
.withDefaultValue(false),
|
|
5946
|
+
__metadata("design:type", Boolean)
|
|
5947
|
+
], TaonAdminModeConfigurationComponent.prototype, "wasOpenDraggablePopup", void 0);
|
|
5948
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationComponent, decorators: [{
|
|
5949
|
+
type: Component,
|
|
5950
|
+
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"] }]
|
|
5951
|
+
}], ctorParameters: () => [{ type: i1$3.BreakpointsService }], propDecorators: { tabGroup: [{
|
|
5952
|
+
type: ViewChild,
|
|
5953
|
+
args: ['tabGroup']
|
|
5954
|
+
}], taonAdminModeConfigurationDataChanged: [{
|
|
5955
|
+
type: Output
|
|
5956
|
+
}], taonAdminModeConfigurationData: [{
|
|
5957
|
+
type: Input
|
|
5958
|
+
}], onResize: [{
|
|
5959
|
+
type: HostListener,
|
|
5960
|
+
args: ['window:resize', ['$event']]
|
|
5961
|
+
}] } });
|
|
5962
|
+
;
|
|
5963
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.component.ts
|
|
5964
|
+
|
|
5965
|
+
class TaonAdminEditModeComponent {
|
|
5966
|
+
constructor(router) {
|
|
5967
|
+
this.router = router;
|
|
5968
|
+
this.inited$ = of(true);
|
|
5969
|
+
this.destroyed$ = new Subject();
|
|
5970
|
+
this.handlers = [];
|
|
5971
|
+
this.columns = [
|
|
5972
|
+
{
|
|
5973
|
+
header: 'ID',
|
|
5974
|
+
field: 'id',
|
|
5975
|
+
maxWidth: 100,
|
|
5976
|
+
showExpand: true,
|
|
5977
|
+
},
|
|
5978
|
+
{
|
|
5979
|
+
header: 'src',
|
|
5980
|
+
field: 'src',
|
|
5981
|
+
maxWidth: 250,
|
|
5982
|
+
},
|
|
5983
|
+
{
|
|
5984
|
+
header: 'Content Type',
|
|
5985
|
+
field: 'contentType',
|
|
5986
|
+
maxWidth: 120,
|
|
5987
|
+
},
|
|
5988
|
+
];
|
|
5989
|
+
this.taonAdminEditModeDataChanged = new EventEmitter();
|
|
5990
|
+
this.taonAdminEditModeData = {};
|
|
5991
|
+
}
|
|
5992
|
+
ngOnInit() {
|
|
5993
|
+
this.files = this.admin.currentFiles;
|
|
5994
|
+
this.handlers.push(this.admin.onEditMode$.subscribe(() => {
|
|
5995
|
+
this.refresFilesList();
|
|
5996
|
+
}));
|
|
5997
|
+
this.admin.onRegisterFile().pipe(takeUntil(this.destroyed$), tap(() => {
|
|
5998
|
+
this.refresFilesList();
|
|
5999
|
+
}));
|
|
6000
|
+
}
|
|
6001
|
+
ngOnDestroy() {
|
|
6002
|
+
this.handlers.forEach(h => h.unsubscribe());
|
|
6003
|
+
this.destroyed$.next(void 0);
|
|
6004
|
+
this.destroyed$.unsubscribe();
|
|
6005
|
+
}
|
|
6006
|
+
ngAfterViewInit() {
|
|
6007
|
+
//Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.
|
|
6008
|
+
//Add 'implements AfterViewInit' to the class.
|
|
6009
|
+
setTimeout(() => {
|
|
6010
|
+
this.refresFilesList();
|
|
6011
|
+
}, 500);
|
|
6012
|
+
}
|
|
6013
|
+
expansionRow(e) {
|
|
6014
|
+
console.log(e);
|
|
6015
|
+
}
|
|
6016
|
+
refresFilesList() {
|
|
6017
|
+
this.files = this.admin.currentFiles;
|
|
6018
|
+
}
|
|
6019
|
+
searchFind(file) {
|
|
6020
|
+
if (!!this?.fileToSearch) {
|
|
6021
|
+
return file?.src?.search(this?.fileToSearch) !== -1;
|
|
6022
|
+
}
|
|
6023
|
+
return true;
|
|
6024
|
+
}
|
|
6025
|
+
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 }); }
|
|
6026
|
+
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" }] }); }
|
|
6027
|
+
}
|
|
6028
|
+
__decorate([
|
|
6029
|
+
(Stor.property.in.localstorage
|
|
6030
|
+
.for(TaonAdminEditModeComponent)
|
|
6031
|
+
.withDefaultValue(0)),
|
|
6032
|
+
__metadata("design:type", Number)
|
|
6033
|
+
], TaonAdminEditModeComponent.prototype, "selectedTabIndex", void 0);
|
|
6034
|
+
__decorate([
|
|
6035
|
+
(Stor.property.in.localstorage
|
|
6036
|
+
.for(TaonAdminEditModeComponent)
|
|
6037
|
+
.withDefaultValue('')),
|
|
6038
|
+
__metadata("design:type", String)
|
|
6039
|
+
], TaonAdminEditModeComponent.prototype, "fileToSearch", void 0);
|
|
6040
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeComponent, decorators: [{
|
|
6041
|
+
type: Component,
|
|
6042
|
+
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"] }]
|
|
6043
|
+
}], ctorParameters: () => [{ type: i1$4.Router }], propDecorators: { taonAdminEditModeDataChanged: [{
|
|
6044
|
+
type: Output
|
|
6045
|
+
}], taonAdminEditModeData: [{
|
|
6046
|
+
type: Input
|
|
6047
|
+
}] } });
|
|
6048
|
+
;
|
|
6049
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.ts
|
|
6050
|
+
|
|
6051
|
+
class TaonFileGeneralOptComponent {
|
|
6052
|
+
constructor() {
|
|
6053
|
+
this.height = 100;
|
|
6054
|
+
this.handlers = [];
|
|
6055
|
+
this.fieldsOrder = [];
|
|
6056
|
+
this.fields = [
|
|
6057
|
+
{
|
|
6058
|
+
key: 'width',
|
|
6059
|
+
},
|
|
6060
|
+
{
|
|
6061
|
+
key: 'height',
|
|
6062
|
+
},
|
|
6063
|
+
{
|
|
6064
|
+
key: 'display',
|
|
6065
|
+
},
|
|
6066
|
+
{
|
|
6067
|
+
key: 'widthUnit',
|
|
6068
|
+
},
|
|
6069
|
+
{
|
|
6070
|
+
key: 'heightUnit', // @ts-ignore
|
|
6071
|
+
},
|
|
6072
|
+
{
|
|
6073
|
+
key: 'action',
|
|
6074
|
+
type: 'action',
|
|
6075
|
+
templateOptions: {
|
|
6076
|
+
label: 'Reset',
|
|
6077
|
+
icon: 'cancel',
|
|
6078
|
+
raised: true,
|
|
6079
|
+
action: () => {
|
|
6080
|
+
console.log('reset');
|
|
6081
|
+
},
|
|
6082
|
+
},
|
|
6083
|
+
},
|
|
6084
|
+
].map(f => {
|
|
6085
|
+
f.className = 'formly-field-half-size';
|
|
6086
|
+
return f;
|
|
6087
|
+
});
|
|
6088
|
+
}
|
|
6089
|
+
ngOnInit() { }
|
|
6090
|
+
ngOnDestroy() {
|
|
6091
|
+
this.handlers.forEach(h => h.unsubscribe());
|
|
6092
|
+
}
|
|
6093
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6094
|
+
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"] }); }
|
|
6095
|
+
}
|
|
6096
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptComponent, decorators: [{
|
|
6097
|
+
type: Component,
|
|
6098
|
+
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"] }]
|
|
6099
|
+
}], ctorParameters: () => [], propDecorators: { height: [{
|
|
6100
|
+
type: HostBinding,
|
|
6101
|
+
args: ['style.minHeight.px']
|
|
6102
|
+
}, {
|
|
6103
|
+
type: Input
|
|
6104
|
+
}], file: [{
|
|
6105
|
+
type: Input
|
|
6106
|
+
}] } });
|
|
6107
|
+
;
|
|
6108
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.ts
|
|
6109
|
+
|
|
6110
|
+
class TaonFileGeneralOptModule {
|
|
6111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6112
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, declarations: [TaonFileGeneralOptComponent], imports: [CommonModule, TaonFullMaterialModule], exports: [TaonFileGeneralOptComponent] }); }
|
|
6113
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, imports: [CommonModule, TaonFullMaterialModule] }); }
|
|
6114
|
+
}
|
|
6115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonFileGeneralOptModule, decorators: [{
|
|
6116
|
+
type: NgModule,
|
|
6117
|
+
args: [{
|
|
6118
|
+
imports: [CommonModule, TaonFullMaterialModule],
|
|
6119
|
+
declarations: [TaonFileGeneralOptComponent],
|
|
6120
|
+
exports: [TaonFileGeneralOptComponent],
|
|
6121
|
+
}]
|
|
6122
|
+
}] });
|
|
6123
|
+
;
|
|
6124
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.ts
|
|
6125
|
+
|
|
6126
|
+
;
|
|
6127
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.ts
|
|
6128
|
+
|
|
6129
|
+
class TaonAdminEditModeModule {
|
|
6130
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6131
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, declarations: [TaonAdminEditModeComponent], imports: [CommonModule,
|
|
6132
|
+
StaticColumnsModule,
|
|
6133
|
+
NgScrollbarModule,
|
|
6134
|
+
TaonFileGeneralOptModule,
|
|
6135
|
+
FormsModule,
|
|
6136
|
+
NgArrayPipesModule,
|
|
6137
|
+
TaonTableModule,
|
|
6138
|
+
TaonFullMaterialModule], exports: [TaonAdminEditModeComponent] }); }
|
|
6139
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, imports: [CommonModule,
|
|
6140
|
+
StaticColumnsModule,
|
|
6141
|
+
NgScrollbarModule,
|
|
6142
|
+
TaonFileGeneralOptModule,
|
|
6143
|
+
FormsModule,
|
|
6144
|
+
NgArrayPipesModule,
|
|
6145
|
+
TaonTableModule,
|
|
6146
|
+
TaonFullMaterialModule] }); }
|
|
6147
|
+
}
|
|
6148
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminEditModeModule, decorators: [{
|
|
6149
|
+
type: NgModule,
|
|
6150
|
+
args: [{
|
|
6151
|
+
imports: [
|
|
6152
|
+
CommonModule,
|
|
6153
|
+
StaticColumnsModule,
|
|
6154
|
+
NgScrollbarModule,
|
|
6155
|
+
TaonFileGeneralOptModule,
|
|
6156
|
+
FormsModule,
|
|
6157
|
+
NgArrayPipesModule,
|
|
6158
|
+
TaonTableModule,
|
|
6159
|
+
TaonFullMaterialModule, // TODO import only partial things
|
|
6160
|
+
],
|
|
6161
|
+
declarations: [TaonAdminEditModeComponent],
|
|
6162
|
+
exports: [TaonAdminEditModeComponent],
|
|
6163
|
+
}]
|
|
6164
|
+
}] });
|
|
6165
|
+
;
|
|
6166
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.ts
|
|
6167
|
+
|
|
6168
|
+
;
|
|
6169
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.ts
|
|
6170
|
+
|
|
6171
|
+
class TaonAdminModeConfigurationModule {
|
|
6172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
6173
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, declarations: [TaonAdminModeConfigurationComponent], imports: [CommonModule,
|
|
6174
|
+
StaticColumnsModule,
|
|
6175
|
+
FormsModule,
|
|
6176
|
+
NgScrollbarModule,
|
|
6177
|
+
TaonAdminEditModeModule,
|
|
6178
|
+
TaonProgressBarModule,
|
|
6179
|
+
TaonNotificationsModule,
|
|
6180
|
+
TaonFullMaterialModule, // TODO import only partial things
|
|
6181
|
+
TaonSessionPasscodeComponent], exports: [TaonAdminModeConfigurationComponent] }); }
|
|
6182
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, imports: [CommonModule,
|
|
6183
|
+
StaticColumnsModule,
|
|
6184
|
+
FormsModule,
|
|
6185
|
+
NgScrollbarModule,
|
|
6186
|
+
TaonAdminEditModeModule,
|
|
6187
|
+
TaonProgressBarModule,
|
|
6188
|
+
TaonNotificationsModule,
|
|
6189
|
+
TaonFullMaterialModule, // TODO import only partial things
|
|
6190
|
+
TaonSessionPasscodeComponent] }); }
|
|
6191
|
+
}
|
|
6192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: TaonAdminModeConfigurationModule, decorators: [{
|
|
6193
|
+
type: NgModule,
|
|
6194
|
+
args: [{
|
|
6195
|
+
imports: [
|
|
6196
|
+
CommonModule,
|
|
6197
|
+
StaticColumnsModule,
|
|
6198
|
+
FormsModule,
|
|
6199
|
+
NgScrollbarModule,
|
|
6200
|
+
TaonAdminEditModeModule,
|
|
6201
|
+
TaonProgressBarModule,
|
|
6202
|
+
TaonNotificationsModule,
|
|
6203
|
+
TaonFullMaterialModule, // TODO import only partial things
|
|
6204
|
+
TaonSessionPasscodeComponent,
|
|
6205
|
+
],
|
|
6206
|
+
declarations: [TaonAdminModeConfigurationComponent],
|
|
6207
|
+
exports: [TaonAdminModeConfigurationComponent],
|
|
6208
|
+
}]
|
|
6209
|
+
}] });
|
|
6210
|
+
;
|
|
6211
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.ts
|
|
6212
|
+
|
|
6213
|
+
;
|
|
6214
|
+
({}); // @--end-of-file-for-module=taon lib/ui/taon-admin-mode-configuration/index.ts
|
|
6215
|
+
|
|
6216
|
+
;
|
|
6217
|
+
({}); // @--end-of-file-for-module=taon lib/ui/index.ts
|
|
6218
|
+
|
|
6219
|
+
;
|
|
6220
|
+
({}); // @--end-of-file-for-module=taon lib/constants.ts
|
|
6221
|
+
|
|
6222
|
+
var Taon;
|
|
6223
|
+
(function (Taon) {
|
|
6224
|
+
Taon.Http = Http;
|
|
6225
|
+
Taon.Base = Base;
|
|
6226
|
+
Taon.getResponseValue = getResponseValue;
|
|
6227
|
+
Taon.Controller = TaonController;
|
|
6228
|
+
Taon.Entity = TaonEntity;
|
|
6229
|
+
Taon.Provider = TaonProvider;
|
|
6230
|
+
Taon.Repository = TaonRepository;
|
|
6231
|
+
Taon.Subscriber = TaonSubscriber;
|
|
4855
6232
|
Taon.isBrowser = coreHelpers.Helpers.isBrowser;
|
|
4856
|
-
/**
|
|
4857
|
-
* @deprecated
|
|
4858
|
-
*/
|
|
4859
6233
|
Taon.isNode = coreHelpers.Helpers.isNode;
|
|
4860
|
-
/**
|
|
4861
|
-
* @deprecated
|
|
4862
|
-
*/
|
|
4863
6234
|
Taon.isWebSQL = coreHelpers.Helpers.isWebSQL;
|
|
4864
|
-
/**
|
|
4865
|
-
* @deprecated
|
|
4866
|
-
*/
|
|
4867
6235
|
Taon.isElectron = coreHelpers.Helpers.isElectron;
|
|
4868
6236
|
Taon.createContext = createContext;
|
|
4869
6237
|
Taon.inject = inject;
|
|
@@ -4897,5 +6265,5 @@ var Taon;
|
|
|
4897
6265
|
* Generated bundle index. Do not edit.
|
|
4898
6266
|
*/
|
|
4899
6267
|
|
|
4900
|
-
export { BaseContext, BaseController, BaseEntity, BaseProvider, BaseRepository,
|
|
4901
|
-
//# sourceMappingURL=taon.mjs.map
|
|
6268
|
+
export { BaseContext, BaseController, BaseEntity, BaseProvider, BaseRepository, ClassHelpers, Models, SafePipe, Taon, TaonAdminModeConfigurationComponent, TaonAdminModeConfigurationModule, TaonAdminService, TaonFullMaterialModule, TaonGithubForkMeCornerComponent, TaonGithubForkMeCornerModule, TaonInjectHTMLDirective, TaonLongPress, TaonNotificationOptions, TaonNotificationsComponent, TaonNotificationsModule, TaonNotificationsService, TaonProgressBarComponent, TaonProgressBarModule, TaonSessionPasscodeComponent, TaonTableComponent, TaonTableModule, createContext, inject };
|
|
6269
|
+
//# sourceMappingURL=taon.mjs.map
|