jpf 5.0.7 → 5.0.9

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.
@@ -22,11 +22,16 @@ export interface IObservableMap<TKey, TValue> {
22
22
  }
23
23
  export interface IObservableSet<TItem> {
24
24
  }
25
- export declare function observableValue<TValue, TSetter = TValue>(value?: TValue | null, setter?: (value: TSetter, observableValue: IObservableValue<TValue, TSetter>) => void): IObservableValue<TValue, TSetter>;
26
- export declare function observableArray<TItem = any, TSetter = Array<TItem>>(initialValues?: Array<TItem> | null, setter?: (value: TSetter, observableArray: IObservableArray<TItem, TSetter>) => void): IObservableArray<TItem, TSetter>;
27
- export declare function observableMap<TKey = any, TItem = any>(): void;
28
- export declare function observableSet<TItem = any>(): void;
29
- export declare function computed<TComputed>(func: () => TComputed): IComputed<TComputed>;
25
+ export declare const observable: {
26
+ unwrap: <TValue>(value: TValue | ISubscribable<TValue>) => TValue;
27
+ isComputed: (value: any) => value is IComputed<any>;
28
+ isObservableValue: (value: any) => value is IObservableValue<any, any>;
29
+ isObservableArray: (value: any) => value is IObservableArray<any, any[]>;
30
+ isObservableMap: <TKey, TItem>(value: any) => value is IObservableMap<TKey, TItem>;
31
+ isObservableSet: <TItem_1>(value: any) => value is IObservableSet<TItem_1>;
32
+ computed<TComputed>(func: () => TComputed): IComputed<TComputed>;
33
+ observableValue: <TValue_1, TSetter = TValue_1>(value?: TValue_1, setter?: (value: TSetter, observableValue: IObservableValue<TValue_1, TSetter>) => void) => IObservableValue<TValue_1, TSetter>;
34
+ };
30
35
  export declare function unwrap<TValue>(value: TValue | ISubscribable<TValue>): TValue;
31
36
  export declare function isComputed(value: any): value is IComputed<any>;
32
37
  export declare function isObservableValue(value: any): value is IObservableValue;
@@ -34,4 +39,6 @@ export declare function isObservableArray(value: any): value is IObservableArray
34
39
  export declare function isObservableMap<TKey, TItem>(value: any): value is IObservableMap<TKey, TItem>;
35
40
  export declare function isObservableSet<TItem>(value: any): value is IObservableSet<TItem>;
36
41
  export declare function isSubscribable<TValue>(value: any): value is ISubscribable<TValue>;
42
+ export declare function computed<TComputed>(func: () => TComputed): IComputed<TComputed>;
43
+ export declare function observableValue<TValue, TSetter = TValue>(value?: TValue | null, setter?: (value: TSetter, observableValue: IObservableValue<TValue, TSetter>) => void): IObservableValue<TValue, TSetter>;
37
44
  export declare function executeHandlerOnObject(handler: (object: any) => void, object: object): void;
@@ -1,42 +1,59 @@
1
- export function observableValue(value, setter) {
2
- throw "observableValue is not implemented";
3
- }
4
- export function observableArray(initialValues, setter) {
5
- throw "observableArray is not implemented";
6
- }
7
- export function observableMap() {
8
- throw "observableMap is not implemented";
9
- }
10
- export function observableSet() {
11
- throw "observableSet is not implemented";
12
- }
13
- export function computed(func) {
14
- throw "computed is not implementd";
15
- }
1
+ export const observable = {
2
+ unwrap: (value) => {
3
+ throw "Unwrap is not implemented";
4
+ },
5
+ isComputed: (value) => {
6
+ throw "isComputed is not implemented";
7
+ },
8
+ isObservableValue: (value) => {
9
+ throw "isObservableValue is not implemented";
10
+ },
11
+ isObservableArray: (value) => {
12
+ throw "isObservableArray is not implemented";
13
+ },
14
+ isObservableMap: (value) => {
15
+ throw "isObservableMap is not implemented";
16
+ },
17
+ isObservableSet: (value) => {
18
+ throw "isObservableSet is not implemented";
19
+ },
20
+ computed(func) {
21
+ throw "computed is not implemented";
22
+ },
23
+ observableValue: (value, setter) => {
24
+ throw "observableValue is not implemented";
25
+ }
26
+ };
16
27
  export function unwrap(value) {
17
- throw "Unwrap is not implemented";
28
+ return observable.unwrap(value);
18
29
  }
