targetj 1.0.30 → 1.0.31

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 (3) hide show
  1. package/Exports.js +2 -5
  2. package/package.json +1 -1
  3. package/src/App.js +14 -6
package/Exports.js CHANGED
@@ -1,5 +1,2 @@
1
- import { tapp, App } from "./src/App.js";
2
- import { TModel } from "./src/TModel.js";
3
-
4
- var events = tapp.events;
5
- export { tapp, App, TModel, events };
1
+ export * from "./src/App.js"
2
+ export * from "./src/TModel.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "targetj",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "keywords": [
5
5
  "targetj"
6
6
  ],
package/src/App.js CHANGED
@@ -13,7 +13,7 @@ import { TargetManager } from "./TargetManager.js";
13
13
 
14
14
  var tapp;
15
15
 
16
- function App(tmodel, rootId) {
16
+ function Application(tmodel, rootId) {
17
17
 
18
18
  function my() {}
19
19
 
@@ -138,13 +138,21 @@ function App(tmodel, rootId) {
138
138
  my.find = function(oid) {
139
139
  return SearchUtil.find(oid);
140
140
  };
141
-
142
- tapp = my;
143
- my.init().start();
144
141
 
145
142
  return my;
146
143
  }
147
-
144
+
145
+ function App(tmodel, rootId) {
146
+ tapp = Application(tmodel, rootId);
147
+ tapp.init().start();
148
+ return tapp;
149
+ }
150
+
151
+ function events() {
152
+ return tapp ? tapp.events : null;
153
+ }
154
+
155
+
148
156
  window.t = window.t || SearchUtil.find;
149
157
  App.oids = {};
150
158
  App.getOid = function(type) {
@@ -156,4 +164,4 @@ App.getOid = function(type) {
156
164
  return { oid: num > 0 ? type + num : type, num: num };
157
165
  };
158
166
 
159
- export { tapp, App };
167
+ export { tapp, App, events };