dom-render 1.0.87 → 1.0.90
Sign up to get free protection for your applications and to get access to all the features.
- package/DomRender.d.ts +1 -1
- package/DomRender.js +1 -1
- package/DomRenderProxy.d.ts +1 -1
- package/DomRenderProxy.js +34 -13
- package/README.MD +56 -19
- package/components/ComponentSet.d.ts +1 -1
- package/configs/Config.d.ts +1 -1
- package/configs/TargetAttr.d.ts +1 -1
- package/configs/TargetElement.d.ts +4 -1
- package/dist/bundle.js +306 -267
- package/events/EventManager.js +0 -1
- package/lifecycle/OnDestroyRender.d.ts +1 -1
- package/lifecycle/OnInitRender.d.ts +1 -5
- package/operators/Dr.js +1 -1
- package/operators/DrAppender.js +1 -1
- package/operators/DrFor.js +1 -1
- package/operators/DrForOf.js +1 -1
- package/operators/DrForm.js +5 -5
- package/operators/DrIf.js +1 -1
- package/operators/DrInnerHTML.js +1 -1
- package/operators/DrInnerText.js +1 -1
- package/operators/DrRepeat.js +1 -1
- package/operators/DrTargetAttr.js +1 -1
- package/operators/DrTargetElement.js +1 -1
- package/operators/DrThis.js +5 -2
- package/operators/OperatorRender.d.ts +5 -1
- package/package.json +6 -2
- package/rawsets/AttrInitCallBack.d.ts +5 -0
- package/rawsets/AttrInitCallBack.js +2 -0
- package/rawsets/Attrs.d.ts +21 -0
- package/rawsets/Attrs.js +2 -0
- package/rawsets/CreatorMetaData.d.ts +18 -0
- package/rawsets/CreatorMetaData.js +2 -0
- package/rawsets/DestroyOptionType.d.ts +4 -0
- package/rawsets/DestroyOptionType.js +8 -0
- package/rawsets/ElementInitCallBack.d.ts +8 -0
- package/rawsets/ElementInitCallBack.js +2 -0
- package/{RawSet.d.ts → rawsets/RawSet.d.ts} +13 -72
- package/{RawSet.js → rawsets/RawSet.js} +74 -66
- package/rawsets/RawSetType.d.ts +7 -0
- package/rawsets/RawSetType.js +11 -0
- package/rawsets/Render.d.ts +17 -0
- package/rawsets/Render.js +2 -0
- package/utils/location/LocationUtils.js +7 -1
@@ -20,41 +20,30 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
20
20
|
return to.concat(ar || Array.prototype.slice.call(from));
|
21
21
|
};
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
23
|
-
exports.RawSet =
|
24
|
-
var RandomUtils_1 = require("
|
25
|
-
var StringUtils_1 = require("
|
26
|
-
var ScriptUtils_1 = require("
|
27
|
-
var EventManager_1 = require("
|
28
|
-
var Range_1 = require("
|
29
|
-
var Types_1 = require("
|
30
|
-
var DomUtils_1 = require("
|
31
|
-
var DrPre_1 = require("
|
32
|
-
var Dr_1 = require("
|
33
|
-
var DrIf_1 = require("
|
34
|
-
var OperatorRender_1 = require("
|
35
|
-
var DrThis_1 = require("
|
36
|
-
var DrForm_1 = require("
|
37
|
-
var DrInnerText_1 = require("
|
38
|
-
var DrInnerHTML_1 = require("
|
39
|
-
var DrFor_1 = require("
|
40
|
-
var DrForOf_1 = require("
|
41
|
-
var DrAppender_1 = require("
|
42
|
-
var DrRepeat_1 = require("
|
43
|
-
var DrTargetElement_1 = require("
|
44
|
-
var DrTargetAttr_1 = require("
|
45
|
-
var DestroyOptionType;
|
46
|
-
|
47
|
-
DestroyOptionType["NO_DESTROY"] = "NO_DESTROY";
|
48
|
-
DestroyOptionType["NO_MESSENGER_DESTROY"] = "NO_MESSENGER_DESTROY";
|
49
|
-
})(DestroyOptionType = exports.DestroyOptionType || (exports.DestroyOptionType = {}));
|
50
|
-
var RawSetType;
|
51
|
-
(function (RawSetType) {
|
52
|
-
RawSetType["TEXT"] = "TEXT";
|
53
|
-
RawSetType["STYLE_TEXT"] = "STYLE_TEXT";
|
54
|
-
RawSetType["TARGET_ELEMENT"] = "TARGET_ELEMENT";
|
55
|
-
RawSetType["TARGET_ATTR"] = "TARGET_ATTR";
|
56
|
-
RawSetType["UNKOWN"] = "UNKOWN";
|
57
|
-
})(RawSetType = exports.RawSetType || (exports.RawSetType = {}));
|
23
|
+
exports.RawSet = void 0;
|
24
|
+
var RandomUtils_1 = require("../utils/random/RandomUtils");
|
25
|
+
var StringUtils_1 = require("../utils/string/StringUtils");
|
26
|
+
var ScriptUtils_1 = require("../utils/script/ScriptUtils");
|
27
|
+
var EventManager_1 = require("../events/EventManager");
|
28
|
+
var Range_1 = require("../iterators/Range");
|
29
|
+
var Types_1 = require("../types/Types");
|
30
|
+
var DomUtils_1 = require("../utils/dom/DomUtils");
|
31
|
+
var DrPre_1 = require("../operators/DrPre");
|
32
|
+
var Dr_1 = require("../operators/Dr");
|
33
|
+
var DrIf_1 = require("../operators/DrIf");
|
34
|
+
var OperatorRender_1 = require("../operators/OperatorRender");
|
35
|
+
var DrThis_1 = require("../operators/DrThis");
|
36
|
+
var DrForm_1 = require("../operators/DrForm");
|
37
|
+
var DrInnerText_1 = require("../operators/DrInnerText");
|
38
|
+
var DrInnerHTML_1 = require("../operators/DrInnerHTML");
|
39
|
+
var DrFor_1 = require("../operators/DrFor");
|
40
|
+
var DrForOf_1 = require("../operators/DrForOf");
|
41
|
+
var DrAppender_1 = require("../operators/DrAppender");
|
42
|
+
var DrRepeat_1 = require("../operators/DrRepeat");
|
43
|
+
var DrTargetElement_1 = require("../operators/DrTargetElement");
|
44
|
+
var DrTargetAttr_1 = require("../operators/DrTargetAttr");
|
45
|
+
var DestroyOptionType_1 = require("./DestroyOptionType");
|
46
|
+
var RawSetType_1 = require("./RawSetType");
|
58
47
|
var RawSet = /** @class */ (function () {
|
59
48
|
function RawSet(uuid, type, point, fragment, detect, data) {
|
60
49
|
this.uuid = uuid;
|
@@ -88,7 +77,6 @@ var RawSet = /** @class */ (function () {
|
|
88
77
|
var targetScripts_1 = targetAttrNames.map(function (it) { return element_1.getAttribute(it); }).filter(function (it) { return it; });
|
89
78
|
var targetAttrMap = element_1.getAttribute(EventManager_1.EventManager.normalAttrMapAttrName);
|
90
79
|
if (targetAttrMap) {
|
91
|
-
// console.log('----->', targetAttr);
|
92
80
|
new Map(JSON.parse(targetAttrMap)).forEach(function (v, k) {
|
93
81
|
targetScripts_1.push(v);
|
94
82
|
});
|
@@ -166,7 +154,7 @@ var RawSet = /** @class */ (function () {
|
|
166
154
|
(_a = cNode.parentNode) === null || _a === void 0 ? void 0 : _a.replaceChild(newNode, cNode);
|
167
155
|
// console.log('-------', this.point.start.parentNode.nodeName)
|
168
156
|
// 중요 style value change 됐을때 다시 처리해야되기떄문에: 마지막에 completed 없는 attr 가지고 판단 하니깐
|
169
|
-
if (this.type === RawSetType.STYLE_TEXT && this.point.parent) {
|
157
|
+
if (this.type === RawSetType_1.RawSetType.STYLE_TEXT && this.point.parent) {
|
170
158
|
this.point.parent.removeAttribute('completed');
|
171
159
|
}
|
172
160
|
}
|
@@ -227,28 +215,39 @@ var RawSet = /** @class */ (function () {
|
|
227
215
|
drAttrs.forEach(function (it) {
|
228
216
|
if (it.drCompleteOption) {
|
229
217
|
// genNode.childNodes
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
}));
|
218
|
+
var render = Object.freeze({
|
219
|
+
rawset: _this,
|
220
|
+
fag: genNode,
|
221
|
+
scripts: EventManager_1.EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
|
222
|
+
});
|
223
|
+
ScriptUtils_1.ScriptUtils.eval("\n const ".concat(EventManager_1.EventManager.FAG_VARNAME, " = this.__render.fag;\n const ").concat(EventManager_1.EventManager.SCRIPTS_VARNAME, " = this.__render.scripts;\n const ").concat(EventManager_1.EventManager.RAWSET_VARNAME, " = this.__render.rawset;\n ").concat(it.drCompleteOption), Object.assign(obj, { __render: render }));
|
237
224
|
}
|
238
225
|
});
|
239
226
|
// 중요 style isolation 나중에 :scope로 대체 가능할듯.
|
240
227
|
RawSet.generateStyleSheetsLocal();
|
241
|
-
// console.log('-22222-')
|
242
|
-
// alert(1);
|
243
228
|
for (var _p = 0, onThisComponentSetCallBacks_1 = onThisComponentSetCallBacks; _p < onThisComponentSetCallBacks_1.length; _p++) {
|
244
229
|
var it_1 = onThisComponentSetCallBacks_1[_p];
|
245
|
-
(_c = (_b = it_1.obj).onInitRender) === null || _c === void 0 ? void 0 : _c.call(_b);
|
230
|
+
(_c = (_b = it_1.obj) === null || _b === void 0 ? void 0 : _b.onInitRender) === null || _c === void 0 ? void 0 : _c.call(_b);
|
246
231
|
}
|
247
232
|
for (var _q = 0, onElementInitCallBacks_1 = onElementInitCallBacks; _q < onElementInitCallBacks_1.length; _q++) {
|
248
233
|
var it_2 = onElementInitCallBacks_1[_q];
|
249
|
-
|
234
|
+
if (((_e = (_d = it_2.targetElement) === null || _d === void 0 ? void 0 : _d.__render) === null || _e === void 0 ? void 0 : _e.element) && ((_g = (_f = it_2.targetElement) === null || _f === void 0 ? void 0 : _f.__render) === null || _g === void 0 ? void 0 : _g.component)) {
|
235
|
+
var oninit = it_2.targetElement.__render.element.getAttribute(RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME); // dr-on-component-init
|
236
|
+
var param = [];
|
237
|
+
if (oninit) {
|
238
|
+
var script = "".concat(it_2.targetElement.__render.renderScript, " return ").concat(oninit, " ");
|
239
|
+
param = ScriptUtils_1.ScriptUtils.eval(script, Object.assign(obj, {
|
240
|
+
__render: it_2.targetElement.__render
|
241
|
+
}));
|
242
|
+
if (!Array.isArray(param)) {
|
243
|
+
param = [param];
|
244
|
+
}
|
245
|
+
}
|
246
|
+
(_j = (_h = it_2.targetElement.__render.component).onInitRender) === null || _j === void 0 ? void 0 : _j.call.apply(_j, __spreadArray([_h], param, false));
|
247
|
+
}
|
250
248
|
(_k = config === null || config === void 0 ? void 0 : config.onElementInit) === null || _k === void 0 ? void 0 : _k.call(config, it_2.name, obj, this, it_2.targetElement);
|
251
249
|
}
|
250
|
+
// TODO: 이부분도 위에 targetElement 처럼 해야될까?
|
252
251
|
for (var _r = 0, onAttrInitCallBacks_1 = onAttrInitCallBacks; _r < onAttrInitCallBacks_1.length; _r++) {
|
253
252
|
var it_3 = onAttrInitCallBacks_1[_r];
|
254
253
|
(_l = config === null || config === void 0 ? void 0 : config.onAttrInit) === null || _l === void 0 ? void 0 : _l.call(config, it_3.attrName, it_3.attrValue, obj, this);
|
@@ -441,10 +440,10 @@ var RawSet = /** @class */ (function () {
|
|
441
440
|
// end.setAttribute('id', `${it.uuid}-end`);
|
442
441
|
var type = void 0;
|
443
442
|
if (currentNode.parentNode && currentNode.parentNode.nodeName.toUpperCase() === 'STYLE') {
|
444
|
-
type = RawSetType.STYLE_TEXT;
|
443
|
+
type = RawSetType_1.RawSetType.STYLE_TEXT;
|
445
444
|
}
|
446
445
|
else {
|
447
|
-
type = RawSetType.TEXT;
|
446
|
+
type = RawSetType_1.RawSetType.TEXT;
|
448
447
|
}
|
449
448
|
var startEndPoint = RawSet.createStartEndPoint(it_4.uuid, type, config);
|
450
449
|
// layout setting
|
@@ -470,7 +469,7 @@ var RawSet = /** @class */ (function () {
|
|
470
469
|
var uuid = RandomUtils_1.RandomUtils.getRandomString(40);
|
471
470
|
var element_3 = currentNode;
|
472
471
|
var fragment = config.window.document.createDocumentFragment();
|
473
|
-
var type = RawSetType.TARGET_ELEMENT;
|
472
|
+
var type = RawSetType_1.RawSetType.TARGET_ELEMENT;
|
474
473
|
var startEndPoint = RawSet.createStartEndPoint(uuid, type, config);
|
475
474
|
var isElement = ((_d = (_c = config.targetElements) === null || _c === void 0 ? void 0 : _c.map(function (it) { return it.name.toLowerCase(); })) !== null && _d !== void 0 ? _d : []).includes(element_3.tagName.toLowerCase());
|
476
475
|
var targetAttrNames_2 = ((_f = (_e = config.targetAttrs) === null || _e === void 0 ? void 0 : _e.map(function (it) { return it.name; })) !== null && _f !== void 0 ? _f : []).concat(RawSet.DR_ATTRIBUTES);
|
@@ -478,7 +477,7 @@ var RawSet = /** @class */ (function () {
|
|
478
477
|
(_g = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _g === void 0 ? void 0 : _g.insertBefore(startEndPoint.start, currentNode);
|
479
478
|
(_h = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _h === void 0 ? void 0 : _h.insertBefore(startEndPoint.end, currentNode.nextSibling);
|
480
479
|
fragment.append(currentNode);
|
481
|
-
pars.push(new RawSet(uuid, isElement ? type : (isAttr ? RawSetType.TARGET_ATTR : RawSetType.UNKOWN), {
|
480
|
+
pars.push(new RawSet(uuid, isElement ? type : (isAttr ? RawSetType_1.RawSetType.TARGET_ATTR : RawSetType_1.RawSetType.UNKOWN), {
|
482
481
|
start: startEndPoint.start,
|
483
482
|
node: currentNode,
|
484
483
|
end: startEndPoint.end,
|
@@ -495,17 +494,17 @@ var RawSet = /** @class */ (function () {
|
|
495
494
|
return pars;
|
496
495
|
};
|
497
496
|
RawSet.createStartEndPoint = function (id, type, config) {
|
498
|
-
if (type === RawSetType.TARGET_ELEMENT) {
|
497
|
+
if (type === RawSetType_1.RawSetType.TARGET_ELEMENT) {
|
499
498
|
var start = config.window.document.createElement('meta');
|
500
499
|
var end = config.window.document.createElement('meta');
|
501
500
|
start.setAttribute('id', "".concat(id, "-start"));
|
502
501
|
end.setAttribute('id', "".concat(id, "-end"));
|
503
502
|
return {
|
504
503
|
start: start,
|
505
|
-
end: end
|
504
|
+
end: end
|
506
505
|
};
|
507
506
|
}
|
508
|
-
else if (type === RawSetType.STYLE_TEXT) {
|
507
|
+
else if (type === RawSetType_1.RawSetType.STYLE_TEXT) {
|
509
508
|
return {
|
510
509
|
start: config.window.document.createTextNode("/*start text ".concat(id, "*/")),
|
511
510
|
end: config.window.document.createTextNode("/*end text ".concat(id, "*/"))
|
@@ -646,7 +645,7 @@ var RawSet = /** @class */ (function () {
|
|
646
645
|
// const metaEnd = RawSet.metaEnd(id);
|
647
646
|
// n.innerHTML = metaStart + style + (set.template ?? '') + metaEnd;
|
648
647
|
// dr-on-create onCreateRender
|
649
|
-
var onCreate = element.getAttribute(
|
648
|
+
var onCreate = element.getAttribute(RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
|
650
649
|
var renderScript = '';
|
651
650
|
var createParam = [];
|
652
651
|
if (onCreate) {
|
@@ -658,7 +657,8 @@ var RawSet = /** @class */ (function () {
|
|
658
657
|
}
|
659
658
|
(_d = (_c = set.obj) === null || _c === void 0 ? void 0 : _c.onCreateRender) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray([_c], createParam, false));
|
660
659
|
// dr-on-component-init
|
661
|
-
|
660
|
+
// const oninit = element.getAttribute(`${EventManager.attrPrefix}on-component-init`); // dr-on-component-init
|
661
|
+
var oninit = element.getAttribute(RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME); // dr-on-component-init
|
662
662
|
if (oninit) {
|
663
663
|
var script = "".concat(renderScript, " ").concat(oninit, " ");
|
664
664
|
ScriptUtils_1.ScriptUtils.eval(script, obj);
|
@@ -732,7 +732,7 @@ var RawSet = /** @class */ (function () {
|
|
732
732
|
scripts: EventManager_1.EventManager.setBindProperty((_a = config.scripts) !== null && _a !== void 0 ? _a : {}, obj)
|
733
733
|
// eslint-disable-next-line no-use-before-define
|
734
734
|
});
|
735
|
-
var constructor = element.getAttribute(
|
735
|
+
var constructor = element.getAttribute(RawSet.DR_ON_CONSTRUCTOR_ARGUMENTS_OPTIONNAME);
|
736
736
|
var constructorParam = [];
|
737
737
|
// dr-constructor
|
738
738
|
if (constructor) {
|
@@ -752,6 +752,8 @@ var RawSet = /** @class */ (function () {
|
|
752
752
|
i.componentKey = componentKey;
|
753
753
|
i.rawSet = rawSet;
|
754
754
|
i.attribute = attribute;
|
755
|
+
i.router = config.router;
|
756
|
+
i.scripts = render.scripts;
|
755
757
|
i.drAttrs = attrs;
|
756
758
|
i.innerHTML = element.innerHTML;
|
757
759
|
i.rootCreator = new Proxy(obj, new Types_1.DomRenderFinalProxy());
|
@@ -769,9 +771,9 @@ var RawSet = /** @class */ (function () {
|
|
769
771
|
});
|
770
772
|
}
|
771
773
|
// dr-on-create onCreateRender
|
772
|
-
var onCreate = element.getAttribute(
|
774
|
+
var onCreate = element.getAttribute(RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
|
773
775
|
this.__render = render;
|
774
|
-
var createParam = [
|
776
|
+
var createParam = [];
|
775
777
|
if (onCreate) {
|
776
778
|
var script = "".concat(renderScript, " return ").concat(onCreate, " ");
|
777
779
|
createParam = ScriptUtils_1.ScriptUtils.eval(script, Object.assign(obj, { __render: render }));
|
@@ -782,8 +784,8 @@ var RawSet = /** @class */ (function () {
|
|
782
784
|
(_d = instance === null || instance === void 0 ? void 0 : instance.onCreateRender) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray([instance], createParam, false));
|
783
785
|
var applayTemplate = element.innerHTML;
|
784
786
|
var innerHTMLThisRandom;
|
785
|
-
var componentName = (_e = element.getAttribute(
|
786
|
-
var innerHTMLName = (_f = element.getAttribute(
|
787
|
+
var componentName = (_e = element.getAttribute(RawSet.DR_COMPONENT_NAME_OPTIONNAME)) !== null && _e !== void 0 ? _e : 'component';
|
788
|
+
var innerHTMLName = (_f = element.getAttribute(RawSet.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME)) !== null && _f !== void 0 ? _f : 'innerHTML';
|
787
789
|
if (applayTemplate) {
|
788
790
|
// if (rawSet.point.thisVariableName) {
|
789
791
|
// 넘어온 innerHTML에 this가 있으면 해당안되게 우선 치환.
|
@@ -794,7 +796,8 @@ var RawSet = /** @class */ (function () {
|
|
794
796
|
}
|
795
797
|
applayTemplate = template.replace(RegExp("#".concat(innerHTMLName, "#"), 'g'), applayTemplate);
|
796
798
|
// dr-on-component-init
|
797
|
-
|
799
|
+
// const oninit = element.getAttribute(`${EventManager.attrPrefix}on-component-init`); // dr-on-component-init
|
800
|
+
var oninit = element.getAttribute(RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME); // dr-on-component-init
|
798
801
|
if (oninit) {
|
799
802
|
var script = "".concat(renderScript, " ").concat(oninit, " ");
|
800
803
|
ScriptUtils_1.ScriptUtils.eval(script, Object.assign(obj, {
|
@@ -841,8 +844,8 @@ var RawSet = /** @class */ (function () {
|
|
841
844
|
RawSet.destroy = function (obj, parameter, config, destroyOptions) {
|
842
845
|
var _a;
|
843
846
|
if (destroyOptions === void 0) { destroyOptions = []; }
|
844
|
-
if (!destroyOptions.some(function (it) { return it === DestroyOptionType.NO_DESTROY; })) {
|
845
|
-
if (!destroyOptions.some(function (it) { return it === DestroyOptionType.NO_MESSENGER_DESTROY; })) {
|
847
|
+
if (!destroyOptions.some(function (it) { return it === DestroyOptionType_1.DestroyOptionType.NO_DESTROY; })) {
|
848
|
+
if (!destroyOptions.some(function (it) { return it === DestroyOptionType_1.DestroyOptionType.NO_MESSENGER_DESTROY; })) {
|
846
849
|
if (config.messenger && obj) {
|
847
850
|
config.messenger.deleteChannelFromObj(obj);
|
848
851
|
}
|
@@ -864,7 +867,6 @@ var RawSet = /** @class */ (function () {
|
|
864
867
|
RawSet.DR_INNERHTML_NAME = 'dr-inner-html';
|
865
868
|
RawSet.DR_INNERTEXT_NAME = 'dr-inner-text';
|
866
869
|
RawSet.DR_DETECT_NAME = 'dr-detect';
|
867
|
-
// public static readonly DR_DETECT_ACTION_NAME = 'dr-detect-action';
|
868
870
|
RawSet.DR_IT_OPTIONNAME = 'dr-it';
|
869
871
|
RawSet.DR_VAR_OPTIONNAME = 'dr-var';
|
870
872
|
RawSet.DR_AFTER_OPTIONNAME = 'dr-after';
|
@@ -873,6 +875,12 @@ var RawSet = /** @class */ (function () {
|
|
873
875
|
RawSet.DR_COMPLETE_OPTIONNAME = 'dr-complete';
|
874
876
|
RawSet.DR_STRIP_OPTIONNAME = 'dr-strip';
|
875
877
|
RawSet.DR_DESTROY_OPTIONNAME = 'dr-destroy';
|
878
|
+
RawSet.DR_COMPONENT_NAME_OPTIONNAME = 'dr-component-name';
|
879
|
+
RawSet.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME = 'dr-component-inner-html-name';
|
880
|
+
RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME = 'dr-on-create:arguments';
|
881
|
+
RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME = 'dr-on-create:callback';
|
882
|
+
RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME = 'dr-on-init:arguments';
|
883
|
+
RawSet.DR_ON_CONSTRUCTOR_ARGUMENTS_OPTIONNAME = 'dr-on-constructor:arguments';
|
876
884
|
RawSet.drAttrsOriginName = {
|
877
885
|
dr: RawSet.DR,
|
878
886
|
drIf: RawSet.DR_IF_NAME,
|
@@ -0,0 +1,11 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.RawSetType = void 0;
|
4
|
+
var RawSetType;
|
5
|
+
(function (RawSetType) {
|
6
|
+
RawSetType["TEXT"] = "TEXT";
|
7
|
+
RawSetType["STYLE_TEXT"] = "STYLE_TEXT";
|
8
|
+
RawSetType["TARGET_ELEMENT"] = "TARGET_ELEMENT";
|
9
|
+
RawSetType["TARGET_ATTR"] = "TARGET_ATTR";
|
10
|
+
RawSetType["UNKOWN"] = "UNKOWN";
|
11
|
+
})(RawSetType = exports.RawSetType || (exports.RawSetType = {}));
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { CreatorMetaData } from './CreatorMetaData';
|
2
|
+
import { Router } from '../routers/Router';
|
3
|
+
import { RawSet } from './RawSet';
|
4
|
+
export declare type Render = {
|
5
|
+
rawset?: RawSet;
|
6
|
+
scripts?: {
|
7
|
+
[n: string]: any;
|
8
|
+
};
|
9
|
+
bindScript?: string;
|
10
|
+
element?: any;
|
11
|
+
attribute?: any;
|
12
|
+
creatorMetaData?: CreatorMetaData;
|
13
|
+
router?: Router;
|
14
|
+
range?: any;
|
15
|
+
value?: any;
|
16
|
+
[n: string]: any;
|
17
|
+
};
|
@@ -25,7 +25,13 @@ var LocationUtils = /** @class */ (function () {
|
|
25
25
|
};
|
26
26
|
LocationUtils.hashQueryParamsObject = function (window) {
|
27
27
|
var _a;
|
28
|
-
|
28
|
+
var s = (_a = window.location.hash.split('?').pop()) !== null && _a !== void 0 ? _a : '';
|
29
|
+
if (s.startsWith('#')) {
|
30
|
+
return {};
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
return this.queryStringToObject(s);
|
34
|
+
}
|
29
35
|
};
|
30
36
|
LocationUtils.pathQueryParams = function (window) {
|
31
37
|
return this.queryStringToMap(window.location.search.substring(1));
|