UNPKG

ngx-bootstrap

Version:
1 lines 9.82 kB
{"version":3,"file":"ngx-bootstrap-mini-ngrx.mjs","sources":["../tmp-esm2022/state.class.js","../tmp-esm2022/store.class.js","../tmp-esm2022/ngx-bootstrap-mini-ngrx.js"],"sourcesContent":["import { BehaviorSubject, queueScheduler } from 'rxjs';\nimport { observeOn, scan } from 'rxjs/operators';\nexport class MiniState extends BehaviorSubject {\n constructor(_initialState, actionsDispatcher$, reducer) {\n super(_initialState);\n const actionInQueue$ = actionsDispatcher$.pipe(observeOn(queueScheduler));\n const state$ = actionInQueue$.pipe(scan((state, action) => {\n if (!action) {\n return state;\n }\n return reducer(state, action);\n }, _initialState));\n state$.subscribe((value) => this.next(value));\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RhdGUuY2xhc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWluaS1uZ3J4L3N0YXRlLmNsYXNzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE9BQU8sRUFBRSxlQUFlLEVBQWMsY0FBYyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ25FLE9BQU8sRUFBRSxTQUFTLEVBQUUsSUFBSSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFHakQsTUFBTSxPQUFPLFNBQWEsU0FBUSxlQUFrQjtJQUNsRCxZQUNFLGFBQWdCLEVBQ2hCLGtCQUFzQyxFQUN0QyxPQUF5QjtRQUV6QixLQUFLLENBQUMsYUFBYSxDQUFDLENBQUM7UUFFckIsTUFBTSxjQUFjLEdBQUcsa0JBQWtCLENBQUMsSUFBSSxDQUM1QyxTQUFTLENBQUMsY0FBYyxDQUFDLENBQzFCLENBQUM7UUFDRixNQUFNLE1BQU0sR0FBRyxjQUFjLENBQUMsSUFBSSxDQUNoQyxJQUFJLENBQUMsQ0FBQyxLQUFRLEVBQUUsTUFBYyx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JCA9IGFjdGlvbkluUXVldWUkLnBpcGUoXG4gICAgICBzY2FuKChzdGF0ZTogVCwgYWN0aW9uOiBBY3Rpb24pID0+IHtcbiAgICAgICAgaWYgKCFhY3Rpb24pIHtcbiAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVkdWNlcihzdGF0ZSwgYWN0aW9uKTtcbiAgICAgIH0sXG4gICAgICBfaW5pdGlhbFN0YXRlXG4gICAgKSk7XG5cbiAgICBzdGF0ZSQuc3Vic2NyaWJlKCh2YWx1ZTogVCkgPT4gdGhpcy5uZXh0KHZhbHVlKSk7XG4gIH1cbn1cbiJdfQ==","/**\n * @copyright ngrx\n */\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, map } from 'rxjs/operators';\nexport class MiniStore extends Observable {\n constructor(_dispatcher, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _reducer, \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n state$) {\n super();\n this._dispatcher = _dispatcher;\n this._reducer = _reducer;\n this.source = state$;\n }\n select(pathOrMapFn) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const mapped$ = this.source?.pipe(map(pathOrMapFn)) || new Observable().pipe(map(pathOrMapFn));\n return mapped$.pipe(distinctUntilChanged());\n }\n lift(operator) {\n const store = new MiniStore(this._dispatcher, this._reducer, this);\n store.operator = operator;\n return store;\n }\n dispatch(action) {\n this._dispatcher.next(action);\n }\n next(action) {\n this._dispatcher.next(action);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error(err) {\n this._dispatcher.error(err);\n }\n complete() {\n /*noop*/\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmUuY2xhc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWluaS1uZ3J4L3N0b3JlLmNsYXNzLn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LWRpc2FibGUtbmV4dC1saW5lIEB0eXBlc2NyaXB0LWVzbGludC9uby1leHBsaWNpdC1hbnlcbiAgZXJyb3IoZXJyOiBhbnkpIHtcbiAgICB0aGlzLl9kaXNwYXRjaGVyLmVycm9yKGVycik7XG4gIH1cblxuICBjb21wbGV0ZSgpIHtcbiAgICAvKm5vb3AqL1xuICB9XG59XG4iXX0=","/**\n * Generated bundle index. Do not edit.\n */\nexport * from './index';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWJvb3RzdHJhcC1taW5pLW5ncnguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbWluaS1uZ3J4L25neC1ib290c3RyYXAtbWluaS1uZ3J4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19"],"names":[],"mappings":";;;AAEO,MAAM,SAAS,SAAS,eAAe,CAAC;AAC/C,IAAI,WAAW,CAAC,aAAa,EAAE,kBAAkB,EAAE,OAAO,EAAE;AAC5D,QAAQ,KAAK,CAAC,aAAa,CAAC;AAC5B,QAAQ,MAAM,cAAc,GAAG,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;AACjF,QAAQ,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK;AACnE,YAAY,IAAI,CAAC,MAAM,EAAE;AACzB,gBAAgB,OAAO,KAAK;AAC5B;AACA,YAAY,OAAO,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC;AACzC,SAAS,EAAE,aAAa,CAAC,CA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