dom-render 1.0.95 → 1.0.96
Sign up to get free protection for your applications and to get access to all the features.
- package/DomRenderProxy.js +12 -16
- package/dist/bundle.js +264 -258
- package/operators/{DrDictionary.d.ts → DrThisProperty.d.ts} +1 -2
- package/operators/{DrDictionary.js → DrThisProperty.js} +15 -40
- package/package.json +1 -1
- package/rawsets/Attrs.d.ts +3 -2
- package/rawsets/RawSet.d.ts +13 -5
- package/rawsets/RawSet.js +51 -19
- package/rawsets/RawSetOperatorType.d.ts +3 -0
- package/rawsets/RawSetOperatorType.js +7 -0
@@ -3,9 +3,8 @@ import { RawSet } from '../rawsets/RawSet';
|
|
3
3
|
import { Render } from '../rawsets/Render';
|
4
4
|
import { AfterCallBack, ElementSource, ExecuteState, ReturnContainer, Source } from './OperatorExecuter';
|
5
5
|
import { Config } from '../configs/Config';
|
6
|
-
export declare class
|
6
|
+
export declare class DrThisProperty extends OperatorExecuterAttrRequire<string> {
|
7
7
|
constructor(rawSet: RawSet, render: Render, returnContainer: ReturnContainer, elementSource: ElementSource, source: Source, afterCallBack: AfterCallBack);
|
8
8
|
executeAttrRequire(attr: string): Promise<ExecuteState>;
|
9
|
-
static getChildren(rawSet: RawSet, config: Config): Map<string, Node[]>;
|
10
9
|
static append(obj: any, fullPath: string, key: string, rawSet: RawSet, config: Config): RawSet[];
|
11
10
|
}
|
@@ -62,18 +62,18 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
62
62
|
}
|
63
63
|
};
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
65
|
-
exports.
|
65
|
+
exports.DrThisProperty = void 0;
|
66
66
|
var OperatorExecuterAttrRequire_1 = require("./OperatorExecuterAttrRequire");
|
67
67
|
var ScriptUtils_1 = require("../utils/script/ScriptUtils");
|
68
68
|
var RawSet_1 = require("../rawsets/RawSet");
|
69
69
|
var OperatorExecuter_1 = require("./OperatorExecuter");
|
70
|
-
var
|
71
|
-
__extends(
|
72
|
-
function
|
70
|
+
var DrThisProperty = /** @class */ (function (_super) {
|
71
|
+
__extends(DrThisProperty, _super);
|
72
|
+
function DrThisProperty(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
|
73
73
|
source.operatorAround = undefined;
|
74
74
|
return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
|
75
75
|
}
|
76
|
-
|
76
|
+
DrThisProperty.prototype.executeAttrRequire = function (attr) {
|
77
77
|
var _a, _b, _c, _d, _e;
|
78
78
|
return __awaiter(this, void 0, void 0, function () {
|
79
79
|
var itRandom, vars, newTemp, dictioanry, dictionaryKey, tempalte, rr;
|
@@ -83,14 +83,14 @@ var DrDictionary = /** @class */ (function (_super) {
|
|
83
83
|
vars = RawSet_1.RawSet.drVarEncoding(this.elementSource.element, (_a = this.elementSource.attrs.drVarOption) !== null && _a !== void 0 ? _a : '');
|
84
84
|
newTemp = this.source.config.window.document.createElement('temp');
|
85
85
|
dictioanry = ScriptUtils_1.ScriptUtils.evalReturn(attr, this.source.obj);
|
86
|
-
dictionaryKey = (_b = this.elementSource.attrs.
|
86
|
+
dictionaryKey = (_b = this.elementSource.attrs.drKeyOption) !== null && _b !== void 0 ? _b : '';
|
87
87
|
// console.log('--->', attr, dictionaryKey)
|
88
88
|
// if (!(dictioanry instanceof Dictionary)) {
|
89
89
|
// return ExecuteState.STOP;
|
90
90
|
// }
|
91
91
|
// await new Promise(resolve => setTimeout(resolve, 1000));
|
92
92
|
// console.log('!!!!!!!!!!!!!!', this.rawSet);
|
93
|
-
ScriptUtils_1.ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n var i = 0; \n const dictionary = ").concat(attr, ";\n const dictionaryKey = '").concat(dictionaryKey, "';\n const dictionaryStr = `").concat(attr, "`.trim();\n // console.log('----@#!@#@!#', this.__render.oldChild);\n if (dictionary) {\n for(const it in dictionary) {\n
|
93
|
+
ScriptUtils_1.ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n var i = 0; \n const dictionary = ").concat(attr, ";\n const dictionaryKey = '").concat(dictionaryKey, "';\n const dictionaryStr = `").concat(attr, "`.trim();\n // console.log('----@#!@#@!#', this.__render.oldChild);\n if (dictionary) {\n for(const it in dictionary) {\n var destIt = dictionaryStr + '[\"' + it + '\"]';\n const n = this.__render.element.cloneNode(true);\n n.setAttribute('dr-this', destIt);\n n.setAttribute('dr-key', it);\n // n.setAttribute('dr-dictionary-key', it);\n this.__render.fag.append(n);\n i++;\n }\n this.__render.rawset.point.start.setAttribute('dr-has-keys',Object.keys(dictionary).join(','));\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n "), Object.assign(this.source.obj, {
|
94
94
|
__render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, drAttr: this.elementSource.attrs, drAttrsOriginName: RawSet_1.RawSet.drAttrsOriginName, fag: newTemp }, this.render))
|
95
95
|
}));
|
96
96
|
RawSet_1.RawSet.drVarDecoding(newTemp, vars);
|
@@ -106,29 +106,7 @@ var DrDictionary = /** @class */ (function (_super) {
|
|
106
106
|
});
|
107
107
|
});
|
108
108
|
};
|
109
|
-
|
110
|
-
var _a, _b, _c;
|
111
|
-
var next = rawSet.point.start.nextSibling;
|
112
|
-
var oldChild = new Map();
|
113
|
-
var currentKey = '';
|
114
|
-
while (next) {
|
115
|
-
if (next === rawSet.point.end) {
|
116
|
-
break;
|
117
|
-
}
|
118
|
-
var dictionaryKey = (_b = (_a = next).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, 'dictionary-key');
|
119
|
-
if (dictionaryKey) {
|
120
|
-
currentKey = dictionaryKey;
|
121
|
-
oldChild.set(dictionaryKey, []);
|
122
|
-
}
|
123
|
-
// console.log('next-------->', currentKey, next);
|
124
|
-
if (currentKey) {
|
125
|
-
(_c = oldChild.get(currentKey)) === null || _c === void 0 ? void 0 : _c.push(next);
|
126
|
-
}
|
127
|
-
next = next.nextSibling;
|
128
|
-
}
|
129
|
-
return oldChild;
|
130
|
-
};
|
131
|
-
DrDictionary.append = function (obj, fullPath, key, rawSet, config) {
|
109
|
+
DrThisProperty.append = function (obj, fullPath, key, rawSet, config) {
|
132
110
|
var _this = this;
|
133
111
|
var _a, _b;
|
134
112
|
var genNode = config.window.document.importNode(rawSet.fragment, true);
|
@@ -137,30 +115,27 @@ var DrDictionary = /** @class */ (function (_super) {
|
|
137
115
|
for (var _i = 0, _c = Array.from(genNode.childNodes.values()); _i < _c.length; _i++) {
|
138
116
|
var cNode = _c[_i];
|
139
117
|
var element = cNode.cloneNode(true);
|
140
|
-
element.removeAttribute(
|
141
|
-
element.setAttribute(
|
118
|
+
element.removeAttribute(RawSet_1.RawSet.DR_THIS_PROPERTY_NAME);
|
119
|
+
element.setAttribute(RawSet_1.RawSet.DR_THIS_NAME, "this.".concat(fullPath));
|
120
|
+
element.setAttribute(RawSet_1.RawSet.DR_KEY_OPTIONNAME, key);
|
142
121
|
// rawSet.point.end.after(element);
|
143
122
|
var fg = config.window.document.createDocumentFragment();
|
144
123
|
fg.append(element);
|
145
124
|
rawSets.push.apply(rawSets, RawSet_1.RawSet.checkPointCreates(fg, obj, config));
|
146
125
|
rawSet.point.end.before(fg);
|
147
126
|
var start = rawSet.point.start;
|
148
|
-
var keys = (_b = (_a = start.getAttribute(
|
127
|
+
var keys = (_b = (_a = start.getAttribute(RawSet_1.RawSet.DR_HAS_KEYS_OPTIONNAME)) === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : [];
|
149
128
|
keys.push(key);
|
150
|
-
start.setAttribute(
|
129
|
+
start.setAttribute(RawSet_1.RawSet.DR_HAS_KEYS_OPTIONNAME, keys.join(','));
|
151
130
|
rawSets.forEach(function (it) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
152
131
|
switch (_a.label) {
|
153
132
|
case 0: return [4 /*yield*/, it.render(obj, config)];
|
154
133
|
case 1: return [2 /*return*/, _a.sent()];
|
155
134
|
}
|
156
135
|
}); }); });
|
157
|
-
// console.log('WWW', fg, Array.from(fg.childNodes));
|
158
|
-
// console.log('--------------------------rawSets', rawSets);
|
159
136
|
}
|
160
137
|
return rawSets;
|
161
|
-
// rawSet.
|
162
|
-
// rawSet.point.end.before()
|
163
138
|
};
|
164
|
-
return
|
139
|
+
return DrThisProperty;
|
165
140
|
}(OperatorExecuterAttrRequire_1.OperatorExecuterAttrRequire));
|
166
|
-
exports.
|
141
|
+
exports.DrThisProperty = DrThisProperty;
|
package/package.json
CHANGED
package/rawsets/Attrs.d.ts
CHANGED
@@ -4,7 +4,7 @@ export type Attrs = {
|
|
4
4
|
drAppender: string | null;
|
5
5
|
drFor: string | null;
|
6
6
|
drForOf: string | null;
|
7
|
-
|
7
|
+
drThisProperty: string | null;
|
8
8
|
drRepeat: string | null;
|
9
9
|
drThis: string | null;
|
10
10
|
drForm: string | null;
|
@@ -19,5 +19,6 @@ export type Attrs = {
|
|
19
19
|
drCompleteOption: string | null;
|
20
20
|
drStripOption: string | null;
|
21
21
|
drDestroyOption: string | null;
|
22
|
-
|
22
|
+
drHasKeysOption: string | null;
|
23
|
+
drKeyOption: string | null;
|
23
24
|
};
|
package/rawsets/RawSet.d.ts
CHANGED
@@ -9,7 +9,9 @@ export declare class RawSet {
|
|
9
9
|
uuid: string;
|
10
10
|
type: RawSetType;
|
11
11
|
point: {
|
12
|
-
start: Comment | Text | HTMLMetaElement
|
12
|
+
start: (Comment | Text | HTMLMetaElement) & {
|
13
|
+
rawSet?: RawSet;
|
14
|
+
};
|
13
15
|
node: Node;
|
14
16
|
end: Comment | Text | HTMLMetaElement;
|
15
17
|
thisVariableName?: string | null;
|
@@ -24,7 +26,7 @@ export declare class RawSet {
|
|
24
26
|
static readonly DR_IF_NAME = "dr-if";
|
25
27
|
static readonly DR_FOR_NAME = "dr-for";
|
26
28
|
static readonly DR_FOR_OF_NAME = "dr-for-of";
|
27
|
-
static readonly
|
29
|
+
static readonly DR_THIS_PROPERTY_NAME = "dr-this-property";
|
28
30
|
static readonly DR_REPEAT_NAME = "dr-repeat";
|
29
31
|
static readonly DR_THIS_NAME = "dr-this";
|
30
32
|
static readonly DR_FORM_NAME = "dr-form";
|
@@ -43,16 +45,19 @@ export declare class RawSet {
|
|
43
45
|
static readonly DR_DESTROY_OPTIONNAME = "dr-destroy";
|
44
46
|
static readonly DR_COMPONENT_NAME_OPTIONNAME = "dr-component-name";
|
45
47
|
static readonly DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME = "dr-component-inner-html-name";
|
46
|
-
static readonly
|
48
|
+
static readonly DR_KEY_OPTIONNAME = "dr-key";
|
49
|
+
static readonly DR_HAS_KEYS_OPTIONNAME = "dr-has-keys";
|
47
50
|
static readonly DR_ON_CREATE_ARGUMENTS_OPTIONNAME = "dr-on-create:arguments";
|
48
51
|
static readonly DR_ON_CREATED_CALLBACK_OPTIONNAME = "dr-on-create:callback";
|
49
52
|
static readonly DR_ON_INIT_ARGUMENTS_OPTIONNAME = "dr-on-init:arguments";
|
50
53
|
static readonly DR_ON_CONSTRUCTOR_ARGUMENTS_OPTIONNAME = "dr-on-constructor:arguments";
|
51
54
|
static readonly drAttrsOriginName: Attrs;
|
52
55
|
static readonly DR_TAGS: never[];
|
53
|
-
static readonly DR_ATTRIBUTES: readonly ["dr", "dr-appender", "dr-if", "dr-for-of", "dr-
|
56
|
+
static readonly DR_ATTRIBUTES: readonly ["dr", "dr-appender", "dr-if", "dr-for-of", "dr-this-property", "dr-for", "dr-this", "dr-form", "dr-pre", "dr-inner-html", "dr-inner-text", "dr-repeat", "dr-detect"];
|
54
57
|
constructor(uuid: string, type: RawSetType, point: {
|
55
|
-
start: Comment | Text | HTMLMetaElement
|
58
|
+
start: (Comment | Text | HTMLMetaElement) & {
|
59
|
+
rawSet?: RawSet;
|
60
|
+
};
|
56
61
|
node: Node;
|
57
62
|
end: Comment | Text | HTMLMetaElement;
|
58
63
|
thisVariableName?: string | null;
|
@@ -79,7 +84,10 @@ export declare class RawSet {
|
|
79
84
|
start: Comment;
|
80
85
|
end: Comment;
|
81
86
|
};
|
87
|
+
remove(): void;
|
82
88
|
childAllRemove(): void;
|
89
|
+
childs(stopNext?: (node: Node) => boolean): ChildNode[] | undefined;
|
90
|
+
getHasRawSet(key: string): RawSet | undefined;
|
83
91
|
static drItOtherEncoding(element: Element | DocumentFragment): string;
|
84
92
|
static drItOtherDecoding(element: Element | DocumentFragment, random: string): void;
|
85
93
|
static drThisEncoding(element: Element, drThis: string): string;
|
package/rawsets/RawSet.js
CHANGED
@@ -80,7 +80,8 @@ var DrTargetElement_1 = require("../operators/DrTargetElement");
|
|
80
80
|
var DrTargetAttr_1 = require("../operators/DrTargetAttr");
|
81
81
|
var DestroyOptionType_1 = require("./DestroyOptionType");
|
82
82
|
var RawSetType_1 = require("./RawSetType");
|
83
|
-
var
|
83
|
+
var DrThisProperty_1 = require("../operators/DrThisProperty");
|
84
|
+
var RawSetOperatorType_1 = require("./RawSetOperatorType");
|
84
85
|
var RawSet = /** @class */ (function () {
|
85
86
|
function RawSet(uuid, type, point, fragment, detect, data) {
|
86
87
|
this.uuid = uuid;
|
@@ -89,6 +90,7 @@ var RawSet = /** @class */ (function () {
|
|
89
90
|
this.fragment = fragment;
|
90
91
|
this.detect = detect;
|
91
92
|
this.data = data;
|
93
|
+
point.start.rawSet = this;
|
92
94
|
// console.log('rawset constructor->', (this.point.node as Element).getAttributeNames());
|
93
95
|
}
|
94
96
|
Object.defineProperty(RawSet.prototype, "isConnected", {
|
@@ -208,7 +210,7 @@ var RawSet = /** @class */ (function () {
|
|
208
210
|
drIf: this.getAttributeAndDelete(element, RawSet.DR_IF_NAME),
|
209
211
|
drFor: this.getAttributeAndDelete(element, RawSet.DR_FOR_NAME),
|
210
212
|
drForOf: this.getAttributeAndDelete(element, RawSet.DR_FOR_OF_NAME),
|
211
|
-
|
213
|
+
drThisProperty: this.getAttributeAndDelete(element, RawSet.DR_THIS_PROPERTY_NAME),
|
212
214
|
drAppender: this.getAttributeAndDelete(element, RawSet.DR_APPENDER_NAME),
|
213
215
|
drRepeat: this.getAttributeAndDelete(element, RawSet.DR_REPEAT_NAME),
|
214
216
|
drThis: this.getAttributeAndDelete(element, RawSet.DR_THIS_NAME),
|
@@ -224,7 +226,7 @@ var RawSet = /** @class */ (function () {
|
|
224
226
|
drCompleteOption: this.getAttributeAndDelete(element, RawSet.DR_COMPLETE_OPTIONNAME),
|
225
227
|
drStripOption: this.getAttributeAndDelete(element, RawSet.DR_STRIP_OPTIONNAME),
|
226
228
|
drDestroyOption: this.getAttributeAndDelete(element, RawSet.DR_DESTROY_OPTIONNAME),
|
227
|
-
|
229
|
+
drKeyOption: this.getAttributeAndDelete(element, RawSet.DR_KEY_OPTIONNAME)
|
228
230
|
};
|
229
231
|
drAttrs.push(drAttr);
|
230
232
|
operators = [
|
@@ -237,7 +239,7 @@ var RawSet = /** @class */ (function () {
|
|
237
239
|
new DrInnerHTML_1.DrInnerHTML(this, __render, { raws: raws, fag: fag }, { element: element, attrName: RawSet.DR_INNERHTML_NAME, attr: drAttr.drInnerHTML, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_h = config.operatorAround) === null || _h === void 0 ? void 0 : _h.drInnerHTML }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
|
238
240
|
new DrFor_1.DrFor(this, __render, { raws: raws, fag: fag }, { element: element, attrName: RawSet.DR_FOR_NAME, attr: drAttr.drFor, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_j = config.operatorAround) === null || _j === void 0 ? void 0 : _j.drFor }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
|
239
241
|
new DrForOf_1.DrForOf(this, __render, { raws: raws, fag: fag }, { element: element, attrName: RawSet.DR_FOR_OF_NAME, attr: drAttr.drForOf, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_k = config.operatorAround) === null || _k === void 0 ? void 0 : _k.drForOf }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
|
240
|
-
new
|
242
|
+
new DrThisProperty_1.DrThisProperty(this, __render, { raws: raws, fag: fag }, { element: element, attrName: RawSet.DR_THIS_PROPERTY_NAME, attr: drAttr.drThisProperty, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_l = config.operatorAround) === null || _l === void 0 ? void 0 : _l.drThisProperty }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
|
241
243
|
new DrAppender_1.DrAppender(this, __render, { raws: raws, fag: fag }, { element: element, attrName: RawSet.DR_APPENDER_NAME, attr: drAttr.drAppender, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_m = config.operatorAround) === null || _m === void 0 ? void 0 : _m.drAppender }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
|
242
244
|
new DrRepeat_1.DrRepeat(this, __render, { raws: raws, fag: fag }, { element: element, attrName: RawSet.DR_REPEAT_NAME, attr: drAttr.drRepeat, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_o = config.operatorAround) === null || _o === void 0 ? void 0 : _o.drRepeat }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
|
243
245
|
new DrTargetElement_1.DrTargetElement(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
|
@@ -558,19 +560,17 @@ var RawSet = /** @class */ (function () {
|
|
558
560
|
var start = config.window.document.createElement('meta');
|
559
561
|
var end = config.window.document.createElement('meta');
|
560
562
|
start.setAttribute('id', "".concat(id, "-start"));
|
561
|
-
var
|
562
|
-
var
|
563
|
-
if (
|
564
|
-
start.setAttribute('type',
|
563
|
+
var keys = element.getAttribute(RawSet.DR_KEY_OPTIONNAME);
|
564
|
+
var thisPropertyType = element.getAttribute(RawSet.DR_THIS_PROPERTY_NAME);
|
565
|
+
if (thisPropertyType) {
|
566
|
+
start.setAttribute('type', RawSetOperatorType_1.RawSetOperatorType.DR_THIS_PROPERTY);
|
565
567
|
}
|
566
|
-
if (
|
567
|
-
|
568
|
+
if (keys) {
|
569
|
+
element.removeAttribute(RawSet.DR_KEY_OPTIONNAME);
|
570
|
+
start.setAttribute(RawSet.DR_KEY_OPTIONNAME, keys);
|
568
571
|
}
|
569
572
|
end.setAttribute('id', "".concat(id, "-end"));
|
570
|
-
return {
|
571
|
-
start: start,
|
572
|
-
end: end
|
573
|
-
};
|
573
|
+
return { start: start, end: end };
|
574
574
|
}
|
575
575
|
else if (type === RawSetType_1.RawSetType.STYLE_TEXT) {
|
576
576
|
return {
|
@@ -585,6 +585,11 @@ var RawSet = /** @class */ (function () {
|
|
585
585
|
};
|
586
586
|
}
|
587
587
|
};
|
588
|
+
RawSet.prototype.remove = function () {
|
589
|
+
this.childAllRemove();
|
590
|
+
this.point.end.remove();
|
591
|
+
this.point.start.remove();
|
592
|
+
};
|
588
593
|
RawSet.prototype.childAllRemove = function () {
|
589
594
|
var next = this.point.start.nextSibling;
|
590
595
|
while (next) {
|
@@ -595,6 +600,31 @@ var RawSet = /** @class */ (function () {
|
|
595
600
|
next = this.point.start.nextSibling;
|
596
601
|
}
|
597
602
|
};
|
603
|
+
RawSet.prototype.childs = function (stopNext) {
|
604
|
+
var childs = [];
|
605
|
+
var next = this.point.start.nextSibling;
|
606
|
+
while (next && next !== this.point.end) {
|
607
|
+
if (stopNext === null || stopNext === void 0 ? void 0 : stopNext(next)) {
|
608
|
+
return;
|
609
|
+
}
|
610
|
+
childs.push(next);
|
611
|
+
next = next.nextSibling;
|
612
|
+
}
|
613
|
+
return childs;
|
614
|
+
};
|
615
|
+
RawSet.prototype.getHasRawSet = function (key) {
|
616
|
+
var rawSet;
|
617
|
+
this.childs(function (node) {
|
618
|
+
var _a, _b;
|
619
|
+
var drKey = (_b = (_a = node).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, 'dr-key');
|
620
|
+
if (drKey && drKey === key) {
|
621
|
+
rawSet = node.rawSet;
|
622
|
+
return true;
|
623
|
+
}
|
624
|
+
return false;
|
625
|
+
});
|
626
|
+
return rawSet;
|
627
|
+
};
|
598
628
|
RawSet.drItOtherEncoding = function (element) {
|
599
629
|
var random = RandomUtils_1.RandomUtils.uuid();
|
600
630
|
var regex = /#it#/g;
|
@@ -1016,7 +1046,7 @@ var RawSet = /** @class */ (function () {
|
|
1016
1046
|
RawSet.DR_IF_NAME = 'dr-if';
|
1017
1047
|
RawSet.DR_FOR_NAME = 'dr-for';
|
1018
1048
|
RawSet.DR_FOR_OF_NAME = 'dr-for-of';
|
1019
|
-
RawSet.
|
1049
|
+
RawSet.DR_THIS_PROPERTY_NAME = 'dr-this-property';
|
1020
1050
|
RawSet.DR_REPEAT_NAME = 'dr-repeat';
|
1021
1051
|
RawSet.DR_THIS_NAME = 'dr-this';
|
1022
1052
|
RawSet.DR_FORM_NAME = 'dr-form';
|
@@ -1035,7 +1065,8 @@ var RawSet = /** @class */ (function () {
|
|
1035
1065
|
RawSet.DR_DESTROY_OPTIONNAME = 'dr-destroy';
|
1036
1066
|
RawSet.DR_COMPONENT_NAME_OPTIONNAME = 'dr-component-name';
|
1037
1067
|
RawSet.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME = 'dr-component-inner-html-name';
|
1038
|
-
RawSet.
|
1068
|
+
RawSet.DR_KEY_OPTIONNAME = 'dr-key';
|
1069
|
+
RawSet.DR_HAS_KEYS_OPTIONNAME = 'dr-has-keys';
|
1039
1070
|
RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME = 'dr-on-create:arguments';
|
1040
1071
|
RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME = 'dr-on-create:callback';
|
1041
1072
|
RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME = 'dr-on-init:arguments';
|
@@ -1045,7 +1076,7 @@ var RawSet = /** @class */ (function () {
|
|
1045
1076
|
drIf: RawSet.DR_IF_NAME,
|
1046
1077
|
drFor: RawSet.DR_FOR_NAME,
|
1047
1078
|
drForOf: RawSet.DR_FOR_OF_NAME,
|
1048
|
-
|
1079
|
+
drThisProperty: RawSet.DR_THIS_PROPERTY_NAME,
|
1049
1080
|
drAppender: RawSet.DR_APPENDER_NAME,
|
1050
1081
|
drRepeat: RawSet.DR_REPEAT_NAME,
|
1051
1082
|
drThis: RawSet.DR_THIS_NAME,
|
@@ -1061,10 +1092,11 @@ var RawSet = /** @class */ (function () {
|
|
1061
1092
|
drCompleteOption: RawSet.DR_COMPLETE_OPTIONNAME,
|
1062
1093
|
drStripOption: RawSet.DR_STRIP_OPTIONNAME,
|
1063
1094
|
drDestroyOption: RawSet.DR_DESTROY_OPTIONNAME,
|
1064
|
-
|
1095
|
+
drHasKeysOption: RawSet.DR_HAS_KEYS_OPTIONNAME,
|
1096
|
+
drKeyOption: RawSet.DR_KEY_OPTIONNAME
|
1065
1097
|
};
|
1066
1098
|
RawSet.DR_TAGS = [];
|
1067
|
-
RawSet.DR_ATTRIBUTES = [RawSet.DR_NAME, RawSet.DR_APPENDER_NAME, RawSet.DR_IF_NAME, RawSet.DR_FOR_OF_NAME, RawSet.
|
1099
|
+
RawSet.DR_ATTRIBUTES = [RawSet.DR_NAME, RawSet.DR_APPENDER_NAME, RawSet.DR_IF_NAME, RawSet.DR_FOR_OF_NAME, RawSet.DR_THIS_PROPERTY_NAME, RawSet.DR_FOR_NAME, RawSet.DR_THIS_NAME, RawSet.DR_FORM_NAME, RawSet.DR_PRE_NAME, RawSet.DR_INNERHTML_NAME, RawSet.DR_INNERTEXT_NAME, RawSet.DR_REPEAT_NAME, RawSet.DR_DETECT_NAME];
|
1068
1100
|
return RawSet;
|
1069
1101
|
}());
|
1070
1102
|
exports.RawSet = RawSet;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.RawSetOperatorType = void 0;
|
4
|
+
var RawSetOperatorType;
|
5
|
+
(function (RawSetOperatorType) {
|
6
|
+
RawSetOperatorType["DR_THIS_PROPERTY"] = "this-property";
|
7
|
+
})(RawSetOperatorType = exports.RawSetOperatorType || (exports.RawSetOperatorType = {}));
|