dom-render 1.0.84 → 1.0.87

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.
@@ -1,4 +1,4 @@
1
- import { Config } from '../Config';
1
+ import { Config } from '../configs/Config';
2
2
  export declare class EventManager {
3
3
  static ownerVariablePathAttrName: string;
4
4
  static readonly attrPrefix = "dr-";
@@ -1,4 +1,4 @@
1
- import { Config } from '../Config';
1
+ import { Config } from '../configs/Config';
2
2
  export interface OnProxyDomRender {
3
3
  onProxyDomRender(config: Config): void;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import { ConstructorType } from '../types/Types';
2
- import { Config } from '../Config';
2
+ import { Config } from '../configs/Config';
3
3
  declare enum CallBackType {
4
4
  FILTER = 0,
5
5
  MAP = 1,
@@ -30,7 +30,7 @@ var DrTargetElement = /** @class */ (function (_super) {
30
30
  var _b, _c, _d, _e;
31
31
  var targetElement = (_c = (_b = this.source.config) === null || _b === void 0 ? void 0 : _b.targetElements) === null || _c === void 0 ? void 0 : _c.find(function (it) { return it.name.toLowerCase() === _this.elementSource.element.tagName.toLowerCase(); });
32
32
  if (targetElement) {
33
- var documentFragment = targetElement.callBack(this.elementSource.element, this.source.obj, this.rawSet, this.elementSource.attrs);
33
+ var documentFragment = targetElement.callBack(this.elementSource.element, this.source.obj, this.rawSet, this.elementSource.attrs, this.source.config);
34
34
  if (documentFragment) {
35
35
  // const targetAttrMap = this.elementSource.element.getAttribute(EventManager.normalAttrMapAttrName);
36
36
  var detectAction_1 = this.elementSource.element.getAttribute(RawSet_1.RawSet.DR_DETECT_NAME);
@@ -37,11 +37,11 @@ var DrThis = /** @class */ (function (_super) {
37
37
  RawSet_1.RawSet.destroy(this.rawSet.data.obj, [], this.source.config, destroyOptions);
38
38
  }
39
39
  this.rawSet.data = r;
40
- this.returnContainer.fag.append(RawSet_1.RawSet.drThisCreate(this.elementSource.element, "".concat(this.elementSource.attrs.drThis, ".obj"), (_d = this.elementSource.attrs.drVarOption) !== null && _d !== void 0 ? _d : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config, r));
40
+ this.returnContainer.fag.append(RawSet_1.RawSet.drThisCreate(this.rawSet, this.elementSource.element, "".concat(this.elementSource.attrs.drThis, ".obj"), (_d = this.elementSource.attrs.drVarOption) !== null && _d !== void 0 ? _d : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config, r));
41
41
  this.afterCallBack.onThisComponentSetCallBacks.push(r);
42
42
  }
43
43
  else {
44
- this.returnContainer.fag.append(RawSet_1.RawSet.drThisCreate(this.elementSource.element, this.elementSource.attrs.drThis, (_e = this.elementSource.attrs.drVarOption) !== null && _e !== void 0 ? _e : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config));
44
+ this.returnContainer.fag.append(RawSet_1.RawSet.drThisCreate(this.rawSet, this.elementSource.element, this.elementSource.attrs.drThis, (_e = this.elementSource.attrs.drVarOption) !== null && _e !== void 0 ? _e : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config));
45
45
  }
46
46
  var rr = RawSet_1.RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
47
47
  (_f = this.elementSource.element.parentNode) === null || _f === void 0 ? void 0 : _f.replaceChild(this.returnContainer.fag, this.elementSource.element);
@@ -1,6 +1,6 @@
1
1
  import { AttrInitCallBack, Attrs, ElementInitCallBack, RawSet, Render } from '../RawSet';
2
2
  import { ComponentSet } from '../components/ComponentSet';
3
- import { Config } from '../Config';
3
+ import { Config } from '../configs/Config';
4
4
  export declare enum ExecuteState {
5
5
  EXECUTE = 0,
6
6
  NO_EXECUTE = 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dom-render",
3
- "version": "1.0.84",
3
+ "version": "1.0.87",
4
4
  "main": "DomRender.js",
5
5
  "license": "MIT",
6
6
  "description": "dom-render",
package/Config.d.ts DELETED
@@ -1,38 +0,0 @@
1
- import { ConstructorType } from './types/Types';
2
- import { Attrs, CreatorMetaData, RawSet, Render } from './RawSet';
3
- import { Router } from './routers/Router';
4
- import { Messenger } from './messenger/Messenger';
5
- export declare type TargetElement = {
6
- name: string;
7
- template?: string;
8
- styles?: string[];
9
- callBack: (target: Element, obj: any, rawSet: RawSet, attrs?: Attrs) => DocumentFragment;
10
- complete?: (target: Element, obj: any, rawSet: RawSet) => void;
11
- __render?: Render;
12
- __creatorMetaData?: CreatorMetaData;
13
- };
14
- export declare type TargetAttr = {
15
- name: string;
16
- callBack: (target: Element, attrValue: string, obj: any, rawSet: RawSet) => DocumentFragment;
17
- complete?: (target: Element, attrValue: string, obj: any, rawSet: RawSet) => void;
18
- };
19
- export declare type Config = {
20
- window: Window;
21
- targetElements?: TargetElement[];
22
- targetAttrs?: TargetAttr[];
23
- onElementInit?: (name: string, obj: any, rawSet: RawSet, targetElement: TargetElement) => any;
24
- onAttrInit?: (name: string, attrValue: string, obj: any, rawSet: RawSet) => any;
25
- proxyExcludeTyps?: ConstructorType<any>[];
26
- proxyExcludeOnBeforeReturnSets?: string[];
27
- proxyExcludeOnBeforeReturnGets?: string[];
28
- scripts?: {
29
- [n: string]: any;
30
- };
31
- routerType?: 'hash' | 'path' | 'none';
32
- router?: Router;
33
- messenger?: Messenger;
34
- applyEvents?: {
35
- attrName: string;
36
- callBack: (elements: Element, attrValue: string, obj: any) => void;
37
- }[];
38
- };