@mptw/skylens-ui 1.1.0 → 1.2.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/app.vue +1 -0
- package/components/SLPillLabel.vue +4 -0
- package/package.json +3 -2
- package/utils/index.ts +26 -0
package/app.vue
CHANGED
|
@@ -36,6 +36,7 @@ export default defineComponent({
|
|
|
36
36
|
"blue-1",
|
|
37
37
|
"blue-2",
|
|
38
38
|
"white",
|
|
39
|
+
"secondary-new",
|
|
39
40
|
].includes(value),
|
|
40
41
|
},
|
|
41
42
|
},
|
|
@@ -96,6 +97,9 @@ export default defineComponent({
|
|
|
96
97
|
&.pill-label-blue-2
|
|
97
98
|
@apply bg-blue-2 border-blue-2
|
|
98
99
|
|
|
100
|
+
&.pill-label-secondary-new
|
|
101
|
+
@apply bg-secondary-new border-secondary-new
|
|
102
|
+
|
|
99
103
|
.icon
|
|
100
104
|
@apply inline-block ml-2
|
|
101
105
|
</style>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mptw/skylens-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"main": "./nuxt.config.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "nuxi dev .playground",
|
|
@@ -28,13 +28,14 @@
|
|
|
28
28
|
"@types/commonmark": "^0.27.9",
|
|
29
29
|
"@types/dompurify": "^3.0.5",
|
|
30
30
|
"@types/google.maps": "^3.55.7",
|
|
31
|
-
"@types/lodash": "^4.17.
|
|
31
|
+
"@types/lodash-es": "^4.17.12",
|
|
32
32
|
"@types/sortablejs": "^1.15.8",
|
|
33
33
|
"@vue/language-plugin-pug": "^2.0.13",
|
|
34
34
|
"commonmark": "^0.31.0",
|
|
35
35
|
"date-fns": "^3.6.0",
|
|
36
36
|
"dompurify": "^3.1.0",
|
|
37
37
|
"echarts": "^5.5.0",
|
|
38
|
+
"echarts-wordcloud": "^2.1.0",
|
|
38
39
|
"exceljs": "^4.4.0",
|
|
39
40
|
"gsap": "^3.12.5",
|
|
40
41
|
"html-to-image": "^1.11.11",
|
package/utils/index.ts
CHANGED
|
@@ -537,3 +537,29 @@ export const isValidDate = (d: any) => {
|
|
|
537
537
|
return false;
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
+
|
|
541
|
+
export const waitForTime = (ms: number) => {
|
|
542
|
+
return new Promise(r => setTimeout(r, ms));
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export const waitForever = () => {
|
|
546
|
+
return new Promise(r => {});
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
export const waitFor = async (condition: () => boolean, pollInterval = 50, timeoutAfter: number) => {
|
|
550
|
+
const startTime = Date.now();
|
|
551
|
+
|
|
552
|
+
while(true) {
|
|
553
|
+
if (typeof(timeoutAfter) === 'number' && Date.now() > startTime + timeoutAfter) {
|
|
554
|
+
throw 'Condition not met before timeout';
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
const result = await condition();
|
|
558
|
+
|
|
559
|
+
if (result) {
|
|
560
|
+
return result;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
await new Promise(r => setTimeout(r, pollInterval));
|
|
564
|
+
}
|
|
565
|
+
}
|