dom-render 1.0.85 → 1.0.86
Sign up to get free protection for your applications and to get access to all the features.
- package/DomRender.d.ts +5 -5
- package/DomRender.js +10 -5
- package/DomRenderProxy.d.ts +2 -2
- package/README.MD +7 -7
- package/RawSet.d.ts +4 -2
- package/RawSet.js +2 -2
- package/configs/Config.d.ts +26 -0
- package/{Config.js → configs/Config.js} +0 -0
- package/configs/TargetAttr.d.ts +6 -0
- package/configs/TargetAttr.js +2 -0
- package/configs/TargetElement.d.ts +11 -0
- package/configs/TargetElement.js +2 -0
- package/dist/bundle.js +184 -179
- package/events/EventManager.d.ts +1 -1
- package/lifecycle/OnProxyDomRender.d.ts +1 -1
- package/messenger/Messenger.d.ts +1 -1
- package/operators/DrTargetElement.js +1 -1
- package/operators/OperatorRender.d.ts +1 -1
- package/package.json +1 -1
- package/Config.d.ts +0 -38
package/DomRender.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import { Config } from './Config';
|
1
|
+
import { Config } from './configs/Config';
|
2
2
|
import { ConstructorType } from './types/Types';
|
3
3
|
import { RawSet } from './RawSet';
|
4
4
|
export declare class DomRender {
|
5
|
-
static run<T extends object>(obj: T, target?: Node,
|
5
|
+
static run<T extends object>(obj: T, target?: Node | null, oConfig?: Omit<Config, 'window'>): T;
|
6
6
|
static createComponent(param: {
|
7
|
-
type: ConstructorType<any
|
7
|
+
type: ConstructorType<any> | any;
|
8
8
|
tagName?: string;
|
9
9
|
template?: string;
|
10
10
|
styles?: string[] | string;
|
11
|
-
}
|
12
|
-
static createAttribute(attrName: string, getThisObj: (element: Element, attrValue: string, obj: any, rawSet: RawSet) => any, factory: (element: Element, attrValue: string, obj: any, rawSet: RawSet) => DocumentFragment): import("./
|
11
|
+
}): import("./configs/TargetElement").TargetElement;
|
12
|
+
static createAttribute(attrName: string, getThisObj: (element: Element, attrValue: string, obj: any, rawSet: RawSet) => any, factory: (element: Element, attrValue: string, obj: any, rawSet: RawSet) => DocumentFragment): import("./configs/TargetAttr").TargetAttr;
|
13
13
|
}
|
package/DomRender.js
CHANGED
@@ -19,7 +19,7 @@ var DefaultMessenger_1 = require("./messenger/DefaultMessenger");
|
|
19
19
|
var DomRender = /** @class */ (function () {
|
20
20
|
function DomRender() {
|
21
21
|
}
|
22
|
-
DomRender.run = function (obj, target,
|
22
|
+
DomRender.run = function (obj, target, oConfig) {
|
23
23
|
var _a, _b, _c;
|
24
24
|
var robj = obj;
|
25
25
|
if ('_DomRender_isProxy' in obj) {
|
@@ -29,9 +29,13 @@ var DomRender = /** @class */ (function () {
|
|
29
29
|
robj = obj;
|
30
30
|
return robj;
|
31
31
|
}
|
32
|
+
var config = oConfig;
|
32
33
|
if (!config) {
|
33
34
|
config = { window: window };
|
34
35
|
}
|
36
|
+
if (config && !config.window) {
|
37
|
+
config.window = window;
|
38
|
+
}
|
35
39
|
config.routerType = config.routerType || 'none';
|
36
40
|
config.messenger = Types_1.DomRenderFinalProxy.final((_a = config.messenger) !== null && _a !== void 0 ? _a : new DefaultMessenger_1.DefaultMessenger(config));
|
37
41
|
var domRender = new DomRenderProxy_1.DomRenderProxy(obj, target, config);
|
@@ -46,12 +50,13 @@ var DomRender = /** @class */ (function () {
|
|
46
50
|
domRender.run(robj);
|
47
51
|
return robj;
|
48
52
|
};
|
49
|
-
DomRender.createComponent = function (param
|
53
|
+
DomRender.createComponent = function (param) {
|
50
54
|
var _a, _b;
|
51
|
-
|
55
|
+
// console.log('===>', typeof param.type, param.type.name, param.type.constructor.name)
|
56
|
+
var component = RawSet_1.RawSet.createComponentTargetElement((_a = param.tagName) !== null && _a !== void 0 ? _a : (typeof param.type === 'function' ? param.type.name : param.type.constructor.name), function (e, o, r2, counstructorParam) {
|
52
57
|
var _a;
|
53
|
-
return new ((_a = param.type).bind.apply(_a, __spreadArray([void 0], counstructorParam, false)))();
|
54
|
-
}, (_b = param.template) !== null && _b !== void 0 ? _b : '', Array.isArray(param.styles) ? param.styles : (param.styles ? [param.styles] : undefined)
|
58
|
+
return typeof param.type === 'function' ? new ((_a = param.type).bind.apply(_a, __spreadArray([void 0], counstructorParam, false)))() : param.type;
|
59
|
+
}, (_b = param.template) !== null && _b !== void 0 ? _b : '', Array.isArray(param.styles) ? param.styles : (param.styles ? [param.styles] : undefined));
|
55
60
|
return component;
|
56
61
|
};
|
57
62
|
DomRender.createAttribute = function (attrName, getThisObj, factory) {
|
package/DomRenderProxy.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { RawSet } from './RawSet';
|
2
|
-
import { Config } from './Config';
|
2
|
+
import { Config } from './configs/Config';
|
3
3
|
export declare class DomRenderProxy<T extends object> implements ProxyHandler<T> {
|
4
4
|
_domRender_origin: T;
|
5
5
|
config: Config;
|
@@ -7,7 +7,7 @@ export declare class DomRenderProxy<T extends object> implements ProxyHandler<T>
|
|
7
7
|
_rawSets: Map<string, Set<RawSet>>;
|
8
8
|
_domRender_proxy?: T;
|
9
9
|
_targets: Set<Node>;
|
10
|
-
constructor(_domRender_origin: T, target: Node | undefined, config: Config);
|
10
|
+
constructor(_domRender_origin: T, target: Node | null | undefined, config: Config);
|
11
11
|
static unFinal<T = any>(obj: T): T;
|
12
12
|
static final<T = any>(obj: T): T;
|
13
13
|
static isFinal<T = any>(obj: T): boolean;
|
package/README.MD
CHANGED
@@ -7,7 +7,7 @@ DOM-RENDER
|
|
7
7
|
|
8
8
|
# 🚀 Quick start
|
9
9
|
```html
|
10
|
-
<script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.
|
10
|
+
<script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.86/dist/bundle.js"></script>
|
11
11
|
```
|
12
12
|
```html
|
13
13
|
<!DOCTYPE html>
|
@@ -18,7 +18,7 @@ DOM-RENDER
|
|
18
18
|
</head>
|
19
19
|
<body id="app">
|
20
20
|
${this.name}$
|
21
|
-
<script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.
|
21
|
+
<script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.86/dist/bundle.js"></script>
|
22
22
|
<script>
|
23
23
|
let data = {
|
24
24
|
name: 'my name is dom-render'
|
@@ -404,9 +404,9 @@ const config: Config = {
|
|
404
404
|
window
|
405
405
|
};
|
406
406
|
config.targetElements = [
|
407
|
-
DomRender.createComponent({type: Main, tagName: 'page-main', template: MainTemplate}
|
408
|
-
DomRender.createComponent({type: Second, tagName: 'page-second', template: SecondTemplate}
|
409
|
-
DomRender.createComponent({type: Detail, tagName: 'page-detail', template: DetailTemplate}
|
407
|
+
DomRender.createComponent({type: Main, tagName: 'page-main', template: MainTemplate}),
|
408
|
+
DomRender.createComponent({type: Second, tagName: 'page-second', template: SecondTemplate}),
|
409
|
+
DomRender.createComponent({type: Detail, tagName: 'page-detail', template: DetailTemplate})
|
410
410
|
]
|
411
411
|
config.routerType = 'hash'; // 'hash' | 'path' | 'none';
|
412
412
|
const data = DomRender.run(new Data(), document.querySelector('#app')!, config);
|
@@ -644,8 +644,8 @@ link attribute
|
|
644
644
|
```
|
645
645
|
```typescript
|
646
646
|
config.targetElements = [
|
647
|
-
DomRender.createComponent({type: Profile, template: ProfileTemplate}
|
648
|
-
DomRender.createComponent({type: Home, template: HomeTemplate, styles: HomeStyle}
|
647
|
+
DomRender.createComponent({type: Profile, template: ProfileTemplate}),
|
648
|
+
DomRender.createComponent({type: Home, template: HomeTemplate, styles: HomeStyle})
|
649
649
|
]
|
650
650
|
|
651
651
|
config.targetAttrs = [
|
package/RawSet.d.ts
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
import { Config
|
1
|
+
import { Config } from './configs/Config';
|
2
2
|
import { ComponentSet } from './components/ComponentSet';
|
3
|
+
import { TargetElement } from './configs/TargetElement';
|
4
|
+
import { TargetAttr } from './configs/TargetAttr';
|
3
5
|
export declare enum DestroyOptionType {
|
4
6
|
NO_DESTROY = "NO_DESTROY",
|
5
7
|
NO_MESSENGER_DESTROY = "NO_MESSENGER_DESTROY"
|
@@ -145,7 +147,7 @@ export declare class RawSet {
|
|
145
147
|
}[]): void;
|
146
148
|
static drThisCreate(rawSet: RawSet, element: Element, drThis: string, drVarOption: string, drStripOption: boolean | string | null, obj: any, config: Config, set?: ComponentSet): DocumentFragment;
|
147
149
|
static createComponentTargetAttribute(name: string, getThisObj: (element: Element, attrValue: string, obj: any, rawSet: RawSet) => any, factory: (element: Element, attrValue: string, obj: any, rawSet: RawSet) => DocumentFragment): TargetAttr;
|
148
|
-
static createComponentTargetElement(name: string, objFactory: (element: Element, obj: any, rawSet: RawSet, counstructorParam: any[]) => any, template
|
150
|
+
static createComponentTargetElement(name: string, objFactory: (element: Element, obj: any, rawSet: RawSet, counstructorParam: any[]) => any, template?: string, styles?: string[]): TargetElement;
|
149
151
|
static isExporesion(data: string | null): boolean;
|
150
152
|
static exporesionGrouops(data: string | null): RegExpExecArray[];
|
151
153
|
static styleTransformLocal(styleBody: string | string[], id: string, styleTagWrap?: boolean): string;
|
package/RawSet.js
CHANGED
@@ -669,14 +669,14 @@ var RawSet = /** @class */ (function () {
|
|
669
669
|
};
|
670
670
|
return targetAttribute;
|
671
671
|
};
|
672
|
-
RawSet.createComponentTargetElement = function (name, objFactory, template, styles
|
672
|
+
RawSet.createComponentTargetElement = function (name, objFactory, template, styles) {
|
673
673
|
if (template === void 0) { template = ''; }
|
674
674
|
if (styles === void 0) { styles = []; }
|
675
675
|
var targetElement = {
|
676
676
|
name: name,
|
677
677
|
styles: styles,
|
678
678
|
template: template,
|
679
|
-
callBack: function (element, obj, rawSet, attrs) {
|
679
|
+
callBack: function (element, obj, rawSet, attrs, config) {
|
680
680
|
var _a, _b, _c, _d, _e, _f;
|
681
681
|
// console.log('callback------->', element)
|
682
682
|
if (!obj.__domrender_components) {
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { ConstructorType } from '../types/Types';
|
2
|
+
import { RawSet } from '../RawSet';
|
3
|
+
import { Router } from '../routers/Router';
|
4
|
+
import { Messenger } from '../messenger/Messenger';
|
5
|
+
import { TargetElement } from './TargetElement';
|
6
|
+
import { TargetAttr } from './TargetAttr';
|
7
|
+
export declare type Config = {
|
8
|
+
window: Window;
|
9
|
+
targetElements?: TargetElement[];
|
10
|
+
targetAttrs?: TargetAttr[];
|
11
|
+
onElementInit?: (name: string, obj: any, rawSet: RawSet, targetElement: TargetElement) => any;
|
12
|
+
onAttrInit?: (name: string, attrValue: string, obj: any, rawSet: RawSet) => any;
|
13
|
+
proxyExcludeTyps?: ConstructorType<any>[];
|
14
|
+
proxyExcludeOnBeforeReturnSets?: string[];
|
15
|
+
proxyExcludeOnBeforeReturnGets?: string[];
|
16
|
+
scripts?: {
|
17
|
+
[n: string]: any;
|
18
|
+
};
|
19
|
+
routerType?: 'hash' | 'path' | 'none';
|
20
|
+
router?: Router;
|
21
|
+
messenger?: Messenger;
|
22
|
+
applyEvents?: {
|
23
|
+
attrName: string;
|
24
|
+
callBack: (elements: Element, attrValue: string, obj: any) => void;
|
25
|
+
}[];
|
26
|
+
};
|
File without changes
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { RawSet } from '../RawSet';
|
2
|
+
export declare type TargetAttr = {
|
3
|
+
name: string;
|
4
|
+
callBack: (target: Element, attrValue: string, obj: any, rawSet: RawSet) => DocumentFragment;
|
5
|
+
complete?: (target: Element, attrValue: string, obj: any, rawSet: RawSet) => void;
|
6
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Attrs, CreatorMetaData, RawSet, Render } from '../RawSet';
|
2
|
+
import { Config } from './Config';
|
3
|
+
export declare type TargetElement = {
|
4
|
+
name: string;
|
5
|
+
template?: string;
|
6
|
+
styles?: string[];
|
7
|
+
callBack: (target: Element, obj: any, rawSet: RawSet, attrs: Attrs, config: Config) => DocumentFragment;
|
8
|
+
complete?: (target: Element, obj: any, rawSet: RawSet) => void;
|
9
|
+
__render?: Render;
|
10
|
+
__creatorMetaData?: CreatorMetaData;
|
11
|
+
};
|
package/dist/bundle.js
CHANGED
@@ -1705,7 +1705,7 @@ var DrTargetElement = /** @class */ (function (_super) {
|
|
1705
1705
|
var _b, _c, _d, _e;
|
1706
1706
|
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(); });
|
1707
1707
|
if (targetElement) {
|
1708
|
-
var documentFragment = targetElement.callBack(this.elementSource.element, this.source.obj, this.rawSet, this.elementSource.attrs);
|
1708
|
+
var documentFragment = targetElement.callBack(this.elementSource.element, this.source.obj, this.rawSet, this.elementSource.attrs, this.source.config);
|
1709
1709
|
if (documentFragment) {
|
1710
1710
|
// const targetAttrMap = this.elementSource.element.getAttribute(EventManager.normalAttrMapAttrName);
|
1711
1711
|
var detectAction_1 = this.elementSource.element.getAttribute(RawSet.DR_DETECT_NAME);
|
@@ -2427,14 +2427,14 @@ var RawSet = /** @class */ (function () {
|
|
2427
2427
|
};
|
2428
2428
|
return targetAttribute;
|
2429
2429
|
};
|
2430
|
-
RawSet.createComponentTargetElement = function (name, objFactory, template, styles
|
2430
|
+
RawSet.createComponentTargetElement = function (name, objFactory, template, styles) {
|
2431
2431
|
if (template === void 0) { template = ''; }
|
2432
2432
|
if (styles === void 0) { styles = []; }
|
2433
2433
|
var targetElement = {
|
2434
2434
|
name: name,
|
2435
2435
|
styles: styles,
|
2436
2436
|
template: template,
|
2437
|
-
callBack: function (element, obj, rawSet, attrs) {
|
2437
|
+
callBack: function (element, obj, rawSet, attrs, config) {
|
2438
2438
|
var _a, _b, _c, _d, _e, _f;
|
2439
2439
|
// console.log('callback------->', element)
|
2440
2440
|
if (!obj.__domrender_components) {
|
@@ -3436,7 +3436,7 @@ var DefaultMessenger = /** @class */ (function (_super) {
|
|
3436
3436
|
var DomRender = /** @class */ (function () {
|
3437
3437
|
function DomRender() {
|
3438
3438
|
}
|
3439
|
-
DomRender.run = function (obj, target,
|
3439
|
+
DomRender.run = function (obj, target, oConfig) {
|
3440
3440
|
var _a, _b, _c;
|
3441
3441
|
var robj = obj;
|
3442
3442
|
if ('_DomRender_isProxy' in obj) {
|
@@ -3446,9 +3446,13 @@ var DomRender = /** @class */ (function () {
|
|
3446
3446
|
robj = obj;
|
3447
3447
|
return robj;
|
3448
3448
|
}
|
3449
|
+
var config = oConfig;
|
3449
3450
|
if (!config) {
|
3450
3451
|
config = { window: window };
|
3451
3452
|
}
|
3453
|
+
if (config && !config.window) {
|
3454
|
+
config.window = window;
|
3455
|
+
}
|
3452
3456
|
config.routerType = config.routerType || 'none';
|
3453
3457
|
config.messenger = DomRenderFinalProxy.final((_a = config.messenger) !== null && _a !== void 0 ? _a : new DefaultMessenger(config));
|
3454
3458
|
var domRender = new DomRenderProxy(obj, target, config);
|
@@ -3463,12 +3467,13 @@ var DomRender = /** @class */ (function () {
|
|
3463
3467
|
domRender.run(robj);
|
3464
3468
|
return robj;
|
3465
3469
|
};
|
3466
|
-
DomRender.createComponent = function (param
|
3470
|
+
DomRender.createComponent = function (param) {
|
3467
3471
|
var _a, _b;
|
3468
|
-
|
3472
|
+
// console.log('===>', typeof param.type, param.type.name, param.type.constructor.name)
|
3473
|
+
var component = RawSet.createComponentTargetElement((_a = param.tagName) !== null && _a !== void 0 ? _a : (typeof param.type === 'function' ? param.type.name : param.type.constructor.name), function (e, o, r2, counstructorParam) {
|
3469
3474
|
var _a;
|
3470
|
-
return new ((_a = param.type).bind.apply(_a, __spreadArray([void 0], counstructorParam, false)))();
|
3471
|
-
}, (_b = param.template) !== null && _b !== void 0 ? _b : '', Array.isArray(param.styles) ? param.styles : (param.styles ? [param.styles] : undefined)
|
3475
|
+
return typeof param.type === 'function' ? new ((_a = param.type).bind.apply(_a, __spreadArray([void 0], counstructorParam, false)))() : param.type;
|
3476
|
+
}, (_b = param.template) !== null && _b !== void 0 ? _b : '', Array.isArray(param.styles) ? param.styles : (param.styles ? [param.styles] : undefined));
|
3472
3477
|
return component;
|
3473
3478
|
};
|
3474
3479
|
DomRender.createAttribute = function (attrName, getThisObj, factory) {
|
@@ -3478,6 +3483,21 @@ var DomRender = /** @class */ (function () {
|
|
3478
3483
|
return DomRender;
|
3479
3484
|
}());
|
3480
3485
|
|
3486
|
+
var RenderManager = /** @class */ (function () {
|
3487
|
+
function RenderManager() {
|
3488
|
+
}
|
3489
|
+
RenderManager.render = function (obj, target) {
|
3490
|
+
if (target === void 0) { target = Object.keys(obj); }
|
3491
|
+
var domRenderProxy = obj._DomRender_proxy;
|
3492
|
+
if (domRenderProxy) {
|
3493
|
+
target.forEach(function (it) {
|
3494
|
+
domRenderProxy.root([it], obj[it]);
|
3495
|
+
});
|
3496
|
+
}
|
3497
|
+
};
|
3498
|
+
return RenderManager;
|
3499
|
+
}());
|
3500
|
+
|
3481
3501
|
var Appender = /** @class */ (function () {
|
3482
3502
|
function Appender(defaultDatas) {
|
3483
3503
|
this.length = 0;
|
@@ -3531,6 +3551,19 @@ var Appender = /** @class */ (function () {
|
|
3531
3551
|
return Appender;
|
3532
3552
|
}());
|
3533
3553
|
|
3554
|
+
var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
|
3555
|
+
__extends(AllUnCheckedValidatorArray, _super);
|
3556
|
+
function AllUnCheckedValidatorArray(value, target, event, autoValid) {
|
3557
|
+
if (autoValid === void 0) { autoValid = true; }
|
3558
|
+
return _super.call(this, value, target, event, autoValid) || this;
|
3559
|
+
}
|
3560
|
+
AllUnCheckedValidatorArray.prototype.valid = function () {
|
3561
|
+
var _a;
|
3562
|
+
return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
|
3563
|
+
};
|
3564
|
+
return AllUnCheckedValidatorArray;
|
3565
|
+
}(ValidatorArray));
|
3566
|
+
|
3534
3567
|
var AllCheckedValidatorArray = /** @class */ (function (_super) {
|
3535
3568
|
__extends(AllCheckedValidatorArray, _super);
|
3536
3569
|
function AllCheckedValidatorArray(value, target, event, autoValid) {
|
@@ -3544,20 +3577,35 @@ var AllCheckedValidatorArray = /** @class */ (function (_super) {
|
|
3544
3577
|
return AllCheckedValidatorArray;
|
3545
3578
|
}(ValidatorArray));
|
3546
3579
|
|
3547
|
-
var
|
3548
|
-
|
3580
|
+
var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
|
3581
|
+
__extends(CountEqualsCheckedValidatorArray, _super);
|
3582
|
+
function CountEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
|
3583
|
+
if (autoValid === void 0) { autoValid = true; }
|
3584
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3585
|
+
_this.count = count;
|
3586
|
+
return _this;
|
3549
3587
|
}
|
3550
|
-
|
3551
|
-
|
3552
|
-
|
3553
|
-
if (domRenderProxy) {
|
3554
|
-
target.forEach(function (it) {
|
3555
|
-
domRenderProxy.root([it], obj[it]);
|
3556
|
-
});
|
3557
|
-
}
|
3588
|
+
CountEqualsCheckedValidatorArray.prototype.valid = function () {
|
3589
|
+
var _a;
|
3590
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length === this.count;
|
3558
3591
|
};
|
3559
|
-
return
|
3560
|
-
}());
|
3592
|
+
return CountEqualsCheckedValidatorArray;
|
3593
|
+
}(ValidatorArray));
|
3594
|
+
|
3595
|
+
var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
|
3596
|
+
__extends(CountEqualsUnCheckedValidatorArray, _super);
|
3597
|
+
function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
|
3598
|
+
if (autoValid === void 0) { autoValid = true; }
|
3599
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3600
|
+
_this.count = count;
|
3601
|
+
return _this;
|
3602
|
+
}
|
3603
|
+
CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
|
3604
|
+
var _a;
|
3605
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
|
3606
|
+
};
|
3607
|
+
return CountEqualsUnCheckedValidatorArray;
|
3608
|
+
}(ValidatorArray));
|
3561
3609
|
|
3562
3610
|
var CheckedValidator = /** @class */ (function (_super) {
|
3563
3611
|
__extends(CheckedValidator, _super);
|
@@ -3572,19 +3620,6 @@ var CheckedValidator = /** @class */ (function (_super) {
|
|
3572
3620
|
return CheckedValidator;
|
3573
3621
|
}(Validator));
|
3574
3622
|
|
3575
|
-
var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
|
3576
|
-
__extends(AllUnCheckedValidatorArray, _super);
|
3577
|
-
function AllUnCheckedValidatorArray(value, target, event, autoValid) {
|
3578
|
-
if (autoValid === void 0) { autoValid = true; }
|
3579
|
-
return _super.call(this, value, target, event, autoValid) || this;
|
3580
|
-
}
|
3581
|
-
AllUnCheckedValidatorArray.prototype.valid = function () {
|
3582
|
-
var _a;
|
3583
|
-
return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
|
3584
|
-
};
|
3585
|
-
return AllUnCheckedValidatorArray;
|
3586
|
-
}(ValidatorArray));
|
3587
|
-
|
3588
3623
|
var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
|
3589
3624
|
__extends(CountGreaterThanCheckedValidatorArray, _super);
|
3590
3625
|
function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
|
@@ -3615,21 +3650,6 @@ var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_su
|
|
3615
3650
|
return CountGreaterThanEqualsUnCheckedValidatorArray;
|
3616
3651
|
}(ValidatorArray));
|
3617
3652
|
|
3618
|
-
var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
|
3619
|
-
__extends(CountEqualsUnCheckedValidatorArray, _super);
|
3620
|
-
function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
|
3621
|
-
if (autoValid === void 0) { autoValid = true; }
|
3622
|
-
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3623
|
-
_this.count = count;
|
3624
|
-
return _this;
|
3625
|
-
}
|
3626
|
-
CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
|
3627
|
-
var _a;
|
3628
|
-
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
|
3629
|
-
};
|
3630
|
-
return CountEqualsUnCheckedValidatorArray;
|
3631
|
-
}(ValidatorArray));
|
3632
|
-
|
3633
3653
|
var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
|
3634
3654
|
__extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
|
3635
3655
|
function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
|
@@ -3660,19 +3680,19 @@ var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
|
|
3660
3680
|
return CountGreaterThanUnCheckedValidatorArray;
|
3661
3681
|
}(ValidatorArray));
|
3662
3682
|
|
3663
|
-
var
|
3664
|
-
__extends(
|
3665
|
-
function
|
3683
|
+
var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
|
3684
|
+
__extends(CountLessThanCheckedValidatorArray, _super);
|
3685
|
+
function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
|
3666
3686
|
if (autoValid === void 0) { autoValid = true; }
|
3667
3687
|
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3668
3688
|
_this.count = count;
|
3669
3689
|
return _this;
|
3670
3690
|
}
|
3671
|
-
|
3691
|
+
CountLessThanCheckedValidatorArray.prototype.valid = function () {
|
3672
3692
|
var _a;
|
3673
|
-
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length
|
3693
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
|
3674
3694
|
};
|
3675
|
-
return
|
3695
|
+
return CountLessThanCheckedValidatorArray;
|
3676
3696
|
}(ValidatorArray));
|
3677
3697
|
|
3678
3698
|
var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
|
@@ -3705,20 +3725,19 @@ var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super)
|
|
3705
3725
|
return CountLessThanEqualsCheckedValidatorArray;
|
3706
3726
|
}(ValidatorArray));
|
3707
3727
|
|
3708
|
-
var
|
3709
|
-
__extends(
|
3710
|
-
function
|
3728
|
+
var EmptyValidator = /** @class */ (function (_super) {
|
3729
|
+
__extends(EmptyValidator, _super);
|
3730
|
+
function EmptyValidator(value, target, event, autoValid) {
|
3711
3731
|
if (autoValid === void 0) { autoValid = true; }
|
3712
|
-
|
3713
|
-
_this.count = count;
|
3714
|
-
return _this;
|
3732
|
+
return _super.call(this, value, target, event, autoValid) || this;
|
3715
3733
|
}
|
3716
|
-
|
3717
|
-
var _a;
|
3718
|
-
|
3734
|
+
EmptyValidator.prototype.valid = function () {
|
3735
|
+
var _a, _b;
|
3736
|
+
var value = this.value;
|
3737
|
+
return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
|
3719
3738
|
};
|
3720
|
-
return
|
3721
|
-
}(
|
3739
|
+
return EmptyValidator;
|
3740
|
+
}(Validator));
|
3722
3741
|
|
3723
3742
|
var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
|
3724
3743
|
__extends(CountUnCheckedValidatorArray, _super);
|
@@ -3775,28 +3794,6 @@ var FormValidator = /** @class */ (function (_super) {
|
|
3775
3794
|
return FormValidator;
|
3776
3795
|
}(Validator));
|
3777
3796
|
|
3778
|
-
var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
|
3779
|
-
__extends(IncludeCheckedValidatorArray, _super);
|
3780
|
-
function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
|
3781
|
-
if (allRequired === void 0) { allRequired = false; }
|
3782
|
-
if (autoValid === void 0) { autoValid = true; }
|
3783
|
-
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3784
|
-
_this.include = include;
|
3785
|
-
_this.allRequired = allRequired;
|
3786
|
-
return _this;
|
3787
|
-
}
|
3788
|
-
IncludeCheckedValidatorArray.prototype.valid = function () {
|
3789
|
-
var _this = this;
|
3790
|
-
var _a;
|
3791
|
-
var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
|
3792
|
-
var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
|
3793
|
-
return checkedValue.length > 0 &&
|
3794
|
-
(!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
|
3795
|
-
(this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
|
3796
|
-
};
|
3797
|
-
return IncludeCheckedValidatorArray;
|
3798
|
-
}(ValidatorArray));
|
3799
|
-
|
3800
3797
|
var MultipleValidator = /** @class */ (function (_super) {
|
3801
3798
|
__extends(MultipleValidator, _super);
|
3802
3799
|
function MultipleValidator(validators, value, target, event, autoValid) {
|
@@ -3826,40 +3823,64 @@ var MultipleValidator = /** @class */ (function (_super) {
|
|
3826
3823
|
return MultipleValidator;
|
3827
3824
|
}(Validator));
|
3828
3825
|
|
3829
|
-
var
|
3830
|
-
__extends(
|
3831
|
-
function
|
3826
|
+
var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
|
3827
|
+
__extends(IncludeCheckedValidatorArray, _super);
|
3828
|
+
function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
|
3829
|
+
if (allRequired === void 0) { allRequired = false; }
|
3830
|
+
if (autoValid === void 0) { autoValid = true; }
|
3831
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3832
|
+
_this.include = include;
|
3833
|
+
_this.allRequired = allRequired;
|
3834
|
+
return _this;
|
3835
|
+
}
|
3836
|
+
IncludeCheckedValidatorArray.prototype.valid = function () {
|
3837
|
+
var _this = this;
|
3838
|
+
var _a;
|
3839
|
+
var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
|
3840
|
+
var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
|
3841
|
+
return checkedValue.length > 0 &&
|
3842
|
+
(!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
|
3843
|
+
(this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
|
3844
|
+
};
|
3845
|
+
return IncludeCheckedValidatorArray;
|
3846
|
+
}(ValidatorArray));
|
3847
|
+
|
3848
|
+
var NotEmptyValidator = /** @class */ (function (_super) {
|
3849
|
+
__extends(NotEmptyValidator, _super);
|
3850
|
+
function NotEmptyValidator(value, target, event, autoValid) {
|
3832
3851
|
if (autoValid === void 0) { autoValid = true; }
|
3833
3852
|
return _super.call(this, value, target, event, autoValid) || this;
|
3834
3853
|
}
|
3835
|
-
|
3854
|
+
NotEmptyValidator.prototype.valid = function () {
|
3836
3855
|
var _a, _b;
|
3837
3856
|
var value = this.value;
|
3838
|
-
|
3857
|
+
// console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
|
3858
|
+
return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
|
3839
3859
|
};
|
3840
|
-
return
|
3860
|
+
return NotEmptyValidator;
|
3841
3861
|
}(Validator));
|
3842
3862
|
|
3843
|
-
var
|
3844
|
-
__extends(
|
3845
|
-
function
|
3863
|
+
var RegExpTestValidator = /** @class */ (function (_super) {
|
3864
|
+
__extends(RegExpTestValidator, _super);
|
3865
|
+
function RegExpTestValidator(regexp, value, target, event, autoValid) {
|
3846
3866
|
if (autoValid === void 0) { autoValid = true; }
|
3847
3867
|
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3848
3868
|
_this.regexp = DomRenderProxy.final(regexp);
|
3849
3869
|
return _this;
|
3850
3870
|
}
|
3851
|
-
|
3871
|
+
RegExpTestValidator.prototype.valid = function () {
|
3852
3872
|
var _a;
|
3853
3873
|
var value = this.value;
|
3854
3874
|
var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
|
3875
|
+
// console.log('regexp-->', value, this.regexp, regExp.test(value))
|
3855
3876
|
if (value) {
|
3856
|
-
return
|
3877
|
+
return regExp.test(value);
|
3857
3878
|
}
|
3858
3879
|
else {
|
3859
|
-
return
|
3880
|
+
return false;
|
3860
3881
|
}
|
3861
3882
|
};
|
3862
|
-
return
|
3883
|
+
return RegExpTestValidator;
|
3863
3884
|
}(Validator));
|
3864
3885
|
|
3865
3886
|
var PassValidator = /** @class */ (function (_super) {
|
@@ -3874,27 +3895,26 @@ var PassValidator = /** @class */ (function (_super) {
|
|
3874
3895
|
return PassValidator;
|
3875
3896
|
}(Validator));
|
3876
3897
|
|
3877
|
-
var
|
3878
|
-
__extends(
|
3879
|
-
function
|
3898
|
+
var NotRegExpTestValidator = /** @class */ (function (_super) {
|
3899
|
+
__extends(NotRegExpTestValidator, _super);
|
3900
|
+
function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
|
3880
3901
|
if (autoValid === void 0) { autoValid = true; }
|
3881
3902
|
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3882
3903
|
_this.regexp = DomRenderProxy.final(regexp);
|
3883
3904
|
return _this;
|
3884
3905
|
}
|
3885
|
-
|
3906
|
+
NotRegExpTestValidator.prototype.valid = function () {
|
3886
3907
|
var _a;
|
3887
3908
|
var value = this.value;
|
3888
3909
|
var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
|
3889
|
-
// console.log('regexp-->', value, this.regexp, regExp.test(value))
|
3890
3910
|
if (value) {
|
3891
|
-
return regExp.test(value);
|
3911
|
+
return !regExp.test(value);
|
3892
3912
|
}
|
3893
3913
|
else {
|
3894
|
-
return
|
3914
|
+
return true;
|
3895
3915
|
}
|
3896
3916
|
};
|
3897
|
-
return
|
3917
|
+
return NotRegExpTestValidator;
|
3898
3918
|
}(Validator));
|
3899
3919
|
|
3900
3920
|
var UnCheckedValidator = /** @class */ (function (_super) {
|
@@ -3910,21 +3930,6 @@ var UnCheckedValidator = /** @class */ (function (_super) {
|
|
3910
3930
|
return UnCheckedValidator;
|
3911
3931
|
}(Validator));
|
3912
3932
|
|
3913
|
-
var NotEmptyValidator = /** @class */ (function (_super) {
|
3914
|
-
__extends(NotEmptyValidator, _super);
|
3915
|
-
function NotEmptyValidator(value, target, event, autoValid) {
|
3916
|
-
if (autoValid === void 0) { autoValid = true; }
|
3917
|
-
return _super.call(this, value, target, event, autoValid) || this;
|
3918
|
-
}
|
3919
|
-
NotEmptyValidator.prototype.valid = function () {
|
3920
|
-
var _a, _b;
|
3921
|
-
var value = this.value;
|
3922
|
-
// console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
|
3923
|
-
return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
|
3924
|
-
};
|
3925
|
-
return NotEmptyValidator;
|
3926
|
-
}(Validator));
|
3927
|
-
|
3928
3933
|
var ValidMultipleValidator = /** @class */ (function (_super) {
|
3929
3934
|
__extends(ValidMultipleValidator, _super);
|
3930
3935
|
function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
|
@@ -3940,20 +3945,19 @@ var ValidMultipleValidator = /** @class */ (function (_super) {
|
|
3940
3945
|
return ValidMultipleValidator;
|
3941
3946
|
}(MultipleValidator));
|
3942
3947
|
|
3943
|
-
var
|
3944
|
-
__extends(
|
3945
|
-
function
|
3948
|
+
var RequiredValidator = /** @class */ (function (_super) {
|
3949
|
+
__extends(RequiredValidator, _super);
|
3950
|
+
function RequiredValidator(value, target, event, autoValid) {
|
3946
3951
|
if (autoValid === void 0) { autoValid = true; }
|
3947
|
-
|
3948
|
-
_this.count = count;
|
3949
|
-
return _this;
|
3952
|
+
return _super.call(this, value, target, event, autoValid) || this;
|
3950
3953
|
}
|
3951
|
-
|
3952
|
-
var
|
3953
|
-
|
3954
|
+
RequiredValidator.prototype.valid = function () {
|
3955
|
+
var value = this.value;
|
3956
|
+
// console.log('required', value, value !== undefined && value !== null)
|
3957
|
+
return value !== undefined && value !== null;
|
3954
3958
|
};
|
3955
|
-
return
|
3956
|
-
}(
|
3959
|
+
return RequiredValidator;
|
3960
|
+
}(Validator));
|
3957
3961
|
|
3958
3962
|
var ValidValidator = /** @class */ (function (_super) {
|
3959
3963
|
__extends(ValidValidator, _super);
|
@@ -3969,18 +3973,33 @@ var ValidValidator = /** @class */ (function (_super) {
|
|
3969
3973
|
return ValidValidator;
|
3970
3974
|
}(Validator));
|
3971
3975
|
|
3972
|
-
var
|
3973
|
-
__extends(
|
3974
|
-
function
|
3976
|
+
var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
|
3977
|
+
__extends(CountLessThanUnCheckedValidatorArray, _super);
|
3978
|
+
function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
|
3975
3979
|
if (autoValid === void 0) { autoValid = true; }
|
3976
|
-
|
3980
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3981
|
+
_this.count = count;
|
3982
|
+
return _this;
|
3977
3983
|
}
|
3978
|
-
|
3979
|
-
var
|
3980
|
-
|
3981
|
-
return value !== undefined && value !== null;
|
3984
|
+
CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
|
3985
|
+
var _a;
|
3986
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
|
3982
3987
|
};
|
3983
|
-
return
|
3988
|
+
return CountLessThanUnCheckedValidatorArray;
|
3989
|
+
}(ValidatorArray));
|
3990
|
+
|
3991
|
+
var ValueEqualsValidator = /** @class */ (function (_super) {
|
3992
|
+
__extends(ValueEqualsValidator, _super);
|
3993
|
+
function ValueEqualsValidator(equalsValue, value, target, event, autoValid) {
|
3994
|
+
if (autoValid === void 0) { autoValid = true; }
|
3995
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
3996
|
+
_this.equalsValue = equalsValue;
|
3997
|
+
return _this;
|
3998
|
+
}
|
3999
|
+
ValueEqualsValidator.prototype.valid = function () {
|
4000
|
+
return this.value === this.equalsValue;
|
4001
|
+
};
|
4002
|
+
return ValueEqualsValidator;
|
3984
4003
|
}(Validator));
|
3985
4004
|
|
3986
4005
|
var ValidValidatorArray = /** @class */ (function (_super) {
|
@@ -4011,42 +4030,6 @@ var ValueNotEqualsValidator = /** @class */ (function (_super) {
|
|
4011
4030
|
return ValueNotEqualsValidator;
|
4012
4031
|
}(Validator));
|
4013
4032
|
|
4014
|
-
var ValueEqualsValidator = /** @class */ (function (_super) {
|
4015
|
-
__extends(ValueEqualsValidator, _super);
|
4016
|
-
function ValueEqualsValidator(equalsValue, value, target, event, autoValid) {
|
4017
|
-
if (autoValid === void 0) { autoValid = true; }
|
4018
|
-
var _this = _super.call(this, value, target, event, autoValid) || this;
|
4019
|
-
_this.equalsValue = equalsValue;
|
4020
|
-
return _this;
|
4021
|
-
}
|
4022
|
-
ValueEqualsValidator.prototype.valid = function () {
|
4023
|
-
return this.value === this.equalsValue;
|
4024
|
-
};
|
4025
|
-
return ValueEqualsValidator;
|
4026
|
-
}(Validator));
|
4027
|
-
|
4028
|
-
var ClipBoardUtils = /** @class */ (function () {
|
4029
|
-
function ClipBoardUtils() {
|
4030
|
-
}
|
4031
|
-
ClipBoardUtils.readText = function (clipboard) {
|
4032
|
-
if (clipboard === void 0) { clipboard = navigator.clipboard; }
|
4033
|
-
return clipboard.readText();
|
4034
|
-
};
|
4035
|
-
ClipBoardUtils.read = function (clipboard) {
|
4036
|
-
if (clipboard === void 0) { clipboard = navigator.clipboard; }
|
4037
|
-
return clipboard.read();
|
4038
|
-
};
|
4039
|
-
ClipBoardUtils.writeText = function (data, clipboard) {
|
4040
|
-
if (clipboard === void 0) { clipboard = navigator.clipboard; }
|
4041
|
-
return clipboard.writeText(data);
|
4042
|
-
};
|
4043
|
-
ClipBoardUtils.write = function (data, clipboard) {
|
4044
|
-
if (clipboard === void 0) { clipboard = navigator.clipboard; }
|
4045
|
-
return clipboard.write(data);
|
4046
|
-
};
|
4047
|
-
return ClipBoardUtils;
|
4048
|
-
}());
|
4049
|
-
|
4050
4033
|
var NodeUtils = /** @class */ (function () {
|
4051
4034
|
function NodeUtils() {
|
4052
4035
|
}
|
@@ -4116,6 +4099,28 @@ var StorageUtils = /** @class */ (function () {
|
|
4116
4099
|
return StorageUtils;
|
4117
4100
|
}());
|
4118
4101
|
|
4102
|
+
var ClipBoardUtils = /** @class */ (function () {
|
4103
|
+
function ClipBoardUtils() {
|
4104
|
+
}
|
4105
|
+
ClipBoardUtils.readText = function (clipboard) {
|
4106
|
+
if (clipboard === void 0) { clipboard = navigator.clipboard; }
|
4107
|
+
return clipboard.readText();
|
4108
|
+
};
|
4109
|
+
ClipBoardUtils.read = function (clipboard) {
|
4110
|
+
if (clipboard === void 0) { clipboard = navigator.clipboard; }
|
4111
|
+
return clipboard.read();
|
4112
|
+
};
|
4113
|
+
ClipBoardUtils.writeText = function (data, clipboard) {
|
4114
|
+
if (clipboard === void 0) { clipboard = navigator.clipboard; }
|
4115
|
+
return clipboard.writeText(data);
|
4116
|
+
};
|
4117
|
+
ClipBoardUtils.write = function (data, clipboard) {
|
4118
|
+
if (clipboard === void 0) { clipboard = navigator.clipboard; }
|
4119
|
+
return clipboard.write(data);
|
4120
|
+
};
|
4121
|
+
return ClipBoardUtils;
|
4122
|
+
}());
|
4123
|
+
|
4119
4124
|
exports.AllCheckedValidatorArray = AllCheckedValidatorArray;
|
4120
4125
|
exports.AllUnCheckedValidatorArray = AllUnCheckedValidatorArray;
|
4121
4126
|
exports.Appender = Appender;
|
package/events/EventManager.d.ts
CHANGED
package/messenger/Messenger.d.ts
CHANGED
@@ -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);
|
@@ -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
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
|
-
};
|