@runopencode/rx-stencil 0.4.0

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.
Files changed (116) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +39 -0
  3. package/dist/cjs/index-5f6f12ab.js +1265 -0
  4. package/dist/cjs/index-5f6f12ab.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +572 -0
  6. package/dist/cjs/index.cjs.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +15 -0
  8. package/dist/cjs/loader.cjs.js.map +1 -0
  9. package/dist/cjs/rx-async.cjs.entry.js +71 -0
  10. package/dist/cjs/rx-async.cjs.entry.js.map +1 -0
  11. package/dist/cjs/rx-stencil.cjs.js +25 -0
  12. package/dist/cjs/rx-stencil.cjs.js.map +1 -0
  13. package/dist/cjs/set-property-88176225.js +1167 -0
  14. package/dist/cjs/set-property-88176225.js.map +1 -0
  15. package/dist/collection/collection-manifest.json +12 -0
  16. package/dist/collection/components/async/async.js +67 -0
  17. package/dist/collection/components/async/async.js.map +1 -0
  18. package/dist/collection/components/async/async.scss +3 -0
  19. package/dist/collection/index.js +3 -0
  20. package/dist/collection/index.js.map +1 -0
  21. package/dist/collection/rx/decorator/index.js +3 -0
  22. package/dist/collection/rx/decorator/index.js.map +1 -0
  23. package/dist/collection/rx/decorator/query-selector-all.js +41 -0
  24. package/dist/collection/rx/decorator/query-selector-all.js.map +1 -0
  25. package/dist/collection/rx/decorator/query-selector.js +54 -0
  26. package/dist/collection/rx/decorator/query-selector.js.map +1 -0
  27. package/dist/collection/rx/index.js +5 -0
  28. package/dist/collection/rx/index.js.map +1 -0
  29. package/dist/collection/rx/observable/index.js +4 -0
  30. package/dist/collection/rx/observable/index.js.map +1 -0
  31. package/dist/collection/rx/observable/mutation-observable.js +13 -0
  32. package/dist/collection/rx/observable/mutation-observable.js.map +1 -0
  33. package/dist/collection/rx/observable/property-observable.js +28 -0
  34. package/dist/collection/rx/observable/property-observable.js.map +1 -0
  35. package/dist/collection/rx/observable/render-observable.js +24 -0
  36. package/dist/collection/rx/observable/render-observable.js.map +1 -0
  37. package/dist/collection/rx/operator/index.js +4 -0
  38. package/dist/collection/rx/operator/index.js.map +1 -0
  39. package/dist/collection/rx/operator/schedule-render.js +23 -0
  40. package/dist/collection/rx/operator/schedule-render.js.map +1 -0
  41. package/dist/collection/rx/operator/to-property.js +19 -0
  42. package/dist/collection/rx/operator/to-property.js.map +1 -0
  43. package/dist/collection/rx/operator/until-disconnected.js +105 -0
  44. package/dist/collection/rx/operator/until-disconnected.js.map +1 -0
  45. package/dist/collection/rx/subscriber/index.js +2 -0
  46. package/dist/collection/rx/subscriber/index.js.map +1 -0
  47. package/dist/collection/rx/subscriber/set-property.js +16 -0
  48. package/dist/collection/rx/subscriber/set-property.js.map +1 -0
  49. package/dist/collection/utils/get-property-descriptor.js +18 -0
  50. package/dist/collection/utils/get-property-descriptor.js.map +1 -0
  51. package/dist/collection/utils/index.js +2 -0
  52. package/dist/collection/utils/index.js.map +1 -0
  53. package/dist/components/index.d.ts +33 -0
  54. package/dist/components/index.js +562 -0
  55. package/dist/components/index.js.map +1 -0
  56. package/dist/components/rx-async.d.ts +11 -0
  57. package/dist/components/rx-async.js +86 -0
  58. package/dist/components/rx-async.js.map +1 -0
  59. package/dist/components/set-property.js +1150 -0
  60. package/dist/components/set-property.js.map +1 -0
  61. package/dist/esm/index-9102de09.js +1236 -0
  62. package/dist/esm/index-9102de09.js.map +1 -0
  63. package/dist/esm/index.js +561 -0
  64. package/dist/esm/index.js.map +1 -0
  65. package/dist/esm/loader.js +11 -0
  66. package/dist/esm/loader.js.map +1 -0
  67. package/dist/esm/polyfills/core-js.js +11 -0
  68. package/dist/esm/polyfills/dom.js +79 -0
  69. package/dist/esm/polyfills/es5-html-element.js +1 -0
  70. package/dist/esm/polyfills/index.js +34 -0
  71. package/dist/esm/polyfills/system.js +6 -0
  72. package/dist/esm/rx-async.entry.js +67 -0
  73. package/dist/esm/rx-async.entry.js.map +1 -0
  74. package/dist/esm/rx-stencil.js +20 -0
  75. package/dist/esm/rx-stencil.js.map +1 -0
  76. package/dist/esm/set-property-7fa82bef.js +1150 -0
  77. package/dist/esm/set-property-7fa82bef.js.map +1 -0
  78. package/dist/index.cjs.js +1 -0
  79. package/dist/index.js +1 -0
  80. package/dist/rx-stencil/index.esm.js +2 -0
  81. package/dist/rx-stencil/index.esm.js.map +1 -0
  82. package/dist/rx-stencil/p-01af4414.entry.js +2 -0
  83. package/dist/rx-stencil/p-01af4414.entry.js.map +1 -0
  84. package/dist/rx-stencil/p-0cd0b2da.js +2 -0
  85. package/dist/rx-stencil/p-0cd0b2da.js.map +1 -0
  86. package/dist/rx-stencil/p-8411601b.js +3 -0
  87. package/dist/rx-stencil/p-8411601b.js.map +1 -0
  88. package/dist/rx-stencil/rx-stencil.esm.js +2 -0
  89. package/dist/rx-stencil/rx-stencil.esm.js.map +1 -0
  90. package/dist/types/components/async/async.d.ts +10 -0
  91. package/dist/types/components.d.ts +41 -0
  92. package/dist/types/index.d.ts +2 -0
  93. package/dist/types/rx/decorator/index.d.ts +2 -0
  94. package/dist/types/rx/decorator/query-selector-all.d.ts +22 -0
  95. package/dist/types/rx/decorator/query-selector.d.ts +30 -0
  96. package/dist/types/rx/index.d.ts +4 -0
  97. package/dist/types/rx/observable/index.d.ts +3 -0
  98. package/dist/types/rx/observable/mutation-observable.d.ts +2 -0
  99. package/dist/types/rx/observable/property-observable.d.ts +6 -0
  100. package/dist/types/rx/observable/render-observable.d.ts +8 -0
  101. package/dist/types/rx/operator/index.d.ts +3 -0
  102. package/dist/types/rx/operator/schedule-render.d.ts +12 -0
  103. package/dist/types/rx/operator/to-property.d.ts +9 -0
  104. package/dist/types/rx/operator/until-disconnected.d.ts +7 -0
  105. package/dist/types/rx/subscriber/index.d.ts +1 -0
  106. package/dist/types/rx/subscriber/set-property.d.ts +16 -0
  107. package/dist/types/stencil-public-runtime.d.ts +1652 -0
  108. package/dist/types/utils/get-property-descriptor.d.ts +7 -0
  109. package/dist/types/utils/index.d.ts +1 -0
  110. package/loader/cdn.js +3 -0
  111. package/loader/index.cjs.js +3 -0
  112. package/loader/index.d.ts +21 -0
  113. package/loader/index.es2017.js +3 -0
  114. package/loader/index.js +4 -0
  115. package/loader/package.json +11 -0
  116. package/package.json +42 -0
