@cwellt_software/cwellt-reactjs-lib 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +50 -27
- package/dist/index.css +1 -1
- package/dist/index.d.ts +19 -4
- package/dist/index.es.js +50 -27
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.d.ts.map +1 -1
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.stories.d.ts +2 -0
- package/dist/src/components/control/choice/tag-selector/CwTagSelector.stories.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/Scheduler.stories.d.ts +18 -1
- package/dist/src/components/custom/scheduler-new/presentation/Scheduler.stories.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.d.ts +2 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/DefaultRowHeader.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.d.ts +15 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/row/Event.d.ts.map +1 -1
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts +0 -1
- package/dist/src/components/custom/super-scheduler/PinRowHeader.d.ts.map +1 -1
- package/dist/src/components/display/data/table/CwTable.d.ts.map +1 -1
- package/dist/src/components/display/data/table/CwTable.stories.d.ts +2 -0
- package/dist/src/components/display/data/table/CwTable.stories.d.ts.map +1 -1
- package/dist/src/components/layout/card/CwCard.d.ts +2 -2
- package/dist/src/components/layout/card/CwCard.d.ts.map +1 -1
- package/dist/src/components/layout/card/CwCard.stories.d.ts +4 -2
- package/dist/src/components/layout/card/CwCard.stories.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +89 -89
package/dist/index.cjs.js
CHANGED
|
@@ -1952,7 +1952,7 @@ function CwAlign(props) {
|
|
|
1952
1952
|
}, children: props.children }));
|
|
1953
1953
|
}
|
|
1954
1954
|
|
|
1955
|
-
var styles$t = {"card":"cw-card-module__card__HJUT0","
|
|
1955
|
+
var styles$t = {"card":"cw-card-module__card__HJUT0","content":"cw-card-module__content__ma9qy","clickable":"cw-card-module__clickable__Y-V3X","disabled":"cw-card-module__disabled__0wHh1","headerContent":"cw-card-module__headerContent__x4Jfl","footerTags":"cw-card-module__footerTags__80sSW"};
|
|
1956
1956
|
|
|
1957
1957
|
/**
|
|
1958
1958
|
* CwCard - A simple card component for displaying content in a contained format
|
|
@@ -1965,8 +1965,8 @@ var styles$t = {"card":"cw-card-module__card__HJUT0","clickable":"cw-card-module
|
|
|
1965
1965
|
* onDelete={confirmDeletion}
|
|
1966
1966
|
* footer="Last updated: 2 days ago"
|
|
1967
1967
|
* chips={[
|
|
1968
|
-
* { label: 'Important',
|
|
1969
|
-
* { label: 'Custom',
|
|
1968
|
+
* { label: 'Important', color: 'danger' },
|
|
1969
|
+
* { label: 'Custom', color: 'custom', customColor: '#8a2be2' }
|
|
1970
1970
|
* ]}
|
|
1971
1971
|
* >
|
|
1972
1972
|
* <p>This is the main content of the card.</p>
|
|
@@ -2004,7 +2004,7 @@ const CwCard = ({ id, title, subtitle, alignment = 'center', children, footer, o
|
|
|
2004
2004
|
role: 'button',
|
|
2005
2005
|
tabIndex: 0,
|
|
2006
2006
|
onClick: handleClick,
|
|
2007
|
-
}), "data-variant": variant, "data-direction": resolvedDirection, "aria-busy": isLoading || undefined, children: [isLoading ? (jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx("div", { className: styles$t.headerContent, "data-align": resolvedAlign, children: jsxRuntime.jsx(CwSkeleton, { width: "8rem", height: "1.5em" }) }), resolvedDirection === "column" && ActionsComponent] })) : (hasHeader && (jsxRuntime.jsxs("header", { children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: styles$t.headerContent, "data-align": resolvedAlign, children: [title && jsxRuntime.jsx("h5", { children: title }), subtitle && jsxRuntime.jsx("strong", { children: subtitle })] })), resolvedDirection === "column" && ActionsComponent] }))), jsxRuntime.jsx("div", { className: styles$t.content, children: isLoading ? jsxRuntime.jsx(CwSkeleton, { count: normalizeSkeletonCount(skeletonLines, 3) }) : children }), hasFooter && (isLoading ? (jsxRuntime.jsx("footer", { children: jsxRuntime.jsx("div", { className: styles$t.footerTags, children: jsxRuntime.jsx(CwSkeleton, { variant: "rect", width: "4rem", height: "1.5em", radius: "1rem" }) }) })) : (jsxRuntime.jsxs("footer", { children: [hasChips && (jsxRuntime.jsx("div", { className: styles$t.footerTags, children: chips.map((chip, index) => (jsxRuntime.jsx(CwChip, { label: chip.label, colorScheme: chip.colorScheme, className: styles$t.chip, ...(chip.customColor && { customColor: chip.customColor }), ...(chip.variant && { variant: chip.variant }), ...(chip.icon && { icon: chip.icon }) }, index))) })), footer && (jsxRuntime.jsx("div", { className: styles$t.footerContent, children: footer }))] }))), resolvedDirection === "row" && ActionsComponent] }));
|
|
2007
|
+
}), "data-variant": variant, "data-direction": resolvedDirection, "aria-busy": isLoading || undefined, children: [isLoading ? (jsxRuntime.jsxs("header", { children: [jsxRuntime.jsx("div", { className: styles$t.headerContent, "data-align": resolvedAlign, children: jsxRuntime.jsx(CwSkeleton, { width: "8rem", height: "1.5em" }) }), resolvedDirection === "column" && ActionsComponent] })) : (hasHeader && (jsxRuntime.jsxs("header", { children: [(title || subtitle) && (jsxRuntime.jsxs("div", { className: styles$t.headerContent, "data-align": resolvedAlign, children: [title && jsxRuntime.jsx("h5", { children: title }), subtitle && jsxRuntime.jsx("strong", { children: subtitle })] })), resolvedDirection === "column" && ActionsComponent] }))), jsxRuntime.jsx("div", { className: styles$t.content, children: isLoading ? jsxRuntime.jsx(CwSkeleton, { count: normalizeSkeletonCount(skeletonLines, 3) }) : children }), hasFooter && (isLoading ? (jsxRuntime.jsx("footer", { children: jsxRuntime.jsx("div", { className: styles$t.footerTags, children: jsxRuntime.jsx(CwSkeleton, { variant: "rect", width: "4rem", height: "1.5em", radius: "1rem" }) }) })) : (jsxRuntime.jsxs("footer", { children: [hasChips && (jsxRuntime.jsx("div", { className: styles$t.footerTags, children: chips.map((chip, index) => (jsxRuntime.jsx(CwChip, { label: chip.label, color: chip.color, colorScheme: chip.colorScheme, className: styles$t.chip, ...(chip.customColor && { customColor: chip.customColor }), ...(chip.variant && { variant: chip.variant }), ...(chip.icon && { icon: chip.icon }) }, index))) })), footer && (jsxRuntime.jsx("div", { className: styles$t.footerContent, children: footer }))] }))), resolvedDirection === "row" && ActionsComponent] }));
|
|
2008
2008
|
};
|
|
2009
2009
|
|
|
2010
2010
|
var styles$s = {"cardContainer":"cw-card-list-module__cardContainer__l3YEh","pagination":"cw-card-list-module__pagination__5Ay78","pageInfo":"cw-card-list-module__pageInfo__uiMel","emptyState":"cw-card-list-module__emptyState__RlqiS"};
|
|
@@ -2221,9 +2221,6 @@ function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10,
|
|
|
2221
2221
|
return acc;
|
|
2222
2222
|
}, {}));
|
|
2223
2223
|
const [selectedKeys, setSelectedKeys] = React.useState(new Set(rowSelection?.selectedRowKeys || []));
|
|
2224
|
-
React.useEffect(() => {
|
|
2225
|
-
setCurrentPage(1);
|
|
2226
|
-
}, [data]);
|
|
2227
2224
|
React.useEffect(() => {
|
|
2228
2225
|
setSelectedKeys(new Set(rowSelection?.selectedRowKeys || []));
|
|
2229
2226
|
}, [rowSelection?.selectedRowKeys]);
|
|
@@ -2309,20 +2306,27 @@ function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10,
|
|
|
2309
2306
|
return newSet;
|
|
2310
2307
|
});
|
|
2311
2308
|
}, [rowSelection, rowKey, sortedData]);
|
|
2309
|
+
const totalPages = React.useMemo(() => {
|
|
2310
|
+
return pagination ? Math.ceil(sortedData.length / localItemsPerPage) : 1;
|
|
2311
|
+
}, [sortedData, localItemsPerPage, pagination]);
|
|
2312
|
+
// Keep the page when data changes (e.g. a row was edited); only clamp it when it no longer exists.
|
|
2313
|
+
// Derived in render so a shrunk data set never shows an empty page for a frame.
|
|
2314
|
+
const page = Math.min(currentPage, Math.max(1, totalPages));
|
|
2315
|
+
React.useEffect(() => {
|
|
2316
|
+
if (page !== currentPage)
|
|
2317
|
+
setCurrentPage(page);
|
|
2318
|
+
}, [page, currentPage]);
|
|
2312
2319
|
const paginatedData = React.useMemo(() => {
|
|
2313
2320
|
if (!sortedData)
|
|
2314
2321
|
return [];
|
|
2315
2322
|
if (!pagination)
|
|
2316
2323
|
return sortedData;
|
|
2317
|
-
const start = (
|
|
2324
|
+
const start = (page - 1) * localItemsPerPage;
|
|
2318
2325
|
return sortedData.slice(start, start + localItemsPerPage);
|
|
2319
|
-
}, [sortedData,
|
|
2320
|
-
const
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
const handlePageChange = (page) => {
|
|
2324
|
-
if (page >= 1 && page <= totalPages)
|
|
2325
|
-
setCurrentPage(page);
|
|
2326
|
+
}, [sortedData, page, localItemsPerPage, pagination]);
|
|
2327
|
+
const handlePageChange = (target) => {
|
|
2328
|
+
if (target >= 1 && target <= totalPages)
|
|
2329
|
+
setCurrentPage(target);
|
|
2326
2330
|
};
|
|
2327
2331
|
const startResize = (e, key) => {
|
|
2328
2332
|
e.preventDefault();
|
|
@@ -2383,7 +2387,7 @@ function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10,
|
|
|
2383
2387
|
? "sortable"
|
|
2384
2388
|
: sortConfig.direction === "asc"
|
|
2385
2389
|
? "sortable-asc"
|
|
2386
|
-
: "sortable-desc" }))] }), jsxRuntime.jsx("span", { onMouseDown: (e) => startResize(e, col.key), className: "th-column-resizer" })] }, col.key)))] }) }), jsxRuntime.jsx("tbody", { children: renderTableBody() })] }), pagination && data.length > pageSizeOptions[0] && (jsxRuntime.jsxs("footer", { className: "cw-table-pagination", children: [jsxRuntime.jsxs("div", { className: "cw-table-pagination-size", children: [jsxRuntime.jsx(CwIcon, { iconId: "list" }), jsxRuntime.jsx("select", { value: localItemsPerPage, onChange: handleItemsPerPageChange, children: pageSizeOptions.map(size => (jsxRuntime.jsx("option", { value: size, children: pageLabel ? `${size} / ${pageLabel}` : size }, size))) })] }), jsxRuntime.jsxs("div", { className: "cw-table-pagination-nav", children: [jsxRuntime.jsx(CwButton, { onClick: () => handlePageChange(1), disabled:
|
|
2390
|
+
: "sortable-desc" }))] }), jsxRuntime.jsx("span", { onMouseDown: (e) => startResize(e, col.key), className: "th-column-resizer" })] }, col.key)))] }) }), jsxRuntime.jsx("tbody", { children: renderTableBody() })] }), pagination && data.length > pageSizeOptions[0] && (jsxRuntime.jsxs("footer", { className: "cw-table-pagination", children: [jsxRuntime.jsxs("div", { className: "cw-table-pagination-size", children: [jsxRuntime.jsx(CwIcon, { iconId: "list" }), jsxRuntime.jsx("select", { value: localItemsPerPage, onChange: handleItemsPerPageChange, children: pageSizeOptions.map(size => (jsxRuntime.jsx("option", { value: size, children: pageLabel ? `${size} / ${pageLabel}` : size }, size))) })] }), jsxRuntime.jsxs("div", { className: "cw-table-pagination-nav", children: [jsxRuntime.jsx(CwButton, { onClick: () => handlePageChange(1), disabled: page === 1 || totalPages <= 1, variant: "icon", icon: "chevron-left-double" }), jsxRuntime.jsx(CwButton, { onClick: () => handlePageChange(page - 1), disabled: page === 1 || totalPages <= 1, variant: "icon", icon: "chevron-left" }), jsxRuntime.jsx("input", { type: "text", inputMode: "numeric", value: totalPages === 0 ? 0 : page, disabled: totalPages === 0, onChange: (e) => {
|
|
2387
2391
|
const value = parseInt(e.target.value, 10);
|
|
2388
2392
|
if (!isNaN(value))
|
|
2389
2393
|
handlePageChange(value);
|
|
@@ -2392,7 +2396,7 @@ function CwTable({ columns, data, pagination = false, pageSizeOptions = [5, 10,
|
|
|
2392
2396
|
if (isNaN(value) || value < 1 || value > totalPages) {
|
|
2393
2397
|
handlePageChange(1);
|
|
2394
2398
|
}
|
|
2395
|
-
}, min: 1, max: totalPages }), jsxRuntime.jsx("span", { children: "/" }), jsxRuntime.jsx("span", { children: totalPages }), jsxRuntime.jsx(CwButton, { onClick: () => handlePageChange(
|
|
2399
|
+
}, min: 1, max: totalPages }), jsxRuntime.jsx("span", { children: "/" }), jsxRuntime.jsx("span", { children: totalPages }), jsxRuntime.jsx(CwButton, { onClick: () => handlePageChange(page + 1), disabled: page === totalPages || totalPages <= 1, variant: "icon", icon: "chevron-right" }), jsxRuntime.jsx(CwButton, { onClick: () => handlePageChange(totalPages), disabled: page === totalPages || totalPages <= 1, variant: "icon", icon: "chevron-right-double" })] })] }))] }));
|
|
2396
2400
|
}
|
|
2397
2401
|
|
|
2398
2402
|
var styles$q = {"dropIndicator":"cw-sortable-table-module__dropIndicator__ov-Jz","dragging":"cw-sortable-table-module__dragging__MrLrz","saveBar":"cw-sortable-table-module__saveBar__3OdoZ cw-flex-row cw-align-center-center cw-gap-small"};
|
|
@@ -5222,6 +5226,11 @@ function CwTagSelector({ id, options, value, onChange, labelProps, iconProps, al
|
|
|
5222
5226
|
isOpen: open,
|
|
5223
5227
|
onClose: () => { setOpen(false); setFocusedIndex(-1); },
|
|
5224
5228
|
});
|
|
5229
|
+
// Disabling while the panel is open closes it (state adjusted during render, no effect pass).
|
|
5230
|
+
if (disabled && open) {
|
|
5231
|
+
setOpen(false);
|
|
5232
|
+
setFocusedIndex(-1);
|
|
5233
|
+
}
|
|
5225
5234
|
const selectedSet = React.useMemo(() => new Set(value), [value]);
|
|
5226
5235
|
const filtered = React.useMemo(() => {
|
|
5227
5236
|
if (!search)
|
|
@@ -5231,17 +5240,23 @@ function CwTagSelector({ id, options, value, onChange, labelProps, iconProps, al
|
|
|
5231
5240
|
}, [options, selectedSet, search]);
|
|
5232
5241
|
const selectedOptions = React.useMemo(() => value.map(v => options.find(o => o.value === v)).filter(Boolean), [value, options]);
|
|
5233
5242
|
const handleSelect = React.useCallback((optionValue) => {
|
|
5243
|
+
if (disabled)
|
|
5244
|
+
return;
|
|
5234
5245
|
onChange([...value, optionValue]);
|
|
5235
5246
|
setSearch("");
|
|
5236
5247
|
setFocusedIndex(-1);
|
|
5237
5248
|
inputRef.current?.focus();
|
|
5238
|
-
}, [value, onChange]);
|
|
5249
|
+
}, [disabled, value, onChange]);
|
|
5239
5250
|
const handleRemove = React.useCallback((optionValue) => {
|
|
5251
|
+
if (disabled)
|
|
5252
|
+
return;
|
|
5240
5253
|
onChange(value.filter(v => v !== optionValue));
|
|
5241
5254
|
inputRef.current?.focus();
|
|
5242
|
-
}, [value, onChange]);
|
|
5255
|
+
}, [disabled, value, onChange]);
|
|
5243
5256
|
const allSelected = options.length > 0 && options.every(o => selectedSet.has(o.value));
|
|
5244
5257
|
const handleToggleAll = React.useCallback(() => {
|
|
5258
|
+
if (disabled)
|
|
5259
|
+
return;
|
|
5245
5260
|
if (allSelected) {
|
|
5246
5261
|
onChange([]);
|
|
5247
5262
|
}
|
|
@@ -5251,7 +5266,7 @@ function CwTagSelector({ id, options, value, onChange, labelProps, iconProps, al
|
|
|
5251
5266
|
setSearch("");
|
|
5252
5267
|
setFocusedIndex(-1);
|
|
5253
5268
|
inputRef.current?.focus();
|
|
5254
|
-
}, [allSelected, options, onChange]);
|
|
5269
|
+
}, [disabled, allSelected, options, onChange]);
|
|
5255
5270
|
const handleInputChange = React.useCallback((e) => {
|
|
5256
5271
|
setSearch(e.currentTarget.value);
|
|
5257
5272
|
if (!open)
|
|
@@ -5263,6 +5278,8 @@ function CwTagSelector({ id, options, value, onChange, labelProps, iconProps, al
|
|
|
5263
5278
|
setOpen(true);
|
|
5264
5279
|
}, [disabled]);
|
|
5265
5280
|
const handleKeyDown = React.useCallback((e) => {
|
|
5281
|
+
if (disabled)
|
|
5282
|
+
return;
|
|
5266
5283
|
if (e.key === "Backspace" && !search && value.length > 0) {
|
|
5267
5284
|
onChange(value.slice(0, -1));
|
|
5268
5285
|
return;
|
|
@@ -5307,7 +5324,7 @@ function CwTagSelector({ id, options, value, onChange, labelProps, iconProps, al
|
|
|
5307
5324
|
e.preventDefault();
|
|
5308
5325
|
setFocusedIndex(prev => (prev > 0 ? prev - 1 : 0));
|
|
5309
5326
|
}
|
|
5310
|
-
}, [open, search, value, filtered, focusedIndex, onChange, handleSelect]);
|
|
5327
|
+
}, [disabled, open, search, value, filtered, focusedIndex, onChange, handleSelect]);
|
|
5311
5328
|
// Scroll focused item into view
|
|
5312
5329
|
React.useEffect(() => {
|
|
5313
5330
|
if (focusedIndex >= 0 && listRef.current) {
|
|
@@ -9211,7 +9228,7 @@ function getStartEnd(day) {
|
|
|
9211
9228
|
};
|
|
9212
9229
|
}
|
|
9213
9230
|
|
|
9214
|
-
var styles$2 = {"hide-scrollbar":"new-scheduler-module__hide-scrollbar__33GG9","scheduler-event":"new-scheduler-module__scheduler-event__gphwn","scheduler-event-container":"new-scheduler-module__scheduler-event-container__-h1xm","time-marker":"new-scheduler-module__time-marker__2BejU","color-bars":"new-scheduler-module__color-bars__MhMF7","scheduler-event-text":"new-scheduler-module__scheduler-event-text__zjvd7"};
|
|
9231
|
+
var styles$2 = {"hide-scrollbar":"new-scheduler-module__hide-scrollbar__33GG9","scheduler-event":"new-scheduler-module__scheduler-event__gphwn","scheduler-event-container":"new-scheduler-module__scheduler-event-container__-h1xm","time-marker":"new-scheduler-module__time-marker__2BejU","underlay":"new-scheduler-module__underlay__RVCnV","label-halo":"new-scheduler-module__label-halo__84c7e","corner-marker":"new-scheduler-module__corner-marker__w7o90","color-bars":"new-scheduler-module__color-bars__MhMF7","scheduler-event-text":"new-scheduler-module__scheduler-event-text__zjvd7"};
|
|
9215
9232
|
|
|
9216
9233
|
const BackgroundEvent = ({ value, heightRem }) => {
|
|
9217
9234
|
const backColor = getHSLColor(value.color, value.alpha ?? 0.5);
|
|
@@ -9412,7 +9429,7 @@ const DefaultRowHeader = ({ value, width, onEvent }) => {
|
|
|
9412
9429
|
return (jsxRuntime.jsxs("div", { style: {
|
|
9413
9430
|
width: width,
|
|
9414
9431
|
flexShrink: 0,
|
|
9415
|
-
|
|
9432
|
+
background: value.highlightColor,
|
|
9416
9433
|
}, onClick: (_) => {
|
|
9417
9434
|
onEvent(new OnClickRowHeader(value.rowId));
|
|
9418
9435
|
}, className: styles$1["scheduler-row-header"], children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("strong", { children: value.title }), value.title2 && jsxRuntime.jsxs("span", { children: ["-", value.title2] }), " ", jsxRuntime.jsx("strong", { children: value.subtitle })] }), value.subtitle && jsxRuntime.jsxs("div", { style: { opacity: 0.5 }, children: [value.title3 && jsxRuntime.jsxs("span", { className: styles$1["scheduler-crewmember-functions"], children: ["(", value.title3, ")"] }), value.subtitle2 && jsxRuntime.jsxs("span", { children: ["-", value.subtitle2] })] })] }));
|
|
@@ -9505,7 +9522,7 @@ const SchedulerEvent = ({ value, heightRem, onEvent, maxEventHeightRem }) => {
|
|
|
9505
9522
|
height: `calc(${effectiveHeight}rem - 4px)`,
|
|
9506
9523
|
opacity: eventTransparent ? 0.5 : 1,
|
|
9507
9524
|
...value.style,
|
|
9508
|
-
}, className: styles$2["scheduler-event"], children: [jsxRuntime.jsxs("div", { style: {
|
|
9525
|
+
}, className: styles$2["scheduler-event"], "data-underlay": value.underlay ? true : undefined, children: [value.underlay && jsxRuntime.jsx("div", { className: styles$2["underlay"], children: value.underlay }), jsxRuntime.jsxs("div", { style: {
|
|
9509
9526
|
display: "flex",
|
|
9510
9527
|
flexDirection: "row",
|
|
9511
9528
|
alignItems: "stretch",
|
|
@@ -9522,20 +9539,26 @@ const SchedulerEvent = ({ value, heightRem, onEvent, maxEventHeightRem }) => {
|
|
|
9522
9539
|
alignItems: "center",
|
|
9523
9540
|
whiteSpace: "nowrap",
|
|
9524
9541
|
color: textColor,
|
|
9525
|
-
}, children: value.icons }), jsxRuntime.jsx("span", { style: {
|
|
9542
|
+
}, children: value.icons }), jsxRuntime.jsx("span", { className: value.underlay ? styles$2["label-halo"] : undefined, style: {
|
|
9526
9543
|
padding: "0.1rem",
|
|
9527
9544
|
color: textColor,
|
|
9528
9545
|
display: "flex",
|
|
9529
9546
|
flex: 1,
|
|
9530
9547
|
alignItems: "center",
|
|
9531
9548
|
width: "100%",
|
|
9532
|
-
|
|
9549
|
+
...(value.underlay && { "--label-halo-color": backColor }),
|
|
9550
|
+
}, children: value.rectangleColors && value.rectangleColors.length > 0 ? (jsxRuntime.jsx("div", { className: styles$2["color-bars"], children: value.rectangleColors.map((item, i) => (jsxRuntime.jsx("div", { style: { backgroundColor: item } }, value.id + "_" + i))) })) : (value.label ?? value.name) })] }), value.isResizable && (jsxRuntime.jsx(EventSideDrag, { heightRem: effectiveHeight * 0.7, onStartEvent: () => {
|
|
9533
9551
|
onEvent(new OnRightDragStart(value.id));
|
|
9534
9552
|
} }))] }), value.primaryTimeMarkerColor && (jsxRuntime.jsx("div", { className: styles$2["time-marker"], style: {
|
|
9535
9553
|
backgroundColor: value.primaryTimeMarkerColor,
|
|
9536
9554
|
} })), value.secondaryTimeMarkerColor && (jsxRuntime.jsx("div", { className: styles$2["time-marker"], style: {
|
|
9537
9555
|
backgroundColor: value.secondaryTimeMarkerColor,
|
|
9538
|
-
} }))] }) }) }, value.id) })]
|
|
9556
|
+
} }))] }) }) }, value.id) }), value.cornerMarker && (jsxRuntime.jsx("div", { className: styles$2["corner-marker"], style: {
|
|
9557
|
+
top: `${topOffsetPx}px`,
|
|
9558
|
+
left: `${value.left}%`,
|
|
9559
|
+
width: `${value.width}%`,
|
|
9560
|
+
height: `calc(${effectiveHeight}rem - 4px)`,
|
|
9561
|
+
}, children: jsxRuntime.jsx("span", { "data-interactive": value.cornerMarker.tooltip ? true : undefined, "data-pulse": value.cornerMarker.pulse ? true : undefined, children: value.cornerMarker.tooltip ? (jsxRuntime.jsx(CwTooltipNew, { content: value.cornerMarker.tooltip, position: "top", showDelay: 200, hide: isOnDrag, displayInline: true, children: jsxRuntime.jsx(CwBadge, { color: value.cornerMarker.color, size: "medium" }) })) : (jsxRuntime.jsx(CwBadge, { color: value.cornerMarker.color, size: "medium" })) }) }))] }));
|
|
9539
9562
|
};
|
|
9540
9563
|
|
|
9541
9564
|
const SchedulerRow = React.memo((props) => {
|