dom-render 1.0.97 → 1.0.98

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 (46) hide show
  1. package/DomRender.d.ts +1 -1
  2. package/DomRender.js +3 -3
  3. package/DomRenderProxy.js +19 -14
  4. package/README.MD +39 -39
  5. package/components/ComponentSet.d.ts +1 -1
  6. package/configs/Config.d.ts +1 -1
  7. package/configs/TargetAttr.d.ts +1 -1
  8. package/configs/TargetElement.d.ts +1 -1
  9. package/css/stringify/compiler.d.ts +1 -1
  10. package/dist/bundle.js +408 -459
  11. package/events/EventManager.js +27 -27
  12. package/messenger/Messenger.d.ts +4 -4
  13. package/operators/Dr.js +2 -2
  14. package/operators/DrAppender.js +3 -5
  15. package/operators/DrFor.js +3 -5
  16. package/operators/DrForOf.js +3 -5
  17. package/operators/DrForm.js +12 -12
  18. package/operators/DrIf.js +3 -5
  19. package/operators/DrInnerHTML.js +2 -2
  20. package/operators/DrInnerText.js +2 -2
  21. package/operators/DrPre.js +2 -4
  22. package/operators/DrRepeat.js +3 -5
  23. package/operators/DrTargetAttr.js +2 -4
  24. package/operators/DrTargetElement.js +3 -5
  25. package/operators/DrThis.js +2 -2
  26. package/operators/DrThisProperty.js +4 -6
  27. package/operators/OperatorExecuter.d.ts +6 -6
  28. package/operators/OperatorExecuter.js +2 -2
  29. package/operators/OperatorExecuterAttrRequire.js +1 -1
  30. package/package.json +1 -1
  31. package/rawsets/AttrInitCallBack.d.ts +1 -1
  32. package/rawsets/Attrs.d.ts +1 -1
  33. package/rawsets/CreatorMetaData.d.ts +1 -1
  34. package/rawsets/ElementInitCallBack.d.ts +1 -1
  35. package/rawsets/RawSet.js +59 -58
  36. package/rawsets/Render.d.ts +1 -1
  37. package/routers/Router.d.ts +1 -1
  38. package/routers/Router.js +1 -1
  39. package/utils/dom/DomUtils.d.ts +1 -1
  40. package/utils/node/NodeUtils.d.ts +1 -1
  41. package/utils/script/ScriptUtils.js +2 -2
  42. package/validators/EmptyValidator.js +2 -2
  43. package/validators/NotEmptyValidator.js +2 -2
  44. package/validators/ValidMultipleValidator.d.ts +1 -1
  45. package/validators/Validator.d.ts +2 -2
  46. package/validators/ValidatorArray.d.ts +1 -1
package/routers/Router.js CHANGED
@@ -27,7 +27,7 @@ var Router = /** @class */ (function () {
27
27
  var _this = this;
28
28
  var proxy = this.rootObj._DomRender_proxy;
29
29
  if (proxy) {
30
- var key = "___" + EventManager_1.EventManager.ROUTER_VARNAME;
30
+ var key = "___".concat(EventManager_1.EventManager.ROUTER_VARNAME);
31
31
  proxy.render(key);
32
32
  }
33
33
  this.attachCallbacks.forEach(function (it) {
@@ -1,4 +1,4 @@
1
- export declare type Attr = {
1
+ export type Attr = {
2
2
  name: string;
3
3
  value: any;
4
4
  };
@@ -1,4 +1,4 @@
1
- export declare type Attr = {
1
+ export type Attr = {
2
2
  name: string;
3
3
  value: any;
4
4
  };
@@ -33,7 +33,7 @@ var ScriptUtils = /** @class */ (function () {
33
33
  }, new GetDetectProxy());
34
34
  try {
35
35
  // eslint-disable-next-line no-new-func,no-unused-expressions
36
- Function("\"use strict\"; " + script + "; ").bind(destUser)();
36
+ Function("\"use strict\"; ".concat(script, "; ")).bind(destUser)();
37
37
  }
38
38
  catch (e) {
39
39
  console.error(e);
@@ -49,7 +49,7 @@ var ScriptUtils = /** @class */ (function () {
49
49
  };
50
50
  ScriptUtils.eval = function (script, thisTarget) {
51
51
  // eslint-disable-next-line no-new-func,no-unused-expressions
52
- return Function("\"use strict\"; " + script + " ").bind(thisTarget)();
52
+ return Function("\"use strict\"; ".concat(script, " ")).bind(thisTarget)();
53
53
  };
54
54
  ScriptUtils.loadElement = function (name, attribute, document) {
55
55
  return new Promise(function (resolve, reject) {
@@ -24,9 +24,9 @@ var EmptyValidator = /** @class */ (function (_super) {
24
24
  return _super.call(this, value, target, event, autoValid) || this;
25
25
  }
26
26
  EmptyValidator.prototype.valid = function () {
27
- var _a, _b;
27
+ var _a;
28
28
  var value = this.value;
29
- return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
29
+ return value === undefined || value === null || ((_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0) <= 0;
30
30
  };
31
31
  return EmptyValidator;
32
32
  }(Validator_1.Validator));
@@ -24,10 +24,10 @@ var NotEmptyValidator = /** @class */ (function (_super) {
24
24
  return _super.call(this, value, target, event, autoValid) || this;
25
25
  }
26
26
  NotEmptyValidator.prototype.valid = function () {
27
- var _a, _b;
27
+ var _a;
28
28
  var value = this.value;
29
29
  // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
30
- return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
30
+ return value !== undefined && value !== null && ((_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0) > 0;
31
31
  };
32
32
  return NotEmptyValidator;
33
33
  }(Validator_1.Validator));
@@ -1,6 +1,6 @@
1
1
  import { Validator } from './Validator';
2
2
  import { MultipleValidator } from './MultipleValidator';
3
- export declare type ValidMulltiple<T = any, E = Element> = (validators: Validator<T, E>[], value?: T, target?: E, event?: Event) => boolean;
3
+ export type ValidMulltiple<T = any, E = Element> = (validators: Validator<T, E>[], value?: T, target?: E, event?: Event) => boolean;
4
4
  export declare class ValidMultipleValidator<T = any, E = Element> extends MultipleValidator<T, E> {
5
5
  validMultipleCallback: ValidMulltiple<T, E>;
6
6
  validators: Validator<T, E>[];
@@ -1,5 +1,5 @@
1
- export declare type Valid<T = any, E = Element> = (value?: T, target?: E, event?: Event) => boolean;
2
- export declare type ValidAction<T = any, E = Element> = (valid: boolean, value?: T, target?: E, event?: Event) => void;
1
+ export type Valid<T = any, E = Element> = (value?: T, target?: E, event?: Event) => boolean;
2
+ export type ValidAction<T = any, E = Element> = (valid: boolean, value?: T, target?: E, event?: Event) => void;
3
3
  export declare abstract class Validator<T = any, E = Element> {
4
4
  protected _value?: T | undefined;
5
5
  private _target?;
@@ -1,5 +1,5 @@
1
1
  import { Validator } from './Validator';
2
- export declare type MakeValidator<T = any, E = Element> = (value: T, target: E, event?: Event) => Validator<T, E>;
2
+ export type MakeValidator<T = any, E = Element> = (value: T, target: E, event?: Event) => Validator<T, E>;
3
3
  export declare abstract class ValidatorArray<T = any, E = Element> extends Validator<Validator<T, E>[], E> {
4
4
  private _makeValidatorFactory;
5
5
  constructor(value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);