19
30
  export function isComputed(value) {
20
- throw "isComputed is not implemented";
31
+ return observable.isComputed(value);
21
32
  }
22
33
  export function isObservableValue(value) {
23
- throw "isObservableValue is not implemented";
34
+ return observable.isObservableValue(value);
24
35
  }
25
36
  export function isObservableArray(value) {
26
- throw "isObservableArray is not implemented";
37
+ return observable.isObservableArray(value);
27
38
  }
28
39
  export function isObservableMap(value) {
29
- throw "isObservableMap is not implemented";
40
+ return observable.isObservableMap(value);
30
41
  }
31
42
  export function isObservableSet(value) {
32
- throw "isObservableSet is not implemented";
43
+ return observable.isObservableSet(value);
33
44
  }
34
45
  export function isSubscribable(value) {
35
- return isComputed(value)
36
- || isObservableValue(value)
37
- || isObservableArray(value)
38
- || isObservableMap(value)
39
- || isObservableSet(value);
46
+ return observable.isComputed(value)
47
+ || observable.isObservableValue(value)
48
+ || observable.isObservableArray(value)
49
+ || observable.isObservableMap(value)
50
+ || observable.isObservableSet(value);
51
+ }
52
+ export function computed(func) {
53
+ return observable.computed(func);
54
+ }
55
+ export function observableValue(value, setter) {
56
+ return observable.observableValue(value, setter);
40
57
  }
