@vuu-ui/vuu-table-extras 0.8.5-debug → 0.8.6-debug
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/cjs/index.js +200 -239
- package/cjs/index.js.map +3 -3
- package/esm/index.js +216 -238
- package/esm/index.js.map +3 -3
- package/package.json +13 -12
- package/types/datagrid-configuration-ui/column-picker/ColumnListItem.d.ts +1 -1
- package/types/table-settings/column-picker/ColumnListItem.d.ts +1 -1
package/esm/index.js
CHANGED
|
@@ -1876,12 +1876,12 @@ import {
|
|
|
1876
1876
|
} from "react";
|
|
1877
1877
|
|
|
1878
1878
|
// src/datagrid-configuration-ui/column-picker/ColumnPicker.tsx
|
|
1879
|
-
import { List } from "@
|
|
1879
|
+
import { List } from "@salt-ds/lab";
|
|
1880
1880
|
import { Button, Text, useIdMemo as useId } from "@salt-ds/core";
|
|
1881
1881
|
import { useCallback as useCallback3, useState } from "react";
|
|
1882
1882
|
|
|
1883
1883
|
// src/datagrid-configuration-ui/column-picker/ColumnListItem.tsx
|
|
1884
|
-
import { ListItem } from "@
|
|
1884
|
+
import { ListItem } from "@salt-ds/lab";
|
|
1885
1885
|
import cx3 from "classnames";
|
|
1886
1886
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1887
1887
|
var classBase4 = "vuuColumnListItem";
|
|
@@ -1949,12 +1949,6 @@ var ColumnPicker = ({
|
|
|
1949
1949
|
(evt, selected) => onSelectionChange == null ? void 0 : onSelectionChange(selected),
|
|
1950
1950
|
[onSelectionChange]
|
|
1951
1951
|
);
|
|
1952
|
-
const handleDrop = useCallback3(
|
|
1953
|
-
(moveFrom, moveTo) => {
|
|
1954
|
-
dispatch({ type: "moveColumn", moveFrom, moveTo });
|
|
1955
|
-
},
|
|
1956
|
-
[dispatch]
|
|
1957
|
-
);
|
|
1958
1952
|
return /* @__PURE__ */ jsxs4("div", { className: classBase5, id, children: [
|
|
1959
1953
|
/* @__PURE__ */ jsxs4("div", { className: `${classBase5}-listColumn`, children: [
|
|
1960
1954
|
/* @__PURE__ */ jsx5("label", { htmlFor: `available-${id}`, children: /* @__PURE__ */ jsx5(Text, { as: "h4", children: "Available Columns" }) }),
|
|
@@ -2007,13 +2001,11 @@ var ColumnPicker = ({
|
|
|
2007
2001
|
List,
|
|
2008
2002
|
{
|
|
2009
2003
|
ListItem: ColumnListItem,
|
|
2010
|
-
allowDragDrop: true,
|
|
2011
2004
|
borderless: true,
|
|
2012
2005
|
height: "100%",
|
|
2013
2006
|
id: `selected-${id}`,
|
|
2014
2007
|
itemHeight: 24,
|
|
2015
2008
|
itemToString: (item) => item.name,
|
|
2016
|
-
onMoveListItem: handleDrop,
|
|
2017
2009
|
onSelectionChange: handleSelectionChange2,
|
|
2018
2010
|
selected: selectedColumn,
|
|
2019
2011
|
style: { flex: 1 },
|
|
@@ -2076,15 +2068,17 @@ var ColumnPicker = ({
|
|
|
2076
2068
|
|
|
2077
2069
|
// src/datagrid-configuration-ui/column-settings-panel/ColumnSettingsPanel.tsx
|
|
2078
2070
|
import { Stack } from "@vuu-ui/vuu-layout";
|
|
2071
|
+
import { StepperInput as StepperInput2 } from "@salt-ds/lab";
|
|
2079
2072
|
import {
|
|
2080
2073
|
Checkbox,
|
|
2081
2074
|
FormField as FormField2,
|
|
2075
|
+
FormFieldLabel as FormFieldLabel2,
|
|
2082
2076
|
Input,
|
|
2077
|
+
Panel as Panel2,
|
|
2083
2078
|
RadioButton,
|
|
2084
2079
|
RadioButtonGroup,
|
|
2085
|
-
|
|
2086
|
-
} from "@
|
|
2087
|
-
import { Panel as Panel2, Text as Text3 } from "@salt-ds/core";
|
|
2080
|
+
Text as Text3
|
|
2081
|
+
} from "@salt-ds/core";
|
|
2088
2082
|
import cx5 from "classnames";
|
|
2089
2083
|
import {
|
|
2090
2084
|
useCallback as useCallback5,
|
|
@@ -2093,14 +2087,14 @@ import {
|
|
|
2093
2087
|
|
|
2094
2088
|
// src/datagrid-configuration-ui/column-type-panel/ColumnTypePanel.tsx
|
|
2095
2089
|
import { getRegisteredCellRenderers } from "@vuu-ui/vuu-utils";
|
|
2096
|
-
import { Dropdown } from "@
|
|
2090
|
+
import { Dropdown } from "@salt-ds/lab";
|
|
2097
2091
|
import { Panel } from "@salt-ds/core";
|
|
2098
2092
|
import cx4 from "classnames";
|
|
2099
2093
|
import { useMemo as useMemo2 } from "react";
|
|
2100
2094
|
|
|
2101
2095
|
// src/datagrid-configuration-ui/column-type-panel/NumericColumnPanel.tsx
|
|
2102
|
-
import {
|
|
2103
|
-
import { Text as Text2 } from "@salt-ds/core";
|
|
2096
|
+
import { StepperInput, Switch } from "@salt-ds/lab";
|
|
2097
|
+
import { FormField, FormFieldLabel, Text as Text2 } from "@salt-ds/core";
|
|
2104
2098
|
import { useCallback as useCallback4 } from "react";
|
|
2105
2099
|
import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2106
2100
|
var defaultValues = {
|
|
@@ -2154,7 +2148,10 @@ var NumericColumnPanel = ({
|
|
|
2154
2148
|
switch (column.serverDataType) {
|
|
2155
2149
|
case "double":
|
|
2156
2150
|
return /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
2157
|
-
/* @__PURE__ */
|
|
2151
|
+
/* @__PURE__ */ jsxs5(FormField, { labelPlacement: "top", children: [
|
|
2152
|
+
/* @__PURE__ */ jsx6(FormFieldLabel, { children: "No of Decimals" }),
|
|
2153
|
+
/* @__PURE__ */ jsx6(StepperInput, { value: decimals, onChange: handleChangeDecimals })
|
|
2154
|
+
] }),
|
|
2158
2155
|
/* @__PURE__ */ jsx6(
|
|
2159
2156
|
Switch,
|
|
2160
2157
|
{
|
|
@@ -2272,7 +2269,6 @@ var classBase7 = "vuuColumnSettingsPanel";
|
|
|
2272
2269
|
var tabstripProps = {
|
|
2273
2270
|
className: "salt-density-high"
|
|
2274
2271
|
};
|
|
2275
|
-
var NullActivationIndicator = () => null;
|
|
2276
2272
|
var ColumnSettingsPanel = ({
|
|
2277
2273
|
column,
|
|
2278
2274
|
dispatchColumnAction,
|
|
@@ -2298,11 +2294,11 @@ var ColumnSettingsPanel = ({
|
|
|
2298
2294
|
[dispatchUpdate]
|
|
2299
2295
|
);
|
|
2300
2296
|
const handleChangeHidden = useCallback5(
|
|
2301
|
-
(evt
|
|
2297
|
+
(evt) => dispatchUpdate({ hidden: evt.target.checked }),
|
|
2302
2298
|
[dispatchUpdate]
|
|
2303
2299
|
);
|
|
2304
2300
|
const handleChangeLabel = useCallback5(
|
|
2305
|
-
(evt
|
|
2301
|
+
(evt) => dispatchUpdate({ label: evt.target.value }),
|
|
2306
2302
|
[dispatchUpdate]
|
|
2307
2303
|
);
|
|
2308
2304
|
const handleChangeWidth = useCallback5(
|
|
@@ -2323,76 +2319,72 @@ var ColumnSettingsPanel = ({
|
|
|
2323
2319
|
Stack,
|
|
2324
2320
|
{
|
|
2325
2321
|
active: activeTab,
|
|
2326
|
-
showTabs: true,
|
|
2327
2322
|
className: cx5(`${classBase7}-columnTabs`),
|
|
2328
2323
|
onTabSelectionChanged: setActiveTab,
|
|
2329
2324
|
TabstripProps: tabstripProps,
|
|
2330
2325
|
children: [
|
|
2331
2326
|
/* @__PURE__ */ jsxs7(Panel2, { title: "Column", children: [
|
|
2332
|
-
/* @__PURE__ */
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
)
|
|
2394
|
-
}
|
|
2395
|
-
)
|
|
2327
|
+
/* @__PURE__ */ jsxs7(FormField2, { labelPlacement: "left", children: [
|
|
2328
|
+
/* @__PURE__ */ jsx9(FormFieldLabel2, { children: "Hidden" }),
|
|
2329
|
+
/* @__PURE__ */ jsx9(
|
|
2330
|
+
Checkbox,
|
|
2331
|
+
{
|
|
2332
|
+
checked: column.hidden === true,
|
|
2333
|
+
onChange: handleChangeHidden
|
|
2334
|
+
}
|
|
2335
|
+
)
|
|
2336
|
+
] }),
|
|
2337
|
+
/* @__PURE__ */ jsxs7(FormField2, { labelPlacement: "left", children: [
|
|
2338
|
+
/* @__PURE__ */ jsx9(FormFieldLabel2, { children: "Label" }),
|
|
2339
|
+
/* @__PURE__ */ jsx9(
|
|
2340
|
+
Input,
|
|
2341
|
+
{
|
|
2342
|
+
value: (_a = column.label) != null ? _a : column.name,
|
|
2343
|
+
onChange: handleChangeLabel
|
|
2344
|
+
}
|
|
2345
|
+
)
|
|
2346
|
+
] }),
|
|
2347
|
+
/* @__PURE__ */ jsxs7(FormField2, { labelPlacement: "left", children: [
|
|
2348
|
+
/* @__PURE__ */ jsx9(FormFieldLabel2, { children: "Width" }),
|
|
2349
|
+
/* @__PURE__ */ jsx9(
|
|
2350
|
+
StepperInput2,
|
|
2351
|
+
{
|
|
2352
|
+
value: (_b = column.width) != null ? _b : 100,
|
|
2353
|
+
onChange: handleChangeWidth
|
|
2354
|
+
}
|
|
2355
|
+
)
|
|
2356
|
+
] }),
|
|
2357
|
+
/* @__PURE__ */ jsxs7(FormField2, { labelPlacement: "left", children: [
|
|
2358
|
+
/* @__PURE__ */ jsx9(FormFieldLabel2, { children: "ALign" }),
|
|
2359
|
+
/* @__PURE__ */ jsxs7(
|
|
2360
|
+
RadioButtonGroup,
|
|
2361
|
+
{
|
|
2362
|
+
"aria-label": "Column Align",
|
|
2363
|
+
value: (_c = column.align) != null ? _c : "left",
|
|
2364
|
+
onChange: handleChangeAlign,
|
|
2365
|
+
children: [
|
|
2366
|
+
/* @__PURE__ */ jsx9(RadioButton, { label: "Left", value: "left" }),
|
|
2367
|
+
/* @__PURE__ */ jsx9(RadioButton, { label: "Right", value: "right" })
|
|
2368
|
+
]
|
|
2369
|
+
}
|
|
2370
|
+
)
|
|
2371
|
+
] }),
|
|
2372
|
+
/* @__PURE__ */ jsxs7(FormField2, { labelPlacement: "left", children: [
|
|
2373
|
+
/* @__PURE__ */ jsx9(FormFieldLabel2, { children: "Pin Column" }),
|
|
2374
|
+
/* @__PURE__ */ jsxs7(
|
|
2375
|
+
RadioButtonGroup,
|
|
2376
|
+
{
|
|
2377
|
+
"aria-label": "Pin Column",
|
|
2378
|
+
value: (_d = column.pin) != null ? _d : "",
|
|
2379
|
+
onChange: handleChangePin,
|
|
2380
|
+
children: [
|
|
2381
|
+
/* @__PURE__ */ jsx9(RadioButton, { label: "Do not pin", value: "" }),
|
|
2382
|
+
/* @__PURE__ */ jsx9(RadioButton, { label: "Left", value: "left" }),
|
|
2383
|
+
/* @__PURE__ */ jsx9(RadioButton, { label: "Right", value: "right" })
|
|
2384
|
+
]
|
|
2385
|
+
}
|
|
2386
|
+
)
|
|
2387
|
+
] })
|
|
2396
2388
|
] }),
|
|
2397
2389
|
/* @__PURE__ */ jsx9(
|
|
2398
2390
|
ColumnTypePanel,
|
|
@@ -2403,26 +2395,14 @@ var ColumnSettingsPanel = ({
|
|
|
2403
2395
|
}
|
|
2404
2396
|
),
|
|
2405
2397
|
/* @__PURE__ */ jsxs7(Panel2, { title: "Vuu", variant: "secondary", children: [
|
|
2406
|
-
/* @__PURE__ */
|
|
2407
|
-
|
|
2408
|
-
{
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
}
|
|
2415
|
-
),
|
|
2416
|
-
/* @__PURE__ */ jsx9(
|
|
2417
|
-
FormField2,
|
|
2418
|
-
{
|
|
2419
|
-
label: "Vuu type",
|
|
2420
|
-
labelPlacement: "top",
|
|
2421
|
-
readOnly: true,
|
|
2422
|
-
variant: "secondary",
|
|
2423
|
-
children: /* @__PURE__ */ jsx9(Input, { value: column.serverDataType })
|
|
2424
|
-
}
|
|
2425
|
-
)
|
|
2398
|
+
/* @__PURE__ */ jsxs7(FormField2, { labelPlacement: "top", readOnly: true, children: [
|
|
2399
|
+
/* @__PURE__ */ jsx9(FormFieldLabel2, { children: "Name" }),
|
|
2400
|
+
/* @__PURE__ */ jsx9(Input, { value: column.name })
|
|
2401
|
+
] }),
|
|
2402
|
+
/* @__PURE__ */ jsxs7(FormField2, { labelPlacement: "top", readOnly: true, children: [
|
|
2403
|
+
/* @__PURE__ */ jsx9(FormFieldLabel2, { children: "Vuu Type" }),
|
|
2404
|
+
/* @__PURE__ */ jsx9(Input, { value: column.serverDataType })
|
|
2405
|
+
] })
|
|
2426
2406
|
] })
|
|
2427
2407
|
]
|
|
2428
2408
|
}
|
|
@@ -2435,15 +2415,16 @@ var ColumnSettingsPanel = ({
|
|
|
2435
2415
|
// src/datagrid-configuration-ui/settings-panel/GridSettingsPanel.tsx
|
|
2436
2416
|
import {
|
|
2437
2417
|
FormField as FormField3,
|
|
2418
|
+
FormFieldLabel as FormFieldLabel3,
|
|
2419
|
+
Panel as Panel3,
|
|
2438
2420
|
RadioButton as RadioButton2,
|
|
2439
2421
|
RadioButtonGroup as RadioButtonGroup2,
|
|
2440
|
-
|
|
2441
|
-
} from "@
|
|
2442
|
-
import {
|
|
2422
|
+
Text as Text4
|
|
2423
|
+
} from "@salt-ds/core";
|
|
2424
|
+
import { StepperInput as StepperInput3 } from "@salt-ds/lab";
|
|
2443
2425
|
import { useCallback as useCallback6 } from "react";
|
|
2444
2426
|
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2445
2427
|
var classBase8 = "vuuGridSettingsPanel";
|
|
2446
|
-
var NullActivationIndicator2 = () => null;
|
|
2447
2428
|
var GridSettingsPanel = ({
|
|
2448
2429
|
config,
|
|
2449
2430
|
dispatchColumnAction,
|
|
@@ -2479,35 +2460,32 @@ var GridSettingsPanel = ({
|
|
|
2479
2460
|
children: [
|
|
2480
2461
|
/* @__PURE__ */ jsx10(Text4, { as: "h4", children: "Grid Settings" }),
|
|
2481
2462
|
/* @__PURE__ */ jsxs8(Panel3, { children: [
|
|
2482
|
-
/* @__PURE__ */
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
value:
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
onChange: handleChangeWidth
|
|
2509
|
-
}
|
|
2510
|
-
) })
|
|
2463
|
+
/* @__PURE__ */ jsxs8(FormField3, { labelPlacement: "left", children: [
|
|
2464
|
+
/* @__PURE__ */ jsx10(FormFieldLabel3, { children: "Format column labels" }),
|
|
2465
|
+
/* @__PURE__ */ jsxs8(
|
|
2466
|
+
RadioButtonGroup2,
|
|
2467
|
+
{
|
|
2468
|
+
"aria-label": "Format column labels",
|
|
2469
|
+
value: config.columnFormatHeader,
|
|
2470
|
+
onChange: handleChangeLabelFormatting,
|
|
2471
|
+
children: [
|
|
2472
|
+
/* @__PURE__ */ jsx10(RadioButton2, { label: "No Formatting", value: void 0 }),
|
|
2473
|
+
/* @__PURE__ */ jsx10(RadioButton2, { label: "Capitalize", value: "capitalize" }),
|
|
2474
|
+
/* @__PURE__ */ jsx10(RadioButton2, { label: "Uppercase", value: "uppercase" })
|
|
2475
|
+
]
|
|
2476
|
+
}
|
|
2477
|
+
)
|
|
2478
|
+
] }),
|
|
2479
|
+
/* @__PURE__ */ jsxs8(FormField3, { labelPlacement: "left", children: [
|
|
2480
|
+
/* @__PURE__ */ jsx10(FormFieldLabel3, { children: "Default Column Width" }),
|
|
2481
|
+
/* @__PURE__ */ jsx10(
|
|
2482
|
+
StepperInput3,
|
|
2483
|
+
{
|
|
2484
|
+
value: (_a = config.columnDefaultWidth) != null ? _a : 100,
|
|
2485
|
+
onChange: handleChangeWidth
|
|
2486
|
+
}
|
|
2487
|
+
)
|
|
2488
|
+
] })
|
|
2511
2489
|
] })
|
|
2512
2490
|
]
|
|
2513
2491
|
}
|
|
@@ -2516,7 +2494,7 @@ var GridSettingsPanel = ({
|
|
|
2516
2494
|
|
|
2517
2495
|
// src/datagrid-configuration-ui/settings-panel/useGridSettings.ts
|
|
2518
2496
|
import { useReducer } from "react";
|
|
2519
|
-
import { moveItem } from "@
|
|
2497
|
+
import { moveItem } from "@vuu-ui/vuu-ui-controls";
|
|
2520
2498
|
import { fromServerDataType } from "@vuu-ui/vuu-utils";
|
|
2521
2499
|
var gridSettingsReducer = (state, action) => {
|
|
2522
2500
|
console.log(`gridSettingsReducer ${action.type}`);
|
|
@@ -2675,8 +2653,14 @@ function replaceColumn(columns, column) {
|
|
|
2675
2653
|
import { Stack as Stack2 } from "@vuu-ui/vuu-layout";
|
|
2676
2654
|
|
|
2677
2655
|
// src/datagrid-configuration-ui/calculated-column-panel/CalculatedColumnPanel.tsx
|
|
2678
|
-
import {
|
|
2679
|
-
|
|
2656
|
+
import {
|
|
2657
|
+
Button as Button2,
|
|
2658
|
+
FormField as FormField4,
|
|
2659
|
+
FormFieldLabel as FormFieldLabel4,
|
|
2660
|
+
Input as Input2,
|
|
2661
|
+
Panel as Panel4,
|
|
2662
|
+
Text as Text5
|
|
2663
|
+
} from "@salt-ds/core";
|
|
2680
2664
|
import {
|
|
2681
2665
|
useCallback as useCallback7,
|
|
2682
2666
|
useRef as useRef4,
|
|
@@ -2727,7 +2711,10 @@ var CalculatedColumnPanel = ({
|
|
|
2727
2711
|
}, [columnName, dispatchColumnAction]);
|
|
2728
2712
|
return /* @__PURE__ */ jsxs9(Panel4, { className: "vuuCalculatedColumnPanel", title: "Define Computed Column", children: [
|
|
2729
2713
|
/* @__PURE__ */ jsx11(Text5, { styleAs: "h4", children: "Define Computed Column" }),
|
|
2730
|
-
/* @__PURE__ */
|
|
2714
|
+
/* @__PURE__ */ jsxs9(FormField4, { labelPlacement: "left", children: [
|
|
2715
|
+
/* @__PURE__ */ jsx11(FormFieldLabel4, { children: "Column Name" }),
|
|
2716
|
+
/* @__PURE__ */ jsx11(Input2, { value: columnName, onChange: handleChangeName })
|
|
2717
|
+
] }),
|
|
2731
2718
|
/* @__PURE__ */ jsx11(
|
|
2732
2719
|
ColumnExpressionInput,
|
|
2733
2720
|
{
|
|
@@ -2807,7 +2794,6 @@ var DatagridSettingsPanel = ({
|
|
|
2807
2794
|
getTabLabel,
|
|
2808
2795
|
active: selectedTabIndex === 2 ? 1 : selectedTabIndex,
|
|
2809
2796
|
onTabSelectionChanged: handleTabSelectionChanged,
|
|
2810
|
-
showTabs: true,
|
|
2811
2797
|
children: [
|
|
2812
2798
|
/* @__PURE__ */ jsx12(
|
|
2813
2799
|
GridSettingsPanel,
|
|
@@ -2889,15 +2875,17 @@ var DataSourceStats = ({
|
|
|
2889
2875
|
|
|
2890
2876
|
// src/table-settings/column-settings-panel/ColumnSettingsPanel.tsx
|
|
2891
2877
|
import { Stack as Stack3 } from "@vuu-ui/vuu-layout";
|
|
2878
|
+
import { StepperInput as StepperInput5 } from "@salt-ds/lab";
|
|
2892
2879
|
import {
|
|
2893
2880
|
Checkbox as Checkbox2,
|
|
2894
2881
|
FormField as FormField6,
|
|
2882
|
+
FormFieldLabel as FormFieldLabel6,
|
|
2895
2883
|
Input as Input3,
|
|
2884
|
+
Panel as Panel7,
|
|
2896
2885
|
RadioButton as RadioButton3,
|
|
2897
2886
|
RadioButtonGroup as RadioButtonGroup3,
|
|
2898
|
-
|
|
2899
|
-
} from "@
|
|
2900
|
-
import { Panel as Panel7, Text as Text7 } from "@salt-ds/core";
|
|
2887
|
+
Text as Text7
|
|
2888
|
+
} from "@salt-ds/core";
|
|
2901
2889
|
import cx9 from "classnames";
|
|
2902
2890
|
import {
|
|
2903
2891
|
useCallback as useCallback10,
|
|
@@ -2906,14 +2894,18 @@ import {
|
|
|
2906
2894
|
|
|
2907
2895
|
// src/table-settings/column-type-panel/ColumnTypePanel.tsx
|
|
2908
2896
|
import { getRegisteredCellRenderers as getRegisteredCellRenderers2 } from "@vuu-ui/vuu-utils";
|
|
2909
|
-
import { Dropdown as Dropdown2 } from "@
|
|
2897
|
+
import { Dropdown as Dropdown2 } from "@salt-ds/lab";
|
|
2910
2898
|
import { Panel as Panel6 } from "@salt-ds/core";
|
|
2911
2899
|
import cx8 from "classnames";
|
|
2912
2900
|
import { useMemo as useMemo3 } from "react";
|
|
2913
2901
|
|
|
2914
2902
|
// src/table-settings/column-type-panel/NumericColumnPanel.tsx
|
|
2915
|
-
import {
|
|
2916
|
-
import {
|
|
2903
|
+
import { StepperInput as StepperInput4, Switch as Switch2 } from "@salt-ds/lab";
|
|
2904
|
+
import {
|
|
2905
|
+
FormField as FormField5,
|
|
2906
|
+
FormFieldLabel as FormFieldLabel5,
|
|
2907
|
+
Text as Text6
|
|
2908
|
+
} from "@salt-ds/core";
|
|
2917
2909
|
import { useCallback as useCallback9 } from "react";
|
|
2918
2910
|
import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2919
2911
|
var defaultValues2 = {
|
|
@@ -2967,7 +2959,10 @@ var NumericColumnPanel2 = ({
|
|
|
2967
2959
|
switch (column.serverDataType) {
|
|
2968
2960
|
case "double":
|
|
2969
2961
|
return /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
2970
|
-
/* @__PURE__ */
|
|
2962
|
+
/* @__PURE__ */ jsxs12(FormField5, { labelPlacement: "top", children: [
|
|
2963
|
+
/* @__PURE__ */ jsx14(FormFieldLabel5, { children: "No of Decimals" }),
|
|
2964
|
+
/* @__PURE__ */ jsx14(StepperInput4, { value: decimals, onChange: handleChangeDecimals })
|
|
2965
|
+
] }),
|
|
2971
2966
|
/* @__PURE__ */ jsx14(
|
|
2972
2967
|
Switch2,
|
|
2973
2968
|
{
|
|
@@ -3085,7 +3080,6 @@ var classBase12 = "vuuColumnSettingsPanel";
|
|
|
3085
3080
|
var tabstripProps2 = {
|
|
3086
3081
|
className: "salt-density-high"
|
|
3087
3082
|
};
|
|
3088
|
-
var NullActivationIndicator3 = () => null;
|
|
3089
3083
|
var ColumnSettingsPanel2 = ({
|
|
3090
3084
|
column,
|
|
3091
3085
|
dispatchColumnAction,
|
|
@@ -3111,11 +3105,11 @@ var ColumnSettingsPanel2 = ({
|
|
|
3111
3105
|
[dispatchUpdate]
|
|
3112
3106
|
);
|
|
3113
3107
|
const handleChangeHidden = useCallback10(
|
|
3114
|
-
(evt
|
|
3108
|
+
(evt) => dispatchUpdate({ hidden: evt.target.checked }),
|
|
3115
3109
|
[dispatchUpdate]
|
|
3116
3110
|
);
|
|
3117
3111
|
const handleChangeLabel = useCallback10(
|
|
3118
|
-
(evt
|
|
3112
|
+
(evt) => dispatchUpdate({ label: evt.target.value }),
|
|
3119
3113
|
[dispatchUpdate]
|
|
3120
3114
|
);
|
|
3121
3115
|
const handleChangeWidth = useCallback10(
|
|
@@ -3136,76 +3130,72 @@ var ColumnSettingsPanel2 = ({
|
|
|
3136
3130
|
Stack3,
|
|
3137
3131
|
{
|
|
3138
3132
|
active: activeTab,
|
|
3139
|
-
showTabs: true,
|
|
3140
3133
|
className: cx9(`${classBase12}-columnTabs`),
|
|
3141
3134
|
onTabSelectionChanged: setActiveTab,
|
|
3142
3135
|
TabstripProps: tabstripProps2,
|
|
3143
3136
|
children: [
|
|
3144
3137
|
/* @__PURE__ */ jsxs14(Panel7, { title: "Column", children: [
|
|
3145
|
-
/* @__PURE__ */
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
)
|
|
3207
|
-
}
|
|
3208
|
-
)
|
|
3138
|
+
/* @__PURE__ */ jsxs14(FormField6, { labelPlacement: "left", children: [
|
|
3139
|
+
/* @__PURE__ */ jsx17(FormFieldLabel6, { children: "Hidden" }),
|
|
3140
|
+
/* @__PURE__ */ jsx17(
|
|
3141
|
+
Checkbox2,
|
|
3142
|
+
{
|
|
3143
|
+
checked: column.hidden === true,
|
|
3144
|
+
onChange: handleChangeHidden
|
|
3145
|
+
}
|
|
3146
|
+
)
|
|
3147
|
+
] }),
|
|
3148
|
+
/* @__PURE__ */ jsxs14(FormField6, { labelPlacement: "left", children: [
|
|
3149
|
+
/* @__PURE__ */ jsx17(FormFieldLabel6, { children: "Label" }),
|
|
3150
|
+
/* @__PURE__ */ jsx17(
|
|
3151
|
+
Input3,
|
|
3152
|
+
{
|
|
3153
|
+
value: (_a = column.label) != null ? _a : column.name,
|
|
3154
|
+
onChange: handleChangeLabel
|
|
3155
|
+
}
|
|
3156
|
+
)
|
|
3157
|
+
] }),
|
|
3158
|
+
/* @__PURE__ */ jsxs14(FormField6, { labelPlacement: "left", children: [
|
|
3159
|
+
/* @__PURE__ */ jsx17(FormFieldLabel6, { children: "Width" }),
|
|
3160
|
+
/* @__PURE__ */ jsx17(
|
|
3161
|
+
StepperInput5,
|
|
3162
|
+
{
|
|
3163
|
+
value: (_b = column.width) != null ? _b : 100,
|
|
3164
|
+
onChange: handleChangeWidth
|
|
3165
|
+
}
|
|
3166
|
+
)
|
|
3167
|
+
] }),
|
|
3168
|
+
/* @__PURE__ */ jsxs14(FormField6, { labelPlacement: "left", children: [
|
|
3169
|
+
/* @__PURE__ */ jsx17(FormFieldLabel6, { children: "Align" }),
|
|
3170
|
+
/* @__PURE__ */ jsxs14(
|
|
3171
|
+
RadioButtonGroup3,
|
|
3172
|
+
{
|
|
3173
|
+
"aria-label": "Column Align",
|
|
3174
|
+
value: (_c = column.align) != null ? _c : "left",
|
|
3175
|
+
onChange: handleChangeAlign,
|
|
3176
|
+
children: [
|
|
3177
|
+
/* @__PURE__ */ jsx17(RadioButton3, { label: "Left", value: "left" }),
|
|
3178
|
+
/* @__PURE__ */ jsx17(RadioButton3, { label: "Right", value: "right" })
|
|
3179
|
+
]
|
|
3180
|
+
}
|
|
3181
|
+
)
|
|
3182
|
+
] }),
|
|
3183
|
+
/* @__PURE__ */ jsxs14(FormField6, { labelPlacement: "left", children: [
|
|
3184
|
+
/* @__PURE__ */ jsx17(FormFieldLabel6, { children: "Pin Column" }),
|
|
3185
|
+
/* @__PURE__ */ jsxs14(
|
|
3186
|
+
RadioButtonGroup3,
|
|
3187
|
+
{
|
|
3188
|
+
"aria-label": "Pin Column",
|
|
3189
|
+
value: (_d = column.pin) != null ? _d : "",
|
|
3190
|
+
onChange: handleChangePin,
|
|
3191
|
+
children: [
|
|
3192
|
+
/* @__PURE__ */ jsx17(RadioButton3, { label: "Do not pin", value: "" }),
|
|
3193
|
+
/* @__PURE__ */ jsx17(RadioButton3, { label: "Left", value: "left" }),
|
|
3194
|
+
/* @__PURE__ */ jsx17(RadioButton3, { label: "Right", value: "right" })
|
|
3195
|
+
]
|
|
3196
|
+
}
|
|
3197
|
+
)
|
|
3198
|
+
] })
|
|
3209
3199
|
] }),
|
|
3210
3200
|
/* @__PURE__ */ jsx17(
|
|
3211
3201
|
ColumnTypePanel2,
|
|
@@ -3216,26 +3206,14 @@ var ColumnSettingsPanel2 = ({
|
|
|
3216
3206
|
}
|
|
3217
3207
|
),
|
|
3218
3208
|
/* @__PURE__ */ jsxs14(Panel7, { title: "Vuu", variant: "secondary", children: [
|
|
3219
|
-
/* @__PURE__ */
|
|
3220
|
-
|
|
3221
|
-
{
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
}
|
|
3228
|
-
),
|
|
3229
|
-
/* @__PURE__ */ jsx17(
|
|
3230
|
-
FormField6,
|
|
3231
|
-
{
|
|
3232
|
-
label: "Vuu type",
|
|
3233
|
-
labelPlacement: "top",
|
|
3234
|
-
readOnly: true,
|
|
3235
|
-
variant: "secondary",
|
|
3236
|
-
children: /* @__PURE__ */ jsx17(Input3, { value: column.serverDataType })
|
|
3237
|
-
}
|
|
3238
|
-
)
|
|
3209
|
+
/* @__PURE__ */ jsxs14(FormField6, { labelPlacement: "top", readOnly: true, children: [
|
|
3210
|
+
/* @__PURE__ */ jsx17(FormFieldLabel6, { children: "Name" }),
|
|
3211
|
+
/* @__PURE__ */ jsx17(Input3, { value: column.name })
|
|
3212
|
+
] }),
|
|
3213
|
+
/* @__PURE__ */ jsxs14(FormField6, { labelPlacement: "top", readOnly: true, children: [
|
|
3214
|
+
/* @__PURE__ */ jsx17(FormFieldLabel6, { children: "Vuu Type" }),
|
|
3215
|
+
/* @__PURE__ */ jsx17(Input3, { value: column.serverDataType })
|
|
3216
|
+
] })
|
|
3239
3217
|
] })
|
|
3240
3218
|
]
|
|
3241
3219
|
}
|