@sentio/ui-dashboard 0.2.1 → 0.2.3

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/dist/index.js CHANGED
@@ -58,8 +58,14 @@ __export(index_exports, {
58
58
  ScatterIcon: () => ScatterIcon_default,
59
59
  SystemLabels: () => SystemLabels,
60
60
  TableIcon: () => TableIcon_default,
61
+ ValueControls: () => ValueControls,
62
+ ValueFormatters: () => ValueFormatters,
63
+ ValueOptions: () => ValueOptions,
64
+ ValueStringMapping: () => ValueStringMapping,
61
65
  defaultBarGaugeConfig: () => defaultConfig2,
62
66
  defaultPieConfig: () => defaultConfig,
67
+ defaultValueConfig: () => defaultConfig3,
68
+ defaultValueControlsConfig: () => defaultConfig4,
63
69
  isAggrOrRollupFunction: () => isAggrOrRollupFunction,
64
70
  sentioColors: () => sentioColors,
65
71
  sentioTheme: () => sentioTheme,
@@ -2646,7 +2652,8 @@ var LineControls = ({ config, defaultOpen, onChange }) => {
2646
2652
  {
2647
2653
  buttons: lineStyles,
2648
2654
  value: config?.style || "Solid",
2649
- onChange: setStyle
2655
+ onChange: setStyle,
2656
+ small: true
2650
2657
  }
2651
2658
  ),
2652
2659
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
@@ -2817,12 +2824,12 @@ function PieChartControls({ config, defaultOpen, onChange }) {
2817
2824
  }
2818
2825
  ) }),
2819
2826
  /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
2820
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border bg-gray-50 px-3 ", children: "Calculation" }),
2827
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border border-r-0 bg-gray-50 px-3 ", children: "Calculation" }),
2821
2828
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2822
2829
  "select",
2823
2830
  {
2824
2831
  value: config.calculation,
2825
- className: "sm:text-ilabel text-text-foreground border-main inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2832
+ className: "sm:text-ilabel text-text-foreground border-main hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center rounded-r-md border pl-4 pr-7",
2826
2833
  onChange: (e) => onCalculationChange(e.target.value),
2827
2834
  children: CalculationItems.map((d) => {
2828
2835
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: d.value, children: d.label }, d.value);
@@ -2927,12 +2934,12 @@ function BarGaugeControls({ config, defaultOpen, onChange }) {
2927
2934
  containerClassName: "w-full bg-default-bg",
2928
2935
  children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-4", children: [
2929
2936
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
2930
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border bg-gray-50 px-3 ", children: "Direction" }),
2937
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border border-r-0 bg-gray-50 px-3 ", children: "Direction" }),
2931
2938
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2932
2939
  "select",
2933
2940
  {
2934
2941
  value: config.direction,
2935
- className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2942
+ className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center rounded-r-md border pl-4 pr-7",
2936
2943
  onChange: (e) => onDirectionChange(e.target.value),
2937
2944
  children: directionItems.map((d) => {
2938
2945
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: d.value, children: d.label }, d.value);
@@ -2941,12 +2948,12 @@ function BarGaugeControls({ config, defaultOpen, onChange }) {
2941
2948
  )
2942
2949
  ] }),
2943
2950
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
2944
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border bg-gray-50 px-3 ", children: "Calculation" }),
2951
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border border-r-0 bg-gray-50 px-3 ", children: "Calculation" }),
2945
2952
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2946
2953
  "select",
2947
2954
  {
2948
2955
  value: config.calculation,
2949
- className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2956
+ className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center rounded-r-md border pl-4 pr-7",
2950
2957
  onChange: (e) => onCalculationChange(e.target.value),
2951
2958
  children: CalculationItems2.map((d) => {
2952
2959
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: d.value, children: d.label }, d.value);
@@ -2955,12 +2962,12 @@ function BarGaugeControls({ config, defaultOpen, onChange }) {
2955
2962
  )
2956
2963
  ] }),
2957
2964
  /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
2958
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center whitespace-nowrap rounded-l-md border bg-gray-50 px-3", children: "Sort by" }),
2965
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center whitespace-nowrap rounded-l-md border border-r-0 bg-gray-50 px-3", children: "Sort by" }),
2959
2966
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2960
2967
  "select",
