taggedjs 2.4.16 → 2.4.17
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 +638 -592
- package/bundle.js.map +1 -1
- package/js/Tag.class.d.ts +1 -1
- package/js/Tag.class.js.map +1 -1
- package/js/TemplaterResult.class.d.ts +3 -3
- package/js/TemplaterResult.class.js +1 -1
- package/js/TemplaterResult.class.js.map +1 -1
- package/js/errors.d.ts +3 -0
- package/js/errors.js +6 -0
- package/js/errors.js.map +1 -1
- package/js/index.d.ts +1 -9
- package/js/index.js +1 -12
- package/js/index.js.map +1 -1
- package/js/interpolateTemplate.js +0 -2
- package/js/interpolateTemplate.js.map +1 -1
- package/js/processSubjectComponent.function.js +1 -1
- package/js/processSubjectComponent.function.js.map +1 -1
- package/js/renderExistingTag.function.js +1 -1
- package/js/renderExistingTag.function.js.map +1 -1
- package/js/state/callbackMaker.function.d.ts +3 -0
- package/js/state/callbackMaker.function.js +52 -0
- package/js/state/callbackMaker.function.js.map +1 -0
- package/js/state/getCallback.d.ts +3 -0
- package/js/state/getCallback.js +51 -0
- package/js/state/getCallback.js.map +1 -0
- package/js/state/index.d.ts +10 -0
- package/js/state/index.js +10 -0
- package/js/state/index.js.map +1 -0
- package/js/state/letState.function.d.ts +3 -0
- package/js/state/letState.function.js +42 -0
- package/js/state/letState.function.js.map +1 -0
- package/js/state/onDestroy.d.ts +2 -0
- package/js/state/onDestroy.js +17 -0
- package/js/state/onDestroy.js.map +1 -0
- package/js/state/onInit.d.ts +2 -0
- package/js/state/onInit.js +17 -0
- package/js/state/onInit.js.map +1 -0
- package/js/state/provider.utils.d.ts +2 -0
- package/js/state/provider.utils.js +45 -0
- package/js/state/provider.utils.js.map +1 -0
- package/js/state/providers.d.ts +18 -0
- package/js/state/providers.js +86 -0
- package/js/state/providers.js.map +1 -0
- package/js/state/setProp.function.d.ts +3 -0
- package/js/state/setProp.function.js +37 -0
- package/js/state/setProp.function.js.map +1 -0
- package/js/state/setUse.function.d.ts +23 -0
- package/js/state/setUse.function.js +14 -0
- package/js/state/setUse.function.js.map +1 -0
- package/js/state/state.function.d.ts +2 -0
- package/js/state/state.function.js +34 -0
- package/js/state/state.function.js.map +1 -0
- package/js/state/state.utils.d.ts +22 -0
- package/js/state/state.utils.js +85 -0
- package/js/state/state.utils.js.map +1 -0
- package/js/state/watch.function.d.ts +3 -0
- package/js/state/watch.function.js +20 -0
- package/js/state/watch.function.js.map +1 -0
- package/js/subject/Subject.class.js +4 -4
- package/js/subject/Subject.class.js.map +1 -1
- package/js/subject/Subject.utils.d.ts +1 -1
- package/js/subject/ValueSubject.d.ts +1 -1
- package/js/subject/ValueSubject.js +1 -1
- package/js/subject/ValueSubject.js.map +1 -1
- package/js/tag.js +1 -1
- package/js/tag.js.map +1 -1
- package/js/tagRunner.js +1 -1
- package/js/tagRunner.js.map +1 -1
- package/js/updateExistingTagComponent.function.js +0 -1
- package/js/updateExistingTagComponent.function.js.map +1 -1
- package/package.json +1 -1
package/bundle.js
CHANGED
|
@@ -495,7 +495,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
495
495
|
/* harmony export */ renderWithSupport: () => (/* binding */ renderWithSupport)
|
|
496
496
|
/* harmony export */ });
|
|
497
497
|
/* harmony import */ var _tagRunner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tagRunner */ "./ts/tagRunner.ts");
|
|
498
|
-
/* harmony import */ var
|
|
498
|
+
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state */ "./ts/state/index.ts");
|
|
499
499
|
/* harmony import */ var _isLikeTags_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isLikeTags.function */ "./ts/isLikeTags.function.ts");
|
|
500
500
|
/* harmony import */ var _destroyTag_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./destroyTag.function */ "./ts/destroyTag.function.ts");
|
|
501
501
|
|
|
@@ -545,7 +545,7 @@ function renderWithSupport(tagSupport, existingTag, subject, ownerTag) {
|
|
|
545
545
|
// first time render
|
|
546
546
|
(0,_tagRunner__WEBPACK_IMPORTED_MODULE_0__.runBeforeRender)(wrapTagSupport, runtimeOwnerTag);
|
|
547
547
|
// TODO: Logic below most likely could live within providers.ts inside the runBeforeRender function
|
|
548
|
-
const providers =
|
|
548
|
+
const providers = _state__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.providerConfig;
|
|
549
549
|
providers.ownerTag = runtimeOwnerTag;
|
|
550
550
|
}
|
|
551
551
|
/* END: BEFORE RENDER */
|
|
@@ -1016,6 +1016,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1016
1016
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1017
1017
|
/* harmony export */ ArrayNoKeyError: () => (/* binding */ ArrayNoKeyError),
|
|
1018
1018
|
/* harmony export */ StateMismatchError: () => (/* binding */ StateMismatchError),
|
|
1019
|
+
/* harmony export */ SyncCallbackError: () => (/* binding */ SyncCallbackError),
|
|
1019
1020
|
/* harmony export */ TagError: () => (/* binding */ TagError)
|
|
1020
1021
|
/* harmony export */ });
|
|
1021
1022
|
class TagError extends Error {
|
|
@@ -1038,71 +1039,10 @@ class StateMismatchError extends TagError {
|
|
|
1038
1039
|
this.name = StateMismatchError.name;
|
|
1039
1040
|
}
|
|
1040
1041
|
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
/***/ "./ts/getCallback.ts":
|
|
1046
|
-
/*!***************************!*\
|
|
1047
|
-
!*** ./ts/getCallback.ts ***!
|
|
1048
|
-
\***************************/
|
|
1049
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1050
|
-
|
|
1051
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1052
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1053
|
-
/* harmony export */ getCallback: () => (/* binding */ getCallback)
|
|
1054
|
-
/* harmony export */ });
|
|
1055
|
-
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setUse.function */ "./ts/setUse.function.ts");
|
|
1056
|
-
/* harmony import */ var _set_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./set.function */ "./ts/set.function.ts");
|
|
1057
|
-
/* harmony import */ var _renderTagSupport_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./renderTagSupport.function */ "./ts/renderTagSupport.function.ts");
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
let innerCallback = (callback) => () => {
|
|
1062
|
-
throw new Error('Callback function was called immediately in sync and must instead be call async');
|
|
1063
|
-
};
|
|
1064
|
-
const getCallback = () => innerCallback;
|
|
1065
|
-
const originalGetter = innerCallback; // getCallback
|
|
1066
|
-
(0,_setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse)({
|
|
1067
|
-
beforeRender: (tagSupport) => initMemory(tagSupport),
|
|
1068
|
-
beforeRedraw: (tagSupport) => initMemory(tagSupport),
|
|
1069
|
-
afterRender: (_tagSupport) => {
|
|
1070
|
-
innerCallback = originalGetter; // prevent crossing callbacks with another tag
|
|
1071
|
-
},
|
|
1072
|
-
});
|
|
1073
|
-
function updateState(stateFrom, stateTo) {
|
|
1074
|
-
stateFrom.forEach((state, index) => {
|
|
1075
|
-
const fromValue = (0,_set_function__WEBPACK_IMPORTED_MODULE_1__.getStateValue)(state);
|
|
1076
|
-
const callback = stateTo[index].callback;
|
|
1077
|
-
if (callback) {
|
|
1078
|
-
callback(fromValue); // set the value
|
|
1079
|
-
}
|
|
1080
|
-
stateTo[index].lastValue = fromValue; // record the value
|
|
1081
|
-
});
|
|
1082
|
-
}
|
|
1083
|
-
function initMemory(tagSupport) {
|
|
1084
|
-
const oldState = _setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse.memory.stateConfig.array;
|
|
1085
|
-
innerCallback = (callback) => {
|
|
1086
|
-
const trigger = (...args) => triggerStateUpdate(tagSupport, callback, oldState, ...args);
|
|
1087
|
-
return trigger;
|
|
1088
|
-
};
|
|
1089
|
-
}
|
|
1090
|
-
function triggerStateUpdate(tagSupport, callback, oldState, ...args) {
|
|
1091
|
-
const state = tagSupport.memory.state;
|
|
1092
|
-
const newest = state.newest;
|
|
1093
|
-
// ensure that the oldest has the latest values first
|
|
1094
|
-
updateState(newest, oldState);
|
|
1095
|
-
// run the callback
|
|
1096
|
-
const promise = callback(...args);
|
|
1097
|
-
// send the oldest state changes into the newest
|
|
1098
|
-
updateState(oldState, newest);
|
|
1099
|
-
(0,_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_2__.renderTagSupport)(tagSupport, false);
|
|
1100
|
-
if (promise instanceof Promise) {
|
|
1101
|
-
promise.finally(() => {
|
|
1102
|
-
// send the oldest state changes into the newest
|
|
1103
|
-
updateState(oldState, newest);
|
|
1104
|
-
(0,_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_2__.renderTagSupport)(tagSupport, false);
|
|
1105
|
-
});
|
|
1042
|
+
class SyncCallbackError extends TagError {
|
|
1043
|
+
constructor(message, details) {
|
|
1044
|
+
super(message, 'sync-callback-error', details);
|
|
1045
|
+
this.name = SyncCallbackError.name;
|
|
1106
1046
|
}
|
|
1107
1047
|
}
|
|
1108
1048
|
|
|
@@ -1495,8 +1435,6 @@ function subscribeToTemplate(insertBefore, subject, ownerTag, counts, // used fo
|
|
|
1495
1435
|
if (!insertBefore.parentNode) {
|
|
1496
1436
|
throw new Error('no insert before parent node - 3');
|
|
1497
1437
|
}
|
|
1498
|
-
const global = ownerTag.tagSupport.templater.global;
|
|
1499
|
-
const pre = global.placeholder?.parentNode;
|
|
1500
1438
|
(0,_processSubjectValue_function__WEBPACK_IMPORTED_MODULE_2__.processSubjectValue)(value, subject, insertBefore, ownerTag, {
|
|
1501
1439
|
counts: { ...counts },
|
|
1502
1440
|
forceElement: isForceElement,
|
|
@@ -1639,68 +1577,6 @@ function isLikeTags(tag0, tag1) {
|
|
|
1639
1577
|
}
|
|
1640
1578
|
|
|
1641
1579
|
|
|
1642
|
-
/***/ }),
|
|
1643
|
-
|
|
1644
|
-
/***/ "./ts/onDestroy.ts":
|
|
1645
|
-
/*!*************************!*\
|
|
1646
|
-
!*** ./ts/onDestroy.ts ***!
|
|
1647
|
-
\*************************/
|
|
1648
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1649
|
-
|
|
1650
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1651
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1652
|
-
/* harmony export */ onDestroy: () => (/* binding */ onDestroy)
|
|
1653
|
-
/* harmony export */ });
|
|
1654
|
-
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setUse.function */ "./ts/setUse.function.ts");
|
|
1655
|
-
|
|
1656
|
-
/** When undefined, it means a tag is being built for the first time so do run destroy(s) */
|
|
1657
|
-
let destroyCurrentTagSupport;
|
|
1658
|
-
function onDestroy(callback) {
|
|
1659
|
-
destroyCurrentTagSupport.templater.global.destroyCallback = callback;
|
|
1660
|
-
}
|
|
1661
|
-
(0,_setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse)({
|
|
1662
|
-
beforeRender: tagSupport => destroyCurrentTagSupport = tagSupport,
|
|
1663
|
-
beforeRedraw: tagSupport => destroyCurrentTagSupport = tagSupport,
|
|
1664
|
-
beforeDestroy: (tagSupport, tag) => {
|
|
1665
|
-
const callback = tagSupport.templater.global.destroyCallback;
|
|
1666
|
-
if (callback) {
|
|
1667
|
-
callback();
|
|
1668
|
-
}
|
|
1669
|
-
}
|
|
1670
|
-
});
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
/***/ }),
|
|
1674
|
-
|
|
1675
|
-
/***/ "./ts/onInit.ts":
|
|
1676
|
-
/*!**********************!*\
|
|
1677
|
-
!*** ./ts/onInit.ts ***!
|
|
1678
|
-
\**********************/
|
|
1679
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1680
|
-
|
|
1681
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1682
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1683
|
-
/* harmony export */ onInit: () => (/* binding */ onInit)
|
|
1684
|
-
/* harmony export */ });
|
|
1685
|
-
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setUse.function */ "./ts/setUse.function.ts");
|
|
1686
|
-
|
|
1687
|
-
function setCurrentTagSupport(support) {
|
|
1688
|
-
_setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse.memory.initCurrentTemplater = support.templater;
|
|
1689
|
-
}
|
|
1690
|
-
function onInit(callback) {
|
|
1691
|
-
const templater = _setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse.memory.initCurrentTemplater;
|
|
1692
|
-
if (!templater.global.init) {
|
|
1693
|
-
;
|
|
1694
|
-
templater.global.init = callback;
|
|
1695
|
-
callback(); // fire init
|
|
1696
|
-
}
|
|
1697
|
-
}
|
|
1698
|
-
(0,_setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse)({
|
|
1699
|
-
beforeRender: tagSupport => setCurrentTagSupport(tagSupport),
|
|
1700
|
-
beforeRedraw: tagSupport => setCurrentTagSupport(tagSupport),
|
|
1701
|
-
});
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
1580
|
/***/ }),
|
|
1705
1581
|
|
|
1706
1582
|
/***/ "./ts/processAttribute.function.ts":
|
|
@@ -1923,7 +1799,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1923
1799
|
/* harmony export */ processSubjectComponent: () => (/* binding */ processSubjectComponent)
|
|
1924
1800
|
/* harmony export */ });
|
|
1925
1801
|
/* harmony import */ var _TemplaterResult_class__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TemplaterResult.class */ "./ts/TemplaterResult.class.ts");
|
|
1926
|
-
/* harmony import */ var
|
|
1802
|
+
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state */ "./ts/state/index.ts");
|
|
1927
1803
|
/* harmony import */ var _processTagResult_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./processTagResult.function */ "./ts/processTagResult.function.ts");
|
|
1928
1804
|
/* harmony import */ var _TagSupport_class__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./TagSupport.class */ "./ts/TagSupport.class.ts");
|
|
1929
1805
|
|
|
@@ -1950,7 +1826,7 @@ function processSubjectComponent(templater, subject, insertBefore, ownerTag, opt
|
|
|
1950
1826
|
}
|
|
1951
1827
|
templater.global.insertBefore = insertBefore;
|
|
1952
1828
|
let retag = subject.tag;
|
|
1953
|
-
const providers =
|
|
1829
|
+
const providers = _state__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.providerConfig;
|
|
1954
1830
|
providers.ownerTag = ownerTag;
|
|
1955
1831
|
const isRedraw = !retag || options.forceElement;
|
|
1956
1832
|
if (isRedraw) {
|
|
@@ -2316,108 +2192,501 @@ previousTag) {
|
|
|
2316
2192
|
|
|
2317
2193
|
/***/ }),
|
|
2318
2194
|
|
|
2319
|
-
/***/ "./ts/
|
|
2320
|
-
|
|
2321
|
-
!*** ./ts/
|
|
2322
|
-
|
|
2195
|
+
/***/ "./ts/render.ts":
|
|
2196
|
+
/*!**********************!*\
|
|
2197
|
+
!*** ./ts/render.ts ***!
|
|
2198
|
+
\**********************/
|
|
2323
2199
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2324
2200
|
|
|
2325
2201
|
__webpack_require__.r(__webpack_exports__);
|
|
2326
2202
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2327
|
-
/* harmony export */
|
|
2203
|
+
/* harmony export */ buildClones: () => (/* binding */ buildClones)
|
|
2328
2204
|
/* harmony export */ });
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
provider.clone = (0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepClone)(provider.instance);
|
|
2341
|
-
});
|
|
2205
|
+
function buildClones(temporary, insertBefore) {
|
|
2206
|
+
const clones = [];
|
|
2207
|
+
const template = temporary.children[0];
|
|
2208
|
+
let nextSibling = template.content.firstChild;
|
|
2209
|
+
while (nextSibling) {
|
|
2210
|
+
const nextNextSibling = nextSibling.nextSibling;
|
|
2211
|
+
buildSibling(nextSibling, insertBefore);
|
|
2212
|
+
clones.push(nextSibling);
|
|
2213
|
+
nextSibling = nextNextSibling;
|
|
2214
|
+
}
|
|
2215
|
+
return clones;
|
|
2342
2216
|
}
|
|
2343
|
-
function
|
|
2344
|
-
const
|
|
2345
|
-
|
|
2346
|
-
if (tag.tagSupport.templater.global.deleted) {
|
|
2347
|
-
return; // i was deleted after another tag processed
|
|
2348
|
-
}
|
|
2349
|
-
const notRendered = renderCount === tag.tagSupport.templater.global.renderCount;
|
|
2350
|
-
if (notRendered) {
|
|
2351
|
-
provider.clone = (0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepClone)(provider.instance);
|
|
2352
|
-
(0,_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_1__.renderTagSupport)(tag.tagSupport, false);
|
|
2353
|
-
}
|
|
2354
|
-
});
|
|
2217
|
+
function buildSibling(nextSibling, insertBefore) {
|
|
2218
|
+
const parentNode = insertBefore.parentNode;
|
|
2219
|
+
parentNode.insertBefore(nextSibling, insertBefore);
|
|
2355
2220
|
}
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2221
|
+
|
|
2222
|
+
|
|
2223
|
+
/***/ }),
|
|
2224
|
+
|
|
2225
|
+
/***/ "./ts/renderExistingTag.function.ts":
|
|
2226
|
+
/*!******************************************!*\
|
|
2227
|
+
!*** ./ts/renderExistingTag.function.ts ***!
|
|
2228
|
+
\******************************************/
|
|
2229
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2230
|
+
|
|
2231
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2232
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2233
|
+
/* harmony export */ renderExistingTag: () => (/* binding */ renderExistingTag)
|
|
2234
|
+
/* harmony export */ });
|
|
2235
|
+
/* harmony import */ var _state_provider_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state/provider.utils */ "./ts/state/provider.utils.ts");
|
|
2236
|
+
/* harmony import */ var _TemplaterResult_class__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TemplaterResult.class */ "./ts/TemplaterResult.class.ts");
|
|
2237
|
+
/* harmony import */ var _isLikeTags_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isLikeTags.function */ "./ts/isLikeTags.function.ts");
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
/** Returns true when rendering owner is not needed. Returns false when rendering owner should occur */
|
|
2242
|
+
function renderExistingTag(oldestTag, // existing tag already there
|
|
2243
|
+
newTemplater, tagSupport, subject) {
|
|
2244
|
+
const tag = subject.tag;
|
|
2245
|
+
newTemplater.global = tag.tagSupport.templater.global;
|
|
2246
|
+
if (!oldestTag.hasLiveElements) {
|
|
2247
|
+
throw new Error('1080 - should have live elements');
|
|
2366
2248
|
}
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2249
|
+
const preRenderCount = tagSupport.templater.global.renderCount;
|
|
2250
|
+
(0,_state_provider_utils__WEBPACK_IMPORTED_MODULE_0__.providersChangeCheck)(oldestTag);
|
|
2251
|
+
// When the providers were checked, a render to myself occurred and I do not need to re-render again
|
|
2252
|
+
const latestTag = tagSupport.templater.global.newest;
|
|
2253
|
+
if (preRenderCount !== tagSupport.templater.global.renderCount) {
|
|
2254
|
+
oldestTag.updateByTag(latestTag);
|
|
2255
|
+
return latestTag;
|
|
2256
|
+
}
|
|
2257
|
+
const oldTemplater = tagSupport.templater || newTemplater;
|
|
2258
|
+
const toRedrawTag = subject.tag || oldTemplater.global.newest || oldTemplater.global.oldest; // hmmmmmm, why not newest?
|
|
2259
|
+
const redraw = (0,_TemplaterResult_class__WEBPACK_IMPORTED_MODULE_1__.renderWithSupport)(newTemplater.tagSupport, toRedrawTag, subject, oldestTag.ownerTag);
|
|
2260
|
+
const oldest = tagSupport.templater.global.oldest || oldestTag;
|
|
2261
|
+
redraw.tagSupport.templater.global.oldest = oldest;
|
|
2262
|
+
if ((0,_isLikeTags_function__WEBPACK_IMPORTED_MODULE_2__.isLikeTags)(latestTag, redraw)) {
|
|
2263
|
+
subject.tag = redraw;
|
|
2264
|
+
oldest.updateByTag(redraw);
|
|
2265
|
+
}
|
|
2266
|
+
return redraw;
|
|
2374
2267
|
}
|
|
2375
2268
|
|
|
2376
2269
|
|
|
2377
2270
|
/***/ }),
|
|
2378
2271
|
|
|
2379
|
-
/***/ "./ts/
|
|
2380
|
-
|
|
2381
|
-
!*** ./ts/
|
|
2382
|
-
|
|
2272
|
+
/***/ "./ts/renderTagSupport.function.ts":
|
|
2273
|
+
/*!*****************************************!*\
|
|
2274
|
+
!*** ./ts/renderTagSupport.function.ts ***!
|
|
2275
|
+
\*****************************************/
|
|
2383
2276
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2384
2277
|
|
|
2385
2278
|
__webpack_require__.r(__webpack_exports__);
|
|
2386
2279
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2387
|
-
/* harmony export */
|
|
2280
|
+
/* harmony export */ renderTagSupport: () => (/* binding */ renderTagSupport)
|
|
2388
2281
|
/* harmony export */ });
|
|
2389
2282
|
/* harmony import */ var _deepFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./deepFunctions */ "./ts/deepFunctions.ts");
|
|
2390
|
-
/* harmony import */ var
|
|
2283
|
+
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
2284
|
+
/* harmony import */ var _renderExistingTag_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./renderExistingTag.function */ "./ts/renderExistingTag.function.ts");
|
|
2391
2285
|
|
|
2392
2286
|
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
const
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2287
|
+
|
|
2288
|
+
/** Main function used by all other callers to render/update display of a tag component */
|
|
2289
|
+
function renderTagSupport(tagSupport, renderUp) {
|
|
2290
|
+
const global = tagSupport.templater.global;
|
|
2291
|
+
if ((0,_isInstance__WEBPACK_IMPORTED_MODULE_1__.isTagInstance)(tagSupport.templater)) {
|
|
2292
|
+
const newTag = global.newest;
|
|
2293
|
+
const ownerTag = newTag.ownerTag;
|
|
2294
|
+
++global.renderCount;
|
|
2295
|
+
return renderTagSupport(ownerTag.tagSupport, true);
|
|
2296
|
+
}
|
|
2297
|
+
// const oldTagSetup = this
|
|
2298
|
+
const subject = tagSupport.subject;
|
|
2299
|
+
const templater = tagSupport.templater; // oldTagSetup.templater // templater
|
|
2300
|
+
const subjectTag = subject.tag;
|
|
2301
|
+
const newest = subjectTag?.tagSupport.templater.global.newest;
|
|
2302
|
+
let ownerTag;
|
|
2303
|
+
let selfPropChange = false;
|
|
2304
|
+
const shouldRenderUp = renderUp && newest;
|
|
2305
|
+
if (shouldRenderUp) {
|
|
2306
|
+
ownerTag = newest.ownerTag;
|
|
2307
|
+
if (ownerTag) {
|
|
2308
|
+
const nowProps = templater.props;
|
|
2309
|
+
const latestProps = newest.tagSupport.propsConfig.latestCloned;
|
|
2310
|
+
selfPropChange = !(0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepEqual)(nowProps, latestProps);
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
const useTagSupport = global.newest?.tagSupport; // oldTagSetup
|
|
2314
|
+
if (!templater.global.oldest) {
|
|
2315
|
+
throw new Error('already causing trouble');
|
|
2316
|
+
}
|
|
2317
|
+
const tag = (0,_renderExistingTag_function__WEBPACK_IMPORTED_MODULE_2__.renderExistingTag)(templater.global.oldest, templater, useTagSupport, subject);
|
|
2318
|
+
const renderOwner = ownerTag && selfPropChange;
|
|
2319
|
+
if (renderOwner) {
|
|
2320
|
+
const ownerTagSupport = ownerTag.tagSupport;
|
|
2321
|
+
renderTagSupport(ownerTagSupport, true);
|
|
2322
|
+
return tag;
|
|
2323
|
+
}
|
|
2324
|
+
return tag;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
|
|
2328
|
+
/***/ }),
|
|
2329
|
+
|
|
2330
|
+
/***/ "./ts/scanTextAreaValue.function.ts":
|
|
2331
|
+
/*!******************************************!*\
|
|
2332
|
+
!*** ./ts/scanTextAreaValue.function.ts ***!
|
|
2333
|
+
\******************************************/
|
|
2334
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2335
|
+
|
|
2336
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2337
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2338
|
+
/* harmony export */ scanTextAreaValue: () => (/* binding */ scanTextAreaValue)
|
|
2339
|
+
/* harmony export */ });
|
|
2340
|
+
/* harmony import */ var _processAttribute_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./processAttribute.function */ "./ts/processAttribute.function.ts");
|
|
2341
|
+
|
|
2342
|
+
const search = new RegExp('\\s*<template interpolate end id="__tagvar(\\d{1,4})"([^>]*)></template>(\\s*)');
|
|
2343
|
+
function scanTextAreaValue(textarea, context, ownerTag) {
|
|
2344
|
+
const value = textarea.value;
|
|
2345
|
+
if (value.search(search) >= 0) {
|
|
2346
|
+
const match = value.match(/__tagvar(\d{1,4})/);
|
|
2347
|
+
const token = match ? match[0] : '';
|
|
2348
|
+
const dynamic = '{' + token + '}';
|
|
2349
|
+
textarea.value = '';
|
|
2350
|
+
textarea.setAttribute('text-var-value', dynamic);
|
|
2351
|
+
const howToSet = (_elm, _name, value) => textarea.value = value;
|
|
2352
|
+
(0,_processAttribute_function__WEBPACK_IMPORTED_MODULE_0__.processAttribute)('text-var-value', dynamic, // realValue, // context[token].value,
|
|
2353
|
+
textarea, context, ownerTag, howToSet);
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
/***/ }),
|
|
2359
|
+
|
|
2360
|
+
/***/ "./ts/state/callbackMaker.function.ts":
|
|
2361
|
+
/*!********************************************!*\
|
|
2362
|
+
!*** ./ts/state/callbackMaker.function.ts ***!
|
|
2363
|
+
\********************************************/
|
|
2364
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2365
|
+
|
|
2366
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2367
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2368
|
+
/* harmony export */ callbackMaker: () => (/* binding */ callbackMaker)
|
|
2369
|
+
/* harmony export */ });
|
|
2370
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2371
|
+
/* harmony import */ var _state_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state.utils */ "./ts/state/state.utils.ts");
|
|
2372
|
+
/* harmony import */ var _renderTagSupport_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../renderTagSupport.function */ "./ts/renderTagSupport.function.ts");
|
|
2373
|
+
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../errors */ "./ts/errors.ts");
|
|
2374
|
+
|
|
2375
|
+
|
|
2376
|
+
|
|
2377
|
+
|
|
2378
|
+
let innerCallback = (callback) => (...args) => {
|
|
2379
|
+
throw new _errors__WEBPACK_IMPORTED_MODULE_3__.SyncCallbackError('Callback function was called immediately in sync and must instead be call async');
|
|
2380
|
+
};
|
|
2381
|
+
const callbackMaker = () => innerCallback;
|
|
2382
|
+
const originalGetter = innerCallback; // callbackMaker
|
|
2383
|
+
(0,_setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse)({
|
|
2384
|
+
beforeRender: (tagSupport) => initMemory(tagSupport),
|
|
2385
|
+
beforeRedraw: (tagSupport) => initMemory(tagSupport),
|
|
2386
|
+
afterRender: (_tagSupport) => {
|
|
2387
|
+
innerCallback = originalGetter; // prevent crossing callbacks with another tag
|
|
2388
|
+
},
|
|
2389
|
+
});
|
|
2390
|
+
function updateState(stateFrom, stateTo) {
|
|
2391
|
+
stateFrom.forEach((state, index) => {
|
|
2392
|
+
const fromValue = (0,_state_utils__WEBPACK_IMPORTED_MODULE_1__.getStateValue)(state);
|
|
2393
|
+
const callback = stateTo[index].callback;
|
|
2394
|
+
if (callback) {
|
|
2395
|
+
callback(fromValue); // set the value
|
|
2396
|
+
}
|
|
2397
|
+
stateTo[index].lastValue = fromValue; // record the value
|
|
2398
|
+
});
|
|
2399
|
+
}
|
|
2400
|
+
function initMemory(tagSupport) {
|
|
2401
|
+
const oldState = _setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse.memory.stateConfig.array;
|
|
2402
|
+
innerCallback = (callback) => {
|
|
2403
|
+
const trigger = (...args) => triggerStateUpdate(tagSupport, callback, oldState, ...args);
|
|
2404
|
+
return trigger;
|
|
2405
|
+
};
|
|
2406
|
+
}
|
|
2407
|
+
function triggerStateUpdate(tagSupport, callback, oldState, ...args) {
|
|
2408
|
+
const state = tagSupport.memory.state;
|
|
2409
|
+
const newest = state.newest;
|
|
2410
|
+
// ensure that the oldest has the latest values first
|
|
2411
|
+
updateState(newest, oldState);
|
|
2412
|
+
// run the callback
|
|
2413
|
+
const promise = callback(...args);
|
|
2414
|
+
// send the oldest state changes into the newest
|
|
2415
|
+
updateState(oldState, newest);
|
|
2416
|
+
(0,_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_2__.renderTagSupport)(tagSupport, false);
|
|
2417
|
+
if (promise instanceof Promise) {
|
|
2418
|
+
promise.finally(() => {
|
|
2419
|
+
// send the oldest state changes into the newest
|
|
2420
|
+
updateState(oldState, newest);
|
|
2421
|
+
(0,_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_2__.renderTagSupport)(tagSupport, false);
|
|
2422
|
+
});
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
|
|
2427
|
+
/***/ }),
|
|
2428
|
+
|
|
2429
|
+
/***/ "./ts/state/index.ts":
|
|
2430
|
+
/*!***************************!*\
|
|
2431
|
+
!*** ./ts/state/index.ts ***!
|
|
2432
|
+
\***************************/
|
|
2433
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2434
|
+
|
|
2435
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2436
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2437
|
+
/* harmony export */ callbackMaker: () => (/* reexport safe */ _callbackMaker_function__WEBPACK_IMPORTED_MODULE_6__.callbackMaker),
|
|
2438
|
+
/* harmony export */ letState: () => (/* reexport safe */ _letState_function__WEBPACK_IMPORTED_MODULE_3__.letState),
|
|
2439
|
+
/* harmony export */ onDestroy: () => (/* reexport safe */ _onDestroy__WEBPACK_IMPORTED_MODULE_8__.onDestroy),
|
|
2440
|
+
/* harmony export */ onInit: () => (/* reexport safe */ _onInit__WEBPACK_IMPORTED_MODULE_7__.onInit),
|
|
2441
|
+
/* harmony export */ providers: () => (/* reexport safe */ _providers__WEBPACK_IMPORTED_MODULE_5__.providers),
|
|
2442
|
+
/* harmony export */ setProp: () => (/* reexport safe */ _setProp_function__WEBPACK_IMPORTED_MODULE_4__.setProp),
|
|
2443
|
+
/* harmony export */ setUse: () => (/* reexport safe */ _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse),
|
|
2444
|
+
/* harmony export */ state: () => (/* reexport safe */ _state_function__WEBPACK_IMPORTED_MODULE_2__.state),
|
|
2445
|
+
/* harmony export */ watch: () => (/* reexport safe */ _watch_function__WEBPACK_IMPORTED_MODULE_0__.watch)
|
|
2446
|
+
/* harmony export */ });
|
|
2447
|
+
/* harmony import */ var _watch_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./watch.function */ "./ts/state/watch.function.ts");
|
|
2448
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2449
|
+
/* harmony import */ var _state_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./state.function */ "./ts/state/state.function.ts");
|
|
2450
|
+
/* harmony import */ var _letState_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./letState.function */ "./ts/state/letState.function.ts");
|
|
2451
|
+
/* harmony import */ var _setProp_function__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./setProp.function */ "./ts/state/setProp.function.ts");
|
|
2452
|
+
/* harmony import */ var _providers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./providers */ "./ts/state/providers.ts");
|
|
2453
|
+
/* harmony import */ var _callbackMaker_function__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./callbackMaker.function */ "./ts/state/callbackMaker.function.ts");
|
|
2454
|
+
/* harmony import */ var _onInit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./onInit */ "./ts/state/onInit.ts");
|
|
2455
|
+
/* harmony import */ var _onDestroy__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./onDestroy */ "./ts/state/onDestroy.ts");
|
|
2456
|
+
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
/***/ }),
|
|
2468
|
+
|
|
2469
|
+
/***/ "./ts/state/letState.function.ts":
|
|
2470
|
+
/*!***************************************!*\
|
|
2471
|
+
!*** ./ts/state/letState.function.ts ***!
|
|
2472
|
+
\***************************************/
|
|
2473
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2474
|
+
|
|
2475
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2476
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2477
|
+
/* harmony export */ letState: () => (/* binding */ letState)
|
|
2478
|
+
/* harmony export */ });
|
|
2479
|
+
/* harmony import */ var _state_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state.utils */ "./ts/state/state.utils.ts");
|
|
2480
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2481
|
+
|
|
2482
|
+
|
|
2483
|
+
/** Used for variables that need to remain the same variable during render passes */
|
|
2484
|
+
function letState(defaultValue) {
|
|
2485
|
+
const config = _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.stateConfig;
|
|
2486
|
+
const rearray = config.rearray;
|
|
2487
|
+
let getSetMethod;
|
|
2488
|
+
const restate = rearray[config.array.length];
|
|
2489
|
+
if (restate) {
|
|
2490
|
+
let oldValue = (0,_state_utils__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(restate);
|
|
2491
|
+
getSetMethod = ((x) => [oldValue, oldValue = x]);
|
|
2492
|
+
const push = {
|
|
2493
|
+
get: () => (0,_state_utils__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(push),
|
|
2494
|
+
callback: getSetMethod,
|
|
2495
|
+
lastValue: oldValue,
|
|
2496
|
+
defaultValue: restate.defaultValue,
|
|
2497
|
+
};
|
|
2498
|
+
config.array.push(push);
|
|
2499
|
+
return makeStateResult(oldValue, push);
|
|
2500
|
+
}
|
|
2501
|
+
// State first time run
|
|
2502
|
+
const defaultFn = defaultValue instanceof Function ? defaultValue : () => defaultValue;
|
|
2503
|
+
let initValue = defaultFn();
|
|
2504
|
+
getSetMethod = ((x) => [initValue, initValue = x]);
|
|
2505
|
+
const push = {
|
|
2506
|
+
get: () => (0,_state_utils__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(push),
|
|
2507
|
+
callback: getSetMethod,
|
|
2508
|
+
lastValue: initValue,
|
|
2509
|
+
defaultValue: initValue,
|
|
2510
|
+
};
|
|
2511
|
+
config.array.push(push);
|
|
2512
|
+
return makeStateResult(initValue, push);
|
|
2513
|
+
}
|
|
2514
|
+
function makeStateResult(initValue, push) {
|
|
2515
|
+
// return initValue
|
|
2516
|
+
const result = (y) => {
|
|
2517
|
+
push.callback = y || (x => [initValue, initValue = x]);
|
|
2518
|
+
return initValue;
|
|
2519
|
+
};
|
|
2520
|
+
return result;
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
|
|
2524
|
+
/***/ }),
|
|
2525
|
+
|
|
2526
|
+
/***/ "./ts/state/onDestroy.ts":
|
|
2527
|
+
/*!*******************************!*\
|
|
2528
|
+
!*** ./ts/state/onDestroy.ts ***!
|
|
2529
|
+
\*******************************/
|
|
2530
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2531
|
+
|
|
2532
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2533
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2534
|
+
/* harmony export */ onDestroy: () => (/* binding */ onDestroy)
|
|
2535
|
+
/* harmony export */ });
|
|
2536
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2537
|
+
|
|
2538
|
+
/** When undefined, it means a tag is being built for the first time so do run destroy(s) */
|
|
2539
|
+
let destroyCurrentTagSupport;
|
|
2540
|
+
function onDestroy(callback) {
|
|
2541
|
+
destroyCurrentTagSupport.templater.global.destroyCallback = callback;
|
|
2542
|
+
}
|
|
2543
|
+
(0,_setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse)({
|
|
2544
|
+
beforeRender: tagSupport => destroyCurrentTagSupport = tagSupport,
|
|
2545
|
+
beforeRedraw: tagSupport => destroyCurrentTagSupport = tagSupport,
|
|
2546
|
+
beforeDestroy: (tagSupport, tag) => {
|
|
2547
|
+
const callback = tagSupport.templater.global.destroyCallback;
|
|
2548
|
+
if (callback) {
|
|
2549
|
+
callback();
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
});
|
|
2553
|
+
|
|
2554
|
+
|
|
2555
|
+
/***/ }),
|
|
2556
|
+
|
|
2557
|
+
/***/ "./ts/state/onInit.ts":
|
|
2558
|
+
/*!****************************!*\
|
|
2559
|
+
!*** ./ts/state/onInit.ts ***!
|
|
2560
|
+
\****************************/
|
|
2561
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2562
|
+
|
|
2563
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2564
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2565
|
+
/* harmony export */ onInit: () => (/* binding */ onInit)
|
|
2566
|
+
/* harmony export */ });
|
|
2567
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2568
|
+
|
|
2569
|
+
function setCurrentTagSupport(support) {
|
|
2570
|
+
_setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse.memory.initCurrentTemplater = support.templater;
|
|
2571
|
+
}
|
|
2572
|
+
function onInit(callback) {
|
|
2573
|
+
const templater = _setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse.memory.initCurrentTemplater;
|
|
2574
|
+
if (!templater.global.init) {
|
|
2575
|
+
;
|
|
2576
|
+
templater.global.init = callback;
|
|
2577
|
+
callback(); // fire init
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
(0,_setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse)({
|
|
2581
|
+
beforeRender: tagSupport => setCurrentTagSupport(tagSupport),
|
|
2582
|
+
beforeRedraw: tagSupport => setCurrentTagSupport(tagSupport),
|
|
2583
|
+
});
|
|
2584
|
+
|
|
2585
|
+
|
|
2586
|
+
/***/ }),
|
|
2587
|
+
|
|
2588
|
+
/***/ "./ts/state/provider.utils.ts":
|
|
2589
|
+
/*!************************************!*\
|
|
2590
|
+
!*** ./ts/state/provider.utils.ts ***!
|
|
2591
|
+
\************************************/
|
|
2592
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2593
|
+
|
|
2594
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2595
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2596
|
+
/* harmony export */ providersChangeCheck: () => (/* binding */ providersChangeCheck)
|
|
2597
|
+
/* harmony export */ });
|
|
2598
|
+
/* harmony import */ var _deepFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../deepFunctions */ "./ts/deepFunctions.ts");
|
|
2599
|
+
/* harmony import */ var _renderTagSupport_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../renderTagSupport.function */ "./ts/renderTagSupport.function.ts");
|
|
2600
|
+
|
|
2601
|
+
|
|
2602
|
+
function providersChangeCheck(tag) {
|
|
2603
|
+
const global = tag.tagSupport.templater.global;
|
|
2604
|
+
const providersWithChanges = global.providers.filter(provider => !(0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepEqual)(provider.instance, provider.clone));
|
|
2605
|
+
// reset clones
|
|
2606
|
+
providersWithChanges.forEach(provider => {
|
|
2607
|
+
const appElement = tag.getAppElement();
|
|
2608
|
+
handleProviderChanges(appElement, provider);
|
|
2609
|
+
provider.clone = (0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepClone)(provider.instance);
|
|
2610
|
+
});
|
|
2611
|
+
}
|
|
2612
|
+
function handleProviderChanges(appElement, provider) {
|
|
2613
|
+
const tagsWithProvider = getTagsWithProvider(appElement, provider);
|
|
2614
|
+
tagsWithProvider.forEach(({ tag, renderCount, provider }) => {
|
|
2615
|
+
if (tag.tagSupport.templater.global.deleted) {
|
|
2616
|
+
return; // i was deleted after another tag processed
|
|
2617
|
+
}
|
|
2618
|
+
const notRendered = renderCount === tag.tagSupport.templater.global.renderCount;
|
|
2619
|
+
if (notRendered) {
|
|
2620
|
+
provider.clone = (0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepClone)(provider.instance);
|
|
2621
|
+
(0,_renderTagSupport_function__WEBPACK_IMPORTED_MODULE_1__.renderTagSupport)(tag.tagSupport, false);
|
|
2622
|
+
}
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2625
|
+
function getTagsWithProvider(tag, provider, memory = []) {
|
|
2626
|
+
const global = tag.tagSupport.templater.global;
|
|
2627
|
+
const compare = global.providers;
|
|
2628
|
+
const hasProvider = compare.find(xProvider => xProvider.constructMethod === provider.constructMethod);
|
|
2629
|
+
if (hasProvider) {
|
|
2630
|
+
memory.push({
|
|
2631
|
+
tag,
|
|
2632
|
+
renderCount: global.renderCount,
|
|
2633
|
+
provider: hasProvider,
|
|
2634
|
+
});
|
|
2635
|
+
}
|
|
2636
|
+
tag.childTags.forEach(child => getTagsWithProvider(child, provider, memory));
|
|
2637
|
+
memory.forEach(({ tag }) => {
|
|
2638
|
+
if (tag.tagSupport.templater.global.deleted) {
|
|
2639
|
+
throw new Error('do not get here - 0');
|
|
2640
|
+
}
|
|
2641
|
+
});
|
|
2642
|
+
return memory;
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2645
|
+
|
|
2646
|
+
/***/ }),
|
|
2647
|
+
|
|
2648
|
+
/***/ "./ts/state/providers.ts":
|
|
2649
|
+
/*!*******************************!*\
|
|
2650
|
+
!*** ./ts/state/providers.ts ***!
|
|
2651
|
+
\*******************************/
|
|
2652
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2653
|
+
|
|
2654
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2655
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2656
|
+
/* harmony export */ providers: () => (/* binding */ providers)
|
|
2657
|
+
/* harmony export */ });
|
|
2658
|
+
/* harmony import */ var _deepFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../deepFunctions */ "./ts/deepFunctions.ts");
|
|
2659
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2660
|
+
|
|
2661
|
+
|
|
2662
|
+
// TODO: rename
|
|
2663
|
+
_setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.providerConfig = {
|
|
2664
|
+
providers: [],
|
|
2665
|
+
//currentTagSupport: undefined as TagSupport | undefined,
|
|
2666
|
+
ownerTag: undefined,
|
|
2667
|
+
};
|
|
2668
|
+
function get(constructMethod) {
|
|
2669
|
+
const config = _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.providerConfig;
|
|
2670
|
+
const providers = config.providers;
|
|
2671
|
+
return providers.find(provider => provider.constructMethod === constructMethod);
|
|
2672
|
+
}
|
|
2673
|
+
const providers = {
|
|
2674
|
+
create: (constructMethod) => {
|
|
2675
|
+
const existing = get(constructMethod);
|
|
2676
|
+
if (existing) {
|
|
2677
|
+
existing.clone = (0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepClone)(existing.instance);
|
|
2678
|
+
return existing.instance;
|
|
2679
|
+
}
|
|
2680
|
+
// Providers with provider requirements just need to use providers.create() and providers.inject()
|
|
2681
|
+
const instance = constructMethod.constructor ? new constructMethod() : constructMethod();
|
|
2682
|
+
const config = _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.providerConfig;
|
|
2683
|
+
config.providers.push({
|
|
2684
|
+
constructMethod,
|
|
2685
|
+
instance,
|
|
2686
|
+
clone: (0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepClone)(instance)
|
|
2687
|
+
});
|
|
2688
|
+
return instance;
|
|
2689
|
+
},
|
|
2421
2690
|
/**
|
|
2422
2691
|
* @template T
|
|
2423
2692
|
* @param {(new (...args: any[]) => T) | () => T} constructor
|
|
@@ -2477,185 +2746,147 @@ function run(tagSupport, ownerTag) {
|
|
|
2477
2746
|
|
|
2478
2747
|
/***/ }),
|
|
2479
2748
|
|
|
2480
|
-
/***/ "./ts/
|
|
2481
|
-
|
|
2482
|
-
!*** ./ts/
|
|
2483
|
-
|
|
2484
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2485
|
-
|
|
2486
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2487
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2488
|
-
/* harmony export */ buildClones: () => (/* binding */ buildClones)
|
|
2489
|
-
/* harmony export */ });
|
|
2490
|
-
function buildClones(temporary, insertBefore) {
|
|
2491
|
-
const clones = [];
|
|
2492
|
-
const template = temporary.children[0];
|
|
2493
|
-
let nextSibling = template.content.firstChild;
|
|
2494
|
-
while (nextSibling) {
|
|
2495
|
-
const nextNextSibling = nextSibling.nextSibling;
|
|
2496
|
-
buildSibling(nextSibling, insertBefore);
|
|
2497
|
-
clones.push(nextSibling);
|
|
2498
|
-
nextSibling = nextNextSibling;
|
|
2499
|
-
}
|
|
2500
|
-
return clones;
|
|
2501
|
-
}
|
|
2502
|
-
function buildSibling(nextSibling, insertBefore) {
|
|
2503
|
-
const parentNode = insertBefore.parentNode;
|
|
2504
|
-
parentNode.insertBefore(nextSibling, insertBefore);
|
|
2505
|
-
}
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
/***/ }),
|
|
2509
|
-
|
|
2510
|
-
/***/ "./ts/renderExistingTag.function.ts":
|
|
2511
|
-
/*!******************************************!*\
|
|
2512
|
-
!*** ./ts/renderExistingTag.function.ts ***!
|
|
2513
|
-
\******************************************/
|
|
2749
|
+
/***/ "./ts/state/setProp.function.ts":
|
|
2750
|
+
/*!**************************************!*\
|
|
2751
|
+
!*** ./ts/state/setProp.function.ts ***!
|
|
2752
|
+
\**************************************/
|
|
2514
2753
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2515
2754
|
|
|
2516
2755
|
__webpack_require__.r(__webpack_exports__);
|
|
2517
2756
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2518
|
-
/* harmony export */
|
|
2757
|
+
/* harmony export */ setProp: () => (/* binding */ setProp)
|
|
2519
2758
|
/* harmony export */ });
|
|
2520
|
-
/* harmony import */ var
|
|
2521
|
-
/* harmony import */ var
|
|
2522
|
-
/* harmony import */ var _isLikeTags_function__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isLikeTags.function */ "./ts/isLikeTags.function.ts");
|
|
2523
|
-
|
|
2759
|
+
/* harmony import */ var _state_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state.utils */ "./ts/state/state.utils.ts");
|
|
2760
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2524
2761
|
|
|
2525
2762
|
|
|
2526
|
-
/**
|
|
2527
|
-
function
|
|
2528
|
-
|
|
2529
|
-
const
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2763
|
+
/** Used for variables that need to remain the same variable during render passes */
|
|
2764
|
+
function setProp(getSet) {
|
|
2765
|
+
const config = _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.stateConfig;
|
|
2766
|
+
const rearray = config.rearray;
|
|
2767
|
+
const [propValue] = getSet(undefined);
|
|
2768
|
+
getSet(propValue); // restore original value instead of undefined
|
|
2769
|
+
const restate = rearray[config.array.length];
|
|
2770
|
+
if (restate) {
|
|
2771
|
+
let watchValue = restate.watch;
|
|
2772
|
+
let oldValue = (0,_state_utils__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(restate);
|
|
2773
|
+
const push = {
|
|
2774
|
+
get: () => (0,_state_utils__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(push),
|
|
2775
|
+
callback: getSet,
|
|
2776
|
+
lastValue: oldValue,
|
|
2777
|
+
watch: restate.watch,
|
|
2778
|
+
};
|
|
2779
|
+
// has the prop value changed?
|
|
2780
|
+
if (propValue != watchValue) {
|
|
2781
|
+
push.watch = propValue;
|
|
2782
|
+
oldValue = push.lastValue = propValue;
|
|
2783
|
+
}
|
|
2784
|
+
config.array.push(push);
|
|
2785
|
+
getSet(oldValue);
|
|
2786
|
+
return oldValue;
|
|
2550
2787
|
}
|
|
2551
|
-
|
|
2788
|
+
const push = {
|
|
2789
|
+
get: () => (0,_state_utils__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(push),
|
|
2790
|
+
callback: getSet,
|
|
2791
|
+
lastValue: propValue,
|
|
2792
|
+
watch: propValue,
|
|
2793
|
+
};
|
|
2794
|
+
config.array.push(push);
|
|
2795
|
+
return propValue;
|
|
2552
2796
|
}
|
|
2553
2797
|
|
|
2554
2798
|
|
|
2555
2799
|
/***/ }),
|
|
2556
|
-
|
|
2557
|
-
/***/ "./ts/
|
|
2558
|
-
|
|
2559
|
-
!*** ./ts/
|
|
2560
|
-
|
|
2561
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2562
|
-
|
|
2563
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2564
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2565
|
-
/* harmony export */
|
|
2566
|
-
/* harmony export */ });
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
const newTag = global.newest;
|
|
2578
|
-
const ownerTag = newTag.ownerTag;
|
|
2579
|
-
++global.renderCount;
|
|
2580
|
-
return renderTagSupport(ownerTag.tagSupport, true);
|
|
2581
|
-
}
|
|
2582
|
-
// const oldTagSetup = this
|
|
2583
|
-
const subject = tagSupport.subject;
|
|
2584
|
-
const templater = tagSupport.templater; // oldTagSetup.templater // templater
|
|
2585
|
-
const subjectTag = subject.tag;
|
|
2586
|
-
const newest = subjectTag?.tagSupport.templater.global.newest;
|
|
2587
|
-
let ownerTag;
|
|
2588
|
-
let selfPropChange = false;
|
|
2589
|
-
const shouldRenderUp = renderUp && newest;
|
|
2590
|
-
if (shouldRenderUp) {
|
|
2591
|
-
ownerTag = newest.ownerTag;
|
|
2592
|
-
if (ownerTag) {
|
|
2593
|
-
const nowProps = templater.props;
|
|
2594
|
-
const latestProps = newest.tagSupport.propsConfig.latestCloned;
|
|
2595
|
-
selfPropChange = !(0,_deepFunctions__WEBPACK_IMPORTED_MODULE_0__.deepEqual)(nowProps, latestProps);
|
|
2596
|
-
}
|
|
2597
|
-
}
|
|
2598
|
-
const useTagSupport = global.newest?.tagSupport; // oldTagSetup
|
|
2599
|
-
if (!templater.global.oldest) {
|
|
2600
|
-
throw new Error('already causing trouble');
|
|
2601
|
-
}
|
|
2602
|
-
const tag = (0,_renderExistingTag_function__WEBPACK_IMPORTED_MODULE_2__.renderExistingTag)(templater.global.oldest, templater, useTagSupport, subject);
|
|
2603
|
-
const renderOwner = ownerTag && selfPropChange;
|
|
2604
|
-
if (renderOwner) {
|
|
2605
|
-
const ownerTagSupport = ownerTag.tagSupport;
|
|
2606
|
-
renderTagSupport(ownerTagSupport, true);
|
|
2607
|
-
return tag;
|
|
2608
|
-
}
|
|
2609
|
-
return tag;
|
|
2800
|
+
|
|
2801
|
+
/***/ "./ts/state/setUse.function.ts":
|
|
2802
|
+
/*!*************************************!*\
|
|
2803
|
+
!*** ./ts/state/setUse.function.ts ***!
|
|
2804
|
+
\*************************************/
|
|
2805
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2806
|
+
|
|
2807
|
+
__webpack_require__.r(__webpack_exports__);
|
|
2808
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2809
|
+
/* harmony export */ setUse: () => (/* binding */ setUse)
|
|
2810
|
+
/* harmony export */ });
|
|
2811
|
+
const tagUse = [];
|
|
2812
|
+
function setUse(use) {
|
|
2813
|
+
// must provide defaults
|
|
2814
|
+
const useMe = {
|
|
2815
|
+
beforeRender: use.beforeRender || (() => undefined),
|
|
2816
|
+
beforeRedraw: use.beforeRedraw || (() => undefined),
|
|
2817
|
+
afterRender: use.afterRender || (() => undefined),
|
|
2818
|
+
beforeDestroy: use.beforeDestroy || (() => undefined),
|
|
2819
|
+
};
|
|
2820
|
+
setUse.tagUse.push(useMe);
|
|
2610
2821
|
}
|
|
2822
|
+
setUse.tagUse = tagUse;
|
|
2823
|
+
setUse.memory = {};
|
|
2611
2824
|
|
|
2612
2825
|
|
|
2613
2826
|
/***/ }),
|
|
2614
2827
|
|
|
2615
|
-
/***/ "./ts/
|
|
2616
|
-
|
|
2617
|
-
!*** ./ts/
|
|
2618
|
-
|
|
2828
|
+
/***/ "./ts/state/state.function.ts":
|
|
2829
|
+
/*!************************************!*\
|
|
2830
|
+
!*** ./ts/state/state.function.ts ***!
|
|
2831
|
+
\************************************/
|
|
2619
2832
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2620
2833
|
|
|
2621
2834
|
__webpack_require__.r(__webpack_exports__);
|
|
2622
2835
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2623
|
-
/* harmony export */
|
|
2836
|
+
/* harmony export */ state: () => (/* binding */ state)
|
|
2624
2837
|
/* harmony export */ });
|
|
2625
|
-
/* harmony import */ var
|
|
2838
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2839
|
+
/* harmony import */ var _state_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state.utils */ "./ts/state/state.utils.ts");
|
|
2626
2840
|
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2841
|
+
|
|
2842
|
+
/** Used for variables that need to remain the same variable during render passes */
|
|
2843
|
+
function state(defaultValue) {
|
|
2844
|
+
const config = _setUse_function__WEBPACK_IMPORTED_MODULE_0__.setUse.memory.stateConfig;
|
|
2845
|
+
let getSetMethod;
|
|
2846
|
+
const rearray = config.rearray;
|
|
2847
|
+
const restate = rearray[config.array.length];
|
|
2848
|
+
if (restate) {
|
|
2849
|
+
let oldValue = (0,_state_utils__WEBPACK_IMPORTED_MODULE_1__.getStateValue)(restate);
|
|
2850
|
+
getSetMethod = ((x) => [oldValue, oldValue = x]);
|
|
2851
|
+
const push = {
|
|
2852
|
+
get: () => (0,_state_utils__WEBPACK_IMPORTED_MODULE_1__.getStateValue)(push),
|
|
2853
|
+
callback: getSetMethod,
|
|
2854
|
+
lastValue: oldValue,
|
|
2855
|
+
defaultValue: restate.defaultValue,
|
|
2856
|
+
};
|
|
2857
|
+
config.array.push(push);
|
|
2858
|
+
return oldValue;
|
|
2639
2859
|
}
|
|
2860
|
+
// State first time run
|
|
2861
|
+
const defaultFn = defaultValue instanceof Function ? defaultValue : () => defaultValue;
|
|
2862
|
+
let initValue = defaultFn();
|
|
2863
|
+
getSetMethod = ((x) => [initValue, initValue = x]);
|
|
2864
|
+
const push = {
|
|
2865
|
+
get: () => (0,_state_utils__WEBPACK_IMPORTED_MODULE_1__.getStateValue)(push),
|
|
2866
|
+
callback: getSetMethod,
|
|
2867
|
+
lastValue: initValue,
|
|
2868
|
+
defaultValue: initValue,
|
|
2869
|
+
};
|
|
2870
|
+
config.array.push(push);
|
|
2871
|
+
return initValue;
|
|
2640
2872
|
}
|
|
2641
2873
|
|
|
2642
2874
|
|
|
2643
2875
|
/***/ }),
|
|
2644
2876
|
|
|
2645
|
-
/***/ "./ts/
|
|
2646
|
-
|
|
2647
|
-
!*** ./ts/
|
|
2648
|
-
|
|
2877
|
+
/***/ "./ts/state/state.utils.ts":
|
|
2878
|
+
/*!*********************************!*\
|
|
2879
|
+
!*** ./ts/state/state.utils.ts ***!
|
|
2880
|
+
\*********************************/
|
|
2649
2881
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2650
2882
|
|
|
2651
2883
|
__webpack_require__.r(__webpack_exports__);
|
|
2652
2884
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2653
2885
|
/* harmony export */ StateEchoBack: () => (/* binding */ StateEchoBack),
|
|
2654
|
-
/* harmony export */ getStateValue: () => (/* binding */ getStateValue)
|
|
2655
|
-
/* harmony export */ set: () => (/* binding */ set)
|
|
2886
|
+
/* harmony export */ getStateValue: () => (/* binding */ getStateValue)
|
|
2656
2887
|
/* harmony export */ });
|
|
2657
|
-
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*!
|
|
2658
|
-
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/setUse.function.ts");
|
|
2888
|
+
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../errors */ "./ts/errors.ts");
|
|
2889
|
+
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/state/setUse.function.ts");
|
|
2659
2890
|
|
|
2660
2891
|
|
|
2661
2892
|
// TODO: rename
|
|
@@ -2740,173 +2971,40 @@ function initState(tagSupport) {
|
|
|
2740
2971
|
}
|
|
2741
2972
|
config.tagSupport = tagSupport;
|
|
2742
2973
|
}
|
|
2743
|
-
/** Used for variables that need to remain the same variable during render passes */
|
|
2744
|
-
function set(defaultValue) {
|
|
2745
|
-
const config = _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.stateConfig;
|
|
2746
|
-
let getSetMethod;
|
|
2747
|
-
const rearray = config.rearray;
|
|
2748
|
-
const restate = rearray[config.array.length];
|
|
2749
|
-
if (restate) {
|
|
2750
|
-
let oldValue = getStateValue(restate);
|
|
2751
|
-
getSetMethod = ((x) => [oldValue, oldValue = x]);
|
|
2752
|
-
const push = {
|
|
2753
|
-
get: () => getStateValue(push),
|
|
2754
|
-
callback: getSetMethod,
|
|
2755
|
-
lastValue: oldValue,
|
|
2756
|
-
defaultValue: restate.defaultValue,
|
|
2757
|
-
};
|
|
2758
|
-
config.array.push(push);
|
|
2759
|
-
return oldValue;
|
|
2760
|
-
}
|
|
2761
|
-
// State first time run
|
|
2762
|
-
const defaultFn = defaultValue instanceof Function ? defaultValue : () => defaultValue;
|
|
2763
|
-
let initValue = defaultFn();
|
|
2764
|
-
getSetMethod = ((x) => [initValue, initValue = x]);
|
|
2765
|
-
const push = {
|
|
2766
|
-
get: () => getStateValue(push),
|
|
2767
|
-
callback: getSetMethod,
|
|
2768
|
-
lastValue: initValue,
|
|
2769
|
-
defaultValue: initValue,
|
|
2770
|
-
};
|
|
2771
|
-
config.array.push(push);
|
|
2772
|
-
return initValue;
|
|
2773
|
-
}
|
|
2774
2974
|
|
|
2775
2975
|
|
|
2776
2976
|
/***/ }),
|
|
2777
2977
|
|
|
2778
|
-
/***/ "./ts/
|
|
2779
|
-
|
|
2780
|
-
!*** ./ts/
|
|
2781
|
-
|
|
2978
|
+
/***/ "./ts/state/watch.function.ts":
|
|
2979
|
+
/*!************************************!*\
|
|
2980
|
+
!*** ./ts/state/watch.function.ts ***!
|
|
2981
|
+
\************************************/
|
|
2782
2982
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2783
2983
|
|
|
2784
2984
|
__webpack_require__.r(__webpack_exports__);
|
|
2785
2985
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2786
|
-
/* harmony export */
|
|
2986
|
+
/* harmony export */ watch: () => (/* binding */ watch)
|
|
2787
2987
|
/* harmony export */ });
|
|
2788
|
-
/* harmony import */ var
|
|
2789
|
-
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/setUse.function.ts");
|
|
2988
|
+
/* harmony import */ var _letState_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./letState.function */ "./ts/state/letState.function.ts");
|
|
2790
2989
|
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
let oldValue = (0,_set_function__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(restate);
|
|
2800
|
-
getSetMethod = ((x) => [oldValue, oldValue = x]);
|
|
2801
|
-
const push = {
|
|
2802
|
-
get: () => (0,_set_function__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(push),
|
|
2803
|
-
callback: getSetMethod,
|
|
2804
|
-
lastValue: oldValue,
|
|
2805
|
-
defaultValue: restate.defaultValue,
|
|
2806
|
-
};
|
|
2807
|
-
config.array.push(push);
|
|
2808
|
-
return makeStateResult(oldValue, push);
|
|
2990
|
+
/** When an item in watch array changes, callback function will be triggered */
|
|
2991
|
+
function watch(currentValues, callback) {
|
|
2992
|
+
let previousValues = (0,_letState_function__WEBPACK_IMPORTED_MODULE_0__.letState)(undefined)(x => [previousValues, previousValues = x]);
|
|
2993
|
+
if (previousValues === undefined) {
|
|
2994
|
+
callback(currentValues, previousValues);
|
|
2995
|
+
// const result = {currentValues, previousValues}
|
|
2996
|
+
previousValues = currentValues;
|
|
2997
|
+
return currentValues;
|
|
2809
2998
|
}
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
getSetMethod = ((x) => [initValue, initValue = x]);
|
|
2814
|
-
const push = {
|
|
2815
|
-
get: () => (0,_set_function__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(push),
|
|
2816
|
-
callback: getSetMethod,
|
|
2817
|
-
lastValue: initValue,
|
|
2818
|
-
defaultValue: initValue,
|
|
2819
|
-
};
|
|
2820
|
-
config.array.push(push);
|
|
2821
|
-
return makeStateResult(initValue, push);
|
|
2822
|
-
}
|
|
2823
|
-
function makeStateResult(initValue, push) {
|
|
2824
|
-
// return initValue
|
|
2825
|
-
const result = (y) => {
|
|
2826
|
-
push.callback = y || (x => [initValue, initValue = x]);
|
|
2827
|
-
return initValue;
|
|
2828
|
-
};
|
|
2829
|
-
return result;
|
|
2830
|
-
}
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
/***/ }),
|
|
2834
|
-
|
|
2835
|
-
/***/ "./ts/setProp.function.ts":
|
|
2836
|
-
/*!********************************!*\
|
|
2837
|
-
!*** ./ts/setProp.function.ts ***!
|
|
2838
|
-
\********************************/
|
|
2839
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2840
|
-
|
|
2841
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2842
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2843
|
-
/* harmony export */ setProp: () => (/* binding */ setProp)
|
|
2844
|
-
/* harmony export */ });
|
|
2845
|
-
/* harmony import */ var _set_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set.function */ "./ts/set.function.ts");
|
|
2846
|
-
/* harmony import */ var _setUse_function__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setUse.function */ "./ts/setUse.function.ts");
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
/** Used for variables that need to remain the same variable during render passes */
|
|
2850
|
-
function setProp(getSet) {
|
|
2851
|
-
const config = _setUse_function__WEBPACK_IMPORTED_MODULE_1__.setUse.memory.stateConfig;
|
|
2852
|
-
const rearray = config.rearray;
|
|
2853
|
-
const [propValue] = getSet(undefined);
|
|
2854
|
-
getSet(propValue); // restore original value instead of undefined
|
|
2855
|
-
const restate = rearray[config.array.length];
|
|
2856
|
-
if (restate) {
|
|
2857
|
-
let watchValue = restate.watch;
|
|
2858
|
-
let oldValue = (0,_set_function__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(restate);
|
|
2859
|
-
const push = {
|
|
2860
|
-
get: () => (0,_set_function__WEBPACK_IMPORTED_MODULE_0__.getStateValue)(push),
|
|
2861
|
-
callback: getSet,
|
|
2862
|
-
lastValue: oldValue,
|
|
2863
|
-
watch: restate.watch,
|
|
2864
|
-
};
|
|
2865
|
-
// has the prop value changed?
|
|
2866
|
-
if (propValue != watchValue) {
|
|
2867
|
-
push.watch = propValue;
|
|
2868
|
-
oldValue = push.lastValue = propValue;
|
|
2869
|
-
}
|
|
2870
|
-
config.array.push(push);
|
|
2871
|
-
getSet(oldValue);
|
|
2872
|
-
return oldValue;
|
|
2999
|
+
const allExact = currentValues.every((item, index) => item === previousValues[index]);
|
|
3000
|
+
if (allExact) {
|
|
3001
|
+
return currentValues;
|
|
2873
3002
|
}
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
watch: propValue,
|
|
2879
|
-
};
|
|
2880
|
-
config.array.push(push);
|
|
2881
|
-
return propValue;
|
|
2882
|
-
}
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
/***/ }),
|
|
2886
|
-
|
|
2887
|
-
/***/ "./ts/setUse.function.ts":
|
|
2888
|
-
/*!*******************************!*\
|
|
2889
|
-
!*** ./ts/setUse.function.ts ***!
|
|
2890
|
-
\*******************************/
|
|
2891
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2892
|
-
|
|
2893
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2894
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2895
|
-
/* harmony export */ setUse: () => (/* binding */ setUse)
|
|
2896
|
-
/* harmony export */ });
|
|
2897
|
-
const tagUse = [];
|
|
2898
|
-
function setUse(use) {
|
|
2899
|
-
// must provide defaults
|
|
2900
|
-
const useMe = {
|
|
2901
|
-
beforeRender: use.beforeRender || (() => undefined),
|
|
2902
|
-
beforeRedraw: use.beforeRedraw || (() => undefined),
|
|
2903
|
-
afterRender: use.afterRender || (() => undefined),
|
|
2904
|
-
beforeDestroy: use.beforeDestroy || (() => undefined),
|
|
2905
|
-
};
|
|
2906
|
-
setUse.tagUse.push(useMe);
|
|
3003
|
+
callback(currentValues, previousValues);
|
|
3004
|
+
previousValues.length = 0;
|
|
3005
|
+
previousValues.push(...currentValues);
|
|
3006
|
+
return currentValues;
|
|
2907
3007
|
}
|
|
2908
|
-
setUse.tagUse = tagUse;
|
|
2909
|
-
setUse.memory = {};
|
|
2910
3008
|
|
|
2911
3009
|
|
|
2912
3010
|
/***/ }),
|
|
@@ -2938,8 +3036,8 @@ class Subject {
|
|
|
2938
3036
|
// are we in a pipe?
|
|
2939
3037
|
if (this.methods.length) {
|
|
2940
3038
|
const orgCallback = callback;
|
|
2941
|
-
callback = (value
|
|
2942
|
-
runPipedMethods(value,
|
|
3039
|
+
callback = (value) => {
|
|
3040
|
+
runPipedMethods(value, this.methods, lastValue => orgCallback(lastValue));
|
|
2943
3041
|
};
|
|
2944
3042
|
}
|
|
2945
3043
|
return subscribeWith(callback);
|
|
@@ -3007,12 +3105,12 @@ function getSubscription(subject, callback) {
|
|
|
3007
3105
|
};
|
|
3008
3106
|
return subscription;
|
|
3009
3107
|
}
|
|
3010
|
-
function runPipedMethods(value,
|
|
3108
|
+
function runPipedMethods(value, methods, onComplete) {
|
|
3011
3109
|
const cloneMethods = [...methods];
|
|
3012
3110
|
const firstMethod = cloneMethods.shift();
|
|
3013
3111
|
const next = (newValue) => {
|
|
3014
3112
|
if (cloneMethods.length) {
|
|
3015
|
-
return runPipedMethods(newValue,
|
|
3113
|
+
return runPipedMethods(newValue, cloneMethods, onComplete);
|
|
3016
3114
|
}
|
|
3017
3115
|
onComplete(newValue);
|
|
3018
3116
|
// return newValue = next
|
|
@@ -3048,7 +3146,7 @@ class ValueSubject extends _Subject_class__WEBPACK_IMPORTED_MODULE_0__.Subject {
|
|
|
3048
3146
|
subscribe(callback) {
|
|
3049
3147
|
const subscription = super.subscribe(callback);
|
|
3050
3148
|
// Call the callback immediately with the current value
|
|
3051
|
-
callback(this.value
|
|
3149
|
+
callback(this.value);
|
|
3052
3150
|
return subscription;
|
|
3053
3151
|
}
|
|
3054
3152
|
}
|
|
@@ -3180,7 +3278,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3180
3278
|
/* harmony export */ tags: () => (/* binding */ tags)
|
|
3181
3279
|
/* harmony export */ });
|
|
3182
3280
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
3183
|
-
/* harmony import */ var
|
|
3281
|
+
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./state */ "./ts/state/index.ts");
|
|
3184
3282
|
/* harmony import */ var _TemplaterResult_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TemplaterResult.class */ "./ts/TemplaterResult.class.ts");
|
|
3185
3283
|
/* harmony import */ var _bindSubjectCallback_function__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bindSubjectCallback.function */ "./ts/bindSubjectCallback.function.ts");
|
|
3186
3284
|
/* harmony import */ var _deepFunctions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./deepFunctions */ "./ts/deepFunctions.ts");
|
|
@@ -3245,7 +3343,7 @@ function updateResult(result, tagComponent) {
|
|
|
3245
3343
|
}
|
|
3246
3344
|
function updateComponent(tagComponent) {
|
|
3247
3345
|
tagComponent.tags = tags;
|
|
3248
|
-
tagComponent.setUse =
|
|
3346
|
+
tagComponent.setUse = _state__WEBPACK_IMPORTED_MODULE_1__.setUse;
|
|
3249
3347
|
tagComponent.tagIndex = tagCount++; // needed for things like HMR
|
|
3250
3348
|
}
|
|
3251
3349
|
/** creates/returns a function that when called then calls the original component function */
|
|
@@ -3395,24 +3493,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3395
3493
|
/* harmony export */ runBeforeRedraw: () => (/* binding */ runBeforeRedraw),
|
|
3396
3494
|
/* harmony export */ runBeforeRender: () => (/* binding */ runBeforeRender)
|
|
3397
3495
|
/* harmony export */ });
|
|
3398
|
-
/* harmony import */ var
|
|
3496
|
+
/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./state */ "./ts/state/index.ts");
|
|
3399
3497
|
// TODO: This should be more like `new TaggedJs().use({})`
|
|
3400
3498
|
|
|
3401
3499
|
// Life cycle 1
|
|
3402
3500
|
function runBeforeRender(tagSupport, tagOwner) {
|
|
3403
|
-
|
|
3501
|
+
_state__WEBPACK_IMPORTED_MODULE_0__.setUse.tagUse.forEach(tagUse => tagUse.beforeRender(tagSupport, tagOwner));
|
|
3404
3502
|
}
|
|
3405
3503
|
// Life cycle 2
|
|
3406
3504
|
function runAfterRender(tagSupport, tag) {
|
|
3407
|
-
|
|
3505
|
+
_state__WEBPACK_IMPORTED_MODULE_0__.setUse.tagUse.forEach(tagUse => tagUse.afterRender(tagSupport, tag));
|
|
3408
3506
|
}
|
|
3409
3507
|
// Life cycle 3
|
|
3410
3508
|
function runBeforeRedraw(tagSupport, tag) {
|
|
3411
|
-
|
|
3509
|
+
_state__WEBPACK_IMPORTED_MODULE_0__.setUse.tagUse.forEach(tagUse => tagUse.beforeRedraw(tagSupport, tag));
|
|
3412
3510
|
}
|
|
3413
3511
|
// Life cycle 4 - end of life
|
|
3414
3512
|
function runBeforeDestroy(tagSupport, tag) {
|
|
3415
|
-
|
|
3513
|
+
_state__WEBPACK_IMPORTED_MODULE_0__.setUse.tagUse.forEach(tagUse => tagUse.beforeDestroy(tagSupport, tag));
|
|
3416
3514
|
}
|
|
3417
3515
|
|
|
3418
3516
|
|
|
@@ -3479,7 +3577,6 @@ function updateExistingTagComponent(ownerTag, templater, subject, insertBefore)
|
|
|
3479
3577
|
}
|
|
3480
3578
|
const oldTagSupport = existingTag.tagSupport;
|
|
3481
3579
|
const oldGlobal = oldTagSupport.templater.global;
|
|
3482
|
-
const globalInsert = oldGlobal.insertBefore;
|
|
3483
3580
|
// const placeholderElm = ownerTag.tagSupport.templater.global.placeholderElm
|
|
3484
3581
|
const placeholderElm = oldGlobal.placeholder;
|
|
3485
3582
|
if (placeholderElm) {
|
|
@@ -3729,40 +3826,6 @@ function handleStillTag(existingTag, subject, value, ownerTag) {
|
|
|
3729
3826
|
}
|
|
3730
3827
|
|
|
3731
3828
|
|
|
3732
|
-
/***/ }),
|
|
3733
|
-
|
|
3734
|
-
/***/ "./ts/watch.function.ts":
|
|
3735
|
-
/*!******************************!*\
|
|
3736
|
-
!*** ./ts/watch.function.ts ***!
|
|
3737
|
-
\******************************/
|
|
3738
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3739
|
-
|
|
3740
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3741
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3742
|
-
/* harmony export */ watch: () => (/* binding */ watch)
|
|
3743
|
-
/* harmony export */ });
|
|
3744
|
-
/* harmony import */ var _setLet_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setLet.function */ "./ts/setLet.function.ts");
|
|
3745
|
-
|
|
3746
|
-
/** When an item in watch array changes, callback function will be triggered */
|
|
3747
|
-
function watch(currentValues, callback) {
|
|
3748
|
-
let previousValues = (0,_setLet_function__WEBPACK_IMPORTED_MODULE_0__.setLet)(undefined)(x => [previousValues, previousValues = x]);
|
|
3749
|
-
if (previousValues === undefined) {
|
|
3750
|
-
callback(currentValues, previousValues);
|
|
3751
|
-
// const result = {currentValues, previousValues}
|
|
3752
|
-
previousValues = currentValues;
|
|
3753
|
-
return currentValues;
|
|
3754
|
-
}
|
|
3755
|
-
const allExact = currentValues.every((item, index) => item === previousValues[index]);
|
|
3756
|
-
if (allExact) {
|
|
3757
|
-
return currentValues;
|
|
3758
|
-
}
|
|
3759
|
-
callback(currentValues, previousValues);
|
|
3760
|
-
previousValues.length = 0;
|
|
3761
|
-
previousValues.push(...currentValues);
|
|
3762
|
-
return currentValues;
|
|
3763
|
-
}
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
3829
|
/***/ })
|
|
3767
3830
|
|
|
3768
3831
|
/******/ });
|
|
@@ -3833,12 +3896,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3833
3896
|
/* harmony export */ BaseTagSupport: () => (/* reexport safe */ _TagSupport_class__WEBPACK_IMPORTED_MODULE_8__.BaseTagSupport),
|
|
3834
3897
|
/* harmony export */ StateMismatchError: () => (/* reexport safe */ _errors__WEBPACK_IMPORTED_MODULE_4__.StateMismatchError),
|
|
3835
3898
|
/* harmony export */ Subject: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.Subject),
|
|
3899
|
+
/* harmony export */ SyncCallbackError: () => (/* reexport safe */ _errors__WEBPACK_IMPORTED_MODULE_4__.SyncCallbackError),
|
|
3836
3900
|
/* harmony export */ Tag: () => (/* reexport safe */ _Tag_class__WEBPACK_IMPORTED_MODULE_10__.Tag),
|
|
3837
3901
|
/* harmony export */ TagError: () => (/* reexport safe */ _errors__WEBPACK_IMPORTED_MODULE_4__.TagError),
|
|
3838
3902
|
/* harmony export */ TagSupport: () => (/* reexport safe */ _TagSupport_class__WEBPACK_IMPORTED_MODULE_8__.TagSupport),
|
|
3839
3903
|
/* harmony export */ ValueSubject: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.ValueSubject),
|
|
3904
|
+
/* harmony export */ callbackMaker: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.callbackMaker),
|
|
3840
3905
|
/* harmony export */ combineLatest: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.combineLatest),
|
|
3841
|
-
/* harmony export */ getCallback: () => (/* reexport safe */ _getCallback__WEBPACK_IMPORTED_MODULE_19__.getCallback),
|
|
3842
3906
|
/* harmony export */ hmr: () => (/* binding */ hmr),
|
|
3843
3907
|
/* harmony export */ html: () => (/* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_3__.html),
|
|
3844
3908
|
/* harmony export */ interpolateElement: () => (/* reexport safe */ _interpolateElement__WEBPACK_IMPORTED_MODULE_9__.interpolateElement),
|
|
@@ -3847,18 +3911,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3847
3911
|
/* harmony export */ isTagArray: () => (/* reexport safe */ _isInstance__WEBPACK_IMPORTED_MODULE_6__.isTagArray),
|
|
3848
3912
|
/* harmony export */ isTagComponent: () => (/* reexport safe */ _isInstance__WEBPACK_IMPORTED_MODULE_6__.isTagComponent),
|
|
3849
3913
|
/* harmony export */ isTagInstance: () => (/* reexport safe */ _isInstance__WEBPACK_IMPORTED_MODULE_6__.isTagInstance),
|
|
3850
|
-
/* harmony export */
|
|
3851
|
-
/* harmony export */
|
|
3852
|
-
/* harmony export */
|
|
3914
|
+
/* harmony export */ letState: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.letState),
|
|
3915
|
+
/* harmony export */ onDestroy: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.onDestroy),
|
|
3916
|
+
/* harmony export */ onInit: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.onInit),
|
|
3917
|
+
/* harmony export */ providers: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.providers),
|
|
3853
3918
|
/* harmony export */ runBeforeRender: () => (/* reexport safe */ _tagRunner__WEBPACK_IMPORTED_MODULE_11__.runBeforeRender),
|
|
3854
|
-
/* harmony export */
|
|
3855
|
-
/* harmony export */
|
|
3856
|
-
/* harmony export */
|
|
3857
|
-
/* harmony export */ setUse: () => (/* reexport safe */ _setUse_function__WEBPACK_IMPORTED_MODULE_12__.setUse),
|
|
3919
|
+
/* harmony export */ setProp: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.setProp),
|
|
3920
|
+
/* harmony export */ setUse: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.setUse),
|
|
3921
|
+
/* harmony export */ state: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.state),
|
|
3858
3922
|
/* harmony export */ tag: () => (/* reexport safe */ _tag__WEBPACK_IMPORTED_MODULE_2__.tag),
|
|
3859
3923
|
/* harmony export */ tagElement: () => (/* reexport safe */ _tagElement__WEBPACK_IMPORTED_MODULE_0__.tagElement),
|
|
3860
3924
|
/* harmony export */ tags: () => (/* reexport safe */ _tag__WEBPACK_IMPORTED_MODULE_2__.tags),
|
|
3861
|
-
/* harmony export */ watch: () => (/* reexport safe */
|
|
3925
|
+
/* harmony export */ watch: () => (/* reexport safe */ _state_index__WEBPACK_IMPORTED_MODULE_7__.watch),
|
|
3862
3926
|
/* harmony export */ willCallback: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.willCallback),
|
|
3863
3927
|
/* harmony export */ willPromise: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.willPromise),
|
|
3864
3928
|
/* harmony export */ willSubscribe: () => (/* reexport safe */ _subject_index__WEBPACK_IMPORTED_MODULE_5__.willSubscribe)
|
|
@@ -3870,19 +3934,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3870
3934
|
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./errors */ "./ts/errors.ts");
|
|
3871
3935
|
/* harmony import */ var _subject_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./subject/index */ "./ts/subject/index.ts");
|
|
3872
3936
|
/* harmony import */ var _isInstance__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isInstance */ "./ts/isInstance.ts");
|
|
3873
|
-
/* harmony import */ var
|
|
3937
|
+
/* harmony import */ var _state_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./state/index */ "./ts/state/index.ts");
|
|
3874
3938
|
/* harmony import */ var _TagSupport_class__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./TagSupport.class */ "./ts/TagSupport.class.ts");
|
|
3875
3939
|
/* harmony import */ var _interpolateElement__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./interpolateElement */ "./ts/interpolateElement.ts");
|
|
3876
3940
|
/* harmony import */ var _Tag_class__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Tag.class */ "./ts/Tag.class.ts");
|
|
3877
3941
|
/* 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");
|
|
3886
3942
|
// import { redrawTag } from "./redrawTag.function"
|
|
3887
3943
|
|
|
3888
3944
|
|
|
@@ -3899,17 +3955,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3899
3955
|
|
|
3900
3956
|
|
|
3901
3957
|
|
|
3902
|
-
|
|
3903
|
-
/* hooks */
|
|
3904
|
-
// TODO: export *
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
/* end: hooks */
|
|
3913
3958
|
const hmr = {
|
|
3914
3959
|
tagElement: _tagElement__WEBPACK_IMPORTED_MODULE_0__.tagElement,
|
|
3915
3960
|
// redrawTag
|
|
@@ -3921,12 +3966,13 @@ var __webpack_exports__ArrayNoKeyError = __webpack_exports__.ArrayNoKeyError;
|
|
|
3921
3966
|
var __webpack_exports__BaseTagSupport = __webpack_exports__.BaseTagSupport;
|
|
3922
3967
|
var __webpack_exports__StateMismatchError = __webpack_exports__.StateMismatchError;
|
|
3923
3968
|
var __webpack_exports__Subject = __webpack_exports__.Subject;
|
|
3969
|
+
var __webpack_exports__SyncCallbackError = __webpack_exports__.SyncCallbackError;
|
|
3924
3970
|
var __webpack_exports__Tag = __webpack_exports__.Tag;
|
|
3925
3971
|
var __webpack_exports__TagError = __webpack_exports__.TagError;
|
|
3926
3972
|
var __webpack_exports__TagSupport = __webpack_exports__.TagSupport;
|
|
3927
3973
|
var __webpack_exports__ValueSubject = __webpack_exports__.ValueSubject;
|
|
3974
|
+
var __webpack_exports__callbackMaker = __webpack_exports__.callbackMaker;
|
|
3928
3975
|
var __webpack_exports__combineLatest = __webpack_exports__.combineLatest;
|
|
3929
|
-
var __webpack_exports__getCallback = __webpack_exports__.getCallback;
|
|
3930
3976
|
var __webpack_exports__hmr = __webpack_exports__.hmr;
|
|
3931
3977
|
var __webpack_exports__html = __webpack_exports__.html;
|
|
3932
3978
|
var __webpack_exports__interpolateElement = __webpack_exports__.interpolateElement;
|
|
@@ -3935,14 +3981,14 @@ var __webpack_exports__isSubjectInstance = __webpack_exports__.isSubjectInstance
|
|
|
3935
3981
|
var __webpack_exports__isTagArray = __webpack_exports__.isTagArray;
|
|
3936
3982
|
var __webpack_exports__isTagComponent = __webpack_exports__.isTagComponent;
|
|
3937
3983
|
var __webpack_exports__isTagInstance = __webpack_exports__.isTagInstance;
|
|
3984
|
+
var __webpack_exports__letState = __webpack_exports__.letState;
|
|
3938
3985
|
var __webpack_exports__onDestroy = __webpack_exports__.onDestroy;
|
|
3939
3986
|
var __webpack_exports__onInit = __webpack_exports__.onInit;
|
|
3940
3987
|
var __webpack_exports__providers = __webpack_exports__.providers;
|
|
3941
3988
|
var __webpack_exports__runBeforeRender = __webpack_exports__.runBeforeRender;
|
|
3942
|
-
var __webpack_exports__set = __webpack_exports__.set;
|
|
3943
|
-
var __webpack_exports__setLet = __webpack_exports__.setLet;
|
|
3944
3989
|
var __webpack_exports__setProp = __webpack_exports__.setProp;
|
|
3945
3990
|
var __webpack_exports__setUse = __webpack_exports__.setUse;
|
|
3991
|
+
var __webpack_exports__state = __webpack_exports__.state;
|
|
3946
3992
|
var __webpack_exports__tag = __webpack_exports__.tag;
|
|
3947
3993
|
var __webpack_exports__tagElement = __webpack_exports__.tagElement;
|
|
3948
3994
|
var __webpack_exports__tags = __webpack_exports__.tags;
|
|
@@ -3950,6 +3996,6 @@ var __webpack_exports__watch = __webpack_exports__.watch;
|
|
|
3950
3996
|
var __webpack_exports__willCallback = __webpack_exports__.willCallback;
|
|
3951
3997
|
var __webpack_exports__willPromise = __webpack_exports__.willPromise;
|
|
3952
3998
|
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,
|
|
3999
|
+
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__callbackMaker as callbackMaker, __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__isSubjectInstance as isSubjectInstance, __webpack_exports__isTagArray as isTagArray, __webpack_exports__isTagComponent as isTagComponent, __webpack_exports__isTagInstance as isTagInstance, __webpack_exports__letState as letState, __webpack_exports__onDestroy as onDestroy, __webpack_exports__onInit as onInit, __webpack_exports__providers as providers, __webpack_exports__runBeforeRender as runBeforeRender, __webpack_exports__setProp as setProp, __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 };
|
|
3954
4000
|
|
|
3955
4001
|
//# sourceMappingURL=bundle.js.map
|