@drivenets/design-system 0.13.0 → 0.15.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/CHANGELOG.md +29 -0
- package/README.md +1 -1
- package/dist/index.cjs +1155 -381
- package/dist/index.d.cts +371 -21
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +371 -21
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1151 -381
- package/dist/index.js.map +1 -1
- package/dist/index.min.css +1 -1
- package/package.json +16 -13
- package/src/components/ds-button-v3/ds-button-v3.figma.ts +99 -0
- package/src/components/ds-button-v3/ds-button-v3.module.scss +22 -22
- package/src/components/ds-card/figma/ds-card-content.figma.ts +15 -0
- package/src/components/ds-card/figma/ds-card-footer.figma.ts +15 -0
- package/src/components/ds-card/figma/ds-card-header.figma.ts +15 -0
- package/src/components/ds-card/figma/ds-card.figma.ts +72 -0
- package/src/components/ds-date-picker/ds-date-picker.figma.ts +19 -0
- package/src/components/ds-drawer/ds-drawer.module.scss +14 -0
- package/src/components/ds-drawer/ds-drawer.tsx +20 -1
- package/src/components/ds-drawer/ds-drawer.types.ts +7 -0
- package/src/components/ds-file-upload/hooks/use-file-upload.ts +7 -0
- package/src/components/ds-form-control/ds-form-control.figma.ts +76 -0
- package/src/components/ds-icon/figma/ds-icon-material.figma.batch.ts +10 -0
- package/src/components/ds-icon/figma/ds-icon-special.figma.batch.ts +18 -0
- package/src/components/ds-icon/figma/ds-icon.figma.batch.json +2873 -0
- package/src/components/ds-modal/figma/ds-modal-content.figma.ts +18 -0
- package/src/components/ds-modal/figma/ds-modal-footer.figma.ts +19 -0
- package/src/components/ds-modal/figma/ds-modal-header.figma.ts +21 -0
- package/src/components/ds-modal/figma/ds-modal.figma.ts +36 -0
- package/src/components/ds-popover/ds-popover.module.scss +58 -16
- package/src/components/ds-popover/ds-popover.tsx +148 -24
- package/src/components/ds-popover/ds-popover.types.ts +95 -12
- package/src/components/ds-popover/index.ts +1 -1
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.figma.ts +29 -0
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.module.scss +39 -0
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.tsx +122 -0
- package/src/components/ds-progress-task-bar/ds-progress-task-bar.types.ts +65 -0
- package/src/components/ds-progress-task-bar/index.ts +2 -0
- package/src/components/ds-progress-task-bar/utils.ts +51 -0
- package/src/components/ds-select/ds-select.figma.ts +53 -0
- package/src/components/ds-split-button/ds-split-button.figma.ts +95 -0
- package/src/components/ds-status-badge-v2/ds-status-badge-v2.figma.ts +41 -0
- package/src/components/ds-table/components/ds-table-body-virtualized/ds-table-body-virtualized.tsx +8 -3
- package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss +31 -0
- package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx +48 -0
- package/src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.types.ts +12 -0
- package/src/components/ds-table/components/ds-table-group-header-cell/index.ts +2 -0
- package/src/components/ds-table/components/ds-table-header/ds-table-header.module.scss +4 -0
- package/src/components/ds-table/components/ds-table-header/ds-table-header.tsx +55 -39
- package/src/components/ds-table/components/ds-table-row/ds-table-row.module.scss +5 -1
- package/src/components/ds-table/components/ds-table-row/ds-table-row.tsx +4 -0
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.module.scss +5 -1
- package/src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx +4 -0
- package/src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.module.scss +14 -2
- package/src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.tsx +19 -0
- package/src/components/ds-table/context/ds-table-context.ts +4 -0
- package/src/components/ds-table/ds-table-column.types.ts +24 -0
- package/src/components/ds-table/ds-table.tsx +48 -6
- package/src/components/ds-table/ds-table.types.ts +62 -0
- package/src/components/ds-table/figma/ds-table-expandable.figma.ts +17 -0
- package/src/components/ds-table/figma/ds-table.figma.ts +16 -0
- package/src/components/ds-table/grouping/hooks/use-column-groups.ts +73 -0
- package/src/components/ds-table/grouping/index.ts +5 -0
- package/src/components/ds-table/grouping/types/column-group-meta.augmentation.ts +26 -0
- package/src/components/ds-table/grouping/types/column-group.types.ts +35 -0
- package/src/components/ds-table/grouping/utils/column-group.ts +119 -0
- package/src/components/ds-table/index.ts +4 -0
- package/src/components/ds-table/styles/_variables.scss +1 -0
- package/src/components/ds-table/utils/constants.ts +5 -0
- package/src/components/ds-tabs/figma/ds-tabs-tab-vertical.figma.ts +78 -0
- package/src/components/ds-tabs/figma/ds-tabs-tab.figma.ts +89 -0
- package/src/components/ds-tabs/figma/ds-tabs-vertical.figma.ts +31 -0
- package/src/components/ds-tabs/figma/ds-tabs.figma.ts +29 -0
- package/src/components/ds-tag/ds-tag.module.scss +22 -1
- package/src/components/ds-tag/ds-tag.tsx +16 -3
- package/src/components/ds-tag/ds-tag.types.ts +22 -8
- package/src/components/ds-tag/ds-tag.unit.test.ts +32 -0
- package/src/components/ds-tag-filter/ds-tag-filter.tsx +14 -22
- package/src/components/ds-text-input/ds-text-input.figma.ts +60 -0
- package/src/components/ds-time-picker/ds-time-picker.figma.ts +18 -0
- package/src/index.ts +1 -0
- package/src/styles/_root_new.scss +2 -0
- package/src/styles/_scrollbars.scss +27 -50
package/dist/index.cjs
CHANGED
|
@@ -52,8 +52,6 @@ let _ark_ui_react_popover = require("@ark-ui/react/popover");
|
|
|
52
52
|
let _ark_ui_react_select = require("@ark-ui/react/select");
|
|
53
53
|
let _radix_ui_react_collapsible = require("@radix-ui/react-collapsible");
|
|
54
54
|
_radix_ui_react_collapsible = __toESM(_radix_ui_react_collapsible);
|
|
55
|
-
let _radix_ui_react_popover = require("@radix-ui/react-popover");
|
|
56
|
-
_radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
57
55
|
let _ark_ui_react_radio_group = require("@ark-ui/react/radio-group");
|
|
58
56
|
let _ark_ui_react_segment_group = require("@ark-ui/react/segment-group");
|
|
59
57
|
let _zag_js_steps = require("@zag-js/steps");
|
|
@@ -7184,18 +7182,86 @@ var ds_tag_module_default = {
|
|
|
7184
7182
|
"exclude": "UdH7Tq_exclude",
|
|
7185
7183
|
"icon": "UdH7Tq_icon",
|
|
7186
7184
|
"include": "UdH7Tq_include",
|
|
7185
|
+
"key": "UdH7Tq_key",
|
|
7186
|
+
"keyValue": "UdH7Tq_keyValue",
|
|
7187
7187
|
"label": "UdH7Tq_label",
|
|
7188
7188
|
"selected": "UdH7Tq_selected",
|
|
7189
7189
|
"tag": "UdH7Tq_tag",
|
|
7190
|
+
"value": "UdH7Tq_value",
|
|
7190
7191
|
"variantIcon": "UdH7Tq_variantIcon"
|
|
7191
7192
|
};
|
|
7192
7193
|
//#endregion
|
|
7194
|
+
//#region src/components/ds-stack/ds-stack.module.scss
|
|
7195
|
+
var ds_stack_module_default = { "root": "efmmNG_root" };
|
|
7196
|
+
//#endregion
|
|
7197
|
+
//#region src/components/ds-stack/ds-stack.tsx
|
|
7198
|
+
const DsStack$1 = (t0) => {
|
|
7199
|
+
const $ = (0, react_compiler_runtime.c)(16);
|
|
7200
|
+
const { direction, gap, alignItems, justifyContent, flex, flexWrap, width, children, className, style, ref } = t0;
|
|
7201
|
+
let t1;
|
|
7202
|
+
if ($[0] !== alignItems || $[1] !== direction || $[2] !== flex || $[3] !== flexWrap || $[4] !== gap || $[5] !== justifyContent || $[6] !== style || $[7] !== width) {
|
|
7203
|
+
t1 = {
|
|
7204
|
+
flexDirection: direction,
|
|
7205
|
+
gap,
|
|
7206
|
+
alignItems,
|
|
7207
|
+
justifyContent,
|
|
7208
|
+
flex,
|
|
7209
|
+
flexWrap,
|
|
7210
|
+
width,
|
|
7211
|
+
...style
|
|
7212
|
+
};
|
|
7213
|
+
$[0] = alignItems;
|
|
7214
|
+
$[1] = direction;
|
|
7215
|
+
$[2] = flex;
|
|
7216
|
+
$[3] = flexWrap;
|
|
7217
|
+
$[4] = gap;
|
|
7218
|
+
$[5] = justifyContent;
|
|
7219
|
+
$[6] = style;
|
|
7220
|
+
$[7] = width;
|
|
7221
|
+
$[8] = t1;
|
|
7222
|
+
} else t1 = $[8];
|
|
7223
|
+
const layoutStyle = t1;
|
|
7224
|
+
let t2;
|
|
7225
|
+
if ($[9] !== className) {
|
|
7226
|
+
t2 = (0, classnames.default)(ds_stack_module_default.root, className);
|
|
7227
|
+
$[9] = className;
|
|
7228
|
+
$[10] = t2;
|
|
7229
|
+
} else t2 = $[10];
|
|
7230
|
+
let t3;
|
|
7231
|
+
if ($[11] !== children || $[12] !== layoutStyle || $[13] !== ref || $[14] !== t2) {
|
|
7232
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7233
|
+
ref,
|
|
7234
|
+
className: t2,
|
|
7235
|
+
style: layoutStyle,
|
|
7236
|
+
children
|
|
7237
|
+
});
|
|
7238
|
+
$[11] = children;
|
|
7239
|
+
$[12] = layoutStyle;
|
|
7240
|
+
$[13] = ref;
|
|
7241
|
+
$[14] = t2;
|
|
7242
|
+
$[15] = t3;
|
|
7243
|
+
} else t3 = $[15];
|
|
7244
|
+
return t3;
|
|
7245
|
+
};
|
|
7246
|
+
//#endregion
|
|
7247
|
+
//#region src/components/ds-stack/index.ts
|
|
7248
|
+
const DsStack = withResponsiveProps(DsStack$1, [
|
|
7249
|
+
"direction",
|
|
7250
|
+
"gap",
|
|
7251
|
+
"alignItems",
|
|
7252
|
+
"justifyContent",
|
|
7253
|
+
"flex",
|
|
7254
|
+
"flexWrap",
|
|
7255
|
+
"width"
|
|
7256
|
+
]);
|
|
7257
|
+
DsStack.displayName = "DsStack";
|
|
7258
|
+
//#endregion
|
|
7193
7259
|
//#region src/components/ds-tag/ds-tag.tsx
|
|
7194
7260
|
/**
|
|
7195
7261
|
* Design system Tag component
|
|
7196
7262
|
*/
|
|
7197
7263
|
const DsTag = (t0) => {
|
|
7198
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
7264
|
+
const $ = (0, react_compiler_runtime.c)(64);
|
|
7199
7265
|
let className;
|
|
7200
7266
|
let label;
|
|
7201
7267
|
let onClick;
|
|
@@ -7209,8 +7275,9 @@ const DsTag = (t0) => {
|
|
|
7209
7275
|
let t4;
|
|
7210
7276
|
let t5;
|
|
7211
7277
|
let t6;
|
|
7278
|
+
let value;
|
|
7212
7279
|
if ($[0] !== t0) {
|
|
7213
|
-
({ref, label, className, style: t1, size: t2, selected: t3, variant: t4, disabled: t5, locale: t6, onClick, onDelete, slots, ...rest} = t0);
|
|
7280
|
+
({ref, label, value, className, style: t1, size: t2, selected: t3, variant: t4, disabled: t5, locale: t6, onClick, onDelete, slots, ...rest} = t0);
|
|
7214
7281
|
$[0] = t0;
|
|
7215
7282
|
$[1] = className;
|
|
7216
7283
|
$[2] = label;
|
|
@@ -7225,6 +7292,7 @@ const DsTag = (t0) => {
|
|
|
7225
7292
|
$[11] = t4;
|
|
7226
7293
|
$[12] = t5;
|
|
7227
7294
|
$[13] = t6;
|
|
7295
|
+
$[14] = value;
|
|
7228
7296
|
} else {
|
|
7229
7297
|
className = $[1];
|
|
7230
7298
|
label = $[2];
|
|
@@ -7239,31 +7307,32 @@ const DsTag = (t0) => {
|
|
|
7239
7307
|
t4 = $[11];
|
|
7240
7308
|
t5 = $[12];
|
|
7241
7309
|
t6 = $[13];
|
|
7310
|
+
value = $[14];
|
|
7242
7311
|
}
|
|
7243
7312
|
let t7;
|
|
7244
|
-
if ($[
|
|
7313
|
+
if ($[15] !== t1) {
|
|
7245
7314
|
t7 = t1 === void 0 ? {} : t1;
|
|
7246
|
-
$[
|
|
7247
|
-
$[
|
|
7248
|
-
} else t7 = $[
|
|
7315
|
+
$[15] = t1;
|
|
7316
|
+
$[16] = t7;
|
|
7317
|
+
} else t7 = $[16];
|
|
7249
7318
|
const style = t7;
|
|
7250
7319
|
const size = t2 === void 0 ? "medium" : t2;
|
|
7251
7320
|
const selected = t3 === void 0 ? false : t3;
|
|
7252
7321
|
const variant = t4 === void 0 ? "default" : t4;
|
|
7253
7322
|
const disabled = t5 === void 0 ? false : t5;
|
|
7254
7323
|
let t8;
|
|
7255
|
-
if ($[
|
|
7324
|
+
if ($[17] !== t6) {
|
|
7256
7325
|
t8 = t6 === void 0 ? {} : t6;
|
|
7257
|
-
$[
|
|
7258
|
-
$[
|
|
7259
|
-
} else t8 = $[
|
|
7326
|
+
$[17] = t6;
|
|
7327
|
+
$[18] = t8;
|
|
7328
|
+
} else t8 = $[18];
|
|
7260
7329
|
const locale = t8;
|
|
7261
7330
|
const t9 = onClick !== void 0 && !disabled;
|
|
7262
7331
|
const t10 = selected && !disabled;
|
|
7263
7332
|
const t11 = variant === "include";
|
|
7264
7333
|
const t12 = variant === "exclude";
|
|
7265
7334
|
let t13;
|
|
7266
|
-
if ($[
|
|
7335
|
+
if ($[19] !== className || $[20] !== disabled || $[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t9) {
|
|
7267
7336
|
t13 = (0, classnames.default)(ds_tag_module_default.tag, {
|
|
7268
7337
|
[ds_tag_module_default.clickable]: t9,
|
|
7269
7338
|
[ds_tag_module_default.selected]: t10,
|
|
@@ -7271,27 +7340,27 @@ const DsTag = (t0) => {
|
|
|
7271
7340
|
[ds_tag_module_default.exclude]: t12,
|
|
7272
7341
|
[ds_tag_module_default.disabled]: disabled
|
|
7273
7342
|
}, className);
|
|
7274
|
-
$[
|
|
7275
|
-
$[
|
|
7276
|
-
$[
|
|
7277
|
-
$[
|
|
7278
|
-
$[
|
|
7279
|
-
$[
|
|
7280
|
-
$[
|
|
7281
|
-
} else t13 = $[
|
|
7343
|
+
$[19] = className;
|
|
7344
|
+
$[20] = disabled;
|
|
7345
|
+
$[21] = t10;
|
|
7346
|
+
$[22] = t11;
|
|
7347
|
+
$[23] = t12;
|
|
7348
|
+
$[24] = t9;
|
|
7349
|
+
$[25] = t13;
|
|
7350
|
+
} else t13 = $[25];
|
|
7282
7351
|
const tagClass = t13;
|
|
7283
7352
|
let t14;
|
|
7284
|
-
if ($[
|
|
7353
|
+
if ($[26] !== onDelete) {
|
|
7285
7354
|
t14 = (event) => {
|
|
7286
7355
|
event.stopPropagation();
|
|
7287
7356
|
onDelete?.(event);
|
|
7288
7357
|
};
|
|
7289
|
-
$[
|
|
7290
|
-
$[
|
|
7291
|
-
} else t14 = $[
|
|
7358
|
+
$[26] = onDelete;
|
|
7359
|
+
$[27] = t14;
|
|
7360
|
+
} else t14 = $[27];
|
|
7292
7361
|
const handleDeleteClick = t14;
|
|
7293
7362
|
let t15;
|
|
7294
|
-
if ($[
|
|
7363
|
+
if ($[28] !== onClick || $[29] !== onDelete) {
|
|
7295
7364
|
t15 = (event_0) => {
|
|
7296
7365
|
if (onClick && (event_0.key === "Enter" || event_0.key === " ")) {
|
|
7297
7366
|
event_0.preventDefault();
|
|
@@ -7303,13 +7372,13 @@ const DsTag = (t0) => {
|
|
|
7303
7372
|
onDelete(event_0);
|
|
7304
7373
|
}
|
|
7305
7374
|
};
|
|
7306
|
-
$[
|
|
7307
|
-
$[
|
|
7308
|
-
$[
|
|
7309
|
-
} else t15 = $[
|
|
7375
|
+
$[28] = onClick;
|
|
7376
|
+
$[29] = onDelete;
|
|
7377
|
+
$[30] = t15;
|
|
7378
|
+
} else t15 = $[30];
|
|
7310
7379
|
const handleKeyDownTag = t15;
|
|
7311
7380
|
let t16;
|
|
7312
|
-
if ($[
|
|
7381
|
+
if ($[31] !== onDelete) {
|
|
7313
7382
|
t16 = (event_1) => {
|
|
7314
7383
|
event_1.stopPropagation();
|
|
7315
7384
|
if (onDelete && (event_1.key === "Enter" || event_1.key === " ")) {
|
|
@@ -7317,21 +7386,21 @@ const DsTag = (t0) => {
|
|
|
7317
7386
|
onDelete(event_1);
|
|
7318
7387
|
}
|
|
7319
7388
|
};
|
|
7320
|
-
$[
|
|
7321
|
-
$[
|
|
7322
|
-
} else t16 = $[
|
|
7389
|
+
$[31] = onDelete;
|
|
7390
|
+
$[32] = t16;
|
|
7391
|
+
} else t16 = $[32];
|
|
7323
7392
|
const handleKeyDownDelete = t16;
|
|
7324
7393
|
let t17;
|
|
7325
|
-
if ($[
|
|
7394
|
+
if ($[33] !== onClick) {
|
|
7326
7395
|
t17 = (event_2) => {
|
|
7327
7396
|
if (onClick) {
|
|
7328
7397
|
event_2.preventDefault();
|
|
7329
7398
|
onClick(event_2);
|
|
7330
7399
|
}
|
|
7331
7400
|
};
|
|
7332
|
-
$[
|
|
7333
|
-
$[
|
|
7334
|
-
} else t17 = $[
|
|
7401
|
+
$[33] = onClick;
|
|
7402
|
+
$[34] = t17;
|
|
7403
|
+
} else t17 = $[34];
|
|
7335
7404
|
const handleClick = t17;
|
|
7336
7405
|
let iconVariant = null;
|
|
7337
7406
|
if (variant === "include") iconVariant = "check_circle";
|
|
@@ -7344,7 +7413,7 @@ const DsTag = (t0) => {
|
|
|
7344
7413
|
const t23 = typeof label === "string" ? label : void 0;
|
|
7345
7414
|
const t24 = onClick && selected && !disabled ? "true" : void 0;
|
|
7346
7415
|
let t25;
|
|
7347
|
-
if ($[
|
|
7416
|
+
if ($[35] !== iconVariant || $[36] !== slots?.icon) {
|
|
7348
7417
|
t25 = (slots?.icon || iconVariant) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7349
7418
|
className: (0, classnames.default)(ds_tag_module_default.icon),
|
|
7350
7419
|
children: slots?.icon ?? (iconVariant && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
|
|
@@ -7353,25 +7422,40 @@ const DsTag = (t0) => {
|
|
|
7353
7422
|
className: (0, classnames.default)(ds_tag_module_default.variantIcon)
|
|
7354
7423
|
}))
|
|
7355
7424
|
});
|
|
7356
|
-
$[
|
|
7357
|
-
$[
|
|
7358
|
-
$[
|
|
7359
|
-
} else t25 = $[
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7425
|
+
$[35] = iconVariant;
|
|
7426
|
+
$[36] = slots?.icon;
|
|
7427
|
+
$[37] = t25;
|
|
7428
|
+
} else t25 = $[37];
|
|
7429
|
+
let t26;
|
|
7430
|
+
if ($[38] !== label || $[39] !== size || $[40] !== value || $[41] !== variant) {
|
|
7431
|
+
t26 = variant === "key-value" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
|
|
7432
|
+
direction: "row",
|
|
7433
|
+
alignItems: "center",
|
|
7434
|
+
gap: "var(--3xs)",
|
|
7435
|
+
className: ds_tag_module_default.keyValue,
|
|
7436
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
7437
|
+
variant: size === "small" ? "body-xs-md" : "body-sm-md",
|
|
7438
|
+
className: ds_tag_module_default.key,
|
|
7439
|
+
children: label
|
|
7440
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
7441
|
+
variant: size === "small" ? "body-xs-reg" : "body-sm-reg",
|
|
7442
|
+
className: ds_tag_module_default.value,
|
|
7443
|
+
children: value
|
|
7444
|
+
})]
|
|
7445
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
7446
|
+
variant: size === "small" ? "body-xs-reg" : "body-sm-reg",
|
|
7365
7447
|
className: ds_tag_module_default.label,
|
|
7366
7448
|
children: label
|
|
7367
7449
|
});
|
|
7368
|
-
$[
|
|
7369
|
-
$[
|
|
7370
|
-
$[
|
|
7371
|
-
|
|
7372
|
-
|
|
7373
|
-
|
|
7374
|
-
|
|
7450
|
+
$[38] = label;
|
|
7451
|
+
$[39] = size;
|
|
7452
|
+
$[40] = value;
|
|
7453
|
+
$[41] = variant;
|
|
7454
|
+
$[42] = t26;
|
|
7455
|
+
} else t26 = $[42];
|
|
7456
|
+
let t27;
|
|
7457
|
+
if ($[43] !== disabled || $[44] !== handleDeleteClick || $[45] !== handleKeyDownDelete || $[46] !== locale || $[47] !== onDelete) {
|
|
7458
|
+
t27 = onDelete && !disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
7375
7459
|
type: "button",
|
|
7376
7460
|
className: ds_tag_module_default.deleteButton,
|
|
7377
7461
|
onClick: handleDeleteClick,
|
|
@@ -7383,16 +7467,16 @@ const DsTag = (t0) => {
|
|
|
7383
7467
|
size: "tiny"
|
|
7384
7468
|
})
|
|
7385
7469
|
});
|
|
7386
|
-
$[
|
|
7387
|
-
$[
|
|
7388
|
-
$[
|
|
7389
|
-
$[
|
|
7390
|
-
$[
|
|
7391
|
-
$[
|
|
7392
|
-
} else
|
|
7393
|
-
let
|
|
7394
|
-
if ($[
|
|
7395
|
-
|
|
7470
|
+
$[43] = disabled;
|
|
7471
|
+
$[44] = handleDeleteClick;
|
|
7472
|
+
$[45] = handleKeyDownDelete;
|
|
7473
|
+
$[46] = locale;
|
|
7474
|
+
$[47] = onDelete;
|
|
7475
|
+
$[48] = t27;
|
|
7476
|
+
} else t27 = $[48];
|
|
7477
|
+
let t28;
|
|
7478
|
+
if ($[49] !== disabled || $[50] !== rest || $[51] !== style || $[52] !== t18 || $[53] !== t19 || $[54] !== t20 || $[55] !== t21 || $[56] !== t22 || $[57] !== t23 || $[58] !== t24 || $[59] !== t25 || $[60] !== t26 || $[61] !== t27 || $[62] !== tagClass) {
|
|
7479
|
+
t28 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7396
7480
|
ref: t18,
|
|
7397
7481
|
className: tagClass,
|
|
7398
7482
|
style,
|
|
@@ -7406,27 +7490,27 @@ const DsTag = (t0) => {
|
|
|
7406
7490
|
...rest,
|
|
7407
7491
|
children: [
|
|
7408
7492
|
t25,
|
|
7409
|
-
|
|
7410
|
-
|
|
7493
|
+
t26,
|
|
7494
|
+
t27
|
|
7411
7495
|
]
|
|
7412
7496
|
});
|
|
7413
|
-
$[
|
|
7414
|
-
$[
|
|
7415
|
-
$[
|
|
7416
|
-
$[
|
|
7417
|
-
$[
|
|
7418
|
-
$[
|
|
7419
|
-
$[
|
|
7420
|
-
$[
|
|
7421
|
-
$[
|
|
7422
|
-
$[
|
|
7423
|
-
$[
|
|
7424
|
-
$[
|
|
7425
|
-
$[
|
|
7426
|
-
$[
|
|
7427
|
-
$[
|
|
7428
|
-
} else
|
|
7429
|
-
return
|
|
7497
|
+
$[49] = disabled;
|
|
7498
|
+
$[50] = rest;
|
|
7499
|
+
$[51] = style;
|
|
7500
|
+
$[52] = t18;
|
|
7501
|
+
$[53] = t19;
|
|
7502
|
+
$[54] = t20;
|
|
7503
|
+
$[55] = t21;
|
|
7504
|
+
$[56] = t22;
|
|
7505
|
+
$[57] = t23;
|
|
7506
|
+
$[58] = t24;
|
|
7507
|
+
$[59] = t25;
|
|
7508
|
+
$[60] = t26;
|
|
7509
|
+
$[61] = t27;
|
|
7510
|
+
$[62] = tagClass;
|
|
7511
|
+
$[63] = t28;
|
|
7512
|
+
} else t28 = $[63];
|
|
7513
|
+
return t28;
|
|
7430
7514
|
};
|
|
7431
7515
|
//#endregion
|
|
7432
7516
|
//#region src/components/ds-tag/ds-tag.types.ts
|
|
@@ -7434,7 +7518,8 @@ const tagSizes = ["medium", "small"];
|
|
|
7434
7518
|
const tagVariants = [
|
|
7435
7519
|
"default",
|
|
7436
7520
|
"include",
|
|
7437
|
-
"exclude"
|
|
7521
|
+
"exclude",
|
|
7522
|
+
"key-value"
|
|
7438
7523
|
];
|
|
7439
7524
|
//#endregion
|
|
7440
7525
|
//#region src/utils/merge-refs.ts
|
|
@@ -8352,8 +8437,8 @@ const useArkDialogBodyLockCleanup = (open, enabled) => {
|
|
|
8352
8437
|
//#endregion
|
|
8353
8438
|
//#region src/components/ds-drawer/ds-drawer.tsx
|
|
8354
8439
|
const DsDrawer = (t0) => {
|
|
8355
|
-
const $ = (0, react_compiler_runtime.c)(
|
|
8356
|
-
const { open, onOpenChange, columns: t1, position: t2, backdrop: t3, closeOnEscape: t4, closeOnInteractOutside: t5, portal: t6, style, className, children } = t0;
|
|
8440
|
+
const $ = (0, react_compiler_runtime.c)(28);
|
|
8441
|
+
const { open, onOpenChange, onOpenAutoFocus, columns: t1, position: t2, backdrop: t3, closeOnEscape: t4, closeOnInteractOutside: t5, portal: t6, style, className, children } = t0;
|
|
8357
8442
|
const columns = t1 === void 0 ? 4 : t1;
|
|
8358
8443
|
const position = t2 === void 0 ? "end" : t2;
|
|
8359
8444
|
const backdrop = t3 === void 0 ? false : t3;
|
|
@@ -8371,75 +8456,88 @@ const DsDrawer = (t0) => {
|
|
|
8371
8456
|
$[1] = t7;
|
|
8372
8457
|
} else t7 = $[1];
|
|
8373
8458
|
const handleOpenChange = t7;
|
|
8374
|
-
const Wrapper = portal ? _ark_ui_react_portal.Portal : react.Fragment;
|
|
8375
8459
|
let t8;
|
|
8376
|
-
if ($[2] !==
|
|
8377
|
-
t8 =
|
|
8378
|
-
|
|
8460
|
+
if ($[2] !== onOpenAutoFocus) {
|
|
8461
|
+
t8 = onOpenAutoFocus ? () => {
|
|
8462
|
+
const event = new Event("openAutoFocus", { cancelable: true });
|
|
8463
|
+
onOpenAutoFocus(event);
|
|
8464
|
+
return event.defaultPrevented ? document.activeElement : void 0;
|
|
8465
|
+
} : void 0;
|
|
8466
|
+
$[2] = onOpenAutoFocus;
|
|
8379
8467
|
$[3] = t8;
|
|
8380
8468
|
} else t8 = $[3];
|
|
8381
|
-
const
|
|
8382
|
-
const
|
|
8383
|
-
let
|
|
8384
|
-
if ($[4] !==
|
|
8385
|
-
|
|
8386
|
-
$[4] =
|
|
8387
|
-
$[5] =
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8469
|
+
const initialFocusEl = t8;
|
|
8470
|
+
const Wrapper = portal ? _ark_ui_react_portal.Portal : react.Fragment;
|
|
8471
|
+
let t9;
|
|
8472
|
+
if ($[4] !== backdrop) {
|
|
8473
|
+
t9 = backdrop && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_dialog.Dialog.Backdrop, { className: ds_drawer_module_default.backdrop });
|
|
8474
|
+
$[4] = backdrop;
|
|
8475
|
+
$[5] = t9;
|
|
8476
|
+
} else t9 = $[5];
|
|
8477
|
+
const t10 = ds_drawer_module_default[`position-${position}`];
|
|
8478
|
+
const t11 = ds_drawer_module_default[`cols-${resolvedColumns}`];
|
|
8391
8479
|
let t12;
|
|
8392
|
-
if ($[8] !==
|
|
8393
|
-
t12 =
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
$[8] = children;
|
|
8480
|
+
if ($[6] !== className || $[7] !== t10 || $[8] !== t11) {
|
|
8481
|
+
t12 = (0, classnames.default)(ds_drawer_module_default.drawer, t10, className, t11);
|
|
8482
|
+
$[6] = className;
|
|
8483
|
+
$[7] = t10;
|
|
8484
|
+
$[8] = t11;
|
|
8398
8485
|
$[9] = t12;
|
|
8399
8486
|
} else t12 = $[9];
|
|
8400
8487
|
let t13;
|
|
8401
|
-
if ($[10] !==
|
|
8402
|
-
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
8488
|
+
if ($[10] !== children) {
|
|
8489
|
+
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8490
|
+
className: ds_drawer_module_default.content,
|
|
8491
|
+
children
|
|
8492
|
+
});
|
|
8493
|
+
$[10] = children;
|
|
8494
|
+
$[11] = t13;
|
|
8495
|
+
} else t13 = $[11];
|
|
8496
|
+
let t14;
|
|
8497
|
+
if ($[12] !== style || $[13] !== t12 || $[14] !== t13) {
|
|
8498
|
+
t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_dialog.Dialog.Positioner, {
|
|
8403
8499
|
className: ds_drawer_module_default.positioner,
|
|
8404
8500
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_dialog.Dialog.Content, {
|
|
8405
8501
|
style,
|
|
8406
|
-
className:
|
|
8407
|
-
children:
|
|
8502
|
+
className: t12,
|
|
8503
|
+
children: t13
|
|
8408
8504
|
})
|
|
8409
8505
|
});
|
|
8410
|
-
$[
|
|
8411
|
-
$[
|
|
8412
|
-
$[
|
|
8413
|
-
$[
|
|
8414
|
-
} else
|
|
8415
|
-
let t14;
|
|
8416
|
-
if ($[14] !== Wrapper || $[15] !== t13 || $[16] !== t8) {
|
|
8417
|
-
t14 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Wrapper, { children: [t8, t13] });
|
|
8418
|
-
$[14] = Wrapper;
|
|
8419
|
-
$[15] = t13;
|
|
8420
|
-
$[16] = t8;
|
|
8421
|
-
$[17] = t14;
|
|
8422
|
-
} else t14 = $[17];
|
|
8506
|
+
$[12] = style;
|
|
8507
|
+
$[13] = t12;
|
|
8508
|
+
$[14] = t13;
|
|
8509
|
+
$[15] = t14;
|
|
8510
|
+
} else t14 = $[15];
|
|
8423
8511
|
let t15;
|
|
8424
|
-
if ($[
|
|
8425
|
-
t15 = /* @__PURE__ */ (0, react_jsx_runtime.
|
|
8512
|
+
if ($[16] !== Wrapper || $[17] !== t14 || $[18] !== t9) {
|
|
8513
|
+
t15 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Wrapper, { children: [t9, t14] });
|
|
8514
|
+
$[16] = Wrapper;
|
|
8515
|
+
$[17] = t14;
|
|
8516
|
+
$[18] = t9;
|
|
8517
|
+
$[19] = t15;
|
|
8518
|
+
} else t15 = $[19];
|
|
8519
|
+
let t16;
|
|
8520
|
+
if ($[20] !== backdrop || $[21] !== closeOnEscape || $[22] !== closeOnInteractOutside || $[23] !== handleOpenChange || $[24] !== initialFocusEl || $[25] !== open || $[26] !== t15) {
|
|
8521
|
+
t16 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_dialog.Dialog.Root, {
|
|
8426
8522
|
open,
|
|
8427
8523
|
onOpenChange: handleOpenChange,
|
|
8428
8524
|
modal: backdrop,
|
|
8429
8525
|
closeOnEscape,
|
|
8430
8526
|
closeOnInteractOutside,
|
|
8431
8527
|
preventScroll: backdrop,
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
$[
|
|
8436
|
-
$[
|
|
8437
|
-
$[
|
|
8438
|
-
$[
|
|
8439
|
-
$[
|
|
8440
|
-
$[
|
|
8441
|
-
|
|
8442
|
-
|
|
8528
|
+
initialFocusEl,
|
|
8529
|
+
children: t15
|
|
8530
|
+
});
|
|
8531
|
+
$[20] = backdrop;
|
|
8532
|
+
$[21] = closeOnEscape;
|
|
8533
|
+
$[22] = closeOnInteractOutside;
|
|
8534
|
+
$[23] = handleOpenChange;
|
|
8535
|
+
$[24] = initialFocusEl;
|
|
8536
|
+
$[25] = open;
|
|
8537
|
+
$[26] = t15;
|
|
8538
|
+
$[27] = t16;
|
|
8539
|
+
} else t16 = $[27];
|
|
8540
|
+
return t16;
|
|
8443
8541
|
};
|
|
8444
8542
|
const Header$2 = (t0) => {
|
|
8445
8543
|
const $ = (0, react_compiler_runtime.c)(6);
|
|
@@ -8833,87 +8931,86 @@ const DsTagFilter = (t0) => {
|
|
|
8833
8931
|
if (items.length === 0) return null;
|
|
8834
8932
|
let t9;
|
|
8835
8933
|
if ($[9] !== onItemDelete || $[10] !== onItemSelect) {
|
|
8836
|
-
t9 = (item) => {
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
onDelete: onItemDelete ? () => onItemDelete(item) : void 0
|
|
8844
|
-
});
|
|
8845
|
-
};
|
|
8934
|
+
t9 = (item) => ({
|
|
8935
|
+
...item.slotProps?.tag,
|
|
8936
|
+
label: item.label,
|
|
8937
|
+
selected: item.selected,
|
|
8938
|
+
onClick: onItemSelect ? () => onItemSelect(item) : void 0,
|
|
8939
|
+
onDelete: onItemDelete ? () => onItemDelete(item) : void 0
|
|
8940
|
+
});
|
|
8846
8941
|
$[9] = onItemDelete;
|
|
8847
8942
|
$[10] = onItemSelect;
|
|
8848
8943
|
$[11] = t9;
|
|
8849
8944
|
} else t9 = $[11];
|
|
8850
|
-
const
|
|
8945
|
+
const buildTagProps = t9;
|
|
8851
8946
|
let t10;
|
|
8852
|
-
if ($[12] !==
|
|
8853
|
-
t10 = () => {
|
|
8947
|
+
if ($[12] !== buildTagProps) {
|
|
8948
|
+
t10 = (item_0) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTag, { ...buildTagProps(item_0) }, item_0.id);
|
|
8949
|
+
$[12] = buildTagProps;
|
|
8950
|
+
$[13] = t10;
|
|
8951
|
+
} else t10 = $[13];
|
|
8952
|
+
const renderTag = t10;
|
|
8953
|
+
let t11;
|
|
8954
|
+
if ($[14] !== expanded || $[15] !== onExpand) {
|
|
8955
|
+
t11 = () => {
|
|
8854
8956
|
const newExpanded = !expanded;
|
|
8855
8957
|
setExpanded(newExpanded);
|
|
8856
8958
|
onExpand?.(newExpanded);
|
|
8857
8959
|
};
|
|
8858
|
-
$[
|
|
8859
|
-
$[
|
|
8860
|
-
$[
|
|
8861
|
-
} else
|
|
8862
|
-
const handleExpandToggle =
|
|
8863
|
-
let t11;
|
|
8864
|
-
if ($[15] !== items || $[16] !== onItemDelete || $[17] !== onItemSelect) {
|
|
8865
|
-
let t12;
|
|
8866
|
-
if ($[19] !== onItemDelete || $[20] !== onItemSelect) {
|
|
8867
|
-
t12 = (item_0) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTag, {
|
|
8868
|
-
"data-measure-tag": "",
|
|
8869
|
-
label: item_0.label,
|
|
8870
|
-
selected: item_0.selected,
|
|
8871
|
-
onClick: onItemSelect ? () => onItemSelect(item_0) : void 0,
|
|
8872
|
-
onDelete: onItemDelete ? () => onItemDelete(item_0) : void 0
|
|
8873
|
-
}, item_0.id);
|
|
8874
|
-
$[19] = onItemDelete;
|
|
8875
|
-
$[20] = onItemSelect;
|
|
8876
|
-
$[21] = t12;
|
|
8877
|
-
} else t12 = $[21];
|
|
8878
|
-
t11 = items.map(t12);
|
|
8879
|
-
$[15] = items;
|
|
8880
|
-
$[16] = onItemDelete;
|
|
8881
|
-
$[17] = onItemSelect;
|
|
8882
|
-
$[18] = t11;
|
|
8883
|
-
} else t11 = $[18];
|
|
8960
|
+
$[14] = expanded;
|
|
8961
|
+
$[15] = onExpand;
|
|
8962
|
+
$[16] = t11;
|
|
8963
|
+
} else t11 = $[16];
|
|
8964
|
+
const handleExpandToggle = t11;
|
|
8884
8965
|
let t12;
|
|
8885
|
-
if ($[
|
|
8886
|
-
|
|
8966
|
+
if ($[17] !== buildTagProps || $[18] !== items) {
|
|
8967
|
+
let t13;
|
|
8968
|
+
if ($[20] !== buildTagProps) {
|
|
8969
|
+
t13 = (item_1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTag, {
|
|
8970
|
+
"data-measure-tag": "",
|
|
8971
|
+
...buildTagProps(item_1)
|
|
8972
|
+
}, item_1.id);
|
|
8973
|
+
$[20] = buildTagProps;
|
|
8974
|
+
$[21] = t13;
|
|
8975
|
+
} else t13 = $[21];
|
|
8976
|
+
t12 = items.map(t13);
|
|
8977
|
+
$[17] = buildTagProps;
|
|
8978
|
+
$[18] = items;
|
|
8979
|
+
$[19] = t12;
|
|
8980
|
+
} else t12 = $[19];
|
|
8981
|
+
let t13;
|
|
8982
|
+
if ($[22] !== t12) {
|
|
8983
|
+
t13 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8887
8984
|
ref: measurementRef,
|
|
8888
8985
|
className: ds_tag_filter_module_default.measurementContainer,
|
|
8889
8986
|
"aria-hidden": "true",
|
|
8890
|
-
children:
|
|
8987
|
+
children: t12
|
|
8891
8988
|
});
|
|
8892
|
-
$[22] =
|
|
8893
|
-
$[23] =
|
|
8894
|
-
} else
|
|
8895
|
-
const measurementContainer =
|
|
8896
|
-
const
|
|
8897
|
-
let t14;
|
|
8898
|
-
if ($[24] !== className || $[25] !== t13) {
|
|
8899
|
-
t14 = (0, classnames.default)(ds_tag_filter_module_default.container, t13, className);
|
|
8900
|
-
$[24] = className;
|
|
8901
|
-
$[25] = t13;
|
|
8902
|
-
$[26] = t14;
|
|
8903
|
-
} else t14 = $[26];
|
|
8989
|
+
$[22] = t12;
|
|
8990
|
+
$[23] = t13;
|
|
8991
|
+
} else t13 = $[23];
|
|
8992
|
+
const measurementContainer = t13;
|
|
8993
|
+
const t14 = expanded && ds_tag_filter_module_default.expanded;
|
|
8904
8994
|
let t15;
|
|
8995
|
+
if ($[24] !== className || $[25] !== t14) {
|
|
8996
|
+
t15 = (0, classnames.default)(ds_tag_filter_module_default.container, t14, className);
|
|
8997
|
+
$[24] = className;
|
|
8998
|
+
$[25] = t14;
|
|
8999
|
+
$[26] = t15;
|
|
9000
|
+
} else t15 = $[26];
|
|
9001
|
+
let t16;
|
|
8905
9002
|
if ($[27] !== label) {
|
|
8906
|
-
|
|
9003
|
+
t16 = label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
8907
9004
|
variant: "body-sm-reg",
|
|
8908
9005
|
className: ds_tag_filter_module_default.label,
|
|
8909
9006
|
children: label
|
|
8910
9007
|
});
|
|
8911
9008
|
$[27] = label;
|
|
8912
|
-
$[28] =
|
|
8913
|
-
} else
|
|
8914
|
-
let
|
|
9009
|
+
$[28] = t16;
|
|
9010
|
+
} else t16 = $[28];
|
|
9011
|
+
let t17;
|
|
8915
9012
|
if ($[29] !== expanded || $[30] !== handleExpandToggle || $[31] !== hasOverflow || $[32] !== hiddenCount || $[33] !== showLess || $[34] !== showMore) {
|
|
8916
|
-
|
|
9013
|
+
t17 = hasOverflow && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsButton, {
|
|
8917
9014
|
design: "v1.2",
|
|
8918
9015
|
buttonType: "tertiary",
|
|
8919
9016
|
variant: "ghost",
|
|
@@ -8929,11 +9026,11 @@ const DsTagFilter = (t0) => {
|
|
|
8929
9026
|
$[32] = hiddenCount;
|
|
8930
9027
|
$[33] = showLess;
|
|
8931
9028
|
$[34] = showMore;
|
|
8932
|
-
$[35] =
|
|
8933
|
-
} else
|
|
8934
|
-
let
|
|
9029
|
+
$[35] = t17;
|
|
9030
|
+
} else t17 = $[35];
|
|
9031
|
+
let t18;
|
|
8935
9032
|
if ($[36] !== clearButton || $[37] !== onClearAll) {
|
|
8936
|
-
|
|
9033
|
+
t18 = onClearAll && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsButton, {
|
|
8937
9034
|
design: "v1.2",
|
|
8938
9035
|
buttonType: "tertiary",
|
|
8939
9036
|
variant: "ghost",
|
|
@@ -8945,78 +9042,78 @@ const DsTagFilter = (t0) => {
|
|
|
8945
9042
|
});
|
|
8946
9043
|
$[36] = clearButton;
|
|
8947
9044
|
$[37] = onClearAll;
|
|
8948
|
-
$[38] =
|
|
8949
|
-
} else
|
|
8950
|
-
let t18;
|
|
8951
|
-
if ($[39] !== t16 || $[40] !== t17) {
|
|
8952
|
-
t18 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8953
|
-
className: ds_tag_filter_module_default.headerActions,
|
|
8954
|
-
children: [t16, t17]
|
|
8955
|
-
});
|
|
8956
|
-
$[39] = t16;
|
|
8957
|
-
$[40] = t17;
|
|
8958
|
-
$[41] = t18;
|
|
8959
|
-
} else t18 = $[41];
|
|
9045
|
+
$[38] = t18;
|
|
9046
|
+
} else t18 = $[38];
|
|
8960
9047
|
let t19;
|
|
8961
|
-
if ($[
|
|
9048
|
+
if ($[39] !== t17 || $[40] !== t18) {
|
|
8962
9049
|
t19 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8963
|
-
className: ds_tag_filter_module_default.
|
|
8964
|
-
children: [
|
|
9050
|
+
className: ds_tag_filter_module_default.headerActions,
|
|
9051
|
+
children: [t17, t18]
|
|
8965
9052
|
});
|
|
8966
|
-
$[
|
|
8967
|
-
$[
|
|
8968
|
-
$[
|
|
8969
|
-
} else t19 = $[
|
|
9053
|
+
$[39] = t17;
|
|
9054
|
+
$[40] = t18;
|
|
9055
|
+
$[41] = t19;
|
|
9056
|
+
} else t19 = $[41];
|
|
8970
9057
|
let t20;
|
|
9058
|
+
if ($[42] !== t16 || $[43] !== t19) {
|
|
9059
|
+
t20 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9060
|
+
className: ds_tag_filter_module_default.header,
|
|
9061
|
+
children: [t16, t19]
|
|
9062
|
+
});
|
|
9063
|
+
$[42] = t16;
|
|
9064
|
+
$[43] = t19;
|
|
9065
|
+
$[44] = t20;
|
|
9066
|
+
} else t20 = $[44];
|
|
9067
|
+
let t21;
|
|
8971
9068
|
if ($[45] !== renderTag || $[46] !== visibleTags) {
|
|
8972
|
-
let
|
|
9069
|
+
let t22;
|
|
8973
9070
|
if ($[48] !== renderTag) {
|
|
8974
|
-
|
|
9071
|
+
t22 = (item_2) => renderTag(item_2);
|
|
8975
9072
|
$[48] = renderTag;
|
|
8976
|
-
$[49] =
|
|
8977
|
-
} else
|
|
8978
|
-
|
|
9073
|
+
$[49] = t22;
|
|
9074
|
+
} else t22 = $[49];
|
|
9075
|
+
t21 = visibleTags.map(t22);
|
|
8979
9076
|
$[45] = renderTag;
|
|
8980
9077
|
$[46] = visibleTags;
|
|
8981
|
-
$[47] =
|
|
8982
|
-
} else
|
|
8983
|
-
let
|
|
8984
|
-
if ($[50] !==
|
|
8985
|
-
|
|
9078
|
+
$[47] = t21;
|
|
9079
|
+
} else t21 = $[47];
|
|
9080
|
+
let t22;
|
|
9081
|
+
if ($[50] !== t21) {
|
|
9082
|
+
t22 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8986
9083
|
className: ds_tag_filter_module_default.tagsArea,
|
|
8987
|
-
children:
|
|
9084
|
+
children: t21
|
|
8988
9085
|
});
|
|
8989
|
-
$[50] =
|
|
8990
|
-
$[51] =
|
|
8991
|
-
} else
|
|
8992
|
-
let
|
|
8993
|
-
if ($[52] !== style || $[53] !==
|
|
8994
|
-
|
|
9086
|
+
$[50] = t21;
|
|
9087
|
+
$[51] = t22;
|
|
9088
|
+
} else t22 = $[51];
|
|
9089
|
+
let t23;
|
|
9090
|
+
if ($[52] !== style || $[53] !== t15 || $[54] !== t20 || $[55] !== t22) {
|
|
9091
|
+
t23 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8995
9092
|
ref: containerRef,
|
|
8996
|
-
className:
|
|
9093
|
+
className: t15,
|
|
8997
9094
|
style,
|
|
8998
|
-
children: [
|
|
9095
|
+
children: [t20, t22]
|
|
8999
9096
|
});
|
|
9000
9097
|
$[52] = style;
|
|
9001
|
-
$[53] =
|
|
9002
|
-
$[54] =
|
|
9003
|
-
$[55] =
|
|
9004
|
-
$[56] =
|
|
9005
|
-
} else
|
|
9006
|
-
let
|
|
9098
|
+
$[53] = t15;
|
|
9099
|
+
$[54] = t20;
|
|
9100
|
+
$[55] = t22;
|
|
9101
|
+
$[56] = t23;
|
|
9102
|
+
} else t23 = $[56];
|
|
9103
|
+
let t24;
|
|
9007
9104
|
if ($[57] !== measurementContainer) {
|
|
9008
|
-
|
|
9105
|
+
t24 = (0, react_dom.createPortal)(measurementContainer, document.body);
|
|
9009
9106
|
$[57] = measurementContainer;
|
|
9010
|
-
$[58] =
|
|
9011
|
-
} else
|
|
9012
|
-
let
|
|
9013
|
-
if ($[59] !==
|
|
9014
|
-
|
|
9015
|
-
$[59] =
|
|
9016
|
-
$[60] =
|
|
9017
|
-
$[61] =
|
|
9018
|
-
} else
|
|
9019
|
-
return
|
|
9107
|
+
$[58] = t24;
|
|
9108
|
+
} else t24 = $[58];
|
|
9109
|
+
let t25;
|
|
9110
|
+
if ($[59] !== t23 || $[60] !== t24) {
|
|
9111
|
+
t25 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t23, t24] });
|
|
9112
|
+
$[59] = t23;
|
|
9113
|
+
$[60] = t24;
|
|
9114
|
+
$[61] = t25;
|
|
9115
|
+
} else t25 = $[61];
|
|
9116
|
+
return t25;
|
|
9020
9117
|
};
|
|
9021
9118
|
//#endregion
|
|
9022
9119
|
//#region src/components/ds-comments-drawer/comments-filters.ts
|
|
@@ -14704,6 +14801,7 @@ function useFileUpload({ adapter, autoUpload = true, maxConcurrent = 3, maxFiles
|
|
|
14704
14801
|
updateFileProgress(fileId_2, 100);
|
|
14705
14802
|
onFileUploadComplete?.(fileId_2, result);
|
|
14706
14803
|
} catch (error_0) {
|
|
14804
|
+
if (abortController.signal.aborted) return;
|
|
14707
14805
|
const errorMessage = error_0 instanceof Error ? error_0.message : "Upload failed";
|
|
14708
14806
|
let status_0 = "interrupted";
|
|
14709
14807
|
if (error_0 instanceof FileUploadError) status_0 = error_0.isRetryable ? "interrupted" : "error";
|
|
@@ -15487,61 +15585,334 @@ const DsPanel = withResponsiveProps(DsPanelBase, ["width"]);
|
|
|
15487
15585
|
//#endregion
|
|
15488
15586
|
//#region src/components/ds-popover/ds-popover.module.scss
|
|
15489
15587
|
var ds_popover_module_default = {
|
|
15490
|
-
"
|
|
15491
|
-
"
|
|
15588
|
+
"content": "Xt6oSq_content",
|
|
15589
|
+
"ds-popover-in": "Xt6oSq_ds-popover-in",
|
|
15590
|
+
"footer": "Xt6oSq_footer",
|
|
15591
|
+
"header": "Xt6oSq_header",
|
|
15592
|
+
"headerIcon": "Xt6oSq_headerIcon",
|
|
15593
|
+
"panel": "Xt6oSq_panel",
|
|
15594
|
+
"title": "Xt6oSq_title"
|
|
15492
15595
|
};
|
|
15493
15596
|
//#endregion
|
|
15494
15597
|
//#region src/components/ds-popover/ds-popover.tsx
|
|
15495
|
-
const
|
|
15496
|
-
|
|
15497
|
-
|
|
15498
|
-
const
|
|
15499
|
-
const side
|
|
15500
|
-
|
|
15501
|
-
|
|
15502
|
-
|
|
15503
|
-
|
|
15504
|
-
|
|
15505
|
-
|
|
15506
|
-
|
|
15598
|
+
const DEFAULT_PANEL_WIDTH = 400;
|
|
15599
|
+
const toPlacement = (side, align) => align === "center" ? side : `${side}-${align}`;
|
|
15600
|
+
const DsPopoverRoot = (t0) => {
|
|
15601
|
+
const $ = (0, react_compiler_runtime.c)(15);
|
|
15602
|
+
const { open, defaultOpen, side: t1, align: t2, gutter: t3, modal: t4, children, onOpenChange } = t0;
|
|
15603
|
+
const side = t1 === void 0 ? "bottom" : t1;
|
|
15604
|
+
const align = t2 === void 0 ? "center" : t2;
|
|
15605
|
+
const gutter = t3 === void 0 ? 8 : t3;
|
|
15606
|
+
const modal = t4 === void 0 ? false : t4;
|
|
15607
|
+
let t5;
|
|
15608
|
+
if ($[0] !== align || $[1] !== side) {
|
|
15609
|
+
t5 = toPlacement(side, align);
|
|
15610
|
+
$[0] = align;
|
|
15611
|
+
$[1] = side;
|
|
15612
|
+
$[2] = t5;
|
|
15613
|
+
} else t5 = $[2];
|
|
15614
|
+
let t6;
|
|
15615
|
+
if ($[3] !== gutter || $[4] !== t5) {
|
|
15616
|
+
t6 = {
|
|
15617
|
+
placement: t5,
|
|
15618
|
+
gutter
|
|
15619
|
+
};
|
|
15620
|
+
$[3] = gutter;
|
|
15621
|
+
$[4] = t5;
|
|
15622
|
+
$[5] = t6;
|
|
15623
|
+
} else t6 = $[5];
|
|
15624
|
+
let t7;
|
|
15625
|
+
if ($[6] !== onOpenChange) {
|
|
15626
|
+
t7 = (details) => onOpenChange?.(details.open);
|
|
15627
|
+
$[6] = onOpenChange;
|
|
15628
|
+
$[7] = t7;
|
|
15629
|
+
} else t7 = $[7];
|
|
15630
|
+
let t8;
|
|
15631
|
+
if ($[8] !== children || $[9] !== defaultOpen || $[10] !== modal || $[11] !== open || $[12] !== t6 || $[13] !== t7) {
|
|
15632
|
+
t8 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Root, {
|
|
15633
|
+
open,
|
|
15634
|
+
defaultOpen,
|
|
15635
|
+
modal,
|
|
15636
|
+
positioning: t6,
|
|
15637
|
+
onOpenChange: t7,
|
|
15638
|
+
children
|
|
15639
|
+
});
|
|
15640
|
+
$[8] = children;
|
|
15641
|
+
$[9] = defaultOpen;
|
|
15642
|
+
$[10] = modal;
|
|
15643
|
+
$[11] = open;
|
|
15644
|
+
$[12] = t6;
|
|
15645
|
+
$[13] = t7;
|
|
15646
|
+
$[14] = t8;
|
|
15647
|
+
} else t8 = $[14];
|
|
15648
|
+
return t8;
|
|
15649
|
+
};
|
|
15650
|
+
const DsPopoverTrigger = (t0) => {
|
|
15651
|
+
const $ = (0, react_compiler_runtime.c)(3);
|
|
15652
|
+
const { children, className } = t0;
|
|
15653
|
+
let t1;
|
|
15654
|
+
if ($[0] !== children || $[1] !== className) {
|
|
15655
|
+
t1 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Trigger, {
|
|
15656
|
+
asChild: true,
|
|
15657
|
+
className,
|
|
15658
|
+
children
|
|
15659
|
+
});
|
|
15660
|
+
$[0] = children;
|
|
15661
|
+
$[1] = className;
|
|
15662
|
+
$[2] = t1;
|
|
15663
|
+
} else t1 = $[2];
|
|
15664
|
+
return t1;
|
|
15665
|
+
};
|
|
15666
|
+
const DsPopoverPanel = (t0) => {
|
|
15667
|
+
const $ = (0, react_compiler_runtime.c)(11);
|
|
15668
|
+
const { width: t1, className, style, children, ref, "aria-label": ariaLabel } = t0;
|
|
15669
|
+
const width = t1 === void 0 ? DEFAULT_PANEL_WIDTH : t1;
|
|
15670
|
+
let t2;
|
|
15671
|
+
if ($[0] !== className) {
|
|
15672
|
+
t2 = (0, classnames.default)(ds_popover_module_default.panel, className);
|
|
15673
|
+
$[0] = className;
|
|
15674
|
+
$[1] = t2;
|
|
15675
|
+
} else t2 = $[1];
|
|
15676
|
+
let t3;
|
|
15677
|
+
if ($[2] !== style || $[3] !== width) {
|
|
15678
|
+
t3 = {
|
|
15679
|
+
...style,
|
|
15680
|
+
width
|
|
15681
|
+
};
|
|
15682
|
+
$[2] = style;
|
|
15683
|
+
$[3] = width;
|
|
15684
|
+
$[4] = t3;
|
|
15685
|
+
} else t3 = $[4];
|
|
15686
|
+
let t4;
|
|
15687
|
+
if ($[5] !== ariaLabel || $[6] !== children || $[7] !== ref || $[8] !== t2 || $[9] !== t3) {
|
|
15688
|
+
t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_portal.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Positioner, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Content, {
|
|
15689
|
+
ref,
|
|
15690
|
+
"aria-label": ariaLabel,
|
|
15691
|
+
className: t2,
|
|
15692
|
+
style: t3,
|
|
15693
|
+
children
|
|
15694
|
+
}) }) });
|
|
15695
|
+
$[5] = ariaLabel;
|
|
15696
|
+
$[6] = children;
|
|
15697
|
+
$[7] = ref;
|
|
15698
|
+
$[8] = t2;
|
|
15699
|
+
$[9] = t3;
|
|
15700
|
+
$[10] = t4;
|
|
15701
|
+
} else t4 = $[10];
|
|
15702
|
+
return t4;
|
|
15703
|
+
};
|
|
15704
|
+
const DsPopoverHeader = (t0) => {
|
|
15705
|
+
const $ = (0, react_compiler_runtime.c)(11);
|
|
15706
|
+
const { icon, className, style, children } = t0;
|
|
15707
|
+
let t1;
|
|
15708
|
+
if ($[0] !== className) {
|
|
15709
|
+
t1 = (0, classnames.default)(ds_popover_module_default.header, className);
|
|
15710
|
+
$[0] = className;
|
|
15711
|
+
$[1] = t1;
|
|
15712
|
+
} else t1 = $[1];
|
|
15713
|
+
let t2;
|
|
15714
|
+
if ($[2] !== icon) {
|
|
15715
|
+
t2 = icon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15716
|
+
className: ds_popover_module_default.headerIcon,
|
|
15717
|
+
children: icon
|
|
15718
|
+
});
|
|
15719
|
+
$[2] = icon;
|
|
15720
|
+
$[3] = t2;
|
|
15721
|
+
} else t2 = $[3];
|
|
15722
|
+
let t3;
|
|
15723
|
+
if ($[4] !== children) {
|
|
15724
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ark_ui_react_popover.Popover.Title, {
|
|
15725
|
+
className: ds_popover_module_default.title,
|
|
15726
|
+
asChild: true,
|
|
15727
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
15728
|
+
variant: "heading3",
|
|
15729
|
+
color: "main",
|
|
15730
|
+
children
|
|
15731
|
+
})
|
|
15732
|
+
});
|
|
15733
|
+
$[4] = children;
|
|
15734
|
+
$[5] = t3;
|
|
15735
|
+
} else t3 = $[5];
|
|
15736
|
+
let t4;
|
|
15737
|
+
if ($[6] !== style || $[7] !== t1 || $[8] !== t2 || $[9] !== t3) {
|
|
15738
|
+
t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15739
|
+
className: t1,
|
|
15740
|
+
style,
|
|
15741
|
+
children: [t2, t3]
|
|
15742
|
+
});
|
|
15743
|
+
$[6] = style;
|
|
15744
|
+
$[7] = t1;
|
|
15745
|
+
$[8] = t2;
|
|
15746
|
+
$[9] = t3;
|
|
15747
|
+
$[10] = t4;
|
|
15748
|
+
} else t4 = $[10];
|
|
15749
|
+
return t4;
|
|
15750
|
+
};
|
|
15751
|
+
const DsPopoverContent = (t0) => {
|
|
15752
|
+
const $ = (0, react_compiler_runtime.c)(6);
|
|
15753
|
+
const { className, style, children } = t0;
|
|
15754
|
+
let t1;
|
|
15755
|
+
if ($[0] !== className) {
|
|
15756
|
+
t1 = (0, classnames.default)(ds_popover_module_default.content, className);
|
|
15757
|
+
$[0] = className;
|
|
15758
|
+
$[1] = t1;
|
|
15759
|
+
} else t1 = $[1];
|
|
15760
|
+
let t2;
|
|
15761
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
15762
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15763
|
+
className: t1,
|
|
15764
|
+
style,
|
|
15765
|
+
children
|
|
15766
|
+
});
|
|
15767
|
+
$[2] = children;
|
|
15768
|
+
$[3] = style;
|
|
15769
|
+
$[4] = t1;
|
|
15770
|
+
$[5] = t2;
|
|
15771
|
+
} else t2 = $[5];
|
|
15772
|
+
return t2;
|
|
15773
|
+
};
|
|
15774
|
+
const DsPopoverContentItem = (t0) => {
|
|
15775
|
+
const $ = (0, react_compiler_runtime.c)(11);
|
|
15776
|
+
const { status, headline, className, style, children } = t0;
|
|
15777
|
+
const hasHeader = Boolean(status) || Boolean(headline);
|
|
15778
|
+
let t1;
|
|
15779
|
+
if ($[0] !== hasHeader || $[1] !== headline || $[2] !== status) {
|
|
15780
|
+
t1 = hasHeader && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
|
|
15781
|
+
direction: "row",
|
|
15782
|
+
alignItems: "center",
|
|
15783
|
+
gap: "var(--xs)",
|
|
15784
|
+
children: [status, headline && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
15785
|
+
variant: "body-sm-semi-bold",
|
|
15786
|
+
color: "main",
|
|
15787
|
+
children: headline
|
|
15788
|
+
})]
|
|
15789
|
+
});
|
|
15790
|
+
$[0] = hasHeader;
|
|
15791
|
+
$[1] = headline;
|
|
15792
|
+
$[2] = status;
|
|
15793
|
+
$[3] = t1;
|
|
15794
|
+
} else t1 = $[3];
|
|
15795
|
+
let t2;
|
|
15796
|
+
if ($[4] !== children) {
|
|
15797
|
+
t2 = children && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
15798
|
+
variant: "body-sm-reg",
|
|
15799
|
+
color: "main",
|
|
15800
|
+
asChild: true,
|
|
15801
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsStack, {
|
|
15802
|
+
direction: "row",
|
|
15803
|
+
alignItems: "center",
|
|
15804
|
+
gap: "var(--xs)",
|
|
15805
|
+
children
|
|
15806
|
+
})
|
|
15807
|
+
});
|
|
15808
|
+
$[4] = children;
|
|
15809
|
+
$[5] = t2;
|
|
15810
|
+
} else t2 = $[5];
|
|
15811
|
+
let t3;
|
|
15812
|
+
if ($[6] !== className || $[7] !== style || $[8] !== t1 || $[9] !== t2) {
|
|
15813
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
|
|
15814
|
+
direction: "column",
|
|
15815
|
+
gap: "var(--xs)",
|
|
15816
|
+
className,
|
|
15817
|
+
style,
|
|
15818
|
+
children: [t1, t2]
|
|
15819
|
+
});
|
|
15820
|
+
$[6] = className;
|
|
15821
|
+
$[7] = style;
|
|
15822
|
+
$[8] = t1;
|
|
15823
|
+
$[9] = t2;
|
|
15824
|
+
$[10] = t3;
|
|
15825
|
+
} else t3 = $[10];
|
|
15826
|
+
return t3;
|
|
15827
|
+
};
|
|
15828
|
+
const DsPopoverFooter = (t0) => {
|
|
15829
|
+
const $ = (0, react_compiler_runtime.c)(6);
|
|
15830
|
+
const { className, style, children } = t0;
|
|
15831
|
+
let t1;
|
|
15832
|
+
if ($[0] !== className) {
|
|
15833
|
+
t1 = (0, classnames.default)(ds_popover_module_default.footer, className);
|
|
15834
|
+
$[0] = className;
|
|
15835
|
+
$[1] = t1;
|
|
15836
|
+
} else t1 = $[1];
|
|
15837
|
+
let t2;
|
|
15838
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
15839
|
+
t2 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15840
|
+
className: t1,
|
|
15841
|
+
style,
|
|
15842
|
+
children
|
|
15843
|
+
});
|
|
15844
|
+
$[2] = children;
|
|
15845
|
+
$[3] = style;
|
|
15846
|
+
$[4] = t1;
|
|
15847
|
+
$[5] = t2;
|
|
15848
|
+
} else t2 = $[5];
|
|
15849
|
+
return t2;
|
|
15850
|
+
};
|
|
15851
|
+
/**
|
|
15852
|
+
* Legacy single-element form. Keeps the old call signature and `side` default
|
|
15853
|
+
* ('top') compiling and opening, but now renders the new fixed-width panel —
|
|
15854
|
+
* styling differs from the old Radix popover and the Radix `Popover.Close`
|
|
15855
|
+
* context is no longer wired.
|
|
15856
|
+
* @deprecated Migrate to the compound API (`DsPopover.Root` / `.Trigger` / `.Panel`).
|
|
15857
|
+
*/
|
|
15858
|
+
const DsPopoverLegacy = (t0) => {
|
|
15859
|
+
const $ = (0, react_compiler_runtime.c)(10);
|
|
15860
|
+
const { trigger, children, className, side: t1, align: t2 } = t0;
|
|
15861
|
+
const side = t1 === void 0 ? "top" : t1;
|
|
15862
|
+
const align = t2 === void 0 ? "center" : t2;
|
|
15863
|
+
let t3;
|
|
15864
|
+
if ($[0] !== trigger) {
|
|
15865
|
+
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsPopoverTrigger, { children: trigger });
|
|
15866
|
+
$[0] = trigger;
|
|
15507
15867
|
$[1] = t3;
|
|
15508
15868
|
} else t3 = $[1];
|
|
15509
15869
|
let t4;
|
|
15510
|
-
if ($[2] !== className) {
|
|
15511
|
-
t4 = (0,
|
|
15512
|
-
|
|
15513
|
-
|
|
15514
|
-
|
|
15870
|
+
if ($[2] !== children || $[3] !== className) {
|
|
15871
|
+
t4 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsPopoverPanel, {
|
|
15872
|
+
className,
|
|
15873
|
+
children
|
|
15874
|
+
});
|
|
15875
|
+
$[2] = children;
|
|
15876
|
+
$[3] = className;
|
|
15877
|
+
$[4] = t4;
|
|
15878
|
+
} else t4 = $[4];
|
|
15515
15879
|
let t5;
|
|
15516
|
-
if ($[
|
|
15517
|
-
t5 = /* @__PURE__ */ (0, react_jsx_runtime.
|
|
15518
|
-
$[4] = t5;
|
|
15519
|
-
} else t5 = $[4];
|
|
15520
|
-
let t6;
|
|
15521
|
-
if ($[5] !== align || $[6] !== children || $[7] !== side || $[8] !== t4) {
|
|
15522
|
-
t6 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_popover.Content, {
|
|
15880
|
+
if ($[5] !== align || $[6] !== side || $[7] !== t3 || $[8] !== t4) {
|
|
15881
|
+
t5 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsPopoverRoot, {
|
|
15523
15882
|
side,
|
|
15524
15883
|
align,
|
|
15525
|
-
|
|
15526
|
-
|
|
15527
|
-
className: t4,
|
|
15528
|
-
children: [children, t5]
|
|
15529
|
-
}) });
|
|
15884
|
+
children: [t3, t4]
|
|
15885
|
+
});
|
|
15530
15886
|
$[5] = align;
|
|
15531
|
-
$[6] =
|
|
15532
|
-
$[7] =
|
|
15887
|
+
$[6] = side;
|
|
15888
|
+
$[7] = t3;
|
|
15533
15889
|
$[8] = t4;
|
|
15534
|
-
$[9] =
|
|
15535
|
-
} else
|
|
15536
|
-
|
|
15537
|
-
if ($[10] !== t3 || $[11] !== t6) {
|
|
15538
|
-
t7 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_popover.Root, { children: [t3, t6] });
|
|
15539
|
-
$[10] = t3;
|
|
15540
|
-
$[11] = t6;
|
|
15541
|
-
$[12] = t7;
|
|
15542
|
-
} else t7 = $[12];
|
|
15543
|
-
return t7;
|
|
15890
|
+
$[9] = t5;
|
|
15891
|
+
} else t5 = $[9];
|
|
15892
|
+
return t5;
|
|
15544
15893
|
};
|
|
15894
|
+
const DsPopover = Object.assign(DsPopoverLegacy, {
|
|
15895
|
+
Root: DsPopoverRoot,
|
|
15896
|
+
Trigger: DsPopoverTrigger,
|
|
15897
|
+
Panel: DsPopoverPanel,
|
|
15898
|
+
Header: DsPopoverHeader,
|
|
15899
|
+
Content: DsPopoverContent,
|
|
15900
|
+
ContentItem: DsPopoverContentItem,
|
|
15901
|
+
Footer: DsPopoverFooter
|
|
15902
|
+
});
|
|
15903
|
+
//#endregion
|
|
15904
|
+
//#region src/components/ds-popover/ds-popover.types.ts
|
|
15905
|
+
const popoverSides = [
|
|
15906
|
+
"top",
|
|
15907
|
+
"right",
|
|
15908
|
+
"bottom",
|
|
15909
|
+
"left"
|
|
15910
|
+
];
|
|
15911
|
+
const popoverAligns = [
|
|
15912
|
+
"start",
|
|
15913
|
+
"center",
|
|
15914
|
+
"end"
|
|
15915
|
+
];
|
|
15545
15916
|
//#endregion
|
|
15546
15917
|
//#region src/components/ds-progress-arc/ds-progress-arc.module.scss
|
|
15547
15918
|
var ds_progress_arc_module_default = {
|
|
@@ -16182,6 +16553,263 @@ const progressLinearSizes = [
|
|
|
16182
16553
|
"large"
|
|
16183
16554
|
];
|
|
16184
16555
|
//#endregion
|
|
16556
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.module.scss
|
|
16557
|
+
var ds_progress_task_bar_module_default = {
|
|
16558
|
+
"bar": "SN3VFW_bar",
|
|
16559
|
+
"segment": "SN3VFW_segment",
|
|
16560
|
+
"segmentCompleted": "SN3VFW_segmentCompleted",
|
|
16561
|
+
"segmentFailed": "SN3VFW_segmentFailed",
|
|
16562
|
+
"segmentRunning": "SN3VFW_segmentRunning",
|
|
16563
|
+
"statusIcon": "SN3VFW_statusIcon",
|
|
16564
|
+
"total": "SN3VFW_total"
|
|
16565
|
+
};
|
|
16566
|
+
//#endregion
|
|
16567
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.types.ts
|
|
16568
|
+
const taskBarStatuses = [
|
|
16569
|
+
"completed",
|
|
16570
|
+
"running",
|
|
16571
|
+
"failed"
|
|
16572
|
+
];
|
|
16573
|
+
//#endregion
|
|
16574
|
+
//#region src/components/ds-progress-task-bar/utils.ts
|
|
16575
|
+
const COUNT_UNITS = [
|
|
16576
|
+
{
|
|
16577
|
+
value: 1e9,
|
|
16578
|
+
suffix: "B"
|
|
16579
|
+
},
|
|
16580
|
+
{
|
|
16581
|
+
value: 1e6,
|
|
16582
|
+
suffix: "M"
|
|
16583
|
+
},
|
|
16584
|
+
{
|
|
16585
|
+
value: 1e3,
|
|
16586
|
+
suffix: "K"
|
|
16587
|
+
}
|
|
16588
|
+
];
|
|
16589
|
+
const ABBREVIATION_FLOOR = 1e3;
|
|
16590
|
+
const DECIMAL_THRESHOLD = 10;
|
|
16591
|
+
const stripTrailingZero = (value) => value % 1 === 0 ? String(value) : value.toFixed(1);
|
|
16592
|
+
/**
|
|
16593
|
+
* Format a task count for the legend, following the design's abbreviation rules:
|
|
16594
|
+
* - `< 1000` → exact number (e.g. `999`)
|
|
16595
|
+
* - single-digit unit → one decimal (e.g. `1.1K`, `1.2M`)
|
|
16596
|
+
* - multi-digit unit → whole number, truncated so `999,999 → 999K`
|
|
16597
|
+
*/
|
|
16598
|
+
const formatCount = (count) => {
|
|
16599
|
+
if (!Number.isFinite(count)) return "0";
|
|
16600
|
+
const rounded = Math.max(0, Math.round(count));
|
|
16601
|
+
if (rounded < ABBREVIATION_FLOOR) return String(rounded);
|
|
16602
|
+
const unit = COUNT_UNITS.find(({ value }) => rounded >= value);
|
|
16603
|
+
if (unit === void 0) return String(rounded);
|
|
16604
|
+
const scaled = rounded / unit.value;
|
|
16605
|
+
if (scaled < DECIMAL_THRESHOLD) return `${stripTrailingZero(Math.round(scaled * 10) / 10)}${unit.suffix}`;
|
|
16606
|
+
return `${String(Math.floor(scaled))}${unit.suffix}`;
|
|
16607
|
+
};
|
|
16608
|
+
//#endregion
|
|
16609
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.tsx
|
|
16610
|
+
const statusIcon = Object.freeze({
|
|
16611
|
+
completed: "check_circle",
|
|
16612
|
+
running: "play_circle",
|
|
16613
|
+
failed: "cancel"
|
|
16614
|
+
});
|
|
16615
|
+
const statusIconColor = Object.freeze({
|
|
16616
|
+
completed: "success",
|
|
16617
|
+
running: "action",
|
|
16618
|
+
failed: "error"
|
|
16619
|
+
});
|
|
16620
|
+
const statusTextColor = Object.freeze({
|
|
16621
|
+
completed: "success",
|
|
16622
|
+
running: "action",
|
|
16623
|
+
failed: "error"
|
|
16624
|
+
});
|
|
16625
|
+
const statusSegmentClass = Object.freeze({
|
|
16626
|
+
completed: ds_progress_task_bar_module_default.segmentCompleted,
|
|
16627
|
+
running: ds_progress_task_bar_module_default.segmentRunning,
|
|
16628
|
+
failed: ds_progress_task_bar_module_default.segmentFailed
|
|
16629
|
+
});
|
|
16630
|
+
const defaultLocale = Object.freeze({
|
|
16631
|
+
completed: "Completed",
|
|
16632
|
+
running: "Running",
|
|
16633
|
+
failed: "Failed",
|
|
16634
|
+
total: (total) => `of ${total}`
|
|
16635
|
+
});
|
|
16636
|
+
const DsProgressTaskBar = (t0) => {
|
|
16637
|
+
const $ = (0, react_compiler_runtime.c)(39);
|
|
16638
|
+
const { completed: t1, running: t2, failed: t3, total, locale, className, style, ref } = t0;
|
|
16639
|
+
const completed = t1 === void 0 ? 0 : t1;
|
|
16640
|
+
const running = t2 === void 0 ? 0 : t2;
|
|
16641
|
+
const failed = t3 === void 0 ? 0 : t3;
|
|
16642
|
+
const t4 = Math.max(0, completed);
|
|
16643
|
+
const t5 = Math.max(0, running);
|
|
16644
|
+
const t6 = Math.max(0, failed);
|
|
16645
|
+
let T0;
|
|
16646
|
+
let t10;
|
|
16647
|
+
let t11;
|
|
16648
|
+
let t12;
|
|
16649
|
+
let t13;
|
|
16650
|
+
let t14;
|
|
16651
|
+
let t15;
|
|
16652
|
+
let t16;
|
|
16653
|
+
let t17;
|
|
16654
|
+
let t18;
|
|
16655
|
+
let t19;
|
|
16656
|
+
let t7;
|
|
16657
|
+
let t8;
|
|
16658
|
+
let t9;
|
|
16659
|
+
if ($[0] !== className || $[1] !== locale || $[2] !== ref || $[3] !== style || $[4] !== t4 || $[5] !== t5 || $[6] !== t6 || $[7] !== total) {
|
|
16660
|
+
const counts = {
|
|
16661
|
+
completed: t4,
|
|
16662
|
+
running: t5,
|
|
16663
|
+
failed: t6
|
|
16664
|
+
};
|
|
16665
|
+
const sum = counts.completed + counts.running + counts.failed;
|
|
16666
|
+
const denominator = Math.max(total ?? sum, sum);
|
|
16667
|
+
const mergedLocale = {
|
|
16668
|
+
...defaultLocale,
|
|
16669
|
+
...locale
|
|
16670
|
+
};
|
|
16671
|
+
const activeStatuses = taskBarStatuses.filter((status) => counts[status] > 0);
|
|
16672
|
+
const segmentWidth = (status_0) => denominator > 0 ? `${String(counts[status_0] / denominator * 100)}%` : "0%";
|
|
16673
|
+
T0 = DsStack;
|
|
16674
|
+
t13 = ref;
|
|
16675
|
+
t14 = "column";
|
|
16676
|
+
t15 = "var(--xs)";
|
|
16677
|
+
t16 = "100%";
|
|
16678
|
+
t17 = className;
|
|
16679
|
+
t18 = style;
|
|
16680
|
+
t19 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
|
|
16681
|
+
direction: "row",
|
|
16682
|
+
alignItems: "center",
|
|
16683
|
+
justifyContent: "space-between",
|
|
16684
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsStack, {
|
|
16685
|
+
direction: "row",
|
|
16686
|
+
alignItems: "center",
|
|
16687
|
+
gap: "var(--3xs)",
|
|
16688
|
+
children: activeStatuses.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
16689
|
+
variant: "body-xs-reg",
|
|
16690
|
+
color: "secondary",
|
|
16691
|
+
children: "0"
|
|
16692
|
+
}) : activeStatuses.map((status_1) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DsStack, {
|
|
16693
|
+
direction: "row",
|
|
16694
|
+
alignItems: "center",
|
|
16695
|
+
gap: "var(--4xs)",
|
|
16696
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTooltip, {
|
|
16697
|
+
content: mergedLocale[status_1],
|
|
16698
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
16699
|
+
className: ds_progress_task_bar_module_default.statusIcon,
|
|
16700
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
|
|
16701
|
+
icon: statusIcon[status_1],
|
|
16702
|
+
size: "tiny",
|
|
16703
|
+
color: statusIconColor[status_1],
|
|
16704
|
+
filled: true
|
|
16705
|
+
})
|
|
16706
|
+
})
|
|
16707
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
16708
|
+
variant: "body-xs-reg",
|
|
16709
|
+
color: statusTextColor[status_1],
|
|
16710
|
+
children: formatCount(counts[status_1])
|
|
16711
|
+
})]
|
|
16712
|
+
}, status_1))
|
|
16713
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTypography, {
|
|
16714
|
+
variant: "body-xs-reg",
|
|
16715
|
+
color: "secondary",
|
|
16716
|
+
className: ds_progress_task_bar_module_default.total,
|
|
16717
|
+
children: mergedLocale.total(formatCount(denominator))
|
|
16718
|
+
})]
|
|
16719
|
+
});
|
|
16720
|
+
t7 = ds_progress_task_bar_module_default.bar;
|
|
16721
|
+
t8 = "progressbar";
|
|
16722
|
+
t9 = 0;
|
|
16723
|
+
t10 = denominator;
|
|
16724
|
+
t11 = sum;
|
|
16725
|
+
t12 = activeStatuses.map((status_2) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTooltip, {
|
|
16726
|
+
content: mergedLocale[status_2],
|
|
16727
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
16728
|
+
className: (0, classnames.default)(ds_progress_task_bar_module_default.segment, statusSegmentClass[status_2]),
|
|
16729
|
+
style: { width: segmentWidth(status_2) }
|
|
16730
|
+
})
|
|
16731
|
+
}, status_2));
|
|
16732
|
+
$[0] = className;
|
|
16733
|
+
$[1] = locale;
|
|
16734
|
+
$[2] = ref;
|
|
16735
|
+
$[3] = style;
|
|
16736
|
+
$[4] = t4;
|
|
16737
|
+
$[5] = t5;
|
|
16738
|
+
$[6] = t6;
|
|
16739
|
+
$[7] = total;
|
|
16740
|
+
$[8] = T0;
|
|
16741
|
+
$[9] = t10;
|
|
16742
|
+
$[10] = t11;
|
|
16743
|
+
$[11] = t12;
|
|
16744
|
+
$[12] = t13;
|
|
16745
|
+
$[13] = t14;
|
|
16746
|
+
$[14] = t15;
|
|
16747
|
+
$[15] = t16;
|
|
16748
|
+
$[16] = t17;
|
|
16749
|
+
$[17] = t18;
|
|
16750
|
+
$[18] = t19;
|
|
16751
|
+
$[19] = t7;
|
|
16752
|
+
$[20] = t8;
|
|
16753
|
+
$[21] = t9;
|
|
16754
|
+
} else {
|
|
16755
|
+
T0 = $[8];
|
|
16756
|
+
t10 = $[9];
|
|
16757
|
+
t11 = $[10];
|
|
16758
|
+
t12 = $[11];
|
|
16759
|
+
t13 = $[12];
|
|
16760
|
+
t14 = $[13];
|
|
16761
|
+
t15 = $[14];
|
|
16762
|
+
t16 = $[15];
|
|
16763
|
+
t17 = $[16];
|
|
16764
|
+
t18 = $[17];
|
|
16765
|
+
t19 = $[18];
|
|
16766
|
+
t7 = $[19];
|
|
16767
|
+
t8 = $[20];
|
|
16768
|
+
t9 = $[21];
|
|
16769
|
+
}
|
|
16770
|
+
let t20;
|
|
16771
|
+
if ($[22] !== t10 || $[23] !== t11 || $[24] !== t12 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9) {
|
|
16772
|
+
t20 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
16773
|
+
className: t7,
|
|
16774
|
+
role: t8,
|
|
16775
|
+
"aria-valuemin": t9,
|
|
16776
|
+
"aria-valuemax": t10,
|
|
16777
|
+
"aria-valuenow": t11,
|
|
16778
|
+
children: t12
|
|
16779
|
+
});
|
|
16780
|
+
$[22] = t10;
|
|
16781
|
+
$[23] = t11;
|
|
16782
|
+
$[24] = t12;
|
|
16783
|
+
$[25] = t7;
|
|
16784
|
+
$[26] = t8;
|
|
16785
|
+
$[27] = t9;
|
|
16786
|
+
$[28] = t20;
|
|
16787
|
+
} else t20 = $[28];
|
|
16788
|
+
let t21;
|
|
16789
|
+
if ($[29] !== T0 || $[30] !== t13 || $[31] !== t14 || $[32] !== t15 || $[33] !== t16 || $[34] !== t17 || $[35] !== t18 || $[36] !== t19 || $[37] !== t20) {
|
|
16790
|
+
t21 = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(T0, {
|
|
16791
|
+
ref: t13,
|
|
16792
|
+
direction: t14,
|
|
16793
|
+
gap: t15,
|
|
16794
|
+
width: t16,
|
|
16795
|
+
className: t17,
|
|
16796
|
+
style: t18,
|
|
16797
|
+
children: [t19, t20]
|
|
16798
|
+
});
|
|
16799
|
+
$[29] = T0;
|
|
16800
|
+
$[30] = t13;
|
|
16801
|
+
$[31] = t14;
|
|
16802
|
+
$[32] = t15;
|
|
16803
|
+
$[33] = t16;
|
|
16804
|
+
$[34] = t17;
|
|
16805
|
+
$[35] = t18;
|
|
16806
|
+
$[36] = t19;
|
|
16807
|
+
$[37] = t20;
|
|
16808
|
+
$[38] = t21;
|
|
16809
|
+
} else t21 = $[38];
|
|
16810
|
+
return t21;
|
|
16811
|
+
};
|
|
16812
|
+
//#endregion
|
|
16185
16813
|
//#region src/components/ds-radio-group/ds-radio-group.module.scss
|
|
16186
16814
|
var ds_radio_group_module_default = {
|
|
16187
16815
|
"labelInfo": "gJbMxW_labelInfo",
|
|
@@ -17311,71 +17939,6 @@ const splitButtonSizes = ["medium", "small"];
|
|
|
17311
17939
|
const DsSplitButton = withResponsiveProps(DsSplitButton$1, ["size"]);
|
|
17312
17940
|
DsSplitButton.displayName = "DsSplitButton";
|
|
17313
17941
|
//#endregion
|
|
17314
|
-
//#region src/components/ds-stack/ds-stack.module.scss
|
|
17315
|
-
var ds_stack_module_default = { "root": "efmmNG_root" };
|
|
17316
|
-
//#endregion
|
|
17317
|
-
//#region src/components/ds-stack/ds-stack.tsx
|
|
17318
|
-
const DsStack$1 = (t0) => {
|
|
17319
|
-
const $ = (0, react_compiler_runtime.c)(16);
|
|
17320
|
-
const { direction, gap, alignItems, justifyContent, flex, flexWrap, width, children, className, style, ref } = t0;
|
|
17321
|
-
let t1;
|
|
17322
|
-
if ($[0] !== alignItems || $[1] !== direction || $[2] !== flex || $[3] !== flexWrap || $[4] !== gap || $[5] !== justifyContent || $[6] !== style || $[7] !== width) {
|
|
17323
|
-
t1 = {
|
|
17324
|
-
flexDirection: direction,
|
|
17325
|
-
gap,
|
|
17326
|
-
alignItems,
|
|
17327
|
-
justifyContent,
|
|
17328
|
-
flex,
|
|
17329
|
-
flexWrap,
|
|
17330
|
-
width,
|
|
17331
|
-
...style
|
|
17332
|
-
};
|
|
17333
|
-
$[0] = alignItems;
|
|
17334
|
-
$[1] = direction;
|
|
17335
|
-
$[2] = flex;
|
|
17336
|
-
$[3] = flexWrap;
|
|
17337
|
-
$[4] = gap;
|
|
17338
|
-
$[5] = justifyContent;
|
|
17339
|
-
$[6] = style;
|
|
17340
|
-
$[7] = width;
|
|
17341
|
-
$[8] = t1;
|
|
17342
|
-
} else t1 = $[8];
|
|
17343
|
-
const layoutStyle = t1;
|
|
17344
|
-
let t2;
|
|
17345
|
-
if ($[9] !== className) {
|
|
17346
|
-
t2 = (0, classnames.default)(ds_stack_module_default.root, className);
|
|
17347
|
-
$[9] = className;
|
|
17348
|
-
$[10] = t2;
|
|
17349
|
-
} else t2 = $[10];
|
|
17350
|
-
let t3;
|
|
17351
|
-
if ($[11] !== children || $[12] !== layoutStyle || $[13] !== ref || $[14] !== t2) {
|
|
17352
|
-
t3 = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
17353
|
-
ref,
|
|
17354
|
-
className: t2,
|
|
17355
|
-
style: layoutStyle,
|
|
17356
|
-
children
|
|
17357
|
-
});
|
|
17358
|
-
$[11] = children;
|
|
17359
|
-
$[12] = layoutStyle;
|
|
17360
|
-
$[13] = ref;
|
|
17361
|
-
$[14] = t2;
|
|
17362
|
-
$[15] = t3;
|
|
17363
|
-
} else t3 = $[15];
|
|
17364
|
-
return t3;
|
|
17365
|
-
};
|
|
17366
|
-
//#endregion
|
|
17367
|
-
//#region src/components/ds-stack/index.ts
|
|
17368
|
-
const DsStack = withResponsiveProps(DsStack$1, [
|
|
17369
|
-
"direction",
|
|
17370
|
-
"gap",
|
|
17371
|
-
"alignItems",
|
|
17372
|
-
"justifyContent",
|
|
17373
|
-
"flex",
|
|
17374
|
-
"flexWrap",
|
|
17375
|
-
"width"
|
|
17376
|
-
]);
|
|
17377
|
-
DsStack.displayName = "DsStack";
|
|
17378
|
-
//#endregion
|
|
17379
17942
|
//#region src/components/ds-status-badge/ds-status-badge.module.scss
|
|
17380
17943
|
var ds_status_badge_module_default = {
|
|
17381
17944
|
"active": "U5k6UG_active",
|
|
@@ -18852,6 +19415,7 @@ var ds_table_header_module_default = {
|
|
|
18852
19415
|
"filterableHeader": "-2rCNG_filterableHeader",
|
|
18853
19416
|
"filterActive": "-2rCNG_filterActive",
|
|
18854
19417
|
"filterTriggerContainer": "-2rCNG_filterTriggerContainer",
|
|
19418
|
+
"groupStart": "-2rCNG_groupStart",
|
|
18855
19419
|
"headerCell": "-2rCNG_headerCell",
|
|
18856
19420
|
"headerRow": "-2rCNG_headerRow",
|
|
18857
19421
|
"headerRowNoBorder": "-2rCNG_headerRowNoBorder",
|
|
@@ -18978,6 +19542,154 @@ const SELECT_COLUMN_ID = "select";
|
|
|
18978
19542
|
*/
|
|
18979
19543
|
const REORDER_COLUMN_ID = "reorder";
|
|
18980
19544
|
//#endregion
|
|
19545
|
+
//#region src/components/ds-table/grouping/utils/column-group.ts
|
|
19546
|
+
/**
|
|
19547
|
+
* Builds the flex style for a group header cell so it lines up with the combined
|
|
19548
|
+
* width of its visible leaf columns.
|
|
19549
|
+
*
|
|
19550
|
+
* Fixed-width leaves contribute to `flexBasis`; default-sized leaves each add one
|
|
19551
|
+
* unit of `flexGrow`, mirroring how {@link getColumnSizeStyle} sizes leaf cells so
|
|
19552
|
+
* both header rows distribute free space identically.
|
|
19553
|
+
*/
|
|
19554
|
+
const getGroupColumnSizeStyle = (leafColumns) => {
|
|
19555
|
+
let fixedWidth = 0;
|
|
19556
|
+
let flexCount = 0;
|
|
19557
|
+
for (const leaf of leafColumns) {
|
|
19558
|
+
const size = leaf.getSize();
|
|
19559
|
+
if (size !== _tanstack_react_table.defaultColumnSizing.size) fixedWidth += size;
|
|
19560
|
+
else flexCount += 1;
|
|
19561
|
+
}
|
|
19562
|
+
if (flexCount === 0) return {
|
|
19563
|
+
width: fixedWidth,
|
|
19564
|
+
minWidth: fixedWidth,
|
|
19565
|
+
flexShrink: 0
|
|
19566
|
+
};
|
|
19567
|
+
return {
|
|
19568
|
+
flexGrow: flexCount,
|
|
19569
|
+
flexShrink: 0,
|
|
19570
|
+
flexBasis: fixedWidth,
|
|
19571
|
+
minWidth: fixedWidth
|
|
19572
|
+
};
|
|
19573
|
+
};
|
|
19574
|
+
/**
|
|
19575
|
+
* Whether a column is the first visible leaf of its parent group. Used to draw a
|
|
19576
|
+
* single side border at the start of each group in both the header and body.
|
|
19577
|
+
*/
|
|
19578
|
+
const isFirstLeafColumnOfGroup = (column) => {
|
|
19579
|
+
const parent = column.parent;
|
|
19580
|
+
if (!parent) return false;
|
|
19581
|
+
return parent.getLeafColumns().filter((leaf) => leaf.getIsVisible())[0]?.id === column.id;
|
|
19582
|
+
};
|
|
19583
|
+
const getLeafColumnId = (def) => def.id ?? def.accessorKey;
|
|
19584
|
+
/**
|
|
19585
|
+
* Collects the ids of groups declared with `meta.group.defaultCollapsed`, used to
|
|
19586
|
+
* seed the uncontrolled collapse state.
|
|
19587
|
+
*/
|
|
19588
|
+
const getInitialCollapsedGroups = (columns) => {
|
|
19589
|
+
const collapsed = [];
|
|
19590
|
+
const visit = (defs) => {
|
|
19591
|
+
for (const def of defs) if (def.columns) {
|
|
19592
|
+
if (def.id && def.meta?.group?.defaultCollapsed) collapsed.push(def.id);
|
|
19593
|
+
visit(def.columns);
|
|
19594
|
+
}
|
|
19595
|
+
};
|
|
19596
|
+
visit(columns);
|
|
19597
|
+
return collapsed;
|
|
19598
|
+
};
|
|
19599
|
+
/**
|
|
19600
|
+
* Maps collapsed groups to a {@link VisibilityState} that hides every leaf column
|
|
19601
|
+
* inside a collapsed group except those flagged `meta.keepVisibleWhenCollapsed`.
|
|
19602
|
+
* Layered on top of the consumer's own visibility so collapse never mutates it.
|
|
19603
|
+
*/
|
|
19604
|
+
const getCollapsedColumnVisibility = (columns, collapsedGroupIds) => {
|
|
19605
|
+
const visibility = {};
|
|
19606
|
+
const visit = (defs, isInsideCollapsedGroup) => {
|
|
19607
|
+
for (const def of defs) {
|
|
19608
|
+
if (def.columns) {
|
|
19609
|
+
const isGroupCollapsed = isInsideCollapsedGroup || !!def.id && collapsedGroupIds.includes(def.id);
|
|
19610
|
+
visit(def.columns, isGroupCollapsed);
|
|
19611
|
+
continue;
|
|
19612
|
+
}
|
|
19613
|
+
if (!isInsideCollapsedGroup || def.meta?.keepVisibleWhenCollapsed) continue;
|
|
19614
|
+
const columnId = getLeafColumnId(def);
|
|
19615
|
+
if (columnId) visibility[columnId] = false;
|
|
19616
|
+
}
|
|
19617
|
+
};
|
|
19618
|
+
visit(columns, false);
|
|
19619
|
+
return visibility;
|
|
19620
|
+
};
|
|
19621
|
+
//#endregion
|
|
19622
|
+
//#region src/components/ds-table/grouping/hooks/use-column-groups.ts
|
|
19623
|
+
/**
|
|
19624
|
+
* Manages column-group collapse state. Supports both controlled
|
|
19625
|
+
* (`collapsedColumnGroups` + `onCollapsedColumnGroupsChange`) and uncontrolled
|
|
19626
|
+
* usage (seeded from `meta.group.defaultCollapsed`).
|
|
19627
|
+
*/
|
|
19628
|
+
const useColumnGroups = ({ columns, collapsedColumnGroups, onCollapsedColumnGroupsChange }) => {
|
|
19629
|
+
const [collapsed, setCollapsed] = useControlled(collapsedColumnGroups, onCollapsedColumnGroupsChange, getInitialCollapsedGroups(columns));
|
|
19630
|
+
const toggleColumnGroup = (groupId) => {
|
|
19631
|
+
setCollapsed(collapsed.includes(groupId) ? collapsed.filter((id) => id !== groupId) : [...collapsed, groupId]);
|
|
19632
|
+
};
|
|
19633
|
+
return {
|
|
19634
|
+
collapsedColumnGroups: collapsed,
|
|
19635
|
+
toggleColumnGroup,
|
|
19636
|
+
collapsedVisibility: (0, react.useMemo)(() => getCollapsedColumnVisibility(columns, collapsed), [columns, collapsed])
|
|
19637
|
+
};
|
|
19638
|
+
};
|
|
19639
|
+
//#endregion
|
|
19640
|
+
//#region src/components/ds-table/ds-table.types.ts
|
|
19641
|
+
/**
|
|
19642
|
+
* Default English strings for {@link DsTableLocale}.
|
|
19643
|
+
*/
|
|
19644
|
+
const defaultDsTableLocale = Object.freeze({
|
|
19645
|
+
collapseColumnGroup: "Collapse column group",
|
|
19646
|
+
expandColumnGroup: "Expand column group"
|
|
19647
|
+
});
|
|
19648
|
+
//#endregion
|
|
19649
|
+
//#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss
|
|
19650
|
+
var ds_table_group_header_cell_module_default = {
|
|
19651
|
+
"collapseToggle": "HuJ4KG_collapseToggle",
|
|
19652
|
+
"groupHeaderCell": "HuJ4KG_groupHeaderCell",
|
|
19653
|
+
"groupHeaderContent": "HuJ4KG_groupHeaderContent",
|
|
19654
|
+
"groupLabel": "HuJ4KG_groupLabel"
|
|
19655
|
+
};
|
|
19656
|
+
//#endregion
|
|
19657
|
+
//#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx
|
|
19658
|
+
const DsTableGroupHeaderCell = ({ header }) => {
|
|
19659
|
+
const { collapsedColumnGroups, onToggleColumnGroup, locale } = useDsTableContext();
|
|
19660
|
+
const groupId = header.column.id;
|
|
19661
|
+
const groupStyle = getGroupColumnSizeStyle(header.column.getLeafColumns().filter((leaf) => leaf.getIsVisible()));
|
|
19662
|
+
const isCollapsible = header.column.columnDef.meta?.group?.collapsible ?? false;
|
|
19663
|
+
const isCollapsed = collapsedColumnGroups?.includes(groupId) ?? false;
|
|
19664
|
+
const mergedLocale = {
|
|
19665
|
+
...defaultDsTableLocale,
|
|
19666
|
+
...locale
|
|
19667
|
+
};
|
|
19668
|
+
const toggleLabel = isCollapsed ? mergedLocale.expandColumnGroup : mergedLocale.collapseColumnGroup;
|
|
19669
|
+
const handleToggle = () => onToggleColumnGroup?.(groupId);
|
|
19670
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
|
|
19671
|
+
className: ds_table_group_header_cell_module_default.groupHeaderCell,
|
|
19672
|
+
style: groupStyle,
|
|
19673
|
+
colSpan: header.colSpan,
|
|
19674
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19675
|
+
className: ds_table_group_header_cell_module_default.groupHeaderContent,
|
|
19676
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
19677
|
+
className: ds_table_group_header_cell_module_default.groupLabel,
|
|
19678
|
+
children: (0, _tanstack_react_table.flexRender)(header.column.columnDef.header, header.getContext())
|
|
19679
|
+
}), isCollapsible && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsButtonV3, {
|
|
19680
|
+
variant: "secondary",
|
|
19681
|
+
size: "tiny",
|
|
19682
|
+
icon: isCollapsed ? "chevron_right" : "chevron_left",
|
|
19683
|
+
className: ds_table_group_header_cell_module_default.collapseToggle,
|
|
19684
|
+
"aria-label": toggleLabel,
|
|
19685
|
+
"aria-expanded": !isCollapsed,
|
|
19686
|
+
title: toggleLabel,
|
|
19687
|
+
onClick: handleToggle
|
|
19688
|
+
})]
|
|
19689
|
+
})
|
|
19690
|
+
});
|
|
19691
|
+
};
|
|
19692
|
+
//#endregion
|
|
18981
19693
|
//#region src/components/ds-table/components/ds-table-header/ds-table-header.tsx
|
|
18982
19694
|
const DsTableHeader = ({ table }) => {
|
|
18983
19695
|
const { stickyHeader, bordered, virtualized } = useDsTableContext();
|
|
@@ -18986,17 +19698,23 @@ const DsTableHeader = ({ table }) => {
|
|
|
18986
19698
|
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
|
|
18987
19699
|
className: (0, classnames.default)(ds_table_header_module_default.headerRow, !bordered && ds_table_header_module_default.headerRowNoBorder, virtualized && ds_table_header_module_default.headerRowVirtualized),
|
|
18988
19700
|
children: headerGroup.headers.map((header) => {
|
|
19701
|
+
if (header.isPlaceholder) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
|
|
19702
|
+
className: ds_table_header_module_default.headerCell,
|
|
19703
|
+
style: getColumnSizeStyle(header.getSize())
|
|
19704
|
+
}, header.id);
|
|
19705
|
+
if (header.subHeaders.length > 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableGroupHeaderCell, { header }, header.id);
|
|
18989
19706
|
const headerStyle = getColumnSizeStyle(header.column.getSize());
|
|
18990
19707
|
const canSort = header.column.getCanSort();
|
|
18991
19708
|
const isSelectColumn = header.column.id === SELECT_COLUMN_ID;
|
|
19709
|
+
const isGroupStart = isFirstLeafColumnOfGroup(header.column);
|
|
18992
19710
|
const metaFilter = header.column.columnDef.meta?.filter;
|
|
18993
19711
|
const resolvedFilter = metaFilter && "render" in metaFilter ? metaFilter : void 0;
|
|
18994
19712
|
const hasActiveColumnFilter = resolvedFilter?.hasActiveFilter ?? false;
|
|
18995
19713
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableHead, {
|
|
18996
|
-
className: (0, classnames.default)(ds_table_header_module_default.headerCell, canSort && ds_table_header_module_default.sortableHeader, isSelectColumn && ds_table_header_module_default.selectHeaderCell, resolvedFilter && ds_table_header_module_default.filterableHeader, hasActiveColumnFilter && ds_table_header_module_default.filterActive),
|
|
19714
|
+
className: (0, classnames.default)(ds_table_header_module_default.headerCell, canSort && ds_table_header_module_default.sortableHeader, isSelectColumn && ds_table_header_module_default.selectHeaderCell, resolvedFilter && ds_table_header_module_default.filterableHeader, hasActiveColumnFilter && ds_table_header_module_default.filterActive, isGroupStart && ds_table_header_module_default.groupStart),
|
|
18997
19715
|
onClick: header.column.getToggleSortingHandler(),
|
|
18998
19716
|
style: headerStyle,
|
|
18999
|
-
children:
|
|
19717
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19000
19718
|
className: ds_table_header_module_default.headerSortContainer,
|
|
19001
19719
|
children: [
|
|
19002
19720
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsStack, {
|
|
@@ -19052,6 +19770,7 @@ var ds_table_module_default = {
|
|
|
19052
19770
|
//#region src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.module.scss
|
|
19053
19771
|
var ds_table_editable_cell_module_default = {
|
|
19054
19772
|
"editButton": "g5FEoW_editButton",
|
|
19773
|
+
"lockIcon": "g5FEoW_lockIcon",
|
|
19055
19774
|
"root": "g5FEoW_root"
|
|
19056
19775
|
};
|
|
19057
19776
|
//#endregion
|
|
@@ -19063,6 +19782,26 @@ const DsTableEditableCell = ({ cell, children }) => {
|
|
|
19063
19782
|
event.stopPropagation();
|
|
19064
19783
|
beginEdit(cell);
|
|
19065
19784
|
};
|
|
19785
|
+
const editDisabled = cell.column.columnDef.editDisabled?.(cell.getContext());
|
|
19786
|
+
const locked = editDisabled === true || typeof editDisabled === "object";
|
|
19787
|
+
const reason = typeof editDisabled === "object" ? editDisabled.reason : void 0;
|
|
19788
|
+
if (locked) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19789
|
+
className: ds_table_editable_cell_module_default.root,
|
|
19790
|
+
"data-locked": "",
|
|
19791
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTooltip, {
|
|
19792
|
+
content: reason,
|
|
19793
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
19794
|
+
className: ds_table_editable_cell_module_default.lockIcon,
|
|
19795
|
+
"aria-label": "Editing disabled",
|
|
19796
|
+
role: "img",
|
|
19797
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsIcon, {
|
|
19798
|
+
icon: "lock",
|
|
19799
|
+
size: "small",
|
|
19800
|
+
color: "secondary"
|
|
19801
|
+
})
|
|
19802
|
+
})
|
|
19803
|
+
})]
|
|
19804
|
+
});
|
|
19066
19805
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19067
19806
|
className: ds_table_editable_cell_module_default.root,
|
|
19068
19807
|
"data-active": isEditing ? "" : void 0,
|
|
@@ -19264,7 +20003,9 @@ var ds_table_row_module_default = {
|
|
|
19264
20003
|
"expandableCell": "t8OZCq_expandableCell",
|
|
19265
20004
|
"expanded": "t8OZCq_expanded",
|
|
19266
20005
|
"expandedRow": "t8OZCq_expandedRow",
|
|
20006
|
+
"groupStart": "t8OZCq_groupStart",
|
|
19267
20007
|
"isDragging": "t8OZCq_isDragging",
|
|
20008
|
+
"loadingRow": "t8OZCq_loadingRow",
|
|
19268
20009
|
"rowDragHandle": "t8OZCq_rowDragHandle",
|
|
19269
20010
|
"rowNoBorder": "t8OZCq_rowNoBorder",
|
|
19270
20011
|
"selectableCell": "t8OZCq_selectableCell",
|
|
@@ -19291,7 +20032,7 @@ const DsRowDragHandle = ({ isDragging, attributes, listeners, style }) => {
|
|
|
19291
20032
|
});
|
|
19292
20033
|
};
|
|
19293
20034
|
const DsTableRow = ({ ref, row, isSelected }) => {
|
|
19294
|
-
const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId } = useDsTableContext();
|
|
20035
|
+
const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId, loading } = useDsTableContext();
|
|
19295
20036
|
const isExpanded = row.getIsExpanded();
|
|
19296
20037
|
const isActive = activeRowId === row.id;
|
|
19297
20038
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = (0, _dnd_kit_sortable.useSortable)({
|
|
@@ -19315,7 +20056,7 @@ const DsTableRow = ({ ref, row, isSelected }) => {
|
|
|
19315
20056
|
[ds_table_row_module_default.sizeSmall]: rowSize === "small",
|
|
19316
20057
|
[ds_table_row_module_default.sizeMedium]: rowSize === "medium",
|
|
19317
20058
|
[ds_table_row_module_default.sizeLarge]: rowSize === "large"
|
|
19318
|
-
}, onRowClick && ds_table_row_module_default.clickableRow, !bordered && ds_table_row_module_default.rowNoBorder, isExpanded && ds_table_row_module_default.expanded),
|
|
20059
|
+
}, onRowClick && ds_table_row_module_default.clickableRow, !bordered && ds_table_row_module_default.rowNoBorder, isExpanded && ds_table_row_module_default.expanded, loading && ds_table_row_module_default.loadingRow),
|
|
19319
20060
|
style: rowStyle,
|
|
19320
20061
|
onClick: () => onRowClick?.(row.original),
|
|
19321
20062
|
onDoubleClick: () => onRowDoubleClick?.(row.original),
|
|
@@ -19329,7 +20070,7 @@ const DsTableRow = ({ ref, row, isSelected }) => {
|
|
|
19329
20070
|
}, cell.id);
|
|
19330
20071
|
const isLastColumn = idx === row.getVisibleCells().length - 1;
|
|
19331
20072
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
|
|
19332
|
-
className: (0, classnames.default)(ds_table_row_module_default.tableCell, cell.column.id === "expander" && ds_table_row_module_default.expandableCell, cell.column.id === "select" && ds_table_row_module_default.selectableCell, typeof cell.column.columnDef.editCell === "function" && ds_table_row_module_default.editableCell),
|
|
20073
|
+
className: (0, classnames.default)(ds_table_row_module_default.tableCell, cell.column.id === "expander" && ds_table_row_module_default.expandableCell, cell.column.id === "select" && ds_table_row_module_default.selectableCell, isFirstLeafColumnOfGroup(cell.column) && ds_table_row_module_default.groupStart, typeof cell.column.columnDef.editCell === "function" && ds_table_row_module_default.editableCell),
|
|
19333
20074
|
style: cellStyle,
|
|
19334
20075
|
children: isLastColumn ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableCell, {
|
|
19335
20076
|
row,
|
|
@@ -19463,6 +20204,8 @@ var ds_table_row_virtualized_module_default = {
|
|
|
19463
20204
|
"expanded": "NcME7q_expanded",
|
|
19464
20205
|
"expandedRow": "NcME7q_expandedRow",
|
|
19465
20206
|
"expandedRowContent": "NcME7q_expandedRowContent",
|
|
20207
|
+
"groupStart": "NcME7q_groupStart",
|
|
20208
|
+
"loadingRow": "NcME7q_loadingRow",
|
|
19466
20209
|
"row": "NcME7q_row",
|
|
19467
20210
|
"rowNoBorder": "NcME7q_rowNoBorder",
|
|
19468
20211
|
"selectableCell": "NcME7q_selectableCell",
|
|
@@ -19473,7 +20216,7 @@ var ds_table_row_virtualized_module_default = {
|
|
|
19473
20216
|
//#endregion
|
|
19474
20217
|
//#region src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx
|
|
19475
20218
|
const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent }) => {
|
|
19476
|
-
const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick } = useDsTableContext();
|
|
20219
|
+
const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick, loading } = useDsTableContext();
|
|
19477
20220
|
const isExpanded = row.getIsExpanded();
|
|
19478
20221
|
const isActive = activeRowId === row.id;
|
|
19479
20222
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, {
|
|
@@ -19492,14 +20235,14 @@ const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef,
|
|
|
19492
20235
|
[ds_table_row_virtualized_module_default.sizeSmall]: rowSize === "small",
|
|
19493
20236
|
[ds_table_row_virtualized_module_default.sizeMedium]: rowSize === "medium",
|
|
19494
20237
|
[ds_table_row_virtualized_module_default.sizeLarge]: rowSize === "large"
|
|
19495
|
-
}, isExpandedRowContent && ds_table_row_virtualized_module_default.expandedRowContent, onRowClick && ds_table_row_virtualized_module_default.clickableRow, !bordered && ds_table_row_virtualized_module_default.rowNoBorder, isExpanded && ds_table_row_virtualized_module_default.expanded),
|
|
20238
|
+
}, isExpandedRowContent && ds_table_row_virtualized_module_default.expandedRowContent, onRowClick && ds_table_row_virtualized_module_default.clickableRow, !bordered && ds_table_row_virtualized_module_default.rowNoBorder, isExpanded && ds_table_row_virtualized_module_default.expanded, loading && ds_table_row_virtualized_module_default.loadingRow),
|
|
19496
20239
|
onClick: isExpandedRowContent ? void 0 : () => onRowClick?.(row.original),
|
|
19497
20240
|
onDoubleClick: isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original),
|
|
19498
20241
|
children: isExpandedRowContent ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, { children: renderExpandedRow?.(row.original) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: row.getVisibleCells().map((cell, idx) => {
|
|
19499
20242
|
const isLastColumn = idx === row.getVisibleCells().length - 1;
|
|
19500
20243
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
|
|
19501
20244
|
style: getColumnSizeStyle(cell.column.getSize()),
|
|
19502
|
-
className: (0, classnames.default)(ds_table_row_virtualized_module_default.cell, cell.column.id === "expander" && ds_table_row_virtualized_module_default.expandableCell, cell.column.id === "select" && ds_table_row_virtualized_module_default.selectableCell, typeof cell.column.columnDef.editCell === "function" && ds_table_row_virtualized_module_default.editableCell),
|
|
20245
|
+
className: (0, classnames.default)(ds_table_row_virtualized_module_default.cell, cell.column.id === "expander" && ds_table_row_virtualized_module_default.expandableCell, cell.column.id === "select" && ds_table_row_virtualized_module_default.selectableCell, isFirstLeafColumnOfGroup(cell.column) && ds_table_row_virtualized_module_default.groupStart, typeof cell.column.columnDef.editCell === "function" && ds_table_row_virtualized_module_default.editableCell),
|
|
19503
20246
|
children: isLastColumn ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableCell, {
|
|
19504
20247
|
row,
|
|
19505
20248
|
cell,
|
|
@@ -19609,6 +20352,7 @@ const DsTableBodyVirtualized = ({ table, emptyState, estimateSize, overscan, onS
|
|
|
19609
20352
|
function DsTableBody({ ref, rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAndExpandedRowContent, emptyState, rowSelection }) {
|
|
19610
20353
|
const virtualRows = rowVirtualizer.getVirtualItems();
|
|
19611
20354
|
const totalSize = rowVirtualizer.getTotalSize();
|
|
20355
|
+
const hasNoData = rowsAndExpandedRowContent.length === 0;
|
|
19612
20356
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TableBody, {
|
|
19613
20357
|
ref,
|
|
19614
20358
|
className: ds_table_body_virtualized_module_default.body,
|
|
@@ -19624,10 +20368,10 @@ function DsTableBody({ ref, rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAn
|
|
|
19624
20368
|
rowVirtualizer,
|
|
19625
20369
|
virtualRow
|
|
19626
20370
|
}, virtualRow.key);
|
|
19627
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
|
|
20371
|
+
}) : hasNoData ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableCell, {
|
|
19628
20372
|
className: ds_table_body_virtualized_module_default.emptyState,
|
|
19629
20373
|
children: emptyState || "No results."
|
|
19630
|
-
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
20374
|
+
}) }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
19631
20375
|
"aria-hidden": true,
|
|
19632
20376
|
className: ds_table_body_virtualized_module_default.sentinel,
|
|
19633
20377
|
style: { top: `${totalSize.toString()}px` },
|
|
@@ -19645,7 +20389,7 @@ const ROW_SIZE_HEIGHT_MAP = {
|
|
|
19645
20389
|
/**
|
|
19646
20390
|
* Design system Table component
|
|
19647
20391
|
*/
|
|
19648
|
-
const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = false, virtualizedOptions, className, onRowClick, emptyState, stickyHeader = true, bordered = true, fullWidth = true, rowSize = "medium", expandable = false, renderExpandedRow, selectable = false, showSelectAllCheckbox = true, onSelectionChange, onSortingChange, onScroll, actions = [], onRowDoubleClick, primaryRowActions = [], secondaryRowActions, reorderable = false, onOrderChange, columnFilters: externalColumnFilters, onColumnFiltersChange, columnVisibility: externalColumnVisibility, onColumnVisibilityChange, activeRowId, infiniteScroll, onCellEdit, onCellValidate }) => {
|
|
20392
|
+
const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = false, virtualizedOptions, className, onRowClick, emptyState, stickyHeader = true, bordered = true, fullWidth = true, rowSize = "medium", loading = false, expandable = false, renderExpandedRow, selectable = false, showSelectAllCheckbox = true, onSelectionChange, onSortingChange, onScroll, actions = [], onRowDoubleClick, primaryRowActions = [], secondaryRowActions, reorderable = false, onOrderChange, columnFilters: externalColumnFilters, onColumnFiltersChange, columnVisibility: externalColumnVisibility, onColumnVisibilityChange, collapsedColumnGroups: externalCollapsedColumnGroups, onCollapsedColumnGroupsChange, locale, activeRowId, infiniteScroll, onCellEdit, onCellValidate }) => {
|
|
19649
20393
|
const [data, setData] = react.useState(tableData);
|
|
19650
20394
|
const [sorting, setSorting] = react.useState([]);
|
|
19651
20395
|
const [internalColumnFilters, setInternalColumnFilters] = react.useState([]);
|
|
@@ -19666,12 +20410,21 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
19666
20410
|
if (onColumnFiltersChange) onColumnFiltersChange(newFilters);
|
|
19667
20411
|
else setInternalColumnFilters(newFilters);
|
|
19668
20412
|
};
|
|
19669
|
-
const
|
|
20413
|
+
const baseColumnVisibility = externalColumnVisibility ?? internalColumnVisibility;
|
|
19670
20414
|
const handleColumnVisibilityChange = (updaterOrValue) => {
|
|
19671
|
-
const newVisibility = typeof updaterOrValue === "function" ? updaterOrValue(
|
|
20415
|
+
const newVisibility = typeof updaterOrValue === "function" ? updaterOrValue(baseColumnVisibility) : updaterOrValue;
|
|
19672
20416
|
if (onColumnVisibilityChange) onColumnVisibilityChange(newVisibility);
|
|
19673
20417
|
else setInternalColumnVisibility(newVisibility);
|
|
19674
20418
|
};
|
|
20419
|
+
const { collapsedColumnGroups, toggleColumnGroup, collapsedVisibility } = useColumnGroups({
|
|
20420
|
+
columns: columnsProp,
|
|
20421
|
+
collapsedColumnGroups: externalCollapsedColumnGroups,
|
|
20422
|
+
onCollapsedColumnGroupsChange
|
|
20423
|
+
});
|
|
20424
|
+
const columnVisibility = (0, react.useMemo)(() => ({
|
|
20425
|
+
...baseColumnVisibility,
|
|
20426
|
+
...collapsedVisibility
|
|
20427
|
+
}), [baseColumnVisibility, collapsedVisibility]);
|
|
19675
20428
|
const handleSortingChange = (updaterOrValue) => {
|
|
19676
20429
|
const newSorting = typeof updaterOrValue === "function" ? updaterOrValue(sorting) : updaterOrValue;
|
|
19677
20430
|
setSorting(newSorting);
|
|
@@ -19728,9 +20481,20 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
19728
20481
|
hasSelectColumn,
|
|
19729
20482
|
showSelectAllCheckbox
|
|
19730
20483
|
]);
|
|
20484
|
+
const skeletonColumns = (0, react.useMemo)(() => {
|
|
20485
|
+
const toSkeleton = (cols) => cols.map((column) => "columns" in column && column.columns ? {
|
|
20486
|
+
...column,
|
|
20487
|
+
columns: toSkeleton(column.columns)
|
|
20488
|
+
} : {
|
|
20489
|
+
...column,
|
|
20490
|
+
cell: column.loadingCell ?? (() => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsSkeletonText, { width: "60%" }))
|
|
20491
|
+
});
|
|
20492
|
+
return toSkeleton(columns);
|
|
20493
|
+
}, [columns]);
|
|
20494
|
+
const skeletonData = (0, react.useMemo)(() => Array.from({ length: 5 }, (_, i) => ({ id: `ds-table-skeleton-${String(i)}` })), []);
|
|
19731
20495
|
const table = (0, _tanstack_react_table.useReactTable)({
|
|
19732
|
-
data: reorderable ? data : tableData,
|
|
19733
|
-
columns,
|
|
20496
|
+
data: loading ? skeletonData : reorderable ? data : tableData,
|
|
20497
|
+
columns: loading ? skeletonColumns : columns,
|
|
19734
20498
|
getCoreRowModel: (0, _tanstack_react_table.getCoreRowModel)(),
|
|
19735
20499
|
onSortingChange: handleSortingChange,
|
|
19736
20500
|
getSortedRowModel: (0, _tanstack_react_table.getSortedRowModel)(),
|
|
@@ -19796,6 +20560,7 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
19796
20560
|
}) });
|
|
19797
20561
|
const selectedRows = Object.entries(rowSelection).filter(([, selected]) => selected).map(([key]) => rowsById[key]?.original).filter((v) => !!v);
|
|
19798
20562
|
const isBulkActionsVisible = selectable && actions.length > 0 && selectedRows.length > 0;
|
|
20563
|
+
const editingState = useEditingState(onCellEdit, onCellValidate);
|
|
19799
20564
|
const contextValue = {
|
|
19800
20565
|
stickyHeader,
|
|
19801
20566
|
bordered,
|
|
@@ -19805,15 +20570,19 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
19805
20570
|
selectable,
|
|
19806
20571
|
reorderable,
|
|
19807
20572
|
showSelectAllCheckbox,
|
|
19808
|
-
|
|
19809
|
-
|
|
20573
|
+
loading,
|
|
20574
|
+
onRowClick: loading ? void 0 : onRowClick,
|
|
20575
|
+
onRowDoubleClick: loading ? void 0 : onRowDoubleClick,
|
|
19810
20576
|
primaryRowActions,
|
|
19811
20577
|
secondaryRowActions,
|
|
19812
20578
|
renderExpandedRow,
|
|
19813
20579
|
virtualized,
|
|
19814
20580
|
activeRowId,
|
|
20581
|
+
collapsedColumnGroups,
|
|
20582
|
+
onToggleColumnGroup: toggleColumnGroup,
|
|
20583
|
+
locale,
|
|
19815
20584
|
onCellEdit,
|
|
19816
|
-
...
|
|
20585
|
+
...editingState
|
|
19817
20586
|
};
|
|
19818
20587
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DsTableContext.Provider, {
|
|
19819
20588
|
value: contextValue,
|
|
@@ -21434,6 +22203,7 @@ exports.DsPopover = DsPopover;
|
|
|
21434
22203
|
exports.DsProgressArc = DsProgressArc;
|
|
21435
22204
|
exports.DsProgressDonut = DsProgressDonut;
|
|
21436
22205
|
exports.DsProgressLinear = DsProgressLinear;
|
|
22206
|
+
exports.DsProgressTaskBar = DsProgressTaskBar;
|
|
21437
22207
|
exports.DsRadioGroup = DsRadioGroup;
|
|
21438
22208
|
exports.DsRadioGroupLegacy = DsRadioGroupLegacy;
|
|
21439
22209
|
exports.DsSegmentGroup = DsSegmentGroup;
|
|
@@ -21493,6 +22263,7 @@ exports.createDsTreeCollection = createDsTreeCollection;
|
|
|
21493
22263
|
exports.createDualRangeFilterAdapter = createDualRangeFilterAdapter;
|
|
21494
22264
|
exports.createFilterAdapter = createFilterAdapter;
|
|
21495
22265
|
exports.customIcons = customIcons;
|
|
22266
|
+
exports.defaultDsTableLocale = defaultDsTableLocale;
|
|
21496
22267
|
exports.dropdownMenuItemVariants = dropdownMenuItemVariants;
|
|
21497
22268
|
exports.dsKeyValuePairOrientations = dsKeyValuePairOrientations;
|
|
21498
22269
|
exports.filterStatuses = filterStatuses;
|
|
@@ -21503,6 +22274,8 @@ exports.iconVariants = iconVariants;
|
|
|
21503
22274
|
exports.isCustomIcon = isCustomIcon;
|
|
21504
22275
|
exports.isResponsiveValue = isResponsiveValue;
|
|
21505
22276
|
exports.loaderVariants = loaderVariants;
|
|
22277
|
+
exports.popoverAligns = popoverAligns;
|
|
22278
|
+
exports.popoverSides = popoverSides;
|
|
21506
22279
|
exports.progressArcSizes = progressArcSizes;
|
|
21507
22280
|
exports.progressArcVariants = progressArcVariants;
|
|
21508
22281
|
exports.progressDonutSizes = progressDonutSizes;
|
|
@@ -21520,6 +22293,7 @@ exports.statusBadgeV2Variants = statusBadgeV2Variants;
|
|
|
21520
22293
|
exports.systemStatuses = systemStatuses;
|
|
21521
22294
|
exports.tagSizes = tagSizes;
|
|
21522
22295
|
exports.tagVariants = tagVariants;
|
|
22296
|
+
exports.taskBarStatuses = taskBarStatuses;
|
|
21523
22297
|
exports.textInputSizes = textInputSizes;
|
|
21524
22298
|
exports.useBreakpoint = useBreakpoint;
|
|
21525
22299
|
exports.useCellEditor = useCellEditor;
|