@milaboratories/uikit 2.8.8 → 2.9.0
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/.turbo/turbo-build.log +46 -45
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +16 -0
- package/dist/components/PlAutocomplete/PlAutocomplete.vue.js +1 -1
- package/dist/components/PlAutocompleteMulti/PlAutocompleteMulti.vue.js +1 -1
- package/dist/components/PlDropdown/PlDropdown.vue.js +1 -1
- package/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +1 -1
- package/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +1 -1
- package/dist/components/PlFileInput/PlFileInput.vue.js +1 -1
- package/dist/components/PlLogView/PlLogView.vue.d.ts +3 -3
- package/dist/components/PlLogView/PlLogView.vue.d.ts.map +1 -1
- package/dist/components/PlLogView/PlLogView.vue.js +1 -1
- package/dist/components/PlLogView/PlLogView.vue.js.map +1 -1
- package/dist/components/PlNumberField/PlNumberField.vue.js +1 -1
- package/dist/components/PlTextArea/PlTextArea.vue.js +1 -1
- package/dist/components/PlTextField/PlTextField.vue.js +1 -1
- package/dist/index.js +125 -123
- package/dist/index.js.map +1 -1
- package/dist/layout/PlBlockPage/PlBlockPage.vue.d.ts.map +1 -1
- package/dist/layout/PlBlockPage/PlBlockPage.vue.js +13 -12
- package/dist/layout/PlBlockPage/PlBlockPage.vue.js.map +1 -1
- package/dist/layout/PlPlaceholder/PlPlaceholder.vue.d.ts.map +1 -1
- package/dist/layout/PlPlaceholder/PlPlaceholder.vue2.js +35 -34
- package/dist/layout/PlPlaceholder/PlPlaceholder.vue2.js.map +1 -1
- package/dist/layout/PlPlaceholder/index.d.ts +11 -1
- package/dist/layout/PlPlaceholder/index.d.ts.map +1 -1
- package/dist/layout/PlPlaceholder/index.js +25 -0
- package/dist/layout/PlPlaceholder/index.js.map +1 -0
- package/dist/utils/DoubleContour.vue2.js +23 -0
- package/dist/utils/DoubleContour.vue2.js.map +1 -0
- package/dist/utils/DoubleContour.vue3.js +1 -1
- package/package.json +6 -6
- package/src/components/PlLogView/PlLogView.vue +3 -3
- package/src/layout/PlBlockPage/PlBlockPage.vue +2 -2
- package/src/layout/PlPlaceholder/PlPlaceholder.vue +13 -19
- package/src/layout/PlPlaceholder/index.ts +22 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlPlaceholder.vue2.js","sources":["../../../src/layout/PlPlaceholder/PlPlaceholder.vue"],"sourcesContent":["<script lang=\"ts\">\nimport paintWorkletCode from './paint-worklet.js?raw';\n\nexport interface PlPlaceholderProps {\n variant?: 'table' | 'graph';\n title?: string;\n subtitle?: string | string[];\n}\n\n// Register paint worklet once at module load (uses blob URL to comply with CSP)\nconst workletBlob = new Blob([paintWorkletCode]
|
|
1
|
+
{"version":3,"file":"PlPlaceholder.vue2.js","sources":["../../../src/layout/PlPlaceholder/PlPlaceholder.vue"],"sourcesContent":["<script lang=\"ts\">\nimport paintWorkletCode from './paint-worklet.js?raw';\n\nexport interface PlPlaceholderProps {\n variant?: 'table' | 'graph';\n title?: string;\n subtitle?: string | string[];\n}\n\n// Register paint worklet once at module load (uses blob URL to comply with CSP)\nconst workletBlob = new Blob(\n [paintWorkletCode],\n { type: 'application/javascript' },\n);\nconst workletUrl = URL.createObjectURL(workletBlob);\n(CSS as unknown as {\n paintWorklet: { addModule: (url: string) => void };\n}).paintWorklet.addModule(workletUrl);\n</script>\n\n<script setup lang=\"ts\">\nimport { useCssModule } from 'vue';\nimport PlLoaderLogo from '../../components/PlLoaderLogo.vue';\n\nconst props = defineProps<PlPlaceholderProps>();\n\nconst styles = useCssModule();\n</script>\n\n<template>\n <div :class=\"styles.root\">\n <div\n :class=\"[styles.background, {\n [styles.table]: props.variant === 'table',\n [styles.graph]: props.variant === 'graph',\n }]\"\n />\n <div :class=\"styles.content\">\n <PlLoaderLogo :size=\"64\" color=\"var(--color-div-grey)\" />\n <div v-if=\"props.title || props.subtitle\" :class=\"styles.text\">\n <div v-if=\"props.title\" :class=\"styles.title\">{{ props.title }}</div>\n <div v-if=\"props.subtitle\" :class=\"styles.subtitle\">\n <template v-if=\"Array.isArray(props.subtitle)\">\n <span v-for=\"(item, key) of props.subtitle\" :key>{{ item }}</span>\n </template>\n <span v-else>{{ props.subtitle }}</span>\n </div>\n </div>\n </div>\n </div>\n</template>\n\n<style module>\n.root {\n block-size: 100%;\n inline-size: 100%;\n position: relative;\n user-select: none;\n background-color: var(--bg-elevated-01);\n}\n\n.background {\n position: absolute;\n inset: 0;\n pointer-events: none;\n mask: linear-gradient(transparent 35%, #000 40% 60%, transparent 65%);\n mask-size: 100% 300%;\n animation-duration: 5s;\n animation-iteration-count: infinite;\n animation-name: slide;\n &.table {\n background-image: paint(pl-placeholder-table-skeleton);\n }\n &.graph {\n background-image: paint(pl-placeholder-graph-skeleton);\n }\n}\n\n.content {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 12px;\n}\n\n.text {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 4px;\n -webkit-text-stroke-color: white;\n -webkit-text-stroke-width: 4px;\n paint-order: stroke;\n}\n\n.title {\n color: var(--txt-03);\n font-size: 20px;\n font-weight: 500;\n line-height: 24px;\n letter-spacing: -0.2px;\n}\n\n.subtitle {\n color: var(--txt-03);\n font-weight: 500;\n line-height: 20px;\n display: grid;\n span {\n grid-area: 1 / 1;\n text-align: center;\n animation-name: active-subtitle;\n animation-duration: calc(6s * sibling-count());\n animation-iteration-count: infinite;\n animation-timing-function: steps(sibling-count(), jump-none);\n visibility: if(\n style(--pl-placeholder-active-subtitle: sibling-index()): visible;\n else: hidden;\n );\n }\n}\n\n@keyframes slide {\n from {\n mask-position: 0 100%;\n }\n}\n\n@keyframes active-subtitle {\n from {\n --pl-placeholder-active-subtitle: 1;\n }\n to {\n --pl-placeholder-active-subtitle: sibling-count();\n }\n}\n\n@property --pl-placeholder-active-subtitle {\n syntax: '<number>';\n inherits: false;\n initial-value: 1;\n}\n</style>\n"],"names":["workletBlob","paintWorkletCode","workletUrl","props","__props","styles","useCssModule","_createElementBlock","_normalizeClass","_unref","_createElementVNode","_createVNode","PlLoaderLogo","_toDisplayString","_openBlock","_Fragment","item","key","_hoisted_1"],"mappings":";;;sBAUMA,IAAc,IAAI;AAAA,EACtB,CAACC,CAAgB;AAAA,EACjB,EAAE,MAAM,yBAAA;AACV,GACMC,IAAa,IAAI,gBAAgBF,CAAW;AACjD,IAEE,aAAa,UAAUE,CAAU;;;;;;;;;AAOpC,UAAMC,IAAQC,GAERC,IAASC,EAAA;2BAIbC,EAmBM,OAAA;AAAA,MAnBA,OAAKC,EAAEC,EAAAJ,CAAA,EAAO,IAAI;AAAA,IAAA;MACtBK,EAKE,OAAA;AAAA,QAJC,OAAKF,EAAA,CAAGC,EAAAJ,CAAA,EAAO,YAAU;AAAA,UAAa,CAAAI,EAAAJ,CAAA,EAAO,KAAK,GAAGF,EAAM,YAAO;AAAA,UAAuB,CAAAM,EAAAJ,CAAA,EAAO,KAAK,GAAGF,EAAM,YAAO;AAAA,QAAA;;MAKxHO,EAWM,OAAA;AAAA,QAXA,OAAKF,EAAEC,EAAAJ,CAAA,EAAO,OAAO;AAAA,MAAA;QACzBM,EAAyDC,GAAA;AAAA,UAA1C,MAAM;AAAA,UAAI,OAAM;AAAA,QAAA;QACpBT,EAAM,SAASA,EAAM,iBAAhCI,EAQM,OAAA;AAAA;UARqC,OAAKC,EAAEC,EAAAJ,CAAA,EAAO,IAAI;AAAA,QAAA;UAChDF,EAAM,cAAjBI,EAAqE,OAAA;AAAA;YAA5C,OAAKC,EAAEC,EAAAJ,CAAA,EAAO,KAAK;AAAA,UAAA,GAAKQ,EAAAV,EAAM,KAAK,GAAA,CAAA;UACjDA,EAAM,iBAAjBI,EAKM,OAAA;AAAA;YALsB,OAAKC,EAAEC,EAAAJ,CAAA,EAAO,QAAQ;AAAA,UAAA;YAChC,MAAM,QAAQF,EAAM,QAAQ,KAC1CW,EAAA,EAAA,GAAAP,EAAkEQ,iBAAtCZ,EAAM,UAAQ,CAA5Ba,GAAMC,OAApBH,EAAA,GAAAP,EAAkE,QAAA,EAArB,KAAAU,OAAOD,CAAI,GAAA,CAAA,mBAE1DT,EAAwC,QAAAW,GAAAL,EAAxBV,EAAM,QAAQ,GAAA,CAAA;AAAA,UAAA;;;;;;"}
|
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
export { default as PlPlaceholder,
|
|
1
|
+
export { type PlPlaceholderProps, default as PlPlaceholder, } from './PlPlaceholder.vue';
|
|
2
|
+
export declare const PL_PLACEHOLDER_TEXTS: {
|
|
3
|
+
LOADING: {
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle: string[];
|
|
6
|
+
};
|
|
7
|
+
RUNNING: {
|
|
8
|
+
title: string;
|
|
9
|
+
subtitle: string[];
|
|
10
|
+
};
|
|
11
|
+
};
|
|
2
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/PlPlaceholder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layout/PlPlaceholder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,OAAO,IAAI,aAAa,GACzB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,oBAAoB;;;;;;;;;CAmBhC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "./PlPlaceholder.vue2.js";
|
|
2
|
+
const t = {
|
|
3
|
+
LOADING: {
|
|
4
|
+
title: "Loading data...",
|
|
5
|
+
subtitle: [
|
|
6
|
+
"No action needed—the job is active",
|
|
7
|
+
"Larger datasets take longer to load",
|
|
8
|
+
"Results will appear here as soon as they’re ready",
|
|
9
|
+
"Loading may take minutes to hours"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
RUNNING: {
|
|
13
|
+
title: "Running analysis...",
|
|
14
|
+
subtitle: [
|
|
15
|
+
"No action needed—the job is active",
|
|
16
|
+
"Larger datasets take longer to process",
|
|
17
|
+
"Results will appear here as soon as they’re ready",
|
|
18
|
+
"Processing may take minutes to hours"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
t as PL_PLACEHOLDER_TEXTS
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/layout/PlPlaceholder/index.ts"],"sourcesContent":["export {\n type PlPlaceholderProps,\n default as PlPlaceholder,\n} from './PlPlaceholder.vue';\n\nexport const PL_PLACEHOLDER_TEXTS = {\n LOADING: {\n title: 'Loading data...',\n subtitle: [\n 'No action needed—the job is active',\n 'Larger datasets take longer to load',\n 'Results will appear here as soon as they’re ready',\n 'Loading may take minutes to hours',\n ],\n },\n RUNNING: {\n title: 'Running analysis...',\n subtitle: [\n 'No action needed—the job is active',\n 'Larger datasets take longer to process',\n 'Results will appear here as soon as they’re ready',\n 'Processing may take minutes to hours',\n ],\n },\n};\n"],"names":["PL_PLACEHOLDER_TEXTS"],"mappings":";AAKO,MAAMA,IAAuB;AAAA,EAClC,SAAS;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAAA,EAEF,SAAS;AAAA,IACP,OAAO;AAAA,IACP,UAAU;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as t, createElementBlock as r, openBlock as n, normalizeClass as s, createElementVNode as a, normalizeProps as l, guardReactiveProps as i, renderSlot as u } from "vue";
|
|
2
|
+
const d = {
|
|
3
|
+
inheritAttrs: !1
|
|
4
|
+
}, m = /* @__PURE__ */ t({
|
|
5
|
+
...d,
|
|
6
|
+
__name: "DoubleContour",
|
|
7
|
+
props: {
|
|
8
|
+
groupPosition: { default: void 0 }
|
|
9
|
+
},
|
|
10
|
+
setup(o) {
|
|
11
|
+
return (e, c) => (n(), r("div", {
|
|
12
|
+
class: s(["double-contour", { [o.groupPosition]: !0 }])
|
|
13
|
+
}, [
|
|
14
|
+
a("div", l(i(e.$attrs)), [
|
|
15
|
+
u(e.$slots, "default")
|
|
16
|
+
], 16)
|
|
17
|
+
], 2));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
export {
|
|
21
|
+
m as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=DoubleContour.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DoubleContour.vue2.js","sources":["../../src/utils/DoubleContour.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nwithDefaults(defineProps<{\n groupPosition?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle';\n}>(), {\n groupPosition: undefined,\n});\n</script>\n\n<script lang=\"ts\">\n\nexport default {\n inheritAttrs: false,\n};\n</script>\n\n<template>\n <div class=\"double-contour\" :class=\"{ [groupPosition]: true }\">\n <div v-bind=\"$attrs\">\n <slot />\n </div>\n </div>\n</template>\n<style>\n.double-contour {\n &.top > div {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n.double-contour {\n &.bottom > div {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n }\n}\n.double-contour {\n &.left > div {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n.double-contour {\n &.right > div {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n.double-contour {\n &.top-left > div{\n border-top-right-radius: 0;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n.double-contour {\n &.top-right > div {\n border-bottom-right-radius: 0;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n}\n.double-contour {\n &.bottom-left > div {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-top-left-radius: 0;\n }\n}\n.double-contour {\n &.bottom-right > div {\n border-top-right-radius: 0;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n }\n}\n.double-contour {\n &.middle > div {\n border-radius: 0;\n }\n}\n</style>\n"],"names":["__default__","_createElementBlock","_normalizeClass","__props","_createElementVNode","$attrs","_renderSlot","_ctx"],"mappings":";AAUA,MAAAA,IAAe;AAAA,EACb,cAAc;AAChB;;;;;;;2BAIEC,EAIM,OAAA;AAAA,MAJD,OAAKC,EAAA,CAAC,kBAAgB,EAAA,CAAYC,EAAA,aAAa,GAAA,IAAA,CAAA;AAAA,IAAA;MAClDC,EAEM,WAFOC,EAAAA,MAAM,CAAA,GAAA;AAAA,QACjBC,EAAQC,EAAA,QAAA,SAAA;AAAA,MAAA;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode(".double-contour.top>div{border-bottom-right-radius:0;border-bottom-left-radius:0}.double-contour.bottom>div{border-top-right-radius:0;border-top-left-radius:0}.double-contour.left>div{border-top-right-radius:0;border-bottom-right-radius:0}.double-contour.right>div{border-top-left-radius:0;border-bottom-left-radius:0}.double-contour.top-left>div{border-top-right-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0}.double-contour.top-right>div{border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:0}.double-contour.bottom-left>div{border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.double-contour.bottom-right>div{border-top-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0}.double-contour.middle>div{border-radius:0}")),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
import o from "./DoubleContour.
|
|
2
|
+
import o from "./DoubleContour.vue2.js";
|
|
3
3
|
|
|
4
4
|
export {
|
|
5
5
|
o as default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/uikit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"d3-axis": "^3.0.0",
|
|
33
33
|
"resize-observer-polyfill": "^1.5.1",
|
|
34
34
|
"canonicalize": "~2.1.0",
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
35
|
+
"@platforma-sdk/model": "1.50.0",
|
|
36
|
+
"@milaboratories/helpers": "1.13.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"jsdom": "^25.0.1",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"yarpm": "^1.2.0",
|
|
44
44
|
"svgo": "^3.3.2",
|
|
45
45
|
"typescript": "~5.6.3",
|
|
46
|
-
"@milaboratories/ts-configs": "1.2.0",
|
|
47
|
-
"@milaboratories/ts-builder": "1.2.1",
|
|
48
46
|
"@milaboratories/eslint-config": "1.0.5",
|
|
49
|
-
"@milaboratories/
|
|
47
|
+
"@milaboratories/ts-configs": "1.2.0",
|
|
48
|
+
"@milaboratories/build-configs": "1.2.1",
|
|
49
|
+
"@milaboratories/ts-builder": "1.2.1"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"dev": "ts-builder serve --target browser-lib --build-config ./build.browser-lib.config.js",
|
|
@@ -12,7 +12,7 @@ import { computed, ref, useSlots, watch } from 'vue';
|
|
|
12
12
|
import { PlMaskIcon24 } from '../PlMaskIcon24';
|
|
13
13
|
import './pl-log-view.scss';
|
|
14
14
|
import { okOptional, tapIf } from '@milaboratories/helpers';
|
|
15
|
-
import type { AnyLogHandle,
|
|
15
|
+
import type { AnyLogHandle, OutputWithStatus, Platforma } from '@platforma-sdk/model';
|
|
16
16
|
import { useLogHandle } from './useLogHandle';
|
|
17
17
|
import { useLabelNotch } from '../../utils/useLabelNotch';
|
|
18
18
|
import DoubleContour from '../../utils/DoubleContour.vue';
|
|
@@ -20,7 +20,7 @@ import { PlTooltip } from '../PlTooltip';
|
|
|
20
20
|
import { PlIcon24 } from '../PlIcon24';
|
|
21
21
|
import { downloadContent } from '../../helpers/dom';
|
|
22
22
|
|
|
23
|
-
const getOutputError = <T>(o?:
|
|
23
|
+
const getOutputError = <T>(o?: OutputWithStatus<T>) => {
|
|
24
24
|
if (o && o.ok === false) {
|
|
25
25
|
return o.errors.join('\n');
|
|
26
26
|
}
|
|
@@ -52,7 +52,7 @@ const props = defineProps<{
|
|
|
52
52
|
/**
|
|
53
53
|
* Block output (Note: error and value take precedence over output property)
|
|
54
54
|
*/
|
|
55
|
-
output?:
|
|
55
|
+
output?: OutputWithStatus<unknown>;
|
|
56
56
|
/**
|
|
57
57
|
* Max retries for AnyLogHandle fetch (with the same parameters)
|
|
58
58
|
*/
|
|
@@ -9,7 +9,7 @@ export default {
|
|
|
9
9
|
import { computed, useSlots } from 'vue';
|
|
10
10
|
import { PlBlockPageTitleTeleportId } from './PlBlockPageTitleTeleportId';
|
|
11
11
|
import './pl-block-page.scss';
|
|
12
|
-
import { PlPlaceholder, type PlPlaceholderProps } from '../PlPlaceholder';
|
|
12
|
+
import { PL_PLACEHOLDER_TEXTS, PlPlaceholder, type PlPlaceholderProps } from '../PlPlaceholder';
|
|
13
13
|
|
|
14
14
|
const slots = useSlots();
|
|
15
15
|
|
|
@@ -26,7 +26,7 @@ const props = defineProps<{
|
|
|
26
26
|
|
|
27
27
|
const loadingPlaceholder = computed<PlPlaceholderProps | undefined>(() => {
|
|
28
28
|
if (typeof props.bodyLoading === 'string') {
|
|
29
|
-
return { variant: props.bodyLoading };
|
|
29
|
+
return { variant: props.bodyLoading, ...PL_PLACEHOLDER_TEXTS.LOADING };
|
|
30
30
|
}
|
|
31
31
|
return props.bodyLoading;
|
|
32
32
|
});
|
|
@@ -8,7 +8,10 @@ export interface PlPlaceholderProps {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
// Register paint worklet once at module load (uses blob URL to comply with CSP)
|
|
11
|
-
const workletBlob = new Blob(
|
|
11
|
+
const workletBlob = new Blob(
|
|
12
|
+
[paintWorkletCode],
|
|
13
|
+
{ type: 'application/javascript' },
|
|
14
|
+
);
|
|
12
15
|
const workletUrl = URL.createObjectURL(workletBlob);
|
|
13
16
|
(CSS as unknown as {
|
|
14
17
|
paintWorklet: { addModule: (url: string) => void };
|
|
@@ -19,16 +22,7 @@ const workletUrl = URL.createObjectURL(workletBlob);
|
|
|
19
22
|
import { useCssModule } from 'vue';
|
|
20
23
|
import PlLoaderLogo from '../../components/PlLoaderLogo.vue';
|
|
21
24
|
|
|
22
|
-
const
|
|
23
|
-
variant,
|
|
24
|
-
title = 'Running analysis...',
|
|
25
|
-
subtitle = [
|
|
26
|
-
'No action needed—the job is active',
|
|
27
|
-
'Larger datasets take longer to process',
|
|
28
|
-
'Results will appear here as soon as they’re ready',
|
|
29
|
-
'Processing may take minutes to hours',
|
|
30
|
-
],
|
|
31
|
-
} = defineProps<PlPlaceholderProps>();
|
|
25
|
+
const props = defineProps<PlPlaceholderProps>();
|
|
32
26
|
|
|
33
27
|
const styles = useCssModule();
|
|
34
28
|
</script>
|
|
@@ -37,19 +31,19 @@ const styles = useCssModule();
|
|
|
37
31
|
<div :class="styles.root">
|
|
38
32
|
<div
|
|
39
33
|
:class="[styles.background, {
|
|
40
|
-
[styles.table]: variant === 'table',
|
|
41
|
-
[styles.graph]: variant === 'graph',
|
|
34
|
+
[styles.table]: props.variant === 'table',
|
|
35
|
+
[styles.graph]: props.variant === 'graph',
|
|
42
36
|
}]"
|
|
43
37
|
/>
|
|
44
38
|
<div :class="styles.content">
|
|
45
39
|
<PlLoaderLogo :size="64" color="var(--color-div-grey)" />
|
|
46
|
-
<div :class="styles.text">
|
|
47
|
-
<div :class="styles.title">{{ title }}</div>
|
|
48
|
-
<div :class="styles.subtitle">
|
|
49
|
-
<template v-if="Array.isArray(subtitle)">
|
|
50
|
-
<span v-for="(item, key) of subtitle" :key>{{ item }}</span>
|
|
40
|
+
<div v-if="props.title || props.subtitle" :class="styles.text">
|
|
41
|
+
<div v-if="props.title" :class="styles.title">{{ props.title }}</div>
|
|
42
|
+
<div v-if="props.subtitle" :class="styles.subtitle">
|
|
43
|
+
<template v-if="Array.isArray(props.subtitle)">
|
|
44
|
+
<span v-for="(item, key) of props.subtitle" :key>{{ item }}</span>
|
|
51
45
|
</template>
|
|
52
|
-
<span v-else>{{ subtitle }}</span>
|
|
46
|
+
<span v-else>{{ props.subtitle }}</span>
|
|
53
47
|
</div>
|
|
54
48
|
</div>
|
|
55
49
|
</div>
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
export {
|
|
2
|
-
default as PlPlaceholder,
|
|
3
2
|
type PlPlaceholderProps,
|
|
3
|
+
default as PlPlaceholder,
|
|
4
4
|
} from './PlPlaceholder.vue';
|
|
5
|
+
|
|
6
|
+
export const PL_PLACEHOLDER_TEXTS = {
|
|
7
|
+
LOADING: {
|
|
8
|
+
title: 'Loading data...',
|
|
9
|
+
subtitle: [
|
|
10
|
+
'No action needed—the job is active',
|
|
11
|
+
'Larger datasets take longer to load',
|
|
12
|
+
'Results will appear here as soon as they’re ready',
|
|
13
|
+
'Loading may take minutes to hours',
|
|
14
|
+
],
|
|
15
|
+
},
|
|
16
|
+
RUNNING: {
|
|
17
|
+
title: 'Running analysis...',
|
|
18
|
+
subtitle: [
|
|
19
|
+
'No action needed—the job is active',
|
|
20
|
+
'Larger datasets take longer to process',
|
|
21
|
+
'Results will appear here as soon as they’re ready',
|
|
22
|
+
'Processing may take minutes to hours',
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
};
|