render-core 1.4.33 → 1.4.35

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/index.d.ts CHANGED
@@ -5,6 +5,7 @@ import { HooksGeneric } from "./tension/generic/plugin/hooks/HooksGeneric";
5
5
  import { AbstractComponent } from "./system/generic/component/instance/AbstractComponent";
6
6
  import { PrefaceGeneric } from "./tension/generic/plugin/preface/PrefaceGeneric";
7
7
  import { RouterGeneric } from "./tension/generic/router/RouterGeneric";
8
+ import { RenderOfficialRouter } from "render-router";
8
9
  /**
9
10
  * This class is used to prototype the properties type
10
11
  */
@@ -105,8 +106,8 @@ export declare class PageComponent extends AbstractComponent {
105
106
  */
106
107
  export declare class RenderJS implements RenderGeneric {
107
108
  contextController: ContextController;
108
- renderRouter: AbstractRouter;
109
- constructor(router: AbstractRouter);
109
+ renderRouter: RenderOfficialRouter;
110
+ constructor(router: RenderOfficialRouter);
110
111
  /**
111
112
  * This unc is used to register component to system
112
113
  * @param component
package/index.js CHANGED
@@ -22,6 +22,7 @@ import { set_context_controller } from "./system/recorder/table0/system_func_0";
22
22
  import { PrefaceAction } from "./tension/prototype/PrefaceAction";
23
23
  import { SystemInitPlugin } from "./tension/SystemInitPlugin";
24
24
  import { set_system_ext_router } from "./system/recorder/table3/system_func_3";
25
+ import { registerEvent } from "./tension/function/system_func";
25
26
  /**
26
27
  * This class is used to prototype the properties type
27
28
  */
@@ -114,6 +115,7 @@ var RenderJS = /** @class */ (function () {
114
115
  /* init the basis extension */
115
116
  this.use_plugin(new SystemInitPlugin());
116
117
  set_system_ext_router(this.renderRouter);
118
+ registerEvent("route:change");
117
119
  /* init the event */
118
120
  window.addEventListener("route:change", function () {
119
121
  _this.listen();
@@ -137,8 +139,7 @@ var RenderJS = /** @class */ (function () {
137
139
  */
138
140
  RenderJS.prototype.listen = function () {
139
141
  set_context_controller(this.contextController);
140
- var component = this.renderRouter.getComponent();
141
- component.component.render_method_for_listen(component.params, component.pathParams);
142
+ this.renderRouter.listen();
142
143
  };
143
144
  return RenderJS;
144
145
  }());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-core",
3
- "version": "1.4.33",
3
+ "version": "1.4.35",
4
4
  "description": "The extendable javascript web framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,7 @@
1
1
  import { HttpAction } from "../../generic/controller/prototype/HttpAction";
2
2
  import { RouterGeneric } from "../../../tension/generic/router/RouterGeneric";
3
- export declare function set_system_ext_router(router: RouterGeneric): void;
3
+ import { RenderOfficialRouter } from "render-router";
4
+ export declare function set_system_ext_router(router: RenderOfficialRouter): void;
4
5
  export declare function get_system_ext_router(): RouterGeneric;
5
6
  export declare function get_user_ext_http(): HttpAction;
6
7
  export declare function set_user_ext_http(http: HttpAction): void;
@@ -0,0 +1 @@
1
+ export declare function registerEvent(name: string): void;
@@ -0,0 +1,6 @@
1
+ export function registerEvent(name) {
2
+ window.addEventListener(name, function (evt) {
3
+ // @ts-ignore
4
+ evt.detail.component.render_method_for_listen(evt.detail.params, evt.detail.pathParams);
5
+ });
6
+ }
@@ -1,8 +1,8 @@
1
1
  import { HttpAction } from "../../../../system/generic/controller/prototype/HttpAction";
2
2
  import { AdjustComponent, ControlComponent } from "../../../../index";
3
- import { RouterGeneric } from "../../router/RouterGeneric";
3
+ import { RenderOfficialRouter } from "render-router";
4
4
  export interface PrefaceGeneric {
5
- add_system_router(router: RouterGeneric): void;
5
+ add_system_router(router: RenderOfficialRouter): void;
6
6
  add_user_http(http: HttpAction): void;
7
7
  add_anonymous_extension(name: string, plugin: object): void;
8
8
  add_anonymous_filed(name: string, value: any): void;
@@ -1,11 +1,11 @@
1
1
  import { PrefaceGeneric } from "../generic/plugin/preface/PrefaceGeneric";
2
2
  import { AdjustComponent, ControlComponent } from "../../index";
3
3
  import { HttpAction } from "../../system/generic/controller/prototype/HttpAction";
4
- import { RouterGeneric } from "../generic/router/RouterGeneric";
4
+ import { RenderOfficialRouter } from "render-router";
5
5
  export declare class PrefaceAction implements PrefaceGeneric {
6
6
  add_anonymous_extension(name: string, plugin: object): void;
7
7
  add_anonymous_filed(name: string, value: any): void;
8
- add_system_router(router: RouterGeneric): void;
8
+ add_system_router(router: RenderOfficialRouter): void;
9
9
  add_user_http(http: HttpAction): void;
10
10
  register_component(component: AdjustComponent | ControlComponent): void;
11
11
  set_field_route_mode(value: boolean): void;