@stoker-platform/types 0.5.9 → 0.5.11
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/package.json +1 -1
- package/src/types/schema.ts +3 -1
package/package.json
CHANGED
package/src/types/schema.ts
CHANGED
|
@@ -563,6 +563,7 @@ export type SelectFilter = {
|
|
|
563
563
|
title?: string | (() => string)
|
|
564
564
|
roles?: StokerRole[]
|
|
565
565
|
condition?: (value: boolean | string | number | undefined) => boolean
|
|
566
|
+
defaultValue?: string | number | (() => string | number)
|
|
566
567
|
value?: string | number
|
|
567
568
|
style?: "select" | "radio" | "buttons"
|
|
568
569
|
}
|
|
@@ -579,7 +580,7 @@ export type RelationFilter = {
|
|
|
579
580
|
export type Filter = StatusFilter | RangeFilter | SelectFilter | RelationFilter
|
|
580
581
|
|
|
581
582
|
export interface Metric {
|
|
582
|
-
type: "sum" | "average" | "count"
|
|
583
|
+
type: "sum" | "average" | "count" | "custom"
|
|
583
584
|
field?: string
|
|
584
585
|
roles?: StokerRole[]
|
|
585
586
|
title?: string
|
|
@@ -587,6 +588,7 @@ export interface Metric {
|
|
|
587
588
|
prefix?: string
|
|
588
589
|
suffix?: string
|
|
589
590
|
textSize?: "text-xl" | "text-2xl" | "text-3xl"
|
|
591
|
+
formula?: (records: StokerRecord[]) => number | string
|
|
590
592
|
}
|
|
591
593
|
export interface Chart {
|
|
592
594
|
type: "area"
|