2961
2968
  {
2962
2969
  value: config?.sort?.sortBy,
2963
- className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center border border-l-0 pl-4 pr-7",
2970
+ className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center border pl-4 pr-7",
2964
2971
  onChange: (e) => onSortByChange(e.target.value),
2965
2972
  children: sortByItems.map((d) => {
2966
2973
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: d.value, children: d.label }, d.value);
@@ -2971,7 +2978,7 @@ function BarGaugeControls({ config, defaultOpen, onChange }) {
2971
2978
  "select",
2972
2979
  {
2973
2980
  value: config?.sort?.orderDesc + "",
2974
- className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2981
+ className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 focus:border-primary-600 inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2975
2982
  onChange: (e) => onOrderChange(e.target.value === "true"),
2976
2983
  children: orderItems.map((d) => {
2977
2984
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: d.value + "", children: d.label }, d.label);
@@ -2984,9 +2991,503 @@ function BarGaugeControls({ config, defaultOpen, onChange }) {
2984
2991
  );
2985
2992
  }
2986
2993
 
2987
- // src/charts/icons/LineIcon.tsx
2994
+ // src/charts/options/ValueOptions.tsx
2995
+ var import_immer9 = require("immer");
2996
+ var import_ui_core13 = require("@sentio/ui-core");
2997
+
2998
+ // src/charts/options/ValueStringMapping.tsx
2999
+ var import_lu3 = require("react-icons/lu");
3000
+ var import_ui_core12 = require("@sentio/ui-core");
3001
+ var import_immer8 = require("immer");
2988
3002
  var import_jsx_runtime15 = require("react/jsx-runtime");
2989
- var SvgIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3003
+ var operators = {
3004
+ ">": "greater than",
3005
+ ">=": "greater or equal",
3006
+ "==": "equal",
3007
+ "!=": "not equal",
3008
+ "<": "less than",
3009
+ "<=": "less or equal"
3010
+ };
3011
+ var renderTreeLine = (index, isLast) => {
3012
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "mr-2 flex h-12 w-3 flex-col items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex h-full w-full items-center", children: [
3013
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3014
+ "div",
3015
+ {
3016
+ className: (0, import_ui_core12.classNames)(
3017
+ "w-px bg-gray-300",
3018
+ isLast ? "h-1/2 self-start" : index === 0 ? "h-full self-end" : "h-full"
3019
+ )
3020
+ }
3021
+ ),
3022
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "h-px w-3 bg-gray-300" })
3023
+ ] }) });
3024
+ };
3025
+ function ValueStringMapping({ rules, onChange }) {
3026
+ const addRule = () => {
3027
+ onChange(
3028
+ (0, import_immer8.produce)(rules, (draft) => {
3029
+ draft = draft || [];
3030
+ draft.push({
3031
+ comparison: "==",
3032
+ value: 0,
3033
+ text: ""
3034
+ });
3035
+ })
3036
+ );
3037
+ };
3038
+ function removeRule(index) {
3039
+ onChange(
3040
+ (0, import_immer8.produce)(rules, (draft) => {
3041
+ draft.splice(index, 1);
3042
+ })
3043
+ );
3044
+ }
3045
+ function changeRule(index, field, value) {
3046
+ onChange(
3047
+ (0, import_immer8.produce)(rules, (draft) => {
3048
+ ;
3049
+ draft[index][field] = value;
3050
+ })
3051
+ );
3052
+ }
3053
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex w-full flex-col rounded-md py-2", children: [
3054
+ (rules || []).map((rule, index) => {
3055
+ const isLast = index === (rules || []).length - 1;
3056
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3057
+ "div",
3058
+ {
3059
+ className: "text-text-foreground flex h-10 items-center py-1",
3060
+ children: [
3061
+ renderTreeLine(index, isLast),
3062
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sm:text-ilabel inline-flex h-full items-center pr-3 font-medium", children: "If value is" }),
3063
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3064
+ "select",
3065
+ {
3066
+ value: rule.comparison,
3067
+ onChange: (e) => changeRule(index, "comparison", e.target.value),
3068
+ className: "rounded-r-0 sm:text-ilabel border-main text-text-foreground focus:border-primary-600 focus:ring-3 focus:ring-primary-600/30 inline-flex h-full items-center rounded-l-md border border-r-0 bg-gray-50 py-1 pl-4 pr-7",
3069
+ children: Object.entries(operators).map(([op, display]) => {
3070
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("option", { value: op, children: [
3071
+ "is ",
3072
+ display
3073
+ ] }, op);
3074
+ })
3075
+ }
3076
+ ),
3077
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3078
+ "input",
3079
+ {
3080
+ type: "text",
3081
+ name: "value",
3082
+ id: "value",
3083
+ className: "w-30 rounded-l-0 sm:text-ilabel border-main hover:border-primary-600 focus:border-primary-600 focus:ring-3 focus:ring-primary-600/30 block h-full rounded-r-md border px-2 py-1",
3084
+ placeholder: "0",
3085
+ value: rule.value,
3086
+ onChange: (e) => {
3087
+ changeRule(index, "value", e.target.value);
3088
+ }
3089
+ }
3090
+ ),
3091
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sm:text-ilabel inline-flex h-full items-center rounded-none px-3 font-medium", children: ", then show" }),
3092
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3093
+ "input",
3094
+ {
3095
+ type: "text",
3096
+ name: "text",
3097
+ id: "text",
3098
+ className: "sm:text-ilabel border-main hover:border-primary-600 focus:border-primary-600 focus:ring-3 focus:ring-primary-600/30 block h-full w-80 rounded-md px-2 py-1",
3099
+ placeholder: "Display text (e.g. High, Low, Normal)",
3100
+ value: rule.text,
3101
+ onChange: (e) => {
3102
+ changeRule(index, "text", e.target.value);
3103
+ }
3104
+ }
3105
+ ),
3106
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3107
+ "button",
3108
+ {
3109
+ type: "button",
3110
+ className: "mx-2",
3111
+ "aria-label": "remove",
3112
+ onClick: () => removeRule(index),
3113
+ children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3114
+ import_lu3.LuTrash2,
3115
+ {
3116
+ className: "icon text-text-foreground-disabled",
3117
+ "aria-hidden": "true"
3118
+ }
3119
+ )
3120
+ }
3121
+ )
3122
+ ]
3123
+ },
3124
+ index
3125
+ );
3126
+ }),
3127
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
3128
+ import_ui_core12.Button,
3129
+ {
3130
+ type: "button",
3131
+ role: "secondary",
3132
+ className: "mt-1 w-fit flex-none",
3133
+ "aria-label": "remove",
3134
+ onClick: addRule,
3135
+ children: [
3136
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lu3.LuPlus, { className: (0, import_ui_core12.classNames)("h-4 w-4"), "aria-hidden": "true" }),
3137
+ "Add Formatting Rule"
3138
+ ]
3139
+ }
3140
+ )
3141
+ ] });
3142
+ }
3143
+
3144
+ // src/charts/options/ValueOptions.tsx
3145
+ var import_jsx_runtime16 = require("react/jsx-runtime");
3146
+ var ValueFormatters = [
3147
+ { label: "Number", value: "NumberFormatter" },
3148
+ { label: "Date", value: "DateFormatter" },
3149
+ { label: "String", value: "StringFormatter" }
3150
+ ];
3151
+ var defaultConfig3 = {
3152
+ valueFormatter: "NumberFormatter",
3153
+ showValueLabel: false,
3154
+ maxSignificantDigits: 3,
3155
+ dateFormat: "LLL",
3156
+ mappingRules: [],
3157
+ style: "None"
3158
+ };
3159
+ var dateFormats = [
3160
+ { label: "Localized format", value: "LLL" },
3161
+ { label: "ISO String", value: "YYYY-MM-DDTHH:mm:ss.sssZ" }
3162
+ ];
3163
+ var CurrencySymbols = [
3164
+ { label: "USD", value: "$" },
3165
+ { label: "EUR", value: "\u20AC" },
3166
+ { label: "GBP", value: "\xA3" },
3167
+ { label: "CNY or JPY", value: "\xA5" },
3168
+ { label: "BTC", value: "\u0243" },
3169
+ { label: "ETH", value: "\u039E" }
3170
+ ];
3171
+ var AddonLabel = ({
3172
+ className,
3173
+ children
3174
+ }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3175
+ "span",
3176
+ {
3177
+ className: (0, import_ui_core13.classNames)(
3178
+ "sm:text-ilabel border-main inline-flex items-center whitespace-nowrap bg-gray-50 px-3",
3179
+ className
3180
+ ),
3181
+ children
3182
+ }
3183
+ );
3184
+ var ValueOptions = ({
3185
+ config,
3186
+ onChange,
3187
+ formatters = ValueFormatters,
3188
+ showPrefix,
3189
+ showSuffix
3190
+ }) => {
3191
+ function onChangeDateFormat(f) {
3192
+ onChange((0, import_immer9.produce)(config, (draft) => void (draft.dateFormat = f)));
3193
+ }
3194
+ function onChangeFormatter(f) {
3195
+ onChange((0, import_immer9.produce)(config, (draft) => void (draft.valueFormatter = f)));
3196
+ }
3197
+ function onChangeSymbol(symbol) {
3198
+ onChange((0, import_immer9.produce)(config, (draft) => void (draft.currencySymbol = symbol)));
3199
+ }
3200
+ function onStyleChange(notation) {
3201
+ onChange(
3202
+ (0, import_immer9.produce)(config, (draft) => {
3203
+ draft.style = notation;
3204
+ })
3205
+ );
3206
+ }
3207
+ function onDigitsChange(value, option) {
3208
+ onChange(
3209
+ (0, import_immer9.produce)(config, (draft) => {
3210
+ const d = draft;
3211
+ if (value) {
3212
+ const maxSignificantDigits = parseInt(value);
3213
+ if (maxSignificantDigits >= 0 && maxSignificantDigits <= 20) {
3214
+ d[option] = maxSignificantDigits;
3215
+ }
3216
+ } else {
3217
+ delete d[option];
3218
+ }
3219
+ })
3220
+ );
3221
+ }
3222
+ function onMappingRulesChange(rules) {
3223
+ onChange((0, import_immer9.produce)(config, (draft) => void (draft.mappingRules = rules)));
3224
+ }
3225
+ function onPrefixChange(value) {
3226
+ onChange(
3227
+ (0, import_immer9.produce)(config, (draft) => {
3228
+ if (value) {
3229
+ draft.prefix = value;
3230
+ } else {
3231
+ delete draft.prefix;
3232
+ }
3233
+ })
3234
+ );
3235
+ }
3236
+ function onSuffixChange(value) {
3237
+ onChange(
3238
+ (0, import_immer9.produce)(config, (draft) => {
3239
+ if (value) {
3240
+ draft.suffix = value;
3241
+ } else {
3242
+ delete draft.suffix;
3243
+ }
3244
+ })
3245
+ );
3246
+ }
3247
+ function numberAddons(style) {
3248
+ switch (style) {
3249
+ case "None":
3250
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3251
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AddonLabel, { className: "border border-l-0", children: "Fraction Digits" }),
3252
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3253
+ "input",
3254
+ {
3255
+ disabled: true,
3256
+ className: "focus:border-primary-500 sm:text-ilabel min-w-20 border-main rounded-r-md border border-l-0 py-1",
3257
+ value: ""
3258
+ }
3259
+ )
3260
+ ] });
3261
+ case "Percent":
3262
+ case "Standard":
3263
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3264
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AddonLabel, { className: "border border-x-0", children: "Fraction Digits" }),
3265
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3266
+ "input",
3267
+ {
3268
+ type: "number",
3269
+ min: 0,
3270
+ max: 20,
3271
+ className: "focus:border-primary-500 sm:text-ilabel min-w-20 border-main focus:ring-3 focus:ring-primary-600/30 hover:border-primary-600 rounded-r-md border py-1",
3272
+ value: config.maxFractionDigits,
3273
+ placeholder: "0-20",
3274
+ onChange: (e) => onDigitsChange(e.target.value, "maxFractionDigits")
3275
+ }
3276
+ )
3277
+ ] });
3278
+ case "Currency":
3279
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3280
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AddonLabel, { className: "border border-r-0", children: "Symbol" }),
3281
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "w-28 ", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3282
+ import_ui_core13.ComboInput,
3283
+ {
3284
+ onChange: onChangeSymbol,
3285
+ options: CurrencySymbols.map((s) => s.value),
3286
+ displayFn: (s) => {
3287
+ const name = CurrencySymbols.find((c) => c.value === s)?.label;
3288
+ return `${name} (${s})`;
3289
+ },
3290
+ placeholder: "$",
3291
+ value: config?.currencySymbol
3292
+ }
3293
+ ) }),
3294
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AddonLabel, { className: "border", children: "Precision" }),
3295
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3296
+ "input",
3297
+ {
3298
+ type: "number",
3299
+ min: 0,
3300
+ max: 20,
3301
+ className: "focus:border-primary-500 sm:text-ilabel min-w-20 border-main rounded-r-md border border-l-0 py-1",
3302
+ value: config.precision,
3303
+ defaultValue: 2,
3304
+ placeholder: "0-20",
3305
+ onChange: (e) => onDigitsChange(e.target.value, "precision")
3306
+ }
3307
+ )
3308
+ ] });
3309
+ default:
3310
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3311
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AddonLabel, { className: "border border-x-0", children: "Max significant digits" }),
3312
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3313
+ "input",
3314
+ {
3315
+ type: "number",
3316
+ min: 1,
3317
+ max: 21,
3318
+ className: "focus:border-primary-600 sm:text-ilabel min-w-20 border-main hover:border-primary-600 focus:ring-3 focus:ring-primary-600/30 rounded-r-md border py-1",
3319
+ value: config.maxSignificantDigits,
3320
+ placeholder: "1-21",
3321
+ onChange: (e) => onDigitsChange(e.target.value, "maxSignificantDigits")
3322
+ }
3323
+ )
3324
+ ] });
3325
+ }
3326
+ }
3327
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3328
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex", children: [
3329
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AddonLabel, { className: "rounded-l-md border border-r-0", children: "Value formatter" }),
3330
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3331
+ "select",
3332
+ {
3333
+ value: config.valueFormatter,
3334
+ className: (0, import_ui_core13.classNames)(
3335
+ "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 inline-flex items-center border py-1.5 pl-4 pr-7 focus:ring-0",
3336
+ config.valueFormatter == "StringFormatter" ? "rounded-r-md" : ""
3337
+ ),
3338
+ onChange: (e) => onChangeFormatter(e.target.value),
3339
+ children: formatters.map((d) => {
3340
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: d.value, children: d.label }, d.value);
3341
+ })
3342
+ }
3343
+ ),
3344
+ config.valueFormatter == "NumberFormatter" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3345
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AddonLabel, { className: "border border-l-0 border-r-0", children: "Style" }),
3346
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3347
+ "select",
3348
+ {
3349
+ value: config.style,
3350
+ className: "sm:text-ilabel border-main text-text-foreground hover:border-primary-600 inline-flex items-center border py-1 pl-4 pr-7 focus:ring-0",
3351
+ onChange: (e) => onStyleChange(e.target.value),
3352
+ children: [
3353
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "None", children: "None" }),
3354
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "Compact", children: "Compact" }),
3355
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "Standard", children: "Standard" }),
3356
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "Scientific", children: "Scientific" }),
3357
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "Percent", children: "Percent" }),
3358
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: "Currency", children: "Currency" })
3359
+ ]
3360
+ }
3361
+ ),
3362
+ config.style && numberAddons(config.style)
3363
+ ] }),
3364
+ config.valueFormatter == "DateFormatter" && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3365
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(AddonLabel, { className: "border border-l-0", children: "Date format" }),
3366
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3367
+ "select",
3368
+ {
3369
+ value: config.dateFormat,
3370
+ className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center rounded-r-md border border-l-0 py-1 pl-4 pr-7",
3371
+ onChange: (e) => onChangeDateFormat(e.target.value),
3372
+ children: dateFormats.map((d) => {
3373
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("option", { value: d.value, children: d.label }, d.value);
3374
+ })
3375
+ }
3376
+ )
3377
+ ] })
3378
+ ] }) }),
3379
+ (showPrefix || showSuffix) && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "mt-2 flex items-center gap-4", children: [
3380
+ showPrefix && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "border-main hover:border-primary-600 focus-within:border-primary-600 focus-within:ring-3 focus-within:ring-primary-500/30 text-icontent inline-flex items-center rounded-md border", children: [
3381
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "h-7.5 leading-7.5 border-r px-3", children: "Prefix" }),
3382
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3383
+ "input",
3384
+ {
3385
+ type: "text",
3386
+ className: "border-0 px-3 py-1.5 focus:ring-0",
3387
+ value: config.prefix || "",
3388
+ placeholder: "e.g., $, #",
3389
+ onChange: (e) => onPrefixChange(e.target.value)
3390
+ }
3391
+ )
3392
+ ] }),
3393
+ showSuffix && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "border-main hover:border-primary-600 focus-within:border-primary-600 focus-within:ring-3 focus-within:ring-primary-500/30 text-icontent inline-flex items-center rounded-md border", children: [
3394
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "h-7.5 leading-7.5 border-r px-3", children: "Suffix" }),
3395
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3396
+ "input",
3397
+ {
3398
+ type: "text",
3399
+ className: "min-w-32 border-0 px-3 py-1.5 focus:ring-0",
3400
+ value: config.suffix || "",
3401
+ placeholder: "e.g., %, USD, tokens",
3402
+ onChange: (e) => onSuffixChange(e.target.value)
3403
+ }
3404
+ )
3405
+ ] })
3406
+ ] }) }),
3407
+ config.valueFormatter == "StringFormatter" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3408
+ ValueStringMapping,
3409
+ {
3410
+ rules: config.mappingRules || [],
3411
+ onChange: onMappingRulesChange
3412
+ }
3413
+ )
3414
+ ] });
3415
+ };
3416
+
3417
+ // src/charts/options/ValueControls.tsx
3418
+ var import_lodash5 = require("lodash");
3419
+ var import_ui_core14 = require("@sentio/ui-core");
3420
+ var import_immer10 = require("immer");
3421
+ var import_jsx_runtime17 = require("react/jsx-runtime");
3422
+ var defaultConfig4 = {
3423
+ valueFormatter: "NumberFormatter",
3424
+ showValueLabel: false,
3425
+ maxSignificantDigits: 3,
3426
+ dateFormat: "LLL",
3427
+ mappingRules: [],
3428
+ style: "None",
3429
+ maxFractionDigits: 2
3430
+ };
3431
+ var ValueControls = ({
3432
+ config,
3433
+ defaultOpen,
3434
+ onChange,
3435
+ formatters = ValueFormatters,
3436
+ showPrefix,
3437
+ showSuffix
3438
+ }) => {
3439
+ config = (0, import_lodash5.defaults)(config || {}, defaultConfig4);
3440
+ function toggleShowValueLabel(checked) {
3441
+ config && onChange(
3442
+ (0, import_immer10.produce)(config, (draft) => void (draft.showValueLabel = checked))
3443
+ );
3444
+ }
3445
+ function toggleTooltipTotal(checked) {
3446
+ config && onChange((0, import_immer10.produce)(config, (draft) => void (draft.tooltipTotal = checked)));
3447
+ }
3448
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
3449
+ import_ui_core14.DisclosurePanel,
3450
+ {
3451
+ title: "Value Options",
3452
+ defaultOpen,
3453
+ containerClassName: "w-full bg-default-bg",
3454
+ children: [
3455
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3456
+ ValueOptions,
3457
+ {
3458
+ onChange,
3459
+ config,
3460
+ formatters,
3461
+ showPrefix,
3462
+ showSuffix
3463
+ }
3464
+ ),
3465
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mt-2 flex items-center gap-2", children: [
3466
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3467
+ import_ui_core14.Checkbox,
3468
+ {
3469
+ checked: config?.showValueLabel,
3470
+ onChange: toggleShowValueLabel,
3471
+ label: "Show value label"
3472
+ }
3473
+ ),
3474
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3475
+ import_ui_core14.Checkbox,
3476
+ {
3477
+ checked: config?.tooltipTotal,
3478
+ onChange: toggleTooltipTotal,
3479
+ label: "Show total in tooltip"
3480
+ }
3481
+ )
3482
+ ] })
3483
+ ]
3484
+ }
3485
+ );
3486
+ };
3487
+
3488
+ // src/charts/icons/LineIcon.tsx
3489
+ var import_jsx_runtime18 = require("react/jsx-runtime");
3490
+ var SvgIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2990
3491
  "svg",
