taggedjs 2.5.5 → 2.5.6
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 +105 -86
- package/bundle.js.map +1 -1
- package/js/render.js +6 -5
- package/js/render.js.map +1 -1
- package/js/state/callbackMaker.function.js +5 -2
- package/js/state/callbackMaker.function.js.map +1 -1
- package/js/state/index.d.ts +1 -0
- package/js/state/index.js +1 -0
- package/js/state/index.js.map +1 -1
- package/js/state/providers.js +5 -3
- package/js/state/providers.js.map +1 -1
- package/js/state/state.function.js.map +1 -1
- package/js/state/subject.function.d.ts +12 -0
- package/js/state/subject.function.js +23 -0
- package/js/state/subject.function.js.map +1 -0
- package/js/subject/Subject.class.d.ts +1 -2
- package/js/subject/Subject.class.js +0 -10
- package/js/subject/Subject.class.js.map +1 -1
- package/js/tag/TagSupport.class.js +15 -30
- package/js/tag/TagSupport.class.js.map +1 -1
- package/js/tag/render/renderExistingTag.function.js +0 -13
- package/js/tag/render/renderExistingTag.function.js.map +1 -1
- package/js/tag/tagElement.js +3 -1
- package/js/tag/tagElement.js.map +1 -1
- package/js/tag/update/processTagArray.js +4 -2
- package/js/tag/update/processTagArray.js.map +1 -1
- package/js/tag/update/updateExistingValue.function.js +8 -6
- package/js/tag/update/updateExistingValue.function.js.map +1 -1
- package/js/updateBeforeTemplate.function.js.map +1 -1
- package/package.json +1 -1
package/bundle.js
CHANGED
|
@@ -983,18 +983,19 @@ function buildClones(temporary, insertBefore) {
|
|
|
983
983
|
const clones = [];
|
|
984
984
|
const template = temporary.children[0];
|
|
985
985
|
let nextSibling = template.content.firstChild;
|
|
986
|
+
const fragment = document.createDocumentFragment();
|
|
986
987
|
while (nextSibling) {
|
|
987
988
|
const nextNextSibling = nextSibling.nextSibling;
|
|
988
|
-
buildSibling(nextSibling, insertBefore);
|
|
989
989
|
clones.push(nextSibling);
|
|
990
|
+
fragment.appendChild(nextSibling);
|
|
990
991
|
nextSibling = nextNextSibling;
|
|
991
992
|
}
|
|
993
|
+
if (insertBefore.parentNode) {
|
|
994
|
+
const parentNode = insertBefore.parentNode;
|
|
995
|
+
parentNode.insertBefore(fragment, insertBefore);
|
|
996
|
+
}
|
|
992
997
|
return clones;
|
|
993
998
|
}
|
|
994
|
-
function buildSibling(nextSibling, insertBefore) {
|
|
995
|
-
const parentNode = insertBefore.parentNode;
|
|
996
|
-
parentNode.insertBefore(nextSibling, insertBefore);
|
|
997
|
-
}
|
|
998
999
|
|
|
999
1000
|
|
|
1000
1001
|
/***/ }),
|
|
@@ -1065,14 +1066,17 @@ function initMemory(tagSupport) {
|
|
|
1065
1066
|
}
|
|
1066
1067
|
function triggerStateUpdate(tagSupport, callback, oldState, ...args) {
|
|
1067
1068
|
const state = tagSupport.memory.state;
|
|
1068
|
-
// oldState = (tagSupport.global.oldest as TagSupport).memory.state
|
|
1069
1069
|
// ensure that the oldest has the latest values first
|
|
1070
1070
|
(0,_syncStates_function__WEBPACK_IMPORTED_MODULE_3__.syncStates)(state, oldState);
|
|
1071
1071
|
// run the callback
|
|
1072
1072
|
const maybePromise = callback(...args);
|
|
1073
|
-
// const maybePromise = callback(...args as [any,any,any,any,any,any])
|
|
1074
1073
|
// send the oldest state changes into the newest
|
|
1075
1074
|
(0,_syncStates_function__WEBPACK_IMPORTED_MODULE_3__.syncStates)(oldState, state);
|
|
1075
|
+
/*
|
|
1076
|
+
if(tagSupport.global.deleted) {
|
|
1077
|
+
return maybePromise // While running callback the tag was deleted. Often that happens
|
|
1078
|
+
}
|
|
1079
|
+
*/
|
|
1076
1080
|
(0,_tag_render_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_1__.renderTagSupport)(tagSupport, false);
|
|
1077
1081
|
if (maybePromise instanceof Promise) {
|
|
1078
1082
|
maybePromise.finally(() => {
|
|
@@ -1124,26 +1128,29 @@ function children() {
|
|
|
1124
1128
|
|
|
1125
1129
|
__webpack_require__.r(__webpack_exports__);
|
|
1126
1130
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1127
|
-
/* harmony export */ callback: () => (/* reexport safe */
|
|
1128
|
-
/* harmony export */ callbackMaker: () => (/* reexport safe */
|
|
1129
|
-
/* harmony export */ children: () => (/* reexport safe */
|
|
1130
|
-
/* harmony export */ letState: () => (/* reexport safe */
|
|
1131
|
-
/* harmony export */ onDestroy: () => (/* reexport safe */
|
|
1132
|
-
/* harmony export */ onInit: () => (/* reexport safe */
|
|
1133
|
-
/* harmony export */ providers: () => (/* reexport safe */
|
|
1131
|
+
/* harmony export */ callback: () => (/* reexport safe */ _callbackMaker_function__WEBPACK_IMPORTED_MODULE_6__.callback),
|
|
1132
|
+
/* harmony export */ callbackMaker: () => (/* reexport safe */ _callbackMaker_function__WEBPACK_IMPORTED_MODULE_6__.callbackMaker),
|
|
1133
|
+
/* harmony export */ children: () => (/* reexport safe */ _children__WEBPACK_IMPORTED_MODULE_9__.children),
|
|
1134
|
+
/* harmony export */ letState: () => (/* reexport safe */ _letState_function__WEBPACK_IMPORTED_MODULE_4__.letState),
|
|
1135
|
+
/* harmony export */ onDestroy: () => (/* reexport safe */ _onDestroy__WEBPACK_IMPORTED_MODULE_8__.onDestroy),
|
|
1136
|
+
/* harmony export */ onInit: () => (/* reexport safe */ _onInit__WEBPACK_IMPORTED_MODULE_7__.onInit),
|
|
1137
|
+
/* harmony export */ providers: () => (/* reexport safe */ _providers__WEBPACK_IMPORTED_MODULE_5__.providers),
|
|
1134
1138
|
/* harmony export */ setUse: () => (/* reexport safe */ _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse),
|
|
1135
1139
|
/* harmony export */ state: () => (/* reexport safe */ _state_function__WEBPACK_IMPORTED_MODULE_2__.state),
|
|
1140
|
+
/* harmony export */ subject: () => (/* reexport safe */ _subject_function__WEBPACK_IMPORTED_MODULE_3__.subject),
|
|
1136
1141
|
/* harmony export */ watch: () => (/* reexport safe */ _watch_function__WEBPACK_IMPORTED_MODULE_0__.watch)
|
|
1137
1142
|
/* harmony export */ });
|
|
1138
1143
|
/* harmony import */ var _watch_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./watch.function */ "./ts/state/watch.function.ts");
|
|
1139
1144
|
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
1140
1145
|
/* harmony import */ var _state_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./state.function */ "./ts/state/state.function.ts");
|
|
1141
|
-
/* harmony import */ var
|
|
1142
|
-
/* harmony import */ var
|
|
1143
|
-
/* harmony import */ var
|
|
1144
|
-
/* harmony import */ var
|
|
1145
|
-
/* harmony import */ var
|
|
1146
|
-
/* harmony import */ var
|
|
1146
|
+
/* harmony import */ var _subject_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./subject.function */ "./ts/state/subject.function.ts");
|
|
1147
|
+
/* harmony import */ var _letState_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./letState.function */ "./ts/state/letState.function.ts");
|
|
1148
|
+
/* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./providers */ "./ts/state/providers.ts");
|
|
1149
|
+
/* harmony import */ var _callbackMaker_function__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./callbackMaker.function */ "./ts/state/callbackMaker.function.ts");
|
|
1150
|
+
/* harmony import */ var _onInit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./onInit */ "./ts/state/onInit.ts");
|
|
1151
|
+
/* harmony import */ var _onDestroy__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./onDestroy */ "./ts/state/onDestroy.ts");
|
|
1152
|
+
/* harmony import */ var _children__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./children */ "./ts/state/children.ts");
|
|
1153
|
+
|
|
1147
1154
|
|
|
1148
1155
|
|
|
1149
1156
|
|
|
@@ -1354,15 +1361,14 @@ _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.providerConfig = {
|
|
|
1354
1361
|
};
|
|
1355
1362
|
const providers = {
|
|
1356
1363
|
create: (constructMethod) => {
|
|
1357
|
-
const cm = constructMethod;
|
|
1358
|
-
const compareTo = cm.compareTo = cm.compareTo || cm.toString();
|
|
1359
1364
|
const stateDiffMemory = (0,_state_function__WEBPACK_IMPORTED_MODULE_2__.state)(() => ({ stateDiff: 0, provider: undefined }));
|
|
1365
|
+
// mimic how many states were called the first time
|
|
1360
1366
|
if (stateDiffMemory.stateDiff) {
|
|
1361
1367
|
for (let x = stateDiffMemory.stateDiff; x > 0; --x) {
|
|
1362
1368
|
(0,_state_function__WEBPACK_IMPORTED_MODULE_2__.state)(undefined);
|
|
1363
1369
|
}
|
|
1364
1370
|
const result = (0,_state_function__WEBPACK_IMPORTED_MODULE_2__.state)(undefined);
|
|
1365
|
-
stateDiffMemory.provider.constructMethod.compareTo = compareTo
|
|
1371
|
+
// stateDiffMemory.provider.constructMethod.compareTo = compareTo
|
|
1366
1372
|
return result;
|
|
1367
1373
|
}
|
|
1368
1374
|
const result = (0,_state_function__WEBPACK_IMPORTED_MODULE_2__.state)(() => {
|
|
@@ -1384,6 +1390,9 @@ const providers = {
|
|
|
1384
1390
|
stateDiffMemory.stateDiff = stateDiff;
|
|
1385
1391
|
return instance;
|
|
1386
1392
|
});
|
|
1393
|
+
const cm = constructMethod;
|
|
1394
|
+
// const compareTo = cm.compareTo = cm.compareTo || cm.toString()
|
|
1395
|
+
const compareTo = cm.compareTo = cm.toString();
|
|
1387
1396
|
stateDiffMemory.provider.constructMethod.compareTo = compareTo;
|
|
1388
1397
|
return result;
|
|
1389
1398
|
},
|
|
@@ -1663,6 +1672,47 @@ function checkStateMismatch(
|
|
|
1663
1672
|
*/
|
|
1664
1673
|
|
|
1665
1674
|
|
|
1675
|
+
/***/ }),
|
|
1676
|
+
|
|
1677
|
+
/***/ "./ts/state/subject.function.ts":
|
|
1678
|
+
/*!**************************************!*\
|
|
1679
|
+
!*** ./ts/state/subject.function.ts ***!
|
|
1680
|
+
\**************************************/
|
|
1681
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1682
|
+
|
|
1683
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1684
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1685
|
+
/* harmony export */ subject: () => (/* binding */ subject)
|
|
1686
|
+
/* harmony export */ });
|
|
1687
|
+
/* harmony import */ var _subject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../subject */ "./ts/subject/index.ts");
|
|
1688
|
+
/* harmony import */ var _tag_getSupportInCycle_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../tag/getSupportInCycle.function */ "./ts/tag/getSupportInCycle.function.ts");
|
|
1689
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
1690
|
+
/* harmony import */ var _state_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./state.function */ "./ts/state/state.function.ts");
|
|
1691
|
+
/* harmony import */ var _syncStates_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./syncStates.function */ "./ts/state/syncStates.function.ts");
|
|
1692
|
+
|
|
1693
|
+
|
|
1694
|
+
|
|
1695
|
+
|
|
1696
|
+
|
|
1697
|
+
function subject(value, onSubscription) {
|
|
1698
|
+
const oldestState = (0,_state_function__WEBPACK_IMPORTED_MODULE_3__.state)(() => _setUse_function__WEBPACK_IMPORTED_MODULE_2__.setUse.memory.stateConfig.array);
|
|
1699
|
+
const nowTagSupport = (0,_tag_getSupportInCycle_function__WEBPACK_IMPORTED_MODULE_1__.getSupportInCycle)();
|
|
1700
|
+
return new _subject__WEBPACK_IMPORTED_MODULE_0__.Subject(value, onSubscription).pipe(x => {
|
|
1701
|
+
(0,_syncStates_function__WEBPACK_IMPORTED_MODULE_4__.syncStates)(nowTagSupport.memory.state, oldestState);
|
|
1702
|
+
return x;
|
|
1703
|
+
});
|
|
1704
|
+
}
|
|
1705
|
+
function all(args) {
|
|
1706
|
+
const oldestState = (0,_state_function__WEBPACK_IMPORTED_MODULE_3__.state)(() => _setUse_function__WEBPACK_IMPORTED_MODULE_2__.setUse.memory.stateConfig.array);
|
|
1707
|
+
const nowTagSupport = (0,_tag_getSupportInCycle_function__WEBPACK_IMPORTED_MODULE_1__.getSupportInCycle)();
|
|
1708
|
+
return _subject__WEBPACK_IMPORTED_MODULE_0__.Subject.all(args).pipe(x => {
|
|
1709
|
+
(0,_syncStates_function__WEBPACK_IMPORTED_MODULE_4__.syncStates)(nowTagSupport.memory.state, oldestState);
|
|
1710
|
+
return x;
|
|
1711
|
+
});
|
|
1712
|
+
}
|
|
1713
|
+
subject.all = all;
|
|
1714
|
+
|
|
1715
|
+
|
|
1666
1716
|
/***/ }),
|
|
1667
1717
|
|
|
1668
1718
|
/***/ "./ts/state/syncStates.function.ts":
|
|
@@ -1926,16 +1976,6 @@ class Subject {
|
|
|
1926
1976
|
}
|
|
1927
1977
|
static globalSubCount$ = new Subject(0); // for ease of debugging
|
|
1928
1978
|
}
|
|
1929
|
-
/*
|
|
1930
|
-
export const Subject = (<T>(value?: T, onSubscription?: OnSubscription<T>) => {
|
|
1931
|
-
return new Subject(value, onSubscription)
|
|
1932
|
-
}) as (<T>(value?: T, onSubscription?: OnSubscription<T>) => Subject<T>) & {
|
|
1933
|
-
globalSubCount$: Subject<number>
|
|
1934
|
-
// globalSubs: Subscription<any>[]
|
|
1935
|
-
all: <T>(...args: (T | Subject<T>)[]) => Subject<T>[]
|
|
1936
|
-
}
|
|
1937
|
-
*/
|
|
1938
|
-
// Subject.globalSubs = [] // 🔬 for testing
|
|
1939
1979
|
|
|
1940
1980
|
|
|
1941
1981
|
/***/ }),
|
|
@@ -2298,12 +2338,6 @@ class BaseTagSupport {
|
|
|
2298
2338
|
global.newest = this;
|
|
2299
2339
|
subject.tagSupport = this;
|
|
2300
2340
|
this.hasLiveElements = true;
|
|
2301
|
-
// remove old clones
|
|
2302
|
-
if (this.clones.length) {
|
|
2303
|
-
// this.destroyClones()
|
|
2304
|
-
// this.clones.forEach(clone => this.checkCloneRemoval(clone, 0))
|
|
2305
|
-
}
|
|
2306
|
-
global.insertBefore = insertBefore;
|
|
2307
2341
|
const context = this.update();
|
|
2308
2342
|
const template = this.getTemplate();
|
|
2309
2343
|
const isForceElement = options.forceElement;
|
|
@@ -2389,12 +2423,23 @@ class TagSupport extends BaseTagSupport {
|
|
|
2389
2423
|
stagger: 0,
|
|
2390
2424
|
byParent: false, // Only destroy clones of direct children
|
|
2391
2425
|
}) {
|
|
2426
|
+
const firstDestroy = !options.byParent;
|
|
2392
2427
|
const global = this.global;
|
|
2393
2428
|
const subject = this.subject;
|
|
2394
|
-
|
|
2395
|
-
|
|
2429
|
+
const childTags = options.byParent ? [] : (0,_destroy_support__WEBPACK_IMPORTED_MODULE_6__.getChildTagsToDestroy)(this.childTags);
|
|
2430
|
+
if (firstDestroy && (0,_isInstance__WEBPACK_IMPORTED_MODULE_2__.isTagComponent)(this.templater)) {
|
|
2431
|
+
(0,_tagRunner__WEBPACK_IMPORTED_MODULE_5__.runBeforeDestroy)(this, this);
|
|
2396
2432
|
}
|
|
2397
|
-
//
|
|
2433
|
+
// signify immediately child has been deleted (looked for during event processing)
|
|
2434
|
+
childTags.forEach(child => {
|
|
2435
|
+
const subGlobal = child.global;
|
|
2436
|
+
delete subGlobal.newest;
|
|
2437
|
+
subGlobal.deleted = true;
|
|
2438
|
+
if ((0,_isInstance__WEBPACK_IMPORTED_MODULE_2__.isTagComponent)(child.templater)) {
|
|
2439
|
+
(0,_tagRunner__WEBPACK_IMPORTED_MODULE_5__.runBeforeDestroy)(child, child);
|
|
2440
|
+
}
|
|
2441
|
+
});
|
|
2442
|
+
// HTML DOM manipulation. Put back down the template tag
|
|
2398
2443
|
const insertBefore = global.insertBefore;
|
|
2399
2444
|
if (insertBefore.nodeName === 'TEMPLATE') {
|
|
2400
2445
|
const placeholder = global.placeholder;
|
|
@@ -2404,25 +2449,12 @@ class TagSupport extends BaseTagSupport {
|
|
|
2404
2449
|
}
|
|
2405
2450
|
}
|
|
2406
2451
|
}
|
|
2407
|
-
// the isComponent check maybe able to be removed
|
|
2408
|
-
const isComponent = (0,_isInstance__WEBPACK_IMPORTED_MODULE_2__.isTagComponent)(this.templater) ? true : false;
|
|
2409
|
-
if (isComponent) {
|
|
2410
|
-
(0,_tagRunner__WEBPACK_IMPORTED_MODULE_5__.runBeforeDestroy)(this, this);
|
|
2411
|
-
}
|
|
2412
|
-
const childTags = options.byParent ? [] : (0,_destroy_support__WEBPACK_IMPORTED_MODULE_6__.getChildTagsToDestroy)(this.childTags);
|
|
2413
|
-
// signify that no further event rendering should take place by making logic think a render occurred during event
|
|
2414
|
-
// signify immediately child has been deleted (looked for during event processing)
|
|
2415
|
-
childTags.forEach(child => {
|
|
2416
|
-
const subGlobal = child.global;
|
|
2417
|
-
delete subGlobal.newest;
|
|
2418
|
-
subGlobal.deleted = true;
|
|
2419
|
-
});
|
|
2420
2452
|
this.destroySubscriptions();
|
|
2421
2453
|
let mainPromise;
|
|
2422
2454
|
if (this.ownerTagSupport) {
|
|
2423
2455
|
this.ownerTagSupport.childTags = this.ownerTagSupport.childTags.filter(child => child !== this);
|
|
2424
2456
|
}
|
|
2425
|
-
if (
|
|
2457
|
+
if (firstDestroy) {
|
|
2426
2458
|
const { stagger, promise } = this.destroyClones(options);
|
|
2427
2459
|
options.stagger = stagger;
|
|
2428
2460
|
if (promise) {
|
|
@@ -2485,13 +2517,6 @@ class TagSupport extends BaseTagSupport {
|
|
|
2485
2517
|
const next = () => {
|
|
2486
2518
|
const parentNode = clone.parentNode;
|
|
2487
2519
|
if (parentNode) {
|
|
2488
|
-
/*
|
|
2489
|
-
const stillHas = Array.from(parentNode.children).includes(clone as Element)
|
|
2490
|
-
if(stillHas) {
|
|
2491
|
-
console.log('stillHas', {clone})
|
|
2492
|
-
parentNode.removeChild(clone)
|
|
2493
|
-
}
|
|
2494
|
-
*/
|
|
2495
2520
|
parentNode.removeChild(clone);
|
|
2496
2521
|
}
|
|
2497
2522
|
const ownerSupport = this.ownerTagSupport;
|
|
@@ -3024,19 +3049,6 @@ subject) {
|
|
|
3024
3049
|
return prevSupport; // already rendered during triggered events
|
|
3025
3050
|
}
|
|
3026
3051
|
const toRedrawTag = prevSupport || lastSupport || global.oldest;
|
|
3027
|
-
/*
|
|
3028
|
-
if(oldestSupport === newSupport) {
|
|
3029
|
-
newSupport = new TagSupport(
|
|
3030
|
-
newSupport.templater,
|
|
3031
|
-
newSupport.ownerTagSupport,
|
|
3032
|
-
newSupport.subject,
|
|
3033
|
-
)
|
|
3034
|
-
|
|
3035
|
-
newSupport.memory = {...oldestSupport.memory}
|
|
3036
|
-
newSupport.memory.state = [...oldestSupport.memory.state]
|
|
3037
|
-
newSupport.global = oldestSupport.global
|
|
3038
|
-
}
|
|
3039
|
-
*/
|
|
3040
3052
|
const reSupport = (0,_renderWithSupport_function__WEBPACK_IMPORTED_MODULE_2__.renderWithSupport)(newSupport, toRedrawTag, subject, ownerSupport);
|
|
3041
3053
|
const oldest = global.oldest || oldestSupport;
|
|
3042
3054
|
reSupport.global.oldest = oldest;
|
|
@@ -3444,7 +3456,8 @@ element, props) {
|
|
|
3444
3456
|
const templateElm = document.createElement('template');
|
|
3445
3457
|
templateElm.setAttribute('id', 'app-tag-' + appElements.length);
|
|
3446
3458
|
templateElm.setAttribute('app-tag-detail', appElements.length.toString());
|
|
3447
|
-
|
|
3459
|
+
const fragment = document.createDocumentFragment();
|
|
3460
|
+
fragment.appendChild(templateElm);
|
|
3448
3461
|
element.destroy = async () => {
|
|
3449
3462
|
await tagSupport.destroy();
|
|
3450
3463
|
const insertBefore = tagSupport.global.insertBefore;
|
|
@@ -3456,6 +3469,7 @@ element, props) {
|
|
|
3456
3469
|
tagSupport.global.newest = tagSupport;
|
|
3457
3470
|
element.setUse = app.original.setUse;
|
|
3458
3471
|
appElements.push({ element, tagSupport });
|
|
3472
|
+
element.appendChild(fragment);
|
|
3459
3473
|
return {
|
|
3460
3474
|
tagSupport,
|
|
3461
3475
|
tags: app.original.tags,
|
|
@@ -3920,11 +3934,13 @@ function processAddTagArrayItem(before, tagSupport, index, options, lastArray) {
|
|
|
3920
3934
|
added: options.counts.added + index,
|
|
3921
3935
|
removed: options.counts.removed,
|
|
3922
3936
|
};
|
|
3937
|
+
const fragment = document.createDocumentFragment();
|
|
3923
3938
|
const newTempElm = document.createElement('template');
|
|
3924
|
-
|
|
3925
|
-
parent.insertBefore(newTempElm, before);
|
|
3939
|
+
fragment.appendChild(newTempElm);
|
|
3926
3940
|
tagSupport.buildBeforeElement(newTempElm, // before,
|
|
3927
3941
|
{ counts, forceElement: options.forceElement });
|
|
3942
|
+
const parent = before.parentNode;
|
|
3943
|
+
parent.insertBefore(fragment, before);
|
|
3928
3944
|
}
|
|
3929
3945
|
/** compare two values. If both values are arrays then the items will be compared */
|
|
3930
3946
|
function areLikeValues(valueA, valueB) {
|
|
@@ -4200,8 +4216,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4200
4216
|
/* harmony import */ var _isLikeTags_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../isLikeTags.function */ "./ts/tag/isLikeTags.function.ts");
|
|
4201
4217
|
/* harmony import */ var _interpolations_bindSubjectCallback_function__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../interpolations/bindSubjectCallback.function */ "./ts/interpolations/bindSubjectCallback.function.ts");
|
|
4202
4218
|
/* harmony import */ var _processTag_function__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./processTag.function */ "./ts/tag/update/processTag.function.ts");
|
|
4203
|
-
/* harmony import */ var _insertAfter_function__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../insertAfter.function */ "./ts/insertAfter.function.ts");
|
|
4204
|
-
|
|
4205
4219
|
|
|
4206
4220
|
|
|
4207
4221
|
|
|
@@ -4318,11 +4332,14 @@ function prepareUpdateToComponent(templater, subjectTag, insertBefore, ownerSupp
|
|
|
4318
4332
|
tagSupport.memory.state.push(...newestState);
|
|
4319
4333
|
}
|
|
4320
4334
|
else {
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4335
|
+
(0,_checkDestroyPrevious_function__WEBPACK_IMPORTED_MODULE_6__.restoreTagMarker)(subjectSup);
|
|
4336
|
+
/*
|
|
4337
|
+
const placeholder = subjectSup.global.placeholder
|
|
4338
|
+
if(placeholder && !insertBefore.parentNode) {
|
|
4339
|
+
insertAfter(insertBefore,placeholder)
|
|
4340
|
+
delete subjectSup.global.placeholder
|
|
4325
4341
|
}
|
|
4342
|
+
*/
|
|
4326
4343
|
(0,_processSubjectComponent_function__WEBPACK_IMPORTED_MODULE_7__.processSubjectComponent)(templater, subjectTag, insertBefore, ownerSupport, {
|
|
4327
4344
|
forceElement: true,
|
|
4328
4345
|
counts: { added: 0, removed: 0 },
|
|
@@ -4466,6 +4483,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4466
4483
|
/* harmony export */ runBeforeRender: () => (/* reexport safe */ _tag_tagRunner__WEBPACK_IMPORTED_MODULE_11__.runBeforeRender),
|
|
4467
4484
|
/* harmony export */ setUse: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_4__.setUse),
|
|
4468
4485
|
/* harmony export */ state: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_4__.state),
|
|
4486
|
+
/* harmony export */ subject: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_4__.subject),
|
|
4469
4487
|
/* harmony export */ tag: () => (/* reexport safe */ _tag_tag__WEBPACK_IMPORTED_MODULE_0__.tag),
|
|
4470
4488
|
/* harmony export */ tagElement: () => (/* reexport safe */ _tag_tagElement__WEBPACK_IMPORTED_MODULE_9__.tagElement),
|
|
4471
4489
|
/* harmony export */ tags: () => (/* reexport safe */ _tag_tag__WEBPACK_IMPORTED_MODULE_0__.tags),
|
|
@@ -4550,6 +4568,7 @@ var __webpack_exports__renderWithSupport = __webpack_exports__.renderWithSupport
|
|
|
4550
4568
|
var __webpack_exports__runBeforeRender = __webpack_exports__.runBeforeRender;
|
|
4551
4569
|
var __webpack_exports__setUse = __webpack_exports__.setUse;
|
|
4552
4570
|
var __webpack_exports__state = __webpack_exports__.state;
|
|
4571
|
+
var __webpack_exports__subject = __webpack_exports__.subject;
|
|
4553
4572
|
var __webpack_exports__tag = __webpack_exports__.tag;
|
|
4554
4573
|
var __webpack_exports__tagElement = __webpack_exports__.tagElement;
|
|
4555
4574
|
var __webpack_exports__tags = __webpack_exports__.tags;
|
|
@@ -4557,6 +4576,6 @@ var __webpack_exports__watch = __webpack_exports__.watch;
|
|
|
4557
4576
|
var __webpack_exports__willCallback = __webpack_exports__.willCallback;
|
|
4558
4577
|
var __webpack_exports__willPromise = __webpack_exports__.willPromise;
|
|
4559
4578
|
var __webpack_exports__willSubscribe = __webpack_exports__.willSubscribe;
|
|
4560
|
-
export { __webpack_exports__ArrayNoKeyError as ArrayNoKeyError, __webpack_exports__BaseTagSupport as BaseTagSupport, __webpack_exports__StateMismatchError as StateMismatchError, __webpack_exports__Subject as Subject, __webpack_exports__SyncCallbackError as SyncCallbackError, __webpack_exports__Tag as Tag, __webpack_exports__TagError as TagError, __webpack_exports__TagSupport as TagSupport, __webpack_exports__ValueSubject as ValueSubject, __webpack_exports__callback as callback, __webpack_exports__callbackMaker as callbackMaker, __webpack_exports__children as children, __webpack_exports__combineLatest as combineLatest, __webpack_exports__hmr as hmr, __webpack_exports__html as html, __webpack_exports__interpolateElement as interpolateElement, __webpack_exports__interpolateString as interpolateString, __webpack_exports__isLikeValueSets as isLikeValueSets, __webpack_exports__isSubjectInstance as isSubjectInstance, __webpack_exports__isTag as isTag, __webpack_exports__isTagArray as isTagArray, __webpack_exports__isTagClass as isTagClass, __webpack_exports__isTagComponent as isTagComponent, __webpack_exports__isTagTemplater as isTagTemplater, __webpack_exports__kidsToTagArraySubject as kidsToTagArraySubject, __webpack_exports__letState as letState, __webpack_exports__onDestroy as onDestroy, __webpack_exports__onInit as onInit, __webpack_exports__providers as providers, __webpack_exports__renderTagSupport as renderTagSupport, __webpack_exports__renderWithSupport as renderWithSupport, __webpack_exports__runBeforeRender as runBeforeRender, __webpack_exports__setUse as setUse, __webpack_exports__state as state, __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 };
|
|
4579
|
+
export { __webpack_exports__ArrayNoKeyError as ArrayNoKeyError, __webpack_exports__BaseTagSupport as BaseTagSupport, __webpack_exports__StateMismatchError as StateMismatchError, __webpack_exports__Subject as Subject, __webpack_exports__SyncCallbackError as SyncCallbackError, __webpack_exports__Tag as Tag, __webpack_exports__TagError as TagError, __webpack_exports__TagSupport as TagSupport, __webpack_exports__ValueSubject as ValueSubject, __webpack_exports__callback as callback, __webpack_exports__callbackMaker as callbackMaker, __webpack_exports__children as children, __webpack_exports__combineLatest as combineLatest, __webpack_exports__hmr as hmr, __webpack_exports__html as html, __webpack_exports__interpolateElement as interpolateElement, __webpack_exports__interpolateString as interpolateString, __webpack_exports__isLikeValueSets as isLikeValueSets, __webpack_exports__isSubjectInstance as isSubjectInstance, __webpack_exports__isTag as isTag, __webpack_exports__isTagArray as isTagArray, __webpack_exports__isTagClass as isTagClass, __webpack_exports__isTagComponent as isTagComponent, __webpack_exports__isTagTemplater as isTagTemplater, __webpack_exports__kidsToTagArraySubject as kidsToTagArraySubject, __webpack_exports__letState as letState, __webpack_exports__onDestroy as onDestroy, __webpack_exports__onInit as onInit, __webpack_exports__providers as providers, __webpack_exports__renderTagSupport as renderTagSupport, __webpack_exports__renderWithSupport as renderWithSupport, __webpack_exports__runBeforeRender as runBeforeRender, __webpack_exports__setUse as setUse, __webpack_exports__state as state, __webpack_exports__subject as subject, __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 };
|
|
4561
4580
|
|
|
4562
4581
|
//# sourceMappingURL=bundle.js.map
|