@litejs/ui 23.3.5 → 23.4.1
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/el/Slider.tpl +1 -1
- package/index.js +5 -5
- package/load.js +8 -6
- package/package.json +2 -2
- package/polyfill/index.js +29 -25
package/el/Slider.tpl
CHANGED
|
@@ -263,6 +263,6 @@
|
|
|
263
263
|
;fixReadonlyCheckbox
|
|
264
264
|
input[type=checkbox].hide
|
|
265
265
|
;readonly: row && !row.write
|
|
266
|
-
;checked: model && !!model.get(row.path)
|
|
266
|
+
;checked: model && (row && row.opts ? row.opts === model.get(row.path) : !!model.get(row.path))
|
|
267
267
|
.Toggle-knob.anim
|
|
268
268
|
|
package/index.js
CHANGED
|
@@ -1336,11 +1336,11 @@
|
|
|
1336
1336
|
done: function() {
|
|
1337
1337
|
var t = this
|
|
1338
1338
|
, parent = t.parent
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
if (arr[0]) {
|
|
1342
|
-
|
|
1343
|
-
}
|
|
1339
|
+
elCache[t.name] = t._done()
|
|
1340
|
+
//, arr = t.attr
|
|
1341
|
+
//if (arr[0]) {
|
|
1342
|
+
// // TODO:2023-03-22:lauri:Add new scope
|
|
1343
|
+
//}
|
|
1344
1344
|
return parent
|
|
1345
1345
|
}
|
|
1346
1346
|
}),
|
package/load.js
CHANGED
|
@@ -28,9 +28,11 @@
|
|
|
28
28
|
// MSXML 6.0 has improved XSD, deprecated several legacy features
|
|
29
29
|
// What's New in MSXML 6.0: https://msdn.microsoft.com/en-us/library/ms753751.aspx
|
|
30
30
|
|
|
31
|
-
!function(window, Function
|
|
31
|
+
!function(window, Function) {
|
|
32
32
|
xhr._s = new Date()
|
|
33
33
|
var loaded = {}
|
|
34
|
+
// IE9, move setTimeout from window.prototype to window object cache, so you can override it later
|
|
35
|
+
, setTimeout_ = (window.setTimeout = window.setTimeout) || setTimeout
|
|
34
36
|
, rewrite = {
|
|
35
37
|
//!{loadRewrite}
|
|
36
38
|
}
|
|
@@ -42,7 +44,7 @@
|
|
|
42
44
|
window.execScript ||
|
|
43
45
|
/*** inject ***/
|
|
44
46
|
// THANKS: Juriy Zaytsev - Global eval [http://perfectionkills.com/global-eval-what-are-the-options/]
|
|
45
|
-
Function("e,eval", "try{return e('eval')
|
|
47
|
+
Function("e,eval", "try{return e('eval')}catch(e){}")(eval) ||
|
|
46
48
|
Function("a", "var d=document,b=d.body,s=d.createElement('script');s.text=a;b.removeChild(b.insertBefore(s,b.firstChild))")
|
|
47
49
|
/*/
|
|
48
50
|
eval
|
|
@@ -70,14 +72,14 @@
|
|
|
70
72
|
, error && (error.stack || error.stacktrace) || "-"
|
|
71
73
|
, "" + location
|
|
72
74
|
]
|
|
73
|
-
))
|
|
75
|
+
)) setTimeout_(sendErrors, 307)
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
function sendErrors() {
|
|
77
79
|
if (xhr.err) {
|
|
78
80
|
xhr.err(unsentErrors)
|
|
79
81
|
} else {
|
|
80
|
-
|
|
82
|
+
setTimeout_(sendErrors, 1307)
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
/*/
|
|
@@ -254,7 +256,7 @@
|
|
|
254
256
|
if (++pos < len) exec()
|
|
255
257
|
/*** inject ***/
|
|
256
258
|
// inject can be async
|
|
257
|
-
else if (pos === len)
|
|
259
|
+
else if (pos === len) setTimeout_(exec, 1)
|
|
258
260
|
/**/
|
|
259
261
|
else {
|
|
260
262
|
if (next) next()
|
|
@@ -272,5 +274,5 @@
|
|
|
272
274
|
/**/
|
|
273
275
|
|
|
274
276
|
function nop() {}
|
|
275
|
-
}(this, Function
|
|
277
|
+
}(this, Function) // jshint ignore:line
|
|
276
278
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@litejs/ui",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.4.1",
|
|
4
4
|
"description": "UI engine for LiteJS full-stack framework",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Lauri Rooden <lauri@rooden.ee>",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test": "TZ='Europe/Tallinn' lj test test/index.js --brief --coverage && jshint --verbose *.js src/*.js binding/*.js polyfill/*.js"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@litejs/cli": "23.3
|
|
28
|
+
"@litejs/cli": "23.4.3",
|
|
29
29
|
"jshint": "2.13.6"
|
|
30
30
|
},
|
|
31
31
|
"litejs": {
|
package/polyfill/index.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
/* global El, xhr */
|
|
23
23
|
/* c8 ignore start */
|
|
24
|
-
!function(window, Function) {
|
|
24
|
+
!function(window, Function, Infinity, P) {
|
|
25
25
|
|
|
26
26
|
// Array#flat() - Chrome69, Edge79, Firefox62, Safari12
|
|
27
27
|
// window.PointerEvent - Chrome55, Edge12, Firefox59, Safari13, IE11
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
// queueMicrotask - Chrome71, Edge79, Firefox69, Safari12.1
|
|
31
31
|
|
|
32
32
|
var isArr, oKeys
|
|
33
|
-
, P = "prototype"
|
|
34
33
|
, O = window
|
|
35
34
|
, patched = (window.xhr || window)._p = []
|
|
36
35
|
, jsonRe = /[\x00-\x1f\x22\x5c]/g
|
|
@@ -173,7 +172,7 @@
|
|
|
173
172
|
try {
|
|
174
173
|
// FF4-beta with dom.storage.enabled=false throws for accessing windows.localStorage
|
|
175
174
|
// iOS5 private browsing throws for localStorage.setItem()
|
|
176
|
-
return window[name].setItem(name, name)
|
|
175
|
+
return window[name += "Storage"].setItem(name, name)
|
|
177
176
|
} catch(e){}
|
|
178
177
|
/***
|
|
179
178
|
} else if (el.addBehavior) {
|
|
@@ -217,8 +216,8 @@
|
|
|
217
216
|
patch(name, data, 1)
|
|
218
217
|
}
|
|
219
218
|
|
|
220
|
-
createStorage("
|
|
221
|
-
createStorage("
|
|
219
|
+
createStorage("session") // Chrome5, FF2, IE8, Safari4
|
|
220
|
+
createStorage("local") // Chrome5, FF3.5, IE8, Safari4
|
|
222
221
|
|
|
223
222
|
// 20 fps is good enough
|
|
224
223
|
patch("requestAnimationFrame", "return setTimeout(a,50)")
|
|
@@ -230,6 +229,10 @@
|
|
|
230
229
|
// IE8 has console, however, the console object does not exist if the console is not opened.
|
|
231
230
|
patch("console", {log: nop, error: nop})
|
|
232
231
|
|
|
232
|
+
/*** ie9 ***/
|
|
233
|
+
patch("matchMedia", "b=a||'all';return{media:b,matches:X?X.matchMedium(b):!1,addListener:Y}", 0, window.styleMedia || window.media, nop)
|
|
234
|
+
/**/
|
|
235
|
+
|
|
233
236
|
|
|
234
237
|
function jsonFn(str) {
|
|
235
238
|
return JSONmap[str] || esc(str).replace(/%u/g, "\\u").replace(/%/g, "\\x")
|
|
@@ -243,21 +246,19 @@
|
|
|
243
246
|
// IE 8 serializes `undefined` as `"undefined"`
|
|
244
247
|
return (
|
|
245
248
|
isStr(o) ? "\"" + o.replace(jsonRe, jsonFn) + "\"" :
|
|
246
|
-
o
|
|
249
|
+
o !== o || o == null || o === Infinity || o === -Infinity ? "null" :
|
|
250
|
+
typeof o == "object" ? (
|
|
247
251
|
isFn(o.toJSON) ? stringify(o.toJSON()) :
|
|
248
252
|
isArr(o) ? "[" + o.map(stringify) + "]" :
|
|
249
|
-
"{" + oKeys(o).
|
|
253
|
+
"{" + oKeys(o).flatMap(function(a){
|
|
254
|
+
return o[a] === void 0 ? [] : stringify(a) + ":" + stringify(o[a])
|
|
255
|
+
}) + "}"
|
|
250
256
|
) :
|
|
251
|
-
typeof o == "number" && !isFinite(o) ? "null" :
|
|
252
257
|
"" + o
|
|
253
258
|
)
|
|
254
259
|
}
|
|
255
260
|
})
|
|
256
261
|
|
|
257
|
-
/*** ie9 ***/
|
|
258
|
-
patch("matchMedia", "b=a||'all';return{media:b,matches:X?X.matchMedium(b):!1,addListener:Y}", 0, window.styleMedia || window.media, nop)
|
|
259
|
-
/**/
|
|
260
|
-
|
|
261
262
|
O = patch("performance")
|
|
262
263
|
patch("p:now", (a = "return+new Date") + "-X", 0, new Date())
|
|
263
264
|
patch("timing")
|
|
@@ -326,10 +327,11 @@
|
|
|
326
327
|
// Fixed in Safari 12.0.1 and iOS 12.1 on October 30, 2018
|
|
327
328
|
// patch("reverse", "if(X(t))t.length=t.length;return O.call(t)", "2,1" != [1, 2].reverse(), isArr)
|
|
328
329
|
|
|
329
|
-
// In ES3
|
|
330
|
-
|
|
330
|
+
// In ES3 the second deleteCount argument is required, IE<=8 requires deleteCount
|
|
331
|
+
// IE6-9 silently fails to write to the arguments object, make it to array first.
|
|
332
|
+
patch("splice", "if(b===Y){A=S.call(A);A[1]=t.length-a}return O.apply(t,A)", "1,2" != [1, 2].splice(0))
|
|
331
333
|
|
|
332
|
-
b = a + "while(++i<l)
|
|
334
|
+
b = a + "while(++i<l)"
|
|
333
335
|
patch("every", b + "if(!a.call(b,t[i],i,t))return!1;return!0")
|
|
334
336
|
patch("forEach", b + "a.call(b,t[i],i,t)")
|
|
335
337
|
|
|
@@ -346,6 +348,8 @@
|
|
|
346
348
|
|
|
347
349
|
|
|
348
350
|
O = String[P]
|
|
351
|
+
patch("endsWith", "return(a+='')===t.slice(-a.length)")
|
|
352
|
+
patch("startsWith", "return t.lastIndexOf(a,0)===0")
|
|
349
353
|
patch("trim", "return t.replace(/^\\s+|\\s+$/g,'')")
|
|
350
354
|
|
|
351
355
|
|
|
@@ -386,7 +390,7 @@
|
|
|
386
390
|
"": "c(_.parentNode,v)"
|
|
387
391
|
}
|
|
388
392
|
, matches = patch("matches", "return!!X(a)(t)", 0, selectorFn)
|
|
389
|
-
, closest =
|
|
393
|
+
, closest = walk.bind(window, "parentNode", 1)
|
|
390
394
|
|
|
391
395
|
// Note: querySelector in IE8 supports only CSS 2.1 selectors
|
|
392
396
|
patch((b="querySelector"), (a = "return X(t,a,") + "1)", ie678, find)
|
|
@@ -425,18 +429,18 @@
|
|
|
425
429
|
}).join("||") + "}"
|
|
426
430
|
)(matches, closest))
|
|
427
431
|
}
|
|
428
|
-
function walk(
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
if (first === 1) return el
|
|
432
|
+
function walk(next, first, el, sel, nextFn) {
|
|
433
|
+
sel = selectorFn(sel)
|
|
434
|
+
for (var out = []; el; el = el[next] || nextFn && nextFn(el)) if (sel(el)) {
|
|
435
|
+
if (first) return el
|
|
433
436
|
out.push(el)
|
|
434
437
|
}
|
|
435
|
-
return first
|
|
438
|
+
return first ? null : out
|
|
436
439
|
}
|
|
440
|
+
|
|
437
441
|
function find(node, sel, first) {
|
|
438
|
-
return walk(
|
|
439
|
-
for (var next = el.nextSibling; !next && ((el = el.parentNode) !== node);) next = el.nextSibling
|
|
442
|
+
return walk("firstChild", first, node.firstChild, sel, function(el) {
|
|
443
|
+
for (var next = el.nextSibling; !next && ((el = el.parentNode) !== node); ) next = el.nextSibling
|
|
440
444
|
return next
|
|
441
445
|
})
|
|
442
446
|
}
|
|
@@ -469,7 +473,7 @@
|
|
|
469
473
|
src || {}
|
|
470
474
|
))
|
|
471
475
|
}
|
|
472
|
-
}(this, Function) // jshint ignore:line
|
|
476
|
+
}(this, Function, Infinity, "prototype") // jshint ignore:line
|
|
473
477
|
/* c8 ignore stop */
|
|
474
478
|
|
|
475
479
|
|