@web-atoms/core 2.6.24 → 2.6.25

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 (120) hide show
  1. package/dist-esm/App.js +231 -235
  2. package/dist-esm/Atom.js +93 -96
  3. package/dist-esm/MockApp.js +17 -18
  4. package/dist-esm/Pack.js +1 -3
  5. package/dist-esm/core/AtomBinder.js +189 -187
  6. package/dist-esm/core/AtomComponent.js +479 -502
  7. package/dist-esm/core/AtomDispatcher.js +46 -48
  8. package/dist-esm/core/AtomDisposableList.js +24 -25
  9. package/dist-esm/core/AtomEnumerator.js +15 -16
  10. package/dist-esm/core/AtomList.js +193 -192
  11. package/dist-esm/core/AtomLoader.js +229 -215
  12. package/dist-esm/core/AtomMap.js +7 -8
  13. package/dist-esm/core/AtomOnce.js +22 -24
  14. package/dist-esm/core/AtomSelectableList.js +240 -243
  15. package/dist-esm/core/AtomUri.js +70 -72
  16. package/dist-esm/core/AtomWatcher.js +105 -111
  17. package/dist-esm/core/Bind.js +271 -269
  18. package/dist-esm/core/BindableProperty.js +26 -27
  19. package/dist-esm/core/CancelTokenFactory.js +21 -24
  20. package/dist-esm/core/Color.js +1 -2
  21. package/dist-esm/core/Colors.js +545 -231
  22. package/dist-esm/core/Command.js +236 -223
  23. package/dist-esm/core/Defer.js +21 -22
  24. package/dist-esm/core/EventScope.js +96 -88
  25. package/dist-esm/core/ExpressionParser.js +132 -144
  26. package/dist-esm/core/ExtendControl.js +7 -8
  27. package/dist-esm/core/FormattedError.js +7 -8
  28. package/dist-esm/core/FormattedString.js +4 -5
  29. package/dist-esm/core/Hacks.js +41 -42
  30. package/dist-esm/core/IFetchEvent.js +1 -2
  31. package/dist-esm/core/IScreen.js +1 -2
  32. package/dist-esm/core/IValueConverter.js +1 -2
  33. package/dist-esm/core/InheritedProperty.js +61 -63
  34. package/dist-esm/core/InjectProperty.js +12 -13
  35. package/dist-esm/core/KeyValuePairs.js +1 -2
  36. package/dist-esm/core/Markdown.js +14 -17
  37. package/dist-esm/core/MarkdownError.js +6 -7
  38. package/dist-esm/core/PropertyBinding.js +1 -2
  39. package/dist-esm/core/PropertyMap.js +28 -27
  40. package/dist-esm/core/Route.js +149 -148
  41. package/dist-esm/core/SingleInvoker.js +32 -35
  42. package/dist-esm/core/StringHelper.js +49 -51
  43. package/dist-esm/core/TransientDisposable.js +14 -16
  44. package/dist-esm/core/WatchProperty.js +18 -17
  45. package/dist-esm/core/WebImage.js +7 -8
  46. package/dist-esm/core/XNode.js +134 -117
  47. package/dist-esm/core/sleep.js +21 -24
  48. package/dist-esm/core/types.js +102 -103
  49. package/dist-esm/di/DISingleton.js +7 -5
  50. package/dist-esm/di/DITransient.js +7 -5
  51. package/dist-esm/di/IMockOrInject.js +1 -2
  52. package/dist-esm/di/IServiceProvider.js +1 -2
  53. package/dist-esm/di/Inject.js +67 -67
  54. package/dist-esm/di/Register.js +25 -26
  55. package/dist-esm/di/RegisterScoped.js +4 -3
  56. package/dist-esm/di/RegisterSingleton.js +4 -3
  57. package/dist-esm/di/ServiceCollection.js +38 -37
  58. package/dist-esm/di/ServiceProvider.js +94 -94
  59. package/dist-esm/di/TypeKey.js +13 -12
  60. package/dist-esm/services/BusyIndicatorService.js +7 -11
  61. package/dist-esm/services/CacheService.js +54 -62
  62. package/dist-esm/services/FetchBuilder.js +327 -278
  63. package/dist-esm/services/JsonService.js +118 -116
  64. package/dist-esm/services/MockNavigationService.js +127 -126
  65. package/dist-esm/services/NavigationService.js +95 -102
  66. package/dist-esm/services/ReferenceService.js +30 -33
  67. package/dist-esm/services/http/AjaxOptions.js +1 -3
  68. package/dist-esm/services/http/JsonError.js +16 -15
  69. package/dist-esm/services/http/RestService.js +314 -323
  70. package/dist-esm/style/StyleRule.js +1 -2
  71. package/dist-esm/test.js +0 -1
  72. package/dist-esm/unit/AtomTest.js +10 -11
  73. package/dist-esm/view-model/Action.js +258 -223
  74. package/dist-esm/view-model/AtomViewModel.js +234 -232
  75. package/dist-esm/view-model/AtomWindowViewModel.js +13 -14
  76. package/dist-esm/view-model/BindableUrlParameter.js +7 -8
  77. package/dist-esm/view-model/Delay.js +21 -25
  78. package/dist-esm/view-model/Disposable.js +28 -29
  79. package/dist-esm/view-model/Load.js +72 -73
  80. package/dist-esm/view-model/Once.js +33 -35
  81. package/dist-esm/view-model/baseTypes.js +4 -5
  82. package/dist-esm/view-model/bindPromise.js +24 -27
  83. package/dist-esm/view-model/bindProperty.js +3 -4
  84. package/dist-esm/view-model/bindUrlParameter.js +39 -43
  85. package/dist-esm/web/controls/AtomComboBox.js +56 -63
  86. package/dist-esm/web/controls/AtomControl.js +485 -490
  87. package/dist-esm/web/controls/AtomGridSplitter.js +57 -50
  88. package/dist-esm/web/controls/AtomGridView.js +230 -222
  89. package/dist-esm/web/controls/AtomItemsControl.js +677 -688
  90. package/dist-esm/web/controls/AtomPage.js +6 -7
  91. package/dist-esm/web/controls/AtomTemplate.js +1 -3
  92. package/dist-esm/web/controls/AtomTemplateControl.js +28 -29
  93. package/dist-esm/web/controls/AtomViewStack.js +19 -20
  94. package/dist-esm/web/core/AtomUI.js +200 -200
  95. package/dist-esm/web/core/Encoder.js +142 -152
  96. package/dist-esm/web/core/HtmlNode.js +141 -139
  97. package/dist-esm/web/images/Busy.js +1 -2
  98. package/dist-esm/web/images/BusyDataUrl.js +2 -869
  99. package/dist-esm/web/images/Button.js +1 -2
  100. package/dist-esm/web/images/ButtonDataUrl.js +2 -30
  101. package/dist-esm/web/images/CloseButton.js +1 -2
  102. package/dist-esm/web/images/CloseButtonDataUrl.js +2 -30
  103. package/dist-esm/web/images/CloseButtonHover.js +1 -2
  104. package/dist-esm/web/images/CloseButtonHoverDataUrl.js +2 -24
  105. package/dist-esm/web/services/LastTarget.js +31 -29
  106. package/dist-esm/web/services/MarkdownService.js +19 -31
  107. package/dist-esm/web/services/NotificationPopup.js +28 -21
  108. package/dist-esm/web/services/PopupService.js +512 -478
  109. package/dist-esm/web/services/PopupWindow.js +266 -247
  110. package/dist-esm/web/styles/AtomAlertWindowStyle.js +39 -40
  111. package/dist-esm/web/styles/AtomFrameStyle.js +15 -16
  112. package/dist-esm/web/styles/AtomNotificationStyle.js +19 -20
  113. package/dist-esm/web/styles/AtomPageLinkStyle.js +11 -12
  114. package/dist-esm/web/styles/AtomPopupStyle.js +9 -10
  115. package/dist-esm/web/styles/AtomStyle.js +61 -64
  116. package/dist-esm/web/styles/AtomStyleSheet.js +50 -51
  117. package/dist-esm/web/styles/AtomWindowStyle.js +116 -117
  118. package/dist-esm/web/styles/IStyleDeclaration.js +1 -2
  119. package/dist-esm/web/styles/StyleBuilder.js +79 -80
  120. package/package.json +1 -1
