taggedjs 2.4.12 → 2.4.16
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/bundle.js +782 -439
- package/bundle.js.map +1 -1
- package/js/Clones.type.d.ts +3 -1
- package/js/Tag.class.d.ts +7 -10
- package/js/Tag.class.js +90 -73
- package/js/Tag.class.js.map +1 -1
- package/js/Tag.utils.d.ts +5 -5
- package/js/Tag.utils.js +1 -1
- package/js/Tag.utils.js.map +1 -1
- package/js/TemplaterResult.class.d.ts +19 -14
- package/js/TemplaterResult.class.js +19 -12
- package/js/TemplaterResult.class.js.map +1 -1
- package/js/alterProps.function.d.ts +2 -0
- package/js/alterProps.function.js +18 -12
- package/js/alterProps.function.js.map +1 -1
- package/js/checkDestroyPrevious.function.d.ts +3 -1
- package/js/checkDestroyPrevious.function.js +27 -11
- package/js/checkDestroyPrevious.function.js.map +1 -1
- package/js/destroyTag.function.js +4 -4
- package/js/destroyTag.function.js.map +1 -1
- package/js/hasTagSupportChanged.function.js +0 -3
- package/js/hasTagSupportChanged.function.js.map +1 -1
- package/js/index.d.ts +1 -2
- package/js/index.js +1 -2
- package/js/index.js.map +1 -1
- package/js/insertAfter.function.d.ts +2 -0
- package/js/insertAfter.function.js +6 -0
- package/js/insertAfter.function.js.map +1 -0
- package/js/interpolateElement.d.ts +3 -2
- package/js/interpolateElement.js +3 -2
- package/js/interpolateElement.js.map +1 -1
- package/js/interpolateTemplate.d.ts +2 -3
- package/js/interpolateTemplate.js +11 -24
- package/js/interpolateTemplate.js.map +1 -1
- package/js/interpolations.js +2 -1
- package/js/interpolations.js.map +1 -1
- package/js/isInstance.d.ts +2 -2
- package/js/isInstance.js.map +1 -1
- package/js/processAttribute.function.d.ts +1 -0
- package/js/processAttribute.function.js +3 -3
- package/js/processAttribute.function.js.map +1 -1
- package/js/processNewValue.function.js +1 -1
- package/js/processNewValue.function.js.map +1 -1
- package/js/processRegularValue.function.d.ts +2 -2
- package/js/processRegularValue.function.js +7 -6
- package/js/processRegularValue.function.js.map +1 -1
- package/js/processSubjectComponent.function.d.ts +4 -3
- package/js/processSubjectComponent.function.js +29 -18
- package/js/processSubjectComponent.function.js.map +1 -1
- package/js/processSubjectValue.function.d.ts +4 -9
- package/js/processSubjectValue.function.js +6 -54
- package/js/processSubjectValue.function.js.map +1 -1
- package/js/processTag.function.d.ts +7 -0
- package/js/processTag.function.js +59 -0
- package/js/processTag.function.js.map +1 -0
- package/js/processTagArray.d.ts +6 -5
- package/js/processTagArray.js +36 -19
- package/js/processTagArray.js.map +1 -1
- package/js/processTagResult.function.d.ts +3 -2
- package/js/processTagResult.function.js +29 -33
- package/js/processTagResult.function.js.map +1 -1
- package/js/render.d.ts +2 -1
- package/js/render.js.map +1 -1
- package/js/renderExistingTag.function.js +4 -3
- package/js/renderExistingTag.function.js.map +1 -1
- package/js/subject/Subject.class.d.ts +24 -0
- package/js/subject/Subject.class.js +103 -0
- package/js/subject/Subject.class.js.map +1 -0
- package/js/subject/Subject.utils.d.ts +27 -0
- package/js/subject/Subject.utils.js +4 -0
- package/js/subject/Subject.utils.js.map +1 -0
- package/js/subject/ValueSubject.d.ts +9 -0
- package/js/{ValueSubject.js → subject/ValueSubject.js} +4 -4
- package/js/subject/ValueSubject.js.map +1 -0
- package/js/subject/combineLatest.function.d.ts +2 -0
- package/js/subject/combineLatest.function.js +24 -0
- package/js/subject/combineLatest.function.js.map +1 -0
- package/js/subject/index.d.ts +4 -0
- package/js/subject/index.js +5 -0
- package/js/subject/index.js.map +1 -0
- package/js/subject/will.functions.d.ts +8 -0
- package/js/subject/will.functions.js +32 -0
- package/js/subject/will.functions.js.map +1 -0
- package/js/tag.d.ts +1 -1
- package/js/tag.js +2 -2
- package/js/tag.js.map +1 -1
- package/js/tagElement.js +1 -1
- package/js/tagElement.js.map +1 -1
- package/js/updateBeforeTemplate.function.d.ts +3 -0
- package/js/updateBeforeTemplate.function.js +16 -0
- package/js/updateBeforeTemplate.function.js.map +1 -0
- package/js/updateExistingTagComponent.function.d.ts +2 -1
- package/js/updateExistingTagComponent.function.js +52 -25
- package/js/updateExistingTagComponent.function.js.map +1 -1
- package/js/updateExistingValue.function.d.ts +3 -2
- package/js/updateExistingValue.function.js +19 -10
- package/js/updateExistingValue.function.js.map +1 -1
- package/package.json +1 -1
- package/js/Subject.d.ts +0 -17
- package/js/Subject.js +0 -47
- package/js/Subject.js.map +0 -1
- package/js/ValueSubject.d.ts +0 -8
- package/js/ValueSubject.js.map +0 -1
- package/js/bindSubjectCallback.function 9.27.33/342/200/257AM.js" +0 -32
- package/js/bindSubjectCallback.function.d 9.27.33/342/200/257AM.ts" +0 -8
- package/js/redrawTag.function.d.ts +0 -5
- package/js/redrawTag.function.js +0 -18
- package/js/redrawTag.function.js.map +0 -1
- package/js/templater.utils.d.ts +0 -37
- package/js/templater.utils.js +0 -118
- package/js/templater.utils.js.map +0 -1
- package/js/updateExistingTag.function.d.ts +0 -4
- package/js/updateExistingTag.function.js +0 -24
- package/js/updateExistingTag.function.js.map +0 -1
package/bundle.js
CHANGED
|
@@ -10,66 +10,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
/***/ }),
|
|
14
|
-
|
|
15
|
-
/***/ "./ts/Subject.ts":
|
|
16
|
-
/*!***********************!*\
|
|
17
|
-
!*** ./ts/Subject.ts ***!
|
|
18
|
-
\***********************/
|
|
19
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
20
|
-
|
|
21
|
-
__webpack_require__.r(__webpack_exports__);
|
|
22
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23
|
-
/* harmony export */ Subject: () => (/* binding */ Subject)
|
|
24
|
-
/* harmony export */ });
|
|
25
|
-
class Subject {
|
|
26
|
-
value;
|
|
27
|
-
isSubject = true;
|
|
28
|
-
subscribers = [];
|
|
29
|
-
// unsubcount = 0 // 🔬 testing
|
|
30
|
-
constructor(value) {
|
|
31
|
-
this.value = value;
|
|
32
|
-
}
|
|
33
|
-
subscribe(callback) {
|
|
34
|
-
this.subscribers.push(callback);
|
|
35
|
-
SubjectClass.globalSubs.push(callback); // 🔬 testing
|
|
36
|
-
const countSubject = SubjectClass.globalSubCount$;
|
|
37
|
-
SubjectClass.globalSubCount$.set(countSubject.value + 1);
|
|
38
|
-
const unsubscribe = () => {
|
|
39
|
-
unsubscribe.unsubscribe();
|
|
40
|
-
};
|
|
41
|
-
// Return a function to unsubscribe from the BehaviorSubject
|
|
42
|
-
unsubscribe.unsubscribe = () => {
|
|
43
|
-
removeSubFromArray(this.subscribers, callback);
|
|
44
|
-
removeSubFromArray(SubjectClass.globalSubs, callback); // 🔬 testing
|
|
45
|
-
SubjectClass.globalSubCount$.set(countSubject.value - 1);
|
|
46
|
-
// any double unsubscribes will be ignored
|
|
47
|
-
unsubscribe.unsubscribe = () => undefined;
|
|
48
|
-
};
|
|
49
|
-
return unsubscribe;
|
|
50
|
-
}
|
|
51
|
-
set(value) {
|
|
52
|
-
this.value = value;
|
|
53
|
-
// Notify all subscribers with the new value
|
|
54
|
-
this.subscribers.forEach((callback) => {
|
|
55
|
-
callback.value = value;
|
|
56
|
-
callback(value);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
next = this.set;
|
|
60
|
-
}
|
|
61
|
-
function removeSubFromArray(subscribers, callback) {
|
|
62
|
-
const index = subscribers.indexOf(callback);
|
|
63
|
-
if (index !== -1) {
|
|
64
|
-
subscribers.splice(index, 1);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
const SubjectClass = Subject;
|
|
68
|
-
SubjectClass.globalSubs = []; // 🔬 for testing
|
|
69
|
-
SubjectClass.globalSubCount$ = new Subject(); // for ease of debugging
|
|
70
|
-
SubjectClass.globalSubCount$.set(0);
|
|
71
|
-
|
|
72
|
-
|
|
73
13
|
/***/ }),
|
|
74
14
|
|
|
75
15
|
/***/ "./ts/Tag.class.ts":
|
|
@@ -80,7 +20,6 @@ SubjectClass.globalSubCount$.set(0);
|
|
|
80
20
|
|
|
81
21
|
__webpack_require__.r(__webpack_exports__);
|
|
82
22
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
83
|
-
/* harmony export */ ArrayValueNeverSet: () => (/* binding */ ArrayValueNeverSet),
|
|
84
23
|
/* harmony export */ Tag: () => (/* binding */ Tag),
|
|
85
24
|
/* harmony export */ escapeSearch: () => (/* binding */ escapeSearch),
|
|
86
25
|
/* harmony export */ escapeVariable: () => (/* binding */ escapeVariable),
|
|
@@ -94,6 +33,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
94
33
|
/* harmony import */ var _processNewValue_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./processNewValue.function */ "./ts/processNewValue.function.ts");
|
|
95
34
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
96
35
|
/* harmony import */ var _isLikeTags_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./isLikeTags.function */ "./ts/isLikeTags.function.ts");
|
|
36
|
+
/* harmony import */ var _checkDestroyPrevious_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./checkDestroyPrevious.function */ "./ts/checkDestroyPrevious.function.ts");
|
|
37
|
+
|
|
97
38
|
|
|
98
39
|
|
|
99
40
|
|
|
@@ -106,9 +47,6 @@ const variablePrefix = '__tagvar';
|
|
|
106
47
|
const escapeVariable = '--' + variablePrefix + '--';
|
|
107
48
|
const prefixSearch = new RegExp(variablePrefix, 'g');
|
|
108
49
|
const escapeSearch = new RegExp(escapeVariable, 'g');
|
|
109
|
-
class ArrayValueNeverSet {
|
|
110
|
-
isArrayValueNeverSet = true;
|
|
111
|
-
}
|
|
112
50
|
class Tag {
|
|
113
51
|
strings;
|
|
114
52
|
values;
|
|
@@ -116,7 +54,6 @@ class Tag {
|
|
|
116
54
|
isTag = true;
|
|
117
55
|
hasLiveElements = false;
|
|
118
56
|
clones = []; // elements on document. Needed at destroy process to know what to destroy
|
|
119
|
-
cloneSubs = []; // subscriptions created by clones
|
|
120
57
|
childTags = []; // tags on me
|
|
121
58
|
tagSupport;
|
|
122
59
|
lastTemplateString = undefined; // used to compare templates for updates
|
|
@@ -124,15 +61,15 @@ class Tag {
|
|
|
124
61
|
ownerTag;
|
|
125
62
|
// insertBefore?: Element
|
|
126
63
|
appElement; // only seen on this.getAppElement().appElement
|
|
127
|
-
// present only when an array. Populated by
|
|
128
|
-
|
|
64
|
+
// present only when an array. Populated by Tag.key()
|
|
65
|
+
memory = {};
|
|
129
66
|
constructor(strings, values) {
|
|
130
67
|
this.strings = strings;
|
|
131
68
|
this.values = values;
|
|
132
69
|
}
|
|
133
70
|
/** Used for array, such as array.map(), calls aka array.map(x => html``.key(x)) */
|
|
134
71
|
key(arrayValue) {
|
|
135
|
-
this.arrayValue = arrayValue;
|
|
72
|
+
this.memory.arrayValue = arrayValue;
|
|
136
73
|
return this;
|
|
137
74
|
}
|
|
138
75
|
destroy(options = {
|
|
@@ -146,6 +83,18 @@ class Tag {
|
|
|
146
83
|
const global = tagSupport.templater.global;
|
|
147
84
|
// removing is considered rendering. Prevents after event processing of this tag even tho possibly deleted
|
|
148
85
|
// ++this.tagSupport.templater.global.renderCount
|
|
86
|
+
const subject = tagSupport.subject;
|
|
87
|
+
// put back down the template tag
|
|
88
|
+
const insertBefore = global.insertBefore;
|
|
89
|
+
if (insertBefore.nodeName === 'TEMPLATE') {
|
|
90
|
+
const placeholder = global.placeholder;
|
|
91
|
+
if (placeholder && !('arrayValue' in this.memory)) {
|
|
92
|
+
if (!options.byParent) {
|
|
93
|
+
(0,_checkDestroyPrevious_function__WEBPACK_IMPORTED_MODULE_8__.restoreTagMarker)(this, insertBefore);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
delete global.placeholder;
|
|
149
98
|
// the isComponent check maybe able to be removed
|
|
150
99
|
const isComponent = tagSupport ? true : false;
|
|
151
100
|
if (isComponent) {
|
|
@@ -153,7 +102,6 @@ class Tag {
|
|
|
153
102
|
}
|
|
154
103
|
const childTags = options.byParent ? [] : getChildTagsToDestroy(this.childTags);
|
|
155
104
|
// signify that no further event rendering should take place by making logic think a render occurred during event
|
|
156
|
-
// childTags.forEach(child => ++child.tagSupport.templater.global.renderCount)
|
|
157
105
|
// signify immediately child has been deleted (looked for during event processing)
|
|
158
106
|
childTags.forEach(child => {
|
|
159
107
|
const subGlobal = child.tagSupport.templater.global;
|
|
@@ -164,7 +112,7 @@ class Tag {
|
|
|
164
112
|
delete global.newest;
|
|
165
113
|
global.deleted = true;
|
|
166
114
|
this.hasLiveElements = false;
|
|
167
|
-
delete
|
|
115
|
+
delete subject.tag;
|
|
168
116
|
this.destroySubscriptions();
|
|
169
117
|
let mainPromise;
|
|
170
118
|
if (this.ownerTag) {
|
|
@@ -192,8 +140,9 @@ class Tag {
|
|
|
192
140
|
return mainPromise.then(() => options.stagger);
|
|
193
141
|
}
|
|
194
142
|
destroySubscriptions() {
|
|
195
|
-
this.
|
|
196
|
-
|
|
143
|
+
const global = this.tagSupport.templater.global;
|
|
144
|
+
global.subscriptions.forEach(cloneSub => cloneSub.unsubscribe());
|
|
145
|
+
global.subscriptions.length = 0;
|
|
197
146
|
}
|
|
198
147
|
destroyClones({ stagger } = {
|
|
199
148
|
stagger: 0,
|
|
@@ -206,6 +155,7 @@ class Tag {
|
|
|
206
155
|
}
|
|
207
156
|
return { stagger };
|
|
208
157
|
}
|
|
158
|
+
/** Reviews elements for the presences of ondestroy */
|
|
209
159
|
checkCloneRemoval(clone, stagger) {
|
|
210
160
|
let promise;
|
|
211
161
|
const customElm = clone;
|
|
@@ -249,31 +199,6 @@ class Tag {
|
|
|
249
199
|
}
|
|
250
200
|
isLikeTag(tag) {
|
|
251
201
|
return (0,_isLikeTags_function__WEBPACK_IMPORTED_MODULE_7__.isLikeTags)(this, tag);
|
|
252
|
-
const { string } = tag.getTemplate();
|
|
253
|
-
// TODO: most likely remove?
|
|
254
|
-
if (!this.lastTemplateString) {
|
|
255
|
-
throw new Error('no template here');
|
|
256
|
-
}
|
|
257
|
-
const stringMatched = string === this.lastTemplateString;
|
|
258
|
-
if (!stringMatched || tag.values.length !== this.values.length) {
|
|
259
|
-
return false;
|
|
260
|
-
}
|
|
261
|
-
const allVarsMatch = tag.values.every((value, index) => {
|
|
262
|
-
const compareTo = this.values[index];
|
|
263
|
-
const isFunctions = value instanceof Function && compareTo instanceof Function;
|
|
264
|
-
if (isFunctions) {
|
|
265
|
-
const stringMatch = value.toString() === compareTo.toString();
|
|
266
|
-
if (stringMatch) {
|
|
267
|
-
return true;
|
|
268
|
-
}
|
|
269
|
-
return false;
|
|
270
|
-
}
|
|
271
|
-
return true;
|
|
272
|
-
});
|
|
273
|
-
if (allVarsMatch) {
|
|
274
|
-
return true;
|
|
275
|
-
}
|
|
276
|
-
return false;
|
|
277
202
|
}
|
|
278
203
|
updateByTag(tag) {
|
|
279
204
|
if (!this.tagSupport.templater.global.oldest) {
|
|
@@ -335,31 +260,43 @@ class Tag {
|
|
|
335
260
|
}
|
|
336
261
|
this.buildBeforeElement(insertBefore, {
|
|
337
262
|
forceElement: true,
|
|
338
|
-
counts: { added: 0, removed: 0 },
|
|
263
|
+
counts: { added: 0, removed: 0 },
|
|
339
264
|
});
|
|
340
265
|
}
|
|
341
266
|
buildBeforeElement(insertBefore, options = {
|
|
342
267
|
forceElement: false,
|
|
343
268
|
counts: { added: 0, removed: 0 },
|
|
344
|
-
test: false
|
|
345
269
|
}) {
|
|
346
|
-
|
|
347
|
-
|
|
270
|
+
const subject = this.tagSupport.subject;
|
|
271
|
+
const thisTemplater = this.tagSupport.templater;
|
|
272
|
+
const global = thisTemplater.global;
|
|
273
|
+
global.insertBefore = insertBefore;
|
|
274
|
+
if (!global.placeholder) {
|
|
275
|
+
if (insertBefore.nodeName !== 'TEMPLATE') {
|
|
276
|
+
throw new Error(' no template at insertBefore');
|
|
277
|
+
global.placeholder = insertBefore;
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
setTagPlaceholder(global);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
if (!global.placeholder?.parentNode) {
|
|
284
|
+
throw new Error('????');
|
|
348
285
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
286
|
+
const placeholderElm = global.placeholder;
|
|
287
|
+
global.oldest = this;
|
|
288
|
+
global.newest = this;
|
|
289
|
+
subject.tag = this;
|
|
352
290
|
this.hasLiveElements = true;
|
|
353
291
|
// remove old clones
|
|
354
292
|
if (this.clones.length) {
|
|
355
293
|
this.clones.forEach(clone => this.checkCloneRemoval(clone, 0));
|
|
356
294
|
}
|
|
357
|
-
|
|
358
|
-
this.tagSupport.templater.global.insertBefore = insertBefore;
|
|
295
|
+
global.insertBefore = insertBefore;
|
|
359
296
|
// const context = this.tagSupport.memory.context // this.update()
|
|
360
297
|
const context = this.update();
|
|
361
298
|
const template = this.getTemplate();
|
|
362
|
-
if (!
|
|
299
|
+
if (!placeholderElm.parentNode) {
|
|
363
300
|
throw new Error('no parent before building tag');
|
|
364
301
|
}
|
|
365
302
|
const elementContainer = document.createElement('div');
|
|
@@ -371,38 +308,55 @@ class Tag {
|
|
|
371
308
|
{
|
|
372
309
|
forceElement: options.forceElement,
|
|
373
310
|
counts: options.counts
|
|
374
|
-
}
|
|
375
|
-
if (!
|
|
376
|
-
throw new Error('no parent building tag');
|
|
311
|
+
});
|
|
312
|
+
if (!placeholderElm.parentNode) {
|
|
313
|
+
throw new Error('no parent after building tag');
|
|
377
314
|
}
|
|
378
|
-
afterInterpolateElement(elementContainer,
|
|
315
|
+
afterInterpolateElement(elementContainer, placeholderElm, this, // ownerTag
|
|
379
316
|
context, options);
|
|
380
|
-
|
|
317
|
+
if (!global.placeholder?.parentNode) {
|
|
318
|
+
throw new Error('???? - 2');
|
|
319
|
+
}
|
|
381
320
|
// Any tag components that were found should be processed AFTER the owner processes its elements. Avoid double processing of elements attributes like (oninit)=${}
|
|
382
321
|
let isForceElement = options.forceElement;
|
|
383
322
|
tagComponents.forEach(tagComponent => {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
if (!insertBefore.parentNode) {
|
|
323
|
+
const tagSupport = tagComponent.ownerTag.tagSupport;
|
|
324
|
+
const tagGlobal = tagSupport.templater.global;
|
|
325
|
+
const placeholderElm = tagGlobal.placeholder; // global.placeholderElm
|
|
326
|
+
if (!placeholderElm && !insertBefore.parentNode) {
|
|
388
327
|
throw new Error('no parent building tag components');
|
|
389
328
|
}
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
329
|
+
if (!global.placeholder?.parentNode) {
|
|
330
|
+
throw new Error('???? - 3');
|
|
331
|
+
}
|
|
332
|
+
(0,_interpolateTemplate__WEBPACK_IMPORTED_MODULE_3__.subscribeToTemplate)(tagComponent.insertBefore, tagComponent.subject, tagComponent.ownerTag, options.counts, { isForceElement });
|
|
333
|
+
if (!global.placeholder?.parentNode) {
|
|
334
|
+
throw new Error('???? - 4');
|
|
335
|
+
}
|
|
336
|
+
afterInterpolateElement(elementContainer, tagComponent.insertBefore, tagComponent.ownerTag, // this, // ownerTag
|
|
337
|
+
context, options);
|
|
338
|
+
if (!global.placeholder?.parentNode) {
|
|
339
|
+
throw new Error('???? - 5');
|
|
395
340
|
}
|
|
396
|
-
*/
|
|
397
341
|
});
|
|
398
342
|
}
|
|
399
343
|
}
|
|
400
|
-
function
|
|
344
|
+
function setTagPlaceholder(global) {
|
|
345
|
+
const insertBefore = global.insertBefore;
|
|
346
|
+
const placeholder = global.placeholder = document.createTextNode('');
|
|
347
|
+
const parentNode = insertBefore.parentNode;
|
|
348
|
+
parentNode.insertBefore(placeholder, insertBefore);
|
|
349
|
+
parentNode.removeChild(insertBefore);
|
|
350
|
+
}
|
|
351
|
+
function afterInterpolateElement(container, insertBefore, tag,
|
|
401
352
|
// preClones: Clones,
|
|
402
353
|
context, options) {
|
|
403
354
|
const clones = (0,_render__WEBPACK_IMPORTED_MODULE_1__.buildClones)(container, insertBefore);
|
|
404
|
-
|
|
405
|
-
|
|
355
|
+
if (!clones.length) {
|
|
356
|
+
return clones;
|
|
357
|
+
}
|
|
358
|
+
clones.forEach(clone => (0,_interpolateTemplate__WEBPACK_IMPORTED_MODULE_3__.afterElmBuild)(clone, options, context, tag));
|
|
359
|
+
tag.clones.push(...clones);
|
|
406
360
|
return clones;
|
|
407
361
|
}
|
|
408
362
|
function getChildTagsToDestroy(childTags, allTags = []) {
|
|
@@ -423,15 +377,9 @@ function updateContextItem(context, variableName, value) {
|
|
|
423
377
|
const tag = subject.tag;
|
|
424
378
|
if (tag) {
|
|
425
379
|
const oldTemp = tag.tagSupport.templater;
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
const oldValueFn = oldWrap.original;
|
|
430
|
-
const newValueFn = value.wrapper?.original;
|
|
431
|
-
const fnMatched = oldValueFn === newValueFn;
|
|
432
|
-
if (fnMatched) {
|
|
433
|
-
value.global = oldTemp.global;
|
|
434
|
-
}
|
|
380
|
+
if (value && value.global !== oldTemp.global) {
|
|
381
|
+
if ((0,_isInstance__WEBPACK_IMPORTED_MODULE_6__.isTagComponent)(value)) {
|
|
382
|
+
shareTemplaterGlobal(oldTemp, value);
|
|
435
383
|
}
|
|
436
384
|
}
|
|
437
385
|
}
|
|
@@ -442,6 +390,15 @@ function updateContextItem(context, variableName, value) {
|
|
|
442
390
|
subject.set(value); // listeners will evaluate updated values to possibly update display(s)
|
|
443
391
|
return;
|
|
444
392
|
}
|
|
393
|
+
function shareTemplaterGlobal(oldTemp, value) {
|
|
394
|
+
const oldWrap = oldTemp.wrapper; // tag versus component
|
|
395
|
+
const oldValueFn = oldWrap.original;
|
|
396
|
+
const newValueFn = value.wrapper?.original;
|
|
397
|
+
const fnMatched = oldValueFn === newValueFn;
|
|
398
|
+
if (fnMatched) {
|
|
399
|
+
value.global = oldTemp.global;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
445
402
|
|
|
446
403
|
|
|
447
404
|
/***/ }),
|
|
@@ -557,7 +514,8 @@ class TemplaterResult {
|
|
|
557
514
|
providers: [],
|
|
558
515
|
/** Indicator of re-rending. Saves from double rending something already rendered */
|
|
559
516
|
renderCount: 0,
|
|
560
|
-
deleted: false
|
|
517
|
+
deleted: false,
|
|
518
|
+
subscriptions: []
|
|
561
519
|
};
|
|
562
520
|
tagSupport;
|
|
563
521
|
constructor(props, children) {
|
|
@@ -592,55 +550,32 @@ function renderWithSupport(tagSupport, existingTag, subject, ownerTag) {
|
|
|
592
550
|
}
|
|
593
551
|
/* END: BEFORE RENDER */
|
|
594
552
|
const templater = wrapTagSupport.templater;
|
|
553
|
+
// NEW TAG CREATED HERE
|
|
595
554
|
const retag = templater.wrapper(wrapTagSupport, subject);
|
|
596
555
|
/* AFTER */
|
|
597
556
|
(0,_tagRunner__WEBPACK_IMPORTED_MODULE_0__.runAfterRender)(wrapTagSupport, retag);
|
|
598
557
|
const isLikeTag = !existingTag || (0,_isLikeTags_function__WEBPACK_IMPORTED_MODULE_2__.isLikeTags)(existingTag, retag);
|
|
599
558
|
if (!isLikeTag) {
|
|
600
|
-
(
|
|
601
|
-
delete templater.global.oldest;
|
|
602
|
-
delete templater.global.newest;
|
|
603
|
-
delete subject.tag;
|
|
604
|
-
templater.global.insertBefore = existingTag.tagSupport.templater.global.insertBefore;
|
|
559
|
+
destroyUnlikeTags(existingTag, templater, subject);
|
|
605
560
|
}
|
|
606
561
|
retag.ownerTag = runtimeOwnerTag;
|
|
607
562
|
wrapTagSupport.templater.global.newest = retag;
|
|
608
|
-
if (wrapTagSupport.templater.global.oldest && !wrapTagSupport.templater.global.oldest.hasLiveElements) {
|
|
609
|
-
throw new Error('56513540');
|
|
610
|
-
}
|
|
611
|
-
if (wrapTagSupport.templater.global.oldest && !wrapTagSupport.templater.global.oldest.hasLiveElements) {
|
|
612
|
-
throw new Error('5555 - 10');
|
|
613
|
-
}
|
|
614
563
|
return retag;
|
|
615
564
|
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
/* harmony import */ var _Subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject */ "./ts/Subject.ts");
|
|
631
|
-
|
|
632
|
-
class ValueSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__.Subject {
|
|
633
|
-
value;
|
|
634
|
-
constructor(value) {
|
|
635
|
-
super(value);
|
|
636
|
-
this.value = value;
|
|
637
|
-
}
|
|
638
|
-
subscribe(callback) {
|
|
639
|
-
const unsubscribe = super.subscribe(callback);
|
|
640
|
-
// Call the callback immediately with the current value
|
|
641
|
-
callback(this.value);
|
|
642
|
-
return unsubscribe;
|
|
643
|
-
}
|
|
565
|
+
function destroyUnlikeTags(existingTag, // old
|
|
566
|
+
templater, // new
|
|
567
|
+
subject) {
|
|
568
|
+
const oldGlobal = existingTag.tagSupport.templater.global;
|
|
569
|
+
const insertBefore = oldGlobal.insertBefore;
|
|
570
|
+
(0,_destroyTag_function__WEBPACK_IMPORTED_MODULE_3__.destroyTagMemory)(existingTag, subject);
|
|
571
|
+
// ??? - new so that when a tag is destroy the unlike does not carry the destroy signifier
|
|
572
|
+
templater.global = { ...templater.global }; // break memory references
|
|
573
|
+
const global = templater.global;
|
|
574
|
+
global.insertBefore = insertBefore;
|
|
575
|
+
global.deleted = false;
|
|
576
|
+
delete global.oldest;
|
|
577
|
+
delete global.newest;
|
|
578
|
+
delete subject.tag;
|
|
644
579
|
}
|
|
645
580
|
|
|
646
581
|
|
|
@@ -654,7 +589,8 @@ class ValueSubject extends _Subject__WEBPACK_IMPORTED_MODULE_0__.Subject {
|
|
|
654
589
|
|
|
655
590
|
__webpack_require__.r(__webpack_exports__);
|
|
656
591
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
657
|
-
/* harmony export */ alterProps: () => (/* binding */ alterProps)
|
|
592
|
+
/* harmony export */ alterProps: () => (/* binding */ alterProps),
|
|
593
|
+
/* harmony export */ callbackPropOwner: () => (/* binding */ callbackPropOwner)
|
|
658
594
|
/* harmony export */ });
|
|
659
595
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
660
596
|
/* harmony import */ var _renderTagSupport_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./renderTagSupport.function */ "./ts/renderTagSupport.function.ts");
|
|
@@ -663,17 +599,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
663
599
|
/* Used to rewrite props that are functions. When they are called it should cause parent rendering */
|
|
664
600
|
function alterProps(props, templater, ownerSupport) {
|
|
665
601
|
function callback(toCall, callWith) {
|
|
666
|
-
|
|
667
|
-
const callbackResult = toCall(...callWith);
|
|
668
|
-
if (templater.global.renderCount > renderCount) {
|
|
669
|
-
throw new Error('already rendered');
|
|
670
|
-
}
|
|
671
|
-
const lastestOwner = ownerSupport.templater.global.newest;
|
|
672
|
-
const newOwner = (0,_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_1__.renderTagSupport)(lastestOwner.tagSupport, true);
|
|
673
|
-
if (newOwner.tagSupport.templater.global.newest != newOwner) {
|
|
674
|
-
throw new Error('newest assignment issue?');
|
|
675
|
-
}
|
|
676
|
-
return callbackResult;
|
|
602
|
+
return callbackPropOwner(toCall, callWith, templater, ownerSupport);
|
|
677
603
|
}
|
|
678
604
|
const isPropTag = (0,_isInstance__WEBPACK_IMPORTED_MODULE_0__.isTagInstance)(props);
|
|
679
605
|
const watchProps = isPropTag ? 0 : props;
|
|
@@ -694,14 +620,30 @@ function resetFunctionProps(props, callback) {
|
|
|
694
620
|
return; // already previously converted
|
|
695
621
|
}
|
|
696
622
|
newProps[name] = (...args) => {
|
|
697
|
-
return
|
|
623
|
+
return newProps[name].toCall(...args); // what gets called can switch over parent state changes
|
|
698
624
|
};
|
|
625
|
+
// Currently, call self but over parent state changes, I may need to call a newer parent tag owner
|
|
626
|
+
newProps[name].toCall = (...args) => callback(value, args);
|
|
699
627
|
newProps[name].original = value;
|
|
700
628
|
return;
|
|
701
629
|
}
|
|
702
630
|
});
|
|
703
631
|
return newProps;
|
|
704
632
|
}
|
|
633
|
+
function callbackPropOwner(toCall, callWith, templater, // only used to prevent rendering double
|
|
634
|
+
ownerSupport) {
|
|
635
|
+
const renderCount = templater.global.renderCount;
|
|
636
|
+
const callbackResult = toCall(...callWith);
|
|
637
|
+
if (templater.global.renderCount > renderCount) {
|
|
638
|
+
throw new Error('already rendered');
|
|
639
|
+
}
|
|
640
|
+
const lastestOwner = ownerSupport.templater.global.newest;
|
|
641
|
+
const newOwner = (0,_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_1__.renderTagSupport)(lastestOwner.tagSupport, true);
|
|
642
|
+
if (newOwner.tagSupport.templater.global.newest != newOwner) {
|
|
643
|
+
throw new Error('newest assignment issue?');
|
|
644
|
+
}
|
|
645
|
+
return callbackResult;
|
|
646
|
+
}
|
|
705
647
|
|
|
706
648
|
|
|
707
649
|
/***/ }),
|
|
@@ -774,23 +716,29 @@ function runTagCallback(value, tag, bindTo, args) {
|
|
|
774
716
|
__webpack_require__.r(__webpack_exports__);
|
|
775
717
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
776
718
|
/* harmony export */ checkDestroyPrevious: () => (/* binding */ checkDestroyPrevious),
|
|
777
|
-
/* harmony export */ destroyArrayTag: () => (/* binding */ destroyArrayTag)
|
|
719
|
+
/* harmony export */ destroyArrayTag: () => (/* binding */ destroyArrayTag),
|
|
720
|
+
/* harmony export */ restoreTagMarker: () => (/* binding */ restoreTagMarker)
|
|
778
721
|
/* harmony export */ });
|
|
779
722
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
780
723
|
/* harmony import */ var _isLikeTags_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isLikeTags.function */ "./ts/isLikeTags.function.ts");
|
|
781
724
|
/* harmony import */ var _destroyTag_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./destroyTag.function */ "./ts/destroyTag.function.ts");
|
|
725
|
+
/* harmony import */ var _insertAfter_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./insertAfter.function */ "./ts/insertAfter.function.ts");
|
|
726
|
+
|
|
782
727
|
|
|
783
728
|
|
|
784
729
|
|
|
785
730
|
function checkDestroyPrevious(subject, // existing.value is the old value
|
|
786
|
-
newValue) {
|
|
787
|
-
const
|
|
788
|
-
const wasArray =
|
|
731
|
+
newValue, insertBefore) {
|
|
732
|
+
const arraySubject = subject;
|
|
733
|
+
const wasArray = arraySubject.lastArray;
|
|
789
734
|
// no longer an array
|
|
790
735
|
if (wasArray && !(0,_isInstance__WEBPACK_IMPORTED_MODULE_0__.isTagArray)(newValue)) {
|
|
736
|
+
const placeholderElm = arraySubject.placeholder;
|
|
737
|
+
delete arraySubject.lastArray;
|
|
738
|
+
delete arraySubject.placeholder;
|
|
739
|
+
(0,_insertAfter_function__WEBPACK_IMPORTED_MODULE_3__.insertAfter)(insertBefore, placeholderElm);
|
|
791
740
|
wasArray.forEach(({ tag }) => destroyArrayTag(tag, { added: 0, removed: 0 }));
|
|
792
|
-
|
|
793
|
-
return 1;
|
|
741
|
+
return 'array';
|
|
794
742
|
}
|
|
795
743
|
const tagSubject = subject;
|
|
796
744
|
const existingTag = tagSubject.tag;
|
|
@@ -800,7 +748,10 @@ newValue) {
|
|
|
800
748
|
const isSubjectTag = (0,_isInstance__WEBPACK_IMPORTED_MODULE_0__.isTagInstance)(subject.value);
|
|
801
749
|
if (isSubjectTag && isValueTag) {
|
|
802
750
|
const newTag = newValue;
|
|
751
|
+
// its a different tag now
|
|
803
752
|
if (!(0,_isLikeTags_function__WEBPACK_IMPORTED_MODULE_1__.isLikeTags)(newTag, existingTag)) {
|
|
753
|
+
// put template back down
|
|
754
|
+
restoreTagMarker(existingTag, insertBefore);
|
|
804
755
|
(0,_destroyTag_function__WEBPACK_IMPORTED_MODULE_2__.destroyTagMemory)(existingTag, tagSubject);
|
|
805
756
|
return 2;
|
|
806
757
|
}
|
|
@@ -810,16 +761,18 @@ newValue) {
|
|
|
810
761
|
if (isValueTagComponent) {
|
|
811
762
|
return false; // its still a tag component
|
|
812
763
|
}
|
|
764
|
+
// put template back down
|
|
765
|
+
restoreTagMarker(existingTag, insertBefore);
|
|
813
766
|
// destroy old component, value is not a component
|
|
814
767
|
(0,_destroyTag_function__WEBPACK_IMPORTED_MODULE_2__.destroyTagMemory)(existingTag, tagSubject);
|
|
815
|
-
return
|
|
768
|
+
return 'different-tag';
|
|
816
769
|
}
|
|
817
770
|
const displaySubject = subject;
|
|
818
771
|
const hasLastValue = 'lastValue' in displaySubject;
|
|
819
772
|
const lastValue = displaySubject.lastValue; // TODO: we maybe able to use displaySubject.value and remove concept of lastValue
|
|
820
773
|
// was simple value but now something bigger
|
|
821
774
|
if (hasLastValue && lastValue !== newValue) {
|
|
822
|
-
destroySimpleValue(
|
|
775
|
+
destroySimpleValue(insertBefore, displaySubject);
|
|
823
776
|
return 4;
|
|
824
777
|
}
|
|
825
778
|
return false;
|
|
@@ -830,15 +783,22 @@ function destroyArrayTag(tag, counts) {
|
|
|
830
783
|
stagger: counts.removed++,
|
|
831
784
|
});
|
|
832
785
|
}
|
|
833
|
-
function destroySimpleValue(
|
|
786
|
+
function destroySimpleValue(insertBefore, // always a template tag
|
|
787
|
+
subject) {
|
|
834
788
|
const clone = subject.clone;
|
|
835
789
|
const parent = clone.parentNode;
|
|
836
|
-
// put the template back down
|
|
837
|
-
parent.insertBefore(
|
|
790
|
+
// 1 put the template back down
|
|
791
|
+
parent.insertBefore(insertBefore, clone);
|
|
838
792
|
parent.removeChild(clone);
|
|
839
793
|
delete subject.clone;
|
|
840
794
|
delete subject.lastValue;
|
|
841
|
-
|
|
795
|
+
}
|
|
796
|
+
function restoreTagMarker(existingTag, insertBefore) {
|
|
797
|
+
const global = existingTag.tagSupport.templater.global;
|
|
798
|
+
const placeholderElm = global.placeholder;
|
|
799
|
+
if (placeholderElm) {
|
|
800
|
+
(0,_insertAfter_function__WEBPACK_IMPORTED_MODULE_3__.insertAfter)(insertBefore, placeholderElm);
|
|
801
|
+
}
|
|
842
802
|
}
|
|
843
803
|
|
|
844
804
|
|
|
@@ -966,16 +926,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
966
926
|
/* harmony export */ });
|
|
967
927
|
function destroyTagMemory(tag, subject) {
|
|
968
928
|
const oldTagSupport = tag.tagSupport;
|
|
969
|
-
if (subject !=
|
|
929
|
+
if (subject != oldTagSupport.subject) {
|
|
970
930
|
throw new Error('fff - subjects do not match');
|
|
971
931
|
}
|
|
972
932
|
delete subject.tag;
|
|
973
|
-
delete
|
|
933
|
+
delete oldTagSupport.subject.tag; // TODO: this line maybe not needed
|
|
974
934
|
// must destroy oldest which is tag with elements on stage
|
|
975
|
-
const oldest =
|
|
935
|
+
const oldest = oldTagSupport.templater.global.oldest;
|
|
976
936
|
oldest.destroy();
|
|
977
937
|
destroyTagSupportPast(oldTagSupport);
|
|
978
|
-
|
|
938
|
+
oldTagSupport.templater.global.context = {};
|
|
979
939
|
}
|
|
980
940
|
function destroyTagSupportPast(oldTagSupport) {
|
|
981
941
|
delete oldTagSupport.templater.global.oldest;
|
|
@@ -1205,9 +1165,6 @@ pastCloneProps) {
|
|
|
1205
1165
|
castedProps = { ...props };
|
|
1206
1166
|
castedPastProps = { ...(pastCloneProps || {}) };
|
|
1207
1167
|
const allFunctionsMatch = Object.entries(castedProps).every(([key, value]) => {
|
|
1208
|
-
/*if(!(key in (castedPastProps as any))) {
|
|
1209
|
-
return false
|
|
1210
|
-
}*/
|
|
1211
1168
|
let compare = castedPastProps[key];
|
|
1212
1169
|
if (!(value instanceof Function)) {
|
|
1213
1170
|
return 4; // this will be checked in deepEqual
|
|
@@ -1299,6 +1256,25 @@ function inputAttribute(name, value, element) {
|
|
|
1299
1256
|
}
|
|
1300
1257
|
|
|
1301
1258
|
|
|
1259
|
+
/***/ }),
|
|
1260
|
+
|
|
1261
|
+
/***/ "./ts/insertAfter.function.ts":
|
|
1262
|
+
/*!************************************!*\
|
|
1263
|
+
!*** ./ts/insertAfter.function.ts ***!
|
|
1264
|
+
\************************************/
|
|
1265
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1266
|
+
|
|
1267
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1268
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1269
|
+
/* harmony export */ insertAfter: () => (/* binding */ insertAfter)
|
|
1270
|
+
/* harmony export */ });
|
|
1271
|
+
// Function to insert element after reference element
|
|
1272
|
+
function insertAfter(newNode, referenceNode) {
|
|
1273
|
+
const parentNode = referenceNode.parentNode;
|
|
1274
|
+
parentNode.insertBefore(newNode, referenceNode.nextSibling);
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
|
|
1302
1278
|
/***/ }),
|
|
1303
1279
|
|
|
1304
1280
|
/***/ "./ts/interpolateAttributes.ts":
|
|
@@ -1411,8 +1387,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1411
1387
|
|
|
1412
1388
|
|
|
1413
1389
|
/** Review elements within an element */
|
|
1414
|
-
function interpolateElement(container,
|
|
1415
|
-
|
|
1390
|
+
function interpolateElement(container, // element containing innerHTML to review interpolations
|
|
1391
|
+
context, // variables used to evaluate
|
|
1392
|
+
interpolatedTemplates, tagOwner, options) {
|
|
1416
1393
|
const clones = [];
|
|
1417
1394
|
const tagComponents = [];
|
|
1418
1395
|
const result = interpolatedTemplates.interpolation;
|
|
@@ -1454,8 +1431,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1454
1431
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1455
1432
|
/* harmony export */ afterElmBuild: () => (/* binding */ afterElmBuild),
|
|
1456
1433
|
/* harmony export */ interpolateTemplate: () => (/* binding */ interpolateTemplate),
|
|
1457
|
-
/* harmony export */ subscribeToTemplate: () => (/* binding */ subscribeToTemplate)
|
|
1458
|
-
/* harmony export */ updateBetweenTemplates: () => (/* binding */ updateBetweenTemplates)
|
|
1434
|
+
/* harmony export */ subscribeToTemplate: () => (/* binding */ subscribeToTemplate)
|
|
1459
1435
|
/* harmony export */ });
|
|
1460
1436
|
/* harmony import */ var _Tag_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tag.class */ "./ts/Tag.class.ts");
|
|
1461
1437
|
/* harmony import */ var _elementInitCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./elementInitCheck */ "./ts/elementInitCheck.ts");
|
|
@@ -1506,14 +1482,21 @@ function subscribeToTemplate(insertBefore, subject, ownerTag, counts, // used fo
|
|
|
1506
1482
|
let called = false;
|
|
1507
1483
|
const callback = (value) => {
|
|
1508
1484
|
// const orgInsert = insertBefore
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1485
|
+
/*
|
|
1486
|
+
const clone = (subject as DisplaySubject).clone
|
|
1487
|
+
if(clone && clone.parentNode) {
|
|
1488
|
+
insertBefore = clone
|
|
1512
1489
|
}
|
|
1490
|
+
*/
|
|
1513
1491
|
if (called) {
|
|
1514
1492
|
(0,_updateExistingValue_function__WEBPACK_IMPORTED_MODULE_5__.updateExistingValue)(subject, value, ownerTag, insertBefore);
|
|
1515
1493
|
return;
|
|
1516
1494
|
}
|
|
1495
|
+
if (!insertBefore.parentNode) {
|
|
1496
|
+
throw new Error('no insert before parent node - 3');
|
|
1497
|
+
}
|
|
1498
|
+
const global = ownerTag.tagSupport.templater.global;
|
|
1499
|
+
const pre = global.placeholder?.parentNode;
|
|
1517
1500
|
(0,_processSubjectValue_function__WEBPACK_IMPORTED_MODULE_2__.processSubjectValue)(value, subject, insertBefore, ownerTag, {
|
|
1518
1501
|
counts: { ...counts },
|
|
1519
1502
|
forceElement: isForceElement,
|
|
@@ -1527,21 +1510,7 @@ function subscribeToTemplate(insertBefore, subject, ownerTag, counts, // used fo
|
|
|
1527
1510
|
called = true;
|
|
1528
1511
|
};
|
|
1529
1512
|
const sub = subject.subscribe(callback);
|
|
1530
|
-
ownerTag.
|
|
1531
|
-
}
|
|
1532
|
-
// Function to update the value of x
|
|
1533
|
-
function updateBetweenTemplates(value, lastFirstChild) {
|
|
1534
|
-
const parent = lastFirstChild.parentNode;
|
|
1535
|
-
// mimic React skipping to display EXCEPT for true does display on page
|
|
1536
|
-
if (value === undefined || value === false || value === null) { // || value === true
|
|
1537
|
-
value = '';
|
|
1538
|
-
}
|
|
1539
|
-
// Insert the new value (never use innerHTML here)
|
|
1540
|
-
const textNode = document.createTextNode(value); // never innerHTML
|
|
1541
|
-
parent.insertBefore(textNode, lastFirstChild);
|
|
1542
|
-
/* remove existing nodes */
|
|
1543
|
-
parent.removeChild(lastFirstChild);
|
|
1544
|
-
return textNode;
|
|
1513
|
+
ownerTag.tagSupport.templater.global.subscriptions.push(sub);
|
|
1545
1514
|
}
|
|
1546
1515
|
function afterElmBuild(elm, options, context, ownerTag) {
|
|
1547
1516
|
if (!elm.getAttribute) {
|
|
@@ -1554,12 +1523,6 @@ function afterElmBuild(elm, options, context, ownerTag) {
|
|
|
1554
1523
|
let diff = options.counts.added;
|
|
1555
1524
|
diff = (0,_elementInitCheck__WEBPACK_IMPORTED_MODULE_1__.elementInitCheck)(elm, options.counts) - diff;
|
|
1556
1525
|
if (elm.children) {
|
|
1557
|
-
/*
|
|
1558
|
-
const subCounts = {
|
|
1559
|
-
added: options.counts.added, // - diff,
|
|
1560
|
-
removed: options.counts.removed,
|
|
1561
|
-
}
|
|
1562
|
-
*/
|
|
1563
1526
|
new Array(...elm.children).forEach((child, index) => {
|
|
1564
1527
|
const subOptions = {
|
|
1565
1528
|
...options,
|
|
@@ -1596,8 +1559,9 @@ function interpolateToTemplates(template) {
|
|
|
1596
1559
|
}
|
|
1597
1560
|
const noBraces = expression.substring(1, expression.length - 1);
|
|
1598
1561
|
const id = noBraces;
|
|
1562
|
+
const name = 'template-' + template.length;
|
|
1599
1563
|
keys.push(id);
|
|
1600
|
-
return `<template interpolate end id="${id}"></template>`;
|
|
1564
|
+
return `<template interpolate end id="${id}" name="${name}"></template>`;
|
|
1601
1565
|
});
|
|
1602
1566
|
return { string, keys };
|
|
1603
1567
|
}
|
|
@@ -1772,7 +1736,7 @@ function processAttribute(attrName, value, child, scope, ownerTag, howToSet) {
|
|
|
1772
1736
|
processNameOnlyAttr(value, lastValue, child, ownerTag, howToSet);
|
|
1773
1737
|
lastValue = value;
|
|
1774
1738
|
});
|
|
1775
|
-
ownerTag.
|
|
1739
|
+
ownerTag.tagSupport.templater.global.subscriptions.push(sub); // this is where unsubscribe is picked up
|
|
1776
1740
|
child.removeAttribute(attrName);
|
|
1777
1741
|
return;
|
|
1778
1742
|
}
|
|
@@ -1836,7 +1800,7 @@ function processNameValueAttr(attrName, result, child, ownerTag, howToSet) {
|
|
|
1836
1800
|
// 🗞️ Subscribe. Above callback called immediately since its a ValueSubject()
|
|
1837
1801
|
const sub = result.subscribe(callback);
|
|
1838
1802
|
// Record subscription for later unsubscribe when element destroyed
|
|
1839
|
-
ownerTag.
|
|
1803
|
+
ownerTag.tagSupport.templater.global.subscriptions.push(sub);
|
|
1840
1804
|
return;
|
|
1841
1805
|
}
|
|
1842
1806
|
howToSet(child, attrName, result);
|
|
@@ -1861,7 +1825,7 @@ function processAttributeSubjectValue(newAttrValue, child, attrName, isSpecial,
|
|
|
1861
1825
|
howToSet(child, attrName, newAttrValue);
|
|
1862
1826
|
return;
|
|
1863
1827
|
}
|
|
1864
|
-
const isDeadValue =
|
|
1828
|
+
const isDeadValue = [undefined, false, null].includes(newAttrValue);
|
|
1865
1829
|
if (isDeadValue) {
|
|
1866
1830
|
child.removeAttribute(attrName);
|
|
1867
1831
|
return;
|
|
@@ -1887,18 +1851,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1887
1851
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1888
1852
|
/* harmony export */ processNewValue: () => (/* binding */ processNewValue)
|
|
1889
1853
|
/* harmony export */ });
|
|
1890
|
-
/* harmony import */ var
|
|
1854
|
+
/* harmony import */ var _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subject/ValueSubject */ "./ts/subject/ValueSubject.ts");
|
|
1891
1855
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
1892
1856
|
|
|
1893
1857
|
|
|
1894
1858
|
function processNewValue(hasValue, value, ownerTag) {
|
|
1895
1859
|
if ((0,_isInstance__WEBPACK_IMPORTED_MODULE_1__.isTagComponent)(value)) {
|
|
1896
|
-
const tagSubject = new
|
|
1860
|
+
const tagSubject = new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_0__.ValueSubject(value);
|
|
1897
1861
|
return tagSubject;
|
|
1898
1862
|
}
|
|
1899
1863
|
if (value instanceof Function) {
|
|
1900
1864
|
// return getSubjectFunction(value, ownerTag)
|
|
1901
|
-
return new
|
|
1865
|
+
return new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_0__.ValueSubject(value);
|
|
1902
1866
|
}
|
|
1903
1867
|
if (!hasValue) {
|
|
1904
1868
|
return; // more strings than values, stop here
|
|
@@ -1908,12 +1872,12 @@ function processNewValue(hasValue, value, ownerTag) {
|
|
|
1908
1872
|
if (ownerTag.childTags.find(x => x === value)) {
|
|
1909
1873
|
throw new Error('about to reattach tag already present - 2');
|
|
1910
1874
|
}
|
|
1911
|
-
return new
|
|
1875
|
+
return new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_0__.ValueSubject(value);
|
|
1912
1876
|
}
|
|
1913
1877
|
if ((0,_isInstance__WEBPACK_IMPORTED_MODULE_1__.isSubjectInstance)(value)) {
|
|
1914
1878
|
return value; // its already a value subject
|
|
1915
1879
|
}
|
|
1916
|
-
return new
|
|
1880
|
+
return new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_0__.ValueSubject(value);
|
|
1917
1881
|
}
|
|
1918
1882
|
|
|
1919
1883
|
|
|
@@ -1929,18 +1893,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1929
1893
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1930
1894
|
/* harmony export */ processRegularValue: () => (/* binding */ processRegularValue)
|
|
1931
1895
|
/* harmony export */ });
|
|
1932
|
-
/* harmony import */ var
|
|
1896
|
+
/* harmony import */ var _updateBeforeTemplate_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./updateBeforeTemplate.function */ "./ts/updateBeforeTemplate.function.ts");
|
|
1933
1897
|
|
|
1934
1898
|
function processRegularValue(value, subject, // could be tag via subject.tag
|
|
1935
|
-
|
|
1936
|
-
subject.
|
|
1937
|
-
const before = subject.clone ||
|
|
1938
|
-
|
|
1899
|
+
insertBefore) {
|
|
1900
|
+
subject.insertBefore = insertBefore;
|
|
1901
|
+
const before = subject.clone || insertBefore; // Either the template is on the doc OR its the first element we last put on doc
|
|
1902
|
+
// matches but also was defined at some point
|
|
1903
|
+
if (subject.lastValue === value && 'lastValue' in subject) {
|
|
1939
1904
|
return; // no need to update display, its the same
|
|
1940
1905
|
}
|
|
1941
1906
|
subject.lastValue = value;
|
|
1942
1907
|
// Processing of regular values
|
|
1943
|
-
const clone = (0,
|
|
1908
|
+
const clone = (0,_updateBeforeTemplate_function__WEBPACK_IMPORTED_MODULE_0__.updateBeforeTemplate)(value, before);
|
|
1944
1909
|
subject.clone = clone; // remember single element put down, for future updates
|
|
1945
1910
|
}
|
|
1946
1911
|
|
|
@@ -1965,7 +1930,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1965
1930
|
|
|
1966
1931
|
|
|
1967
1932
|
|
|
1968
|
-
function processSubjectComponent(templater, subject,
|
|
1933
|
+
function processSubjectComponent(templater, subject, insertBefore, ownerTag, options) {
|
|
1969
1934
|
// Check if function component is wrapped in a tag() call
|
|
1970
1935
|
// TODO: This below check not needed in production mode
|
|
1971
1936
|
if (templater.tagged !== true) {
|
|
@@ -1980,31 +1945,42 @@ function processSubjectComponent(templater, subject, template, ownerTag, options
|
|
|
1980
1945
|
}
|
|
1981
1946
|
templater.tagSupport = new _TagSupport_class__WEBPACK_IMPORTED_MODULE_3__.TagSupport(ownerTag.tagSupport, templater, subject);
|
|
1982
1947
|
// templater.oldest = subject.tag?.tagSupport.oldest || templater.oldest
|
|
1983
|
-
|
|
1948
|
+
if (insertBefore.nodeName != 'TEMPLATE') {
|
|
1949
|
+
throw new Error('9');
|
|
1950
|
+
}
|
|
1951
|
+
templater.global.insertBefore = insertBefore;
|
|
1984
1952
|
let retag = subject.tag;
|
|
1985
1953
|
const providers = _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.providerConfig;
|
|
1986
1954
|
providers.ownerTag = ownerTag;
|
|
1987
1955
|
const isRedraw = !retag || options.forceElement;
|
|
1988
1956
|
if (isRedraw) {
|
|
1989
|
-
|
|
1990
|
-
retag = (0,_TemplaterResult_class__WEBPACK_IMPORTED_MODULE_0__.renderWithSupport)(templater.tagSupport, subject.tag, // existing tag
|
|
1991
|
-
subject, ownerTag);
|
|
1992
|
-
if (retag.tagSupport.templater.global.newest != retag) {
|
|
1993
|
-
throw new Error('mismatch result newest');
|
|
1994
|
-
}
|
|
1995
|
-
templater.global.newest = retag;
|
|
1996
|
-
if (ownerTag.clones.length > preClones.length) {
|
|
1997
|
-
const myClones = ownerTag.clones.filter(fClone => !preClones.find(clone => clone === fClone));
|
|
1998
|
-
retag.clones.push(...myClones);
|
|
1999
|
-
}
|
|
2000
|
-
if (ownerTag.childTags.find(x => x === retag)) {
|
|
2001
|
-
throw new Error('about to reattach tag already present');
|
|
2002
|
-
}
|
|
2003
|
-
ownerTag.childTags.push(retag);
|
|
1957
|
+
retag = redrawSubjectComponent(templater, subject, retag, ownerTag, insertBefore);
|
|
2004
1958
|
}
|
|
2005
1959
|
(0,_processTagResult_function__WEBPACK_IMPORTED_MODULE_2__.processTagResult)(retag, subject, // The element set here will be removed from document. Also result.tag will be added in here
|
|
2006
|
-
|
|
1960
|
+
insertBefore, // <template end interpolate /> (will be removed)
|
|
2007
1961
|
options);
|
|
1962
|
+
return retag;
|
|
1963
|
+
}
|
|
1964
|
+
function redrawSubjectComponent(templater, subject, retag, ownerTag, insertBefore) {
|
|
1965
|
+
const preClones = ownerTag.clones.map(clone => clone);
|
|
1966
|
+
retag = (0,_TemplaterResult_class__WEBPACK_IMPORTED_MODULE_0__.renderWithSupport)(templater.tagSupport, subject.tag, // existing tag
|
|
1967
|
+
subject, ownerTag);
|
|
1968
|
+
if (retag.tagSupport.templater.global.newest != retag) {
|
|
1969
|
+
throw new Error('mismatch result newest');
|
|
1970
|
+
}
|
|
1971
|
+
templater.global.newest = retag;
|
|
1972
|
+
if (ownerTag.clones.length > preClones.length) {
|
|
1973
|
+
const myClones = ownerTag.clones.filter(fClone => !preClones.find(clone => clone === fClone));
|
|
1974
|
+
retag.clones.push(...myClones);
|
|
1975
|
+
if (myClones.find(x => x === insertBefore)) {
|
|
1976
|
+
throw new Error('way back here we add marker');
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
if (ownerTag.childTags.find(x => x === retag)) {
|
|
1980
|
+
throw new Error('about to reattach tag already present');
|
|
1981
|
+
}
|
|
1982
|
+
ownerTag.childTags.push(retag);
|
|
1983
|
+
return retag;
|
|
2008
1984
|
}
|
|
2009
1985
|
|
|
2010
1986
|
|
|
@@ -2018,17 +1994,13 @@ function processSubjectComponent(templater, subject, template, ownerTag, options
|
|
|
2018
1994
|
|
|
2019
1995
|
__webpack_require__.r(__webpack_exports__);
|
|
2020
1996
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2021
|
-
/* harmony export */
|
|
2022
|
-
/* harmony export */ processSubjectValue: () => (/* binding */ processSubjectValue),
|
|
2023
|
-
/* harmony export */ processTag: () => (/* binding */ processTag)
|
|
1997
|
+
/* harmony export */ processSubjectValue: () => (/* binding */ processSubjectValue)
|
|
2024
1998
|
/* harmony export */ });
|
|
2025
1999
|
/* harmony import */ var _processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./processSubjectComponent.function */ "./ts/processSubjectComponent.function.ts");
|
|
2026
2000
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
2027
2001
|
/* harmony import */ var _processTagArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./processTagArray */ "./ts/processTagArray.ts");
|
|
2028
|
-
/* harmony import */ var
|
|
2029
|
-
/* harmony import */ var
|
|
2030
|
-
/* harmony import */ var _processRegularValue_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./processRegularValue.function */ "./ts/processRegularValue.function.ts");
|
|
2031
|
-
|
|
2002
|
+
/* harmony import */ var _processRegularValue_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./processRegularValue.function */ "./ts/processRegularValue.function.ts");
|
|
2003
|
+
/* harmony import */ var _processTag_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./processTag.function */ "./ts/processTag.function.ts");
|
|
2032
2004
|
|
|
2033
2005
|
|
|
2034
2006
|
|
|
@@ -2054,29 +2026,49 @@ function getValueType(value) {
|
|
|
2054
2026
|
return ValueTypes.value;
|
|
2055
2027
|
}
|
|
2056
2028
|
function processSubjectValue(value, subject, // could be tag via result.tag
|
|
2057
|
-
|
|
2029
|
+
insertBefore, // <template end interpolate /> (will be removed)
|
|
2058
2030
|
ownerTag, // owner
|
|
2059
2031
|
options) {
|
|
2060
2032
|
const valueType = getValueType(value);
|
|
2061
2033
|
switch (valueType) {
|
|
2062
2034
|
case ValueTypes.tag:
|
|
2063
|
-
processTag(value, subject,
|
|
2035
|
+
(0,_processTag_function__WEBPACK_IMPORTED_MODULE_4__.processTag)(value, subject, insertBefore, ownerTag);
|
|
2064
2036
|
return;
|
|
2065
2037
|
case ValueTypes.tagArray:
|
|
2066
|
-
return (0,_processTagArray__WEBPACK_IMPORTED_MODULE_2__.processTagArray)(subject, value,
|
|
2038
|
+
return (0,_processTagArray__WEBPACK_IMPORTED_MODULE_2__.processTagArray)(subject, value, insertBefore, ownerTag, options);
|
|
2067
2039
|
case ValueTypes.tagComponent:
|
|
2068
|
-
(0,_processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_0__.processSubjectComponent)(value, subject,
|
|
2040
|
+
(0,_processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_0__.processSubjectComponent)(value, subject, insertBefore, ownerTag, options);
|
|
2069
2041
|
return;
|
|
2070
2042
|
}
|
|
2071
|
-
(0,
|
|
2043
|
+
(0,_processRegularValue_function__WEBPACK_IMPORTED_MODULE_3__.processRegularValue)(value, subject, insertBefore);
|
|
2072
2044
|
}
|
|
2045
|
+
|
|
2046
|
+
|
|
2047
|
+
/***/ }),
|
|
2048
|
+
|
|
2049
|
+
/***/ "./ts/processTag.function.ts":
|
|
2050
|
+
/*!***********************************!*\
|
|
2051
|
+
!*** ./ts/processTag.function.ts ***!
|
|
2052
|
+
\***********************************/
|
|
2053
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2054
|
+
|
|
2055
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2056
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2057
|
+
/* harmony export */ applyFakeTemplater: () => (/* binding */ applyFakeTemplater),
|
|
2058
|
+
/* harmony export */ processTag: () => (/* binding */ processTag)
|
|
2059
|
+
/* harmony export */ });
|
|
2060
|
+
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
2061
|
+
/* harmony import */ var _TagSupport_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TagSupport.class */ "./ts/TagSupport.class.ts");
|
|
2062
|
+
/* harmony import */ var _subject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subject */ "./ts/subject/index.ts");
|
|
2063
|
+
|
|
2064
|
+
|
|
2065
|
+
|
|
2073
2066
|
/** Could be a regular tag or a component. Both are Tag.class */
|
|
2074
2067
|
function processTag(tag, subject, // could be tag via result.tag
|
|
2075
|
-
insertBefore,
|
|
2076
|
-
ownerTag) {
|
|
2068
|
+
insertBefore, ownerTag) {
|
|
2077
2069
|
// first time seeing this tag?
|
|
2078
2070
|
if (!tag.tagSupport) {
|
|
2079
|
-
if (!(0,
|
|
2071
|
+
if (!(0,_isInstance__WEBPACK_IMPORTED_MODULE_0__.isTagInstance)(tag)) {
|
|
2080
2072
|
throw new Error('issue non-tag here');
|
|
2081
2073
|
}
|
|
2082
2074
|
applyFakeTemplater(tag, ownerTag, subject);
|
|
@@ -2086,10 +2078,12 @@ ownerTag) {
|
|
|
2086
2078
|
ownerTag.childTags.push(tag);
|
|
2087
2079
|
}
|
|
2088
2080
|
tag.ownerTag = ownerTag;
|
|
2089
|
-
|
|
2081
|
+
if (insertBefore.tagName !== 'TEMPLATE') {
|
|
2082
|
+
throw new Error(`processTag.function.ts - insertBefore is not TEMPLATE ${insertBefore.tagName}`);
|
|
2083
|
+
}
|
|
2090
2084
|
tag.buildBeforeElement(insertBefore, {
|
|
2091
2085
|
counts: { added: 0, removed: 0 },
|
|
2092
|
-
forceElement: true,
|
|
2086
|
+
forceElement: true,
|
|
2093
2087
|
});
|
|
2094
2088
|
}
|
|
2095
2089
|
function applyFakeTemplater(tag, ownerTag, subject) {
|
|
@@ -2097,7 +2091,7 @@ function applyFakeTemplater(tag, ownerTag, subject) {
|
|
|
2097
2091
|
throw new Error('no owner error');
|
|
2098
2092
|
}
|
|
2099
2093
|
const fakeTemplater = getFakeTemplater();
|
|
2100
|
-
tag.tagSupport = new
|
|
2094
|
+
tag.tagSupport = new _TagSupport_class__WEBPACK_IMPORTED_MODULE_1__.TagSupport(ownerTag.tagSupport, fakeTemplater, // the template is provided via html`` call
|
|
2101
2095
|
subject);
|
|
2102
2096
|
fakeTemplater.global.oldest = tag;
|
|
2103
2097
|
fakeTemplater.global.newest = tag;
|
|
@@ -2111,10 +2105,17 @@ function getFakeTemplater() {
|
|
|
2111
2105
|
renderCount: 0,
|
|
2112
2106
|
providers: [],
|
|
2113
2107
|
context: {},
|
|
2108
|
+
subscriptions: [],
|
|
2109
|
+
deleted: false,
|
|
2110
|
+
newestTemplater: {},
|
|
2114
2111
|
},
|
|
2115
|
-
children: new
|
|
2112
|
+
children: new _subject__WEBPACK_IMPORTED_MODULE_2__.ValueSubject([]), // no children
|
|
2116
2113
|
props: {},
|
|
2117
2114
|
isTag: true,
|
|
2115
|
+
isTemplater: false,
|
|
2116
|
+
tagged: false,
|
|
2117
|
+
wrapper: (() => undefined),
|
|
2118
|
+
tagSupport: {},
|
|
2118
2119
|
};
|
|
2119
2120
|
}
|
|
2120
2121
|
|
|
@@ -2131,20 +2132,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2131
2132
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2132
2133
|
/* harmony export */ processTagArray: () => (/* binding */ processTagArray)
|
|
2133
2134
|
/* harmony export */ });
|
|
2134
|
-
/* harmony import */ var
|
|
2135
|
+
/* harmony import */ var _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subject/ValueSubject */ "./ts/subject/ValueSubject.ts");
|
|
2135
2136
|
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./errors */ "./ts/errors.ts");
|
|
2136
2137
|
/* harmony import */ var _checkDestroyPrevious_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./checkDestroyPrevious.function */ "./ts/checkDestroyPrevious.function.ts");
|
|
2137
|
-
/* harmony import */ var
|
|
2138
|
+
/* harmony import */ var _processTag_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./processTag.function */ "./ts/processTag.function.ts");
|
|
2138
2139
|
|
|
2139
2140
|
|
|
2140
2141
|
|
|
2141
2142
|
|
|
2142
2143
|
function processTagArray(subject, value, // arry of Tag classes
|
|
2143
|
-
|
|
2144
|
+
insertBefore, // <template end interpolate />
|
|
2144
2145
|
ownerTag, options) {
|
|
2145
2146
|
const clones = ownerTag.clones; // []
|
|
2146
2147
|
let lastArray = subject.lastArray = subject.lastArray || [];
|
|
2147
|
-
subject.
|
|
2148
|
+
if (!subject.placeholder) {
|
|
2149
|
+
setPlaceholderElm(insertBefore, subject);
|
|
2150
|
+
}
|
|
2151
|
+
const runtimeInsertBefore = subject.placeholder; // || insertBefore
|
|
2148
2152
|
let removed = 0;
|
|
2149
2153
|
/** 🗑️ remove previous items first */
|
|
2150
2154
|
lastArray = subject.lastArray = subject.lastArray.filter((item, index) => {
|
|
@@ -2152,8 +2156,9 @@ ownerTag, options) {
|
|
|
2152
2156
|
const at = index - removed;
|
|
2153
2157
|
const lessLength = newLength < at;
|
|
2154
2158
|
const subTag = value[index - removed];
|
|
2155
|
-
const subArrayValue = subTag?.arrayValue;
|
|
2156
|
-
const
|
|
2159
|
+
const subArrayValue = subTag?.memory.arrayValue;
|
|
2160
|
+
const tag = item.tag;
|
|
2161
|
+
const destroyItem = lessLength || !areLikeValues(subArrayValue, tag.memory.arrayValue);
|
|
2157
2162
|
if (destroyItem) {
|
|
2158
2163
|
const last = lastArray[index];
|
|
2159
2164
|
const tag = last.tag;
|
|
@@ -2165,20 +2170,18 @@ ownerTag, options) {
|
|
|
2165
2170
|
}
|
|
2166
2171
|
return true;
|
|
2167
2172
|
});
|
|
2168
|
-
// const masterBefore = template || (template as any).clone
|
|
2169
|
-
const before = template || subject.value.insertBefore || template.clone;
|
|
2170
2173
|
value.forEach((subTag, index) => {
|
|
2171
2174
|
const previous = lastArray[index];
|
|
2172
2175
|
const previousSupport = previous?.tag.tagSupport;
|
|
2173
|
-
const fakeSubject = new
|
|
2174
|
-
(0,
|
|
2176
|
+
const fakeSubject = new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_0__.ValueSubject({});
|
|
2177
|
+
(0,_processTag_function__WEBPACK_IMPORTED_MODULE_3__.applyFakeTemplater)(subTag, ownerTag, fakeSubject);
|
|
2175
2178
|
if (previousSupport) {
|
|
2176
2179
|
subTag.tagSupport.templater.global = previousSupport.templater.global;
|
|
2177
2180
|
previousSupport.templater.global.newest = subTag;
|
|
2178
2181
|
}
|
|
2179
2182
|
// check for html``.key()
|
|
2180
|
-
const
|
|
2181
|
-
if (
|
|
2183
|
+
const keySet = 'arrayValue' in subTag.memory;
|
|
2184
|
+
if (!keySet) {
|
|
2182
2185
|
const details = {
|
|
2183
2186
|
template: subTag.getTemplate().string,
|
|
2184
2187
|
array: value,
|
|
@@ -2191,23 +2194,36 @@ ownerTag, options) {
|
|
|
2191
2194
|
}
|
|
2192
2195
|
const couldBeSame = lastArray.length > index;
|
|
2193
2196
|
if (couldBeSame) {
|
|
2194
|
-
const
|
|
2197
|
+
const prevSupport = previous.tag.tagSupport;
|
|
2198
|
+
const prevGlobal = prevSupport.templater.global;
|
|
2199
|
+
const isSame = areLikeValues(previous.tag.memory.arrayValue, subTag.memory.arrayValue);
|
|
2195
2200
|
if (isSame) {
|
|
2196
|
-
subTag.tagSupport = subTag.tagSupport ||
|
|
2197
|
-
const oldest =
|
|
2201
|
+
subTag.tagSupport = subTag.tagSupport || prevSupport;
|
|
2202
|
+
const oldest = prevGlobal.oldest;
|
|
2198
2203
|
oldest.updateByTag(subTag);
|
|
2199
2204
|
return [];
|
|
2200
2205
|
}
|
|
2201
|
-
|
|
2206
|
+
// TODO: should not get here?
|
|
2207
|
+
processAddTagArrayItem(runtimeInsertBefore, subTag, index, options, lastArray);
|
|
2202
2208
|
throw new Error('item should be back');
|
|
2203
2209
|
// return [] // removed: item should have been previously deleted and will be added back
|
|
2204
2210
|
}
|
|
2205
|
-
processAddTagArrayItem(
|
|
2211
|
+
processAddTagArrayItem(runtimeInsertBefore, subTag, index, options, lastArray);
|
|
2206
2212
|
ownerTag.childTags.push(subTag);
|
|
2207
2213
|
});
|
|
2208
2214
|
return clones;
|
|
2209
2215
|
}
|
|
2210
|
-
function
|
|
2216
|
+
function setPlaceholderElm(insertBefore, subject) {
|
|
2217
|
+
if (insertBefore.nodeName !== 'TEMPLATE') {
|
|
2218
|
+
subject.placeholder = insertBefore;
|
|
2219
|
+
return;
|
|
2220
|
+
}
|
|
2221
|
+
const placeholder = subject.placeholder = document.createTextNode('');
|
|
2222
|
+
const parentNode = insertBefore.parentNode;
|
|
2223
|
+
parentNode.insertBefore(placeholder, insertBefore);
|
|
2224
|
+
parentNode.removeChild(insertBefore);
|
|
2225
|
+
}
|
|
2226
|
+
function processAddTagArrayItem(before, subTag, index, options, lastArray) {
|
|
2211
2227
|
const lastValue = {
|
|
2212
2228
|
tag: subTag, index
|
|
2213
2229
|
};
|
|
@@ -2217,11 +2233,13 @@ function processAddTagArrayItem(before, subTag, index, options, lastArray, test)
|
|
|
2217
2233
|
added: options.counts.added + index,
|
|
2218
2234
|
removed: options.counts.removed,
|
|
2219
2235
|
};
|
|
2220
|
-
|
|
2221
|
-
if (!lastFirstChild.parentNode) {
|
|
2236
|
+
if (!before.parentNode) {
|
|
2222
2237
|
throw new Error('issue adding array item');
|
|
2223
2238
|
}
|
|
2224
|
-
|
|
2239
|
+
const newTempElm = document.createElement('template');
|
|
2240
|
+
before.parentNode.insertBefore(newTempElm, before);
|
|
2241
|
+
subTag.buildBeforeElement(newTempElm, // before,
|
|
2242
|
+
{ counts, forceElement: options.forceElement });
|
|
2225
2243
|
}
|
|
2226
2244
|
/** compare two values. If both values are arrays then the items will be compared */
|
|
2227
2245
|
function areLikeValues(valueA, valueB) {
|
|
@@ -2249,56 +2267,51 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2249
2267
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2250
2268
|
/* harmony export */ processTagResult: () => (/* binding */ processTagResult)
|
|
2251
2269
|
/* harmony export */ });
|
|
2252
|
-
/* harmony import */ var _destroyTag_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./destroyTag.function */ "./ts/destroyTag.function.ts");
|
|
2253
|
-
|
|
2254
2270
|
function processTagResult(tag, subject, // used for recording past and current value
|
|
2255
2271
|
insertBefore, // <template end interpolate />
|
|
2256
2272
|
{ counts, forceElement, }) {
|
|
2257
2273
|
if (!insertBefore.parentNode) {
|
|
2258
|
-
throw new Error(
|
|
2274
|
+
throw new Error(`before here processTagResult ${insertBefore.nodeName}`);
|
|
2259
2275
|
}
|
|
2260
2276
|
// *if appears we already have seen
|
|
2261
2277
|
const subjectTag = subject;
|
|
2262
2278
|
const existingTag = subjectTag.tag;
|
|
2263
2279
|
const previousTag = existingTag?.tagSupport.templater.global.oldest || undefined; // || tag.tagSupport.oldest // subjectTag.tag
|
|
2264
2280
|
const justUpdate = previousTag; // && !forceElement
|
|
2265
|
-
if (previousTag) {
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
const newTag = subject(previousTag.tagSupport);
|
|
2273
|
-
previousTag.updateByTag(newTag);
|
|
2274
|
-
if (!newTag.tagSupport.templater.global.oldest) {
|
|
2275
|
-
throw new Error('maybe 0');
|
|
2276
|
-
}
|
|
2277
|
-
subjectTag.tag = newTag;
|
|
2278
|
-
if (!newTag.hasLiveElements) {
|
|
2279
|
-
throw new Error('44444 - 2');
|
|
2280
|
-
}
|
|
2281
|
-
return;
|
|
2282
|
-
}
|
|
2283
|
-
previousTag.updateByTag(tag);
|
|
2284
|
-
if (!tag.tagSupport.templater.global.oldest) {
|
|
2285
|
-
throw new Error('maybe 1');
|
|
2286
|
-
}
|
|
2287
|
-
subjectTag.tag = tag;
|
|
2288
|
-
if (!tag.hasLiveElements) {
|
|
2289
|
-
throw new Error('44444 - 3');
|
|
2290
|
-
}
|
|
2291
|
-
return;
|
|
2292
|
-
}
|
|
2293
|
-
(0,_destroyTag_function__WEBPACK_IMPORTED_MODULE_0__.destroyTagMemory)(previousTag, subject);
|
|
2294
|
-
throw new Error('585 - think we never get here');
|
|
2281
|
+
if (previousTag && justUpdate) {
|
|
2282
|
+
/*
|
|
2283
|
+
const areLike = previousTag.isLikeTag(tag)
|
|
2284
|
+
|
|
2285
|
+
// are we just updating an if we already had?
|
|
2286
|
+
if(areLike) {
|
|
2287
|
+
return processTagResultUpdate(tag, subjectTag, previousTag)
|
|
2295
2288
|
}
|
|
2289
|
+
*/
|
|
2290
|
+
return processTagResultUpdate(tag, subjectTag, previousTag);
|
|
2291
|
+
}
|
|
2292
|
+
/*
|
|
2293
|
+
if(insertBefore.nodeName !== 'TEMPLATE') {
|
|
2294
|
+
throw new Error(`processTagResult.function.ts insertBefore is not template ${insertBefore.nodeName}`)
|
|
2296
2295
|
}
|
|
2296
|
+
*/
|
|
2297
2297
|
tag.buildBeforeElement(insertBefore, {
|
|
2298
2298
|
counts,
|
|
2299
|
-
forceElement,
|
|
2299
|
+
forceElement,
|
|
2300
2300
|
});
|
|
2301
2301
|
}
|
|
2302
|
+
function processTagResultUpdate(tag, subject, // used for recording past and current value
|
|
2303
|
+
previousTag) {
|
|
2304
|
+
// components
|
|
2305
|
+
if (subject instanceof Function) {
|
|
2306
|
+
const newTag = subject(previousTag.tagSupport);
|
|
2307
|
+
previousTag.updateByTag(newTag);
|
|
2308
|
+
subject.tag = newTag;
|
|
2309
|
+
return;
|
|
2310
|
+
}
|
|
2311
|
+
previousTag.updateByTag(tag);
|
|
2312
|
+
subject.tag = tag;
|
|
2313
|
+
return;
|
|
2314
|
+
}
|
|
2302
2315
|
|
|
2303
2316
|
|
|
2304
2317
|
/***/ }),
|
|
@@ -2513,7 +2526,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2513
2526
|
/** Returns true when rendering owner is not needed. Returns false when rendering owner should occur */
|
|
2514
2527
|
function renderExistingTag(oldestTag, // existing tag already there
|
|
2515
2528
|
newTemplater, tagSupport, subject) {
|
|
2516
|
-
|
|
2529
|
+
const tag = subject.tag;
|
|
2530
|
+
newTemplater.global = tag.tagSupport.templater.global;
|
|
2517
2531
|
if (!oldestTag.hasLiveElements) {
|
|
2518
2532
|
throw new Error('1080 - should have live elements');
|
|
2519
2533
|
}
|
|
@@ -2526,8 +2540,8 @@ newTemplater, tagSupport, subject) {
|
|
|
2526
2540
|
return latestTag;
|
|
2527
2541
|
}
|
|
2528
2542
|
const oldTemplater = tagSupport.templater || newTemplater;
|
|
2529
|
-
const
|
|
2530
|
-
subject, oldestTag.ownerTag);
|
|
2543
|
+
const toRedrawTag = subject.tag || oldTemplater.global.newest || oldTemplater.global.oldest; // hmmmmmm, why not newest?
|
|
2544
|
+
const redraw = (0,_TemplaterResult_class__WEBPACK_IMPORTED_MODULE_1__.renderWithSupport)(newTemplater.tagSupport, toRedrawTag, subject, oldestTag.ownerTag);
|
|
2531
2545
|
const oldest = tagSupport.templater.global.oldest || oldestTag;
|
|
2532
2546
|
redraw.tagSupport.templater.global.oldest = oldest;
|
|
2533
2547
|
if ((0,_isLikeTags_function__WEBPACK_IMPORTED_MODULE_2__.isLikeTags)(latestTag, redraw)) {
|
|
@@ -2895,6 +2909,263 @@ setUse.tagUse = tagUse;
|
|
|
2895
2909
|
setUse.memory = {};
|
|
2896
2910
|
|
|
2897
2911
|
|
|
2912
|
+
/***/ }),
|
|
2913
|
+
|
|
2914
|
+
/***/ "./ts/subject/Subject.class.ts":
|
|
2915
|
+
/*!*************************************!*\
|
|
2916
|
+
!*** ./ts/subject/Subject.class.ts ***!
|
|
2917
|
+
\*************************************/
|
|
2918
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2919
|
+
|
|
2920
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2921
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2922
|
+
/* harmony export */ Subject: () => (/* binding */ Subject)
|
|
2923
|
+
/* harmony export */ });
|
|
2924
|
+
class Subject {
|
|
2925
|
+
value;
|
|
2926
|
+
methods = [];
|
|
2927
|
+
isSubject = true;
|
|
2928
|
+
subscribers = [];
|
|
2929
|
+
subscribeWith;
|
|
2930
|
+
// unsubcount = 0 // 🔬 testing
|
|
2931
|
+
constructor(value) {
|
|
2932
|
+
this.value = value;
|
|
2933
|
+
}
|
|
2934
|
+
subscribe(callback) {
|
|
2935
|
+
// are we within a pipe?
|
|
2936
|
+
const subscribeWith = this.subscribeWith;
|
|
2937
|
+
if (subscribeWith) {
|
|
2938
|
+
// are we in a pipe?
|
|
2939
|
+
if (this.methods.length) {
|
|
2940
|
+
const orgCallback = callback;
|
|
2941
|
+
callback = (value, subscription) => {
|
|
2942
|
+
runPipedMethods(value, subscription, this.methods, lastValue => orgCallback(lastValue, subscription));
|
|
2943
|
+
};
|
|
2944
|
+
}
|
|
2945
|
+
return subscribeWith(callback);
|
|
2946
|
+
}
|
|
2947
|
+
this.subscribers.push(callback);
|
|
2948
|
+
SubjectClass.globalSubs.push(callback); // 🔬 testing
|
|
2949
|
+
const subscription = getSubscription(this, callback);
|
|
2950
|
+
return subscription;
|
|
2951
|
+
}
|
|
2952
|
+
set(value) {
|
|
2953
|
+
this.value = value;
|
|
2954
|
+
// Notify all subscribers with the new value
|
|
2955
|
+
this.subscribers.forEach((callback) => {
|
|
2956
|
+
callback.value = value;
|
|
2957
|
+
callback(value);
|
|
2958
|
+
});
|
|
2959
|
+
}
|
|
2960
|
+
next = this.set;
|
|
2961
|
+
toPromise() {
|
|
2962
|
+
return new Promise((res, rej) => {
|
|
2963
|
+
const subscription = this.subscribe(x => {
|
|
2964
|
+
subscription.unsubscribe();
|
|
2965
|
+
res(x);
|
|
2966
|
+
});
|
|
2967
|
+
});
|
|
2968
|
+
}
|
|
2969
|
+
pipe(...operations) {
|
|
2970
|
+
const subject = new Subject();
|
|
2971
|
+
subject.methods = operations;
|
|
2972
|
+
subject.subscribeWith = (x) => this.subscribe(x);
|
|
2973
|
+
return subject;
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2976
|
+
function removeSubFromArray(subscribers, callback) {
|
|
2977
|
+
const index = subscribers.indexOf(callback);
|
|
2978
|
+
if (index !== -1) {
|
|
2979
|
+
subscribers.splice(index, 1);
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
const SubjectClass = Subject;
|
|
2983
|
+
SubjectClass.globalSubs = []; // 🔬 for testing
|
|
2984
|
+
SubjectClass.globalSubCount$ = new Subject(); // for ease of debugging
|
|
2985
|
+
SubjectClass.globalSubCount$.set(0);
|
|
2986
|
+
function getSubscription(subject, callback) {
|
|
2987
|
+
const countSubject = SubjectClass.globalSubCount$;
|
|
2988
|
+
SubjectClass.globalSubCount$.set(countSubject.value + 1);
|
|
2989
|
+
const subscription = () => {
|
|
2990
|
+
subscription.unsubscribe();
|
|
2991
|
+
};
|
|
2992
|
+
subscription.subscriptions = [];
|
|
2993
|
+
// Return a function to unsubscribe from the BehaviorSubject
|
|
2994
|
+
subscription.unsubscribe = () => {
|
|
2995
|
+
removeSubFromArray(subject.subscribers, callback); // each will be called when update comes in
|
|
2996
|
+
removeSubFromArray(SubjectClass.globalSubs, callback); // 🔬 testing
|
|
2997
|
+
SubjectClass.globalSubCount$.set(countSubject.value - 1);
|
|
2998
|
+
// any double unsubscribes will be ignored
|
|
2999
|
+
subscription.unsubscribe = () => subscription;
|
|
3000
|
+
// unsubscribe from any combined subjects
|
|
3001
|
+
subscription.subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
3002
|
+
return subscription;
|
|
3003
|
+
};
|
|
3004
|
+
subscription.add = (sub) => {
|
|
3005
|
+
subscription.subscriptions.push(sub);
|
|
3006
|
+
return subscription;
|
|
3007
|
+
};
|
|
3008
|
+
return subscription;
|
|
3009
|
+
}
|
|
3010
|
+
function runPipedMethods(value, subscription, methods, onComplete) {
|
|
3011
|
+
const cloneMethods = [...methods];
|
|
3012
|
+
const firstMethod = cloneMethods.shift();
|
|
3013
|
+
const next = (newValue) => {
|
|
3014
|
+
if (cloneMethods.length) {
|
|
3015
|
+
return runPipedMethods(newValue, subscription, cloneMethods, onComplete);
|
|
3016
|
+
}
|
|
3017
|
+
onComplete(newValue);
|
|
3018
|
+
// return newValue = next
|
|
3019
|
+
};
|
|
3020
|
+
let handler = next;
|
|
3021
|
+
const setHandler = (x) => handler = x;
|
|
3022
|
+
const pipeUtils = { setHandler, next };
|
|
3023
|
+
const methodResponse = firstMethod(value, pipeUtils);
|
|
3024
|
+
handler(methodResponse);
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
|
|
3028
|
+
/***/ }),
|
|
3029
|
+
|
|
3030
|
+
/***/ "./ts/subject/ValueSubject.ts":
|
|
3031
|
+
/*!************************************!*\
|
|
3032
|
+
!*** ./ts/subject/ValueSubject.ts ***!
|
|
3033
|
+
\************************************/
|
|
3034
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3035
|
+
|
|
3036
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3037
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3038
|
+
/* harmony export */ ValueSubject: () => (/* binding */ ValueSubject)
|
|
3039
|
+
/* harmony export */ });
|
|
3040
|
+
/* harmony import */ var _Subject_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject.class */ "./ts/subject/Subject.class.ts");
|
|
3041
|
+
|
|
3042
|
+
class ValueSubject extends _Subject_class__WEBPACK_IMPORTED_MODULE_0__.Subject {
|
|
3043
|
+
value;
|
|
3044
|
+
constructor(value) {
|
|
3045
|
+
super(value);
|
|
3046
|
+
this.value = value;
|
|
3047
|
+
}
|
|
3048
|
+
subscribe(callback) {
|
|
3049
|
+
const subscription = super.subscribe(callback);
|
|
3050
|
+
// Call the callback immediately with the current value
|
|
3051
|
+
callback(this.value, subscription);
|
|
3052
|
+
return subscription;
|
|
3053
|
+
}
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
|
|
3057
|
+
/***/ }),
|
|
3058
|
+
|
|
3059
|
+
/***/ "./ts/subject/combineLatest.function.ts":
|
|
3060
|
+
/*!**********************************************!*\
|
|
3061
|
+
!*** ./ts/subject/combineLatest.function.ts ***!
|
|
3062
|
+
\**********************************************/
|
|
3063
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3064
|
+
|
|
3065
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3066
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3067
|
+
/* harmony export */ combineLatest: () => (/* binding */ combineLatest)
|
|
3068
|
+
/* harmony export */ });
|
|
3069
|
+
/* harmony import */ var _Subject_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject.class */ "./ts/subject/Subject.class.ts");
|
|
3070
|
+
|
|
3071
|
+
function combineLatest(subjects) {
|
|
3072
|
+
const output = new _Subject_class__WEBPACK_IMPORTED_MODULE_0__.Subject();
|
|
3073
|
+
const subscribe = (callback) => {
|
|
3074
|
+
const valuesSeen = [];
|
|
3075
|
+
const values = [];
|
|
3076
|
+
const setValue = (x, index) => {
|
|
3077
|
+
valuesSeen[index] = true;
|
|
3078
|
+
values[index] = x;
|
|
3079
|
+
if (valuesSeen.length === subjects.length && valuesSeen.every(x => x)) {
|
|
3080
|
+
callback(values, subscription);
|
|
3081
|
+
}
|
|
3082
|
+
};
|
|
3083
|
+
const clones = [...subjects];
|
|
3084
|
+
const firstSub = clones.shift();
|
|
3085
|
+
const subscription = firstSub.subscribe(x => setValue(x, 0));
|
|
3086
|
+
const subscriptions = clones.map((subject, index) => subject.subscribe(x => setValue(x, index + 1)));
|
|
3087
|
+
subscription.subscriptions = subscriptions;
|
|
3088
|
+
return subscription;
|
|
3089
|
+
};
|
|
3090
|
+
output.subscribeWith = subscribe;
|
|
3091
|
+
return output;
|
|
3092
|
+
}
|
|
3093
|
+
|
|
3094
|
+
|
|
3095
|
+
/***/ }),
|
|
3096
|
+
|
|
3097
|
+
/***/ "./ts/subject/index.ts":
|
|
3098
|
+
/*!*****************************!*\
|
|
3099
|
+
!*** ./ts/subject/index.ts ***!
|
|
3100
|
+
\*****************************/
|
|
3101
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3102
|
+
|
|
3103
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3104
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3105
|
+
/* harmony export */ Subject: () => (/* reexport safe */ _Subject_class__WEBPACK_IMPORTED_MODULE_0__.Subject),
|
|
3106
|
+
/* harmony export */ ValueSubject: () => (/* reexport safe */ _ValueSubject__WEBPACK_IMPORTED_MODULE_1__.ValueSubject),
|
|
3107
|
+
/* harmony export */ combineLatest: () => (/* reexport safe */ _combineLatest_function__WEBPACK_IMPORTED_MODULE_2__.combineLatest),
|
|
3108
|
+
/* harmony export */ willCallback: () => (/* reexport safe */ _will_functions__WEBPACK_IMPORTED_MODULE_3__.willCallback),
|
|
3109
|
+
/* harmony export */ willPromise: () => (/* reexport safe */ _will_functions__WEBPACK_IMPORTED_MODULE_3__.willPromise),
|
|
3110
|
+
/* harmony export */ willSubscribe: () => (/* reexport safe */ _will_functions__WEBPACK_IMPORTED_MODULE_3__.willSubscribe)
|
|
3111
|
+
/* harmony export */ });
|
|
3112
|
+
/* harmony import */ var _Subject_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Subject.class */ "./ts/subject/Subject.class.ts");
|
|
3113
|
+
/* harmony import */ var _ValueSubject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ValueSubject */ "./ts/subject/ValueSubject.ts");
|
|
3114
|
+
/* harmony import */ var _combineLatest_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./combineLatest.function */ "./ts/subject/combineLatest.function.ts");
|
|
3115
|
+
/* harmony import */ var _will_functions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./will.functions */ "./ts/subject/will.functions.ts");
|
|
3116
|
+
|
|
3117
|
+
|
|
3118
|
+
|
|
3119
|
+
|
|
3120
|
+
|
|
3121
|
+
|
|
3122
|
+
/***/ }),
|
|
3123
|
+
|
|
3124
|
+
/***/ "./ts/subject/will.functions.ts":
|
|
3125
|
+
/*!**************************************!*\
|
|
3126
|
+
!*** ./ts/subject/will.functions.ts ***!
|
|
3127
|
+
\**************************************/
|
|
3128
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3129
|
+
|
|
3130
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3131
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3132
|
+
/* harmony export */ willCallback: () => (/* binding */ willCallback),
|
|
3133
|
+
/* harmony export */ willPromise: () => (/* binding */ willPromise),
|
|
3134
|
+
/* harmony export */ willSubscribe: () => (/* binding */ willSubscribe)
|
|
3135
|
+
/* harmony export */ });
|
|
3136
|
+
function willCallback(callback) {
|
|
3137
|
+
return ((lastValue, utils) => {
|
|
3138
|
+
utils.setHandler(() => {
|
|
3139
|
+
return undefined;
|
|
3140
|
+
});
|
|
3141
|
+
callback(lastValue, utils.next);
|
|
3142
|
+
});
|
|
3143
|
+
}
|
|
3144
|
+
/** .pipe( promise((x) => Promise.resolve(44)) ) */
|
|
3145
|
+
function willPromise(callback) {
|
|
3146
|
+
return ((lastValue, utils) => {
|
|
3147
|
+
utils.setHandler(() => {
|
|
3148
|
+
return undefined;
|
|
3149
|
+
}); // do nothing on initial return
|
|
3150
|
+
const result = callback(lastValue);
|
|
3151
|
+
result.then(x => utils.next(x));
|
|
3152
|
+
});
|
|
3153
|
+
}
|
|
3154
|
+
/** .pipe( willSubscribe((x) => new ValueSubject(44)) ) */
|
|
3155
|
+
const willSubscribe = (callback) => {
|
|
3156
|
+
return ((lastValue, utils) => {
|
|
3157
|
+
utils.setHandler(() => {
|
|
3158
|
+
return undefined;
|
|
3159
|
+
}); // do nothing on initial return
|
|
3160
|
+
const result = callback(lastValue);
|
|
3161
|
+
const subscription = result.subscribe(x => {
|
|
3162
|
+
subscription.unsubscribe();
|
|
3163
|
+
utils.next(x);
|
|
3164
|
+
});
|
|
3165
|
+
});
|
|
3166
|
+
};
|
|
3167
|
+
|
|
3168
|
+
|
|
2898
3169
|
/***/ }),
|
|
2899
3170
|
|
|
2900
3171
|
/***/ "./ts/tag.ts":
|
|
@@ -2911,11 +3182,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2911
3182
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
2912
3183
|
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/setUse.function.ts");
|
|
2913
3184
|
/* harmony import */ var _TemplaterResult_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TemplaterResult.class */ "./ts/TemplaterResult.class.ts");
|
|
2914
|
-
/* harmony import */ var
|
|
2915
|
-
/* harmony import */ var
|
|
2916
|
-
/* harmony import */ var
|
|
2917
|
-
/* harmony import */ var
|
|
2918
|
-
/* harmony import */ var
|
|
3185
|
+
/* harmony import */ var _bindSubjectCallback_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bindSubjectCallback.function */ "./ts/bindSubjectCallback.function.ts");
|
|
3186
|
+
/* harmony import */ var _deepFunctions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./deepFunctions */ "./ts/deepFunctions.ts");
|
|
3187
|
+
/* harmony import */ var _TagSupport_class__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./TagSupport.class */ "./ts/TagSupport.class.ts");
|
|
3188
|
+
/* harmony import */ var _alterProps_function__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./alterProps.function */ "./ts/alterProps.function.ts");
|
|
3189
|
+
/* harmony import */ var _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./subject/ValueSubject */ "./ts/subject/ValueSubject.ts");
|
|
2919
3190
|
|
|
2920
3191
|
|
|
2921
3192
|
|
|
@@ -2956,15 +3227,15 @@ function kidsToTagArraySubject(children) {
|
|
|
2956
3227
|
}
|
|
2957
3228
|
const kidArray = children;
|
|
2958
3229
|
if ((0,_isInstance__WEBPACK_IMPORTED_MODULE_0__.isTagArray)(kidArray)) {
|
|
2959
|
-
return { childSubject: new
|
|
3230
|
+
return { childSubject: new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_7__.ValueSubject(children), madeSubject: true };
|
|
2960
3231
|
}
|
|
2961
3232
|
const kid = children;
|
|
2962
3233
|
if (kid) {
|
|
2963
|
-
kid.arrayValue = 0;
|
|
2964
|
-
return { childSubject: new
|
|
3234
|
+
kid.memory.arrayValue = 0;
|
|
3235
|
+
return { childSubject: new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_7__.ValueSubject([kid]), madeSubject: true };
|
|
2965
3236
|
}
|
|
2966
3237
|
return {
|
|
2967
|
-
childSubject: new
|
|
3238
|
+
childSubject: new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_7__.ValueSubject([]),
|
|
2968
3239
|
madeSubject: true
|
|
2969
3240
|
};
|
|
2970
3241
|
}
|
|
@@ -3003,12 +3274,12 @@ function getTagWrap(templater, madeSubject) {
|
|
|
3003
3274
|
if (oldLatest && !newestOwnerTemplater) {
|
|
3004
3275
|
throw new Error('what to do here?');
|
|
3005
3276
|
}
|
|
3006
|
-
let castedProps = (0,
|
|
3007
|
-
const clonedProps = (0,
|
|
3277
|
+
let castedProps = (0,_alterProps_function__WEBPACK_IMPORTED_MODULE_6__.alterProps)(props, newestOwnerTemplater, oldTagSetup.ownerTagSupport);
|
|
3278
|
+
const clonedProps = (0,_deepFunctions__WEBPACK_IMPORTED_MODULE_4__.deepClone)(props); // castedProps
|
|
3008
3279
|
// CALL ORIGINAL COMPONENT FUNCTION
|
|
3009
3280
|
const tag = originalFunction(castedProps, childSubject);
|
|
3010
3281
|
tag.version = global.renderCount;
|
|
3011
|
-
tag.tagSupport = new
|
|
3282
|
+
tag.tagSupport = new _TagSupport_class__WEBPACK_IMPORTED_MODULE_5__.TagSupport(oldTagSetup.ownerTagSupport, templater, subject);
|
|
3012
3283
|
tag.tagSupport.propsConfig = {
|
|
3013
3284
|
latest: props, // castedProps
|
|
3014
3285
|
latestCloned: clonedProps,
|
|
@@ -3029,7 +3300,7 @@ function getTagWrap(templater, madeSubject) {
|
|
|
3029
3300
|
// all functions need to report to me
|
|
3030
3301
|
kid.values[index] = function (...args) {
|
|
3031
3302
|
const ownerTag = tag.ownerTag;
|
|
3032
|
-
(0,
|
|
3303
|
+
(0,_bindSubjectCallback_function__WEBPACK_IMPORTED_MODULE_3__.runTagCallback)(value, // callback
|
|
3033
3304
|
ownerTag, this, // bindTo
|
|
3034
3305
|
args);
|
|
3035
3306
|
};
|
|
@@ -3058,7 +3329,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3058
3329
|
/* harmony export */ });
|
|
3059
3330
|
/* harmony import */ var _TagSupport_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TagSupport.class */ "./ts/TagSupport.class.ts");
|
|
3060
3331
|
/* harmony import */ var _tagRunner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./tagRunner */ "./ts/tagRunner.ts");
|
|
3061
|
-
/* harmony import */ var
|
|
3332
|
+
/* harmony import */ var _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./subject/ValueSubject */ "./ts/subject/ValueSubject.ts");
|
|
3062
3333
|
|
|
3063
3334
|
|
|
3064
3335
|
|
|
@@ -3096,7 +3367,7 @@ element, props) {
|
|
|
3096
3367
|
return { tag, tags: app.original.tags };
|
|
3097
3368
|
}
|
|
3098
3369
|
function applyTagUpdater(wrapper) {
|
|
3099
|
-
const subject = new
|
|
3370
|
+
const subject = new _subject_ValueSubject__WEBPACK_IMPORTED_MODULE_2__.ValueSubject({});
|
|
3100
3371
|
const tagSupport = new _TagSupport_class__WEBPACK_IMPORTED_MODULE_0__.BaseTagSupport(wrapper, subject);
|
|
3101
3372
|
wrapper.tagSupport = tagSupport;
|
|
3102
3373
|
(0,_tagRunner__WEBPACK_IMPORTED_MODULE_1__.runBeforeRender)(tagSupport, undefined);
|
|
@@ -3145,6 +3416,35 @@ function runBeforeDestroy(tagSupport, tag) {
|
|
|
3145
3416
|
}
|
|
3146
3417
|
|
|
3147
3418
|
|
|
3419
|
+
/***/ }),
|
|
3420
|
+
|
|
3421
|
+
/***/ "./ts/updateBeforeTemplate.function.ts":
|
|
3422
|
+
/*!*********************************************!*\
|
|
3423
|
+
!*** ./ts/updateBeforeTemplate.function.ts ***!
|
|
3424
|
+
\*********************************************/
|
|
3425
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3426
|
+
|
|
3427
|
+
__webpack_require__.r(__webpack_exports__);
|
|
3428
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3429
|
+
/* harmony export */ updateBeforeTemplate: () => (/* binding */ updateBeforeTemplate)
|
|
3430
|
+
/* harmony export */ });
|
|
3431
|
+
// Function to update the value of x
|
|
3432
|
+
function updateBeforeTemplate(value, lastFirstChild) {
|
|
3433
|
+
const parent = lastFirstChild.parentNode;
|
|
3434
|
+
let castedValue = value;
|
|
3435
|
+
// mimic React skipping to display EXCEPT for true does display on page
|
|
3436
|
+
if ([undefined, false, null].includes(value)) { // || value === true
|
|
3437
|
+
castedValue = '';
|
|
3438
|
+
}
|
|
3439
|
+
// Insert the new value (never use innerHTML here)
|
|
3440
|
+
const textNode = document.createTextNode(castedValue); // never innerHTML
|
|
3441
|
+
parent.insertBefore(textNode, lastFirstChild);
|
|
3442
|
+
/* remove existing nodes */
|
|
3443
|
+
parent.removeChild(lastFirstChild);
|
|
3444
|
+
return textNode;
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
|
|
3148
3448
|
/***/ }),
|
|
3149
3449
|
|
|
3150
3450
|
/***/ "./ts/updateExistingTagComponent.function.ts":
|
|
@@ -3161,23 +3461,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3161
3461
|
/* harmony import */ var _processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./processSubjectComponent.function */ "./ts/processSubjectComponent.function.ts");
|
|
3162
3462
|
/* harmony import */ var _destroyTag_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./destroyTag.function */ "./ts/destroyTag.function.ts");
|
|
3163
3463
|
/* harmony import */ var _renderTagSupport_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./renderTagSupport.function */ "./ts/renderTagSupport.function.ts");
|
|
3464
|
+
/* harmony import */ var _alterProps_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./alterProps.function */ "./ts/alterProps.function.ts");
|
|
3465
|
+
|
|
3164
3466
|
|
|
3165
3467
|
|
|
3166
3468
|
|
|
3167
3469
|
|
|
3168
3470
|
function updateExistingTagComponent(ownerTag, templater, subject, insertBefore) {
|
|
3169
3471
|
let existingTag = subject.tag;
|
|
3170
|
-
/*
|
|
3171
|
-
if(existingTag && !existingTag.hasLiveElements) {
|
|
3172
|
-
throw new Error('issue already began')
|
|
3173
|
-
}
|
|
3174
|
-
*/
|
|
3175
3472
|
const oldWrapper = existingTag.tagSupport.templater.wrapper;
|
|
3176
3473
|
const newWrapper = templater.wrapper;
|
|
3177
3474
|
let isSameTag = false;
|
|
3178
|
-
if (templater.global.oldest && !templater.global.oldest.hasLiveElements) {
|
|
3179
|
-
throw new Error('88893434');
|
|
3180
|
-
}
|
|
3181
3475
|
if (oldWrapper && newWrapper) {
|
|
3182
3476
|
const oldFunction = oldWrapper.original;
|
|
3183
3477
|
const newFunction = newWrapper.original;
|
|
@@ -3186,23 +3480,35 @@ function updateExistingTagComponent(ownerTag, templater, subject, insertBefore)
|
|
|
3186
3480
|
const oldTagSupport = existingTag.tagSupport;
|
|
3187
3481
|
const oldGlobal = oldTagSupport.templater.global;
|
|
3188
3482
|
const globalInsert = oldGlobal.insertBefore;
|
|
3189
|
-
const
|
|
3190
|
-
|
|
3191
|
-
|
|
3483
|
+
// const placeholderElm = ownerTag.tagSupport.templater.global.placeholderElm
|
|
3484
|
+
const placeholderElm = oldGlobal.placeholder;
|
|
3485
|
+
if (placeholderElm) {
|
|
3486
|
+
if (!placeholderElm.parentNode) {
|
|
3487
|
+
throw new Error('stop here no subject parent node update existing tag');
|
|
3488
|
+
}
|
|
3192
3489
|
}
|
|
3193
3490
|
if (!isSameTag) {
|
|
3194
3491
|
(0,_destroyTag_function__WEBPACK_IMPORTED_MODULE_2__.destroyTagMemory)(oldTagSupport.templater.global.oldest, subject);
|
|
3195
|
-
(0,_processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_1__.processSubjectComponent)(templater, subject,
|
|
3492
|
+
return (0,_processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_1__.processSubjectComponent)(templater, subject,
|
|
3493
|
+
// ??? - newly changed
|
|
3494
|
+
insertBefore, // oldInsertBefore,
|
|
3495
|
+
ownerTag, {
|
|
3196
3496
|
forceElement: false,
|
|
3197
3497
|
counts: { added: 0, removed: 0 },
|
|
3198
3498
|
});
|
|
3199
|
-
return;
|
|
3200
3499
|
}
|
|
3201
3500
|
else {
|
|
3202
3501
|
const newTagSupport = templater.tagSupport;
|
|
3203
3502
|
const hasChanged = (0,_hasTagSupportChanged_function__WEBPACK_IMPORTED_MODULE_0__.hasTagSupportChanged)(oldTagSupport, newTagSupport, templater);
|
|
3204
3503
|
if (!hasChanged) {
|
|
3205
|
-
|
|
3504
|
+
// if the new props are an object then implicitly since no change, the old props are an object
|
|
3505
|
+
const newProps = templater.props;
|
|
3506
|
+
if (newProps && typeof (newProps) === 'object') {
|
|
3507
|
+
// const newestTag = oldTagSupport.templater.global.newest
|
|
3508
|
+
// const oldProps = existingTag.tagSupport.propsConfig.latestCloned as Record<string,any> // newestTag.props as Record<string, any>
|
|
3509
|
+
syncFunctionProps(templater, existingTag, ownerTag, newProps);
|
|
3510
|
+
}
|
|
3511
|
+
return existingTag; // its the same tag component
|
|
3206
3512
|
}
|
|
3207
3513
|
}
|
|
3208
3514
|
const oldestTag = templater.global.oldest; // oldTagSupport.oldest as Tag // existingTag
|
|
@@ -3215,7 +3521,10 @@ function updateExistingTagComponent(ownerTag, templater, subject, insertBefore)
|
|
|
3215
3521
|
const newOldest = newTag.tagSupport.templater.global.oldest;
|
|
3216
3522
|
const hasOldest = newOldest ? true : false;
|
|
3217
3523
|
if (!hasOldest) {
|
|
3218
|
-
return buildNewTag(newTag,
|
|
3524
|
+
return buildNewTag(newTag,
|
|
3525
|
+
// ??? newly changed
|
|
3526
|
+
insertBefore, // oldInsertBefore,
|
|
3527
|
+
oldTagSupport, subject);
|
|
3219
3528
|
}
|
|
3220
3529
|
if (newOldest && templater.children.value.length) {
|
|
3221
3530
|
const oldKidsSub = newOldest.tagSupport.templater.children;
|
|
@@ -3237,7 +3546,7 @@ function updateExistingTagComponent(ownerTag, templater, subject, insertBefore)
|
|
|
3237
3546
|
}
|
|
3238
3547
|
subject.tag = newTag;
|
|
3239
3548
|
oldestTag.updateByTag(newTag); // the oldest tag has element references
|
|
3240
|
-
return;
|
|
3549
|
+
return newTag;
|
|
3241
3550
|
}
|
|
3242
3551
|
else {
|
|
3243
3552
|
// Although function looked the same it returned a different html result
|
|
@@ -3251,7 +3560,7 @@ function updateExistingTagComponent(ownerTag, templater, subject, insertBefore)
|
|
|
3251
3560
|
buildNewTag(newTag, oldTagSupport.templater.global.insertBefore, oldTagSupport, subject);
|
|
3252
3561
|
}
|
|
3253
3562
|
oldTagSupport.templater.global.newest = newTag;
|
|
3254
|
-
return;
|
|
3563
|
+
return newTag;
|
|
3255
3564
|
}
|
|
3256
3565
|
function checkStateChanged(state) {
|
|
3257
3566
|
return !state.newest.every(state => {
|
|
@@ -3267,20 +3576,39 @@ function checkStateChanged(state) {
|
|
|
3267
3576
|
function buildNewTag(newTag, oldInsertBefore, oldTagSupport, subject) {
|
|
3268
3577
|
newTag.buildBeforeElement(oldInsertBefore, {
|
|
3269
3578
|
forceElement: true,
|
|
3270
|
-
counts: { added: 0, removed: 0 },
|
|
3579
|
+
counts: { added: 0, removed: 0 },
|
|
3271
3580
|
});
|
|
3272
3581
|
newTag.tagSupport.templater.global.oldest = newTag;
|
|
3273
3582
|
newTag.tagSupport.templater.global.newest = newTag;
|
|
3274
3583
|
oldTagSupport.templater.global.oldest = newTag;
|
|
3275
3584
|
oldTagSupport.templater.global.newest = newTag;
|
|
3276
|
-
if (!newTag.tagSupport.templater.global.oldest) {
|
|
3277
|
-
throw new Error('maybe 5');
|
|
3278
|
-
}
|
|
3279
3585
|
subject.tag = newTag;
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3586
|
+
return newTag;
|
|
3587
|
+
}
|
|
3588
|
+
function syncFunctionProps(templater, existingTag, ownerTag, newProps) {
|
|
3589
|
+
existingTag = existingTag.tagSupport.templater.global.newest;
|
|
3590
|
+
// const templater = existingTag.tagSupport.templater
|
|
3591
|
+
const priorProps = existingTag.tagSupport.propsConfig.latestCloned;
|
|
3592
|
+
const oldLatest = ownerTag.tagSupport.templater.global.newest;
|
|
3593
|
+
const ownerSupport = oldLatest.tagSupport;
|
|
3594
|
+
Object.entries(priorProps).forEach(([name, value]) => {
|
|
3595
|
+
if (!(value instanceof Function)) {
|
|
3596
|
+
return;
|
|
3597
|
+
}
|
|
3598
|
+
const newOriginal = value.original;
|
|
3599
|
+
// TODO: The code below maybe irrelevant
|
|
3600
|
+
const newCallback = newProps[name];
|
|
3601
|
+
const original = newCallback.original;
|
|
3602
|
+
if (original) {
|
|
3603
|
+
return; // already previously converted
|
|
3604
|
+
}
|
|
3605
|
+
// Currently, call self but over parent state changes, I may need to call a newer parent tag owner
|
|
3606
|
+
priorProps[name].toCall = (...args) => {
|
|
3607
|
+
return (0,_alterProps_function__WEBPACK_IMPORTED_MODULE_4__.callbackPropOwner)(newCallback, // value, // newOriginal,
|
|
3608
|
+
args, templater, ownerSupport);
|
|
3609
|
+
};
|
|
3610
|
+
return;
|
|
3611
|
+
});
|
|
3284
3612
|
}
|
|
3285
3613
|
|
|
3286
3614
|
|
|
@@ -3298,14 +3626,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3298
3626
|
/* harmony export */ });
|
|
3299
3627
|
/* harmony import */ var _TagSupport_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TagSupport.class */ "./ts/TagSupport.class.ts");
|
|
3300
3628
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
3301
|
-
/* harmony import */ var
|
|
3302
|
-
/* harmony import */ var
|
|
3303
|
-
/* harmony import */ var
|
|
3304
|
-
/* harmony import */ var
|
|
3305
|
-
/* harmony import */ var
|
|
3306
|
-
/* harmony import */ var
|
|
3307
|
-
/* harmony import */ var
|
|
3308
|
-
/* harmony import */ var
|
|
3629
|
+
/* harmony import */ var _processTagArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./processTagArray */ "./ts/processTagArray.ts");
|
|
3630
|
+
/* harmony import */ var _updateExistingTagComponent_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./updateExistingTagComponent.function */ "./ts/updateExistingTagComponent.function.ts");
|
|
3631
|
+
/* harmony import */ var _processRegularValue_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./processRegularValue.function */ "./ts/processRegularValue.function.ts");
|
|
3632
|
+
/* harmony import */ var _checkDestroyPrevious_function__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./checkDestroyPrevious.function */ "./ts/checkDestroyPrevious.function.ts");
|
|
3633
|
+
/* harmony import */ var _processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./processSubjectComponent.function */ "./ts/processSubjectComponent.function.ts");
|
|
3634
|
+
/* harmony import */ var _isLikeTags_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./isLikeTags.function */ "./ts/isLikeTags.function.ts");
|
|
3635
|
+
/* harmony import */ var _bindSubjectCallback_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./bindSubjectCallback.function */ "./ts/bindSubjectCallback.function.ts");
|
|
3636
|
+
/* harmony import */ var _processTag_function__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./processTag.function */ "./ts/processTag.function.ts");
|
|
3309
3637
|
|
|
3310
3638
|
|
|
3311
3639
|
|
|
@@ -3319,14 +3647,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3319
3647
|
function updateExistingValue(subject, value, ownerTag, insertBefore) {
|
|
3320
3648
|
const subjectTag = subject;
|
|
3321
3649
|
const isComponent = (0,_isInstance__WEBPACK_IMPORTED_MODULE_1__.isTagComponent)(value);
|
|
3322
|
-
|
|
3323
|
-
(0,_checkDestroyPrevious_function__WEBPACK_IMPORTED_MODULE_6__.checkDestroyPrevious)(subject, value);
|
|
3650
|
+
(0,_checkDestroyPrevious_function__WEBPACK_IMPORTED_MODULE_5__.checkDestroyPrevious)(subject, value, insertBefore);
|
|
3324
3651
|
// handle already seen tag components
|
|
3325
3652
|
if (isComponent) {
|
|
3326
3653
|
const templater = value;
|
|
3327
3654
|
// When was something before component
|
|
3328
3655
|
if (!subjectTag.tag) {
|
|
3329
|
-
(0,
|
|
3656
|
+
(0,_processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_6__.processSubjectComponent)(templater, subjectTag, insertBefore, // oldInsertBefore as InsertBefore,
|
|
3657
|
+
ownerTag, {
|
|
3330
3658
|
forceElement: true,
|
|
3331
3659
|
counts: { added: 0, removed: 0 },
|
|
3332
3660
|
});
|
|
@@ -3335,7 +3663,7 @@ function updateExistingValue(subject, value, ownerTag, insertBefore) {
|
|
|
3335
3663
|
templater.tagSupport = new _TagSupport_class__WEBPACK_IMPORTED_MODULE_0__.TagSupport(
|
|
3336
3664
|
// subjectTag.tag.tagSupport.ownerTagSupport,
|
|
3337
3665
|
ownerTag.tagSupport, templater, subjectTag);
|
|
3338
|
-
(0,
|
|
3666
|
+
(0,_updateExistingTagComponent_function__WEBPACK_IMPORTED_MODULE_3__.updateExistingTagComponent)(ownerTag, templater, // latest value
|
|
3339
3667
|
subjectTag, insertBefore);
|
|
3340
3668
|
return subjectTag;
|
|
3341
3669
|
}
|
|
@@ -3347,7 +3675,8 @@ function updateExistingValue(subject, value, ownerTag, insertBefore) {
|
|
|
3347
3675
|
}
|
|
3348
3676
|
// its another tag array
|
|
3349
3677
|
if ((0,_isInstance__WEBPACK_IMPORTED_MODULE_1__.isTagArray)(value)) {
|
|
3350
|
-
(0,
|
|
3678
|
+
(0,_processTagArray__WEBPACK_IMPORTED_MODULE_2__.processTagArray)(subject, value, insertBefore, // oldInsertBefore as InsertBefore,
|
|
3679
|
+
ownerTag, { counts: {
|
|
3351
3680
|
added: 0,
|
|
3352
3681
|
removed: 0,
|
|
3353
3682
|
} });
|
|
@@ -3356,13 +3685,15 @@ function updateExistingValue(subject, value, ownerTag, insertBefore) {
|
|
|
3356
3685
|
// now its a function
|
|
3357
3686
|
if (value instanceof Function) {
|
|
3358
3687
|
// const newSubject = getSubjectFunction(value, ownerTag)
|
|
3359
|
-
const bound = (0,
|
|
3688
|
+
const bound = (0,_bindSubjectCallback_function__WEBPACK_IMPORTED_MODULE_8__.bindSubjectCallback)(value, ownerTag);
|
|
3360
3689
|
subject.set(bound);
|
|
3361
3690
|
return subject;
|
|
3362
3691
|
}
|
|
3363
3692
|
if ((0,_isInstance__WEBPACK_IMPORTED_MODULE_1__.isTagInstance)(value)) {
|
|
3364
|
-
|
|
3365
|
-
|
|
3693
|
+
if (insertBefore.nodeName !== 'TEMPLATE') {
|
|
3694
|
+
throw new Error(`expected template - ${insertBefore.nodeName}`);
|
|
3695
|
+
}
|
|
3696
|
+
(0,_processTag_function__WEBPACK_IMPORTED_MODULE_9__.processTag)(value, subjectTag, insertBefore, ownerTag);
|
|
3366
3697
|
return subjectTag;
|
|
3367
3698
|
}
|
|
3368
3699
|
// we have been given a subject
|
|
@@ -3370,25 +3701,31 @@ function updateExistingValue(subject, value, ownerTag, insertBefore) {
|
|
|
3370
3701
|
return value;
|
|
3371
3702
|
}
|
|
3372
3703
|
// This will cause all other values to render
|
|
3373
|
-
(0,
|
|
3704
|
+
(0,_processRegularValue_function__WEBPACK_IMPORTED_MODULE_4__.processRegularValue)(value, subject,
|
|
3705
|
+
// ??? - changed to insertBefore for tag switching with template removal
|
|
3706
|
+
insertBefore // oldInsertBefore as InsertBefore,
|
|
3707
|
+
);
|
|
3374
3708
|
return subjectTag;
|
|
3375
3709
|
}
|
|
3376
3710
|
function handleStillTag(existingTag, subject, value, ownerTag) {
|
|
3377
3711
|
// TODO: We shouldn't need both of these
|
|
3378
|
-
const isSameTag = value && (0,
|
|
3712
|
+
const isSameTag = value && (0,_isLikeTags_function__WEBPACK_IMPORTED_MODULE_7__.isLikeTags)(existingTag, value);
|
|
3379
3713
|
const isSameTag2 = value && value.getTemplate && existingTag.isLikeTag(value);
|
|
3380
3714
|
const tag = value;
|
|
3381
3715
|
if (!tag.tagSupport) {
|
|
3382
|
-
(0,
|
|
3716
|
+
(0,_processTag_function__WEBPACK_IMPORTED_MODULE_9__.applyFakeTemplater)(tag, ownerTag, subject);
|
|
3383
3717
|
}
|
|
3384
3718
|
if (isSameTag) {
|
|
3385
3719
|
existingTag.updateByTag(tag);
|
|
3386
3720
|
return;
|
|
3387
3721
|
}
|
|
3388
3722
|
if (isSameTag || isSameTag2) {
|
|
3389
|
-
|
|
3723
|
+
const subjectTag = subject;
|
|
3724
|
+
const global = existingTag.tagSupport.templater.global;
|
|
3725
|
+
const insertBefore = global.insertBefore;
|
|
3726
|
+
return (0,_processTag_function__WEBPACK_IMPORTED_MODULE_9__.processTag)(value, subjectTag, insertBefore, ownerTag);
|
|
3390
3727
|
}
|
|
3391
|
-
return (0,
|
|
3728
|
+
return (0,_processRegularValue_function__WEBPACK_IMPORTED_MODULE_4__.processRegularValue)(value, subject, subject.insertBefore);
|
|
3392
3729
|
}
|
|
3393
3730
|
|
|
3394
3731
|
|
|
@@ -3493,56 +3830,59 @@ var __webpack_exports__ = {};
|
|
|
3493
3830
|
__webpack_require__.r(__webpack_exports__);
|
|
3494
3831
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3495
3832
|
/* harmony export */ ArrayNoKeyError: () => (/* reexport safe */ _errors__WEBPACK_IMPORTED_MODULE_4__.ArrayNoKeyError),
|
|
3496
|
-
/* harmony export */ BaseTagSupport: () => (/* reexport safe */
|
|
3833
|
+
/* harmony export */ BaseTagSupport: () => (/* reexport safe */ _TagSupport_class__WEBPACK_IMPORTED_MODULE_8__.BaseTagSupport),
|
|
3497
3834
|
/* harmony export */ StateMismatchError: () => (/* reexport safe */ _errors__WEBPACK_IMPORTED_MODULE_4__.StateMismatchError),
|
|
3498
|
-
/* harmony export */ Subject: () => (/* reexport safe */
|
|
3499
|
-
/* harmony export */ Tag: () => (/* reexport safe */
|
|
3835
|
+
/* harmony export */ Subject: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.Subject),
|
|
3836
|
+
/* harmony export */ Tag: () => (/* reexport safe */ _Tag_class__WEBPACK_IMPORTED_MODULE_10__.Tag),
|
|
3500
3837
|
/* harmony export */ TagError: () => (/* reexport safe */ _errors__WEBPACK_IMPORTED_MODULE_4__.TagError),
|
|
3501
|
-
/* harmony export */ TagSupport: () => (/* reexport safe */
|
|
3502
|
-
/* harmony export */ ValueSubject: () => (/* reexport safe */
|
|
3503
|
-
/* harmony export */
|
|
3838
|
+
/* harmony export */ TagSupport: () => (/* reexport safe */ _TagSupport_class__WEBPACK_IMPORTED_MODULE_8__.TagSupport),
|
|
3839
|
+
/* harmony export */ ValueSubject: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.ValueSubject),
|
|
3840
|
+
/* harmony export */ combineLatest: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.combineLatest),
|
|
3841
|
+
/* harmony export */ getCallback: () => (/* reexport safe */ _getCallback__WEBPACK_IMPORTED_MODULE_19__.getCallback),
|
|
3504
3842
|
/* harmony export */ hmr: () => (/* binding */ hmr),
|
|
3505
3843
|
/* harmony export */ html: () => (/* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_3__.html),
|
|
3506
|
-
/* harmony export */ interpolateElement: () => (/* reexport safe */
|
|
3507
|
-
/* harmony export */ interpolateString: () => (/* reexport safe */
|
|
3844
|
+
/* harmony export */ interpolateElement: () => (/* reexport safe */ _interpolateElement__WEBPACK_IMPORTED_MODULE_9__.interpolateElement),
|
|
3845
|
+
/* harmony export */ interpolateString: () => (/* reexport safe */ _interpolateElement__WEBPACK_IMPORTED_MODULE_9__.interpolateString),
|
|
3508
3846
|
/* harmony export */ isSubjectInstance: () => (/* reexport safe */ _isInstance__WEBPACK_IMPORTED_MODULE_6__.isSubjectInstance),
|
|
3509
3847
|
/* harmony export */ isTagArray: () => (/* reexport safe */ _isInstance__WEBPACK_IMPORTED_MODULE_6__.isTagArray),
|
|
3510
3848
|
/* harmony export */ isTagComponent: () => (/* reexport safe */ _isInstance__WEBPACK_IMPORTED_MODULE_6__.isTagComponent),
|
|
3511
3849
|
/* harmony export */ isTagInstance: () => (/* reexport safe */ _isInstance__WEBPACK_IMPORTED_MODULE_6__.isTagInstance),
|
|
3512
|
-
/* harmony export */ onDestroy: () => (/* reexport safe */
|
|
3513
|
-
/* harmony export */ onInit: () => (/* reexport safe */
|
|
3514
|
-
/* harmony export */ providers: () => (/* reexport safe */
|
|
3515
|
-
/* harmony export */ runBeforeRender: () => (/* reexport safe */
|
|
3516
|
-
/* harmony export */ set: () => (/* reexport safe */
|
|
3517
|
-
/* harmony export */ setLet: () => (/* reexport safe */
|
|
3518
|
-
/* harmony export */ setProp: () => (/* reexport safe */
|
|
3519
|
-
/* harmony export */ setUse: () => (/* reexport safe */
|
|
3850
|
+
/* harmony export */ onDestroy: () => (/* reexport safe */ _onDestroy__WEBPACK_IMPORTED_MODULE_18__.onDestroy),
|
|
3851
|
+
/* harmony export */ onInit: () => (/* reexport safe */ _onInit__WEBPACK_IMPORTED_MODULE_17__.onInit),
|
|
3852
|
+
/* harmony export */ providers: () => (/* reexport safe */ _providers__WEBPACK_IMPORTED_MODULE_13__.providers),
|
|
3853
|
+
/* harmony export */ runBeforeRender: () => (/* reexport safe */ _tagRunner__WEBPACK_IMPORTED_MODULE_11__.runBeforeRender),
|
|
3854
|
+
/* harmony export */ set: () => (/* reexport safe */ _set_function__WEBPACK_IMPORTED_MODULE_14__.set),
|
|
3855
|
+
/* harmony export */ setLet: () => (/* reexport safe */ _setLet_function__WEBPACK_IMPORTED_MODULE_15__.setLet),
|
|
3856
|
+
/* harmony export */ setProp: () => (/* reexport safe */ _setProp_function__WEBPACK_IMPORTED_MODULE_16__.setProp),
|
|
3857
|
+
/* harmony export */ setUse: () => (/* reexport safe */ _setUse_function__WEBPACK_IMPORTED_MODULE_12__.setUse),
|
|
3520
3858
|
/* harmony export */ tag: () => (/* reexport safe */ _tag__WEBPACK_IMPORTED_MODULE_2__.tag),
|
|
3521
3859
|
/* harmony export */ tagElement: () => (/* reexport safe */ _tagElement__WEBPACK_IMPORTED_MODULE_0__.tagElement),
|
|
3522
3860
|
/* harmony export */ tags: () => (/* reexport safe */ _tag__WEBPACK_IMPORTED_MODULE_2__.tags),
|
|
3523
|
-
/* harmony export */ watch: () => (/* reexport safe */
|
|
3861
|
+
/* harmony export */ watch: () => (/* reexport safe */ _watch_function__WEBPACK_IMPORTED_MODULE_7__.watch),
|
|
3862
|
+
/* harmony export */ willCallback: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.willCallback),
|
|
3863
|
+
/* harmony export */ willPromise: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.willPromise),
|
|
3864
|
+
/* harmony export */ willSubscribe: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.willSubscribe)
|
|
3524
3865
|
/* harmony export */ });
|
|
3525
3866
|
/* harmony import */ var _tagElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tagElement */ "./ts/tagElement.ts");
|
|
3526
3867
|
/* harmony import */ var _ElementTargetEvent_interface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ElementTargetEvent.interface */ "./ts/ElementTargetEvent.interface.ts");
|
|
3527
3868
|
/* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tag */ "./ts/tag.ts");
|
|
3528
3869
|
/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./html */ "./ts/html.ts");
|
|
3529
3870
|
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./errors */ "./ts/errors.ts");
|
|
3530
|
-
/* harmony import */ var
|
|
3871
|
+
/* harmony import */ var _subject_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./subject/index */ "./ts/subject/index.ts");
|
|
3531
3872
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
3532
|
-
/* harmony import */ var
|
|
3533
|
-
/* harmony import */ var
|
|
3534
|
-
/* harmony import */ var
|
|
3535
|
-
/* harmony import */ var
|
|
3536
|
-
/* harmony import */ var
|
|
3537
|
-
/* harmony import */ var
|
|
3538
|
-
/* harmony import */ var
|
|
3539
|
-
/* harmony import */ var
|
|
3540
|
-
/* harmony import */ var
|
|
3541
|
-
/* harmony import */ var
|
|
3542
|
-
/* harmony import */ var
|
|
3543
|
-
/* harmony import */ var
|
|
3544
|
-
/* harmony import */ var
|
|
3545
|
-
/* harmony import */ var _getCallback__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./getCallback */ "./ts/getCallback.ts");
|
|
3873
|
+
/* harmony import */ var _watch_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./watch.function */ "./ts/watch.function.ts");
|
|
3874
|
+
/* harmony import */ var _TagSupport_class__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TagSupport.class */ "./ts/TagSupport.class.ts");
|
|
3875
|
+
/* harmony import */ var _interpolateElement__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./interpolateElement */ "./ts/interpolateElement.ts");
|
|
3876
|
+
/* harmony import */ var _Tag_class__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Tag.class */ "./ts/Tag.class.ts");
|
|
3877
|
+
/* harmony import */ var _tagRunner__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./tagRunner */ "./ts/tagRunner.ts");
|
|
3878
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./setUse.function */ "./ts/setUse.function.ts");
|
|
3879
|
+
/* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./providers */ "./ts/providers.ts");
|
|
3880
|
+
/* harmony import */ var _set_function__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./set.function */ "./ts/set.function.ts");
|
|
3881
|
+
/* harmony import */ var _setLet_function__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./setLet.function */ "./ts/setLet.function.ts");
|
|
3882
|
+
/* harmony import */ var _setProp_function__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./setProp.function */ "./ts/setProp.function.ts");
|
|
3883
|
+
/* harmony import */ var _onInit__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./onInit */ "./ts/onInit.ts");
|
|
3884
|
+
/* harmony import */ var _onDestroy__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./onDestroy */ "./ts/onDestroy.ts");
|
|
3885
|
+
/* harmony import */ var _getCallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./getCallback */ "./ts/getCallback.ts");
|
|
3546
3886
|
// import { redrawTag } from "./redrawTag.function"
|
|
3547
3887
|
|
|
3548
3888
|
|
|
@@ -3553,7 +3893,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3553
3893
|
|
|
3554
3894
|
|
|
3555
3895
|
|
|
3556
|
-
|
|
3557
3896
|
// export * from "./redrawTag.function"
|
|
3558
3897
|
|
|
3559
3898
|
// TODO: export *
|
|
@@ -3586,6 +3925,7 @@ var __webpack_exports__Tag = __webpack_exports__.Tag;
|
|
|
3586
3925
|
var __webpack_exports__TagError = __webpack_exports__.TagError;
|
|
3587
3926
|
var __webpack_exports__TagSupport = __webpack_exports__.TagSupport;
|
|
3588
3927
|
var __webpack_exports__ValueSubject = __webpack_exports__.ValueSubject;
|
|
3928
|
+
var __webpack_exports__combineLatest = __webpack_exports__.combineLatest;
|
|
3589
3929
|
var __webpack_exports__getCallback = __webpack_exports__.getCallback;
|
|
3590
3930
|
var __webpack_exports__hmr = __webpack_exports__.hmr;
|
|
3591
3931
|
var __webpack_exports__html = __webpack_exports__.html;
|
|
@@ -3607,6 +3947,9 @@ var __webpack_exports__tag = __webpack_exports__.tag;
|
|
|
3607
3947
|
var __webpack_exports__tagElement = __webpack_exports__.tagElement;
|
|
3608
3948
|
var __webpack_exports__tags = __webpack_exports__.tags;
|
|
3609
3949
|
var __webpack_exports__watch = __webpack_exports__.watch;
|
|
3610
|
-
|
|
3950
|
+
var __webpack_exports__willCallback = __webpack_exports__.willCallback;
|
|
3951
|
+
var __webpack_exports__willPromise = __webpack_exports__.willPromise;
|
|
3952
|
+
var __webpack_exports__willSubscribe = __webpack_exports__.willSubscribe;
|
|
3953
|
+
export { __webpack_exports__ArrayNoKeyError as ArrayNoKeyError, __webpack_exports__BaseTagSupport as BaseTagSupport, __webpack_exports__StateMismatchError as StateMismatchError, __webpack_exports__Subject as Subject, __webpack_exports__Tag as Tag, __webpack_exports__TagError as TagError, __webpack_exports__TagSupport as TagSupport, __webpack_exports__ValueSubject as ValueSubject, __webpack_exports__combineLatest as combineLatest, __webpack_exports__getCallback as getCallback, __webpack_exports__hmr as hmr, __webpack_exports__html as html, __webpack_exports__interpolateElement as interpolateElement, __webpack_exports__interpolateString as interpolateString, __webpack_exports__isSubjectInstance as isSubjectInstance, __webpack_exports__isTagArray as isTagArray, __webpack_exports__isTagComponent as isTagComponent, __webpack_exports__isTagInstance as isTagInstance, __webpack_exports__onDestroy as onDestroy, __webpack_exports__onInit as onInit, __webpack_exports__providers as providers, __webpack_exports__runBeforeRender as runBeforeRender, __webpack_exports__set as set, __webpack_exports__setLet as setLet, __webpack_exports__setProp as setProp, __webpack_exports__setUse as setUse, __webpack_exports__tag as tag, __webpack_exports__tagElement as tagElement, __webpack_exports__tags as tags, __webpack_exports__watch as watch, __webpack_exports__willCallback as willCallback, __webpack_exports__willPromise as willPromise, __webpack_exports__willSubscribe as willSubscribe };
|
|
3611
3954
|
|
|
3612
3955
|
//# sourceMappingURL=bundle.js.map
|