@platforma-sdk/ui-vue 1.70.0 → 1.71.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 +8 -8
- package/.turbo/turbo-formatter$colon$check.log +2 -2
- package/.turbo/turbo-linter$colon$check.log +2 -2
- package/.turbo/turbo-types$colon$check.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/components/PlAgDataTable/sources/common.d.ts +1 -2
- package/dist/components/PlAgDataTable/sources/common.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/sources/common.js +1 -1
- package/dist/components/PlAgDataTable/sources/common.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/value-rendering.d.ts +1 -1
- package/dist/components/PlAgDataTable/sources/value-rendering.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/sources/value-rendering.js +10 -8
- package/dist/components/PlAgDataTable/sources/value-rendering.js.map +1 -1
- package/package.json +8 -8
- package/src/components/PlAgDataTable/sources/common.ts +2 -4
- package/src/components/PlAgDataTable/sources/value-rendering.ts +16 -7
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-sdk/ui-vue@1.
|
|
3
|
+
> @platforma-sdk/ui-vue@1.71.0 build /home/runner/_work/platforma/platforma/sdk/ui-vue
|
|
4
4
|
> ts-builder build --target browser-lib
|
|
5
5
|
|
|
6
6
|
Building browser-lib project...
|
|
@@ -16,7 +16,7 @@ Building browser-lib project...
|
|
|
16
16
|
rendering chunks...
|
|
17
17
|
|
|
18
18
|
[vite:dts] Start generate declaration files...
|
|
19
|
-
[vite:dts] Declaration files built in
|
|
19
|
+
[vite:dts] Declaration files built in 4672ms.
|
|
20
20
|
|
|
21
21
|
computing gzip size...
|
|
22
22
|
dist/components/PlAnnotations/components/PlAnnotations.vue?vue&type=style&index=0&lang.css 0.04 kB │ gzip: 0.06 kB
|
|
@@ -100,10 +100,10 @@ dist/components/PlAdvancedFilter/index.js
|
|
|
100
100
|
dist/components/PlAgDataTable/PlAgDataTableV2.vue_vue_type_style_index_0_lang.module.js 0.25 kB │ gzip: 0.20 kB │ map: 0.45 kB
|
|
101
101
|
dist/components/PlAnnotations/components/PlAnnotationsModal.vue_vue_type_style_index_0_lang.module.js 0.25 kB │ gzip: 0.20 kB │ map: 0.46 kB
|
|
102
102
|
dist/lib/util/helpers/dist/functions.js 0.26 kB │ gzip: 0.20 kB │ map: 5.18 kB
|
|
103
|
-
dist/components/PlAgDataTable/sources/common.js 0.26 kB │ gzip: 0.20 kB │ map: 0.60 kB
|
|
104
103
|
dist/components/PlAnnotations/utils.js 0.26 kB │ gzip: 0.23 kB │ map: 1.02 kB
|
|
105
104
|
dist/components/PlBtnExportArchive/Summary.vue_vue_type_style_index_0_lang.module.js 0.26 kB │ gzip: 0.20 kB │ map: 0.50 kB
|
|
106
105
|
dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.js 0.27 kB │ gzip: 0.17 kB │ map: 2.36 kB
|
|
106
|
+
dist/components/PlAgDataTable/sources/common.js 0.27 kB │ gzip: 0.21 kB │ map: 0.55 kB
|
|
107
107
|
dist/components/PlAdvancedFilter/OperandButton.vue_vue_type_style_index_0_lang.module.js 0.27 kB │ gzip: 0.21 kB │ map: 0.50 kB
|
|
108
108
|
dist/components/PlBtnExportArchive/Item.vue_vue_type_style_index_0_lang.module.js 0.28 kB │ gzip: 0.21 kB │ map: 0.54 kB
|
|
109
109
|
dist/components/PlAgDataTable/pl-ag-overlay-loading.module.js 0.29 kB │ gzip: 0.20 kB │ map: 0.52 kB
|
|
@@ -169,12 +169,12 @@ dist/components/PlAgDataTable/compositions/useFilterableColumns.js
|
|
|
169
169
|
dist/components/PlAgDataTable/sources/focus-row.js 0.95 kB │ gzip: 0.51 kB │ map: 2.22 kB
|
|
170
170
|
dist/plugins/Monetization/validation.js 0.99 kB │ gzip: 0.49 kB │ map: 2.58 kB
|
|
171
171
|
dist/AgGridVue/selection.js 1.00 kB │ gzip: 0.42 kB │ map: 3.18 kB
|
|
172
|
-
dist/components/PlAgDataTable/sources/value-rendering.js 1.06 kB │ gzip: 0.52 kB │ map: 2.99 kB
|
|
173
172
|
dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue_vue_type_script_setup_true_lang.js 1.10 kB │ gzip: 0.61 kB │ map: 1.88 kB
|
|
174
173
|
dist/components/PlAgCellFile/PlAgCellFile.vue_vue_type_script_setup_true_lang.js 1.14 kB │ gzip: 0.64 kB │ map: 2.93 kB
|
|
175
174
|
dist/plugins/Monetization/RunStatus.vue_vue_type_script_setup_true_lang.js 1.16 kB │ gzip: 0.62 kB │ map: 3.04 kB
|
|
176
175
|
dist/components/PlAgGridColumnManager/useFilteredItems.js 1.18 kB │ gzip: 0.61 kB │ map: 3.48 kB
|
|
177
176
|
dist/lib/util/helpers/dist/objects.js 1.20 kB │ gzip: 0.58 kB │ map: 9.83 kB
|
|
177
|
+
dist/components/PlAgDataTable/sources/value-rendering.js 1.21 kB │ gzip: 0.59 kB │ map: 3.54 kB
|
|
178
178
|
dist/createModel.js 1.22 kB │ gzip: 0.61 kB │ map: 3.11 kB
|
|
179
179
|
dist/utils.js 1.26 kB │ gzip: 0.62 kB │ map: 3.40 kB
|
|
180
180
|
dist/lib/util/helpers/dist/prettyBytes.js 1.29 kB │ gzip: 0.67 kB │ map: 3.79 kB
|
|
@@ -228,12 +228,12 @@ dist/components/PlAdvancedFilter/FilterEditor.vue_vue_type_script_setup_true_lan
|
|
|
228
228
|
dist/components/PlAgDataTable/PlAgDataTableV2.vue_vue_type_script_setup_true_lang.js 12.31 kB │ gzip: 3.90 kB │ map: 29.22 kB
|
|
229
229
|
|
|
230
230
|
[33m[33m[PLUGIN_TIMINGS] Warning:[0m Your build spent significant time in plugins. Here is a breakdown:
|
|
231
|
-
- sourcemaps (
|
|
232
|
-
- vite:dts (
|
|
231
|
+
- sourcemaps (30%)
|
|
232
|
+
- vite:dts (26%)
|
|
233
|
+
- vite:css-post (12%)
|
|
233
234
|
- vite:vue (11%)
|
|
234
|
-
- vite:css-post (7%)
|
|
235
235
|
- vite:css (7%)
|
|
236
236
|
See https://rolldown.rs/options/checks#plugintimings for more details.
|
|
237
237
|
[39m
|
|
238
|
-
[32m✓ built in 5.
|
|
238
|
+
[32m✓ built in 5.47s[39m
|
|
239
239
|
Build completed successfully
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-sdk/ui-vue@1.
|
|
3
|
+
> @platforma-sdk/ui-vue@1.71.0 formatter:check /home/runner/_work/platforma/platforma/sdk/ui-vue
|
|
4
4
|
> ts-builder formatter --check
|
|
5
5
|
|
|
6
6
|
Checking formatting...
|
|
@@ -8,5 +8,5 @@ Checking formatting...
|
|
|
8
8
|
Checking formatting...
|
|
9
9
|
|
|
10
10
|
All matched files use the correct format.
|
|
11
|
-
Finished in
|
|
11
|
+
Finished in 5486ms on 137 files using 8 threads.
|
|
12
12
|
Format check completed successfully
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-sdk/ui-vue@1.
|
|
3
|
+
> @platforma-sdk/ui-vue@1.71.0 linter:check /home/runner/_work/platforma/platforma/sdk/ui-vue
|
|
4
4
|
> ts-builder linter --check
|
|
5
5
|
|
|
6
6
|
Linting project...
|
|
7
7
|
↳ oxlint --config /home/runner/_work/platforma/platforma/sdk/ui-vue/.oxlintrc.json --deny-warnings
|
|
8
8
|
Found 0 warnings and 0 errors.
|
|
9
|
-
Finished in
|
|
9
|
+
Finished in 53ms on 120 files with 98 rules using 8 threads.
|
|
10
10
|
Linting completed successfully
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
WARN Issue while reading "/home/runner/_work/platforma/platforma/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
|
|
2
2
|
|
|
3
|
-
> @platforma-sdk/ui-vue@1.
|
|
3
|
+
> @platforma-sdk/ui-vue@1.71.0 types:check /home/runner/_work/platforma/platforma/sdk/ui-vue
|
|
4
4
|
> ts-builder type-check --target browser-lib
|
|
5
5
|
|
|
6
6
|
↳ vue-tsc.js --noEmit --project ./tsconfig.json --customConditions ,
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @platforma-sdk/ui-vue
|
|
2
2
|
|
|
3
|
+
## 1.71.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6369956: Show table with partial data
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [6369956]
|
|
12
|
+
- @milaboratories/pl-model-common@1.38.0
|
|
13
|
+
- @platforma-sdk/model@1.71.0
|
|
14
|
+
- @milaboratories/pf-spec-driver@1.3.8
|
|
15
|
+
- @milaboratories/uikit@2.13.2
|
|
16
|
+
|
|
3
17
|
## 1.70.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { PTableValue } from '@platforma-sdk/model';
|
|
2
1
|
export declare const PTableHidden: {
|
|
3
2
|
readonly type: "hidden";
|
|
4
3
|
};
|
|
5
4
|
export type PTableHidden = typeof PTableHidden;
|
|
6
|
-
export declare function isPTableHidden(value:
|
|
5
|
+
export declare function isPTableHidden(value: unknown): value is PTableHidden;
|
|
7
6
|
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/sources/common.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/sources/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;CAA8B,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC;AAE/C,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAEpE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/components/PlAgDataTable/sources/common.ts
|
|
2
2
|
var e = { type: "hidden" };
|
|
3
3
|
function t(e) {
|
|
4
|
-
return typeof e == "object" && !!e && e.type === "hidden";
|
|
4
|
+
return typeof e == "object" && !!e && "type" in e && e.type === "hidden";
|
|
5
5
|
}
|
|
6
6
|
//#endregion
|
|
7
7
|
export { e as PTableHidden, t as isPTableHidden };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","names":[],"sources":["../../../../src/components/PlAgDataTable/sources/common.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"common.js","names":[],"sources":["../../../../src/components/PlAgDataTable/sources/common.ts"],"sourcesContent":["export const PTableHidden = { type: \"hidden\" } as const;\nexport type PTableHidden = typeof PTableHidden;\n\nexport function isPTableHidden(value: unknown): value is PTableHidden {\n return typeof value === \"object\" && value !== null && \"type\" in value && value.type === \"hidden\";\n}\n"],"mappings":";AAAA,IAAa,IAAe,EAAE,MAAM,UAAU;AAG9C,SAAgB,EAAe,GAAuC;AACpE,QAAO,OAAO,KAAU,cAAY,KAAkB,UAAU,KAAS,EAAM,SAAS"}
|
|
@@ -2,7 +2,7 @@ import { PTableColumnSpec, PTableValue } from '@platforma-sdk/model';
|
|
|
2
2
|
import { ValueFormatterFunc } from 'ag-grid-enterprise';
|
|
3
3
|
import { PTableHidden } from './common';
|
|
4
4
|
import { PlAgDataTableV2Row } from '../types';
|
|
5
|
-
export declare function formatSpecialValues(value: PTableValue | PTableHidden |
|
|
5
|
+
export declare function formatSpecialValues(value: undefined | PTableValue | PTableHidden, dataStatus: undefined | "absent" | "error" | "computing" | "ready"): string | undefined;
|
|
6
6
|
export type ColumnRenderingSpec = {
|
|
7
7
|
valueFormatter: ValueFormatterFunc<PlAgDataTableV2Row, PTableValue | PTableHidden>;
|
|
8
8
|
fontFamily?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-rendering.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/sources/value-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"value-rendering.d.ts","sourceRoot":"","sources":["../../../../src/components/PlAgDataTable/sources/value-rendering.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,EAC7C,UAAU,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,GACjE,MAAM,GAAG,SAAS,CAcpB;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,kBAAkB,CAAC,kBAAkB,EAAE,WAAW,GAAG,YAAY,CAAC,CAAC;IACnF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,mBAAmB,CAoClF"}
|
|
@@ -2,8 +2,10 @@ import { isPTableHidden as e } from "./common.js";
|
|
|
2
2
|
import { Annotation as t, PTableNA as n, ValueType as r, readAnnotation as i } from "@platforma-sdk/model";
|
|
3
3
|
import * as a from "d3-format";
|
|
4
4
|
//#region src/components/PlAgDataTable/sources/value-rendering.ts
|
|
5
|
-
function o(t) {
|
|
6
|
-
if (
|
|
5
|
+
function o(t, r) {
|
|
6
|
+
if (r === "absent") return "absent";
|
|
7
|
+
if (r === "error") return "error";
|
|
8
|
+
if (r === "computing") return "computing...";
|
|
7
9
|
if (e(t)) return "loading...";
|
|
8
10
|
if (t === n) return "";
|
|
9
11
|
}
|
|
@@ -14,17 +16,17 @@ function s(e) {
|
|
|
14
16
|
case r.Long:
|
|
15
17
|
case r.Float:
|
|
16
18
|
case r.Double: {
|
|
17
|
-
let n = i(e.spec, t.Format), r = n ? a.format(n) : void 0;
|
|
19
|
+
let n = i(e.spec, t.Format), r = i(e.spec, t.DataStatus), c = n ? a.format(n) : void 0;
|
|
18
20
|
s = { valueFormatter: (e) => {
|
|
19
|
-
let t = o(e.value);
|
|
20
|
-
return t === void 0 ?
|
|
21
|
+
let t = o(e.value, r);
|
|
22
|
+
return t === void 0 ? c ? c(Number(e.value)) : e.value?.toString() ?? "" : t;
|
|
21
23
|
} };
|
|
22
24
|
break;
|
|
23
25
|
}
|
|
24
26
|
default:
|
|
25
|
-
s = { valueFormatter: (
|
|
26
|
-
let
|
|
27
|
-
return
|
|
27
|
+
s = { valueFormatter: (n) => {
|
|
28
|
+
let r = o(n.value, i(e.spec, t.DataStatus));
|
|
29
|
+
return r === void 0 ? n.value?.toString() ?? "" : r;
|
|
28
30
|
} };
|
|
29
31
|
break;
|
|
30
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"value-rendering.js","names":[],"sources":["../../../../src/components/PlAgDataTable/sources/value-rendering.ts"],"sourcesContent":["import {\n Annotation,\n PTableNA,\n readAnnotation,\n ValueType,\n type PTableColumnSpec,\n type PTableValue,\n} from \"@platforma-sdk/model\";\nimport type { ValueFormatterFunc } from \"ag-grid-enterprise\";\nimport type { PTableHidden } from \"./common\";\nimport { isPTableHidden } from \"./common\";\nimport * as d3 from \"d3-format\";\nimport type { PlAgDataTableV2Row } from \"../types\";\n\nexport function formatSpecialValues(\n value: PTableValue | PTableHidden |
|
|
1
|
+
{"version":3,"file":"value-rendering.js","names":[],"sources":["../../../../src/components/PlAgDataTable/sources/value-rendering.ts"],"sourcesContent":["import {\n Annotation,\n PTableNA,\n readAnnotation,\n ValueType,\n type PTableColumnSpec,\n type PTableValue,\n} from \"@platforma-sdk/model\";\nimport type { ValueFormatterFunc } from \"ag-grid-enterprise\";\nimport type { PTableHidden } from \"./common\";\nimport { isPTableHidden } from \"./common\";\nimport * as d3 from \"d3-format\";\nimport type { PlAgDataTableV2Row } from \"../types\";\n\nexport function formatSpecialValues(\n value: undefined | PTableValue | PTableHidden,\n dataStatus: undefined | \"absent\" | \"error\" | \"computing\" | \"ready\",\n): string | undefined {\n if (dataStatus === \"absent\") {\n return \"absent\";\n } else if (dataStatus === \"error\") {\n return \"error\";\n } else if (dataStatus === \"computing\") {\n return \"computing...\";\n } else if (isPTableHidden(value)) {\n return \"loading...\";\n } else if (value === PTableNA) {\n return \"\";\n } else {\n return undefined;\n }\n}\n\nexport type ColumnRenderingSpec = {\n valueFormatter: ValueFormatterFunc<PlAgDataTableV2Row, PTableValue | PTableHidden>;\n fontFamily?: string;\n};\n\nexport function getColumnRenderingSpec(spec: PTableColumnSpec): ColumnRenderingSpec {\n const valueType = spec.type === \"axis\" ? spec.spec.type : spec.spec.valueType;\n let renderSpec: ColumnRenderingSpec;\n switch (valueType) {\n case ValueType.Int:\n case ValueType.Long:\n case ValueType.Float:\n case ValueType.Double: {\n const format = readAnnotation(spec.spec, Annotation.Format);\n const dataStatus = readAnnotation(spec.spec, Annotation.DataStatus);\n const formatFn = format ? d3.format(format) : undefined;\n renderSpec = {\n valueFormatter: (params) => {\n const formatted = formatSpecialValues(params.value, dataStatus);\n if (formatted !== undefined) return formatted;\n return formatFn ? formatFn(Number(params.value)) : (params.value?.toString() ?? \"\");\n },\n };\n break;\n }\n default:\n renderSpec = {\n valueFormatter: (params) => {\n const formatted = formatSpecialValues(\n params.value,\n readAnnotation(spec.spec, Annotation.DataStatus),\n );\n if (formatted !== undefined) return formatted;\n return params.value?.toString() ?? \"\";\n },\n };\n break;\n }\n const fontFamily = readAnnotation(spec.spec, Annotation.Table.FontFamily);\n if (fontFamily) renderSpec.fontFamily = fontFamily;\n return renderSpec;\n}\n"],"mappings":";;;;AAcA,SAAgB,EACd,GACA,GACoB;AACpB,KAAI,MAAe,SACjB,QAAO;KACE,MAAe,QACxB,QAAO;KACE,MAAe,YACxB,QAAO;KACE,EAAe,EAAM,CAC9B,QAAO;KACE,MAAU,EACnB,QAAO;;AAWX,SAAgB,EAAuB,GAA6C;CAClF,IAAM,IAAY,EAAK,SAAS,SAAS,EAAK,KAAK,OAAO,EAAK,KAAK,WAChE;AACJ,SAAQ,GAAR;EACE,KAAK,EAAU;EACf,KAAK,EAAU;EACf,KAAK,EAAU;EACf,KAAK,EAAU,QAAQ;GACrB,IAAM,IAAS,EAAe,EAAK,MAAM,EAAW,OAAO,EACrD,IAAa,EAAe,EAAK,MAAM,EAAW,WAAW,EAC7D,IAAW,IAAS,EAAG,OAAO,EAAO,GAAG,KAAA;AAC9C,OAAa,EACX,iBAAiB,MAAW;IAC1B,IAAM,IAAY,EAAoB,EAAO,OAAO,EAAW;AAE/D,WADI,MAAc,KAAA,IACX,IAAW,EAAS,OAAO,EAAO,MAAM,CAAC,GAAI,EAAO,OAAO,UAAU,IAAI,KAD5C;MAGvC;AACD;;EAEF;AACE,OAAa,EACX,iBAAiB,MAAW;IAC1B,IAAM,IAAY,EAChB,EAAO,OACP,EAAe,EAAK,MAAM,EAAW,WAAW,CACjD;AAED,WADI,MAAc,KAAA,IACX,EAAO,OAAO,UAAU,IAAI,KADC;MAGvC;AACD;;CAEJ,IAAM,IAAa,EAAe,EAAK,MAAM,EAAW,MAAM,WAAW;AAEzE,QADI,MAAY,EAAW,aAAa,IACjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/ui-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.71.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"lru-cache": "^11.2.2",
|
|
27
27
|
"vue": "^3.5.24",
|
|
28
28
|
"zod": "~3.25.76",
|
|
29
|
-
"@milaboratories/pf-spec-driver": "1.3.
|
|
30
|
-
"@milaboratories/pl-model-common": "1.
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
29
|
+
"@milaboratories/pf-spec-driver": "1.3.8",
|
|
30
|
+
"@milaboratories/pl-model-common": "1.38.0",
|
|
31
|
+
"@milaboratories/uikit": "2.13.2",
|
|
32
|
+
"@platforma-sdk/model": "1.71.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@faker-js/faker": "^9.2.0",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"typescript": "~5.9.3",
|
|
46
46
|
"vite": "^8.0.6",
|
|
47
47
|
"vitest": "^4.1.3",
|
|
48
|
-
"@milaboratories/build-configs": "2.0.0",
|
|
49
|
-
"@milaboratories/ts-builder": "1.3.2",
|
|
50
48
|
"@milaboratories/helpers": "1.14.1",
|
|
51
|
-
"@milaboratories/
|
|
49
|
+
"@milaboratories/build-configs": "2.0.0",
|
|
50
|
+
"@milaboratories/ts-configs": "1.2.3",
|
|
51
|
+
"@milaboratories/ts-builder": "1.3.2"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"dev": "ts-builder serve --target browser-lib",
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { PTableValue } from "@platforma-sdk/model";
|
|
2
|
-
|
|
3
1
|
export const PTableHidden = { type: "hidden" } as const;
|
|
4
2
|
export type PTableHidden = typeof PTableHidden;
|
|
5
3
|
|
|
6
|
-
export function isPTableHidden(value:
|
|
7
|
-
return typeof value === "object" && value !== null && value.type === "hidden";
|
|
4
|
+
export function isPTableHidden(value: unknown): value is PTableHidden {
|
|
5
|
+
return typeof value === "object" && value !== null && "type" in value && value.type === "hidden";
|
|
8
6
|
}
|
|
@@ -13,10 +13,15 @@ import * as d3 from "d3-format";
|
|
|
13
13
|
import type { PlAgDataTableV2Row } from "../types";
|
|
14
14
|
|
|
15
15
|
export function formatSpecialValues(
|
|
16
|
-
value:
|
|
16
|
+
value: undefined | PTableValue | PTableHidden,
|
|
17
|
+
dataStatus: undefined | "absent" | "error" | "computing" | "ready",
|
|
17
18
|
): string | undefined {
|
|
18
|
-
if (
|
|
19
|
-
return "
|
|
19
|
+
if (dataStatus === "absent") {
|
|
20
|
+
return "absent";
|
|
21
|
+
} else if (dataStatus === "error") {
|
|
22
|
+
return "error";
|
|
23
|
+
} else if (dataStatus === "computing") {
|
|
24
|
+
return "computing...";
|
|
20
25
|
} else if (isPTableHidden(value)) {
|
|
21
26
|
return "loading...";
|
|
22
27
|
} else if (value === PTableNA) {
|
|
@@ -40,12 +45,13 @@ export function getColumnRenderingSpec(spec: PTableColumnSpec): ColumnRenderingS
|
|
|
40
45
|
case ValueType.Float:
|
|
41
46
|
case ValueType.Double: {
|
|
42
47
|
const format = readAnnotation(spec.spec, Annotation.Format);
|
|
48
|
+
const dataStatus = readAnnotation(spec.spec, Annotation.DataStatus);
|
|
43
49
|
const formatFn = format ? d3.format(format) : undefined;
|
|
44
50
|
renderSpec = {
|
|
45
51
|
valueFormatter: (params) => {
|
|
46
|
-
const formatted = formatSpecialValues(params.value);
|
|
52
|
+
const formatted = formatSpecialValues(params.value, dataStatus);
|
|
47
53
|
if (formatted !== undefined) return formatted;
|
|
48
|
-
return formatFn ? formatFn(Number(params.value)) : params.value
|
|
54
|
+
return formatFn ? formatFn(Number(params.value)) : (params.value?.toString() ?? "");
|
|
49
55
|
},
|
|
50
56
|
};
|
|
51
57
|
break;
|
|
@@ -53,9 +59,12 @@ export function getColumnRenderingSpec(spec: PTableColumnSpec): ColumnRenderingS
|
|
|
53
59
|
default:
|
|
54
60
|
renderSpec = {
|
|
55
61
|
valueFormatter: (params) => {
|
|
56
|
-
const formatted = formatSpecialValues(
|
|
62
|
+
const formatted = formatSpecialValues(
|
|
63
|
+
params.value,
|
|
64
|
+
readAnnotation(spec.spec, Annotation.DataStatus),
|
|
65
|
+
);
|
|
57
66
|
if (formatted !== undefined) return formatted;
|
|
58
|
-
return params.value
|
|
67
|
+
return params.value?.toString() ?? "";
|
|
59
68
|
},
|
|
60
69
|
};
|
|
61
70
|
break;
|