@cwellt_software/cwellt-reactjs-lib 1.6.0 → 1.6.1
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/content/icons/IconLibrary.stories.tsx +18 -18
- package/dist/index.cjs.js +65 -20
- package/dist/index.css +1 -1
- package/dist/index.es.js +65 -20
- package/dist/src/common/functions/colorManipulation.d.ts.map +1 -1
- package/dist/src/common/functions/lazy.d.ts +13 -0
- package/dist/src/common/functions/lazy.d.ts.map +1 -0
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/DivisionLine.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/TimeLine.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/components/timeline/WeekEndLine.d.ts.map +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsToInnerRows.d.ts +1 -1
- package/dist/src/components/custom/scheduler-new/presentation/logic/separateEventsToInnerRows.d.ts.map +1 -1
- package/dist/src/storybook/componentMappings.d.ts +15 -5
- package/dist/src/storybook/componentMappings.d.ts.map +1 -1
- package/dist/test/common/functions/colorManipulation.test.d.ts +2 -0
- package/dist/test/common/functions/colorManipulation.test.d.ts.map +1 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/separateEventsToInnerRows.test.d.ts +2 -0
- package/dist/test/components/custom/new-scheduler/presentation/logic/separateEventsToInnerRows.test.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/deprecated/components/MultiSelect_deprecated_.d.ts +0 -24
- package/dist/deprecated/components/MultiSelect_deprecated_.d.ts.map +0 -1
- package/dist/deprecated/components/dropdown/CwDropdownContainer.d.ts +0 -17
- package/dist/deprecated/components/dropdown/CwDropdownContainer.d.ts.map +0 -1
- package/dist/deprecated/components/multiselect/CwHeadFilter.d.ts +0 -17
- package/dist/deprecated/components/multiselect/CwHeadFilter.d.ts.map +0 -1
- package/dist/deprecated/components/multiselect/CwMultiselect.d.ts +0 -13
- package/dist/deprecated/components/multiselect/CwMultiselect.d.ts.map +0 -1
- package/dist/deprecated/components/multiselect/CwOptionList.d.ts +0 -14
- package/dist/deprecated/components/multiselect/CwOptionList.d.ts.map +0 -1
- package/dist/deprecated/components/tag/CwTag.d.ts +0 -15
- package/dist/deprecated/components/tag/CwTag.d.ts.map +0 -1
- package/dist/playground/main.d.ts +0 -4
- package/dist/playground/main.d.ts.map +0 -1
- package/dist/src/components/control/action/button/CwButtonBadge.d.ts +0 -63
- package/dist/src/components/control/action/button/CwButtonBadge.d.ts.map +0 -1
- package/dist/src/components/control/action/button/CwPopoverButton.d.ts +0 -33
- package/dist/src/components/control/action/button/CwPopoverButton.d.ts.map +0 -1
- package/dist/src/components/control/action/contextual-menu/CwContextualMenu.d.ts +0 -29
- package/dist/src/components/control/action/contextual-menu/CwContextualMenu.d.ts.map +0 -1
- package/dist/src/components/control/action/search/CwAsyncSearch.d.ts +0 -102
- package/dist/src/components/control/action/search/CwAsyncSearch.d.ts.map +0 -1
- package/dist/src/components/control/action/tooltip-dialog/CwTooltipDialog.d.ts +0 -19
- package/dist/src/components/control/action/tooltip-dialog/CwTooltipDialog.d.ts.map +0 -1
- package/dist/src/components/control/choice/deprecated/CwDropdown.d.ts +0 -19
- package/dist/src/components/control/choice/deprecated/CwDropdown.d.ts.map +0 -1
- package/dist/src/components/control/choice/deprecated/CwDropdownNavigation.d.ts +0 -21
- package/dist/src/components/control/choice/deprecated/CwDropdownNavigation.d.ts.map +0 -1
- package/dist/src/components/control/choice/deprecated/MultiSelect_deprecated_.d.ts +0 -24
- package/dist/src/components/control/choice/deprecated/MultiSelect_deprecated_.d.ts.map +0 -1
- package/dist/src/components/control/choice/dropdown/CwDropdown.d.ts +0 -19
- package/dist/src/components/control/choice/dropdown/CwDropdown.d.ts.map +0 -1
- package/dist/src/components/control/choice/dropdown/CwDropdownContainer.d.ts +0 -17
- package/dist/src/components/control/choice/dropdown/CwDropdownContainer.d.ts.map +0 -1
- package/dist/src/components/control/choice/dropdown/CwDropdownNavigation.d.ts +0 -21
- package/dist/src/components/control/choice/dropdown/CwDropdownNavigation.d.ts.map +0 -1
- package/dist/src/components/control/choice/multiselect/CwHeadFilter.d.ts +0 -17
- package/dist/src/components/control/choice/multiselect/CwHeadFilter.d.ts.map +0 -1
- package/dist/src/components/control/choice/multiselect/CwMultiselect.d.ts +0 -13
- package/dist/src/components/control/choice/multiselect/CwMultiselect.d.ts.map +0 -1
- package/dist/src/components/control/choice/multiselect/CwOptionList.d.ts +0 -14
- package/dist/src/components/control/choice/multiselect/CwOptionList.d.ts.map +0 -1
- package/dist/src/components/control/input/new-dates/CwDateTimePicker2.d.ts +0 -47
- package/dist/src/components/control/input/new-dates/CwDateTimePicker2.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/CwSchedulerComp2.d.ts +0 -24
- package/dist/src/components/custom/scheduler-temporal/CwSchedulerComp2.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/CwSuperSchedulerComp.d.ts +0 -86
- package/dist/src/components/custom/scheduler-temporal/CwSuperSchedulerComp.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/EventRender.d.ts +0 -10
- package/dist/src/components/custom/scheduler-temporal/components/EventRender.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/ResourceListRender.d.ts +0 -20
- package/dist/src/components/custom/scheduler-temporal/components/ResourceListRender.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/ResourceRender.d.ts +0 -14
- package/dist/src/components/custom/scheduler-temporal/components/ResourceRender.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/DayHeader.d.ts +0 -11
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/DayHeader.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/MonthHeader.d.ts +0 -11
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/MonthHeader.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/MyDaysHeader.d.ts +0 -13
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/MyDaysHeader.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/WeekHeader.d.ts +0 -11
- package/dist/src/components/custom/scheduler-temporal/components/day_headers/WeekHeader.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/resources_title_list/ResourcesTitleList.d.ts +0 -14
- package/dist/src/components/custom/scheduler-temporal/components/resources_title_list/ResourcesTitleList.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_content_area/SchedulerContentArea.d.ts +0 -23
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_content_area/SchedulerContentArea.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_header/SchedulerHeader.d.ts +0 -8
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_header/SchedulerHeader.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_timeline/SchedulerTimeLine.d.ts +0 -12
- package/dist/src/components/custom/scheduler-temporal/components/scheduler_timeline/SchedulerTimeLine.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeader.d.ts +0 -12
- package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeader.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeaderRow.d.ts +0 -10
- package/dist/src/components/custom/scheduler-temporal/components/time_headers/TimeHeaderRow.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/components/time_line/TimeLine.d.ts +0 -12
- package/dist/src/components/custom/scheduler-temporal/components/time_line/TimeLine.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/dates/addMinutesToDateFromPx.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/dates/addMinutesToDateFromPx.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDates.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDates.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDatesWithoutCeil.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/dates/daysBetweenTwoDatesWithoutCeil.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getFormatedTimeForHeader.d.ts +0 -7
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getFormatedTimeForHeader.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getMonthHeaderData.d.ts +0 -10
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getMonthHeaderData.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getUtcToday.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getUtcToday.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getWeekHeaderDataFromWeekRange.d.ts +0 -7
- package/dist/src/components/custom/scheduler-temporal/logic/dates/getWeekHeaderDataFromWeekRange.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/dates/listOfDatesToWeeks.d.ts +0 -8
- package/dist/src/components/custom/scheduler-temporal/logic/dates/listOfDatesToWeeks.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisionType.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisionType.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisions.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/divisions/calculateDivisions.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterAndProcessResources.d.ts +0 -4
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterAndProcessResources.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterEvents.d.ts +0 -3
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterEvents.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterResources.d.ts +0 -3
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/filterResources.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/hasSameProperties.d.ts +0 -3
- package/dist/src/components/custom/scheduler-temporal/logic/filtering/hasSameProperties.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/onDrop/OnDrop.d.ts +0 -13
- package/dist/src/components/custom/scheduler-temporal/logic/onDrop/OnDrop.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/getHeightLineScheduler.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/getHeightLineScheduler.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/getPixelsForEvent.d.ts +0 -7
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/getPixelsForEvent.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightScheduler.d.ts +0 -3
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightScheduler.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightSchedulerPinned.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/pixels/heightSchedulerPinned.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/doubleClickOnResource.d.ts +0 -4
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/doubleClickOnResource.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handlePropChanges.d.ts +0 -6
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handlePropChanges.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handleResourceChange.d.ts +0 -5
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/handleResourceChange.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDragOver.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDragOver.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDropEventToResource.d.ts +0 -5
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onDropEventToResource.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onResizeEvent.d.ts +0 -4
- package/dist/src/components/custom/scheduler-temporal/logic/state_handle/onResizeEvent.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/strings/compareStrings.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/strings/compareStrings.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/strings/getGUID.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/strings/getGUID.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/ui/checkIfSlotAvailable.d.ts +0 -3
- package/dist/src/components/custom/scheduler-temporal/logic/ui/checkIfSlotAvailable.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getEventsOfResource.d.ts +0 -6
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getEventsOfResource.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getHasPropsChanged.d.ts +0 -4
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getHasPropsChanged.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getTimeHeaders.d.ts +0 -2
- package/dist/src/components/custom/scheduler-temporal/logic/ui/getTimeHeaders.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/ui/isAllowedToMove.d.ts +0 -3
- package/dist/src/components/custom/scheduler-temporal/logic/ui/isAllowedToMove.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/ui/shouldTriggerScroll.d.ts +0 -4
- package/dist/src/components/custom/scheduler-temporal/logic/ui/shouldTriggerScroll.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/logic/ui/updateResourceVisibility.d.ts +0 -3
- package/dist/src/components/custom/scheduler-temporal/logic/ui/updateResourceVisibility.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/state/CblDragAndDrop.d.ts +0 -11
- package/dist/src/components/custom/scheduler-temporal/state/CblDragAndDrop.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/state/CwSchedulerProps.d.ts +0 -43
- package/dist/src/components/custom/scheduler-temporal/state/CwSchedulerProps.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/state/Resource.d.ts +0 -14
- package/dist/src/components/custom/scheduler-temporal/state/Resource.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/state/State.d.ts +0 -25
- package/dist/src/components/custom/scheduler-temporal/state/State.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/state/cblEvent.d.ts +0 -18
- package/dist/src/components/custom/scheduler-temporal/state/cblEvent.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/state/cblEventCompProps.d.ts +0 -7
- package/dist/src/components/custom/scheduler-temporal/state/cblEventCompProps.d.ts.map +0 -1
- package/dist/src/components/custom/scheduler-temporal/state/resourceCompProps2.d.ts +0 -6
- package/dist/src/components/custom/scheduler-temporal/state/resourceCompProps2.d.ts.map +0 -1
- package/dist/src/components/display/data/accordion/CwAccordionContainer.stories.d.ts +0 -27
- package/dist/src/components/display/data/accordion/CwAccordionContainer.stories.d.ts.map +0 -1
- package/dist/src/components/display/graphics/skeleton/CwSkeletonCard.d.ts +0 -21
- package/dist/src/components/display/graphics/skeleton/CwSkeletonCard.d.ts.map +0 -1
- package/dist/src/components/display/text/tag/CwTag.d.ts +0 -15
- package/dist/src/components/display/text/tag/CwTag.d.ts.map +0 -1
- package/dist/src/components/display/text/tooltip/CwTooltip.d.ts +0 -11
- package/dist/src/components/display/text/tooltip/CwTooltip.d.ts.map +0 -1
- package/dist/src/components/layout/align/CwAlign.stories.d.ts +0 -439
- package/dist/src/components/layout/align/CwAlign.stories.d.ts.map +0 -1
- package/dist/src/components/layout/modal/legacy/cw_modal_confirm.d.ts +0 -16
- package/dist/src/components/layout/modal/legacy/cw_modal_confirm.d.ts.map +0 -1
- package/dist/src/components/layout/modal/legacy/cw_modal_iframe.d.ts +0 -21
- package/dist/src/components/layout/modal/legacy/cw_modal_iframe.d.ts.map +0 -1
- package/dist/src/playground/pages/ShadowRecipesPage.d.ts +0 -3
- package/dist/src/playground/pages/ShadowRecipesPage.d.ts.map +0 -1
- package/dist/test/components/display/graphics/skeleton/CwSkeletonCard.test.d.ts +0 -2
- package/dist/test/components/display/graphics/skeleton/CwSkeletonCard.test.d.ts.map +0 -1
- package/dist/test/jest.setup.d.ts +0 -2
- package/dist/test/jest.setup.d.ts.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
-
import { IconLibraryPage } from "../../playground/pages/IconLibraryPage";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The same page the playground shows, mounted here so the catalogue is browsable next to the
|
|
6
|
-
* component docs: every glyph of the icon font, grouped by category, searchable by name or
|
|
7
|
-
* codepoint, with style variants cross-linked. Click a card to copy its id in the selected format.
|
|
8
|
-
*/
|
|
9
|
-
const meta = {
|
|
10
|
-
title: "Foundations/Icon Library",
|
|
11
|
-
component: IconLibraryPage,
|
|
12
|
-
parameters: { layout: "padded", controls: { disable: true } },
|
|
13
|
-
} satisfies Meta<typeof IconLibraryPage>;
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
export const All: Story = {};
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { IconLibraryPage } from "../../playground/pages/IconLibraryPage";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The same page the playground shows, mounted here so the catalogue is browsable next to the
|
|
6
|
+
* component docs: every glyph of the icon font, grouped by category, searchable by name or
|
|
7
|
+
* codepoint, with style variants cross-linked. Click a card to copy its id in the selected format.
|
|
8
|
+
*/
|
|
9
|
+
const meta = {
|
|
10
|
+
title: "Foundations/Icon Library",
|
|
11
|
+
component: IconLibraryPage,
|
|
12
|
+
parameters: { layout: "padded", controls: { disable: true } },
|
|
13
|
+
} satisfies Meta<typeof IconLibraryPage>;
|
|
14
|
+
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
|
|
18
|
+
export const All: Story = {};
|
package/dist/index.cjs.js
CHANGED
|
@@ -112,13 +112,27 @@ function colorToHSL(color) {
|
|
|
112
112
|
l: Math.round(l * 100)
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
|
+
const HEX_CACHE_LIMIT = 500;
|
|
116
|
+
const hexCache = new Map();
|
|
117
|
+
let canvasContext = null;
|
|
115
118
|
function colorToHEX(color) {
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
const cached = hexCache.get(color);
|
|
120
|
+
if (cached !== undefined)
|
|
121
|
+
return cached;
|
|
122
|
+
if (!canvasContext) {
|
|
123
|
+
canvasContext = document.createElement('canvas').getContext('2d');
|
|
124
|
+
if (!canvasContext)
|
|
125
|
+
throw new Error('Could not create canvas context');
|
|
126
|
+
}
|
|
127
|
+
// A reused context keeps its previous fillStyle when the new color is invalid; reset it to the
|
|
128
|
+
// fresh-canvas default so an invalid color still gives black instead of the last valid color.
|
|
129
|
+
canvasContext.fillStyle = '#000000';
|
|
130
|
+
canvasContext.fillStyle = color;
|
|
131
|
+
const hex = canvasContext.fillStyle;
|
|
132
|
+
if (hexCache.size >= HEX_CACHE_LIMIT)
|
|
133
|
+
hexCache.clear();
|
|
134
|
+
hexCache.set(color, hex);
|
|
135
|
+
return hex;
|
|
122
136
|
}
|
|
123
137
|
function getHSLColor(color, alpha = 1) {
|
|
124
138
|
const hsl = colorToHSL(color);
|
|
@@ -9041,18 +9055,16 @@ const getNow$1 = (isUtc) => {
|
|
|
9041
9055
|
return now;
|
|
9042
9056
|
};
|
|
9043
9057
|
const TimeLine = ({ left, top = "0px", height, color, width = "2px", zIndexNumber = 0, isHeader, isUtc = false }) => {
|
|
9044
|
-
const [currentTime, setCurrentTime] = React.useState(getNow$1(isUtc));
|
|
9058
|
+
const [currentTime, setCurrentTime] = React.useState(() => getNow$1(isUtc));
|
|
9045
9059
|
React.useEffect(() => {
|
|
9060
|
+
if (!isHeader) {
|
|
9061
|
+
return;
|
|
9062
|
+
}
|
|
9046
9063
|
const interval = setInterval(() => {
|
|
9047
9064
|
setCurrentTime(getNow$1(isUtc));
|
|
9048
|
-
}, 60000);
|
|
9065
|
+
}, 60000);
|
|
9049
9066
|
return () => clearInterval(interval);
|
|
9050
|
-
}, [isUtc]);
|
|
9051
|
-
const timeString = currentTime.toLocaleTimeString([], {
|
|
9052
|
-
hour: '2-digit',
|
|
9053
|
-
minute: '2-digit',
|
|
9054
|
-
hour12: false
|
|
9055
|
-
});
|
|
9067
|
+
}, [isUtc, isHeader]);
|
|
9056
9068
|
return (jsxRuntime.jsx("div", { style: {
|
|
9057
9069
|
position: "absolute",
|
|
9058
9070
|
top: top,
|
|
@@ -9064,7 +9076,11 @@ const TimeLine = ({ left, top = "0px", height, color, width = "2px", zIndexNumbe
|
|
|
9064
9076
|
zIndex: zIndexNumber,
|
|
9065
9077
|
}, className: styles$3["scheduler-timeline-now"], children: isHeader && (jsxRuntime.jsx("span", { style: {
|
|
9066
9078
|
color: color,
|
|
9067
|
-
}, className: styles$3["scheduler-timeline-label"], children:
|
|
9079
|
+
}, className: styles$3["scheduler-timeline-label"], children: currentTime.toLocaleTimeString([], {
|
|
9080
|
+
hour: '2-digit',
|
|
9081
|
+
minute: '2-digit',
|
|
9082
|
+
hour12: false
|
|
9083
|
+
}) })) }));
|
|
9068
9084
|
};
|
|
9069
9085
|
|
|
9070
9086
|
function isToday(startDate, endDate) {
|
|
@@ -9259,7 +9275,7 @@ const eventsCollide = (event1, event2) => {
|
|
|
9259
9275
|
return eventInsideOther || eventCollideStart || eventCollideEnd;
|
|
9260
9276
|
};
|
|
9261
9277
|
// Function to separate events into non-colliding rows
|
|
9262
|
-
const
|
|
9278
|
+
const computeInnerRows = (events) => {
|
|
9263
9279
|
const sortedEvents = [...events].sort((a, b) => {
|
|
9264
9280
|
const aOrder = a.order ?? Number.MAX_SAFE_INTEGER;
|
|
9265
9281
|
const bOrder = b.order ?? Number.MAX_SAFE_INTEGER;
|
|
@@ -9284,15 +9300,44 @@ const separateEventsToInnerRows = (events) => {
|
|
|
9284
9300
|
}
|
|
9285
9301
|
return rows;
|
|
9286
9302
|
};
|
|
9303
|
+
// The scheduler asks for the same row's lanes several times per repaint (total height, virtual-list
|
|
9304
|
+
// item size, row render). Row event arrays keep their identity until their events change, so the
|
|
9305
|
+
// array itself is the cache key.
|
|
9306
|
+
const innerRowsCache = new WeakMap();
|
|
9307
|
+
const separateEventsToInnerRows = (events) => {
|
|
9308
|
+
const cached = innerRowsCache.get(events);
|
|
9309
|
+
if (cached) {
|
|
9310
|
+
return cached;
|
|
9311
|
+
}
|
|
9312
|
+
const rows = computeInnerRows(events);
|
|
9313
|
+
innerRowsCache.set(events, rows);
|
|
9314
|
+
return rows;
|
|
9315
|
+
};
|
|
9287
9316
|
|
|
9288
9317
|
const DivisionLine = ({ left, top = "0px", height, isDayBoundary }) => {
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9318
|
+
return (jsxRuntime.jsx("div", { style: {
|
|
9319
|
+
position: "absolute",
|
|
9320
|
+
top: top,
|
|
9321
|
+
height: height,
|
|
9322
|
+
left: left + "%",
|
|
9323
|
+
width: isDayBoundary ? "2px" : "1px",
|
|
9324
|
+
background: isDayBoundary ? "rgba(255,255,255,1)" : "rgba(255,255,255,0.8)",
|
|
9325
|
+
pointerEvents: "none",
|
|
9326
|
+
zIndex: 0,
|
|
9327
|
+
} }));
|
|
9292
9328
|
};
|
|
9293
9329
|
|
|
9294
9330
|
const WeekEndLine = ({ left, top = "0px", height, widthPercentage }) => {
|
|
9295
|
-
return (jsxRuntime.jsx(
|
|
9331
|
+
return (jsxRuntime.jsx("div", { style: {
|
|
9332
|
+
position: "absolute",
|
|
9333
|
+
top: top,
|
|
9334
|
+
height: height,
|
|
9335
|
+
left: left + "%",
|
|
9336
|
+
width: widthPercentage + "%",
|
|
9337
|
+
background: "rgba(0,0,0,0.05)",
|
|
9338
|
+
pointerEvents: "none",
|
|
9339
|
+
zIndex: 0,
|
|
9340
|
+
} }));
|
|
9296
9341
|
};
|
|
9297
9342
|
|
|
9298
9343
|
var styles$1 = {"scheduler-row-header":"scheduler-row-module__scheduler-row-header__S-iv4"};
|