@@ -3,93 +3,101 @@ import { CancelToken } from "./types.js";
3
3
  const key = DateTime.now.msSinceEpoch;
4
4
  let id = 1;
5
5
  export default class EventScope {
6
- static create() {
7
- return new EventScope(`eventScopeE${key}${id++}`);
8
- }
9
- bindEvent(fx) {
10
- return {
11
- [this.eventName]: fx
12
- };
13
- }
14
- constructor(eventType) {
15
- this.eventType = eventType;
16
- this.eventName = `event-${this.eventType}`;
17
- }
18
- subscribe(control, handler) {
19
- return control.bindEvent(window, this.eventType, handler);
20
- }
21
- listen(fx) {
22
- const asyncHandler = (ce) => {
23
- if (ce.defaultPrevented) {
24
- return;
6
+ static create() {
7
+ return new EventScope(`eventScopeE${key}${id++}`);
8
+ }
9
+ bindEvent(fx) {
10
+ return {
11
+ [this.eventName]: fx
12
+ };
13
+ }
14
+ constructor(eventType) {
15
+ this.eventType = eventType;
16
+ this.eventName = `event-${this.eventType}`;
17
+ }
18
+ subscribe(control, handler) {
19
+ return control.bindEvent(window, this.eventType, handler);
20
+ }
21
+ listen(fx) {
22
+ const asyncHandler = ce => {
23
+ if (ce.defaultPrevented) {
24
+ return;
25
+ }
26
+ try {
27
+ const p = fx(ce);
28
+ if (p?.catch) {
29
+ p.catch(r => {
30
+ if (CancelToken.isCancelled(r)) {
31
+ return;
25
32
  }
26
- try {
27
- const p = fx(ce);
28
- if (p?.catch) {
29
- p.catch((r) => {
30
- if (CancelToken.isCancelled(r)) {
31
- return;
32
- }
33
- console.error(r);
34
- });
35
- }
33
+ console.error(r);
34
+ });
35
+ }
36
+ } catch (e) {
37
+ if (CancelToken.isCancelled(e)) {
38
+ return;
39
+ }
40
+ console.error(e);
41
+ }
42
+ };
43
+ window.addEventListener(this.eventType, asyncHandler);
44
+ return {
45
+ dispose: () => {
46
+ window.removeEventListener(this.eventType, asyncHandler);
47
+ }
48
+ };
49
+ }
50
+ listenOn(target, fx) {
51
+ const asyncHandler = ce => {
52
+ if (ce.defaultPrevented) {
53
+ return;
54
+ }
55
+ try {
56
+ const p = fx(ce);
57
+ if (p?.catch) {
58
+ p.catch(r => {
59
+ if (CancelToken.isCancelled(r)) {
60
+ return;
36
61
  }
37
- catch (e) {
38
- if (CancelToken.isCancelled(e)) {
39
- return;
40
- }
41
- console.error(e);
42
- }
43
- };
44
- window.addEventListener(this.eventType, asyncHandler);
45
- return {
46
- dispose: () => {
47
- window.removeEventListener(this.eventType, asyncHandler);
48
- }
49
- };
50
- }
51
- listenOn(target, fx) {
52
- const asyncHandler = (ce) => {
53
- if (ce.defaultPrevented) {
54
- return;
55
- }
56
- try {
57
- const p = fx(ce);
58
- if (p?.catch) {
59
- p.catch((r) => {
60
- if (CancelToken.isCancelled(r)) {
61
- return;
62
- }
63
- console.error(r);
64
- });
65
- }
66
- }
67
- catch (e) {
68
- if (CancelToken.isCancelled(e)) {
69
- return;
70
- }
71
- console.error(e);
72
- }
73
- };
74
- target.addEventListener(this.eventType, asyncHandler);
75
- return {
76
- dispose: () => {
77
- target.removeEventListener(this.eventType, asyncHandler);
78
- }
79
- };
80
- }
81
- dispatch(target, detail, { cancelable = true, bubbles = true } = {}) {
82
- const ce = new CustomEvent(this.eventType, { detail, cancelable, bubbles });
83
- target.dispatchEvent(ce);
84
- return ce;
85
- }
86
- dispatchEvent(detail, cancelable = true) {
87
- const ce = new CustomEvent(this.eventType, { detail, cancelable, bubbles: false });
88
- window.dispatchEvent(ce);
89
- return ce;
90
- }
91
- toString() {
92
- return this.eventType;
93
- }
94
- }
95
- //# sourceMappingURL=EventScope.js.map
62
+ console.error(r);
63
+ });
64
+ }
65
+ } catch (e) {
66
+ if (CancelToken.isCancelled(e)) {
67
+ return;
68
+ }
69
+ console.error(e);
70
+ }
71
+ };
72
+ target.addEventListener(this.eventType, asyncHandler);
73
+ return {
74
+ dispose: () => {
75
+ target.removeEventListener(this.eventType, asyncHandler);
76
+ }
77
+ };
78
+ }
79
+ dispatch(target, detail, {
80
+ cancelable = true,
81
+ bubbles = true
82
+ } = {}) {
83
+ const ce = new CustomEvent(this.eventType, {
84
+ detail,
85
+ cancelable,
86
+ bubbles
87
+ });
88
+ target.dispatchEvent(ce);
89
+ return ce;
90
+ }
91
+ dispatchEvent(detail, cancelable = true) {
92
+ const ce = new CustomEvent(this.eventType, {
93
+ detail,
94
+ cancelable,
95
+ bubbles: false
96
+ });
97
+ window.dispatchEvent(ce);
98
+ return ce;
99
+ }
100
+ toString() {
101
+ return this.eventType;
102
+ }
103
+ }
@@ -1,161 +1,149 @@
1
1
  const viewModelParseWatchCache = {};
2
2
  function trimRegEx(t, r) {
3
- const m = r.exec(t);
4
- if (m && m.length) {
5
- return [true, t.substring(m[0].length).trim(), m[0]];
6
- }
7
- return [false, t, ""];
3
+ const m = r.exec(t);
4
+ if (m && m.length) {
5
+ return [true, t.substring(m[0].length).trim(), m[0]];
6
+ }
7
+ return [false, t, ""];
8
8
  }
9
9
  function extractTill(text, search, returnOriginal = false) {
10
- const index = text.indexOf(search);
11
- if (index <= 0) {
12
- return returnOriginal ? text : "";
13
- }
14
- return text.substring(0, index);
10
+ const index = text.indexOf(search);
11
+ if (index <= 0) {
12
+ return returnOriginal ? text : "";
13
+ }
14
+ return text.substring(0, index);
15
15
  }
16
16
  export function parsePath(f, parseThis) {
17
- let str = f.toString().trim();
18
- str = str.split("\n").filter((s) => !/^\/\//.test(s.trim())).join("\n");
19
- const key = (parseThis === undefined ? "un:" : (parseThis ? "_this:" : "_noThis:")) + str;
20
- const px1 = viewModelParseWatchCache[key];
21
- if (px1) {
22
- return px1;
23
- }
24
- if (str.endsWith("}")) {
25
- str = str.substr(0, str.length - 1);
26
- }
27
- const functionRegEx = /^\w+\s*\(/;
28
- const lambdaRegEx = /^\(?(\w+)?(\s?\,\s?\w+)*\)?\s?\=\>/;
29
- let arg = "";
30
- const original = str;
31
- let [success, remaining] = trimRegEx(str, functionRegEx);
17
+ let str = f.toString().trim();
18
+ str = str.split("\n").filter(s => !/^\/\//.test(s.trim())).join("\n");
19
+ const key = (parseThis === undefined ? "un:" : parseThis ? "_this:" : "_noThis:") + str;
20
+ const px1 = viewModelParseWatchCache[key];
21
+ if (px1) {
22
+ return px1;
23
+ }
24
+ if (str.endsWith("}")) {
25
+ str = str.substr(0, str.length - 1);
26
+ }
27
+ const functionRegEx = /^\w+\s*\(/;
28
+ const lambdaRegEx = /^\(?(\w+)?(\s?\,\s?\w+)*\)?\s?\=\>/;
29
+ let arg = "";
30
+ const original = str;
31
+ let [success, remaining] = trimRegEx(str, functionRegEx);
32
+ if (success) {
33
+ str = remaining;
34
+ remaining = extractTill(remaining, ")");
35
+ str = str.substring(remaining.length);
36
+ arg = extractTill(remaining, ",", true);
37
+ } else {
38
+ [success, str, remaining] = trimRegEx(str, lambdaRegEx);
32
39
  if (success) {
33
- str = remaining;
34
- remaining = extractTill(remaining, ")");
35
- str = str.substring(remaining.length);
36
- arg = extractTill(remaining, ",", true);
40
+ remaining = remaining.trim();
41
+ remaining = remaining.substring(0, remaining.length - 2);
42
+ remaining = extractTill(remaining, ")", true);
43
+ arg = extractTill(remaining, ",", true);
44
+ if (arg.startsWith("(")) {
45
+ arg = arg.substring(1);
46
+ }
47
+ } else {
48
+ if (parseThis !== undefined && parseThis === false) {
49
+ return [];
50
+ } else {
51
+ parseThis = true;
52
+ }
37
53
  }
38
- else {
39
- [success, str, remaining] = trimRegEx(str, lambdaRegEx);
40
- if (success) {
41
- remaining = remaining.trim();
42
- remaining = remaining.substring(0, remaining.length - 2);
43
- remaining = extractTill(remaining, ")", true);
44
- arg = extractTill(remaining, ",", true);
45
- if (arg.startsWith("(")) {
46
- arg = arg.substring(1);
47
- }
48
- }
49
- else {
50
- if (parseThis !== undefined && parseThis === false) {
51
- return [];
52
- }
53
- else {
54
- parseThis = true;
55
- }
56
- }
54
+ }
55
+ str = str.trim();
56
+ const isThis = parseThis === undefined ? (arg ? false : true) || parseThis : parseThis;
57
+ const p = (isThis ? "(\\_this|this)" : arg || "").trim();
58
+ if (p.length === 0) {
59
+ const empty = [];
60
+ viewModelParseWatchCache[key] = empty;
61
+ return empty;
62
+ }
63
+ const regExp = `(?:(\\b${p})(?:(\\.[a-zA-Z_][a-zA-Z_0-9]*)+)\\s?(?:(\\(|\\=\\=\\=|\\=\\=|\\=)?))`;
64
+ const re = new RegExp(regExp, "gi");
65
+ let path = [];
66
+ const ms = str.replace(re, m => {
67
+ let px = m;
68
+ if (px.startsWith("this.")) {
69
+ if (parseThis !== true) {
70
+ px = px.substr(5);
71
+ }
72
+ } else if (px.startsWith("_this.")) {
73
+ if (parseThis !== true) {
74
+ px = px.substr(6);
75
+ } else {
76
+ px = px.substr(1);
77
+ }
78
+ } else {
79
+ px = px.substr(p.length + 1);
57
80
  }
58
- str = str.trim();
59
- const isThis = parseThis === undefined
60
- ? ((arg ? false : true) || parseThis)
61
- : parseThis;
62
- const p = (isThis ? "(\\_this|this)" : (arg || "")).trim();
63
- if (p.length === 0) {
64
- const empty = [];
65
- viewModelParseWatchCache[key] = empty;
66
- return empty;
81
+ px = px.split(".").filter(s => !s.endsWith("(")).join(".");
82
+ if (!path.find(y => y === px)) {
83
+ path.push(px);
67
84
  }
68
- const regExp = `(?:(\\b${p})(?:(\\.[a-zA-Z_][a-zA-Z_0-9]*)+)\\s?(?:(\\(|\\=\\=\\=|\\=\\=|\\=)?))`;
69
- const re = new RegExp(regExp, "gi");
70
- let path = [];
71
- const ms = str.replace(re, (m) => {
72
- let px = m;
73
- if (px.startsWith("this.")) {
74
- if (parseThis !== true) {
75
- px = px.substr(5);
76
- }
77
- }
78
- else if (px.startsWith("_this.")) {
79
- if (parseThis !== true) {
80
- px = px.substr(6);
81
- }
82
- else {
83
- px = px.substr(1);
84
- }
85
- }
86
- else {
87
- px = px.substr(p.length + 1);
88
- }
89
- px = px.split(".").filter((s) => !s.endsWith("(")).join(".");
90
- if (!path.find((y) => y === px)) {
91
- path.push(px);
92
- }
93
- const filtered = [];
94
- for (const iterator of path) {
95
- if (iterator.endsWith("==") || !(iterator.endsWith("(") || iterator.endsWith("="))) {
96
- filtered.push((iterator.endsWith("===") ? iterator.substr(0, iterator.length - 3) :
97
- (iterator.endsWith("==") ? iterator.substr(0, iterator.length - 2) : iterator)).trim());
98
- }
85
+ const filtered = [];
86
+ for (const iterator of path) {
87
+ if (iterator.endsWith("==") || !(iterator.endsWith("(") || iterator.endsWith("="))) {
88
+ filtered.push((iterator.endsWith("===") ? iterator.substr(0, iterator.length - 3) : iterator.endsWith("==") ? iterator.substr(0, iterator.length - 2) : iterator).trim());
89
+ }
90
+ }
91
+ path = filtered.filter(px11 => {
92
+ const search = px11 + ".";
93
+ for (const iterator of filtered) {
94
+ if (px11 !== iterator && iterator.indexOf(search) !== -1) {
95
+ return false;
99
96
  }
100
- path = filtered.filter((px11) => {
101
- const search = px11 + ".";
102
- for (const iterator of filtered) {
103
- if (px11 !== iterator && iterator.indexOf(search) !== -1) {
104
- return false;
105
- }
106
- }
107
- return true;
108
- });
109
- return m;
97
+ }
98
+ return true;
110
99
  });
111
- path = path.sort((a, b) => b.localeCompare(a));
112
- const duplicates = path;
113
- path = [];
114
- for (const iterator of duplicates) {
115
- if (path.find((px2) => px2 === iterator)) {
116
- continue;
117
- }
118
- path.push(iterator);
100
+ return m;
101
+ });
102
+ path = path.sort((a, b) => b.localeCompare(a));
103
+ const duplicates = path;
104
+ path = [];
105
+ for (const iterator of duplicates) {
106
+ if (path.find(px2 => px2 === iterator)) {
107
+ continue;
119
108
  }
120
- const rp = [];
121
- for (const rpItem of path) {
122
- if (rp.find((x) => x.startsWith(rpItem))) {
123
- continue;
124
- }
125
- rp.push(rpItem);
109
+ path.push(iterator);
110
+ }
111
+ const rp = [];
112
+ for (const rpItem of path) {
113
+ if (rp.find(x => x.startsWith(rpItem))) {
114
+ continue;
126
115
  }
127
- const pl = path.filter((p1) => p1).map((p1) => p1.split("."));
128
- viewModelParseWatchCache[key] = pl;
129
- return pl;
116
+ rp.push(rpItem);
117
+ }
118
+ const pl = path.filter(p1 => p1).map(p1 => p1.split("."));
119
+ viewModelParseWatchCache[key] = pl;
120
+ return pl;
130
121
  }
131
122
  const viewModelParseWatchCache2 = {};
132
123
  export function parsePathLists(f) {
133
- const str = f.toString().trim();
134
- const key = str;
135
- const px1 = viewModelParseWatchCache2[key];
136
- if (px1) {
137
- return px1;
138
- }
139
- const pl = {
140
- pathList: parsePath(str, false),
141
- thisPath: parsePath(str, true),
142
- combined: []
143
- };
144
- if (pl.thisPath.length && pl.pathList.length) {
145
- pl.combined = pl.thisPath
146
- .map((x) => {
147
- x[0] = "t";
148
- x.splice(0, 0, "this");
149
- return x;
150
- })
151
- .concat(pl.pathList.map((x) => {
152
- x.splice(0, 0, "this", "x");
153
- return x;
154
- }));
155
- pl.thisPath = [];
156
- pl.pathList = [];
157
- }
158
- viewModelParseWatchCache2[key] = pl;
159
- return pl;
160
- }
161
- //# sourceMappingURL=ExpressionParser.js.map
124
+ const str = f.toString().trim();
125
+ const key = str;
126
+ const px1 = viewModelParseWatchCache2[key];
127
+ if (px1) {
128
+ return px1;
129
+ }
130
+ const pl = {
131
+ pathList: parsePath(str, false),
132
+ thisPath: parsePath(str, true),
133
+ combined: []
134
+ };
135
+ if (pl.thisPath.length && pl.pathList.length) {
136
+ pl.combined = pl.thisPath.map(x => {
137
+ x[0] = "t";
138
+ x.splice(0, 0, "this");
139
+ return x;
140
+ }).concat(pl.pathList.map(x => {
141
+ x.splice(0, 0, "this", "x");
142
+ return x;
143
+ }));
144
+ pl.thisPath = [];
145
+ pl.pathList = [];
146
+ }
147
+ viewModelParseWatchCache2[key] = pl;
148
+ return pl;
149
+ }
@@ -1,10 +1,9 @@
1
1
  export default function ExtendControl(ctrl) {
2
- class ExtendedControl extends ctrl {
3
- constructor(...args) {
4
- super(...args);
5
- this.runAfterInit(() => this.app.runAsync(() => this.init()));
6
- }
2
+ class ExtendedControl extends ctrl {
3
+ constructor(...args) {
4
+ super(...args);
5
+ this.runAfterInit(() => this.app.runAsync(() => this.init()));
7
6
  }
8
- return ExtendedControl;
9
- }
10
- //# sourceMappingURL=ExtendControl.js.map
7
+ }
8
+ return ExtendedControl;
9
+ }
@@ -1,9 +1,8 @@
1
1
  export default class FormattedError {
2
- constructor(msg) {
3
- const e = new Error(msg.toString());
4
- e.formattedMessage = msg;
5
- e.__proto__ = FormattedError.prototype;
6
- return e;
7
- }
8
- }
9
- //# sourceMappingURL=FormattedError.js.map
2
+ constructor(msg) {
3
+ const e = new Error(msg.toString());
4
+ e.formattedMessage = msg;
5
+ e.__proto__ = FormattedError.prototype;
6
+ return e;
7
+ }
8
+ }
@@ -1,6 +1,5 @@
1
1
  export default class FormattedString {
2
- constructor(text) {
3
- this.text = text;
4
- }
5
- }
6
- //# sourceMappingURL=FormattedString.js.map
2
+ constructor(text) {
3
+ this.text = text;
4
+ }
5
+ }
@@ -1,54 +1,53 @@
1
1
  import { ChildEnumerator } from "../web/core/AtomUI.js";
2
2
  import { AtomBinder } from "./AtomBinder.js";
3
3
  export const visitDescendents = (element, action) => {
4
- for (const iterator of ChildEnumerator.enumerate(element)) {
5
- const eAny = iterator;
6
- const ac = eAny ? eAny.atomControl : undefined;
7
- if (!action(iterator, ac)) {
8
- continue;
9
- }
10
- visitDescendents(iterator, action);
4
+ for (const iterator of ChildEnumerator.enumerate(element)) {
5
+ const eAny = iterator;
6
+ const ac = eAny ? eAny.atomControl : undefined;
7
+ if (!action(iterator, ac)) {
8
+ continue;
11
9
  }
10
+ visitDescendents(iterator, action);
11
+ }
12
12
  };
13
13
  export const refreshInherited = (target, name, fieldName) => {
14
- AtomBinder.refreshValue(target, name);
15
- if (!fieldName) {
16
- fieldName = "m" + name[0].toUpperCase() + name.substr(1);
14
+ AtomBinder.refreshValue(target, name);
15
+ if (!fieldName) {
16
+ fieldName = "m" + name[0].toUpperCase() + name.substr(1);
17
+ }
18
+ if (!target.element) {
19
+ return;
20
+ }
21
+ visitDescendents(target.element, (e, ac) => {
22
+ if (ac) {
23
+ if (ac[fieldName] === undefined) {
24
+ refreshInherited(ac, name, fieldName);
25
+ }
26
+ return false;
17
27
  }
18
- if (!target.element) {
19
- return;
20
- }
21
- visitDescendents(target.element, (e, ac) => {
22
- if (ac) {
23
- if (ac[fieldName] === undefined) {
24
- refreshInherited(ac, name, fieldName);
25
- }
26
- return false;
27
- }
28
- return true;
29
- });
28
+ return true;
29
+ });
30
30
  };
31
31
  export const watchProperty = (element, name, events, f) => {
32
- if (events.indexOf("change") === -1) {
33
- events.push("change");
34
- }
35
- const l = (e) => {
36
- const e1 = element;
37
- const v = e1.type === "checkbox" ? e1.checked : e1.value;
38
- f(v);
39
- };
40
- for (const iterator of events) {
41
- element.addEventListener(iterator, l, false);
32
+ if (events.indexOf("change") === -1) {
33
+ events.push("change");
34
+ }
35
+ const l = e => {
36
+ const e1 = element;
37
+ const v = e1.type === "checkbox" ? e1.checked : e1.value;
38
+ f(v);
39
+ };
40
+ for (const iterator of events) {
41
+ element.addEventListener(iterator, l, false);
42
+ }
43
+ return {
44
+ dispose: () => {
45
+ for (const iterator of events) {
46
+ element.removeEventListener(iterator, l, false);
47
+ }
42
48
  }
43
- return {
44
- dispose: () => {
45
- for (const iterator of events) {
46
- element.removeEventListener(iterator, l, false);
47
- }
48
- }
49
- };
49
+ };
50
50
  };
51
51
  export const setValue = (element, name, value) => {
52
- element[name] = value;
53
- };
54
- //# sourceMappingURL=Hacks.js.map
52
+ element[name] = value;
53
+ };
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=IFetchEvent.js.map
1
+ export {};
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=IScreen.js.map
1
+ export {};
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=IValueConverter.js.map
1
+ export {};