@vuu-ui/vuu-table-extras 0.8.25-debug → 0.8.26-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 +27 -19
- package/cjs/index.js.map +2 -2
- package/esm/index.js +48 -39
- package/esm/index.js.map +3 -3
- package/index.css +9 -11
- package/index.css.map +2 -2
- package/package.json +12 -12
- package/types/table-settings/TableSettingsPanel.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -453,13 +453,19 @@ var ColumnListItem = ({
|
|
|
453
453
|
className: (0, import_clsx4.default)(classNameProp, classBaseListItem),
|
|
454
454
|
"data-name": item == null ? void 0 : item.name,
|
|
455
455
|
children: [
|
|
456
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
457
|
-
(item == null ? void 0 : item.isCalculated) ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
458
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: `${classBase6}-text`, children: (0, import_vuu_utils10.getColumnLabel)(item) }),
|
|
459
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
456
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_vuu_ui_controls3.Icon, { name: "draggable", size: 16 }),
|
|
457
|
+
(item == null ? void 0 : item.isCalculated) ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_vuu_ui_controls3.Icon, { name: "function" }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
460
458
|
import_core2.Checkbox,
|
|
461
459
|
{
|
|
462
460
|
className: `${classBase6}-checkBox`,
|
|
461
|
+
checked: item == null ? void 0 : item.subscribed
|
|
462
|
+
}
|
|
463
|
+
),
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: `${classBase6}-text`, children: (0, import_vuu_utils10.getColumnLabel)(item) }),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
466
|
+
import_core2.Switch,
|
|
467
|
+
{
|
|
468
|
+
className: `${classBase6}-switch`,
|
|
463
469
|
checked: (item == null ? void 0 : item.hidden) !== true,
|
|
464
470
|
disabled: (item == null ? void 0 : item.subscribed) !== true
|
|
465
471
|
}
|
|
@@ -476,20 +482,18 @@ var ColumnList = ({
|
|
|
476
482
|
...htmlAttributes
|
|
477
483
|
}) => {
|
|
478
484
|
const handleChange = (0, import_react6.useCallback)(
|
|
479
|
-
(
|
|
480
|
-
const input =
|
|
481
|
-
const listItem =
|
|
485
|
+
({ target }) => {
|
|
486
|
+
const input = target;
|
|
487
|
+
const listItem = (0, import_vuu_utils10.queryClosest)(target, `.${classBaseListItem}`);
|
|
482
488
|
const {
|
|
483
489
|
dataset: { name: name2 }
|
|
484
490
|
} = listItem;
|
|
485
491
|
if (name2) {
|
|
486
|
-
const
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
);
|
|
490
|
-
if (saltSwitch) {
|
|
492
|
+
const saltCheckbox = (0, import_vuu_utils10.queryClosest)(target, `.${classBase6}-checkBox`);
|
|
493
|
+
const saltSwitch = (0, import_vuu_utils10.queryClosest)(target, `.${classBase6}-switch`);
|
|
494
|
+
if (saltCheckbox) {
|
|
491
495
|
onChange(name2, "subscribed", input.checked);
|
|
492
|
-
} else if (
|
|
496
|
+
} else if (saltSwitch) {
|
|
493
497
|
onChange(name2, "hidden", input.checked === false);
|
|
494
498
|
}
|
|
495
499
|
}
|
|
@@ -3349,6 +3353,9 @@ var import_vuu_ui_controls9 = require("@vuu-ui/vuu-ui-controls");
|
|
|
3349
3353
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
3350
3354
|
var classBase15 = "vuuTableSettingsPanel";
|
|
3351
3355
|
var TableSettingsPanel = ({
|
|
3356
|
+
allowColumnLabelCase = true,
|
|
3357
|
+
allowColumnDefaultWidth = true,
|
|
3358
|
+
allowGridRowStyling = true,
|
|
3352
3359
|
availableColumns,
|
|
3353
3360
|
onAddCalculatedColumn,
|
|
3354
3361
|
onConfigChange,
|
|
@@ -3373,7 +3380,8 @@ var TableSettingsPanel = ({
|
|
|
3373
3380
|
tableConfig: tableConfigProp
|
|
3374
3381
|
});
|
|
3375
3382
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: classBase15, children: [
|
|
3376
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.
|
|
3383
|
+
allowColumnLabelCase || allowColumnDefaultWidth || allowGridRowStyling ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: `${classBase15}-header`, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: "Column Settings" }) }) : null,
|
|
3384
|
+
allowColumnLabelCase ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core9.FormField, { children: [
|
|
3377
3385
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core9.FormFieldLabel, { children: "Column Labels" }),
|
|
3378
3386
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
3379
3387
|
import_core9.ToggleButtonGroup,
|
|
@@ -3388,8 +3396,8 @@ var TableSettingsPanel = ({
|
|
|
3388
3396
|
]
|
|
3389
3397
|
}
|
|
3390
3398
|
)
|
|
3391
|
-
] }),
|
|
3392
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core9.FormField, { children: [
|
|
3399
|
+
] }) : null,
|
|
3400
|
+
allowGridRowStyling ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core9.FormField, { children: [
|
|
3393
3401
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core9.FormFieldLabel, { children: "Grid separators" }),
|
|
3394
3402
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "saltToggleButtonGroup vuuStateButtonGroup saltToggleButtonGroup-horizontal", children: [
|
|
3395
3403
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
@@ -3420,11 +3428,11 @@ var TableSettingsPanel = ({
|
|
|
3420
3428
|
}
|
|
3421
3429
|
)
|
|
3422
3430
|
] })
|
|
3423
|
-
] }),
|
|
3424
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core9.FormField, { children: [
|
|
3431
|
+
] }) : null,
|
|
3432
|
+
allowColumnDefaultWidth ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core9.FormField, { children: [
|
|
3425
3433
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core9.FormFieldLabel, { children: "Default Column Width" }),
|
|
3426
3434
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_vuu_ui_controls9.VuuInput, { className: "vuuInput", onCommit: onCommitColumnWidth })
|
|
3427
|
-
] }),
|
|
3435
|
+
] }) : null,
|
|
3428
3436
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
3429
3437
|
ColumnList,
|
|
3430
3438
|
{
|