simple-boot-front 1.0.106 → 1.0.109
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/SimpleBootFront.d.ts +1 -1
- package/SimpleBootFront.js +14 -10
- package/lifecycle/OnInit.d.ts +1 -1
- package/package.json +3 -3
- package/script/ScriptRunnable.d.ts +1 -1
package/SimpleBootFront.d.ts
CHANGED
@@ -27,7 +27,7 @@ export declare class SimpleBootFront extends SimpleApplication {
|
|
27
27
|
writeRootRouter(): SimAtomic<any>;
|
28
28
|
goRouting(url: string): Promise<RouterModule<SimAtomic<Object>, any>>;
|
29
29
|
runRouting(otherInstanceSim?: Map<ConstructorType<any>, any>, url?: string): Promise<RouterModule<SimAtomic<Object>, any> | undefined>;
|
30
|
-
run(otherInstanceSim?: Map<ConstructorType<any>, any>, url?: string):
|
30
|
+
run(otherInstanceSim?: Map<ConstructorType<any>, any>, url?: string): SimstanceManager;
|
31
31
|
private afterSetting;
|
32
32
|
initDomRenderScripts(): void;
|
33
33
|
private initDomRenderTargetElements;
|
package/SimpleBootFront.js
CHANGED
@@ -75,7 +75,8 @@ var SimstanceManager_1 = require("simple-boot-core/simstance/SimstanceManager");
|
|
75
75
|
var IntentManager_1 = require("simple-boot-core/intent/IntentManager");
|
76
76
|
var RouterManager_1 = require("simple-boot-core/route/RouterManager");
|
77
77
|
var ScriptUtils_1 = require("dom-render/utils/script/ScriptUtils");
|
78
|
-
var RawSet_1 = require("dom-render/RawSet");
|
78
|
+
var RawSet_1 = require("dom-render/rawsets/RawSet");
|
79
|
+
var RawSetType_1 = require("dom-render/rawsets/RawSetType");
|
79
80
|
var Types_1 = require("dom-render/types/Types");
|
80
81
|
var InjectFrontSituationType_1 = require("./decorators/inject/InjectFrontSituationType");
|
81
82
|
var SimpleBootFront = (function (_super) {
|
@@ -162,7 +163,7 @@ var SimpleBootFront = (function (_super) {
|
|
162
163
|
SimpleBootFront.prototype.getComponentInnerHtml = function (targetObj, id) {
|
163
164
|
var _a, _b;
|
164
165
|
var component = (0, Component_1.getComponent)(targetObj);
|
165
|
-
var styles = RawSet_1.RawSet.
|
166
|
+
var styles = RawSet_1.RawSet.generateStyleTransform((_a = component === null || component === void 0 ? void 0 : component.styles) !== null && _a !== void 0 ? _a : [], id);
|
166
167
|
var template = ((_b = component === null || component === void 0 ? void 0 : component.template) !== null && _b !== void 0 ? _b : '');
|
167
168
|
return styles + template;
|
168
169
|
};
|
@@ -175,7 +176,7 @@ var SimpleBootFront = (function (_super) {
|
|
175
176
|
};
|
176
177
|
SimpleBootFront.prototype.initRun = function (otherInstanceSim) {
|
177
178
|
var _this = this;
|
178
|
-
_super.prototype.run.call(this, otherInstanceSim);
|
179
|
+
var simstanceManager = _super.prototype.run.call(this, otherInstanceSim);
|
179
180
|
this.initDomRenderScripts();
|
180
181
|
this.initDomRenderTargetElements();
|
181
182
|
this.navigation = this.simstanceManager.getOrNewSim(Navigation_1.Navigation);
|
@@ -190,6 +191,7 @@ var SimpleBootFront = (function (_super) {
|
|
190
191
|
_this.afterSetting();
|
191
192
|
});
|
192
193
|
});
|
194
|
+
return simstanceManager;
|
193
195
|
};
|
194
196
|
SimpleBootFront.prototype.initWriteRootRouter = function () {
|
195
197
|
var _a;
|
@@ -203,13 +205,14 @@ var SimpleBootFront = (function (_super) {
|
|
203
205
|
}
|
204
206
|
};
|
205
207
|
SimpleBootFront.prototype.writeRootRouter = function () {
|
206
|
-
var _a, _b, _c;
|
207
208
|
var routerAtomic = new SimAtomic_1.SimAtomic(this.rootRouter, this.getSimstanceManager());
|
208
209
|
var target = this.option.window.document.querySelector(this.option.selector);
|
209
210
|
if (target && routerAtomic.value) {
|
210
|
-
var
|
211
|
-
var
|
212
|
-
target.
|
211
|
+
var id = 'root-router';
|
212
|
+
var startEndPoint = RawSet_1.RawSet.createStartEndPoint(id, RawSetType_1.RawSetType.TARGET_ELEMENT, this.domRenderConfig);
|
213
|
+
target.appendChild(startEndPoint.start);
|
214
|
+
target.insertAdjacentHTML('beforeend', this.getComponentInnerHtml(this.rootRouter, id));
|
215
|
+
target.appendChild(startEndPoint.end);
|
213
216
|
}
|
214
217
|
return routerAtomic;
|
215
218
|
};
|
@@ -234,11 +237,11 @@ var SimpleBootFront = (function (_super) {
|
|
234
237
|
SimpleBootFront.prototype.runRouting = function (otherInstanceSim, url) {
|
235
238
|
var _a;
|
236
239
|
return __awaiter(this, void 0, void 0, function () {
|
237
|
-
var intent, data;
|
240
|
+
var simstanceManager, intent, data;
|
238
241
|
return __generator(this, function (_b) {
|
239
242
|
switch (_b.label) {
|
240
243
|
case 0:
|
241
|
-
this.initRun(otherInstanceSim);
|
244
|
+
simstanceManager = this.initRun(otherInstanceSim);
|
242
245
|
if (url) {
|
243
246
|
this.navigation.goNoPopStateEvent(url);
|
244
247
|
}
|
@@ -253,11 +256,12 @@ var SimpleBootFront = (function (_super) {
|
|
253
256
|
});
|
254
257
|
};
|
255
258
|
SimpleBootFront.prototype.run = function (otherInstanceSim, url) {
|
256
|
-
this.initRun(otherInstanceSim);
|
259
|
+
var simstanceManager = this.initRun(otherInstanceSim);
|
257
260
|
if (url) {
|
258
261
|
this.navigation.go(url);
|
259
262
|
}
|
260
263
|
this.option.window.dispatchEvent(new Event('popstate'));
|
264
|
+
return simstanceManager;
|
261
265
|
};
|
262
266
|
SimpleBootFront.prototype.afterSetting = function () {
|
263
267
|
var _this = this;
|
package/lifecycle/OnInit.d.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "simple-boot-front",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.109",
|
4
4
|
"main": "SimpleApplication.js",
|
5
5
|
"license": "MIT",
|
6
6
|
"description": "front end SPA frameworks",
|
@@ -72,7 +72,7 @@
|
|
72
72
|
"typescript": "^4.4.3"
|
73
73
|
},
|
74
74
|
"dependencies": {
|
75
|
-
"dom-render": "^1.0.
|
76
|
-
"simple-boot-core": "^1.0.
|
75
|
+
"dom-render": "^1.0.87",
|
76
|
+
"simple-boot-core": "^1.0.32"
|
77
77
|
}
|
78
78
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Runnable } from 'simple-boot-core/run/Runnable';
|
2
|
-
import { RawSet } from 'dom-render/RawSet';
|
2
|
+
import { RawSet } from 'dom-render/rawsets/RawSet';
|
3
3
|
export declare abstract class ScriptRunnable implements Runnable {
|
4
4
|
rawSets: Map<RawSet, any>;
|
5
5
|
render(): void;
|