taon 19.0.26 → 19.0.29
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/browser/fesm2022/taon.mjs +110 -100
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-angular-service.d.ts +1 -0
- package/browser/lib/endpoint-context.d.ts +1 -1
- package/browser/package.json +1 -1
- package/client/fesm2022/taon.mjs +110 -100
- package/client/fesm2022/taon.mjs.map +1 -1
- package/client/lib/base-classes/base-angular-service.d.ts +1 -0
- package/client/lib/endpoint-context.d.ts +1 -1
- package/client/package.json +1 -1
- package/lib/base-classes/base-angular-service.d.ts +1 -0
- package/lib/base-classes/base-angular-service.js +9 -0
- package/lib/base-classes/base-angular-service.js.map +1 -1
- package/lib/base-classes/base-repository copy.d.ts +255 -0
- package/lib/base-classes/base-repository copy.js +653 -0
- package/lib/base-classes/base-repository copy.js.map +1 -0
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/create-context.js +1 -1
- package/lib/create-context.js.map +1 -1
- package/lib/endpoint-context.d.ts +1 -1
- package/lib/endpoint-context.js +7 -6
- package/lib/endpoint-context.js.map +1 -1
- package/lib/ui/directives/index.js +2 -2
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.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-session-passcode/index.js +2 -2
- package/lib/ui/taon-table/index.js +2 -2
- package/package.json +1 -1
- package/scss/index.scss +1 -1
- package/scss/lib/index.scss +2 -1
- package/scss/lib/ui/taon.scss +1 -1
- package/tmp-environment.json +4 -8
- package/websql/fesm2022/taon.mjs +110 -100
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-angular-service.d.ts +1 -0
- package/websql/lib/endpoint-context.d.ts +1 -1
- package/websql/package.json +1 -1
- package/assets/shared/logo-header-admin-mode.png +0 -0
- 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-abstract-mock.d.ts +0 -10
- package/lib/realtime/realtime-strategy/realtime-abstract-mock.js +0 -214
- package/lib/realtime/realtime-strategy/realtime-abstract-mock.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/index.js.map +0 -1
- 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/lib/ui/directives/firedev-inject-html.directive.d.ts +0 -6
- package/lib/ui/directives/firedev-long-press.directive.d.ts +0 -22
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +0 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +0 -5
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js.map +0 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +0 -29
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +0 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.d.ts +0 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +0 -5
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js.map +0 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +0 -8
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +0 -2
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +0 -5
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js.map +0 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +0 -13
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +0 -2
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +0 -5
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js +0 -3
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js.map +0 -1
- package/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +0 -14
- package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +0 -2
- package/lib/ui/toan-full-material.module.d.ts +0 -2
|
@@ -10,7 +10,6 @@ import * as JSON5 from 'json5';
|
|
|
10
10
|
import * as i0 from '@angular/core';
|
|
11
11
|
import { InjectionToken, inject as inject$1, Injectable } from '@angular/core';
|
|
12
12
|
import axios from 'axios';
|
|
13
|
-
import { ipcRenderer } from 'electron';
|
|
14
13
|
import { JSON10 } from 'json10/browser';
|
|
15
14
|
import { Observable, from, Subject } from 'rxjs';
|
|
16
15
|
import { io } from 'socket.io-client';
|
|
@@ -762,6 +761,95 @@ let CURRENT_HOST_BACKEND_PORT;
|
|
|
762
761
|
//#region @browser
|
|
763
762
|
CURRENT_HOST_BACKEND_PORT = new InjectionToken('CURRENT_HOST_BACKEND_PORT');
|
|
764
763
|
|
|
764
|
+
const inject = (entity) => {
|
|
765
|
+
return new Proxy({}, {
|
|
766
|
+
get: (_, propName) => {
|
|
767
|
+
if (propName === 'hasOwnProperty') {
|
|
768
|
+
return () => false;
|
|
769
|
+
}
|
|
770
|
+
const ctor = entity();
|
|
771
|
+
const contextFromClass = ctor[Symbols.ctxInClassOrClassObj];
|
|
772
|
+
const resultContext = contextFromClass;
|
|
773
|
+
if (resultContext) {
|
|
774
|
+
let instance = resultContext.inject(ctor, {
|
|
775
|
+
parentInstanceThatWillGetInjectedStuff: this,
|
|
776
|
+
});
|
|
777
|
+
// console.log('instance', instance);
|
|
778
|
+
if (propName === 'getOriginalPrototype') {
|
|
779
|
+
return () => Object.getPrototypeOf(instance);
|
|
780
|
+
}
|
|
781
|
+
if (propName === 'getOriginalConstructor') {
|
|
782
|
+
return () => instance.constructor;
|
|
783
|
+
}
|
|
784
|
+
const methods = ctor[Symbols.classMethodsNames] || [];
|
|
785
|
+
const isMethods = methods.includes(propName);
|
|
786
|
+
const methodOrProperty = isMethods
|
|
787
|
+
? instance[propName].bind(instance)
|
|
788
|
+
: instance[propName];
|
|
789
|
+
// console.log(
|
|
790
|
+
// `methodOrProperty from proxy ${propName?.toString()} = isMethods:${isMethods}`,
|
|
791
|
+
// methods,
|
|
792
|
+
// );
|
|
793
|
+
return methodOrProperty;
|
|
794
|
+
}
|
|
795
|
+
},
|
|
796
|
+
});
|
|
797
|
+
};
|
|
798
|
+
// export const injectController = inject;
|
|
799
|
+
// export type SubscriptionEvent<T> = {
|
|
800
|
+
// name: keyof T;
|
|
801
|
+
// data: any;
|
|
802
|
+
// };
|
|
803
|
+
/**
|
|
804
|
+
* TODO
|
|
805
|
+
*/
|
|
806
|
+
// export const injectEntityEvents = <T>(
|
|
807
|
+
// subscriberClassResolveFn: () => new (...args: any[]) => T,
|
|
808
|
+
// eventName?: keyof Omit<EntitySubscriberInterface,'listenTo'> ,
|
|
809
|
+
// ): Observable<SubscriptionEvent<T>> => {
|
|
810
|
+
// const eventsSrc = new Subject<SubscriptionEvent<T>>();
|
|
811
|
+
// const obs = eventsSrc.asObservable();
|
|
812
|
+
// let isFirstSubscription = true;
|
|
813
|
+
// const proxyObservable = new Proxy(obs, {
|
|
814
|
+
// get(target, prop, receiver) {
|
|
815
|
+
// if (prop === 'subscribe') {
|
|
816
|
+
// return (...args: any[]) => {
|
|
817
|
+
// if (isFirstSubscription) {
|
|
818
|
+
// isFirstSubscription = false;
|
|
819
|
+
// const subscriberClassFN: typeof BaseClass =
|
|
820
|
+
// subscriberClassResolveFn() as any;
|
|
821
|
+
// const ctx = subscriberClassFN[
|
|
822
|
+
// Symbols.ctxInClassOrClassObj
|
|
823
|
+
// ] as EndpointContext;
|
|
824
|
+
// if (!ctx) {
|
|
825
|
+
// throw new Error(
|
|
826
|
+
// `You are trying to inject class without context. Use context like this:
|
|
827
|
+
// class MyClassSubscriber extends BaseSubscriber {
|
|
828
|
+
// ${eventName as any}() {
|
|
829
|
+
// \/\/ your code here
|
|
830
|
+
// }
|
|
831
|
+
// }
|
|
832
|
+
// Taon.injectSubscriberEvents( MyContext.getInstance(()=> MyClassSubscriber), '${eventName as any}' )
|
|
833
|
+
// `,
|
|
834
|
+
// );
|
|
835
|
+
// }
|
|
836
|
+
// const subscriberInstance = ctx.getInstanceBy(subscriberClassFN);
|
|
837
|
+
// // subscriberInstance TODO @LAST subscriber event from instance
|
|
838
|
+
// // const entity = subscriberClassFN.prototype.listenTo();
|
|
839
|
+
// console.log('First subscription, you can access arguments here:', {
|
|
840
|
+
// subscriberClassFN,
|
|
841
|
+
// eventName,
|
|
842
|
+
// });
|
|
843
|
+
// }
|
|
844
|
+
// return target.subscribe(...args);
|
|
845
|
+
// };
|
|
846
|
+
// }
|
|
847
|
+
// return Reflect.get(target, prop, receiver);
|
|
848
|
+
// },
|
|
849
|
+
// });
|
|
850
|
+
// return proxyObservable as Observable<SubscriptionEvent<T>>;
|
|
851
|
+
// };
|
|
852
|
+
|
|
765
853
|
/**
|
|
766
854
|
* TODO prevent calling methods when not initialized
|
|
767
855
|
* with init(ctx)
|
|
@@ -773,7 +861,9 @@ class BaseAngularsService {
|
|
|
773
861
|
//#region @browser
|
|
774
862
|
this.currentContext = inject$1(TAON_CONTEXT);
|
|
775
863
|
//#region @browser
|
|
776
|
-
this.CURRENT_HOST_BACKEND_PORT = inject$1(CURRENT_HOST_BACKEND_PORT
|
|
864
|
+
this.CURRENT_HOST_BACKEND_PORT = inject$1(CURRENT_HOST_BACKEND_PORT, {
|
|
865
|
+
optional: true,
|
|
866
|
+
});
|
|
777
867
|
// #endregion
|
|
778
868
|
}
|
|
779
869
|
/**
|
|
@@ -784,10 +874,17 @@ class BaseAngularsService {
|
|
|
784
874
|
get host() {
|
|
785
875
|
return `http://localhost:${this.CURRENT_HOST_BACKEND_PORT}`;
|
|
786
876
|
}
|
|
787
|
-
|
|
788
|
-
|
|
877
|
+
injectController(ctor) {
|
|
878
|
+
let currentContext;
|
|
879
|
+
//#region @browser
|
|
880
|
+
currentContext = this.currentContext;
|
|
881
|
+
//#endregion
|
|
882
|
+
return inject(() => currentContext.getClass(ctor));
|
|
883
|
+
}
|
|
884
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: BaseAngularsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
885
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: BaseAngularsService }); }
|
|
789
886
|
}
|
|
790
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
|
887
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.7", ngImport: i0, type: BaseAngularsService, decorators: [{
|
|
791
888
|
type: Injectable
|
|
792
889
|
}], ctorParameters: () => [] });
|
|
793
890
|
|
|
@@ -3631,7 +3728,7 @@ class EndpointContext {
|
|
|
3631
3728
|
}
|
|
3632
3729
|
//#endregion
|
|
3633
3730
|
//#region methods & getters / initialize metadata
|
|
3634
|
-
initControllers() {
|
|
3731
|
+
async initControllers() {
|
|
3635
3732
|
if (this.isRunOrRevertOnlyMigrationAppStart) {
|
|
3636
3733
|
return;
|
|
3637
3734
|
}
|
|
@@ -3682,7 +3779,8 @@ class EndpointContext {
|
|
|
3682
3779
|
/* */
|
|
3683
3780
|
/* */
|
|
3684
3781
|
// console.log('methods', classConfig.methods);
|
|
3685
|
-
Object.keys(classConfig.methods)
|
|
3782
|
+
const methodNames = Object.keys(classConfig.methods);
|
|
3783
|
+
for (const methodName of methodNames) {
|
|
3686
3784
|
const methodConfig = classConfig.methods[methodName];
|
|
3687
3785
|
// debugger
|
|
3688
3786
|
const type = methodConfig.type;
|
|
@@ -3716,9 +3814,9 @@ class EndpointContext {
|
|
|
3716
3814
|
// methodConfig,
|
|
3717
3815
|
// expressPath,
|
|
3718
3816
|
// );
|
|
3719
|
-
this.initClient(controllerClassFn, type, methodConfig, expressPath);
|
|
3817
|
+
await this.initClient(controllerClassFn, type, methodConfig, expressPath);
|
|
3720
3818
|
}
|
|
3721
|
-
}
|
|
3819
|
+
}
|
|
3722
3820
|
/* */
|
|
3723
3821
|
/* */
|
|
3724
3822
|
this.logHttp && console.groupEnd();
|
|
@@ -4177,7 +4275,7 @@ class EndpointContext {
|
|
|
4177
4275
|
/**
|
|
4178
4276
|
* client can be browser or nodejs (when remote host)
|
|
4179
4277
|
*/
|
|
4180
|
-
initClient(
|
|
4278
|
+
async initClient(
|
|
4181
4279
|
//#region parameters
|
|
4182
4280
|
target, type, methodConfig, expressPath) {
|
|
4183
4281
|
const ctx = this;
|
|
@@ -4197,6 +4295,7 @@ class EndpointContext {
|
|
|
4197
4295
|
const orgMethods = target.prototype[methodConfig.methodName];
|
|
4198
4296
|
//#region handle electron ipc request
|
|
4199
4297
|
if (Helpers.isElectron) {
|
|
4298
|
+
const ipcRenderer = window.require('electron').ipcRenderer;
|
|
4200
4299
|
target.prototype[methodConfig.methodName] = function (...args) {
|
|
4201
4300
|
const received = new Promise(async (resolve, reject) => {
|
|
4202
4301
|
const headers = {};
|
|
@@ -4708,7 +4807,7 @@ const createContext = (configFn) => {
|
|
|
4708
4807
|
// endpointContextRef?.connection?.subscribers,
|
|
4709
4808
|
// );
|
|
4710
4809
|
// debugger;
|
|
4711
|
-
endpointContextRef.initControllers();
|
|
4810
|
+
await endpointContextRef.initControllers();
|
|
4712
4811
|
await endpointContextRef.startServer();
|
|
4713
4812
|
/* */
|
|
4714
4813
|
/* */
|
|
@@ -6298,95 +6397,6 @@ var Http;
|
|
|
6298
6397
|
})(Param = Http.Param || (Http.Param = {}));
|
|
6299
6398
|
})(Http || (Http = {}));
|
|
6300
6399
|
|
|
6301
|
-
const inject = (entity) => {
|
|
6302
|
-
return new Proxy({}, {
|
|
6303
|
-
get: (_, propName) => {
|
|
6304
|
-
if (propName === 'hasOwnProperty') {
|
|
6305
|
-
return () => false;
|
|
6306
|
-
}
|
|
6307
|
-
const ctor = entity();
|
|
6308
|
-
const contextFromClass = ctor[Symbols.ctxInClassOrClassObj];
|
|
6309
|
-
const resultContext = contextFromClass;
|
|
6310
|
-
if (resultContext) {
|
|
6311
|
-
let instance = resultContext.inject(ctor, {
|
|
6312
|
-
parentInstanceThatWillGetInjectedStuff: this,
|
|
6313
|
-
});
|
|
6314
|
-
// console.log('instance', instance);
|
|
6315
|
-
if (propName === 'getOriginalPrototype') {
|
|
6316
|
-
return () => Object.getPrototypeOf(instance);
|
|
6317
|
-
}
|
|
6318
|
-
if (propName === 'getOriginalConstructor') {
|
|
6319
|
-
return () => instance.constructor;
|
|
6320
|
-
}
|
|
6321
|
-
const methods = ctor[Symbols.classMethodsNames] || [];
|
|
6322
|
-
const isMethods = methods.includes(propName);
|
|
6323
|
-
const methodOrProperty = isMethods
|
|
6324
|
-
? instance[propName].bind(instance)
|
|
6325
|
-
: instance[propName];
|
|
6326
|
-
// console.log(
|
|
6327
|
-
// `methodOrProperty from proxy ${propName?.toString()} = isMethods:${isMethods}`,
|
|
6328
|
-
// methods,
|
|
6329
|
-
// );
|
|
6330
|
-
return methodOrProperty;
|
|
6331
|
-
}
|
|
6332
|
-
},
|
|
6333
|
-
});
|
|
6334
|
-
};
|
|
6335
|
-
// export const injectController = inject;
|
|
6336
|
-
// export type SubscriptionEvent<T> = {
|
|
6337
|
-
// name: keyof T;
|
|
6338
|
-
// data: any;
|
|
6339
|
-
// };
|
|
6340
|
-
/**
|
|
6341
|
-
* TODO
|
|
6342
|
-
*/
|
|
6343
|
-
// export const injectEntityEvents = <T>(
|
|
6344
|
-
// subscriberClassResolveFn: () => new (...args: any[]) => T,
|
|
6345
|
-
// eventName?: keyof Omit<EntitySubscriberInterface,'listenTo'> ,
|
|
6346
|
-
// ): Observable<SubscriptionEvent<T>> => {
|
|
6347
|
-
// const eventsSrc = new Subject<SubscriptionEvent<T>>();
|
|
6348
|
-
// const obs = eventsSrc.asObservable();
|
|
6349
|
-
// let isFirstSubscription = true;
|
|
6350
|
-
// const proxyObservable = new Proxy(obs, {
|
|
6351
|
-
// get(target, prop, receiver) {
|
|
6352
|
-
// if (prop === 'subscribe') {
|
|
6353
|
-
// return (...args: any[]) => {
|
|
6354
|
-
// if (isFirstSubscription) {
|
|
6355
|
-
// isFirstSubscription = false;
|
|
6356
|
-
// const subscriberClassFN: typeof BaseClass =
|
|
6357
|
-
// subscriberClassResolveFn() as any;
|
|
6358
|
-
// const ctx = subscriberClassFN[
|
|
6359
|
-
// Symbols.ctxInClassOrClassObj
|
|
6360
|
-
// ] as EndpointContext;
|
|
6361
|
-
// if (!ctx) {
|
|
6362
|
-
// throw new Error(
|
|
6363
|
-
// `You are trying to inject class without context. Use context like this:
|
|
6364
|
-
// class MyClassSubscriber extends BaseSubscriber {
|
|
6365
|
-
// ${eventName as any}() {
|
|
6366
|
-
// \/\/ your code here
|
|
6367
|
-
// }
|
|
6368
|
-
// }
|
|
6369
|
-
// Taon.injectSubscriberEvents( MyContext.getInstance(()=> MyClassSubscriber), '${eventName as any}' )
|
|
6370
|
-
// `,
|
|
6371
|
-
// );
|
|
6372
|
-
// }
|
|
6373
|
-
// const subscriberInstance = ctx.getInstanceBy(subscriberClassFN);
|
|
6374
|
-
// // subscriberInstance TODO @LAST subscriber event from instance
|
|
6375
|
-
// // const entity = subscriberClassFN.prototype.listenTo();
|
|
6376
|
-
// console.log('First subscription, you can access arguments here:', {
|
|
6377
|
-
// subscriberClassFN,
|
|
6378
|
-
// eventName,
|
|
6379
|
-
// });
|
|
6380
|
-
// }
|
|
6381
|
-
// return target.subscribe(...args);
|
|
6382
|
-
// };
|
|
6383
|
-
// }
|
|
6384
|
-
// return Reflect.get(target, prop, receiver);
|
|
6385
|
-
// },
|
|
6386
|
-
// });
|
|
6387
|
-
// return proxyObservable as Observable<SubscriptionEvent<T>>;
|
|
6388
|
-
// };
|
|
6389
|
-
|
|
6390
6400
|
// TODO export all things
|
|
6391
6401
|
var Taon;
|
|
6392
6402
|
(function (Taon) {
|