41
58
  export function executeHandlerOnObject(handler, object) {
42
59
  if (object.constructor === Array) {
@@ -48,7 +65,7 @@ export function executeHandlerOnObject(handler, object) {
48
65
  }
49
66
  else {
50
67
  if (isSubscribable(object)) {
51
- const unwrapped = unwrap(object);
68
+ const unwrapped = observable.unwrap(object);
52
69
  if (typeof unwrapped === "object") {
53
70
  executeHandlerOnObject(handler, unwrapped);
54
71
  }
@@ -1 +1 @@
1
- {"version":3,"file":"observable.js","sourceRoot":"","sources":["../../src/framework/observable.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,eAAe,CAA2B,KAAqB,EAAE,MAAqF;IAClK,MAAM,oCAAoC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,eAAe,CAAsC,aAAmC,EAAE,MAAoF;IAC1L,MAAM,oCAAoC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,aAAa;IACzB,MAAM,kCAAkC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,aAAa;IACzB,MAAM,kCAAkC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,QAAQ,CAAY,IAAqB;IACrD,MAAM,4BAA4B,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,MAAM,CAAS,KAAqC;IAChE,MAAM,2BAA2B,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,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;QACJ,IAAI,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,MAAM,SAAS,GAAG,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC5C,IAAI,OAAO,SAAS,KAAK,QAAQ,EAAE,CAAC;gBAChC,sBAAsB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAC/C,CAAC;QACL,CAAC;aAAM,CAAC;YAEJ,OAAO,CAAC,MAAM,CAAC,CAAC;YAGhB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;gBACpC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;gBAC7B,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;oBAC3C,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;gBAC9C,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;AACL,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,12 +1,19 @@
1
1
  import * as controls from "./controls/index";
2
2
  import * as utilities from "./utilities/index";
3
+ import * as attributes from "./framework/attributes";
4
+ import * as element from "./framework/element";
5
+ import * as event from "./framework/event";
6
+ import * as properties from "./framework/properties";
7
+ import * as root from "./framework/root";
8
+ import * as style from "./framework/style";
9
+ import * as types from "./framework/types";
3
10
  export { controls };
4
11
  export { utilities };
5
- export * from "./framework/attributes";
6
- export * from "./framework/element";
7
- export * from "./framework/event";
12
+ export { attributes };
13
+ export { element };
14
+ export { event };
15
+ export { properties };
16
+ export { root };
17
+ export { style };
18
+ export { types };
8
19
  export * from "./framework/observable";
9
- export * from "./framework/properties";
10
- export * from "./framework/root";
11
- export * from "./framework/style";
12
- export * from "./framework/types";
package/dist/index.js CHANGED
@@ -1,13 +1,20 @@
1
1
  import * as controls from "./controls/index";
2
2
  import * as utilities from "./utilities/index";
3
+ import * as attributes from "./framework/attributes";
4
+ import * as element from "./framework/element";
5
+ import * as event from "./framework/event";
6
+ import * as properties from "./framework/properties";
7
+ import * as root from "./framework/root";
8
+ import * as style from "./framework/style";
9
+ import * as types from "./framework/types";
3
10
  export { controls };
4
11
  export { utilities };
5
- export * from "./framework/attributes";
6
- export * from "./framework/element";
7
- export * from "./framework/event";
12
+ export { attributes };
13
+ export { element };
14
+ export { event };
15
+ export { properties };
16
+ export { root };
17
+ export { style };
18
+ export { types };
8
19
  export * from "./framework/observable";
9
- export * from "./framework/properties";
10
- export * from "./framework/root";
11
- export * from "./framework/style";
12
- export * from "./framework/types";
13
20
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,SAAS,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAC/C,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,OAAO,EAAE,KAAK,EAAE,CAAC;AAEjB,cAAc,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jpf",
3
- "version": "5.0.7",
3
+ "version": "5.0.9",
4
4
  "description": "Javascript Presentation Foundation base classes and interfaces",
5
5
  "keywords": [
6
6
  "mvvm",
@@ -31,58 +31,80 @@ export interface IObservableSet<TItem> {
31
31
 
32
32
  }
33
33
 
34
- export function observableValue<TValue, TSetter = TValue>(value?: TValue | null, setter?: (value: TSetter, observableValue: IObservableValue<TValue, TSetter>) => void): IObservableValue<TValue, TSetter> {
35
- throw "observableValue is not implemented";
36
- }
34
+ export const observable = {
35
+ unwrap: <TValue>(value: TValue | ISubscribable<TValue>): TValue => {
36
+ throw "Unwrap is not implemented";
37
+ },
37
38
 
38
- export function observableArray<TItem = any, TSetter = Array<TItem>>(initialValues?: Array<TItem> | null, setter?: (value: TSetter, observableArray: IObservableArray<TItem, TSetter>) => void): IObservableArray<TItem, TSetter> {
39
- throw "observableArray is not implemented";
40
- }
39
+ isComputed: (value): value is IComputed<any> => {
40
+ throw "isComputed is not implemented";
41
+ },
41
42
 
42
- export function observableMap<TKey = any, TItem = any>() {
43
- throw "observableMap is not implemented";
44
- }
43
+ isObservableValue: (value): value is IObservableValue => {
44
+ throw "isObservableValue is not implemented";
45
+ },
45
46
 
46
- export function observableSet<TItem = any>() {
47
- throw "observableSet is not implemented";
48
- }
47
+ isObservableArray: (value): value is IObservableArray => {
48
+ throw "isObservableArray is not implemented";
49
+ },
49
50
 
50
- export function computed<TComputed>(func: () => TComputed): IComputed<TComputed> {
51
- throw "computed is not implementd";
52
- }
51
+ isObservableMap: <TKey, TItem>(value): value is IObservableMap<TKey, TItem> => {
52
+ throw "isObservableMap is not implemented";
53
+ },
54
+
55
+ isObservableSet: <TItem>(value): value is IObservableSet<TItem> => {
56
+ throw "isObservableSet is not implemented";
57
+ },
58
+
59
+ computed<TComputed>(func: () => TComputed): IComputed<TComputed> {
60
+ throw "computed is not implemented";
61
+ },
53
62
 
63
+ observableValue: <TValue, TSetter = TValue>(value?: TValue | null, setter?: (value: TSetter, observableValue: IObservableValue<TValue, TSetter>) => void): IObservableValue<TValue, TSetter> => {
64
+ throw "observableValue is not implemented";
65
+ }
66
+ }
54
67
  export function unwrap<TValue>(value: TValue | ISubscribable<TValue>): TValue {
55
- throw "Unwrap is not implemented";
68
+ return observable.unwrap(value);
56
69
  }
57
70
 
58
71
  export function isComputed(value): value is IComputed<any> {
59
- throw "isComputed is not implemented";
72
+ return observable.isComputed(value);
60
73
  }
61
74
 
62
75
  export function isObservableValue(value): value is IObservableValue {
63
- throw "isObservableValue is not implemented";
76
+ return observable.isObservableValue(value);
64
77
  }
65
78
 
66
79
  export function isObservableArray(value): value is IObservableArray {
67
- throw "isObservableArray is not implemented";
80
+ return observable.isObservableArray(value);
68
81
  }
69
82
 
70
83
  export function isObservableMap<TKey, TItem>(value): value is IObservableMap<TKey, TItem> {
71
- throw "isObservableMap is not implemented";
84
+ return observable.isObservableMap(value);
72
85
  }
73
86
 
74
87
  export function isObservableSet<TItem>(value): value is IObservableSet<TItem> {
75
- throw "isObservableSet is not implemented";
88
+ return observable.isObservableSet(value);
76
89
  }
77
90
 
78
91
  export function isSubscribable<TValue>(value: any): value is ISubscribable<TValue> {
79
- return isComputed(value)
80
- || isObservableValue(value)
81
- || isObservableArray(value)
82
- || isObservableMap(value)
83
- || isObservableSet(value);
92
+ return observable.isComputed(value)
93
+ || observable.isObservableValue(value)
94
+ || observable.isObservableArray(value)
95
+ || observable.isObservableMap(value)
96
+ || observable.isObservableSet(value);
97
+ }
98
+
99
+ export function computed<TComputed>(func: () => TComputed): IComputed<TComputed> {
100
+ return observable.computed(func);
84
101
  }
85
102
 
103
+ export function observableValue<TValue, TSetter = TValue>(value?: TValue | null, setter?: (value: TSetter, observableValue: IObservableValue<TValue, TSetter>) => void): IObservableValue<TValue, TSetter> {
104
+ return observable.observableValue(value, setter);
105
+ }
106
+
107
+
86
108
  export function executeHandlerOnObject(handler: (object) => void, object: object,) {
87
109
  //Find out if the object is an array
88
110
  if (object.constructor === Array) {
@@ -93,7 +115,7 @@ export function executeHandlerOnObject(handler: (object) => void, object: object
93
115
  }
94
116
  } else {
95
117
  if (isSubscribable(object)) {
96
- const unwrapped = unwrap(object);
118
+ const unwrapped = observable.unwrap(object);
97
119
  if (typeof unwrapped === "object") {
98
120
  executeHandlerOnObject(handler, unwrapped);
99
121
  }
package/src/index.ts CHANGED
@@ -1,14 +1,24 @@
1
1
  import * as controls from "./controls/index";
2
2
  import * as utilities from "./utilities/index";
3
+ import * as attributes from "./framework/attributes";
4
+ import * as element from "./framework/element";
5
+ import * as event from "./framework/event";
6
+
7
+ import * as properties from "./framework/properties";
8
+ import * as root from "./framework/root";
9
+ import * as style from "./framework/style";
10
+ import * as types from "./framework/types";
11
+
3
12
 
4
13
  export { controls };
5
14
  export { utilities };
15
+ export { attributes };
16
+ export { element };
17
+ export { event };
18
+ export { properties };
19
+ export { root };
20
+ export { style };
21
+ export { types };
6
22
 
7
- export * from "./framework/attributes";
8
- export * from "./framework/element";
9
- export * from "./framework/event";
10
23
  export * from "./framework/observable";
11
- export * from "./framework/properties";
12
- export * from "./framework/root";
13
- export * from "./framework/style";
14
- export * from "./framework/types";
24
+