@rxdi/forms 0.7.212 → 0.7.214
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 +203 -228
- package/dist/form.array.d.ts +31 -0
- package/dist/form.array.js +122 -0
- package/dist/form.decorator.d.ts +1 -1
- package/dist/form.decorator.js +8 -4
- package/dist/form.group.d.ts +19 -13
- package/dist/form.group.js +148 -31
- package/dist/form.tokens.d.ts +38 -1
- package/dist/form.tokens.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +6 -2
- package/dist/rx-fake.d.ts +0 -34
- package/dist/rx-fake.js +0 -99
package/dist/rx-fake.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.$BehaviorSubject = exports.$Observable = exports.$Subscription = void 0;
|
|
4
|
-
exports.noop = noop;
|
|
5
|
-
exports.BehaviorSubject = BehaviorSubject;
|
|
6
|
-
exports.Observable = Observable;
|
|
7
|
-
exports.Subscription = Subscription;
|
|
8
|
-
class $Subscription {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.o = new Map();
|
|
11
|
-
}
|
|
12
|
-
unsubscribe() {
|
|
13
|
-
[...this.o.values()].forEach(v => this.o.delete(v));
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.$Subscription = $Subscription;
|
|
17
|
-
class $Observable extends $Subscription {
|
|
18
|
-
constructor(fn) {
|
|
19
|
-
super();
|
|
20
|
-
this.init = true;
|
|
21
|
-
this.fn = fn;
|
|
22
|
-
}
|
|
23
|
-
subscribe(c) {
|
|
24
|
-
this.o.set(c, c);
|
|
25
|
-
if (typeof this.fn === 'function' && this.init) {
|
|
26
|
-
this.fn(this);
|
|
27
|
-
this.init = false;
|
|
28
|
-
}
|
|
29
|
-
return {
|
|
30
|
-
unsubscribe: () => {
|
|
31
|
-
this.o.delete(c);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
complete() {
|
|
36
|
-
this.unsubscribe();
|
|
37
|
-
}
|
|
38
|
-
next(s) {
|
|
39
|
-
[...this.o.values()].forEach(f => f(s));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.$Observable = $Observable;
|
|
43
|
-
class $BehaviorSubject extends $Observable {
|
|
44
|
-
constructor(v) {
|
|
45
|
-
if (typeof v === 'function') {
|
|
46
|
-
super(v);
|
|
47
|
-
}
|
|
48
|
-
super(null);
|
|
49
|
-
this.setValue(v);
|
|
50
|
-
}
|
|
51
|
-
setValue(v) {
|
|
52
|
-
this.v = v;
|
|
53
|
-
}
|
|
54
|
-
next(s) {
|
|
55
|
-
this.setValue(s);
|
|
56
|
-
super.next(s);
|
|
57
|
-
}
|
|
58
|
-
getValue() {
|
|
59
|
-
return this.v;
|
|
60
|
-
}
|
|
61
|
-
asObservable() {
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.$BehaviorSubject = $BehaviorSubject;
|
|
66
|
-
function behaviorOrFake() {
|
|
67
|
-
try {
|
|
68
|
-
return require('rxjs').BehaviorSubject;
|
|
69
|
-
}
|
|
70
|
-
catch (e) { }
|
|
71
|
-
return $BehaviorSubject;
|
|
72
|
-
}
|
|
73
|
-
function observableOrFake() {
|
|
74
|
-
try {
|
|
75
|
-
return require('rxjs').Observable;
|
|
76
|
-
}
|
|
77
|
-
catch (e) { }
|
|
78
|
-
return $Observable;
|
|
79
|
-
}
|
|
80
|
-
function subscriptionOrFake() {
|
|
81
|
-
try {
|
|
82
|
-
return require('rxjs').Subscription;
|
|
83
|
-
}
|
|
84
|
-
catch (e) { }
|
|
85
|
-
return $Subscription;
|
|
86
|
-
}
|
|
87
|
-
function noop() { }
|
|
88
|
-
function BehaviorSubject(init) {
|
|
89
|
-
const b = behaviorOrFake();
|
|
90
|
-
return new b(init);
|
|
91
|
-
}
|
|
92
|
-
function Observable(fn) {
|
|
93
|
-
const o = observableOrFake();
|
|
94
|
-
return new o(fn);
|
|
95
|
-
}
|
|
96
|
-
function Subscription() {
|
|
97
|
-
const s = subscriptionOrFake();
|
|
98
|
-
return new s();
|
|
99
|
-
}
|