Compare commits

..

4 Commits

Author SHA1 Message Date
d92123dcb9 2.0.24 2022-01-24 07:37:53 +01:00
5d8f569339 fix(core): update 2022-01-24 07:37:52 +01:00
7168bd7ffd 2.0.23 2022-01-24 07:30:55 +01:00
5031d28c32 fix(core): update 2022-01-24 07:30:54 +01:00
6 changed files with 16 additions and 11 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@pushrocks/smartrx", "name": "@pushrocks/smartrx",
"version": "2.0.22", "version": "2.0.24",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@pushrocks/smartrx", "name": "@pushrocks/smartrx",
"version": "2.0.22", "version": "2.0.24",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@pushrocks/lik": "^5.0.1", "@pushrocks/lik": "^5.0.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartrx", "name": "@pushrocks/smartrx",
"version": "2.0.22", "version": "2.0.24",
"private": false, "private": false,
"description": "smart wrapper for rxjs", "description": "smart wrapper for rxjs",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -1,4 +1,7 @@
import * as plugins from './smartrx.plugins'; import * as plugins from './smartrx.plugins';
export * from './smartrx.classes.observablemap'; export * from './smartrx.classes.observablemap';
export * from './smartrx.classes.observableintake'; export * from './smartrx.classes.observableintake';
export * from './smartrx.plugins.rxjs'; import * as rxjs from './smartrx.plugins.rxjs';
export {
rxjs
}

View File

@ -1,10 +1,12 @@
import * as plugins from './smartrx.plugins'; import * as plugins from './smartrx.plugins';
import * as rxjs from './smartrx.plugins.rxjs';
/** /**
* ObservableIntake * ObservableIntake
*/ */
export class ObservableIntake<T> { export class ObservableIntake<T> {
public observable: plugins.rxjs.Observable<T>; public observable: rxjs.Observable<T>;
public completed: Promise<void>; public completed: Promise<void>;
private completedDeffered: plugins.smartpromise.Deferred<void>; private completedDeffered: plugins.smartpromise.Deferred<void>;
private observableFunctions: any = { private observableFunctions: any = {
@ -20,7 +22,7 @@ export class ObservableIntake<T> {
private payloadBuffer: any[] = []; private payloadBuffer: any[] = [];
constructor() { constructor() {
this.observable = plugins.rxjs.Observable.create((observerArg: plugins.rxjs.Observer<any>) => { this.observable = rxjs.Observable.create((observerArg: rxjs.Observer<any>) => {
this.observableFunctions.next = (...args: any) => { this.observableFunctions.next = (...args: any) => {
return observerArg.next(args); return observerArg.next(args);
}; };
@ -33,7 +35,7 @@ export class ObservableIntake<T> {
this.completed = this.completedDeffered.promise; this.completed = this.completedDeffered.promise;
} }
public setObservable(observableFunc: plugins.rxjs.Observable<any>) { public setObservable(observableFunc: rxjs.Observable<any>) {
this.observable = observableFunc; this.observable = observableFunc;
} }

View File

@ -1,4 +1,5 @@
import * as plugins from './smartrx.plugins'; import * as plugins from './smartrx.plugins';
import * as rxjs from './smartrx.plugins.rxjs';
export interface IEventEmitter<T = any> { export interface IEventEmitter<T = any> {
on: (eventNameArg: string, eventHandlerArg: (eventPayload: T) => any) => void; on: (eventNameArg: string, eventHandlerArg: (eventPayload: T) => any) => void;
@ -8,7 +9,7 @@ export interface IEventEmitter<T = any> {
* bundles an observable with an emitter * bundles an observable with an emitter
*/ */
export interface IObservableEmitterBundle { export interface IObservableEmitterBundle {
observable: plugins.rxjs.Observable<any>; observable: rxjs.Observable<any>;
emitter: IEventEmitter<unknown>; emitter: IEventEmitter<unknown>;
event: string; event: string;
} }
@ -30,7 +31,7 @@ export class Observablemap {
if (existingBundle) { if (existingBundle) {
return existingBundle.observable; return existingBundle.observable;
} else { } else {
const emitterObservable = plugins.rxjs.fromEvent<T>(emitterArg as any, eventArg); const emitterObservable = rxjs.fromEvent<T>(emitterArg as any, eventArg);
this.observableEmitterBundleObjectmap.add({ this.observableEmitterBundleObjectmap.add({
observable: emitterObservable, observable: emitterObservable,
emitter: emitterArg, emitter: emitterArg,

View File

@ -1,5 +1,4 @@
import * as lik from '@pushrocks/lik'; import * as lik from '@pushrocks/lik';
import * as rxjs from './smartrx.plugins.rxjs';
import * as smartpromise from '@pushrocks/smartpromise'; import * as smartpromise from '@pushrocks/smartpromise';
export { lik, rxjs, smartpromise }; export { lik, smartpromise };