@@ -0,0 +1,572 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-5f6f12ab.js');
6
+ const setProperty = require('./set-property-88176225.js');
7
+
8
+ const dateTimestampProvider = {
9
+ now() {
10
+ return (dateTimestampProvider.delegate || Date).now();
11
+ },
12
+ delegate: undefined,
13
+ };
14
+
15
+ class ReplaySubject extends setProperty.Subject {
16
+ constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {
17
+ super();
18
+ this._bufferSize = _bufferSize;
19
+ this._windowTime = _windowTime;
20
+ this._timestampProvider = _timestampProvider;
21
+ this._buffer = [];
22
+ this._infiniteTimeWindow = true;
23
+ this._infiniteTimeWindow = _windowTime === Infinity;
24
+ this._bufferSize = Math.max(1, _bufferSize);
25
+ this._windowTime = Math.max(1, _windowTime);
26
+ }
27
+ next(value) {
28
+ const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;
29
+ if (!isStopped) {
30
+ _buffer.push(value);
31
+ !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);
32
+ }
33
+ this._trimBuffer();
34
+ super.next(value);
35
+ }
36
+ _subscribe(subscriber) {
37
+ this._throwIfClosed();
38
+ this._trimBuffer();
39
+ const subscription = this._innerSubscribe(subscriber);
40
+ const { _infiniteTimeWindow, _buffer } = this;
41
+ const copy = _buffer.slice();
42
+ for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {
43
+ subscriber.next(copy[i]);
44
+ }
45
+ this._checkFinalizedStatuses(subscriber);
46
+ return subscription;
47
+ }
48
+ _trimBuffer() {
49
+ const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;
50
+ const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;
51
+ _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);
52
+ if (!_infiniteTimeWindow) {
53
+ const now = _timestampProvider.now();
54
+ let last = 0;
55
+ for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {
56
+ last = i;
57
+ }
58
+ last && _buffer.splice(0, last + 1);
59
+ }
60
+ }
61
+ }
62
+
63
+ function map(project, thisArg) {
64
+ return setProperty.operate((source, subscriber) => {
65
+ let index = 0;
66
+ source.subscribe(setProperty.createOperatorSubscriber(subscriber, (value) => {
67
+ subscriber.next(project.call(thisArg, value, index++));
68
+ }));
69
+ });
70
+ }
71
+
72
+ function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {
73
+ const buffer = [];
74
+ let active = 0;
75
+ let index = 0;
76
+ let isComplete = false;
77
+ const checkComplete = () => {
78
+ if (isComplete && !buffer.length && !active) {
79
+ subscriber.complete();
80
+ }
81
+ };
82
+ const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));
83
+ const doInnerSub = (value) => {
84
+ expand && subscriber.next(value);
85
+ active++;
86
+ let innerComplete = false;
87
+ setProperty.innerFrom(project(value, index++)).subscribe(setProperty.createOperatorSubscriber(subscriber, (innerValue) => {
88
+ onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);
89
+ if (expand) {
90
+ outerNext(innerValue);
91
+ }
92
+ else {
93
+ subscriber.next(innerValue);
94
+ }
95
+ }, () => {
96
+ innerComplete = true;
97
+ }, undefined, () => {
98
+ if (innerComplete) {
99
+ try {
100
+ active--;
101
+ while (buffer.length && active < concurrent) {
102
+ const bufferedValue = buffer.shift();
103
+ if (innerSubScheduler) {
104
+ setProperty.executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));
105
+ }
106
+ else {
107
+ doInnerSub(bufferedValue);
108
+ }
109
+ }
110
+ checkComplete();
111
+ }
112
+ catch (err) {
113
+ subscriber.error(err);
114
+ }
115
+ }
116
+ }));
117
+ };
118
+ source.subscribe(setProperty.createOperatorSubscriber(subscriber, outerNext, () => {
119
+ isComplete = true;
120
+ checkComplete();
121
+ }));
122
+ return () => {
123
+ additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();
124
+ };
125
+ }
126
+
127
+ function mergeMap(project, resultSelector, concurrent = Infinity) {
128
+ if (setProperty.isFunction(resultSelector)) {
129
+ return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(setProperty.innerFrom(project(a, i))), concurrent);
130
+ }
131
+ else if (typeof resultSelector === 'number') {
132
+ concurrent = resultSelector;
133
+ }
134
+ return setProperty.operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));
135
+ }
136
+
137
+ function mergeAll(concurrent = Infinity) {
138
+ return mergeMap(setProperty.identity, concurrent);
139
+ }
140
+
141
+ function concatAll() {
142
+ return mergeAll(1);
143
+ }
144
+
145
+ function concat(...args) {
146
+ return concatAll()(setProperty.from(args, setProperty.popScheduler(args)));
147
+ }
148
+
149
+ function filter(predicate, thisArg) {
150
+ return setProperty.operate((source, subscriber) => {
151
+ let index = 0;
152
+ source.subscribe(setProperty.createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));
153
+ });
154
+ }
155
+
156
+ function share(options = {}) {
157
+ const { connector = () => new setProperty.Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options;
158
+ return (wrapperSource) => {
159
+ let connection;
160
+ let resetConnection;
161
+ let subject;
162
+ let refCount = 0;
163
+ let hasCompleted = false;
164
+ let hasErrored = false;
165
+ const cancelReset = () => {
166
+ resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();
167
+ resetConnection = undefined;
168
+ };
169
+ const reset = () => {
170
+ cancelReset();
171
+ connection = subject = undefined;
172
+ hasCompleted = hasErrored = false;
173
+ };
174
+ const resetAndUnsubscribe = () => {
175
+ const conn = connection;
176
+ reset();
177
+ conn === null || conn === void 0 ? void 0 : conn.unsubscribe();
178
+ };
179
+ return setProperty.operate((source, subscriber) => {
180
+ refCount++;
181
+ if (!hasErrored && !hasCompleted) {
182
+ cancelReset();
183
+ }
184
+ const dest = (subject = subject !== null && subject !== void 0 ? subject : connector());
185
+ subscriber.add(() => {
186
+ refCount--;
187
+ if (refCount === 0 && !hasErrored && !hasCompleted) {
188
+ resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);
189
+ }
190
+ });
191
+ dest.subscribe(subscriber);
192
+ if (!connection &&
193
+ refCount > 0) {
194
+ connection = new setProperty.SafeSubscriber({
195
+ next: (value) => dest.next(value),
196
+ error: (err) => {
197
+ hasErrored = true;
198
+ cancelReset();
199
+ resetConnection = handleReset(reset, resetOnError, err);
200
+ dest.error(err);
201
+ },
202
+ complete: () => {
203
+ hasCompleted = true;
204
+ cancelReset();
205
+ resetConnection = handleReset(reset, resetOnComplete);
206
+ dest.complete();
207
+ },
208
+ });
209
+ setProperty.innerFrom(source).subscribe(connection);
210
+ }
211
+ })(wrapperSource);
212
+ };
213
+ }
214
+ function handleReset(reset, on, ...args) {
215
+ if (on === true) {
216
+ reset();
217
+ return;
218
+ }
219
+ if (on === false) {
220
+ return;
221
+ }
222
+ const onSubscriber = new setProperty.SafeSubscriber({
223
+ next: () => {
224
+ onSubscriber.unsubscribe();
225
+ reset();
226
+ },
227
+ });
228
+ return setProperty.innerFrom(on(...args)).subscribe(onSubscriber);
229
+ }
230
+
231
+ function shareReplay(configOrBufferSize, windowTime, scheduler) {
232
+ let bufferSize;
233
+ let refCount = false;
234
+ if (configOrBufferSize && typeof configOrBufferSize === 'object') {
235
+ ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize);
236
+ }
237
+ else {
238
+ bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity);
239
+ }
240
+ return share({
241
+ connector: () => new ReplaySubject(bufferSize, windowTime, scheduler),
242
+ resetOnError: true,
243
+ resetOnComplete: false,
244
+ resetOnRefCountZero: refCount,
245
+ });
246
+ }
247
+
248
+ function startWith(...values) {
249
+ const scheduler = setProperty.popScheduler(values);
250
+ return setProperty.operate((source, subscriber) => {
251
+ (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);
252
+ });
253
+ }
254
+
255
+ function takeUntil(notifier) {
256
+ return setProperty.operate((source, subscriber) => {
257
+ setProperty.innerFrom(notifier).subscribe(setProperty.createOperatorSubscriber(subscriber, () => subscriber.complete(), setProperty.noop));
258
+ !subscriber.closed && source.subscribe(subscriber);
259
+ });
260
+ }
261
+
262
+ function tap(observerOrNext, error, complete) {
263
+ const tapObserver = setProperty.isFunction(observerOrNext) || error || complete
264
+ ?
265
+ { next: observerOrNext, error, complete }
266
+ : observerOrNext;
267
+ return tapObserver
268
+ ? setProperty.operate((source, subscriber) => {
269
+ var _a;
270
+ (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);
271
+ let isUnsub = true;
272
+ source.subscribe(setProperty.createOperatorSubscriber(subscriber, (value) => {
273
+ var _a;
274
+ (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);
275
+ subscriber.next(value);
276
+ }, () => {
277
+ var _a;
278
+ isUnsub = false;
279
+ (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);
280
+ subscriber.complete();
281
+ }, (err) => {
282
+ var _a;
283
+ isUnsub = false;
284
+ (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);
285
+ subscriber.error(err);
286
+ }, () => {
287
+ var _a, _b;
288
+ if (isUnsub) {
289
+ (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);
290
+ }
291
+ (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);
292
+ }));
293
+ })
294
+ :
295
+ setProperty.identity;
296
+ }
297
+
298
+ function mutationObservable(target, options) {
299
+ return new setProperty.Observable((observer) => {
300
+ let mutation = new MutationObserver((mutations) => {
301
+ observer.next(mutations);
302
+ });
303
+ mutation.observe(target, options);
304
+ return () => {
305
+ mutation.disconnect();
306
+ };
307
+ });
308
+ }
309
+
310
+ /**
311
+ * Returns an observable that emits when the component render()
312
+ * function is called. Value will be emitted after the next
313
+ * microtask (next tick).
314
+ */
315
+ function renderObservable(cmp) {
316
+ if ('function' !== typeof cmp.render) {
317
+ throw new Error('Component does not have a render function.');
318
+ }
319
+ return new setProperty.Observable((subscriber) => {
320
+ let previousRender = cmp.render;
321
+ cmp.render = function () {
322
+ Promise.resolve().then(() => {
323
+ subscriber.next();
324
+ });
325
+ return previousRender.call(this);
326
+ };
327
+ return () => {
328
+ cmp.render = previousRender;
329
+ };
330
+ });
331
+ }
332
+
333
+ /**
334
+ * Observe all sub nodes of the given node and notify
335
+ * when any of them is removed and/or added.
336
+ *
337
+ * {@internal}
338
+ */
339
+ function observeSubNodes(target) {
340
+ return mutationObservable(target, {
341
+ subtree: true,
342
+ childList: true,
343
+ }).pipe(filter((records) => {
344
+ for (let i = 0; i < records.length; i++) {
345
+ if ('childList' !== records[i].type) {
346
+ continue;
347
+ }
348
+ if (records[i].addedNodes.length || records[i].removedNodes.length) {
349
+ return true;
350
+ }
351
+ }
352
+ return false;
353
+ }), map(() => {
354
+ /* noop */
355
+ }));
356
+ }
357
+ /**
358
+ * Property decorator inspired by Angular's @ViewChild/@ContentChild.
359
+ *
360
+ * After each render, the decorated property will be set to the first element
361
+ * matching the given selector. If no element is found, the property will be
362
+ * set to null.
363
+ */
364
+ function QuerySelector(selector, options) {
365
+ return (target, property) => {
366
+ let descriptor = {
367
+ set: function () {
368
+ throw new Error(`Property "${property}" is read-only.`);
369
+ },
370
+ get: function () {
371
+ let observableProperty = `__rx__query_selector__observable__shadow_root__${(options === null || options === void 0 ? void 0 : options.shadowRoot) ? 'yes' : 'no'}__mutation_observer__${(options === null || options === void 0 ? void 0 : options.mutationObserver) ? 'yes' : 'no'}__selector__${selector}__`;
372
+ if (!this[observableProperty]) {
373
+ let root = (options === null || options === void 0 ? void 0 : options.shadowRoot) ? index.getElement(this).shadowRoot : index.getElement(this);
374
+ let observable = (options === null || options === void 0 ? void 0 : options.mutationObserver) ? observeSubNodes(root) : renderObservable(this);
375
+ this[observableProperty] = observable.pipe(startWith(), map(() => root.querySelector(selector)), setProperty.distinctUntilChanged(), shareReplay(1));
376
+ }
377
+ return this[observableProperty];
378
+ },
379
+ };
380
+ Object.defineProperty(target, property, descriptor);
381
+ };
382
+ }
383
+
384
+ /**
385
+ * Property decorator inspired by Angular's @ViewChild/@ContentChild.
386
+ *
387
+ * After each render, the decorated property will be set to the first element
388
+ * matching the given selector. If no element is found, the property will be
389
+ * set to null.
390
+ */
391
+ function QuerySelectorAll(selector, options) {
392
+ return (target, property) => {
393
+ let descriptor = {
394
+ set: function () {
395
+ throw new Error(`Property "${property}" is read-only.`);
396
+ },
397
+ get: function () {
398
+ let observableProperty = `__rx__query_selector_all__observable__shadow_root__${(options === null || options === void 0 ? void 0 : options.shadowRoot) ? 'yes' : 'no'}__mutation_observer__${(options === null || options === void 0 ? void 0 : options.mutationObserver) ? 'yes' : 'no'}__selector__${selector}__`;
399
+ if (!this[observableProperty]) {
400
+ let root = (options === null || options === void 0 ? void 0 : options.shadowRoot) ? index.getElement(this).shadowRoot : index.getElement(this);
401
+ let observable = (options === null || options === void 0 ? void 0 : options.mutationObserver) ? observeSubNodes(root) : renderObservable(this);
402
+ this[observableProperty] = observable.pipe(startWith(), map(() => Array.from(root.querySelectorAll(selector))), setProperty.distinctUntilChanged((previous, current) => {
403
+ if (previous.length !== current.length) {
404
+ return false;
405
+ }
406
+ for (let i = 0; i < previous.length; i++) {
407
+ if (previous[i] !== current[i]) {
408
+ return false;
409
+ }
410
+ }
411
+ return true;
412
+ }), shareReplay(1));
413
+ }
414
+ return this[observableProperty];
415
+ },
416
+ };
417
+ Object.defineProperty(target, property, descriptor);
418
+ };
419
+ }
420
+
421
+ /**
422
+ * Schedule a render of the component. This is useful when you
423
+ * want to force a render of the component as result of changing
424
+ * the values of the component which are not tracked by Stencil,
425
+ * observables, for example.
426
+ *
427
+ * By default, the render is scheduled on the next tick, but you
428
+ * can disable this behavior by passing `false` as second argument.
429
+ */
430
+ function scheduleRender(cmp, nextTick = true) {
431
+ return (source) => {
432
+ return source.pipe(tap(() => {
433
+ if (!nextTick) {
434
+ index.forceUpdate(cmp);
435
+ return;
436
+ }
437
+ Promise.resolve().then(() => index.forceUpdate(cmp));
438
+ }));
439
+ };
440
+ }
441
+
442
+ /**
443
+ * Use this function to tap into a value stream and flush value to
444
+ * component property. You may also use this function as subscription
445
+ * function (function will detect that value is passed instead of
446
+ * observable).
447
+ */
448
+ function toProperty(cmp, property) {
449
+ // ensure that the property is defined on the component.
450
+ setProperty.getPropertyDescriptor(cmp, property);
451
+ // @ts-ignore
452
+ return (source) => {
453
+ return source.pipe(tap((value) => {
454
+ cmp[property] = value;
455
+ }));
456
+ };
457
+ }
458
+
459
+ /**
460
+ * A map of component observables that are being watched for
461
+ * disconnect callback invocation. A weak map is being used
462
+ * so that the component instance can be garbage collected.
463
+ *
464
+ * {@internal}
465
+ */
466
+ let disconnectObservables = new WeakMap();
467
+ /**
468
+ * Creates an observable that emits a value when the component
469
+ * is disconnected from DOM and method `disconnectedCallback()`
470
+ * is invoked. StencilJS will supress the invocation of this
471
+ * method if it is not defined on the component.
472
+ *
473
+ * {@internal}
474
+ */
475
+ let createUsingDisconnectedCallback = function (cmp) {
476
+ let previousDisconnected = cmp.disconnectedCallback;
477
+ if (!previousDisconnected) {
478
+ throw new Error(`Component "${cmp.constructor.name}" does not have a "disconnectedCallback()" method defined.`);
479
+ }
480
+ let disconnectedSubject$ = new setProperty.Subject();
481
+ cmp.disconnectedCallback = function () {
482
+ if (previousDisconnected) {
483
+ previousDisconnected.call(cmp);
484
+ }
485
+ disconnectedSubject$.next();
486
+ };
487
+ return disconnectedSubject$.asObservable();
488
+ };
489
+ /**
490
+ * Mutation observer is our next heuristic. We will monitor parent
491
+ * node of the component and emit a value when the component is
492
+ * disconnected from DOM. This will only work, of course, if the
493
+ * component is not the root node of the application and component
494
+ * is already within DOM.
495
+ *
496
+ * {@internal}
497
+ */
498
+ let createUsingMutationObserver = function (cmp) {
499
+ let element = index.getElement(cmp);
500
+ if (null === element.parentNode) {
501
+ throw new Error(`Component "${cmp.constructor.name}" is not within DOM.`);
502
+ }
503
+ return new setProperty.Observable((observer) => {
504
+ let mutationObserver = new MutationObserver((mutations) => {
505
+ mutations.forEach((record) => {
506
+ for (let node of Array.from(record.removedNodes)) {
507
+ if (node !== element) {
508
+ continue;
509
+ }
510
+ observer.next();
511
+ observer.complete();
512
+ }
513
+ });
514
+ });
515
+ mutationObserver.observe(element.parentNode, {
516
+ childList: true,
517
+ subtree: true,
518
+ });
519
+ return () => {
520
+ mutationObserver.disconnect();
521
+ // we can not re-use this observable, so we have to delete it
522
+ disconnectObservables.delete(cmp);
523
+ };
524
+ });
525
+ };
526
+ /**
527
+ * Creates an observable that emits a value when the component
528
+ * is disconnected from DOM.
529
+ *
530
+ * {@internal}
531
+ */
532
+ function createDisconnectObservable(cmp) {
533
+ let functions = [
534
+ createUsingDisconnectedCallback,
535
+ createUsingMutationObserver,
536
+ ];
537
+ for (let fn of functions) {
538
+ try {
539
+ disconnectObservables.set(cmp, fn(cmp));
540
+ return;
541
+ }
542
+ catch (e) {
543
+ // noop
544
+ }
545
+ }
546
+ throw new Error(`Could not create disconnect observable for component "${cmp.constructor.name}".`);
547
+ }
548
+ /**
549
+ * Operator that unsubscribes from the source observable when
550
+ * the component is disconnected from DOM.
551
+ */
552
+ function untilDisconnected(cmp) {
553
+ return (source) => {
554
+ if (!disconnectObservables.has(cmp)) {
555
+ createDisconnectObservable(cmp);
556
+ }
557
+ let disconnectObservable$ = disconnectObservables.get(cmp);
558
+ return source.pipe(takeUntil(disconnectObservable$));
559
+ };
560
+ }
561
+
562
+ exports.propertyObservable = setProperty.propertyObservable;
563
+ exports.setProperty = setProperty.setProperty;
564
+ exports.QuerySelector = QuerySelector;
565
+ exports.QuerySelectorAll = QuerySelectorAll;
566
+ exports.mutationObservable = mutationObservable;
567
+ exports.renderObservable = renderObservable;
568
+ exports.scheduleRender = scheduleRender;
569
+ exports.toProperty = toProperty;
570
+ exports.untilDisconnected = untilDisconnected;
571
+
572
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"file":"index.cjs.js","mappings":";;;;;;;AAAO,MAAM,qBAAqB,GAAG;AACrC,IAAI,GAAG,GAAG;AACV,QAAQ,OAAO,CAAC,qBAAqB,CAAC,QAAQ,IAAI,IAAI,EAAE,GAAG,EAAE,CAAC;AAC9D,KAAK;AACL,IAAI,QAAQ,EAAE,SAAS;AACvB,CAAC;;ACHM,MAAM,aAAa,SAASA,mBAAO,CAAC;AAC3C,IAAI,WAAW,CAAC,WAAW,GAAG,QAAQ,EAAE,WAAW,GAAG,QAAQ,EAAE,kBAAkB,GAAG,qBAAqB,EAAE;AAC5G,QAAQ,KAAK,EAAE,CAAC;AAChB,QAAQ,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AACvC,QAAQ,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AACvC,QAAQ,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACrD,QAAQ,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;AAC1B,QAAQ,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;AACxC,QAAQ,IAAI,CAAC,mBAAmB,GAAG,WAAW,KAAK,QAAQ,CAAC;AAC5D,QAAQ,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;AACpD,QAAQ,IAAI,CAA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AAc,GAAuB;EAClE,OAAO,CAAC,MAAqB;IACzB,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;MACjC,0BAA0B,CAAC,GAAG,CAAC,CAAC;KACnC;IAED,IAAI,qBAAqB,GAAqB,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAE7E,OAAO,MAAM,CAAC,IAAI,CACd,SAAS,CAAI,qBAAqB,CAAC,CACtC,CAAC;GACL,CAAC;AACN;;;;;;;;;;;;","names":["Subject","operate","createOperatorSubscriber","innerFrom","executeSchedule","isFunction","identity","from","popScheduler","SafeSubscriber","noop","Observable","getElement","distinctUntilChanged","forceUpdate","getPropertyDescriptor"],"sources":["node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","node_modules/rxjs/dist/esm/internal/ReplaySubject.js","node_modules/rxjs/dist/esm/internal/operators/map.js","node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","node_modules/rxjs/dist/esm/internal/operators/concatAll.js","node_modules/rxjs/dist/esm/internal/observable/concat.js","node_modules/rxjs/dist/esm/internal/operators/filter.js","node_modules/rxjs/dist/esm/internal/operators/share.js","node_modules/rxjs/dist/esm/internal/operators/shareReplay.js","node_modules/rxjs/dist/esm/internal/operators/startWith.js","node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","node_modules/rxjs/dist/esm/internal/operators/tap.js","src/rx/observable/mutation-observable.ts","src/rx/observable/render-observable.ts","src/rx/decorator/query-selector.ts","src/rx/decorator/query-selector-all.ts","src/rx/operator/schedule-render.ts","src/rx/operator/to-property.ts","src/rx/operator/until-disconnected.ts"],"sourcesContent":["export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class ReplaySubject extends Subject {\n constructor(_bufferSize = Infinity, _windowTime = Infinity, _timestampProvider = dateTimestampProvider) {\n super();\n this._bufferSize = _bufferSize;\n this._windowTime = _windowTime;\n this._timestampProvider = _timestampProvider;\n this._buffer = [];\n this._infiniteTimeWindow = true;\n this._infiniteTimeWindow = _windowTime === Infinity;\n this._bufferSize = Math.max(1, _bufferSize);\n this._windowTime = Math.max(1, _windowTime);\n }\n next(value) {\n const { isStopped, _buffer, _infiniteTimeWindow, _timestampProvider, _windowTime } = this;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n super.next(value);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n const subscription = this._innerSubscribe(subscriber);\n const { _infiniteTimeWindow, _buffer } = this;\n const copy = _buffer.slice();\n for (let i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n }\n _trimBuffer() {\n const { _bufferSize, _timestampProvider, _buffer, _infiniteTimeWindow } = this;\n const adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n const now = _timestampProvider.now();\n let last = 0;\n for (let i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n }\n}\n//# sourceMappingURL=ReplaySubject.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n const doInnerSub = (value) => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n }\n else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n//# sourceMappingURL=mergeMap.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n//# sourceMappingURL=filter.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Subject } from '../Subject';\nimport { SafeSubscriber } from '../Subscriber';\nimport { operate } from '../util/lift';\nexport function share(options = {}) {\n const { connector = () => new Subject(), resetOnError = true, resetOnComplete = true, resetOnRefCountZero = true } = options;\n return (wrapperSource) => {\n let connection;\n let resetConnection;\n let subject;\n let refCount = 0;\n let hasCompleted = false;\n let hasErrored = false;\n const cancelReset = () => {\n resetConnection === null || resetConnection === void 0 ? void 0 : resetConnection.unsubscribe();\n resetConnection = undefined;\n };\n const reset = () => {\n cancelReset();\n connection = subject = undefined;\n hasCompleted = hasErrored = false;\n };\n const resetAndUnsubscribe = () => {\n const conn = connection;\n reset();\n conn === null || conn === void 0 ? void 0 : conn.unsubscribe();\n };\n return operate((source, subscriber) => {\n refCount++;\n if (!hasErrored && !hasCompleted) {\n cancelReset();\n }\n const dest = (subject = subject !== null && subject !== void 0 ? subject : connector());\n subscriber.add(() => {\n refCount--;\n if (refCount === 0 && !hasErrored && !hasCompleted) {\n resetConnection = handleReset(resetAndUnsubscribe, resetOnRefCountZero);\n }\n });\n dest.subscribe(subscriber);\n if (!connection &&\n refCount > 0) {\n connection = new SafeSubscriber({\n next: (value) => dest.next(value),\n error: (err) => {\n hasErrored = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnError, err);\n dest.error(err);\n },\n complete: () => {\n hasCompleted = true;\n cancelReset();\n resetConnection = handleReset(reset, resetOnComplete);\n dest.complete();\n },\n });\n innerFrom(source).subscribe(connection);\n }\n })(wrapperSource);\n };\n}\nfunction handleReset(reset, on, ...args) {\n if (on === true) {\n reset();\n return;\n }\n if (on === false) {\n return;\n }\n const onSubscriber = new SafeSubscriber({\n next: () => {\n onSubscriber.unsubscribe();\n reset();\n },\n });\n return innerFrom(on(...args)).subscribe(onSubscriber);\n}\n//# sourceMappingURL=share.js.map","import { ReplaySubject } from '../ReplaySubject';\nimport { share } from './share';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n let bufferSize;\n let refCount = false;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n ({ bufferSize = Infinity, windowTime = Infinity, refCount = false, scheduler } = configOrBufferSize);\n }\n else {\n bufferSize = (configOrBufferSize !== null && configOrBufferSize !== void 0 ? configOrBufferSize : Infinity);\n }\n return share({\n connector: () => new ReplaySubject(bufferSize, windowTime, scheduler),\n resetOnError: true,\n resetOnComplete: false,\n resetOnRefCountZero: refCount,\n });\n}\n//# sourceMappingURL=shareReplay.js.map","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=startWith.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","import {\n Observable,\n Subscriber,\n} from 'rxjs';\n\nexport function mutationObservable(target: Node, options?: MutationObserverInit): Observable<MutationRecord[]> {\n return new Observable((observer: Subscriber<MutationRecord[]>) => {\n let mutation: MutationObserver = new MutationObserver((mutations: MutationRecord[]): void => {\n observer.next(mutations);\n });\n\n mutation.observe(target, options);\n\n return (): void => {\n mutation.disconnect();\n };\n });\n}\n","import { ComponentInterface } from '@stencil/core';\nimport {\n Observable,\n Subscriber,\n TeardownLogic,\n} from 'rxjs';\n\n/**\n * Returns an observable that emits when the component render()\n * function is called. Value will be emitted after the next\n * microtask (next tick).\n */\nexport function renderObservable(cmp: ComponentInterface): Observable<void> {\n if ('function' !== typeof cmp.render) {\n throw new Error('Component does not have a render function.');\n }\n\n return new Observable<void>((subscriber: Subscriber<void>): TeardownLogic => {\n let previousRender: () => any = cmp.render;\n\n cmp.render = function (): any {\n Promise.resolve().then((): void => {\n subscriber.next();\n });\n\n return previousRender.call(this);\n }\n\n return (): void => {\n cmp.render = previousRender;\n }\n });\n}\n","import {\n ComponentInterface,\n getElement,\n} from '@stencil/core';\nimport {\n distinctUntilChanged,\n filter,\n map,\n Observable,\n shareReplay,\n startWith,\n} from 'rxjs';\nimport {\n mutationObservable,\n renderObservable,\n} from '../observable';\n\n/**\n * Options for QuerySelector decorator.\n */\nexport type QuerySelectorOptions = {\n /**\n * If `true`, the element will be searched in the shadow root. Default is `false`.\n */\n shadowRoot?: boolean;\n /**\n * If `true`, mutation observer instead of `renderObservable` from this package will\n * be used to detect changes. Default is `false`.\n */\n mutationObserver?: boolean;\n};\n\n/**\n * Observe all sub nodes of the given node and notify\n * when any of them is removed and/or added.\n *\n * {@internal}\n */\nexport function observeSubNodes(target: Node): Observable<void> {\n return mutationObservable(target, {\n subtree: true,\n childList: true,\n }).pipe(\n filter((records: MutationRecord[]): boolean => {\n for (let i: number = 0; i < records.length; i++) {\n if ('childList' !== records[i].type) {\n continue;\n }\n\n if (records[i].addedNodes.length || records[i].removedNodes.length) {\n return true;\n }\n }\n\n return false;\n }),\n map((): void => {\n /* noop */\n }),\n );\n}\n\n/**\n * Property decorator inspired by Angular's @ViewChild/@ContentChild.\n *\n * After each render, the decorated property will be set to the first element\n * matching the given selector. If no element is found, the property will be\n * set to null.\n */\nexport function QuerySelector<T extends HTMLElement = HTMLElement>(selector: string, options?: QuerySelectorOptions): any {\n return (target: Function, property: string): void => {\n let descriptor: PropertyDescriptor = {\n set: function (): void {\n throw new Error(`Property \"${property}\" is read-only.`);\n },\n get: function (this: ComponentInterface): Observable<T | null> {\n let observableProperty: string = `__rx__query_selector__observable__shadow_root__${options?.shadowRoot ? 'yes' : 'no'}__mutation_observer__${options?.mutationObserver ? 'yes' : 'no'}__selector__${selector}__`;\n\n if (!this[observableProperty]) {\n let root: HTMLElement | ShadowRoot = options?.shadowRoot ? getElement(this).shadowRoot : getElement(this);\n let observable: Observable<void> = options?.mutationObserver ? observeSubNodes(root) : renderObservable(this);\n\n this[observableProperty] = observable.pipe(\n startWith(),\n map((): T => root.querySelector(selector)),\n distinctUntilChanged(),\n shareReplay(1),\n );\n }\n\n return this[observableProperty];\n },\n }\n\n Object.defineProperty(target, property, descriptor);\n };\n}\n","import {\n ComponentInterface,\n getElement,\n} from '@stencil/core';\nimport {\n distinctUntilChanged,\n map,\n Observable,\n shareReplay,\n startWith,\n} from 'rxjs';\nimport { renderObservable } from '../observable';\nimport { observeSubNodes } from './query-selector';\n\n/**\n * Options for QuerySelectorAll decorator.\n */\nexport type QuerySelectorAllOptions = {\n /**\n * If `true`, the elements will be searched in the shadow root. Default is `false`.\n */\n shadowRoot?: boolean;\n /**\n * If `true`, mutation observer instead of `renderObservable` from this package will\n * be used to detect changes. Default is `false`.\n */\n mutationObserver?: boolean;\n};\n\n/**\n * Property decorator inspired by Angular's @ViewChild/@ContentChild.\n *\n * After each render, the decorated property will be set to the first element\n * matching the given selector. If no element is found, the property will be\n * set to null.\n */\nexport function QuerySelectorAll<T extends HTMLElement = HTMLElement>(selector: string, options?: QuerySelectorAllOptions): any {\n return (target: Function, property: string): void => {\n let descriptor: PropertyDescriptor = {\n set: function (): void {\n throw new Error(`Property \"${property}\" is read-only.`);\n },\n get: function (this: ComponentInterface): Observable<T | null> {\n let observableProperty: string = `__rx__query_selector_all__observable__shadow_root__${options?.shadowRoot ? 'yes' : 'no'}__mutation_observer__${options?.mutationObserver ? 'yes' : 'no'}__selector__${selector}__`;\n\n if (!this[observableProperty]) {\n let root: HTMLElement | ShadowRoot = options?.shadowRoot ? getElement(this).shadowRoot : getElement(this);\n let observable: Observable<void> = options?.mutationObserver ? observeSubNodes(root) : renderObservable(this);\n\n this[observableProperty] = observable.pipe(\n startWith(),\n map((): T[] => Array.from(root.querySelectorAll(selector))),\n distinctUntilChanged((previous: T[], current: T[]): boolean => {\n if (previous.length !== current.length) {\n return false;\n }\n\n for (let i: number = 0; i < previous.length; i++) {\n if (previous[i] !== current[i]) {\n return false;\n }\n }\n\n return true;\n }),\n shareReplay(1),\n );\n }\n\n return this[observableProperty];\n },\n }\n\n Object.defineProperty(target, property, descriptor);\n };\n}\n","import {\n ComponentInterface,\n forceUpdate,\n} from '@stencil/core';\nimport {\n MonoTypeOperatorFunction,\n Observable,\n tap,\n} from 'rxjs';\n\n/**\n * Schedule a render of the component. This is useful when you\n * want to force a render of the component as result of changing\n * the values of the component which are not tracked by Stencil,\n * observables, for example.\n *\n * By default, the render is scheduled on the next tick, but you\n * can disable this behavior by passing `false` as second argument.\n */\nexport function scheduleRender<T = unknown>(cmp: ComponentInterface, nextTick: boolean = true): MonoTypeOperatorFunction<T> {\n return (source: Observable<T>): Observable<T> => {\n return source.pipe(tap((): void => {\n if (!nextTick) {\n forceUpdate(cmp);\n return;\n }\n\n Promise.resolve().then((): void => forceUpdate(cmp));\n }));\n };\n}\n","import { ComponentInterface } from '@stencil/core';\nimport {\n MonoTypeOperatorFunction,\n tap,\n} from 'rxjs';\nimport { getPropertyDescriptor } from '../../utils';\n\n/**\n * Use this function to tap into a value stream and flush value to\n * component property. You may also use this function as subscription\n * function (function will detect that value is passed instead of\n * observable).\n */\nexport function toProperty<T = any>(cmp: ComponentInterface, property: string): MonoTypeOperatorFunction<T> {\n // ensure that the property is defined on the component.\n getPropertyDescriptor(cmp, property);\n\n // @ts-ignore\n return (source: Observable<T>): Observable<T> | void => {\n return source.pipe(\n tap((value: T): void => {\n cmp[property] = value;\n }),\n );\n };\n}\n","import {\n ComponentInterface,\n getElement,\n} from '@stencil/core';\nimport {\n MonoTypeOperatorFunction,\n Observable,\n Subject,\n Subscriber,\n takeUntil,\n TeardownLogic,\n} from 'rxjs';\n\n/**\n * A map of component observables that are being watched for\n * disconnect callback invocation. A weak map is being used\n * so that the component instance can be garbage collected.\n *\n * {@internal}\n */\nlet disconnectObservables: WeakMap<ComponentInterface, Observable<void>> = new WeakMap();\n\n/**\n * A function that creates an observable which emits an event\n * when the component is disconnected from DOM.\n *\n * {@internal}\n */\ntype CreateDisconnectObservableFn = (cmp: ComponentInterface) => Observable<void>;\n\n/**\n * Creates an observable that emits a value when the component\n * is disconnected from DOM and method `disconnectedCallback()`\n * is invoked. StencilJS will supress the invocation of this\n * method if it is not defined on the component.\n *\n * {@internal}\n */\nlet createUsingDisconnectedCallback: CreateDisconnectObservableFn = function (cmp: ComponentInterface): Observable<void> {\n let previousDisconnected: Function | undefined = cmp.disconnectedCallback;\n\n if (!previousDisconnected) {\n throw new Error(`Component \"${cmp.constructor.name}\" does not have a \"disconnectedCallback()\" method defined.`);\n }\n\n let disconnectedSubject$: Subject<void> = new Subject<void>();\n\n cmp.disconnectedCallback = function (): void {\n if (previousDisconnected) {\n previousDisconnected.call(cmp);\n }\n\n disconnectedSubject$.next();\n };\n\n return disconnectedSubject$.asObservable();\n}\n\n/**\n * Mutation observer is our next heuristic. We will monitor parent\n * node of the component and emit a value when the component is\n * disconnected from DOM. This will only work, of course, if the\n * component is not the root node of the application and component\n * is already within DOM.\n *\n * {@internal}\n */\nlet createUsingMutationObserver: CreateDisconnectObservableFn = function (cmp: ComponentInterface): Observable<void> {\n let element: HTMLElement = getElement(cmp);\n\n if (null === element.parentNode) {\n throw new Error(`Component \"${cmp.constructor.name}\" is not within DOM.`);\n }\n\n return new Observable<void>((observer: Subscriber<void>): TeardownLogic => {\n\n let mutationObserver: MutationObserver = new MutationObserver((mutations: MutationRecord[]): void => {\n mutations.forEach((record: MutationRecord): void => {\n for (let node of Array.from(record.removedNodes)) {\n if (node !== element) {\n continue;\n }\n\n observer.next();\n observer.complete();\n }\n });\n });\n\n mutationObserver.observe(element.parentNode, {\n childList: true,\n subtree: true,\n });\n\n return (): void => {\n mutationObserver.disconnect();\n // we can not re-use this observable, so we have to delete it\n disconnectObservables.delete(cmp);\n };\n });\n\n\n}\n\n/**\n * Creates an observable that emits a value when the component\n * is disconnected from DOM.\n *\n * {@internal}\n */\nfunction createDisconnectObservable(cmp: ComponentInterface): void {\n let functions: CreateDisconnectObservableFn[] = [\n createUsingDisconnectedCallback,\n createUsingMutationObserver,\n ];\n\n for (let fn of functions) {\n try {\n disconnectObservables.set(cmp, fn(cmp));\n return;\n } catch (e) {\n // noop\n }\n }\n\n throw new Error(`Could not create disconnect observable for component \"${cmp.constructor.name}\".`);\n}\n\n/**\n * Operator that unsubscribes from the source observable when\n * the component is disconnected from DOM.\n */\nexport function untilDisconnected<T = unknown>(cmp: ComponentInterface): MonoTypeOperatorFunction<T> {\n return (source: Observable<T>): Observable<T> => {\n if (!disconnectObservables.has(cmp)) {\n createDisconnectObservable(cmp);\n }\n\n let disconnectObservable$: Observable<void> = disconnectObservables.get(cmp);\n\n return source.pipe(\n takeUntil<T>(disconnectObservable$),\n );\n };\n}\n"],"version":3}