@gez/date-time-kit 2.0.0-alpha.6 → 2.0.0-alpha.8
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.
|
@@ -22,8 +22,9 @@ export class Ele extends UiBase {
|
|
|
22
22
|
}
|
|
23
23
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
24
24
|
super.attributeChangedCallback(name, oldValue, newValue);
|
|
25
|
-
if (oldValue === newValue
|
|
26
|
-
|
|
25
|
+
if (oldValue === newValue) return;
|
|
26
|
+
if (name === "lang" || name === "i18n-key")
|
|
27
|
+
this.updateText();
|
|
27
28
|
}
|
|
28
29
|
connectedCallback() {
|
|
29
30
|
if (!super.connectedCallback()) return;
|
|
@@ -4,9 +4,15 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
4
4
|
import { scrollbarStyleStr, styleStr } from "./css.mjs";
|
|
5
5
|
const templateCache = /* @__PURE__ */ new Map();
|
|
6
6
|
if (typeof document === "object") {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
try {
|
|
8
|
+
const styleSheet = new CSSStyleSheet();
|
|
9
|
+
styleSheet.replaceSync(scrollbarStyleStr);
|
|
10
|
+
document.adoptedStyleSheets.unshift(styleSheet);
|
|
11
|
+
} catch (e) {
|
|
12
|
+
const styleEle = document.createElement("style");
|
|
13
|
+
styleEle.innerHTML = scrollbarStyleStr;
|
|
14
|
+
document.head.prepend(styleEle);
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
17
|
const HTMLElementBase = (() => {
|
|
12
18
|
if (typeof HTMLElement === "function") return HTMLElement;
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"unbuild": "3.6.0",
|
|
18
18
|
"vitest": "3.2.4"
|
|
19
19
|
},
|
|
20
|
-
"version": "2.0.0-alpha.
|
|
20
|
+
"version": "2.0.0-alpha.8",
|
|
21
21
|
"type": "module",
|
|
22
22
|
"private": false,
|
|
23
23
|
"exports": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"template",
|
|
37
37
|
"public"
|
|
38
38
|
],
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "f395a06dab9ac2366eae11b0a1a9bee91ab3778c"
|
|
40
40
|
}
|
|
@@ -30,8 +30,9 @@ export class Ele extends UiBase<Attrs> {
|
|
|
30
30
|
|
|
31
31
|
attributeChangedCallback(name: string, oldValue: string, newValue: string) {
|
|
32
32
|
super.attributeChangedCallback(name, oldValue, newValue);
|
|
33
|
-
if (oldValue === newValue
|
|
34
|
-
|
|
33
|
+
if (oldValue === newValue) return;
|
|
34
|
+
if (name === 'lang' || name === 'i18n-key')
|
|
35
|
+
this.updateText();
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
connectedCallback() {
|
|
@@ -45,12 +45,15 @@ export interface BaseAttrs {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
if (typeof document === 'object') {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
try {
|
|
49
|
+
const styleSheet = new CSSStyleSheet();
|
|
50
|
+
styleSheet.replaceSync(scrollbarStyleStr);
|
|
51
|
+
document.adoptedStyleSheets.unshift(styleSheet);
|
|
52
|
+
} catch {
|
|
53
|
+
const styleEle = document.createElement('style');
|
|
54
|
+
styleEle.innerHTML = scrollbarStyleStr;
|
|
55
|
+
document.head.prepend(styleEle);
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
const HTMLElementBase = (() => {
|