@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.js
CHANGED
|
@@ -24,7 +24,6 @@ import { CalendarDate, fromDate, getLocalTimeZone, parseDate } from "@internatio
|
|
|
24
24
|
import { Popover } from "@ark-ui/react/popover";
|
|
25
25
|
import { Select, createListCollection as createListCollection$1, useSelect, useSelectContext } from "@ark-ui/react/select";
|
|
26
26
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
27
|
-
import * as Popover$1 from "@radix-ui/react-popover";
|
|
28
27
|
import { RadioGroup } from "@ark-ui/react/radio-group";
|
|
29
28
|
import { SegmentGroup } from "@ark-ui/react/segment-group";
|
|
30
29
|
import * as steps from "@zag-js/steps";
|
|
@@ -7154,18 +7153,86 @@ var ds_tag_module_default = {
|
|
|
7154
7153
|
"exclude": "UdH7Tq_exclude",
|
|
7155
7154
|
"icon": "UdH7Tq_icon",
|
|
7156
7155
|
"include": "UdH7Tq_include",
|
|
7156
|
+
"key": "UdH7Tq_key",
|
|
7157
|
+
"keyValue": "UdH7Tq_keyValue",
|
|
7157
7158
|
"label": "UdH7Tq_label",
|
|
7158
7159
|
"selected": "UdH7Tq_selected",
|
|
7159
7160
|
"tag": "UdH7Tq_tag",
|
|
7161
|
+
"value": "UdH7Tq_value",
|
|
7160
7162
|
"variantIcon": "UdH7Tq_variantIcon"
|
|
7161
7163
|
};
|
|
7162
7164
|
//#endregion
|
|
7165
|
+
//#region src/components/ds-stack/ds-stack.module.scss
|
|
7166
|
+
var ds_stack_module_default = { "root": "efmmNG_root" };
|
|
7167
|
+
//#endregion
|
|
7168
|
+
//#region src/components/ds-stack/ds-stack.tsx
|
|
7169
|
+
const DsStack$1 = (t0) => {
|
|
7170
|
+
const $ = c(16);
|
|
7171
|
+
const { direction, gap, alignItems, justifyContent, flex, flexWrap, width, children, className, style, ref } = t0;
|
|
7172
|
+
let t1;
|
|
7173
|
+
if ($[0] !== alignItems || $[1] !== direction || $[2] !== flex || $[3] !== flexWrap || $[4] !== gap || $[5] !== justifyContent || $[6] !== style || $[7] !== width) {
|
|
7174
|
+
t1 = {
|
|
7175
|
+
flexDirection: direction,
|
|
7176
|
+
gap,
|
|
7177
|
+
alignItems,
|
|
7178
|
+
justifyContent,
|
|
7179
|
+
flex,
|
|
7180
|
+
flexWrap,
|
|
7181
|
+
width,
|
|
7182
|
+
...style
|
|
7183
|
+
};
|
|
7184
|
+
$[0] = alignItems;
|
|
7185
|
+
$[1] = direction;
|
|
7186
|
+
$[2] = flex;
|
|
7187
|
+
$[3] = flexWrap;
|
|
7188
|
+
$[4] = gap;
|
|
7189
|
+
$[5] = justifyContent;
|
|
7190
|
+
$[6] = style;
|
|
7191
|
+
$[7] = width;
|
|
7192
|
+
$[8] = t1;
|
|
7193
|
+
} else t1 = $[8];
|
|
7194
|
+
const layoutStyle = t1;
|
|
7195
|
+
let t2;
|
|
7196
|
+
if ($[9] !== className) {
|
|
7197
|
+
t2 = classNames(ds_stack_module_default.root, className);
|
|
7198
|
+
$[9] = className;
|
|
7199
|
+
$[10] = t2;
|
|
7200
|
+
} else t2 = $[10];
|
|
7201
|
+
let t3;
|
|
7202
|
+
if ($[11] !== children || $[12] !== layoutStyle || $[13] !== ref || $[14] !== t2) {
|
|
7203
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
7204
|
+
ref,
|
|
7205
|
+
className: t2,
|
|
7206
|
+
style: layoutStyle,
|
|
7207
|
+
children
|
|
7208
|
+
});
|
|
7209
|
+
$[11] = children;
|
|
7210
|
+
$[12] = layoutStyle;
|
|
7211
|
+
$[13] = ref;
|
|
7212
|
+
$[14] = t2;
|
|
7213
|
+
$[15] = t3;
|
|
7214
|
+
} else t3 = $[15];
|
|
7215
|
+
return t3;
|
|
7216
|
+
};
|
|
7217
|
+
//#endregion
|
|
7218
|
+
//#region src/components/ds-stack/index.ts
|
|
7219
|
+
const DsStack = withResponsiveProps(DsStack$1, [
|
|
7220
|
+
"direction",
|
|
7221
|
+
"gap",
|
|
7222
|
+
"alignItems",
|
|
7223
|
+
"justifyContent",
|
|
7224
|
+
"flex",
|
|
7225
|
+
"flexWrap",
|
|
7226
|
+
"width"
|
|
7227
|
+
]);
|
|
7228
|
+
DsStack.displayName = "DsStack";
|
|
7229
|
+
//#endregion
|
|
7163
7230
|
//#region src/components/ds-tag/ds-tag.tsx
|
|
7164
7231
|
/**
|
|
7165
7232
|
* Design system Tag component
|
|
7166
7233
|
*/
|
|
7167
7234
|
const DsTag = (t0) => {
|
|
7168
|
-
const $ = c(
|
|
7235
|
+
const $ = c(64);
|
|
7169
7236
|
let className;
|
|
7170
7237
|
let label;
|
|
7171
7238
|
let onClick;
|
|
@@ -7179,8 +7246,9 @@ const DsTag = (t0) => {
|
|
|
7179
7246
|
let t4;
|
|
7180
7247
|
let t5;
|
|
7181
7248
|
let t6;
|
|
7249
|
+
let value;
|
|
7182
7250
|
if ($[0] !== t0) {
|
|
7183
|
-
({ref, label, className, style: t1, size: t2, selected: t3, variant: t4, disabled: t5, locale: t6, onClick, onDelete, slots, ...rest} = t0);
|
|
7251
|
+
({ref, label, value, className, style: t1, size: t2, selected: t3, variant: t4, disabled: t5, locale: t6, onClick, onDelete, slots, ...rest} = t0);
|
|
7184
7252
|
$[0] = t0;
|
|
7185
7253
|
$[1] = className;
|
|
7186
7254
|
$[2] = label;
|
|
@@ -7195,6 +7263,7 @@ const DsTag = (t0) => {
|
|
|
7195
7263
|
$[11] = t4;
|
|
7196
7264
|
$[12] = t5;
|
|
7197
7265
|
$[13] = t6;
|
|
7266
|
+
$[14] = value;
|
|
7198
7267
|
} else {
|
|
7199
7268
|
className = $[1];
|
|
7200
7269
|
label = $[2];
|
|
@@ -7209,31 +7278,32 @@ const DsTag = (t0) => {
|
|
|
7209
7278
|
t4 = $[11];
|
|
7210
7279
|
t5 = $[12];
|
|
7211
7280
|
t6 = $[13];
|
|
7281
|
+
value = $[14];
|
|
7212
7282
|
}
|
|
7213
7283
|
let t7;
|
|
7214
|
-
if ($[
|
|
7284
|
+
if ($[15] !== t1) {
|
|
7215
7285
|
t7 = t1 === void 0 ? {} : t1;
|
|
7216
|
-
$[
|
|
7217
|
-
$[
|
|
7218
|
-
} else t7 = $[
|
|
7286
|
+
$[15] = t1;
|
|
7287
|
+
$[16] = t7;
|
|
7288
|
+
} else t7 = $[16];
|
|
7219
7289
|
const style = t7;
|
|
7220
7290
|
const size = t2 === void 0 ? "medium" : t2;
|
|
7221
7291
|
const selected = t3 === void 0 ? false : t3;
|
|
7222
7292
|
const variant = t4 === void 0 ? "default" : t4;
|
|
7223
7293
|
const disabled = t5 === void 0 ? false : t5;
|
|
7224
7294
|
let t8;
|
|
7225
|
-
if ($[
|
|
7295
|
+
if ($[17] !== t6) {
|
|
7226
7296
|
t8 = t6 === void 0 ? {} : t6;
|
|
7227
|
-
$[
|
|
7228
|
-
$[
|
|
7229
|
-
} else t8 = $[
|
|
7297
|
+
$[17] = t6;
|
|
7298
|
+
$[18] = t8;
|
|
7299
|
+
} else t8 = $[18];
|
|
7230
7300
|
const locale = t8;
|
|
7231
7301
|
const t9 = onClick !== void 0 && !disabled;
|
|
7232
7302
|
const t10 = selected && !disabled;
|
|
7233
7303
|
const t11 = variant === "include";
|
|
7234
7304
|
const t12 = variant === "exclude";
|
|
7235
7305
|
let t13;
|
|
7236
|
-
if ($[
|
|
7306
|
+
if ($[19] !== className || $[20] !== disabled || $[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t9) {
|
|
7237
7307
|
t13 = classNames(ds_tag_module_default.tag, {
|
|
7238
7308
|
[ds_tag_module_default.clickable]: t9,
|
|
7239
7309
|
[ds_tag_module_default.selected]: t10,
|
|
@@ -7241,27 +7311,27 @@ const DsTag = (t0) => {
|
|
|
7241
7311
|
[ds_tag_module_default.exclude]: t12,
|
|
7242
7312
|
[ds_tag_module_default.disabled]: disabled
|
|
7243
7313
|
}, className);
|
|
7244
|
-
$[
|
|
7245
|
-
$[
|
|
7246
|
-
$[
|
|
7247
|
-
$[
|
|
7248
|
-
$[
|
|
7249
|
-
$[
|
|
7250
|
-
$[
|
|
7251
|
-
} else t13 = $[
|
|
7314
|
+
$[19] = className;
|
|
7315
|
+
$[20] = disabled;
|
|
7316
|
+
$[21] = t10;
|
|
7317
|
+
$[22] = t11;
|
|
7318
|
+
$[23] = t12;
|
|
7319
|
+
$[24] = t9;
|
|
7320
|
+
$[25] = t13;
|
|
7321
|
+
} else t13 = $[25];
|
|
7252
7322
|
const tagClass = t13;
|
|
7253
7323
|
let t14;
|
|
7254
|
-
if ($[
|
|
7324
|
+
if ($[26] !== onDelete) {
|
|
7255
7325
|
t14 = (event) => {
|
|
7256
7326
|
event.stopPropagation();
|
|
7257
7327
|
onDelete?.(event);
|
|
7258
7328
|
};
|
|
7259
|
-
$[
|
|
7260
|
-
$[
|
|
7261
|
-
} else t14 = $[
|
|
7329
|
+
$[26] = onDelete;
|
|
7330
|
+
$[27] = t14;
|
|
7331
|
+
} else t14 = $[27];
|
|
7262
7332
|
const handleDeleteClick = t14;
|
|
7263
7333
|
let t15;
|
|
7264
|
-
if ($[
|
|
7334
|
+
if ($[28] !== onClick || $[29] !== onDelete) {
|
|
7265
7335
|
t15 = (event_0) => {
|
|
7266
7336
|
if (onClick && (event_0.key === "Enter" || event_0.key === " ")) {
|
|
7267
7337
|
event_0.preventDefault();
|
|
@@ -7273,13 +7343,13 @@ const DsTag = (t0) => {
|
|
|
7273
7343
|
onDelete(event_0);
|
|
7274
7344
|
}
|
|
7275
7345
|
};
|
|
7276
|
-
$[
|
|
7277
|
-
$[
|
|
7278
|
-
$[
|
|
7279
|
-
} else t15 = $[
|
|
7346
|
+
$[28] = onClick;
|
|
7347
|
+
$[29] = onDelete;
|
|
7348
|
+
$[30] = t15;
|
|
7349
|
+
} else t15 = $[30];
|
|
7280
7350
|
const handleKeyDownTag = t15;
|
|
7281
7351
|
let t16;
|
|
7282
|
-
if ($[
|
|
7352
|
+
if ($[31] !== onDelete) {
|
|
7283
7353
|
t16 = (event_1) => {
|
|
7284
7354
|
event_1.stopPropagation();
|
|
7285
7355
|
if (onDelete && (event_1.key === "Enter" || event_1.key === " ")) {
|
|
@@ -7287,21 +7357,21 @@ const DsTag = (t0) => {
|
|
|
7287
7357
|
onDelete(event_1);
|
|
7288
7358
|
}
|
|
7289
7359
|
};
|
|
7290
|
-
$[
|
|
7291
|
-
$[
|
|
7292
|
-
} else t16 = $[
|
|
7360
|
+
$[31] = onDelete;
|
|
7361
|
+
$[32] = t16;
|
|
7362
|
+
} else t16 = $[32];
|
|
7293
7363
|
const handleKeyDownDelete = t16;
|
|
7294
7364
|
let t17;
|
|
7295
|
-
if ($[
|
|
7365
|
+
if ($[33] !== onClick) {
|
|
7296
7366
|
t17 = (event_2) => {
|
|
7297
7367
|
if (onClick) {
|
|
7298
7368
|
event_2.preventDefault();
|
|
7299
7369
|
onClick(event_2);
|
|
7300
7370
|
}
|
|
7301
7371
|
};
|
|
7302
|
-
$[
|
|
7303
|
-
$[
|
|
7304
|
-
} else t17 = $[
|
|
7372
|
+
$[33] = onClick;
|
|
7373
|
+
$[34] = t17;
|
|
7374
|
+
} else t17 = $[34];
|
|
7305
7375
|
const handleClick = t17;
|
|
7306
7376
|
let iconVariant = null;
|
|
7307
7377
|
if (variant === "include") iconVariant = "check_circle";
|
|
@@ -7314,7 +7384,7 @@ const DsTag = (t0) => {
|
|
|
7314
7384
|
const t23 = typeof label === "string" ? label : void 0;
|
|
7315
7385
|
const t24 = onClick && selected && !disabled ? "true" : void 0;
|
|
7316
7386
|
let t25;
|
|
7317
|
-
if ($[
|
|
7387
|
+
if ($[35] !== iconVariant || $[36] !== slots?.icon) {
|
|
7318
7388
|
t25 = (slots?.icon || iconVariant) && /* @__PURE__ */ jsx("span", {
|
|
7319
7389
|
className: classNames(ds_tag_module_default.icon),
|
|
7320
7390
|
children: slots?.icon ?? (iconVariant && /* @__PURE__ */ jsx(DsIcon, {
|
|
@@ -7323,25 +7393,40 @@ const DsTag = (t0) => {
|
|
|
7323
7393
|
className: classNames(ds_tag_module_default.variantIcon)
|
|
7324
7394
|
}))
|
|
7325
7395
|
});
|
|
7326
|
-
$[
|
|
7327
|
-
$[
|
|
7328
|
-
$[
|
|
7329
|
-
} else t25 = $[
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7396
|
+
$[35] = iconVariant;
|
|
7397
|
+
$[36] = slots?.icon;
|
|
7398
|
+
$[37] = t25;
|
|
7399
|
+
} else t25 = $[37];
|
|
7400
|
+
let t26;
|
|
7401
|
+
if ($[38] !== label || $[39] !== size || $[40] !== value || $[41] !== variant) {
|
|
7402
|
+
t26 = variant === "key-value" ? /* @__PURE__ */ jsxs(DsStack, {
|
|
7403
|
+
direction: "row",
|
|
7404
|
+
alignItems: "center",
|
|
7405
|
+
gap: "var(--3xs)",
|
|
7406
|
+
className: ds_tag_module_default.keyValue,
|
|
7407
|
+
children: [/* @__PURE__ */ jsx(DsTypography, {
|
|
7408
|
+
variant: size === "small" ? "body-xs-md" : "body-sm-md",
|
|
7409
|
+
className: ds_tag_module_default.key,
|
|
7410
|
+
children: label
|
|
7411
|
+
}), /* @__PURE__ */ jsx(DsTypography, {
|
|
7412
|
+
variant: size === "small" ? "body-xs-reg" : "body-sm-reg",
|
|
7413
|
+
className: ds_tag_module_default.value,
|
|
7414
|
+
children: value
|
|
7415
|
+
})]
|
|
7416
|
+
}) : /* @__PURE__ */ jsx(DsTypography, {
|
|
7417
|
+
variant: size === "small" ? "body-xs-reg" : "body-sm-reg",
|
|
7335
7418
|
className: ds_tag_module_default.label,
|
|
7336
7419
|
children: label
|
|
7337
7420
|
});
|
|
7338
|
-
$[
|
|
7339
|
-
$[
|
|
7340
|
-
$[
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7421
|
+
$[38] = label;
|
|
7422
|
+
$[39] = size;
|
|
7423
|
+
$[40] = value;
|
|
7424
|
+
$[41] = variant;
|
|
7425
|
+
$[42] = t26;
|
|
7426
|
+
} else t26 = $[42];
|
|
7427
|
+
let t27;
|
|
7428
|
+
if ($[43] !== disabled || $[44] !== handleDeleteClick || $[45] !== handleKeyDownDelete || $[46] !== locale || $[47] !== onDelete) {
|
|
7429
|
+
t27 = onDelete && !disabled && /* @__PURE__ */ jsx("button", {
|
|
7345
7430
|
type: "button",
|
|
7346
7431
|
className: ds_tag_module_default.deleteButton,
|
|
7347
7432
|
onClick: handleDeleteClick,
|
|
@@ -7353,16 +7438,16 @@ const DsTag = (t0) => {
|
|
|
7353
7438
|
size: "tiny"
|
|
7354
7439
|
})
|
|
7355
7440
|
});
|
|
7356
|
-
$[
|
|
7357
|
-
$[
|
|
7358
|
-
$[
|
|
7359
|
-
$[
|
|
7360
|
-
$[
|
|
7361
|
-
$[
|
|
7362
|
-
} else
|
|
7363
|
-
let
|
|
7364
|
-
if ($[
|
|
7365
|
-
|
|
7441
|
+
$[43] = disabled;
|
|
7442
|
+
$[44] = handleDeleteClick;
|
|
7443
|
+
$[45] = handleKeyDownDelete;
|
|
7444
|
+
$[46] = locale;
|
|
7445
|
+
$[47] = onDelete;
|
|
7446
|
+
$[48] = t27;
|
|
7447
|
+
} else t27 = $[48];
|
|
7448
|
+
let t28;
|
|
7449
|
+
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) {
|
|
7450
|
+
t28 = /* @__PURE__ */ jsxs("div", {
|
|
7366
7451
|
ref: t18,
|
|
7367
7452
|
className: tagClass,
|
|
7368
7453
|
style,
|
|
@@ -7376,27 +7461,27 @@ const DsTag = (t0) => {
|
|
|
7376
7461
|
...rest,
|
|
7377
7462
|
children: [
|
|
7378
7463
|
t25,
|
|
7379
|
-
|
|
7380
|
-
|
|
7464
|
+
t26,
|
|
7465
|
+
t27
|
|
7381
7466
|
]
|
|
7382
7467
|
});
|
|
7383
|
-
$[
|
|
7384
|
-
$[
|
|
7385
|
-
$[
|
|
7386
|
-
$[
|
|
7387
|
-
$[
|
|
7388
|
-
$[
|
|
7389
|
-
$[
|
|
7390
|
-
$[
|
|
7391
|
-
$[
|
|
7392
|
-
$[
|
|
7393
|
-
$[
|
|
7394
|
-
$[
|
|
7395
|
-
$[
|
|
7396
|
-
$[
|
|
7397
|
-
$[
|
|
7398
|
-
} else
|
|
7399
|
-
return
|
|
7468
|
+
$[49] = disabled;
|
|
7469
|
+
$[50] = rest;
|
|
7470
|
+
$[51] = style;
|
|
7471
|
+
$[52] = t18;
|
|
7472
|
+
$[53] = t19;
|
|
7473
|
+
$[54] = t20;
|
|
7474
|
+
$[55] = t21;
|
|
7475
|
+
$[56] = t22;
|
|
7476
|
+
$[57] = t23;
|
|
7477
|
+
$[58] = t24;
|
|
7478
|
+
$[59] = t25;
|
|
7479
|
+
$[60] = t26;
|
|
7480
|
+
$[61] = t27;
|
|
7481
|
+
$[62] = tagClass;
|
|
7482
|
+
$[63] = t28;
|
|
7483
|
+
} else t28 = $[63];
|
|
7484
|
+
return t28;
|
|
7400
7485
|
};
|
|
7401
7486
|
//#endregion
|
|
7402
7487
|
//#region src/components/ds-tag/ds-tag.types.ts
|
|
@@ -7404,7 +7489,8 @@ const tagSizes = ["medium", "small"];
|
|
|
7404
7489
|
const tagVariants = [
|
|
7405
7490
|
"default",
|
|
7406
7491
|
"include",
|
|
7407
|
-
"exclude"
|
|
7492
|
+
"exclude",
|
|
7493
|
+
"key-value"
|
|
7408
7494
|
];
|
|
7409
7495
|
//#endregion
|
|
7410
7496
|
//#region src/utils/merge-refs.ts
|
|
@@ -8322,8 +8408,8 @@ const useArkDialogBodyLockCleanup = (open, enabled) => {
|
|
|
8322
8408
|
//#endregion
|
|
8323
8409
|
//#region src/components/ds-drawer/ds-drawer.tsx
|
|
8324
8410
|
const DsDrawer = (t0) => {
|
|
8325
|
-
const $ = c(
|
|
8326
|
-
const { open, onOpenChange, columns: t1, position: t2, backdrop: t3, closeOnEscape: t4, closeOnInteractOutside: t5, portal: t6, style, className, children } = t0;
|
|
8411
|
+
const $ = c(28);
|
|
8412
|
+
const { open, onOpenChange, onOpenAutoFocus, columns: t1, position: t2, backdrop: t3, closeOnEscape: t4, closeOnInteractOutside: t5, portal: t6, style, className, children } = t0;
|
|
8327
8413
|
const columns = t1 === void 0 ? 4 : t1;
|
|
8328
8414
|
const position = t2 === void 0 ? "end" : t2;
|
|
8329
8415
|
const backdrop = t3 === void 0 ? false : t3;
|
|
@@ -8341,75 +8427,88 @@ const DsDrawer = (t0) => {
|
|
|
8341
8427
|
$[1] = t7;
|
|
8342
8428
|
} else t7 = $[1];
|
|
8343
8429
|
const handleOpenChange = t7;
|
|
8344
|
-
const Wrapper = portal ? Portal : Fragment$1;
|
|
8345
8430
|
let t8;
|
|
8346
|
-
if ($[2] !==
|
|
8347
|
-
t8 =
|
|
8348
|
-
|
|
8431
|
+
if ($[2] !== onOpenAutoFocus) {
|
|
8432
|
+
t8 = onOpenAutoFocus ? () => {
|
|
8433
|
+
const event = new Event("openAutoFocus", { cancelable: true });
|
|
8434
|
+
onOpenAutoFocus(event);
|
|
8435
|
+
return event.defaultPrevented ? document.activeElement : void 0;
|
|
8436
|
+
} : void 0;
|
|
8437
|
+
$[2] = onOpenAutoFocus;
|
|
8349
8438
|
$[3] = t8;
|
|
8350
8439
|
} else t8 = $[3];
|
|
8351
|
-
const
|
|
8352
|
-
const
|
|
8353
|
-
let
|
|
8354
|
-
if ($[4] !==
|
|
8355
|
-
|
|
8356
|
-
$[4] =
|
|
8357
|
-
$[5] =
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8440
|
+
const initialFocusEl = t8;
|
|
8441
|
+
const Wrapper = portal ? Portal : Fragment$1;
|
|
8442
|
+
let t9;
|
|
8443
|
+
if ($[4] !== backdrop) {
|
|
8444
|
+
t9 = backdrop && /* @__PURE__ */ jsx(Dialog.Backdrop, { className: ds_drawer_module_default.backdrop });
|
|
8445
|
+
$[4] = backdrop;
|
|
8446
|
+
$[5] = t9;
|
|
8447
|
+
} else t9 = $[5];
|
|
8448
|
+
const t10 = ds_drawer_module_default[`position-${position}`];
|
|
8449
|
+
const t11 = ds_drawer_module_default[`cols-${resolvedColumns}`];
|
|
8361
8450
|
let t12;
|
|
8362
|
-
if ($[8] !==
|
|
8363
|
-
t12 =
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
$[8] = children;
|
|
8451
|
+
if ($[6] !== className || $[7] !== t10 || $[8] !== t11) {
|
|
8452
|
+
t12 = classNames(ds_drawer_module_default.drawer, t10, className, t11);
|
|
8453
|
+
$[6] = className;
|
|
8454
|
+
$[7] = t10;
|
|
8455
|
+
$[8] = t11;
|
|
8368
8456
|
$[9] = t12;
|
|
8369
8457
|
} else t12 = $[9];
|
|
8370
8458
|
let t13;
|
|
8371
|
-
if ($[10] !==
|
|
8372
|
-
t13 = /* @__PURE__ */ jsx(
|
|
8459
|
+
if ($[10] !== children) {
|
|
8460
|
+
t13 = /* @__PURE__ */ jsx("div", {
|
|
8461
|
+
className: ds_drawer_module_default.content,
|
|
8462
|
+
children
|
|
8463
|
+
});
|
|
8464
|
+
$[10] = children;
|
|
8465
|
+
$[11] = t13;
|
|
8466
|
+
} else t13 = $[11];
|
|
8467
|
+
let t14;
|
|
8468
|
+
if ($[12] !== style || $[13] !== t12 || $[14] !== t13) {
|
|
8469
|
+
t14 = /* @__PURE__ */ jsx(Dialog.Positioner, {
|
|
8373
8470
|
className: ds_drawer_module_default.positioner,
|
|
8374
8471
|
children: /* @__PURE__ */ jsx(Dialog.Content, {
|
|
8375
8472
|
style,
|
|
8376
|
-
className:
|
|
8377
|
-
children:
|
|
8473
|
+
className: t12,
|
|
8474
|
+
children: t13
|
|
8378
8475
|
})
|
|
8379
8476
|
});
|
|
8380
|
-
$[
|
|
8381
|
-
$[
|
|
8382
|
-
$[
|
|
8383
|
-
$[
|
|
8384
|
-
} else
|
|
8385
|
-
let t14;
|
|
8386
|
-
if ($[14] !== Wrapper || $[15] !== t13 || $[16] !== t8) {
|
|
8387
|
-
t14 = /* @__PURE__ */ jsxs(Wrapper, { children: [t8, t13] });
|
|
8388
|
-
$[14] = Wrapper;
|
|
8389
|
-
$[15] = t13;
|
|
8390
|
-
$[16] = t8;
|
|
8391
|
-
$[17] = t14;
|
|
8392
|
-
} else t14 = $[17];
|
|
8477
|
+
$[12] = style;
|
|
8478
|
+
$[13] = t12;
|
|
8479
|
+
$[14] = t13;
|
|
8480
|
+
$[15] = t14;
|
|
8481
|
+
} else t14 = $[15];
|
|
8393
8482
|
let t15;
|
|
8394
|
-
if ($[
|
|
8395
|
-
t15 = /* @__PURE__ */
|
|
8483
|
+
if ($[16] !== Wrapper || $[17] !== t14 || $[18] !== t9) {
|
|
8484
|
+
t15 = /* @__PURE__ */ jsxs(Wrapper, { children: [t9, t14] });
|
|
8485
|
+
$[16] = Wrapper;
|
|
8486
|
+
$[17] = t14;
|
|
8487
|
+
$[18] = t9;
|
|
8488
|
+
$[19] = t15;
|
|
8489
|
+
} else t15 = $[19];
|
|
8490
|
+
let t16;
|
|
8491
|
+
if ($[20] !== backdrop || $[21] !== closeOnEscape || $[22] !== closeOnInteractOutside || $[23] !== handleOpenChange || $[24] !== initialFocusEl || $[25] !== open || $[26] !== t15) {
|
|
8492
|
+
t16 = /* @__PURE__ */ jsx(Dialog.Root, {
|
|
8396
8493
|
open,
|
|
8397
8494
|
onOpenChange: handleOpenChange,
|
|
8398
8495
|
modal: backdrop,
|
|
8399
8496
|
closeOnEscape,
|
|
8400
8497
|
closeOnInteractOutside,
|
|
8401
8498
|
preventScroll: backdrop,
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
$[
|
|
8406
|
-
$[
|
|
8407
|
-
$[
|
|
8408
|
-
$[
|
|
8409
|
-
$[
|
|
8410
|
-
$[
|
|
8411
|
-
|
|
8412
|
-
|
|
8499
|
+
initialFocusEl,
|
|
8500
|
+
children: t15
|
|
8501
|
+
});
|
|
8502
|
+
$[20] = backdrop;
|
|
8503
|
+
$[21] = closeOnEscape;
|
|
8504
|
+
$[22] = closeOnInteractOutside;
|
|
8505
|
+
$[23] = handleOpenChange;
|
|
8506
|
+
$[24] = initialFocusEl;
|
|
8507
|
+
$[25] = open;
|
|
8508
|
+
$[26] = t15;
|
|
8509
|
+
$[27] = t16;
|
|
8510
|
+
} else t16 = $[27];
|
|
8511
|
+
return t16;
|
|
8413
8512
|
};
|
|
8414
8513
|
const Header$2 = (t0) => {
|
|
8415
8514
|
const $ = c(6);
|
|
@@ -8803,87 +8902,86 @@ const DsTagFilter = (t0) => {
|
|
|
8803
8902
|
if (items.length === 0) return null;
|
|
8804
8903
|
let t9;
|
|
8805
8904
|
if ($[9] !== onItemDelete || $[10] !== onItemSelect) {
|
|
8806
|
-
t9 = (item) => {
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
onDelete: onItemDelete ? () => onItemDelete(item) : void 0
|
|
8814
|
-
});
|
|
8815
|
-
};
|
|
8905
|
+
t9 = (item) => ({
|
|
8906
|
+
...item.slotProps?.tag,
|
|
8907
|
+
label: item.label,
|
|
8908
|
+
selected: item.selected,
|
|
8909
|
+
onClick: onItemSelect ? () => onItemSelect(item) : void 0,
|
|
8910
|
+
onDelete: onItemDelete ? () => onItemDelete(item) : void 0
|
|
8911
|
+
});
|
|
8816
8912
|
$[9] = onItemDelete;
|
|
8817
8913
|
$[10] = onItemSelect;
|
|
8818
8914
|
$[11] = t9;
|
|
8819
8915
|
} else t9 = $[11];
|
|
8820
|
-
const
|
|
8916
|
+
const buildTagProps = t9;
|
|
8821
8917
|
let t10;
|
|
8822
|
-
if ($[12] !==
|
|
8823
|
-
t10 = () => {
|
|
8918
|
+
if ($[12] !== buildTagProps) {
|
|
8919
|
+
t10 = (item_0) => /* @__PURE__ */ jsx(DsTag, { ...buildTagProps(item_0) }, item_0.id);
|
|
8920
|
+
$[12] = buildTagProps;
|
|
8921
|
+
$[13] = t10;
|
|
8922
|
+
} else t10 = $[13];
|
|
8923
|
+
const renderTag = t10;
|
|
8924
|
+
let t11;
|
|
8925
|
+
if ($[14] !== expanded || $[15] !== onExpand) {
|
|
8926
|
+
t11 = () => {
|
|
8824
8927
|
const newExpanded = !expanded;
|
|
8825
8928
|
setExpanded(newExpanded);
|
|
8826
8929
|
onExpand?.(newExpanded);
|
|
8827
8930
|
};
|
|
8828
|
-
$[
|
|
8829
|
-
$[
|
|
8830
|
-
$[
|
|
8831
|
-
} else
|
|
8832
|
-
const handleExpandToggle =
|
|
8833
|
-
let t11;
|
|
8834
|
-
if ($[15] !== items || $[16] !== onItemDelete || $[17] !== onItemSelect) {
|
|
8835
|
-
let t12;
|
|
8836
|
-
if ($[19] !== onItemDelete || $[20] !== onItemSelect) {
|
|
8837
|
-
t12 = (item_0) => /* @__PURE__ */ jsx(DsTag, {
|
|
8838
|
-
"data-measure-tag": "",
|
|
8839
|
-
label: item_0.label,
|
|
8840
|
-
selected: item_0.selected,
|
|
8841
|
-
onClick: onItemSelect ? () => onItemSelect(item_0) : void 0,
|
|
8842
|
-
onDelete: onItemDelete ? () => onItemDelete(item_0) : void 0
|
|
8843
|
-
}, item_0.id);
|
|
8844
|
-
$[19] = onItemDelete;
|
|
8845
|
-
$[20] = onItemSelect;
|
|
8846
|
-
$[21] = t12;
|
|
8847
|
-
} else t12 = $[21];
|
|
8848
|
-
t11 = items.map(t12);
|
|
8849
|
-
$[15] = items;
|
|
8850
|
-
$[16] = onItemDelete;
|
|
8851
|
-
$[17] = onItemSelect;
|
|
8852
|
-
$[18] = t11;
|
|
8853
|
-
} else t11 = $[18];
|
|
8931
|
+
$[14] = expanded;
|
|
8932
|
+
$[15] = onExpand;
|
|
8933
|
+
$[16] = t11;
|
|
8934
|
+
} else t11 = $[16];
|
|
8935
|
+
const handleExpandToggle = t11;
|
|
8854
8936
|
let t12;
|
|
8855
|
-
if ($[
|
|
8856
|
-
|
|
8937
|
+
if ($[17] !== buildTagProps || $[18] !== items) {
|
|
8938
|
+
let t13;
|
|
8939
|
+
if ($[20] !== buildTagProps) {
|
|
8940
|
+
t13 = (item_1) => /* @__PURE__ */ jsx(DsTag, {
|
|
8941
|
+
"data-measure-tag": "",
|
|
8942
|
+
...buildTagProps(item_1)
|
|
8943
|
+
}, item_1.id);
|
|
8944
|
+
$[20] = buildTagProps;
|
|
8945
|
+
$[21] = t13;
|
|
8946
|
+
} else t13 = $[21];
|
|
8947
|
+
t12 = items.map(t13);
|
|
8948
|
+
$[17] = buildTagProps;
|
|
8949
|
+
$[18] = items;
|
|
8950
|
+
$[19] = t12;
|
|
8951
|
+
} else t12 = $[19];
|
|
8952
|
+
let t13;
|
|
8953
|
+
if ($[22] !== t12) {
|
|
8954
|
+
t13 = /* @__PURE__ */ jsx("div", {
|
|
8857
8955
|
ref: measurementRef,
|
|
8858
8956
|
className: ds_tag_filter_module_default.measurementContainer,
|
|
8859
8957
|
"aria-hidden": "true",
|
|
8860
|
-
children:
|
|
8958
|
+
children: t12
|
|
8861
8959
|
});
|
|
8862
|
-
$[22] =
|
|
8863
|
-
$[23] =
|
|
8864
|
-
} else
|
|
8865
|
-
const measurementContainer =
|
|
8866
|
-
const
|
|
8867
|
-
let t14;
|
|
8868
|
-
if ($[24] !== className || $[25] !== t13) {
|
|
8869
|
-
t14 = classNames(ds_tag_filter_module_default.container, t13, className);
|
|
8870
|
-
$[24] = className;
|
|
8871
|
-
$[25] = t13;
|
|
8872
|
-
$[26] = t14;
|
|
8873
|
-
} else t14 = $[26];
|
|
8960
|
+
$[22] = t12;
|
|
8961
|
+
$[23] = t13;
|
|
8962
|
+
} else t13 = $[23];
|
|
8963
|
+
const measurementContainer = t13;
|
|
8964
|
+
const t14 = expanded && ds_tag_filter_module_default.expanded;
|
|
8874
8965
|
let t15;
|
|
8966
|
+
if ($[24] !== className || $[25] !== t14) {
|
|
8967
|
+
t15 = classNames(ds_tag_filter_module_default.container, t14, className);
|
|
8968
|
+
$[24] = className;
|
|
8969
|
+
$[25] = t14;
|
|
8970
|
+
$[26] = t15;
|
|
8971
|
+
} else t15 = $[26];
|
|
8972
|
+
let t16;
|
|
8875
8973
|
if ($[27] !== label) {
|
|
8876
|
-
|
|
8974
|
+
t16 = label && /* @__PURE__ */ jsx(DsTypography, {
|
|
8877
8975
|
variant: "body-sm-reg",
|
|
8878
8976
|
className: ds_tag_filter_module_default.label,
|
|
8879
8977
|
children: label
|
|
8880
8978
|
});
|
|
8881
8979
|
$[27] = label;
|
|
8882
|
-
$[28] =
|
|
8883
|
-
} else
|
|
8884
|
-
let
|
|
8980
|
+
$[28] = t16;
|
|
8981
|
+
} else t16 = $[28];
|
|
8982
|
+
let t17;
|
|
8885
8983
|
if ($[29] !== expanded || $[30] !== handleExpandToggle || $[31] !== hasOverflow || $[32] !== hiddenCount || $[33] !== showLess || $[34] !== showMore) {
|
|
8886
|
-
|
|
8984
|
+
t17 = hasOverflow && /* @__PURE__ */ jsxs(DsButton, {
|
|
8887
8985
|
design: "v1.2",
|
|
8888
8986
|
buttonType: "tertiary",
|
|
8889
8987
|
variant: "ghost",
|
|
@@ -8899,11 +8997,11 @@ const DsTagFilter = (t0) => {
|
|
|
8899
8997
|
$[32] = hiddenCount;
|
|
8900
8998
|
$[33] = showLess;
|
|
8901
8999
|
$[34] = showMore;
|
|
8902
|
-
$[35] =
|
|
8903
|
-
} else
|
|
8904
|
-
let
|
|
9000
|
+
$[35] = t17;
|
|
9001
|
+
} else t17 = $[35];
|
|
9002
|
+
let t18;
|
|
8905
9003
|
if ($[36] !== clearButton || $[37] !== onClearAll) {
|
|
8906
|
-
|
|
9004
|
+
t18 = onClearAll && /* @__PURE__ */ jsxs(DsButton, {
|
|
8907
9005
|
design: "v1.2",
|
|
8908
9006
|
buttonType: "tertiary",
|
|
8909
9007
|
variant: "ghost",
|
|
@@ -8915,78 +9013,78 @@ const DsTagFilter = (t0) => {
|
|
|
8915
9013
|
});
|
|
8916
9014
|
$[36] = clearButton;
|
|
8917
9015
|
$[37] = onClearAll;
|
|
8918
|
-
$[38] =
|
|
8919
|
-
} else
|
|
8920
|
-
let t18;
|
|
8921
|
-
if ($[39] !== t16 || $[40] !== t17) {
|
|
8922
|
-
t18 = /* @__PURE__ */ jsxs("div", {
|
|
8923
|
-
className: ds_tag_filter_module_default.headerActions,
|
|
8924
|
-
children: [t16, t17]
|
|
8925
|
-
});
|
|
8926
|
-
$[39] = t16;
|
|
8927
|
-
$[40] = t17;
|
|
8928
|
-
$[41] = t18;
|
|
8929
|
-
} else t18 = $[41];
|
|
9016
|
+
$[38] = t18;
|
|
9017
|
+
} else t18 = $[38];
|
|
8930
9018
|
let t19;
|
|
8931
|
-
if ($[
|
|
9019
|
+
if ($[39] !== t17 || $[40] !== t18) {
|
|
8932
9020
|
t19 = /* @__PURE__ */ jsxs("div", {
|
|
8933
|
-
className: ds_tag_filter_module_default.
|
|
8934
|
-
children: [
|
|
9021
|
+
className: ds_tag_filter_module_default.headerActions,
|
|
9022
|
+
children: [t17, t18]
|
|
8935
9023
|
});
|
|
8936
|
-
$[
|
|
8937
|
-
$[
|
|
8938
|
-
$[
|
|
8939
|
-
} else t19 = $[
|
|
9024
|
+
$[39] = t17;
|
|
9025
|
+
$[40] = t18;
|
|
9026
|
+
$[41] = t19;
|
|
9027
|
+
} else t19 = $[41];
|
|
8940
9028
|
let t20;
|
|
9029
|
+
if ($[42] !== t16 || $[43] !== t19) {
|
|
9030
|
+
t20 = /* @__PURE__ */ jsxs("div", {
|
|
9031
|
+
className: ds_tag_filter_module_default.header,
|
|
9032
|
+
children: [t16, t19]
|
|
9033
|
+
});
|
|
9034
|
+
$[42] = t16;
|
|
9035
|
+
$[43] = t19;
|
|
9036
|
+
$[44] = t20;
|
|
9037
|
+
} else t20 = $[44];
|
|
9038
|
+
let t21;
|
|
8941
9039
|
if ($[45] !== renderTag || $[46] !== visibleTags) {
|
|
8942
|
-
let
|
|
9040
|
+
let t22;
|
|
8943
9041
|
if ($[48] !== renderTag) {
|
|
8944
|
-
|
|
9042
|
+
t22 = (item_2) => renderTag(item_2);
|
|
8945
9043
|
$[48] = renderTag;
|
|
8946
|
-
$[49] =
|
|
8947
|
-
} else
|
|
8948
|
-
|
|
9044
|
+
$[49] = t22;
|
|
9045
|
+
} else t22 = $[49];
|
|
9046
|
+
t21 = visibleTags.map(t22);
|
|
8949
9047
|
$[45] = renderTag;
|
|
8950
9048
|
$[46] = visibleTags;
|
|
8951
|
-
$[47] =
|
|
8952
|
-
} else
|
|
8953
|
-
let
|
|
8954
|
-
if ($[50] !==
|
|
8955
|
-
|
|
9049
|
+
$[47] = t21;
|
|
9050
|
+
} else t21 = $[47];
|
|
9051
|
+
let t22;
|
|
9052
|
+
if ($[50] !== t21) {
|
|
9053
|
+
t22 = /* @__PURE__ */ jsx("div", {
|
|
8956
9054
|
className: ds_tag_filter_module_default.tagsArea,
|
|
8957
|
-
children:
|
|
9055
|
+
children: t21
|
|
8958
9056
|
});
|
|
8959
|
-
$[50] =
|
|
8960
|
-
$[51] =
|
|
8961
|
-
} else
|
|
8962
|
-
let
|
|
8963
|
-
if ($[52] !== style || $[53] !==
|
|
8964
|
-
|
|
9057
|
+
$[50] = t21;
|
|
9058
|
+
$[51] = t22;
|
|
9059
|
+
} else t22 = $[51];
|
|
9060
|
+
let t23;
|
|
9061
|
+
if ($[52] !== style || $[53] !== t15 || $[54] !== t20 || $[55] !== t22) {
|
|
9062
|
+
t23 = /* @__PURE__ */ jsxs("div", {
|
|
8965
9063
|
ref: containerRef,
|
|
8966
|
-
className:
|
|
9064
|
+
className: t15,
|
|
8967
9065
|
style,
|
|
8968
|
-
children: [
|
|
9066
|
+
children: [t20, t22]
|
|
8969
9067
|
});
|
|
8970
9068
|
$[52] = style;
|
|
8971
|
-
$[53] =
|
|
8972
|
-
$[54] =
|
|
8973
|
-
$[55] =
|
|
8974
|
-
$[56] =
|
|
8975
|
-
} else
|
|
8976
|
-
let
|
|
9069
|
+
$[53] = t15;
|
|
9070
|
+
$[54] = t20;
|
|
9071
|
+
$[55] = t22;
|
|
9072
|
+
$[56] = t23;
|
|
9073
|
+
} else t23 = $[56];
|
|
9074
|
+
let t24;
|
|
8977
9075
|
if ($[57] !== measurementContainer) {
|
|
8978
|
-
|
|
9076
|
+
t24 = createPortal(measurementContainer, document.body);
|
|
8979
9077
|
$[57] = measurementContainer;
|
|
8980
|
-
$[58] =
|
|
8981
|
-
} else
|
|
8982
|
-
let
|
|
8983
|
-
if ($[59] !==
|
|
8984
|
-
|
|
8985
|
-
$[59] =
|
|
8986
|
-
$[60] =
|
|
8987
|
-
$[61] =
|
|
8988
|
-
} else
|
|
8989
|
-
return
|
|
9078
|
+
$[58] = t24;
|
|
9079
|
+
} else t24 = $[58];
|
|
9080
|
+
let t25;
|
|
9081
|
+
if ($[59] !== t23 || $[60] !== t24) {
|
|
9082
|
+
t25 = /* @__PURE__ */ jsxs(Fragment, { children: [t23, t24] });
|
|
9083
|
+
$[59] = t23;
|
|
9084
|
+
$[60] = t24;
|
|
9085
|
+
$[61] = t25;
|
|
9086
|
+
} else t25 = $[61];
|
|
9087
|
+
return t25;
|
|
8990
9088
|
};
|
|
8991
9089
|
//#endregion
|
|
8992
9090
|
//#region src/components/ds-comments-drawer/comments-filters.ts
|
|
@@ -14674,6 +14772,7 @@ function useFileUpload({ adapter, autoUpload = true, maxConcurrent = 3, maxFiles
|
|
|
14674
14772
|
updateFileProgress(fileId_2, 100);
|
|
14675
14773
|
onFileUploadComplete?.(fileId_2, result);
|
|
14676
14774
|
} catch (error_0) {
|
|
14775
|
+
if (abortController.signal.aborted) return;
|
|
14677
14776
|
const errorMessage = error_0 instanceof Error ? error_0.message : "Upload failed";
|
|
14678
14777
|
let status_0 = "interrupted";
|
|
14679
14778
|
if (error_0 instanceof FileUploadError) status_0 = error_0.isRetryable ? "interrupted" : "error";
|
|
@@ -15457,61 +15556,334 @@ const DsPanel = withResponsiveProps(DsPanelBase, ["width"]);
|
|
|
15457
15556
|
//#endregion
|
|
15458
15557
|
//#region src/components/ds-popover/ds-popover.module.scss
|
|
15459
15558
|
var ds_popover_module_default = {
|
|
15460
|
-
"
|
|
15461
|
-
"
|
|
15559
|
+
"content": "Xt6oSq_content",
|
|
15560
|
+
"ds-popover-in": "Xt6oSq_ds-popover-in",
|
|
15561
|
+
"footer": "Xt6oSq_footer",
|
|
15562
|
+
"header": "Xt6oSq_header",
|
|
15563
|
+
"headerIcon": "Xt6oSq_headerIcon",
|
|
15564
|
+
"panel": "Xt6oSq_panel",
|
|
15565
|
+
"title": "Xt6oSq_title"
|
|
15462
15566
|
};
|
|
15463
15567
|
//#endregion
|
|
15464
15568
|
//#region src/components/ds-popover/ds-popover.tsx
|
|
15465
|
-
const
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
const
|
|
15469
|
-
const side
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
|
|
15569
|
+
const DEFAULT_PANEL_WIDTH = 400;
|
|
15570
|
+
const toPlacement = (side, align) => align === "center" ? side : `${side}-${align}`;
|
|
15571
|
+
const DsPopoverRoot = (t0) => {
|
|
15572
|
+
const $ = c(15);
|
|
15573
|
+
const { open, defaultOpen, side: t1, align: t2, gutter: t3, modal: t4, children, onOpenChange } = t0;
|
|
15574
|
+
const side = t1 === void 0 ? "bottom" : t1;
|
|
15575
|
+
const align = t2 === void 0 ? "center" : t2;
|
|
15576
|
+
const gutter = t3 === void 0 ? 8 : t3;
|
|
15577
|
+
const modal = t4 === void 0 ? false : t4;
|
|
15578
|
+
let t5;
|
|
15579
|
+
if ($[0] !== align || $[1] !== side) {
|
|
15580
|
+
t5 = toPlacement(side, align);
|
|
15581
|
+
$[0] = align;
|
|
15582
|
+
$[1] = side;
|
|
15583
|
+
$[2] = t5;
|
|
15584
|
+
} else t5 = $[2];
|
|
15585
|
+
let t6;
|
|
15586
|
+
if ($[3] !== gutter || $[4] !== t5) {
|
|
15587
|
+
t6 = {
|
|
15588
|
+
placement: t5,
|
|
15589
|
+
gutter
|
|
15590
|
+
};
|
|
15591
|
+
$[3] = gutter;
|
|
15592
|
+
$[4] = t5;
|
|
15593
|
+
$[5] = t6;
|
|
15594
|
+
} else t6 = $[5];
|
|
15595
|
+
let t7;
|
|
15596
|
+
if ($[6] !== onOpenChange) {
|
|
15597
|
+
t7 = (details) => onOpenChange?.(details.open);
|
|
15598
|
+
$[6] = onOpenChange;
|
|
15599
|
+
$[7] = t7;
|
|
15600
|
+
} else t7 = $[7];
|
|
15601
|
+
let t8;
|
|
15602
|
+
if ($[8] !== children || $[9] !== defaultOpen || $[10] !== modal || $[11] !== open || $[12] !== t6 || $[13] !== t7) {
|
|
15603
|
+
t8 = /* @__PURE__ */ jsx(Popover.Root, {
|
|
15604
|
+
open,
|
|
15605
|
+
defaultOpen,
|
|
15606
|
+
modal,
|
|
15607
|
+
positioning: t6,
|
|
15608
|
+
onOpenChange: t7,
|
|
15609
|
+
children
|
|
15610
|
+
});
|
|
15611
|
+
$[8] = children;
|
|
15612
|
+
$[9] = defaultOpen;
|
|
15613
|
+
$[10] = modal;
|
|
15614
|
+
$[11] = open;
|
|
15615
|
+
$[12] = t6;
|
|
15616
|
+
$[13] = t7;
|
|
15617
|
+
$[14] = t8;
|
|
15618
|
+
} else t8 = $[14];
|
|
15619
|
+
return t8;
|
|
15620
|
+
};
|
|
15621
|
+
const DsPopoverTrigger = (t0) => {
|
|
15622
|
+
const $ = c(3);
|
|
15623
|
+
const { children, className } = t0;
|
|
15624
|
+
let t1;
|
|
15625
|
+
if ($[0] !== children || $[1] !== className) {
|
|
15626
|
+
t1 = /* @__PURE__ */ jsx(Popover.Trigger, {
|
|
15627
|
+
asChild: true,
|
|
15628
|
+
className,
|
|
15629
|
+
children
|
|
15630
|
+
});
|
|
15631
|
+
$[0] = children;
|
|
15632
|
+
$[1] = className;
|
|
15633
|
+
$[2] = t1;
|
|
15634
|
+
} else t1 = $[2];
|
|
15635
|
+
return t1;
|
|
15636
|
+
};
|
|
15637
|
+
const DsPopoverPanel = (t0) => {
|
|
15638
|
+
const $ = c(11);
|
|
15639
|
+
const { width: t1, className, style, children, ref, "aria-label": ariaLabel } = t0;
|
|
15640
|
+
const width = t1 === void 0 ? DEFAULT_PANEL_WIDTH : t1;
|
|
15641
|
+
let t2;
|
|
15642
|
+
if ($[0] !== className) {
|
|
15643
|
+
t2 = classNames(ds_popover_module_default.panel, className);
|
|
15644
|
+
$[0] = className;
|
|
15645
|
+
$[1] = t2;
|
|
15646
|
+
} else t2 = $[1];
|
|
15647
|
+
let t3;
|
|
15648
|
+
if ($[2] !== style || $[3] !== width) {
|
|
15649
|
+
t3 = {
|
|
15650
|
+
...style,
|
|
15651
|
+
width
|
|
15652
|
+
};
|
|
15653
|
+
$[2] = style;
|
|
15654
|
+
$[3] = width;
|
|
15655
|
+
$[4] = t3;
|
|
15656
|
+
} else t3 = $[4];
|
|
15657
|
+
let t4;
|
|
15658
|
+
if ($[5] !== ariaLabel || $[6] !== children || $[7] !== ref || $[8] !== t2 || $[9] !== t3) {
|
|
15659
|
+
t4 = /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Popover.Positioner, { children: /* @__PURE__ */ jsx(Popover.Content, {
|
|
15660
|
+
ref,
|
|
15661
|
+
"aria-label": ariaLabel,
|
|
15662
|
+
className: t2,
|
|
15663
|
+
style: t3,
|
|
15664
|
+
children
|
|
15665
|
+
}) }) });
|
|
15666
|
+
$[5] = ariaLabel;
|
|
15667
|
+
$[6] = children;
|
|
15668
|
+
$[7] = ref;
|
|
15669
|
+
$[8] = t2;
|
|
15670
|
+
$[9] = t3;
|
|
15671
|
+
$[10] = t4;
|
|
15672
|
+
} else t4 = $[10];
|
|
15673
|
+
return t4;
|
|
15674
|
+
};
|
|
15675
|
+
const DsPopoverHeader = (t0) => {
|
|
15676
|
+
const $ = c(11);
|
|
15677
|
+
const { icon, className, style, children } = t0;
|
|
15678
|
+
let t1;
|
|
15679
|
+
if ($[0] !== className) {
|
|
15680
|
+
t1 = classNames(ds_popover_module_default.header, className);
|
|
15681
|
+
$[0] = className;
|
|
15682
|
+
$[1] = t1;
|
|
15683
|
+
} else t1 = $[1];
|
|
15684
|
+
let t2;
|
|
15685
|
+
if ($[2] !== icon) {
|
|
15686
|
+
t2 = icon && /* @__PURE__ */ jsx("span", {
|
|
15687
|
+
className: ds_popover_module_default.headerIcon,
|
|
15688
|
+
children: icon
|
|
15689
|
+
});
|
|
15690
|
+
$[2] = icon;
|
|
15691
|
+
$[3] = t2;
|
|
15692
|
+
} else t2 = $[3];
|
|
15693
|
+
let t3;
|
|
15694
|
+
if ($[4] !== children) {
|
|
15695
|
+
t3 = /* @__PURE__ */ jsx(Popover.Title, {
|
|
15696
|
+
className: ds_popover_module_default.title,
|
|
15697
|
+
asChild: true,
|
|
15698
|
+
children: /* @__PURE__ */ jsx(DsTypography, {
|
|
15699
|
+
variant: "heading3",
|
|
15700
|
+
color: "main",
|
|
15701
|
+
children
|
|
15702
|
+
})
|
|
15703
|
+
});
|
|
15704
|
+
$[4] = children;
|
|
15705
|
+
$[5] = t3;
|
|
15706
|
+
} else t3 = $[5];
|
|
15707
|
+
let t4;
|
|
15708
|
+
if ($[6] !== style || $[7] !== t1 || $[8] !== t2 || $[9] !== t3) {
|
|
15709
|
+
t4 = /* @__PURE__ */ jsxs("div", {
|
|
15710
|
+
className: t1,
|
|
15711
|
+
style,
|
|
15712
|
+
children: [t2, t3]
|
|
15713
|
+
});
|
|
15714
|
+
$[6] = style;
|
|
15715
|
+
$[7] = t1;
|
|
15716
|
+
$[8] = t2;
|
|
15717
|
+
$[9] = t3;
|
|
15718
|
+
$[10] = t4;
|
|
15719
|
+
} else t4 = $[10];
|
|
15720
|
+
return t4;
|
|
15721
|
+
};
|
|
15722
|
+
const DsPopoverContent = (t0) => {
|
|
15723
|
+
const $ = c(6);
|
|
15724
|
+
const { className, style, children } = t0;
|
|
15725
|
+
let t1;
|
|
15726
|
+
if ($[0] !== className) {
|
|
15727
|
+
t1 = classNames(ds_popover_module_default.content, className);
|
|
15728
|
+
$[0] = className;
|
|
15729
|
+
$[1] = t1;
|
|
15730
|
+
} else t1 = $[1];
|
|
15731
|
+
let t2;
|
|
15732
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
15733
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
15734
|
+
className: t1,
|
|
15735
|
+
style,
|
|
15736
|
+
children
|
|
15737
|
+
});
|
|
15738
|
+
$[2] = children;
|
|
15739
|
+
$[3] = style;
|
|
15740
|
+
$[4] = t1;
|
|
15741
|
+
$[5] = t2;
|
|
15742
|
+
} else t2 = $[5];
|
|
15743
|
+
return t2;
|
|
15744
|
+
};
|
|
15745
|
+
const DsPopoverContentItem = (t0) => {
|
|
15746
|
+
const $ = c(11);
|
|
15747
|
+
const { status, headline, className, style, children } = t0;
|
|
15748
|
+
const hasHeader = Boolean(status) || Boolean(headline);
|
|
15749
|
+
let t1;
|
|
15750
|
+
if ($[0] !== hasHeader || $[1] !== headline || $[2] !== status) {
|
|
15751
|
+
t1 = hasHeader && /* @__PURE__ */ jsxs(DsStack, {
|
|
15752
|
+
direction: "row",
|
|
15753
|
+
alignItems: "center",
|
|
15754
|
+
gap: "var(--xs)",
|
|
15755
|
+
children: [status, headline && /* @__PURE__ */ jsx(DsTypography, {
|
|
15756
|
+
variant: "body-sm-semi-bold",
|
|
15757
|
+
color: "main",
|
|
15758
|
+
children: headline
|
|
15759
|
+
})]
|
|
15760
|
+
});
|
|
15761
|
+
$[0] = hasHeader;
|
|
15762
|
+
$[1] = headline;
|
|
15763
|
+
$[2] = status;
|
|
15764
|
+
$[3] = t1;
|
|
15765
|
+
} else t1 = $[3];
|
|
15766
|
+
let t2;
|
|
15767
|
+
if ($[4] !== children) {
|
|
15768
|
+
t2 = children && /* @__PURE__ */ jsx(DsTypography, {
|
|
15769
|
+
variant: "body-sm-reg",
|
|
15770
|
+
color: "main",
|
|
15771
|
+
asChild: true,
|
|
15772
|
+
children: /* @__PURE__ */ jsx(DsStack, {
|
|
15773
|
+
direction: "row",
|
|
15774
|
+
alignItems: "center",
|
|
15775
|
+
gap: "var(--xs)",
|
|
15776
|
+
children
|
|
15777
|
+
})
|
|
15778
|
+
});
|
|
15779
|
+
$[4] = children;
|
|
15780
|
+
$[5] = t2;
|
|
15781
|
+
} else t2 = $[5];
|
|
15782
|
+
let t3;
|
|
15783
|
+
if ($[6] !== className || $[7] !== style || $[8] !== t1 || $[9] !== t2) {
|
|
15784
|
+
t3 = /* @__PURE__ */ jsxs(DsStack, {
|
|
15785
|
+
direction: "column",
|
|
15786
|
+
gap: "var(--xs)",
|
|
15787
|
+
className,
|
|
15788
|
+
style,
|
|
15789
|
+
children: [t1, t2]
|
|
15790
|
+
});
|
|
15791
|
+
$[6] = className;
|
|
15792
|
+
$[7] = style;
|
|
15793
|
+
$[8] = t1;
|
|
15794
|
+
$[9] = t2;
|
|
15795
|
+
$[10] = t3;
|
|
15796
|
+
} else t3 = $[10];
|
|
15797
|
+
return t3;
|
|
15798
|
+
};
|
|
15799
|
+
const DsPopoverFooter = (t0) => {
|
|
15800
|
+
const $ = c(6);
|
|
15801
|
+
const { className, style, children } = t0;
|
|
15802
|
+
let t1;
|
|
15803
|
+
if ($[0] !== className) {
|
|
15804
|
+
t1 = classNames(ds_popover_module_default.footer, className);
|
|
15805
|
+
$[0] = className;
|
|
15806
|
+
$[1] = t1;
|
|
15807
|
+
} else t1 = $[1];
|
|
15808
|
+
let t2;
|
|
15809
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1) {
|
|
15810
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
15811
|
+
className: t1,
|
|
15812
|
+
style,
|
|
15813
|
+
children
|
|
15814
|
+
});
|
|
15815
|
+
$[2] = children;
|
|
15816
|
+
$[3] = style;
|
|
15817
|
+
$[4] = t1;
|
|
15818
|
+
$[5] = t2;
|
|
15819
|
+
} else t2 = $[5];
|
|
15820
|
+
return t2;
|
|
15821
|
+
};
|
|
15822
|
+
/**
|
|
15823
|
+
* Legacy single-element form. Keeps the old call signature and `side` default
|
|
15824
|
+
* ('top') compiling and opening, but now renders the new fixed-width panel —
|
|
15825
|
+
* styling differs from the old Radix popover and the Radix `Popover.Close`
|
|
15826
|
+
* context is no longer wired.
|
|
15827
|
+
* @deprecated Migrate to the compound API (`DsPopover.Root` / `.Trigger` / `.Panel`).
|
|
15828
|
+
*/
|
|
15829
|
+
const DsPopoverLegacy = (t0) => {
|
|
15830
|
+
const $ = c(10);
|
|
15831
|
+
const { trigger, children, className, side: t1, align: t2 } = t0;
|
|
15832
|
+
const side = t1 === void 0 ? "top" : t1;
|
|
15833
|
+
const align = t2 === void 0 ? "center" : t2;
|
|
15834
|
+
let t3;
|
|
15835
|
+
if ($[0] !== trigger) {
|
|
15836
|
+
t3 = /* @__PURE__ */ jsx(DsPopoverTrigger, { children: trigger });
|
|
15837
|
+
$[0] = trigger;
|
|
15477
15838
|
$[1] = t3;
|
|
15478
15839
|
} else t3 = $[1];
|
|
15479
15840
|
let t4;
|
|
15480
|
-
if ($[2] !== className) {
|
|
15481
|
-
t4 =
|
|
15482
|
-
|
|
15483
|
-
|
|
15484
|
-
|
|
15841
|
+
if ($[2] !== children || $[3] !== className) {
|
|
15842
|
+
t4 = /* @__PURE__ */ jsx(DsPopoverPanel, {
|
|
15843
|
+
className,
|
|
15844
|
+
children
|
|
15845
|
+
});
|
|
15846
|
+
$[2] = children;
|
|
15847
|
+
$[3] = className;
|
|
15848
|
+
$[4] = t4;
|
|
15849
|
+
} else t4 = $[4];
|
|
15485
15850
|
let t5;
|
|
15486
|
-
if ($[
|
|
15487
|
-
t5 = /* @__PURE__ */
|
|
15488
|
-
$[4] = t5;
|
|
15489
|
-
} else t5 = $[4];
|
|
15490
|
-
let t6;
|
|
15491
|
-
if ($[5] !== align || $[6] !== children || $[7] !== side || $[8] !== t4) {
|
|
15492
|
-
t6 = /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsxs(Popover$1.Content, {
|
|
15851
|
+
if ($[5] !== align || $[6] !== side || $[7] !== t3 || $[8] !== t4) {
|
|
15852
|
+
t5 = /* @__PURE__ */ jsxs(DsPopoverRoot, {
|
|
15493
15853
|
side,
|
|
15494
15854
|
align,
|
|
15495
|
-
|
|
15496
|
-
|
|
15497
|
-
className: t4,
|
|
15498
|
-
children: [children, t5]
|
|
15499
|
-
}) });
|
|
15855
|
+
children: [t3, t4]
|
|
15856
|
+
});
|
|
15500
15857
|
$[5] = align;
|
|
15501
|
-
$[6] =
|
|
15502
|
-
$[7] =
|
|
15858
|
+
$[6] = side;
|
|
15859
|
+
$[7] = t3;
|
|
15503
15860
|
$[8] = t4;
|
|
15504
|
-
$[9] =
|
|
15505
|
-
} else
|
|
15506
|
-
|
|
15507
|
-
if ($[10] !== t3 || $[11] !== t6) {
|
|
15508
|
-
t7 = /* @__PURE__ */ jsxs(Popover$1.Root, { children: [t3, t6] });
|
|
15509
|
-
$[10] = t3;
|
|
15510
|
-
$[11] = t6;
|
|
15511
|
-
$[12] = t7;
|
|
15512
|
-
} else t7 = $[12];
|
|
15513
|
-
return t7;
|
|
15861
|
+
$[9] = t5;
|
|
15862
|
+
} else t5 = $[9];
|
|
15863
|
+
return t5;
|
|
15514
15864
|
};
|
|
15865
|
+
const DsPopover = Object.assign(DsPopoverLegacy, {
|
|
15866
|
+
Root: DsPopoverRoot,
|
|
15867
|
+
Trigger: DsPopoverTrigger,
|
|
15868
|
+
Panel: DsPopoverPanel,
|
|
15869
|
+
Header: DsPopoverHeader,
|
|
15870
|
+
Content: DsPopoverContent,
|
|
15871
|
+
ContentItem: DsPopoverContentItem,
|
|
15872
|
+
Footer: DsPopoverFooter
|
|
15873
|
+
});
|
|
15874
|
+
//#endregion
|
|
15875
|
+
//#region src/components/ds-popover/ds-popover.types.ts
|
|
15876
|
+
const popoverSides = [
|
|
15877
|
+
"top",
|
|
15878
|
+
"right",
|
|
15879
|
+
"bottom",
|
|
15880
|
+
"left"
|
|
15881
|
+
];
|
|
15882
|
+
const popoverAligns = [
|
|
15883
|
+
"start",
|
|
15884
|
+
"center",
|
|
15885
|
+
"end"
|
|
15886
|
+
];
|
|
15515
15887
|
//#endregion
|
|
15516
15888
|
//#region src/components/ds-progress-arc/ds-progress-arc.module.scss
|
|
15517
15889
|
var ds_progress_arc_module_default = {
|
|
@@ -16152,6 +16524,263 @@ const progressLinearSizes = [
|
|
|
16152
16524
|
"large"
|
|
16153
16525
|
];
|
|
16154
16526
|
//#endregion
|
|
16527
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.module.scss
|
|
16528
|
+
var ds_progress_task_bar_module_default = {
|
|
16529
|
+
"bar": "SN3VFW_bar",
|
|
16530
|
+
"segment": "SN3VFW_segment",
|
|
16531
|
+
"segmentCompleted": "SN3VFW_segmentCompleted",
|
|
16532
|
+
"segmentFailed": "SN3VFW_segmentFailed",
|
|
16533
|
+
"segmentRunning": "SN3VFW_segmentRunning",
|
|
16534
|
+
"statusIcon": "SN3VFW_statusIcon",
|
|
16535
|
+
"total": "SN3VFW_total"
|
|
16536
|
+
};
|
|
16537
|
+
//#endregion
|
|
16538
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.types.ts
|
|
16539
|
+
const taskBarStatuses = [
|
|
16540
|
+
"completed",
|
|
16541
|
+
"running",
|
|
16542
|
+
"failed"
|
|
16543
|
+
];
|
|
16544
|
+
//#endregion
|
|
16545
|
+
//#region src/components/ds-progress-task-bar/utils.ts
|
|
16546
|
+
const COUNT_UNITS = [
|
|
16547
|
+
{
|
|
16548
|
+
value: 1e9,
|
|
16549
|
+
suffix: "B"
|
|
16550
|
+
},
|
|
16551
|
+
{
|
|
16552
|
+
value: 1e6,
|
|
16553
|
+
suffix: "M"
|
|
16554
|
+
},
|
|
16555
|
+
{
|
|
16556
|
+
value: 1e3,
|
|
16557
|
+
suffix: "K"
|
|
16558
|
+
}
|
|
16559
|
+
];
|
|
16560
|
+
const ABBREVIATION_FLOOR = 1e3;
|
|
16561
|
+
const DECIMAL_THRESHOLD = 10;
|
|
16562
|
+
const stripTrailingZero = (value) => value % 1 === 0 ? String(value) : value.toFixed(1);
|
|
16563
|
+
/**
|
|
16564
|
+
* Format a task count for the legend, following the design's abbreviation rules:
|
|
16565
|
+
* - `< 1000` → exact number (e.g. `999`)
|
|
16566
|
+
* - single-digit unit → one decimal (e.g. `1.1K`, `1.2M`)
|
|
16567
|
+
* - multi-digit unit → whole number, truncated so `999,999 → 999K`
|
|
16568
|
+
*/
|
|
16569
|
+
const formatCount = (count) => {
|
|
16570
|
+
if (!Number.isFinite(count)) return "0";
|
|
16571
|
+
const rounded = Math.max(0, Math.round(count));
|
|
16572
|
+
if (rounded < ABBREVIATION_FLOOR) return String(rounded);
|
|
16573
|
+
const unit = COUNT_UNITS.find(({ value }) => rounded >= value);
|
|
16574
|
+
if (unit === void 0) return String(rounded);
|
|
16575
|
+
const scaled = rounded / unit.value;
|
|
16576
|
+
if (scaled < DECIMAL_THRESHOLD) return `${stripTrailingZero(Math.round(scaled * 10) / 10)}${unit.suffix}`;
|
|
16577
|
+
return `${String(Math.floor(scaled))}${unit.suffix}`;
|
|
16578
|
+
};
|
|
16579
|
+
//#endregion
|
|
16580
|
+
//#region src/components/ds-progress-task-bar/ds-progress-task-bar.tsx
|
|
16581
|
+
const statusIcon = Object.freeze({
|
|
16582
|
+
completed: "check_circle",
|
|
16583
|
+
running: "play_circle",
|
|
16584
|
+
failed: "cancel"
|
|
16585
|
+
});
|
|
16586
|
+
const statusIconColor = Object.freeze({
|
|
16587
|
+
completed: "success",
|
|
16588
|
+
running: "action",
|
|
16589
|
+
failed: "error"
|
|
16590
|
+
});
|
|
16591
|
+
const statusTextColor = Object.freeze({
|
|
16592
|
+
completed: "success",
|
|
16593
|
+
running: "action",
|
|
16594
|
+
failed: "error"
|
|
16595
|
+
});
|
|
16596
|
+
const statusSegmentClass = Object.freeze({
|
|
16597
|
+
completed: ds_progress_task_bar_module_default.segmentCompleted,
|
|
16598
|
+
running: ds_progress_task_bar_module_default.segmentRunning,
|
|
16599
|
+
failed: ds_progress_task_bar_module_default.segmentFailed
|
|
16600
|
+
});
|
|
16601
|
+
const defaultLocale = Object.freeze({
|
|
16602
|
+
completed: "Completed",
|
|
16603
|
+
running: "Running",
|
|
16604
|
+
failed: "Failed",
|
|
16605
|
+
total: (total) => `of ${total}`
|
|
16606
|
+
});
|
|
16607
|
+
const DsProgressTaskBar = (t0) => {
|
|
16608
|
+
const $ = c(39);
|
|
16609
|
+
const { completed: t1, running: t2, failed: t3, total, locale, className, style, ref } = t0;
|
|
16610
|
+
const completed = t1 === void 0 ? 0 : t1;
|
|
16611
|
+
const running = t2 === void 0 ? 0 : t2;
|
|
16612
|
+
const failed = t3 === void 0 ? 0 : t3;
|
|
16613
|
+
const t4 = Math.max(0, completed);
|
|
16614
|
+
const t5 = Math.max(0, running);
|
|
16615
|
+
const t6 = Math.max(0, failed);
|
|
16616
|
+
let T0;
|
|
16617
|
+
let t10;
|
|
16618
|
+
let t11;
|
|
16619
|
+
let t12;
|
|
16620
|
+
let t13;
|
|
16621
|
+
let t14;
|
|
16622
|
+
let t15;
|
|
16623
|
+
let t16;
|
|
16624
|
+
let t17;
|
|
16625
|
+
let t18;
|
|
16626
|
+
let t19;
|
|
16627
|
+
let t7;
|
|
16628
|
+
let t8;
|
|
16629
|
+
let t9;
|
|
16630
|
+
if ($[0] !== className || $[1] !== locale || $[2] !== ref || $[3] !== style || $[4] !== t4 || $[5] !== t5 || $[6] !== t6 || $[7] !== total) {
|
|
16631
|
+
const counts = {
|
|
16632
|
+
completed: t4,
|
|
16633
|
+
running: t5,
|
|
16634
|
+
failed: t6
|
|
16635
|
+
};
|
|
16636
|
+
const sum = counts.completed + counts.running + counts.failed;
|
|
16637
|
+
const denominator = Math.max(total ?? sum, sum);
|
|
16638
|
+
const mergedLocale = {
|
|
16639
|
+
...defaultLocale,
|
|
16640
|
+
...locale
|
|
16641
|
+
};
|
|
16642
|
+
const activeStatuses = taskBarStatuses.filter((status) => counts[status] > 0);
|
|
16643
|
+
const segmentWidth = (status_0) => denominator > 0 ? `${String(counts[status_0] / denominator * 100)}%` : "0%";
|
|
16644
|
+
T0 = DsStack;
|
|
16645
|
+
t13 = ref;
|
|
16646
|
+
t14 = "column";
|
|
16647
|
+
t15 = "var(--xs)";
|
|
16648
|
+
t16 = "100%";
|
|
16649
|
+
t17 = className;
|
|
16650
|
+
t18 = style;
|
|
16651
|
+
t19 = /* @__PURE__ */ jsxs(DsStack, {
|
|
16652
|
+
direction: "row",
|
|
16653
|
+
alignItems: "center",
|
|
16654
|
+
justifyContent: "space-between",
|
|
16655
|
+
children: [/* @__PURE__ */ jsx(DsStack, {
|
|
16656
|
+
direction: "row",
|
|
16657
|
+
alignItems: "center",
|
|
16658
|
+
gap: "var(--3xs)",
|
|
16659
|
+
children: activeStatuses.length === 0 ? /* @__PURE__ */ jsx(DsTypography, {
|
|
16660
|
+
variant: "body-xs-reg",
|
|
16661
|
+
color: "secondary",
|
|
16662
|
+
children: "0"
|
|
16663
|
+
}) : activeStatuses.map((status_1) => /* @__PURE__ */ jsxs(DsStack, {
|
|
16664
|
+
direction: "row",
|
|
16665
|
+
alignItems: "center",
|
|
16666
|
+
gap: "var(--4xs)",
|
|
16667
|
+
children: [/* @__PURE__ */ jsx(DsTooltip, {
|
|
16668
|
+
content: mergedLocale[status_1],
|
|
16669
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
16670
|
+
className: ds_progress_task_bar_module_default.statusIcon,
|
|
16671
|
+
children: /* @__PURE__ */ jsx(DsIcon, {
|
|
16672
|
+
icon: statusIcon[status_1],
|
|
16673
|
+
size: "tiny",
|
|
16674
|
+
color: statusIconColor[status_1],
|
|
16675
|
+
filled: true
|
|
16676
|
+
})
|
|
16677
|
+
})
|
|
16678
|
+
}), /* @__PURE__ */ jsx(DsTypography, {
|
|
16679
|
+
variant: "body-xs-reg",
|
|
16680
|
+
color: statusTextColor[status_1],
|
|
16681
|
+
children: formatCount(counts[status_1])
|
|
16682
|
+
})]
|
|
16683
|
+
}, status_1))
|
|
16684
|
+
}), /* @__PURE__ */ jsx(DsTypography, {
|
|
16685
|
+
variant: "body-xs-reg",
|
|
16686
|
+
color: "secondary",
|
|
16687
|
+
className: ds_progress_task_bar_module_default.total,
|
|
16688
|
+
children: mergedLocale.total(formatCount(denominator))
|
|
16689
|
+
})]
|
|
16690
|
+
});
|
|
16691
|
+
t7 = ds_progress_task_bar_module_default.bar;
|
|
16692
|
+
t8 = "progressbar";
|
|
16693
|
+
t9 = 0;
|
|
16694
|
+
t10 = denominator;
|
|
16695
|
+
t11 = sum;
|
|
16696
|
+
t12 = activeStatuses.map((status_2) => /* @__PURE__ */ jsx(DsTooltip, {
|
|
16697
|
+
content: mergedLocale[status_2],
|
|
16698
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
16699
|
+
className: classNames(ds_progress_task_bar_module_default.segment, statusSegmentClass[status_2]),
|
|
16700
|
+
style: { width: segmentWidth(status_2) }
|
|
16701
|
+
})
|
|
16702
|
+
}, status_2));
|
|
16703
|
+
$[0] = className;
|
|
16704
|
+
$[1] = locale;
|
|
16705
|
+
$[2] = ref;
|
|
16706
|
+
$[3] = style;
|
|
16707
|
+
$[4] = t4;
|
|
16708
|
+
$[5] = t5;
|
|
16709
|
+
$[6] = t6;
|
|
16710
|
+
$[7] = total;
|
|
16711
|
+
$[8] = T0;
|
|
16712
|
+
$[9] = t10;
|
|
16713
|
+
$[10] = t11;
|
|
16714
|
+
$[11] = t12;
|
|
16715
|
+
$[12] = t13;
|
|
16716
|
+
$[13] = t14;
|
|
16717
|
+
$[14] = t15;
|
|
16718
|
+
$[15] = t16;
|
|
16719
|
+
$[16] = t17;
|
|
16720
|
+
$[17] = t18;
|
|
16721
|
+
$[18] = t19;
|
|
16722
|
+
$[19] = t7;
|
|
16723
|
+
$[20] = t8;
|
|
16724
|
+
$[21] = t9;
|
|
16725
|
+
} else {
|
|
16726
|
+
T0 = $[8];
|
|
16727
|
+
t10 = $[9];
|
|
16728
|
+
t11 = $[10];
|
|
16729
|
+
t12 = $[11];
|
|
16730
|
+
t13 = $[12];
|
|
16731
|
+
t14 = $[13];
|
|
16732
|
+
t15 = $[14];
|
|
16733
|
+
t16 = $[15];
|
|
16734
|
+
t17 = $[16];
|
|
16735
|
+
t18 = $[17];
|
|
16736
|
+
t19 = $[18];
|
|
16737
|
+
t7 = $[19];
|
|
16738
|
+
t8 = $[20];
|
|
16739
|
+
t9 = $[21];
|
|
16740
|
+
}
|
|
16741
|
+
let t20;
|
|
16742
|
+
if ($[22] !== t10 || $[23] !== t11 || $[24] !== t12 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9) {
|
|
16743
|
+
t20 = /* @__PURE__ */ jsx("div", {
|
|
16744
|
+
className: t7,
|
|
16745
|
+
role: t8,
|
|
16746
|
+
"aria-valuemin": t9,
|
|
16747
|
+
"aria-valuemax": t10,
|
|
16748
|
+
"aria-valuenow": t11,
|
|
16749
|
+
children: t12
|
|
16750
|
+
});
|
|
16751
|
+
$[22] = t10;
|
|
16752
|
+
$[23] = t11;
|
|
16753
|
+
$[24] = t12;
|
|
16754
|
+
$[25] = t7;
|
|
16755
|
+
$[26] = t8;
|
|
16756
|
+
$[27] = t9;
|
|
16757
|
+
$[28] = t20;
|
|
16758
|
+
} else t20 = $[28];
|
|
16759
|
+
let t21;
|
|
16760
|
+
if ($[29] !== T0 || $[30] !== t13 || $[31] !== t14 || $[32] !== t15 || $[33] !== t16 || $[34] !== t17 || $[35] !== t18 || $[36] !== t19 || $[37] !== t20) {
|
|
16761
|
+
t21 = /* @__PURE__ */ jsxs(T0, {
|
|
16762
|
+
ref: t13,
|
|
16763
|
+
direction: t14,
|
|
16764
|
+
gap: t15,
|
|
16765
|
+
width: t16,
|
|
16766
|
+
className: t17,
|
|
16767
|
+
style: t18,
|
|
16768
|
+
children: [t19, t20]
|
|
16769
|
+
});
|
|
16770
|
+
$[29] = T0;
|
|
16771
|
+
$[30] = t13;
|
|
16772
|
+
$[31] = t14;
|
|
16773
|
+
$[32] = t15;
|
|
16774
|
+
$[33] = t16;
|
|
16775
|
+
$[34] = t17;
|
|
16776
|
+
$[35] = t18;
|
|
16777
|
+
$[36] = t19;
|
|
16778
|
+
$[37] = t20;
|
|
16779
|
+
$[38] = t21;
|
|
16780
|
+
} else t21 = $[38];
|
|
16781
|
+
return t21;
|
|
16782
|
+
};
|
|
16783
|
+
//#endregion
|
|
16155
16784
|
//#region src/components/ds-radio-group/ds-radio-group.module.scss
|
|
16156
16785
|
var ds_radio_group_module_default = {
|
|
16157
16786
|
"labelInfo": "gJbMxW_labelInfo",
|
|
@@ -17281,71 +17910,6 @@ const splitButtonSizes = ["medium", "small"];
|
|
|
17281
17910
|
const DsSplitButton = withResponsiveProps(DsSplitButton$1, ["size"]);
|
|
17282
17911
|
DsSplitButton.displayName = "DsSplitButton";
|
|
17283
17912
|
//#endregion
|
|
17284
|
-
//#region src/components/ds-stack/ds-stack.module.scss
|
|
17285
|
-
var ds_stack_module_default = { "root": "efmmNG_root" };
|
|
17286
|
-
//#endregion
|
|
17287
|
-
//#region src/components/ds-stack/ds-stack.tsx
|
|
17288
|
-
const DsStack$1 = (t0) => {
|
|
17289
|
-
const $ = c(16);
|
|
17290
|
-
const { direction, gap, alignItems, justifyContent, flex, flexWrap, width, children, className, style, ref } = t0;
|
|
17291
|
-
let t1;
|
|
17292
|
-
if ($[0] !== alignItems || $[1] !== direction || $[2] !== flex || $[3] !== flexWrap || $[4] !== gap || $[5] !== justifyContent || $[6] !== style || $[7] !== width) {
|
|
17293
|
-
t1 = {
|
|
17294
|
-
flexDirection: direction,
|
|
17295
|
-
gap,
|
|
17296
|
-
alignItems,
|
|
17297
|
-
justifyContent,
|
|
17298
|
-
flex,
|
|
17299
|
-
flexWrap,
|
|
17300
|
-
width,
|
|
17301
|
-
...style
|
|
17302
|
-
};
|
|
17303
|
-
$[0] = alignItems;
|
|
17304
|
-
$[1] = direction;
|
|
17305
|
-
$[2] = flex;
|
|
17306
|
-
$[3] = flexWrap;
|
|
17307
|
-
$[4] = gap;
|
|
17308
|
-
$[5] = justifyContent;
|
|
17309
|
-
$[6] = style;
|
|
17310
|
-
$[7] = width;
|
|
17311
|
-
$[8] = t1;
|
|
17312
|
-
} else t1 = $[8];
|
|
17313
|
-
const layoutStyle = t1;
|
|
17314
|
-
let t2;
|
|
17315
|
-
if ($[9] !== className) {
|
|
17316
|
-
t2 = classNames(ds_stack_module_default.root, className);
|
|
17317
|
-
$[9] = className;
|
|
17318
|
-
$[10] = t2;
|
|
17319
|
-
} else t2 = $[10];
|
|
17320
|
-
let t3;
|
|
17321
|
-
if ($[11] !== children || $[12] !== layoutStyle || $[13] !== ref || $[14] !== t2) {
|
|
17322
|
-
t3 = /* @__PURE__ */ jsx("div", {
|
|
17323
|
-
ref,
|
|
17324
|
-
className: t2,
|
|
17325
|
-
style: layoutStyle,
|
|
17326
|
-
children
|
|
17327
|
-
});
|
|
17328
|
-
$[11] = children;
|
|
17329
|
-
$[12] = layoutStyle;
|
|
17330
|
-
$[13] = ref;
|
|
17331
|
-
$[14] = t2;
|
|
17332
|
-
$[15] = t3;
|
|
17333
|
-
} else t3 = $[15];
|
|
17334
|
-
return t3;
|
|
17335
|
-
};
|
|
17336
|
-
//#endregion
|
|
17337
|
-
//#region src/components/ds-stack/index.ts
|
|
17338
|
-
const DsStack = withResponsiveProps(DsStack$1, [
|
|
17339
|
-
"direction",
|
|
17340
|
-
"gap",
|
|
17341
|
-
"alignItems",
|
|
17342
|
-
"justifyContent",
|
|
17343
|
-
"flex",
|
|
17344
|
-
"flexWrap",
|
|
17345
|
-
"width"
|
|
17346
|
-
]);
|
|
17347
|
-
DsStack.displayName = "DsStack";
|
|
17348
|
-
//#endregion
|
|
17349
17913
|
//#region src/components/ds-status-badge/ds-status-badge.module.scss
|
|
17350
17914
|
var ds_status_badge_module_default = {
|
|
17351
17915
|
"active": "U5k6UG_active",
|
|
@@ -18822,6 +19386,7 @@ var ds_table_header_module_default = {
|
|
|
18822
19386
|
"filterableHeader": "-2rCNG_filterableHeader",
|
|
18823
19387
|
"filterActive": "-2rCNG_filterActive",
|
|
18824
19388
|
"filterTriggerContainer": "-2rCNG_filterTriggerContainer",
|
|
19389
|
+
"groupStart": "-2rCNG_groupStart",
|
|
18825
19390
|
"headerCell": "-2rCNG_headerCell",
|
|
18826
19391
|
"headerRow": "-2rCNG_headerRow",
|
|
18827
19392
|
"headerRowNoBorder": "-2rCNG_headerRowNoBorder",
|
|
@@ -18948,6 +19513,154 @@ const SELECT_COLUMN_ID = "select";
|
|
|
18948
19513
|
*/
|
|
18949
19514
|
const REORDER_COLUMN_ID = "reorder";
|
|
18950
19515
|
//#endregion
|
|
19516
|
+
//#region src/components/ds-table/grouping/utils/column-group.ts
|
|
19517
|
+
/**
|
|
19518
|
+
* Builds the flex style for a group header cell so it lines up with the combined
|
|
19519
|
+
* width of its visible leaf columns.
|
|
19520
|
+
*
|
|
19521
|
+
* Fixed-width leaves contribute to `flexBasis`; default-sized leaves each add one
|
|
19522
|
+
* unit of `flexGrow`, mirroring how {@link getColumnSizeStyle} sizes leaf cells so
|
|
19523
|
+
* both header rows distribute free space identically.
|
|
19524
|
+
*/
|
|
19525
|
+
const getGroupColumnSizeStyle = (leafColumns) => {
|
|
19526
|
+
let fixedWidth = 0;
|
|
19527
|
+
let flexCount = 0;
|
|
19528
|
+
for (const leaf of leafColumns) {
|
|
19529
|
+
const size = leaf.getSize();
|
|
19530
|
+
if (size !== defaultColumnSizing.size) fixedWidth += size;
|
|
19531
|
+
else flexCount += 1;
|
|
19532
|
+
}
|
|
19533
|
+
if (flexCount === 0) return {
|
|
19534
|
+
width: fixedWidth,
|
|
19535
|
+
minWidth: fixedWidth,
|
|
19536
|
+
flexShrink: 0
|
|
19537
|
+
};
|
|
19538
|
+
return {
|
|
19539
|
+
flexGrow: flexCount,
|
|
19540
|
+
flexShrink: 0,
|
|
19541
|
+
flexBasis: fixedWidth,
|
|
19542
|
+
minWidth: fixedWidth
|
|
19543
|
+
};
|
|
19544
|
+
};
|
|
19545
|
+
/**
|
|
19546
|
+
* Whether a column is the first visible leaf of its parent group. Used to draw a
|
|
19547
|
+
* single side border at the start of each group in both the header and body.
|
|
19548
|
+
*/
|
|
19549
|
+
const isFirstLeafColumnOfGroup = (column) => {
|
|
19550
|
+
const parent = column.parent;
|
|
19551
|
+
if (!parent) return false;
|
|
19552
|
+
return parent.getLeafColumns().filter((leaf) => leaf.getIsVisible())[0]?.id === column.id;
|
|
19553
|
+
};
|
|
19554
|
+
const getLeafColumnId = (def) => def.id ?? def.accessorKey;
|
|
19555
|
+
/**
|
|
19556
|
+
* Collects the ids of groups declared with `meta.group.defaultCollapsed`, used to
|
|
19557
|
+
* seed the uncontrolled collapse state.
|
|
19558
|
+
*/
|
|
19559
|
+
const getInitialCollapsedGroups = (columns) => {
|
|
19560
|
+
const collapsed = [];
|
|
19561
|
+
const visit = (defs) => {
|
|
19562
|
+
for (const def of defs) if (def.columns) {
|
|
19563
|
+
if (def.id && def.meta?.group?.defaultCollapsed) collapsed.push(def.id);
|
|
19564
|
+
visit(def.columns);
|
|
19565
|
+
}
|
|
19566
|
+
};
|
|
19567
|
+
visit(columns);
|
|
19568
|
+
return collapsed;
|
|
19569
|
+
};
|
|
19570
|
+
/**
|
|
19571
|
+
* Maps collapsed groups to a {@link VisibilityState} that hides every leaf column
|
|
19572
|
+
* inside a collapsed group except those flagged `meta.keepVisibleWhenCollapsed`.
|
|
19573
|
+
* Layered on top of the consumer's own visibility so collapse never mutates it.
|
|
19574
|
+
*/
|
|
19575
|
+
const getCollapsedColumnVisibility = (columns, collapsedGroupIds) => {
|
|
19576
|
+
const visibility = {};
|
|
19577
|
+
const visit = (defs, isInsideCollapsedGroup) => {
|
|
19578
|
+
for (const def of defs) {
|
|
19579
|
+
if (def.columns) {
|
|
19580
|
+
const isGroupCollapsed = isInsideCollapsedGroup || !!def.id && collapsedGroupIds.includes(def.id);
|
|
19581
|
+
visit(def.columns, isGroupCollapsed);
|
|
19582
|
+
continue;
|
|
19583
|
+
}
|
|
19584
|
+
if (!isInsideCollapsedGroup || def.meta?.keepVisibleWhenCollapsed) continue;
|
|
19585
|
+
const columnId = getLeafColumnId(def);
|
|
19586
|
+
if (columnId) visibility[columnId] = false;
|
|
19587
|
+
}
|
|
19588
|
+
};
|
|
19589
|
+
visit(columns, false);
|
|
19590
|
+
return visibility;
|
|
19591
|
+
};
|
|
19592
|
+
//#endregion
|
|
19593
|
+
//#region src/components/ds-table/grouping/hooks/use-column-groups.ts
|
|
19594
|
+
/**
|
|
19595
|
+
* Manages column-group collapse state. Supports both controlled
|
|
19596
|
+
* (`collapsedColumnGroups` + `onCollapsedColumnGroupsChange`) and uncontrolled
|
|
19597
|
+
* usage (seeded from `meta.group.defaultCollapsed`).
|
|
19598
|
+
*/
|
|
19599
|
+
const useColumnGroups = ({ columns, collapsedColumnGroups, onCollapsedColumnGroupsChange }) => {
|
|
19600
|
+
const [collapsed, setCollapsed] = useControlled(collapsedColumnGroups, onCollapsedColumnGroupsChange, getInitialCollapsedGroups(columns));
|
|
19601
|
+
const toggleColumnGroup = (groupId) => {
|
|
19602
|
+
setCollapsed(collapsed.includes(groupId) ? collapsed.filter((id) => id !== groupId) : [...collapsed, groupId]);
|
|
19603
|
+
};
|
|
19604
|
+
return {
|
|
19605
|
+
collapsedColumnGroups: collapsed,
|
|
19606
|
+
toggleColumnGroup,
|
|
19607
|
+
collapsedVisibility: useMemo(() => getCollapsedColumnVisibility(columns, collapsed), [columns, collapsed])
|
|
19608
|
+
};
|
|
19609
|
+
};
|
|
19610
|
+
//#endregion
|
|
19611
|
+
//#region src/components/ds-table/ds-table.types.ts
|
|
19612
|
+
/**
|
|
19613
|
+
* Default English strings for {@link DsTableLocale}.
|
|
19614
|
+
*/
|
|
19615
|
+
const defaultDsTableLocale = Object.freeze({
|
|
19616
|
+
collapseColumnGroup: "Collapse column group",
|
|
19617
|
+
expandColumnGroup: "Expand column group"
|
|
19618
|
+
});
|
|
19619
|
+
//#endregion
|
|
19620
|
+
//#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.module.scss
|
|
19621
|
+
var ds_table_group_header_cell_module_default = {
|
|
19622
|
+
"collapseToggle": "HuJ4KG_collapseToggle",
|
|
19623
|
+
"groupHeaderCell": "HuJ4KG_groupHeaderCell",
|
|
19624
|
+
"groupHeaderContent": "HuJ4KG_groupHeaderContent",
|
|
19625
|
+
"groupLabel": "HuJ4KG_groupLabel"
|
|
19626
|
+
};
|
|
19627
|
+
//#endregion
|
|
19628
|
+
//#region src/components/ds-table/components/ds-table-group-header-cell/ds-table-group-header-cell.tsx
|
|
19629
|
+
const DsTableGroupHeaderCell = ({ header }) => {
|
|
19630
|
+
const { collapsedColumnGroups, onToggleColumnGroup, locale } = useDsTableContext();
|
|
19631
|
+
const groupId = header.column.id;
|
|
19632
|
+
const groupStyle = getGroupColumnSizeStyle(header.column.getLeafColumns().filter((leaf) => leaf.getIsVisible()));
|
|
19633
|
+
const isCollapsible = header.column.columnDef.meta?.group?.collapsible ?? false;
|
|
19634
|
+
const isCollapsed = collapsedColumnGroups?.includes(groupId) ?? false;
|
|
19635
|
+
const mergedLocale = {
|
|
19636
|
+
...defaultDsTableLocale,
|
|
19637
|
+
...locale
|
|
19638
|
+
};
|
|
19639
|
+
const toggleLabel = isCollapsed ? mergedLocale.expandColumnGroup : mergedLocale.collapseColumnGroup;
|
|
19640
|
+
const handleToggle = () => onToggleColumnGroup?.(groupId);
|
|
19641
|
+
return /* @__PURE__ */ jsx(TableHead, {
|
|
19642
|
+
className: ds_table_group_header_cell_module_default.groupHeaderCell,
|
|
19643
|
+
style: groupStyle,
|
|
19644
|
+
colSpan: header.colSpan,
|
|
19645
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
19646
|
+
className: ds_table_group_header_cell_module_default.groupHeaderContent,
|
|
19647
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
19648
|
+
className: ds_table_group_header_cell_module_default.groupLabel,
|
|
19649
|
+
children: flexRender(header.column.columnDef.header, header.getContext())
|
|
19650
|
+
}), isCollapsible && /* @__PURE__ */ jsx(DsButtonV3, {
|
|
19651
|
+
variant: "secondary",
|
|
19652
|
+
size: "tiny",
|
|
19653
|
+
icon: isCollapsed ? "chevron_right" : "chevron_left",
|
|
19654
|
+
className: ds_table_group_header_cell_module_default.collapseToggle,
|
|
19655
|
+
"aria-label": toggleLabel,
|
|
19656
|
+
"aria-expanded": !isCollapsed,
|
|
19657
|
+
title: toggleLabel,
|
|
19658
|
+
onClick: handleToggle
|
|
19659
|
+
})]
|
|
19660
|
+
})
|
|
19661
|
+
});
|
|
19662
|
+
};
|
|
19663
|
+
//#endregion
|
|
18951
19664
|
//#region src/components/ds-table/components/ds-table-header/ds-table-header.tsx
|
|
18952
19665
|
const DsTableHeader = ({ table }) => {
|
|
18953
19666
|
const { stickyHeader, bordered, virtualized } = useDsTableContext();
|
|
@@ -18956,17 +19669,23 @@ const DsTableHeader = ({ table }) => {
|
|
|
18956
19669
|
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, {
|
|
18957
19670
|
className: classNames(ds_table_header_module_default.headerRow, !bordered && ds_table_header_module_default.headerRowNoBorder, virtualized && ds_table_header_module_default.headerRowVirtualized),
|
|
18958
19671
|
children: headerGroup.headers.map((header) => {
|
|
19672
|
+
if (header.isPlaceholder) return /* @__PURE__ */ jsx(TableHead, {
|
|
19673
|
+
className: ds_table_header_module_default.headerCell,
|
|
19674
|
+
style: getColumnSizeStyle(header.getSize())
|
|
19675
|
+
}, header.id);
|
|
19676
|
+
if (header.subHeaders.length > 0) return /* @__PURE__ */ jsx(DsTableGroupHeaderCell, { header }, header.id);
|
|
18959
19677
|
const headerStyle = getColumnSizeStyle(header.column.getSize());
|
|
18960
19678
|
const canSort = header.column.getCanSort();
|
|
18961
19679
|
const isSelectColumn = header.column.id === SELECT_COLUMN_ID;
|
|
19680
|
+
const isGroupStart = isFirstLeafColumnOfGroup(header.column);
|
|
18962
19681
|
const metaFilter = header.column.columnDef.meta?.filter;
|
|
18963
19682
|
const resolvedFilter = metaFilter && "render" in metaFilter ? metaFilter : void 0;
|
|
18964
19683
|
const hasActiveColumnFilter = resolvedFilter?.hasActiveFilter ?? false;
|
|
18965
19684
|
return /* @__PURE__ */ jsx(TableHead, {
|
|
18966
|
-
className: classNames(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),
|
|
19685
|
+
className: classNames(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),
|
|
18967
19686
|
onClick: header.column.getToggleSortingHandler(),
|
|
18968
19687
|
style: headerStyle,
|
|
18969
|
-
children:
|
|
19688
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
18970
19689
|
className: ds_table_header_module_default.headerSortContainer,
|
|
18971
19690
|
children: [
|
|
18972
19691
|
/* @__PURE__ */ jsx(DsStack, {
|
|
@@ -19022,6 +19741,7 @@ var ds_table_module_default = {
|
|
|
19022
19741
|
//#region src/components/ds-table/components/edit/ds-table-editable-cell/ds-table-editable-cell.module.scss
|
|
19023
19742
|
var ds_table_editable_cell_module_default = {
|
|
19024
19743
|
"editButton": "g5FEoW_editButton",
|
|
19744
|
+
"lockIcon": "g5FEoW_lockIcon",
|
|
19025
19745
|
"root": "g5FEoW_root"
|
|
19026
19746
|
};
|
|
19027
19747
|
//#endregion
|
|
@@ -19033,6 +19753,26 @@ const DsTableEditableCell = ({ cell, children }) => {
|
|
|
19033
19753
|
event.stopPropagation();
|
|
19034
19754
|
beginEdit(cell);
|
|
19035
19755
|
};
|
|
19756
|
+
const editDisabled = cell.column.columnDef.editDisabled?.(cell.getContext());
|
|
19757
|
+
const locked = editDisabled === true || typeof editDisabled === "object";
|
|
19758
|
+
const reason = typeof editDisabled === "object" ? editDisabled.reason : void 0;
|
|
19759
|
+
if (locked) return /* @__PURE__ */ jsxs("div", {
|
|
19760
|
+
className: ds_table_editable_cell_module_default.root,
|
|
19761
|
+
"data-locked": "",
|
|
19762
|
+
children: [children, /* @__PURE__ */ jsx(DsTooltip, {
|
|
19763
|
+
content: reason,
|
|
19764
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
19765
|
+
className: ds_table_editable_cell_module_default.lockIcon,
|
|
19766
|
+
"aria-label": "Editing disabled",
|
|
19767
|
+
role: "img",
|
|
19768
|
+
children: /* @__PURE__ */ jsx(DsIcon, {
|
|
19769
|
+
icon: "lock",
|
|
19770
|
+
size: "small",
|
|
19771
|
+
color: "secondary"
|
|
19772
|
+
})
|
|
19773
|
+
})
|
|
19774
|
+
})]
|
|
19775
|
+
});
|
|
19036
19776
|
return /* @__PURE__ */ jsxs("div", {
|
|
19037
19777
|
className: ds_table_editable_cell_module_default.root,
|
|
19038
19778
|
"data-active": isEditing ? "" : void 0,
|
|
@@ -19234,7 +19974,9 @@ var ds_table_row_module_default = {
|
|
|
19234
19974
|
"expandableCell": "t8OZCq_expandableCell",
|
|
19235
19975
|
"expanded": "t8OZCq_expanded",
|
|
19236
19976
|
"expandedRow": "t8OZCq_expandedRow",
|
|
19977
|
+
"groupStart": "t8OZCq_groupStart",
|
|
19237
19978
|
"isDragging": "t8OZCq_isDragging",
|
|
19979
|
+
"loadingRow": "t8OZCq_loadingRow",
|
|
19238
19980
|
"rowDragHandle": "t8OZCq_rowDragHandle",
|
|
19239
19981
|
"rowNoBorder": "t8OZCq_rowNoBorder",
|
|
19240
19982
|
"selectableCell": "t8OZCq_selectableCell",
|
|
@@ -19261,7 +20003,7 @@ const DsRowDragHandle = ({ isDragging, attributes, listeners, style }) => {
|
|
|
19261
20003
|
});
|
|
19262
20004
|
};
|
|
19263
20005
|
const DsTableRow = ({ ref, row, isSelected }) => {
|
|
19264
|
-
const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId } = useDsTableContext();
|
|
20006
|
+
const { reorderable, onRowClick, onRowDoubleClick, renderExpandedRow, bordered, rowSize, primaryRowActions, secondaryRowActions, activeRowId, loading } = useDsTableContext();
|
|
19265
20007
|
const isExpanded = row.getIsExpanded();
|
|
19266
20008
|
const isActive = activeRowId === row.id;
|
|
19267
20009
|
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
|
|
@@ -19285,7 +20027,7 @@ const DsTableRow = ({ ref, row, isSelected }) => {
|
|
|
19285
20027
|
[ds_table_row_module_default.sizeSmall]: rowSize === "small",
|
|
19286
20028
|
[ds_table_row_module_default.sizeMedium]: rowSize === "medium",
|
|
19287
20029
|
[ds_table_row_module_default.sizeLarge]: rowSize === "large"
|
|
19288
|
-
}, onRowClick && ds_table_row_module_default.clickableRow, !bordered && ds_table_row_module_default.rowNoBorder, isExpanded && ds_table_row_module_default.expanded),
|
|
20030
|
+
}, 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),
|
|
19289
20031
|
style: rowStyle,
|
|
19290
20032
|
onClick: () => onRowClick?.(row.original),
|
|
19291
20033
|
onDoubleClick: () => onRowDoubleClick?.(row.original),
|
|
@@ -19299,7 +20041,7 @@ const DsTableRow = ({ ref, row, isSelected }) => {
|
|
|
19299
20041
|
}, cell.id);
|
|
19300
20042
|
const isLastColumn = idx === row.getVisibleCells().length - 1;
|
|
19301
20043
|
return /* @__PURE__ */ jsx(TableCell, {
|
|
19302
|
-
className: classNames(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),
|
|
20044
|
+
className: classNames(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),
|
|
19303
20045
|
style: cellStyle,
|
|
19304
20046
|
children: isLastColumn ? /* @__PURE__ */ jsx(DsTableCell, {
|
|
19305
20047
|
row,
|
|
@@ -19433,6 +20175,8 @@ var ds_table_row_virtualized_module_default = {
|
|
|
19433
20175
|
"expanded": "NcME7q_expanded",
|
|
19434
20176
|
"expandedRow": "NcME7q_expandedRow",
|
|
19435
20177
|
"expandedRowContent": "NcME7q_expandedRowContent",
|
|
20178
|
+
"groupStart": "NcME7q_groupStart",
|
|
20179
|
+
"loadingRow": "NcME7q_loadingRow",
|
|
19436
20180
|
"row": "NcME7q_row",
|
|
19437
20181
|
"rowNoBorder": "NcME7q_rowNoBorder",
|
|
19438
20182
|
"selectableCell": "NcME7q_selectableCell",
|
|
@@ -19443,7 +20187,7 @@ var ds_table_row_virtualized_module_default = {
|
|
|
19443
20187
|
//#endregion
|
|
19444
20188
|
//#region src/components/ds-table/components/ds-table-row-virtualized/ds-table-row-virtualized.tsx
|
|
19445
20189
|
const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef, rowVirtualizer, virtualRow, isExpandedRowContent }) => {
|
|
19446
|
-
const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick } = useDsTableContext();
|
|
20190
|
+
const { bordered, rowSize, activeRowId, primaryRowActions, secondaryRowActions, renderExpandedRow, onRowClick, onRowDoubleClick, loading } = useDsTableContext();
|
|
19447
20191
|
const isExpanded = row.getIsExpanded();
|
|
19448
20192
|
const isActive = activeRowId === row.id;
|
|
19449
20193
|
return /* @__PURE__ */ jsx(TableRow, {
|
|
@@ -19462,14 +20206,14 @@ const DsTableRowVirtualized = ({ row, isSelected, rowsMapRef, rowHeightsMapRef,
|
|
|
19462
20206
|
[ds_table_row_virtualized_module_default.sizeSmall]: rowSize === "small",
|
|
19463
20207
|
[ds_table_row_virtualized_module_default.sizeMedium]: rowSize === "medium",
|
|
19464
20208
|
[ds_table_row_virtualized_module_default.sizeLarge]: rowSize === "large"
|
|
19465
|
-
}, 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),
|
|
20209
|
+
}, 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),
|
|
19466
20210
|
onClick: isExpandedRowContent ? void 0 : () => onRowClick?.(row.original),
|
|
19467
20211
|
onDoubleClick: isExpandedRowContent ? void 0 : () => onRowDoubleClick?.(row.original),
|
|
19468
20212
|
children: isExpandedRowContent ? /* @__PURE__ */ jsx(TableCell, { children: renderExpandedRow?.(row.original) }) : /* @__PURE__ */ jsx(Fragment, { children: row.getVisibleCells().map((cell, idx) => {
|
|
19469
20213
|
const isLastColumn = idx === row.getVisibleCells().length - 1;
|
|
19470
20214
|
return /* @__PURE__ */ jsx(TableCell, {
|
|
19471
20215
|
style: getColumnSizeStyle(cell.column.getSize()),
|
|
19472
|
-
className: classNames(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),
|
|
20216
|
+
className: classNames(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),
|
|
19473
20217
|
children: isLastColumn ? /* @__PURE__ */ jsx(DsTableCell, {
|
|
19474
20218
|
row,
|
|
19475
20219
|
cell,
|
|
@@ -19579,6 +20323,7 @@ const DsTableBodyVirtualized = ({ table, emptyState, estimateSize, overscan, onS
|
|
|
19579
20323
|
function DsTableBody({ ref, rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAndExpandedRowContent, emptyState, rowSelection }) {
|
|
19580
20324
|
const virtualRows = rowVirtualizer.getVirtualItems();
|
|
19581
20325
|
const totalSize = rowVirtualizer.getTotalSize();
|
|
20326
|
+
const hasNoData = rowsAndExpandedRowContent.length === 0;
|
|
19582
20327
|
return /* @__PURE__ */ jsxs(TableBody, {
|
|
19583
20328
|
ref,
|
|
19584
20329
|
className: ds_table_body_virtualized_module_default.body,
|
|
@@ -19594,10 +20339,10 @@ function DsTableBody({ ref, rowVirtualizer, rowsMapRef, rowHeightsMapRef, rowsAn
|
|
|
19594
20339
|
rowVirtualizer,
|
|
19595
20340
|
virtualRow
|
|
19596
20341
|
}, virtualRow.key);
|
|
19597
|
-
}) : /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
|
|
20342
|
+
}) : hasNoData ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, {
|
|
19598
20343
|
className: ds_table_body_virtualized_module_default.emptyState,
|
|
19599
20344
|
children: emptyState || "No results."
|
|
19600
|
-
}) }), /* @__PURE__ */ jsx("tr", {
|
|
20345
|
+
}) }) : null, /* @__PURE__ */ jsx("tr", {
|
|
19601
20346
|
"aria-hidden": true,
|
|
19602
20347
|
className: ds_table_body_virtualized_module_default.sentinel,
|
|
19603
20348
|
style: { top: `${totalSize.toString()}px` },
|
|
@@ -19615,7 +20360,7 @@ const ROW_SIZE_HEIGHT_MAP = {
|
|
|
19615
20360
|
/**
|
|
19616
20361
|
* Design system Table component
|
|
19617
20362
|
*/
|
|
19618
|
-
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 }) => {
|
|
20363
|
+
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 }) => {
|
|
19619
20364
|
const [data, setData] = React$1.useState(tableData);
|
|
19620
20365
|
const [sorting, setSorting] = React$1.useState([]);
|
|
19621
20366
|
const [internalColumnFilters, setInternalColumnFilters] = React$1.useState([]);
|
|
@@ -19636,12 +20381,21 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
19636
20381
|
if (onColumnFiltersChange) onColumnFiltersChange(newFilters);
|
|
19637
20382
|
else setInternalColumnFilters(newFilters);
|
|
19638
20383
|
};
|
|
19639
|
-
const
|
|
20384
|
+
const baseColumnVisibility = externalColumnVisibility ?? internalColumnVisibility;
|
|
19640
20385
|
const handleColumnVisibilityChange = (updaterOrValue) => {
|
|
19641
|
-
const newVisibility = typeof updaterOrValue === "function" ? updaterOrValue(
|
|
20386
|
+
const newVisibility = typeof updaterOrValue === "function" ? updaterOrValue(baseColumnVisibility) : updaterOrValue;
|
|
19642
20387
|
if (onColumnVisibilityChange) onColumnVisibilityChange(newVisibility);
|
|
19643
20388
|
else setInternalColumnVisibility(newVisibility);
|
|
19644
20389
|
};
|
|
20390
|
+
const { collapsedColumnGroups, toggleColumnGroup, collapsedVisibility } = useColumnGroups({
|
|
20391
|
+
columns: columnsProp,
|
|
20392
|
+
collapsedColumnGroups: externalCollapsedColumnGroups,
|
|
20393
|
+
onCollapsedColumnGroupsChange
|
|
20394
|
+
});
|
|
20395
|
+
const columnVisibility = useMemo(() => ({
|
|
20396
|
+
...baseColumnVisibility,
|
|
20397
|
+
...collapsedVisibility
|
|
20398
|
+
}), [baseColumnVisibility, collapsedVisibility]);
|
|
19645
20399
|
const handleSortingChange = (updaterOrValue) => {
|
|
19646
20400
|
const newSorting = typeof updaterOrValue === "function" ? updaterOrValue(sorting) : updaterOrValue;
|
|
19647
20401
|
setSorting(newSorting);
|
|
@@ -19698,9 +20452,20 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
19698
20452
|
hasSelectColumn,
|
|
19699
20453
|
showSelectAllCheckbox
|
|
19700
20454
|
]);
|
|
20455
|
+
const skeletonColumns = useMemo(() => {
|
|
20456
|
+
const toSkeleton = (cols) => cols.map((column) => "columns" in column && column.columns ? {
|
|
20457
|
+
...column,
|
|
20458
|
+
columns: toSkeleton(column.columns)
|
|
20459
|
+
} : {
|
|
20460
|
+
...column,
|
|
20461
|
+
cell: column.loadingCell ?? (() => /* @__PURE__ */ jsx(DsSkeletonText, { width: "60%" }))
|
|
20462
|
+
});
|
|
20463
|
+
return toSkeleton(columns);
|
|
20464
|
+
}, [columns]);
|
|
20465
|
+
const skeletonData = useMemo(() => Array.from({ length: 5 }, (_, i) => ({ id: `ds-table-skeleton-${String(i)}` })), []);
|
|
19701
20466
|
const table = useReactTable({
|
|
19702
|
-
data: reorderable ? data : tableData,
|
|
19703
|
-
columns,
|
|
20467
|
+
data: loading ? skeletonData : reorderable ? data : tableData,
|
|
20468
|
+
columns: loading ? skeletonColumns : columns,
|
|
19704
20469
|
getCoreRowModel: getCoreRowModel(),
|
|
19705
20470
|
onSortingChange: handleSortingChange,
|
|
19706
20471
|
getSortedRowModel: getSortedRowModel(),
|
|
@@ -19766,6 +20531,7 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
19766
20531
|
}) });
|
|
19767
20532
|
const selectedRows = Object.entries(rowSelection).filter(([, selected]) => selected).map(([key]) => rowsById[key]?.original).filter((v) => !!v);
|
|
19768
20533
|
const isBulkActionsVisible = selectable && actions.length > 0 && selectedRows.length > 0;
|
|
20534
|
+
const editingState = useEditingState(onCellEdit, onCellValidate);
|
|
19769
20535
|
const contextValue = {
|
|
19770
20536
|
stickyHeader,
|
|
19771
20537
|
bordered,
|
|
@@ -19775,15 +20541,19 @@ const DsTable = ({ ref, columns: columnsProp, data: tableData, virtualized = fal
|
|
|
19775
20541
|
selectable,
|
|
19776
20542
|
reorderable,
|
|
19777
20543
|
showSelectAllCheckbox,
|
|
19778
|
-
|
|
19779
|
-
|
|
20544
|
+
loading,
|
|
20545
|
+
onRowClick: loading ? void 0 : onRowClick,
|
|
20546
|
+
onRowDoubleClick: loading ? void 0 : onRowDoubleClick,
|
|
19780
20547
|
primaryRowActions,
|
|
19781
20548
|
secondaryRowActions,
|
|
19782
20549
|
renderExpandedRow,
|
|
19783
20550
|
virtualized,
|
|
19784
20551
|
activeRowId,
|
|
20552
|
+
collapsedColumnGroups,
|
|
20553
|
+
onToggleColumnGroup: toggleColumnGroup,
|
|
20554
|
+
locale,
|
|
19785
20555
|
onCellEdit,
|
|
19786
|
-
...
|
|
20556
|
+
...editingState
|
|
19787
20557
|
};
|
|
19788
20558
|
return /* @__PURE__ */ jsx(DsTableContext.Provider, {
|
|
19789
20559
|
value: contextValue,
|
|
@@ -21358,6 +22128,6 @@ DsWorkspaceLayout.Body = Body;
|
|
|
21358
22128
|
DsWorkspaceLayout.SideMenu = SideMenu;
|
|
21359
22129
|
DsWorkspaceLayout.LeftPanel = LeftPanel;
|
|
21360
22130
|
//#endregion
|
|
21361
|
-
export { BREAKPOINT_LG, DsAlertBanner, DsAutocomplete, DsAvatar, DsAvatarGroup, DsBreadcrumb, DsButton, DsButtonV3, DsCard, DsCatalogLayout, DsCheckbox, DsCheckboxGroup, DsChip, DsChipGroup, DsCommentBubble, DsCommentCard, DsCommentIndicator, DsCommentThread, DsCommentsDrawer, DsConfirmation, DsDateInput, DsDatePicker, DsDateRangePicker, DsDialog, DsDivider, DsDrawer, DsDropdownMenu, DsDropdownMenuLegacy, DsExpandableTextInput, DsFileUpload, DsFilterStatusIcon, DsFormControl, DsGrid, DsGridItem, DsIcon, DsKeyValuePair, DsLoader, DsModal, DsNextStepButton, DsNumberInput, DsPanel, DsPasswordInput, DsPopover, DsProgressArc, DsProgressDonut, DsProgressLinear, DsRadioGroup, DsRadioGroupLegacy, DsSegmentGroup, DsSelect, ds_skeleton_default as DsSkeleton, DsSkeletonCircle, DsSkeletonRect, DsSkeletonText, DsSmartTabs, DsSpinner, DsSplitButton, DsStack, DsStatusBadge, DsStatusBadgeV2, DsStep, DsStepContent, DsStepper, DsSystemStatus, DsTable, DsTableColumnFilterPopover, DsTableEditCellCheckbox, DsTableEditCellDate, DsTableEditCellNumber, DsTableEditCellSelect, DsTableEditCellText, DsTableEditableCell, DsTableEditingCell, DsTabs, DsTag, DsTagFilter, DsTextInput, DsTextarea, DsThreadItem, DsTimePicker, DsToastProvider, DsToggle, DsTooltip, DsTree, DsTypography, DsVerticalTabs, DsWorkspaceLayout, FatalFileUploadError, FileUpload, FileUploadError, RetryableFileUploadError, alertBannerVariants, breakpoints, buttonV3Colors, buttonV3Sizes, buttonV3Variants, cardSizes, checkboxVariants, colors, controlStatuses, createCheckboxFilterAdapter, createDsTreeCollection, createDualRangeFilterAdapter, createFilterAdapter, customIcons, dropdownMenuItemVariants, dsKeyValuePairOrientations, filterStatuses, formatTime, iconColors, iconSizes, iconVariants, isCustomIcon, isResponsiveValue, loaderVariants, progressArcSizes, progressArcVariants, progressDonutSizes, progressDonutVariants, progressLinearSizes, progressLinearVariants, resolveResponsiveValue, skeletonColorVariants, skeletonRadiusVariants, spinnerSizes, splitButtonSizes, statusBadgeV2Phases, statusBadgeV2Sizes, statusBadgeV2Variants, systemStatuses, tagSizes, tagVariants, textInputSizes, useBreakpoint, useCellEditor, useCheckboxSelectAll, useFileUpload, useResponsiveValue, useTableFilters, useToaster, withResponsiveProps };
|
|
22131
|
+
export { BREAKPOINT_LG, DsAlertBanner, DsAutocomplete, DsAvatar, DsAvatarGroup, DsBreadcrumb, DsButton, DsButtonV3, DsCard, DsCatalogLayout, DsCheckbox, DsCheckboxGroup, DsChip, DsChipGroup, DsCommentBubble, DsCommentCard, DsCommentIndicator, DsCommentThread, DsCommentsDrawer, DsConfirmation, DsDateInput, DsDatePicker, DsDateRangePicker, DsDialog, DsDivider, DsDrawer, DsDropdownMenu, DsDropdownMenuLegacy, DsExpandableTextInput, DsFileUpload, DsFilterStatusIcon, DsFormControl, DsGrid, DsGridItem, DsIcon, DsKeyValuePair, DsLoader, DsModal, DsNextStepButton, DsNumberInput, DsPanel, DsPasswordInput, DsPopover, DsProgressArc, DsProgressDonut, DsProgressLinear, DsProgressTaskBar, DsRadioGroup, DsRadioGroupLegacy, DsSegmentGroup, DsSelect, ds_skeleton_default as DsSkeleton, DsSkeletonCircle, DsSkeletonRect, DsSkeletonText, DsSmartTabs, DsSpinner, DsSplitButton, DsStack, DsStatusBadge, DsStatusBadgeV2, DsStep, DsStepContent, DsStepper, DsSystemStatus, DsTable, DsTableColumnFilterPopover, DsTableEditCellCheckbox, DsTableEditCellDate, DsTableEditCellNumber, DsTableEditCellSelect, DsTableEditCellText, DsTableEditableCell, DsTableEditingCell, DsTabs, DsTag, DsTagFilter, DsTextInput, DsTextarea, DsThreadItem, DsTimePicker, DsToastProvider, DsToggle, DsTooltip, DsTree, DsTypography, DsVerticalTabs, DsWorkspaceLayout, FatalFileUploadError, FileUpload, FileUploadError, RetryableFileUploadError, alertBannerVariants, breakpoints, buttonV3Colors, buttonV3Sizes, buttonV3Variants, cardSizes, checkboxVariants, colors, controlStatuses, createCheckboxFilterAdapter, createDsTreeCollection, createDualRangeFilterAdapter, createFilterAdapter, customIcons, defaultDsTableLocale, dropdownMenuItemVariants, dsKeyValuePairOrientations, filterStatuses, formatTime, iconColors, iconSizes, iconVariants, isCustomIcon, isResponsiveValue, loaderVariants, popoverAligns, popoverSides, progressArcSizes, progressArcVariants, progressDonutSizes, progressDonutVariants, progressLinearSizes, progressLinearVariants, resolveResponsiveValue, skeletonColorVariants, skeletonRadiusVariants, spinnerSizes, splitButtonSizes, statusBadgeV2Phases, statusBadgeV2Sizes, statusBadgeV2Variants, systemStatuses, tagSizes, tagVariants, taskBarStatuses, textInputSizes, useBreakpoint, useCellEditor, useCheckboxSelectAll, useFileUpload, useResponsiveValue, useTableFilters, useToaster, withResponsiveProps };
|
|
21362
22132
|
|
|
21363
22133
|
//# sourceMappingURL=index.js.map
|