@tko/build.knockout 4.0.0-beta1.4 → 4.0.0-beta1.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/dist/browser.js +147 -84
- package/dist/browser.js.map +3 -3
- package/dist/browser.min.js +6 -6
- package/dist/browser.min.js.map +3 -3
- package/dist/common.js +2 -1
- package/dist/common.js.map +1 -1
- package/dist/index.cjs +147 -84
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/dist/knockout-v4.0.0-beta1.3.zip +0 -0
package/dist/browser.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
// @tko/build.knockout 🥊 4.0.0-beta1.6 IIFE
|
|
2
3
|
var ko = (() => {
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -2146,10 +2147,10 @@ var ko = (() => {
|
|
|
2146
2147
|
return a >= b;
|
|
2147
2148
|
},
|
|
2148
2149
|
"==": function equal(a, b) {
|
|
2149
|
-
return a
|
|
2150
|
+
return a == b;
|
|
2150
2151
|
},
|
|
2151
2152
|
"!=": function ne(a, b) {
|
|
2152
|
-
return a
|
|
2153
|
+
return a != b;
|
|
2153
2154
|
},
|
|
2154
2155
|
"===": function sequal(a, b) {
|
|
2155
2156
|
return a === b;
|
|
@@ -2176,13 +2177,13 @@ var ko = (() => {
|
|
|
2176
2177
|
return a != null ? a : b;
|
|
2177
2178
|
},
|
|
2178
2179
|
".": function member(a, b) {
|
|
2179
|
-
return a[b];
|
|
2180
|
+
return a == null ? void 0 : a[b];
|
|
2180
2181
|
},
|
|
2181
|
-
"?.": function
|
|
2182
|
+
"?.": function omember(a, b) {
|
|
2182
2183
|
return a == null ? void 0 : a[b];
|
|
2183
2184
|
},
|
|
2184
|
-
"[": function
|
|
2185
|
-
return a[b];
|
|
2185
|
+
"[": function bmember(a, b) {
|
|
2186
|
+
return a == null ? void 0 : a[b];
|
|
2186
2187
|
},
|
|
2187
2188
|
",": function comma(a, b) {
|
|
2188
2189
|
return b;
|
|
@@ -2352,24 +2353,24 @@ var ko = (() => {
|
|
|
2352
2353
|
this.parser = parser;
|
|
2353
2354
|
}
|
|
2354
2355
|
dereference(value2, $context, globals, node) {
|
|
2355
|
-
let
|
|
2356
|
+
let member2;
|
|
2356
2357
|
let refs = this.dereferences || [];
|
|
2357
2358
|
const $data = $context.$data || {};
|
|
2358
2359
|
let lastValue;
|
|
2359
2360
|
let i, n;
|
|
2360
2361
|
for (i = 0, n = refs.length; i < n; ++i) {
|
|
2361
|
-
|
|
2362
|
+
member2 = Node2.value_of(refs[i], $context, globals, node);
|
|
2362
2363
|
if (typeof value2 === "function" && refs[i] instanceof Arguments) {
|
|
2363
|
-
value2 = value2.apply(lastValue || $data,
|
|
2364
|
+
value2 = value2.apply(lastValue || $data, member2);
|
|
2364
2365
|
lastValue = value2;
|
|
2365
2366
|
} else if (value2 === null || value2 === void 0) {
|
|
2366
|
-
|
|
2367
|
+
return value2;
|
|
2367
2368
|
} else {
|
|
2368
2369
|
lastValue = value2;
|
|
2369
|
-
value2 = Node2.value_of(value2[
|
|
2370
|
+
value2 = Node2.value_of(value2[member2], $context, globals, node);
|
|
2370
2371
|
}
|
|
2371
2372
|
}
|
|
2372
|
-
if (typeof value2 === "function" && n > 0 && lastValue !== value2 && !hasOwnProperty(lastValue,
|
|
2373
|
+
if (typeof value2 === "function" && n > 0 && lastValue !== value2 && !hasOwnProperty(lastValue, member2)) {
|
|
2373
2374
|
return value2.bind(lastValue);
|
|
2374
2375
|
}
|
|
2375
2376
|
return value2;
|
|
@@ -2579,7 +2580,9 @@ ${name} ${msg} of
|
|
|
2579
2580
|
this.white();
|
|
2580
2581
|
ch = this.next();
|
|
2581
2582
|
if (ch !== ":" && ch !== ",") {
|
|
2582
|
-
this.error(
|
|
2583
|
+
this.error(
|
|
2584
|
+
"Object name: " + name + " missing closing " + enclosedBy
|
|
2585
|
+
);
|
|
2583
2586
|
}
|
|
2584
2587
|
return name;
|
|
2585
2588
|
} else if (ch === ":" || ch <= " " || ch === "," || ch === "|") {
|
|
@@ -2847,13 +2850,13 @@ ${name} ${msg} of
|
|
|
2847
2850
|
}
|
|
2848
2851
|
ch = this.white();
|
|
2849
2852
|
}
|
|
2850
|
-
|
|
2853
|
+
function filter(value2, ignored, context, globals, node) {
|
|
2851
2854
|
var argValues = [value2];
|
|
2852
2855
|
for (var i = 0, j = args.length; i < j; ++i) {
|
|
2853
2856
|
argValues.push(Node2.value_of(args[i], context, globals, node));
|
|
2854
2857
|
}
|
|
2855
|
-
return nextFilter(options_default.filters[name].apply(context, argValues));
|
|
2856
|
-
}
|
|
2858
|
+
return nextFilter(options_default.filters[name].apply(context, argValues), ignored, context, globals, node);
|
|
2859
|
+
}
|
|
2857
2860
|
filter.precedence = 1;
|
|
2858
2861
|
return filter;
|
|
2859
2862
|
}
|
|
@@ -2888,7 +2891,7 @@ ${name} ${msg} of
|
|
|
2888
2891
|
if (op === operators["?"]) {
|
|
2889
2892
|
this.ternary(nodes);
|
|
2890
2893
|
break;
|
|
2891
|
-
} else if (op === operators["."]) {
|
|
2894
|
+
} else if (op === operators["."] || op === operators["?."]) {
|
|
2892
2895
|
nodes.push(op);
|
|
2893
2896
|
nodes.push(this.member());
|
|
2894
2897
|
op = null;
|
|
@@ -2956,31 +2959,31 @@ ${name} ${msg} of
|
|
|
2956
2959
|
this.error("Bad arguments to function");
|
|
2957
2960
|
}
|
|
2958
2961
|
member() {
|
|
2959
|
-
let
|
|
2962
|
+
let member2 = "";
|
|
2960
2963
|
let ch = this.white();
|
|
2961
2964
|
let isIdentifierChar = Identifier.is_valid_start_char;
|
|
2962
2965
|
while (ch) {
|
|
2963
2966
|
if (!isIdentifierChar(ch)) {
|
|
2964
2967
|
break;
|
|
2965
2968
|
}
|
|
2966
|
-
|
|
2969
|
+
member2 += ch;
|
|
2967
2970
|
ch = this.next();
|
|
2968
2971
|
isIdentifierChar = Identifier.is_valid_continue_char;
|
|
2969
2972
|
}
|
|
2970
|
-
return
|
|
2973
|
+
return member2;
|
|
2971
2974
|
}
|
|
2972
2975
|
dereference() {
|
|
2973
|
-
let
|
|
2976
|
+
let member2;
|
|
2974
2977
|
let ch = this.white();
|
|
2975
2978
|
while (ch) {
|
|
2976
2979
|
if (ch === "(") {
|
|
2977
2980
|
return this.funcArguments();
|
|
2978
2981
|
} else if (ch === "[") {
|
|
2979
2982
|
this.next("[");
|
|
2980
|
-
|
|
2983
|
+
member2 = this.expression();
|
|
2981
2984
|
this.white();
|
|
2982
2985
|
this.next("]");
|
|
2983
|
-
return
|
|
2986
|
+
return member2;
|
|
2984
2987
|
} else if (ch === ".") {
|
|
2985
2988
|
this.next(".");
|
|
2986
2989
|
return this.member();
|
|
@@ -4276,13 +4279,17 @@ ${name} ${msg} of
|
|
|
4276
4279
|
const provider = getBindingProvider();
|
|
4277
4280
|
const getBindings = provider.getBindingAccessors;
|
|
4278
4281
|
if (isProviderForNode(provider, node)) {
|
|
4279
|
-
var bindingsUpdater = computed(
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
bindingContext2[contextSubscribeSymbol]
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4282
|
+
var bindingsUpdater = computed(
|
|
4283
|
+
function() {
|
|
4284
|
+
bindings6 = sourceBindings ? sourceBindings(bindingContext2, node) : getBindings.call(provider, node, bindingContext2);
|
|
4285
|
+
if (bindings6 && bindingContext2[contextSubscribeSymbol]) {
|
|
4286
|
+
bindingContext2[contextSubscribeSymbol]();
|
|
4287
|
+
}
|
|
4288
|
+
return bindings6;
|
|
4289
|
+
},
|
|
4290
|
+
null,
|
|
4291
|
+
{ disposeWhenNodeIsRemoved: node }
|
|
4292
|
+
);
|
|
4286
4293
|
if (!bindings6 || !bindingsUpdater.isActive()) {
|
|
4287
4294
|
bindingsUpdater = null;
|
|
4288
4295
|
}
|
|
@@ -4290,9 +4297,10 @@ ${name} ${msg} of
|
|
|
4290
4297
|
}
|
|
4291
4298
|
var bindingHandlerThatControlsDescendantBindings;
|
|
4292
4299
|
if (bindings6) {
|
|
4293
|
-
let
|
|
4300
|
+
let allBindings2 = function() {
|
|
4294
4301
|
return objectMap(bindingsUpdater ? bindingsUpdater() : bindings6, evaluateValueAccessor);
|
|
4295
4302
|
};
|
|
4303
|
+
var allBindings = allBindings2;
|
|
4296
4304
|
const $component = bindingContext2.$component || {};
|
|
4297
4305
|
const allBindingHandlers = {};
|
|
4298
4306
|
data_exports.set(node, "bindingHandlers", allBindingHandlers);
|
|
@@ -4304,8 +4312,8 @@ ${name} ${msg} of
|
|
|
4304
4312
|
return valueAccessor(optionalValue);
|
|
4305
4313
|
}
|
|
4306
4314
|
} : (bindingKey) => bindings6[bindingKey];
|
|
4307
|
-
|
|
4308
|
-
|
|
4315
|
+
allBindings2.has = (key) => key in bindings6;
|
|
4316
|
+
allBindings2.get = (key) => bindings6[key] && evaluateValueAccessor(getValueAccessor(key));
|
|
4309
4317
|
if (bindingEvent.childrenComplete in bindings6) {
|
|
4310
4318
|
bindingEvent.subscribe(node, bindingEvent.childrenComplete, () => {
|
|
4311
4319
|
const callback = evaluateValueAccessor(bindings6[bindingEvent.childrenComplete]);
|
|
@@ -4321,33 +4329,38 @@ ${name} ${msg} of
|
|
|
4321
4329
|
const bindingsGenerated = topologicalSortBindings(bindings6, $component);
|
|
4322
4330
|
const nodeAsyncBindingPromises = /* @__PURE__ */ new Set();
|
|
4323
4331
|
for (const [key, BindingHandlerClass] of bindingsGenerated) {
|
|
4324
|
-
let
|
|
4332
|
+
let reportBindingError2 = function(during, errorCaptured) {
|
|
4325
4333
|
onBindingError({
|
|
4326
4334
|
during,
|
|
4327
4335
|
errorCaptured,
|
|
4328
4336
|
bindings: bindings6,
|
|
4329
|
-
allBindings,
|
|
4337
|
+
allBindings: allBindings2,
|
|
4330
4338
|
bindingKey: key,
|
|
4331
4339
|
bindingContext: bindingContext2,
|
|
4332
4340
|
element: node,
|
|
4333
4341
|
valueAccessor: getValueAccessor(key)
|
|
4334
4342
|
});
|
|
4335
4343
|
};
|
|
4344
|
+
var reportBindingError = reportBindingError2;
|
|
4336
4345
|
if (node.nodeType === 8 && !BindingHandlerClass.allowVirtualElements) {
|
|
4337
4346
|
throw new Error(`The binding '${key}' cannot be used with virtual elements`);
|
|
4338
4347
|
}
|
|
4339
4348
|
try {
|
|
4340
|
-
const bindingHandler = dependencyDetection_exports.ignore(
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
+
const bindingHandler = dependencyDetection_exports.ignore(
|
|
4350
|
+
() => new BindingHandlerClass({
|
|
4351
|
+
allBindings: allBindings2,
|
|
4352
|
+
$element: node,
|
|
4353
|
+
$context: bindingContext2,
|
|
4354
|
+
onError: reportBindingError2,
|
|
4355
|
+
valueAccessor(...v) {
|
|
4356
|
+
return getValueAccessor(key)(...v);
|
|
4357
|
+
}
|
|
4358
|
+
})
|
|
4359
|
+
);
|
|
4349
4360
|
if (bindingHandler.onValueChange) {
|
|
4350
|
-
dependencyDetection_exports.ignore(
|
|
4361
|
+
dependencyDetection_exports.ignore(
|
|
4362
|
+
() => bindingHandler.computed("onValueChange")
|
|
4363
|
+
);
|
|
4351
4364
|
}
|
|
4352
4365
|
allBindingHandlers[key] = bindingHandler;
|
|
4353
4366
|
if (bindingHandler.controlsDescendants) {
|
|
@@ -4361,7 +4374,7 @@ ${name} ${msg} of
|
|
|
4361
4374
|
nodeAsyncBindingPromises.add(bindingHandler.bindingCompleted);
|
|
4362
4375
|
}
|
|
4363
4376
|
} catch (err) {
|
|
4364
|
-
|
|
4377
|
+
reportBindingError2("creation", err);
|
|
4365
4378
|
}
|
|
4366
4379
|
}
|
|
4367
4380
|
triggerDescendantsComplete(node, bindings6, nodeAsyncBindingPromises);
|
|
@@ -4868,15 +4881,19 @@ ${name} ${msg} of
|
|
|
4868
4881
|
return !firstTargetNode || !domNodeIsAttachedToDocument(firstTargetNode);
|
|
4869
4882
|
};
|
|
4870
4883
|
var activelyDisposeWhenNodeIsRemoved = firstTargetNode && renderMode === "replaceNode" ? firstTargetNode.parentNode : firstTargetNode;
|
|
4871
|
-
return computed(
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4884
|
+
return computed(
|
|
4885
|
+
function() {
|
|
4886
|
+
var bindingContext2 = dataOrBindingContext && dataOrBindingContext instanceof bindingContext ? dataOrBindingContext : new bindingContext(dataOrBindingContext, null, null, null, { "exportDependencies": true });
|
|
4887
|
+
var templateName = resolveTemplateName(template, bindingContext2.$data, bindingContext2);
|
|
4888
|
+
const renderedNodesArray = executeTemplate(targetNodeOrNodeArray, renderMode, templateName, bindingContext2, options3, afterBindingCallback);
|
|
4889
|
+
if (renderMode === "replaceNode") {
|
|
4890
|
+
targetNodeOrNodeArray = renderedNodesArray;
|
|
4891
|
+
firstTargetNode = getFirstNodeFromPossibleArray(targetNodeOrNodeArray);
|
|
4892
|
+
}
|
|
4893
|
+
},
|
|
4894
|
+
null,
|
|
4895
|
+
{ disposeWhen: whenToDispose, disposeWhenNodeIsRemoved: activelyDisposeWhenNodeIsRemoved }
|
|
4896
|
+
);
|
|
4880
4897
|
} else {
|
|
4881
4898
|
return memoization_exports.memoize(function(domNode) {
|
|
4882
4899
|
renderTemplate(template, dataOrBindingContext, options3, domNode, "replaceNode");
|
|
@@ -4888,9 +4905,13 @@ ${name} ${msg} of
|
|
|
4888
4905
|
function executeTemplateForArrayItem(arrayValue, index) {
|
|
4889
4906
|
if (options3.as) {
|
|
4890
4907
|
if (options_default.createChildContextWithAs) {
|
|
4891
|
-
arrayItemContext = parentBindingContext.createChildContext(
|
|
4892
|
-
|
|
4893
|
-
|
|
4908
|
+
arrayItemContext = parentBindingContext.createChildContext(
|
|
4909
|
+
arrayValue,
|
|
4910
|
+
options3.as,
|
|
4911
|
+
(context) => {
|
|
4912
|
+
context.$index = index;
|
|
4913
|
+
}
|
|
4914
|
+
);
|
|
4894
4915
|
} else {
|
|
4895
4916
|
arrayItemContext = parentBindingContext.extend({
|
|
4896
4917
|
[options3.as]: arrayValue,
|
|
@@ -5191,14 +5212,19 @@ ${name} ${msg} of
|
|
|
5191
5212
|
};
|
|
5192
5213
|
}
|
|
5193
5214
|
create(...additionalProperties) {
|
|
5194
|
-
const instance = Object.assign(
|
|
5195
|
-
|
|
5196
|
-
|
|
5215
|
+
const instance = Object.assign(
|
|
5216
|
+
{
|
|
5217
|
+
get getBindingHandler() {
|
|
5218
|
+
return options_default.getBindingHandler;
|
|
5219
|
+
},
|
|
5220
|
+
set getBindingHandler(fn) {
|
|
5221
|
+
options_default.set("getBindingHandler", fn);
|
|
5222
|
+
}
|
|
5197
5223
|
},
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5224
|
+
knockout,
|
|
5225
|
+
this.providedProperties,
|
|
5226
|
+
...additionalProperties
|
|
5227
|
+
);
|
|
5202
5228
|
instance.options.knockoutInstance = instance;
|
|
5203
5229
|
return instance;
|
|
5204
5230
|
}
|
|
@@ -5211,11 +5237,15 @@ ${name} ${msg} of
|
|
|
5211
5237
|
this[nameOrObject] = value2;
|
|
5212
5238
|
} else if (typeof nameOrObject === "object") {
|
|
5213
5239
|
if (value2 !== void 0) {
|
|
5214
|
-
options_default.onError(
|
|
5240
|
+
options_default.onError(
|
|
5241
|
+
new Error("Given extraneous `value` parameter (first param should be a string, but it was an object)." + nameOrObject)
|
|
5242
|
+
);
|
|
5215
5243
|
}
|
|
5216
5244
|
Object.assign(this, nameOrObject);
|
|
5217
5245
|
} else {
|
|
5218
|
-
options_default.onError(
|
|
5246
|
+
options_default.onError(
|
|
5247
|
+
new Error("Given a bad binding handler type: " + nameOrObject)
|
|
5248
|
+
);
|
|
5219
5249
|
}
|
|
5220
5250
|
}
|
|
5221
5251
|
get(nameOrDotted) {
|
|
@@ -5261,7 +5291,10 @@ ${name} ${msg} of
|
|
|
5261
5291
|
}
|
|
5262
5292
|
}
|
|
5263
5293
|
makeAccessorsFromFunction(callback) {
|
|
5264
|
-
return objectMap(
|
|
5294
|
+
return objectMap(
|
|
5295
|
+
dependencyDetection_exports.ignore(callback),
|
|
5296
|
+
(value2, key) => () => callback()[key]
|
|
5297
|
+
);
|
|
5265
5298
|
}
|
|
5266
5299
|
makeValueAccessor(value2) {
|
|
5267
5300
|
return () => value2;
|
|
@@ -5735,7 +5768,10 @@ ${name} ${msg} of
|
|
|
5735
5768
|
if (!accessors || Object.keys(accessors).length === 0) {
|
|
5736
5769
|
return { $raw: {} };
|
|
5737
5770
|
}
|
|
5738
|
-
const $raw = objectMap(
|
|
5771
|
+
const $raw = objectMap(
|
|
5772
|
+
accessors,
|
|
5773
|
+
(value2) => computed(value2, null, { disposeWhenNodeIsRemoved: node })
|
|
5774
|
+
);
|
|
5739
5775
|
const params = objectMap($raw, (v) => this.makeParamValue(node, v));
|
|
5740
5776
|
return Object.assign({ $raw }, params);
|
|
5741
5777
|
}
|
|
@@ -6444,7 +6480,10 @@ ${name} ${msg} of
|
|
|
6444
6480
|
constructor(...args) {
|
|
6445
6481
|
super(...args);
|
|
6446
6482
|
if (ieVersion < 11) {
|
|
6447
|
-
this.addEventListener(
|
|
6483
|
+
this.addEventListener(
|
|
6484
|
+
"propertychange",
|
|
6485
|
+
(event) => event.propertyName === "value" && this.updateModel(event)
|
|
6486
|
+
);
|
|
6448
6487
|
}
|
|
6449
6488
|
if (ieVersion >= 8 && ieVersion < 10) {
|
|
6450
6489
|
this.watchForSelectionChangeEvent();
|
|
@@ -6530,7 +6569,10 @@ ${name} ${msg} of
|
|
|
6530
6569
|
constructor(...args) {
|
|
6531
6570
|
super(...args);
|
|
6532
6571
|
if (this.isCheckboxOrRadio) {
|
|
6533
|
-
applyBindingAccessorsToNode(
|
|
6572
|
+
applyBindingAccessorsToNode(
|
|
6573
|
+
this.$element,
|
|
6574
|
+
{ checkedValue: this.valueAccessor }
|
|
6575
|
+
);
|
|
6534
6576
|
return;
|
|
6535
6577
|
}
|
|
6536
6578
|
this.propertyChangedFired = false;
|
|
@@ -6899,7 +6941,9 @@ ${name} ${msg} of
|
|
|
6899
6941
|
this.container = virtualElements_exports.isStartComment(this.$element) ? this.$element.parentNode : this.$element;
|
|
6900
6942
|
this.generateContext = this.createContextGenerator(this.as);
|
|
6901
6943
|
this.$indexHasBeenRequested = false;
|
|
6902
|
-
this.templateNode = makeTemplateNode(
|
|
6944
|
+
this.templateNode = makeTemplateNode(
|
|
6945
|
+
settings.templateNode || (settings.name ? document.getElementById(settings.name).cloneNode(true) : this.$element)
|
|
6946
|
+
);
|
|
6903
6947
|
["afterAdd", "beforeRemove", "afterQueueFlush", "beforeQueueFlush"].forEach((p) => {
|
|
6904
6948
|
this[p] = settings[p] || this.allBindings.get(p);
|
|
6905
6949
|
});
|
|
@@ -7054,7 +7098,10 @@ ${name} ${msg} of
|
|
|
7054
7098
|
var templateClone = this.templateNode.cloneNode(true);
|
|
7055
7099
|
children = virtualElements_exports.childNodes(templateClone);
|
|
7056
7100
|
this.updateFirstLastNodesList(index + i, children);
|
|
7057
|
-
const bindingResult = applyBindingsToDescendants(
|
|
7101
|
+
const bindingResult = applyBindingsToDescendants(
|
|
7102
|
+
this.generateContext(valuesToAdd[i]),
|
|
7103
|
+
templateClone
|
|
7104
|
+
);
|
|
7058
7105
|
asyncBindingResults.push(bindingResult);
|
|
7059
7106
|
}
|
|
7060
7107
|
allChildNodes.push(...children);
|
|
@@ -7420,7 +7467,11 @@ ${name} ${msg} of
|
|
|
7420
7467
|
adds.forEach((change) => this.addChange(...change));
|
|
7421
7468
|
}
|
|
7422
7469
|
addChange(index, jsx) {
|
|
7423
|
-
this.nodeArrayOrObservableAtIndex.splice(
|
|
7470
|
+
this.nodeArrayOrObservableAtIndex.splice(
|
|
7471
|
+
index,
|
|
7472
|
+
0,
|
|
7473
|
+
this.injectNode(jsx, this.lastNodeFor(index))
|
|
7474
|
+
);
|
|
7424
7475
|
}
|
|
7425
7476
|
injectNode(jsx, nextNode) {
|
|
7426
7477
|
let nodeArrayOrObservable;
|
|
@@ -7431,7 +7482,9 @@ ${name} ${msg} of
|
|
|
7431
7482
|
} else if (typeof jsx !== "string" && isIterable(jsx)) {
|
|
7432
7483
|
nodeArrayOrObservable = [];
|
|
7433
7484
|
for (const child of jsx) {
|
|
7434
|
-
nodeArrayOrObservable.unshift(
|
|
7485
|
+
nodeArrayOrObservable.unshift(
|
|
7486
|
+
this.injectNode(child, nextNode)
|
|
7487
|
+
);
|
|
7435
7488
|
}
|
|
7436
7489
|
} else {
|
|
7437
7490
|
const $context = contextFor(this.parentNode);
|
|
@@ -7455,7 +7508,9 @@ ${name} ${msg} of
|
|
|
7455
7508
|
return node.nodeType === 1 || node.nodeType === 8;
|
|
7456
7509
|
}
|
|
7457
7510
|
delChange(index) {
|
|
7458
|
-
this.removeNodeArrayOrObservable(
|
|
7511
|
+
this.removeNodeArrayOrObservable(
|
|
7512
|
+
this.nodeArrayOrObservableAtIndex[index]
|
|
7513
|
+
);
|
|
7459
7514
|
this.nodeArrayOrObservableAtIndex.splice(index, 1);
|
|
7460
7515
|
}
|
|
7461
7516
|
getSubscriptionsForNode(node) {
|
|
@@ -7522,9 +7577,11 @@ ${name} ${msg} of
|
|
|
7522
7577
|
node[ORIGINAL_JSX_SYM] = jsx;
|
|
7523
7578
|
if (isObservable(jsx.attributes)) {
|
|
7524
7579
|
const subscriptions = this.getSubscriptionsForNode(node);
|
|
7525
|
-
subscriptions.push(
|
|
7526
|
-
|
|
7527
|
-
|
|
7580
|
+
subscriptions.push(
|
|
7581
|
+
jsx.attributes.subscribe((attrs) => {
|
|
7582
|
+
this.updateAttributes(node, unwrap(attrs));
|
|
7583
|
+
})
|
|
7584
|
+
);
|
|
7528
7585
|
}
|
|
7529
7586
|
this.updateAttributes(node, unwrap(jsx.attributes));
|
|
7530
7587
|
this.addDisposable(new JsxObserver(jsx.children, node, null, xmlns, this.noInitialBinding));
|
|
@@ -7543,7 +7600,9 @@ ${name} ${msg} of
|
|
|
7543
7600
|
for (const [name, value2] of Object.entries(attributes || {})) {
|
|
7544
7601
|
toRemove.delete(name);
|
|
7545
7602
|
if (isObservable(value2)) {
|
|
7546
|
-
subscriptions.push(
|
|
7603
|
+
subscriptions.push(
|
|
7604
|
+
value2.subscribe((attr2) => this.setNodeAttribute(node, name, value2))
|
|
7605
|
+
);
|
|
7547
7606
|
}
|
|
7548
7607
|
this.setNodeAttribute(node, name, value2);
|
|
7549
7608
|
}
|
|
@@ -7644,7 +7703,9 @@ ${name} ${msg} of
|
|
|
7644
7703
|
var ComponentBinding = class extends DescendantBindingHandler {
|
|
7645
7704
|
constructor(params) {
|
|
7646
7705
|
super(params);
|
|
7647
|
-
this.originalChildNodes = makeArray(
|
|
7706
|
+
this.originalChildNodes = makeArray(
|
|
7707
|
+
virtualElements_exports.childNodes(this.$element)
|
|
7708
|
+
);
|
|
7648
7709
|
this.computed("computeApplyComponent");
|
|
7649
7710
|
}
|
|
7650
7711
|
cloneTemplateIntoElement(componentName, template, element) {
|
|
@@ -7699,7 +7760,9 @@ ${name} ${msg} of
|
|
|
7699
7760
|
const ctxExtender = (ctx) => Object.assign(ctx, {
|
|
7700
7761
|
$component,
|
|
7701
7762
|
$componentTemplateNodes: this.originalChildNodes,
|
|
7702
|
-
$componentTemplateSlotNodes: this.makeTemplateSlotNodes(
|
|
7763
|
+
$componentTemplateSlotNodes: this.makeTemplateSlotNodes(
|
|
7764
|
+
this.originalChildNodes
|
|
7765
|
+
)
|
|
7703
7766
|
});
|
|
7704
7767
|
return this.$context.createChildContext($component, void 0, ctxExtender);
|
|
7705
7768
|
}
|
|
@@ -7896,7 +7959,7 @@ ${name} ${msg} of
|
|
|
7896
7959
|
bindingStringPreparsers: [functionRewrite]
|
|
7897
7960
|
}
|
|
7898
7961
|
});
|
|
7899
|
-
var version = "4.0.0-beta1.
|
|
7962
|
+
var version = "4.0.0-beta1.6";
|
|
7900
7963
|
var src_default = builder.create({
|
|
7901
7964
|
version,
|
|
7902
7965
|
components: dist_default,
|