2991
3492
  {
2992
3493
  width: "14",
@@ -2996,22 +3497,22 @@ var SvgIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2996
3497
  xmlns: "http://www.w3.org/2000/svg",
2997
3498
  className,
2998
3499
  children: [
2999
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("g", { clipPath: "url(#clip0_1774_9563)", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3500
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("g", { clipPath: "url(#clip0_1774_9563)", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3000
3501
  "path",
3001
3502
  {
3002
3503
  d: "M12.6191 13.1249H1.35352C1.21672 13.1249 1.10049 13.0771 1.00483 12.9814C0.909161 12.8857 0.861328 12.7695 0.861328 12.6327V1.35352C0.861328 1.21672 0.909161 1.10049 1.00483 1.00483C1.10049 0.909161 1.21672 0.861328 1.35352 0.861328C1.49031 0.861328 1.60654 0.909161 1.7022 1.00483C1.79787 1.10049 1.8457 1.21672 1.8457 1.35352V12.1405H12.6191C12.7559 12.1405 12.8722 12.1883 12.9678 12.284C13.0635 12.3797 13.1113 12.4959 13.1113 12.6327C13.1113 12.7695 13.0635 12.8857 12.9678 12.9814C12.8722 13.0771 12.7559 13.1249 12.6191 13.1249ZM5.26345 10.1582C5.0902 10.1582 4.95341 10.0853 4.85308 9.93945L2.7067 6.52127C2.63379 6.40285 2.61104 6.27758 2.63845 6.14545C2.66587 6.01333 2.73645 5.91081 2.8502 5.83789C2.96395 5.76497 3.08704 5.74222 3.21945 5.76964C3.35187 5.79706 3.45439 5.86545 3.52702 5.97483L5.05827 8.46333L5.68739 6.04352C5.72385 5.89768 5.81047 5.79283 5.94727 5.72895L8.43576 4.52583C8.55418 4.47099 8.67274 4.45962 8.79145 4.4917C8.91016 4.52379 9.00583 4.59437 9.07845 4.70345L10.3227 6.72689L12.155 1.21702C12.2005 1.08927 12.2826 0.993599 12.4013 0.930016C12.52 0.866432 12.6431 0.857245 12.7705 0.902453C12.898 0.947661 12.9936 1.02977 13.0575 1.14877C13.1214 1.26777 13.1306 1.39085 13.0851 1.51802L10.9247 8.03939C10.8608 8.24006 10.724 8.35177 10.5143 8.37452C10.3046 8.39727 10.1451 8.32202 10.0357 8.14877L8.46333 5.60558L6.59039 6.50814L5.74252 9.78939C5.68768 9.9991 5.55556 10.1177 5.34614 10.1451C5.31872 10.1541 5.29131 10.1586 5.26389 10.1586L5.26345 10.1582Z",
3003
3504
  fill: "currentColor"
3004
3505
  }
3005
3506
  ) }),
3006
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("clipPath", { id: "clip0_1774_9563", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3507
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("clipPath", { id: "clip0_1774_9563", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3007
3508
  ]
3008
3509
  }
3009
3510
  );
3010
3511
  var LineIcon_default = SvgIcon;
3011
3512
 
3012
3513
  // src/charts/icons/AreaIcon.tsx
3013
- var import_jsx_runtime16 = require("react/jsx-runtime");
3014
- var SvgIcon2 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3514
+ var import_jsx_runtime19 = require("react/jsx-runtime");
3515
+ var SvgIcon2 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3015
3516
  "svg",
3016
3517
  {
3017
3518
  width: "14",
@@ -3021,22 +3522,22 @@ var SvgIcon2 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)
3021
3522
  xmlns: "http://www.w3.org/2000/svg",
3022
3523
  className,
3023
3524
  children: [
3024
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("g", { clipPath: "url(#clip0_1774_9545)", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3525
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("g", { clipPath: "url(#clip0_1774_9545)", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3025
3526
  "path",
3026
3527
  {
3027
3528
  d: "M12.6193 13.1249H1.35364C1.21685 13.1249 1.10062 13.0771 1.00495 12.9814C0.909284 12.8857 0.86145 12.7695 0.86145 12.6327V1.35352C0.86145 1.21672 0.909284 1.10049 1.00495 1.00483C1.10062 0.909161 1.21685 0.861328 1.35364 0.861328C1.49043 0.861328 1.60666 0.909161 1.70233 1.00483C1.79799 1.10049 1.84583 1.21672 1.84583 1.35352V12.1405H12.6193C12.7561 12.1405 12.8723 12.1883 12.968 12.284C13.0636 12.3797 13.1115 12.4959 13.1115 12.6327C13.1115 12.7695 13.0636 12.8857 12.968 12.9814C12.8723 13.0771 12.7561 13.1249 12.6193 13.1249ZM2.62501 10.9374L4.22451 8.08008C4.26097 8.0162 4.31566 7.97289 4.38858 7.95014C4.46149 7.92739 4.53441 7.92972 4.60733 7.95714L6.12501 8.66808L7.73851 6.33008C7.83885 6.19329 7.96193 6.16135 8.10776 6.23427L9.61189 6.99989L11.7994 3.56814C11.8633 3.46781 11.9521 3.43368 12.0658 3.46577C12.1796 3.49785 12.2366 3.5731 12.2369 3.69152V10.8009C12.2369 10.9467 12.1845 11.072 12.0798 11.1767C11.9751 11.2814 11.8498 11.3338 11.704 11.3338H2.87176C2.77143 11.3338 2.69399 11.2905 2.63945 11.2038C2.58491 11.1172 2.58039 11.0284 2.62589 10.9374H2.62501Z",
3028
3529
  fill: "currentColor"
3029
3530
  }
3030
3531
  ) }),
3031
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("clipPath", { id: "clip0_1774_9545", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3532
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("clipPath", { id: "clip0_1774_9545", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3032
3533
  ]
3033
3534
  }
3034
3535
  );
3035
3536
  var AreaIcon_default = SvgIcon2;
3036
3537
 
3037
3538
  // src/charts/icons/BarIcon.tsx
3038
- var import_jsx_runtime17 = require("react/jsx-runtime");
3039
- var SvgIcon3 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3539
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3540
+ var SvgIcon3 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3040
3541
  "svg",
3041
3542
  {
3042
3543
  width: "14",
@@ -3045,7 +3546,7 @@ var SvgIcon3 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3045
3546
  fill: "none",
3046
3547
  xmlns: "http://www.w3.org/2000/svg",
3047
3548
  className,
3048
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3549
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3049
3550
  "path",
3050
3551
  {
3051
3552
  d: "M2.12791 1.5625V12.4375C2.12791 12.5938 2.07311 12.7267 1.96349 12.836C1.85387 12.9453 1.7207 13 1.56396 13C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375V1.5625C1 1.40617 1.05481 1.27333 1.16442 1.164C1.27404 1.05467 1.40722 1 1.56396 1C1.7207 1 1.85387 1.05467 1.96349 1.164C2.07311 1.27333 2.12791 1.40617 2.12791 1.5625ZM1.56396 11.875H12.436C12.5928 11.875 12.726 11.9297 12.8356 12.039C12.9452 12.1483 13 12.2812 13 12.4375C13 12.5938 12.9452 12.7267 12.8356 12.836C12.726 12.9453 12.5928 13 12.436 13H1.56396C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375C1 12.2812 1.05481 12.1483 1.16442 12.039C1.27404 11.9297 1.40722 11.875 1.56396 11.875ZM5.12014 4.578V10.375C5.12014 10.5313 5.06534 10.6642 4.95572 10.7735C4.8461 10.8828 4.71293 10.9375 4.55619 10.9375C4.39945 10.9375 4.26627 10.8828 4.15665 10.7735C4.04704 10.6642 3.99223 10.5313 3.99223 10.375V4.578C3.99223 4.42167 4.04704 4.28883 4.15665 4.1795C4.26627 4.07017 4.39945 4.0155 4.55619 4.0155C4.71293 4.0155 4.8461 4.07017 4.95572 4.1795C5.06534 4.28883 5.12014 4.42167 5.12014 4.578ZM11.1196 2.5465V10.3745C11.1196 10.5308 11.0648 10.6637 10.9552 10.773C10.8456 10.8823 10.7124 10.937 10.5557 10.937C10.3989 10.937 10.2658 10.8823 10.1562 10.773C10.0465 10.6637 9.99173 10.5308 9.99173 10.3745V2.5465C9.99173 2.39017 10.0465 2.25733 10.1562 2.148C10.2658 2.03867 10.3989 1.984 10.5557 1.984C10.7124 1.984 10.8456 2.03867 10.9552 2.148C11.0648 2.25733 11.1196 2.39017 11.1196 2.5465ZM8.11187 6.5465V10.3745C8.11187 10.5308 8.05706 10.6637 7.94745 10.773C7.83783 10.8823 7.70465 10.937 7.54792 10.937C7.39118 10.937 7.258 10.8823 7.14838 10.773C7.03877 10.6637 6.98396 10.5308 6.98396 10.3745V6.5465C6.98396 6.39017 7.03877 6.25733 7.14838 6.148C7.258 6.03867 7.39118 5.984 7.54792 5.984C7.69429 5.984 7.8248 6.03867 7.93943 6.148C8.05406 6.25733 8.11154 6.39017 8.11187 6.5465Z",
@@ -3057,8 +3558,8 @@ var SvgIcon3 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3057
3558
  var BarIcon_default = SvgIcon3;
3058
3559
 
3059
3560
  // src/charts/icons/BarGuageIcon.tsx
3060
- var import_jsx_runtime18 = require("react/jsx-runtime");
3061
- var SvgIcon4 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3561
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3562
+ var SvgIcon4 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3062
3563
  "svg",
3063
3564
  {
3064
3565
  width: "14",
@@ -3068,28 +3569,28 @@ var SvgIcon4 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)
3068
3569
  className,
3069
3570
  xmlns: "http://www.w3.org/2000/svg",
3070
3571
  children: [
3071
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3572
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3072
3573
  "path",
3073
3574
  {
3074
3575
  d: "M2.12791 1.5625V12.4375C2.12791 12.5938 2.07311 12.7267 1.96349 12.836C1.85387 12.9453 1.7207 13 1.56396 13C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375V1.5625C1 1.40617 1.05481 1.27333 1.16442 1.164C1.27404 1.05467 1.40722 1 1.56396 1C1.7207 1 1.85387 1.05467 1.96349 1.164C2.07311 1.27333 2.12791 1.40617 2.12791 1.5625ZM1.56396 11.875H12.436C12.5928 11.875 12.726 11.9297 12.8356 12.039C12.9452 12.1483 13 12.2812 13 12.4375C13 12.5938 12.9452 12.7267 12.8356 12.836C12.726 12.9453 12.5928 13 12.436 13H1.56396C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375C1 12.2812 1.05481 12.1483 1.16442 12.039C1.27404 11.9297 1.40722 11.875 1.56396 11.875Z",
3075
3576
  fill: "currentColor"
3076
3577
  }
3077
3578
  ),
3078
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3579
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3079
3580
  "path",
3080
3581
  {
3081
3582
  d: "M3.64159 4.02495H9.43859C9.59493 4.02495 9.72776 3.97014 9.83709 3.86052C9.94643 3.75091 10.0011 3.61773 10.0011 3.46099C10.0011 3.30425 9.94643 3.17108 9.83709 3.06146C9.72776 2.95184 9.59493 2.89703 9.43859 2.89703L3.64159 2.89703C3.48526 2.89703 3.35243 2.95184 3.24309 3.06146C3.13376 3.17108 3.07909 3.30425 3.07909 3.46099C3.07909 3.61773 3.13376 3.75091 3.24309 3.86052C3.35243 3.97014 3.48526 4.02495 3.64159 4.02495Z",
3082
3583
  fill: "currentColor"
3083
3584
  }
3084
3585
  ),
3085
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3586
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3086
3587
  "path",
3087
3588
  {
3088
3589
  d: "M3.64209 10.0244H11.4701C11.6264 10.0244 11.7593 9.96964 11.8686 9.86002C11.9779 9.7504 12.0326 9.61723 12.0326 9.46049C12.0326 9.30375 11.9779 9.17057 11.8686 9.06096C11.7593 8.95134 11.6264 8.89653 11.4701 8.89653H3.64209C3.48576 8.89653 3.35293 8.95134 3.24359 9.06096C3.13426 9.17057 3.07959 9.30375 3.07959 9.46049C3.07959 9.61723 3.13426 9.7504 3.24359 9.86002C3.35293 9.96964 3.48576 10.0244 3.64209 10.0244Z",
3089
3590
  fill: "currentColor"
3090
3591
  }
3091
3592
  ),
3092
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3593
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3093
3594
  "path",
3094
3595
  {
3095
3596
  d: "M3.64209 7.01668L7.47009 7.01668C7.62643 7.01634 7.75926 6.95886 7.86859 6.84423C7.97793 6.7296 8.03259 6.5991 8.03259 6.45272C8.03259 6.29598 7.97793 6.1628 7.86859 6.05319C7.75926 5.94357 7.62643 5.88876 7.47009 5.88876H3.64209C3.48576 5.88876 3.35293 5.94357 3.24359 6.05319C3.13426 6.1628 3.07959 6.29598 3.07959 6.45272C3.07959 6.60946 3.13426 6.74263 3.24359 6.85225C3.35293 6.96187 3.48576 7.01668 3.64209 7.01668Z",
@@ -3102,8 +3603,8 @@ var SvgIcon4 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)
3102
3603
  var BarGuageIcon_default = SvgIcon4;
3103
3604
 
3104
3605
  // src/charts/icons/PieIcon.tsx
3105
- var import_jsx_runtime19 = require("react/jsx-runtime");
3106
- var SvgIcon5 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3606
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3607
+ var SvgIcon5 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3107
3608
  "svg",
3108
3609
  {
3109
3610
  width: "14",
@@ -3113,8 +3614,8 @@ var SvgIcon5 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)
3113
3614
  xmlns: "http://www.w3.org/2000/svg",
3114
3615
  className,
3115
3616
  children: [
3116
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("g", { clipPath: "url(#clip0_28267_7202)", children: [
3117
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3617
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("g", { clipPath: "url(#clip0_28267_7202)", children: [
3618
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3118
3619
  "path",
3119
3620
  {
3120
3621
  d: "M5.83329 1.86662C4.92079 2.07816 4.08149 2.52998 3.40247 3.17523C2.72345 3.82048 2.22942 4.63564 1.97164 5.53618C1.71386 6.43671 1.70171 7.38982 1.93644 8.29663C2.17118 9.20345 2.64426 10.0309 3.30661 10.6933C3.96896 11.3556 4.79646 11.8287 5.70327 12.0635C6.61009 12.2982 7.56319 12.286 8.46373 12.0283C9.36426 11.7705 10.1794 11.2765 10.8247 10.5974C11.4699 9.91841 11.9217 9.07912 12.1333 8.16662C12.1333 8.01191 12.0718 7.86353 11.9624 7.75414C11.853 7.64474 11.7047 7.58328 11.55 7.58328H7.58329C7.27387 7.58328 6.97713 7.46037 6.75833 7.24157C6.53954 7.02278 6.41662 6.72604 6.41662 6.41662V2.33328C6.40938 2.26417 6.38848 2.19719 6.35515 2.13621C6.32182 2.07524 6.27671 2.02149 6.22245 1.97808C6.16819 1.93467 6.10585 1.90247 6.03905 1.88333C5.97224 1.8642 5.90231 1.85852 5.83329 1.86662Z",
@@ -3124,7 +3625,7 @@ var SvgIcon5 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)
3124
3625
  strokeLinejoin: "round"
3125
3626
  }
3126
3627
  ),
3127
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3628
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3128
3629
  "path",
3129
3630
  {
3130
3631
  d: "M8.75 2.04175C9.49067 2.30255 10.1634 2.72617 10.7187 3.28142C11.2739 3.83668 11.6975 4.50941 11.9583 5.25008H9.33333C9.17862 5.25008 9.03025 5.18862 8.92085 5.07923C8.81146 4.96983 8.75 4.82146 8.75 4.66675V2.04175Z",
@@ -3135,15 +3636,15 @@ var SvgIcon5 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)
3135
3636
  }
3136
3637
  )
3137
3638
  ] }),
3138
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("clipPath", { id: "clip0_28267_7202", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3639
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("clipPath", { id: "clip0_28267_7202", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3139
3640
  ]
3140
3641
  }
3141
3642
  );
3142
3643
  var PieIcon_default = SvgIcon5;
3143
3644
 
3144
3645
  // src/charts/icons/QueryValueIcon.tsx
3145
- var import_jsx_runtime20 = require("react/jsx-runtime");
3146
- var SvgIcon6 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3646
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3647
+ var SvgIcon6 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3147
3648
  "svg",
3148
3649
  {
3149
3650
  width: "14",
@@ -3153,8 +3654,8 @@ var SvgIcon6 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)
3153
3654
  className,
3154
3655
  xmlns: "http://www.w3.org/2000/svg",
3155
3656
  children: [
3156
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("g", { clipPath: "url(#clip0_3670_4424)", children: [
3157
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3657
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("g", { clipPath: "url(#clip0_3670_4424)", children: [
3658
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3158
3659
  "path",
3159
3660
  {
3160
3661
  d: "M11.5 1.5H2.5C1.67157 1.5 1 2.11561 1 2.875V11.125C1 11.8844 1.67157 12.5 2.5 12.5H11.5C12.3284 12.5 13 11.8844 13 11.125V2.875C13 2.11561 12.3284 1.5 11.5 1.5Z",
@@ -3164,35 +3665,35 @@ var SvgIcon6 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)
3164
3665
  strokeLinejoin: "round"
3165
3666
  }
3166
3667
  ),
3167
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3668
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3168
3669
  "path",
3169
3670
  {
3170
3671
  d: "M7.98188 5.77273H6.39097L5.75461 5.13636L6.39097 4.5H7.98188L8.61824 5.13636L7.98188 5.77273Z",
3171
3672
  fill: "currentColor"
3172
3673
  }
3173
3674
  ),
3174
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3675
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3175
3676
  "path",
3176
3677
  {
3177
3678
  d: "M7.98188 11.5H6.39097L5.75461 10.8637L6.39097 10.2273H7.98188L8.61824 10.8637L7.98188 11.5Z",
3178
3679
  fill: "currentColor"
3179
3680
  }
3180
3681
  ),
3181
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3682
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3182
3683
  "path",
3183
3684
  {
3184
3685
  d: "M8.30005 9.90907V6.09089L8.93641 5.45453L9.57278 6.09089V9.90907L8.93641 10.5454L8.30005 9.90907Z",
3185
3686
  fill: "currentColor"
3186
3687
  }
3187
3688
  ),
3188
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3689
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3189
3690
  "path",
3190
3691
  {
3191
3692
  d: "M4.80005 9.90907V6.09089L5.43641 5.45453L6.07278 6.09089V9.90907L5.43641 10.5454L4.80005 9.90907Z",
3192
3693
  fill: "currentColor"
3193
3694
  }
3194
3695
  ),
3195
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3696
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3196
3697
  "path",
3197
3698
  {
3198
3699
  d: "M1 3.5L13 3.5",
@@ -3203,15 +3704,15 @@ var SvgIcon6 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)
3203
3704
  }
3204
3705
  )
3205
3706
  ] }),
3206
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("clipPath", { id: "clip0_3670_4424", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3707
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("clipPath", { id: "clip0_3670_4424", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3207
3708
  ]
3208
3709
  }
3209
3710
  );
3210
3711
  var QueryValueIcon_default = SvgIcon6;
3211
3712
 
3212
3713
  // src/charts/icons/ScatterIcon.tsx
3213
- var import_jsx_runtime21 = require("react/jsx-runtime");
3214
- var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3714
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3715
+ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3215
3716
  "svg",
3216
3717
  {
3217
3718
  width: "14",
@@ -3221,8 +3722,8 @@ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
3221
3722
  xmlns: "http://www.w3.org/2000/svg",
3222
3723
  className,
3223
3724
  children: [
3224
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("g", { clipPath: "url(#clip0_28248_7302)", children: [
3225
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3725
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("g", { clipPath: "url(#clip0_28248_7302)", children: [
3726
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3226
3727
  "path",
3227
3728
  {
3228
3729
  d: "M1.75 1.75V12.25H12.25",
@@ -3232,7 +3733,7 @@ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
3232
3733
  strokeLinejoin: "round"
3233
3734
  }
3234
3735
  ),
3235
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3736
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3236
3737
  "path",
3237
3738
  {
3238
3739
  d: "M4.66663 8.75879V8.76754",
@@ -3242,7 +3743,7 @@ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
3242
3743
  strokeLinejoin: "round"
3243
3744
  }
3244
3745
  ),
3245
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3746
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3246
3747
  "path",
3247
3748
  {
3248
3749
  d: "M9.33337 9.34204V9.35079",
@@ -3252,7 +3753,7 @@ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
3252
3753
  strokeLinejoin: "round"
3253
3754
  }
3254
3755
  ),
3255
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3756
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3256
3757
  "path",
3257
3758
  {
3258
3759
  d: "M4.66663 4.10083V4.10958",
@@ -3262,7 +3763,7 @@ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
3262
3763
  strokeLinejoin: "round"
3263
3764
  }
3264
3765
  ),
3265
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3766
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3266
3767
  "path",
3267
3768
  {
3268
3769
  d: "M7 6.43408V6.44283",
@@ -3272,7 +3773,7 @@ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
3272
3773
  strokeLinejoin: "round"
3273
3774
  }
3274
3775
  ),
3275
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3776
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3276
3777
  "path",
3277
3778
  {
3278
3779
  d: "M11.0834 6.43408V6.44283",
@@ -3283,15 +3784,15 @@ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
3283
3784
  }
3284
3785
  )
3285
3786
  ] }),
3286
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("clipPath", { id: "clip0_28248_7302", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3787
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("clipPath", { id: "clip0_28248_7302", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3287
3788
  ]
3288
3789
  }
3289
3790
  );
3290
3791
  var ScatterIcon_default = SvgIcon7;
3291
3792
 
3292
3793
  // src/charts/icons/TableIcon.tsx
3293
- var import_jsx_runtime22 = require("react/jsx-runtime");
3294
- var SvgIcon8 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3794
+ var import_jsx_runtime25 = require("react/jsx-runtime");
3795
+ var SvgIcon8 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
3295
3796
  "svg",
3296
3797
  {
3297
3798
  width: "14",
@@ -3301,8 +3802,8 @@ var SvgIcon8 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)
3301
3802
  xmlns: "http://www.w3.org/2000/svg",
3302
3803
  className,
3303
3804
  children: [
3304
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("g", { clipPath: "url(#clip0_3670_4416)", children: [
3305
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3805
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { clipPath: "url(#clip0_3670_4416)", children: [
3806
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3306
3807
  "path",
3307
3808
  {
3308
3809
  d: "M11.5 2H2.5C1.67157 2 1 2.55964 1 3.25V10.75C1 11.4404 1.67157 12 2.5 12H11.5C12.3284 12 13 11.4404 13 10.75V3.25C13 2.55964 12.3284 2 11.5 2Z",
@@ -3312,7 +3813,7 @@ var SvgIcon8 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)
3312
3813
  strokeLinejoin: "round"
3313
3814
  }
3314
3815
  ),
3315
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3816
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3316
3817
  "path",
3317
3818
  {
3318
3819
  d: "M1 5L13 5",
@@ -3322,7 +3823,7 @@ var SvgIcon8 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)
3322
3823
  strokeLinejoin: "round"
3323
3824
  }
3324
3825
  ),
3325
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3826
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3326
3827
  "path",
3327
3828
  {
3328
3829
  d: "M6 2L6 12",
@@ -3333,7 +3834,7 @@ var SvgIcon8 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)
3333
3834
  }
3334
3835
  )
3335
3836
  ] }),
3336
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("clipPath", { id: "clip0_3670_4416", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3837
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("clipPath", { id: "clip0_3670_4416", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3337
3838
  ]
3338
3839
  }
3339
3840
  );
@@ -3368,8 +3869,14 @@ var TableIcon_default = SvgIcon8;
3368
3869
  ScatterIcon,
3369
3870
  SystemLabels,
3370
3871
  TableIcon,
3872
+ ValueControls,
3873
+ ValueFormatters,
3874
+ ValueOptions,
3875
+ ValueStringMapping,
3371
3876
  defaultBarGaugeConfig,
3372
3877
  defaultPieConfig,
3878
+ defaultValueConfig,
3879
+ defaultValueControlsConfig,
3373
3880
  isAggrOrRollupFunction,
3374
3881
  sentioColors,
3375
3882
  sentioTheme,