@dooboostore/dom-render 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.
- package/DomRender.d.ts +24 -0
- package/DomRender.js +115 -0
- package/DomRenderProxy.d.ts +38 -0
- package/DomRenderProxy.js +586 -0
- package/README.MD +938 -0
- package/components/ComponentBase.d.ts +41 -0
- package/components/ComponentBase.js +210 -0
- package/components/ComponentSet.d.ts +22 -0
- package/components/ComponentSet.js +23 -0
- package/components/appender/Appender.d.ts +23 -0
- package/components/appender/Appender.js +59 -0
- package/components/checkbox/CheckBox.d.ts +47 -0
- package/components/checkbox/CheckBox.js +118 -0
- package/components/choose/Choose.d.ts +39 -0
- package/components/choose/Choose.js +110 -0
- package/components/details/Details.d.ts +57 -0
- package/components/details/Details.js +199 -0
- package/components/dialog/Dialog.d.ts +1 -0
- package/components/dialog/Dialog.js +85 -0
- package/components/dialog/example/ImageEditorDialog.d.ts +1 -0
- package/components/dialog/example/ImageEditorDialog.js +116 -0
- package/components/forOf/ForOf.d.ts +18 -0
- package/components/forOf/ForOf.js +32 -0
- package/components/if/If.d.ts +21 -0
- package/components/if/If.js +40 -0
- package/components/index.d.ts +27 -0
- package/components/index.js +13 -0
- package/components/input/Input.d.ts +34 -0
- package/components/input/Input.js +86 -0
- package/components/promise/PromiseSwitch.d.ts +55 -0
- package/components/promise/PromiseSwitch.js +181 -0
- package/components/radio/Radio.d.ts +45 -0
- package/components/radio/Radio.js +123 -0
- package/components/select/Select.d.ts +23 -0
- package/components/select/Select.js +52 -0
- package/components/this/This.d.ts +24 -0
- package/components/this/This.js +62 -0
- package/components/timer/Timer.d.ts +26 -0
- package/components/timer/Timer.js +102 -0
- package/configs/Config.d.ts +34 -0
- package/configs/Config.js +2 -0
- package/configs/TargetAttr.d.ts +7 -0
- package/configs/TargetAttr.js +2 -0
- package/configs/TargetElement.d.ts +16 -0
- package/configs/TargetElement.js +2 -0
- package/css/parse/index.d.ts +49 -0
- package/css/parse/index.js +498 -0
- package/css/stringify/compiler.d.ts +34 -0
- package/css/stringify/compiler.js +36 -0
- package/css/stringify/compress.d.ts +104 -0
- package/css/stringify/compress.js +147 -0
- package/css/stringify/identity.d.ts +109 -0
- package/css/stringify/identity.js +183 -0
- package/css/stringify/index.d.ts +24 -0
- package/css/stringify/index.js +27 -0
- package/css/stringify/types.d.ts +15 -0
- package/css/stringify/types.js +2 -0
- package/css/types.d.ts +10 -0
- package/css/types.js +2 -0
- package/decorators/DomRenderNoProxy.d.ts +4 -0
- package/decorators/DomRenderNoProxy.js +15 -0
- package/events/EventManager.d.ts +68 -0
- package/events/EventManager.js +477 -0
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/iterators/Range.d.ts +24 -0
- package/iterators/Range.js +70 -0
- package/lifecycle/OnBeforeReturnGet.d.ts +4 -0
- package/lifecycle/OnBeforeReturnGet.js +2 -0
- package/lifecycle/OnBeforeReturnSet.d.ts +5 -0
- package/lifecycle/OnBeforeReturnSet.js +4 -0
- package/lifecycle/OnChangeAttrRender.d.ts +9 -0
- package/lifecycle/OnChangeAttrRender.js +4 -0
- package/lifecycle/OnChildRenderedByProperty.d.ts +5 -0
- package/lifecycle/OnChildRenderedByProperty.js +4 -0
- package/lifecycle/OnCreateRender.d.ts +5 -0
- package/lifecycle/OnCreateRender.js +4 -0
- package/lifecycle/OnCreateRenderData.d.ts +10 -0
- package/lifecycle/OnCreateRenderData.js +4 -0
- package/lifecycle/OnCreateRendered.d.ts +8 -0
- package/lifecycle/OnCreateRendered.js +4 -0
- package/lifecycle/OnCreatedThisChild.d.ts +6 -0
- package/lifecycle/OnCreatedThisChild.js +4 -0
- package/lifecycle/OnDestroyRender.d.ts +9 -0
- package/lifecycle/OnDestroyRender.js +4 -0
- package/lifecycle/OnInitRender.d.ts +6 -0
- package/lifecycle/OnInitRender.js +4 -0
- package/lifecycle/OnProxyDomRender.d.ts +5 -0
- package/lifecycle/OnProxyDomRender.js +2 -0
- package/lifecycle/dr-this/OnDrThisBind.d.ts +5 -0
- package/lifecycle/dr-this/OnDrThisBind.js +4 -0
- package/lifecycle/dr-this/OnDrThisUnBind.d.ts +5 -0
- package/lifecycle/dr-this/OnDrThisUnBind.js +4 -0
- package/managers/RenderManager.d.ts +2 -0
- package/managers/RenderManager.js +12 -0
- package/messenger/DefaultMessenger.d.ts +4 -0
- package/messenger/DefaultMessenger.js +4 -0
- package/messenger/Messenger.d.ts +79 -0
- package/messenger/Messenger.js +185 -0
- package/operators/Appender.d.ts +15 -0
- package/operators/Appender.js +90 -0
- package/operators/Dr.d.ts +9 -0
- package/operators/Dr.js +53 -0
- package/operators/DrAppender.d.ts +9 -0
- package/operators/DrAppender.js +69 -0
- package/operators/DrFor.d.ts +9 -0
- package/operators/DrFor.js +58 -0
- package/operators/DrForOf.d.ts +9 -0
- package/operators/DrForOf.js +120 -0
- package/operators/DrForm.d.ts +9 -0
- package/operators/DrForm.js +79 -0
- package/operators/DrIf.d.ts +9 -0
- package/operators/DrIf.js +70 -0
- package/operators/DrInnerHTML.d.ts +9 -0
- package/operators/DrInnerHTML.js +48 -0
- package/operators/DrInnerText.d.ts +9 -0
- package/operators/DrInnerText.js +46 -0
- package/operators/DrPre.d.ts +8 -0
- package/operators/DrPre.js +22 -0
- package/operators/DrRepeat.d.ts +9 -0
- package/operators/DrRepeat.js +70 -0
- package/operators/DrStripElement.d.ts +9 -0
- package/operators/DrStripElement.js +50 -0
- package/operators/DrTargetAttr.d.ts +8 -0
- package/operators/DrTargetAttr.js +45 -0
- package/operators/DrTargetElement.d.ts +13 -0
- package/operators/DrTargetElement.js +91 -0
- package/operators/DrTargetElementIsElement.d.ts +13 -0
- package/operators/DrTargetElementIsElement.js +79 -0
- package/operators/DrThis.d.ts +7 -0
- package/operators/DrThis.js +72 -0
- package/operators/DrThisProperty.d.ts +11 -0
- package/operators/DrThisProperty.js +93 -0
- package/operators/OperatorExecuter.d.ts +50 -0
- package/operators/OperatorExecuter.js +50 -0
- package/operators/OperatorExecuterAttrRequire.d.ts +9 -0
- package/operators/OperatorExecuterAttrRequire.js +25 -0
- package/package.json +70 -0
- package/rawsets/AttrInitCallBack.d.ts +6 -0
- package/rawsets/AttrInitCallBack.js +2 -0
- package/rawsets/Attrs.d.ts +27 -0
- package/rawsets/Attrs.js +2 -0
- package/rawsets/CreatorMetaData.d.ts +20 -0
- package/rawsets/CreatorMetaData.js +2 -0
- package/rawsets/DestroyOptionType.d.ts +5 -0
- package/rawsets/DestroyOptionType.js +6 -0
- package/rawsets/ElementInitCallBack.d.ts +9 -0
- package/rawsets/ElementInitCallBack.js +2 -0
- package/rawsets/RawSet.d.ts +180 -0
- package/rawsets/RawSet.js +1450 -0
- package/rawsets/RawSetOperatorType.d.ts +4 -0
- package/rawsets/RawSetOperatorType.js +5 -0
- package/rawsets/RawSetType.d.ts +8 -0
- package/rawsets/RawSetType.js +9 -0
- package/rawsets/Render.d.ts +27 -0
- package/rawsets/Render.js +2 -0
- package/routers/HashRouter.d.ts +24 -0
- package/routers/HashRouter.js +86 -0
- package/routers/PathRouter.d.ts +23 -0
- package/routers/PathRouter.js +73 -0
- package/routers/Router.d.ts +68 -0
- package/routers/Router.js +132 -0
- package/types/Types.d.ts +12 -0
- package/types/Types.js +26 -0
- package/validators/AllCheckedValidatorArray.d.ts +7 -0
- package/validators/AllCheckedValidatorArray.js +11 -0
- package/validators/AllUnCheckedValidatorArray.d.ts +7 -0
- package/validators/AllUnCheckedValidatorArray.js +11 -0
- package/validators/CheckedValidator.d.ts +6 -0
- package/validators/CheckedValidator.js +11 -0
- package/validators/CountEqualsCheckedValidatorArray.d.ts +8 -0
- package/validators/CountEqualsCheckedValidatorArray.js +12 -0
- package/validators/CountEqualsUnCheckedValidatorArray.d.ts +8 -0
- package/validators/CountEqualsUnCheckedValidatorArray.js +12 -0
- package/validators/CountGreaterThanCheckedValidatorArray.d.ts +8 -0
- package/validators/CountGreaterThanCheckedValidatorArray.js +12 -0
- package/validators/CountGreaterThanEqualsCheckedValidatorArray.d.ts +8 -0
- package/validators/CountGreaterThanEqualsCheckedValidatorArray.js +12 -0
- package/validators/CountGreaterThanEqualsUnCheckedValidatorArray.d.ts +8 -0
- package/validators/CountGreaterThanEqualsUnCheckedValidatorArray.js +12 -0
- package/validators/CountGreaterThanUnCheckedValidatorArray.d.ts +8 -0
- package/validators/CountGreaterThanUnCheckedValidatorArray.js +12 -0
- package/validators/CountLessThanCheckedValidatorArray.d.ts +8 -0
- package/validators/CountLessThanCheckedValidatorArray.js +12 -0
- package/validators/CountLessThanEqualsCheckedValidatorArray.d.ts +8 -0
- package/validators/CountLessThanEqualsCheckedValidatorArray.js +12 -0
- package/validators/CountLessThanEqualsUnCheckedValidatorArray.d.ts +8 -0
- package/validators/CountLessThanEqualsUnCheckedValidatorArray.js +12 -0
- package/validators/CountLessThanUnCheckedValidatorArray.d.ts +8 -0
- package/validators/CountLessThanUnCheckedValidatorArray.js +12 -0
- package/validators/CountUnCheckedValidatorArray.d.ts +8 -0
- package/validators/CountUnCheckedValidatorArray.js +12 -0
- package/validators/EmptyValidator.d.ts +6 -0
- package/validators/EmptyValidator.js +12 -0
- package/validators/ExcludeCheckedValidatorArray.d.ts +9 -0
- package/validators/ExcludeCheckedValidatorArray.js +17 -0
- package/validators/FormValidator.d.ts +8 -0
- package/validators/FormValidator.js +16 -0
- package/validators/IncludeCheckedValidatorArray.d.ts +9 -0
- package/validators/IncludeCheckedValidatorArray.js +17 -0
- package/validators/MultipleValidator.d.ts +9 -0
- package/validators/MultipleValidator.js +25 -0
- package/validators/NonPassValidator.d.ts +6 -0
- package/validators/NonPassValidator.js +10 -0
- package/validators/NotEmptyValidator.d.ts +6 -0
- package/validators/NotEmptyValidator.js +13 -0
- package/validators/NotRegExpTestValidator.d.ts +7 -0
- package/validators/NotRegExpTestValidator.js +20 -0
- package/validators/PassValidator.d.ts +6 -0
- package/validators/PassValidator.js +10 -0
- package/validators/RegExpTestValidator.d.ts +7 -0
- package/validators/RegExpTestValidator.js +21 -0
- package/validators/RequiredValidator.d.ts +6 -0
- package/validators/RequiredValidator.js +12 -0
- package/validators/UnCheckedValidator.d.ts +6 -0
- package/validators/UnCheckedValidator.js +11 -0
- package/validators/ValidMultipleValidator.d.ts +10 -0
- package/validators/ValidMultipleValidator.js +12 -0
- package/validators/ValidValidator.d.ts +7 -0
- package/validators/ValidValidator.js +11 -0
- package/validators/ValidValidatorArray.d.ts +8 -0
- package/validators/ValidValidatorArray.js +11 -0
- package/validators/Validator.d.ts +58 -0
- package/validators/Validator.js +203 -0
- package/validators/ValidatorArray.d.ts +18 -0
- package/validators/ValidatorArray.js +77 -0
- package/validators/ValueEqualsValidator.d.ts +7 -0
- package/validators/ValueEqualsValidator.js +11 -0
- package/validators/ValueNotEqualsValidator.d.ts +7 -0
- package/validators/ValueNotEqualsValidator.js +11 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ComponentBase } from '../ComponentBase';
|
|
2
|
+
import { DomRender } from '../../DomRender';
|
|
3
|
+
import { RawSet } from '../../rawsets/RawSet';
|
|
4
|
+
export var Select;
|
|
5
|
+
(function (Select_1) {
|
|
6
|
+
Select_1.selector = 'dr-select';
|
|
7
|
+
// @Component({
|
|
8
|
+
// template: '<option class="${`${@this@.getAttribute(\'class\')} select-option-container`}$">#innerHTML#</option>',
|
|
9
|
+
// styles: '',
|
|
10
|
+
// selector: `${selector}.Option`
|
|
11
|
+
// })
|
|
12
|
+
class Option extends ComponentBase {
|
|
13
|
+
constructor() {
|
|
14
|
+
super({ onlyParentType: [Select] });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
Select_1.Option = Option;
|
|
18
|
+
// @Component({
|
|
19
|
+
// template: '',
|
|
20
|
+
// styles: '',
|
|
21
|
+
// selector: `${selector}`
|
|
22
|
+
// })
|
|
23
|
+
class Select extends ComponentBase {
|
|
24
|
+
onCreateRender(...param) {
|
|
25
|
+
}
|
|
26
|
+
onDestroyRender(...metaData) {
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
Select_1.Select = Select;
|
|
30
|
+
})(Select || (Select = {}));
|
|
31
|
+
// 아직 사용한적없으니 사용할때 만드세유~
|
|
32
|
+
export default {
|
|
33
|
+
selectOption: (config) => {
|
|
34
|
+
return RawSet.createComponentTargetElement({
|
|
35
|
+
name: `${Select.selector}-other-wise`,
|
|
36
|
+
template: '<option class="${`${@this@.getAttribute(\'class\')} select-option-container`}$">#innerHTML#</option>',
|
|
37
|
+
objFactory: (e, o, r2, counstructorParam) => {
|
|
38
|
+
return DomRender.run({ rootObject: new Select.Option(), config: config });
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
select: (config) => {
|
|
43
|
+
return RawSet.createComponentTargetElement({
|
|
44
|
+
name: `${Select.selector}`,
|
|
45
|
+
template: '',
|
|
46
|
+
objFactory: (e, o, r2, counstructorParam) => {
|
|
47
|
+
return DomRender.run({ rootObject: new Select.Select(...counstructorParam), config: config });
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=Select.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentBase } from '../ComponentBase';
|
|
2
|
+
import { RunConfig } from '../../DomRender';
|
|
3
|
+
import { RawSet } from '../../rawsets/RawSet';
|
|
4
|
+
import { OtherData } from '../../lifecycle/OnChangeAttrRender';
|
|
5
|
+
import { OnInitRender } from '../../lifecycle/OnInitRender';
|
|
6
|
+
import { ComponentSet } from '../../components/ComponentSet';
|
|
7
|
+
export declare namespace This {
|
|
8
|
+
const selector = "dr-this";
|
|
9
|
+
type Attribute = {
|
|
10
|
+
value: ComponentSet;
|
|
11
|
+
createArguments: any[];
|
|
12
|
+
};
|
|
13
|
+
class This extends ComponentBase<Attribute> implements OnInitRender {
|
|
14
|
+
private value?;
|
|
15
|
+
private createArguments?;
|
|
16
|
+
onInitRender(param: any, rawSet: RawSet): void;
|
|
17
|
+
onChangeAttrRender(name: string, value: any, other: OtherData): void;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
declare const _default: {
|
|
21
|
+
this: (config?: RunConfig) => import("../../configs/TargetElement").TargetElement;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
//# sourceMappingURL=This.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ComponentBase } from '../ComponentBase';
|
|
2
|
+
import { DomRender } from '../../DomRender';
|
|
3
|
+
import { RawSet } from '../../rawsets/RawSet';
|
|
4
|
+
export var This;
|
|
5
|
+
(function (This_1) {
|
|
6
|
+
This_1.selector = 'dr-this';
|
|
7
|
+
// @Component({
|
|
8
|
+
// template: '<div dr-this="@this@.this" dr-option-strip="true" dr-on-create:arguments="@this@.createArguments">#innerHTML#</div>',
|
|
9
|
+
// selector: `${selector}`
|
|
10
|
+
// })
|
|
11
|
+
class This extends ComponentBase {
|
|
12
|
+
// onCreateRender(...param: any) {
|
|
13
|
+
// console.log('--onCreateRender')
|
|
14
|
+
// }
|
|
15
|
+
// test() {
|
|
16
|
+
// console.log('t', this.getAttribute('appender'))
|
|
17
|
+
// }
|
|
18
|
+
onInitRender(param, rawSet) {
|
|
19
|
+
// console.log('--onInitRender onInitRender')
|
|
20
|
+
super.onInitRender(param, rawSet);
|
|
21
|
+
}
|
|
22
|
+
// push(...data:D[]) {
|
|
23
|
+
// console.log('push/////', data);
|
|
24
|
+
// this.appender.push(...data);
|
|
25
|
+
// }
|
|
26
|
+
//
|
|
27
|
+
// set(key: string, v: D): void {
|
|
28
|
+
// this.appender.set(key, v)
|
|
29
|
+
// }
|
|
30
|
+
//
|
|
31
|
+
// delete(key: string): void {
|
|
32
|
+
// this.appender.delete(key);
|
|
33
|
+
// }
|
|
34
|
+
//
|
|
35
|
+
// clear(): void {
|
|
36
|
+
// this.appender.clear();
|
|
37
|
+
// }
|
|
38
|
+
onChangeAttrRender(name, value, other) {
|
|
39
|
+
super.onChangeAttrRender(name, value, other);
|
|
40
|
+
if (this.equalsAttributeName(name, 'value')) {
|
|
41
|
+
this.value = value;
|
|
42
|
+
}
|
|
43
|
+
if (this.equalsAttributeName(name, 'createArguments')) {
|
|
44
|
+
this.createArguments = value;
|
|
45
|
+
}
|
|
46
|
+
// console.log('------>appender', name, value);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
This_1.This = This;
|
|
50
|
+
})(This || (This = {}));
|
|
51
|
+
export default {
|
|
52
|
+
this: (config) => {
|
|
53
|
+
return RawSet.createComponentTargetElement({
|
|
54
|
+
name: This.selector,
|
|
55
|
+
template: '<div dr-this="@this@.value" dr-option-strip="true" dr-on-create:arguments="@this@.createArguments">#innerHTML#</div>',
|
|
56
|
+
objFactory: (e, o, r2, counstructorParam) => {
|
|
57
|
+
return DomRender.run({ rootObject: new This.This(...counstructorParam), config: config });
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=This.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentBase } from '../ComponentBase';
|
|
2
|
+
import { RunConfig } from '../../DomRender';
|
|
3
|
+
import { RawSet } from '../../rawsets/RawSet';
|
|
4
|
+
import { OtherData } from '../../lifecycle/OnChangeAttrRender';
|
|
5
|
+
import { OnDestroyRenderParams } from 'lifecycle/OnDestroyRender';
|
|
6
|
+
export declare namespace Timer {
|
|
7
|
+
const selector = "dr-timer";
|
|
8
|
+
type Attribute = {
|
|
9
|
+
timeSecond?: string;
|
|
10
|
+
};
|
|
11
|
+
class Timer extends ComponentBase<Attribute> {
|
|
12
|
+
private interval?;
|
|
13
|
+
private timeSecond?;
|
|
14
|
+
onInitRender(param: any, rawSet: RawSet): void;
|
|
15
|
+
isRunning(): boolean;
|
|
16
|
+
start(): void;
|
|
17
|
+
stop(): void;
|
|
18
|
+
onChangeAttrRender(name: string, val: any, other: OtherData): void;
|
|
19
|
+
onDestroyRender(data: OnDestroyRenderParams): void;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
declare const _default: {
|
|
23
|
+
choose: (config?: RunConfig) => import("../../configs/TargetElement").TargetElement;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
//# sourceMappingURL=Timer.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ComponentBase } from '../ComponentBase';
|
|
2
|
+
import { DomRender } from '../../DomRender';
|
|
3
|
+
import { RawSet } from '../../rawsets/RawSet';
|
|
4
|
+
export var Timer;
|
|
5
|
+
(function (Timer_1) {
|
|
6
|
+
Timer_1.selector = 'dr-timer';
|
|
7
|
+
// class RadioBase extends ComponentBase<Attribute> {
|
|
8
|
+
// public hidden = true;
|
|
9
|
+
//
|
|
10
|
+
// }
|
|
11
|
+
// @Component({
|
|
12
|
+
// template: '<div dr-if="!@this@.hidden" dr-strip="true">#innerHTML#</div>',
|
|
13
|
+
// styles: '',
|
|
14
|
+
// selector: `${selector}.Checked`
|
|
15
|
+
// })
|
|
16
|
+
// export class RadioChecked extends RadioBase {
|
|
17
|
+
// public name = 'Checked';
|
|
18
|
+
//
|
|
19
|
+
// constructor() {
|
|
20
|
+
// super({ onlyParentType: Radio });
|
|
21
|
+
// }
|
|
22
|
+
// }
|
|
23
|
+
//
|
|
24
|
+
// @Component({
|
|
25
|
+
// template: '<div dr-if="!@this@.hidden" dr-strip="true">#innerHTML#</div>',
|
|
26
|
+
// styles: '',
|
|
27
|
+
// selector: `${selector}.UnChecked`
|
|
28
|
+
// })
|
|
29
|
+
// export class UnChecked extends RadioBase {
|
|
30
|
+
// public name = 'unChecked';
|
|
31
|
+
//
|
|
32
|
+
// constructor() {
|
|
33
|
+
// super({ onlyParentType: Radio });
|
|
34
|
+
// }
|
|
35
|
+
// }
|
|
36
|
+
// @Component({
|
|
37
|
+
// template: '#innerHTML#',
|
|
38
|
+
// selector: `${selector}`,
|
|
39
|
+
// noStrip: true
|
|
40
|
+
// })
|
|
41
|
+
class Timer extends ComponentBase {
|
|
42
|
+
onInitRender(param, rawSet) {
|
|
43
|
+
var _a;
|
|
44
|
+
super.onInitRender(param, rawSet);
|
|
45
|
+
console.log('---2', (_a = this.getElement()) === null || _a === void 0 ? void 0 : _a.isConnected);
|
|
46
|
+
// const element = this.getElement();
|
|
47
|
+
// if(element){
|
|
48
|
+
// (element as any).component = this;
|
|
49
|
+
// }
|
|
50
|
+
}
|
|
51
|
+
isRunning() {
|
|
52
|
+
return this.timeSecond !== undefined;
|
|
53
|
+
}
|
|
54
|
+
start() {
|
|
55
|
+
const timeSecond = this.getAttribute('timeSecond');
|
|
56
|
+
if (timeSecond) {
|
|
57
|
+
this.timeSecond = parseInt(timeSecond);
|
|
58
|
+
this.interval = setInterval(() => {
|
|
59
|
+
// console.log('--------->',this.timeSecond)
|
|
60
|
+
if (this.timeSecond) {
|
|
61
|
+
this.timeSecond--;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
clearInterval(this.interval);
|
|
65
|
+
this.timeSecond = undefined;
|
|
66
|
+
this.interval = undefined;
|
|
67
|
+
}
|
|
68
|
+
}, 1000);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
stop() {
|
|
72
|
+
if (this.interval) {
|
|
73
|
+
clearInterval(this.interval);
|
|
74
|
+
this.interval = undefined;
|
|
75
|
+
this.timeSecond = undefined;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
onChangeAttrRender(name, val, other) {
|
|
79
|
+
super.onChangeAttrRender(name, val, other);
|
|
80
|
+
console.log('-----', name, val, this.getElement());
|
|
81
|
+
}
|
|
82
|
+
onDestroyRender(data) {
|
|
83
|
+
super.onDestroyRender(data);
|
|
84
|
+
if (this.interval) {
|
|
85
|
+
clearInterval(this.interval);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
Timer_1.Timer = Timer;
|
|
90
|
+
})(Timer || (Timer = {}));
|
|
91
|
+
export default {
|
|
92
|
+
choose: (config) => {
|
|
93
|
+
return RawSet.createComponentTargetElement({
|
|
94
|
+
name: `${Timer.selector}`,
|
|
95
|
+
template: '#innerHTML#',
|
|
96
|
+
objFactory: (e, o, r2, counstructorParam) => {
|
|
97
|
+
return DomRender.run({ rootObject: new Timer.Timer(...counstructorParam), config: config });
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=Timer.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ConstructorType } from '@dooboostore/core/types';
|
|
2
|
+
import { RawSet } from '../rawsets/RawSet';
|
|
3
|
+
import { Router } from '../routers/Router';
|
|
4
|
+
import { Messenger } from '../messenger/Messenger';
|
|
5
|
+
import { TargetElement } from './TargetElement';
|
|
6
|
+
import { TargetAttr } from './TargetAttr';
|
|
7
|
+
import { Attrs } from '../rawsets/Attrs';
|
|
8
|
+
import { OperatorAround } from '../operators/OperatorExecuter';
|
|
9
|
+
export type Config<T = any> = {
|
|
10
|
+
window: Window;
|
|
11
|
+
targetElements?: TargetElement[];
|
|
12
|
+
targetAttrs?: TargetAttr[];
|
|
13
|
+
operatorAround?: {
|
|
14
|
+
[key in keyof Attrs]?: OperatorAround;
|
|
15
|
+
};
|
|
16
|
+
onElementInit?: (name: string, obj: any, rawSet: RawSet, targetElement: TargetElement) => any;
|
|
17
|
+
onAttrInit?: (name: string, attrValue: string, obj: any, rawSet: RawSet) => any;
|
|
18
|
+
proxyExcludeTyps?: ConstructorType<any>[];
|
|
19
|
+
proxyExcludeOnBeforeReturnSets?: string[];
|
|
20
|
+
proxyExcludeOnBeforeReturnGets?: string[];
|
|
21
|
+
scripts?: {
|
|
22
|
+
[n: string]: any;
|
|
23
|
+
};
|
|
24
|
+
router?: Router;
|
|
25
|
+
messenger?: Messenger;
|
|
26
|
+
eventVariables?: {
|
|
27
|
+
[n: string]: any;
|
|
28
|
+
};
|
|
29
|
+
applyEvents?: {
|
|
30
|
+
attrName: string;
|
|
31
|
+
callBack: (elements: Element, attrValue: string, obj: any) => void;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RawSet } from '../rawsets/RawSet';
|
|
2
|
+
export 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
|
+
};
|
|
7
|
+
//# sourceMappingURL=TargetAttr.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RawSet } from '../rawsets/RawSet';
|
|
2
|
+
import { Config } from './Config';
|
|
3
|
+
import { Attrs } from '../rawsets/Attrs';
|
|
4
|
+
import { CreatorMetaData } from '../rawsets/CreatorMetaData';
|
|
5
|
+
import { Render } from '../rawsets/Render';
|
|
6
|
+
export type TargetElement = {
|
|
7
|
+
name: string;
|
|
8
|
+
noStrip?: boolean;
|
|
9
|
+
template?: string;
|
|
10
|
+
styles?: string | (string[]);
|
|
11
|
+
callBack: (target: Element, obj: any, rawSet: RawSet, attrs: Attrs, config: Config) => Promise<DocumentFragment>;
|
|
12
|
+
complete?: (target: Element, obj: any, rawSet: RawSet) => void;
|
|
13
|
+
__render?: Render;
|
|
14
|
+
__creatorMetaData?: CreatorMetaData;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=TargetElement.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface Position {
|
|
2
|
+
start: {
|
|
3
|
+
line: number;
|
|
4
|
+
column: number;
|
|
5
|
+
};
|
|
6
|
+
end: {
|
|
7
|
+
line: number;
|
|
8
|
+
column: number;
|
|
9
|
+
};
|
|
10
|
+
source?: string;
|
|
11
|
+
content: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ParseOptions {
|
|
14
|
+
source?: string;
|
|
15
|
+
silent?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface StyleSheet {
|
|
18
|
+
type: 'stylesheet';
|
|
19
|
+
stylesheet: {
|
|
20
|
+
source?: string;
|
|
21
|
+
rules: Rule[];
|
|
22
|
+
parsingErrors: Error[];
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface Rule {
|
|
26
|
+
type: string;
|
|
27
|
+
selectors?: string[];
|
|
28
|
+
declarations?: Declaration[];
|
|
29
|
+
values?: string[];
|
|
30
|
+
name?: string;
|
|
31
|
+
vendor?: string;
|
|
32
|
+
keyframes?: Rule[];
|
|
33
|
+
media?: string;
|
|
34
|
+
rules?: Rule[];
|
|
35
|
+
supports?: string;
|
|
36
|
+
document?: string;
|
|
37
|
+
comment?: string;
|
|
38
|
+
position?: Position;
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
}
|
|
41
|
+
interface Declaration {
|
|
42
|
+
type: 'declaration';
|
|
43
|
+
property: string;
|
|
44
|
+
value: string;
|
|
45
|
+
position?: Position;
|
|
46
|
+
}
|
|
47
|
+
export default function parse(css: string, options?: ParseOptions): StyleSheet;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|